aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorromankoshelev <romankoshelev@yandex-team.com>2023-08-14 19:51:50 +0300
committerromankoshelev <romankoshelev@yandex-team.com>2023-08-15 01:24:11 +0300
commitcfcd865e05c0d0525ea27d1e153a043b32a85138 (patch)
tree68d3b3b25271e8a4998505897a269ff7ce119b76
parentccb790c507bd5e8ffe2ef9886ce5ee0a7ce22a15 (diff)
downloadydb-cfcd865e05c0d0525ea27d1e153a043b32a85138.tar.gz
Update ICU to 73.2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ctgmath28
-rw-r--r--contrib/libs/icu/CMakeLists.darwin-x86_64.txt6
-rw-r--r--contrib/libs/icu/CMakeLists.linux-aarch64.txt6
-rw-r--r--contrib/libs/icu/CMakeLists.linux-x86_64.txt6
-rw-r--r--contrib/libs/icu/CMakeLists.windows-x86_64.txt6
-rw-r--r--contrib/libs/icu/LICENSE125
-rw-r--r--contrib/libs/icu/common/appendable.cpp22
-rw-r--r--contrib/libs/icu/common/bmpset.cpp16
-rw-r--r--contrib/libs/icu/common/bmpset.h4
-rw-r--r--contrib/libs/icu/common/brkeng.cpp39
-rw-r--r--contrib/libs/icu/common/brkeng.h4
-rw-r--r--contrib/libs/icu/common/brkiter.cpp93
-rw-r--r--contrib/libs/icu/common/bytesinkutil.cpp16
-rw-r--r--contrib/libs/icu/common/bytesinkutil.h5
-rw-r--r--contrib/libs/icu/common/bytestream.cpp12
-rw-r--r--contrib/libs/icu/common/bytestrie.cpp32
-rw-r--r--contrib/libs/icu/common/bytestriebuilder.cpp44
-rw-r--r--contrib/libs/icu/common/bytestrieiterator.cpp38
-rw-r--r--contrib/libs/icu/common/caniter.cpp94
-rw-r--r--contrib/libs/icu/common/characterproperties.cpp36
-rw-r--r--contrib/libs/icu/common/chariter.cpp6
-rw-r--r--contrib/libs/icu/common/charstr.cpp22
-rw-r--r--contrib/libs/icu/common/charstr.h10
-rw-r--r--contrib/libs/icu/common/charstrmap.h4
-rw-r--r--contrib/libs/icu/common/cmemory.cpp20
-rw-r--r--contrib/libs/icu/common/cmemory.h94
-rw-r--r--contrib/libs/icu/common/cpputils.h4
-rw-r--r--contrib/libs/icu/common/cstr.cpp2
-rw-r--r--contrib/libs/icu/common/cstr.h4
-rw-r--r--contrib/libs/icu/common/cstring.cpp18
-rw-r--r--contrib/libs/icu/common/dictbe.cpp204
-rw-r--r--contrib/libs/icu/common/dictbe.h31
-rw-r--r--contrib/libs/icu/common/dictionarydata.cpp20
-rw-r--r--contrib/libs/icu/common/dictionarydata.h12
-rw-r--r--contrib/libs/icu/common/edits.cpp74
-rw-r--r--contrib/libs/icu/common/emojiprops.cpp14
-rw-r--r--contrib/libs/icu/common/emojiprops.h6
-rw-r--r--contrib/libs/icu/common/filteredbrk.cpp106
-rw-r--r--contrib/libs/icu/common/filterednormalizer2.cpp24
-rw-r--r--contrib/libs/icu/common/hash.h18
-rw-r--r--contrib/libs/icu/common/icudataver.cpp6
-rw-r--r--contrib/libs/icu/common/icuplug.cpp140
-rw-r--r--contrib/libs/icu/common/loadednormalizer2impl.cpp98
-rw-r--r--contrib/libs/icu/common/localebuilder.cpp4
-rw-r--r--contrib/libs/icu/common/localefallback_data.h1350
-rw-r--r--contrib/libs/icu/common/localematcher.cpp76
-rw-r--r--contrib/libs/icu/common/localeprioritylist.cpp2
-rw-r--r--contrib/libs/icu/common/locavailable.cpp22
-rw-r--r--contrib/libs/icu/common/locbased.cpp4
-rw-r--r--contrib/libs/icu/common/locdispnames.cpp132
-rw-r--r--contrib/libs/icu/common/locdistance.cpp4
-rw-r--r--contrib/libs/icu/common/locdspnm.cpp136
-rw-r--r--contrib/libs/icu/common/locid.cpp225
-rw-r--r--contrib/libs/icu/common/loclikely.cpp168
-rw-r--r--contrib/libs/icu/common/loclikelysubtags.cpp6
-rw-r--r--contrib/libs/icu/common/locmap.cpp14
-rw-r--r--contrib/libs/icu/common/locresdata.cpp20
-rw-r--r--contrib/libs/icu/common/locutil.cpp58
-rw-r--r--contrib/libs/icu/common/lsr.cpp4
-rw-r--r--contrib/libs/icu/common/lsr.h4
-rw-r--r--contrib/libs/icu/common/lstmbe.cpp21
-rw-r--r--contrib/libs/icu/common/lstmbe.h5
-rw-r--r--contrib/libs/icu/common/messageimpl.h2
-rw-r--r--contrib/libs/icu/common/messagepattern.cpp246
-rw-r--r--contrib/libs/icu/common/mlbe.cpp270
-rw-r--r--contrib/libs/icu/common/mlbe.h116
-rw-r--r--contrib/libs/icu/common/norm2_nfc_data.h130
-rw-r--r--contrib/libs/icu/common/norm2allmodes.h142
-rw-r--r--contrib/libs/icu/common/normalizer2.cpp134
-rw-r--r--contrib/libs/icu/common/normalizer2impl.cpp417
-rw-r--r--contrib/libs/icu/common/normalizer2impl.h100
-rw-r--r--contrib/libs/icu/common/normlzr.cpp20
-rw-r--r--contrib/libs/icu/common/patternprops.cpp38
-rw-r--r--contrib/libs/icu/common/patternprops.h10
-rw-r--r--contrib/libs/icu/common/pluralmap.cpp2
-rw-r--r--contrib/libs/icu/common/pluralmap.h40
-rw-r--r--contrib/libs/icu/common/propname.cpp26
-rw-r--r--contrib/libs/icu/common/propname_data.h1392
-rw-r--r--contrib/libs/icu/common/propsvec.cpp50
-rw-r--r--contrib/libs/icu/common/punycode.cpp44
-rw-r--r--contrib/libs/icu/common/putil.cpp308
-rw-r--r--contrib/libs/icu/common/rbbi.cpp232
-rw-r--r--contrib/libs/icu/common/rbbi_cache.cpp154
-rw-r--r--contrib/libs/icu/common/rbbidata.cpp26
-rw-r--r--contrib/libs/icu/common/rbbidata.h4
-rw-r--r--contrib/libs/icu/common/rbbinode.cpp64
-rw-r--r--contrib/libs/icu/common/rbbirb.cpp46
-rw-r--r--contrib/libs/icu/common/rbbirb.h8
-rw-r--r--contrib/libs/icu/common/rbbirpt.h208
-rw-r--r--contrib/libs/icu/common/rbbiscan.cpp156
-rw-r--r--contrib/libs/icu/common/rbbiscan.h6
-rw-r--r--contrib/libs/icu/common/rbbisetb.cpp30
-rw-r--r--contrib/libs/icu/common/rbbisetb.h4
-rw-r--r--contrib/libs/icu/common/rbbistbl.cpp42
-rw-r--r--contrib/libs/icu/common/rbbitblb.cpp102
-rw-r--r--contrib/libs/icu/common/rbbitblb.h6
-rw-r--r--contrib/libs/icu/common/resbund.cpp60
-rw-r--r--contrib/libs/icu/common/resbund_cnv.cpp8
-rw-r--r--contrib/libs/icu/common/resource.h16
-rw-r--r--contrib/libs/icu/common/ruleiter.cpp6
-rw-r--r--contrib/libs/icu/common/ruleiter.h8
-rw-r--r--contrib/libs/icu/common/schriter.cpp2
-rw-r--r--contrib/libs/icu/common/serv.cpp191
-rw-r--r--contrib/libs/icu/common/serv.h70
-rw-r--r--contrib/libs/icu/common/servlk.cpp22
-rw-r--r--contrib/libs/icu/common/servlkf.cpp22
-rw-r--r--contrib/libs/icu/common/servloc.h4
-rw-r--r--contrib/libs/icu/common/servls.cpp47
-rw-r--r--contrib/libs/icu/common/servnotf.cpp40
-rw-r--r--contrib/libs/icu/common/servnotf.h6
-rw-r--r--contrib/libs/icu/common/servrbf.cpp12
-rw-r--r--contrib/libs/icu/common/servslkf.cpp12
-rw-r--r--contrib/libs/icu/common/sharedobject.h24
-rw-r--r--contrib/libs/icu/common/simpleformatter.cpp52
-rw-r--r--contrib/libs/icu/common/static_unicode_sets.cpp14
-rw-r--r--contrib/libs/icu/common/stringpiece.cpp4
-rw-r--r--contrib/libs/icu/common/stringtriebuilder.cpp94
-rw-r--r--contrib/libs/icu/common/uarrsort.cpp12
-rw-r--r--contrib/libs/icu/common/ubidi.cpp212
-rw-r--r--contrib/libs/icu/common/ubidi_props.cpp4
-rw-r--r--contrib/libs/icu/common/ubidi_props_data.h257
-rw-r--r--contrib/libs/icu/common/ubidiln.cpp62
-rw-r--r--contrib/libs/icu/common/ubiditransform.cpp114
-rw-r--r--contrib/libs/icu/common/ubidiwrt.cpp58
-rw-r--r--contrib/libs/icu/common/ubrk.cpp62
-rw-r--r--contrib/libs/icu/common/ucase.cpp397
-rw-r--r--contrib/libs/icu/common/ucase.h29
-rw-r--r--contrib/libs/icu/common/ucase_props_data.h1377
-rw-r--r--contrib/libs/icu/common/ucasemap.cpp175
-rw-r--r--contrib/libs/icu/common/ucasemap_imp.h24
-rw-r--r--contrib/libs/icu/common/ucasemap_titlecase_brkiter.cpp6
-rw-r--r--contrib/libs/icu/common/ucat.cpp12
-rw-r--r--contrib/libs/icu/common/uchar.cpp54
-rw-r--r--contrib/libs/icu/common/uchar_props_data.h7159
-rw-r--r--contrib/libs/icu/common/ucharstrie.cpp54
-rw-r--r--contrib/libs/icu/common/ucharstriebuilder.cpp102
-rw-r--r--contrib/libs/icu/common/ucharstrieiterator.cpp50
-rw-r--r--contrib/libs/icu/common/uchriter.cpp22
-rw-r--r--contrib/libs/icu/common/ucln_cmn.cpp14
-rw-r--r--contrib/libs/icu/common/ucmndata.cpp18
-rw-r--r--contrib/libs/icu/common/ucnv.cpp574
-rw-r--r--contrib/libs/icu/common/ucnv2022.cpp236
-rw-r--r--contrib/libs/icu/common/ucnv_bld.cpp274
-rw-r--r--contrib/libs/icu/common/ucnv_cb.cpp20
-rw-r--r--contrib/libs/icu/common/ucnv_cnv.cpp26
-rw-r--r--contrib/libs/icu/common/ucnv_ct.cpp50
-rw-r--r--contrib/libs/icu/common/ucnv_err.cpp102
-rw-r--r--contrib/libs/icu/common/ucnv_ext.cpp92
-rw-r--r--contrib/libs/icu/common/ucnv_io.cpp114
-rw-r--r--contrib/libs/icu/common/ucnv_lmb.cpp90
-rw-r--r--contrib/libs/icu/common/ucnv_set.cpp8
-rw-r--r--contrib/libs/icu/common/ucnv_u16.cpp174
-rw-r--r--contrib/libs/icu/common/ucnv_u32.cpp132
-rw-r--r--contrib/libs/icu/common/ucnv_u7.cpp206
-rw-r--r--contrib/libs/icu/common/ucnv_u8.cpp82
-rw-r--r--contrib/libs/icu/common/ucnvbocu.cpp76
-rw-r--r--contrib/libs/icu/common/ucnvdisp.cpp10
-rw-r--r--contrib/libs/icu/common/ucnvhz.cpp80
-rw-r--r--contrib/libs/icu/common/ucnvisci.cpp96
-rw-r--r--contrib/libs/icu/common/ucnvlat1.cpp76
-rw-r--r--contrib/libs/icu/common/ucnvmbcs.cpp354
-rw-r--r--contrib/libs/icu/common/ucnvscsu.cpp202
-rw-r--r--contrib/libs/icu/common/ucnvsel.cpp118
-rw-r--r--contrib/libs/icu/common/ucol_data.h4
-rw-r--r--contrib/libs/icu/common/ucol_swp.cpp26
-rw-r--r--contrib/libs/icu/common/ucptrie_impl.h108
-rw-r--r--contrib/libs/icu/common/ucurr.cpp395
-rw-r--r--contrib/libs/icu/common/udata.cpp260
-rw-r--r--contrib/libs/icu/common/udatamem.cpp22
-rw-r--r--contrib/libs/icu/common/udatamem.h2
-rw-r--r--contrib/libs/icu/common/udataswp.cpp52
-rw-r--r--contrib/libs/icu/common/uenum.cpp56
-rw-r--r--contrib/libs/icu/common/uhash.cpp152
-rw-r--r--contrib/libs/icu/common/uidna.cpp208
-rw-r--r--contrib/libs/icu/common/uinit.cpp4
-rw-r--r--contrib/libs/icu/common/uinvchar.cpp50
-rw-r--r--contrib/libs/icu/common/uiter.cpp98
-rw-r--r--contrib/libs/icu/common/ulist.cpp78
-rw-r--r--contrib/libs/icu/common/uloc.cpp234
-rw-r--r--contrib/libs/icu/common/uloc_keytype.cpp152
-rw-r--r--contrib/libs/icu/common/uloc_tag.cpp474
-rw-r--r--contrib/libs/icu/common/ulocimp.h6
-rw-r--r--contrib/libs/icu/common/umapfile.cpp60
-rw-r--r--contrib/libs/icu/common/umapfile.h2
-rw-r--r--contrib/libs/icu/common/umutex.h10
-rw-r--r--contrib/libs/icu/common/unames.cpp118
-rw-r--r--contrib/libs/icu/common/unifiedcache.cpp68
-rw-r--r--contrib/libs/icu/common/unifiedcache.h40
-rw-r--r--contrib/libs/icu/common/uniset.cpp116
-rw-r--r--contrib/libs/icu/common/uniset_closure.cpp278
-rw-r--r--contrib/libs/icu/common/uniset_props.cpp107
-rw-r--r--contrib/libs/icu/common/unisetspan.cpp92
-rw-r--r--contrib/libs/icu/common/unisetspan.h8
-rw-r--r--contrib/libs/icu/common/unistr.cpp388
-rw-r--r--contrib/libs/icu/common/unistr_case.cpp36
-rw-r--r--contrib/libs/icu/common/unistr_case_locale.cpp4
-rw-r--r--contrib/libs/icu/common/unistr_cnv.cpp26
-rw-r--r--contrib/libs/icu/common/unistr_props.cpp2
-rw-r--r--contrib/libs/icu/common/unorm.cpp50
-rw-r--r--contrib/libs/icu/common/unormcmp.cpp50
-rw-r--r--contrib/libs/icu/common/unormimp.h2
-rw-r--r--contrib/libs/icu/common/uobject.cpp18
-rw-r--r--contrib/libs/icu/common/uposixdefs.h2
-rw-r--r--contrib/libs/icu/common/uprops.cpp63
-rw-r--r--contrib/libs/icu/common/uprops.h1
-rw-r--r--contrib/libs/icu/common/ures_cnv.cpp18
-rw-r--r--contrib/libs/icu/common/uresbund.cpp953
-rw-r--r--contrib/libs/icu/common/uresdata.cpp168
-rw-r--r--contrib/libs/icu/common/uresdata.h6
-rw-r--r--contrib/libs/icu/common/uresimp.h6
-rw-r--r--contrib/libs/icu/common/usc_impl.cpp44
-rw-r--r--contrib/libs/icu/common/uscript.cpp23
-rw-r--r--contrib/libs/icu/common/uscript_props.cpp6
-rw-r--r--contrib/libs/icu/common/uset.cpp80
-rw-r--r--contrib/libs/icu/common/uset_imp.h11
-rw-r--r--contrib/libs/icu/common/uset_props.cpp34
-rw-r--r--contrib/libs/icu/common/usetiter.cpp38
-rw-r--r--contrib/libs/icu/common/ushape.cpp180
-rw-r--r--contrib/libs/icu/common/usprep.cpp172
-rw-r--r--contrib/libs/icu/common/ustack.cpp4
-rw-r--r--contrib/libs/icu/common/ustr_cnv.cpp82
-rw-r--r--contrib/libs/icu/common/ustr_titlecase_brkiter.cpp60
-rw-r--r--contrib/libs/icu/common/ustr_wcs.cpp80
-rw-r--r--contrib/libs/icu/common/ustrcase.cpp342
-rw-r--r--contrib/libs/icu/common/ustrcase_locale.cpp18
-rw-r--r--contrib/libs/icu/common/ustrenum.cpp76
-rw-r--r--contrib/libs/icu/common/ustrenum.h4
-rw-r--r--contrib/libs/icu/common/ustrfmt.cpp14
-rw-r--r--contrib/libs/icu/common/ustring.cpp442
-rw-r--r--contrib/libs/icu/common/ustrtrns.cpp270
-rw-r--r--contrib/libs/icu/common/utext.cpp405
-rw-r--r--contrib/libs/icu/common/utf_impl.cpp10
-rw-r--r--contrib/libs/icu/common/util.cpp40
-rw-r--r--contrib/libs/icu/common/util.h6
-rw-r--r--contrib/libs/icu/common/util_props.cpp6
-rw-r--r--contrib/libs/icu/common/utrace.cpp72
-rw-r--r--contrib/libs/icu/common/utrie.cpp128
-rw-r--r--contrib/libs/icu/common/utrie2.cpp66
-rw-r--r--contrib/libs/icu/common/utrie2.h16
-rw-r--r--contrib/libs/icu/common/utrie2_builder.cpp140
-rw-r--r--contrib/libs/icu/common/utrie_swap.cpp12
-rw-r--r--contrib/libs/icu/common/uts46.cpp220
-rw-r--r--contrib/libs/icu/common/uvector.cpp79
-rw-r--r--contrib/libs/icu/common/uvector.h34
-rw-r--r--contrib/libs/icu/common/uvectr32.cpp50
-rw-r--r--contrib/libs/icu/common/uvectr32.h36
-rw-r--r--contrib/libs/icu/common/uvectr64.cpp26
-rw-r--r--contrib/libs/icu/common/uvectr64.h24
-rw-r--r--contrib/libs/icu/common/wintz.cpp10
-rw-r--r--contrib/libs/icu/i18n/alphaindex.cpp340
-rw-r--r--contrib/libs/icu/i18n/anytrans.cpp56
-rw-r--r--contrib/libs/icu/i18n/anytrans.h2
-rw-r--r--contrib/libs/icu/i18n/astro.cpp40
-rw-r--r--contrib/libs/icu/i18n/basictz.cpp94
-rw-r--r--contrib/libs/icu/i18n/bocsu.cpp2
-rw-r--r--contrib/libs/icu/i18n/brktrans.cpp8
-rw-r--r--contrib/libs/icu/i18n/buddhcal.cpp11
-rw-r--r--contrib/libs/icu/i18n/buddhcal.h19
-rw-r--r--contrib/libs/icu/i18n/calendar.cpp755
-rw-r--r--contrib/libs/icu/i18n/casetrn.cpp8
-rw-r--r--contrib/libs/icu/i18n/cecal.cpp37
-rw-r--r--contrib/libs/icu/i18n/cecal.h41
-rw-r--r--contrib/libs/icu/i18n/chnsecal.cpp220
-rw-r--r--contrib/libs/icu/i18n/chnsecal.h90
-rw-r--r--contrib/libs/icu/i18n/choicfmt.cpp50
-rw-r--r--contrib/libs/icu/i18n/coleitr.cpp42
-rw-r--r--contrib/libs/icu/i18n/coll.cpp116
-rw-r--r--contrib/libs/icu/i18n/collation.cpp9
-rw-r--r--contrib/libs/icu/i18n/collation.h7
-rw-r--r--contrib/libs/icu/i18n/collationbuilder.cpp222
-rw-r--r--contrib/libs/icu/i18n/collationbuilder.h2
-rw-r--r--contrib/libs/icu/i18n/collationcompare.cpp6
-rw-r--r--contrib/libs/icu/i18n/collationdata.cpp8
-rw-r--r--contrib/libs/icu/i18n/collationdata.h38
-rw-r--r--contrib/libs/icu/i18n/collationdatabuilder.cpp381
-rw-r--r--contrib/libs/icu/i18n/collationdatabuilder.h12
-rw-r--r--contrib/libs/icu/i18n/collationdatareader.cpp88
-rw-r--r--contrib/libs/icu/i18n/collationdatareader.h6
-rw-r--r--contrib/libs/icu/i18n/collationdatawriter.cpp42
-rw-r--r--contrib/libs/icu/i18n/collationdatawriter.h2
-rw-r--r--contrib/libs/icu/i18n/collationfastlatin.cpp54
-rw-r--r--contrib/libs/icu/i18n/collationfastlatin.h10
-rw-r--r--contrib/libs/icu/i18n/collationfastlatinbuilder.cpp124
-rw-r--r--contrib/libs/icu/i18n/collationfcd.cpp4
-rw-r--r--contrib/libs/icu/i18n/collationfcd.h2
-rw-r--r--contrib/libs/icu/i18n/collationiterator.cpp52
-rw-r--r--contrib/libs/icu/i18n/collationiterator.h10
-rw-r--r--contrib/libs/icu/i18n/collationkeys.cpp20
-rw-r--r--contrib/libs/icu/i18n/collationkeys.h6
-rw-r--r--contrib/libs/icu/i18n/collationroot.cpp68
-rw-r--r--contrib/libs/icu/i18n/collationroot.h5
-rw-r--r--contrib/libs/icu/i18n/collationruleparser.cpp60
-rw-r--r--contrib/libs/icu/i18n/collationruleparser.h4
-rw-r--r--contrib/libs/icu/i18n/collationsets.cpp120
-rw-r--r--contrib/libs/icu/i18n/collationsets.h16
-rw-r--r--contrib/libs/icu/i18n/collationsettings.cpp20
-rw-r--r--contrib/libs/icu/i18n/collationsettings.h10
-rw-r--r--contrib/libs/icu/i18n/collationtailoring.cpp28
-rw-r--r--contrib/libs/icu/i18n/collationtailoring.h12
-rw-r--r--contrib/libs/icu/i18n/collationweights.cpp26
-rw-r--r--contrib/libs/icu/i18n/coptccal.cpp20
-rw-r--r--contrib/libs/icu/i18n/coptccal.h18
-rw-r--r--contrib/libs/icu/i18n/cpdtrans.cpp74
-rw-r--r--contrib/libs/icu/i18n/cpdtrans.h12
-rw-r--r--contrib/libs/icu/i18n/csdetect.cpp147
-rw-r--r--contrib/libs/icu/i18n/csmatch.cpp10
-rw-r--r--contrib/libs/icu/i18n/csmatch.h8
-rw-r--r--contrib/libs/icu/i18n/csrmbcs.cpp65
-rw-r--r--contrib/libs/icu/i18n/csrsbcs.cpp4
-rw-r--r--contrib/libs/icu/i18n/csrucode.cpp10
-rw-r--r--contrib/libs/icu/i18n/csrutf8.cpp4
-rw-r--r--contrib/libs/icu/i18n/curramt.cpp6
-rw-r--r--contrib/libs/icu/i18n/currfmt.cpp2
-rw-r--r--contrib/libs/icu/i18n/currpinf.cpp30
-rw-r--r--contrib/libs/icu/i18n/currunit.cpp2
-rw-r--r--contrib/libs/icu/i18n/dangical.cpp27
-rw-r--r--contrib/libs/icu/i18n/dangical.h18
-rw-r--r--contrib/libs/icu/i18n/datefmt.cpp85
-rw-r--r--contrib/libs/icu/i18n/dayperiodrules.cpp34
-rw-r--r--contrib/libs/icu/i18n/dcfmtsym.cpp154
-rw-r--r--contrib/libs/icu/i18n/decContext.cpp8
-rw-r--r--contrib/libs/icu/i18n/decContext.h1
-rw-r--r--contrib/libs/icu/i18n/decNumber.cpp316
-rw-r--r--contrib/libs/icu/i18n/decNumber.h2
-rw-r--r--contrib/libs/icu/i18n/decimfmt.cpp32
-rw-r--r--contrib/libs/icu/i18n/displayoptions.cpp167
-rw-r--r--contrib/libs/icu/i18n/double-conversion-bignum.cpp15
-rw-r--r--contrib/libs/icu/i18n/double-conversion-double-to-string.cpp4
-rw-r--r--contrib/libs/icu/i18n/double-conversion-double-to-string.h4
-rw-r--r--contrib/libs/icu/i18n/double-conversion-ieee.h25
-rw-r--r--contrib/libs/icu/i18n/double-conversion-string-to-double.cpp4
-rw-r--r--contrib/libs/icu/i18n/double-conversion-string-to-double.h4
-rw-r--r--contrib/libs/icu/i18n/double-conversion-utils.h55
-rw-r--r--contrib/libs/icu/i18n/dt_impl.h114
-rw-r--r--contrib/libs/icu/i18n/dtfmtsym.cpp464
-rw-r--r--contrib/libs/icu/i18n/dtitv_impl.h112
-rw-r--r--contrib/libs/icu/i18n/dtitvfmt.cpp140
-rw-r--r--contrib/libs/icu/i18n/dtitvinf.cpp32
-rw-r--r--contrib/libs/icu/i18n/dtptngen.cpp319
-rw-r--r--contrib/libs/icu/i18n/dtptngen_impl.h140
-rw-r--r--contrib/libs/icu/i18n/dtrule.cpp14
-rw-r--r--contrib/libs/icu/i18n/erarules.cpp18
-rw-r--r--contrib/libs/icu/i18n/esctrn.cpp42
-rw-r--r--contrib/libs/icu/i18n/ethpccal.cpp180
-rw-r--r--contrib/libs/icu/i18n/ethpccal.h171
-rw-r--r--contrib/libs/icu/i18n/fmtable.cpp82
-rw-r--r--contrib/libs/icu/i18n/formatted_string_builder.cpp57
-rw-r--r--contrib/libs/icu/i18n/formatted_string_builder.h4
-rw-r--r--contrib/libs/icu/i18n/formattedval_impl.h23
-rw-r--r--contrib/libs/icu/i18n/formattedval_iterimpl.cpp2
-rw-r--r--contrib/libs/icu/i18n/formattedval_sbimpl.cpp5
-rw-r--r--contrib/libs/icu/i18n/formattedvalue.cpp6
-rw-r--r--contrib/libs/icu/i18n/fphdlimp.cpp10
-rw-r--r--contrib/libs/icu/i18n/fphdlimp.h22
-rw-r--r--contrib/libs/icu/i18n/fpositer.cpp18
-rw-r--r--contrib/libs/icu/i18n/funcrepl.cpp6
-rw-r--r--contrib/libs/icu/i18n/gender.cpp52
-rw-r--r--contrib/libs/icu/i18n/gregocal.cpp83
-rw-r--r--contrib/libs/icu/i18n/gregoimp.cpp44
-rw-r--r--contrib/libs/icu/i18n/gregoimp.h4
-rw-r--r--contrib/libs/icu/i18n/hebrwcal.cpp99
-rw-r--r--contrib/libs/icu/i18n/hebrwcal.h84
-rw-r--r--contrib/libs/icu/i18n/indiancal.cpp33
-rw-r--r--contrib/libs/icu/i18n/indiancal.h30
-rw-r--r--contrib/libs/icu/i18n/inputext.cpp14
-rw-r--r--contrib/libs/icu/i18n/islamcal.cpp607
-rw-r--r--contrib/libs/icu/i18n/islamcal.h478
-rw-r--r--contrib/libs/icu/i18n/iso8601cal.cpp37
-rw-r--r--contrib/libs/icu/i18n/iso8601cal.h102
-rw-r--r--contrib/libs/icu/i18n/japancal.cpp20
-rw-r--r--contrib/libs/icu/i18n/japancal.h8
-rw-r--r--contrib/libs/icu/i18n/listformatter.cpp11
-rw-r--r--contrib/libs/icu/i18n/measfmt.cpp82
-rw-r--r--contrib/libs/icu/i18n/measunit.cpp142
-rw-r--r--contrib/libs/icu/i18n/measunit_extra.cpp40
-rw-r--r--contrib/libs/icu/i18n/measure.cpp4
-rw-r--r--contrib/libs/icu/i18n/msgfmt.cpp408
-rw-r--r--contrib/libs/icu/i18n/msgfmt_impl.h8
-rw-r--r--contrib/libs/icu/i18n/name2uni.cpp26
-rw-r--r--contrib/libs/icu/i18n/nfrlist.h18
-rw-r--r--contrib/libs/icu/i18n/nfrs.cpp58
-rw-r--r--contrib/libs/icu/i18n/nfrs.h4
-rw-r--r--contrib/libs/icu/i18n/nfrule.cpp184
-rw-r--r--contrib/libs/icu/i18n/nfrule.h4
-rw-r--r--contrib/libs/icu/i18n/nfsubs.cpp168
-rw-r--r--contrib/libs/icu/i18n/nfsubs.h10
-rw-r--r--contrib/libs/icu/i18n/nortrans.cpp12
-rw-r--r--contrib/libs/icu/i18n/number_affixutils.cpp3
-rw-r--r--contrib/libs/icu/i18n/number_asformat.h14
-rw-r--r--contrib/libs/icu/i18n/number_capi.cpp189
-rw-r--r--contrib/libs/icu/i18n/number_compact.cpp28
-rw-r--r--contrib/libs/icu/i18n/number_compact.h16
-rw-r--r--contrib/libs/icu/i18n/number_currencysymbols.cpp4
-rw-r--r--contrib/libs/icu/i18n/number_currencysymbols.h2
-rw-r--r--contrib/libs/icu/i18n/number_decimalquantity.cpp127
-rw-r--r--contrib/libs/icu/i18n/number_decimalquantity.h38
-rw-r--r--contrib/libs/icu/i18n/number_decimfmtprops.cpp2
-rw-r--r--contrib/libs/icu/i18n/number_fluent.cpp40
-rw-r--r--contrib/libs/icu/i18n/number_formatimpl.cpp86
-rw-r--r--contrib/libs/icu/i18n/number_formatimpl.h32
-rw-r--r--contrib/libs/icu/i18n/number_grouping.cpp2
-rw-r--r--contrib/libs/icu/i18n/number_longnames.cpp58
-rw-r--r--contrib/libs/icu/i18n/number_longnames.h10
-rw-r--r--contrib/libs/icu/i18n/number_mapper.cpp12
-rw-r--r--contrib/libs/icu/i18n/number_mapper.h40
-rw-r--r--contrib/libs/icu/i18n/number_microprops.h22
-rw-r--r--contrib/libs/icu/i18n/number_modifiers.cpp15
-rw-r--r--contrib/libs/icu/i18n/number_modifiers.h132
-rw-r--r--contrib/libs/icu/i18n/number_multiplier.cpp4
-rw-r--r--contrib/libs/icu/i18n/number_multiplier.h2
-rw-r--r--contrib/libs/icu/i18n/number_output.cpp7
-rw-r--r--contrib/libs/icu/i18n/number_patternmodifier.cpp34
-rw-r--r--contrib/libs/icu/i18n/number_patternmodifier.h27
-rw-r--r--contrib/libs/icu/i18n/number_patternstring.cpp23
-rw-r--r--contrib/libs/icu/i18n/number_patternstring.h30
-rw-r--r--contrib/libs/icu/i18n/number_rounding.cpp157
-rw-r--r--contrib/libs/icu/i18n/number_roundingutils.h9
-rw-r--r--contrib/libs/icu/i18n/number_scientific.h18
-rw-r--r--contrib/libs/icu/i18n/number_simple.cpp255
-rw-r--r--contrib/libs/icu/i18n/number_skeletons.cpp61
-rw-r--r--contrib/libs/icu/i18n/number_skeletons.h2
-rw-r--r--contrib/libs/icu/i18n/number_symbolswrapper.cpp4
-rw-r--r--contrib/libs/icu/i18n/number_usageprefs.cpp10
-rw-r--r--contrib/libs/icu/i18n/number_usageprefs.h4
-rw-r--r--contrib/libs/icu/i18n/number_utypes.h3
-rw-r--r--contrib/libs/icu/i18n/numfmt.cpp262
-rw-r--r--contrib/libs/icu/i18n/numparse_affixes.cpp20
-rw-r--r--contrib/libs/icu/i18n/numparse_affixes.h14
-rw-r--r--contrib/libs/icu/i18n/numparse_currency.h2
-rw-r--r--contrib/libs/icu/i18n/numparse_types.h6
-rw-r--r--contrib/libs/icu/i18n/numparse_utils.h4
-rw-r--r--contrib/libs/icu/i18n/numparse_validators.h26
-rw-r--r--contrib/libs/icu/i18n/numrange_capi.cpp5
-rw-r--r--contrib/libs/icu/i18n/numrange_fluent.cpp13
-rw-r--r--contrib/libs/icu/i18n/numrange_impl.cpp14
-rw-r--r--contrib/libs/icu/i18n/numsys.cpp27
-rw-r--r--contrib/libs/icu/i18n/numsys_impl.h4
-rw-r--r--contrib/libs/icu/i18n/olsontz.cpp205
-rw-r--r--contrib/libs/icu/i18n/olsontz.h24
-rw-r--r--contrib/libs/icu/i18n/persncal.cpp38
-rw-r--r--contrib/libs/icu/i18n/persncal.h28
-rw-r--r--contrib/libs/icu/i18n/pluralranges.cpp4
-rw-r--r--contrib/libs/icu/i18n/plurfmt.cpp78
-rw-r--r--contrib/libs/icu/i18n/plurrule.cpp228
-rw-r--r--contrib/libs/icu/i18n/plurrule_impl.h140
-rw-r--r--contrib/libs/icu/i18n/quant.cpp12
-rw-r--r--contrib/libs/icu/i18n/quantityformatter.cpp36
-rw-r--r--contrib/libs/icu/i18n/quantityformatter.h2
-rw-r--r--contrib/libs/icu/i18n/rbnf.cpp538
-rw-r--r--contrib/libs/icu/i18n/rbt.cpp20
-rw-r--r--contrib/libs/icu/i18n/rbt.h4
-rw-r--r--contrib/libs/icu/i18n/rbt_data.cpp12
-rw-r--r--contrib/libs/icu/i18n/rbt_data.h10
-rw-r--r--contrib/libs/icu/i18n/rbt_pars.cpp288
-rw-r--r--contrib/libs/icu/i18n/rbt_pars.h18
-rw-r--r--contrib/libs/icu/i18n/rbt_rule.cpp88
-rw-r--r--contrib/libs/icu/i18n/rbt_rule.h4
-rw-r--r--contrib/libs/icu/i18n/rbt_set.cpp93
-rw-r--r--contrib/libs/icu/i18n/rbt_set.h2
-rw-r--r--contrib/libs/icu/i18n/rbtz.cpp229
-rw-r--r--contrib/libs/icu/i18n/regexcmp.cpp308
-rw-r--r--contrib/libs/icu/i18n/regexcmp.h14
-rw-r--r--contrib/libs/icu/i18n/regexcst.h414
-rw-r--r--contrib/libs/icu/i18n/regeximp.cpp22
-rw-r--r--contrib/libs/icu/i18n/regeximp.h14
-rw-r--r--contrib/libs/icu/i18n/regexst.cpp20
-rw-r--r--contrib/libs/icu/i18n/regextxt.cpp8
-rw-r--r--contrib/libs/icu/i18n/region.cpp302
-rw-r--r--contrib/libs/icu/i18n/region_impl.h10
-rw-r--r--contrib/libs/icu/i18n/reldatefmt.cpp100
-rw-r--r--contrib/libs/icu/i18n/reldtfmt.cpp98
-rw-r--r--contrib/libs/icu/i18n/reldtfmt.h12
-rw-r--r--contrib/libs/icu/i18n/rematch.cpp816
-rw-r--r--contrib/libs/icu/i18n/remtrans.cpp10
-rw-r--r--contrib/libs/icu/i18n/repattrn.cpp146
-rw-r--r--contrib/libs/icu/i18n/rulebasedcollator.cpp205
-rw-r--r--contrib/libs/icu/i18n/scientificnumberformatter.cpp28
-rw-r--r--contrib/libs/icu/i18n/scriptset.cpp18
-rw-r--r--contrib/libs/icu/i18n/scriptset.h5
-rw-r--r--contrib/libs/icu/i18n/search.cpp76
-rw-r--r--contrib/libs/icu/i18n/selfmt.cpp8
-rw-r--r--contrib/libs/icu/i18n/selfmtimpl.h110
-rw-r--r--contrib/libs/icu/i18n/sharedbreakiterator.h4
-rw-r--r--contrib/libs/icu/i18n/sharedcalendar.h10
-rw-r--r--contrib/libs/icu/i18n/shareddateformatsymbols.h10
-rw-r--r--contrib/libs/icu/i18n/sharednumberformat.h9
-rw-r--r--contrib/libs/icu/i18n/sharedpluralrules.h9
-rw-r--r--contrib/libs/icu/i18n/simpletz.cpp124
-rw-r--r--contrib/libs/icu/i18n/smpdtfmt.cpp769
-rw-r--r--contrib/libs/icu/i18n/smpdtfst.cpp38
-rw-r--r--contrib/libs/icu/i18n/sortkey.cpp14
-rw-r--r--contrib/libs/icu/i18n/standardplural.cpp16
-rw-r--r--contrib/libs/icu/i18n/string_segment.cpp6
-rw-r--r--contrib/libs/icu/i18n/strmatch.cpp26
-rw-r--r--contrib/libs/icu/i18n/strrepl.cpp42
-rw-r--r--contrib/libs/icu/i18n/stsearch.cpp55
-rw-r--r--contrib/libs/icu/i18n/taiwncal.cpp4
-rw-r--r--contrib/libs/icu/i18n/taiwncal.h4
-rw-r--r--contrib/libs/icu/i18n/timezone.cpp351
-rw-r--r--contrib/libs/icu/i18n/titletrn.cpp10
-rw-r--r--contrib/libs/icu/i18n/tmunit.cpp4
-rw-r--r--contrib/libs/icu/i18n/tmutamt.cpp2
-rw-r--r--contrib/libs/icu/i18n/tmutfmt.cpp168
-rw-r--r--contrib/libs/icu/i18n/translit.cpp188
-rw-r--r--contrib/libs/icu/i18n/transreg.cpp116
-rw-r--r--contrib/libs/icu/i18n/transreg.h14
-rw-r--r--contrib/libs/icu/i18n/tridpars.cpp214
-rw-r--r--contrib/libs/icu/i18n/tzfmt.cpp497
-rw-r--r--contrib/libs/icu/i18n/tzgnames.cpp343
-rw-r--r--contrib/libs/icu/i18n/tznames.cpp104
-rw-r--r--contrib/libs/icu/i18n/tznames_impl.cpp695
-rw-r--r--contrib/libs/icu/i18n/tznames_impl.h24
-rw-r--r--contrib/libs/icu/i18n/tzrule.cpp110
-rw-r--r--contrib/libs/icu/i18n/tztrans.cpp36
-rw-r--r--contrib/libs/icu/i18n/ucal.cpp110
-rw-r--r--contrib/libs/icu/i18n/ucln_in.cpp6
-rw-r--r--contrib/libs/icu/i18n/ucol.cpp110
-rw-r--r--contrib/libs/icu/i18n/ucol_res.cpp152
-rw-r--r--contrib/libs/icu/i18n/ucol_sit.cpp34
-rw-r--r--contrib/libs/icu/i18n/ucoleitr.cpp46
-rw-r--r--contrib/libs/icu/i18n/ucsdet.cpp20
-rw-r--r--contrib/libs/icu/i18n/udat.cpp203
-rw-r--r--contrib/libs/icu/i18n/udateintervalformat.cpp26
-rw-r--r--contrib/libs/icu/i18n/udatpg.cpp123
-rw-r--r--contrib/libs/icu/i18n/ufieldpositer.cpp4
-rw-r--r--contrib/libs/icu/i18n/uitercollationiterator.cpp26
-rw-r--r--contrib/libs/icu/i18n/uitercollationiterator.h4
-rw-r--r--contrib/libs/icu/i18n/ulistformatter.cpp28
-rw-r--r--contrib/libs/icu/i18n/ulocdata.cpp89
-rw-r--r--contrib/libs/icu/i18n/umsg.cpp118
-rw-r--r--contrib/libs/icu/i18n/unesctrn.cpp44
-rw-r--r--contrib/libs/icu/i18n/unesctrn.h4
-rw-r--r--contrib/libs/icu/i18n/uni2name.cpp10
-rw-r--r--contrib/libs/icu/i18n/units_complexconverter.cpp15
-rw-r--r--contrib/libs/icu/i18n/units_complexconverter.h4
-rw-r--r--contrib/libs/icu/i18n/units_converter.cpp17
-rw-r--r--contrib/libs/icu/i18n/units_converter.h6
-rw-r--r--contrib/libs/icu/i18n/units_data.cpp116
-rw-r--r--contrib/libs/icu/i18n/units_data.h16
-rw-r--r--contrib/libs/icu/i18n/units_router.cpp29
-rw-r--r--contrib/libs/icu/i18n/units_router.h10
-rw-r--r--contrib/libs/icu/i18n/unum.cpp217
-rw-r--r--contrib/libs/icu/i18n/unumsys.cpp4
-rw-r--r--contrib/libs/icu/i18n/upluralrules.cpp30
-rw-r--r--contrib/libs/icu/i18n/uregex.cpp376
-rw-r--r--contrib/libs/icu/i18n/uregexc.cpp6
-rw-r--r--contrib/libs/icu/i18n/usearch.cpp240
-rw-r--r--contrib/libs/icu/i18n/uspoof.cpp173
-rw-r--r--contrib/libs/icu/i18n/uspoof_build.cpp22
-rw-r--r--contrib/libs/icu/i18n/uspoof_conf.cpp99
-rw-r--r--contrib/libs/icu/i18n/uspoof_conf.h13
-rw-r--r--contrib/libs/icu/i18n/uspoof_impl.cpp104
-rw-r--r--contrib/libs/icu/i18n/uspoof_impl.h13
-rw-r--r--contrib/libs/icu/i18n/utf16collationiterator.cpp70
-rw-r--r--contrib/libs/icu/i18n/utf16collationiterator.h34
-rw-r--r--contrib/libs/icu/i18n/utf8collationiterator.cpp34
-rw-r--r--contrib/libs/icu/i18n/utf8collationiterator.h2
-rw-r--r--contrib/libs/icu/i18n/utmscale.cpp12
-rw-r--r--contrib/libs/icu/i18n/utrans.cpp114
-rw-r--r--contrib/libs/icu/i18n/vtzone.cpp611
-rw-r--r--contrib/libs/icu/i18n/vzone.cpp20
-rw-r--r--contrib/libs/icu/i18n/vzone.h2
-rw-r--r--contrib/libs/icu/i18n/windtfmt.cpp42
-rw-r--r--contrib/libs/icu/i18n/windtfmt.h4
-rw-r--r--contrib/libs/icu/i18n/winnmfmt.cpp28
-rw-r--r--contrib/libs/icu/i18n/winnmfmt.h4
-rw-r--r--contrib/libs/icu/i18n/wintzimpl.cpp24
-rw-r--r--contrib/libs/icu/i18n/zonemeta.cpp392
-rw-r--r--contrib/libs/icu/i18n/zonemeta.h30
-rw-r--r--contrib/libs/icu/i18n/zrule.cpp8
-rw-r--r--contrib/libs/icu/i18n/zrule.h4
-rw-r--r--contrib/libs/icu/i18n/ztrans.h4
-rw-r--r--contrib/libs/icu/icudt73_dat.rodata (renamed from contrib/libs/icu/icudt70_dat.rodata)bin29466000 -> 32029568 bytes
-rw-r--r--contrib/libs/icu/include/unicode/alphaindex.h8
-rw-r--r--contrib/libs/icu/include/unicode/appendable.h4
-rw-r--r--contrib/libs/icu/include/unicode/basictz.h24
-rw-r--r--contrib/libs/icu/include/unicode/brkiter.h4
-rw-r--r--contrib/libs/icu/include/unicode/bytestrie.h18
-rw-r--r--contrib/libs/icu/include/unicode/bytestriebuilder.h4
-rw-r--r--contrib/libs/icu/include/unicode/calendar.h216
-rw-r--r--contrib/libs/icu/include/unicode/caniter.h8
-rw-r--r--contrib/libs/icu/include/unicode/casemap.h66
-rw-r--r--contrib/libs/icu/include/unicode/char16ptr.h4
-rw-r--r--contrib/libs/icu/include/unicode/chariter.h8
-rw-r--r--contrib/libs/icu/include/unicode/choicfmt.h14
-rw-r--r--contrib/libs/icu/include/unicode/coleitr.h4
-rw-r--r--contrib/libs/icu/include/unicode/coll.h20
-rw-r--r--contrib/libs/icu/include/unicode/compactdecimalformat.h16
-rw-r--r--contrib/libs/icu/include/unicode/curramt.h10
-rw-r--r--contrib/libs/icu/include/unicode/currunit.h2
-rw-r--r--contrib/libs/icu/include/unicode/datefmt.h6
-rw-r--r--contrib/libs/icu/include/unicode/dcfmtsym.h15
-rw-r--r--contrib/libs/icu/include/unicode/decimfmt.h70
-rw-r--r--contrib/libs/icu/include/unicode/displayoptions.h274
-rw-r--r--contrib/libs/icu/include/unicode/dtfmtsym.h14
-rw-r--r--contrib/libs/icu/include/unicode/dtintrv.h2
-rw-r--r--contrib/libs/icu/include/unicode/dtitvfmt.h20
-rw-r--r--contrib/libs/icu/include/unicode/dtitvinf.h4
-rw-r--r--contrib/libs/icu/include/unicode/dtptngen.h79
-rw-r--r--contrib/libs/icu/include/unicode/edits.h14
-rw-r--r--contrib/libs/icu/include/unicode/fieldpos.h2
-rw-r--r--contrib/libs/icu/include/unicode/fmtable.h10
-rw-r--r--contrib/libs/icu/include/unicode/formattednumber.h215
-rw-r--r--contrib/libs/icu/include/unicode/gender.h4
-rw-r--r--contrib/libs/icu/include/unicode/gregocal.h34
-rw-r--r--contrib/libs/icu/include/unicode/icuplug.h8
-rw-r--r--contrib/libs/icu/include/unicode/idna.h4
-rw-r--r--contrib/libs/icu/include/unicode/listformatter.h22
-rw-r--r--contrib/libs/icu/include/unicode/localematcher.h18
-rw-r--r--contrib/libs/icu/include/unicode/localpointer.h102
-rw-r--r--contrib/libs/icu/include/unicode/locid.h22
-rw-r--r--contrib/libs/icu/include/unicode/measfmt.h4
-rw-r--r--contrib/libs/icu/include/unicode/measunit.h162
-rw-r--r--contrib/libs/icu/include/unicode/measure.h2
-rw-r--r--contrib/libs/icu/include/unicode/messagepattern.h10
-rw-r--r--contrib/libs/icu/include/unicode/msgfmt.h30
-rw-r--r--contrib/libs/icu/include/unicode/normalizer2.h44
-rw-r--r--contrib/libs/icu/include/unicode/normlzr.h6
-rw-r--r--contrib/libs/icu/include/unicode/numberformatter.h296
-rw-r--r--contrib/libs/icu/include/unicode/numberrangeformatter.h39
-rw-r--r--contrib/libs/icu/include/unicode/numfmt.h41
-rw-r--r--contrib/libs/icu/include/unicode/numsys.h6
-rw-r--r--contrib/libs/icu/include/unicode/parsepos.h2
-rw-r--r--contrib/libs/icu/include/unicode/platform.h52
-rw-r--r--contrib/libs/icu/include/unicode/plurfmt.h4
-rw-r--r--contrib/libs/icu/include/unicode/plurrule.h34
-rw-r--r--contrib/libs/icu/include/unicode/rbbi.h99
-rw-r--r--contrib/libs/icu/include/unicode/rbnf.h29
-rw-r--r--contrib/libs/icu/include/unicode/rbtz.h6
-rw-r--r--contrib/libs/icu/include/unicode/regex.h50
-rw-r--r--contrib/libs/icu/include/unicode/region.h10
-rw-r--r--contrib/libs/icu/include/unicode/reldatefmt.h16
-rw-r--r--contrib/libs/icu/include/unicode/rep.h2
-rw-r--r--contrib/libs/icu/include/unicode/resbund.h14
-rw-r--r--contrib/libs/icu/include/unicode/schriter.h8
-rw-r--r--contrib/libs/icu/include/unicode/scientificnumberformatter.h2
-rw-r--r--contrib/libs/icu/include/unicode/search.h12
-rw-r--r--contrib/libs/icu/include/unicode/selfmt.h2
-rw-r--r--contrib/libs/icu/include/unicode/simpleformatter.h10
-rw-r--r--contrib/libs/icu/include/unicode/simplenumberformatter.h329
-rw-r--r--contrib/libs/icu/include/unicode/simpletz.h8
-rw-r--r--contrib/libs/icu/include/unicode/smpdtfmt.h65
-rw-r--r--contrib/libs/icu/include/unicode/sortkey.h2
-rw-r--r--contrib/libs/icu/include/unicode/strenum.h30
-rw-r--r--contrib/libs/icu/include/unicode/stringtriebuilder.h20
-rw-r--r--contrib/libs/icu/include/unicode/stsearch.h18
-rw-r--r--contrib/libs/icu/include/unicode/symtable.h8
-rw-r--r--contrib/libs/icu/include/unicode/tblcoll.h18
-rw-r--r--contrib/libs/icu/include/unicode/timezone.h26
-rw-r--r--contrib/libs/icu/include/unicode/translit.h12
-rw-r--r--contrib/libs/icu/include/unicode/tzfmt.h18
-rw-r--r--contrib/libs/icu/include/unicode/tznames.h2
-rw-r--r--contrib/libs/icu/include/unicode/tzrule.h14
-rw-r--r--contrib/libs/icu/include/unicode/ubiditransform.h2
-rw-r--r--contrib/libs/icu/include/unicode/ubrk.h11
-rw-r--r--contrib/libs/icu/include/unicode/ucal.h64
-rw-r--r--contrib/libs/icu/include/unicode/uchar.h67
-rw-r--r--contrib/libs/icu/include/unicode/ucharstrie.h20
-rw-r--r--contrib/libs/icu/include/unicode/ucharstriebuilder.h4
-rw-r--r--contrib/libs/icu/include/unicode/uclean.h6
-rw-r--r--contrib/libs/icu/include/unicode/ucnv.h26
-rw-r--r--contrib/libs/icu/include/unicode/ucnv_cb.h4
-rw-r--r--contrib/libs/icu/include/unicode/ucnv_err.h2
-rw-r--r--contrib/libs/icu/include/unicode/ucnvsel.h1
-rw-r--r--contrib/libs/icu/include/unicode/ucol.h30
-rw-r--r--contrib/libs/icu/include/unicode/uconfig.h10
-rw-r--r--contrib/libs/icu/include/unicode/ucpmap.h3
-rw-r--r--contrib/libs/icu/include/unicode/ucptrie.h3
-rw-r--r--contrib/libs/icu/include/unicode/udat.h6
-rw-r--r--contrib/libs/icu/include/unicode/udata.h4
-rw-r--r--contrib/libs/icu/include/unicode/udatpg.h73
-rw-r--r--contrib/libs/icu/include/unicode/udisplayoptions.h325
-rw-r--r--contrib/libs/icu/include/unicode/uformattednumber.h224
-rw-r--r--contrib/libs/icu/include/unicode/uformattedvalue.h4
-rw-r--r--contrib/libs/icu/include/unicode/uloc.h4
-rw-r--r--contrib/libs/icu/include/unicode/umachine.h44
-rw-r--r--contrib/libs/icu/include/unicode/umisc.h4
-rw-r--r--contrib/libs/icu/include/unicode/umutablecptrie.h3
-rw-r--r--contrib/libs/icu/include/unicode/uniset.h60
-rw-r--r--contrib/libs/icu/include/unicode/unistr.h97
-rw-r--r--contrib/libs/icu/include/unicode/unum.h98
-rw-r--r--contrib/libs/icu/include/unicode/unumberformatter.h306
-rw-r--r--contrib/libs/icu/include/unicode/unumberoptions.h173
-rw-r--r--contrib/libs/icu/include/unicode/unumberrangeformatter.h2
-rw-r--r--contrib/libs/icu/include/unicode/uobject.h26
-rw-r--r--contrib/libs/icu/include/unicode/urename.h27
-rw-r--r--contrib/libs/icu/include/unicode/ures.h9
-rw-r--r--contrib/libs/icu/include/unicode/uscript.h7
-rw-r--r--contrib/libs/icu/include/unicode/uset.h84
-rw-r--r--contrib/libs/icu/include/unicode/usetiter.h6
-rw-r--r--contrib/libs/icu/include/unicode/usimplenumberformatter.h305
-rw-r--r--contrib/libs/icu/include/unicode/uspoof.h6
-rw-r--r--contrib/libs/icu/include/unicode/ustring.h6
-rw-r--r--contrib/libs/icu/include/unicode/utext.h16
-rw-r--r--contrib/libs/icu/include/unicode/utf_old.h6
-rw-r--r--contrib/libs/icu/include/unicode/uvernum.h27
-rw-r--r--contrib/libs/icu/include/unicode/vtzone.h11
-rw-r--r--contrib/libs/icu/io/locbund.cpp28
-rw-r--r--contrib/libs/icu/io/sprintf.cpp46
-rw-r--r--contrib/libs/icu/io/sscanf.cpp30
-rw-r--r--contrib/libs/icu/io/ucln_io.cpp6
-rw-r--r--contrib/libs/icu/io/ufile.cpp62
-rw-r--r--contrib/libs/icu/io/ufmt_cmn.cpp28
-rw-r--r--contrib/libs/icu/io/uprintf.cpp34
-rw-r--r--contrib/libs/icu/io/uprntf_p.cpp156
-rw-r--r--contrib/libs/icu/io/uscanf.cpp10
-rw-r--r--contrib/libs/icu/io/uscanf_p.cpp144
-rw-r--r--contrib/libs/icu/io/ustdio.cpp120
-rw-r--r--contrib/libs/icu/io/ustream.cpp24
-rw-r--r--contrib/libs/icu/ya.make10
710 files changed, 34313 insertions, 27057 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/ctgmath b/contrib/libs/cxxsupp/libcxx/include/ctgmath
deleted file mode 100644
index 6237979be49..00000000000
--- a/contrib/libs/cxxsupp/libcxx/include/ctgmath
+++ /dev/null
@@ -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
diff --git a/contrib/libs/icu/CMakeLists.darwin-x86_64.txt b/contrib/libs/icu/CMakeLists.darwin-x86_64.txt
index 2fe0bd15dae..226d2199fd2 100644
--- a/contrib/libs/icu/CMakeLists.darwin-x86_64.txt
+++ b/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
)
diff --git a/contrib/libs/icu/CMakeLists.linux-aarch64.txt b/contrib/libs/icu/CMakeLists.linux-aarch64.txt
index 5cb548d8550..2177c9ae815 100644
--- a/contrib/libs/icu/CMakeLists.linux-aarch64.txt
+++ b/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
)
diff --git a/contrib/libs/icu/CMakeLists.linux-x86_64.txt b/contrib/libs/icu/CMakeLists.linux-x86_64.txt
index 5cb548d8550..2177c9ae815 100644
--- a/contrib/libs/icu/CMakeLists.linux-x86_64.txt
+++ b/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
)
diff --git a/contrib/libs/icu/CMakeLists.windows-x86_64.txt b/contrib/libs/icu/CMakeLists.windows-x86_64.txt
index 08eebc23b9b..dbc1baece37 100644
--- a/contrib/libs/icu/CMakeLists.windows-x86_64.txt
+++ b/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
)
diff --git a/contrib/libs/icu/LICENSE b/contrib/libs/icu/LICENSE
index 970ae074cbf..22472dc2ec2 100644
--- a/contrib/libs/icu/LICENSE
+++ b/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.
diff --git a/contrib/libs/icu/common/appendable.cpp b/contrib/libs/icu/common/appendable.cpp
index fca3c1e4133..c0fbcc6530a 100644
--- a/contrib/libs/icu/common/appendable.cpp
+++ b/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;
diff --git a/contrib/libs/icu/common/bmpset.cpp b/contrib/libs/icu/common/bmpset.cpp
index bc79f5e5a63..641c675c670 100644
--- a/contrib/libs/icu/common/bmpset.cpp
+++ b/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
diff --git a/contrib/libs/icu/common/bmpset.h b/contrib/libs/icu/common/bmpset.h
index e1982ac669d..fad0310038a 100644
--- a/contrib/libs/icu/common/bmpset.h
+++ b/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).
diff --git a/contrib/libs/icu/common/brkeng.cpp b/contrib/libs/icu/common/brkeng.cpp
index 52e9c53621d..ce3d09cf23b 100644
--- a/contrib/libs/icu/common/brkeng.cpp
+++ b/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
diff --git a/contrib/libs/icu/common/brkeng.h b/contrib/libs/icu/common/brkeng.h
index 6843f1cc953..240dc8f4d34 100644
--- a/contrib/libs/icu/common/brkeng.h
+++ b/contrib/libs/icu/common/brkeng.h
@@ -75,6 +75,7 @@ class LanguageBreakEngine : public UMemory {
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode &status) const = 0;
};
@@ -194,6 +195,7 @@ class UnhandledEngine : public LanguageBreakEngine {
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode &status) const override;
/**
@@ -264,7 +266,7 @@ protected:
* <p>Create a DictionaryMatcher for the specified script and break type.</p>
* @param script An ISO 15924 script code that identifies the dictionary to be
* created.
- * @return A DictionaryMatcher with the desired characteristics, or NULL.
+ * @return A DictionaryMatcher with the desired characteristics, or nullptr.
*/
virtual DictionaryMatcher *loadDictionaryMatcherFor(UScriptCode script);
};
diff --git a/contrib/libs/icu/common/brkiter.cpp b/contrib/libs/icu/common/brkiter.cpp
index 8b228acf2c3..41e4e0dff57 100644
--- a/contrib/libs/icu/common/brkiter.cpp
+++ b/contrib/libs/icu/common/brkiter.cpp
@@ -30,6 +30,7 @@
#include "unicode/ures.h"
#include "unicode/ustring.h"
#include "unicode/filteredbrk.h"
+#include "bytesinkutil.h"
#include "ucln_cmn.h"
#include "cstring.h"
#include "umutex.h"
@@ -59,15 +60,15 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
char ext[4]={'\0'};
CharString actualLocale;
int32_t size;
- const UChar* brkfname = NULL;
+ const char16_t* brkfname = nullptr;
UResourceBundle brkRulesStack;
UResourceBundle brkNameStack;
UResourceBundle *brkRules = &brkRulesStack;
UResourceBundle *brkName = &brkNameStack;
- RuleBasedBreakIterator *result = NULL;
+ RuleBasedBreakIterator *result = nullptr;
if (U_FAILURE(status))
- return NULL;
+ return nullptr;
ures_initStackObject(brkRules);
ures_initStackObject(brkName);
@@ -94,9 +95,9 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
if (U_SUCCESS(status) && brkfname) {
actualLocale.append(ures_getLocaleInternal(brkName, &status), -1, status);
- UChar* extStart=u_strchr(brkfname, 0x002e);
+ char16_t* extStart=u_strchr(brkfname, 0x002e);
int len = 0;
- if(extStart!=NULL){
+ if (extStart != nullptr){
len = (int)(extStart-brkfname);
u_UCharsToChars(extStart+1, ext, sizeof(ext)); // nul terminates the buff
u_UCharsToChars(brkfname, fnbuff, len);
@@ -111,14 +112,14 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
UDataMemory* file = udata_open(U_ICUDATA_BRKITR, ext, fnbuff, &status);
if (U_FAILURE(status)) {
ures_close(b);
- return NULL;
+ return nullptr;
}
// Create a RuleBasedBreakIterator
- result = new RuleBasedBreakIterator(file, status);
+ result = new RuleBasedBreakIterator(file, uprv_strstr(type, "phrase") != nullptr, status);
// If there is a result, set the valid locale and actual locale, and the kind
- if (U_SUCCESS(status) && result != NULL) {
+ if (U_SUCCESS(status) && result != nullptr) {
U_LOCALE_BASED(locBased, *(BreakIterator*)result);
locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status),
actualLocale.data());
@@ -126,12 +127,12 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st
ures_close(b);
- if (U_FAILURE(status) && result != NULL) { // Sometimes redundant check, but simple
+ if (U_FAILURE(status) && result != nullptr) { // Sometimes redundant check, but simple
delete result;
- return NULL;
+ return nullptr;
}
- if (result == NULL) {
+ if (result == nullptr) {
udata_close(file);
if (U_SUCCESS(status)) {
status = U_MEMORY_ALLOCATION_ERROR;
@@ -259,7 +260,7 @@ public:
}
virtual UObject* handleDefault(const ICUServiceKey& key, UnicodeString* /*actualID*/, UErrorCode& status) const override {
- LocaleKey& lkey = (LocaleKey&)key;
+ LocaleKey& lkey = static_cast<LocaleKey&>(const_cast<ICUServiceKey&>(key));
int32_t kind = lkey.kind();
Locale loc;
lkey.currentLocale(loc);
@@ -278,8 +279,8 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
// defined in ucln_cmn.h
U_NAMESPACE_END
-static icu::UInitOnce gInitOnceBrkiter = U_INITONCE_INITIALIZER;
-static icu::ICULocaleService* gService = NULL;
+static icu::UInitOnce gInitOnceBrkiter {};
+static icu::ICULocaleService* gService = nullptr;
@@ -287,27 +288,27 @@ static icu::ICULocaleService* gService = NULL;
* Release all static memory held by breakiterator.
*/
U_CDECL_BEGIN
-static UBool U_CALLCONV breakiterator_cleanup(void) {
+static UBool U_CALLCONV breakiterator_cleanup() {
#if !UCONFIG_NO_SERVICE
if (gService) {
delete gService;
- gService = NULL;
+ gService = nullptr;
}
gInitOnceBrkiter.reset();
#endif
- return TRUE;
+ return true;
}
U_CDECL_END
U_NAMESPACE_BEGIN
static void U_CALLCONV
-initService(void) {
+initService() {
gService = new ICUBreakIteratorService();
ucln_common_registerCleanup(UCLN_COMMON_BREAKITERATOR, breakiterator_cleanup);
}
static ICULocaleService*
-getService(void)
+getService()
{
umtx_initOnce(gInitOnceBrkiter, &initService);
return gService;
@@ -317,9 +318,9 @@ getService(void)
// -------------------------------------
static inline UBool
-hasService(void)
+hasService()
{
- return !gInitOnceBrkiter.isReset() && getService() != NULL;
+ return !gInitOnceBrkiter.isReset() && getService() != nullptr;
}
// -------------------------------------
@@ -328,9 +329,9 @@ URegistryKey U_EXPORT2
BreakIterator::registerInstance(BreakIterator* toAdopt, const Locale& locale, UBreakIteratorType kind, UErrorCode& status)
{
ICULocaleService *service = getService();
- if (service == NULL) {
+ if (service == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return service->registerInstance(toAdopt, locale, kind, status);
}
@@ -346,17 +347,17 @@ BreakIterator::unregister(URegistryKey key, UErrorCode& status)
}
status = U_MEMORY_ALLOCATION_ERROR;
}
- return FALSE;
+ return false;
}
// -------------------------------------
StringEnumeration* U_EXPORT2
-BreakIterator::getAvailableLocales(void)
+BreakIterator::getAvailableLocales()
{
ICULocaleService *service = getService();
- if (service == NULL) {
- return NULL;
+ if (service == nullptr) {
+ return nullptr;
}
return service->getAvailableLocales();
}
@@ -368,7 +369,7 @@ BreakIterator*
BreakIterator::createInstance(const Locale& loc, int32_t kind, UErrorCode& status)
{
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
#if !UCONFIG_NO_SERVICE
@@ -385,7 +386,7 @@ BreakIterator::createInstance(const Locale& loc, int32_t kind, UErrorCode& statu
// handleDefault calls), so we don't touch it. YES, A COMMENT
// THIS LONG is a sign of bad code -- so the action item is to
// revisit this in ICU 3.0 and clean it up/fix it/remove it.
- if (U_SUCCESS(status) && (result != NULL) && *actualLoc.getName() != 0) {
+ if (U_SUCCESS(status) && (result != nullptr) && *actualLoc.getName() != 0) {
U_LOCALE_BASED(locBased, *result);
locBased.setLocaleIDs(actualLoc.getName(), actualLoc.getName());
}
@@ -406,11 +407,10 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
{
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- char lbType[kKeyValueLenMax];
- BreakIterator *result = NULL;
+ BreakIterator *result = nullptr;
switch (kind) {
case UBRK_CHARACTER:
{
@@ -428,18 +428,29 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
break;
case UBRK_LINE:
{
+ char lb_lw[kKeyValueLenMax];
UTRACE_ENTRY(UTRACE_UBRK_CREATE_LINE);
- uprv_strcpy(lbType, "line");
- char lbKeyValue[kKeyValueLenMax] = {0};
+ uprv_strcpy(lb_lw, "line");
UErrorCode kvStatus = U_ZERO_ERROR;
- int32_t kLen = loc.getKeywordValue("lb", lbKeyValue, kKeyValueLenMax, kvStatus);
- if (U_SUCCESS(kvStatus) && kLen > 0 && (uprv_strcmp(lbKeyValue,"strict")==0 || uprv_strcmp(lbKeyValue,"normal")==0 || uprv_strcmp(lbKeyValue,"loose")==0)) {
- uprv_strcat(lbType, "_");
- uprv_strcat(lbType, lbKeyValue);
+ CharString value;
+ CharStringByteSink valueSink(&value);
+ loc.getKeywordValue("lb", valueSink, kvStatus);
+ if (U_SUCCESS(kvStatus) && (value == "strict" || value == "normal" || value == "loose")) {
+ uprv_strcat(lb_lw, "_");
+ uprv_strcat(lb_lw, value.data());
}
- result = BreakIterator::buildInstance(loc, lbType, status);
+ // 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);
+ if (U_SUCCESS(kvStatus) && value == "phrase") {
+ uprv_strcat(lb_lw, "_");
+ uprv_strcat(lb_lw, value.data());
+ }
+ }
+ result = BreakIterator::buildInstance(loc, lb_lw, status);
- UTRACE_DATA1(UTRACE_INFO, "lb=%s", lbKeyValue);
+ UTRACE_DATA1(UTRACE_INFO, "lb_lw=%s", lb_lw);
UTRACE_EXIT_STATUS(status);
}
break;
@@ -474,7 +485,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
}
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
return result;
diff --git a/contrib/libs/icu/common/bytesinkutil.cpp b/contrib/libs/icu/common/bytesinkutil.cpp
index c64a845f875..a32254a7dba 100644
--- a/contrib/libs/icu/common/bytesinkutil.cpp
+++ b/contrib/libs/icu/common/bytesinkutil.cpp
@@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN
UBool
ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Length,
ByteSink &sink, Edits *edits, UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
char scratch[200];
int32_t s8Length = 0;
for (int32_t i = 0; i < s16Length;) {
@@ -44,7 +44,7 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt
}
if (j > (INT32_MAX - s8Length)) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
sink.Append(buffer, j);
s8Length += j;
@@ -52,17 +52,17 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt
if (edits != nullptr) {
edits->addReplace(length, s8Length);
}
- return TRUE;
+ return true;
}
UBool
ByteSinkUtil::appendChange(const uint8_t *s, const uint8_t *limit,
const char16_t *s16, int32_t s16Length,
ByteSink &sink, Edits *edits, UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
if ((limit - s) > INT32_MAX) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode);
}
@@ -109,16 +109,16 @@ UBool
ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit,
ByteSink &sink, uint32_t options, Edits *edits,
UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
if ((limit - s) > INT32_MAX) {
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
int32_t length = (int32_t)(limit - s);
if (length > 0) {
appendNonEmptyUnchanged(s, length, sink, options, edits);
}
- return TRUE;
+ return true;
}
CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) {
diff --git a/contrib/libs/icu/common/bytesinkutil.h b/contrib/libs/icu/common/bytesinkutil.h
index ab2516432d3..929c71fbee6 100644
--- a/contrib/libs/icu/common/bytesinkutil.h
+++ b/contrib/libs/icu/common/bytesinkutil.h
@@ -4,6 +4,9 @@
// bytesinkutil.h
// created: 2017sep14 Markus W. Scherer
+#ifndef BYTESINKUTIL_H
+#define BYTESINKUTIL_H
+
#include "unicode/utypes.h"
#include "unicode/bytestream.h"
#include "unicode/edits.h"
@@ -81,3 +84,5 @@ private:
};
U_NAMESPACE_END
+
+#endif //BYTESINKUTIL_H
diff --git a/contrib/libs/icu/common/bytestream.cpp b/contrib/libs/icu/common/bytestream.cpp
index 0d0e4dda39b..bd870cd3b2f 100644
--- a/contrib/libs/icu/common/bytestream.cpp
+++ b/contrib/libs/icu/common/bytestream.cpp
@@ -20,7 +20,7 @@ char* ByteSink::GetAppendBuffer(int32_t min_capacity,
int32_t* result_capacity) {
if (min_capacity < 1 || scratch_capacity < min_capacity) {
*result_capacity = 0;
- return NULL;
+ return nullptr;
}
*result_capacity = scratch_capacity;
return scratch;
@@ -30,14 +30,14 @@ void ByteSink::Flush() {}
CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity)
: outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity),
- size_(0), appended_(0), overflowed_(FALSE) {
+ size_(0), appended_(0), overflowed_(false) {
}
CheckedArrayByteSink::~CheckedArrayByteSink() {}
CheckedArrayByteSink& CheckedArrayByteSink::Reset() {
size_ = appended_ = 0;
- overflowed_ = FALSE;
+ overflowed_ = false;
return *this;
}
@@ -48,14 +48,14 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) {
if (n > (INT32_MAX - appended_)) {
// TODO: Report as integer overflow, not merely buffer overflow.
appended_ = INT32_MAX;
- overflowed_ = TRUE;
+ overflowed_ = true;
return;
}
appended_ += n;
int32_t available = capacity_ - size_;
if (n > available) {
n = available;
- overflowed_ = TRUE;
+ overflowed_ = true;
}
if (n > 0 && bytes != (outbuf_ + size_)) {
uprv_memcpy(outbuf_ + size_, bytes, n);
@@ -70,7 +70,7 @@ char* CheckedArrayByteSink::GetAppendBuffer(int32_t min_capacity,
int32_t* result_capacity) {
if (min_capacity < 1 || scratch_capacity < min_capacity) {
*result_capacity = 0;
- return NULL;
+ return nullptr;
}
int32_t available = capacity_ - size_;
if (available >= min_capacity) {
diff --git a/contrib/libs/icu/common/bytestrie.cpp b/contrib/libs/icu/common/bytestrie.cpp
index c4d498c4bfa..532ea9e9c0a 100644
--- a/contrib/libs/icu/common/bytestrie.cpp
+++ b/contrib/libs/icu/common/bytestrie.cpp
@@ -68,7 +68,7 @@ BytesTrie::jumpByDelta(const uint8_t *pos) {
UStringTrieResult
BytesTrie::current() const {
const uint8_t *pos=pos_;
- if(pos==NULL) {
+ if(pos==nullptr) {
return USTRINGTRIE_NO_MATCH;
} else {
int32_t node;
@@ -182,7 +182,7 @@ BytesTrie::nextImpl(const uint8_t *pos, int32_t inByte) {
UStringTrieResult
BytesTrie::next(int32_t inByte) {
const uint8_t *pos=pos_;
- if(pos==NULL) {
+ if(pos==nullptr) {
return USTRINGTRIE_NO_MATCH;
}
if(inByte<0) {
@@ -212,7 +212,7 @@ BytesTrie::next(const char *s, int32_t sLength) {
return current();
}
const uint8_t *pos=pos_;
- if(pos==NULL) {
+ if(pos==nullptr) {
return USTRINGTRIE_NO_MATCH;
}
int32_t length=remainingMatchLength_; // Actual remaining match length minus 1.
@@ -317,8 +317,8 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length,
UBool haveUniqueValue, int32_t &uniqueValue) {
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison byte
- if(NULL==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) {
- return NULL;
+ if(nullptr==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) {
+ return nullptr;
}
length=length-(length>>1);
pos=skipDelta(pos);
@@ -333,17 +333,17 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length,
if(isFinal) {
if(haveUniqueValue) {
if(value!=uniqueValue) {
- return NULL;
+ return nullptr;
}
} else {
uniqueValue=value;
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
}
} else {
if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) {
- return NULL;
+ return nullptr;
}
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
}
} while(--length>1);
return pos+1; // ignore the last comparison byte
@@ -358,10 +358,10 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
node=*pos++;
}
pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue);
- if(pos==NULL) {
- return FALSE;
+ if(pos==nullptr) {
+ return false;
}
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
} else if(node<kMinValueLead) {
// linear-match node
pos+=node-kMinLinearMatch+1; // Ignore the match bytes.
@@ -370,14 +370,14 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
int32_t value=readValue(pos, node>>1);
if(haveUniqueValue) {
if(value!=uniqueValue) {
- return FALSE;
+ return false;
}
} else {
uniqueValue=value;
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
}
if(isFinal) {
- return TRUE;
+ return true;
}
pos=skipValue(pos, node);
}
@@ -387,7 +387,7 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u
int32_t
BytesTrie::getNextBytes(ByteSink &out) const {
const uint8_t *pos=pos_;
- if(pos==NULL) {
+ if(pos==nullptr) {
return 0;
}
if(remainingMatchLength_>=0) {
diff --git a/contrib/libs/icu/common/bytestriebuilder.cpp b/contrib/libs/icu/common/bytestriebuilder.cpp
index 82dad42ca5f..876e0dfa160 100644
--- a/contrib/libs/icu/common/bytestriebuilder.cpp
+++ b/contrib/libs/icu/common/bytestriebuilder.cpp
@@ -127,13 +127,13 @@ BytesTrieElement::compareStringTo(const BytesTrieElement &other, const CharStrin
}
BytesTrieBuilder::BytesTrieBuilder(UErrorCode &errorCode)
- : strings(NULL), elements(NULL), elementsCapacity(0), elementsLength(0),
- bytes(NULL), bytesCapacity(0), bytesLength(0) {
+ : strings(nullptr), elements(nullptr), elementsCapacity(0), elementsLength(0),
+ bytes(nullptr), bytesCapacity(0), bytesLength(0) {
if(U_FAILURE(errorCode)) {
return;
}
strings=new CharString();
- if(strings==NULL) {
+ if(strings==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -162,7 +162,7 @@ BytesTrieBuilder::add(StringPiece s, int32_t value, UErrorCode &errorCode) {
newCapacity=4*elementsCapacity;
}
BytesTrieElement *newElements=new BytesTrieElement[newCapacity];
- if(newElements==NULL) {
+ if(newElements==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return *this; // error instead of dereferencing null
}
@@ -192,13 +192,13 @@ U_CDECL_END
BytesTrie *
BytesTrieBuilder::build(UStringTrieBuildOption buildOption, UErrorCode &errorCode) {
buildBytes(buildOption, errorCode);
- BytesTrie *newTrie=NULL;
+ BytesTrie *newTrie=nullptr;
if(U_SUCCESS(errorCode)) {
newTrie=new BytesTrie(bytes, bytes+(bytesCapacity-bytesLength));
- if(newTrie==NULL) {
+ if(newTrie==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
} else {
- bytes=NULL; // The new trie now owns the array.
+ bytes=nullptr; // The new trie now owns the array.
bytesCapacity=0;
}
}
@@ -220,7 +220,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
if(U_FAILURE(errorCode)) {
return;
}
- if(bytes!=NULL && bytesLength>0) {
+ if(bytes!=nullptr && bytesLength>0) {
// Already built.
return;
}
@@ -231,7 +231,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
}
uprv_sortArray(elements, elementsLength, (int32_t)sizeof(BytesTrieElement),
compareElementStrings, strings,
- FALSE, // need not be a stable sort
+ false, // need not be a stable sort
&errorCode);
if(U_FAILURE(errorCode)) {
return;
@@ -256,7 +256,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
if(bytesCapacity<capacity) {
uprv_free(bytes);
bytes=static_cast<char *>(uprv_malloc(capacity));
- if(bytes==NULL) {
+ if(bytes==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
bytesCapacity=0;
return;
@@ -264,7 +264,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err
bytesCapacity=capacity;
}
StringTrieBuilder::build(buildOption, elementsLength, errorCode);
- if(bytes==NULL) {
+ if(bytes==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -282,7 +282,7 @@ BytesTrieBuilder::getElementStringLength(int32_t i) const {
return elements[i].getStringLength(*strings);
}
-UChar
+char16_t
BytesTrieBuilder::getElementUnit(int32_t i, int32_t byteIndex) const {
return (uint8_t)elements[i].charAt(byteIndex, *strings);
}
@@ -329,7 +329,7 @@ BytesTrieBuilder::skipElementsBySomeUnits(int32_t i, int32_t byteIndex, int32_t
}
int32_t
-BytesTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, UChar byte) const {
+BytesTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t byteIndex, char16_t byte) const {
char b=(char)byte;
while(b==elements[i].charAt(byteIndex, *strings)) {
++i;
@@ -351,13 +351,13 @@ BytesTrieBuilder::BTLinearMatchNode::operator==(const Node &other) const {
if(!LinearMatchNode::operator==(other)) {
return false;
}
- const BTLinearMatchNode &o=(const BTLinearMatchNode &)other;
+ const BTLinearMatchNode &o=static_cast<const BTLinearMatchNode &>(other);
return 0==uprv_memcmp(s, o.s, length);
}
void
BytesTrieBuilder::BTLinearMatchNode::write(StringTrieBuilder &builder) {
- BytesTrieBuilder &b=(BytesTrieBuilder &)builder;
+ BytesTrieBuilder &b=static_cast<BytesTrieBuilder &>(builder);
next->write(builder);
b.write(s, length);
offset=b.write(b.getMinLinearMatch()+length-1);
@@ -374,8 +374,8 @@ BytesTrieBuilder::createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le
UBool
BytesTrieBuilder::ensureCapacity(int32_t length) {
- if(bytes==NULL) {
- return FALSE; // previous memory allocation had failed
+ if(bytes==nullptr) {
+ return false; // previous memory allocation had failed
}
if(length>bytesCapacity) {
int32_t newCapacity=bytesCapacity;
@@ -383,12 +383,12 @@ BytesTrieBuilder::ensureCapacity(int32_t length) {
newCapacity*=2;
} while(newCapacity<=length);
char *newBytes=static_cast<char *>(uprv_malloc(newCapacity));
- if(newBytes==NULL) {
+ if(newBytes==nullptr) {
// unable to allocate memory
uprv_free(bytes);
- bytes=NULL;
+ bytes=nullptr;
bytesCapacity=0;
- return FALSE;
+ return false;
}
uprv_memcpy(newBytes+(newCapacity-bytesLength),
bytes+(bytesCapacity-bytesLength), bytesLength);
@@ -396,7 +396,7 @@ BytesTrieBuilder::ensureCapacity(int32_t length) {
bytes=newBytes;
bytesCapacity=newCapacity;
}
- return TRUE;
+ return true;
}
int32_t
@@ -463,7 +463,7 @@ int32_t
BytesTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node) {
int32_t offset=write(node);
if(hasValue) {
- offset=writeValueAndFinal(value, FALSE);
+ offset=writeValueAndFinal(value, false);
}
return offset;
}
diff --git a/contrib/libs/icu/common/bytestrieiterator.cpp b/contrib/libs/icu/common/bytestrieiterator.cpp
index e64961a1f13..65f54be48ae 100644
--- a/contrib/libs/icu/common/bytestrieiterator.cpp
+++ b/contrib/libs/icu/common/bytestrieiterator.cpp
@@ -27,7 +27,7 @@ BytesTrie::Iterator::Iterator(const void *trieBytes, int32_t maxStringLength,
: bytes_(static_cast<const uint8_t *>(trieBytes)),
pos_(bytes_), initialPos_(bytes_),
remainingMatchLength_(-1), initialRemainingMatchLength_(-1),
- str_(NULL), maxLength_(maxStringLength), value_(0), stack_(NULL) {
+ str_(nullptr), maxLength_(maxStringLength), value_(0), stack_(nullptr) {
if(U_FAILURE(errorCode)) {
return;
}
@@ -39,7 +39,7 @@ BytesTrie::Iterator::Iterator(const void *trieBytes, int32_t maxStringLength,
// cost is minimal.
str_=new CharString();
stack_=new UVector32(errorCode);
- if(U_SUCCESS(errorCode) && (str_==NULL || stack_==NULL)) {
+ if(U_SUCCESS(errorCode) && (str_==nullptr || stack_==nullptr)) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -49,7 +49,7 @@ BytesTrie::Iterator::Iterator(const BytesTrie &trie, int32_t maxStringLength,
: bytes_(trie.bytes_), pos_(trie.pos_), initialPos_(trie.pos_),
remainingMatchLength_(trie.remainingMatchLength_),
initialRemainingMatchLength_(trie.remainingMatchLength_),
- str_(NULL), maxLength_(maxStringLength), value_(0), stack_(NULL) {
+ str_(nullptr), maxLength_(maxStringLength), value_(0), stack_(nullptr) {
if(U_FAILURE(errorCode)) {
return;
}
@@ -58,7 +58,7 @@ BytesTrie::Iterator::Iterator(const BytesTrie &trie, int32_t maxStringLength,
if(U_FAILURE(errorCode)) {
return;
}
- if(str_==NULL || stack_==NULL) {
+ if(str_==nullptr || stack_==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -96,17 +96,17 @@ BytesTrie::Iterator::reset() {
}
UBool
-BytesTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty(); }
+BytesTrie::Iterator::hasNext() const { return pos_!=nullptr || !stack_->isEmpty(); }
UBool
BytesTrie::Iterator::next(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
const uint8_t *pos=pos_;
- if(pos==NULL) {
+ if(pos==nullptr) {
if(stack_->isEmpty()) {
- return FALSE;
+ return false;
}
// Pop the state off the stack and continue with the next outbound edge of
// the branch node.
@@ -118,8 +118,8 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
length=(int32_t)((uint32_t)length>>16);
if(length>1) {
pos=branchNext(pos, length, errorCode);
- if(pos==NULL) {
- return TRUE; // Reached a final value.
+ if(pos==nullptr) {
+ return true; // Reached a final value.
}
} else {
str_->append((char)*pos++, errorCode);
@@ -137,11 +137,11 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
UBool isFinal=(UBool)(node&kValueIsFinal);
value_=readValue(pos, node>>1);
if(isFinal || (maxLength_>0 && str_->length()==maxLength_)) {
- pos_=NULL;
+ pos_=nullptr;
} else {
pos_=skipValue(pos, node);
}
- return TRUE;
+ return true;
}
if(maxLength_>0 && str_->length()==maxLength_) {
return truncateAndStop();
@@ -151,8 +151,8 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
node=*pos++;
}
pos=branchNext(pos, node+1, errorCode);
- if(pos==NULL) {
- return TRUE; // Reached a final value.
+ if(pos==nullptr) {
+ return true; // Reached a final value.
}
} else {
// Linear-match node, append length bytes to str_.
@@ -170,14 +170,14 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
StringPiece
BytesTrie::Iterator::getString() const {
- return str_ == NULL ? StringPiece() : str_->toStringPiece();
+ return str_ == nullptr ? StringPiece() : str_->toStringPiece();
}
UBool
BytesTrie::Iterator::truncateAndStop() {
- pos_=NULL;
+ pos_=nullptr;
value_=-1; // no real value for str
- return TRUE;
+ return true;
}
// Branch node, needs to take the first outbound edge and push state for the rest.
@@ -203,9 +203,9 @@ BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode &
stack_->addElement(((length-1)<<16)|str_->length(), errorCode);
str_->append((char)trieByte, errorCode);
if(isFinal) {
- pos_=NULL;
+ pos_=nullptr;
value_=value;
- return NULL;
+ return nullptr;
} else {
return pos+value;
}
diff --git a/contrib/libs/icu/common/caniter.cpp b/contrib/libs/icu/common/caniter.cpp
index a2083afde3c..64a3c65d29a 100644
--- a/contrib/libs/icu/common/caniter.cpp
+++ b/contrib/libs/icu/common/caniter.cpp
@@ -68,10 +68,10 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CanonicalIterator)
*@param source string to get results for
*/
CanonicalIterator::CanonicalIterator(const UnicodeString &sourceStr, UErrorCode &status) :
- pieces(NULL),
+ pieces(nullptr),
pieces_length(0),
- pieces_lengths(NULL),
- current(NULL),
+ pieces_lengths(nullptr),
+ current(nullptr),
current_length(0),
nfd(*Normalizer2::getNFDInstance(status)),
nfcImpl(*Normalizer2Factory::getNFCImpl(status))
@@ -87,23 +87,23 @@ CanonicalIterator::~CanonicalIterator() {
void CanonicalIterator::cleanPieces() {
int32_t i = 0;
- if(pieces != NULL) {
+ if(pieces != nullptr) {
for(i = 0; i < pieces_length; i++) {
- if(pieces[i] != NULL) {
+ if(pieces[i] != nullptr) {
delete[] pieces[i];
}
}
uprv_free(pieces);
- pieces = NULL;
+ pieces = nullptr;
pieces_length = 0;
}
- if(pieces_lengths != NULL) {
+ if(pieces_lengths != nullptr) {
uprv_free(pieces_lengths);
- pieces_lengths = NULL;
+ pieces_lengths = nullptr;
}
- if(current != NULL) {
+ if(current != nullptr) {
uprv_free(current);
- current = NULL;
+ current = nullptr;
current_length = 0;
}
}
@@ -119,7 +119,7 @@ UnicodeString CanonicalIterator::getSource() {
* Resets the iterator so that one can start again from the beginning.
*/
void CanonicalIterator::reset() {
- done = FALSE;
+ done = false;
for (int i = 0; i < current_length; ++i) {
current[i] = 0;
}
@@ -151,7 +151,7 @@ UnicodeString CanonicalIterator::next() {
for (i = current_length - 1; ; --i) {
if (i < 0) {
- done = TRUE;
+ done = true;
break;
}
current[i]++;
@@ -170,13 +170,13 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st
UChar32 cp = 0;
int32_t start = 0;
int32_t i = 0;
- UnicodeString *list = NULL;
+ UnicodeString *list = nullptr;
nfd.normalize(newSource, source, status);
if(U_FAILURE(status)) {
return;
}
- done = FALSE;
+ done = false;
cleanPieces();
@@ -187,7 +187,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st
pieces_length = 1;
current = (int32_t*)uprv_malloc(1 * sizeof(int32_t));
current_length = 1;
- if (pieces == NULL || pieces_lengths == NULL || current == NULL) {
+ if (pieces == nullptr || pieces_lengths == nullptr || current == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
goto CleanPartialInitialization;
}
@@ -233,7 +233,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st
pieces_lengths = (int32_t*)uprv_malloc(list_length * sizeof(int32_t));
current = (int32_t*)uprv_malloc(list_length * sizeof(int32_t));
current_length = list_length;
- if (pieces == NULL || pieces_lengths == NULL || current == NULL) {
+ if (pieces == nullptr || pieces_lengths == nullptr || current == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
goto CleanPartialInitialization;
}
@@ -252,7 +252,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st
return;
// Common section to cleanup all local variables and reset object variables.
CleanPartialInitialization:
- if (list != NULL) {
+ if (list != nullptr) {
delete[] list;
}
cleanPieces();
@@ -276,7 +276,7 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros
// we check for length < 2 to keep from counting code points all the time
if (source.length() <= 2 && source.countChar32() <= 1) {
UnicodeString *toPut = new UnicodeString(source);
- /* test for NULL */
+ /* test for nullptr */
if (toPut == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -295,7 +295,7 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros
for (i = 0; i < source.length(); i += U16_LENGTH(cp)) {
cp = source.char32At(i);
- const UHashElement *ne = NULL;
+ const UHashElement *ne = nullptr;
int32_t el = UHASH_FIRST;
UnicodeString subPermuteString = source;
@@ -321,11 +321,11 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros
// prefix this character to all of them
ne = subpermute.nextElement(el);
- while (ne != NULL) {
+ while (ne != nullptr) {
UnicodeString *permRes = (UnicodeString *)(ne->value.pointer);
UnicodeString *chStr = new UnicodeString(cp);
- //test for NULL
- if (chStr == NULL) {
+ //test for nullptr
+ if (chStr == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -352,7 +352,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i
permutations.setValueDeleter(uprv_deleteUObject);
basic.setValueDeleter(uprv_deleteUObject);
- UChar USeg[256];
+ char16_t USeg[256];
int32_t segLen = segment.extract(USeg, 256, status);
getEquivalents2(&basic, USeg, segLen, status);
@@ -360,23 +360,23 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i
// add only the ones that are canonically equivalent
// TODO: optimize by not permuting any class zero.
- const UHashElement *ne = NULL;
+ const UHashElement *ne = nullptr;
int32_t el = UHASH_FIRST;
//Iterator it = basic.iterator();
ne = basic.nextElement(el);
//while (it.hasNext())
- while (ne != NULL) {
+ while (ne != nullptr) {
//String item = (String) it.next();
UnicodeString item = *((UnicodeString *)(ne->value.pointer));
permutations.removeAll();
permute(item, CANITER_SKIP_ZEROES, &permutations, status);
- const UHashElement *ne2 = NULL;
+ const UHashElement *ne2 = nullptr;
int32_t el2 = UHASH_FIRST;
//Iterator it2 = permutations.iterator();
ne2 = permutations.nextElement(el2);
//while (it2.hasNext())
- while (ne2 != NULL) {
+ while (ne2 != nullptr) {
//String possible = (String) it2.next();
//UnicodeString *possible = new UnicodeString(*((UnicodeString *)(ne2->value.pointer)));
UnicodeString possible(*((UnicodeString *)(ne2->value.pointer)));
@@ -403,24 +403,24 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i
}
// convert into a String[] to clean up storage
//String[] finalResult = new String[result.size()];
- UnicodeString *finalResult = NULL;
+ UnicodeString *finalResult = nullptr;
int32_t resultCount;
if((resultCount = result.count()) != 0) {
finalResult = new UnicodeString[resultCount];
if (finalResult == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
}
else {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
//result.toArray(finalResult);
result_len = 0;
el = UHASH_FIRST;
ne = result.nextElement(el);
- while(ne != NULL) {
+ while(ne != nullptr) {
finalResult[result_len++] = *((UnicodeString *)(ne->value.pointer));
ne = result.nextElement(el);
}
@@ -429,10 +429,10 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i
return finalResult;
}
-Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const UChar *segment, int32_t segLen, UErrorCode &status) {
+Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const char16_t *segment, int32_t segLen, UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
//if (PROGRESS) printf("Adding: %s\n", UToS(Tr(segment)));
@@ -457,7 +457,7 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const UCh
UChar32 cp2 = iter.getCodepoint();
Hashtable remainder(status);
remainder.setValueDeleter(uprv_deleteUObject);
- if (extract(&remainder, cp2, segment, segLen, i, status) == NULL) {
+ if (extract(&remainder, cp2, segment, segLen, i, status) == nullptr) {
continue;
}
@@ -467,13 +467,13 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const UCh
int32_t el = UHASH_FIRST;
const UHashElement *ne = remainder.nextElement(el);
- while (ne != NULL) {
+ while (ne != nullptr) {
UnicodeString item = *((UnicodeString *)(ne->value.pointer));
UnicodeString *toAdd = new UnicodeString(prefix);
- /* test for NULL */
+ /* test for nullptr */
if (toAdd == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
*toAdd += item;
fillinResult->put(*toAdd, toAdd, status);
@@ -487,7 +487,7 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const UCh
/* Test for buffer overflows */
if(U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
return fillinResult;
}
@@ -497,13 +497,13 @@ Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const UCh
* (with canonical rearrangement!)
* If so, take the remainder, and return the equivalents
*/
-Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, const UChar *segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
+Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, const char16_t *segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
//Hashtable *CanonicalIterator::extract(UChar32 comp, const UnicodeString &segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
//if (PROGRESS) printf(" extract: %s, ", UToS(Tr(UnicodeString(comp))));
//if (PROGRESS) printf("%s, %i\n", UToS(Tr(segment)), segmentPos);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
UnicodeString temp(comp);
@@ -511,17 +511,17 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
UnicodeString decompString;
nfd.normalize(temp, decompString, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (decompString.isBogus()) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- const UChar *decomp=decompString.getBuffer();
+ const char16_t *decomp=decompString.getBuffer();
int32_t decompLen=decompString.length();
// See if it matches the start of segment (at segmentPos)
- UBool ok = FALSE;
+ UBool ok = false;
UChar32 cp;
int32_t decompPos = 0;
UChar32 decompCp;
@@ -537,7 +537,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
if (decompPos == decompLen) { // done, have all decomp characters!
temp.append(segment+i, segLen-i);
- ok = TRUE;
+ ok = true;
break;
}
U16_NEXT(decomp, decompPos, decompLen, decompCp);
@@ -561,7 +561,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
}
}
if (!ok)
- return NULL; // we failed, characters left over
+ return nullptr; // we failed, characters left over
//if (PROGRESS) printf("Matches\n");
@@ -575,7 +575,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con
UnicodeString trial;
nfd.normalize(temp, trial, status);
if(U_FAILURE(status) || trial.compare(segment+segmentPos, segLen - segmentPos) != 0) {
- return NULL;
+ return nullptr;
}
return getEquivalents2(fillinResult, temp.getBuffer()+inputLen, temp.length()-inputLen, status);
diff --git a/contrib/libs/icu/common/characterproperties.cpp b/contrib/libs/icu/common/characterproperties.cpp
index a84996b47c3..978e6761cee 100644
--- a/contrib/libs/icu/common/characterproperties.cpp
+++ b/contrib/libs/icu/common/characterproperties.cpp
@@ -36,11 +36,11 @@ namespace {
UBool U_CALLCONV characterproperties_cleanup();
-constexpr int32_t NUM_INCLUSIONS = UPROPS_SRC_COUNT + UCHAR_INT_LIMIT - UCHAR_INT_START;
+constexpr int32_t NUM_INCLUSIONS = UPROPS_SRC_COUNT + (UCHAR_INT_LIMIT - UCHAR_INT_START);
struct Inclusion {
UnicodeSet *fSet = nullptr;
- UInitOnce fInitOnce = U_INITONCE_INITIALIZER;
+ UInitOnce fInitOnce {};
};
Inclusion gInclusions[NUM_INCLUSIONS]; // cached getInclusions()
@@ -67,7 +67,7 @@ _set_addRange(USet *set, UChar32 start, UChar32 end) {
}
void U_CALLCONV
-_set_addString(USet *set, const UChar *str, int32_t length) {
+_set_addString(USet *set, const char16_t *str, int32_t length) {
((UnicodeSet *)set)->add(icu::UnicodeString((UBool)(length<0), str, length));
}
@@ -85,7 +85,7 @@ UBool U_CALLCONV characterproperties_cleanup() {
ucptrie_close(reinterpret_cast<UCPTrie *>(maps[i]));
maps[i] = nullptr;
}
- return TRUE;
+ return true;
}
void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) {
@@ -210,7 +210,7 @@ const UnicodeSet *getInclusionsForSource(UPropertySource src, UErrorCode &errorC
void U_CALLCONV initIntPropInclusion(UProperty prop, UErrorCode &errorCode) {
// This function is invoked only via umtx_initOnce().
U_ASSERT(UCHAR_INT_START <= prop && prop < UCHAR_INT_LIMIT);
- int32_t inclIndex = UPROPS_SRC_COUNT + prop - UCHAR_INT_START;
+ int32_t inclIndex = UPROPS_SRC_COUNT + (prop - UCHAR_INT_START);
U_ASSERT(gInclusions[inclIndex].fSet == nullptr);
UPropertySource src = uprops_getSource(prop);
const UnicodeSet *incl = getInclusionsForSource(src, errorCode);
@@ -255,7 +255,7 @@ const UnicodeSet *CharacterProperties::getInclusionsForProperty(
UProperty prop, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return nullptr; }
if (UCHAR_INT_START <= prop && prop < UCHAR_INT_LIMIT) {
- int32_t inclIndex = UPROPS_SRC_COUNT + prop - UCHAR_INT_START;
+ int32_t inclIndex = UPROPS_SRC_COUNT + (prop - UCHAR_INT_START);
Inclusion &i = gInclusions[inclIndex];
umtx_initOnce(i.fInitOnce, &initIntPropInclusion, prop, errorCode);
return i.fSet;
@@ -377,22 +377,30 @@ UCPMap *makeMap(UProperty property, UErrorCode &errorCode) {
} // namespace
-U_NAMESPACE_USE
+U_NAMESPACE_BEGIN
-U_CAPI const USet * U_EXPORT2
-u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode) {
- if (U_FAILURE(*pErrorCode)) { return nullptr; }
+const UnicodeSet *CharacterProperties::getBinaryPropertySet(UProperty property, UErrorCode &errorCode) {
+ if (U_FAILURE(errorCode)) { return nullptr; }
if (property < 0 || UCHAR_BINARY_LIMIT <= property) {
- *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
+ errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return nullptr;
}
Mutex m(&cpMutex);
UnicodeSet *set = sets[property];
if (set == nullptr) {
- sets[property] = set = makeSet(property, *pErrorCode);
+ sets[property] = set = makeSet(property, errorCode);
}
- if (U_FAILURE(*pErrorCode)) { return nullptr; }
- return set->toUSet();
+ return set;
+}
+
+U_NAMESPACE_END
+
+U_NAMESPACE_USE
+
+U_CAPI const USet * U_EXPORT2
+u_getBinaryPropertySet(UProperty property, UErrorCode *pErrorCode) {
+ const UnicodeSet *set = CharacterProperties::getBinaryPropertySet(property, *pErrorCode);
+ return U_SUCCESS(*pErrorCode) ? set->toUSet() : nullptr;
}
U_CAPI const UCPMap * U_EXPORT2
diff --git a/contrib/libs/icu/common/chariter.cpp b/contrib/libs/icu/common/chariter.cpp
index 887119a0eba..16f3b1e14d0 100644
--- a/contrib/libs/icu/common/chariter.cpp
+++ b/contrib/libs/icu/common/chariter.cpp
@@ -85,14 +85,14 @@ CharacterIterator::operator=(const CharacterIterator &that) {
// implementing first[32]PostInc() directly in a subclass should be faster
// but these implementations make subclassing a little easier
-UChar
-CharacterIterator::firstPostInc(void) {
+char16_t
+CharacterIterator::firstPostInc() {
setToStart();
return nextPostInc();
}
UChar32
-CharacterIterator::first32PostInc(void) {
+CharacterIterator::first32PostInc() {
setToStart();
return next32PostInc();
}
diff --git a/contrib/libs/icu/common/charstr.cpp b/contrib/libs/icu/common/charstr.cpp
index c35622882c4..f76cc8a4dc9 100644
--- a/contrib/libs/icu/common/charstr.cpp
+++ b/contrib/libs/icu/common/charstr.cpp
@@ -26,12 +26,12 @@
U_NAMESPACE_BEGIN
-CharString::CharString(CharString&& src) U_NOEXCEPT
+CharString::CharString(CharString&& src) noexcept
: buffer(std::move(src.buffer)), len(src.len) {
src.len = 0; // not strictly necessary because we make no guarantees on the source string
}
-CharString& CharString::operator=(CharString&& src) U_NOEXCEPT {
+CharString& CharString::operator=(CharString&& src) noexcept {
buffer = std::move(src.buffer);
len = src.len;
src.len = 0; // not strictly necessary because we make no guarantees on the source string
@@ -113,7 +113,7 @@ CharString &CharString::append(const char *s, int32_t sLength, UErrorCode &error
if(U_FAILURE(errorCode)) {
return *this;
}
- if(sLength<-1 || (s==NULL && sLength!=0)) {
+ if(sLength<-1 || (s==nullptr && sLength!=0)) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return *this;
}
@@ -181,7 +181,7 @@ char *CharString::getAppendBuffer(int32_t minCapacity,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
resultCapacity=0;
- return NULL;
+ return nullptr;
}
int32_t appendCapacity=buffer.getCapacity()-len-1; // -1 for NUL
if(appendCapacity>=minCapacity) {
@@ -193,14 +193,14 @@ char *CharString::getAppendBuffer(int32_t minCapacity,
return buffer.getAlias()+len;
}
resultCapacity=0;
- return NULL;
+ return nullptr;
}
CharString &CharString::appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode) {
return appendInvariantChars(s.getBuffer(), s.length(), errorCode);
}
-CharString &CharString::appendInvariantChars(const UChar* uchars, int32_t ucharsLen, UErrorCode &errorCode) {
+CharString &CharString::appendInvariantChars(const char16_t* uchars, int32_t ucharsLen, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return *this;
}
@@ -220,20 +220,20 @@ UBool CharString::ensureCapacity(int32_t capacity,
int32_t desiredCapacityHint,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
if(capacity>buffer.getCapacity()) {
if(desiredCapacityHint==0) {
desiredCapacityHint=capacity+buffer.getCapacity();
}
- if( (desiredCapacityHint<=capacity || buffer.resize(desiredCapacityHint, len+1)==NULL) &&
- buffer.resize(capacity, len+1)==NULL
+ if( (desiredCapacityHint<=capacity || buffer.resize(desiredCapacityHint, len+1)==nullptr) &&
+ buffer.resize(capacity, len+1)==nullptr
) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
CharString &CharString::appendPathPart(StringPiece s, UErrorCode &errorCode) {
diff --git a/contrib/libs/icu/common/charstr.h b/contrib/libs/icu/common/charstr.h
index 175acd1c0a2..7749a804b93 100644
--- a/contrib/libs/icu/common/charstr.h
+++ b/contrib/libs/icu/common/charstr.h
@@ -59,13 +59,13 @@ public:
* Move constructor; might leave src in an undefined state.
* This string will have the same contents and state that the source string had.
*/
- CharString(CharString &&src) U_NOEXCEPT;
+ CharString(CharString &&src) noexcept;
/**
* Move assignment operator; might leave src in an undefined state.
* This string will have the same contents and state that the source string had.
* The behavior is undefined if *this and src are the same object.
*/
- CharString &operator=(CharString &&src) U_NOEXCEPT;
+ CharString &operator=(CharString &&src) noexcept;
/**
* Replaces this string's contents with the other string's contents.
@@ -156,7 +156,7 @@ public:
UErrorCode &errorCode);
CharString &appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode);
- CharString &appendInvariantChars(const UChar* uchars, int32_t ucharsLen, UErrorCode& errorCode);
+ CharString &appendInvariantChars(const char16_t* uchars, int32_t ucharsLen, UErrorCode& errorCode);
/**
* Appends a filename/path part, e.g., a directory name.
@@ -177,8 +177,8 @@ private:
UBool ensureCapacity(int32_t capacity, int32_t desiredCapacityHint, UErrorCode &errorCode);
- CharString(const CharString &other); // forbid copying of this class
- CharString &operator=(const CharString &other); // forbid copying of this class
+ CharString(const CharString &other) = delete; // forbid copying of this class
+ CharString &operator=(const CharString &other) = delete; // forbid copying of this class
/**
* Returns U_FILE_ALT_SEP_CHAR if found in string, and U_FILE_SEP_CHAR is not found.
diff --git a/contrib/libs/icu/common/charstrmap.h b/contrib/libs/icu/common/charstrmap.h
index 3320a462085..64d5fd12542 100644
--- a/contrib/libs/icu/common/charstrmap.h
+++ b/contrib/libs/icu/common/charstrmap.h
@@ -26,7 +26,7 @@ public:
map = uhash_openSize(uhash_hashChars, uhash_compareChars, uhash_compareChars,
size, &errorCode);
}
- CharStringMap(CharStringMap &&other) U_NOEXCEPT : map(other.map) {
+ CharStringMap(CharStringMap &&other) noexcept : map(other.map) {
other.map = nullptr;
}
CharStringMap(const CharStringMap &other) = delete;
@@ -34,7 +34,7 @@ public:
uhash_close(map);
}
- CharStringMap &operator=(CharStringMap &&other) U_NOEXCEPT {
+ CharStringMap &operator=(CharStringMap &&other) noexcept {
map = other.map;
other.map = nullptr;
return *this;
diff --git a/contrib/libs/icu/common/cmemory.cpp b/contrib/libs/icu/common/cmemory.cpp
index 663c1411e4c..e59d4b0efe3 100644
--- a/contrib/libs/icu/common/cmemory.cpp
+++ b/contrib/libs/icu/common/cmemory.cpp
@@ -15,8 +15,8 @@
* If you have a need to replace ICU allocation, this is the
* place to do it.
*
-* Note that uprv_malloc(0) returns a non-NULL pointer, and
-* that a subsequent free of that pointer value is a NOP.
+* Note that uprv_malloc(0) returns a non-nullptr pointer,
+* and that a subsequent free of that pointer value is a NOP.
*
******************************************************************************
*/
@@ -103,7 +103,7 @@ uprv_free(void *buffer) {
U_CAPI void * U_EXPORT2
uprv_calloc(size_t num, size_t size) {
- void *mem = NULL;
+ void *mem = nullptr;
size *= num;
mem = uprv_malloc(size);
if (mem) {
@@ -118,7 +118,7 @@ u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMem
if (U_FAILURE(*status)) {
return;
}
- if (a==NULL || r==NULL || f==NULL) {
+ if (a==nullptr || r==nullptr || f==nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -129,10 +129,10 @@ u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMem
}
-U_CFUNC UBool cmemory_cleanup(void) {
- pContext = NULL;
- pAlloc = NULL;
- pRealloc = NULL;
- pFree = NULL;
- return TRUE;
+U_CFUNC UBool cmemory_cleanup() {
+ pContext = nullptr;
+ pAlloc = nullptr;
+ pRealloc = nullptr;
+ pFree = nullptr;
+ return true;
}
diff --git a/contrib/libs/icu/common/cmemory.h b/contrib/libs/icu/common/cmemory.h
index f03b7dcce6b..3705c2dfd0e 100644
--- a/contrib/libs/icu/common/cmemory.h
+++ b/contrib/libs/icu/common/cmemory.h
@@ -192,13 +192,13 @@ public:
* Constructor takes ownership.
* @param p simple pointer to an array of T items that is adopted
*/
- explicit LocalMemory(T *p=NULL) : LocalPointerBase<T>(p) {}
+ explicit LocalMemory(T *p=nullptr) : LocalPointerBase<T>(p) {}
/**
* Move constructor, leaves src with isNull().
* @param src source smart pointer
*/
- LocalMemory(LocalMemory<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
- src.ptr=NULL;
+ LocalMemory(LocalMemory<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
+ src.ptr=nullptr;
}
/**
* Destructor deletes the memory it owns.
@@ -212,17 +212,17 @@ public:
* @param src source smart pointer
* @return *this
*/
- LocalMemory<T> &operator=(LocalMemory<T> &&src) U_NOEXCEPT {
+ LocalMemory<T> &operator=(LocalMemory<T> &&src) noexcept {
uprv_free(LocalPointerBase<T>::ptr);
LocalPointerBase<T>::ptr=src.ptr;
- src.ptr=NULL;
+ src.ptr=nullptr;
return *this;
}
/**
* Swap pointers.
* @param other other smart pointer
*/
- void swap(LocalMemory<T> &other) U_NOEXCEPT {
+ void swap(LocalMemory<T> &other) noexcept {
T *temp=LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=other.ptr;
other.ptr=temp;
@@ -232,7 +232,7 @@ public:
* @param p1 will get p2's pointer
* @param p2 will get p1's pointer
*/
- friend inline void swap(LocalMemory<T> &p1, LocalMemory<T> &p2) U_NOEXCEPT {
+ friend inline void swap(LocalMemory<T> &p1, LocalMemory<T> &p2) noexcept {
p1.swap(p2);
}
/**
@@ -248,21 +248,21 @@ public:
* Deletes the array it owns, allocates a new one and reset its bytes to 0.
* Returns the new array pointer.
* If the allocation fails, then the current array is unchanged and
- * this method returns NULL.
+ * this method returns nullptr.
* @param newCapacity must be >0
- * @return the allocated array pointer, or NULL if the allocation failed
+ * @return the allocated array pointer, or nullptr if the allocation failed
*/
inline T *allocateInsteadAndReset(int32_t newCapacity=1);
/**
* Deletes the array it owns and allocates a new one, copying length T items.
* Returns the new array pointer.
* If the allocation fails, then the current array is unchanged and
- * this method returns NULL.
+ * this method returns nullptr.
* @param newCapacity must be >0
* @param length number of T items to be copied from the old array to the new one;
* must be no more than the capacity of the old array,
* which the caller must track because the LocalMemory does not track it
- * @return the allocated array pointer, or NULL if the allocation failed
+ * @return the allocated array pointer, or nullptr if the allocation failed
*/
inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0);
/**
@@ -278,14 +278,14 @@ template<typename T>
inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) {
if(newCapacity>0) {
T *p=(T *)uprv_malloc(newCapacity*sizeof(T));
- if(p!=NULL) {
+ if(p!=nullptr) {
uprv_memset(p, 0, newCapacity*sizeof(T));
uprv_free(LocalPointerBase<T>::ptr);
LocalPointerBase<T>::ptr=p;
}
return p;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -294,7 +294,7 @@ template<typename T>
inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) {
if(newCapacity>0) {
T *p=(T *)uprv_malloc(newCapacity*sizeof(T));
- if(p!=NULL) {
+ if(p!=nullptr) {
if(length>0) {
if(length>newCapacity) {
length=newCapacity;
@@ -306,7 +306,7 @@ inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t le
}
return p;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -332,10 +332,10 @@ template<typename T, int32_t stackCapacity>
class MaybeStackArray {
public:
// No heap allocation. Use only on the stack.
- static void* U_EXPORT2 operator new(size_t) U_NOEXCEPT = delete;
- static void* U_EXPORT2 operator new[](size_t) U_NOEXCEPT = delete;
+ 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*) U_NOEXCEPT = delete;
+ static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete;
#endif
/**
@@ -364,11 +364,11 @@ public:
/**
* Move constructor: transfers ownership or copies the stack array.
*/
- MaybeStackArray(MaybeStackArray<T, stackCapacity> &&src) U_NOEXCEPT;
+ MaybeStackArray(MaybeStackArray<T, stackCapacity> &&src) noexcept;
/**
* Move assignment: transfers ownership or copies the stack array.
*/
- MaybeStackArray<T, stackCapacity> &operator=(MaybeStackArray<T, stackCapacity> &&src) U_NOEXCEPT;
+ MaybeStackArray<T, stackCapacity> &operator=(MaybeStackArray<T, stackCapacity> &&src) noexcept;
/**
* Returns the array capacity (number of T items).
* @return array capacity
@@ -403,11 +403,11 @@ public:
/**
* Deletes the array (if owned) and aliases another one, no transfer of ownership.
* If the arguments are illegal, then the current array is unchanged.
- * @param otherArray must not be NULL
+ * @param otherArray must not be nullptr
* @param otherCapacity must be >0
*/
void aliasInstead(T *otherArray, int32_t otherCapacity) {
- if(otherArray!=NULL && otherCapacity>0) {
+ if(otherArray!=nullptr && otherCapacity>0) {
releaseArray();
ptr=otherArray;
capacity=otherCapacity;
@@ -418,17 +418,17 @@ public:
* Deletes the array (if owned) and allocates a new one, copying length T items.
* Returns the new array pointer.
* If the allocation fails, then the current array is unchanged and
- * this method returns NULL.
+ * this method returns nullptr.
* @param newCapacity can be less than or greater than the current capacity;
* must be >0
* @param length number of T items to be copied from the old array to the new one
- * @return the allocated array pointer, or NULL if the allocation failed
+ * @return the allocated array pointer, or nullptr if the allocation failed
*/
inline T *resize(int32_t newCapacity, int32_t length=0);
/**
* Gives up ownership of the array if owned, or else clones it,
* copying length T items; resets itself to the internal stack array.
- * Returns NULL if the allocation failed.
+ * Returns nullptr if the allocation failed.
* @param length number of T items to copy when cloning,
* and capacity of the clone when cloning
* @param resultCapacity will be set to the returned array's capacity (output-only)
@@ -443,7 +443,7 @@ protected:
if (U_FAILURE(status)) {
return;
}
- if (this->resize(src.capacity, 0) == NULL) {
+ if (this->resize(src.capacity, 0) == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -475,7 +475,7 @@ private:
template<typename T, int32_t stackCapacity>
icu::MaybeStackArray<T, stackCapacity>::MaybeStackArray(
- MaybeStackArray <T, stackCapacity>&& src) U_NOEXCEPT
+ MaybeStackArray <T, stackCapacity>&& src) noexcept
: ptr(src.ptr), capacity(src.capacity), needToRelease(src.needToRelease) {
if (src.ptr == src.stackArray) {
ptr = stackArray;
@@ -487,7 +487,7 @@ icu::MaybeStackArray<T, stackCapacity>::MaybeStackArray(
template<typename T, int32_t stackCapacity>
inline MaybeStackArray <T, stackCapacity>&
-MaybeStackArray<T, stackCapacity>::operator=(MaybeStackArray <T, stackCapacity>&& src) U_NOEXCEPT {
+MaybeStackArray<T, stackCapacity>::operator=(MaybeStackArray <T, stackCapacity>&& src) noexcept {
releaseArray(); // in case this instance had its own memory allocated
capacity = src.capacity;
needToRelease = src.needToRelease;
@@ -508,7 +508,7 @@ inline T *MaybeStackArray<T, stackCapacity>::resize(int32_t newCapacity, int32_t
::fprintf(::stderr, "MaybeStackArray (resize) alloc %d * %lu\n", newCapacity, sizeof(T));
#endif
T *p=(T *)uprv_malloc(newCapacity*sizeof(T));
- if(p!=NULL) {
+ if(p!=nullptr) {
if(length>0) {
if(length>capacity) {
length=capacity;
@@ -525,7 +525,7 @@ inline T *MaybeStackArray<T, stackCapacity>::resize(int32_t newCapacity, int32_t
}
return p;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -535,7 +535,7 @@ inline T *MaybeStackArray<T, stackCapacity>::orphanOrClone(int32_t length, int32
if(needToRelease) {
p=ptr;
} else if(length<=0) {
- return NULL;
+ return nullptr;
} else {
if(length>capacity) {
length=capacity;
@@ -544,8 +544,8 @@ inline T *MaybeStackArray<T, stackCapacity>::orphanOrClone(int32_t length, int32
#if U_DEBUG && defined(UPRV_MALLOC_COUNT)
::fprintf(::stderr,"MaybeStacArray (orphan) alloc %d * %lu\n", length,sizeof(T));
#endif
- if(p==NULL) {
- return NULL;
+ if(p==nullptr) {
+ return nullptr;
}
uprv_memcpy(p, ptr, (size_t)length*sizeof(T));
}
@@ -568,10 +568,10 @@ template<typename H, typename T, int32_t stackCapacity>
class MaybeStackHeaderAndArray {
public:
// No heap allocation. Use only on the stack.
- static void* U_EXPORT2 operator new(size_t) U_NOEXCEPT = delete;
- static void* U_EXPORT2 operator new[](size_t) U_NOEXCEPT = delete;
+ 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*) U_NOEXCEPT = delete;
+ static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete;
#endif
/**
@@ -618,11 +618,11 @@ public:
/**
* Deletes the memory block (if owned) and aliases another one, no transfer of ownership.
* If the arguments are illegal, then the current memory is unchanged.
- * @param otherArray must not be NULL
+ * @param otherArray must not be nullptr
* @param otherCapacity must be >0
*/
void aliasInstead(H *otherMemory, int32_t otherCapacity) {
- if(otherMemory!=NULL && otherCapacity>0) {
+ if(otherMemory!=nullptr && otherCapacity>0) {
releaseMemory();
ptr=otherMemory;
capacity=otherCapacity;
@@ -634,17 +634,17 @@ public:
* copying the header and length T array items.
* Returns the new header pointer.
* If the allocation fails, then the current memory is unchanged and
- * this method returns NULL.
+ * this method returns nullptr.
* @param newCapacity can be less than or greater than the current capacity;
* must be >0
* @param length number of T items to be copied from the old array to the new one
- * @return the allocated pointer, or NULL if the allocation failed
+ * @return the allocated pointer, or nullptr if the allocation failed
*/
inline H *resize(int32_t newCapacity, int32_t length=0);
/**
* Gives up ownership of the memory if owned, or else clones it,
* copying the header and length T array items; resets itself to the internal memory.
- * Returns NULL if the allocation failed.
+ * Returns nullptr if the allocation failed.
* @param length number of T items to copy when cloning,
* and array capacity of the clone when cloning
* @param resultCapacity will be set to the returned array's capacity (output-only)
@@ -680,7 +680,7 @@ inline H *MaybeStackHeaderAndArray<H, T, stackCapacity>::resize(int32_t newCapac
::fprintf(::stderr,"MaybeStackHeaderAndArray alloc %d + %d * %ul\n", sizeof(H),newCapacity,sizeof(T));
#endif
H *p=(H *)uprv_malloc(sizeof(H)+newCapacity*sizeof(T));
- if(p!=NULL) {
+ if(p!=nullptr) {
if(length<0) {
length=0;
} else if(length>0) {
@@ -699,7 +699,7 @@ inline H *MaybeStackHeaderAndArray<H, T, stackCapacity>::resize(int32_t newCapac
}
return p;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -719,8 +719,8 @@ inline H *MaybeStackHeaderAndArray<H, T, stackCapacity>::orphanOrClone(int32_t l
::fprintf(::stderr,"MaybeStackHeaderAndArray (orphan) alloc %ul + %d * %lu\n", sizeof(H),length,sizeof(T));
#endif
p=(H *)uprv_malloc(sizeof(H)+length*sizeof(T));
- if(p==NULL) {
- return NULL;
+ if(p==nullptr) {
+ return nullptr;
}
uprv_memcpy(p, ptr, sizeof(H)+(size_t)length*sizeof(T));
}
@@ -768,12 +768,12 @@ public:
MemoryPool(const MemoryPool&) = delete;
MemoryPool& operator=(const MemoryPool&) = delete;
- MemoryPool(MemoryPool&& other) U_NOEXCEPT : fCount(other.fCount),
+ MemoryPool(MemoryPool&& other) noexcept : fCount(other.fCount),
fPool(std::move(other.fPool)) {
other.fCount = 0;
}
- MemoryPool& operator=(MemoryPool&& other) U_NOEXCEPT {
+ MemoryPool& operator=(MemoryPool&& other) noexcept {
// Since `this` may contain instances that need to be deleted, we can't
// just throw them away and replace them with `other`. The normal way of
// dealing with this in C++ is to swap `this` and `other`, rather than
diff --git a/contrib/libs/icu/common/cpputils.h b/contrib/libs/icu/common/cpputils.h
index 307e5704864..2eda999a657 100644
--- a/contrib/libs/icu/common/cpputils.h
+++ b/contrib/libs/icu/common/cpputils.h
@@ -62,8 +62,8 @@ inline void uprv_arrayCopy(const int32_t* src, int32_t srcStart,
static
inline void
-uprv_arrayCopy(const UChar *src, int32_t srcStart,
- UChar *dst, int32_t dstStart, int32_t count)
+uprv_arrayCopy(const char16_t *src, int32_t srcStart,
+ char16_t *dst, int32_t dstStart, int32_t count)
{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)count * sizeof(*src)); }
/**
diff --git a/contrib/libs/icu/common/cstr.cpp b/contrib/libs/icu/common/cstr.cpp
index 24654f8fc22..b87597e4504 100644
--- a/contrib/libs/icu/common/cstr.cpp
+++ b/contrib/libs/icu/common/cstr.cpp
@@ -21,7 +21,7 @@ U_NAMESPACE_BEGIN
CStr::CStr(const UnicodeString &in) {
UErrorCode status = U_ZERO_ERROR;
#if !UCONFIG_NO_CONVERSION || U_CHARSET_IS_UTF8
- int32_t length = in.extract(0, in.length(), static_cast<char *>(NULL), static_cast<uint32_t>(0));
+ int32_t length = in.extract(0, in.length(), static_cast<char *>(nullptr), static_cast<uint32_t>(0));
int32_t resultCapacity = 0;
char *buf = s.getAppendBuffer(length, length, resultCapacity, status);
if (U_SUCCESS(status)) {
diff --git a/contrib/libs/icu/common/cstr.h b/contrib/libs/icu/common/cstr.h
index c7a77a0ae5a..be21d910bb4 100644
--- a/contrib/libs/icu/common/cstr.h
+++ b/contrib/libs/icu/common/cstr.h
@@ -51,8 +51,8 @@ class U_COMMON_API CStr : public UMemory {
private:
CharString s;
- CStr(const CStr &other); // Forbid copying of this class.
- CStr &operator =(const CStr &other); // Forbid assignment.
+ CStr(const CStr &other) = delete; // Forbid copying of this class.
+ CStr &operator =(const CStr &other) = delete; // Forbid assignment.
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/cstring.cpp b/contrib/libs/icu/common/cstring.cpp
index 06275c4b564..e95816c1301 100644
--- a/contrib/libs/icu/common/cstring.cpp
+++ b/contrib/libs/icu/common/cstring.cpp
@@ -189,7 +189,7 @@ T_CString_integerToString(char* buffer, int32_t v, int32_t radix)
/*
* Takes a int64_t and fills in a char* string with that number "radix"-based.
* Writes at most 21: chars ("-9223372036854775807" plus NUL).
- * Returns the length of the string, not including the terminating NULL.
+ * Returns the length of the string, not including the terminating NUL.
*/
U_CAPI int32_t U_EXPORT2
T_CString_int64ToString(char* buffer, int64_t v, uint32_t radix)
@@ -233,16 +233,16 @@ T_CString_stringToInteger(const char *integerString, int32_t radix)
U_CAPI int U_EXPORT2
uprv_stricmp(const char *str1, const char *str2) {
- if(str1==NULL) {
- if(str2==NULL) {
+ if(str1==nullptr) {
+ if(str2==nullptr) {
return 0;
} else {
return -1;
}
- } else if(str2==NULL) {
+ } else if(str2==nullptr) {
return 1;
} else {
- /* compare non-NULL strings lexically with lowercase */
+ /* compare non-nullptr strings lexically with lowercase */
int rc;
unsigned char c1, c2;
@@ -272,16 +272,16 @@ uprv_stricmp(const char *str1, const char *str2) {
U_CAPI int U_EXPORT2
uprv_strnicmp(const char *str1, const char *str2, uint32_t n) {
- if(str1==NULL) {
- if(str2==NULL) {
+ if(str1==nullptr) {
+ if(str2==nullptr) {
return 0;
} else {
return -1;
}
- } else if(str2==NULL) {
+ } else if(str2==nullptr) {
return 1;
} else {
- /* compare non-NULL strings lexically with lowercase */
+ /* compare non-nullptr strings lexically with lowercase */
int rc;
unsigned char c1, c2;
diff --git a/contrib/libs/icu/common/dictbe.cpp b/contrib/libs/icu/common/dictbe.cpp
index 4d158e3226d..0e420c67c5d 100644
--- a/contrib/libs/icu/common/dictbe.cpp
+++ b/contrib/libs/icu/common/dictbe.cpp
@@ -17,7 +17,10 @@
#include "dictbe.h"
#include "unicode/uniset.h"
#include "unicode/chariter.h"
+#include "unicode/resbund.h"
#include "unicode/ubrk.h"
+#include "unicode/usetiter.h"
+#include "ubrkimpl.h"
#include "utracimp.h"
#include "uvectr32.h"
#include "uvector.h"
@@ -48,6 +51,7 @@ DictionaryBreakEngine::findBreaks( UText *text,
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const {
if (U_FAILURE(status)) return 0;
(void)startPos; // TODO: remove this param?
@@ -68,7 +72,7 @@ DictionaryBreakEngine::findBreaks( UText *text,
}
rangeStart = start;
rangeEnd = current;
- result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks, status);
+ result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks, isPhraseBreaking, status);
utext_setNativeIndex(text, current);
return result;
@@ -115,7 +119,7 @@ public:
// Select the currently marked candidate, point after it in the text, and invalidate self
int32_t acceptMarked( UText *text );
- // Back up from the current candidate to the next shorter one; return TRUE if that exists
+ // Back up from the current candidate to the next shorter one; return true if that exists
// and point the text after it
UBool backUp( UText *text );
@@ -136,7 +140,7 @@ int32_t PossibleWord::candidates( UText *text, DictionaryMatcher *dict, int32_t
int32_t start = (int32_t)utext_getNativeIndex(text);
if (start != offset) {
offset = start;
- count = dict->matches(text, rangeEnd-start, UPRV_LENGTHOF(cuLengths), cuLengths, cpLengths, NULL, &prefix);
+ count = dict->matches(text, rangeEnd-start, UPRV_LENGTHOF(cuLengths), cuLengths, cpLengths, nullptr, &prefix);
// Dictionary leaves text after longest prefix, not longest word. Back up.
if (count <= 0) {
utext_setNativeIndex(text, start);
@@ -161,9 +165,9 @@ UBool
PossibleWord::backUp( UText *text ) {
if (current > 0) {
utext_setNativeIndex(text, offset + cuLengths[--current]);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*
@@ -199,13 +203,13 @@ ThaiBreakEngine::ThaiBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCode
{
UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE);
UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Thai");
- fThaiWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Thai:]&[:LineBreak=SA:]]"), status);
+ UnicodeSet thaiWordSet(UnicodeString(u"[[:Thai:]&[:LineBreak=SA:]]"), status);
if (U_SUCCESS(status)) {
- setCharacters(fThaiWordSet);
+ setCharacters(thaiWordSet);
}
- fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Thai:]&[:LineBreak=SA:]&[:M:]]"), status);
+ fMarkSet.applyPattern(UnicodeString(u"[[:Thai:]&[:LineBreak=SA:]&[:M:]]"), status);
fMarkSet.add(0x0020);
- fEndWordSet = fThaiWordSet;
+ fEndWordSet = thaiWordSet;
fEndWordSet.remove(0x0E31); // MAI HAN-AKAT
fEndWordSet.remove(0x0E40, 0x0E44); // SARA E through SARA AI MAIMALAI
fBeginWordSet.add(0x0E01, 0x0E2E); // KO KAI through HO NOKHUK
@@ -230,6 +234,7 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text,
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool /* isPhraseBreaking */,
UErrorCode& status) const {
if (U_FAILURE(status)) return 0;
utext_setNativeIndex(text, rangeStart);
@@ -441,13 +446,13 @@ LaoBreakEngine::LaoBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCode &s
{
UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE);
UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Laoo");
- fLaoWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Laoo:]&[:LineBreak=SA:]]"), status);
+ UnicodeSet laoWordSet(UnicodeString(u"[[:Laoo:]&[:LineBreak=SA:]]"), status);
if (U_SUCCESS(status)) {
- setCharacters(fLaoWordSet);
+ setCharacters(laoWordSet);
}
- fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Laoo:]&[:LineBreak=SA:]&[:M:]]"), status);
+ fMarkSet.applyPattern(UnicodeString(u"[[:Laoo:]&[:LineBreak=SA:]&[:M:]]"), status);
fMarkSet.add(0x0020);
- fEndWordSet = fLaoWordSet;
+ fEndWordSet = laoWordSet;
fEndWordSet.remove(0x0EC0, 0x0EC4); // prefix vowels
fBeginWordSet.add(0x0E81, 0x0EAE); // basic consonants (including holes for corresponding Thai characters)
fBeginWordSet.add(0x0EDC, 0x0EDD); // digraph consonants (no Thai equivalent)
@@ -469,6 +474,7 @@ LaoBreakEngine::divideUpDictionaryRange( UText *text,
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool /* isPhraseBreaking */,
UErrorCode& status) const {
if (U_FAILURE(status)) return 0;
if ((rangeEnd - rangeStart) < LAO_MIN_WORD_SPAN) {
@@ -637,14 +643,13 @@ BurmeseBreakEngine::BurmeseBreakEngine(DictionaryMatcher *adoptDictionary, UErro
{
UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE);
UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Mymr");
- fBurmeseWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Mymr:]&[:LineBreak=SA:]]"), status);
+ fBeginWordSet.add(0x1000, 0x102A); // basic consonants and independent vowels
+ fEndWordSet.applyPattern(UnicodeString(u"[[:Mymr:]&[:LineBreak=SA:]]"), status);
+ fMarkSet.applyPattern(UnicodeString(u"[[:Mymr:]&[:LineBreak=SA:]&[:M:]]"), status);
+ fMarkSet.add(0x0020);
if (U_SUCCESS(status)) {
- setCharacters(fBurmeseWordSet);
+ setCharacters(fEndWordSet);
}
- fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Mymr:]&[:LineBreak=SA:]&[:M:]]"), status);
- fMarkSet.add(0x0020);
- fEndWordSet = fBurmeseWordSet;
- fBeginWordSet.add(0x1000, 0x102A); // basic consonants and independent vowels
// Compact for caching.
fMarkSet.compact();
@@ -662,6 +667,7 @@ BurmeseBreakEngine::divideUpDictionaryRange( UText *text,
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool /* isPhraseBreaking */,
UErrorCode& status ) const {
if (U_FAILURE(status)) return 0;
if ((rangeEnd - rangeStart) < BURMESE_MIN_WORD_SPAN) {
@@ -830,13 +836,13 @@ KhmerBreakEngine::KhmerBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCod
{
UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE);
UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Khmr");
- fKhmerWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]]"), status);
+ UnicodeSet khmerWordSet(UnicodeString(u"[[:Khmr:]&[:LineBreak=SA:]]"), status);
if (U_SUCCESS(status)) {
- setCharacters(fKhmerWordSet);
+ setCharacters(khmerWordSet);
}
- fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]&[:M:]]"), status);
+ fMarkSet.applyPattern(UnicodeString(u"[[:Khmr:]&[:LineBreak=SA:]&[:M:]]"), status);
fMarkSet.add(0x0020);
- fEndWordSet = fKhmerWordSet;
+ fEndWordSet = khmerWordSet;
fBeginWordSet.add(0x1780, 0x17B3);
//fBeginWordSet.add(0x17A3, 0x17A4); // deprecated vowels
//fEndWordSet.remove(0x17A5, 0x17A9); // Khmer independent vowels that can't end a word
@@ -867,6 +873,7 @@ KhmerBreakEngine::divideUpDictionaryRange( UText *text,
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool /* isPhraseBreaking */,
UErrorCode& status ) const {
if (U_FAILURE(status)) return 0;
if ((rangeEnd - rangeStart) < KHMER_MIN_WORD_SPAN) {
@@ -1047,28 +1054,40 @@ foundBest:
*/
static const uint32_t kuint32max = 0xFFFFFFFF;
CjkBreakEngine::CjkBreakEngine(DictionaryMatcher *adoptDictionary, LanguageType type, UErrorCode &status)
-: DictionaryBreakEngine(), fDictionary(adoptDictionary) {
+: DictionaryBreakEngine(), fDictionary(adoptDictionary), isCj(false) {
UTRACE_ENTRY(UTRACE_UBRK_CREATE_BREAK_ENGINE);
UTRACE_DATA1(UTRACE_INFO, "dictbe=%s", "Hani");
- // Korean dictionary only includes Hangul syllables
- fHangulWordSet.applyPattern(UNICODE_STRING_SIMPLE("[\\uac00-\\ud7a3]"), status);
- fHanWordSet.applyPattern(UNICODE_STRING_SIMPLE("[:Han:]"), status);
- fKatakanaWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Katakana:]\\uff9e\\uff9f]"), status);
- fHiraganaWordSet.applyPattern(UNICODE_STRING_SIMPLE("[:Hiragana:]"), status);
+ fMlBreakEngine = nullptr;
nfkcNorm2 = Normalizer2::getNFKCInstance(status);
-
- if (U_SUCCESS(status)) {
- // handle Korean and Japanese/Chinese using different dictionaries
- if (type == kKorean) {
+ // Korean dictionary only includes Hangul syllables
+ fHangulWordSet.applyPattern(UnicodeString(u"[\\uac00-\\ud7a3]"), status);
+ fHangulWordSet.compact();
+ // Digits, open puncutation and Alphabetic characters.
+ fDigitOrOpenPunctuationOrAlphabetSet.applyPattern(
+ UnicodeString(u"[[:Nd:][:Pi:][:Ps:][:Alphabetic:]]"), status);
+ fDigitOrOpenPunctuationOrAlphabetSet.compact();
+ fClosePunctuationSet.applyPattern(UnicodeString(u"[[:Pc:][:Pd:][:Pe:][:Pf:][:Po:]]"), status);
+ fClosePunctuationSet.compact();
+
+ // handle Korean and Japanese/Chinese using different dictionaries
+ if (type == kKorean) {
+ if (U_SUCCESS(status)) {
setCharacters(fHangulWordSet);
- } else { //Chinese and Japanese
- UnicodeSet cjSet;
- cjSet.addAll(fHanWordSet);
- cjSet.addAll(fKatakanaWordSet);
- cjSet.addAll(fHiraganaWordSet);
- cjSet.add(0xFF70); // HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
- cjSet.add(0x30FC); // KATAKANA-HIRAGANA PROLONGED SOUND MARK
+ }
+ } else { // Chinese and Japanese
+ UnicodeSet cjSet(UnicodeString(u"[[:Han:][:Hiragana:][:Katakana:]\\u30fc\\uff70\\uff9e\\uff9f]"), status);
+ isCj = true;
+ if (U_SUCCESS(status)) {
setCharacters(cjSet);
+#if UCONFIG_USE_ML_PHRASE_BREAKING
+ fMlBreakEngine = new MlBreakEngine(fDigitOrOpenPunctuationOrAlphabetSet,
+ fClosePunctuationSet, status);
+ if (fMlBreakEngine == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ }
+#else
+ initJapanesePhraseParameter(status);
+#endif
}
}
UTRACE_EXIT_STATUS(status);
@@ -1076,6 +1095,7 @@ CjkBreakEngine::CjkBreakEngine(DictionaryMatcher *adoptDictionary, LanguageType
CjkBreakEngine::~CjkBreakEngine(){
delete fDictionary;
+ delete fMlBreakEngine;
}
// The katakanaCost values below are based on the length frequencies of all
@@ -1096,14 +1116,12 @@ static inline bool isKatakana(UChar32 value) {
(value >= 0xFF66 && value <= 0xFF9f);
}
-
// Function for accessing internal utext flags.
// Replicates an internal UText function.
static inline int32_t utext_i32_flag(int32_t bitIndex) {
return (int32_t)1 << bitIndex;
}
-
/*
* @param text A UText representing the text
@@ -1117,6 +1135,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const {
if (U_FAILURE(status)) return 0;
if (rangeStart >= rangeEnd) {
@@ -1127,7 +1146,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
UnicodeString inString;
// inputMap[inStringIndex] = corresponding native index from UText inText.
- // If NULL then mapping is 1:1
+ // If nullptr then mapping is 1:1
LocalPointer<UVector32> inputMap;
// if UText has the input string as one contiguous UTF-16 chunk
@@ -1138,7 +1157,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// Input UText is in one contiguous UTF-16 chunk.
// Use Read-only aliasing UnicodeString.
- inString.setTo(FALSE,
+ inString.setTo(false,
inText->chunkContents + rangeStart - inText->chunkNativeStart,
rangeEnd - rangeStart);
} else {
@@ -1243,7 +1262,15 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
}
}
}
-
+
+#if UCONFIG_USE_ML_PHRASE_BREAKING
+ // PhraseBreaking is supported in ja and ko; MlBreakEngine only supports ja.
+ if (isPhraseBreaking && isCj) {
+ return fMlBreakEngine->divideUpRange(inText, rangeStart, rangeEnd, foundBreaks, inString,
+ inputMap, status);
+ }
+#endif
+
// bestSnlp[i] is the snlp of the best segmentation of the first i
// code points in the range to be matched.
UVector32 bestSnlp(numCodePts + 1, status);
@@ -1284,9 +1311,9 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
int32_t count;
utext_setNativeIndex(&fu, ix);
count = fDictionary->matches(&fu, maxWordSize, numCodePts,
- NULL, lengths.getBuffer(), values.getBuffer(), NULL);
+ nullptr, lengths.getBuffer(), values.getBuffer(), nullptr);
// Note: lengths is filled with code point lengths
- // The NULL parameter is the ignored code unit lengths.
+ // The nullptr parameter is the ignored code unit lengths.
// if there are no single character matches found in the dictionary
// starting with this character, treat character as a 1-character word
@@ -1347,6 +1374,31 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
if ((uint32_t)bestSnlp.elementAti(numCodePts) == kuint32max) {
t_boundary.addElement(numCodePts, status);
numBreaks++;
+ } else if (isPhraseBreaking) {
+ t_boundary.addElement(numCodePts, status);
+ if(U_SUCCESS(status)) {
+ numBreaks++;
+ int32_t prevIdx = numCodePts;
+
+ int32_t codeUnitIdx = -1;
+ int32_t prevCodeUnitIdx = -1;
+ int32_t length = -1;
+ for (int32_t i = prev.elementAti(numCodePts); i > 0; i = prev.elementAti(i)) {
+ codeUnitIdx = inString.moveIndex32(0, i);
+ prevCodeUnitIdx = inString.moveIndex32(0, prevIdx);
+ // Calculate the length by using the code unit.
+ length = prevCodeUnitIdx - codeUnitIdx;
+ prevIdx = i;
+ // Keep the breakpoint if the pattern is not in the fSkipSet and continuous Katakana
+ // characters don't occur.
+ if (!fSkipSet.containsKey(inString.tempSubString(codeUnitIdx, length))
+ && (!isKatakana(inString.char32At(inString.moveIndex32(codeUnitIdx, -1)))
+ || !isKatakana(inString.char32At(codeUnitIdx)))) {
+ t_boundary.addElement(i, status);
+ numBreaks++;
+ }
+ }
+ }
} else {
for (int32_t i = numCodePts; i > 0; i = prev.elementAti(i)) {
t_boundary.addElement(i, status);
@@ -1367,7 +1419,8 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// while reversing t_boundary and pushing values to foundBreaks.
int32_t prevCPPos = -1;
int32_t prevUTextPos = -1;
- for (int32_t i = numBreaks-1; i >= 0; i--) {
+ int32_t correctedNumBreaks = 0;
+ for (int32_t i = numBreaks - 1; i >= 0; i--) {
int32_t cpPos = t_boundary.elementAti(i);
U_ASSERT(cpPos > prevCPPos);
int32_t utextPos = inputMap.isValid() ? inputMap->elementAti(cpPos) : cpPos + rangeStart;
@@ -1375,7 +1428,15 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
if (utextPos > prevUTextPos) {
// Boundaries are added to foundBreaks output in ascending order.
U_ASSERT(foundBreaks.size() == 0 || foundBreaks.peeki() < utextPos);
- foundBreaks.push(utextPos, status);
+ // In phrase breaking, there has to be a breakpoint between Cj character and close
+ // punctuation.
+ // E.g.[携帯電話]正しい選択 -> [携帯▁電話]▁正しい▁選択 -> breakpoint between ] and 正
+ if (utextPos != rangeStart
+ || (isPhraseBreaking && utextPos > 0
+ && fClosePunctuationSet.contains(utext_char32At(inText, utextPos - 1)))) {
+ foundBreaks.push(utextPos, status);
+ correctedNumBreaks++;
+ }
} else {
// Normalization expanded the input text, the dictionary found a boundary
// within the expansion, giving two boundaries with the same index in the
@@ -1387,9 +1448,52 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
}
(void)prevCPPos; // suppress compiler warnings about unused variable
+ UChar32 nextChar = utext_char32At(inText, rangeEnd);
+ if (!foundBreaks.isEmpty() && foundBreaks.peeki() == rangeEnd) {
+ // In phrase breaking, there has to be a breakpoint between Cj character and
+ // the number/open punctuation.
+ // E.g. る文字「そうだ、京都」->る▁文字▁「そうだ、▁京都」-> breakpoint between 字 and「
+ // E.g. 乗車率90%程度だろうか -> 乗車▁率▁90%▁程度だろうか -> breakpoint between 率 and 9
+ // E.g. しかもロゴがUnicode! -> しかも▁ロゴが▁Unicode!-> breakpoint between が and U
+ if (isPhraseBreaking) {
+ if (!fDigitOrOpenPunctuationOrAlphabetSet.contains(nextChar)) {
+ foundBreaks.popi();
+ correctedNumBreaks--;
+ }
+ } else {
+ foundBreaks.popi();
+ correctedNumBreaks--;
+ }
+ }
+
// inString goes out of scope
// inputMap goes out of scope
- return numBreaks;
+ return correctedNumBreaks;
+}
+
+void CjkBreakEngine::initJapanesePhraseParameter(UErrorCode& error) {
+ loadJapaneseExtensions(error);
+ loadHiragana(error);
+}
+
+void CjkBreakEngine::loadJapaneseExtensions(UErrorCode& error) {
+ const char* tag = "extensions";
+ ResourceBundle ja(U_ICUDATA_BRKITR, "ja", error);
+ if (U_SUCCESS(error)) {
+ ResourceBundle bundle = ja.get(tag, error);
+ while (U_SUCCESS(error) && bundle.hasNext()) {
+ fSkipSet.puti(bundle.getNextString(error), 1, error);
+ }
+ }
+}
+
+void CjkBreakEngine::loadHiragana(UErrorCode& error) {
+ UnicodeSet hiraganaWordSet(UnicodeString(u"[:Hiragana:]"), error);
+ hiraganaWordSet.compact();
+ UnicodeSetIterator iterator(hiraganaWordSet);
+ while (iterator.next()) {
+ fSkipSet.puti(UnicodeString(iterator.getCodepoint()), 1, error);
+ }
}
#endif
diff --git a/contrib/libs/icu/common/dictbe.h b/contrib/libs/icu/common/dictbe.h
index 4e70ed38171..a2c761bdc3a 100644
--- a/contrib/libs/icu/common/dictbe.h
+++ b/contrib/libs/icu/common/dictbe.h
@@ -15,11 +15,14 @@
#include "unicode/utext.h"
#include "brkeng.h"
+#include "hash.h"
+#include "mlbe.h"
#include "uvectr32.h"
U_NAMESPACE_BEGIN
class DictionaryMatcher;
+class MlBreakEngine;
class Normalizer2;
/*******************************************************************
@@ -80,6 +83,7 @@ class DictionaryBreakEngine : public LanguageBreakEngine {
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status ) const override;
protected:
@@ -105,6 +109,7 @@ class DictionaryBreakEngine : public LanguageBreakEngine {
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const = 0;
};
@@ -127,7 +132,6 @@ class ThaiBreakEngine : public DictionaryBreakEngine {
* @internal
*/
- UnicodeSet fThaiWordSet;
UnicodeSet fEndWordSet;
UnicodeSet fBeginWordSet;
UnicodeSet fSuffixSet;
@@ -164,6 +168,7 @@ class ThaiBreakEngine : public DictionaryBreakEngine {
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const override;
};
@@ -186,7 +191,6 @@ class LaoBreakEngine : public DictionaryBreakEngine {
* @internal
*/
- UnicodeSet fLaoWordSet;
UnicodeSet fEndWordSet;
UnicodeSet fBeginWordSet;
UnicodeSet fMarkSet;
@@ -222,6 +226,7 @@ class LaoBreakEngine : public DictionaryBreakEngine {
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const override;
};
@@ -244,7 +249,6 @@ class BurmeseBreakEngine : public DictionaryBreakEngine {
* @internal
*/
- UnicodeSet fBurmeseWordSet;
UnicodeSet fEndWordSet;
UnicodeSet fBeginWordSet;
UnicodeSet fMarkSet;
@@ -280,6 +284,7 @@ class BurmeseBreakEngine : public DictionaryBreakEngine {
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const override;
};
@@ -302,7 +307,6 @@ class KhmerBreakEngine : public DictionaryBreakEngine {
* @internal
*/
- UnicodeSet fKhmerWordSet;
UnicodeSet fEndWordSet;
UnicodeSet fBeginWordSet;
UnicodeSet fMarkSet;
@@ -338,6 +342,7 @@ class KhmerBreakEngine : public DictionaryBreakEngine {
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const override;
};
@@ -366,12 +371,23 @@ class CjkBreakEngine : public DictionaryBreakEngine {
* @internal
*/
UnicodeSet fHangulWordSet;
- UnicodeSet fHanWordSet;
- UnicodeSet fKatakanaWordSet;
- UnicodeSet fHiraganaWordSet;
+ UnicodeSet fDigitOrOpenPunctuationOrAlphabetSet;
+ UnicodeSet fClosePunctuationSet;
DictionaryMatcher *fDictionary;
const Normalizer2 *nfkcNorm2;
+ MlBreakEngine *fMlBreakEngine;
+ bool isCj;
+
+ private:
+ // Load Japanese extensions.
+ void loadJapaneseExtensions(UErrorCode& error);
+ // Load Japanese Hiragana.
+ void loadHiragana(UErrorCode& error);
+ // Initialize fSkipSet by loading Japanese Hiragana and extensions.
+ void initJapanesePhraseParameter(UErrorCode& error);
+
+ Hashtable fSkipSet;
public:
@@ -404,6 +420,7 @@ class CjkBreakEngine : public DictionaryBreakEngine {
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const override;
};
diff --git a/contrib/libs/icu/common/dictionarydata.cpp b/contrib/libs/icu/common/dictionarydata.cpp
index 6e2dbee5b61..80b6d82d56a 100644
--- a/contrib/libs/icu/common/dictionarydata.cpp
+++ b/contrib/libs/icu/common/dictionarydata.cpp
@@ -57,13 +57,13 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
codePointsMatched += 1;
if (USTRINGTRIE_HAS_VALUE(result)) {
if (wordCount < limit) {
- if (values != NULL) {
+ if (values != nullptr) {
values[wordCount] = uct.getValue();
}
- if (lengths != NULL) {
+ if (lengths != nullptr) {
lengths[wordCount] = lengthMatched;
}
- if (cpLengths != NULL) {
+ if (cpLengths != nullptr) {
cpLengths[wordCount] = codePointsMatched;
}
++wordCount;
@@ -80,7 +80,7 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
}
}
- if (prefix != NULL) {
+ if (prefix != nullptr) {
*prefix = codePointsMatched;
}
return wordCount;
@@ -124,13 +124,13 @@ int32_t BytesDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
codePointsMatched += 1;
if (USTRINGTRIE_HAS_VALUE(result)) {
if (wordCount < limit) {
- if (values != NULL) {
+ if (values != nullptr) {
values[wordCount] = bt.getValue();
}
- if (lengths != NULL) {
+ if (lengths != nullptr) {
lengths[wordCount] = lengthMatched;
}
- if (cpLengths != NULL) {
+ if (cpLengths != nullptr) {
cpLengths[wordCount] = codePointsMatched;
}
++wordCount;
@@ -147,7 +147,7 @@ int32_t BytesDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
}
}
- if (prefix != NULL) {
+ if (prefix != nullptr) {
*prefix = codePointsMatched;
}
return wordCount;
@@ -170,7 +170,7 @@ udict_swap(const UDataSwapper *ds, const void *inData, int32_t length,
int32_t i, offset, size;
headerSize = udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if (pErrorCode == NULL || U_FAILURE(*pErrorCode)) return 0;
+ if (pErrorCode == nullptr || U_FAILURE(*pErrorCode)) return 0;
pInfo = (const UDataInfo *)((const char *)inData + 4);
if (!(pInfo->dataFormat[0] == 0x44 &&
pInfo->dataFormat[1] == 0x69 &&
@@ -184,7 +184,7 @@ udict_swap(const UDataSwapper *ds, const void *inData, int32_t length,
}
inBytes = (const uint8_t *)inData + headerSize;
- outBytes = (uint8_t *)outData + headerSize;
+ outBytes = (outData == nullptr) ? nullptr : (uint8_t *)outData + headerSize;
inIndexes = (const int32_t *)inBytes;
if (length >= 0) {
diff --git a/contrib/libs/icu/common/dictionarydata.h b/contrib/libs/icu/common/dictionarydata.h
index e75716f54b9..8751e502d5e 100644
--- a/contrib/libs/icu/common/dictionarydata.h
+++ b/contrib/libs/icu/common/dictionarydata.h
@@ -79,15 +79,15 @@ public:
* matching words to be found.
* @param lengths output array, filled with the lengths of the matches, in order,
* from shortest to longest. Lengths are in native indexing units
- * of the UText. May be NULL.
+ * of the UText. May be nullptr.
* @param cpLengths output array, filled with the lengths of the matches, in order,
* from shortest to longest. Lengths are the number of Unicode code points.
- * May be NULL.
+ * May be nullptr.
* @param values Output array, filled with the values associated with the words found.
- * May be NULL.
+ * May be nullptr.
* @param prefix Output parameter, the code point length of the prefix match, even if that
* prefix didn't lead to a complete word. Will always be >= the cpLength
- * of the longest complete word matched. May be NULL.
+ * of the longest complete word matched. May be nullptr.
* @return Number of matching words found.
*/
virtual int32_t matches(UText *text, int32_t maxLength, int32_t limit,
@@ -103,14 +103,14 @@ class U_COMMON_API UCharsDictionaryMatcher : public DictionaryMatcher {
public:
// constructs a new UCharsDictionaryMatcher.
// The UDataMemory * will be closed on this object's destruction.
- UCharsDictionaryMatcher(const UChar *c, UDataMemory *f) : characters(c), file(f) { }
+ UCharsDictionaryMatcher(const char16_t *c, UDataMemory *f) : characters(c), file(f) { }
virtual ~UCharsDictionaryMatcher();
virtual int32_t matches(UText *text, int32_t maxLength, int32_t limit,
int32_t *lengths, int32_t *cpLengths, int32_t *values,
int32_t *prefix) const override;
virtual int32_t getType() const override;
private:
- const UChar *characters;
+ const char16_t *characters;
UDataMemory *file;
};
diff --git a/contrib/libs/icu/common/edits.cpp b/contrib/libs/icu/common/edits.cpp
index 92ca36fb5d0..3348145d48d 100644
--- a/contrib/libs/icu/common/edits.cpp
+++ b/contrib/libs/icu/common/edits.cpp
@@ -35,7 +35,7 @@ const int32_t LENGTH_IN_2TRAIL = 62;
} // namespace
-void Edits::releaseArray() U_NOEXCEPT {
+void Edits::releaseArray() noexcept {
if (array != stackArray) {
uprv_free(array);
}
@@ -63,7 +63,7 @@ Edits &Edits::copyArray(const Edits &other) {
return *this;
}
-Edits &Edits::moveArray(Edits &src) U_NOEXCEPT {
+Edits &Edits::moveArray(Edits &src) noexcept {
if (U_FAILURE(errorCode_)) {
length = delta = numChanges = 0;
return *this;
@@ -94,7 +94,7 @@ Edits &Edits::operator=(const Edits &other) {
return copyArray(other);
}
-Edits &Edits::operator=(Edits &&src) U_NOEXCEPT {
+Edits &Edits::operator=(Edits &&src) noexcept {
length = src.length;
delta = src.delta;
numChanges = src.numChanges;
@@ -106,7 +106,7 @@ Edits::~Edits() {
releaseArray();
}
-void Edits::reset() U_NOEXCEPT {
+void Edits::reset() noexcept {
length = delta = numChanges = 0;
errorCode_ = U_ZERO_ERROR;
}
@@ -221,7 +221,7 @@ UBool Edits::growArray() {
// Not U_BUFFER_OVERFLOW_ERROR because that could be confused on a string transform API
// with a result-string-buffer overflow.
errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
} else if (capacity >= (INT32_MAX / 2)) {
newCapacity = INT32_MAX;
} else {
@@ -230,25 +230,25 @@ UBool Edits::growArray() {
// Grow by at least 5 units so that a maximal change record will fit.
if ((newCapacity - capacity) < 5) {
errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2);
- if (newArray == NULL) {
+ if (newArray == nullptr) {
errorCode_ = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
uprv_memcpy(newArray, array, (size_t)length * 2);
releaseArray();
array = newArray;
capacity = newCapacity;
- return TRUE;
+ return true;
}
UBool Edits::copyErrorTo(UErrorCode &outErrorCode) const {
- if (U_FAILURE(outErrorCode)) { return TRUE; }
- if (U_SUCCESS(errorCode_)) { return FALSE; }
+ if (U_FAILURE(outErrorCode)) { return true; }
+ if (U_SUCCESS(errorCode_)) { return false; }
outErrorCode = errorCode_;
- return TRUE;
+ return true;
}
Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode) {
@@ -257,7 +257,7 @@ Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &error
// Parallel iteration over both Edits.
Iterator abIter = ab.getFineIterator();
Iterator bcIter = bc.getFineIterator();
- UBool abHasNext = TRUE, bcHasNext = TRUE;
+ UBool abHasNext = true, bcHasNext = true;
// Copy iterator state into local variables, so that we can modify and subdivide spans.
// ab old & new length, bc old & new length
int32_t aLength = 0, ab_bLength = 0, bc_bLength = 0, cLength = 0;
@@ -400,7 +400,7 @@ Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &error
Edits::Iterator::Iterator(const uint16_t *a, int32_t len, UBool oc, UBool crs) :
array(a), index(0), length(len), remaining(0),
onlyChanges_(oc), coarse(crs),
- dir(0), changed(FALSE), oldLength_(0), newLength_(0),
+ dir(0), changed(false), oldLength_(0), newLength_(0),
srcIndex(0), replIndex(0), destIndex(0) {}
int32_t Edits::Iterator::readLength(int32_t head) {
@@ -441,16 +441,16 @@ void Edits::Iterator::updatePreviousIndexes() {
UBool Edits::Iterator::noNext() {
// No change before or beyond the string.
dir = 0;
- changed = FALSE;
+ changed = false;
oldLength_ = newLength_ = 0;
- return FALSE;
+ return false;
}
UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// Forward iteration: Update the string indexes to the limit of the current span,
// and post-increment-read array units to assemble a new span.
// Leaves the array index one after the last unit of that span.
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
// We have an errorCode in case we need to start guarding against integer overflows.
// It is also convenient for caller loops if we bail out when an error was set elsewhere.
if (dir > 0) {
@@ -464,7 +464,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// Stay on the current one of a sequence of compressed changes.
++index; // next() rests on the index after the sequence unit.
dir = 1;
- return TRUE;
+ return true;
}
}
dir = 1;
@@ -473,7 +473,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// Fine-grained iterator: Continue a sequence of compressed changes.
if (remaining > 1) {
--remaining;
- return TRUE;
+ return true;
}
remaining = 0;
}
@@ -483,7 +483,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
int32_t u = array[index++];
if (u <= MAX_UNCHANGED) {
// Combine adjacent unchanged ranges.
- changed = FALSE;
+ changed = false;
oldLength_ = u + 1;
while (index < length && (u = array[index]) <= MAX_UNCHANGED) {
++index;
@@ -498,10 +498,10 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
// already fetched u > MAX_UNCHANGED at index
++index;
} else {
- return TRUE;
+ return true;
}
}
- changed = TRUE;
+ changed = true;
if (u <= MAX_SHORT_CHANGE) {
int32_t oldLen = u >> 12;
int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH;
@@ -516,14 +516,14 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
if (num > 1) {
remaining = num; // This is the first of two or more changes.
}
- return TRUE;
+ return true;
}
} else {
U_ASSERT(u <= 0x7fff);
oldLength_ = readLength((u >> 6) & 0x3f);
newLength_ = readLength(u & 0x3f);
if (!coarse) {
- return TRUE;
+ return true;
}
}
// Combine adjacent changes.
@@ -539,14 +539,14 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) {
newLength_ += readLength(u & 0x3f);
}
}
- return TRUE;
+ return true;
}
UBool Edits::Iterator::previous(UErrorCode &errorCode) {
// Backward iteration: Pre-decrement-read array units to assemble a new span,
// then update the string indexes to the start of that span.
// Leaves the array index on the head unit of that span.
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
// We have an errorCode in case we need to start guarding against integer overflows.
// It is also convenient for caller loops if we bail out when an error was set elsewhere.
if (dir >= 0) {
@@ -559,7 +559,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
// Stay on the current one of a sequence of compressed changes.
--index; // previous() rests on the sequence unit.
dir = -1;
- return TRUE;
+ return true;
}
updateNextIndexes();
}
@@ -572,7 +572,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
if (remaining <= (u & SHORT_CHANGE_NUM_MASK)) {
++remaining;
updatePreviousIndexes();
- return TRUE;
+ return true;
}
remaining = 0;
}
@@ -582,7 +582,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
int32_t u = array[--index];
if (u <= MAX_UNCHANGED) {
// Combine adjacent unchanged ranges.
- changed = FALSE;
+ changed = false;
oldLength_ = u + 1;
while (index > 0 && (u = array[index - 1]) <= MAX_UNCHANGED) {
--index;
@@ -591,9 +591,9 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
newLength_ = oldLength_;
// No need to handle onlyChanges as long as previous() is called only from findIndex().
updatePreviousIndexes();
- return TRUE;
+ return true;
}
- changed = TRUE;
+ changed = true;
if (u <= MAX_SHORT_CHANGE) {
int32_t oldLen = u >> 12;
int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH;
@@ -609,7 +609,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
remaining = 1; // This is the last of two or more changes.
}
updatePreviousIndexes();
- return TRUE;
+ return true;
}
} else {
if (u <= 0x7fff) {
@@ -629,7 +629,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
}
if (!coarse) {
updatePreviousIndexes();
- return TRUE;
+ return true;
}
}
// Combine adjacent changes.
@@ -648,7 +648,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) {
}
}
updatePreviousIndexes();
- return TRUE;
+ return true;
}
int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &errorCode) {
@@ -705,7 +705,7 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro
// The index is in the current span.
return 0;
}
- while (next(FALSE, errorCode)) {
+ while (next(false, errorCode)) {
if (findSource) {
spanStart = srcIndex;
spanLength = oldLength_;
@@ -739,7 +739,7 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro
}
int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode &errorCode) {
- int32_t where = findIndex(i, TRUE, errorCode);
+ int32_t where = findIndex(i, true, errorCode);
if (where < 0) {
// Error or before the string.
return 0;
@@ -758,7 +758,7 @@ int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode &
}
int32_t Edits::Iterator::sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode) {
- int32_t where = findIndex(i, FALSE, errorCode);
+ int32_t where = findIndex(i, false, errorCode);
if (where < 0) {
// Error or before the string.
return 0;
diff --git a/contrib/libs/icu/common/emojiprops.cpp b/contrib/libs/icu/common/emojiprops.cpp
index 2a05e8602d3..f2b3f4762f3 100644
--- a/contrib/libs/icu/common/emojiprops.cpp
+++ b/contrib/libs/icu/common/emojiprops.cpp
@@ -22,7 +22,7 @@ U_NAMESPACE_BEGIN
namespace {
EmojiProps *singleton = nullptr;
-icu::UInitOnce emojiInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce emojiInitOnce {};
UBool U_CALLCONV emojiprops_cleanup() {
delete singleton;
@@ -46,7 +46,7 @@ void U_CALLCONV initSingleton(UErrorCode &errorCode) {
// TODO: turn this into a shared helper function
// Requires the major version to match, and then requires at least the minor version.
UBool udata_isAcceptableMajorMinor(
- const UDataInfo &info, const UChar *dataFormat, uint8_t major, uint8_t minor) {
+ const UDataInfo &info, const char16_t *dataFormat, uint8_t major, uint8_t minor) {
return
info.size >= 20 &&
info.isBigEndian == U_IS_BIG_ENDIAN &&
@@ -104,7 +104,7 @@ EmojiProps::load(UErrorCode &errorCode) {
offset = inIndexes[i];
nextOffset = inIndexes[i + 1];
// Set/leave nullptr if there is no UCharsTrie.
- const UChar *p = nextOffset > offset ? (const UChar *)(inBytes + offset) : nullptr;
+ const char16_t *p = nextOffset > offset ? (const char16_t *)(inBytes + offset) : nullptr;
stringTries[getStringTrieIndex(i)] = p;
}
}
@@ -160,14 +160,14 @@ EmojiProps::hasBinaryPropertyImpl(UChar32 c, UProperty which) const {
}
UBool
-EmojiProps::hasBinaryProperty(const UChar *s, int32_t length, UProperty which) {
+EmojiProps::hasBinaryProperty(const char16_t *s, int32_t length, UProperty which) {
UErrorCode errorCode = U_ZERO_ERROR;
const EmojiProps *ep = getSingleton(errorCode);
return U_SUCCESS(errorCode) && ep->hasBinaryPropertyImpl(s, length, which);
}
UBool
-EmojiProps::hasBinaryPropertyImpl(const UChar *s, int32_t length, UProperty which) const {
+EmojiProps::hasBinaryPropertyImpl(const char16_t *s, int32_t length, UProperty which) const {
if (s == nullptr && length != 0) { return false; }
if (length <= 0 && (length == 0 || *s == 0)) { return false; } // empty string
// The caller should have delegated single code points to hasBinaryProperty(c, which).
@@ -181,7 +181,7 @@ EmojiProps::hasBinaryPropertyImpl(const UChar *s, int32_t length, UProperty whic
lastProp = UCHAR_RGI_EMOJI_ZWJ_SEQUENCE;
}
for (int32_t prop = firstProp; prop <= lastProp; ++prop) {
- const UChar *trieUChars = stringTries[prop - UCHAR_BASIC_EMOJI];
+ const char16_t *trieUChars = stringTries[prop - UCHAR_BASIC_EMOJI];
if (trieUChars != nullptr) {
UCharsTrie trie(trieUChars);
UStringTrieResult result = trie.next(s, length);
@@ -206,7 +206,7 @@ EmojiProps::addStrings(const USetAdder *sa, UProperty which, UErrorCode &errorCo
lastProp = UCHAR_RGI_EMOJI_ZWJ_SEQUENCE;
}
for (int32_t prop = firstProp; prop <= lastProp; ++prop) {
- const UChar *trieUChars = stringTries[prop - UCHAR_BASIC_EMOJI];
+ const char16_t *trieUChars = stringTries[prop - UCHAR_BASIC_EMOJI];
if (trieUChars != nullptr) {
UCharsTrie::Iterator iter(trieUChars, 0, errorCode);
while (iter.next(errorCode)) {
diff --git a/contrib/libs/icu/common/emojiprops.h b/contrib/libs/icu/common/emojiprops.h
index 457847c303a..777b7b11a83 100644
--- a/contrib/libs/icu/common/emojiprops.h
+++ b/contrib/libs/icu/common/emojiprops.h
@@ -23,7 +23,7 @@ public:
static const EmojiProps *getSingleton(UErrorCode &errorCode);
static UBool hasBinaryProperty(UChar32 c, UProperty which);
- static UBool hasBinaryProperty(const UChar *s, int32_t length, UProperty which);
+ static UBool hasBinaryProperty(const char16_t *s, int32_t length, UProperty which);
void addPropertyStarts(const USetAdder *sa, UErrorCode &errorCode) const;
void addStrings(const USetAdder *sa, UProperty which, UErrorCode &errorCode) const;
@@ -78,11 +78,11 @@ private:
void load(UErrorCode &errorCode);
UBool hasBinaryPropertyImpl(UChar32 c, UProperty which) const;
- UBool hasBinaryPropertyImpl(const UChar *s, int32_t length, UProperty which) const;
+ UBool hasBinaryPropertyImpl(const char16_t *s, int32_t length, UProperty which) const;
UDataMemory *memory = nullptr;
UCPTrie *cpTrie = nullptr;
- const UChar *stringTries[6] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
+ const char16_t *stringTries[6] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/filteredbrk.cpp b/contrib/libs/icu/common/filteredbrk.cpp
index e4817367a5a..a705b037c47 100644
--- a/contrib/libs/icu/common/filteredbrk.cpp
+++ b/contrib/libs/icu/common/filteredbrk.cpp
@@ -35,7 +35,7 @@ static void _fb_trace(const char *m, const UnicodeString *s, UBool b, int32_t d,
if(s) {
s->extract(0,s->length(),buf,2048);
} else {
- strcpy(buf,"NULL");
+ strcpy(buf,"nullptr");
}
fprintf(stderr,"%s:%d: %s. s='%s'(%p), b=%c, d=%d\n",
f, l, m, buf, (const void*)s, b?'T':'F',(int)d);
@@ -58,7 +58,7 @@ static int32_t U_CALLCONV compareUnicodeString(UElement t1, UElement t2) {
/**
* A UVector which implements a set of strings.
*/
-class U_COMMON_API UStringSet : public UVector {
+class UStringSet : public UVector {
public:
UStringSet(UErrorCode &status) : UVector(uprv_deleteUObject,
uhash_compareUnicodeString,
@@ -102,7 +102,7 @@ class U_COMMON_API UStringSet : public UVector {
inline UBool add(const UnicodeString& str, UErrorCode &status) {
if(U_FAILURE(status)) return false;
UnicodeString *t = new UnicodeString(str);
- if(t==NULL) {
+ if(t==nullptr) {
status = U_MEMORY_ALLOCATION_ERROR; return false;
}
return adopt(t, status);
@@ -130,7 +130,7 @@ static const int32_t kPARTIAL = (1<<0); //< partial - need to run through forwar
static const int32_t kMATCH = (1<<1); //< exact match - skip this one.
static const int32_t kSuppressInReverse = (1<<0);
static const int32_t kAddToForward = (1<<1);
-static const UChar kFULLSTOP = 0x002E; // '.'
+static const char16_t kFULLSTOP = 0x002E; // '.'
/**
* Shared data for SimpleFilteredSentenceBreakIterator
@@ -191,7 +191,7 @@ public:
return clone();
}
virtual SimpleFilteredSentenceBreakIterator* clone() const override { return new SimpleFilteredSentenceBreakIterator(*this); }
- virtual UClassID getDynamicClassID(void) const override { return NULL; }
+ virtual UClassID getDynamicClassID() const override { return nullptr; }
virtual bool operator==(const BreakIterator& o) const override { if(this==&o) return true; return false; }
/* -- text modifying -- */
@@ -202,20 +202,20 @@ public:
/* -- other functions that are just delegated -- */
virtual UText *getUText(UText *fillIn, UErrorCode &status) const override { return fDelegate->getUText(fillIn,status); }
- virtual CharacterIterator& getText(void) const override { return fDelegate->getText(); }
+ virtual CharacterIterator& getText() const override { return fDelegate->getText(); }
/* -- ITERATION -- */
- virtual int32_t first(void) override;
+ virtual int32_t first() override;
virtual int32_t preceding(int32_t offset) override;
- virtual int32_t previous(void) override;
+ virtual int32_t previous() override;
virtual UBool isBoundary(int32_t offset) override;
- virtual int32_t current(void) const override { return fDelegate->current(); } // we keep the delegate current, so this should be correct.
+ virtual int32_t current() const override { return fDelegate->current(); } // we keep the delegate current, so this should be correct.
- virtual int32_t next(void) override;
+ virtual int32_t next() override;
virtual int32_t next(int32_t n) override;
virtual int32_t following(int32_t offset) override;
- virtual int32_t last(void) override;
+ virtual int32_t last() override;
private:
/**
@@ -289,11 +289,11 @@ SimpleFilteredSentenceBreakIterator::breakExceptionAt(int32_t n) {
// Assume a space is following the '.' (so we handle the case: "Mr. /Brown")
if(utext_previous32(fText.getAlias())==u' ') { // TODO: skip a class of chars here??
// TODO only do this the 1st time?
- //if(debug2) u_printf("skipping prev: |%C| \n", (UChar)uch);
+ //if(debug2) u_printf("skipping prev: |%C| \n", (char16_t)uch);
} else {
- //if(debug2) u_printf("not skipping prev: |%C| \n", (UChar)uch);
+ //if(debug2) u_printf("not skipping prev: |%C| \n", (char16_t)uch);
utext_next32(fText.getAlias());
- //if(debug2) u_printf(" -> : |%C| \n", (UChar)uch);
+ //if(debug2) u_printf(" -> : |%C| \n", (char16_t)uch);
}
{
@@ -309,20 +309,20 @@ SimpleFilteredSentenceBreakIterator::breakExceptionAt(int32_t n) {
if(!USTRINGTRIE_HAS_NEXT(r)) {
break;
}
- //if(debug2) u_printf("rev< /%C/ cont?%d @%d\n", (UChar)uch, r, utext_getNativeIndex(fText.getAlias()));
+ //if(debug2) u_printf("rev< /%C/ cont?%d @%d\n", (char16_t)uch, r, utext_getNativeIndex(fText.getAlias()));
}
}
//if(bestValue >= 0) {
- //if(debug2) u_printf("rev<+/%C/+end of seq.. r=%d, bestPosn=%d, bestValue=%d\n", (UChar)uch, r, bestPosn, bestValue);
+ //if(debug2) u_printf("rev<+/%C/+end of seq.. r=%d, bestPosn=%d, bestValue=%d\n", (char16_t)uch, r, bestPosn, bestValue);
//}
if(bestPosn>=0) {
- //if(debug2) u_printf("rev< /%C/ end of seq.. r=%d, bestPosn=%d, bestValue=%d\n", (UChar)uch, r, bestPosn, bestValue);
+ //if(debug2) u_printf("rev< /%C/ end of seq.. r=%d, bestPosn=%d, bestValue=%d\n", (char16_t)uch, r, bestPosn, bestValue);
//if(USTRINGTRIE_MATCHES(r)) { // matched - so, now what?
//int32_t bestValue = iter.getValue();
- ////if(debug2) u_printf("rev< /%C/ matched, skip..%d bestValue=%d\n", (UChar)uch, r, bestValue);
+ ////if(debug2) u_printf("rev< /%C/ matched, skip..%d bestValue=%d\n", (char16_t)uch, r, bestValue);
if(bestValue == kMATCH) { // exact match!
//if(debug2) u_printf(" exact backward match\n");
@@ -340,15 +340,15 @@ SimpleFilteredSentenceBreakIterator::breakExceptionAt(int32_t n) {
UChar32 uch;
while((uch=utext_next32(fText.getAlias()))!=U_SENTINEL &&
USTRINGTRIE_HAS_NEXT(rfwd=iter.nextForCodePoint(uch))) {
- //if(debug2) u_printf("fwd> /%C/ cont?%d @%d\n", (UChar)uch, rfwd, utext_getNativeIndex(fText.getAlias()));
+ //if(debug2) u_printf("fwd> /%C/ cont?%d @%d\n", (char16_t)uch, rfwd, utext_getNativeIndex(fText.getAlias()));
}
if(USTRINGTRIE_MATCHES(rfwd)) {
- //if(debug2) u_printf("fwd> /%C/ == forward match!\n", (UChar)uch);
+ //if(debug2) u_printf("fwd> /%C/ == forward match!\n", (char16_t)uch);
// only full matches here, nothing to check
// skip the next:
return kExceptionHere;
} else {
- //if(debug2) u_printf("fwd> /%C/ no match.\n", (UChar)uch);
+ //if(debug2) u_printf("fwd> /%C/ no match.\n", (char16_t)uch);
// no match (no exception) -return the 'underlying' break
return kNoExceptionHere;
}
@@ -356,7 +356,7 @@ SimpleFilteredSentenceBreakIterator::breakExceptionAt(int32_t n) {
return kNoExceptionHere; // internal error and/or no forwards trie
}
} else {
- //if(debug2) u_printf("rev< /%C/ .. no match..%d\n", (UChar)uch, r); // no best match
+ //if(debug2) u_printf("rev< /%C/ .. no match..%d\n", (char16_t)uch, r); // no best match
return kNoExceptionHere; // No match - so exit. Not an exception.
}
}
@@ -428,7 +428,7 @@ SimpleFilteredSentenceBreakIterator::next() {
}
int32_t
-SimpleFilteredSentenceBreakIterator::first(void) {
+SimpleFilteredSentenceBreakIterator::first() {
// Don't suppress a break opportunity at the beginning of text.
return fDelegate->first();
}
@@ -439,7 +439,7 @@ SimpleFilteredSentenceBreakIterator::preceding(int32_t offset) {
}
int32_t
-SimpleFilteredSentenceBreakIterator::previous(void) {
+SimpleFilteredSentenceBreakIterator::previous() {
return internalPrev(fDelegate->previous());
}
@@ -473,7 +473,7 @@ SimpleFilteredSentenceBreakIterator::following(int32_t offset) {
}
int32_t
-SimpleFilteredSentenceBreakIterator::last(void) {
+SimpleFilteredSentenceBreakIterator::last() {
// Don't suppress a break opportunity at the end of text.
return fDelegate->last();
}
@@ -482,7 +482,7 @@ SimpleFilteredSentenceBreakIterator::last(void) {
/**
* Concrete implementation of builder class.
*/
-class U_COMMON_API SimpleFilteredBreakIteratorBuilder : public FilteredBreakIteratorBuilder {
+class SimpleFilteredBreakIteratorBuilder : public FilteredBreakIteratorBuilder {
public:
virtual ~SimpleFilteredBreakIteratorBuilder();
SimpleFilteredBreakIteratorBuilder(const Locale &fromLocale, UErrorCode &status);
@@ -516,7 +516,7 @@ SimpleFilteredBreakIteratorBuilder::SimpleFilteredBreakIteratorBuilder(const Loc
#endif
return; // leaves the builder empty, if you try to use it.
}
- LocalUResourceBundlePointer exceptions(ures_getByKeyWithFallback(b.getAlias(), "exceptions", NULL, &subStatus));
+ LocalUResourceBundlePointer exceptions(ures_getByKeyWithFallback(b.getAlias(), "exceptions", nullptr, &subStatus));
if (U_FAILURE(subStatus) || (subStatus == U_USING_DEFAULT_WARNING) ) {
status = subStatus; // copy the failing status
#if FB_DEBUG
@@ -524,7 +524,7 @@ SimpleFilteredBreakIteratorBuilder::SimpleFilteredBreakIteratorBuilder(const Loc
#endif
return; // leaves the builder empty, if you try to use it.
}
- LocalUResourceBundlePointer breaks(ures_getByKeyWithFallback(exceptions.getAlias(), "SentenceBreak", NULL, &subStatus));
+ LocalUResourceBundlePointer breaks(ures_getByKeyWithFallback(exceptions.getAlias(), "SentenceBreak", nullptr, &subStatus));
#if FB_DEBUG
{
@@ -590,7 +590,7 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
LocalPointer<UCharsTrieBuilder> builder(new UCharsTrieBuilder(status), status);
LocalPointer<UCharsTrieBuilder> builder2(new UCharsTrieBuilder(status), status);
if(U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
int32_t revCount = 0;
@@ -614,13 +614,13 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
i++) {
const UnicodeString *abbr = fSet.getStringAt(i);
if(abbr) {
- FB_TRACE("build",abbr,TRUE,i);
+ FB_TRACE("build",abbr,true,i);
ustrs[n] = *abbr; // copy by value
- FB_TRACE("ustrs[n]",&ustrs[n],TRUE,i);
+ FB_TRACE("ustrs[n]",&ustrs[n],true,i);
} else {
- FB_TRACE("build",abbr,FALSE,i);
+ FB_TRACE("build",abbr,false,i);
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
partials[n] = 0; // default: not partial
n++;
@@ -629,37 +629,37 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
for(int i=0;i<subCount;i++) {
int nn = ustrs[i].indexOf(kFULLSTOP); // TODO: non-'.' abbreviations
if(nn>-1 && (nn+1)!=ustrs[i].length()) {
- FB_TRACE("partial",&ustrs[i],FALSE,i);
+ FB_TRACE("partial",&ustrs[i],false,i);
// is partial.
// is it unique?
int sameAs = -1;
for(int j=0;j<subCount;j++) {
if(j==i) continue;
if(ustrs[i].compare(0,nn+1,ustrs[j],0,nn+1)==0) {
- FB_TRACE("prefix",&ustrs[j],FALSE,nn+1);
+ FB_TRACE("prefix",&ustrs[j],false,nn+1);
//UBool otherIsPartial = ((nn+1)!=ustrs[j].length()); // true if ustrs[j] doesn't end at nn
if(partials[j]==0) { // hasn't been processed yet
partials[j] = kSuppressInReverse | kAddToForward;
- FB_TRACE("suppressing",&ustrs[j],FALSE,j);
+ FB_TRACE("suppressing",&ustrs[j],false,j);
} else if(partials[j] & kSuppressInReverse) {
sameAs = j; // the other entry is already in the reverse table.
}
}
}
- FB_TRACE("for partial same-",&ustrs[i],FALSE,sameAs);
- FB_TRACE(" == partial #",&ustrs[i],FALSE,partials[i]);
+ FB_TRACE("for partial same-",&ustrs[i],false,sameAs);
+ FB_TRACE(" == partial #",&ustrs[i],false,partials[i]);
UnicodeString prefix(ustrs[i], 0, nn+1);
if(sameAs == -1 && partials[i] == 0) {
// first one - add the prefix to the reverse table.
prefix.reverse();
builder->add(prefix, kPARTIAL, status);
revCount++;
- FB_TRACE("Added partial",&prefix,FALSE, i);
- FB_TRACE(u_errorName(status),&ustrs[i],FALSE,i);
+ FB_TRACE("Added partial",&prefix,false, i);
+ FB_TRACE(u_errorName(status),&ustrs[i],false,i);
partials[i] = kSuppressInReverse | kAddToForward;
} else {
- FB_TRACE("NOT adding partial",&prefix,FALSE, i);
- FB_TRACE(u_errorName(status),&ustrs[i],FALSE,i);
+ FB_TRACE("NOT adding partial",&prefix,false, i);
+ FB_TRACE(u_errorName(status),&ustrs[i],false,i);
}
}
}
@@ -668,9 +668,9 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
ustrs[i].reverse();
builder->add(ustrs[i], kMATCH, status);
revCount++;
- FB_TRACE(u_errorName(status), &ustrs[i], FALSE, i);
+ FB_TRACE(u_errorName(status), &ustrs[i], false, i);
} else {
- FB_TRACE("Adding fwd",&ustrs[i], FALSE, i);
+ FB_TRACE("Adding fwd",&ustrs[i], false, i);
// an optimization would be to only add the portion after the '.'
// for example, for "Ph.D." we store ".hP" in the reverse table. We could just store "D." in the forward,
@@ -682,21 +682,21 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr
////if(debug2) u_printf("SUPPRESS- not Added(%d): /%S/ status=%s\n",partials[i], ustrs[i].getTerminatedBuffer(), u_errorName(status));
}
}
- FB_TRACE("AbbrCount",NULL,FALSE, subCount);
+ FB_TRACE("AbbrCount",nullptr,false, subCount);
if(revCount>0) {
backwardsTrie.adoptInstead(builder->build(USTRINGTRIE_BUILD_FAST, status));
if(U_FAILURE(status)) {
- FB_TRACE(u_errorName(status),NULL,FALSE, -1);
- return NULL;
+ FB_TRACE(u_errorName(status),nullptr,false, -1);
+ return nullptr;
}
}
if(fwdCount>0) {
forwardsPartialTrie.adoptInstead(builder2->build(USTRINGTRIE_BUILD_FAST, status));
if(U_FAILURE(status)) {
- FB_TRACE(u_errorName(status),NULL,FALSE, -1);
- return NULL;
+ FB_TRACE(u_errorName(status),nullptr,false, -1);
+ return nullptr;
}
}
@@ -714,9 +714,9 @@ FilteredBreakIteratorBuilder::~FilteredBreakIteratorBuilder() {
FilteredBreakIteratorBuilder *
FilteredBreakIteratorBuilder::createInstance(const Locale& where, UErrorCode& status) {
- if(U_FAILURE(status)) return NULL;
+ if(U_FAILURE(status)) return nullptr;
LocalPointer<FilteredBreakIteratorBuilder> ret(new SimpleFilteredBreakIteratorBuilder(where, status), status);
- return (U_SUCCESS(status))? ret.orphan(): NULL;
+ return (U_SUCCESS(status))? ret.orphan(): nullptr;
}
FilteredBreakIteratorBuilder *
@@ -726,9 +726,9 @@ FilteredBreakIteratorBuilder::createInstance(UErrorCode &status) {
FilteredBreakIteratorBuilder *
FilteredBreakIteratorBuilder::createEmptyInstance(UErrorCode& status) {
- if(U_FAILURE(status)) return NULL;
+ if(U_FAILURE(status)) return nullptr;
LocalPointer<FilteredBreakIteratorBuilder> ret(new SimpleFilteredBreakIteratorBuilder(status), status);
- return (U_SUCCESS(status))? ret.orphan(): NULL;
+ return (U_SUCCESS(status))? ret.orphan(): nullptr;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/filterednormalizer2.cpp b/contrib/libs/icu/common/filterednormalizer2.cpp
index 1a0914d3f7b..5eafcb6d78f 100644
--- a/contrib/libs/icu/common/filterednormalizer2.cpp
+++ b/contrib/libs/icu/common/filterednormalizer2.cpp
@@ -137,14 +137,14 @@ UnicodeString &
FilteredNormalizer2::normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
UErrorCode &errorCode) const {
- return normalizeSecondAndAppend(first, second, TRUE, errorCode);
+ return normalizeSecondAndAppend(first, second, true, errorCode);
}
UnicodeString &
FilteredNormalizer2::append(UnicodeString &first,
const UnicodeString &second,
UErrorCode &errorCode) const {
- return normalizeSecondAndAppend(first, second, FALSE, errorCode);
+ return normalizeSecondAndAppend(first, second, false, errorCode);
}
UnicodeString &
@@ -224,7 +224,7 @@ UBool
FilteredNormalizer2::isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
uprv_checkCanGetBuffer(s, errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
USetSpanCondition spanCondition=USET_SPAN_SIMPLE;
for(int32_t prevSpanLimit=0; prevSpanLimit<s.length();) {
@@ -235,19 +235,19 @@ FilteredNormalizer2::isNormalized(const UnicodeString &s, UErrorCode &errorCode)
if( !norm2.isNormalized(s.tempSubStringBetween(prevSpanLimit, spanLimit), errorCode) ||
U_FAILURE(errorCode)
) {
- return FALSE;
+ return false;
}
spanCondition=USET_SPAN_NOT_CONTAINED;
}
prevSpanLimit=spanLimit;
}
- return TRUE;
+ return true;
}
UBool
FilteredNormalizer2::isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
const char *s = sp.data();
int32_t length = sp.length();
@@ -259,14 +259,14 @@ FilteredNormalizer2::isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) con
} else {
if (!norm2.isNormalizedUTF8(StringPiece(s, spanLength), errorCode) ||
U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
spanCondition = USET_SPAN_NOT_CONTAINED;
}
s += spanLength;
length -= spanLength;
}
- return TRUE;
+ return true;
}
UNormalizationCheckResult
@@ -346,15 +346,15 @@ U_NAMESPACE_USE
U_CAPI UNormalizer2 * U_EXPORT2
unorm2_openFiltered(const UNormalizer2 *norm2, const USet *filterSet, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if(filterSet==NULL) {
+ if(filterSet==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
Normalizer2 *fn2=new FilteredNormalizer2(*(Normalizer2 *)norm2,
*UnicodeSet::fromUSet(filterSet));
- if(fn2==NULL) {
+ if(fn2==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
}
return (UNormalizer2 *)fn2;
diff --git a/contrib/libs/icu/common/hash.h b/contrib/libs/icu/common/hash.h
index b927ddb3c36..bc103ee72ca 100644
--- a/contrib/libs/icu/common/hash.h
+++ b/contrib/libs/icu/common/hash.h
@@ -97,7 +97,7 @@ public:
inline int32_t removei(const UnicodeString& key);
- inline void removeAll(void);
+ inline void removeAll();
inline UBool containsKey(const UnicodeString& key) const;
@@ -115,8 +115,8 @@ public:
inline UBool equals(const Hashtable& that) const;
private:
- Hashtable(const Hashtable &other); // forbid copying of this class
- Hashtable &operator=(const Hashtable &other); // forbid copying of this class
+ Hashtable(const Hashtable &other) = delete; // forbid copying of this class
+ Hashtable &operator=(const Hashtable &other) = delete; // forbid copying of this class
};
/*********************************************************************
@@ -159,7 +159,7 @@ inline Hashtable::Hashtable(UBool ignoreKeyCase, UErrorCode& status)
: uhash_hashUnicodeString,
ignoreKeyCase ? uhash_compareCaselessUnicodeString
: uhash_compareUnicodeString,
- NULL,
+ nullptr,
status);
}
@@ -170,25 +170,25 @@ inline Hashtable::Hashtable(UBool ignoreKeyCase, int32_t size, UErrorCode& statu
: uhash_hashUnicodeString,
ignoreKeyCase ? uhash_compareCaselessUnicodeString
: uhash_compareUnicodeString,
- NULL, size,
+ nullptr, size,
status);
}
inline Hashtable::Hashtable(UErrorCode& status)
: hash(0)
{
- init(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, status);
+ init(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, status);
}
inline Hashtable::Hashtable()
: hash(0)
{
UErrorCode status = U_ZERO_ERROR;
- init(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, status);
+ init(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, status);
}
inline Hashtable::~Hashtable() {
- if (hash != NULL) {
+ if (hash != nullptr) {
uhash_close(hash);
}
}
@@ -246,7 +246,7 @@ inline const UHashElement* Hashtable::nextElement(int32_t& pos) const {
return uhash_nextElement(hash, &pos);
}
-inline void Hashtable::removeAll(void) {
+inline void Hashtable::removeAll() {
uhash_removeAll(hash);
}
diff --git a/contrib/libs/icu/common/icudataver.cpp b/contrib/libs/icu/common/icudataver.cpp
index d3144113741..809d080512f 100644
--- a/contrib/libs/icu/common/icudataver.cpp
+++ b/contrib/libs/icu/common/icudataver.cpp
@@ -15,14 +15,14 @@
#include "uresimp.h" /* for ures_getVersionByKey */
U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status) {
- UResourceBundle *icudatares = NULL;
+ UResourceBundle *icudatares = nullptr;
if (U_FAILURE(*status)) {
return;
}
- if (dataVersionFillin != NULL) {
- icudatares = ures_openDirect(NULL, U_ICU_VERSION_BUNDLE , status);
+ if (dataVersionFillin != nullptr) {
+ icudatares = ures_openDirect(nullptr, U_ICU_VERSION_BUNDLE , status);
if (U_SUCCESS(*status)) {
ures_getVersionByKey(icudatares, U_ICU_DATA_KEY, dataVersionFillin, status);
}
diff --git a/contrib/libs/icu/common/icuplug.cpp b/contrib/libs/icu/common/icuplug.cpp
index 52a0deced6d..7aa70a506b0 100644
--- a/contrib/libs/icu/common/icuplug.cpp
+++ b/contrib/libs/icu/common/icuplug.cpp
@@ -52,15 +52,15 @@ struct UPlugData {
UPlugEntrypoint *entrypoint; /**< plugin entrypoint */
uint32_t structSize; /**< initialized to the size of this structure */
uint32_t token; /**< must be U_PLUG_TOKEN */
- void *lib; /**< plugin library, or NULL */
+ void *lib; /**< plugin library, or nullptr */
char libName[UPLUG_NAME_MAX]; /**< library name */
- char sym[UPLUG_NAME_MAX]; /**< plugin symbol, or NULL */
+ char sym[UPLUG_NAME_MAX]; /**< plugin symbol, or nullptr */
char config[UPLUG_NAME_MAX]; /**< configuration data */
void *context; /**< user context data */
char name[UPLUG_NAME_MAX]; /**< name of plugin */
UPlugLevel level; /**< level of plugin */
- UBool awaitingLoad; /**< TRUE if the plugin is awaiting a load call */
- UBool dontUnload; /**< TRUE if plugin must stay resident (leak plugin and lib) */
+ UBool awaitingLoad; /**< true if the plugin is awaiting a load call */
+ UBool dontUnload; /**< true if plugin must stay resident (leak plugin and lib) */
UErrorCode pluginStatus; /**< status code of plugin */
};
@@ -148,9 +148,9 @@ static int32_t searchForLibrary(void *lib) {
U_CAPI char * U_EXPORT2
uplug_findLibrary(void *lib, UErrorCode *status) {
int32_t libEnt;
- char *ret = NULL;
+ char *ret = nullptr;
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
libEnt = searchForLibrary(lib);
if(libEnt!=-1) {
@@ -164,9 +164,9 @@ uplug_findLibrary(void *lib, UErrorCode *status) {
U_CAPI void * U_EXPORT2
uplug_openLibrary(const char *libName, UErrorCode *status) {
int32_t libEntry = -1;
- void *lib = NULL;
+ void *lib = nullptr;
- if(U_FAILURE(*status)) return NULL;
+ if(U_FAILURE(*status)) return nullptr;
libEntry = searchForLibraryName(libName);
if(libEntry == -1) {
@@ -177,7 +177,7 @@ uplug_openLibrary(const char *libName, UErrorCode *status) {
#if UPLUG_TRACE
DBG((stderr, "uplug_openLibrary() - out of library slots (max %d)\n", libraryMax));
#endif
- return NULL;
+ return nullptr;
}
/* Some operating systems don't want
DL operations from multiple threads. */
@@ -186,9 +186,9 @@ uplug_openLibrary(const char *libName, UErrorCode *status) {
DBG((stderr, "uplug_openLibrary(%s,%s) libEntry %d, lib %p\n", libName, u_errorName(*status), libEntry, lib));
#endif
- if(libraryList[libEntry].lib == NULL || U_FAILURE(*status)) {
+ if(libraryList[libEntry].lib == nullptr || U_FAILURE(*status)) {
/* cleanup. */
- libraryList[libEntry].lib = NULL; /* failure with open */
+ libraryList[libEntry].lib = nullptr; /* failure with open */
libraryList[libEntry].name[0] = 0;
#if UPLUG_TRACE
DBG((stderr, "uplug_openLibrary(%s,%s) libEntry %d, lib %p\n", libName, u_errorName(*status), libEntry, lib));
@@ -252,14 +252,14 @@ static int32_t uplug_pluginNumber(UPlugData* d) {
U_CAPI UPlugData * U_EXPORT2
uplug_nextPlug(UPlugData *prior) {
- if(prior==NULL) {
+ if(prior==nullptr) {
return pluginList;
} else {
UPlugData *nextPlug = &prior[1];
UPlugData *pastPlug = &pluginList[pluginCount];
if(nextPlug>=pastPlug) {
- return NULL;
+ return nullptr;
} else {
return nextPlug;
}
@@ -273,7 +273,7 @@ uplug_nextPlug(UPlugData *prior) {
*/
static void uplug_callPlug(UPlugData *plug, UPlugReason reason, UErrorCode *status) {
UPlugTokenReturn token;
- if(plug==NULL||U_FAILURE(*status)) {
+ if(plug==nullptr||U_FAILURE(*status)) {
return;
}
token = (*(plug->entrypoint))(plug, reason, status);
@@ -304,11 +304,11 @@ static void uplug_queryPlug(UPlugData *plug, UErrorCode *status) {
if(U_SUCCESS(*status)) {
if(plug->level == UPLUG_LEVEL_INVALID) {
plug->pluginStatus = U_PLUGIN_DIDNT_SET_LEVEL;
- plug->awaitingLoad = FALSE;
+ plug->awaitingLoad = false;
}
} else {
plug->pluginStatus = U_INTERNAL_PROGRAM_ERROR;
- plug->awaitingLoad = FALSE;
+ plug->awaitingLoad = false;
}
}
@@ -322,7 +322,7 @@ static void uplug_loadPlug(UPlugData *plug, UErrorCode *status) {
return;
}
uplug_callPlug(plug, UPLUG_REASON_LOAD, status);
- plug->awaitingLoad = FALSE;
+ plug->awaitingLoad = false;
if(!U_SUCCESS(*status)) {
plug->pluginStatus = U_INTERNAL_PROGRAM_ERROR;
}
@@ -330,15 +330,15 @@ static void uplug_loadPlug(UPlugData *plug, UErrorCode *status) {
static UPlugData *uplug_allocateEmptyPlug(UErrorCode *status)
{
- UPlugData *plug = NULL;
+ UPlugData *plug = nullptr;
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if(pluginCount == UPLUG_PLUGIN_INITIAL_COUNT) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
plug = &pluginList[pluginCount++];
@@ -347,14 +347,14 @@ static UPlugData *uplug_allocateEmptyPlug(UErrorCode *status)
plug->structSize = sizeof(UPlugData);
plug->name[0]=0;
plug->level = UPLUG_LEVEL_UNKNOWN; /* initialize to null state */
- plug->awaitingLoad = TRUE;
- plug->dontUnload = FALSE;
+ plug->awaitingLoad = true;
+ plug->dontUnload = false;
plug->pluginStatus = U_ZERO_ERROR;
plug->libName[0] = 0;
plug->config[0]=0;
plug->sym[0]=0;
- plug->lib=NULL;
- plug->entrypoint=NULL;
+ plug->lib=nullptr;
+ plug->entrypoint=nullptr;
return plug;
@@ -364,16 +364,16 @@ static UPlugData *uplug_allocatePlug(UPlugEntrypoint *entrypoint, const char *co
UErrorCode *status) {
UPlugData *plug = uplug_allocateEmptyPlug(status);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if(config!=NULL) {
+ if(config!=nullptr) {
uprv_strncpy(plug->config, config, UPLUG_NAME_MAX);
} else {
plug->config[0] = 0;
}
- if(symName!=NULL) {
+ if(symName!=nullptr) {
uprv_strncpy(plug->sym, symName, UPLUG_NAME_MAX);
} else {
plug->sym[0] = 0;
@@ -393,7 +393,7 @@ static void uplug_deallocatePlug(UPlugData *plug, UErrorCode *status) {
uplug_closeLibrary(plug->lib, &subStatus);
#endif
}
- plug->lib = NULL;
+ plug->lib = nullptr;
if(U_SUCCESS(*status) && U_FAILURE(subStatus)) {
*status = subStatus;
}
@@ -403,14 +403,14 @@ static void uplug_deallocatePlug(UPlugData *plug, UErrorCode *status) {
pluginCount = uplug_removeEntryAt(pluginList, pluginCount, sizeof(plug[0]), uplug_pluginNumber(plug));
} else {
/* not ok- leave as a message. */
- plug->awaitingLoad=FALSE;
+ plug->awaitingLoad=false;
plug->entrypoint=0;
- plug->dontUnload=TRUE;
+ plug->dontUnload=true;
}
}
static void uplug_doUnloadPlug(UPlugData *plugToRemove, UErrorCode *status) {
- if(plugToRemove != NULL) {
+ if(plugToRemove != nullptr) {
uplug_unloadPlug(plugToRemove, status);
uplug_deallocatePlug(plugToRemove, status);
}
@@ -418,14 +418,14 @@ static void uplug_doUnloadPlug(UPlugData *plugToRemove, UErrorCode *status) {
U_CAPI void U_EXPORT2
uplug_removePlug(UPlugData *plug, UErrorCode *status) {
- UPlugData *cursor = NULL;
- UPlugData *plugToRemove = NULL;
+ UPlugData *cursor = nullptr;
+ UPlugData *plugToRemove = nullptr;
if(U_FAILURE(*status)) return;
- for(cursor=pluginList;cursor!=NULL;) {
+ for(cursor=pluginList;cursor!=nullptr;) {
if(cursor==plug) {
plugToRemove = plug;
- cursor=NULL;
+ cursor=nullptr;
} else {
cursor = uplug_nextPlug(cursor);
}
@@ -481,7 +481,7 @@ uplug_getLibraryName(UPlugData *data, UErrorCode *status) {
#if U_ENABLE_DYLOAD
return uplug_findLibrary(data->lib, status);
#else
- return NULL;
+ return nullptr;
#endif
}
}
@@ -510,7 +510,7 @@ uplug_getConfiguration(UPlugData *data) {
U_CAPI UPlugData* U_EXPORT2
uplug_getPlugInternal(int32_t n) {
if(n <0 || n >= pluginCount) {
- return NULL;
+ return nullptr;
} else {
return &(pluginList[n]);
}
@@ -530,7 +530,7 @@ uplug_getPlugLoadStatus(UPlugData *plug) {
*/
static UPlugData* uplug_initPlugFromEntrypointAndLibrary(UPlugEntrypoint *entrypoint, const char *config, void *lib, const char *sym,
UErrorCode *status) {
- UPlugData *plug = NULL;
+ UPlugData *plug = nullptr;
plug = uplug_allocatePlug(entrypoint, config, lib, sym, status);
@@ -538,13 +538,13 @@ static UPlugData* uplug_initPlugFromEntrypointAndLibrary(UPlugEntrypoint *entryp
return plug;
} else {
uplug_deallocatePlug(plug, status);
- return NULL;
+ return nullptr;
}
}
U_CAPI UPlugData* U_EXPORT2
uplug_loadPlugFromEntrypoint(UPlugEntrypoint *entrypoint, const char *config, UErrorCode *status) {
- UPlugData* plug = uplug_initPlugFromEntrypointAndLibrary(entrypoint, config, NULL, NULL, status);
+ UPlugData* plug = uplug_initPlugFromEntrypointAndLibrary(entrypoint, config, nullptr, nullptr, status);
uplug_loadPlug(plug, status);
return plug;
}
@@ -555,25 +555,25 @@ static UPlugData*
uplug_initErrorPlug(const char *libName, const char *sym, const char *config, const char *nameOrError, UErrorCode loadStatus, UErrorCode *status)
{
UPlugData *plug = uplug_allocateEmptyPlug(status);
- if(U_FAILURE(*status)) return NULL;
+ if(U_FAILURE(*status)) return nullptr;
plug->pluginStatus = loadStatus;
- plug->awaitingLoad = FALSE; /* Won't load. */
- plug->dontUnload = TRUE; /* cannot unload. */
+ plug->awaitingLoad = false; /* Won't load. */
+ plug->dontUnload = true; /* cannot unload. */
- if(sym!=NULL) {
+ if(sym!=nullptr) {
uprv_strncpy(plug->sym, sym, UPLUG_NAME_MAX);
}
- if(libName!=NULL) {
+ if(libName!=nullptr) {
uprv_strncpy(plug->libName, libName, UPLUG_NAME_MAX);
}
- if(nameOrError!=NULL) {
+ if(nameOrError!=nullptr) {
uprv_strncpy(plug->name, nameOrError, UPLUG_NAME_MAX);
}
- if(config!=NULL) {
+ if(config!=nullptr) {
uprv_strncpy(plug->config, config, UPLUG_NAME_MAX);
}
@@ -585,39 +585,39 @@ uplug_initErrorPlug(const char *libName, const char *sym, const char *config, co
*/
static UPlugData*
uplug_initPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status) {
- void *lib = NULL;
- UPlugData *plug = NULL;
- if(U_FAILURE(*status)) { return NULL; }
+ void *lib = nullptr;
+ UPlugData *plug = nullptr;
+ if(U_FAILURE(*status)) { return nullptr; }
lib = uplug_openLibrary(libName, status);
- if(lib!=NULL && U_SUCCESS(*status)) {
- UPlugEntrypoint *entrypoint = NULL;
+ if(lib!=nullptr && U_SUCCESS(*status)) {
+ UPlugEntrypoint *entrypoint = nullptr;
entrypoint = (UPlugEntrypoint*)uprv_dlsym_func(lib, sym, status);
- if(entrypoint!=NULL&&U_SUCCESS(*status)) {
+ if(entrypoint!=nullptr&&U_SUCCESS(*status)) {
plug = uplug_initPlugFromEntrypointAndLibrary(entrypoint, config, lib, sym, status);
- if(plug!=NULL&&U_SUCCESS(*status)) {
+ if(plug!=nullptr&&U_SUCCESS(*status)) {
plug->lib = lib; /* plug takes ownership of library */
- lib = NULL; /* library is now owned by plugin. */
+ lib = nullptr; /* library is now owned by plugin. */
}
} else {
UErrorCode subStatus = U_ZERO_ERROR;
- plug = uplug_initErrorPlug(libName,sym,config,"ERROR: Could not load entrypoint",(lib==NULL)?U_MISSING_RESOURCE_ERROR:*status,&subStatus);
+ plug = uplug_initErrorPlug(libName,sym,config,"ERROR: Could not load entrypoint",(lib==nullptr)?U_MISSING_RESOURCE_ERROR:*status,&subStatus);
}
- if(lib!=NULL) { /* still need to close the lib */
+ if(lib!=nullptr) { /* still need to close the lib */
UErrorCode subStatus = U_ZERO_ERROR;
uplug_closeLibrary(lib, &subStatus); /* don't care here */
}
} else {
UErrorCode subStatus = U_ZERO_ERROR;
- plug = uplug_initErrorPlug(libName,sym,config,"ERROR: could not load library",(lib==NULL)?U_MISSING_RESOURCE_ERROR:*status,&subStatus);
+ plug = uplug_initErrorPlug(libName,sym,config,"ERROR: could not load library",(lib==nullptr)?U_MISSING_RESOURCE_ERROR:*status,&subStatus);
}
return plug;
}
U_CAPI UPlugData* U_EXPORT2
uplug_loadPlugFromLibrary(const char *libName, const char *sym, const char *config, UErrorCode *status) {
- UPlugData *plug = NULL;
- if(U_FAILURE(*status)) { return NULL; }
+ UPlugData *plug = nullptr;
+ if(U_FAILURE(*status)) { return nullptr; }
plug = uplug_initPlugFromLibrary(libName, sym, config, status);
uplug_loadPlug(plug, status);
@@ -632,7 +632,7 @@ U_CAPI UPlugLevel U_EXPORT2 uplug_getCurrentLevel() {
return gCurrentLevel;
}
-static UBool U_CALLCONV uplug_cleanup(void)
+static UBool U_CALLCONV uplug_cleanup()
{
int32_t i;
@@ -646,7 +646,7 @@ static UBool U_CALLCONV uplug_cleanup(void)
}
/* close other held libs? */
gCurrentLevel = UPLUG_LEVEL_LOW;
- return TRUE;
+ return true;
}
#if U_ENABLE_DYLOAD
@@ -678,7 +678,7 @@ static void uplug_loadWaitingPlugs(UErrorCode *status) {
currentLevel = newLevel;
}
}
- pluginToLoad->awaitingLoad = FALSE;
+ pluginToLoad->awaitingLoad = false;
}
}
}
@@ -694,7 +694,7 @@ static void uplug_loadWaitingPlugs(UErrorCode *status) {
} else {
uplug_loadPlug(pluginToLoad, &subStatus);
}
- pluginToLoad->awaitingLoad = FALSE;
+ pluginToLoad->awaitingLoad = false;
}
}
@@ -712,7 +712,7 @@ uplug_getPluginFile() {
#if U_ENABLE_DYLOAD && !UCONFIG_NO_FILE_IO
return plugin_file;
#else
- return NULL;
+ return nullptr;
#endif
}
@@ -728,7 +728,7 @@ uplug_init(UErrorCode *status) {
const char *env = getenv("ICU_PLUGINS");
if(U_FAILURE(*status)) return;
- if(env != NULL) {
+ if(env != nullptr) {
plugin_dir.append(env, -1, *status);
}
if(U_FAILURE(*status)) return;
@@ -791,7 +791,7 @@ uplug_init(UErrorCode *status) {
#ifdef __MVS__
if (iscics()) /* 12 Nov 2011 JAM */
{
- f = NULL;
+ f = nullptr;
}
else
#endif
@@ -799,9 +799,9 @@ uplug_init(UErrorCode *status) {
f = fopen(pluginFile.data(), "r");
}
- if(f != NULL) {
+ if(f != nullptr) {
char linebuf[1024];
- char *p, *libName=NULL, *symName=NULL, *config=NULL;
+ char *p, *libName=nullptr, *symName=nullptr, *config=nullptr;
int32_t line = 0;
@@ -843,7 +843,7 @@ uplug_init(UErrorCode *status) {
}
/* chop whitespace at the end of the config */
- if(config!=NULL&&*config!=0) {
+ if(config!=nullptr&&*config!=0) {
p = config+strlen(config);
while(p>config&&isspace((int)*(--p))) {
*p=0;
diff --git a/contrib/libs/icu/common/loadednormalizer2impl.cpp b/contrib/libs/icu/common/loadednormalizer2impl.cpp
index 905fc1deccb..768564edc89 100644
--- a/contrib/libs/icu/common/loadednormalizer2impl.cpp
+++ b/contrib/libs/icu/common/loadednormalizer2impl.cpp
@@ -33,7 +33,7 @@ U_NAMESPACE_BEGIN
class LoadedNormalizer2Impl : public Normalizer2Impl {
public:
- LoadedNormalizer2Impl() : memory(NULL), ownedTrie(NULL) {}
+ LoadedNormalizer2Impl() : memory(nullptr), ownedTrie(nullptr) {}
virtual ~LoadedNormalizer2Impl();
void load(const char *packageName, const char *name, UErrorCode &errorCode);
@@ -67,9 +67,9 @@ LoadedNormalizer2Impl::isAcceptable(void * /*context*/,
) {
// Normalizer2Impl *me=(Normalizer2Impl *)context;
// uprv_memcpy(me->dataVersion, pInfo->dataVersion, 4);
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -93,7 +93,7 @@ LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCod
int32_t offset=inIndexes[IX_NORM_TRIE_OFFSET];
int32_t nextOffset=inIndexes[IX_EXTRA_DATA_OFFSET];
ownedTrie=ucptrie_openFromBinary(UCPTRIE_TYPE_FAST, UCPTRIE_VALUE_BITS_16,
- inBytes+offset, nextOffset-offset, NULL,
+ inBytes+offset, nextOffset-offset, nullptr,
&errorCode);
if(U_FAILURE(errorCode)) {
return;
@@ -117,12 +117,12 @@ Norm2AllModes::createInstance(const char *packageName,
const char *name,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
LoadedNormalizer2Impl *impl=new LoadedNormalizer2Impl;
- if(impl==NULL) {
+ if(impl==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
impl->load(packageName, name, errorCode);
return createInstance(impl, errorCode);
@@ -134,28 +134,28 @@ U_CDECL_END
#if !NORM2_HARDCODE_NFC_DATA
static Norm2AllModes *nfcSingleton;
-static icu::UInitOnce nfcInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce nfcInitOnce {};
#endif
static Norm2AllModes *nfkcSingleton;
-static icu::UInitOnce nfkcInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce nfkcInitOnce {};
static Norm2AllModes *nfkc_cfSingleton;
-static icu::UInitOnce nfkc_cfInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce nfkc_cfInitOnce {};
-static UHashtable *cache=NULL;
+static UHashtable *cache=nullptr;
// UInitOnce singleton initialization function
static void U_CALLCONV initSingletons(const char *what, UErrorCode &errorCode) {
#if !NORM2_HARDCODE_NFC_DATA
if (uprv_strcmp(what, "nfc") == 0) {
- nfcSingleton = Norm2AllModes::createInstance(NULL, "nfc", errorCode);
+ nfcSingleton = Norm2AllModes::createInstance(nullptr, "nfc", errorCode);
} else
#endif
if (uprv_strcmp(what, "nfkc") == 0) {
- nfkcSingleton = Norm2AllModes::createInstance(NULL, "nfkc", errorCode);
+ nfkcSingleton = Norm2AllModes::createInstance(nullptr, "nfkc", errorCode);
} else if (uprv_strcmp(what, "nfkc_cf") == 0) {
- nfkc_cfSingleton = Norm2AllModes::createInstance(NULL, "nfkc_cf", errorCode);
+ nfkc_cfSingleton = Norm2AllModes::createInstance(nullptr, "nfkc_cf", errorCode);
} else {
UPRV_UNREACHABLE_EXIT; // Unknown singleton
}
@@ -171,21 +171,21 @@ static void U_CALLCONV deleteNorm2AllModes(void *allModes) {
static UBool U_CALLCONV uprv_loaded_normalizer2_cleanup() {
#if !NORM2_HARDCODE_NFC_DATA
delete nfcSingleton;
- nfcSingleton = NULL;
+ nfcSingleton = nullptr;
nfcInitOnce.reset();
#endif
delete nfkcSingleton;
- nfkcSingleton = NULL;
+ nfkcSingleton = nullptr;
nfkcInitOnce.reset();
delete nfkc_cfSingleton;
- nfkc_cfSingleton = NULL;
+ nfkc_cfSingleton = nullptr;
nfkc_cfInitOnce.reset();
uhash_close(cache);
- cache=NULL;
- return TRUE;
+ cache=nullptr;
+ return true;
}
U_CDECL_END
@@ -193,7 +193,7 @@ U_CDECL_END
#if !NORM2_HARDCODE_NFC_DATA
const Norm2AllModes *
Norm2AllModes::getNFCInstance(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
return nfcSingleton;
}
@@ -201,14 +201,14 @@ Norm2AllModes::getNFCInstance(UErrorCode &errorCode) {
const Norm2AllModes *
Norm2AllModes::getNFKCInstance(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
umtx_initOnce(nfkcInitOnce, &initSingletons, "nfkc", errorCode);
return nfkcSingleton;
}
const Norm2AllModes *
Norm2AllModes::getNFKC_CFInstance(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
umtx_initOnce(nfkc_cfInitOnce, &initSingletons, "nfkc_cf", errorCode);
return nfkc_cfSingleton;
}
@@ -217,48 +217,48 @@ Norm2AllModes::getNFKC_CFInstance(UErrorCode &errorCode) {
const Normalizer2 *
Normalizer2::getNFCInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->comp : NULL;
+ return allModes!=nullptr ? &allModes->comp : nullptr;
}
const Normalizer2 *
Normalizer2::getNFDInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->decomp : NULL;
+ return allModes!=nullptr ? &allModes->decomp : nullptr;
}
const Normalizer2 *Normalizer2Factory::getFCDInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->fcd : NULL;
+ return allModes!=nullptr ? &allModes->fcd : nullptr;
}
const Normalizer2 *Normalizer2Factory::getFCCInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->fcc : NULL;
+ return allModes!=nullptr ? &allModes->fcc : nullptr;
}
const Normalizer2Impl *
Normalizer2Factory::getNFCImpl(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? allModes->impl : NULL;
+ return allModes!=nullptr ? allModes->impl : nullptr;
}
#endif
const Normalizer2 *
Normalizer2::getNFKCInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFKCInstance(errorCode);
- return allModes!=NULL ? &allModes->comp : NULL;
+ return allModes!=nullptr ? &allModes->comp : nullptr;
}
const Normalizer2 *
Normalizer2::getNFKDInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFKCInstance(errorCode);
- return allModes!=NULL ? &allModes->decomp : NULL;
+ return allModes!=nullptr ? &allModes->decomp : nullptr;
}
const Normalizer2 *
Normalizer2::getNFKCCasefoldInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFKC_CFInstance(errorCode);
- return allModes!=NULL ? &allModes->comp : NULL;
+ return allModes!=nullptr ? &allModes->comp : nullptr;
}
const Normalizer2 *
@@ -267,14 +267,14 @@ Normalizer2::getInstance(const char *packageName,
UNormalization2Mode mode,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
- if(name==NULL || *name==0) {
+ if(name==nullptr || *name==0) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- const Norm2AllModes *allModes=NULL;
- if(packageName==NULL) {
+ const Norm2AllModes *allModes=nullptr;
+ if(packageName==nullptr) {
if(0==uprv_strcmp(name, "nfc")) {
allModes=Norm2AllModes::getNFCInstance(errorCode);
} else if(0==uprv_strcmp(name, "nfkc")) {
@@ -283,34 +283,34 @@ Normalizer2::getInstance(const char *packageName,
allModes=Norm2AllModes::getNFKC_CFInstance(errorCode);
}
}
- if(allModes==NULL && U_SUCCESS(errorCode)) {
+ if(allModes==nullptr && U_SUCCESS(errorCode)) {
{
Mutex lock;
- if(cache!=NULL) {
+ if(cache!=nullptr) {
allModes=(Norm2AllModes *)uhash_get(cache, name);
}
}
- if(allModes==NULL) {
+ if(allModes==nullptr) {
ucln_common_registerCleanup(UCLN_COMMON_LOADED_NORMALIZER2, uprv_loaded_normalizer2_cleanup);
LocalPointer<Norm2AllModes> localAllModes(
Norm2AllModes::createInstance(packageName, name, errorCode));
if(U_SUCCESS(errorCode)) {
Mutex lock;
- if(cache==NULL) {
- cache=uhash_open(uhash_hashChars, uhash_compareChars, NULL, &errorCode);
+ if(cache==nullptr) {
+ cache=uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &errorCode);
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
uhash_setKeyDeleter(cache, uprv_free);
uhash_setValueDeleter(cache, deleteNorm2AllModes);
}
void *temp=uhash_get(cache, name);
- if(temp==NULL) {
+ if(temp==nullptr) {
int32_t keyLength= static_cast<int32_t>(uprv_strlen(name)+1);
char *nameCopy=(char *)uprv_malloc(keyLength);
- if(nameCopy==NULL) {
+ if(nameCopy==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(nameCopy, name, keyLength);
allModes=localAllModes.getAlias();
@@ -322,7 +322,7 @@ Normalizer2::getInstance(const char *packageName,
}
}
}
- if(allModes!=NULL && U_SUCCESS(errorCode)) {
+ if(allModes!=nullptr && U_SUCCESS(errorCode)) {
switch(mode) {
case UNORM2_COMPOSE:
return &allModes->comp;
@@ -336,13 +336,13 @@ Normalizer2::getInstance(const char *packageName,
break; // do nothing
}
}
- return NULL;
+ return nullptr;
}
const Normalizer2 *
Normalizer2Factory::getInstance(UNormalizationMode mode, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
switch(mode) {
case UNORM_NFD:
@@ -363,13 +363,13 @@ Normalizer2Factory::getInstance(UNormalizationMode mode, UErrorCode &errorCode)
const Normalizer2Impl *
Normalizer2Factory::getNFKCImpl(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFKCInstance(errorCode);
- return allModes!=NULL ? allModes->impl : NULL;
+ return allModes!=nullptr ? allModes->impl : nullptr;
}
const Normalizer2Impl *
Normalizer2Factory::getNFKC_CFImpl(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFKC_CFInstance(errorCode);
- return allModes!=NULL ? allModes->impl : NULL;
+ return allModes!=nullptr ? allModes->impl : nullptr;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/localebuilder.cpp b/contrib/libs/icu/common/localebuilder.cpp
index a5f201e8475..c1e1f2ad682 100644
--- a/contrib/libs/icu/common/localebuilder.cpp
+++ b/contrib/libs/icu/common/localebuilder.cpp
@@ -15,7 +15,7 @@ U_NAMESPACE_BEGIN
#define UPRV_ISDIGIT(c) (((c) >= '0') && ((c) <= '9'))
#define UPRV_ISALPHANUM(c) (uprv_isASCIILetter(c) || UPRV_ISDIGIT(c) )
-const char* kAttributeKey = "attribute";
+constexpr const char* kAttributeKey = "attribute";
static bool _isExtensionSubtags(char key, const char* s, int32_t len) {
switch (uprv_tolower(key)) {
@@ -459,7 +459,7 @@ Locale LocaleBuilder::build(UErrorCode& errorCode)
UBool LocaleBuilder::copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
// Do not overwrite the older error code
- return TRUE;
+ return true;
}
outErrorCode = status_;
return U_FAILURE(outErrorCode);
diff --git a/contrib/libs/icu/common/localefallback_data.h b/contrib/libs/icu/common/localefallback_data.h
new file mode 100644
index 00000000000..d2eb7eaafde
--- /dev/null
+++ b/contrib/libs/icu/common/localefallback_data.h
@@ -0,0 +1,1350 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+//
+// Internal static data tables used by uresbund.cpp
+// WARNING: This file is mechanically generated by the CLDR-to-ICU tool
+// (see tools/cldr/cldr-to-icu/src/main/java/org/unicode/tool/cldrtoicu/generator/ResourcFallbackCodeGenerator.java).
+// DO NOT HAND EDIT!!!
+
+#ifdef INCLUDED_FROM_URESBUND_CPP
+
+//======================================================================
+// Default script table
+const char scriptCodeChars[] =
+ "Aghb\0Ahom\0Arab\0Armi\0Armn\0Avst\0Bamu\0Bass\0Batk\0Beng\0Bopo\0"
+ "Brah\0Cakm\0Cans\0Cari\0Cham\0Cher\0Chrs\0Copt\0Cprt\0Cyrl\0Deva\0"
+ "Egyp\0Elym\0Ethi\0Geor\0Gong\0Gonm\0Goth\0Gran\0Grek\0Gujr\0Guru\0"
+ "Hang\0Hani\0Hans\0Hant\0Hebr\0Hluw\0Hmnp\0Ital\0Java\0Jpan\0Kali\0"
+ "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";
+
+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"
+ "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"
+ "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";
+
+const int32_t defaultScriptTable[] = {
+ 0, 320, // aaf -> Mlym
+ 4, 10, // aao -> Arab
+ 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
+};
+
+//======================================================================
+// Parent locale table
+const char parentLocaleChars[] =
+ "az_Arab\0az_Cyrl\0bal_Latn\0blt_Latn\0bm_Nkoo\0bs_Cyrl\0byn_Latn\0"
+ "cu_Glag\0dje_Arab\0dyo_Arab\0en_001\0en_150\0en_AG\0en_AI\0en_AT\0"
+ "en_AU\0en_BB\0en_BE\0en_BM\0en_BS\0en_BW\0en_BZ\0en_CC\0en_CH\0"
+ "en_CK\0en_CM\0en_CX\0en_CY\0en_DE\0en_DG\0en_DK\0en_DM\0en_Dsrt\0"
+ "en_ER\0en_FI\0en_FJ\0en_FK\0en_FM\0en_GB\0en_GD\0en_GG\0en_GH\0"
+ "en_GI\0en_GM\0en_GY\0en_HK\0en_IE\0en_IL\0en_IM\0en_IN\0en_IO\0"
+ "en_JE\0en_JM\0en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0en_LS\0"
+ "en_MG\0en_MO\0en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0en_MY\0en_NA\0"
+ "en_NF\0en_NG\0en_NL\0en_NR\0en_NU\0en_NZ\0en_PG\0en_PK\0en_PN\0"
+ "en_PW\0en_RW\0en_SB\0en_SC\0en_SD\0en_SE\0en_SG\0en_SH\0en_SI\0"
+ "en_SL\0en_SS\0en_SX\0en_SZ\0en_Shaw\0en_TC\0en_TK\0en_TO\0en_TT\0"
+ "en_TV\0en_TZ\0en_UG\0en_VC\0en_VG\0en_VU\0en_WS\0en_ZA\0en_ZM\0"
+ "en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0es_CR\0"
+ "es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_MX\0es_NI\0es_PA\0es_PE\0"
+ "es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0ff_Arab\0fr_HT\0"
+ "ha_Arab\0hi_Latn\0ht\0iu_Latn\0kk_Arab\0ks_Deva\0ku_Arab\0ky_Arab\0"
+ "ky_Latn\0ml_Arab\0mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\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";
+
+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
+ 92, 85, // en_150 -> en_001
+ 99, 85, // en_AG -> en_001
+ 105, 85, // en_AI -> en_001
+ 111, 92, // en_AT -> en_150
+ 117, 85, // en_AU -> en_001
+ 123, 85, // en_BB -> en_001
+ 129, 92, // en_BE -> en_150
+ 135, 85, // en_BM -> en_001
+ 141, 85, // en_BS -> en_001
+ 147, 85, // en_BW -> en_001
+ 153, 85, // en_BZ -> en_001
+ 159, 85, // en_CC -> en_001
+ 165, 92, // en_CH -> en_150
+ 171, 85, // en_CK -> en_001
+ 177, 85, // en_CM -> en_001
+ 183, 85, // en_CX -> en_001
+ 189, 85, // en_CY -> en_001
+ 195, 92, // en_DE -> en_150
+ 201, 85, // en_DG -> en_001
+ 207, 92, // en_DK -> en_150
+ 213, 85, // en_DM -> en_001
+ 219, 1023, // en_Dsrt -> root
+ 227, 85, // en_ER -> en_001
+ 233, 92, // en_FI -> en_150
+ 239, 85, // en_FJ -> en_001
+ 245, 85, // en_FK -> en_001
+ 251, 85, // en_FM -> en_001
+ 257, 85, // en_GB -> en_001
+ 263, 85, // en_GD -> en_001
+ 269, 85, // en_GG -> en_001
+ 275, 85, // en_GH -> en_001
+ 281, 85, // en_GI -> en_001
+ 287, 85, // en_GM -> en_001
+ 293, 85, // en_GY -> en_001
+ 299, 85, // en_HK -> en_001
+ 305, 85, // en_IE -> en_001
+ 311, 85, // en_IL -> en_001
+ 317, 85, // en_IM -> en_001
+ 323, 85, // en_IN -> en_001
+ 329, 85, // en_IO -> en_001
+ 335, 85, // en_JE -> en_001
+ 341, 85, // en_JM -> en_001
+ 347, 85, // en_KE -> en_001
+ 353, 85, // en_KI -> en_001
+ 359, 85, // en_KN -> en_001
+ 365, 85, // en_KY -> en_001
+ 371, 85, // en_LC -> en_001
+ 377, 85, // en_LR -> en_001
+ 383, 85, // en_LS -> en_001
+ 389, 85, // en_MG -> en_001
+ 395, 85, // en_MO -> en_001
+ 401, 85, // en_MS -> en_001
+ 407, 85, // en_MT -> en_001
+ 413, 85, // en_MU -> en_001
+ 419, 85, // en_MV -> en_001
+ 425, 85, // en_MW -> en_001
+ 431, 85, // en_MY -> en_001
+ 437, 85, // en_NA -> en_001
+ 443, 85, // en_NF -> en_001
+ 449, 85, // en_NG -> en_001
+ 455, 92, // en_NL -> en_150
+ 461, 85, // en_NR -> en_001
+ 467, 85, // en_NU -> en_001
+ 473, 85, // en_NZ -> en_001
+ 479, 85, // en_PG -> en_001
+ 485, 85, // en_PK -> en_001
+ 491, 85, // en_PN -> en_001
+ 497, 85, // en_PW -> en_001
+ 503, 85, // en_RW -> en_001
+ 509, 85, // en_SB -> en_001
+ 515, 85, // en_SC -> en_001
+ 521, 85, // en_SD -> en_001
+ 527, 92, // en_SE -> en_150
+ 533, 85, // en_SG -> en_001
+ 539, 85, // en_SH -> en_001
+ 545, 92, // en_SI -> en_150
+ 551, 85, // en_SL -> en_001
+ 557, 85, // en_SS -> en_001
+ 563, 85, // en_SX -> en_001
+ 569, 85, // en_SZ -> en_001
+ 575, 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
+};
+
+
+#endif // INCLUDED_FROM_URESBUND_CPP
diff --git a/contrib/libs/icu/common/localematcher.cpp b/contrib/libs/icu/common/localematcher.cpp
index 3d178dfbaf1..5f8c703df71 100644
--- a/contrib/libs/icu/common/localematcher.cpp
+++ b/contrib/libs/icu/common/localematcher.cpp
@@ -51,7 +51,7 @@ typedef enum ULocMatchLifetime ULocMatchLifetime;
U_NAMESPACE_BEGIN
-LocaleMatcher::Result::Result(LocaleMatcher::Result &&src) U_NOEXCEPT :
+LocaleMatcher::Result::Result(LocaleMatcher::Result &&src) noexcept :
desiredLocale(src.desiredLocale),
supportedLocale(src.supportedLocale),
desiredIndex(src.desiredIndex),
@@ -60,7 +60,7 @@ LocaleMatcher::Result::Result(LocaleMatcher::Result &&src) U_NOEXCEPT :
if (desiredIsOwned) {
src.desiredLocale = nullptr;
src.desiredIndex = -1;
- src.desiredIsOwned = FALSE;
+ src.desiredIsOwned = false;
}
}
@@ -70,7 +70,7 @@ LocaleMatcher::Result::~Result() {
}
}
-LocaleMatcher::Result &LocaleMatcher::Result::operator=(LocaleMatcher::Result &&src) U_NOEXCEPT {
+LocaleMatcher::Result &LocaleMatcher::Result::operator=(LocaleMatcher::Result &&src) noexcept {
this->~Result();
desiredLocale = src.desiredLocale;
@@ -82,7 +82,7 @@ LocaleMatcher::Result &LocaleMatcher::Result::operator=(LocaleMatcher::Result &&
if (desiredIsOwned) {
src.desiredLocale = nullptr;
src.desiredIndex = -1;
- src.desiredIsOwned = FALSE;
+ src.desiredIsOwned = false;
}
return *this;
}
@@ -122,7 +122,7 @@ Locale LocaleMatcher::Result::makeResolvedLocale(UErrorCode &errorCode) const {
return b.build(errorCode);
}
-LocaleMatcher::Builder::Builder(LocaleMatcher::Builder &&src) U_NOEXCEPT :
+LocaleMatcher::Builder::Builder(LocaleMatcher::Builder &&src) noexcept :
errorCode_(src.errorCode_),
supportedLocales_(src.supportedLocales_),
thresholdDistance_(src.thresholdDistance_),
@@ -142,7 +142,7 @@ LocaleMatcher::Builder::~Builder() {
delete maxDistanceSupported_;
}
-LocaleMatcher::Builder &LocaleMatcher::Builder::operator=(LocaleMatcher::Builder &&src) U_NOEXCEPT {
+LocaleMatcher::Builder &LocaleMatcher::Builder::operator=(LocaleMatcher::Builder &&src) noexcept {
this->~Builder();
errorCode_ = src.errorCode_;
@@ -168,12 +168,9 @@ void LocaleMatcher::Builder::clearSupportedLocales() {
bool LocaleMatcher::Builder::ensureSupportedLocaleVector() {
if (U_FAILURE(errorCode_)) { return false; }
if (supportedLocales_ != nullptr) { return true; }
- supportedLocales_ = new UVector(uprv_deleteUObject, nullptr, errorCode_);
+ LocalPointer<UVector> lpSupportedLocales(new UVector(uprv_deleteUObject, nullptr, errorCode_), errorCode_);
if (U_FAILURE(errorCode_)) { return false; }
- if (supportedLocales_ == nullptr) {
- errorCode_ = U_MEMORY_ALLOCATION_ERROR;
- return false;
- }
+ supportedLocales_ = lpSupportedLocales.orphan();
return true;
}
@@ -187,9 +184,8 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::setSupportedLocalesFromListStrin
for (int32_t i = 0; i < length; ++i) {
Locale *locale = list.orphanLocaleAt(i);
if (locale == nullptr) { continue; }
- supportedLocales_->addElementX(locale, errorCode_);
+ supportedLocales_->adoptElement(locale, errorCode_);
if (U_FAILURE(errorCode_)) {
- delete locale;
break;
}
}
@@ -197,35 +193,21 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::setSupportedLocalesFromListStrin
}
LocaleMatcher::Builder &LocaleMatcher::Builder::setSupportedLocales(Locale::Iterator &locales) {
- if (U_FAILURE(errorCode_)) { return *this; }
- clearSupportedLocales();
- if (!ensureSupportedLocaleVector()) { return *this; }
- while (locales.hasNext()) {
- const Locale &locale = locales.next();
- Locale *clone = locale.clone();
- if (clone == nullptr) {
- errorCode_ = U_MEMORY_ALLOCATION_ERROR;
- break;
- }
- supportedLocales_->addElementX(clone, errorCode_);
- if (U_FAILURE(errorCode_)) {
- delete clone;
- break;
+ if (ensureSupportedLocaleVector()) {
+ clearSupportedLocales();
+ while (locales.hasNext() && U_SUCCESS(errorCode_)) {
+ const Locale &locale = locales.next();
+ LocalPointer<Locale> clone (locale.clone(), errorCode_);
+ supportedLocales_->adoptElement(clone.orphan(), errorCode_);
}
}
return *this;
}
LocaleMatcher::Builder &LocaleMatcher::Builder::addSupportedLocale(const Locale &locale) {
- if (!ensureSupportedLocaleVector()) { return *this; }
- Locale *clone = locale.clone();
- if (clone == nullptr) {
- errorCode_ = U_MEMORY_ALLOCATION_ERROR;
- return *this;
- }
- supportedLocales_->addElementX(clone, errorCode_);
- if (U_FAILURE(errorCode_)) {
- delete clone;
+ if (ensureSupportedLocaleVector()) {
+ LocalPointer<Locale> clone(locale.clone(), errorCode_);
+ supportedLocales_->adoptElement(clone.orphan(), errorCode_);
}
return *this;
}
@@ -305,10 +287,10 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::internalSetThresholdDistance(int
#endif
UBool LocaleMatcher::Builder::copyErrorTo(UErrorCode &outErrorCode) const {
- if (U_FAILURE(outErrorCode)) { return TRUE; }
- if (U_SUCCESS(errorCode_)) { return FALSE; }
+ if (U_FAILURE(outErrorCode)) { return true; }
+ if (U_SUCCESS(errorCode_)) { return false; }
outErrorCode = errorCode_;
- return TRUE;
+ return true;
}
LocaleMatcher LocaleMatcher::Builder::build(UErrorCode &errorCode) const {
@@ -501,7 +483,7 @@ LocaleMatcher::LocaleMatcher(const Builder &builder, UErrorCode &errorCode) :
}
}
-LocaleMatcher::LocaleMatcher(LocaleMatcher &&src) U_NOEXCEPT :
+LocaleMatcher::LocaleMatcher(LocaleMatcher &&src) noexcept :
likelySubtags(src.likelySubtags),
localeDistance(src.localeDistance),
thresholdDistance(src.thresholdDistance),
@@ -538,7 +520,7 @@ LocaleMatcher::~LocaleMatcher() {
delete ownedDefaultLocale;
}
-LocaleMatcher &LocaleMatcher::operator=(LocaleMatcher &&src) U_NOEXCEPT {
+LocaleMatcher &LocaleMatcher::operator=(LocaleMatcher &&src) noexcept {
this->~LocaleMatcher();
thresholdDistance = src.thresholdDistance;
@@ -650,30 +632,30 @@ const Locale *LocaleMatcher::getBestMatchForListString(
LocaleMatcher::Result LocaleMatcher::getBestMatchResult(
const Locale &desiredLocale, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode)) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
}
int32_t suppIndex = getBestSuppIndex(
getMaximalLsrOrUnd(likelySubtags, desiredLocale, errorCode),
nullptr, errorCode);
if (U_FAILURE(errorCode) || suppIndex < 0) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
} else {
- return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, FALSE);
+ return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, false);
}
}
LocaleMatcher::Result LocaleMatcher::getBestMatchResult(
Locale::Iterator &desiredLocales, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode) || !desiredLocales.hasNext()) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
}
LocaleLsrIterator lsrIter(likelySubtags, desiredLocales, ULOCMATCH_TEMPORARY_LOCALES);
int32_t suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode);
if (U_FAILURE(errorCode) || suppIndex < 0) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
} else {
return Result(lsrIter.orphanRemembered(), supportedLocales[suppIndex],
- lsrIter.getBestDesiredIndex(), suppIndex, TRUE);
+ lsrIter.getBestDesiredIndex(), suppIndex, true);
}
}
diff --git a/contrib/libs/icu/common/localeprioritylist.cpp b/contrib/libs/icu/common/localeprioritylist.cpp
index 4455eedb75e..e5ba0a3c777 100644
--- a/contrib/libs/icu/common/localeprioritylist.cpp
+++ b/contrib/libs/icu/common/localeprioritylist.cpp
@@ -234,7 +234,7 @@ void LocalePriorityList::sort(UErrorCode &errorCode) {
// The comparator forces a stable sort via the item index.
if (U_FAILURE(errorCode) || getLength() <= 1 || !hasWeights) { return; }
uprv_sortArray(list->array.getAlias(), listLength, sizeof(LocaleAndWeight),
- compareLocaleAndWeight, nullptr, FALSE, &errorCode);
+ compareLocaleAndWeight, nullptr, false, &errorCode);
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/locavailable.cpp b/contrib/libs/icu/common/locavailable.cpp
index e8ec512e370..0ea20939888 100644
--- a/contrib/libs/icu/common/locavailable.cpp
+++ b/contrib/libs/icu/common/locavailable.cpp
@@ -35,26 +35,26 @@
U_NAMESPACE_BEGIN
-static icu::Locale* availableLocaleList = NULL;
+static icu::Locale* availableLocaleList = nullptr;
static int32_t availableLocaleListCount;
-static icu::UInitOnce gInitOnceLocale = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gInitOnceLocale {};
U_NAMESPACE_END
U_CDECL_BEGIN
-static UBool U_CALLCONV locale_available_cleanup(void)
+static UBool U_CALLCONV locale_available_cleanup()
{
U_NAMESPACE_USE
if (availableLocaleList) {
delete []availableLocaleList;
- availableLocaleList = NULL;
+ availableLocaleList = nullptr;
}
availableLocaleListCount = 0;
gInitOnceLocale.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -71,7 +71,7 @@ void U_CALLCONV locale_available_init() {
if(availableLocaleListCount) {
availableLocaleList = new Locale[availableLocaleListCount];
}
- if (availableLocaleList == NULL) {
+ if (availableLocaleList == nullptr) {
availableLocaleListCount= 0;
}
for (int32_t locCount=availableLocaleListCount-1; locCount>=0; --locCount) {
@@ -102,11 +102,11 @@ namespace {
// Enough capacity for the two lists in the res_index.res file
const char** gAvailableLocaleNames[2] = {};
int32_t gAvailableLocaleCounts[2] = {};
-icu::UInitOnce ginstalledLocalesInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce ginstalledLocalesInitOnce {};
class AvailableLocalesSink : public ResourceSink {
public:
- void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE {
+ void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override {
ResourceTable resIndexTable = value.getTable(status);
if (U_FAILURE(status)) {
return;
@@ -196,14 +196,14 @@ class AvailableLocalesStringEnumeration : public StringEnumeration {
/* ### Get available **************************************************/
-static UBool U_CALLCONV uloc_cleanup(void) {
+static UBool U_CALLCONV uloc_cleanup() {
for (int32_t i = 0; i < UPRV_LENGTHOF(gAvailableLocaleNames); i++) {
uprv_free(gAvailableLocaleNames[i]);
gAvailableLocaleNames[i] = nullptr;
gAvailableLocaleCounts[i] = 0;
}
ginstalledLocalesInitOnce.reset();
- return TRUE;
+ return true;
}
// Load Installed Locales. This function will be called exactly once
@@ -212,7 +212,7 @@ static UBool U_CALLCONV uloc_cleanup(void) {
static void U_CALLCONV loadInstalledLocales(UErrorCode& status) {
ucln_common_registerCleanup(UCLN_COMMON_ULOC, uloc_cleanup);
- icu::LocalUResourceBundlePointer rb(ures_openDirect(NULL, "res_index", &status));
+ icu::LocalUResourceBundlePointer rb(ures_openDirect(nullptr, "res_index", &status));
AvailableLocalesSink sink;
ures_getAllItemsWithFallback(rb.getAlias(), "", sink, status);
}
diff --git a/contrib/libs/icu/common/locbased.cpp b/contrib/libs/icu/common/locbased.cpp
index ff378b4cc78..adcf2f843c0 100644
--- a/contrib/libs/icu/common/locbased.cpp
+++ b/contrib/libs/icu/common/locbased.cpp
@@ -22,7 +22,7 @@ Locale LocaleBased::getLocale(ULocDataLocaleType type, UErrorCode& status) const
const char* LocaleBased::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
switch(type) {
@@ -32,7 +32,7 @@ const char* LocaleBased::getLocaleID(ULocDataLocaleType type, UErrorCode& status
return actual;
default:
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
}
diff --git a/contrib/libs/icu/common/locdispnames.cpp b/contrib/libs/icu/common/locdispnames.cpp
index c512a0164c2..3ec1b81c812 100644
--- a/contrib/libs/icu/common/locdispnames.cpp
+++ b/contrib/libs/icu/common/locdispnames.cpp
@@ -55,7 +55,7 @@ Locale::getDisplayLanguage(UnicodeString& dispLang) const
UnicodeString&
Locale::getDisplayLanguage(const Locale &displayLocale,
UnicodeString &result) const {
- UChar *buffer;
+ char16_t *buffer;
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length;
@@ -95,7 +95,7 @@ Locale::getDisplayScript(UnicodeString& dispScript) const
UnicodeString&
Locale::getDisplayScript(const Locale &displayLocale,
UnicodeString &result) const {
- UChar *buffer;
+ char16_t *buffer;
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length;
@@ -135,7 +135,7 @@ Locale::getDisplayCountry(UnicodeString& dispCntry) const
UnicodeString&
Locale::getDisplayCountry(const Locale &displayLocale,
UnicodeString &result) const {
- UChar *buffer;
+ char16_t *buffer;
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length;
@@ -175,7 +175,7 @@ Locale::getDisplayVariant(UnicodeString& dispVar) const
UnicodeString&
Locale::getDisplayVariant(const Locale &displayLocale,
UnicodeString &result) const {
- UChar *buffer;
+ char16_t *buffer;
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length;
@@ -215,7 +215,7 @@ Locale::getDisplayName( UnicodeString& name ) const
UnicodeString&
Locale::getDisplayName(const Locale &displayLocale,
UnicodeString &result) const {
- UChar *buffer;
+ char16_t *buffer;
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length;
@@ -302,12 +302,12 @@ _getStringOrCopyKey(const char *path, const char *locale,
const char* subTableKey,
const char *itemKey,
const char *substitute,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
- const UChar *s = NULL;
+ const char16_t *s = nullptr;
int32_t length = 0;
- if(itemKey==NULL) {
+ if(itemKey==nullptr) {
/* top-level item: normal resource bundle access */
icu::LocalUResourceBundlePointer rb(ures_open(path, locale, pErrorCode));
@@ -318,7 +318,7 @@ _getStringOrCopyKey(const char *path, const char *locale,
} 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, NULL, 10)) {
+ if (isLanguageCode && uprv_strtol(itemKey, nullptr, 10)) {
*pErrorCode = U_MISSING_RESOURCE_ERROR;
} else {
/* second-level item, use special fallback */
@@ -344,7 +344,7 @@ _getStringOrCopyKey(const char *path, const char *locale,
if(U_SUCCESS(*pErrorCode)) {
int32_t copyLength=uprv_min(length, destCapacity);
- if(copyLength>0 && s != NULL) {
+ if(copyLength>0 && s != nullptr) {
u_memcpy(dest, s, copyLength);
}
} else {
@@ -362,21 +362,21 @@ typedef int32_t U_CALLCONV UDisplayNameGetter(const char *, char *, int32_t, UE
static int32_t
_getDisplayNameForComponent(const char *locale,
const char *displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UDisplayNameGetter *getter,
const char *tag,
UErrorCode *pErrorCode) {
char localeBuffer[ULOC_FULLNAME_CAPACITY*4];
int32_t length;
UErrorCode localStatus;
- const char* root = NULL;
+ const char* root = nullptr;
/* argument checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (destCapacity>0 && dest==NULL)) {
+ if(destCapacity<0 || (destCapacity>0 && dest==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -399,7 +399,7 @@ _getDisplayNameForComponent(const char *locale,
root = tag == _kCountries ? U_ICUDATA_REGION : U_ICUDATA_LANG;
return _getStringOrCopyKey(root, displayLocale,
- tag, NULL, localeBuffer,
+ tag, nullptr, localeBuffer,
localeBuffer,
dest, destCapacity,
pErrorCode);
@@ -408,7 +408,7 @@ _getDisplayNameForComponent(const char *locale,
U_CAPI int32_t U_EXPORT2
uloc_getDisplayLanguage(const char *locale,
const char *displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity,
uloc_getLanguage, _kLanguages, pErrorCode);
@@ -417,7 +417,7 @@ uloc_getDisplayLanguage(const char *locale,
U_CAPI int32_t U_EXPORT2
uloc_getDisplayScript(const char* locale,
const char* displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode)
{
UErrorCode err = U_ZERO_ERROR;
@@ -442,7 +442,7 @@ uloc_getDisplayScript(const char* locale,
static int32_t
uloc_getDisplayScriptInContext(const char* locale,
const char* displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode)
{
return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity,
@@ -452,7 +452,7 @@ uloc_getDisplayScriptInContext(const char* locale,
U_CAPI int32_t U_EXPORT2
uloc_getDisplayCountry(const char *locale,
const char *displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity,
uloc_getCountry, _kCountries, pErrorCode);
@@ -466,7 +466,7 @@ uloc_getDisplayCountry(const char *locale,
U_CAPI int32_t U_EXPORT2
uloc_getDisplayVariant(const char *locale,
const char *displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
return _getDisplayNameForComponent(locale, displayLocale, dest, destCapacity,
uloc_getVariant, _kVariants, pErrorCode);
@@ -487,14 +487,14 @@ uloc_getDisplayVariant(const char *locale,
U_CAPI int32_t U_EXPORT2
uloc_getDisplayName(const char *locale,
const char *displayLocale,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode)
{
- static const UChar defaultSeparator[9] = { 0x007b, 0x0030, 0x007d, 0x002c, 0x0020, 0x007b, 0x0031, 0x007d, 0x0000 }; /* "{0}, {1}" */
- static const UChar sub0[4] = { 0x007b, 0x0030, 0x007d , 0x0000 } ; /* {0} */
- static const UChar sub1[4] = { 0x007b, 0x0031, 0x007d , 0x0000 } ; /* {1} */
+ static const char16_t defaultSeparator[9] = { 0x007b, 0x0030, 0x007d, 0x002c, 0x0020, 0x007b, 0x0031, 0x007d, 0x0000 }; /* "{0}, {1}" */
+ static const char16_t sub0[4] = { 0x007b, 0x0030, 0x007d , 0x0000 } ; /* {0} */
+ static const char16_t sub1[4] = { 0x007b, 0x0031, 0x007d , 0x0000 } ; /* {1} */
static const int32_t subLen = 3;
- static const UChar defaultPattern[10] = {
+ static const char16_t defaultPattern[10] = {
0x007b, 0x0030, 0x007d, 0x0020, 0x0028, 0x007b, 0x0031, 0x007d, 0x0029, 0x0000
}; /* {0} ({1}) */
static const int32_t defaultPatLen = 9;
@@ -503,30 +503,30 @@ uloc_getDisplayName(const char *locale,
int32_t length; /* of formatted result */
- const UChar *separator;
+ const char16_t *separator;
int32_t sepLen = 0;
- const UChar *pattern;
+ const char16_t *pattern;
int32_t patLen = 0;
int32_t sub0Pos, sub1Pos;
- UChar formatOpenParen = 0x0028; // (
- UChar formatReplaceOpenParen = 0x005B; // [
- UChar formatCloseParen = 0x0029; // )
- UChar formatReplaceCloseParen = 0x005D; // ]
+ char16_t formatOpenParen = 0x0028; // (
+ char16_t formatReplaceOpenParen = 0x005B; // [
+ char16_t formatCloseParen = 0x0029; // )
+ char16_t formatReplaceCloseParen = 0x005D; // ]
- UBool haveLang = TRUE; /* assume true, set false if we find we don't have
+ UBool haveLang = true; /* assume true, set false if we find we don't have
a lang component in the locale */
- UBool haveRest = TRUE; /* assume true, set false if we find we don't have
+ UBool haveRest = true; /* assume true, set false if we find we don't have
any other component in the locale */
- UBool retry = FALSE; /* set true if we need to retry, see below */
+ UBool retry = false; /* set true if we need to retry, see below */
int32_t langi = 0; /* index of the language substitution (0 or 1), virtually always 0 */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (destCapacity>0 && dest==NULL)) {
+ if(destCapacity<0 || (destCapacity>0 && dest==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -537,7 +537,7 @@ uloc_getDisplayName(const char *locale,
icu::LocalUResourceBundlePointer locbundle(
ures_open(U_ICUDATA_LANG, displayLocale, &status));
icu::LocalUResourceBundlePointer dspbundle(
- ures_getByKeyWithFallback(locbundle.getAlias(), _kLocaleDisplayPattern, NULL, &status));
+ ures_getByKeyWithFallback(locbundle.getAlias(), _kLocaleDisplayPattern, nullptr, &status));
separator=ures_getStringByKeyWithFallback(dspbundle.getAlias(), _kSeparator, &sepLen, &status);
pattern=ures_getStringByKeyWithFallback(dspbundle.getAlias(), _kPattern, &patLen, &status);
@@ -557,13 +557,13 @@ uloc_getDisplayName(const char *locale,
* This is similar to how pattern is handled below.
*/
{
- UChar *p0=u_strstr(separator, sub0);
- UChar *p1=u_strstr(separator, sub1);
- if (p0==NULL || p1==NULL || p1<p0) {
+ char16_t *p0=u_strstr(separator, sub0);
+ char16_t *p1=u_strstr(separator, sub1);
+ if (p0==nullptr || p1==nullptr || p1<p0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- separator = (const UChar *)p0 + subLen;
+ separator = (const char16_t *)p0 + subLen;
sepLen = static_cast<int32_t>(p1 - separator);
}
@@ -574,9 +574,9 @@ uloc_getDisplayName(const char *locale,
sub1Pos=defaultSub1Pos;
// use default formatOpenParen etc. set above
} else { /* non-default pattern */
- UChar *p0=u_strstr(pattern, sub0);
- UChar *p1=u_strstr(pattern, sub1);
- if (p0==NULL || p1==NULL) {
+ char16_t *p0=u_strstr(pattern, sub0);
+ char16_t *p1=u_strstr(pattern, sub1);
+ if (p0==nullptr || p1==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -586,7 +586,7 @@ uloc_getDisplayName(const char *locale,
int32_t t=sub0Pos; sub0Pos=sub1Pos; sub1Pos=t;
langi=1;
}
- if (u_strchr(pattern, 0xFF08) != NULL) {
+ if (u_strchr(pattern, 0xFF08) != nullptr) {
formatOpenParen = 0xFF08; // fullwidth (
formatReplaceOpenParen = 0xFF3B; // fullwidth [
formatCloseParen = 0xFF09; // fullwidth )
@@ -602,7 +602,7 @@ uloc_getDisplayName(const char *locale,
* adjust the parameters so padding is not added, and repeat.
*/
do {
- UChar* p=dest;
+ char16_t* p=dest;
int32_t patPos=0; /* position in the pattern, used for non-substitution portions */
int32_t langLen=0; /* length of language substitution */
int32_t langPos=0; /* position in output of language substitution */
@@ -625,7 +625,7 @@ uloc_getDisplayName(const char *locale,
}
for(int32_t subi=0,resti=0;subi<2;) { /* iterate through patterns 0 and 1*/
- UBool subdone = FALSE; /* set true when ready to move to next substitution */
+ UBool subdone = false; /* set true when ready to move to next substitution */
/* prep p and cap for calls to get display components, pin cap to 0 since
they complain if cap is negative */
@@ -643,10 +643,10 @@ uloc_getDisplayName(const char *locale,
length+=langLen;
haveLang=langLen>0;
}
- subdone=TRUE;
+ subdone=true;
} else { /* {1} */
if(!haveRest) {
- subdone=TRUE;
+ subdone=true;
} else {
int32_t len; /* length of component (plus other stuff) we just fetched */
switch(resti++) {
@@ -665,9 +665,9 @@ uloc_getDisplayName(const char *locale,
U_FALLTHROUGH;
default: {
const char* kw=uenum_next(kenum.getAlias(), &len, pErrorCode);
- if (kw == NULL) {
+ if (kw == nullptr) {
len=0; /* mark that we didn't add a component */
- subdone=TRUE;
+ subdone=true;
} else {
/* incorporating this behavior into the loop made it even more complex,
so just special case it here */
@@ -712,7 +712,7 @@ uloc_getDisplayName(const char *locale,
if (len>0) {
/* we added a component, so add separator and write it if there's room. */
if(len+sepLen<=cap) {
- const UChar * plimit = p + len;
+ const char16_t * plimit = p + len;
for (; p < plimit; p++) {
if (*p == formatOpenParen) {
*p = formatReplaceOpenParen;
@@ -772,7 +772,7 @@ uloc_getDisplayName(const char *locale,
/* would have fit, but didn't because of pattern prefix. */
sub0Pos=0; /* stops initial padding (and a second retry,
so we won't end up here again) */
- retry=TRUE;
+ retry=true;
}
}
}
@@ -788,24 +788,24 @@ uloc_getDisplayName(const char *locale,
U_CAPI int32_t U_EXPORT2
uloc_getDisplayKeyword(const char* keyword,
const char* displayLocale,
- UChar* dest,
+ char16_t* dest,
int32_t destCapacity,
UErrorCode* status){
/* argument checking */
- if(status==NULL || U_FAILURE(*status)) {
+ if(status==nullptr || U_FAILURE(*status)) {
return 0;
}
- if(destCapacity<0 || (destCapacity>0 && dest==NULL)) {
+ if(destCapacity<0 || (destCapacity>0 && dest==nullptr)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- /* pass itemKey=NULL to look for a top-level item */
+ /* pass itemKey=nullptr to look for a top-level item */
return _getStringOrCopyKey(U_ICUDATA_LANG, displayLocale,
- _kKeys, NULL,
+ _kKeys, nullptr,
keyword,
keyword,
dest, destCapacity,
@@ -820,17 +820,17 @@ U_CAPI int32_t U_EXPORT2
uloc_getDisplayKeywordValue( const char* locale,
const char* keyword,
const char* displayLocale,
- UChar* dest,
+ char16_t* dest,
int32_t destCapacity,
UErrorCode* status){
/* argument checking */
- if(status==NULL || U_FAILURE(*status)) {
+ if(status==nullptr || U_FAILURE(*status)) {
return 0;
}
- if(destCapacity<0 || (destCapacity>0 && dest==NULL)) {
+ if(destCapacity<0 || (destCapacity>0 && dest==nullptr)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -849,14 +849,14 @@ uloc_getDisplayKeywordValue( const char* locale,
if(uprv_stricmp(keyword, _kCurrency)==0){
int32_t dispNameLen = 0;
- const UChar *dispName = NULL;
+ const char16_t *dispName = nullptr;
icu::LocalUResourceBundlePointer bundle(
ures_open(U_ICUDATA_CURR, displayLocale, status));
icu::LocalUResourceBundlePointer currencies(
- ures_getByKey(bundle.getAlias(), _kCurrencies, NULL, status));
+ ures_getByKey(bundle.getAlias(), _kCurrencies, nullptr, status));
icu::LocalUResourceBundlePointer currency(
- ures_getByKeyWithFallback(currencies.getAlias(), keywordValue.data(), NULL, status));
+ ures_getByKeyWithFallback(currencies.getAlias(), keywordValue.data(), nullptr, status));
dispName = ures_getStringByIndex(currency.getAlias(), UCURRENCY_DISPLAY_NAME_INDEX, &dispNameLen, status);
@@ -869,8 +869,8 @@ uloc_getDisplayKeywordValue( const char* locale,
}
}
- /* now copy the dispName over if not NULL */
- if(dispName != NULL){
+ /* now copy the dispName over if not nullptr */
+ if(dispName != nullptr){
if(dispNameLen <= destCapacity){
u_memcpy(dest, dispName, dispNameLen);
return u_terminateUChars(dest, destCapacity, dispNameLen, status);
diff --git a/contrib/libs/icu/common/locdistance.cpp b/contrib/libs/icu/common/locdistance.cpp
index ff8892791b2..fb22fe79ed3 100644
--- a/contrib/libs/icu/common/locdistance.cpp
+++ b/contrib/libs/icu/common/locdistance.cpp
@@ -45,13 +45,13 @@ enum {
};
LocaleDistance *gLocaleDistance = nullptr;
-UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
+UInitOnce gInitOnce {};
UBool U_CALLCONV cleanup() {
delete gLocaleDistance;
gLocaleDistance = nullptr;
gInitOnce.reset();
- return TRUE;
+ return true;
}
} // namespace
diff --git a/contrib/libs/icu/common/locdspnm.cpp b/contrib/libs/icu/common/locdspnm.cpp
index f73cedd7286..73fe531c543 100644
--- a/contrib/libs/icu/common/locdspnm.cpp
+++ b/contrib/libs/icu/common/locdspnm.cpp
@@ -40,7 +40,7 @@ static int32_t ncat(char *buffer, uint32_t buflen, ...) {
char *p = buffer;
const char* e = buffer + buflen - 1;
- if (buffer == NULL || buflen < 1) {
+ if (buffer == nullptr || buflen < 1) {
return -1;
}
@@ -86,16 +86,16 @@ public:
inline UnicodeString &
ICUDataTable::get(const char* tableKey, const char* itemKey, UnicodeString& result) const {
- return get(tableKey, NULL, itemKey, result);
+ return get(tableKey, nullptr, itemKey, result);
}
inline UnicodeString &
ICUDataTable::getNoFallback(const char* tableKey, const char* itemKey, UnicodeString& result) const {
- return getNoFallback(tableKey, NULL, itemKey, result);
+ return getNoFallback(tableKey, nullptr, itemKey, result);
}
ICUDataTable::ICUDataTable(const char* path, const Locale& locale)
- : path(NULL), locale(Locale::getRoot())
+ : path(nullptr), locale(Locale::getRoot())
{
if (path) {
int32_t len = static_cast<int32_t>(uprv_strlen(path));
@@ -110,7 +110,7 @@ ICUDataTable::ICUDataTable(const char* path, const Locale& locale)
ICUDataTable::~ICUDataTable() {
if (path) {
uprv_free((void*) path);
- path = NULL;
+ path = nullptr;
}
}
@@ -125,7 +125,7 @@ ICUDataTable::get(const char* tableKey, const char* subTableKey, const char* ite
UErrorCode status = U_ZERO_ERROR;
int32_t len = 0;
- const UChar *s = uloc_getTableStringWithFallback(path, locale.getName(),
+ const char16_t *s = uloc_getTableStringWithFallback(path, locale.getName(),
tableKey, subTableKey, itemKey,
&len, &status);
if (U_SUCCESS(status) && len > 0) {
@@ -140,7 +140,7 @@ ICUDataTable::getNoFallback(const char* tableKey, const char* subTableKey, const
UErrorCode status = U_ZERO_ERROR;
int32_t len = 0;
- const UChar *s = uloc_getTableStringWithFallback(path, locale.getName(),
+ const char16_t *s = uloc_getTableStringWithFallback(path, locale.getName(),
tableKey, subTableKey, itemKey,
&len, &status);
if (U_SUCCESS(status)) {
@@ -347,7 +347,7 @@ private:
UnicodeString& keyDisplayName(const char* key, UnicodeString& result, UBool skipAdjust) const;
UnicodeString& keyValueDisplayName(const char* key, const char* value,
UnicodeString& result, UBool skipAdjust) const;
- void initialize(void);
+ void initialize();
struct CapitalizationContextSink;
};
@@ -358,7 +358,7 @@ LocaleDisplayNamesImpl::LocaleDisplayNamesImpl(const Locale& locale,
, langData(U_ICUDATA_LANG, locale)
, regionData(U_ICUDATA_REGION, locale)
, capitalizationContext(UDISPCTX_CAPITALIZATION_NONE)
- , capitalizationBrkIter(NULL)
+ , capitalizationBrkIter(nullptr)
, nameLength(UDISPCTX_LENGTH_FULL)
, substitute(UDISPCTX_SUBSTITUTE)
{
@@ -371,7 +371,7 @@ LocaleDisplayNamesImpl::LocaleDisplayNamesImpl(const Locale& locale,
, langData(U_ICUDATA_LANG, locale)
, regionData(U_ICUDATA_REGION, locale)
, capitalizationContext(UDISPCTX_CAPITALIZATION_NONE)
- , capitalizationBrkIter(NULL)
+ , capitalizationBrkIter(nullptr)
, nameLength(UDISPCTX_LENGTH_FULL)
, substitute(UDISPCTX_SUBSTITUTE)
{
@@ -403,7 +403,7 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink {
LocaleDisplayNamesImpl& parent;
CapitalizationContextSink(LocaleDisplayNamesImpl& _parent)
- : hasCapitalizationUsage(FALSE), parent(_parent) {}
+ : hasCapitalizationUsage(false), parent(_parent) {}
virtual ~CapitalizationContextSink();
virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
@@ -437,8 +437,8 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink {
int32_t titlecaseInt = (parent.capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU) ? intVector[0] : intVector[1];
if (titlecaseInt == 0) { continue; }
- parent.fCapitalization[usageEnum] = TRUE;
- hasCapitalizationUsage = TRUE;
+ parent.fCapitalization[usageEnum] = true;
+ hasCapitalizationUsage = true;
}
}
};
@@ -447,7 +447,7 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink {
LocaleDisplayNamesImpl::CapitalizationContextSink::~CapitalizationContextSink() {}
void
-LocaleDisplayNamesImpl::initialize(void) {
+LocaleDisplayNamesImpl::initialize() {
LocaleDisplayNamesImpl *nonConstThis = (LocaleDisplayNamesImpl *)this;
nonConstThis->locale = langData.getLocale() == Locale::getRoot()
? regionData.getLocale()
@@ -467,16 +467,16 @@ LocaleDisplayNamesImpl::initialize(void) {
pattern = UnicodeString("{0} ({1})", -1, US_INV);
}
format.applyPatternMinMaxArguments(pattern, 2, 2, status);
- if (pattern.indexOf((UChar)0xFF08) >= 0) {
- formatOpenParen.setTo((UChar)0xFF08); // fullwidth (
- formatReplaceOpenParen.setTo((UChar)0xFF3B); // fullwidth [
- formatCloseParen.setTo((UChar)0xFF09); // fullwidth )
- formatReplaceCloseParen.setTo((UChar)0xFF3D); // fullwidth ]
+ if (pattern.indexOf((char16_t)0xFF08) >= 0) {
+ formatOpenParen.setTo((char16_t)0xFF08); // fullwidth (
+ formatReplaceOpenParen.setTo((char16_t)0xFF3B); // fullwidth [
+ formatCloseParen.setTo((char16_t)0xFF09); // fullwidth )
+ formatReplaceCloseParen.setTo((char16_t)0xFF3D); // fullwidth ]
} else {
- formatOpenParen.setTo((UChar)0x0028); // (
- formatReplaceOpenParen.setTo((UChar)0x005B); // [
- formatCloseParen.setTo((UChar)0x0029); // )
- formatReplaceCloseParen.setTo((UChar)0x005D); // ]
+ formatOpenParen.setTo((char16_t)0x0028); // (
+ formatReplaceOpenParen.setTo((char16_t)0x005B); // [
+ formatCloseParen.setTo((char16_t)0x0029); // )
+ formatReplaceCloseParen.setTo((char16_t)0x005D); // ]
}
UnicodeString ktPattern;
@@ -490,9 +490,9 @@ LocaleDisplayNamesImpl::initialize(void) {
#if !UCONFIG_NO_BREAK_ITERATION
// Only get the context data if we need it! This is a const object so we know now...
// Also check whether we will need a break iterator (depends on the data)
- UBool needBrkIter = FALSE;
+ UBool needBrkIter = false;
if (capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_STANDALONE) {
- LocalUResourceBundlePointer resource(ures_open(NULL, locale.getName(), &status));
+ LocalUResourceBundlePointer resource(ures_open(nullptr, locale.getName(), &status));
if (U_FAILURE(status)) { return; }
CapitalizationContextSink sink(*this);
ures_getAllItemsWithFallback(resource.getAlias(), "contextTransforms", sink, status);
@@ -510,7 +510,7 @@ LocaleDisplayNamesImpl::initialize(void) {
capitalizationBrkIter = BreakIterator::createSentenceInstance(locale, status);
if (U_FAILURE(status)) {
delete capitalizationBrkIter;
- capitalizationBrkIter = NULL;
+ capitalizationBrkIter = nullptr;
}
}
#endif
@@ -554,7 +554,7 @@ LocaleDisplayNamesImpl::adjustForUsageAndContext(CapContextUsage usage,
UnicodeString& result) const {
#if !UCONFIG_NO_BREAK_ITERATION
// check to see whether we need to titlecase result
- if ( result.length() > 0 && u_islower(result.char32At(0)) && capitalizationBrkIter!= NULL &&
+ if ( result.length() > 0 && u_islower(result.char32At(0)) && capitalizationBrkIter!= nullptr &&
( capitalizationContext==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || fCapitalization[usage] ) ) {
// note fCapitalization[usage] won't be set unless capitalizationContext is UI_LIST_OR_MENU or STANDALONE
static UMutex capitalizationBrkIterLock;
@@ -593,8 +593,8 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, "_", country, (char *)0);
localeIdName(buffer, resultName, false);
if (!resultName.isBogus()) {
- hasScript = FALSE;
- hasCountry = FALSE;
+ hasScript = false;
+ hasCountry = false;
break;
}
}
@@ -602,7 +602,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, (char *)0);
localeIdName(buffer, resultName, false);
if (!resultName.isBogus()) {
- hasScript = FALSE;
+ hasScript = false;
break;
}
}
@@ -610,11 +610,11 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", country, (char*)0);
localeIdName(buffer, resultName, false);
if (!resultName.isBogus()) {
- hasCountry = FALSE;
+ hasCountry = false;
break;
}
}
- } while (FALSE);
+ } while (false);
}
if (resultName.isBogus() || resultName.isEmpty()) {
localeIdName(lang, resultName, substitute == UDISPCTX_SUBSTITUTE);
@@ -629,7 +629,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
UErrorCode status = U_ZERO_ERROR;
if (hasScript) {
- UnicodeString script_str = scriptDisplayName(script, temp, TRUE);
+ UnicodeString script_str = scriptDisplayName(script, temp, true);
if (script_str.isBogus()) {
result.setToBogus();
return result;
@@ -637,7 +637,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
resultRemainder.append(script_str);
}
if (hasCountry) {
- UnicodeString region_str = regionDisplayName(country, temp, TRUE);
+ UnicodeString region_str = regionDisplayName(country, temp, true);
if (region_str.isBogus()) {
result.setToBogus();
return result;
@@ -645,7 +645,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
appendWithSep(resultRemainder, region_str);
}
if (hasVariant) {
- UnicodeString variant_str = variantDisplayName(variant, temp, TRUE);
+ UnicodeString variant_str = variantDisplayName(variant, temp, true);
if (variant_str.isBogus()) {
result.setToBogus();
return result;
@@ -660,16 +660,16 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
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)) != NULL) {
+ 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;
}
- keyDisplayName(key, temp, TRUE);
+ keyDisplayName(key, temp, true);
temp.findAndReplace(formatOpenParen, formatReplaceOpenParen);
temp.findAndReplace(formatCloseParen, formatReplaceCloseParen);
- keyValueDisplayName(key, value, temp2, TRUE);
+ keyValueDisplayName(key, value, temp2, true);
temp2.findAndReplace(formatOpenParen, formatReplaceOpenParen);
temp2.findAndReplace(formatCloseParen, formatReplaceCloseParen);
if (temp2 != UnicodeString(value, -1, US_INV)) {
@@ -680,7 +680,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc,
appendWithSep(resultRemainder, temp3);
} else {
appendWithSep(resultRemainder, temp)
- .append((UChar)0x3d /* = */)
+ .append((char16_t)0x3d /* = */)
.append(temp2);
}
}
@@ -702,7 +702,7 @@ LocaleDisplayNamesImpl::appendWithSep(UnicodeString& buffer, const UnicodeString
} else {
const UnicodeString *values[2] = { &buffer, &src };
UErrorCode status = U_ZERO_ERROR;
- separatorFormat.formatAndReplace(values, 2, buffer, NULL, 0, status);
+ separatorFormat.formatAndReplace(values, 2, buffer, nullptr, 0, status);
}
return buffer;
}
@@ -724,7 +724,7 @@ LocaleDisplayNamesImpl::localeIdName(const char* localeId,
}
}
langData.getNoFallback("Languages", localeId, result);
- if (result.isBogus() && uprv_strchr(localeId, '_') == NULL) {
+ if (result.isBogus() && uprv_strchr(localeId, '_') == nullptr) {
// Canonicalize lang and try again, ICU-20870
// (only for language codes without script or region)
Locale canonLocale = Locale::createCanonical(localeId);
@@ -747,7 +747,7 @@ LocaleDisplayNamesImpl::localeIdName(const char* localeId,
UnicodeString&
LocaleDisplayNamesImpl::languageDisplayName(const char* lang,
UnicodeString& result) const {
- if (uprv_strcmp("root", lang) == 0 || uprv_strchr(lang, '_') != NULL) {
+ if (uprv_strcmp("root", lang) == 0 || uprv_strchr(lang, '_') != nullptr) {
return result = UnicodeString(lang, -1, US_INV);
}
if (nameLength == UDISPCTX_LENGTH_SHORT) {
@@ -797,13 +797,13 @@ LocaleDisplayNamesImpl::scriptDisplayName(const char* script,
UnicodeString&
LocaleDisplayNamesImpl::scriptDisplayName(const char* script,
UnicodeString& result) const {
- return scriptDisplayName(script, result, FALSE);
+ return scriptDisplayName(script, result, false);
}
UnicodeString&
LocaleDisplayNamesImpl::scriptDisplayName(UScriptCode scriptCode,
UnicodeString& result) const {
- return scriptDisplayName(uscript_getName(scriptCode), result, FALSE);
+ return scriptDisplayName(uscript_getName(scriptCode), result, false);
}
UnicodeString&
@@ -827,7 +827,7 @@ LocaleDisplayNamesImpl::regionDisplayName(const char* region,
UnicodeString&
LocaleDisplayNamesImpl::regionDisplayName(const char* region,
UnicodeString& result) const {
- return regionDisplayName(region, result, FALSE);
+ return regionDisplayName(region, result, false);
}
@@ -847,7 +847,7 @@ LocaleDisplayNamesImpl::variantDisplayName(const char* variant,
UnicodeString&
LocaleDisplayNamesImpl::variantDisplayName(const char* variant,
UnicodeString& result) const {
- return variantDisplayName(variant, result, FALSE);
+ return variantDisplayName(variant, result, false);
}
UnicodeString&
@@ -866,7 +866,7 @@ LocaleDisplayNamesImpl::keyDisplayName(const char* key,
UnicodeString&
LocaleDisplayNamesImpl::keyDisplayName(const char* key,
UnicodeString& result) const {
- return keyDisplayName(key, result, FALSE);
+ return keyDisplayName(key, result, false);
}
UnicodeString&
@@ -879,7 +879,7 @@ LocaleDisplayNamesImpl::keyValueDisplayName(const char* key,
UErrorCode sts = U_ZERO_ERROR;
UnicodeString ustrValue(value, -1, US_INV);
int32_t len;
- const UChar *currencyName = ucurr_getName(ustrValue.getTerminatedBuffer(),
+ const char16_t *currencyName = ucurr_getName(ustrValue.getTerminatedBuffer(),
locale.getBaseName(), UCURR_LONG_NAME, nullptr /* isChoiceFormat */, &len, &sts);
if (U_FAILURE(sts)) {
// Return the value as is on failure
@@ -908,7 +908,7 @@ UnicodeString&
LocaleDisplayNamesImpl::keyValueDisplayName(const char* key,
const char* value,
UnicodeString& result) const {
- return keyValueDisplayName(key, value, result, FALSE);
+ return keyValueDisplayName(key, value, result, false);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -922,7 +922,7 @@ LocaleDisplayNames::createInstance(const Locale& locale,
LocaleDisplayNames*
LocaleDisplayNames::createInstance(const Locale& locale,
UDisplayContext *contexts, int32_t length) {
- if (contexts == NULL) {
+ if (contexts == nullptr) {
length = 0;
}
return new LocaleDisplayNamesImpl(locale, contexts, length);
@@ -941,7 +941,7 @@ uldn_open(const char * locale,
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (locale == NULL) {
+ if (locale == nullptr) {
locale = uloc_getDefault();
}
return (ULocaleDisplayNames *)LocaleDisplayNames::createInstance(Locale(locale), dialectHandling);
@@ -954,7 +954,7 @@ uldn_openForContext(const char * locale,
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (locale == NULL) {
+ if (locale == nullptr) {
locale = uloc_getDefault();
}
return (ULocaleDisplayNames *)LocaleDisplayNames::createInstance(Locale(locale), contexts, length);
@@ -971,7 +971,7 @@ uldn_getLocale(const ULocaleDisplayNames *ldn) {
if (ldn) {
return ((const LocaleDisplayNames *)ldn)->getLocale().getName();
}
- return NULL;
+ return nullptr;
}
U_CAPI UDialectHandling U_EXPORT2
@@ -995,13 +995,13 @@ uldn_getContext(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
const char *locale,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || locale == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
+ if (ldn == nullptr || locale == nullptr || (result == nullptr && maxResultSize > 0) || maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1017,13 +1017,13 @@ uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
const char *lang,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || lang == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
+ if (ldn == nullptr || lang == nullptr || (result == nullptr && maxResultSize > 0) || maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1035,13 +1035,13 @@ uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
const char *script,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || script == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
+ if (ldn == nullptr || script == nullptr || (result == nullptr && maxResultSize > 0) || maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1053,7 +1053,7 @@ uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
UScriptCode scriptCode,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
return uldn_scriptDisplayName(ldn, uscript_getName(scriptCode), result, maxResultSize, pErrorCode);
@@ -1062,13 +1062,13 @@ uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
const char *region,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || region == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
+ if (ldn == nullptr || region == nullptr || (result == nullptr && maxResultSize > 0) || maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1080,13 +1080,13 @@ uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
const char *variant,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || variant == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
+ if (ldn == nullptr || variant == nullptr || (result == nullptr && maxResultSize > 0) || maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1098,13 +1098,13 @@ uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
U_CAPI int32_t U_EXPORT2
uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
const char *key,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || key == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
+ if (ldn == nullptr || key == nullptr || (result == nullptr && maxResultSize > 0) || maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1117,13 +1117,13 @@ U_CAPI int32_t U_EXPORT2
uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
const char *key,
const char *value,
- UChar *result,
+ char16_t *result,
int32_t maxResultSize,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (ldn == NULL || key == NULL || value == NULL || (result == NULL && maxResultSize > 0)
+ if (ldn == nullptr || key == nullptr || value == nullptr || (result == nullptr && maxResultSize > 0)
|| maxResultSize < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
diff --git a/contrib/libs/icu/common/locid.cpp b/contrib/libs/icu/common/locid.cpp
index e8859c7048b..70a794ae076 100644
--- a/contrib/libs/icu/common/locid.cpp
+++ b/contrib/libs/icu/common/locid.cpp
@@ -58,18 +58,18 @@
#include "uvector.h"
U_CDECL_BEGIN
-static UBool U_CALLCONV locale_cleanup(void);
+static UBool U_CALLCONV locale_cleanup();
U_CDECL_END
U_NAMESPACE_BEGIN
-static Locale *gLocaleCache = NULL;
-static UInitOnce gLocaleCacheInitOnce = U_INITONCE_INITIALIZER;
+static Locale *gLocaleCache = nullptr;
+static UInitOnce gLocaleCacheInitOnce {};
// gDefaultLocaleMutex protects all access to gDefaultLocalesHashT and gDefaultLocale.
static UMutex gDefaultLocaleMutex;
-static UHashtable *gDefaultLocalesHashT = NULL;
-static Locale *gDefaultLocale = NULL;
+static UHashtable *gDefaultLocalesHashT = nullptr;
+static Locale *gDefaultLocale = nullptr;
/**
* \def ULOC_STRING_LIMIT
@@ -115,29 +115,29 @@ deleteLocale(void *obj) {
delete (icu::Locale *) obj;
}
-static UBool U_CALLCONV locale_cleanup(void)
+static UBool U_CALLCONV locale_cleanup()
{
U_NAMESPACE_USE
delete [] gLocaleCache;
- gLocaleCache = NULL;
+ gLocaleCache = nullptr;
gLocaleCacheInitOnce.reset();
if (gDefaultLocalesHashT) {
uhash_close(gDefaultLocalesHashT); // Automatically deletes all elements, using deleter func.
- gDefaultLocalesHashT = NULL;
+ gDefaultLocalesHashT = nullptr;
}
- gDefaultLocale = NULL;
- return TRUE;
+ gDefaultLocale = nullptr;
+ return true;
}
static void U_CALLCONV locale_init(UErrorCode &status) {
U_NAMESPACE_USE
- U_ASSERT(gLocaleCache == NULL);
+ U_ASSERT(gLocaleCache == nullptr);
gLocaleCache = new Locale[(int)eMAX_LOCALES];
- if (gLocaleCache == NULL) {
+ if (gLocaleCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -171,15 +171,15 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
// Synchronize this entire function.
Mutex lock(&gDefaultLocaleMutex);
- UBool canonicalize = FALSE;
+ UBool canonicalize = false;
- // If given a NULL string for the locale id, grab the default
+ // If given a nullptr string for the locale id, grab the default
// name from the system.
// (Different from most other locale APIs, where a null name means use
// the current ICU default locale.)
- if (id == NULL) {
+ if (id == nullptr) {
id = uprv_getDefaultLocaleID(); // This function not thread safe? TODO: verify.
- canonicalize = TRUE; // always canonicalize host ID
+ canonicalize = true; // always canonicalize host ID
}
CharString localeNameBuf;
@@ -196,8 +196,8 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
return gDefaultLocale;
}
- if (gDefaultLocalesHashT == NULL) {
- gDefaultLocalesHashT = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
+ if (gDefaultLocalesHashT == nullptr) {
+ gDefaultLocalesHashT = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &status);
if (U_FAILURE(status)) {
return gDefaultLocale;
}
@@ -206,13 +206,13 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) {
}
Locale *newDefault = (Locale *)uhash_get(gDefaultLocalesHashT, localeNameBuf.data());
- if (newDefault == NULL) {
+ if (newDefault == nullptr) {
newDefault = new Locale(Locale::eBOGUS);
- if (newDefault == NULL) {
+ if (newDefault == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return gDefaultLocale;
}
- newDefault->init(localeNameBuf.data(), FALSE);
+ newDefault->init(localeNameBuf.data(), false);
uhash_put(gDefaultLocalesHashT, (char*) newDefault->getName(), newDefault, &status);
if (U_FAILURE(status)) {
return gDefaultLocale;
@@ -235,7 +235,7 @@ locale_set_default(const char *id)
/* end */
U_CFUNC const char *
-locale_get_default(void)
+locale_get_default()
{
U_NAMESPACE_USE
return Locale::getDefault().getName();
@@ -257,19 +257,19 @@ Locale::~Locale()
if ((baseName != fullName) && (baseName != fullNameBuffer)) {
uprv_free(baseName);
}
- baseName = NULL;
+ baseName = nullptr;
/*if fullName is on the heap, we free it*/
if (fullName != fullNameBuffer)
{
uprv_free(fullName);
- fullName = NULL;
+ fullName = nullptr;
}
}
Locale::Locale()
- : UObject(), fullName(fullNameBuffer), baseName(NULL)
+ : UObject(), fullName(fullNameBuffer), baseName(nullptr)
{
- init(NULL, FALSE);
+ init(nullptr, false);
}
/*
@@ -278,7 +278,7 @@ Locale::Locale()
* the default locale.)
*/
Locale::Locale(Locale::ELocaleType)
- : UObject(), fullName(fullNameBuffer), baseName(NULL)
+ : UObject(), fullName(fullNameBuffer), baseName(nullptr)
{
setToBogus();
}
@@ -288,11 +288,11 @@ Locale::Locale( const char * newLanguage,
const char * newCountry,
const char * newVariant,
const char * newKeywords)
- : UObject(), fullName(fullNameBuffer), baseName(NULL)
+ : UObject(), fullName(fullNameBuffer), baseName(nullptr)
{
- if( (newLanguage==NULL) && (newCountry == NULL) && (newVariant == NULL) )
+ if( (newLanguage==nullptr) && (newCountry == nullptr) && (newVariant == nullptr) )
{
- init(NULL, FALSE); /* shortcut */
+ init(nullptr, false); /* shortcut */
}
else
{
@@ -305,7 +305,7 @@ Locale::Locale( const char * newLanguage,
// Check the sizes of the input strings.
// Language
- if ( newLanguage != NULL )
+ if ( newLanguage != nullptr )
{
lsize = (int32_t)uprv_strlen(newLanguage);
if ( lsize < 0 || lsize > ULOC_STRING_LIMIT ) { // int32 wrap
@@ -317,7 +317,7 @@ Locale::Locale( const char * newLanguage,
CharString togo(newLanguage, lsize, status); // start with newLanguage
// _Country
- if ( newCountry != NULL )
+ if ( newCountry != nullptr )
{
csize = (int32_t)uprv_strlen(newCountry);
if ( csize < 0 || csize > ULOC_STRING_LIMIT ) { // int32 wrap
@@ -327,7 +327,7 @@ Locale::Locale( const char * newLanguage,
}
// _Variant
- if ( newVariant != NULL )
+ if ( newVariant != nullptr )
{
// remove leading _'s
while(newVariant[0] == SEP_CHAR)
@@ -347,7 +347,7 @@ Locale::Locale( const char * newLanguage,
}
}
- if ( newKeywords != NULL)
+ if ( newKeywords != nullptr)
{
ksize = (int32_t)uprv_strlen(newKeywords);
if ( ksize < 0 || ksize > ULOC_STRING_LIMIT ) {
@@ -397,17 +397,17 @@ Locale::Locale( const char * newLanguage,
}
// Parse it, because for example 'language' might really be a complete
// string.
- init(togo.data(), FALSE);
+ init(togo.data(), false);
}
}
Locale::Locale(const Locale &other)
- : UObject(other), fullName(fullNameBuffer), baseName(NULL)
+ : UObject(other), fullName(fullNameBuffer), baseName(nullptr)
{
*this = other;
}
-Locale::Locale(Locale&& other) U_NOEXCEPT
+Locale::Locale(Locale&& other) noexcept
: UObject(other), fullName(fullNameBuffer), baseName(fullName) {
*this = std::move(other);
}
@@ -445,7 +445,7 @@ Locale& Locale::operator=(const Locale& other) {
return *this;
}
-Locale& Locale::operator=(Locale&& other) U_NOEXCEPT {
+Locale& Locale::operator=(Locale&& other) noexcept {
if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName);
if (fullName != fullNameBuffer) uprv_free(fullName);
@@ -491,7 +491,7 @@ Locale::operator==( const Locale& other) const
namespace {
-UInitOnce gKnownCanonicalizedInitOnce = U_INITONCE_INITIALIZER;
+UInitOnce gKnownCanonicalizedInitOnce {};
UHashtable *gKnownCanonicalized = nullptr;
static const char* const KNOWN_CANONICALIZED[] = {
@@ -521,7 +521,7 @@ static const char* const KNOWN_CANONICALIZED[] = {
static UBool U_CALLCONV cleanupKnownCanonicalized() {
gKnownCanonicalizedInitOnce.reset();
if (gKnownCanonicalized) { uhash_close(gKnownCanonicalized); }
- return TRUE;
+ return true;
}
static void U_CALLCONV loadKnownCanonicalized(UErrorCode &status) {
@@ -682,14 +682,14 @@ private:
const AliasData* AliasData::gSingleton = nullptr;
-UInitOnce AliasData::gInitOnce = U_INITONCE_INITIALIZER;
+UInitOnce AliasData::gInitOnce {};
UBool U_CALLCONV
AliasData::cleanup()
{
gInitOnce.reset();
delete gSingleton;
- return TRUE;
+ return true;
}
void
@@ -716,20 +716,19 @@ AliasDataBuilder::readAlias(
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- int i = 0;
- while (ures_hasNext(alias)) {
+ for (int i = 0; U_SUCCESS(status) && ures_hasNext(alias); i++) {
LocalUResourceBundlePointer res(
ures_getNextResource(alias, nullptr, &status));
const char* aliasFrom = ures_getKey(res.getAlias());
UnicodeString aliasTo =
ures_getUnicodeStringByKey(res.getAlias(), "replacement", &status);
+ if (U_FAILURE(status)) return;
checkType(aliasFrom);
checkReplacement(aliasTo);
rawTypes[i] = aliasFrom;
rawIndexes[i] = strings->add(aliasTo, status);
- i++;
}
}
@@ -1204,14 +1203,11 @@ AliasReplacer::parseLanguageReplacement(
// We have multiple field so we have to allocate and parse
CharString* str = new CharString(
replacement, (int32_t)uprv_strlen(replacement), status);
+ LocalPointer<CharString> lpStr(str, status);
+ toBeFreed.adoptElement(lpStr.orphan(), status);
if (U_FAILURE(status)) {
return;
}
- if (str == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return;
- }
- toBeFreed.addElementX(str, status);
char* data = str->data();
replacedLanguage = (const char*) data;
char* endOfField = uprv_strchr(data, '_');
@@ -1420,12 +1416,9 @@ AliasReplacer::replaceTerritory(UVector& toBeFreed, UErrorCode& status)
(int32_t)(firstSpace - replacement), status), status);
}
if (U_FAILURE(status)) { return false; }
- if (item.isNull()) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return false;
- }
replacedRegion = item->data();
- toBeFreed.addElementX(item.orphan(), status);
+ toBeFreed.adoptElement(item.orphan(), status);
+ if (U_FAILURE(status)) { return false; }
}
U_ASSERT(!same(region, replacedRegion));
region = replacedRegion;
@@ -1520,7 +1513,7 @@ AliasReplacer::replaceTransformedExtensions(
CharString& transformedExtensions, CharString& output, UErrorCode& status)
{
// The content of the transformedExtensions will be modified in this
- // function to NULL-terminating (tkey-tvalue) pairs.
+ // function to NUL-terminating (tkey-tvalue) pairs.
if (U_FAILURE(status)) {
return false;
}
@@ -1555,7 +1548,7 @@ AliasReplacer::replaceTransformedExtensions(
}
const char* nextTKey = ultag_getTKeyStart(tvalue);
if (nextTKey != nullptr) {
- *((char*)(nextTKey-1)) = '\0'; // NULL terminate tvalue
+ *((char*)(nextTKey-1)) = '\0'; // NUL terminate tvalue
}
tfields.insertElementAt((void*)tkey, tfields.size(), status);
if (U_FAILURE(status)) {
@@ -1577,7 +1570,7 @@ AliasReplacer::replaceTransformedExtensions(
return false;
}
// Split the "tkey-tvalue" pair string so that we can canonicalize the tvalue.
- *((char*)tvalue++) = '\0'; // NULL terminate tkey
+ *((char*)tvalue++) = '\0'; // NUL terminate tkey
output.append(tfield, status).append('-', status);
const char* bcpTValue = ulocimp_toBcpType(tfield, tvalue, nullptr, nullptr);
output.append((bcpTValue == nullptr) ? tvalue : bcpTValue, status);
@@ -1659,10 +1652,10 @@ 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.addElementX(start, status);
+ variants.addElement(start, status);
start = end + 1;
}
- variants.addElementX(start, status);
+ variants.addElement(start, status);
}
if (U_FAILURE(status)) { return false; }
@@ -1824,12 +1817,12 @@ ulocimp_isCanonicalizedLocaleForTest(const char* localeName)
/*This function initializes a Locale from a C locale ID*/
Locale& Locale::init(const char* localeID, UBool canonicalize)
{
- fIsBogus = FALSE;
+ fIsBogus = false;
/* Free our current storage */
if ((baseName != fullName) && (baseName != fullNameBuffer)) {
uprv_free(baseName);
}
- baseName = NULL;
+ baseName = nullptr;
if(fullName != fullNameBuffer) {
uprv_free(fullName);
fullName = fullNameBuffer;
@@ -1847,7 +1840,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
int32_t length;
UErrorCode err;
- if(localeID == NULL) {
+ if(localeID == nullptr) {
// not an error, just set the default locale
return *this = getDefault();
}
@@ -1896,8 +1889,8 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
// variant may contain @foo or .foo POSIX cruft; remove it
separator = uprv_strchr(field[fieldIdx-1], '@');
char* sep2 = uprv_strchr(field[fieldIdx-1], '.');
- if (separator!=NULL || sep2!=NULL) {
- if (separator==NULL || (sep2!=NULL && separator > sep2)) {
+ if (separator!=nullptr || sep2!=nullptr) {
+ if (separator==nullptr || (sep2!=nullptr && separator > sep2)) {
separator = sep2;
}
fieldLen[fieldIdx-1] = (int32_t)(separator - field[fieldIdx-1]);
@@ -1981,14 +1974,14 @@ Locale::initBaseName(UErrorCode &status) {
if (U_FAILURE(status)) {
return;
}
- U_ASSERT(baseName==NULL || baseName==fullName);
+ U_ASSERT(baseName==nullptr || baseName==fullName);
const char *atPtr = uprv_strchr(fullName, '@');
const char *eqPtr = uprv_strchr(fullName, '=');
if (atPtr && eqPtr && atPtr < eqPtr) {
// Key words exist.
int32_t baseNameLength = (int32_t)(atPtr - fullName);
baseName = (char *)uprv_malloc(baseNameLength + 1);
- if (baseName == NULL) {
+ if (baseName == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -2019,7 +2012,7 @@ Locale::setToBogus() {
if((baseName != fullName) && (baseName != fullNameBuffer)) {
uprv_free(baseName);
}
- baseName = NULL;
+ baseName = nullptr;
if(fullName != fullNameBuffer) {
uprv_free(fullName);
fullName = fullNameBuffer;
@@ -2028,7 +2021,7 @@ Locale::setToBogus() {
*language = 0;
*script = 0;
*country = 0;
- fIsBogus = TRUE;
+ fIsBogus = true;
variantBegin = 0;
}
@@ -2037,12 +2030,12 @@ Locale::getDefault()
{
{
Mutex lock(&gDefaultLocaleMutex);
- if (gDefaultLocale != NULL) {
+ if (gDefaultLocale != nullptr) {
return *gDefaultLocale;
}
}
UErrorCode status = U_ZERO_ERROR;
- return *locale_set_default_internal(NULL, status);
+ return *locale_set_default_internal(nullptr, status);
}
@@ -2078,7 +2071,7 @@ Locale::addLikelySubtags(UErrorCode& status) {
return;
}
- init(maximizedLocaleID.data(), /*canonicalize=*/FALSE);
+ init(maximizedLocaleID.data(), /*canonicalize=*/false);
if (isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -2100,7 +2093,7 @@ Locale::minimizeSubtags(UErrorCode& status) {
return;
}
- init(minimizedLocaleID.data(), /*canonicalize=*/FALSE);
+ init(minimizedLocaleID.data(), /*canonicalize=*/false);
if (isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -2119,7 +2112,7 @@ Locale::canonicalize(UErrorCode& status) {
if (U_FAILURE(status)) {
return;
}
- init(uncanonicalized.data(), /*canonicalize=*/TRUE);
+ init(uncanonicalized.data(), /*canonicalize=*/true);
if (isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -2166,7 +2159,7 @@ Locale::forLanguageTag(StringPiece tag, UErrorCode& status)
return result;
}
- result.init(localeID.data(), /*canonicalize=*/FALSE);
+ result.init(localeID.data(), /*canonicalize=*/false);
if (result.isBogus()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -2185,7 +2178,7 @@ Locale::toLanguageTag(ByteSink& sink, UErrorCode& status) const
return;
}
- ulocimp_toLanguageTag(fullName, sink, /*strict=*/FALSE, &status);
+ ulocimp_toLanguageTag(fullName, sink, /*strict=*/false, &status);
}
Locale U_EXPORT2
@@ -2193,7 +2186,7 @@ Locale::createFromName (const char *name)
{
if (name) {
Locale l("");
- l.init(name, FALSE);
+ l.init(name, false);
return l;
}
else {
@@ -2204,7 +2197,7 @@ Locale::createFromName (const char *name)
Locale U_EXPORT2
Locale::createCanonical(const char* name) {
Locale loc("");
- loc.init(name, TRUE);
+ loc.init(name, true);
return loc;
}
@@ -2247,138 +2240,138 @@ const char* const* U_EXPORT2 Locale::getISOLanguages()
// Set the locale's data based on a posix id.
void Locale::setFromPOSIXID(const char *posixID)
{
- init(posixID, TRUE);
+ init(posixID, true);
}
const Locale & U_EXPORT2
-Locale::getRoot(void)
+Locale::getRoot()
{
return getLocale(eROOT);
}
const Locale & U_EXPORT2
-Locale::getEnglish(void)
+Locale::getEnglish()
{
return getLocale(eENGLISH);
}
const Locale & U_EXPORT2
-Locale::getFrench(void)
+Locale::getFrench()
{
return getLocale(eFRENCH);
}
const Locale & U_EXPORT2
-Locale::getGerman(void)
+Locale::getGerman()
{
return getLocale(eGERMAN);
}
const Locale & U_EXPORT2
-Locale::getItalian(void)
+Locale::getItalian()
{
return getLocale(eITALIAN);
}
const Locale & U_EXPORT2
-Locale::getJapanese(void)
+Locale::getJapanese()
{
return getLocale(eJAPANESE);
}
const Locale & U_EXPORT2
-Locale::getKorean(void)
+Locale::getKorean()
{
return getLocale(eKOREAN);
}
const Locale & U_EXPORT2
-Locale::getChinese(void)
+Locale::getChinese()
{
return getLocale(eCHINESE);
}
const Locale & U_EXPORT2
-Locale::getSimplifiedChinese(void)
+Locale::getSimplifiedChinese()
{
return getLocale(eCHINA);
}
const Locale & U_EXPORT2
-Locale::getTraditionalChinese(void)
+Locale::getTraditionalChinese()
{
return getLocale(eTAIWAN);
}
const Locale & U_EXPORT2
-Locale::getFrance(void)
+Locale::getFrance()
{
return getLocale(eFRANCE);
}
const Locale & U_EXPORT2
-Locale::getGermany(void)
+Locale::getGermany()
{
return getLocale(eGERMANY);
}
const Locale & U_EXPORT2
-Locale::getItaly(void)
+Locale::getItaly()
{
return getLocale(eITALY);
}
const Locale & U_EXPORT2
-Locale::getJapan(void)
+Locale::getJapan()
{
return getLocale(eJAPAN);
}
const Locale & U_EXPORT2
-Locale::getKorea(void)
+Locale::getKorea()
{
return getLocale(eKOREA);
}
const Locale & U_EXPORT2
-Locale::getChina(void)
+Locale::getChina()
{
return getLocale(eCHINA);
}
const Locale & U_EXPORT2
-Locale::getPRC(void)
+Locale::getPRC()
{
return getLocale(eCHINA);
}
const Locale & U_EXPORT2
-Locale::getTaiwan(void)
+Locale::getTaiwan()
{
return getLocale(eTAIWAN);
}
const Locale & U_EXPORT2
-Locale::getUK(void)
+Locale::getUK()
{
return getLocale(eUK);
}
const Locale & U_EXPORT2
-Locale::getUS(void)
+Locale::getUS()
{
return getLocale(eUS);
}
const Locale & U_EXPORT2
-Locale::getCanada(void)
+Locale::getCanada()
{
return getLocale(eCANADA);
}
const Locale & U_EXPORT2
-Locale::getCanadaFrench(void)
+Locale::getCanadaFrench()
{
return getLocale(eCANADA_FRENCH);
}
@@ -2388,12 +2381,12 @@ Locale::getLocale(int locid)
{
Locale *localeCache = getLocaleCache();
U_ASSERT((locid < eMAX_LOCALES)&&(locid>=0));
- if (localeCache == NULL) {
+ if (localeCache == nullptr) {
// Failure allocating the locale cache.
- // The best we can do is return a NULL reference.
+ // The best we can do is return a nullptr reference.
locid = 0;
}
- return localeCache[locid]; /*operating on NULL*/
+ return localeCache[locid]; /*operating on nullptr*/
}
/*
@@ -2401,7 +2394,7 @@ This function is defined this way in order to get around static
initialization and static destruction.
*/
Locale *
-Locale::getLocaleCache(void)
+Locale::getLocaleCache()
{
UErrorCode status = U_ZERO_ERROR;
umtx_initOnce(gLocaleCacheInitOnce, locale_init, status);
@@ -2417,17 +2410,17 @@ private:
static const char fgClassID;/* Warning this is used beyond the typical RTTI usage. */
public:
- static UClassID U_EXPORT2 getStaticClassID(void) { return (UClassID)&fgClassID; }
- virtual UClassID getDynamicClassID(void) const override { return getStaticClassID(); }
+ 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) {
if(U_SUCCESS(status) && keywordLen != 0) {
- if(keys == NULL || keywordLen < 0) {
+ if(keys == nullptr || keywordLen < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
} else {
keywords = (char *)uprv_malloc(keywordLen+1);
- if (keywords == NULL) {
+ if (keywords == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
else {
@@ -2465,14 +2458,14 @@ public:
result = current;
len = (int32_t)uprv_strlen(current);
current += len+1;
- if(resultLength != NULL) {
+ if(resultLength != nullptr) {
*resultLength = len;
}
} else {
- if(resultLength != NULL) {
+ if(resultLength != nullptr) {
*resultLength = 0;
}
- result = NULL;
+ result = nullptr;
}
return result;
}
@@ -2525,7 +2518,7 @@ UnicodeKeywordEnumeration::~UnicodeKeywordEnumeration() = default;
StringEnumeration *
Locale::createKeywords(UErrorCode &status) const
{
- StringEnumeration *result = NULL;
+ StringEnumeration *result = nullptr;
if (U_FAILURE(status)) {
return result;
@@ -2537,7 +2530,7 @@ Locale::createKeywords(UErrorCode &status) const
if(assignment > variantStart) {
CharString keywords;
CharStringByteSink sink(&keywords);
- ulocimp_getKeywords(variantStart+1, '@', sink, FALSE, &status);
+ ulocimp_getKeywords(variantStart+1, '@', sink, false, &status);
if (U_SUCCESS(status) && !keywords.isEmpty()) {
result = new KeywordEnumeration(keywords.data(), keywords.length(), 0, status);
if (!result) {
@@ -2554,7 +2547,7 @@ Locale::createKeywords(UErrorCode &status) const
StringEnumeration *
Locale::createUnicodeKeywords(UErrorCode &status) const
{
- StringEnumeration *result = NULL;
+ StringEnumeration *result = nullptr;
if (U_FAILURE(status)) {
return result;
@@ -2566,7 +2559,7 @@ Locale::createUnicodeKeywords(UErrorCode &status) const
if(assignment > variantStart) {
CharString keywords;
CharStringByteSink sink(&keywords);
- ulocimp_getKeywords(variantStart+1, '@', sink, FALSE, &status);
+ ulocimp_getKeywords(variantStart+1, '@', sink, false, &status);
if (U_SUCCESS(status) && !keywords.isEmpty()) {
result = new UnicodeKeywordEnumeration(keywords.data(), keywords.length(), 0, status);
if (!result) {
diff --git a/contrib/libs/icu/common/loclikely.cpp b/contrib/libs/icu/common/loclikely.cpp
index d80096b588e..d2a05c63644 100644
--- a/contrib/libs/icu/common/loclikely.cpp
+++ b/contrib/libs/icu/common/loclikely.cpp
@@ -54,23 +54,23 @@ findLikelySubtags(const char* localeID,
char* buffer,
int32_t bufferLength,
UErrorCode* err) {
- const char* result = NULL;
+ const char* result = nullptr;
if (!U_FAILURE(*err)) {
int32_t resLen = 0;
- const UChar* s = NULL;
+ const char16_t* s = nullptr;
UErrorCode tmpErr = U_ZERO_ERROR;
- icu::LocalUResourceBundlePointer subtags(ures_openDirect(NULL, "likelySubtags", &tmpErr));
+ icu::LocalUResourceBundlePointer subtags(ures_openDirect(nullptr, "likelySubtags", &tmpErr));
if (U_SUCCESS(tmpErr)) {
icu::CharString und;
- if (localeID != NULL) {
+ if (localeID != nullptr) {
if (*localeID == '\0') {
localeID = unknownLanguage;
} else if (*localeID == '_') {
und.append(unknownLanguage, *err);
und.append(localeID, *err);
if (U_FAILURE(*err)) {
- return NULL;
+ return nullptr;
}
localeID = und.data();
}
@@ -140,12 +140,12 @@ appendTag(
/**
* Create a tag string from the supplied parameters. The lang, script and region
- * parameters may be NULL pointers. If they are, their corresponding length parameters
+ * 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 NULL, it will be parsed for potential language, script and region tags
- * to be used when constructing the new tag. If the alternateTags parameter is NULL, or
+ * 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,
@@ -201,7 +201,7 @@ createTagStringWithAlternates(
**/
char tagBuffer[ULOC_FULLNAME_CAPACITY];
int32_t tagLength = 0;
- UBool regionAppended = FALSE;
+ UBool regionAppended = false;
if (langLength > 0) {
appendTag(
@@ -209,9 +209,9 @@ createTagStringWithAlternates(
langLength,
tagBuffer,
&tagLength,
- /*withSeparator=*/FALSE);
+ /*withSeparator=*/false);
}
- else if (alternateTags == NULL) {
+ else if (alternateTags == nullptr) {
/*
* Use the empty string for an unknown language, if
* we found no language.
@@ -246,7 +246,7 @@ createTagStringWithAlternates(
alternateLangLength,
tagBuffer,
&tagLength,
- /*withSeparator=*/FALSE);
+ /*withSeparator=*/false);
}
}
@@ -256,9 +256,9 @@ createTagStringWithAlternates(
scriptLength,
tagBuffer,
&tagLength,
- /*withSeparator=*/TRUE);
+ /*withSeparator=*/true);
}
- else if (alternateTags != NULL) {
+ else if (alternateTags != nullptr) {
/*
* Parse the alternateTags string for the script.
*/
@@ -281,7 +281,7 @@ createTagStringWithAlternates(
alternateScriptLength,
tagBuffer,
&tagLength,
- /*withSeparator=*/TRUE);
+ /*withSeparator=*/true);
}
}
@@ -291,11 +291,11 @@ createTagStringWithAlternates(
regionLength,
tagBuffer,
&tagLength,
- /*withSeparator=*/TRUE);
+ /*withSeparator=*/true);
- regionAppended = TRUE;
+ regionAppended = true;
}
- else if (alternateTags != NULL) {
+ else if (alternateTags != nullptr) {
/*
* Parse the alternateTags string for the region.
*/
@@ -317,9 +317,9 @@ createTagStringWithAlternates(
alternateRegionLength,
tagBuffer,
&tagLength,
- /*withSeparator=*/TRUE);
+ /*withSeparator=*/true);
- regionAppended = TRUE;
+ regionAppended = true;
}
}
@@ -362,7 +362,7 @@ error:
/**
* Create a tag string from the supplied parameters. The lang, script and region
- * parameters may be NULL pointers. If they are, their corresponding length parameters
+ * 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.
*
@@ -406,7 +406,7 @@ createTagString(
regionLength,
trailing,
trailingLength,
- NULL,
+ nullptr,
sink,
err);
}
@@ -454,13 +454,13 @@ parseTagString(
int32_t subtagLength = 0;
if(U_FAILURE(*err) ||
- localeID == NULL ||
- lang == NULL ||
- langLength == NULL ||
- script == NULL ||
- scriptLength == NULL ||
- region == NULL ||
- regionLength == NULL) {
+ localeID == nullptr ||
+ lang == nullptr ||
+ langLength == nullptr ||
+ script == nullptr ||
+ scriptLength == nullptr ||
+ region == nullptr ||
+ regionLength == nullptr) {
goto error;
}
@@ -575,7 +575,7 @@ createLikelySubtagsString(
**/
if (scriptLength > 0 && regionLength > 0) {
- const char* likelySubtags = NULL;
+ const char* likelySubtags = nullptr;
icu::CharString tagBuffer;
{
@@ -587,7 +587,7 @@ createLikelySubtagsString(
scriptLength,
region,
regionLength,
- NULL,
+ nullptr,
0,
sink,
err);
@@ -606,23 +606,23 @@ createLikelySubtagsString(
goto error;
}
- if (likelySubtags != NULL) {
+ if (likelySubtags != nullptr) {
/* Always use the language tag from the
maximal string, since it may be more
specific than the one provided. */
createTagStringWithAlternates(
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
variants,
variantsLength,
likelySubtags,
sink,
err);
- return TRUE;
+ return true;
}
}
@@ -631,7 +631,7 @@ createLikelySubtagsString(
**/
if (scriptLength > 0) {
- const char* likelySubtags = NULL;
+ const char* likelySubtags = nullptr;
icu::CharString tagBuffer;
{
@@ -641,9 +641,9 @@ createLikelySubtagsString(
langLength,
script,
scriptLength,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
sink,
err);
@@ -662,14 +662,14 @@ createLikelySubtagsString(
goto error;
}
- if (likelySubtags != NULL) {
+ if (likelySubtags != nullptr) {
/* Always use the language tag from the
maximal string, since it may be more
specific than the one provided. */
createTagStringWithAlternates(
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
region,
regionLength,
@@ -678,7 +678,7 @@ createLikelySubtagsString(
likelySubtags,
sink,
err);
- return TRUE;
+ return true;
}
}
@@ -687,7 +687,7 @@ createLikelySubtagsString(
**/
if (regionLength > 0) {
- const char* likelySubtags = NULL;
+ const char* likelySubtags = nullptr;
icu::CharString tagBuffer;
{
@@ -695,11 +695,11 @@ createLikelySubtagsString(
createTagString(
lang,
langLength,
- NULL,
+ nullptr,
0,
region,
regionLength,
- NULL,
+ nullptr,
0,
sink,
err);
@@ -718,23 +718,23 @@ createLikelySubtagsString(
goto error;
}
- if (likelySubtags != NULL) {
+ if (likelySubtags != nullptr) {
/* Always use the language tag from the
maximal string, since it may be more
specific than the one provided. */
createTagStringWithAlternates(
- NULL,
+ nullptr,
0,
script,
scriptLength,
- NULL,
+ nullptr,
0,
variants,
variantsLength,
likelySubtags,
sink,
err);
- return TRUE;
+ return true;
}
}
@@ -742,7 +742,7 @@ createLikelySubtagsString(
* Finally, try just the language.
**/
{
- const char* likelySubtags = NULL;
+ const char* likelySubtags = nullptr;
icu::CharString tagBuffer;
{
@@ -750,11 +750,11 @@ createLikelySubtagsString(
createTagString(
lang,
langLength,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
sink,
err);
@@ -773,12 +773,12 @@ createLikelySubtagsString(
goto error;
}
- if (likelySubtags != NULL) {
+ if (likelySubtags != nullptr) {
/* Always use the language tag from the
maximal string, since it may be more
specific than the one provided. */
createTagStringWithAlternates(
- NULL,
+ nullptr,
0,
script,
scriptLength,
@@ -789,11 +789,11 @@ createLikelySubtagsString(
likelySubtags,
sink,
err);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
error:
@@ -801,7 +801,7 @@ error:
*err = U_ILLEGAL_ARGUMENT_ERROR;
}
- return FALSE;
+ return false;
}
#define CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength) UPRV_BLOCK_MACRO_BEGIN { \
@@ -836,12 +836,12 @@ _uloc_addLikelySubtags(const char* localeID,
const char* trailing = "";
int32_t trailingLength = 0;
int32_t trailingIndex = 0;
- UBool success = FALSE;
+ UBool success = false;
if(U_FAILURE(*err)) {
goto error;
}
- if (localeID == NULL) {
+ if (localeID == nullptr) {
goto error;
}
@@ -901,7 +901,7 @@ error:
if (!U_FAILURE(*err)) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
}
- return FALSE;
+ return false;
}
// Add likely subtags to the sink
@@ -925,12 +925,12 @@ _uloc_minimizeSubtags(const char* localeID,
const char* trailing = "";
int32_t trailingLength = 0;
int32_t trailingIndex = 0;
- UBool successGetMax = FALSE;
+ UBool successGetMax = false;
if(U_FAILURE(*err)) {
goto error;
}
- else if (localeID == NULL) {
+ else if (localeID == nullptr) {
goto error;
}
@@ -974,7 +974,7 @@ _uloc_minimizeSubtags(const char* localeID,
scriptLength,
region,
regionLength,
- NULL,
+ nullptr,
0,
baseSink,
err);
@@ -1031,11 +1031,11 @@ _uloc_minimizeSubtags(const char* localeID,
createLikelySubtagsString(
lang,
langLength,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
tagSink,
err);
@@ -1053,9 +1053,9 @@ _uloc_minimizeSubtags(const char* localeID,
createTagString(
lang,
langLength,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
trailing,
trailingLength,
@@ -1076,11 +1076,11 @@ _uloc_minimizeSubtags(const char* localeID,
createLikelySubtagsString(
lang,
langLength,
- NULL,
+ nullptr,
0,
region,
regionLength,
- NULL,
+ nullptr,
0,
tagSink,
err);
@@ -1098,7 +1098,7 @@ _uloc_minimizeSubtags(const char* localeID,
createTagString(
lang,
langLength,
- NULL,
+ nullptr,
0,
region,
regionLength,
@@ -1124,9 +1124,9 @@ _uloc_minimizeSubtags(const char* localeID,
langLength,
script,
scriptLength,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
0,
tagSink,
err);
@@ -1146,7 +1146,7 @@ _uloc_minimizeSubtags(const char* localeID,
langLength,
script,
scriptLength,
- NULL,
+ nullptr,
0,
trailing,
trailingLength,
@@ -1248,7 +1248,7 @@ _ulocimp_addLikelySubtags(const char* localeID,
if (U_SUCCESS(*status)) {
return _uloc_addLikelySubtags(localeBuffer.getBuffer(), sink, status);
} else {
- return FALSE;
+ return false;
}
}
@@ -1320,14 +1320,14 @@ uloc_isRightToLeft(const char *locale) {
char lang[8];
int32_t langLength = uloc_getLanguage(locale, lang, UPRV_LENGTHOF(lang), &errorCode);
if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) {
- return FALSE;
+ return false;
}
if (langLength > 0) {
const char* langPtr = uprv_strstr(LANG_DIR_STRING, lang);
- if (langPtr != NULL) {
+ if (langPtr != nullptr) {
switch (langPtr[langLength]) {
- case '-': return FALSE;
- case '+': return TRUE;
+ case '-': return false;
+ case '+': return true;
default: break; // partial match of a longer code
}
}
@@ -1340,12 +1340,12 @@ uloc_isRightToLeft(const char *locale) {
ulocimp_addLikelySubtags(locale, sink, &errorCode);
}
if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) {
- return FALSE;
+ return false;
}
scriptLength = uloc_getScript(likely.data(), script, UPRV_LENGTHOF(script), &errorCode);
if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING ||
scriptLength == 0) {
- return FALSE;
+ return false;
}
}
UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script);
@@ -1392,7 +1392,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion,
if (U_FAILURE(*status)) {
rgLen = 0;
} else if (rgLen == 0 && inferRegion) {
- // no unicode_region_subtag but inferRegion TRUE, try likely subtags
+ // no unicode_region_subtag but inferRegion true, try likely subtags
rgStatus = U_ZERO_ERROR;
icu::CharString locBuf;
{
diff --git a/contrib/libs/icu/common/loclikelysubtags.cpp b/contrib/libs/icu/common/loclikelysubtags.cpp
index aa592e6ea80..e913c66a35b 100644
--- a/contrib/libs/icu/common/loclikelysubtags.cpp
+++ b/contrib/libs/icu/common/loclikelysubtags.cpp
@@ -233,7 +233,7 @@ private:
return false;
}
for (int i = 0; i < length; ++i) {
- stringArray.getValue(i, value); // returns TRUE because i < length
+ stringArray.getValue(i, value); // returns true because i < length
rawIndexes[i] = strings.add(value.getUnicodeString(errorCode), errorCode);
if (U_FAILURE(errorCode)) { return false; }
}
@@ -245,13 +245,13 @@ private:
namespace {
XLikelySubtags *gLikelySubtags = nullptr;
-UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
+UInitOnce gInitOnce {};
UBool U_CALLCONV cleanup() {
delete gLikelySubtags;
gLikelySubtags = nullptr;
gInitOnce.reset();
- return TRUE;
+ return true;
}
} // namespace
diff --git a/contrib/libs/icu/common/locmap.cpp b/contrib/libs/icu/common/locmap.cpp
index 29a5646385e..7a0e90e8bd9 100644
--- a/contrib/libs/icu/common/locmap.cpp
+++ b/contrib/libs/icu/common/locmap.cpp
@@ -1053,8 +1053,8 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
{
uint16_t langID;
uint32_t localeIndex;
- UBool bLookup = TRUE;
- const char *pPosixID = NULL;
+ UBool bLookup = true;
+ const char *pPosixID = nullptr;
#if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API
static_assert(ULOC_FULLNAME_CAPACITY > LOCALE_NAME_MAX_LENGTH, "Windows locale names have smaller length than ICU locale names.");
@@ -1074,7 +1074,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
if (tmpLen > 1) {
int32_t i = 0;
// Only need to look up in table if have _, eg for de-de_phoneb type alternate sort.
- bLookup = FALSE;
+ bLookup = false;
for (i = 0; i < UPRV_LENGTHOF(locName); i++)
{
locName[i] = (char)(windowsLocaleName[i]);
@@ -1088,7 +1088,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
// TODO: Should these be mapped from _phoneb to @collation=phonebook, etc.?
locName[i] = '\0';
tmpLen = i;
- bLookup = TRUE;
+ bLookup = true;
break;
}
else if (windowsLocaleName[i] == L'-')
@@ -1110,7 +1110,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
#endif
if (bLookup) {
- const char *pCandidate = NULL;
+ const char *pCandidate = nullptr;
langID = LANGUAGE_LCID(hostid);
for (localeIndex = 0; localeIndex < gLocaleCount; localeIndex++) {
@@ -1123,7 +1123,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
/* On Windows, when locale name has a variant, we still look up the hardcoded table.
If a match in the hardcoded table is longer than the Windows locale name without
variant, we use the one as the result */
- if (pCandidate && (pPosixID == NULL || uprv_strlen(pCandidate) > uprv_strlen(pPosixID))) {
+ if (pCandidate && (pPosixID == nullptr || uprv_strlen(pCandidate) > uprv_strlen(pPosixID))) {
pPosixID = pCandidate;
}
}
@@ -1201,7 +1201,7 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status)
char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {};
// this will change it from de_DE@collation=phonebook to de-DE-u-co-phonebk form
- (void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), FALSE, status);
+ (void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, status);
if (U_SUCCESS(*status))
{
diff --git a/contrib/libs/icu/common/locresdata.cpp b/contrib/libs/icu/common/locresdata.cpp
index d1d9a4729f1..7a0969dff58 100644
--- a/contrib/libs/icu/common/locresdata.cpp
+++ b/contrib/libs/icu/common/locresdata.cpp
@@ -41,7 +41,7 @@
* default locale because that would result in a mix of languages that is
* unpredictable to the programmer and most likely useless.
*/
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
uloc_getTableStringWithFallback(const char *path, const char *locale,
const char *tableKey, const char *subTableKey,
const char *itemKey,
@@ -49,7 +49,7 @@ uloc_getTableStringWithFallback(const char *path, const char *locale,
UErrorCode *pErrorCode)
{
/* char localeBuffer[ULOC_FULLNAME_CAPACITY*4];*/
- const UChar *item=NULL;
+ const char16_t *item=nullptr;
UErrorCode errorCode;
char explicitFallbackName[ULOC_FULLNAME_CAPACITY] = {0};
@@ -63,7 +63,7 @@ uloc_getTableStringWithFallback(const char *path, const char *locale,
if(U_FAILURE(errorCode)) {
/* total failure, not even root could be opened */
*pErrorCode=errorCode;
- return NULL;
+ return nullptr;
} else if(errorCode==U_USING_DEFAULT_WARNING ||
(errorCode==U_USING_FALLBACK_WARNING && *pErrorCode!=U_USING_DEFAULT_WARNING)
) {
@@ -76,7 +76,7 @@ uloc_getTableStringWithFallback(const char *path, const char *locale,
icu::StackUResourceBundle subTable;
ures_getByKeyWithFallback(rb.getAlias(), tableKey, table.getAlias(), &errorCode);
- if (subTableKey != NULL) {
+ if (subTableKey != nullptr) {
/*
ures_getByKeyWithFallback(table.getAlias(), subTableKey, subTable.getAlias(), &errorCode);
item = ures_getStringByKeyWithFallback(subTable.getAlias(), itemKey, pLength, &errorCode);
@@ -91,7 +91,7 @@ uloc_getTableStringWithFallback(const char *path, const char *locale,
if(U_SUCCESS(errorCode)){
item = ures_getStringByKeyWithFallback(table.getAlias(), itemKey, pLength, &errorCode);
if(U_FAILURE(errorCode)){
- const char* replacement = NULL;
+ const char* replacement = nullptr;
*pErrorCode = errorCode; /*save the errorCode*/
errorCode = U_ZERO_ERROR;
/* may be a deprecated code */
@@ -101,7 +101,7 @@ uloc_getTableStringWithFallback(const char *path, const char *locale,
replacement = uloc_getCurrentLanguageID(itemKey);
}
/*pointer comparison is ok since uloc_getCurrentCountryID & uloc_getCurrentLanguageID return the key itself is replacement is not found*/
- if(replacement!=NULL && itemKey != replacement){
+ if(replacement!=nullptr && itemKey != replacement){
item = ures_getStringByKeyWithFallback(table.getAlias(), replacement, pLength, &errorCode);
if(U_SUCCESS(errorCode)){
*pErrorCode = errorCode;
@@ -117,7 +117,7 @@ uloc_getTableStringWithFallback(const char *path, const char *locale,
/* still can't figure out ?.. try the fallback mechanism */
int32_t len = 0;
- const UChar* fallbackLocale = NULL;
+ const char16_t* fallbackLocale = nullptr;
*pErrorCode = errorCode;
errorCode = U_ZERO_ERROR;
@@ -162,12 +162,12 @@ _uloc_getOrientationHelper(const char* localeId,
uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status);
if (!U_FAILURE(*status)) {
- const UChar* const value =
+ const char16_t* const value =
uloc_getTableStringWithFallback(
- NULL,
+ nullptr,
localeBuffer,
"layout",
- NULL,
+ nullptr,
key,
&length,
status);
diff --git a/contrib/libs/icu/common/locutil.cpp b/contrib/libs/icu/common/locutil.cpp
index 3d9d69ff7ed..776d1d59636 100644
--- a/contrib/libs/icu/common/locutil.cpp
+++ b/contrib/libs/icu/common/locutil.cpp
@@ -21,12 +21,12 @@
#include "umutex.h"
// see LocaleUtility::getAvailableLocaleNames
-static icu::UInitOnce LocaleUtilityInitOnce = U_INITONCE_INITIALIZER;
-static icu::Hashtable * LocaleUtility_cache = NULL;
+static icu::UInitOnce LocaleUtilityInitOnce {};
+static icu::Hashtable * LocaleUtility_cache = nullptr;
-#define UNDERSCORE_CHAR ((UChar)0x005f)
-#define AT_SIGN_CHAR ((UChar)64)
-#define PERIOD_CHAR ((UChar)46)
+#define UNDERSCORE_CHAR ((char16_t)0x005f)
+#define AT_SIGN_CHAR ((char16_t)64)
+#define PERIOD_CHAR ((char16_t)46)
/*
******************************************************************
@@ -36,26 +36,26 @@ static icu::Hashtable * LocaleUtility_cache = NULL;
* Release all static memory held by Locale Utility.
*/
U_CDECL_BEGIN
-static UBool U_CALLCONV service_cleanup(void) {
+static UBool U_CALLCONV service_cleanup() {
if (LocaleUtility_cache) {
delete LocaleUtility_cache;
- LocaleUtility_cache = NULL;
+ LocaleUtility_cache = nullptr;
}
- return TRUE;
+ return true;
}
static void U_CALLCONV locale_utility_init(UErrorCode &status) {
using namespace icu;
- U_ASSERT(LocaleUtility_cache == NULL);
+ U_ASSERT(LocaleUtility_cache == nullptr);
ucln_common_registerCleanup(UCLN_COMMON_SERVICE, service_cleanup);
LocaleUtility_cache = new Hashtable(status);
if (U_FAILURE(status)) {
delete LocaleUtility_cache;
- LocaleUtility_cache = NULL;
+ LocaleUtility_cache = nullptr;
return;
}
- if (LocaleUtility_cache == NULL) {
+ if (LocaleUtility_cache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -69,7 +69,7 @@ U_NAMESPACE_BEGIN
UnicodeString&
LocaleUtility::canonicalLocaleString(const UnicodeString* id, UnicodeString& result)
{
- if (id == NULL) {
+ if (id == nullptr) {
result.setToBogus();
} else {
// Fix case only (no other changes) up to the first '@' or '.' or
@@ -94,14 +94,14 @@ LocaleUtility::canonicalLocaleString(const UnicodeString* id, UnicodeString& res
n = end;
}
for (; i < n; ++i) {
- UChar c = result.charAt(i);
+ char16_t c = result.charAt(i);
if (c >= 0x0041 && c <= 0x005a) {
c += 0x20;
result.setCharAt(i, c);
}
}
for (n = end; i < n; ++i) {
- UChar c = result.charAt(i);
+ char16_t c = result.charAt(i);
if (c >= 0x0061 && c <= 0x007a) {
c -= 0x20;
result.setCharAt(i, c);
@@ -112,7 +112,7 @@ LocaleUtility::canonicalLocaleString(const UnicodeString* id, UnicodeString& res
#if 0
// This code does a proper full level 2 canonicalization of id.
- // It's nasty to go from UChar to char to char to UChar -- but
+ // It's nasty to go from char16_t to char to char to char16_t -- but
// that's what you have to do to use the uloc_canonicalize
// function on UnicodeStrings.
@@ -172,7 +172,7 @@ LocaleUtility::initLocaleFromName(const UnicodeString& id, Locale& result)
int32_t prev, i;
prev = 0;
for(;;) {
- i = id.indexOf((UChar)0x40, prev);
+ 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);
@@ -214,45 +214,45 @@ LocaleUtility::getAvailableLocaleNames(const UnicodeString& bundleID)
UErrorCode status = U_ZERO_ERROR;
umtx_initOnce(LocaleUtilityInitOnce, locale_utility_init, status);
Hashtable *cache = LocaleUtility_cache;
- if (cache == NULL) {
+ if (cache == nullptr) {
// Catastrophic failure.
- return NULL;
+ return nullptr;
}
Hashtable* htp;
- umtx_lock(NULL);
+ umtx_lock(nullptr);
htp = (Hashtable*) cache->get(bundleID);
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
- if (htp == NULL) {
+ if (htp == nullptr) {
htp = new Hashtable(status);
if (htp && U_SUCCESS(status)) {
CharString cbundleID;
cbundleID.appendInvariantChars(bundleID, status);
- const char* path = cbundleID.isEmpty() ? NULL : cbundleID.data();
+ const char* path = cbundleID.isEmpty() ? nullptr : cbundleID.data();
icu::LocalUEnumerationPointer uenum(ures_openAvailableLocales(path, &status));
for (;;) {
- const UChar* id = uenum_unext(uenum.getAlias(), NULL, &status);
- if (id == NULL) {
+ const char16_t* id = uenum_unext(uenum.getAlias(), nullptr, &status);
+ if (id == nullptr) {
break;
}
htp->put(UnicodeString(id), (void*)htp, status);
}
if (U_FAILURE(status)) {
delete htp;
- return NULL;
+ return nullptr;
}
- umtx_lock(NULL);
+ umtx_lock(nullptr);
Hashtable *t = static_cast<Hashtable *>(cache->get(bundleID));
- if (t != NULL) {
+ if (t != nullptr) {
// Another thread raced through this code, creating the cache entry first.
// Discard ours and return theirs.
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
delete htp;
htp = t;
} else {
cache->put(bundleID, (void*)htp, status);
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
}
}
}
diff --git a/contrib/libs/icu/common/lsr.cpp b/contrib/libs/icu/common/lsr.cpp
index 1f0b69ab0fd..39eb46df27d 100644
--- a/contrib/libs/icu/common/lsr.cpp
+++ b/contrib/libs/icu/common/lsr.cpp
@@ -31,7 +31,7 @@ LSR::LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t
}
}
-LSR::LSR(LSR &&other) U_NOEXCEPT :
+LSR::LSR(LSR &&other) noexcept :
language(other.language), script(other.script), region(other.region), owned(other.owned),
regionIndex(other.regionIndex), flags(other.flags),
hashCode(other.hashCode) {
@@ -46,7 +46,7 @@ void LSR::deleteOwned() {
uprv_free(owned);
}
-LSR &LSR::operator=(LSR &&other) U_NOEXCEPT {
+LSR &LSR::operator=(LSR &&other) noexcept {
this->~LSR();
language = other.language;
script = other.script;
diff --git a/contrib/libs/icu/common/lsr.h b/contrib/libs/icu/common/lsr.h
index af993c11d60..a2f7c8bb155 100644
--- a/contrib/libs/icu/common/lsr.h
+++ b/contrib/libs/icu/common/lsr.h
@@ -45,7 +45,7 @@ struct LSR final : public UMemory {
*/
LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t f,
UErrorCode &errorCode);
- LSR(LSR &&other) U_NOEXCEPT;
+ LSR(LSR &&other) noexcept;
LSR(const LSR &other) = delete;
inline ~LSR() {
// Pure inline code for almost all instances.
@@ -54,7 +54,7 @@ struct LSR final : public UMemory {
}
}
- LSR &operator=(LSR &&other) U_NOEXCEPT;
+ LSR &operator=(LSR &&other) noexcept;
LSR &operator=(const LSR &other) = delete;
/**
diff --git a/contrib/libs/icu/common/lstmbe.cpp b/contrib/libs/icu/common/lstmbe.cpp
index 3793abceb3f..fb8eb01761c 100644
--- a/contrib/libs/icu/common/lstmbe.cpp
+++ b/contrib/libs/icu/common/lstmbe.cpp
@@ -1,8 +1,8 @@
// © 2021 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
+#include <complex>
#include <utility>
-#include <ctgmath>
#include "unicode/utypes.h"
@@ -361,7 +361,7 @@ struct LSTMData : public UMemory {
~LSTMData();
UHashtable* fDict;
EmbeddingType fType;
- const UChar* fName;
+ const char16_t* fName;
ConstArray2D fEmbedding;
ConstArray2D fForwardW;
ConstArray2D fForwardU;
@@ -394,7 +394,7 @@ LSTMData::LSTMData(UResourceBundle* rb, UErrorCode &status)
ures_getByKey(rb, "hunits", nullptr, &status));
if (U_FAILURE(status)) return;
int32_t hunits = ures_getInt(hunits_res.getAlias(), &status);
- const UChar* type = ures_getStringByKey(rb, "type", nullptr, &status);
+ const char16_t* type = ures_getStringByKey(rb, "type", nullptr, &status);
if (U_FAILURE(status)) return;
if (u_strCompare(type, -1, u"codepoints", -1, false) == 0) {
fType = CODE_POINTS;
@@ -419,7 +419,7 @@ LSTMData::LSTMData(UResourceBundle* rb, UErrorCode &status)
int32_t stringLength;
for (int32_t idx = 0; idx < num_index; idx++) {
stringArray.getValue(idx, value);
- const UChar* str = value.getString(stringLength, status);
+ const char16_t* str = value.getString(stringLength, status);
uhash_putiAllowZero(fDict, (void*)str, idx, &status);
if (U_FAILURE(status)) return;
#ifdef LSTM_VECTORIZER_DEBUG
@@ -477,7 +477,7 @@ public:
UVector32 &offsets, UVector32 &indices,
UErrorCode &status) const = 0;
protected:
- int32_t stringToIndex(const UChar* str) const {
+ int32_t stringToIndex(const char16_t* str) const {
UBool found = false;
int32_t ret = uhash_getiAndFound(fDict, (const void*)str, &found);
if (!found) {
@@ -524,13 +524,13 @@ void CodePointsVectorizer::vectorize(
if (U_FAILURE(status)) return;
utext_setNativeIndex(text, startPos);
int32_t current;
- UChar str[2] = {0, 0};
+ char16_t str[2] = {0, 0};
while (U_SUCCESS(status) &&
(current = (int32_t)utext_getNativeIndex(text)) < endPos) {
// Since the LSTMBreakEngine is currently only accept chars in BMP,
// we can ignore the possibility of hitting supplementary code
// point.
- str[0] = (UChar) utext_next32(text);
+ str[0] = (char16_t) utext_next32(text);
U_ASSERT(!U_IS_SURROGATE(str[0]));
offsets.addElement(current, status);
indices.addElement(stringToIndex(str), status);
@@ -576,7 +576,7 @@ void GraphemeClusterVectorizer::vectorize(
}
int32_t last = startPos;
int32_t current = startPos;
- UChar str[MAX_GRAPHEME_CLSTER_LENGTH];
+ char16_t str[MAX_GRAPHEME_CLSTER_LENGTH];
while ((current = graphemeIter->next()) != BreakIterator::DONE) {
if (current >= endPos) {
break;
@@ -639,6 +639,7 @@ LSTMBreakEngine::divideUpDictionaryRange( UText *text,
int32_t startPos,
int32_t endPos,
UVector32 &foundBreaks,
+ UBool /* isPhraseBreaking */,
UErrorCode& status) const {
if (U_FAILURE(status)) return 0;
int32_t beginFoundBreakSize = foundBreaks.size();
@@ -776,7 +777,7 @@ LSTMBreakEngine::~LSTMBreakEngine() {
delete fVectorizer;
}
-const UChar* LSTMBreakEngine::name() const {
+const char16_t* LSTMBreakEngine::name() const {
return fData->fName;
}
@@ -845,7 +846,7 @@ U_CAPI void U_EXPORT2 DeleteLSTMData(const LSTMData* data)
delete data;
}
-U_CAPI const UChar* U_EXPORT2 LSTMDataName(const LSTMData* data)
+U_CAPI const char16_t* U_EXPORT2 LSTMDataName(const LSTMData* data)
{
return data->fName;
}
diff --git a/contrib/libs/icu/common/lstmbe.h b/contrib/libs/icu/common/lstmbe.h
index c3f7ecf8154..77c97d85fa8 100644
--- a/contrib/libs/icu/common/lstmbe.h
+++ b/contrib/libs/icu/common/lstmbe.h
@@ -45,7 +45,7 @@ public:
*/
virtual ~LSTMBreakEngine();
- virtual const UChar* name() const;
+ virtual const char16_t* name() const;
protected:
/**
@@ -62,6 +62,7 @@ protected:
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks,
+ UBool isPhraseBreaking,
UErrorCode& status) const override;
private:
const LSTMData* fData;
@@ -78,7 +79,7 @@ U_CAPI const LSTMData* U_EXPORT2 CreateLSTMDataForScript(
UScriptCode script, UErrorCode& status);
U_CAPI void U_EXPORT2 DeleteLSTMData(const LSTMData* data);
-U_CAPI const UChar* U_EXPORT2 LSTMDataName(const LSTMData* data);
+U_CAPI const char16_t* U_EXPORT2 LSTMDataName(const LSTMData* data);
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/messageimpl.h b/contrib/libs/icu/common/messageimpl.h
index a56479066bc..061df9189d5 100644
--- a/contrib/libs/icu/common/messageimpl.h
+++ b/contrib/libs/icu/common/messageimpl.h
@@ -55,7 +55,7 @@ public:
UnicodeString &result);
private:
- MessageImpl(); // no constructor: all static methods
+ MessageImpl() = delete; // no constructor: all static methods
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/messagepattern.cpp b/contrib/libs/icu/common/messagepattern.cpp
index 66fd2f4c93b..82cb638e4ed 100644
--- a/contrib/libs/icu/common/messagepattern.cpp
+++ b/contrib/libs/icu/common/messagepattern.cpp
@@ -32,56 +32,56 @@ U_NAMESPACE_BEGIN
// Unicode character/code point constants ---------------------------------- ***
-static const UChar u_pound=0x23;
-static const UChar u_apos=0x27;
-static const UChar u_plus=0x2B;
-static const UChar u_comma=0x2C;
-static const UChar u_minus=0x2D;
-static const UChar u_dot=0x2E;
-static const UChar u_colon=0x3A;
-static const UChar u_lessThan=0x3C;
-static const UChar u_equal=0x3D;
-static const UChar u_A=0x41;
-static const UChar u_C=0x43;
-static const UChar u_D=0x44;
-static const UChar u_E=0x45;
-static const UChar u_H=0x48;
-static const UChar u_I=0x49;
-static const UChar u_L=0x4C;
-static const UChar u_N=0x4E;
-static const UChar u_O=0x4F;
-static const UChar u_P=0x50;
-static const UChar u_R=0x52;
-static const UChar u_S=0x53;
-static const UChar u_T=0x54;
-static const UChar u_U=0x55;
-static const UChar u_Z=0x5A;
-static const UChar u_a=0x61;
-static const UChar u_c=0x63;
-static const UChar u_d=0x64;
-static const UChar u_e=0x65;
-static const UChar u_f=0x66;
-static const UChar u_h=0x68;
-static const UChar u_i=0x69;
-static const UChar u_l=0x6C;
-static const UChar u_n=0x6E;
-static const UChar u_o=0x6F;
-static const UChar u_p=0x70;
-static const UChar u_r=0x72;
-static const UChar u_s=0x73;
-static const UChar u_t=0x74;
-static const UChar u_u=0x75;
-static const UChar u_z=0x7A;
-static const UChar u_leftCurlyBrace=0x7B;
-static const UChar u_pipe=0x7C;
-static const UChar u_rightCurlyBrace=0x7D;
-static const UChar u_lessOrEqual=0x2264; // U+2264 is <=
-
-static const UChar kOffsetColon[]={ // "offset:"
+static const char16_t u_pound=0x23;
+static const char16_t u_apos=0x27;
+static const char16_t u_plus=0x2B;
+static const char16_t u_comma=0x2C;
+static const char16_t u_minus=0x2D;
+static const char16_t u_dot=0x2E;
+static const char16_t u_colon=0x3A;
+static const char16_t u_lessThan=0x3C;
+static const char16_t u_equal=0x3D;
+static const char16_t u_A=0x41;
+static const char16_t u_C=0x43;
+static const char16_t u_D=0x44;
+static const char16_t u_E=0x45;
+static const char16_t u_H=0x48;
+static const char16_t u_I=0x49;
+static const char16_t u_L=0x4C;
+static const char16_t u_N=0x4E;
+static const char16_t u_O=0x4F;
+static const char16_t u_P=0x50;
+static const char16_t u_R=0x52;
+static const char16_t u_S=0x53;
+static const char16_t u_T=0x54;
+static const char16_t u_U=0x55;
+static const char16_t u_Z=0x5A;
+static const char16_t u_a=0x61;
+static const char16_t u_c=0x63;
+static const char16_t u_d=0x64;
+static const char16_t u_e=0x65;
+static const char16_t u_f=0x66;
+static const char16_t u_h=0x68;
+static const char16_t u_i=0x69;
+static const char16_t u_l=0x6C;
+static const char16_t u_n=0x6E;
+static const char16_t u_o=0x6F;
+static const char16_t u_p=0x70;
+static const char16_t u_r=0x72;
+static const char16_t u_s=0x73;
+static const char16_t u_t=0x74;
+static const char16_t u_u=0x75;
+static const char16_t u_z=0x7A;
+static const char16_t u_leftCurlyBrace=0x7B;
+static const char16_t u_pipe=0x7C;
+static const char16_t u_rightCurlyBrace=0x7D;
+static const char16_t u_lessOrEqual=0x2264; // U+2264 is <=
+
+static const char16_t kOffsetColon[]={ // "offset:"
u_o, u_f, u_f, u_s, u_e, u_t, u_colon
};
-static const UChar kOther[]={ // "other"
+static const char16_t kOther[]={ // "other"
u_o, u_t, u_h, u_e, u_r
};
@@ -97,9 +97,9 @@ public:
UBool ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode);
UBool equals(const MessagePatternList<T, stackCapacity> &other, int32_t length) const {
for(int32_t i=0; i<length; ++i) {
- if(a[i]!=other.a[i]) { return FALSE; }
+ if(a[i]!=other.a[i]) { return false; }
}
- return TRUE;
+ return true;
}
MaybeStackArray<T, stackCapacity> a;
@@ -112,7 +112,7 @@ MessagePatternList<T, stackCapacity>::copyFrom(
int32_t length,
UErrorCode &errorCode) {
if(U_SUCCESS(errorCode) && length>0) {
- if(length>a.getCapacity() && NULL==a.resize(length)) {
+ if(length>a.getCapacity() && nullptr==a.resize(length)) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -124,13 +124,13 @@ template<typename T, int32_t stackCapacity>
UBool
MessagePatternList<T, stackCapacity>::ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
- if(a.getCapacity()>oldLength || a.resize(2*oldLength, oldLength)!=NULL) {
- return TRUE;
+ if(a.getCapacity()>oldLength || a.resize(2*oldLength, oldLength)!=nullptr) {
+ return true;
}
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
// MessagePatternList specializations -------------------------------------- ***
@@ -145,25 +145,25 @@ class MessagePatternPartsList : public MessagePatternList<MessagePattern::Part,
MessagePattern::MessagePattern(UErrorCode &errorCode)
: aposMode(UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE),
- partsList(NULL), parts(NULL), partsLength(0),
- numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
- hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) {
+ partsList(nullptr), parts(nullptr), partsLength(0),
+ numericValuesList(nullptr), numericValues(nullptr), numericValuesLength(0),
+ hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) {
init(errorCode);
}
MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode)
: aposMode(mode),
- partsList(NULL), parts(NULL), partsLength(0),
- numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
- hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) {
+ partsList(nullptr), parts(nullptr), partsLength(0),
+ numericValuesList(nullptr), numericValues(nullptr), numericValuesLength(0),
+ hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) {
init(errorCode);
}
MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode)
: aposMode(UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE),
- partsList(NULL), parts(NULL), partsLength(0),
- numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
- hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) {
+ partsList(nullptr), parts(nullptr), partsLength(0),
+ numericValuesList(nullptr), numericValues(nullptr), numericValuesLength(0),
+ hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) {
if(init(errorCode)) {
parse(pattern, parseError, errorCode);
}
@@ -172,21 +172,21 @@ MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseE
UBool
MessagePattern::init(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
partsList=new MessagePatternPartsList();
- if(partsList==NULL) {
+ if(partsList==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
parts=partsList->a.getAlias();
- return TRUE;
+ return true;
}
MessagePattern::MessagePattern(const MessagePattern &other)
: UObject(other), aposMode(other.aposMode), msg(other.msg),
- partsList(NULL), parts(NULL), partsLength(0),
- numericValuesList(NULL), numericValues(NULL), numericValuesLength(0),
+ partsList(nullptr), parts(nullptr), partsLength(0),
+ numericValuesList(nullptr), numericValues(nullptr), numericValuesLength(0),
hasArgNames(other.hasArgNames), hasArgNumbers(other.hasArgNumbers),
needsAutoQuoting(other.needsAutoQuoting) {
UErrorCode errorCode=U_ZERO_ERROR;
@@ -215,46 +215,46 @@ MessagePattern::operator=(const MessagePattern &other) {
UBool
MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
- parts=NULL;
+ parts=nullptr;
partsLength=0;
- numericValues=NULL;
+ numericValues=nullptr;
numericValuesLength=0;
- if(partsList==NULL) {
+ if(partsList==nullptr) {
partsList=new MessagePatternPartsList();
- if(partsList==NULL) {
+ if(partsList==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
parts=partsList->a.getAlias();
}
if(other.partsLength>0) {
partsList->copyFrom(*other.partsList, other.partsLength, errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
parts=partsList->a.getAlias();
partsLength=other.partsLength;
}
if(other.numericValuesLength>0) {
- if(numericValuesList==NULL) {
+ if(numericValuesList==nullptr) {
numericValuesList=new MessagePatternDoubleList();
- if(numericValuesList==NULL) {
+ if(numericValuesList==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
numericValues=numericValuesList->a.getAlias();
}
numericValuesList->copyFrom(
*other.numericValuesList, other.numericValuesLength, errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
numericValues=numericValuesList->a.getAlias();
numericValuesLength=other.numericValuesLength;
}
- return TRUE;
+ return true;
}
MessagePattern::~MessagePattern() {
@@ -303,8 +303,8 @@ void
MessagePattern::clear() {
// Mostly the same as preParse().
msg.remove();
- hasArgNames=hasArgNumbers=FALSE;
- needsAutoQuoting=FALSE;
+ hasArgNames=hasArgNumbers=false;
+ needsAutoQuoting=false;
partsLength=0;
numericValuesLength=0;
}
@@ -351,7 +351,7 @@ MessagePattern::autoQuoteApostropheDeep() const {
for(int32_t i=count; i>0;) {
const Part &part=getPart(--i);
if(part.getType()==UMSGPAT_PART_TYPE_INSERT_CHAR) {
- modified.insert(part.index, (UChar)part.value);
+ modified.insert(part.index, (char16_t)part.value);
}
}
return modified;
@@ -407,25 +407,25 @@ MessagePattern::preParse(const UnicodeString &pattern, UParseError *parseError,
if(U_FAILURE(errorCode)) {
return;
}
- if(parseError!=NULL) {
+ if(parseError!=nullptr) {
parseError->line=0;
parseError->offset=0;
parseError->preContext[0]=0;
parseError->postContext[0]=0;
}
msg=pattern;
- hasArgNames=hasArgNumbers=FALSE;
- needsAutoQuoting=FALSE;
+ hasArgNames=hasArgNumbers=false;
+ needsAutoQuoting=false;
partsLength=0;
numericValuesLength=0;
}
void
MessagePattern::postParse() {
- if(partsList!=NULL) {
+ if(partsList!=nullptr) {
parts=partsList->a.getAlias();
}
- if(numericValuesList!=NULL) {
+ if(numericValuesList!=nullptr) {
numericValues=numericValuesList->a.getAlias();
}
}
@@ -451,14 +451,14 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength,
if(index>=msg.length()) {
break;
}
- UChar c=msg.charAt(index++);
+ char16_t c=msg.charAt(index++);
if(c==u_apos) {
if(index==msg.length()) {
// The apostrophe is the last character in the pattern.
// Add a Part for auto-quoting.
addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0,
u_apos, errorCode); // value=char to be inserted
- needsAutoQuoting=TRUE;
+ needsAutoQuoting=true;
} else {
c=msg.charAt(index);
if(c==u_apos) {
@@ -491,7 +491,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength,
// Add a Part for auto-quoting.
addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0,
u_apos, errorCode); // value=char to be inserted
- needsAutoQuoting=TRUE;
+ needsAutoQuoting=true;
break;
}
}
@@ -500,7 +500,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength,
// Add a Part for auto-quoting.
addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0,
u_apos, errorCode); // value=char to be inserted
- needsAutoQuoting=TRUE;
+ needsAutoQuoting=true;
}
}
} else if(UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(parentType) && c==u_pound) {
@@ -560,7 +560,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
- hasArgNumbers=TRUE;
+ hasArgNumbers=true;
addPart(UMSGPAT_PART_TYPE_ARG_NUMBER, nameIndex, length, number, errorCode);
} else if(number==UMSGPAT_ARG_NAME_NOT_NUMBER) {
int32_t length=index-nameIndex;
@@ -569,7 +569,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
- hasArgNames=TRUE;
+ hasArgNames=true;
addPart(UMSGPAT_PART_TYPE_ARG_NAME, nameIndex, length, 0, errorCode);
} else { // number<-1 (ARG_NAME_NOT_VALID)
setParseError(parseError, nameIndex); // Bad argument syntax.
@@ -582,7 +582,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL
errorCode=U_UNMATCHED_BRACES;
return 0;
}
- UChar c=msg.charAt(index);
+ char16_t c=msg.charAt(index);
if(c==u_rightCurlyBrace) {
// all done
} else if(c!=u_comma) {
@@ -663,7 +663,7 @@ MessagePattern::parseSimpleStyle(int32_t index, UParseError *parseError, UErrorC
int32_t start=index;
int32_t nestedBraces=0;
while(index<msg.length()) {
- UChar c=msg.charAt(index++);
+ char16_t c=msg.charAt(index++);
if(c==u_apos) {
// Treat apostrophe as quoting but include it in the style part.
// Find the end of the quoted literal text.
@@ -727,7 +727,7 @@ MessagePattern::parseChoiceStyle(int32_t index, int32_t nestingLevel,
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
- parseDouble(numberIndex, index, TRUE, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
+ parseDouble(numberIndex, index, true, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
if(U_FAILURE(errorCode)) {
return 0;
}
@@ -738,7 +738,7 @@ MessagePattern::parseChoiceStyle(int32_t index, int32_t nestingLevel,
errorCode=U_PATTERN_SYNTAX_ERROR;
return 0;
}
- UChar c=msg.charAt(index);
+ char16_t c=msg.charAt(index);
if(!(c==u_pound || c==u_lessThan || c==u_lessOrEqual)) { // U+2264 is <=
setParseError(parseError, start); // Expected choice separator (#<\u2264) instead of c.
errorCode=U_PATTERN_SYNTAX_ERROR;
@@ -774,8 +774,8 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
return 0;
}
int32_t start=index;
- UBool isEmpty=TRUE;
- UBool hasOther=FALSE;
+ UBool isEmpty=true;
+ UBool hasOther=false;
for(;;) {
// First, collect the selector looking for a small set of terminators.
// It would be a little faster to consider the syntax of each possible
@@ -811,7 +811,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
return 0;
}
addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode);
- parseDouble(selectorIndex+1, index, FALSE,
+ parseDouble(selectorIndex+1, index, false,
parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
} else {
index=skipIdentifier(index);
@@ -845,12 +845,12 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
- parseDouble(valueIndex, index, FALSE,
+ parseDouble(valueIndex, index, false,
parseError, errorCode); // adds ARG_INT or ARG_DOUBLE
if(U_FAILURE(errorCode)) {
return 0;
}
- isEmpty=FALSE;
+ isEmpty=false;
continue; // no message fragment after the offset
} else {
// normal selector word
@@ -861,7 +861,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
}
addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode);
if(0==msg.compare(selectorIndex, length, kOther, 0, 5)) {
- hasOther=TRUE;
+ hasOther=true;
}
}
}
@@ -880,7 +880,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType,
if(U_FAILURE(errorCode)) {
return 0;
}
- isEmpty=FALSE;
+ isEmpty=false;
}
}
@@ -895,17 +895,17 @@ MessagePattern::parseArgNumber(const UnicodeString &s, int32_t start, int32_t li
int32_t number;
// Defer numeric errors until we know there are only digits.
UBool badNumber;
- UChar c=s.charAt(start++);
+ char16_t c=s.charAt(start++);
if(c==0x30) {
if(start==limit) {
return 0;
} else {
number=0;
- badNumber=TRUE; // leading zero
+ badNumber=true; // leading zero
}
} else if(0x31<=c && c<=0x39) {
number=c-0x30;
- badNumber=FALSE;
+ badNumber=false;
} else {
return UMSGPAT_ARG_NAME_NOT_NUMBER;
}
@@ -913,7 +913,7 @@ MessagePattern::parseArgNumber(const UnicodeString &s, int32_t start, int32_t li
c=s.charAt(start++);
if(0x30<=c && c<=0x39) {
if(number>=INT32_MAX/10) {
- badNumber=TRUE; // overflow
+ badNumber=true; // overflow
}
number=number*10+(c-0x30);
} else {
@@ -941,7 +941,7 @@ MessagePattern::parseDouble(int32_t start, int32_t limit, UBool allowInfinity,
int32_t value=0;
int32_t isNegative=0; // not boolean so that we can easily add it to value
int32_t index=start;
- UChar c=msg.charAt(index++);
+ char16_t c=msg.charAt(index++);
if(c==u_minus) {
isNegative=1;
if(index==limit) {
@@ -1004,17 +1004,17 @@ MessagePattern::parseDouble(int32_t start, int32_t limit, UBool allowInfinity,
int32_t
MessagePattern::skipWhiteSpace(int32_t index) {
- const UChar *s=msg.getBuffer();
+ const char16_t *s=msg.getBuffer();
int32_t msgLength=msg.length();
- const UChar *t=PatternProps::skipWhiteSpace(s+index, msgLength-index);
+ const char16_t *t=PatternProps::skipWhiteSpace(s+index, msgLength-index);
return (int32_t)(t-s);
}
int32_t
MessagePattern::skipIdentifier(int32_t index) {
- const UChar *s=msg.getBuffer();
+ const char16_t *s=msg.getBuffer();
int32_t msgLength=msg.length();
- const UChar *t=PatternProps::skipIdentifier(s+index, msgLength-index);
+ const char16_t *t=PatternProps::skipIdentifier(s+index, msgLength-index);
return (int32_t)(t-s);
}
@@ -1022,7 +1022,7 @@ int32_t
MessagePattern::skipDouble(int32_t index) {
int32_t msgLength=msg.length();
while(index<msgLength) {
- UChar c=msg.charAt(index);
+ char16_t c=msg.charAt(index);
// U+221E: Allow the infinity symbol, for ChoiceFormat patterns.
if((c<0x30 && c!=u_plus && c!=u_minus && c!=u_dot) || (c>0x39 && c!=u_e && c!=u_E && c!=0x221e)) {
break;
@@ -1039,7 +1039,7 @@ MessagePattern::isArgTypeChar(UChar32 c) {
UBool
MessagePattern::isChoice(int32_t index) {
- UChar c;
+ char16_t c;
return
((c=msg.charAt(index++))==u_c || c==u_C) &&
((c=msg.charAt(index++))==u_h || c==u_H) &&
@@ -1051,7 +1051,7 @@ MessagePattern::isChoice(int32_t index) {
UBool
MessagePattern::isPlural(int32_t index) {
- UChar c;
+ char16_t c;
return
((c=msg.charAt(index++))==u_p || c==u_P) &&
((c=msg.charAt(index++))==u_l || c==u_L) &&
@@ -1063,7 +1063,7 @@ MessagePattern::isPlural(int32_t index) {
UBool
MessagePattern::isSelect(int32_t index) {
- UChar c;
+ char16_t c;
return
((c=msg.charAt(index++))==u_s || c==u_S) &&
((c=msg.charAt(index++))==u_e || c==u_E) &&
@@ -1075,7 +1075,7 @@ MessagePattern::isSelect(int32_t index) {
UBool
MessagePattern::isOrdinal(int32_t index) {
- UChar c;
+ char16_t c;
return
((c=msg.charAt(index++))==u_o || c==u_O) &&
((c=msg.charAt(index++))==u_r || c==u_R) &&
@@ -1127,9 +1127,9 @@ MessagePattern::addArgDoublePart(double numericValue, int32_t start, int32_t len
return;
}
int32_t numericIndex=numericValuesLength;
- if(numericValuesList==NULL) {
+ if(numericValuesList==nullptr) {
numericValuesList=new MessagePatternDoubleList();
- if(numericValuesList==NULL) {
+ if(numericValuesList==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1147,7 +1147,7 @@ MessagePattern::addArgDoublePart(double numericValue, int32_t start, int32_t len
void
MessagePattern::setParseError(UParseError *parseError, int32_t index) {
- if(parseError==NULL) {
+ if(parseError==nullptr) {
return;
}
parseError->offset=index;
diff --git a/contrib/libs/icu/common/mlbe.cpp b/contrib/libs/icu/common/mlbe.cpp
new file mode 100644
index 00000000000..7e734f2c8ad
--- /dev/null
+++ b/contrib/libs/icu/common/mlbe.cpp
@@ -0,0 +1,270 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "cmemory.h"
+#include "mlbe.h"
+#include "uassert.h"
+#include "ubrkimpl.h"
+#include "unicode/resbund.h"
+#include "unicode/udata.h"
+#include "unicode/utf16.h"
+#include "uresimp.h"
+#include "util.h"
+#include "uvectr32.h"
+
+U_NAMESPACE_BEGIN
+
+enum class ModelIndex { kUWStart = 0, kBWStart = 6, kTWStart = 9 };
+
+MlBreakEngine::MlBreakEngine(const UnicodeSet &digitOrOpenPunctuationOrAlphabetSet,
+ const UnicodeSet &closePunctuationSet, UErrorCode &status)
+ : fDigitOrOpenPunctuationOrAlphabetSet(digitOrOpenPunctuationOrAlphabetSet),
+ fClosePunctuationSet(closePunctuationSet),
+ fNegativeSum(0) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ loadMLModel(status);
+}
+
+MlBreakEngine::~MlBreakEngine() {}
+
+int32_t MlBreakEngine::divideUpRange(UText *inText, int32_t rangeStart, int32_t rangeEnd,
+ UVector32 &foundBreaks, const UnicodeString &inString,
+ const LocalPointer<UVector32> &inputMap,
+ UErrorCode &status) const {
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ if (rangeStart >= rangeEnd) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+ UVector32 boundary(inString.countChar32() + 1, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ int32_t numBreaks = 0;
+ int32_t codePointLength = inString.countChar32();
+ // The ML algorithm groups six char and evaluates whether the 4th char is a breakpoint.
+ // In each iteration, it evaluates the 4th char and then moves forward one char like a sliding
+ // window. Initially, the first six values in the indexList are [-1, -1, 0, 1, 2, 3]. After
+ // moving forward, finally the last six values in the indexList are
+ // [length-4, length-3, length-2, length-1, -1, -1]. The "+4" here means four extra "-1".
+ int32_t indexSize = codePointLength + 4;
+ int32_t *indexList = (int32_t *)uprv_malloc(indexSize * sizeof(int32_t));
+ if (indexList == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return 0;
+ }
+ int32_t numCodeUnits = initIndexList(inString, indexList, status);
+
+ // Add a break for the start.
+ boundary.addElement(0, status);
+ numBreaks++;
+ if (U_FAILURE(status)) return 0;
+
+ for (int32_t idx = 0; idx + 1 < codePointLength && U_SUCCESS(status); idx++) {
+ numBreaks =
+ evaluateBreakpoint(inString, indexList, idx, numCodeUnits, numBreaks, boundary, status);
+ if (idx + 4 < codePointLength) {
+ indexList[idx + 6] = numCodeUnits;
+ numCodeUnits += U16_LENGTH(inString.char32At(indexList[idx + 6]));
+ }
+ }
+ uprv_free(indexList);
+
+ if (U_FAILURE(status)) return 0;
+
+ // Add a break for the end if there is not one there already.
+ if (boundary.lastElementi() != inString.countChar32()) {
+ boundary.addElement(inString.countChar32(), status);
+ numBreaks++;
+ }
+
+ int32_t prevCPPos = -1;
+ int32_t prevUTextPos = -1;
+ int32_t correctedNumBreaks = 0;
+ for (int32_t i = 0; i < numBreaks; i++) {
+ int32_t cpPos = boundary.elementAti(i);
+ int32_t utextPos = inputMap.isValid() ? inputMap->elementAti(cpPos) : cpPos + rangeStart;
+ U_ASSERT(cpPos > prevCPPos);
+ U_ASSERT(utextPos >= prevUTextPos);
+
+ if (utextPos > prevUTextPos) {
+ if (utextPos != rangeStart ||
+ (utextPos > 0 &&
+ fClosePunctuationSet.contains(utext_char32At(inText, utextPos - 1)))) {
+ foundBreaks.push(utextPos, status);
+ correctedNumBreaks++;
+ }
+ } else {
+ // Normalization expanded the input text, the dictionary found a boundary
+ // within the expansion, giving two boundaries with the same index in the
+ // original text. Ignore the second. See ticket #12918.
+ --numBreaks;
+ }
+ prevCPPos = cpPos;
+ prevUTextPos = utextPos;
+ }
+ (void)prevCPPos; // suppress compiler warnings about unused variable
+
+ UChar32 nextChar = utext_char32At(inText, rangeEnd);
+ if (!foundBreaks.isEmpty() && foundBreaks.peeki() == rangeEnd) {
+ // In phrase breaking, there has to be a breakpoint between Cj character and
+ // the number/open punctuation.
+ // E.g. る文字「そうだ、京都」->る▁文字▁「そうだ、▁京都」-> breakpoint between 字 and「
+ // E.g. 乗車率90%程度だろうか -> 乗車▁率▁90%▁程度だろうか -> breakpoint between 率 and 9
+ // E.g. しかもロゴがUnicode! -> しかも▁ロゴが▁Unicode!-> breakpoint between が and U
+ if (!fDigitOrOpenPunctuationOrAlphabetSet.contains(nextChar)) {
+ foundBreaks.popi();
+ correctedNumBreaks--;
+ }
+ }
+
+ return correctedNumBreaks;
+}
+
+int32_t MlBreakEngine::evaluateBreakpoint(const UnicodeString &inString, int32_t *indexList,
+ int32_t startIdx, int32_t numCodeUnits, int32_t numBreaks,
+ UVector32 &boundary, UErrorCode &status) const {
+ if (U_FAILURE(status)) {
+ return numBreaks;
+ }
+ int32_t start = 0, end = 0;
+ int32_t score = fNegativeSum;
+
+ for (int i = 0; i < 6; i++) {
+ // UW1 ~ UW6
+ start = startIdx + i;
+ if (indexList[start] != -1) {
+ end = (indexList[start + 1] != -1) ? indexList[start + 1] : numCodeUnits;
+ score += fModel[static_cast<int32_t>(ModelIndex::kUWStart) + i].geti(
+ inString.tempSubString(indexList[start], end - indexList[start]));
+ }
+ }
+ for (int i = 0; i < 3; i++) {
+ // BW1 ~ BW3
+ start = startIdx + i + 1;
+ if (indexList[start] != -1 && indexList[start + 1] != -1) {
+ end = (indexList[start + 2] != -1) ? indexList[start + 2] : numCodeUnits;
+ score += fModel[static_cast<int32_t>(ModelIndex::kBWStart) + i].geti(
+ inString.tempSubString(indexList[start], end - indexList[start]));
+ }
+ }
+ for (int i = 0; i < 4; i++) {
+ // TW1 ~ TW4
+ start = startIdx + i;
+ if (indexList[start] != -1 && indexList[start + 1] != -1 && indexList[start + 2] != -1) {
+ end = (indexList[start + 3] != -1) ? indexList[start + 3] : numCodeUnits;
+ score += fModel[static_cast<int32_t>(ModelIndex::kTWStart) + i].geti(
+ inString.tempSubString(indexList[start], end - indexList[start]));
+ }
+ }
+
+ if (score > 0) {
+ boundary.addElement(startIdx + 1, status);
+ numBreaks++;
+ }
+ return numBreaks;
+}
+
+int32_t MlBreakEngine::initIndexList(const UnicodeString &inString, int32_t *indexList,
+ UErrorCode &status) const {
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ int32_t index = 0;
+ int32_t length = inString.countChar32();
+ // Set all (lenght+4) items inside indexLength to -1 presuming -1 is 4 bytes of 0xff.
+ uprv_memset(indexList, 0xff, (length + 4) * sizeof(int32_t));
+ if (length > 0) {
+ indexList[2] = 0;
+ index = U16_LENGTH(inString.char32At(0));
+ if (length > 1) {
+ indexList[3] = index;
+ index += U16_LENGTH(inString.char32At(index));
+ if (length > 2) {
+ indexList[4] = index;
+ index += U16_LENGTH(inString.char32At(index));
+ if (length > 3) {
+ indexList[5] = index;
+ index += U16_LENGTH(inString.char32At(index));
+ }
+ }
+ }
+ }
+ return index;
+}
+
+void MlBreakEngine::loadMLModel(UErrorCode &error) {
+ // BudouX's model consists of thirteen categories, each of which is make up of pairs of the
+ // feature and its score. As integrating it into jaml.txt, we define thirteen kinds of key and
+ // value to represent the feature and the corresponding score respectively.
+
+ if (U_FAILURE(error)) return;
+
+ UnicodeString key;
+ StackUResourceBundle stackTempBundle;
+ ResourceDataValue modelKey;
+
+ LocalUResourceBundlePointer rbp(ures_openDirect(U_ICUDATA_BRKITR, "jaml", &error));
+ UResourceBundle *rb = rbp.getAlias();
+ if (U_FAILURE(error)) return;
+
+ int32_t index = 0;
+ initKeyValue(rb, "UW1Keys", "UW1Values", fModel[index++], error);
+ initKeyValue(rb, "UW2Keys", "UW2Values", fModel[index++], error);
+ initKeyValue(rb, "UW3Keys", "UW3Values", fModel[index++], error);
+ initKeyValue(rb, "UW4Keys", "UW4Values", fModel[index++], error);
+ initKeyValue(rb, "UW5Keys", "UW5Values", fModel[index++], error);
+ initKeyValue(rb, "UW6Keys", "UW6Values", fModel[index++], error);
+ initKeyValue(rb, "BW1Keys", "BW1Values", fModel[index++], error);
+ initKeyValue(rb, "BW2Keys", "BW2Values", fModel[index++], error);
+ initKeyValue(rb, "BW3Keys", "BW3Values", fModel[index++], error);
+ initKeyValue(rb, "TW1Keys", "TW1Values", fModel[index++], error);
+ initKeyValue(rb, "TW2Keys", "TW2Values", fModel[index++], error);
+ initKeyValue(rb, "TW3Keys", "TW3Values", fModel[index++], error);
+ initKeyValue(rb, "TW4Keys", "TW4Values", fModel[index++], error);
+ fNegativeSum /= 2;
+}
+
+void MlBreakEngine::initKeyValue(UResourceBundle *rb, const char *keyName, const char *valueName,
+ Hashtable &model, UErrorCode &error) {
+ int32_t keySize = 0;
+ int32_t valueSize = 0;
+ int32_t stringLength = 0;
+ UnicodeString key;
+ StackUResourceBundle stackTempBundle;
+ ResourceDataValue modelKey;
+
+ // get modelValues
+ LocalUResourceBundlePointer modelValue(ures_getByKey(rb, valueName, nullptr, &error));
+ const int32_t *value = ures_getIntVector(modelValue.getAlias(), &valueSize, &error);
+ if (U_FAILURE(error)) return;
+
+ // get modelKeys
+ ures_getValueWithFallback(rb, keyName, stackTempBundle.getAlias(), modelKey, error);
+ ResourceArray stringArray = modelKey.getArray(error);
+ keySize = stringArray.getSize();
+ if (U_FAILURE(error)) return;
+
+ for (int32_t idx = 0; idx < keySize; idx++) {
+ stringArray.getValue(idx, modelKey);
+ key = UnicodeString(modelKey.getString(stringLength, error));
+ if (U_SUCCESS(error)) {
+ U_ASSERT(idx < valueSize);
+ fNegativeSum -= value[idx];
+ model.puti(key, value[idx], error);
+ }
+ }
+}
+
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/contrib/libs/icu/common/mlbe.h b/contrib/libs/icu/common/mlbe.h
new file mode 100644
index 00000000000..38de47e5f57
--- /dev/null
+++ b/contrib/libs/icu/common/mlbe.h
@@ -0,0 +1,116 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef MLBREAKENGINE_H
+#define MLBREAKENGINE_H
+
+#include "hash.h"
+#include "unicode/resbund.h"
+#include "unicode/uniset.h"
+#include "unicode/utext.h"
+#include "uvectr32.h"
+
+U_NAMESPACE_BEGIN
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+/**
+ * A machine learning break engine for the phrase breaking in Japanese.
+ */
+class MlBreakEngine : public UMemory {
+ public:
+ /**
+ * Constructor.
+ *
+ * @param digitOrOpenPunctuationOrAlphabetSet An UnicodeSet with the digit, open punctuation and
+ * alphabet.
+ * @param closePunctuationSet An UnicodeSet with close punctuation.
+ * @param status Information on any errors encountered.
+ */
+ MlBreakEngine(const UnicodeSet &digitOrOpenPunctuationOrAlphabetSet,
+ const UnicodeSet &closePunctuationSet, UErrorCode &status);
+
+ /**
+ * Virtual destructor.
+ */
+ virtual ~MlBreakEngine();
+
+ public:
+ /**
+ * Divide up a range of characters handled by this break engine.
+ *
+ * @param inText A UText representing the text
+ * @param rangeStart The start of the range of the characters
+ * @param rangeEnd The end of the range of the characters
+ * @param foundBreaks Output of C array of int32_t break positions, or 0
+ * @param inString The normalized string of text ranging from rangeStart to rangeEnd
+ * @param inputMap The vector storing the native index of inText
+ * @param status Information on any errors encountered.
+ * @return The number of breaks found
+ */
+ int32_t divideUpRange(UText *inText, int32_t rangeStart, int32_t rangeEnd,
+ UVector32 &foundBreaks, const UnicodeString &inString,
+ const LocalPointer<UVector32> &inputMap, UErrorCode &status) const;
+
+ private:
+ /**
+ * Load the machine learning's model file.
+ *
+ * @param error Information on any errors encountered.
+ */
+ void loadMLModel(UErrorCode &error);
+
+ /**
+ * In the machine learning's model file, specify the name of the key and value to load the
+ * corresponding feature and its score.
+ *
+ * @param rb A ResouceBundle corresponding to the model file.
+ * @param keyName The kay name in the model file.
+ * @param valueName The value name in the model file.
+ * @param model A hashtable to store the pairs of the feature and its score.
+ * @param error Information on any errors encountered.
+ */
+ void initKeyValue(UResourceBundle *rb, const char *keyName, const char *valueName,
+ Hashtable &model, UErrorCode &error);
+
+ /**
+ * Initialize the index list from the input string.
+ *
+ * @param inString A input string to be segmented.
+ * @param indexList A code unit index list of inString.
+ * @param status Information on any errors encountered.
+ * @return The number of code units of the first four characters in inString.
+ */
+ int32_t initIndexList(const UnicodeString &inString, int32_t *indexList,
+ UErrorCode &status) const;
+
+ /**
+ * Evaluate whether the index is a potential breakpoint.
+ *
+ * @param inString A input string to be segmented.
+ * @param indexList A code unit index list of the inString.
+ * @param startIdx The start index of the indexList.
+ * @param numCodeUnits The current code unit boundary of the indexList.
+ * @param numBreaks The accumulated number of breakpoints.
+ * @param boundary A vector including the index of the breakpoint.
+ * @param status Information on any errors encountered.
+ * @return The number of breakpoints
+ */
+ int32_t evaluateBreakpoint(const UnicodeString &inString, int32_t *indexList, int32_t startIdx,
+ int32_t numCodeUnits, int32_t numBreaks, UVector32 &boundary,
+ UErrorCode &status) const;
+
+ void printUnicodeString(const UnicodeString &s) const;
+
+ UnicodeSet fDigitOrOpenPunctuationOrAlphabetSet;
+ UnicodeSet fClosePunctuationSet;
+ Hashtable fModel[13]; // {UW1, UW2, ... UW6, BW1, ... BW3, TW1, TW2, ... TW4} 6+3+4= 13
+ int32_t fNegativeSum;
+};
+
+#endif
+
+U_NAMESPACE_END
+
+/* MLBREAKENGINE_H */
+#endif
diff --git a/contrib/libs/icu/common/norm2_nfc_data.h b/contrib/libs/icu/common/norm2_nfc_data.h
index a774868981d..ebe3e6ba906 100644
--- a/contrib/libs/icu/common/norm2_nfc_data.h
+++ b/contrib/libs/icu/common/norm2_nfc_data.h
@@ -10,14 +10,14 @@
#ifdef INCLUDED_FROM_NORMALIZER2_CPP
static const UVersionInfo norm2_nfc_data_formatVersion={4,0,0,0};
-static const UVersionInfo norm2_nfc_data_dataVersion={0xe,0,0,0};
+static const UVersionInfo norm2_nfc_data_dataVersion={0xf,0,0,0};
static const int32_t norm2_nfc_data_indexes[Normalizer2Impl::IX_COUNT]={
-0x50,0x4c54,0x88bc,0x89bc,0x89bc,0x89bc,0x89bc,0x89bc,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c,
+0x50,0x4cb8,0x8920,0x8a20,0x8a20,0x8a20,0x8a20,0x8a20,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c,
0x3c34,0x3c66,0x300,0
};
-static const uint16_t norm2_nfc_data_trieIndex[1748]={
+static const uint16_t norm2_nfc_data_trieIndex[1788]={
0,0x40,0x7b,0xbb,0xfb,0x13a,0x17a,0x1b2,0x1f2,0x226,0x254,0x226,0x294,0x2d4,0x313,0x353,
0x393,0x3d2,0x40f,0x44e,0x226,0x226,0x488,0x4c8,0x4f8,0x530,0x226,0x570,0x59f,0x5de,0x226,0x5f3,
0x631,0x65f,0x687,0x6bd,0x6fd,0x73a,0x75a,0x799,0x7d8,0x815,0x834,0x871,0x75a,0x8aa,0x8d8,0x917,
@@ -82,14 +82,14 @@ static const uint16_t norm2_nfc_data_trieIndex[1748]={
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x1880,0x18c0,0x1900,0x1940,0x1980,0x19c0,0x1a00,0x1a40,0x1a63,0x1aa3,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ac3,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x657,0x666,0x67e,0x69d,0x6b2,0x6b2,0x6b2,0x6b6,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x67e,0x68e,0x6a6,0x6c5,0x6da,0x6da,0x6da,0x6de,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc0b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x54f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x40c,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1af6,0x226,0x226,0x1b06,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0xdf7,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1b16,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1607,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1607,0x226,0x226,0x226,0x226,0x66b,0x226,0x226,0x226,
0x226,0x1b20,0x54f,0x226,0x226,0x1b30,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x81c,0x226,0x226,
0x1b40,0x226,0x1b50,0x1b5d,0x1b69,0x226,0x226,0x226,0x226,0x414,0x226,0x1b74,0x1b84,0x226,0x226,0x226,
0x811,0x226,0x226,0x226,0x226,0x1b94,0x226,0x226,0x226,0x1b9f,0x226,0x226,0x226,0x226,0x226,0x226,
@@ -104,33 +104,35 @@ static const uint16_t norm2_nfc_data_trieIndex[1748]={
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x9eb,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0xc05,0x226,0x226,0x226,
0x226,0x81b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x1c3d,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0xc08,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0x1c3d,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x226,0x1c4d,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c4f,
+0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c4d,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x1c4f,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1c5e,0x1c6e,0x1c7c,0x1c89,0x226,
+0x1c95,0x1ca3,0x1cb3,0x226,0x226,0x226,0x226,0xd1b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x226,0x226,0x1c5e,0x1c6e,0x1c7c,0x1c89,0x226,0x1c95,0x1ca3,0x1cb3,0x226,0x226,
-0x226,0x226,0xd1b,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cc3,0x1ccb,
-0x1cd9,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x7c9,0x226,
-0x226,0x226,0x4fc,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x1ce9,0x226,0x226,0x226,0x226,0x226,0x226,0x1cf5,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d05,0x1d15,0x1d25,0x1d35,0x1d45,0x1d55,0x1d65,0x1d75,0x1d85,
-0x1d95,0x1da5,0x1db5,0x1dc5,0x1dd5,0x1de5,0x1df5,0x1e05,0x1e15,0x1e25,0x1e35,0x1e45,0x1e55,0x1e65,0x1e75,0x1e85,
-0x1e95,0x1ea5,0x1eb5,0x1ec5,0x1ed5,0x1ee5,0x1ef5,0x1f05,0x1f15,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x1cc3,0x1ccb,0x1cd9,0x226,0x226,0x226,0x226,0x226,0x4f9,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0xf2c,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x7c9,0x226,0x226,0x226,0x4fc,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1ce4,0x226,0x226,0x226,0x226,0x226,0x226,
+0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1cf4,0x226,0x226,0x226,0x226,
+0x226,0x226,0x1d00,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x1d10,0x1d20,
+0x1d30,0x1d40,0x1d50,0x1d60,0x1d70,0x1d80,0x1d90,0x1da0,0x1db0,0x1dc0,0x1dd0,0x1de0,0x1df0,0x1e00,0x1e10,0x1e20,
+0x1e30,0x1e40,0x1e50,0x1e60,0x1e70,0x1e80,0x1e90,0x1ea0,0x1eb0,0x1ec0,0x1ed0,0x1ee0,0x1ef0,0x1f00,0x1f10,0x1f20,
0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,
-0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408,0x428,0xc4,0xc4,0xc4,0x448,0x457,0x46d,0x489,
-0x4a6,0x4c2,0x4df,0x4fc,0x51b,0x538,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
-0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x552,0xc4,0x566,0xc4,0xc4,
+0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x226,0x408,0x428,
+0xc4,0xc4,0xc4,0x448,0x457,0x46d,0x489,0x4a6,0x4c2,0x4df,0x4fc,0x51b,0x538,0x552,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
-0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x586,0xc4,0xc4,0xc4,
-0xc4,0xc4,0xc4,0xc4,0xc4,0x591,0x5ae,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5ce,0x5e4,0xc4,
-0xc4,0x5f7,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
+0xc4,0xc4,0xc4,0x567,0xc4,0x57b,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
-0xc4,0xc4,0x617,0x637
+0xc4,0xc4,0xc4,0xc4,0x59b,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x5a6,0x5c3,0xc4,
+0xc4,0xc4,0xc4,0xc4,0xc4,0x5e3,0x5f9,0x60b,0xc4,0x61e,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
+0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
+0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0x63e,0x65e
};
-static const uint16_t norm2_nfc_data_trieData[7974]={
+static const uint16_t norm2_nfc_data_trieData[7984]={
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -518,7 +520,7 @@ static const uint16_t norm2_nfc_data_trieData[7974]={
1,1,1,1,1,0x3c66,1,0x3c66,0x3c66,0x3c66,0x3c66,0x3c66,0x3c66,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x3c66,
0x3c66,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,0x3c66,1,1,1,1,0x3c66,1,1,1,0x3c66,1,0x3c66,
+1,1,1,1,0x3c66,1,1,1,1,0x3c66,1,1,1,0x3c66,0x3c66,0x3c66,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -593,49 +595,49 @@ static const uint16_t norm2_nfc_data_trieData[7974]={
0x3304,0x331c,0x3334,0x334c,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,
0xffcc,0xffcc,0xffcc,0xffcc,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,1,0xffcc,0xffcc,1,0xffcc,
-0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,
-1,1,1,1,1,1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,
-1,1,1,1,1,0x335b,0x335f,0x3363,0x3367,0x336d,0x2f4d,0x3371,0x3375,0x3379,0x337d,0x2f51,
-0x3381,0x3385,0x3389,0x2f55,0x338f,0x3393,0x3397,0x339b,0x33a1,0x33a5,0x33a9,0x33ad,0x33b3,0x33b7,0x33bb,0x33bf,
-0x303f,0x33c3,0x33c9,0x33cd,0x33d1,0x33d5,0x33d9,0x33dd,0x33e1,0x33e5,0x3053,0x2f59,0x2f5d,0x3057,0x33e9,0x33ed,
-0x2c59,0x33f1,0x2f61,0x33f5,0x33f9,0x33fd,0x3401,0x3401,0x3401,0x3405,0x340b,0x340f,0x3413,0x3417,0x341d,0x3421,
-0x3425,0x3429,0x342d,0x3431,0x3435,0x3439,0x343d,0x3441,0x3445,0x3449,0x344d,0x344d,0x305f,0x3451,0x3455,0x3459,
-0x345d,0x2f69,0x3461,0x3465,0x3469,0x2ebd,0x346d,0x3471,0x3475,0x3479,0x347d,0x3481,0x3485,0x3489,0x348d,0x3493,
-0x3497,0x349b,0x349f,0x34a3,0x34a7,0x34ab,0x34b1,0x34b7,0x34bb,0x34bf,0x34c3,0x34c7,0x34cb,0x34cf,0x34d3,0x34d7,
-0x34d7,0x34db,0x34e1,0x34e5,0x2c49,0x34e9,0x34ed,0x34f3,0x34f7,0x34fb,0x34ff,0x3503,0x3507,0x2f7d,0x350b,0x350f,
-0x3513,0x3519,0x351d,0x3523,0x3527,0x352b,0x352f,0x3533,0x3537,0x353b,0x353f,0x3543,0x3547,0x354b,0x354f,0x3555,
-0x3559,0x355d,0x3561,0x2b71,0x3565,0x356b,0x356f,0x356f,0x3575,0x3579,0x3579,0x357d,0x3581,0x3587,0x358d,0x3591,
-0x3595,0x3599,0x359d,0x35a1,0x35a5,0x35a9,0x35ad,0x35b1,0x2f81,0x35b5,0x35bb,0x35bf,0x35c3,0x308f,0x35c3,0x35c7,
-0x2f89,0x35cb,0x35cf,0x35d3,0x35d7,0x2f8d,0x2b05,0x35db,0x35df,0x35e3,0x35e7,0x35eb,0x35ef,0x35f3,0x35f9,0x35fd,
-0x3601,0x3605,0x3609,0x360d,0x3613,0x3617,0x361b,0x361f,0x3623,0x3627,0x362b,0x362f,0x3633,0x2f91,0x3637,0x363b,
-0x3641,0x3645,0x3649,0x364d,0x2f99,0x3651,0x3655,0x3659,0x365d,0x3661,0x3665,0x3669,0x366d,0x2b75,0x30af,0x3671,
-0x3675,0x3679,0x367d,0x3683,0x3687,0x368b,0x368f,0x2f9d,0x3693,0x3699,0x369d,0x36a1,0x3161,0x36a5,0x36a9,0x36ad,
-0x36b1,0x36b5,0x36bb,0x36bf,0x36c3,0x36c7,0x36cd,0x36d1,0x36d5,0x36d9,0x2c8d,0x36dd,0x36e1,0x36e7,0x36ed,0x36f3,
-0x36f7,0x36fd,0x3701,0x3705,0x3709,0x370d,0x2fa1,0x2de9,0x3711,0x3715,0x3719,0x371d,0x3723,0x3727,0x372b,0x372f,
-0x30bf,0x3733,0x3737,0x373d,0x3741,0x3745,0x374b,0x3751,0x3755,0x30c3,0x3759,0x375d,0x3761,0x3765,0x3769,0x376d,
-0x3771,0x3777,0x377b,0x3781,0x3785,0x378b,0x30cb,0x378f,0x3793,0x3799,0x379d,0x37a1,0x37a7,0x37ad,0x37b1,0x37b5,
-0x37b9,0x37bd,0x37bd,0x37c1,0x37c5,0x30d3,0x37c9,0x37cd,0x37d1,0x37d5,0x37d9,0x37df,0x37e3,0x2c55,0x37e9,0x37ef,
-0x37f3,0x37f9,0x37ff,0x3805,0x3809,0x30eb,0x380d,0x3813,0x3819,0x381f,0x3825,0x3829,0x3829,0x30ef,0x3169,0x382d,
-0x3831,0x3835,0x3839,0x383f,0x2bbd,0x30f7,0x3843,0x3847,0x2fcd,0x384d,0x3853,0x2f15,0x3859,0x385d,0x2fdd,0x3861,
-0x3865,0x3869,0x386f,0x386f,0x3875,0x3879,0x387d,0x3883,0x3887,0x388b,0x388f,0x3895,0x3899,0x389d,0x38a1,0x38a5,
-0x38a9,0x38af,0x38b3,0x38b7,0x38bb,0x38bf,0x38c3,0x38c7,0x38cd,0x38d3,0x38d7,0x38dd,0x38e1,0x38e7,0x38eb,0x2ff5,
-0x38ef,0x38f5,0x38fb,0x38ff,0x3905,0x3909,0x390f,0x3913,0x3917,0x391b,0x391f,0x3923,0x3927,0x392d,0x3933,0x3939,
-0x3575,0x393f,0x3943,0x3947,0x394b,0x394f,0x3953,0x3957,0x395b,0x395f,0x3963,0x3967,0x396b,0x2c9d,0x3971,0x3975,
-0x3979,0x397d,0x3981,0x3985,0x3001,0x3989,0x398d,0x3991,0x3995,0x3999,0x399f,0x39a5,0x39ab,0x39af,0x39b3,0x39b7,
-0x39bb,0x39c1,0x39c5,0x39cb,0x39cf,0x39d3,0x39d9,0x39df,0x39e3,0x2ba9,0x39e7,0x39eb,0x39ef,0x39f3,0x39f7,0x39fb,
-0x3113,0x39ff,0x3a03,0x3a07,0x3a0b,0x3a0f,0x3a13,0x3a17,0x3a1b,0x3a1f,0x3a23,0x3a29,0x3a2d,0x3a31,0x3a35,0x3a39,
-0x3a3d,0x3a43,0x3a49,0x3a4d,0x3a51,0x3127,0x312b,0x3a55,0x3a59,0x3a5f,0x3a63,0x3a67,0x3a6b,0x3a6f,0x3a75,0x3a7b,
-0x3a7f,0x3a83,0x3a87,0x3a8d,0x312f,0x3a91,0x3a97,0x3a9d,0x3aa1,0x3aa5,0x3aa9,0x3aaf,0x3ab3,0x3ab7,0x3abb,0x3abf,
-0x3ac3,0x3ac7,0x3acb,0x3ad1,0x3ad5,0x3ad9,0x3add,0x3ae3,0x3ae7,0x3aeb,0x3aef,0x3af3,0x3af9,0x3aff,0x3b03,0x3b07,
-0x3b0b,0x3b11,0x3b15,0x3147,0x3147,0x3b1b,0x3b1f,0x3b25,0x3b29,0x3b2d,0x3b31,0x3b35,0x3b39,0x3b3d,0x3b41,0x314b,
-0x3b47,0x3b4b,0x3b4f,0x3b53,0x3b57,0x3b5b,0x3b61,0x3b65,0x3b6b,0x3b71,0x3b77,0x3b7b,0x3b7f,0x3b83,0x3b87,0x3b8b,
-0x3b8f,0x3b93,0x3b97,1,1,1
+0xffcc,0xffcc,0xffcc,0xffcc,1,1,1,1,1,1,1,1,1,1,1,1,
+0xffd0,0xffd0,0xffb8,0xffcc,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,0xffb8,1,1,1,1,1,
+1,1,1,1,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xffcc,0xfe0e,1,1,1,1,1,
+0x335b,0x335f,0x3363,0x3367,0x336d,0x2f4d,0x3371,0x3375,0x3379,0x337d,0x2f51,0x3381,0x3385,0x3389,0x2f55,0x338f,
+0x3393,0x3397,0x339b,0x33a1,0x33a5,0x33a9,0x33ad,0x33b3,0x33b7,0x33bb,0x33bf,0x303f,0x33c3,0x33c9,0x33cd,0x33d1,
+0x33d5,0x33d9,0x33dd,0x33e1,0x33e5,0x3053,0x2f59,0x2f5d,0x3057,0x33e9,0x33ed,0x2c59,0x33f1,0x2f61,0x33f5,0x33f9,
+0x33fd,0x3401,0x3401,0x3401,0x3405,0x340b,0x340f,0x3413,0x3417,0x341d,0x3421,0x3425,0x3429,0x342d,0x3431,0x3435,
+0x3439,0x343d,0x3441,0x3445,0x3449,0x344d,0x344d,0x305f,0x3451,0x3455,0x3459,0x345d,0x2f69,0x3461,0x3465,0x3469,
+0x2ebd,0x346d,0x3471,0x3475,0x3479,0x347d,0x3481,0x3485,0x3489,0x348d,0x3493,0x3497,0x349b,0x349f,0x34a3,0x34a7,
+0x34ab,0x34b1,0x34b7,0x34bb,0x34bf,0x34c3,0x34c7,0x34cb,0x34cf,0x34d3,0x34d7,0x34d7,0x34db,0x34e1,0x34e5,0x2c49,
+0x34e9,0x34ed,0x34f3,0x34f7,0x34fb,0x34ff,0x3503,0x3507,0x2f7d,0x350b,0x350f,0x3513,0x3519,0x351d,0x3523,0x3527,
+0x352b,0x352f,0x3533,0x3537,0x353b,0x353f,0x3543,0x3547,0x354b,0x354f,0x3555,0x3559,0x355d,0x3561,0x2b71,0x3565,
+0x356b,0x356f,0x356f,0x3575,0x3579,0x3579,0x357d,0x3581,0x3587,0x358d,0x3591,0x3595,0x3599,0x359d,0x35a1,0x35a5,
+0x35a9,0x35ad,0x35b1,0x2f81,0x35b5,0x35bb,0x35bf,0x35c3,0x308f,0x35c3,0x35c7,0x2f89,0x35cb,0x35cf,0x35d3,0x35d7,
+0x2f8d,0x2b05,0x35db,0x35df,0x35e3,0x35e7,0x35eb,0x35ef,0x35f3,0x35f9,0x35fd,0x3601,0x3605,0x3609,0x360d,0x3613,
+0x3617,0x361b,0x361f,0x3623,0x3627,0x362b,0x362f,0x3633,0x2f91,0x3637,0x363b,0x3641,0x3645,0x3649,0x364d,0x2f99,
+0x3651,0x3655,0x3659,0x365d,0x3661,0x3665,0x3669,0x366d,0x2b75,0x30af,0x3671,0x3675,0x3679,0x367d,0x3683,0x3687,
+0x368b,0x368f,0x2f9d,0x3693,0x3699,0x369d,0x36a1,0x3161,0x36a5,0x36a9,0x36ad,0x36b1,0x36b5,0x36bb,0x36bf,0x36c3,
+0x36c7,0x36cd,0x36d1,0x36d5,0x36d9,0x2c8d,0x36dd,0x36e1,0x36e7,0x36ed,0x36f3,0x36f7,0x36fd,0x3701,0x3705,0x3709,
+0x370d,0x2fa1,0x2de9,0x3711,0x3715,0x3719,0x371d,0x3723,0x3727,0x372b,0x372f,0x30bf,0x3733,0x3737,0x373d,0x3741,
+0x3745,0x374b,0x3751,0x3755,0x30c3,0x3759,0x375d,0x3761,0x3765,0x3769,0x376d,0x3771,0x3777,0x377b,0x3781,0x3785,
+0x378b,0x30cb,0x378f,0x3793,0x3799,0x379d,0x37a1,0x37a7,0x37ad,0x37b1,0x37b5,0x37b9,0x37bd,0x37bd,0x37c1,0x37c5,
+0x30d3,0x37c9,0x37cd,0x37d1,0x37d5,0x37d9,0x37df,0x37e3,0x2c55,0x37e9,0x37ef,0x37f3,0x37f9,0x37ff,0x3805,0x3809,
+0x30eb,0x380d,0x3813,0x3819,0x381f,0x3825,0x3829,0x3829,0x30ef,0x3169,0x382d,0x3831,0x3835,0x3839,0x383f,0x2bbd,
+0x30f7,0x3843,0x3847,0x2fcd,0x384d,0x3853,0x2f15,0x3859,0x385d,0x2fdd,0x3861,0x3865,0x3869,0x386f,0x386f,0x3875,
+0x3879,0x387d,0x3883,0x3887,0x388b,0x388f,0x3895,0x3899,0x389d,0x38a1,0x38a5,0x38a9,0x38af,0x38b3,0x38b7,0x38bb,
+0x38bf,0x38c3,0x38c7,0x38cd,0x38d3,0x38d7,0x38dd,0x38e1,0x38e7,0x38eb,0x2ff5,0x38ef,0x38f5,0x38fb,0x38ff,0x3905,
+0x3909,0x390f,0x3913,0x3917,0x391b,0x391f,0x3923,0x3927,0x392d,0x3933,0x3939,0x3575,0x393f,0x3943,0x3947,0x394b,
+0x394f,0x3953,0x3957,0x395b,0x395f,0x3963,0x3967,0x396b,0x2c9d,0x3971,0x3975,0x3979,0x397d,0x3981,0x3985,0x3001,
+0x3989,0x398d,0x3991,0x3995,0x3999,0x399f,0x39a5,0x39ab,0x39af,0x39b3,0x39b7,0x39bb,0x39c1,0x39c5,0x39cb,0x39cf,
+0x39d3,0x39d9,0x39df,0x39e3,0x2ba9,0x39e7,0x39eb,0x39ef,0x39f3,0x39f7,0x39fb,0x3113,0x39ff,0x3a03,0x3a07,0x3a0b,
+0x3a0f,0x3a13,0x3a17,0x3a1b,0x3a1f,0x3a23,0x3a29,0x3a2d,0x3a31,0x3a35,0x3a39,0x3a3d,0x3a43,0x3a49,0x3a4d,0x3a51,
+0x3127,0x312b,0x3a55,0x3a59,0x3a5f,0x3a63,0x3a67,0x3a6b,0x3a6f,0x3a75,0x3a7b,0x3a7f,0x3a83,0x3a87,0x3a8d,0x312f,
+0x3a91,0x3a97,0x3a9d,0x3aa1,0x3aa5,0x3aa9,0x3aaf,0x3ab3,0x3ab7,0x3abb,0x3abf,0x3ac3,0x3ac7,0x3acb,0x3ad1,0x3ad5,
+0x3ad9,0x3add,0x3ae3,0x3ae7,0x3aeb,0x3aef,0x3af3,0x3af9,0x3aff,0x3b03,0x3b07,0x3b0b,0x3b11,0x3b15,0x3147,0x3147,
+0x3b1b,0x3b1f,0x3b25,0x3b29,0x3b2d,0x3b31,0x3b35,0x3b39,0x3b3d,0x3b41,0x314b,0x3b47,0x3b4b,0x3b4f,0x3b53,0x3b57,
+0x3b5b,0x3b61,0x3b65,0x3b6b,0x3b71,0x3b77,0x3b7b,0x3b7f,0x3b83,0x3b87,0x3b8b,0x3b8f,0x3b93,0x3b97,1,1
};
static const UCPTrie norm2_nfc_data_trie={
norm2_nfc_data_trieIndex,
{ norm2_nfc_data_trieData },
- 1748, 7974,
+ 1788, 7984,
0x2fc00, 0x30,
0, 0,
0, 0,
diff --git a/contrib/libs/icu/common/norm2allmodes.h b/contrib/libs/icu/common/norm2allmodes.h
index 584835da57b..6347fba9cb7 100644
--- a/contrib/libs/icu/common/norm2allmodes.h
+++ b/contrib/libs/icu/common/norm2allmodes.h
@@ -38,13 +38,13 @@ public:
virtual UnicodeString &
normalize(const UnicodeString &src,
UnicodeString &dest,
- UErrorCode &errorCode) const U_OVERRIDE {
+ UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
dest.setToBogus();
return dest;
}
- const UChar *sArray=src.getBuffer();
- if(&dest==&src || sArray==NULL) {
+ const char16_t *sArray=src.getBuffer();
+ if(&dest==&src || sArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
dest.setToBogus();
return dest;
@@ -57,20 +57,20 @@ public:
return dest;
}
virtual void
- normalize(const UChar *src, const UChar *limit,
+ normalize(const char16_t *src, const char16_t *limit,
ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0;
// normalize and append
virtual UnicodeString &
normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const U_OVERRIDE {
+ UErrorCode &errorCode) const override {
return normalizeSecondAndAppend(first, second, true, errorCode);
}
virtual UnicodeString &
append(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const U_OVERRIDE {
+ UErrorCode &errorCode) const override {
return normalizeSecondAndAppend(first, second, false, errorCode);
}
UnicodeString &
@@ -82,8 +82,8 @@ public:
if(U_FAILURE(errorCode)) {
return first;
}
- const UChar *secondArray=second.getBuffer();
- if(&first==&second || secondArray==NULL) {
+ const char16_t *secondArray=second.getBuffer();
+ if(&first==&second || secondArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return first;
}
@@ -103,15 +103,15 @@ public:
return first;
}
virtual void
- normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
+ normalizeAndAppend(const char16_t *src, const char16_t *limit, UBool doNormalize,
UnicodeString &safeMiddle,
ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0;
virtual UBool
- getDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE {
- UChar buffer[4];
+ getDecomposition(UChar32 c, UnicodeString &decomposition) const override {
+ char16_t buffer[4];
int32_t length;
- const UChar *d=impl.getDecomposition(c, buffer, length);
- if(d==NULL) {
+ const char16_t *d=impl.getDecomposition(c, buffer, length);
+ if(d==nullptr) {
return false;
}
if(d==buffer) {
@@ -122,11 +122,11 @@ public:
return true;
}
virtual UBool
- getRawDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE {
- UChar buffer[30];
+ getRawDecomposition(UChar32 c, UnicodeString &decomposition) const override {
+ char16_t buffer[30];
int32_t length;
- const UChar *d=impl.getRawDecomposition(c, buffer, length);
- if(d==NULL) {
+ const char16_t *d=impl.getRawDecomposition(c, buffer, length);
+ if(d==nullptr) {
return false;
}
if(d==buffer) {
@@ -137,47 +137,47 @@ public:
return true;
}
virtual UChar32
- composePair(UChar32 a, UChar32 b) const U_OVERRIDE {
+ composePair(UChar32 a, UChar32 b) const override {
return impl.composePair(a, b);
}
virtual uint8_t
- getCombiningClass(UChar32 c) const U_OVERRIDE {
+ getCombiningClass(UChar32 c) const override {
return impl.getCC(impl.getNorm16(c));
}
// quick checks
virtual UBool
- isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
+ isNormalized(const UnicodeString &s, UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
return false;
}
- const UChar *sArray=s.getBuffer();
- if(sArray==NULL) {
+ const char16_t *sArray=s.getBuffer();
+ if(sArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return false;
}
- const UChar *sLimit=sArray+s.length();
+ const char16_t *sLimit=sArray+s.length();
return sLimit==spanQuickCheckYes(sArray, sLimit, errorCode);
}
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
+ quickCheck(const UnicodeString &s, UErrorCode &errorCode) const override {
return Normalizer2WithImpl::isNormalized(s, errorCode) ? UNORM_YES : UNORM_NO;
}
virtual int32_t
- spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
+ spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
return 0;
}
- const UChar *sArray=s.getBuffer();
- if(sArray==NULL) {
+ const char16_t *sArray=s.getBuffer();
+ if(sArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
return (int32_t)(spanQuickCheckYes(sArray, sArray+s.length(), errorCode)-sArray);
}
- virtual const UChar *
- spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const = 0;
+ virtual const char16_t *
+ spanQuickCheckYes(const char16_t *src, const char16_t *limit, UErrorCode &errorCode) const = 0;
virtual UNormalizationCheckResult getQuickCheck(UChar32) const {
return UNORM_YES;
@@ -193,21 +193,21 @@ public:
private:
virtual void
- normalize(const UChar *src, const UChar *limit,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
+ normalize(const char16_t *src, const char16_t *limit,
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
impl.decompose(src, limit, &buffer, errorCode);
}
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
virtual void
- normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
+ normalizeAndAppend(const char16_t *src, const char16_t *limit, UBool doNormalize,
UnicodeString &safeMiddle,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
impl.decomposeAndAppend(src, limit, doNormalize, safeMiddle, buffer, errorCode);
}
void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const U_OVERRIDE {
+ Edits *edits, UErrorCode &errorCode) const override {
if (U_FAILURE(errorCode)) {
return;
}
@@ -219,7 +219,7 @@ private:
sink.Flush();
}
virtual UBool
- isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const U_OVERRIDE {
+ isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
return false;
}
@@ -228,21 +228,21 @@ private:
return sLimit == impl.decomposeUTF8(0, s, sLimit, nullptr, nullptr, errorCode);
}
- virtual const UChar *
- spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const U_OVERRIDE {
- return impl.decompose(src, limit, NULL, errorCode);
+ virtual const char16_t *
+ spanQuickCheckYes(const char16_t *src, const char16_t *limit, UErrorCode &errorCode) const override {
+ return impl.decompose(src, limit, nullptr, errorCode);
}
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
- virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const U_OVERRIDE {
+ virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const override {
return impl.isDecompYes(impl.getNorm16(c)) ? UNORM_YES : UNORM_NO;
}
- virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE {
+ virtual UBool hasBoundaryBefore(UChar32 c) const override {
return impl.hasDecompBoundaryBefore(c);
}
- virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE {
+ virtual UBool hasBoundaryAfter(UChar32 c) const override {
return impl.hasDecompBoundaryAfter(c);
}
- virtual UBool isInert(UChar32 c) const U_OVERRIDE {
+ virtual UBool isInert(UChar32 c) const override {
return impl.isDecompInert(c);
}
};
@@ -255,15 +255,15 @@ public:
private:
virtual void
- normalize(const UChar *src, const UChar *limit,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
+ normalize(const char16_t *src, const char16_t *limit,
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
impl.compose(src, limit, onlyContiguous, true, buffer, errorCode);
}
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const U_OVERRIDE {
+ Edits *edits, UErrorCode &errorCode) const override {
if (U_FAILURE(errorCode)) {
return;
}
@@ -277,19 +277,19 @@ private:
}
virtual void
- normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
+ normalizeAndAppend(const char16_t *src, const char16_t *limit, UBool doNormalize,
UnicodeString &safeMiddle,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
impl.composeAndAppend(src, limit, doNormalize, onlyContiguous, safeMiddle, buffer, errorCode);
}
virtual UBool
- isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
+ isNormalized(const UnicodeString &s, UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
return false;
}
- const UChar *sArray=s.getBuffer();
- if(sArray==NULL) {
+ const char16_t *sArray=s.getBuffer();
+ if(sArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return false;
}
@@ -301,7 +301,7 @@ private:
return impl.compose(sArray, sArray+s.length(), onlyContiguous, false, buffer, errorCode);
}
virtual UBool
- isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const U_OVERRIDE {
+ isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
return false;
}
@@ -309,12 +309,12 @@ private:
return impl.composeUTF8(0, onlyContiguous, s, s + sp.length(), nullptr, nullptr, errorCode);
}
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
+ quickCheck(const UnicodeString &s, UErrorCode &errorCode) const override {
if(U_FAILURE(errorCode)) {
return UNORM_MAYBE;
}
- const UChar *sArray=s.getBuffer();
- if(sArray==NULL) {
+ const char16_t *sArray=s.getBuffer();
+ if(sArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return UNORM_MAYBE;
}
@@ -322,21 +322,21 @@ private:
impl.composeQuickCheck(sArray, sArray+s.length(), onlyContiguous, &qcResult);
return qcResult;
}
- virtual const UChar *
- spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const U_OVERRIDE {
- return impl.composeQuickCheck(src, limit, onlyContiguous, NULL);
+ virtual const char16_t *
+ spanQuickCheckYes(const char16_t *src, const char16_t *limit, UErrorCode &) const override {
+ return impl.composeQuickCheck(src, limit, onlyContiguous, nullptr);
}
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
- virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const U_OVERRIDE {
+ virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const override {
return impl.getCompQuickCheck(impl.getNorm16(c));
}
- virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE {
+ virtual UBool hasBoundaryBefore(UChar32 c) const override {
return impl.hasCompBoundaryBefore(c);
}
- virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE {
+ virtual UBool hasBoundaryAfter(UChar32 c) const override {
return impl.hasCompBoundaryAfter(c, onlyContiguous);
}
- virtual UBool isInert(UChar32 c) const U_OVERRIDE {
+ virtual UBool isInert(UChar32 c) const override {
return impl.isCompInert(c, onlyContiguous);
}
@@ -350,29 +350,29 @@ public:
private:
virtual void
- normalize(const UChar *src, const UChar *limit,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
+ normalize(const char16_t *src, const char16_t *limit,
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
impl.makeFCD(src, limit, &buffer, errorCode);
}
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
virtual void
- normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
+ normalizeAndAppend(const char16_t *src, const char16_t *limit, UBool doNormalize,
UnicodeString &safeMiddle,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
impl.makeFCDAndAppend(src, limit, doNormalize, safeMiddle, buffer, errorCode);
}
- virtual const UChar *
- spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const U_OVERRIDE {
- return impl.makeFCD(src, limit, NULL, errorCode);
+ virtual const char16_t *
+ spanQuickCheckYes(const char16_t *src, const char16_t *limit, UErrorCode &errorCode) const override {
+ return impl.makeFCD(src, limit, nullptr, errorCode);
}
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
- virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE {
+ virtual UBool hasBoundaryBefore(UChar32 c) const override {
return impl.hasFCDBoundaryBefore(c);
}
- virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE {
+ virtual UBool hasBoundaryAfter(UChar32 c) const override {
return impl.hasFCDBoundaryAfter(c);
}
- virtual UBool isInert(UChar32 c) const U_OVERRIDE {
+ virtual UBool isInert(UChar32 c) const override {
return impl.isFCDInert(c);
}
};
diff --git a/contrib/libs/icu/common/normalizer2.cpp b/contrib/libs/icu/common/normalizer2.cpp
index 6be7e0b21a2..6856736b888 100644
--- a/contrib/libs/icu/common/normalizer2.cpp
+++ b/contrib/libs/icu/common/normalizer2.cpp
@@ -62,7 +62,7 @@ Normalizer2::normalizeUTF8(uint32_t /*options*/, StringPiece src, ByteSink &sink
UBool
Normalizer2::getRawDecomposition(UChar32, UnicodeString &) const {
- return FALSE;
+ return false;
}
UChar32
@@ -87,7 +87,7 @@ class NoopNormalizer2 : public Normalizer2 {
virtual UnicodeString &
normalize(const UnicodeString &src,
UnicodeString &dest,
- UErrorCode &errorCode) const U_OVERRIDE {
+ UErrorCode &errorCode) const override {
if(U_SUCCESS(errorCode)) {
if(&dest!=&src) {
dest=src;
@@ -99,7 +99,7 @@ class NoopNormalizer2 : public Normalizer2 {
}
virtual void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const U_OVERRIDE {
+ Edits *edits, UErrorCode &errorCode) const override {
if(U_SUCCESS(errorCode)) {
if (edits != nullptr) {
if ((options & U_EDITS_NO_RESET) == 0) {
@@ -117,7 +117,7 @@ class NoopNormalizer2 : public Normalizer2 {
virtual UnicodeString &
normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const U_OVERRIDE {
+ UErrorCode &errorCode) const override {
if(U_SUCCESS(errorCode)) {
if(&first!=&second) {
first.append(second);
@@ -130,7 +130,7 @@ class NoopNormalizer2 : public Normalizer2 {
virtual UnicodeString &
append(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const U_OVERRIDE {
+ UErrorCode &errorCode) const override {
if(U_SUCCESS(errorCode)) {
if(&first!=&second) {
first.append(second);
@@ -141,29 +141,29 @@ class NoopNormalizer2 : public Normalizer2 {
return first;
}
virtual UBool
- getDecomposition(UChar32, UnicodeString &) const U_OVERRIDE {
- return FALSE;
+ getDecomposition(UChar32, UnicodeString &) const override {
+ return false;
}
- // No need to U_OVERRIDE the default getRawDecomposition().
+ // No need to override the default getRawDecomposition().
virtual UBool
- isNormalized(const UnicodeString &, UErrorCode &errorCode) const U_OVERRIDE {
+ isNormalized(const UnicodeString &, UErrorCode &errorCode) const override {
return U_SUCCESS(errorCode);
}
virtual UBool
- isNormalizedUTF8(StringPiece, UErrorCode &errorCode) const U_OVERRIDE {
+ isNormalizedUTF8(StringPiece, UErrorCode &errorCode) const override {
return U_SUCCESS(errorCode);
}
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &, UErrorCode &) const U_OVERRIDE {
+ quickCheck(const UnicodeString &, UErrorCode &) const override {
return UNORM_YES;
}
virtual int32_t
- spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const U_OVERRIDE {
+ spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const override {
return s.length();
}
- virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return TRUE; }
- virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return TRUE; }
- virtual UBool isInert(UChar32) const U_OVERRIDE { return TRUE; }
+ virtual UBool hasBoundaryBefore(UChar32) const override { return true; }
+ virtual UBool hasBoundaryAfter(UChar32) const override { return true; }
+ virtual UBool isInert(UChar32) const override { return true; }
};
NoopNormalizer2::~NoopNormalizer2() {}
@@ -183,14 +183,14 @@ static UBool U_CALLCONV uprv_normalizer2_cleanup();
U_CDECL_END
static Normalizer2 *noopSingleton;
-static icu::UInitOnce noopInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce noopInitOnce {};
static void U_CALLCONV initNoopSingleton(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return;
}
noopSingleton=new NoopNormalizer2;
- if(noopSingleton==NULL) {
+ if(noopSingleton==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -198,7 +198,7 @@ static void U_CALLCONV initNoopSingleton(UErrorCode &errorCode) {
}
const Normalizer2 *Normalizer2Factory::getNoopInstance(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
umtx_initOnce(noopInitOnce, &initNoopSingleton, errorCode);
return noopSingleton;
}
@@ -216,13 +216,13 @@ Norm2AllModes *
Norm2AllModes::createInstance(Normalizer2Impl *impl, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
delete impl;
- return NULL;
+ return nullptr;
}
Norm2AllModes *allModes=new Norm2AllModes(impl);
- if(allModes==NULL) {
+ if(allModes==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
delete impl;
- return NULL;
+ return nullptr;
}
return allModes;
}
@@ -231,12 +231,12 @@ Norm2AllModes::createInstance(Normalizer2Impl *impl, UErrorCode &errorCode) {
Norm2AllModes *
Norm2AllModes::createNFCInstance(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
Normalizer2Impl *impl=new Normalizer2Impl;
- if(impl==NULL) {
+ if(impl==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
impl->init(norm2_nfc_data_indexes, &norm2_nfc_data_trie,
norm2_nfc_data_extraData, norm2_nfc_data_smallFCD);
@@ -245,7 +245,7 @@ Norm2AllModes::createNFCInstance(UErrorCode &errorCode) {
static Norm2AllModes *nfcSingleton;
-static icu::UInitOnce nfcInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce nfcInitOnce {};
static void U_CALLCONV initNFCSingleton(UErrorCode &errorCode) {
nfcSingleton=Norm2AllModes::createNFCInstance(errorCode);
@@ -254,7 +254,7 @@ static void U_CALLCONV initNFCSingleton(UErrorCode &errorCode) {
const Norm2AllModes *
Norm2AllModes::getNFCInstance(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
umtx_initOnce(nfcInitOnce, &initNFCSingleton, errorCode);
return nfcSingleton;
}
@@ -262,29 +262,29 @@ Norm2AllModes::getNFCInstance(UErrorCode &errorCode) {
const Normalizer2 *
Normalizer2::getNFCInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->comp : NULL;
+ return allModes!=nullptr ? &allModes->comp : nullptr;
}
const Normalizer2 *
Normalizer2::getNFDInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->decomp : NULL;
+ return allModes!=nullptr ? &allModes->decomp : nullptr;
}
const Normalizer2 *Normalizer2Factory::getFCDInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->fcd : NULL;
+ return allModes!=nullptr ? &allModes->fcd : nullptr;
}
const Normalizer2 *Normalizer2Factory::getFCCInstance(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? &allModes->fcc : NULL;
+ return allModes!=nullptr ? &allModes->fcc : nullptr;
}
const Normalizer2Impl *
Normalizer2Factory::getNFCImpl(UErrorCode &errorCode) {
const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode);
- return allModes!=NULL ? allModes->impl : NULL;
+ return allModes!=nullptr ? allModes->impl : nullptr;
}
#endif // NORM2_HARDCODE_NFC_DATA
@@ -292,14 +292,14 @@ U_CDECL_BEGIN
static UBool U_CALLCONV uprv_normalizer2_cleanup() {
delete noopSingleton;
- noopSingleton = NULL;
+ noopSingleton = nullptr;
noopInitOnce.reset();
#if NORM2_HARDCODE_NFC_DATA
delete nfcSingleton;
- nfcSingleton = NULL;
+ nfcSingleton = nullptr;
nfcInitOnce.reset();
#endif
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -327,29 +327,29 @@ unorm2_close(UNormalizer2 *norm2) {
U_CAPI int32_t U_EXPORT2
unorm2_normalize(const UNormalizer2 *norm2,
- const UChar *src, int32_t length,
- UChar *dest, int32_t capacity,
+ const char16_t *src, int32_t length,
+ char16_t *dest, int32_t capacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if( (src==NULL ? length!=0 : length<-1) ||
- (dest==NULL ? capacity!=0 : capacity<0) ||
- (src==dest && src!=NULL)
+ if( (src==nullptr ? length!=0 : length<-1) ||
+ (dest==nullptr ? capacity!=0 : capacity<0) ||
+ (src==dest && src!=nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
UnicodeString destString(dest, 0, capacity);
- // length==0: Nothing to do, and n2wi->normalize(NULL, NULL, buffer, ...) would crash.
+ // length==0: Nothing to do, and n2wi->normalize(nullptr, nullptr, buffer, ...) would crash.
if(length!=0) {
const Normalizer2 *n2=(const Normalizer2 *)norm2;
const Normalizer2WithImpl *n2wi=dynamic_cast<const Normalizer2WithImpl *>(n2);
- if(n2wi!=NULL) {
+ if(n2wi!=nullptr) {
// Avoid duplicate argument checking and support NUL-terminated src.
ReorderingBuffer buffer(n2wi->impl, destString);
if(buffer.init(length, *pErrorCode)) {
- n2wi->normalize(src, length>=0 ? src+length : NULL, buffer, *pErrorCode);
+ n2wi->normalize(src, length>=0 ? src+length : nullptr, buffer, *pErrorCode);
}
} else {
UnicodeString srcString(length<0, src, length);
@@ -361,34 +361,34 @@ unorm2_normalize(const UNormalizer2 *norm2,
static int32_t
normalizeSecondAndAppend(const UNormalizer2 *norm2,
- UChar *first, int32_t firstLength, int32_t firstCapacity,
- const UChar *second, int32_t secondLength,
+ char16_t *first, int32_t firstLength, int32_t firstCapacity,
+ const char16_t *second, int32_t secondLength,
UBool doNormalize,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if( (second==NULL ? secondLength!=0 : secondLength<-1) ||
- (first==NULL ? (firstCapacity!=0 || firstLength!=0) :
+ if( (second==nullptr ? secondLength!=0 : secondLength<-1) ||
+ (first==nullptr ? (firstCapacity!=0 || firstLength!=0) :
(firstCapacity<0 || firstLength<-1)) ||
- (first==second && first!=NULL)
+ (first==second && first!=nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
UnicodeString firstString(first, firstLength, firstCapacity);
firstLength=firstString.length(); // In case it was -1.
- // secondLength==0: Nothing to do, and n2wi->normalizeAndAppend(NULL, NULL, buffer, ...) would crash.
+ // secondLength==0: Nothing to do, and n2wi->normalizeAndAppend(nullptr, nullptr, buffer, ...) would crash.
if(secondLength!=0) {
const Normalizer2 *n2=(const Normalizer2 *)norm2;
const Normalizer2WithImpl *n2wi=dynamic_cast<const Normalizer2WithImpl *>(n2);
- if(n2wi!=NULL) {
+ if(n2wi!=nullptr) {
// Avoid duplicate argument checking and support NUL-terminated src.
UnicodeString safeMiddle;
{
ReorderingBuffer buffer(n2wi->impl, firstString);
if(buffer.init(firstLength+secondLength+1, *pErrorCode)) { // destCapacity>=-1
- n2wi->normalizeAndAppend(second, secondLength>=0 ? second+secondLength : NULL,
+ n2wi->normalizeAndAppend(second, secondLength>=0 ? second+secondLength : nullptr,
doNormalize, safeMiddle, buffer, *pErrorCode);
}
} // The ReorderingBuffer destructor finalizes firstString.
@@ -396,7 +396,7 @@ normalizeSecondAndAppend(const UNormalizer2 *norm2,
// Restore the modified suffix of the first string.
// This does not restore first[] array contents between firstLength and firstCapacity.
// (That might be uninitialized memory, as far as we know.)
- if(first!=NULL) { /* don't dereference NULL */
+ if(first!=nullptr) { /* don't dereference nullptr */
safeMiddle.extract(0, 0x7fffffff, first+firstLength-safeMiddle.length());
if(firstLength<firstCapacity) {
first[firstLength]=0; // NUL-terminate in case it was originally.
@@ -417,34 +417,34 @@ normalizeSecondAndAppend(const UNormalizer2 *norm2,
U_CAPI int32_t U_EXPORT2
unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
- UChar *first, int32_t firstLength, int32_t firstCapacity,
- const UChar *second, int32_t secondLength,
+ char16_t *first, int32_t firstLength, int32_t firstCapacity,
+ const char16_t *second, int32_t secondLength,
UErrorCode *pErrorCode) {
return normalizeSecondAndAppend(norm2,
first, firstLength, firstCapacity,
second, secondLength,
- TRUE, pErrorCode);
+ true, pErrorCode);
}
U_CAPI int32_t U_EXPORT2
unorm2_append(const UNormalizer2 *norm2,
- UChar *first, int32_t firstLength, int32_t firstCapacity,
- const UChar *second, int32_t secondLength,
+ char16_t *first, int32_t firstLength, int32_t firstCapacity,
+ const char16_t *second, int32_t secondLength,
UErrorCode *pErrorCode) {
return normalizeSecondAndAppend(norm2,
first, firstLength, firstCapacity,
second, secondLength,
- FALSE, pErrorCode);
+ false, pErrorCode);
}
U_CAPI int32_t U_EXPORT2
unorm2_getDecomposition(const UNormalizer2 *norm2,
- UChar32 c, UChar *decomposition, int32_t capacity,
+ UChar32 c, char16_t *decomposition, int32_t capacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(decomposition==NULL ? capacity!=0 : capacity<0) {
+ if(decomposition==nullptr ? capacity!=0 : capacity<0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -458,12 +458,12 @@ unorm2_getDecomposition(const UNormalizer2 *norm2,
U_CAPI int32_t U_EXPORT2
unorm2_getRawDecomposition(const UNormalizer2 *norm2,
- UChar32 c, UChar *decomposition, int32_t capacity,
+ UChar32 c, char16_t *decomposition, int32_t capacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(decomposition==NULL ? capacity!=0 : capacity<0) {
+ if(decomposition==nullptr ? capacity!=0 : capacity<0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -487,12 +487,12 @@ unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c) {
U_CAPI UBool U_EXPORT2
unorm2_isNormalized(const UNormalizer2 *norm2,
- const UChar *s, int32_t length,
+ const char16_t *s, int32_t length,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if((s==NULL && length!=0) || length<-1) {
+ if((s==nullptr && length!=0) || length<-1) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -502,12 +502,12 @@ unorm2_isNormalized(const UNormalizer2 *norm2,
U_CAPI UNormalizationCheckResult U_EXPORT2
unorm2_quickCheck(const UNormalizer2 *norm2,
- const UChar *s, int32_t length,
+ const char16_t *s, int32_t length,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return UNORM_NO;
}
- if((s==NULL && length!=0) || length<-1) {
+ if((s==nullptr && length!=0) || length<-1) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return UNORM_NO;
}
@@ -517,12 +517,12 @@ unorm2_quickCheck(const UNormalizer2 *norm2,
U_CAPI int32_t U_EXPORT2
unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
- const UChar *s, int32_t length,
+ const char16_t *s, int32_t length,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if((s==NULL && length!=0) || length<-1) {
+ if((s==nullptr && length!=0) || length<-1) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
diff --git a/contrib/libs/icu/common/normalizer2impl.cpp b/contrib/libs/icu/common/normalizer2impl.cpp
index 5bfd49e8cb9..cdf570d76bd 100644
--- a/contrib/libs/icu/common/normalizer2impl.cpp
+++ b/contrib/libs/icu/common/normalizer2impl.cpp
@@ -81,8 +81,8 @@ UChar32 codePointFromValidUTF8(const uint8_t *cpStart, const uint8_t *cpLimit) {
case 2:
return ((c&0x1f)<<6) | (cpStart[1]&0x3f);
case 3:
- // no need for (c&0xf) because the upper bits are truncated after <<12 in the cast to (UChar)
- return (UChar)((c<<12) | ((cpStart[1]&0x3f)<<6) | (cpStart[2]&0x3f));
+ // no need for (c&0xf) because the upper bits are truncated after <<12 in the cast to (char16_t)
+ return (char16_t)((c<<12) | ((cpStart[1]&0x3f)<<6) | (cpStart[2]&0x3f));
case 4:
return ((c&7)<<18) | ((cpStart[1]&0x3f)<<12) | ((cpStart[2]&0x3f)<<6) | (cpStart[3]&0x3f);
default:
@@ -182,10 +182,10 @@ ReorderingBuffer::ReorderingBuffer(const Normalizer2Impl &ni, UnicodeString &des
UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) {
int32_t length=str.length();
start=str.getBuffer(destCapacity);
- if(start==NULL) {
+ if(start==nullptr) {
// getBuffer() already did str.setToBogus()
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
limit=start+length;
remainingCapacity=str.getCapacity()-length;
@@ -201,10 +201,10 @@ UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) {
}
reorderStart=codePointLimit;
}
- return TRUE;
+ return true;
}
-UBool ReorderingBuffer::equals(const UChar *otherStart, const UChar *otherLimit) const {
+UBool ReorderingBuffer::equals(const char16_t *otherStart, const char16_t *otherLimit) const {
int32_t length=(int32_t)(limit-start);
return
length==(int32_t)(otherLimit-otherStart) &&
@@ -217,7 +217,7 @@ UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLi
int32_t otherLength = (int32_t)(otherLimit - otherStart);
// For equal strings, UTF-8 is at least as long as UTF-16, and at most three times as long.
if (otherLength < length || (otherLength / 3) > length) {
- return FALSE;
+ return false;
}
// Compare valid strings from between normalization boundaries.
// (Invalid sequences are normalization-inert.)
@@ -225,21 +225,21 @@ UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLi
if (i >= length) {
return j >= otherLength;
} else if (j >= otherLength) {
- return FALSE;
+ return false;
}
// Not at the end of either string yet.
UChar32 c, other;
U16_NEXT_UNSAFE(start, i, c);
U8_NEXT_UNSAFE(otherStart, j, other);
if (c != other) {
- return FALSE;
+ return false;
}
}
}
UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &errorCode) {
if(remainingCapacity<2 && !resize(2, errorCode)) {
- return FALSE;
+ return false;
}
if(lastCC<=cc || cc==0) {
limit[0]=U16_LEAD(c);
@@ -253,17 +253,17 @@ UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &e
insert(c, cc);
}
remainingCapacity-=2;
- return TRUE;
+ return true;
}
-UBool ReorderingBuffer::append(const UChar *s, int32_t length, UBool isNFD,
+UBool ReorderingBuffer::append(const char16_t *s, int32_t length, UBool isNFD,
uint8_t leadCC, uint8_t trailCC,
UErrorCode &errorCode) {
if(length==0) {
- return TRUE;
+ return true;
}
if(remainingCapacity<length && !resize(length, errorCode)) {
- return FALSE;
+ return false;
}
remainingCapacity-=length;
if(lastCC<=leadCC || leadCC==0) {
@@ -272,7 +272,7 @@ UBool ReorderingBuffer::append(const UChar *s, int32_t length, UBool isNFD,
} else if(leadCC<=1) {
reorderStart=limit+1; // Ok if not a code point boundary.
}
- const UChar *sLimit=s+length;
+ const char16_t *sLimit=s+length;
do { *limit++=*s++; } while(s!=sLimit);
lastCC=trailCC;
} else {
@@ -294,17 +294,17 @@ UBool ReorderingBuffer::append(const UChar *s, int32_t length, UBool isNFD,
append(c, leadCC, errorCode);
}
}
- return TRUE;
+ return true;
}
UBool ReorderingBuffer::appendZeroCC(UChar32 c, UErrorCode &errorCode) {
int32_t cpLength=U16_LENGTH(c);
if(remainingCapacity<cpLength && !resize(cpLength, errorCode)) {
- return FALSE;
+ return false;
}
remainingCapacity-=cpLength;
if(cpLength==1) {
- *limit++=(UChar)c;
+ *limit++=(char16_t)c;
} else {
limit[0]=U16_LEAD(c);
limit[1]=U16_TRAIL(c);
@@ -312,23 +312,23 @@ UBool ReorderingBuffer::appendZeroCC(UChar32 c, UErrorCode &errorCode) {
}
lastCC=0;
reorderStart=limit;
- return TRUE;
+ return true;
}
-UBool ReorderingBuffer::appendZeroCC(const UChar *s, const UChar *sLimit, UErrorCode &errorCode) {
+UBool ReorderingBuffer::appendZeroCC(const char16_t *s, const char16_t *sLimit, UErrorCode &errorCode) {
if(s==sLimit) {
- return TRUE;
+ return true;
}
int32_t length=(int32_t)(sLimit-s);
if(remainingCapacity<length && !resize(length, errorCode)) {
- return FALSE;
+ return false;
}
u_memcpy(limit, s, length);
limit+=length;
remainingCapacity-=length;
lastCC=0;
reorderStart=limit;
- return TRUE;
+ return true;
}
void ReorderingBuffer::remove() {
@@ -362,20 +362,20 @@ UBool ReorderingBuffer::resize(int32_t appendLength, UErrorCode &errorCode) {
newCapacity=256;
}
start=str.getBuffer(newCapacity);
- if(start==NULL) {
+ if(start==nullptr) {
// getBuffer() already did str.setToBogus()
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
reorderStart=start+reorderStartIndex;
limit=start+length;
remainingCapacity=str.getCapacity()-length;
- return TRUE;
+ return true;
}
void ReorderingBuffer::skipPrevious() {
codePointLimit=codePointStart;
- UChar c=*--codePointStart;
+ char16_t c=*--codePointStart;
if(U16_IS_TRAIL(c) && start<codePointStart && U16_IS_LEAD(*(codePointStart-1))) {
--codePointStart;
}
@@ -387,7 +387,7 @@ uint8_t ReorderingBuffer::previousCC() {
return 0;
}
UChar32 c=*--codePointStart;
- UChar c2;
+ char16_t c2;
if(U16_IS_TRAIL(c) && start<codePointStart && U16_IS_LEAD(c2=*(codePointStart-1))) {
--codePointStart;
c=U16_GET_SUPPLEMENTARY(c2, c);
@@ -400,8 +400,8 @@ uint8_t ReorderingBuffer::previousCC() {
void ReorderingBuffer::insert(UChar32 c, uint8_t cc) {
for(setIterator(), skipPrevious(); previousCC()>cc;) {}
// insert c at codePointLimit, after the character with prevCC<=cc
- UChar *q=limit;
- UChar *r=limit+=U16_LENGTH(c);
+ char16_t *q=limit;
+ char16_t *r=limit+=U16_LENGTH(c);
do {
*--r=*--q;
} while(codePointLimit!=q);
@@ -429,9 +429,9 @@ Normalizer2Impl::~Normalizer2Impl() {
void
Normalizer2Impl::init(const int32_t *inIndexes, const UCPTrie *inTrie,
const uint16_t *inExtraData, const uint8_t *inSmallFCD) {
- minDecompNoCP = static_cast<UChar>(inIndexes[IX_MIN_DECOMP_NO_CP]);
- minCompNoMaybeCP = static_cast<UChar>(inIndexes[IX_MIN_COMP_NO_MAYBE_CP]);
- minLcccCP = static_cast<UChar>(inIndexes[IX_MIN_LCCC_CP]);
+ minDecompNoCP = static_cast<char16_t>(inIndexes[IX_MIN_DECOMP_NO_CP]);
+ minCompNoMaybeCP = static_cast<char16_t>(inIndexes[IX_MIN_COMP_NO_MAYBE_CP]);
+ minLcccCP = static_cast<char16_t>(inIndexes[IX_MIN_LCCC_CP]);
minYesNo = static_cast<uint16_t>(inIndexes[IX_MIN_YES_NO]);
minYesNoMappingsOnly = static_cast<uint16_t>(inIndexes[IX_MIN_YES_NO_MAPPINGS_ONLY]);
@@ -503,7 +503,7 @@ Normalizer2Impl::addPropertyStarts(const USetAdder *sa, UErrorCode & /*errorCode
}
/* add Hangul LV syllables and LV+1 because of skippables */
- for(UChar c=Hangul::HANGUL_BASE; c<Hangul::HANGUL_LIMIT; c+=Hangul::JAMO_T_COUNT) {
+ for(char16_t c=Hangul::HANGUL_BASE; c<Hangul::HANGUL_LIMIT; c+=Hangul::JAMO_T_COUNT) {
sa->add(sa->set, c);
sa->add(sa->set, c+1);
}
@@ -524,8 +524,8 @@ Normalizer2Impl::addCanonIterPropertyStarts(const USetAdder *sa, UErrorCode &err
}
}
-const UChar *
-Normalizer2Impl::copyLowPrefixFromNulTerminated(const UChar *src,
+const char16_t *
+Normalizer2Impl::copyLowPrefixFromNulTerminated(const char16_t *src,
UChar32 minNeedDataCP,
ReorderingBuffer *buffer,
UErrorCode &errorCode) const {
@@ -534,13 +534,13 @@ Normalizer2Impl::copyLowPrefixFromNulTerminated(const UChar *src,
// data and check the first part of the string.
// After this prefix, determine the string length to simplify the rest
// of the code.
- const UChar *prevSrc=src;
- UChar c;
+ const char16_t *prevSrc=src;
+ char16_t c;
while((c=*src++)<minNeedDataCP && c!=0) {}
// Back out the last character for full processing.
// Copy this prefix.
if(--src!=prevSrc) {
- if(buffer!=NULL) {
+ if(buffer!=nullptr) {
buffer->appendZeroCC(prevSrc, src, errorCode);
}
}
@@ -554,8 +554,8 @@ Normalizer2Impl::decompose(const UnicodeString &src, UnicodeString &dest,
dest.setToBogus();
return dest;
}
- const UChar *sArray=src.getBuffer();
- if(&dest==&src || sArray==NULL) {
+ const char16_t *sArray=src.getBuffer();
+ if(&dest==&src || sArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
dest.setToBogus();
return dest;
@@ -565,11 +565,11 @@ Normalizer2Impl::decompose(const UnicodeString &src, UnicodeString &dest,
}
void
-Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
+Normalizer2Impl::decompose(const char16_t *src, const char16_t *limit,
UnicodeString &dest,
int32_t destLengthEstimate,
UErrorCode &errorCode) const {
- if(destLengthEstimate<0 && limit!=NULL) {
+ if(destLengthEstimate<0 && limit!=nullptr) {
destLengthEstimate=(int32_t)(limit-src);
}
dest.remove();
@@ -580,14 +580,14 @@ Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
}
// Dual functionality:
-// buffer!=NULL: normalize
-// buffer==NULL: isNormalized/spanQuickCheckYes
-const UChar *
-Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
+// buffer!=nullptr: normalize
+// buffer==nullptr: isNormalized/spanQuickCheckYes
+const char16_t *
+Normalizer2Impl::decompose(const char16_t *src, const char16_t *limit,
ReorderingBuffer *buffer,
UErrorCode &errorCode) const {
UChar32 minNoCP=minDecompNoCP;
- if(limit==NULL) {
+ if(limit==nullptr) {
src=copyLowPrefixFromNulTerminated(src, minNoCP, buffer, errorCode);
if(U_FAILURE(errorCode)) {
return src;
@@ -595,12 +595,12 @@ Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
limit=u_strchr(src, 0);
}
- const UChar *prevSrc;
+ const char16_t *prevSrc;
UChar32 c=0;
uint16_t norm16=0;
// only for quick check
- const UChar *prevBoundary=src;
+ const char16_t *prevBoundary=src;
uint8_t prevCC=0;
for(;;) {
@@ -613,7 +613,7 @@ Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
} else if(!U16_IS_LEAD(c)) {
break;
} else {
- UChar c2;
+ char16_t c2;
if((src+1)!=limit && U16_IS_TRAIL(c2=src[1])) {
c=U16_GET_SUPPLEMENTARY(c, c2);
norm16=UCPTRIE_FAST_SUPP_GET(normTrie, UCPTRIE_16, c);
@@ -629,7 +629,7 @@ Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
}
// copy these code units all at once
if(src!=prevSrc) {
- if(buffer!=NULL) {
+ if(buffer!=nullptr) {
if(!buffer->appendZeroCC(prevSrc, src, errorCode)) {
break;
}
@@ -644,7 +644,7 @@ Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
// Check one above-minimum, relevant code point.
src+=U16_LENGTH(c);
- if(buffer!=NULL) {
+ if(buffer!=nullptr) {
if(!decompose(c, norm16, *buffer, errorCode)) {
break;
}
@@ -669,8 +669,8 @@ Normalizer2Impl::decompose(const UChar *src, const UChar *limit,
// fail the quick check loop and/or where the quick check loop's overhead
// is unlikely to be amortized.
// Called by the compose() and makeFCD() implementations.
-const UChar *
-Normalizer2Impl::decomposeShort(const UChar *src, const UChar *limit,
+const char16_t *
+Normalizer2Impl::decomposeShort(const char16_t *src, const char16_t *limit,
UBool stopAtCompBoundary, UBool onlyContiguous,
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode)) {
@@ -680,7 +680,7 @@ Normalizer2Impl::decomposeShort(const UChar *src, const UChar *limit,
if (stopAtCompBoundary && *src < minCompNoMaybeCP) {
return src;
}
- const UChar *prevSrc = src;
+ const char16_t *prevSrc = src;
UChar32 c;
uint16_t norm16;
UCPTRIE_FAST_U16_NEXT(normTrie, UCPTRIE_16, src, limit, c, norm16);
@@ -714,7 +714,7 @@ UBool Normalizer2Impl::decompose(UChar32 c, uint16_t norm16,
return buffer.append(c, 0, errorCode);
} else if(isHangulLV(norm16) || isHangulLVT(norm16)) {
// Hangul syllable: decompose algorithmically
- UChar jamos[3];
+ char16_t jamos[3];
return buffer.appendZeroCC(jamos, jamos+Hangul::decompose(c, jamos), errorCode);
}
// c decomposes, get everything from the variable-length extra data
@@ -728,7 +728,7 @@ UBool Normalizer2Impl::decompose(UChar32 c, uint16_t norm16,
} else {
leadCC=0;
}
- return buffer.append((const UChar *)mapping+1, length, TRUE, leadCC, trailCC, errorCode);
+ return buffer.append((const char16_t *)mapping+1, length, true, leadCC, trailCC, errorCode);
}
// Dual functionality:
@@ -820,11 +820,11 @@ Normalizer2Impl::decomposeUTF8(uint32_t options,
if (U_FAILURE(errorCode)) {
break;
}
- decomposeShort(prevBoundary, src, STOP_AT_LIMIT, FALSE /* onlyContiguous */,
+ decomposeShort(prevBoundary, src, STOP_AT_LIMIT, false /* onlyContiguous */,
buffer, errorCode);
// Decompose until the next boundary.
if (buffer.getLastCC() > 1) {
- src = decomposeShort(src, limit, STOP_AT_DECOMP_BOUNDARY, FALSE /* onlyContiguous */,
+ src = decomposeShort(src, limit, STOP_AT_DECOMP_BOUNDARY, false /* onlyContiguous */,
buffer, errorCode);
}
if (U_FAILURE(errorCode)) {
@@ -931,7 +931,7 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit,
if (leadCC == 0 && stopAt == STOP_AT_DECOMP_BOUNDARY) {
return prevSrc;
}
- if (!buffer.append((const char16_t *)mapping+1, length, TRUE, leadCC, trailCC, errorCode)) {
+ if (!buffer.append((const char16_t *)mapping+1, length, true, leadCC, trailCC, errorCode)) {
return nullptr;
}
}
@@ -943,14 +943,14 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit,
return src;
}
-const UChar *
-Normalizer2Impl::getDecomposition(UChar32 c, UChar buffer[4], int32_t &length) const {
+const char16_t *
+Normalizer2Impl::getDecomposition(UChar32 c, char16_t buffer[4], int32_t &length) const {
uint16_t norm16;
if(c<minDecompNoCP || isMaybeOrNonZeroCC(norm16=getNorm16(c))) {
// c does not decompose
return nullptr;
}
- const UChar *decomp = nullptr;
+ const char16_t *decomp = nullptr;
if(isDecompNoAlgorithmic(norm16)) {
// Maps to an isCompYesAndZeroCC.
c=mapAlgorithmic(c, norm16);
@@ -970,19 +970,19 @@ Normalizer2Impl::getDecomposition(UChar32 c, UChar buffer[4], int32_t &length) c
// c decomposes, get everything from the variable-length extra data
const uint16_t *mapping=getMapping(norm16);
length=*mapping&MAPPING_LENGTH_MASK;
- return (const UChar *)mapping+1;
+ return (const char16_t *)mapping+1;
}
// The capacity of the buffer must be 30=MAPPING_LENGTH_MASK-1
// so that a raw mapping fits that consists of one unit ("rm0")
// plus all but the first two code units of the normal mapping.
// The maximum length of a normal mapping is 31=MAPPING_LENGTH_MASK.
-const UChar *
-Normalizer2Impl::getRawDecomposition(UChar32 c, UChar buffer[30], int32_t &length) const {
+const char16_t *
+Normalizer2Impl::getRawDecomposition(UChar32 c, char16_t buffer[30], int32_t &length) const {
uint16_t norm16;
if(c<minDecompNoCP || isDecompYes(norm16=getNorm16(c))) {
// c does not decompose
- return NULL;
+ return nullptr;
} else if(isHangulLV(norm16) || isHangulLVT(norm16)) {
// Hangul syllable: decompose algorithmically
Hangul::getRawDecomposition(c, buffer);
@@ -1005,21 +1005,21 @@ Normalizer2Impl::getRawDecomposition(UChar32 c, UChar buffer[30], int32_t &lengt
uint16_t rm0=*rawMapping;
if(rm0<=MAPPING_LENGTH_MASK) {
length=rm0;
- return (const UChar *)rawMapping-rm0;
+ return (const char16_t *)rawMapping-rm0;
} else {
// Copy the normal mapping and replace its first two code units with rm0.
- buffer[0]=(UChar)rm0;
- u_memcpy(buffer+1, (const UChar *)mapping+1+2, mLength-2);
+ buffer[0]=(char16_t)rm0;
+ u_memcpy(buffer+1, (const char16_t *)mapping+1+2, mLength-2);
length=mLength-1;
return buffer;
}
} else {
length=mLength;
- return (const UChar *)mapping+1;
+ return (const char16_t *)mapping+1;
}
}
-void Normalizer2Impl::decomposeAndAppend(const UChar *src, const UChar *limit,
+void Normalizer2Impl::decomposeAndAppend(const char16_t *src, const char16_t *limit,
UBool doDecompose,
UnicodeString &safeMiddle,
ReorderingBuffer &buffer,
@@ -1032,9 +1032,9 @@ void Normalizer2Impl::decomposeAndAppend(const UChar *src, const UChar *limit,
// Just merge the strings at the boundary.
bool isFirst = true;
uint8_t firstCC = 0, prevCC = 0, cc;
- const UChar *p = src;
+ const char16_t *p = src;
while (p != limit) {
- const UChar *codePointStart = p;
+ const char16_t *codePointStart = p;
UChar32 c;
uint16_t norm16;
UCPTRIE_FAST_U16_NEXT(normTrie, UCPTRIE_16, p, limit, c, norm16);
@@ -1048,11 +1048,11 @@ void Normalizer2Impl::decomposeAndAppend(const UChar *src, const UChar *limit,
}
prevCC = cc;
}
- if(limit==NULL) { // appendZeroCC() needs limit!=NULL
+ if(limit==nullptr) { // appendZeroCC() needs limit!=nullptr
limit=u_strchr(p, 0);
}
- if (buffer.append(src, (int32_t)(p - src), FALSE, firstCC, prevCC, errorCode)) {
+ if (buffer.append(src, (int32_t)(p - src), false, firstCC, prevCC, errorCode)) {
buffer.appendZeroCC(p, limit, errorCode);
}
}
@@ -1064,7 +1064,7 @@ UBool Normalizer2Impl::hasDecompBoundaryBefore(UChar32 c) const {
UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const {
if (norm16 < minNoNoCompNoMaybeCC) {
- return TRUE;
+ return true;
}
if (norm16 >= limitNoNo) {
return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT;
@@ -1072,23 +1072,23 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const {
// c decomposes, get everything from the variable-length extra data
const uint16_t *mapping=getMapping(norm16);
uint16_t firstUnit=*mapping;
- // TRUE if leadCC==0 (hasFCDBoundaryBefore())
+ // true if leadCC==0 (hasFCDBoundaryBefore())
return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0;
}
UBool Normalizer2Impl::hasDecompBoundaryAfter(UChar32 c) const {
if (c < minDecompNoCP) {
- return TRUE;
+ return true;
}
if (c <= 0xffff && !singleLeadMightHaveNonZeroFCD16(c)) {
- return TRUE;
+ return true;
}
return norm16HasDecompBoundaryAfter(getNorm16(c));
}
UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const {
if(norm16 <= minYesNo || isHangulLVT(norm16)) {
- return TRUE;
+ return true;
}
if (norm16 >= limitNoNo) {
if (isMaybeOrNonZeroCC(norm16)) {
@@ -1103,13 +1103,13 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const {
// decomp after-boundary: same as hasFCDBoundaryAfter(),
// fcd16<=1 || trailCC==0
if(firstUnit>0x1ff) {
- return FALSE; // trailCC>1
+ return false; // trailCC>1
}
if(firstUnit<=0xff) {
- return TRUE; // trailCC==0
+ return true; // trailCC==0
}
// if(trailCC==1) test leadCC==0, same as checking for before-boundary
- // TRUE if leadCC==0 (hasFCDBoundaryBefore())
+ // true if leadCC==0 (hasFCDBoundaryBefore())
return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0;
}
@@ -1218,13 +1218,13 @@ void Normalizer2Impl::addComposites(const uint16_t *list, UnicodeSet &set) const
*/
void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStartIndex,
UBool onlyContiguous) const {
- UChar *p=buffer.getStart()+recomposeStartIndex;
- UChar *limit=buffer.getLimit();
+ char16_t *p=buffer.getStart()+recomposeStartIndex;
+ char16_t *limit=buffer.getLimit();
if(p==limit) {
return;
}
- UChar *starter, *pRemove, *q, *r;
+ char16_t *starter, *pRemove, *q, *r;
const uint16_t *compositionsList;
UChar32 c, compositeAndFwd;
uint16_t norm16;
@@ -1233,9 +1233,9 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
// Some of the following variables are not used until we have a forward-combining starter
// and are only initialized now to avoid compiler warnings.
- compositionsList=NULL; // used as indicator for whether we have a forward-combining starter
- starter=NULL;
- starterIsSupplementary=FALSE;
+ compositionsList=nullptr; // used as indicator for whether we have a forward-combining starter
+ starter=nullptr;
+ starterIsSupplementary=false;
prevCC=0;
for(;;) {
@@ -1244,7 +1244,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
if( // this character combines backward and
isMaybe(norm16) &&
// we have seen a starter that combines forward and
- compositionsList!=NULL &&
+ compositionsList!=nullptr &&
// the backward-combining character is not blocked
(prevCC<cc || prevCC==0)
) {
@@ -1252,15 +1252,15 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
// c is a Jamo V/T, see if we can compose it with the previous character.
if(c<Hangul::JAMO_T_BASE) {
// c is a Jamo Vowel, compose with previous Jamo L and following Jamo T.
- UChar prev=(UChar)(*starter-Hangul::JAMO_L_BASE);
+ char16_t prev=(char16_t)(*starter-Hangul::JAMO_L_BASE);
if(prev<Hangul::JAMO_L_COUNT) {
pRemove=p-1;
- UChar syllable=(UChar)
+ char16_t syllable=(char16_t)
(Hangul::HANGUL_BASE+
(prev*Hangul::JAMO_V_COUNT+(c-Hangul::JAMO_V_BASE))*
Hangul::JAMO_T_COUNT);
- UChar t;
- if(p!=limit && (t=(UChar)(*p-Hangul::JAMO_T_BASE))<Hangul::JAMO_T_COUNT) {
+ char16_t t;
+ if(p!=limit && (t=(char16_t)(*p-Hangul::JAMO_T_BASE))<Hangul::JAMO_T_COUNT) {
++p;
syllable+=t; // The next character was a Jamo T.
}
@@ -1284,7 +1284,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
if(p==limit) {
break;
}
- compositionsList=NULL;
+ compositionsList=nullptr;
continue;
} else if((compositeAndFwd=combine(compositionsList, c))>=0) {
// The starter and the combining mark (c) do combine.
@@ -1298,10 +1298,10 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
starter[0]=U16_LEAD(composite);
starter[1]=U16_TRAIL(composite);
} else {
- *starter=(UChar)composite;
+ *starter=(char16_t)composite;
// The composite is shorter than the starter,
// move the intermediate characters forward one.
- starterIsSupplementary=FALSE;
+ starterIsSupplementary=false;
q=starter+1;
r=q+1;
while(r<pRemove) {
@@ -1312,7 +1312,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
} else if(U_IS_SUPPLEMENTARY(composite)) {
// The composite is longer than the starter,
// move the intermediate characters back one.
- starterIsSupplementary=TRUE;
+ starterIsSupplementary=true;
++starter; // temporarily increment for the loop boundary
q=pRemove;
r=++pRemove;
@@ -1323,7 +1323,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
*--starter=U16_LEAD(composite); // undo the temporary increment
} else {
// both are on the BMP
- *starter=(UChar)composite;
+ *starter=(char16_t)composite;
}
/* remove the combining mark by moving the following text over it */
@@ -1346,7 +1346,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
compositionsList=
getCompositionsListForComposite(getRawNorm16(composite));
} else {
- compositionsList=NULL;
+ compositionsList=nullptr;
}
// We combined; continue with looking for compositions.
@@ -1363,19 +1363,19 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart
// If c did not combine, then check if it is a starter.
if(cc==0) {
// Found a new starter.
- if((compositionsList=getCompositionsListForDecompYes(norm16))!=NULL) {
+ if((compositionsList=getCompositionsListForDecompYes(norm16))!=nullptr) {
// It may combine with something, prepare for it.
if(U_IS_BMP(c)) {
- starterIsSupplementary=FALSE;
+ starterIsSupplementary=false;
starter=p-1;
} else {
- starterIsSupplementary=TRUE;
+ starterIsSupplementary=true;
starter=p-2;
}
}
} else if(onlyContiguous) {
// FCC: no discontiguous compositions; any intervening character blocks.
- compositionsList=NULL;
+ compositionsList=nullptr;
}
}
buffer.setReorderingLimit(limit);
@@ -1435,19 +1435,19 @@ Normalizer2Impl::composePair(UChar32 a, UChar32 b) const {
// doCompose: normalize
// !doCompose: isNormalized (buffer must be empty and initialized)
UBool
-Normalizer2Impl::compose(const UChar *src, const UChar *limit,
+Normalizer2Impl::compose(const char16_t *src, const char16_t *limit,
UBool onlyContiguous,
UBool doCompose,
ReorderingBuffer &buffer,
UErrorCode &errorCode) const {
- const UChar *prevBoundary=src;
+ const char16_t *prevBoundary=src;
UChar32 minNoMaybeCP=minCompNoMaybeCP;
- if(limit==NULL) {
+ if(limit==nullptr) {
src=copyLowPrefixFromNulTerminated(src, minNoMaybeCP,
- doCompose ? &buffer : NULL,
+ doCompose ? &buffer : nullptr,
errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
limit=u_strchr(src, 0);
if (prevBoundary != src) {
@@ -1463,7 +1463,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
for (;;) {
// Fast path: Scan over a sequence of characters below the minimum "no or maybe" code point,
// or with (compYes && ccc==0) properties.
- const UChar *prevSrc;
+ const char16_t *prevSrc;
UChar32 c = 0;
uint16_t norm16 = 0;
for (;;) {
@@ -1471,7 +1471,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (prevBoundary != limit && doCompose) {
buffer.appendZeroCC(prevBoundary, limit, errorCode);
}
- return TRUE;
+ return true;
}
if( (c=*src)<minNoMaybeCP ||
isCompYesAndZeroCC(norm16=UCPTRIE_FAST_BMP_GET(normTrie, UCPTRIE_16, c))
@@ -1482,7 +1482,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if(!U16_IS_LEAD(c)) {
break;
} else {
- UChar c2;
+ char16_t c2;
if(src!=limit && U16_IS_TRAIL(c2=*src)) {
++src;
c=U16_GET_SUPPLEMENTARY(c, c2);
@@ -1503,7 +1503,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
// Medium-fast path: Handle cases that do not require full decomposition and recomposition.
if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes
if (!doCompose) {
- return FALSE;
+ return false;
}
// Fast path for mapping a character that is immediately surrounded by boundaries.
// In this case, we need not decompose around the current character.
@@ -1528,7 +1528,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (prevBoundary != prevSrc && !buffer.appendZeroCC(prevBoundary, prevSrc, errorCode)) {
break;
}
- const UChar *mapping = reinterpret_cast<const UChar *>(getMapping(norm16));
+ const char16_t *mapping = reinterpret_cast<const char16_t *>(getMapping(norm16));
int32_t length = *mapping++ & MAPPING_LENGTH_MASK;
if(!buffer.appendZeroCC(mapping, mapping + length, errorCode)) {
break;
@@ -1552,14 +1552,14 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
// Other "noNo" type, or need to examine more text around this character:
// Fall through to the slow path.
} else if (isJamoVT(norm16) && prevBoundary != prevSrc) {
- UChar prev=*(prevSrc-1);
+ char16_t prev=*(prevSrc-1);
if(c<Hangul::JAMO_T_BASE) {
// The current character is a Jamo Vowel,
// compose with previous Jamo L and following Jamo T.
- UChar l = (UChar)(prev-Hangul::JAMO_L_BASE);
+ char16_t l = (char16_t)(prev-Hangul::JAMO_L_BASE);
if(l<Hangul::JAMO_L_COUNT) {
if (!doCompose) {
- return FALSE;
+ return false;
}
int32_t t;
if (src != limit &&
@@ -1581,7 +1581,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (prevBoundary != prevSrc && !buffer.appendZeroCC(prevBoundary, prevSrc, errorCode)) {
break;
}
- if(!buffer.appendBMP((UChar)syllable, 0, errorCode)) {
+ if(!buffer.appendBMP((char16_t)syllable, 0, errorCode)) {
break;
}
prevBoundary = src;
@@ -1599,14 +1599,14 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
// The current character is a Jamo Trailing consonant,
// compose with previous Hangul LV that does not contain a Jamo T.
if (!doCompose) {
- return FALSE;
+ return false;
}
UChar32 syllable = prev + c - Hangul::JAMO_T_BASE;
--prevSrc; // Replace the Hangul LV as well.
if (prevBoundary != prevSrc && !buffer.appendZeroCC(prevBoundary, prevSrc, errorCode)) {
break;
}
- if(!buffer.appendBMP((UChar)syllable, 0, errorCode)) {
+ if(!buffer.appendBMP((char16_t)syllable, 0, errorCode)) {
break;
}
prevBoundary = src;
@@ -1622,19 +1622,19 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
if (onlyContiguous /* FCC */ && getPreviousTrailCC(prevBoundary, prevSrc) > cc) {
// Fails FCD test, need to decompose and contiguously recompose.
if (!doCompose) {
- return FALSE;
+ return false;
}
} else {
// If !onlyContiguous (not FCC), then we ignore the tccc of
// the previous character which passed the quick check "yes && ccc==0" test.
- const UChar *nextSrc;
+ const char16_t *nextSrc;
uint16_t n16;
for (;;) {
if (src == limit) {
if (doCompose) {
buffer.appendZeroCC(prevBoundary, limit, errorCode);
}
- return TRUE;
+ return true;
}
uint8_t prevCC = cc;
nextSrc = src;
@@ -1643,7 +1643,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
cc = getCCFromNormalYesOrMaybe(n16);
if (prevCC > cc) {
if (!doCompose) {
- return FALSE;
+ return false;
}
break;
}
@@ -1667,7 +1667,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
// Slow path: Find the nearest boundaries around the current character,
// decompose and recompose.
if (prevBoundary != prevSrc && !norm16HasCompBoundaryBefore(norm16)) {
- const UChar *p = prevSrc;
+ const char16_t *p = prevSrc;
UCPTRIE_FAST_U16_PREV(normTrie, UCPTRIE_16, prevBoundary, p, c, norm16);
if (!norm16HasCompBoundaryAfter(norm16, onlyContiguous)) {
prevSrc = p;
@@ -1678,42 +1678,42 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit,
}
int32_t recomposeStartIndex=buffer.length();
// We know there is not a boundary here.
- decomposeShort(prevSrc, src, FALSE /* !stopAtCompBoundary */, onlyContiguous,
+ decomposeShort(prevSrc, src, false /* !stopAtCompBoundary */, onlyContiguous,
buffer, errorCode);
// Decompose until the next boundary.
- src = decomposeShort(src, limit, TRUE /* stopAtCompBoundary */, onlyContiguous,
+ src = decomposeShort(src, limit, true /* stopAtCompBoundary */, onlyContiguous,
buffer, errorCode);
if (U_FAILURE(errorCode)) {
break;
}
if ((src - prevSrc) > INT32_MAX) { // guard before buffer.equals()
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
- return TRUE;
+ return true;
}
recompose(buffer, recomposeStartIndex, onlyContiguous);
if(!doCompose) {
if(!buffer.equals(prevSrc, src)) {
- return FALSE;
+ return false;
}
buffer.remove();
}
prevBoundary=src;
}
- return TRUE;
+ return true;
}
// Very similar to compose(): Make the same changes in both places if relevant.
-// pQCResult==NULL: spanQuickCheckYes
-// pQCResult!=NULL: quickCheck (*pQCResult must be UNORM_YES)
-const UChar *
-Normalizer2Impl::composeQuickCheck(const UChar *src, const UChar *limit,
+// pQCResult==nullptr: spanQuickCheckYes
+// pQCResult!=nullptr: quickCheck (*pQCResult must be UNORM_YES)
+const char16_t *
+Normalizer2Impl::composeQuickCheck(const char16_t *src, const char16_t *limit,
UBool onlyContiguous,
UNormalizationCheckResult *pQCResult) const {
- const UChar *prevBoundary=src;
+ const char16_t *prevBoundary=src;
UChar32 minNoMaybeCP=minCompNoMaybeCP;
- if(limit==NULL) {
+ if(limit==nullptr) {
UErrorCode errorCode=U_ZERO_ERROR;
- src=copyLowPrefixFromNulTerminated(src, minNoMaybeCP, NULL, errorCode);
+ src=copyLowPrefixFromNulTerminated(src, minNoMaybeCP, nullptr, errorCode);
limit=u_strchr(src, 0);
if (prevBoundary != src) {
if (hasCompBoundaryAfter(*(src-1), onlyContiguous)) {
@@ -1727,7 +1727,7 @@ Normalizer2Impl::composeQuickCheck(const UChar *src, const UChar *limit,
for(;;) {
// Fast path: Scan over a sequence of characters below the minimum "no or maybe" code point,
// or with (compYes && ccc==0) properties.
- const UChar *prevSrc;
+ const char16_t *prevSrc;
UChar32 c = 0;
uint16_t norm16 = 0;
for (;;) {
@@ -1743,7 +1743,7 @@ Normalizer2Impl::composeQuickCheck(const UChar *src, const UChar *limit,
if(!U16_IS_LEAD(c)) {
break;
} else {
- UChar c2;
+ char16_t c2;
if(src!=limit && U16_IS_TRAIL(c2=*src)) {
++src;
c=U16_GET_SUPPLEMENTARY(c, c2);
@@ -1766,7 +1766,7 @@ Normalizer2Impl::composeQuickCheck(const UChar *src, const UChar *limit,
if (norm16HasCompBoundaryBefore(norm16)) {
prevBoundary = prevSrc;
} else {
- const UChar *p = prevSrc;
+ const char16_t *p = prevSrc;
uint16_t n16;
UCPTRIE_FAST_U16_PREV(normTrie, UCPTRIE_16, prevBoundary, p, c, n16);
if (norm16HasCompBoundaryAfter(n16, onlyContiguous)) {
@@ -1788,7 +1788,7 @@ Normalizer2Impl::composeQuickCheck(const UChar *src, const UChar *limit,
} else {
// If !onlyContiguous (not FCC), then we ignore the tccc of
// the previous character which passed the quick check "yes && ccc==0" test.
- const UChar *nextSrc;
+ const char16_t *nextSrc;
for (;;) {
if (norm16 < MIN_YES_YES_WITH_CC) {
if (pQCResult != nullptr) {
@@ -1821,32 +1821,32 @@ Normalizer2Impl::composeQuickCheck(const UChar *src, const UChar *limit,
}
}
}
- if(pQCResult!=NULL) {
+ if(pQCResult!=nullptr) {
*pQCResult=UNORM_NO;
}
return prevBoundary;
}
}
-void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit,
+void Normalizer2Impl::composeAndAppend(const char16_t *src, const char16_t *limit,
UBool doCompose,
UBool onlyContiguous,
UnicodeString &safeMiddle,
ReorderingBuffer &buffer,
UErrorCode &errorCode) const {
if(!buffer.isEmpty()) {
- const UChar *firstStarterInSrc=findNextCompBoundary(src, limit, onlyContiguous);
+ const char16_t *firstStarterInSrc=findNextCompBoundary(src, limit, onlyContiguous);
if(src!=firstStarterInSrc) {
- const UChar *lastStarterInDest=findPreviousCompBoundary(buffer.getStart(),
+ const char16_t *lastStarterInDest=findPreviousCompBoundary(buffer.getStart(),
buffer.getLimit(), onlyContiguous);
int32_t destSuffixLength=(int32_t)(buffer.getLimit()-lastStarterInDest);
UnicodeString middle(lastStarterInDest, destSuffixLength);
buffer.removeSuffix(destSuffixLength);
safeMiddle=middle;
middle.append(src, (int32_t)(firstStarterInSrc-src));
- const UChar *middleStart=middle.getBuffer();
+ const char16_t *middleStart=middle.getBuffer();
compose(middleStart, middleStart+middle.length(), onlyContiguous,
- TRUE, buffer, errorCode);
+ true, buffer, errorCode);
if(U_FAILURE(errorCode)) {
return;
}
@@ -1854,9 +1854,9 @@ void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit,
}
}
if(doCompose) {
- compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
+ compose(src, limit, onlyContiguous, true, buffer, errorCode);
} else {
- if(limit==NULL) { // appendZeroCC() needs limit!=NULL
+ if(limit==nullptr) { // appendZeroCC() needs limit!=nullptr
limit=u_strchr(src, 0);
}
buffer.appendZeroCC(src, limit, errorCode);
@@ -1883,7 +1883,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
ByteSinkUtil::appendUnchanged(prevBoundary, limit,
*sink, options, edits, errorCode);
}
- return TRUE;
+ return true;
}
if (*src < minNoMaybeLead) {
++src;
@@ -1904,7 +1904,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
// Medium-fast path: Handle cases that do not require full decomposition and recomposition.
if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes
if (sink == nullptr) {
- return FALSE;
+ return false;
}
// Fast path for mapping a character that is immediately surrounded by boundaries.
// In this case, we need not decompose around the current character.
@@ -1933,7 +1933,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
}
const uint16_t *mapping = getMapping(norm16);
int32_t length = *mapping++ & MAPPING_LENGTH_MASK;
- if (!ByteSinkUtil::appendChange(prevSrc, src, (const UChar *)mapping, length,
+ if (!ByteSinkUtil::appendChange(prevSrc, src, (const char16_t *)mapping, length,
*sink, edits, errorCode)) {
break;
}
@@ -1972,7 +1972,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
UChar32 l = prev - Hangul::JAMO_L_BASE;
if ((uint32_t)l < Hangul::JAMO_L_COUNT) {
if (sink == nullptr) {
- return FALSE;
+ return false;
}
int32_t t = getJamoTMinusBase(src, limit);
if (t >= 0) {
@@ -2008,7 +2008,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
// The current character is a Jamo Trailing consonant,
// compose with previous Hangul LV that does not contain a Jamo T.
if (sink == nullptr) {
- return FALSE;
+ return false;
}
UChar32 syllable = prev + getJamoTMinusBase(prevSrc, src);
prevSrc -= 3; // Replace the Hangul LV as well.
@@ -2031,7 +2031,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
if (onlyContiguous /* FCC */ && getPreviousTrailCC(prevBoundary, prevSrc) > cc) {
// Fails FCD test, need to decompose and contiguously recompose.
if (sink == nullptr) {
- return FALSE;
+ return false;
}
} else {
// If !onlyContiguous (not FCC), then we ignore the tccc of
@@ -2044,7 +2044,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
ByteSinkUtil::appendUnchanged(prevBoundary, limit,
*sink, options, edits, errorCode);
}
- return TRUE;
+ return true;
}
uint8_t prevCC = cc;
nextSrc = src;
@@ -2053,7 +2053,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
cc = getCCFromNormalYesOrMaybe(n16);
if (prevCC > cc) {
if (sink == nullptr) {
- return FALSE;
+ return false;
}
break;
}
@@ -2098,12 +2098,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
}
if ((src - prevSrc) > INT32_MAX) { // guard before buffer.equals()
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
- return TRUE;
+ return true;
}
recompose(buffer, 0, onlyContiguous);
if (!buffer.equals(prevSrc, src)) {
if (sink == nullptr) {
- return FALSE;
+ return false;
}
if (prevBoundary != prevSrc &&
!ByteSinkUtil::appendUnchanged(prevBoundary, prevSrc,
@@ -2117,12 +2117,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous,
prevBoundary = src;
}
}
- return TRUE;
+ return true;
}
-UBool Normalizer2Impl::hasCompBoundaryBefore(const UChar *src, const UChar *limit) const {
+UBool Normalizer2Impl::hasCompBoundaryBefore(const char16_t *src, const char16_t *limit) const {
if (src == limit || *src < minCompNoMaybeCP) {
- return TRUE;
+ return true;
}
UChar32 c;
uint16_t norm16;
@@ -2132,17 +2132,17 @@ UBool Normalizer2Impl::hasCompBoundaryBefore(const UChar *src, const UChar *limi
UBool Normalizer2Impl::hasCompBoundaryBefore(const uint8_t *src, const uint8_t *limit) const {
if (src == limit) {
- return TRUE;
+ return true;
}
uint16_t norm16;
UCPTRIE_FAST_U8_NEXT(normTrie, UCPTRIE_16, src, limit, norm16);
return norm16HasCompBoundaryBefore(norm16);
}
-UBool Normalizer2Impl::hasCompBoundaryAfter(const UChar *start, const UChar *p,
+UBool Normalizer2Impl::hasCompBoundaryAfter(const char16_t *start, const char16_t *p,
UBool onlyContiguous) const {
if (start == p) {
- return TRUE;
+ return true;
}
UChar32 c;
uint16_t norm16;
@@ -2153,17 +2153,17 @@ UBool Normalizer2Impl::hasCompBoundaryAfter(const UChar *start, const UChar *p,
UBool Normalizer2Impl::hasCompBoundaryAfter(const uint8_t *start, const uint8_t *p,
UBool onlyContiguous) const {
if (start == p) {
- return TRUE;
+ return true;
}
uint16_t norm16;
UCPTRIE_FAST_U8_PREV(normTrie, UCPTRIE_16, start, p, norm16);
return norm16HasCompBoundaryAfter(norm16, onlyContiguous);
}
-const UChar *Normalizer2Impl::findPreviousCompBoundary(const UChar *start, const UChar *p,
+const char16_t *Normalizer2Impl::findPreviousCompBoundary(const char16_t *start, const char16_t *p,
UBool onlyContiguous) const {
while (p != start) {
- const UChar *codePointLimit = p;
+ const char16_t *codePointLimit = p;
UChar32 c;
uint16_t norm16;
UCPTRIE_FAST_U16_PREV(normTrie, UCPTRIE_16, start, p, c, norm16);
@@ -2177,10 +2177,10 @@ const UChar *Normalizer2Impl::findPreviousCompBoundary(const UChar *start, const
return p;
}
-const UChar *Normalizer2Impl::findNextCompBoundary(const UChar *p, const UChar *limit,
+const char16_t *Normalizer2Impl::findNextCompBoundary(const char16_t *p, const char16_t *limit,
UBool onlyContiguous) const {
while (p != limit) {
- const UChar *codePointStart = p;
+ const char16_t *codePointStart = p;
UChar32 c;
uint16_t norm16;
UCPTRIE_FAST_U16_NEXT(normTrie, UCPTRIE_16, p, limit, c, norm16);
@@ -2194,7 +2194,7 @@ const UChar *Normalizer2Impl::findNextCompBoundary(const UChar *p, const UChar *
return p;
}
-uint8_t Normalizer2Impl::getPreviousTrailCC(const UChar *start, const UChar *p) const {
+uint8_t Normalizer2Impl::getPreviousTrailCC(const char16_t *start, const char16_t *p) const {
if (start == p) {
return 0;
}
@@ -2267,17 +2267,17 @@ uint16_t Normalizer2Impl::getFCD16FromNormData(UChar32 c) const {
#endif
// Dual functionality:
-// buffer!=NULL: normalize
-// buffer==NULL: isNormalized/quickCheck/spanQuickCheckYes
-const UChar *
-Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
+// buffer!=nullptr: normalize
+// buffer==nullptr: isNormalized/quickCheck/spanQuickCheckYes
+const char16_t *
+Normalizer2Impl::makeFCD(const char16_t *src, const char16_t *limit,
ReorderingBuffer *buffer,
UErrorCode &errorCode) const {
// Tracks the last FCD-safe boundary, before lccc=0 or after properly-ordered tccc<=1.
// Similar to the prevBoundary in the compose() implementation.
- const UChar *prevBoundary=src;
+ const char16_t *prevBoundary=src;
int32_t prevFCD16=0;
- if(limit==NULL) {
+ if(limit==nullptr) {
src=copyLowPrefixFromNulTerminated(src, minLcccCP, buffer, errorCode);
if(U_FAILURE(errorCode)) {
return src;
@@ -2300,7 +2300,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
// The exception is the call to decomposeShort() which uses the buffer
// in the normal way.
- const UChar *prevSrc;
+ const char16_t *prevSrc;
UChar32 c=0;
uint16_t fcd16=0;
@@ -2315,7 +2315,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
++src;
} else {
if(U16_IS_LEAD(c)) {
- UChar c2;
+ char16_t c2;
if((src+1)!=limit && U16_IS_TRAIL(c2=src[1])) {
c=U16_GET_SUPPLEMENTARY(c, c2);
}
@@ -2330,7 +2330,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
}
// copy these code units all at once
if(src!=prevSrc) {
- if(buffer!=NULL && !buffer->appendZeroCC(prevSrc, src, errorCode)) {
+ if(buffer!=nullptr && !buffer->appendZeroCC(prevSrc, src, errorCode)) {
break;
}
if(src==limit) {
@@ -2350,7 +2350,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
}
}
} else {
- const UChar *p=src-1;
+ const char16_t *p=src-1;
if(U16_IS_TRAIL(*p) && prevSrc<p && U16_IS_LEAD(*(p-1))) {
--p;
// Need to fetch the previous character's FCD value because
@@ -2376,12 +2376,12 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
if((fcd16&0xff)<=1) {
prevBoundary=src;
}
- if(buffer!=NULL && !buffer->appendZeroCC(c, errorCode)) {
+ if(buffer!=nullptr && !buffer->appendZeroCC(c, errorCode)) {
break;
}
prevFCD16=fcd16;
continue;
- } else if(buffer==NULL) {
+ } else if(buffer==nullptr) {
return prevBoundary; // quick check "no"
} else {
/*
@@ -2399,7 +2399,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
* The source text does not fulfill the conditions for FCD.
* Decompose and reorder a limited piece of the text.
*/
- decomposeShort(prevBoundary, src, FALSE, FALSE, *buffer, errorCode);
+ decomposeShort(prevBoundary, src, false, false, *buffer, errorCode);
if (U_FAILURE(errorCode)) {
break;
}
@@ -2410,22 +2410,22 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit,
return src;
}
-void Normalizer2Impl::makeFCDAndAppend(const UChar *src, const UChar *limit,
+void Normalizer2Impl::makeFCDAndAppend(const char16_t *src, const char16_t *limit,
UBool doMakeFCD,
UnicodeString &safeMiddle,
ReorderingBuffer &buffer,
UErrorCode &errorCode) const {
if(!buffer.isEmpty()) {
- const UChar *firstBoundaryInSrc=findNextFCDBoundary(src, limit);
+ const char16_t *firstBoundaryInSrc=findNextFCDBoundary(src, limit);
if(src!=firstBoundaryInSrc) {
- const UChar *lastBoundaryInDest=findPreviousFCDBoundary(buffer.getStart(),
+ const char16_t *lastBoundaryInDest=findPreviousFCDBoundary(buffer.getStart(),
buffer.getLimit());
int32_t destSuffixLength=(int32_t)(buffer.getLimit()-lastBoundaryInDest);
UnicodeString middle(lastBoundaryInDest, destSuffixLength);
buffer.removeSuffix(destSuffixLength);
safeMiddle=middle;
middle.append(src, (int32_t)(firstBoundaryInSrc-src));
- const UChar *middleStart=middle.getBuffer();
+ const char16_t *middleStart=middle.getBuffer();
makeFCD(middleStart, middleStart+middle.length(), &buffer, errorCode);
if(U_FAILURE(errorCode)) {
return;
@@ -2436,16 +2436,16 @@ void Normalizer2Impl::makeFCDAndAppend(const UChar *src, const UChar *limit,
if(doMakeFCD) {
makeFCD(src, limit, &buffer, errorCode);
} else {
- if(limit==NULL) { // appendZeroCC() needs limit!=NULL
+ if(limit==nullptr) { // appendZeroCC() needs limit!=nullptr
limit=u_strchr(src, 0);
}
buffer.appendZeroCC(src, limit, errorCode);
}
}
-const UChar *Normalizer2Impl::findPreviousFCDBoundary(const UChar *start, const UChar *p) const {
+const char16_t *Normalizer2Impl::findPreviousFCDBoundary(const char16_t *start, const char16_t *p) const {
while(start<p) {
- const UChar *codePointLimit = p;
+ const char16_t *codePointLimit = p;
UChar32 c;
uint16_t norm16;
UCPTRIE_FAST_U16_PREV(normTrie, UCPTRIE_16, start, p, c, norm16);
@@ -2459,9 +2459,9 @@ const UChar *Normalizer2Impl::findPreviousFCDBoundary(const UChar *start, const
return p;
}
-const UChar *Normalizer2Impl::findNextFCDBoundary(const UChar *p, const UChar *limit) const {
+const char16_t *Normalizer2Impl::findNextFCDBoundary(const char16_t *p, const char16_t *limit) const {
while(p<limit) {
- const UChar *codePointStart=p;
+ const char16_t *codePointStart=p;
UChar32 c;
uint16_t norm16;
UCPTRIE_FAST_U16_NEXT(normTrie, UCPTRIE_16, p, limit, c, norm16);
@@ -2479,7 +2479,7 @@ const UChar *Normalizer2Impl::findNextFCDBoundary(const UChar *p, const UChar *l
CanonIterData::CanonIterData(UErrorCode &errorCode) :
mutableTrie(umutablecptrie_open(0, 0, &errorCode)), trie(nullptr),
- canonStartSets(uprv_deleteUObject, NULL, errorCode) {}
+ canonStartSets(uprv_deleteUObject, nullptr, errorCode) {}
CanonIterData::~CanonIterData() {
umutablecptrie_close(mutableTrie);
@@ -2496,15 +2496,18 @@ void CanonIterData::addToStartSet(UChar32 origin, UChar32 decompLead, UErrorCode
// origin is not the first character, or it is U+0000.
UnicodeSet *set;
if((canonValue&CANON_HAS_SET)==0) {
- set=new UnicodeSet;
- if(set==NULL) {
- errorCode=U_MEMORY_ALLOCATION_ERROR;
+ LocalPointer<UnicodeSet> lpSet(new UnicodeSet, errorCode);
+ set=lpSet.getAlias();
+ if(U_FAILURE(errorCode)) {
return;
}
UChar32 firstOrigin=(UChar32)(canonValue&CANON_VALUE_MASK);
canonValue=(canonValue&~CANON_VALUE_MASK)|CANON_HAS_SET|(uint32_t)canonStartSets.size();
umutablecptrie_set(mutableTrie, decompLead, canonValue, &errorCode);
- canonStartSets.addElementX(set, errorCode);
+ canonStartSets.adoptElement(lpSet.orphan(), errorCode);
+ if (U_FAILURE(errorCode)) {
+ return;
+ }
if(firstOrigin!=0) {
set->add(firstOrigin);
}
@@ -2532,9 +2535,9 @@ initCanonIterData(Normalizer2Impl *impl, UErrorCode &errorCode) {
U_CDECL_END
void InitCanonIterData::doInit(Normalizer2Impl *impl, UErrorCode &errorCode) {
- U_ASSERT(impl->fCanonIterData == NULL);
+ U_ASSERT(impl->fCanonIterData == nullptr);
impl->fCanonIterData = new CanonIterData(errorCode);
- if (impl->fCanonIterData == NULL) {
+ if (impl->fCanonIterData == nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
if (U_SUCCESS(errorCode)) {
@@ -2559,7 +2562,7 @@ void InitCanonIterData::doInit(Normalizer2Impl *impl, UErrorCode &errorCode) {
}
if (U_FAILURE(errorCode)) {
delete impl->fCanonIterData;
- impl->fCanonIterData = NULL;
+ impl->fCanonIterData = nullptr;
}
}
@@ -2662,7 +2665,7 @@ UBool Normalizer2Impl::isCanonSegmentStarter(UChar32 c) const {
UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const {
int32_t canonValue=getCanonValue(c)&~CANON_NOT_SEGMENT_STARTER;
if(canonValue==0) {
- return FALSE;
+ return false;
}
set.clear();
int32_t value=canonValue&CANON_VALUE_MASK;
@@ -2681,7 +2684,7 @@ UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const {
addComposites(getCompositionsList(norm16), set);
}
}
- return TRUE;
+ return true;
}
U_NAMESPACE_END
@@ -2707,7 +2710,7 @@ unorm2_swap(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -2730,7 +2733,7 @@ unorm2_swap(const UDataSwapper *ds,
}
inBytes=(const uint8_t *)inData+headerSize;
- outBytes=(uint8_t *)outData+headerSize;
+ outBytes=(outData == nullptr) ? nullptr : (uint8_t *)outData+headerSize;
inIndexes=(const int32_t *)inBytes;
int32_t minIndexesLength;
diff --git a/contrib/libs/icu/common/normalizer2impl.h b/contrib/libs/icu/common/normalizer2impl.h
index 7c85448b71b..2cca33d349e 100644
--- a/contrib/libs/icu/common/normalizer2impl.h
+++ b/contrib/libs/icu/common/normalizer2impl.h
@@ -99,16 +99,16 @@ public:
* Decomposes c, which must be a Hangul syllable, into buffer
* and returns the length of the decomposition (2 or 3).
*/
- static inline int32_t decompose(UChar32 c, UChar buffer[3]) {
+ static inline int32_t decompose(UChar32 c, char16_t buffer[3]) {
c-=HANGUL_BASE;
UChar32 c2=c%JAMO_T_COUNT;
c/=JAMO_T_COUNT;
- buffer[0]=(UChar)(JAMO_L_BASE+c/JAMO_V_COUNT);
- buffer[1]=(UChar)(JAMO_V_BASE+c%JAMO_V_COUNT);
+ buffer[0]=(char16_t)(JAMO_L_BASE+c/JAMO_V_COUNT);
+ buffer[1]=(char16_t)(JAMO_V_BASE+c%JAMO_V_COUNT);
if(c2==0) {
return 2;
} else {
- buffer[2]=(UChar)(JAMO_T_BASE+c2);
+ buffer[2]=(char16_t)(JAMO_T_BASE+c2);
return 3;
}
}
@@ -117,21 +117,21 @@ public:
* Decomposes c, which must be a Hangul syllable, into buffer.
* This is the raw, not recursive, decomposition. Its length is always 2.
*/
- static inline void getRawDecomposition(UChar32 c, UChar buffer[2]) {
+ static inline void getRawDecomposition(UChar32 c, char16_t buffer[2]) {
UChar32 orig=c;
c-=HANGUL_BASE;
UChar32 c2=c%JAMO_T_COUNT;
if(c2==0) {
c/=JAMO_T_COUNT;
- buffer[0]=(UChar)(JAMO_L_BASE+c/JAMO_V_COUNT);
- buffer[1]=(UChar)(JAMO_V_BASE+c%JAMO_V_COUNT);
+ buffer[0]=(char16_t)(JAMO_L_BASE+c/JAMO_V_COUNT);
+ buffer[1]=(char16_t)(JAMO_V_BASE+c%JAMO_V_COUNT);
} else {
- buffer[0]=(UChar)(orig-c2); // LV syllable
- buffer[1]=(UChar)(JAMO_T_BASE+c2);
+ buffer[0]=(char16_t)(orig-c2); // LV syllable
+ buffer[1]=(char16_t)(JAMO_T_BASE+c2);
}
}
private:
- Hangul(); // no instantiation
+ Hangul() = delete; // no instantiation
};
class Normalizer2Impl;
@@ -154,22 +154,22 @@ public:
UBool isEmpty() const { return start==limit; }
int32_t length() const { return (int32_t)(limit-start); }
- UChar *getStart() { return start; }
- UChar *getLimit() { return limit; }
+ char16_t *getStart() { return start; }
+ char16_t *getLimit() { return limit; }
uint8_t getLastCC() const { return lastCC; }
- UBool equals(const UChar *start, const UChar *limit) const;
+ UBool equals(const char16_t *start, const char16_t *limit) const;
UBool equals(const uint8_t *otherStart, const uint8_t *otherLimit) const;
UBool append(UChar32 c, uint8_t cc, UErrorCode &errorCode) {
return (c<=0xffff) ?
- appendBMP((UChar)c, cc, errorCode) :
+ appendBMP((char16_t)c, cc, errorCode) :
appendSupplementary(c, cc, errorCode);
}
- UBool append(const UChar *s, int32_t length, UBool isNFD,
+ UBool append(const char16_t *s, int32_t length, UBool isNFD,
uint8_t leadCC, uint8_t trailCC,
UErrorCode &errorCode);
- UBool appendBMP(UChar c, uint8_t cc, UErrorCode &errorCode) {
+ UBool appendBMP(char16_t c, uint8_t cc, UErrorCode &errorCode) {
if(remainingCapacity==0 && !resize(1, errorCode)) {
return false;
}
@@ -186,10 +186,10 @@ public:
return true;
}
UBool appendZeroCC(UChar32 c, UErrorCode &errorCode);
- UBool appendZeroCC(const UChar *s, const UChar *sLimit, UErrorCode &errorCode);
+ UBool appendZeroCC(const char16_t *s, const char16_t *sLimit, UErrorCode &errorCode);
void remove();
void removeSuffix(int32_t suffixLength);
- void setReorderingLimit(UChar *newLimit) {
+ void setReorderingLimit(char16_t *newLimit) {
remainingCapacity+=(int32_t)(limit-newLimit);
reorderStart=limit=newLimit;
lastCC=0;
@@ -213,9 +213,9 @@ private:
UBool appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &errorCode);
void insert(UChar32 c, uint8_t cc);
- static void writeCodePoint(UChar *p, UChar32 c) {
+ static void writeCodePoint(char16_t *p, UChar32 c) {
if(c<=0xffff) {
- *p=(UChar)c;
+ *p=(char16_t)c;
} else {
p[0]=U16_LEAD(c);
p[1]=U16_TRAIL(c);
@@ -225,7 +225,7 @@ private:
const Normalizer2Impl &impl;
UnicodeString &str;
- UChar *start, *reorderStart, *limit;
+ char16_t *start, *reorderStart, *limit;
int32_t remainingCapacity;
uint8_t lastCC;
@@ -234,7 +234,7 @@ private:
void skipPrevious(); // Requires start<codePointStart.
uint8_t previousCC(); // Returns 0 if there is no previous character.
- UChar *codePointStart, *codePointLimit;
+ char16_t *codePointStart, *codePointLimit;
};
/**
@@ -322,12 +322,12 @@ public:
* @param limit The end of the string, or NULL.
* @return The lccc(c) in bits 15..8 and tccc(c) in bits 7..0.
*/
- uint16_t nextFCD16(const UChar *&s, const UChar *limit) const {
+ uint16_t nextFCD16(const char16_t *&s, const char16_t *limit) const {
UChar32 c=*s++;
if(c<minDecompNoCP || !singleLeadMightHaveNonZeroFCD16(c)) {
return 0;
}
- UChar c2;
+ char16_t c2;
if(U16_IS_LEAD(c) && s!=limit && U16_IS_TRAIL(c2=*s)) {
c=U16_GET_SUPPLEMENTARY(c, c2);
++s;
@@ -340,7 +340,7 @@ public:
* @param s A valid pointer into a string. Requires start<s.
* @return The lccc(c) in bits 15..8 and tccc(c) in bits 7..0.
*/
- uint16_t previousFCD16(const UChar *start, const UChar *&s) const {
+ uint16_t previousFCD16(const char16_t *start, const char16_t *&s) const {
UChar32 c=*--s;
if(c<minDecompNoCP) {
return 0;
@@ -350,7 +350,7 @@ public:
return 0;
}
} else {
- UChar c2;
+ char16_t c2;
if(start<s && U16_IS_LEAD(c2=*(s-1))) {
c=U16_GET_SUPPLEMENTARY(c2, c);
--s;
@@ -376,7 +376,7 @@ public:
* @param length out-only, takes the length of the decomposition, if any
* @return pointer to the decomposition, or NULL if none
*/
- const UChar *getDecomposition(UChar32 c, UChar buffer[4], int32_t &length) const;
+ const char16_t *getDecomposition(UChar32 c, char16_t buffer[4], int32_t &length) const;
/**
* Gets the raw decomposition for one code point.
@@ -385,7 +385,7 @@ public:
* @param length out-only, takes the length of the decomposition, if any
* @return pointer to the decomposition, or NULL if none
*/
- const UChar *getRawDecomposition(UChar32 c, UChar buffer[30], int32_t &length) const;
+ const char16_t *getRawDecomposition(UChar32 c, char16_t buffer[30], int32_t &length) const;
UChar32 composePair(UChar32 a, UChar32 b) const;
@@ -480,13 +480,13 @@ public:
* limit can be NULL if src is NUL-terminated.
* destLengthEstimate is the initial dest buffer capacity and can be -1.
*/
- void decompose(const UChar *src, const UChar *limit,
+ void decompose(const char16_t *src, const char16_t *limit,
UnicodeString &dest, int32_t destLengthEstimate,
UErrorCode &errorCode) const;
- const UChar *decompose(const UChar *src, const UChar *limit,
+ const char16_t *decompose(const char16_t *src, const char16_t *limit,
ReorderingBuffer *buffer, UErrorCode &errorCode) const;
- void decomposeAndAppend(const UChar *src, const UChar *limit,
+ void decomposeAndAppend(const char16_t *src, const char16_t *limit,
UBool doDecompose,
UnicodeString &safeMiddle,
ReorderingBuffer &buffer,
@@ -497,15 +497,15 @@ public:
const uint8_t *src, const uint8_t *limit,
ByteSink *sink, Edits *edits, UErrorCode &errorCode) const;
- UBool compose(const UChar *src, const UChar *limit,
+ UBool compose(const char16_t *src, const char16_t *limit,
UBool onlyContiguous,
UBool doCompose,
ReorderingBuffer &buffer,
UErrorCode &errorCode) const;
- const UChar *composeQuickCheck(const UChar *src, const UChar *limit,
+ const char16_t *composeQuickCheck(const char16_t *src, const char16_t *limit,
UBool onlyContiguous,
UNormalizationCheckResult *pQCResult) const;
- void composeAndAppend(const UChar *src, const UChar *limit,
+ void composeAndAppend(const char16_t *src, const char16_t *limit,
UBool doCompose,
UBool onlyContiguous,
UnicodeString &safeMiddle,
@@ -517,9 +517,9 @@ public:
const uint8_t *src, const uint8_t *limit,
ByteSink *sink, icu::Edits *edits, UErrorCode &errorCode) const;
- const UChar *makeFCD(const UChar *src, const UChar *limit,
+ const char16_t *makeFCD(const char16_t *src, const char16_t *limit,
ReorderingBuffer *buffer, UErrorCode &errorCode) const;
- void makeFCDAndAppend(const UChar *src, const UChar *limit,
+ void makeFCDAndAppend(const char16_t *src, const char16_t *limit,
UBool doMakeFCD,
UnicodeString &safeMiddle,
ReorderingBuffer &buffer,
@@ -608,7 +608,7 @@ private:
return (uint8_t)(*getMapping(norm16)>>8); // tccc from yesNo
}
}
- uint8_t getPreviousTrailCC(const UChar *start, const UChar *p) const;
+ uint8_t getPreviousTrailCC(const char16_t *start, const char16_t *p) const;
uint8_t getPreviousTrailCC(const uint8_t *start, const uint8_t *p) const;
// Requires algorithmic-NoNo.
@@ -651,14 +651,14 @@ private:
getCompositionsListForComposite(norm16);
}
- const UChar *copyLowPrefixFromNulTerminated(const UChar *src,
+ const char16_t *copyLowPrefixFromNulTerminated(const char16_t *src,
UChar32 minNeedDataCP,
ReorderingBuffer *buffer,
UErrorCode &errorCode) const;
enum StopAt { STOP_AT_LIMIT, STOP_AT_DECOMP_BOUNDARY, STOP_AT_COMP_BOUNDARY };
- const UChar *decomposeShort(const UChar *src, const UChar *limit,
+ const char16_t *decomposeShort(const char16_t *src, const char16_t *limit,
UBool stopAtCompBoundary, UBool onlyContiguous,
ReorderingBuffer &buffer, UErrorCode &errorCode) const;
UBool decompose(UChar32 c, uint16_t norm16,
@@ -679,9 +679,9 @@ private:
UBool norm16HasCompBoundaryBefore(uint16_t norm16) const {
return norm16 < minNoNoCompNoMaybeCC || isAlgorithmicNoNo(norm16);
}
- UBool hasCompBoundaryBefore(const UChar *src, const UChar *limit) const;
+ UBool hasCompBoundaryBefore(const char16_t *src, const char16_t *limit) const;
UBool hasCompBoundaryBefore(const uint8_t *src, const uint8_t *limit) const;
- UBool hasCompBoundaryAfter(const UChar *start, const UChar *p,
+ UBool hasCompBoundaryAfter(const char16_t *start, const char16_t *p,
UBool onlyContiguous) const;
UBool hasCompBoundaryAfter(const uint8_t *start, const uint8_t *p,
UBool onlyContiguous) const;
@@ -695,11 +695,11 @@ private:
(norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1 : *getMapping(norm16) <= 0x1ff);
}
- const UChar *findPreviousCompBoundary(const UChar *start, const UChar *p, UBool onlyContiguous) const;
- const UChar *findNextCompBoundary(const UChar *p, const UChar *limit, UBool onlyContiguous) const;
+ const char16_t *findPreviousCompBoundary(const char16_t *start, const char16_t *p, UBool onlyContiguous) const;
+ const char16_t *findNextCompBoundary(const char16_t *p, const char16_t *limit, UBool onlyContiguous) const;
- const UChar *findPreviousFCDBoundary(const UChar *start, const UChar *p) const;
- const UChar *findNextFCDBoundary(const UChar *p, const UChar *limit) const;
+ const char16_t *findPreviousFCDBoundary(const char16_t *start, const char16_t *p) const;
+ const char16_t *findNextFCDBoundary(const char16_t *p, const char16_t *limit) const;
void makeCanonIterDataFromNorm16(UChar32 start, UChar32 end, const uint16_t norm16,
CanonIterData &newData, UErrorCode &errorCode) const;
@@ -710,9 +710,9 @@ private:
// UVersionInfo dataVersion;
// BMP code point thresholds for quick check loops looking at single UTF-16 code units.
- UChar minDecompNoCP;
- UChar minCompNoMaybeCP;
- UChar minLcccCP;
+ char16_t minDecompNoCP;
+ char16_t minCompNoMaybeCP;
+ char16_t minLcccCP;
// Norm16 value thresholds for quick check combinations and types of extra data.
uint16_t minYesNo;
@@ -730,7 +730,7 @@ private:
const uint16_t *extraData; // mappings and/or compositions for yesYes, yesNo & noNo characters
const uint8_t *smallFCD; // [0x100] one bit per 32 BMP code points, set if any FCD!=0
- UInitOnce fCanonIterDataInitOnce = U_INITONCE_INITIALIZER;
+ UInitOnce fCanonIterDataInitOnce {};
CanonIterData *fCanonIterData;
};
@@ -759,7 +759,7 @@ public:
// Must be used only when it is known that norm2 is a Normalizer2WithImpl instance.
static const Normalizer2Impl *getImpl(const Normalizer2 *norm2);
private:
- Normalizer2Factory(); // No instantiation.
+ Normalizer2Factory() = delete; // No instantiation.
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/normlzr.cpp b/contrib/libs/icu/common/normlzr.cpp
index 1f4fa151797..52b9ffd54a3 100644
--- a/contrib/libs/icu/common/normlzr.cpp
+++ b/contrib/libs/icu/common/normlzr.cpp
@@ -38,7 +38,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Normalizer)
//-------------------------------------------------------------------------
Normalizer::Normalizer(const UnicodeString& str, UNormalizationMode mode) :
- UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0),
+ UObject(), fFilteredNorm2(nullptr), fNorm2(nullptr), fUMode(mode), fOptions(0),
text(new StringCharacterIterator(str)),
currentIndex(0), nextIndex(0),
buffer(), bufferPos(0)
@@ -47,7 +47,7 @@ Normalizer::Normalizer(const UnicodeString& str, UNormalizationMode mode) :
}
Normalizer::Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode) :
- UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0),
+ UObject(), fFilteredNorm2(nullptr), fNorm2(nullptr), fUMode(mode), fOptions(0),
text(new UCharCharacterIterator(str, length)),
currentIndex(0), nextIndex(0),
buffer(), bufferPos(0)
@@ -56,7 +56,7 @@ Normalizer::Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mo
}
Normalizer::Normalizer(const CharacterIterator& iter, UNormalizationMode mode) :
- UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0),
+ UObject(), fFilteredNorm2(nullptr), fNorm2(nullptr), fUMode(mode), fOptions(0),
text(iter.clone()),
currentIndex(0), nextIndex(0),
buffer(), bufferPos(0)
@@ -65,7 +65,7 @@ Normalizer::Normalizer(const CharacterIterator& iter, UNormalizationMode mode) :
}
Normalizer::Normalizer(const Normalizer &copy) :
- UObject(copy), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(copy.fUMode), fOptions(copy.fOptions),
+ UObject(copy), fFilteredNorm2(nullptr), fNorm2(nullptr), fUMode(copy.fUMode), fOptions(copy.fOptions),
text(copy.text->clone()),
currentIndex(copy.currentIndex), nextIndex(copy.nextIndex),
buffer(copy.buffer), bufferPos(copy.bufferPos)
@@ -205,7 +205,7 @@ Normalizer::isNormalized(const UnicodeString& source,
return n2->isNormalized(source, status);
}
} else {
- return FALSE;
+ return false;
}
}
@@ -410,7 +410,7 @@ Normalizer::setText(const UnicodeString& newText,
return;
}
CharacterIterator *newIter = new StringCharacterIterator(newText);
- if (newIter == NULL) {
+ if (newIter == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -431,7 +431,7 @@ Normalizer::setText(const CharacterIterator& newText,
return;
}
CharacterIterator *newIter = newText.clone();
- if (newIter == NULL) {
+ if (newIter == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -449,7 +449,7 @@ Normalizer::setText(ConstChar16Ptr newText,
return;
}
CharacterIterator *newIter = new UCharCharacterIterator(newText, length);
- if (newIter == NULL) {
+ if (newIter == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -483,7 +483,7 @@ Normalizer::nextNormalize() {
currentIndex=nextIndex;
text->setIndex(nextIndex);
if(!text->hasNext()) {
- return FALSE;
+ return false;
}
// Skip at least one character so we make progress.
UnicodeString segment(text->next32PostInc());
@@ -507,7 +507,7 @@ Normalizer::previousNormalize() {
nextIndex=currentIndex;
text->setIndex(currentIndex);
if(!text->hasPrevious()) {
- return FALSE;
+ return false;
}
UnicodeString segment;
while(text->hasPrevious()) {
diff --git a/contrib/libs/icu/common/patternprops.cpp b/contrib/libs/icu/common/patternprops.cpp
index c38a7e276de..9922683cda5 100644
--- a/contrib/libs/icu/common/patternprops.cpp
+++ b/contrib/libs/icu/common/patternprops.cpp
@@ -118,54 +118,54 @@ static const uint32_t syntaxOrWhiteSpace2000[]={
UBool
PatternProps::isSyntax(UChar32 c) {
if(c<0) {
- return FALSE;
+ return false;
} else if(c<=0xff) {
return (UBool)(latin1[c]>>1)&1;
} else if(c<0x2010) {
- return FALSE;
+ return false;
} else if(c<=0x3030) {
uint32_t bits=syntax2000[index2000[(c-0x2000)>>5]];
return (UBool)((bits>>(c&0x1f))&1);
} else if(0xfd3e<=c && c<=0xfe46) {
return c<=0xfd3f || 0xfe45<=c;
} else {
- return FALSE;
+ return false;
}
}
UBool
PatternProps::isSyntaxOrWhiteSpace(UChar32 c) {
if(c<0) {
- return FALSE;
+ return false;
} else if(c<=0xff) {
return (UBool)(latin1[c]&1);
} else if(c<0x200e) {
- return FALSE;
+ return false;
} else if(c<=0x3030) {
uint32_t bits=syntaxOrWhiteSpace2000[index2000[(c-0x2000)>>5]];
return (UBool)((bits>>(c&0x1f))&1);
} else if(0xfd3e<=c && c<=0xfe46) {
return c<=0xfd3f || 0xfe45<=c;
} else {
- return FALSE;
+ return false;
}
}
UBool
PatternProps::isWhiteSpace(UChar32 c) {
if(c<0) {
- return FALSE;
+ return false;
} else if(c<=0xff) {
return (UBool)(latin1[c]>>2)&1;
} else if(0x200e<=c && c<=0x2029) {
return c<=0x200f || 0x2028<=c;
} else {
- return FALSE;
+ return false;
}
}
-const UChar *
-PatternProps::skipWhiteSpace(const UChar *s, int32_t length) {
+const char16_t *
+PatternProps::skipWhiteSpace(const char16_t *s, int32_t length) {
while(length>0 && isWhiteSpace(*s)) {
++s;
--length;
@@ -183,8 +183,8 @@ PatternProps::skipWhiteSpace(const UnicodeString& s, int32_t start) {
return i;
}
-const UChar *
-PatternProps::trimWhiteSpace(const UChar *s, int32_t &length) {
+const char16_t *
+PatternProps::trimWhiteSpace(const char16_t *s, int32_t &length) {
if(length<=0 || (!isWhiteSpace(s[0]) && !isWhiteSpace(s[length-1]))) {
return s;
}
@@ -205,21 +205,21 @@ PatternProps::trimWhiteSpace(const UChar *s, int32_t &length) {
}
UBool
-PatternProps::isIdentifier(const UChar *s, int32_t length) {
+PatternProps::isIdentifier(const char16_t *s, int32_t length) {
if(length<=0) {
- return FALSE;
+ return false;
}
- const UChar *limit=s+length;
+ const char16_t *limit=s+length;
do {
if(isSyntaxOrWhiteSpace(*s++)) {
- return FALSE;
+ return false;
}
} while(s<limit);
- return TRUE;
+ return true;
}
-const UChar *
-PatternProps::skipIdentifier(const UChar *s, int32_t length) {
+const char16_t *
+PatternProps::skipIdentifier(const char16_t *s, int32_t length) {
while(length>0 && !isSyntaxOrWhiteSpace(*s)) {
++s;
--length;
diff --git a/contrib/libs/icu/common/patternprops.h b/contrib/libs/icu/common/patternprops.h
index 95898d580c8..23a88333f4e 100644
--- a/contrib/libs/icu/common/patternprops.h
+++ b/contrib/libs/icu/common/patternprops.h
@@ -62,7 +62,7 @@ public:
* Skips over Pattern_White_Space starting at s.
* @return The smallest pointer at or after s with a non-white space character.
*/
- static const UChar *skipWhiteSpace(const UChar *s, int32_t length);
+ static const char16_t *skipWhiteSpace(const char16_t *s, int32_t length);
/**
* Skips over Pattern_White_Space starting at index start in s.
@@ -73,24 +73,24 @@ public:
/**
* @return s except with leading and trailing Pattern_White_Space removed and length adjusted.
*/
- static const UChar *trimWhiteSpace(const UChar *s, int32_t &length);
+ static const char16_t *trimWhiteSpace(const char16_t *s, int32_t &length);
/**
* Tests whether the string contains a "pattern identifier", that is,
* whether it contains only non-Pattern_White_Space, non-Pattern_Syntax characters.
* @return true if there are no Pattern_White_Space or Pattern_Syntax characters in s.
*/
- static UBool isIdentifier(const UChar *s, int32_t length);
+ static UBool isIdentifier(const char16_t *s, int32_t length);
/**
* Skips over a "pattern identifier" starting at index s.
* @return The smallest pointer at or after s with
* a Pattern_White_Space or Pattern_Syntax character.
*/
- static const UChar *skipIdentifier(const UChar *s, int32_t length);
+ static const char16_t *skipIdentifier(const char16_t *s, int32_t length);
private:
- PatternProps(); // no constructor: all static methods
+ PatternProps() = delete; // no constructor: all static methods
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/pluralmap.cpp b/contrib/libs/icu/common/pluralmap.cpp
index ec87f0198e1..7e6156de89c 100644
--- a/contrib/libs/icu/common/pluralmap.cpp
+++ b/contrib/libs/icu/common/pluralmap.cpp
@@ -36,7 +36,7 @@ PluralMapBase::toCategory(const UnicodeString &pluralForm) {
const char *PluralMapBase::getCategoryName(Category c) {
int32_t index = c;
return (index < 0 || index >= UPRV_LENGTHOF(gPluralForms)) ?
- NULL : gPluralForms[index];
+ nullptr : gPluralForms[index];
}
diff --git a/contrib/libs/icu/common/pluralmap.h b/contrib/libs/icu/common/pluralmap.h
index 4988fd2699f..11683599edd 100644
--- a/contrib/libs/icu/common/pluralmap.h
+++ b/contrib/libs/icu/common/pluralmap.h
@@ -53,7 +53,7 @@ public:
/**
* Converts a category to a name.
- * Passing NONE or CATEGORY_COUNT for category returns NULL.
+ * Passing NONE or CATEGORY_COUNT for category returns nullptr.
*/
static const char *getCategoryName(Category category);
};
@@ -89,7 +89,7 @@ public:
fVariants[0] = &fOtherVariant;
for (int32_t i = 1; i < UPRV_LENGTHOF(fVariants); ++i) {
fVariants[i] = other.fVariants[i] ?
- new T(*other.fVariants[i]) : NULL;
+ new T(*other.fVariants[i]) : nullptr;
}
}
@@ -98,12 +98,12 @@ public:
return *this;
}
for (int32_t i = 0; i < UPRV_LENGTHOF(fVariants); ++i) {
- if (fVariants[i] != NULL && other.fVariants[i] != NULL) {
+ if (fVariants[i] != nullptr && other.fVariants[i] != nullptr) {
*fVariants[i] = *other.fVariants[i];
- } else if (fVariants[i] != NULL) {
+ } else if (fVariants[i] != nullptr) {
delete fVariants[i];
- fVariants[i] = NULL;
- } else if (other.fVariants[i] != NULL) {
+ fVariants[i] = nullptr;
+ } else if (other.fVariants[i] != nullptr) {
fVariants[i] = new T(*other.fVariants[i]);
} else {
// do nothing
@@ -125,28 +125,28 @@ public:
*fVariants[0] = T();
for (int32_t i = 1; i < UPRV_LENGTHOF(fVariants); ++i) {
delete fVariants[i];
- fVariants[i] = NULL;
+ fVariants[i] = nullptr;
}
}
/**
* Iterates through the mappings in this instance, set index to NONE
* prior to using. Call next repeatedly to get the values until it
- * returns NULL. Each time next returns, caller may pass index
+ * returns nullptr. Each time next returns, caller may pass index
* to getCategoryName() to get the name of the plural category.
- * When this function returns NULL, index is CATEGORY_COUNT
+ * When this function returns nullptr, index is CATEGORY_COUNT
*/
const T *next(Category &index) const {
int32_t idx = index;
++idx;
for (; idx < UPRV_LENGTHOF(fVariants); ++idx) {
- if (fVariants[idx] != NULL) {
+ if (fVariants[idx] != nullptr) {
index = static_cast<Category>(idx);
return fVariants[idx];
}
}
index = static_cast<Category>(idx);
- return NULL;
+ return nullptr;
}
/**
@@ -172,7 +172,7 @@ public:
*/
const T &get(Category v) const {
int32_t index = v;
- if (index < 0 || index >= UPRV_LENGTHOF(fVariants) || fVariants[index] == NULL) {
+ if (index < 0 || index >= UPRV_LENGTHOF(fVariants) || fVariants[index] == nullptr) {
return *fVariants[0];
}
return *fVariants[index];
@@ -207,7 +207,7 @@ public:
T *getMutable(
Category category,
UErrorCode &status) {
- return getMutable(category, NULL, status);
+ return getMutable(category, nullptr, status);
}
/**
@@ -218,7 +218,7 @@ public:
T *getMutable(
const char *category,
UErrorCode &status) {
- return getMutable(toCategory(category), NULL, status);
+ return getMutable(toCategory(category), nullptr, status);
}
/**
@@ -243,7 +243,7 @@ public:
if (fVariants[i] == rhs.fVariants[i]) {
continue;
}
- if (fVariants[i] == NULL || rhs.fVariants[i] == NULL) {
+ if (fVariants[i] == nullptr || rhs.fVariants[i] == nullptr) {
return false;
}
if (!eqFunc(*fVariants[i], *rhs.fVariants[i])) {
@@ -262,15 +262,15 @@ private:
const T *defaultValue,
UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
int32_t index = category;
if (index < 0 || index >= UPRV_LENGTHOF(fVariants)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if (fVariants[index] == NULL) {
- fVariants[index] = defaultValue == NULL ?
+ if (fVariants[index] == nullptr) {
+ fVariants[index] = defaultValue == nullptr ?
new T() : new T(*defaultValue);
}
if (!fVariants[index]) {
@@ -282,7 +282,7 @@ private:
void initializeNew() {
fVariants[0] = &fOtherVariant;
for (int32_t i = 1; i < UPRV_LENGTHOF(fVariants); ++i) {
- fVariants[i] = NULL;
+ fVariants[i] = nullptr;
}
}
};
diff --git a/contrib/libs/icu/common/propname.cpp b/contrib/libs/icu/common/propname.cpp
index a12eb7d9134..45062bfbd93 100644
--- a/contrib/libs/icu/common/propname.cpp
+++ b/contrib/libs/icu/common/propname.cpp
@@ -204,21 +204,21 @@ int32_t PropNameData::findPropertyValueNameGroup(int32_t valueMapIndex, int32_t
const char *PropNameData::getName(const char *nameGroup, int32_t nameIndex) {
int32_t numNames=*nameGroup++;
if(nameIndex<0 || numNames<=nameIndex) {
- return NULL;
+ return nullptr;
}
// Skip nameIndex names.
for(; nameIndex>0; --nameIndex) {
nameGroup=uprv_strchr(nameGroup, 0)+1;
}
if(*nameGroup==0) {
- return NULL; // no name (Property[Value]Aliases.txt has "n/a")
+ return nullptr; // no name (Property[Value]Aliases.txt has "n/a")
}
return nameGroup;
}
UBool PropNameData::containsName(BytesTrie &trie, const char *name) {
- if(name==NULL) {
- return FALSE;
+ if(name==nullptr) {
+ return false;
}
UStringTrieResult result=USTRINGTRIE_NO_VALUE;
char c;
@@ -229,7 +229,7 @@ UBool PropNameData::containsName(BytesTrie &trie, const char *name) {
continue;
}
if(!USTRINGTRIE_HAS_NEXT(result)) {
- return FALSE;
+ return false;
}
result=trie.next((uint8_t)c);
}
@@ -239,7 +239,7 @@ UBool PropNameData::containsName(BytesTrie &trie, const char *name) {
const char *PropNameData::getPropertyName(int32_t property, int32_t nameChoice) {
int32_t valueMapIndex=findProperty(property);
if(valueMapIndex==0) {
- return NULL; // Not a known property.
+ return nullptr; // Not a known property.
}
return getName(nameGroups+valueMaps[valueMapIndex], nameChoice);
}
@@ -247,11 +247,11 @@ const char *PropNameData::getPropertyName(int32_t property, int32_t nameChoice)
const char *PropNameData::getPropertyValueName(int32_t property, int32_t value, int32_t nameChoice) {
int32_t valueMapIndex=findProperty(property);
if(valueMapIndex==0) {
- return NULL; // Not a known property.
+ return nullptr; // Not a known property.
}
int32_t nameGroupOffset=findPropertyValueNameGroup(valueMaps[valueMapIndex+1], value);
if(nameGroupOffset==0) {
- return NULL;
+ return nullptr;
}
return getName(nameGroups+nameGroupOffset, nameChoice);
}
@@ -289,7 +289,10 @@ U_NAMESPACE_END
U_CAPI const char* U_EXPORT2
u_getPropertyName(UProperty property,
- UPropertyNameChoice nameChoice) {
+ UPropertyNameChoice nameChoice) UPRV_NO_SANITIZE_UNDEFINED {
+ // The nameChoice is really an integer with a couple of named constants.
+ // Unicode allows for names other than short and long ones.
+ // If present, these will be returned for U_LONG_PROPERTY_NAME + i, where i=1, 2,...
U_NAMESPACE_USE
return PropNameData::getPropertyName(property, nameChoice);
}
@@ -303,7 +306,10 @@ u_getPropertyEnum(const char* alias) {
U_CAPI const char* U_EXPORT2
u_getPropertyValueName(UProperty property,
int32_t value,
- UPropertyNameChoice nameChoice) {
+ UPropertyNameChoice nameChoice) UPRV_NO_SANITIZE_UNDEFINED {
+ // The nameChoice is really an integer with a couple of named constants.
+ // Unicode allows for names other than short and long ones.
+ // If present, these will be returned for U_LONG_PROPERTY_NAME + i, where i=1, 2,...
U_NAMESPACE_USE
return PropNameData::getPropertyValueName(property, value, nameChoice);
}
diff --git a/contrib/libs/icu/common/propname_data.h b/contrib/libs/icu/common/propname_data.h
index c98a0f790bd..1e247874b6a 100644
--- a/contrib/libs/icu/common/propname_data.h
+++ b/contrib/libs/icu/common/propname_data.h
@@ -11,9 +11,9 @@
U_NAMESPACE_BEGIN
-const int32_t PropNameData::indexes[8]={0x20,0x163c,0x521b,0xab62,0xab62,0xab62,0x31,0};
+const int32_t PropNameData::indexes[8]={0x20,0x1660,0x5294,0xacd0,0xacd0,0xacd0,0x31,0};
-const int32_t PropNameData::valueMaps[1415]={
+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,
@@ -23,12 +23,12 @@ const int32_t PropNameData::valueMaps[1415]={
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,0x3196,0xf7,0x31b5,0x2cd,0x32f3,0x2e3,0x334d,
-0x2ed,0x35aa,0x30f,0x3ed5,0x37b,0x3f45,0x385,0x41df,0x3b4,0x421d,0x3bc,0x4d50,0x486,0x4dce,0x490,0x4df3,
-0x496,0x4e0d,0x49c,0x4e2e,0x4a3,0x4e48,0xf7,0x4e6d,0xf7,0x4e93,0x4aa,0x4f3d,0x4c0,0x4fb6,0x4d3,0x5068,
-0x4ee,0x509f,0x4f5,0x527f,0x509,0x56ff,0x531,0x2000,0x2001,0x575e,0x539,0x3000,0x3001,0x57ea,0,0x4000,
-0x400e,0x57fc,0,0x5805,0,0x581f,0,0x5830,0,0x5841,0,0x5857,0,0x5860,0,0x587d,
-0,0x589b,0,0x58b9,0,0x58d7,0,0x58ed,0,0x5901,0,0x5917,0,0x7000,0x7001,0x5930,
+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,
@@ -38,7 +38,7 @@ const int32_t PropNameData::valueMaps[1415]={
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,0x141,0xc16,0xc23,0xc36,0xc5e,
+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,
@@ -58,54 +58,54 @@ const int32_t PropNameData::valueMaps[1415]={
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,0x1f6b,1,0,
-0x12,0x31cc,0x31dc,0x31ef,0x31ff,0x320f,0x321e,0x322e,0x3240,0x3253,0x3265,0x3275,0x3285,0x3294,0x32a3,0x32b3,
-0x32c0,0x32cf,0x32e3,0x2029,1,0,6,0x3308,0x3313,0x3320,0x332d,0x333a,0x3345,0x206d,1,0,
-0x1e,0x3362,0x3371,0x3386,0x339b,0x33b0,0x33c4,0x33d5,0x33e9,0x33fc,0x340d,0x3426,0x3438,0x3449,0x345d,0x3470,
-0x3488,0x349a,0x34a5,0x34b5,0x34c3,0x34d8,0x34ed,0x3503,0x351d,0x3533,0x3543,0x3557,0x356b,0x357c,0x3594,0x2298,
-1,0,0x68,0x35bc,0x35df,0x35e8,0x35f5,0x3600,0x3609,0x3614,0x361d,0x3636,0x363b,0x3644,0x3661,0x366a,
-0x3677,0x3680,0x36a4,0x36ab,0x36b4,0x36c7,0x36d2,0x36db,0x36e6,0x36ff,0x3708,0x3717,0x3722,0x372b,0x3736,0x373f,
-0x3746,0x374f,0x375a,0x3763,0x377c,0x3785,0x3792,0x379d,0x37ae,0x37b9,0x37ce,0x37e5,0x37ee,0x37f7,0x3810,0x381b,
-0x3824,0x382d,0x3844,0x3861,0x386c,0x387d,0x3888,0x388f,0x389c,0x38a9,0x38d6,0x38eb,0x38f4,0x390f,0x3932,0x3953,
-0x3974,0x3999,0x39c0,0x39e1,0x3a04,0x3a25,0x3a4c,0x3a6d,0x3a92,0x3ab1,0x3ad0,0x3aef,0x3b0c,0x3b2d,0x3b4e,0x3b71,
-0x3b96,0x3bb5,0x3bd4,0x3bf5,0x3c1c,0x3c41,0x3c60,0x3c81,0x3ca4,0x3cbf,0x3cd8,0x3cf3,0x3d0c,0x3d29,0x3d44,0x3d61,
-0x3d80,0x3d9d,0x3dba,0x3dd9,0x3df6,0x3e11,0x3e2e,0x3e4b,0x3e7e,0x3ea5,0x3eb8,0x25fb,1,0,6,0x3ee6,
-0x3ef5,0x3f05,0x3f15,0x3f25,0x3f36,0x2659,1,0,0x2b,0x3f54,0x3f60,0x3f6e,0x3f7d,0x3f8c,0x3f9c,0x3fad,
-0x3fc1,0x3fd6,0x3fec,0x3fff,0x4013,0x4023,0x402c,0x4037,0x4047,0x4063,0x4075,0x4083,0x4092,0x409e,0x40b3,0x40c7,
-0x40da,0x40e8,0x40fc,0x410a,0x4114,0x4126,0x4132,0x4140,0x4150,0x4157,0x415e,0x4165,0x416c,0x4173,0x4189,0x41aa,
-0x870,0x41bc,0x41c7,0x41d6,0x28b2,1,0,4,0x41f0,0x41fb,0x4207,0x4211,0x28d8,1,0,0xc6,
-0x4228,0x4235,0x424a,0x4257,0x4266,0x4274,0x4283,0x4292,0x42a4,0x42b3,0x42c1,0x42d2,0x42e1,0x42f0,0x42fd,0x4309,
-0x4318,0x4327,0x4331,0x433e,0x434b,0x435a,0x4368,0x4377,0x4383,0x438d,0x4399,0x43a9,0x43b9,0x43c7,0x43d3,0x43e4,
-0x43f0,0x43fc,0x440a,0x4417,0x4423,0x4430,0xe2f,0x443d,0x444b,0x4465,0x446e,0x447c,0x448a,0x4496,0x44a5,0x44b3,
-0x44c1,0x44cd,0x44dc,0x44ea,0x44f8,0x4505,0x4514,0x452f,0x453e,0x454f,0x4560,0x4573,0x4585,0x4594,0x45a6,0x45b5,
-0x45c1,0x45cc,0x1f3f,0x45d9,0x45e4,0x45ef,0x45fa,0x4605,0x4620,0x462b,0x4636,0x4641,0x4654,0x4668,0x4673,0x4682,
-0x4691,0x469c,0x46a7,0x46b4,0x46c3,0x46d1,0x46dc,0x46f7,0x4701,0x4712,0x4723,0x4732,0x4743,0x474e,0x4759,0x4764,
-0x476f,0x477a,0x4785,0x4790,0x479a,0x47a5,0x47b5,0x47c0,0x47ce,0x47db,0x47e6,0x47f5,0x4802,0x480f,0x481e,0x482b,
-0x483c,0x484e,0x485e,0x4869,0x487c,0x4893,0x48a1,0x48ae,0x48b9,0x48c6,0x48d7,0x48f3,0x4909,0x4914,0x4931,0x4941,
-0x4950,0x495b,0x4966,0x2059,0x4972,0x497d,0x4995,0x49a5,0x49b4,0x49c2,0x49d0,0x49db,0x49e6,0x49fa,0x4a11,0x4a29,
-0x4a39,0x4a49,0x4a59,0x4a6b,0x4a76,0x4a81,0x4a8b,0x4a97,0x4aa5,0x4ab8,0x4ac4,0x4ad1,0x4adc,0x4af8,0x4b05,0x4b13,
-0x4b2c,0x2959,0x4b3b,0x277a,0x4b48,0x4b56,0x4b68,0x4b76,0x4b82,0x4b92,0x2b94,0x4ba0,0x4bac,0x4bb7,0x4bc2,0x4bcd,
-0x4be1,0x4bef,0x4c06,0x4c12,0x4c26,0x4c34,0x4c46,0x4c5c,0x4c6a,0x4c7c,0x4c8a,0x4ca7,0x4cb9,0x4cc6,0x4cd7,0x4ce9,
-0x4d03,0x4d10,0x4d23,0x4d34,0x3111,0x4d41,0x331b,1,0,6,0x4d6a,0x4d7d,0x4d8d,0x4d9b,0x4dac,0x4dbc,
-0x3377,0x12,0,1,0x4de6,0x4dec,0x3384,0x12,0,1,0x4de6,0x4dec,0x3391,1,0,3,
-0x4de6,0x4dec,0x4e25,0x33a7,1,0,3,0x4de6,0x4dec,0x4e25,0x33bd,1,0,0x12,0x4eaf,0x4eb9,
-0x4ec5,0x4ecc,0x4ed7,0x4edc,0x4ee3,0x4eea,0x4ef3,0x4ef8,0x4efd,0x4f0d,0x870,0x41bc,0x4f19,0x41c7,0x4f29,0x41d6,
-0x3466,1,0,0xf,0x4eaf,0x4f50,0x4f5a,0x4f64,0x4f6f,0x4092,0x4f79,0x4f85,0x4f8d,0x4f94,0x4f9e,0x4ec5,
-0x4ecc,0x4edc,0x4fa8,0x34ed,1,0,0x17,0x4eaf,0x4fc5,0x4f64,0x4fd1,0x4fde,0x4fec,0x4092,0x4ff7,0x4ec5,
-0x5008,0x4edc,0x5017,0x5025,0x870,0x41aa,0x5031,0x5042,0x41bc,0x4f19,0x41c7,0x4f29,0x41d6,0x5053,0x360a,1,
-0,3,0x5086,0x508e,0x5096,0x3623,1,0,0x10,0x50bf,0x50c6,0x50d5,0x50f6,0x5119,0x5124,0x5143,
-0x515a,0x5167,0x5170,0x518f,0x51c2,0x51dd,0x520c,0x5229,0x524e,0x36bc,1,0,0x24,0x529d,0x52aa,0x52bd,
-0x52ca,0x52f7,0x531c,0x5331,0x5350,0x5371,0x539e,0x53d7,0x53fa,0x541d,0x544a,0x547f,0x54a6,0x54cf,0x5506,0x5535,
-0x5556,0x557b,0x558a,0x55ad,0x55c4,0x55d1,0x55e0,0x55fd,0x5616,0x5639,0x565e,0x5677,0x568c,0x569b,0x56ac,0x56b9,
-0x56da,0x388c,1,0,4,0x5718,0x5723,0x573b,0x5753,0x38c8,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,0x3362,0x3371,0x3386,0x339b,0x578c,0x33b0,0x33c4,0x5782,0x33d5,0x33e9,0x33fc,0x579d,0x340d,0x3426,0x3438,
-0x57b4,0x3449,0x345d,0x3470,0x57dd,0x3488,0x349a,0x34a5,0x34b5,0x5779,0x34c3,0x34d8,0x34ed,0x3503,0x351d,0x3533,
-0x3543,0x3557,0x356b,0x57d3,0x357c,0x3594,0x57be
+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 uint8_t PropNameData::bytesTries[15327]={
+const uint8_t PropNameData::bytesTries[15412]={
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,
@@ -292,7 +292,7 @@ const uint8_t PropNameData::bytesTries[15327]={
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,0x14,0x74,0xc2,0x30,0x77,0x89,0x77,
+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,
@@ -436,637 +436,643 @@ const uint8_t PropNameData::bytesTries[15327]={
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,1,0x62,0x38,0x6e,0x17,0x64,0x69,0x6e,0x61,0x67,
-0x61,0x72,0x69,0xa5,0x26,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0xef,0x67,0xc4,
-0x43,0x6a,0xc1,0xca,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,3,0x69,0x3a,0x6e,0x42,0x74,0xa2,
-0x58,0x79,0x13,0x61,0x68,0x6c,0x69,0xa3,0xa2,0x12,0x74,0x68,0x69,0xa3,0xc1,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,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,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,0x53,0x63,0xa8,0x28,0x64,0xac,0xd3,
-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,0xec,0x6e,0x3e,0x72,0xa2,0x5d,0x73,0xa2,0xdf,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,0x78,0x72,
-0x12,0x6f,0x77,0x73,0x7d,0x12,0x62,0x69,0x63,0x38,3,0x65,0x4a,0x6d,0x74,0x70,
-0xa2,0x4a,0x73,0x11,0x75,0x70,0xa2,0x80,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,
-0xa3,0x80,0x11,0x78,0x74,2,0x61,0xa3,0xd2,0x62,0xa5,0x35,0x65,0x13,0x6e,0x64,
-0x65,0x64,1,0x61,0xa3,0xd2,0x62,0xa5,0x35,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,0x59,0x6f,0xa2,0x62,0x75,0xa4,0x1d,0x79,
-1,0x70,0x9c,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,3,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,
-9,0x65,0x13,0x6e,0x64,0x65,0x64,2,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,
-9,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,
-0x41,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,0xe1,0x68,0xa4,0xb,0x6a,0x10,0x6b,0xa2,0x47,4,0x63,0x8c,
-0x65,0xa2,0x80,0x72,0xa2,0x98,0x73,0xa2,0xaa,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,6,0x64,0x6b,0x64,0xa3,0xd1,0x65,0xa5,0,
-0x66,0xa5,0x12,0x67,0xa5,0x2e,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,6,0x64,0xc,0x64,0xa3,0xd1,0x65,0xa5,0,0x66,
-0xa5,0x12,0x67,0xa5,0x2e,0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3,0xc5,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,0x7e,0x6f,0xa2,0x69,0x75,0x15,0x70,0x6c,0x6f,
-0x79,0x61,0x6e,0xa3,0xe1,1,0x73,0x50,0x76,0x16,0x61,0x6e,0x61,0x67,0x61,0x72,
-0x69,0x3e,0x12,0x65,0x78,0x74,0xa2,0xb3,0x14,0x65,0x6e,0x64,0x65,0x64,0xa3,0xb3,
-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,0x60,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,0xa2,0xf2,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,0x80,0x65,0x10,0x77,1,0x61,0xa3,
-0xaa,0x74,0x14,0x61,0x69,0x6c,0x75,0x65,0x97,2,0x62,0x2e,0x6e,0x3c,0x72,0x10,
-0x62,0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,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,0xd,
-0x6b,0xc2,0x24,0x6b,0xa4,0x17,0x6c,0xa4,0xb2,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,0x30,0x68,0x9a,0x69,0x11,
-0x74,0x73,0xa3,0xbf,4,0x69,0x3c,0x6c,0x44,0x6e,0x48,0x74,0x56,0x79,0x13,0x61,
-0x68,0x6c,0x69,0xa3,0x4f,0x12,0x74,0x68,0x69,0xa3,0x78,0x10,0x69,0xa3,0x4f,1,
-0x61,0x4d,0x6e,0x12,0x61,0x64,0x61,0x4b,0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,
-0x6f,0x72,0x68,0x69,0x72,0x61,0x67,0x61,0x6e,0x61,0x8d,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
+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
};
-const char PropNameData::nameGroups[22855]={
+const char PropNameData::nameGroups[23100]={
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,
@@ -1553,9 +1559,18 @@ const char PropNameData::nameGroups[22855]={
'r','i','g','i','n','a','l','_','S','y','l','l','a','b','i','c','s','_','E','x','t','e','n','d','e','d','_','A',0,
2,'V','i','t','h','k','u','q','i',0,'V','i','t','h','k','u','q','i',0,
2,'Z','n','a','m','e','n','n','y','_','M','u','s','i','c',0,'Z','n','a','m','e','n','n','y','_','M','u','s','i','c','a','l',
-'_','N','o','t','a','t','i','o','n',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','o','t','a','t','i','o','n',0,2,'A','r','a','b','i','c','_','E','x','t','_','C',0,
+'A','r','a','b','i','c','_','E','x','t','e','n','d','e','d','_','C',0,
+2,'C','J','K','_','E','x','t','_','H',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','_','H',0,2,'C','y','r','i','l','l','i','c','_','E','x','t','_','D',0,
+'C','y','r','i','l','l','i','c','_','E','x','t','e','n','d','e','d','_','D',0,
+2,'D','e','v','a','n','a','g','a','r','i','_','E','x','t','_','A',0,'D','e','v','a','n','a','g','a','r','i','_','E','x','t',
+'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,
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,
@@ -1844,6 +1859,7 @@ const char PropNameData::nameGroups[22855]={
2,'Y','e','z','i',0,'Y','e','z','i','d','i',0,2,'C','p','m','n',0,'C','y','p','r','o','_','M','i','n','o','a','n',0,
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,'L',0,'L','e','a','d','i','n','g','_','J','a','m','o',0,
diff --git a/contrib/libs/icu/common/propsvec.cpp b/contrib/libs/icu/common/propsvec.cpp
index 056fcda9cf6..18cc3e8cd8e 100644
--- a/contrib/libs/icu/common/propsvec.cpp
+++ b/contrib/libs/icu/common/propsvec.cpp
@@ -47,21 +47,21 @@ upvec_open(int32_t columns, UErrorCode *pErrorCode) {
uint32_t cp;
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
if(columns<1) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
columns+=2; /* count range start and limit columns */
pv=(UPropsVectors *)uprv_malloc(sizeof(UPropsVectors));
v=(uint32_t *)uprv_malloc(UPVEC_INITIAL_ROWS*columns*4);
- if(pv==NULL || v==NULL) {
+ if(pv==nullptr || v==nullptr) {
uprv_free(pv);
uprv_free(v);
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(pv, 0, sizeof(UPropsVectors));
pv->v=v;
@@ -85,7 +85,7 @@ upvec_open(int32_t columns, UErrorCode *pErrorCode) {
U_CAPI void U_EXPORT2
upvec_close(UPropsVectors *pv) {
- if(pv!=NULL) {
+ if(pv!=nullptr) {
uprv_free(pv->v);
uprv_free(pv);
}
@@ -165,7 +165,7 @@ upvec_setValue(UPropsVectors *pv,
if(U_FAILURE(*pErrorCode)) {
return;
}
- if( pv==NULL ||
+ if( pv==nullptr ||
start<0 || start>end || end>UPVEC_MAX_CP ||
column<0 || column>=(pv->columns-2)
) {
@@ -216,7 +216,7 @@ upvec_setValue(UPropsVectors *pv,
return;
}
newVectors=(uint32_t *)uprv_malloc(newMaxRows*columns*4);
- if(newVectors==NULL) {
+ if(newVectors==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -296,15 +296,15 @@ upvec_getRow(const UPropsVectors *pv, int32_t rowIndex,
int32_t columns;
if(pv->isCompacted || rowIndex<0 || rowIndex>=pv->rows) {
- return NULL;
+ return nullptr;
}
columns=pv->columns;
row=pv->v+rowIndex*columns;
- if(pRangeStart!=NULL) {
+ if(pRangeStart!=nullptr) {
*pRangeStart=(UChar32)row[0];
}
- if(pRangeEnd!=NULL) {
+ if(pRangeEnd!=nullptr) {
*pRangeEnd=(UChar32)row[1]-1;
}
return row+2;
@@ -342,7 +342,7 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE
if(U_FAILURE(*pErrorCode)) {
return;
}
- if(handler==NULL) {
+ if(handler==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -351,7 +351,7 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE
}
/* Set the flag now: Sorting and compacting destroys the builder data structure. */
- pv->isCompacted=TRUE;
+ pv->isCompacted=true;
rows=pv->rows;
columns=pv->columns;
@@ -360,7 +360,7 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE
/* sort the properties vectors to find unique vector values */
uprv_sortArray(pv->v, rows, columns*4,
- upvec_compareRows, pv, FALSE, pErrorCode);
+ upvec_compareRows, pv, false, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
return;
}
@@ -437,12 +437,12 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE
U_CAPI const uint32_t * U_EXPORT2
upvec_getArray(const UPropsVectors *pv, int32_t *pRows, int32_t *pColumns) {
if(!pv->isCompacted) {
- return NULL;
+ return nullptr;
}
- if(pRows!=NULL) {
+ if(pRows!=nullptr) {
*pRows=pv->rows;
}
- if(pColumns!=NULL) {
+ if(pColumns!=nullptr) {
*pColumns=pv->columns-2;
}
return pv->v;
@@ -455,23 +455,23 @@ upvec_cloneArray(const UPropsVectors *pv,
int32_t byteLength;
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
if(!pv->isCompacted) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
byteLength=pv->rows*(pv->columns-2)*4;
clonedArray=(uint32_t *)uprv_malloc(byteLength);
- if(clonedArray==NULL) {
+ if(clonedArray==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(clonedArray, pv->v, byteLength);
- if(pRows!=NULL) {
+ if(pRows!=nullptr) {
*pRows=pv->rows;
}
- if(pColumns!=NULL) {
+ if(pColumns!=nullptr) {
*pColumns=pv->columns-2;
}
return clonedArray;
@@ -479,12 +479,12 @@ upvec_cloneArray(const UPropsVectors *pv,
U_CAPI UTrie2 * U_EXPORT2
upvec_compactToUTrie2WithRowIndexes(UPropsVectors *pv, UErrorCode *pErrorCode) {
- UPVecToUTrie2Context toUTrie2={ NULL, 0, 0, 0 };
+ UPVecToUTrie2Context toUTrie2={ nullptr, 0, 0, 0 };
upvec_compact(pv, upvec_compactToUTrie2Handler, &toUTrie2, pErrorCode);
utrie2_freeze(toUTrie2.trie, UTRIE2_16_VALUE_BITS, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
utrie2_close(toUTrie2.trie);
- toUTrie2.trie=NULL;
+ toUTrie2.trie=nullptr;
}
return toUTrie2.trie;
}
@@ -503,7 +503,7 @@ upvec_compactToUTrie2Handler(void *context,
(void)columns;
UPVecToUTrie2Context *toUTrie2=(UPVecToUTrie2Context *)context;
if(start<UPVEC_FIRST_SPECIAL_CP) {
- utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, TRUE, pErrorCode);
+ utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, true, pErrorCode);
} else {
switch(start) {
case UPVEC_INITIAL_VALUE_CP:
diff --git a/contrib/libs/icu/common/punycode.cpp b/contrib/libs/icu/common/punycode.cpp
index 4832938ff7e..7ebdebc1888 100644
--- a/contrib/libs/icu/common/punycode.cpp
+++ b/contrib/libs/icu/common/punycode.cpp
@@ -179,21 +179,21 @@ constexpr int32_t DECODE_MAX_CHARS=2000;
// encode
U_CAPI int32_t
-u_strToPunycode(const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destCapacity,
+u_strToPunycode(const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
const UBool *caseFlags,
UErrorCode *pErrorCode) {
int32_t cpBuffer[ENCODE_MAX_CODE_UNITS];
int32_t n, delta, handledCPCount, basicLength, destLength, bias, j, m, q, k, t, srcCPCount;
- UChar c, c2;
+ char16_t c, c2;
/* argument checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(src==NULL || srcLength<-1 || (dest==NULL && destCapacity!=0)) {
+ if(src==nullptr || srcLength<-1 || (dest==nullptr && destCapacity!=0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -221,13 +221,13 @@ u_strToPunycode(const UChar *src, int32_t srcLength,
cpBuffer[srcCPCount++]=0;
if(destLength<destCapacity) {
dest[destLength]=
- caseFlags!=NULL ?
+ caseFlags!=nullptr ?
asciiCaseMap((char)c, caseFlags[j]) :
(char)c;
}
++destLength;
} else {
- n=(caseFlags!=NULL && caseFlags[j])<<31L;
+ n=(caseFlags!=nullptr && caseFlags[j])<<31L;
if(U16_IS_SINGLE(c)) {
n|=c;
} else if(U16_IS_LEAD(c) && U16_IS_TRAIL(c2=src[j+1])) {
@@ -249,13 +249,13 @@ u_strToPunycode(const UChar *src, int32_t srcLength,
cpBuffer[srcCPCount++]=0;
if(destLength<destCapacity) {
dest[destLength]=
- caseFlags!=NULL ?
+ caseFlags!=nullptr ?
asciiCaseMap((char)c, caseFlags[j]) :
(char)c;
}
++destLength;
} else {
- n=(caseFlags!=NULL && caseFlags[j])<<31L;
+ n=(caseFlags!=nullptr && caseFlags[j])<<31L;
if(U16_IS_SINGLE(c)) {
n|=c;
} else if(U16_IS_LEAD(c) && (j+1)<srcLength && U16_IS_TRAIL(c2=src[j+1])) {
@@ -371,20 +371,20 @@ u_strToPunycode(const UChar *src, int32_t srcLength,
// decode
U_CAPI int32_t
-u_strFromPunycode(const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destCapacity,
+u_strFromPunycode(const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
UBool *caseFlags,
UErrorCode *pErrorCode) {
int32_t n, destLength, i, bias, basicLength, j, in, oldi, w, k, digit, t,
destCPCount, firstSupplementaryIndex, cpLength;
- UChar b;
+ char16_t b;
/* argument checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(src==NULL || srcLength<-1 || (dest==NULL && destCapacity!=0)) {
+ if(src==nullptr || srcLength<-1 || (dest==nullptr && destCapacity!=0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -421,9 +421,9 @@ u_strFromPunycode(const UChar *src, int32_t srcLength,
}
if(j<destCapacity) {
- dest[j]=(UChar)b;
+ dest[j]=(char16_t)b;
- if(caseFlags!=NULL) {
+ if(caseFlags!=nullptr) {
caseFlags[j]=IS_BASIC_UPPERCASE(b);
}
}
@@ -525,7 +525,7 @@ u_strFromPunycode(const UChar *src, int32_t srcLength,
/* Insert n at position i of the output: */
cpLength=U16_LENGTH(n);
- if(dest!=NULL && ((destLength+cpLength)<=destCapacity)) {
+ if(dest!=nullptr && ((destLength+cpLength)<=destCapacity)) {
int32_t codeUnitIndex;
/*
@@ -550,12 +550,12 @@ u_strFromPunycode(const UChar *src, int32_t srcLength,
U16_FWD_N(dest, codeUnitIndex, destLength, i-codeUnitIndex);
}
- /* use the UChar index codeUnitIndex instead of the code point index i */
+ /* use the char16_t index codeUnitIndex instead of the code point index i */
if(codeUnitIndex<destLength) {
uprv_memmove(dest+codeUnitIndex+cpLength,
dest+codeUnitIndex,
(destLength-codeUnitIndex)*U_SIZEOF_UCHAR);
- if(caseFlags!=NULL) {
+ if(caseFlags!=nullptr) {
uprv_memmove(caseFlags+codeUnitIndex+cpLength,
caseFlags+codeUnitIndex,
destLength-codeUnitIndex);
@@ -563,17 +563,17 @@ u_strFromPunycode(const UChar *src, int32_t srcLength,
}
if(cpLength==1) {
/* BMP, insert one code unit */
- dest[codeUnitIndex]=(UChar)n;
+ dest[codeUnitIndex]=(char16_t)n;
} else {
/* supplementary character, insert two code units */
dest[codeUnitIndex]=U16_LEAD(n);
dest[codeUnitIndex+1]=U16_TRAIL(n);
}
- if(caseFlags!=NULL) {
+ if(caseFlags!=nullptr) {
/* Case of last character determines uppercase flag: */
caseFlags[codeUnitIndex]=IS_BASIC_UPPERCASE(src[in-1]);
if(cpLength==2) {
- caseFlags[codeUnitIndex+1]=FALSE;
+ caseFlags[codeUnitIndex+1]=false;
}
}
}
diff --git a/contrib/libs/icu/common/putil.cpp b/contrib/libs/icu/common/putil.cpp
index 68be079b3a3..ab904af20ac 100644
--- a/contrib/libs/icu/common/putil.cpp
+++ b/contrib/libs/icu/common/putil.cpp
@@ -244,11 +244,11 @@ u_signBit(double d) {
*/
UDate fakeClock_t0 = 0; /** Time to start the clock from **/
UDate fakeClock_dt = 0; /** Offset (fake time - real time) **/
-UBool fakeClock_set = FALSE; /** True if fake clock has spun up **/
+UBool fakeClock_set = false; /** True if fake clock has spun up **/
static UDate getUTCtime_real() {
struct timeval posixTime;
- gettimeofday(&posixTime, NULL);
+ gettimeofday(&posixTime, nullptr);
return (UDate)(((int64_t)posixTime.tv_sec * U_MILLIS_PER_SECOND) + (posixTime.tv_usec/1000));
}
@@ -258,7 +258,7 @@ static UDate getUTCtime_fake() {
if(!fakeClock_set) {
UDate real = getUTCtime_real();
const char *fake_start = getenv("U_FAKETIME_START");
- if((fake_start!=NULL) && (fake_start[0]!=0)) {
+ if((fake_start!=nullptr) && (fake_start[0]!=0)) {
sscanf(fake_start,"%lf",&fakeClock_t0);
fakeClock_dt = fakeClock_t0 - real;
fprintf(stderr,"U_DEBUG_FAKETIME was set at compile time, so the ICU clock will start at a preset value\n"
@@ -269,7 +269,7 @@ static UDate getUTCtime_fake() {
fprintf(stderr,"U_DEBUG_FAKETIME was set at compile time, but U_FAKETIME_START was not set.\n"
"Set U_FAKETIME_START to the number of milliseconds since 1/1/1970 to set the ICU clock.\n");
}
- fakeClock_set = TRUE;
+ fakeClock_set = true;
}
umtx_unlock(&fakeClockMutex);
@@ -319,7 +319,7 @@ uprv_getRawUTCtime()
#if HAVE_GETTIMEOFDAY
struct timeval posixTime;
- gettimeofday(&posixTime, NULL);
+ gettimeofday(&posixTime, nullptr);
return (UDate)(((int64_t)posixTime.tv_sec * U_MILLIS_PER_SECOND) + (posixTime.tv_usec/1000));
#else
time_t epochtime;
@@ -580,7 +580,7 @@ uprv_trunc(double d)
* type of arbitrary bit length.
*/
U_CAPI double U_EXPORT2
-uprv_maxMantissa(void)
+uprv_maxMantissa()
{
return pow(2.0, DBL_MANT_DIG + 1.0) - 1.0;
}
@@ -612,11 +612,11 @@ uprv_maximumPtr(void * base)
* Unlike other operating systems, the pointer model isn't determined at
* compile time on i5/OS.
*/
- if ((base != NULL) && (_TESTPTR(base, _C_TERASPACE_CHECK))) {
+ if ((base != nullptr) && (_TESTPTR(base, _C_TERASPACE_CHECK))) {
/* if it is a TERASPACE pointer the max is 2GB - 4k */
return ((void *)(((char *)base)-((uint32_t)(base))+((uint32_t)0x7fffefff)));
}
- /* otherwise 16MB since NULL ptr is not checkable or the ptr is not TERASPACE */
+ /* otherwise 16MB since nullptr ptr is not checkable or the ptr is not TERASPACE */
return ((void *)(((char *)base)-((uint32_t)(base))+((uint32_t)0xffefff)));
#else
@@ -722,7 +722,7 @@ extern U_IMPORT char *U_TZNAME[];
#include <dirent.h> /* Needed to search through system timezone files */
#endif
static char gTimeZoneBuffer[PATH_MAX];
-static char *gTimeZoneBufferPtr = NULL;
+static const char *gTimeZoneBufferPtr = nullptr;
#endif
#if !U_PLATFORM_USES_ONLY_WIN32_API
@@ -879,7 +879,7 @@ static const char* remapShortTimeZone(const char *stdID, const char *dstID, int3
return OFFSET_ZONE_MAPPINGS[idx].olsonID;
}
}
- return NULL;
+ return nullptr;
}
#endif
@@ -905,16 +905,16 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
int32_t sizeFileRead;
int32_t sizeFileToRead;
char bufferFile[MAX_READ_SIZE];
- UBool result = TRUE;
+ UBool result = true;
- if (tzInfo->defaultTZFilePtr == NULL) {
+ if (tzInfo->defaultTZFilePtr == nullptr) {
tzInfo->defaultTZFilePtr = fopen(defaultTZFileName, "r");
}
file = fopen(TZFileName, "r");
tzInfo->defaultTZPosition = 0; /* reset position to begin search */
- if (file != NULL && tzInfo->defaultTZFilePtr != NULL) {
+ if (file != nullptr && tzInfo->defaultTZFilePtr != nullptr) {
/* First check that the file size are equal. */
if (tzInfo->defaultTZFileSize == 0) {
fseek(tzInfo->defaultTZFilePtr, 0, SEEK_END);
@@ -925,12 +925,12 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
sizeFileLeft = sizeFile;
if (sizeFile != tzInfo->defaultTZFileSize) {
- result = FALSE;
+ result = false;
} else {
/* Store the data from the files in separate buffers and
* compare each byte to determine equality.
*/
- if (tzInfo->defaultTZBuffer == NULL) {
+ if (tzInfo->defaultTZBuffer == nullptr) {
rewind(tzInfo->defaultTZFilePtr);
tzInfo->defaultTZBuffer = (char*)uprv_malloc(sizeof(char) * tzInfo->defaultTZFileSize);
sizeFileRead = fread(tzInfo->defaultTZBuffer, 1, tzInfo->defaultTZFileSize, tzInfo->defaultTZFilePtr);
@@ -942,7 +942,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
sizeFileRead = fread(bufferFile, 1, sizeFileToRead, file);
if (memcmp(tzInfo->defaultTZBuffer + tzInfo->defaultTZPosition, bufferFile, sizeFileRead) != 0) {
- result = FALSE;
+ result = false;
break;
}
sizeFileLeft -= sizeFileRead;
@@ -950,10 +950,10 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
}
}
} else {
- result = FALSE;
+ result = false;
}
- if (file != NULL) {
+ if (file != nullptr) {
fclose(file);
}
@@ -964,17 +964,17 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil
/* dirent also lists two entries: "." and ".." that we can safely ignore. */
#define SKIP1 "."
#define SKIP2 ".."
-static UBool U_CALLCONV putil_cleanup(void);
-static CharString *gSearchTZFileResult = NULL;
+static UBool U_CALLCONV putil_cleanup();
+static CharString *gSearchTZFileResult = nullptr;
/*
* This method recursively traverses the directory given for a matching TZ file and returns the first match.
* This function is not thread safe - it uses a global, gSearchTZFileResult, to hold its results.
*/
static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
- DIR* dirp = NULL;
- struct dirent* dirEntry = NULL;
- char* result = NULL;
+ DIR* dirp = nullptr;
+ struct dirent* dirEntry = nullptr;
+ char* result = nullptr;
UErrorCode status = U_ZERO_ERROR;
/* Save the current path */
@@ -984,20 +984,20 @@ static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
}
dirp = opendir(path);
- if (dirp == NULL) {
+ if (dirp == nullptr) {
goto cleanupAndReturn;
}
- if (gSearchTZFileResult == NULL) {
+ if (gSearchTZFileResult == nullptr) {
gSearchTZFileResult = new CharString;
- if (gSearchTZFileResult == NULL) {
+ if (gSearchTZFileResult == nullptr) {
goto cleanupAndReturn;
}
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
}
/* Check each entry in the directory. */
- while((dirEntry = readdir(dirp)) != NULL) {
+ while((dirEntry = readdir(dirp)) != nullptr) {
const char* dirName = dirEntry->d_name;
if (uprv_strcmp(dirName, SKIP1) != 0 && uprv_strcmp(dirName, SKIP2) != 0
&& uprv_strcmp(TZFILE_SKIP, dirName) != 0 && uprv_strcmp(TZFILE_SKIP2, dirName) != 0) {
@@ -1008,8 +1008,8 @@ static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
break;
}
- DIR* subDirp = NULL;
- if ((subDirp = opendir(newpath.data())) != NULL) {
+ DIR* subDirp = nullptr;
+ if ((subDirp = opendir(newpath.data())) != nullptr) {
/* If this new path is a directory, make a recursive call with the newpath. */
closedir(subDirp);
newpath.append('/', status);
@@ -1021,11 +1021,11 @@ static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
Have to get out here. Otherwise, we'd keep looking
and return the first match in the top-level directory
if there's a match in the top-level. If not, this function
- would return NULL and set gTimeZoneBufferPtr to NULL in initDefault().
+ would return nullptr and set gTimeZoneBufferPtr to nullptr in initDefault().
It worked without this in most cases because we have a fallback of calling
localtime_r to figure out the default timezone.
*/
- if (result != NULL)
+ if (result != nullptr)
break;
} else {
if(compareBinaryFiles(TZDEFAULT, newpath.data(), tzInfo)) {
@@ -1074,7 +1074,7 @@ static void u_property_read(void* cookie, const char* name, const char* value,
#endif
U_CAPI void U_EXPORT2
-uprv_tzname_clear_cache(void)
+uprv_tzname_clear_cache()
{
#if U_PLATFORM == U_PF_ANDROID
/* Android's timezone is stored in system property. */
@@ -1104,7 +1104,7 @@ uprv_tzname_clear_cache(void)
#endif
#if defined(CHECK_LOCALTIME_LINK) && !defined(DEBUG_SKIP_LOCALTIME_LINK)
- gTimeZoneBufferPtr = NULL;
+ gTimeZoneBufferPtr = nullptr;
#endif
}
@@ -1112,11 +1112,11 @@ U_CAPI const char* U_EXPORT2
uprv_tzname(int n)
{
(void)n; // Avoid unreferenced parameter warning.
- const char *tzid = NULL;
+ const char *tzid = nullptr;
#if U_PLATFORM_USES_ONLY_WIN32_API
tzid = uprv_detectWindowsTimeZone();
- if (tzid != NULL) {
+ if (tzid != nullptr) {
return tzid;
}
@@ -1134,7 +1134,7 @@ uprv_tzname(int n)
int ret;
tzid = getenv("TZFILE");
- if (tzid != NULL) {
+ if (tzid != nullptr) {
return tzid;
}
#endif*/
@@ -1146,7 +1146,7 @@ uprv_tzname(int n)
#else
tzid = getenv("TZ");
#endif
- if (tzid != NULL && isValidOlsonID(tzid)
+ if (tzid != nullptr && isValidOlsonID(tzid)
#if U_PLATFORM == U_PF_SOLARIS
/* Don't misinterpret TZ "localtime" on Solaris as a time zone name. */
&& uprv_strcmp(tzid, TZ_ENV_CHECK) != 0
@@ -1165,46 +1165,46 @@ uprv_tzname(int n)
#if defined(CHECK_LOCALTIME_LINK) && !defined(DEBUG_SKIP_LOCALTIME_LINK)
/* Caller must handle threading issues */
- if (gTimeZoneBufferPtr == NULL) {
+ if (gTimeZoneBufferPtr == nullptr) {
/*
This is a trick to look at the name of the link to get the Olson ID
because the tzfile contents is underspecified.
This isn't guaranteed to work because it may not be a symlink.
*/
- int32_t ret = (int32_t)readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1);
- if (0 < ret) {
+ char *ret = realpath(TZDEFAULT, gTimeZoneBuffer);
+ if (ret != nullptr && uprv_strcmp(TZDEFAULT, gTimeZoneBuffer) != 0) {
int32_t tzZoneInfoTailLen = uprv_strlen(TZZONEINFOTAIL);
- gTimeZoneBuffer[ret] = 0;
- char * tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL);
-
- if (tzZoneInfoTailPtr != NULL
- && isValidOlsonID(tzZoneInfoTailPtr + tzZoneInfoTailLen))
- {
- return (gTimeZoneBufferPtr = tzZoneInfoTailPtr + tzZoneInfoTailLen);
+ const char *tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL);
+ if (tzZoneInfoTailPtr != nullptr) {
+ tzZoneInfoTailPtr += tzZoneInfoTailLen;
+ skipZoneIDPrefix(&tzZoneInfoTailPtr);
+ if (isValidOlsonID(tzZoneInfoTailPtr)) {
+ return (gTimeZoneBufferPtr = tzZoneInfoTailPtr);
+ }
}
} else {
#if defined(SEARCH_TZFILE)
DefaultTZInfo* tzInfo = (DefaultTZInfo*)uprv_malloc(sizeof(DefaultTZInfo));
- if (tzInfo != NULL) {
- tzInfo->defaultTZBuffer = NULL;
+ if (tzInfo != nullptr) {
+ tzInfo->defaultTZBuffer = nullptr;
tzInfo->defaultTZFileSize = 0;
- tzInfo->defaultTZFilePtr = NULL;
- tzInfo->defaultTZstatus = FALSE;
+ tzInfo->defaultTZFilePtr = nullptr;
+ tzInfo->defaultTZstatus = false;
tzInfo->defaultTZPosition = 0;
gTimeZoneBufferPtr = searchForTZFile(TZZONEINFO, tzInfo);
/* Free previously allocated memory */
- if (tzInfo->defaultTZBuffer != NULL) {
+ if (tzInfo->defaultTZBuffer != nullptr) {
uprv_free(tzInfo->defaultTZBuffer);
}
- if (tzInfo->defaultTZFilePtr != NULL) {
+ if (tzInfo->defaultTZFilePtr != nullptr) {
fclose(tzInfo->defaultTZFilePtr);
}
uprv_free(tzInfo);
}
- if (gTimeZoneBufferPtr != NULL && isValidOlsonID(gTimeZoneBufferPtr)) {
+ if (gTimeZoneBufferPtr != nullptr && isValidOlsonID(gTimeZoneBufferPtr)) {
return gTimeZoneBufferPtr;
}
#endif
@@ -1247,7 +1247,7 @@ uprv_tzname(int n)
daylightType = U_DAYLIGHT_NONE;
}
tzid = remapShortTimeZone(U_TZNAME[0], U_TZNAME[1], daylightType, uprv_timezone());
- if (tzid != NULL) {
+ if (tzid != nullptr) {
return tzid;
}
}
@@ -1260,42 +1260,42 @@ uprv_tzname(int n)
/* Get and set the ICU data directory --------------------------------------- */
-static icu::UInitOnce gDataDirInitOnce = U_INITONCE_INITIALIZER;
-static char *gDataDirectory = NULL;
+static icu::UInitOnce gDataDirInitOnce {};
+static char *gDataDirectory = nullptr;
-UInitOnce gTimeZoneFilesInitOnce = U_INITONCE_INITIALIZER;
-static CharString *gTimeZoneFilesDirectory = NULL;
+UInitOnce gTimeZoneFilesInitOnce {};
+static CharString *gTimeZoneFilesDirectory = nullptr;
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
- static const char *gCorrectedPOSIXLocale = NULL; /* Sometimes heap allocated */
+ static const char *gCorrectedPOSIXLocale = nullptr; /* Sometimes heap allocated */
static bool gCorrectedPOSIXLocaleHeapAllocated = false;
#endif
-static UBool U_CALLCONV putil_cleanup(void)
+static UBool U_CALLCONV putil_cleanup()
{
if (gDataDirectory && *gDataDirectory) {
uprv_free(gDataDirectory);
}
- gDataDirectory = NULL;
+ gDataDirectory = nullptr;
gDataDirInitOnce.reset();
delete gTimeZoneFilesDirectory;
- gTimeZoneFilesDirectory = NULL;
+ gTimeZoneFilesDirectory = nullptr;
gTimeZoneFilesInitOnce.reset();
#ifdef SEARCH_TZFILE
delete gSearchTZFileResult;
- gSearchTZFileResult = NULL;
+ gSearchTZFileResult = nullptr;
#endif
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
if (gCorrectedPOSIXLocale && gCorrectedPOSIXLocaleHeapAllocated) {
uprv_free(const_cast<char *>(gCorrectedPOSIXLocale));
- gCorrectedPOSIXLocale = NULL;
+ gCorrectedPOSIXLocale = nullptr;
gCorrectedPOSIXLocaleHeapAllocated = false;
}
#endif
- return TRUE;
+ return true;
}
/*
@@ -1307,9 +1307,9 @@ u_setDataDirectory(const char *directory) {
char *newDataDir;
int32_t length;
- if(directory==NULL || *directory==0) {
+ if(directory==nullptr || *directory==0) {
/* A small optimization to prevent the malloc and copy when the
- shared library is used, and this is a way to make sure that NULL
+ shared library is used, and this is a way to make sure that nullptr
is never returned.
*/
newDataDir = (char *)"";
@@ -1318,7 +1318,7 @@ u_setDataDirectory(const char *directory) {
length=(int32_t)uprv_strlen(directory);
newDataDir = (char *)uprv_malloc(length + 2);
/* Exit out if newDataDir could not be created. */
- if (newDataDir == NULL) {
+ if (newDataDir == nullptr) {
return;
}
uprv_strcpy(newDataDir, directory);
@@ -1326,7 +1326,7 @@ u_setDataDirectory(const char *directory) {
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
{
char *p;
- while((p = uprv_strchr(newDataDir, U_FILE_ALT_SEP_CHAR)) != NULL) {
+ while((p = uprv_strchr(newDataDir, U_FILE_ALT_SEP_CHAR)) != nullptr) {
*p = U_FILE_SEP_CHAR;
}
}
@@ -1344,16 +1344,16 @@ U_CAPI UBool U_EXPORT2
uprv_pathIsAbsolute(const char *path)
{
if(!path || !*path) {
- return FALSE;
+ return false;
}
if(*path == U_FILE_SEP_CHAR) {
- return TRUE;
+ return true;
}
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
if(*path == U_FILE_ALT_SEP_CHAR) {
- return TRUE;
+ return true;
}
#endif
@@ -1361,11 +1361,11 @@ uprv_pathIsAbsolute(const char *path)
if( (((path[0] >= 'A') && (path[0] <= 'Z')) ||
((path[0] >= 'a') && (path[0] <= 'z'))) &&
path[1] == ':' ) {
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
/* Backup setting of ICU_DATA_DIR_PREFIX_ENV_VAR
@@ -1389,7 +1389,7 @@ static BOOL U_CALLCONV getIcuDataDirectoryUnderWindowsDirectory(char* directoryB
UErrorCode status = U_ZERO_ERROR;
int32_t windowsPathUtf8Len = 0;
u_strToUTF8(windowsPathUtf8, static_cast<int32_t>(UPRV_LENGTHOF(windowsPathUtf8)),
- &windowsPathUtf8Len, reinterpret_cast<const UChar*>(windowsPath), -1, &status);
+ &windowsPathUtf8Len, reinterpret_cast<const char16_t*>(windowsPath), -1, &status);
if (U_SUCCESS(status) && (status != U_STRING_NOT_TERMINATED_WARNING) &&
(windowsPathUtf8Len < (UPRV_LENGTHOF(windowsPathUtf8) - 1))) {
@@ -1402,12 +1402,12 @@ static BOOL U_CALLCONV getIcuDataDirectoryUnderWindowsDirectory(char* directoryB
if ((windowsPathUtf8Len + UPRV_LENGTHOF(ICU_DATA_DIR_WINDOWS)) < bufferLength) {
uprv_strcpy(directoryBuffer, windowsPathUtf8);
uprv_strcat(directoryBuffer, ICU_DATA_DIR_WINDOWS);
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
#endif
@@ -1419,7 +1419,7 @@ static void U_CALLCONV dataDirectoryInitFn() {
return;
}
- const char *path = NULL;
+ const char *path = nullptr;
#if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
char datadir_path_buffer[PATH_MAX];
#endif
@@ -1452,7 +1452,7 @@ static void U_CALLCONV dataDirectoryInitFn() {
* set their own path.
*/
#if defined(ICU_DATA_DIR) || defined(U_ICU_DATA_DEFAULT_DIR)
- if(path==NULL || *path==0) {
+ if(path==nullptr || *path==0) {
# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
const char *prefix = getenv(ICU_DATA_DIR_PREFIX_ENV_VAR);
# endif
@@ -1462,8 +1462,8 @@ static void U_CALLCONV dataDirectoryInitFn() {
path=U_ICU_DATA_DEFAULT_DIR;
# endif
# if defined(ICU_DATA_DIR_PREFIX_ENV_VAR)
- if (prefix != NULL) {
- snprintf(datadir_path_buffer, PATH_MAX, "%s%s", prefix, path);
+ if (prefix != nullptr) {
+ snprintf(datadir_path_buffer, sizeof(datadir_path_buffer), "%s%s", prefix, path);
path=datadir_path_buffer;
}
# endif
@@ -1477,7 +1477,7 @@ static void U_CALLCONV dataDirectoryInitFn() {
}
#endif
- if(path==NULL) {
+ if(path==nullptr) {
/* It looks really bad, set it to something. */
path = "";
}
@@ -1487,7 +1487,7 @@ static void U_CALLCONV dataDirectoryInitFn() {
}
U_CAPI const char * U_EXPORT2
-u_getDataDirectory(void) {
+u_getDataDirectory() {
umtx_initOnce(gDataDirInitOnce, &dataDirectoryInitFn);
return gDataDirectory;
}
@@ -1500,7 +1500,7 @@ static void setTimeZoneFilesDir(const char *path, UErrorCode &status) {
gTimeZoneFilesDirectory->append(path, status);
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR)
char *p = gTimeZoneFilesDirectory->data();
- while ((p = uprv_strchr(p, U_FILE_ALT_SEP_CHAR)) != NULL) {
+ while ((p = uprv_strchr(p, U_FILE_ALT_SEP_CHAR)) != nullptr) {
*p = U_FILE_SEP_CHAR;
}
#endif
@@ -1510,10 +1510,10 @@ static void setTimeZoneFilesDir(const char *path, UErrorCode &status) {
#define TO_STRING_2(x) #x
static void U_CALLCONV TimeZoneDataDirInitFn(UErrorCode &status) {
- U_ASSERT(gTimeZoneFilesDirectory == NULL);
+ U_ASSERT(gTimeZoneFilesDirectory == nullptr);
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
gTimeZoneFilesDirectory = new CharString();
- if (gTimeZoneFilesDirectory == NULL) {
+ if (gTimeZoneFilesDirectory == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1541,19 +1541,19 @@ static void U_CALLCONV TimeZoneDataDirInitFn(UErrorCode &status) {
#endif // U_PLATFORM_HAS_WINUWP_API
#if defined(U_TIMEZONE_FILES_DIR)
- if (dir == NULL) {
+ if (dir == nullptr) {
// Build time configuration setting.
dir = TO_STRING(U_TIMEZONE_FILES_DIR);
}
#endif
- if (dir == NULL) {
+ if (dir == nullptr) {
dir = "";
}
#if defined(ICU_TIMEZONE_FILES_DIR_PREFIX_ENV_VAR)
- if (prefix != NULL) {
- snprintf(timezonefilesdir_path_buffer, PATH_MAX, "%s%s", prefix, dir);
+ if (prefix != nullptr) {
+ snprintf(timezonefilesdir_path_buffer, sizeof(timezonefilesdir_path_buffer), "%s%s", prefix, dir);
dir = timezonefilesdir_path_buffer;
}
#endif
@@ -1586,7 +1586,7 @@ u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status) {
*/
static const char *uprv_getPOSIXIDForCategory(int category)
{
- const char* posixID = NULL;
+ const char* posixID = nullptr;
if (category == LC_MESSAGES || category == LC_CTYPE) {
/*
* On Solaris two different calls to setlocale can result in
@@ -1596,7 +1596,7 @@ static const char *uprv_getPOSIXIDForCategory(int category)
*
* LC_ALL can't be used because it's platform dependent. The LANG
* environment variable seems to affect LC_CTYPE variable by default.
- * Here is what setlocale(LC_ALL, NULL) can return.
+ * Here is what setlocale(LC_ALL, nullptr) can return.
* HPUX can return 'C C C C C C C'
* Solaris can return /en_US/C/C/C/C/C on the second try.
* Linux can return LC_CTYPE=C;LC_NUMERIC=C;...
@@ -1604,9 +1604,9 @@ static const char *uprv_getPOSIXIDForCategory(int category)
* The default codepage detection also needs to use LC_CTYPE.
*
* Do not call setlocale(LC_*, "")! Using an empty string instead
- * of NULL, will modify the libc behavior.
+ * of nullptr, will modify the libc behavior.
*/
- posixID = setlocale(category, NULL);
+ posixID = setlocale(category, nullptr);
if ((posixID == 0)
|| (uprv_strcmp("C", posixID) == 0)
|| (uprv_strcmp("POSIX", posixID) == 0))
@@ -1647,9 +1647,9 @@ static const char *uprv_getPOSIXIDForCategory(int category)
/* Return just the POSIX id for the default locale, whatever happens to be in
* it. It gets the value from LC_MESSAGES and indirectly from LC_ALL and LANG.
*/
-static const char *uprv_getPOSIXIDForDefaultLocale(void)
+static const char *uprv_getPOSIXIDForDefaultLocale()
{
- static const char* posixID = NULL;
+ static const char* posixID = nullptr;
if (posixID == 0) {
posixID = uprv_getPOSIXIDForCategory(LC_MESSAGES);
}
@@ -1660,9 +1660,9 @@ static const char *uprv_getPOSIXIDForDefaultLocale(void)
/* Return just the POSIX id for the default codepage, whatever happens to be in
* it. It gets the value from LC_CTYPE and indirectly from LC_ALL and LANG.
*/
-static const char *uprv_getPOSIXIDForDefaultCodepage(void)
+static const char *uprv_getPOSIXIDForDefaultCodepage()
{
- static const char* posixID = NULL;
+ static const char* posixID = nullptr;
if (posixID == 0) {
posixID = uprv_getPOSIXIDForCategory(LC_CTYPE);
}
@@ -1861,16 +1861,16 @@ The leftmost codepage (.xxx) wins.
const char *localeID = getenv("LC_ALL");
char *p;
- if (localeID == NULL)
+ if (localeID == nullptr)
localeID = getenv("LANG");
- if (localeID == NULL)
- localeID = setlocale(LC_ALL, NULL);
+ if (localeID == nullptr)
+ localeID = setlocale(LC_ALL, nullptr);
/* Make sure we have something... */
- if (localeID == NULL)
+ if (localeID == nullptr)
return "en_US_POSIX";
/* Extract the locale name from the path. */
- if((p = uprv_strrchr(localeID, '/')) != NULL)
+ if((p = uprv_strrchr(localeID, '/')) != nullptr)
{
/* Increment p to start of locale name. */
p++;
@@ -1881,7 +1881,7 @@ The leftmost codepage (.xxx) wins.
uprv_strcpy(correctedLocale, localeID);
/* Strip off the '.locale' extension. */
- if((p = uprv_strchr(correctedLocale, '.')) != NULL) {
+ if((p = uprv_strchr(correctedLocale, '.')) != nullptr) {
*p = 0;
}
@@ -1961,12 +1961,12 @@ names to the ICU alias table in the data directory.
*/
static const char*
remapPlatformDependentCodepage(const char *locale, const char *name) {
- if (locale != NULL && *locale == 0) {
+ if (locale != nullptr && *locale == 0) {
/* Make sure that an empty locale is handled the same way. */
- locale = NULL;
+ locale = nullptr;
}
- if (name == NULL) {
- return NULL;
+ if (name == nullptr) {
+ return nullptr;
}
#if U_PLATFORM == U_PF_AIX
if (uprv_strcmp(name, "IBM-943") == 0) {
@@ -1978,7 +1978,7 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
name = "IBM-5348";
}
#elif U_PLATFORM == U_PF_SOLARIS
- if (locale != NULL && uprv_strcmp(name, "EUC") == 0) {
+ if (locale != nullptr && uprv_strcmp(name, "EUC") == 0) {
/* Solaris underspecifies the "EUC" name. */
if (uprv_strcmp(locale, "zh_CN") == 0) {
name = "EUC-CN";
@@ -2005,7 +2005,7 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
name = "ISO-8859-1";
}
#elif U_PLATFORM_IS_DARWIN_BASED
- if (locale == NULL && *name == 0) {
+ if (locale == nullptr && *name == 0) {
/*
No locale was specified, and an empty name was passed in.
This usually indicates that nl_langinfo didn't return valid information.
@@ -2017,7 +2017,7 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
/* Remap CP949 to a similar codepage to avoid issues with backslash and won symbol. */
name = "EUC-KR";
}
- else if (locale != NULL && uprv_strcmp(locale, "en_US_POSIX") != 0 && uprv_strcmp(name, "US-ASCII") == 0) {
+ else if (locale != nullptr && uprv_strcmp(locale, "en_US_POSIX") != 0 && uprv_strcmp(name, "US-ASCII") == 0) {
/*
* For non C/POSIX locale, default the code page to UTF-8 instead of US-ASCII.
*/
@@ -2029,7 +2029,7 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
name = "EUC-KR";
}
#elif U_PLATFORM == U_PF_HPUX
- if (locale != NULL && uprv_strcmp(locale, "zh_HK") == 0 && uprv_strcmp(name, "big5") == 0) {
+ if (locale != nullptr && uprv_strcmp(locale, "zh_HK") == 0 && uprv_strcmp(name, "big5") == 0) {
/* HP decided to extend big5 as hkbig5 even though it's not compatible :-( */
/* zh_TW.big5 is not the same charset as zh_HK.big5! */
name = "hkbig5";
@@ -2043,7 +2043,7 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
name = "eucjis";
}
#elif U_PLATFORM == U_PF_LINUX
- if (locale != NULL && uprv_strcmp(name, "euc") == 0) {
+ if (locale != nullptr && uprv_strcmp(name, "euc") == 0) {
/* Linux underspecifies the "EUC" name. */
if (uprv_strcmp(locale, "korean") == 0) {
name = "EUC-KR";
@@ -2061,7 +2061,7 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
*/
name = "eucjis";
}
- else if (locale != NULL && uprv_strcmp(locale, "en_US_POSIX") != 0 &&
+ else if (locale != nullptr && uprv_strcmp(locale, "en_US_POSIX") != 0 &&
(uprv_strcmp(name, "ANSI_X3.4-1968") == 0 || uprv_strcmp(name, "US-ASCII") == 0)) {
/*
* For non C/POSIX locale, default the code page to UTF-8 instead of US-ASCII.
@@ -2070,13 +2070,13 @@ remapPlatformDependentCodepage(const char *locale, const char *name) {
}
/*
* Linux returns ANSI_X3.4-1968 for C/POSIX, but the call site takes care of
- * it by falling back to 'US-ASCII' when NULL is returned from this
+ * it by falling back to 'US-ASCII' when nullptr is returned from this
* function. So, we don't have to worry about it here.
*/
#endif
- /* return NULL when "" is passed in */
+ /* return nullptr when "" is passed in */
if (*name == 0) {
- name = NULL;
+ name = nullptr;
}
return name;
}
@@ -2085,16 +2085,16 @@ static const char*
getCodepageFromPOSIXID(const char *localeName, char * buffer, int32_t buffCapacity)
{
char localeBuf[100];
- const char *name = NULL;
- char *variant = NULL;
+ const char *name = nullptr;
+ char *variant = nullptr;
- if (localeName != NULL && (name = (uprv_strchr(localeName, '.'))) != NULL) {
+ if (localeName != nullptr && (name = (uprv_strchr(localeName, '.'))) != nullptr) {
size_t localeCapacity = uprv_min(sizeof(localeBuf), (name-localeName)+1);
uprv_strncpy(localeBuf, localeName, localeCapacity);
- localeBuf[localeCapacity-1] = 0; /* ensure NULL termination */
+ localeBuf[localeCapacity-1] = 0; /* ensure NUL termination */
name = uprv_strncpy(buffer, name+1, buffCapacity);
- buffer[buffCapacity-1] = 0; /* ensure NULL termination */
- if ((variant = const_cast<char *>(uprv_strchr(name, '@'))) != NULL) {
+ buffer[buffCapacity-1] = 0; /* ensure NUL termination */
+ if ((variant = const_cast<char *>(uprv_strchr(name, '@'))) != nullptr) {
*variant = 0;
}
name = remapPlatformDependentCodepage(localeBuf, name);
@@ -2124,7 +2124,7 @@ int_getDefaultCodepage()
}
/* else use the default */
}
- sprintf(codepage,"ibm-%d", ccsid);
+ snprintf(codepage, sizeof(codepage), "ibm-%d", ccsid);
return codepage;
#elif U_PLATFORM == U_PF_OS390
@@ -2132,7 +2132,7 @@ int_getDefaultCodepage()
strncpy(codepage, nl_langinfo(CODESET),63-strlen(UCNV_SWAP_LFNL_OPTION_STRING));
strcat(codepage,UCNV_SWAP_LFNL_OPTION_STRING);
- codepage[63] = 0; /* NULL terminate */
+ codepage[63] = 0; /* NUL terminate */
return codepage;
@@ -2161,7 +2161,7 @@ int_getDefaultCodepage()
// are between 3 and 19999
if (codepageNumber > 0 && codepageNumber < 20000)
{
- sprintf(codepage, "windows-%ld", codepageNumber);
+ snprintf(codepage, sizeof(codepage), "windows-%ld", codepageNumber);
return codepage;
}
// If the codepage number call failed then return UTF-8
@@ -2169,8 +2169,8 @@ int_getDefaultCodepage()
#elif U_POSIX_LOCALE
static char codesetName[100];
- const char *localeName = NULL;
- const char *name = NULL;
+ const char *localeName = nullptr;
+ const char *name = nullptr;
localeName = uprv_getPOSIXIDForDefaultCodepage();
uprv_memset(codesetName, 0, sizeof(codesetName));
@@ -2193,10 +2193,10 @@ int_getDefaultCodepage()
} else
#endif
{
- codeset = remapPlatformDependentCodepage(NULL, codeset);
+ codeset = remapPlatformDependentCodepage(nullptr, codeset);
}
- if (codeset != NULL) {
+ if (codeset != nullptr) {
uprv_strncpy(codesetName, codeset, sizeof(codesetName));
codesetName[sizeof(codesetName)-1] = 0;
return codesetName;
@@ -2229,12 +2229,12 @@ int_getDefaultCodepage()
U_CAPI const char* U_EXPORT2
uprv_getDefaultCodepage()
{
- static char const *name = NULL;
- umtx_lock(NULL);
- if (name == NULL) {
+ static char const *name = nullptr;
+ umtx_lock(nullptr);
+ if (name == nullptr) {
name = int_getDefaultCodepage();
}
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
return name;
}
#endif /* !U_CHARSET_IS_UTF8 */
@@ -2249,11 +2249,11 @@ u_versionFromString(UVersionInfo versionArray, const char *versionString) {
char *end;
uint16_t part=0;
- if(versionArray==NULL) {
+ if(versionArray==nullptr) {
return;
}
- if(versionString!=NULL) {
+ if(versionString!=nullptr) {
for(;;) {
versionArray[part]=(uint8_t)uprv_strtoul(versionString, &end, 10);
if(end==versionString || ++part==U_MAX_VERSION_LENGTH || *end!=U_VERSION_DELIMITER) {
@@ -2269,8 +2269,8 @@ u_versionFromString(UVersionInfo versionArray, const char *versionString) {
}
U_CAPI void U_EXPORT2
-u_versionFromUString(UVersionInfo versionArray, const UChar *versionString) {
- if(versionArray!=NULL && versionString!=NULL) {
+u_versionFromUString(UVersionInfo versionArray, const char16_t *versionString) {
+ if(versionArray!=nullptr && versionString!=nullptr) {
char versionChars[U_MAX_VERSION_STRING_LENGTH+1];
int32_t len = u_strlen(versionString);
if(len>U_MAX_VERSION_STRING_LENGTH) {
@@ -2287,11 +2287,11 @@ u_versionToString(const UVersionInfo versionArray, char *versionString) {
uint16_t count, part;
uint8_t field;
- if(versionString==NULL) {
+ if(versionString==nullptr) {
return;
}
- if(versionArray==NULL) {
+ if(versionArray==nullptr) {
versionString[0]=0;
return;
}
@@ -2362,10 +2362,10 @@ u_getVersion(UVersionInfo versionArray) {
U_CAPI void * U_EXPORT2
uprv_dl_open(const char *libName, UErrorCode *status) {
- void *ret = NULL;
+ void *ret = nullptr;
if(U_FAILURE(*status)) return ret;
ret = dlopen(libName, RTLD_NOW|RTLD_GLOBAL);
- if(ret==NULL) {
+ if(ret==nullptr) {
#ifdef U_TRACE_DYLOAD
printf("dlerror on dlopen(%s): %s\n", libName, dlerror());
#endif
@@ -2386,10 +2386,10 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
UVoidFunction *fp;
void *vp;
} uret;
- uret.fp = NULL;
+ uret.fp = nullptr;
if(U_FAILURE(*status)) return uret.fp;
uret.vp = dlsym(lib, sym);
- if(uret.vp == NULL) {
+ if(uret.vp == nullptr) {
#ifdef U_TRACE_DYLOAD
printf("dlerror on dlsym(%p,%s): %s\n", lib,sym, dlerror());
#endif
@@ -2405,13 +2405,13 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
U_CAPI void * U_EXPORT2
uprv_dl_open(const char *libName, UErrorCode *status) {
- HMODULE lib = NULL;
+ HMODULE lib = nullptr;
- if(U_FAILURE(*status)) return NULL;
+ if(U_FAILURE(*status)) return nullptr;
lib = LoadLibraryA(libName);
- if(lib==NULL) {
+ if(lib==nullptr) {
*status = U_MISSING_RESOURCE_ERROR;
}
@@ -2431,13 +2431,13 @@ uprv_dl_close(void *lib, UErrorCode *status) {
U_CAPI UVoidFunction* U_EXPORT2
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
HMODULE handle = (HMODULE)lib;
- UVoidFunction* addr = NULL;
+ UVoidFunction* addr = nullptr;
- if(U_FAILURE(*status) || lib==NULL) return NULL;
+ if(U_FAILURE(*status) || lib==nullptr) return nullptr;
addr = (UVoidFunction*)GetProcAddress(handle, sym);
- if(addr==NULL) {
+ if(addr==nullptr) {
DWORD lastError = GetLastError();
if(lastError == ERROR_PROC_NOT_FOUND) {
*status = U_MISSING_RESOURCE_ERROR;
@@ -2456,9 +2456,9 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
U_CAPI void * U_EXPORT2
uprv_dl_open(const char *libName, UErrorCode *status) {
(void)libName;
- if(U_FAILURE(*status)) return NULL;
+ if(U_FAILURE(*status)) return nullptr;
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
U_CAPI void U_EXPORT2
@@ -2476,7 +2476,7 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
if(U_SUCCESS(*status)) {
*status = U_UNSUPPORTED_ERROR;
}
- return (UVoidFunction*)NULL;
+ return (UVoidFunction*)nullptr;
}
#endif
diff --git a/contrib/libs/icu/common/rbbi.cpp b/contrib/libs/icu/common/rbbi.cpp
index f65177f2323..73716ab4066 100644
--- a/contrib/libs/icu/common/rbbi.cpp
+++ b/contrib/libs/icu/common/rbbi.cpp
@@ -39,7 +39,7 @@
#include "uvectr32.h"
#ifdef RBBI_DEBUG
-static UBool gTrace = FALSE;
+static UBool gTrace = false;
#endif
U_NAMESPACE_BEGIN
@@ -63,9 +63,8 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedBreakIterator)
* tables object that is passed in as a parameter.
*/
RuleBasedBreakIterator::RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode &status)
- : fSCharIter(UnicodeString())
+ : RuleBasedBreakIterator(&status)
{
- init(status);
fData = new RBBIDataWrapper(data, status); // status checked in constructor
if (U_FAILURE(status)) {return;}
if(fData == nullptr) {
@@ -82,6 +81,19 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode
}
}
+//-------------------------------------------------------------------------------
+//
+// Constructor from a UDataMemory handle to precompiled break rules
+// stored in an ICU data file. This construcotr is private API,
+// only for internal use.
+//
+//-------------------------------------------------------------------------------
+RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* udm, UBool isPhraseBreaking,
+ UErrorCode &status) : RuleBasedBreakIterator(udm, status)
+{
+ fIsPhraseBreaking = isPhraseBreaking;
+}
+
//
// Construct from precompiled binary rules (tables). This constructor is public API,
// taking the rules as a (const uint8_t *) to match the type produced by getBinaryRules().
@@ -89,13 +101,12 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode
RuleBasedBreakIterator::RuleBasedBreakIterator(const uint8_t *compiledRules,
uint32_t ruleLength,
UErrorCode &status)
- : fSCharIter(UnicodeString())
+ : RuleBasedBreakIterator(&status)
{
- init(status);
if (U_FAILURE(status)) {
return;
}
- if (compiledRules == NULL || ruleLength < sizeof(RBBIDataHeader)) {
+ if (compiledRules == nullptr || ruleLength < sizeof(RBBIDataHeader)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -128,9 +139,8 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(const uint8_t *compiledRules,
//
//-------------------------------------------------------------------------------
RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* udm, UErrorCode &status)
- : fSCharIter(UnicodeString())
+ : RuleBasedBreakIterator(&status)
{
- init(status);
fData = new RBBIDataWrapper(udm, status); // status checked in constructor
if (U_FAILURE(status)) {return;}
if(fData == nullptr) {
@@ -157,9 +167,8 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* udm, UErrorCode &sta
RuleBasedBreakIterator::RuleBasedBreakIterator( const UnicodeString &rules,
UParseError &parseError,
UErrorCode &status)
- : fSCharIter(UnicodeString())
+ : RuleBasedBreakIterator(&status)
{
- init(status);
if (U_FAILURE(status)) {return;}
RuleBasedBreakIterator *bi = (RuleBasedBreakIterator *)
RBBIRuleBuilder::createRuleBasedBreakIterator(rules, &parseError, status);
@@ -181,10 +190,39 @@ RuleBasedBreakIterator::RuleBasedBreakIterator( const UnicodeString &rules,
// of rules.
//-------------------------------------------------------------------------------
RuleBasedBreakIterator::RuleBasedBreakIterator()
- : fSCharIter(UnicodeString())
+ : RuleBasedBreakIterator(nullptr)
{
- UErrorCode status = U_ZERO_ERROR;
- init(status);
+}
+
+/**
+ * Simple Constructor with an error code.
+ * Handles common initialization for all other constructors.
+ */
+RuleBasedBreakIterator::RuleBasedBreakIterator(UErrorCode *status) {
+ UErrorCode ec = U_ZERO_ERROR;
+ if (status == nullptr) {
+ status = &ec;
+ }
+ utext_openUChars(&fText, nullptr, 0, status);
+ LocalPointer<DictionaryCache> lpDictionaryCache(new DictionaryCache(this, *status), *status);
+ LocalPointer<BreakCache> lpBreakCache(new BreakCache(this, *status), *status);
+ if (U_FAILURE(*status)) {
+ fErrorCode = *status;
+ return;
+ }
+ fDictionaryCache = lpDictionaryCache.orphan();
+ fBreakCache = lpBreakCache.orphan();
+
+#ifdef RBBI_DEBUG
+ static UBool debugInitDone = false;
+ if (debugInitDone == false) {
+ char *debugEnv = getenv("U_RBBIDEBUG");
+ if (debugEnv && uprv_strstr(debugEnv, "trace")) {
+ gTrace = true;
+ }
+ debugInitDone = true;
+ }
+#endif
}
@@ -195,11 +233,8 @@ RuleBasedBreakIterator::RuleBasedBreakIterator()
//
//-------------------------------------------------------------------------------
RuleBasedBreakIterator::RuleBasedBreakIterator(const RuleBasedBreakIterator& other)
-: BreakIterator(other),
- fSCharIter(UnicodeString())
+: RuleBasedBreakIterator()
{
- UErrorCode status = U_ZERO_ERROR;
- this->init(status);
*this = other;
}
@@ -248,35 +283,35 @@ RuleBasedBreakIterator::operator=(const RuleBasedBreakIterator& that) {
}
BreakIterator::operator=(that);
- if (fLanguageBreakEngines != NULL) {
+ if (fLanguageBreakEngines != nullptr) {
delete fLanguageBreakEngines;
- fLanguageBreakEngines = NULL; // Just rebuild for now
+ fLanguageBreakEngines = nullptr; // Just rebuild for now
}
// TODO: clone fLanguageBreakEngines from "that"
UErrorCode status = U_ZERO_ERROR;
- utext_clone(&fText, &that.fText, FALSE, TRUE, &status);
+ utext_clone(&fText, &that.fText, false, true, &status);
if (fCharIter != &fSCharIter) {
delete fCharIter;
}
fCharIter = &fSCharIter;
- if (that.fCharIter != NULL && that.fCharIter != &that.fSCharIter) {
+ if (that.fCharIter != nullptr && that.fCharIter != &that.fSCharIter) {
// This is a little bit tricky - it will initially appear that
// this->fCharIter is adopted, even if that->fCharIter was
// not adopted. That's ok.
fCharIter = that.fCharIter->clone();
}
fSCharIter = that.fSCharIter;
- if (fCharIter == NULL) {
+ if (fCharIter == nullptr) {
fCharIter = &fSCharIter;
}
- if (fData != NULL) {
+ if (fData != nullptr) {
fData->removeReference();
- fData = NULL;
+ fData = nullptr;
}
- if (that.fData != NULL) {
+ if (that.fData != nullptr) {
fData = that.fData->addReference();
}
@@ -302,57 +337,6 @@ RuleBasedBreakIterator::operator=(const RuleBasedBreakIterator& that) {
return *this;
}
-
-
-//-----------------------------------------------------------------------------
-//
-// init() Shared initialization routine. Used by all the constructors.
-// Initializes all fields, leaving the object in a consistent state.
-//
-//-----------------------------------------------------------------------------
-void RuleBasedBreakIterator::init(UErrorCode &status) {
- fCharIter = nullptr;
- fData = nullptr;
- fPosition = 0;
- fRuleStatusIndex = 0;
- fDone = false;
- fDictionaryCharCount = 0;
- fLanguageBreakEngines = nullptr;
- fUnhandledBreakEngine = nullptr;
- fBreakCache = nullptr;
- fDictionaryCache = nullptr;
- fLookAheadMatches = nullptr;
-
- // Note: IBM xlC is unable to assign or initialize member fText from UTEXT_INITIALIZER.
- // fText = UTEXT_INITIALIZER;
- static const UText initializedUText = UTEXT_INITIALIZER;
- uprv_memcpy(&fText, &initializedUText, sizeof(UText));
-
- if (U_FAILURE(status)) {
- return;
- }
-
- utext_openUChars(&fText, NULL, 0, &status);
- fDictionaryCache = new DictionaryCache(this, status);
- fBreakCache = new BreakCache(this, status);
- if (U_SUCCESS(status) && (fDictionaryCache == NULL || fBreakCache == NULL)) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
-
-#ifdef RBBI_DEBUG
- static UBool debugInitDone = FALSE;
- if (debugInitDone == FALSE) {
- char *debugEnv = getenv("U_RBBIDEBUG");
- if (debugEnv && uprv_strstr(debugEnv, "trace")) {
- gTrace = TRUE;
- }
- debugInitDone = TRUE;
- }
-#endif
-}
-
-
-
//-----------------------------------------------------------------------------
//
// clone - Returns a newly-constructed RuleBasedBreakIterator with the same
@@ -382,7 +366,7 @@ RuleBasedBreakIterator::operator==(const BreakIterator& that) const {
// and does not implement an equality function that would otherwise be
// checked at this point.
- const RuleBasedBreakIterator& that2 = (const RuleBasedBreakIterator&) that;
+ const RuleBasedBreakIterator& that2 = static_cast<const RuleBasedBreakIterator&>(that);
if (!utext_equals(&fText, &that2.fText)) {
// The two break iterators are operating on different text,
@@ -398,7 +382,7 @@ RuleBasedBreakIterator::operator==(const BreakIterator& that) const {
}
if (that2.fData == fData ||
- (fData != NULL && that2.fData != NULL && *that2.fData == *fData)) {
+ (fData != nullptr && that2.fData != nullptr && *that2.fData == *fData)) {
// The two break iterators are using the same rules.
return true;
}
@@ -410,9 +394,9 @@ RuleBasedBreakIterator::operator==(const BreakIterator& that) const {
* @return A hash code
*/
int32_t
-RuleBasedBreakIterator::hashCode(void) const {
+RuleBasedBreakIterator::hashCode() const {
int32_t hash = 0;
- if (fData != NULL) {
+ if (fData != nullptr) {
hash = fData->hashCode();
}
return hash;
@@ -425,7 +409,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) {
}
fBreakCache->reset();
fDictionaryCache->reset();
- utext_clone(&fText, ut, FALSE, TRUE, &status);
+ utext_clone(&fText, ut, false, true, &status);
// Set up a dummy CharacterIterator to be returned if anyone
// calls getText(). With input from UText, there is no reasonable
@@ -433,7 +417,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) {
// Return one over an empty string instead - this is the closest
// we can come to signaling a failure.
// (GetText() is obsolete, this failure is sort of OK)
- fSCharIter.setText(UnicodeString());
+ fSCharIter.setText(u"", 0);
if (fCharIter != &fSCharIter) {
// existing fCharIter was adopted from the outside. Delete it now.
@@ -446,7 +430,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) {
UText *RuleBasedBreakIterator::getUText(UText *fillIn, UErrorCode &status) const {
- UText *result = utext_clone(fillIn, &fText, FALSE, TRUE, &status);
+ UText *result = utext_clone(fillIn, &fText, false, true, &status);
return result;
}
@@ -480,10 +464,10 @@ RuleBasedBreakIterator::adoptText(CharacterIterator* newText) {
UErrorCode status = U_ZERO_ERROR;
fBreakCache->reset();
fDictionaryCache->reset();
- if (newText==NULL || newText->startIndex() != 0) {
+ if (newText==nullptr || newText->startIndex() != 0) {
// startIndex !=0 wants to be an error, but there's no way to report it.
// Make the iterator text be an empty string.
- utext_openUChars(&fText, NULL, 0, &status);
+ utext_openUChars(&fText, nullptr, 0, &status);
} else {
utext_openCharacterIterator(&fText, newText, &status);
}
@@ -506,7 +490,7 @@ RuleBasedBreakIterator::setText(const UnicodeString& newText) {
// Needed in case someone calls getText().
// Can not, unfortunately, do this lazily on the (probably never)
// call to getText(), because getText is const.
- fSCharIter.setText(newText);
+ fSCharIter.setText(newText.getBuffer(), newText.length());
if (fCharIter != &fSCharIter) {
// old fCharIter was adopted from the outside. Delete it.
@@ -528,13 +512,13 @@ RuleBasedBreakIterator &RuleBasedBreakIterator::refreshInputText(UText *input, U
if (U_FAILURE(status)) {
return *this;
}
- if (input == NULL) {
+ if (input == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return *this;
}
int64_t pos = utext_getNativeIndex(&fText);
// Shallow read-only clone of the new UText into the existing input UText
- utext_clone(&fText, input, FALSE, TRUE, &status);
+ utext_clone(&fText, input, false, true, &status);
if (U_FAILURE(status)) {
return *this;
}
@@ -554,7 +538,7 @@ RuleBasedBreakIterator &RuleBasedBreakIterator::refreshInputText(UText *input, U
* Sets the current iteration position to the beginning of the text, position zero.
* @return The new iterator position, which is zero.
*/
-int32_t RuleBasedBreakIterator::first(void) {
+int32_t RuleBasedBreakIterator::first() {
UErrorCode status = U_ZERO_ERROR;
if (!fBreakCache->seek(0)) {
fBreakCache->populateNear(0, status);
@@ -568,7 +552,7 @@ int32_t RuleBasedBreakIterator::first(void) {
* Sets the current iteration position to the end of the text.
* @return The text's past-the-end offset.
*/
-int32_t RuleBasedBreakIterator::last(void) {
+int32_t RuleBasedBreakIterator::last() {
int32_t endPos = (int32_t)utext_nativeLength(&fText);
UBool endShouldBeBoundary = isBoundary(endPos); // Has side effect of setting iterator position.
(void)endShouldBeBoundary;
@@ -606,7 +590,7 @@ int32_t RuleBasedBreakIterator::next(int32_t n) {
* Advances the iterator to the next boundary position.
* @return The position of the first boundary after this one.
*/
-int32_t RuleBasedBreakIterator::next(void) {
+int32_t RuleBasedBreakIterator::next() {
fBreakCache->next();
return fDone ? UBRK_DONE : fPosition;
}
@@ -619,7 +603,7 @@ int32_t RuleBasedBreakIterator::next(void) {
*
* @return The position of the boundary position immediately preceding the starting position.
*/
-int32_t RuleBasedBreakIterator::previous(void) {
+int32_t RuleBasedBreakIterator::previous() {
UErrorCode status = U_ZERO_ERROR;
fBreakCache->previous(status);
return fDone ? UBRK_DONE : fPosition;
@@ -682,7 +666,7 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) {
// out-of-range indexes are never boundary positions
if (offset < 0) {
first(); // For side effects on current position, tag values.
- return FALSE;
+ return false;
}
// Adjust offset to be on a code point boundary and not beyond the end of the text.
@@ -699,9 +683,9 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) {
}
if (result && adjustedOffset < offset && utext_char32At(&fText, offset) == U_SENTINEL) {
- // Original offset is beyond the end of the text. Return FALSE, it's not a boundary,
+ // Original offset is beyond the end of the text. Return false, it's not a boundary,
// but the iteration position remains set to the end of the text, which is a boundary.
- return FALSE;
+ return false;
}
if (!result) {
// Not on a boundary. isBoundary() must leave iterator on the following boundary.
@@ -716,7 +700,7 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) {
* Returns the current iteration position.
* @return The current iteration position.
*/
-int32_t RuleBasedBreakIterator::current(void) const {
+int32_t RuleBasedBreakIterator::current() const {
return fPosition;
}
@@ -824,7 +808,7 @@ int32_t RuleBasedBreakIterator::handleNext() {
result = initialPosition;
c = UTEXT_NEXT32(&fText);
if (c==U_SENTINEL) {
- fDone = TRUE;
+ fDone = true;
return UBRK_DONE;
}
@@ -995,7 +979,7 @@ int32_t RuleBasedBreakIterator::handleSafePrevious(int32_t fromPosition) {
#endif
// if we're already at the start of the text, return DONE.
- if (fData == NULL || UTEXT_GETNATIVEINDEX(&fText)==0) {
+ if (fData == nullptr || UTEXT_GETNATIVEINDEX(&fText)==0) {
return BreakIterator::DONE;
}
@@ -1103,10 +1087,10 @@ int32_t RuleBasedBreakIterator::getRuleStatusVec(
//
//-------------------------------------------------------------------------------
const uint8_t *RuleBasedBreakIterator::getBinaryRules(uint32_t &length) {
- const uint8_t *retPtr = NULL;
+ const uint8_t *retPtr = nullptr;
length = 0;
- if (fData != NULL) {
+ if (fData != nullptr) {
retPtr = (const uint8_t *)fData->fHeader;
length = fData->fHeader->fLength;
}
@@ -1117,16 +1101,16 @@ const uint8_t *RuleBasedBreakIterator::getBinaryRules(uint32_t &length) {
RuleBasedBreakIterator *RuleBasedBreakIterator::createBufferClone(
void * /*stackBuffer*/, int32_t &bufferSize, UErrorCode &status) {
if (U_FAILURE(status)){
- return NULL;
+ return nullptr;
}
if (bufferSize == 0) {
bufferSize = 1; // preflighting for deprecated functionality
- return NULL;
+ return nullptr;
}
BreakIterator *clonedBI = clone();
- if (clonedBI == NULL) {
+ if (clonedBI == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
status = U_SAFECLONE_ALLOCATED_WARNING;
@@ -1139,21 +1123,21 @@ U_NAMESPACE_END
static icu::UStack *gLanguageBreakFactories = nullptr;
static const icu::UnicodeString *gEmptyString = nullptr;
-static icu::UInitOnce gLanguageBreakFactoriesInitOnce = U_INITONCE_INITIALIZER;
-static icu::UInitOnce gRBBIInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gLanguageBreakFactoriesInitOnce {};
+static icu::UInitOnce gRBBIInitOnce {};
/**
* Release all static memory held by breakiterator.
*/
U_CDECL_BEGIN
-UBool U_CALLCONV rbbi_cleanup(void) {
+UBool U_CALLCONV rbbi_cleanup() {
delete gLanguageBreakFactories;
gLanguageBreakFactories = nullptr;
delete gEmptyString;
gEmptyString = nullptr;
gLanguageBreakFactoriesInitOnce.reset();
gRBBIInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -1171,14 +1155,14 @@ static void U_CALLCONV rbbiInit() {
static void U_CALLCONV initLanguageFactories() {
UErrorCode status = U_ZERO_ERROR;
- U_ASSERT(gLanguageBreakFactories == NULL);
- gLanguageBreakFactories = new UStack(_deleteFactory, NULL, status);
- if (gLanguageBreakFactories != NULL && U_SUCCESS(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);
#ifdef U_LOCAL_SERVICE_HOOK
LanguageBreakFactory *extra = (LanguageBreakFactory *)uprv_svc_hook("languageBreakFactory", &status);
- if (extra != NULL) {
+ if (extra != nullptr) {
gLanguageBreakFactories->push(extra, status);
}
#endif
@@ -1191,16 +1175,16 @@ static const LanguageBreakEngine*
getLanguageBreakEngineFromFactory(UChar32 c)
{
umtx_initOnce(gLanguageBreakFactoriesInitOnce, &initLanguageFactories);
- if (gLanguageBreakFactories == NULL) {
- return NULL;
+ if (gLanguageBreakFactories == nullptr) {
+ return nullptr;
}
int32_t i = gLanguageBreakFactories->size();
- const LanguageBreakEngine *lbe = NULL;
+ const LanguageBreakEngine *lbe = nullptr;
while (--i >= 0) {
LanguageBreakFactory *factory = (LanguageBreakFactory *)(gLanguageBreakFactories->elementAt(i));
lbe = factory->getEngineFor(c);
- if (lbe != NULL) {
+ if (lbe != nullptr) {
break;
}
}
@@ -1216,15 +1200,15 @@ getLanguageBreakEngineFromFactory(UChar32 c)
//-------------------------------------------------------------------------------
const LanguageBreakEngine *
RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) {
- const LanguageBreakEngine *lbe = NULL;
+ const LanguageBreakEngine *lbe = nullptr;
UErrorCode status = U_ZERO_ERROR;
- if (fLanguageBreakEngines == NULL) {
+ if (fLanguageBreakEngines == nullptr) {
fLanguageBreakEngines = new UStack(status);
- if (fLanguageBreakEngines == NULL || U_FAILURE(status)) {
+ if (fLanguageBreakEngines == nullptr || U_FAILURE(status)) {
delete fLanguageBreakEngines;
fLanguageBreakEngines = 0;
- return NULL;
+ return nullptr;
}
}
@@ -1241,7 +1225,7 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) {
lbe = getLanguageBreakEngineFromFactory(c);
// If we got one, use it and push it on our stack.
- if (lbe != NULL) {
+ if (lbe != nullptr) {
fLanguageBreakEngines->push((void *)lbe, status);
// Even if we can't remember it, we can keep looking it up, so
// return it even if the push fails.
@@ -1250,9 +1234,9 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) {
// No engine is forthcoming for this character. Add it to the
// reject set. Create the reject break engine if needed.
- if (fUnhandledBreakEngine == NULL) {
+ if (fUnhandledBreakEngine == nullptr) {
fUnhandledBreakEngine = new UnhandledEngine(status);
- if (U_SUCCESS(status) && fUnhandledBreakEngine == NULL) {
+ if (U_SUCCESS(status) && fUnhandledBreakEngine == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return nullptr;
}
@@ -1264,7 +1248,7 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) {
if (U_FAILURE(status)) {
delete fUnhandledBreakEngine;
fUnhandledBreakEngine = 0;
- return NULL;
+ return nullptr;
}
}
@@ -1289,7 +1273,7 @@ void RuleBasedBreakIterator::dumpTables() {
const UnicodeString&
RuleBasedBreakIterator::getRules() const {
- if (fData != NULL) {
+ if (fData != nullptr) {
return fData->getRuleSourceString();
} else {
umtx_initOnce(gRBBIInitOnce, &rbbiInit);
diff --git a/contrib/libs/icu/common/rbbi_cache.cpp b/contrib/libs/icu/common/rbbi_cache.cpp
index 6bfe3feca49..02ca555a890 100644
--- a/contrib/libs/icu/common/rbbi_cache.cpp
+++ b/contrib/libs/icu/common/rbbi_cache.cpp
@@ -45,7 +45,7 @@ void RuleBasedBreakIterator::DictionaryCache::reset() {
UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_t *result, int32_t *statusIndex) {
if (fromPos >= fLimit || fromPos < fStart) {
fPositionInCache = -1;
- return FALSE;
+ return false;
}
// Sequential iteration, move from previous boundary to the following
@@ -55,13 +55,13 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_
++fPositionInCache;
if (fPositionInCache >= fBreaks.size()) {
fPositionInCache = -1;
- return FALSE;
+ return false;
}
r = fBreaks.elementAti(fPositionInCache);
U_ASSERT(r > fromPos);
*result = r;
*statusIndex = fOtherRuleStatusIndex;
- return TRUE;
+ return true;
}
// Random indexing. Linear search for the boundary following the given position.
@@ -71,7 +71,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_
if (r > fromPos) {
*result = r;
*statusIndex = fOtherRuleStatusIndex;
- return TRUE;
+ return true;
}
}
UPRV_UNREACHABLE_EXIT;
@@ -81,7 +81,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_
UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_t *result, int32_t *statusIndex) {
if (fromPos <= fStart || fromPos > fLimit) {
fPositionInCache = -1;
- return FALSE;
+ return false;
}
if (fromPos == fLimit) {
@@ -98,12 +98,12 @@ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_
U_ASSERT(r < fromPos);
*result = r;
*statusIndex = ( r== fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex;
- return TRUE;
+ return true;
}
if (fPositionInCache == 0) {
fPositionInCache = -1;
- return FALSE;
+ return false;
}
for (fPositionInCache = fBreaks.size()-1; fPositionInCache >= 0; --fPositionInCache) {
@@ -111,7 +111,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_
if (r < fromPos) {
*result = r;
*statusIndex = ( r == fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex;
- return TRUE;
+ return true;
}
}
UPRV_UNREACHABLE_EXIT;
@@ -162,8 +162,8 @@ void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPo
// 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 != NULL) {
- foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks, status);
+ if (lbe != nullptr) {
+ foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks, fBI->fIsPhraseBreaking, status);
}
// Reload the loop variables for the next go-round
@@ -227,7 +227,7 @@ void RuleBasedBreakIterator::BreakCache::reset(int32_t pos, int32_t ruleStatus)
int32_t RuleBasedBreakIterator::BreakCache::current() {
fBI->fPosition = fTextIdx;
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
- fBI->fDone = FALSE;
+ fBI->fDone = false;
return fTextIdx;
}
@@ -302,18 +302,18 @@ void RuleBasedBreakIterator::BreakCache::previous(UErrorCode &status) {
UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) {
if (pos < fBoundaries[fStartBufIdx] || pos > fBoundaries[fEndBufIdx]) {
- return FALSE;
+ return false;
}
if (pos == fBoundaries[fStartBufIdx]) {
// Common case: seek(0), from BreakIterator::first()
fBufIdx = fStartBufIdx;
fTextIdx = fBoundaries[fBufIdx];
- return TRUE;
+ return true;
}
if (pos == fBoundaries[fEndBufIdx]) {
fBufIdx = fEndBufIdx;
fTextIdx = fBoundaries[fBufIdx];
- return TRUE;
+ return true;
}
int32_t min = fStartBufIdx;
@@ -331,51 +331,97 @@ UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) {
fBufIdx = modChunkSize(max - 1);
fTextIdx = fBoundaries[fBufIdx];
U_ASSERT(fTextIdx <= pos);
- return TRUE;
+ return true;
}
UBool RuleBasedBreakIterator::BreakCache::populateNear(int32_t position, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
U_ASSERT(position < fBoundaries[fStartBufIdx] || position > fBoundaries[fEndBufIdx]);
- // Find a boundary somewhere in the vicinity of the requested position.
- // Depending on the safe rules and the text data, it could be either before, at, or after
- // the requested position.
-
+ // Add boundaries to the cache near the specified position.
+ // The given position need not be a boundary itself.
+ // The input position must be within the range of the text, and
+ // on a code point boundary.
+ // If the requested position is a break boundary, leave the iteration
+ // position on it.
+ // If the requested position is not a boundary, leave the iteration
+ // position on the preceding boundary and include both the
+ // preceding and following boundaries in the cache.
+ // Additional boundaries, either preceding or following, may be added
+ // to the cache as a side effect.
// If the requested position is not near already cached positions, clear the existing cache,
// find a near-by boundary and begin new cache contents there.
- if ((position < fBoundaries[fStartBufIdx] - 15) || position > (fBoundaries[fEndBufIdx] + 15)) {
- int32_t aBoundary = 0;
- int32_t ruleStatusIndex = 0;
- if (position > 20) {
- int32_t backupPos = fBI->handleSafePrevious(position);
-
- if (backupPos > 0) {
- // Advance to the boundary following the backup position.
- // There is a complication: the safe reverse rules identify pairs of code points
- // that are safe. If advancing from the safe point moves forwards by less than
- // two code points, we need to advance one more time to ensure that the boundary
- // is good, including a correct rules status value.
- //
- fBI->fPosition = backupPos;
- aBoundary = fBI->handleNext();
- if (aBoundary <= backupPos + 4) {
- // +4 is a quick test for possibly having advanced only one codepoint.
- // Four being the length of the longest potential code point, a supplementary in UTF-8
- utext_setNativeIndex(&fBI->fText, aBoundary);
- if (backupPos == utext_getPreviousNativeIndex(&fBI->fText)) {
- // The initial handleNext() only advanced by a single code point. Go again.
- aBoundary = fBI->handleNext(); // Safe rules identify safe pairs.
- }
+ // Threshold for a text position to be considered near to existing cache contents.
+ // TODO: See issue ICU-22024 "perf tuning of Cache needed."
+ // This value is subject to change. See the ticket for more details.
+ static constexpr int32_t CACHE_NEAR = 15;
+
+ int32_t aBoundary = -1;
+ int32_t ruleStatusIndex = 0;
+ bool retainCache = false;
+ if ((position > fBoundaries[fStartBufIdx] - CACHE_NEAR) && position < (fBoundaries[fEndBufIdx] + CACHE_NEAR)) {
+ // Requested position is near the existing cache. Retain it.
+ retainCache = true;
+ } else if (position <= CACHE_NEAR) {
+ // Requested position is near the start of the text. Fill cache from start, skipping
+ // the need to find a safe point.
+ retainCache = false;
+ aBoundary = 0;
+ } else {
+ // Requested position is not near the existing cache.
+ // Find a safe point to refill the cache from.
+ int32_t backupPos = fBI->handleSafePrevious(position);
+
+ if (fBoundaries[fEndBufIdx] < position && fBoundaries[fEndBufIdx] >= (backupPos - CACHE_NEAR)) {
+ // The requested position is beyond the end of the existing cache, but the
+ // reverse rules produced a position near or before the cached region.
+ // Retain the existing cache, and fill from the end of it.
+ retainCache = true;
+ } else if (backupPos < CACHE_NEAR) {
+ // The safe reverse rules moved us to near the start of text.
+ // Take that (index 0) as the backup boundary, avoiding the complication
+ // (in the following block) of moving forward from the safe point to a known boundary.
+ //
+ // Retain the cache if it begins not too far from the requested position.
+ aBoundary = 0;
+ retainCache = (fBoundaries[fStartBufIdx] <= (position + CACHE_NEAR));
+ } else {
+ // The safe reverse rules produced a position that is neither near the existing
+ // cache, nor near the start of text.
+ // Advance to the boundary following.
+ // There is a complication: the safe reverse rules identify pairs of code points
+ // that are safe. If advancing from the safe point moves forwards by less than
+ // two code points, we need to advance one more time to ensure that the boundary
+ // is good, including a correct rules status value.
+ retainCache = false;
+ fBI->fPosition = backupPos;
+ aBoundary = fBI->handleNext();
+ if (aBoundary != UBRK_DONE && aBoundary <= backupPos + 4) {
+ // +4 is a quick test for possibly having advanced only one codepoint.
+ // Four being the length of the longest potential code point, a supplementary in UTF-8
+ utext_setNativeIndex(&fBI->fText, aBoundary);
+ if (backupPos == utext_getPreviousNativeIndex(&fBI->fText)) {
+ // The initial handleNext() only advanced by a single code point. Go again.
+ aBoundary = fBI->handleNext(); // Safe rules identify safe pairs.
}
- ruleStatusIndex = fBI->fRuleStatusIndex;
}
+ if (aBoundary == UBRK_DONE) {
+ // Note (Andy Heninger): I don't think this condition can occur, but it's hard
+ // to prove that it can't. We ran off the end of the string looking a boundary
+ // following a safe point; choose the end of the string as that boundary.
+ aBoundary = utext_nativeLength(&fBI->fText);
+ }
+ ruleStatusIndex = fBI->fRuleStatusIndex;
}
+ }
+
+ if (!retainCache) {
+ U_ASSERT(aBoundary != -1);
reset(aBoundary, ruleStatusIndex); // Reset cache to hold aBoundary as a single starting point.
}
@@ -430,13 +476,13 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) {
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
- return TRUE;
+ return true;
}
fBI->fPosition = fromPosition;
pos = fBI->handleNext();
if (pos == UBRK_DONE) {
- return FALSE;
+ return false;
}
ruleStatusIdx = fBI->fRuleStatusIndex;
@@ -446,7 +492,7 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
fBI->fDictionaryCache->populateDictionary(fromPosition, pos, fromRuleStatusIdx, ruleStatusIdx);
if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) {
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
- return TRUE;
+ return true;
// TODO: may want to move a sizable chunk of dictionary cache to break cache at this point.
// But be careful with interactions with populateNear().
}
@@ -469,18 +515,18 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
addFollowing(pos, fBI->fRuleStatusIndex, RetainCachePosition);
}
- return TRUE;
+ return true;
}
UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
int32_t fromPosition = fBoundaries[fStartBufIdx];
if (fromPosition == 0) {
- return FALSE;
+ return false;
}
int32_t position = 0;
@@ -488,7 +534,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status)
if (fBI->fDictionaryCache->preceding(fromPosition, &position, &positionStatusIdx)) {
addPreceding(position, positionStatusIdx, UpdateCachePosition);
- return TRUE;
+ return true;
}
int32_t backupPosition = fromPosition;
@@ -542,7 +588,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status)
break;
}
- UBool segmentHandledByDictionary = FALSE;
+ UBool segmentHandledByDictionary = false;
if (fBI->fDictionaryCharCount != 0) {
// Segment from the rules includes dictionary characters.
// Subdivide it, with subdivided results going into the dictionary cache.
@@ -569,12 +615,12 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status)
} while (position < fromPosition);
// Move boundaries from the side buffer to the main circular buffer.
- UBool success = FALSE;
+ UBool success = false;
if (!fSideBuffer.isEmpty()) {
positionStatusIdx = fSideBuffer.popi();
position = fSideBuffer.popi();
addPreceding(position, positionStatusIdx, UpdateCachePosition);
- success = TRUE;
+ success = true;
}
while (!fSideBuffer.isEmpty()) {
diff --git a/contrib/libs/icu/common/rbbidata.cpp b/contrib/libs/icu/common/rbbidata.cpp
index 6338ed3ed85..49603b61934 100644
--- a/contrib/libs/icu/common/rbbidata.cpp
+++ b/contrib/libs/icu/common/rbbidata.cpp
@@ -38,7 +38,7 @@ RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, UErrorCode &status)
RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, enum EDontAdopt, UErrorCode &status) {
init0();
init(data, status);
- fDontFreeData = TRUE;
+ fDontFreeData = true;
}
RBBIDataWrapper::RBBIDataWrapper(UDataMemory* udm, UErrorCode &status) {
@@ -78,15 +78,15 @@ UBool RBBIDataWrapper::isDataVersionAcceptable(const UVersionInfo version) {
//
//-----------------------------------------------------------------------------
void RBBIDataWrapper::init0() {
- fHeader = NULL;
- fForwardTable = NULL;
- fReverseTable = NULL;
- fRuleSource = NULL;
- fRuleStatusTable = NULL;
- fTrie = NULL;
- fUDataMem = NULL;
+ fHeader = nullptr;
+ fForwardTable = nullptr;
+ fReverseTable = nullptr;
+ fRuleSource = nullptr;
+ fRuleStatusTable = nullptr;
+ fTrie = nullptr;
+ fUDataMem = nullptr;
fRefCount = 0;
- fDontFreeData = TRUE;
+ fDontFreeData = true;
}
void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
@@ -102,7 +102,7 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
// that is no longer supported. At that time fFormatVersion was
// an int32_t field, rather than an array of 4 bytes.
- fDontFreeData = FALSE;
+ fDontFreeData = false;
if (data->fFTableLen != 0) {
fForwardTable = (RBBIStateTable *)((char *)data + fHeader->fFTable);
}
@@ -246,7 +246,7 @@ void RBBIDataWrapper::printTable(const char *heading, const RBBIStateTable *tab
}
RBBIDebugPrintf("\n");
- if (table == NULL) {
+ if (table == nullptr) {
RBBIDebugPrintf(" N U L L T A B L E\n\n");
return;
}
@@ -305,10 +305,10 @@ U_CAPI int32_t U_EXPORT2
ubrk_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outData,
UErrorCode *status) {
- if (status == NULL || U_FAILURE(*status)) {
+ if (status == nullptr || U_FAILURE(*status)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<-1 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<-1 || (length>0 && outData==nullptr)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
diff --git a/contrib/libs/icu/common/rbbidata.h b/contrib/libs/icu/common/rbbidata.h
index 1bc76d5e5dc..c48de3d9357 100644
--- a/contrib/libs/icu/common/rbbidata.h
+++ b/contrib/libs/icu/common/rbbidata.h
@@ -85,7 +85,7 @@ struct RBBIDataHeader {
uint32_t fTrie; /* Offset to Trie data for character categories */
uint32_t fTrieLen;
uint32_t fRuleSource; /* Offset to the source for for the break */
- uint32_t fRuleSourceLen; /* rules. Stored UChar *. */
+ uint32_t fRuleSourceLen; /* rules. Stored char16_t *. */
uint32_t fStatusTable; /* Offset to the table of rule status values */
uint32_t fStatusTableLen;
@@ -205,7 +205,7 @@ private:
U_NAMESPACE_END
-U_CFUNC UBool rbbi_cleanup(void);
+U_CFUNC UBool rbbi_cleanup();
#endif /* C++ */
diff --git a/contrib/libs/icu/common/rbbinode.cpp b/contrib/libs/icu/common/rbbinode.cpp
index 27bcd8f8feb..7aa75d5ffb7 100644
--- a/contrib/libs/icu/common/rbbinode.cpp
+++ b/contrib/libs/icu/common/rbbinode.cpp
@@ -52,16 +52,16 @@ RBBINode::RBBINode(NodeType t) : UMemory() {
fSerialNum = ++gLastSerial;
#endif
fType = t;
- fParent = NULL;
- fLeftChild = NULL;
- fRightChild = NULL;
- fInputSet = NULL;
+ fParent = nullptr;
+ fLeftChild = nullptr;
+ fRightChild = nullptr;
+ fInputSet = nullptr;
fFirstPos = 0;
fLastPos = 0;
- fNullable = FALSE;
- fLookAheadEnd = FALSE;
- fRuleRoot = FALSE;
- fChainIn = FALSE;
+ fNullable = false;
+ fLookAheadEnd = false;
+ fRuleRoot = false;
+ fChainIn = false;
fVal = 0;
fPrecedence = precZero;
@@ -82,9 +82,9 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
fSerialNum = ++gLastSerial;
#endif
fType = other.fType;
- fParent = NULL;
- fLeftChild = NULL;
- fRightChild = NULL;
+ fParent = nullptr;
+ fLeftChild = nullptr;
+ fRightChild = nullptr;
fInputSet = other.fInputSet;
fPrecedence = other.fPrecedence;
fText = other.fText;
@@ -92,7 +92,7 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
fLastPos = other.fLastPos;
fNullable = other.fNullable;
fVal = other.fVal;
- fRuleRoot = FALSE;
+ fRuleRoot = false;
fChainIn = other.fChainIn;
UErrorCode status = U_ZERO_ERROR;
fFirstPosSet = new UVector(status); // TODO - get a real status from somewhere
@@ -113,7 +113,7 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) {
RBBINode::~RBBINode() {
// printf("deleting node %8x serial %4d\n", this, this->fSerialNum);
delete fInputSet;
- fInputSet = NULL;
+ fInputSet = nullptr;
switch (this->fType) {
case varRef:
@@ -124,9 +124,9 @@ RBBINode::~RBBINode() {
default:
delete fLeftChild;
- fLeftChild = NULL;
+ fLeftChild = nullptr;
delete fRightChild;
- fRightChild = NULL;
+ fRightChild = nullptr;
}
@@ -158,12 +158,12 @@ RBBINode *RBBINode::cloneTree() {
} else {
n = new RBBINode(*this);
// Check for null pointer.
- if (n != NULL) {
- if (fLeftChild != NULL) {
+ if (n != nullptr) {
+ if (fLeftChild != nullptr) {
n->fLeftChild = fLeftChild->cloneTree();
n->fLeftChild->fParent = n;
}
- if (fRightChild != NULL) {
+ if (fRightChild != nullptr) {
n->fRightChild = fRightChild->cloneTree();
n->fRightChild->fParent = n;
}
@@ -195,7 +195,7 @@ RBBINode *RBBINode::cloneTree() {
RBBINode *RBBINode::flattenVariables() {
if (fType == varRef) {
RBBINode *retNode = fLeftChild->cloneTree();
- if (retNode != NULL) {
+ if (retNode != nullptr) {
retNode->fRuleRoot = this->fRuleRoot;
retNode->fChainIn = this->fChainIn;
}
@@ -203,11 +203,11 @@ RBBINode *RBBINode::flattenVariables() {
return retNode;
}
- if (fLeftChild != NULL) {
+ if (fLeftChild != nullptr) {
fLeftChild = fLeftChild->flattenVariables();
fLeftChild->fParent = this;
}
- if (fRightChild != NULL) {
+ if (fRightChild != nullptr) {
fRightChild = fRightChild->flattenVariables();
fRightChild->fParent = this;
}
@@ -226,7 +226,7 @@ RBBINode *RBBINode::flattenVariables() {
void RBBINode::flattenSets() {
U_ASSERT(fType != setRef);
- if (fLeftChild != NULL) {
+ if (fLeftChild != nullptr) {
if (fLeftChild->fType==setRef) {
RBBINode *setRefNode = fLeftChild;
RBBINode *usetNode = setRefNode->fLeftChild;
@@ -239,7 +239,7 @@ void RBBINode::flattenSets() {
}
}
- if (fRightChild != NULL) {
+ if (fRightChild != nullptr) {
if (fRightChild->fType==setRef) {
RBBINode *setRefNode = fRightChild;
RBBINode *usetNode = setRefNode->fLeftChild;
@@ -270,10 +270,10 @@ void RBBINode::findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &s
if (fType == kind) {
dest->addElement(this, status);
}
- if (fLeftChild != NULL) {
+ if (fLeftChild != nullptr) {
fLeftChild->findNodes(dest, kind, status);
}
- if (fRightChild != NULL) {
+ if (fRightChild != nullptr) {
fRightChild->findNodes(dest, kind, status);
}
}
@@ -287,7 +287,7 @@ void RBBINode::findNodes(UVector *dest, RBBINode::NodeType kind, UErrorCode &s
#ifdef RBBI_DEBUG
static int32_t serial(const RBBINode *node) {
- return (node == NULL? -1 : node->fSerialNum);
+ return (node == nullptr? -1 : node->fSerialNum);
}
@@ -311,7 +311,7 @@ void RBBINode::printNode(const RBBINode *node) {
"opLParen"
};
- if (node==NULL) {
+ if (node==nullptr) {
RBBIDebugPrintf("%10p", (void *)node);
} else {
RBBIDebugPrintf("%10p %5d %12s %c%c %5d %5d %5d %6d %d ",
@@ -350,16 +350,16 @@ void RBBINode::printTree(const RBBINode *node, UBool printHeading) {
printNodeHeader();
}
printNode(node);
- if (node != NULL) {
+ if (node != nullptr) {
// Only dump the definition under a variable reference if asked to.
// Unconditionally dump children of all other node types.
if (node->fType != varRef) {
- if (node->fLeftChild != NULL) {
- printTree(node->fLeftChild, FALSE);
+ if (node->fLeftChild != nullptr) {
+ printTree(node->fLeftChild, false);
}
- if (node->fRightChild != NULL) {
- printTree(node->fRightChild, FALSE);
+ if (node->fRightChild != nullptr) {
+ printTree(node->fRightChild, false);
}
}
}
diff --git a/contrib/libs/icu/common/rbbirb.cpp b/contrib/libs/icu/common/rbbirb.cpp
index e5c250dfe40..7177254ec4d 100644
--- a/contrib/libs/icu/common/rbbirb.cpp
+++ b/contrib/libs/icu/common/rbbirb.cpp
@@ -52,26 +52,26 @@ RBBIRuleBuilder::RBBIRuleBuilder(const UnicodeString &rules,
{
fStatus = &status; // status is checked below
fParseError = parseErr;
- fDebugEnv = NULL;
+ fDebugEnv = nullptr;
#ifdef RBBI_DEBUG
fDebugEnv = getenv("U_RBBIDEBUG");
#endif
- fForwardTree = NULL;
- fReverseTree = NULL;
- fSafeFwdTree = NULL;
- fSafeRevTree = NULL;
+ fForwardTree = nullptr;
+ fReverseTree = nullptr;
+ fSafeFwdTree = nullptr;
+ fSafeRevTree = nullptr;
fDefaultTree = &fForwardTree;
- fForwardTable = NULL;
- fRuleStatusVals = NULL;
- fChainRules = FALSE;
- fLBCMNoChain = FALSE;
- fLookAheadHardBreak = FALSE;
- fUSetNodes = NULL;
- fRuleStatusVals = NULL;
- fScanner = NULL;
- fSetBuilder = NULL;
+ fForwardTable = nullptr;
+ fRuleStatusVals = nullptr;
+ fChainRules = false;
+ fLBCMNoChain = false;
+ fLookAheadHardBreak = false;
+ fUSetNodes = nullptr;
+ fRuleStatusVals = nullptr;
+ fScanner = nullptr;
+ fSetBuilder = nullptr;
if (parseErr) {
uprv_memset(parseErr, 0, sizeof(UParseError));
}
@@ -104,7 +104,7 @@ RBBIRuleBuilder::~RBBIRuleBuilder() {
int i;
for (i=0; ; i++) {
RBBINode *n = (RBBINode *)fUSetNodes->elementAt(i);
- if (n==NULL) {
+ if (n==nullptr) {
break;
}
delete n;
@@ -138,7 +138,7 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() {
int32_t i;
if (U_FAILURE(*fStatus)) {
- return NULL;
+ return nullptr;
}
// Remove whitespace from the rules to make it smaller.
@@ -183,9 +183,9 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() {
#endif
RBBIDataHeader *data = (RBBIDataHeader *)uprv_malloc(totalSize);
- if (data == NULL) {
+ if (data == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(data, 0, totalSize);
@@ -226,7 +226,7 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() {
fStrippedRules.getBuffer(), fStrippedRules.length(),
0xfffd, nullptr, fStatus);
if (U_FAILURE(*fStatus)) {
- return NULL;
+ return nullptr;
}
return data;
@@ -250,7 +250,7 @@ RBBIRuleBuilder::createRuleBasedBreakIterator( const UnicodeString &rules,
//
RBBIRuleBuilder builder(rules, parseError, status);
if (U_FAILURE(status)) { // status checked here bcos build below doesn't
- return NULL;
+ return nullptr;
}
RBBIDataHeader *data = builder.build(status);
@@ -267,9 +267,9 @@ RBBIRuleBuilder::createRuleBasedBreakIterator( const UnicodeString &rules,
RuleBasedBreakIterator *This = new RuleBasedBreakIterator(data, status);
if (U_FAILURE(status)) {
delete This;
- This = NULL;
+ This = nullptr;
}
- else if(This == NULL) { // test for NULL
+ else if(This == nullptr) { // test for nullptr
status = U_MEMORY_ALLOCATION_ERROR;
}
return This;
@@ -328,7 +328,7 @@ RBBIDataHeader *RBBIRuleBuilder::build(UErrorCode &status) {
// Package up the compiled data into a memory image
// in the run-time format.
//
- RBBIDataHeader *data = flattenData(); // returns NULL if error
+ RBBIDataHeader *data = flattenData(); // returns nullptr if error
if (U_FAILURE(status)) {
return nullptr;
}
diff --git a/contrib/libs/icu/common/rbbirb.h b/contrib/libs/icu/common/rbbirb.h
index 11dbf343ece..d983a184b64 100644
--- a/contrib/libs/icu/common/rbbirb.h
+++ b/contrib/libs/icu/common/rbbirb.h
@@ -54,8 +54,8 @@ public: // of these structs for each ent
~RBBISymbolTableEntry();
private:
- RBBISymbolTableEntry(const RBBISymbolTableEntry &other); // forbid copying of this class
- RBBISymbolTableEntry &operator=(const RBBISymbolTableEntry &other); // forbid copying of this class
+ RBBISymbolTableEntry(const RBBISymbolTableEntry &other) = delete; // forbid copying of this class
+ RBBISymbolTableEntry &operator=(const RBBISymbolTableEntry &other) = delete; // forbid copying of this class
};
@@ -177,8 +177,8 @@ public:
RBBIDataHeader *flattenData(); // Create the flattened (runtime format)
// data tables..
private:
- RBBIRuleBuilder(const RBBIRuleBuilder &other); // forbid copying of this class
- RBBIRuleBuilder &operator=(const RBBIRuleBuilder &other); // forbid copying of this class
+ RBBIRuleBuilder(const RBBIRuleBuilder &other) = delete; // forbid copying of this class
+ RBBIRuleBuilder &operator=(const RBBIRuleBuilder &other) = delete; // forbid copying of this class
};
diff --git a/contrib/libs/icu/common/rbbirpt.h b/contrib/libs/icu/common/rbbirpt.h
index 586953c90c6..ca1bcf45dc4 100644
--- a/contrib/libs/icu/common/rbbirpt.h
+++ b/contrib/libs/icu/common/rbbirpt.h
@@ -79,110 +79,110 @@ struct RBBIRuleTableEl {
};
static const struct RBBIRuleTableEl gRuleParseStateTable[] = {
- {doNOP, 0, 0, 0, TRUE}
- , {doExprStart, 254, 29, 9, FALSE} // 1 start
- , {doNOP, 132, 1,0, TRUE} // 2
- , {doNoChain, 94 /* ^ */, 12, 9, TRUE} // 3
- , {doExprStart, 36 /* $ */, 88, 98, FALSE} // 4
- , {doNOP, 33 /* ! */, 19,0, TRUE} // 5
- , {doNOP, 59 /* ; */, 1,0, TRUE} // 6
- , {doNOP, 252, 0,0, FALSE} // 7
- , {doExprStart, 255, 29, 9, FALSE} // 8
- , {doEndOfRule, 59 /* ; */, 1,0, TRUE} // 9 break-rule-end
- , {doNOP, 132, 9,0, TRUE} // 10
- , {doRuleError, 255, 103,0, FALSE} // 11
- , {doExprStart, 254, 29,0, FALSE} // 12 start-after-caret
- , {doNOP, 132, 12,0, TRUE} // 13
- , {doRuleError, 94 /* ^ */, 103,0, FALSE} // 14
- , {doExprStart, 36 /* $ */, 88, 37, FALSE} // 15
- , {doRuleError, 59 /* ; */, 103,0, FALSE} // 16
- , {doRuleError, 252, 103,0, FALSE} // 17
- , {doExprStart, 255, 29,0, FALSE} // 18
- , {doNOP, 33 /* ! */, 21,0, TRUE} // 19 rev-option
- , {doReverseDir, 255, 28, 9, FALSE} // 20
- , {doOptionStart, 130, 23,0, TRUE} // 21 option-scan1
- , {doRuleError, 255, 103,0, FALSE} // 22
- , {doNOP, 129, 23,0, TRUE} // 23 option-scan2
- , {doOptionEnd, 255, 25,0, FALSE} // 24
- , {doNOP, 59 /* ; */, 1,0, TRUE} // 25 option-scan3
- , {doNOP, 132, 25,0, TRUE} // 26
- , {doRuleError, 255, 103,0, FALSE} // 27
- , {doExprStart, 255, 29, 9, FALSE} // 28 reverse-rule
- , {doRuleChar, 254, 38,0, TRUE} // 29 term
- , {doNOP, 132, 29,0, TRUE} // 30
- , {doRuleChar, 131, 38,0, TRUE} // 31
- , {doNOP, 91 /* [ */, 94, 38, FALSE} // 32
- , {doLParen, 40 /* ( */, 29, 38, TRUE} // 33
- , {doNOP, 36 /* $ */, 88, 37, FALSE} // 34
- , {doDotAny, 46 /* . */, 38,0, TRUE} // 35
- , {doRuleError, 255, 103,0, FALSE} // 36
- , {doCheckVarDef, 255, 38,0, FALSE} // 37 term-var-ref
- , {doNOP, 132, 38,0, TRUE} // 38 expr-mod
- , {doUnaryOpStar, 42 /* * */, 43,0, TRUE} // 39
- , {doUnaryOpPlus, 43 /* + */, 43,0, TRUE} // 40
- , {doUnaryOpQuestion, 63 /* ? */, 43,0, TRUE} // 41
- , {doNOP, 255, 43,0, FALSE} // 42
- , {doExprCatOperator, 254, 29,0, FALSE} // 43 expr-cont
- , {doNOP, 132, 43,0, TRUE} // 44
- , {doExprCatOperator, 131, 29,0, FALSE} // 45
- , {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 46
- , {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 47
- , {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 48
- , {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 49
- , {doExprCatOperator, 47 /* / */, 55,0, FALSE} // 50
- , {doExprCatOperator, 123 /* { */, 67,0, TRUE} // 51
- , {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 52
- , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 53
- , {doExprFinished, 255, 255,0, FALSE} // 54
- , {doSlash, 47 /* / */, 57,0, TRUE} // 55 look-ahead
- , {doNOP, 255, 103,0, FALSE} // 56
- , {doExprCatOperator, 254, 29,0, FALSE} // 57 expr-cont-no-slash
- , {doNOP, 132, 43,0, TRUE} // 58
- , {doExprCatOperator, 131, 29,0, FALSE} // 59
- , {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 60
- , {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 61
- , {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 62
- , {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 63
- , {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 64
- , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 65
- , {doExprFinished, 255, 255,0, FALSE} // 66
- , {doNOP, 132, 67,0, TRUE} // 67 tag-open
- , {doStartTagValue, 128, 70,0, FALSE} // 68
- , {doTagExpectedError, 255, 103,0, FALSE} // 69
- , {doNOP, 132, 74,0, TRUE} // 70 tag-value
- , {doNOP, 125 /* } */, 74,0, FALSE} // 71
- , {doTagDigit, 128, 70,0, TRUE} // 72
- , {doTagExpectedError, 255, 103,0, FALSE} // 73
- , {doNOP, 132, 74,0, TRUE} // 74 tag-close
- , {doTagValue, 125 /* } */, 77,0, TRUE} // 75
- , {doTagExpectedError, 255, 103,0, FALSE} // 76
- , {doExprCatOperator, 254, 29,0, FALSE} // 77 expr-cont-no-tag
- , {doNOP, 132, 77,0, TRUE} // 78
- , {doExprCatOperator, 131, 29,0, FALSE} // 79
- , {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 80
- , {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 81
- , {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 82
- , {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 83
- , {doExprCatOperator, 47 /* / */, 55,0, FALSE} // 84
- , {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 85
- , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 86
- , {doExprFinished, 255, 255,0, FALSE} // 87
- , {doStartVariableName, 36 /* $ */, 90,0, TRUE} // 88 scan-var-name
- , {doNOP, 255, 103,0, FALSE} // 89
- , {doNOP, 130, 92,0, TRUE} // 90 scan-var-start
- , {doVariableNameExpectedErr, 255, 103,0, FALSE} // 91
- , {doNOP, 129, 92,0, TRUE} // 92 scan-var-body
- , {doEndVariableName, 255, 255,0, FALSE} // 93
- , {doScanUnicodeSet, 91 /* [ */, 255,0, TRUE} // 94 scan-unicode-set
- , {doScanUnicodeSet, 112 /* p */, 255,0, TRUE} // 95
- , {doScanUnicodeSet, 80 /* P */, 255,0, TRUE} // 96
- , {doNOP, 255, 103,0, FALSE} // 97
- , {doNOP, 132, 98,0, TRUE} // 98 assign-or-rule
- , {doStartAssign, 61 /* = */, 29, 101, TRUE} // 99
- , {doNOP, 255, 37, 9, FALSE} // 100
- , {doEndAssign, 59 /* ; */, 1,0, TRUE} // 101 assign-end
- , {doRuleErrorAssignExpr, 255, 103,0, FALSE} // 102
- , {doExit, 255, 103,0, TRUE} // 103 errorDeath
+ {doNOP, 0, 0, 0, true}
+ , {doExprStart, 254, 29, 9, false} // 1 start
+ , {doNOP, 132, 1,0, true} // 2
+ , {doNoChain, 94 /* ^ */, 12, 9, true} // 3
+ , {doExprStart, 36 /* $ */, 88, 98, false} // 4
+ , {doNOP, 33 /* ! */, 19,0, true} // 5
+ , {doNOP, 59 /* ; */, 1,0, true} // 6
+ , {doNOP, 252, 0,0, false} // 7
+ , {doExprStart, 255, 29, 9, false} // 8
+ , {doEndOfRule, 59 /* ; */, 1,0, true} // 9 break-rule-end
+ , {doNOP, 132, 9,0, true} // 10
+ , {doRuleError, 255, 103,0, false} // 11
+ , {doExprStart, 254, 29,0, false} // 12 start-after-caret
+ , {doNOP, 132, 12,0, true} // 13
+ , {doRuleError, 94 /* ^ */, 103,0, false} // 14
+ , {doExprStart, 36 /* $ */, 88, 37, false} // 15
+ , {doRuleError, 59 /* ; */, 103,0, false} // 16
+ , {doRuleError, 252, 103,0, false} // 17
+ , {doExprStart, 255, 29,0, false} // 18
+ , {doNOP, 33 /* ! */, 21,0, true} // 19 rev-option
+ , {doReverseDir, 255, 28, 9, false} // 20
+ , {doOptionStart, 130, 23,0, true} // 21 option-scan1
+ , {doRuleError, 255, 103,0, false} // 22
+ , {doNOP, 129, 23,0, true} // 23 option-scan2
+ , {doOptionEnd, 255, 25,0, false} // 24
+ , {doNOP, 59 /* ; */, 1,0, true} // 25 option-scan3
+ , {doNOP, 132, 25,0, true} // 26
+ , {doRuleError, 255, 103,0, false} // 27
+ , {doExprStart, 255, 29, 9, false} // 28 reverse-rule
+ , {doRuleChar, 254, 38,0, true} // 29 term
+ , {doNOP, 132, 29,0, true} // 30
+ , {doRuleChar, 131, 38,0, true} // 31
+ , {doNOP, 91 /* [ */, 94, 38, false} // 32
+ , {doLParen, 40 /* ( */, 29, 38, true} // 33
+ , {doNOP, 36 /* $ */, 88, 37, false} // 34
+ , {doDotAny, 46 /* . */, 38,0, true} // 35
+ , {doRuleError, 255, 103,0, false} // 36
+ , {doCheckVarDef, 255, 38,0, false} // 37 term-var-ref
+ , {doNOP, 132, 38,0, true} // 38 expr-mod
+ , {doUnaryOpStar, 42 /* * */, 43,0, true} // 39
+ , {doUnaryOpPlus, 43 /* + */, 43,0, true} // 40
+ , {doUnaryOpQuestion, 63 /* ? */, 43,0, true} // 41
+ , {doNOP, 255, 43,0, false} // 42
+ , {doExprCatOperator, 254, 29,0, false} // 43 expr-cont
+ , {doNOP, 132, 43,0, true} // 44
+ , {doExprCatOperator, 131, 29,0, false} // 45
+ , {doExprCatOperator, 91 /* [ */, 29,0, false} // 46
+ , {doExprCatOperator, 40 /* ( */, 29,0, false} // 47
+ , {doExprCatOperator, 36 /* $ */, 29,0, false} // 48
+ , {doExprCatOperator, 46 /* . */, 29,0, false} // 49
+ , {doExprCatOperator, 47 /* / */, 55,0, false} // 50
+ , {doExprCatOperator, 123 /* { */, 67,0, true} // 51
+ , {doExprOrOperator, 124 /* | */, 29,0, true} // 52
+ , {doExprRParen, 41 /* ) */, 255,0, true} // 53
+ , {doExprFinished, 255, 255,0, false} // 54
+ , {doSlash, 47 /* / */, 57,0, true} // 55 look-ahead
+ , {doNOP, 255, 103,0, false} // 56
+ , {doExprCatOperator, 254, 29,0, false} // 57 expr-cont-no-slash
+ , {doNOP, 132, 43,0, true} // 58
+ , {doExprCatOperator, 131, 29,0, false} // 59
+ , {doExprCatOperator, 91 /* [ */, 29,0, false} // 60
+ , {doExprCatOperator, 40 /* ( */, 29,0, false} // 61
+ , {doExprCatOperator, 36 /* $ */, 29,0, false} // 62
+ , {doExprCatOperator, 46 /* . */, 29,0, false} // 63
+ , {doExprOrOperator, 124 /* | */, 29,0, true} // 64
+ , {doExprRParen, 41 /* ) */, 255,0, true} // 65
+ , {doExprFinished, 255, 255,0, false} // 66
+ , {doNOP, 132, 67,0, true} // 67 tag-open
+ , {doStartTagValue, 128, 70,0, false} // 68
+ , {doTagExpectedError, 255, 103,0, false} // 69
+ , {doNOP, 132, 74,0, true} // 70 tag-value
+ , {doNOP, 125 /* } */, 74,0, false} // 71
+ , {doTagDigit, 128, 70,0, true} // 72
+ , {doTagExpectedError, 255, 103,0, false} // 73
+ , {doNOP, 132, 74,0, true} // 74 tag-close
+ , {doTagValue, 125 /* } */, 77,0, true} // 75
+ , {doTagExpectedError, 255, 103,0, false} // 76
+ , {doExprCatOperator, 254, 29,0, false} // 77 expr-cont-no-tag
+ , {doNOP, 132, 77,0, true} // 78
+ , {doExprCatOperator, 131, 29,0, false} // 79
+ , {doExprCatOperator, 91 /* [ */, 29,0, false} // 80
+ , {doExprCatOperator, 40 /* ( */, 29,0, false} // 81
+ , {doExprCatOperator, 36 /* $ */, 29,0, false} // 82
+ , {doExprCatOperator, 46 /* . */, 29,0, false} // 83
+ , {doExprCatOperator, 47 /* / */, 55,0, false} // 84
+ , {doExprOrOperator, 124 /* | */, 29,0, true} // 85
+ , {doExprRParen, 41 /* ) */, 255,0, true} // 86
+ , {doExprFinished, 255, 255,0, false} // 87
+ , {doStartVariableName, 36 /* $ */, 90,0, true} // 88 scan-var-name
+ , {doNOP, 255, 103,0, false} // 89
+ , {doNOP, 130, 92,0, true} // 90 scan-var-start
+ , {doVariableNameExpectedErr, 255, 103,0, false} // 91
+ , {doNOP, 129, 92,0, true} // 92 scan-var-body
+ , {doEndVariableName, 255, 255,0, false} // 93
+ , {doScanUnicodeSet, 91 /* [ */, 255,0, true} // 94 scan-unicode-set
+ , {doScanUnicodeSet, 112 /* p */, 255,0, true} // 95
+ , {doScanUnicodeSet, 80 /* P */, 255,0, true} // 96
+ , {doNOP, 255, 103,0, false} // 97
+ , {doNOP, 132, 98,0, true} // 98 assign-or-rule
+ , {doStartAssign, 61 /* = */, 29, 101, true} // 99
+ , {doNOP, 255, 37, 9, false} // 100
+ , {doEndAssign, 59 /* ; */, 1,0, true} // 101 assign-end
+ , {doRuleErrorAssignExpr, 255, 103,0, false} // 102
+ , {doExit, 255, 103,0, true} // 103 errorDeath
};
#ifdef RBBI_DEBUG
static const char * const RBBIRuleStateNames[] = { 0,
diff --git a/contrib/libs/icu/common/rbbiscan.cpp b/contrib/libs/icu/common/rbbiscan.cpp
index 1304f7e37e6..455ace78b80 100644
--- a/contrib/libs/icu/common/rbbiscan.cpp
+++ b/contrib/libs/icu/common/rbbiscan.cpp
@@ -46,7 +46,7 @@
// source form of the state transition table for the RBBI rule parser.
//
//------------------------------------------------------------------------------
-static const UChar gRuleSet_rule_char_pattern[] = {
+static const char16_t gRuleSet_rule_char_pattern[] = {
// Characters that may appear as literals in patterns without escaping or quoting.
// [ ^ [ \ p { Z } \ u 0 0 2 0
0x5b, 0x5e, 0x5b, 0x5c, 0x70, 0x7b, 0x5a, 0x7d, 0x5c, 0x75, 0x30, 0x30, 0x32, 0x30,
@@ -55,19 +55,19 @@ static const UChar gRuleSet_rule_char_pattern[] = {
// { L } ] - [ \ p { N } ] ]
0x7b, 0x4c, 0x7d, 0x5d, 0x2d, 0x5b, 0x5c, 0x70, 0x7b, 0x4e, 0x7d, 0x5d, 0x5d, 0};
-static const UChar gRuleSet_name_char_pattern[] = {
+static const char16_t gRuleSet_name_char_pattern[] = {
// [ _ \ p { L } \ p { N } ]
0x5b, 0x5f, 0x5c, 0x70, 0x7b, 0x4c, 0x7d, 0x5c, 0x70, 0x7b, 0x4e, 0x7d, 0x5d, 0};
-static const UChar gRuleSet_digit_char_pattern[] = {
+static const char16_t gRuleSet_digit_char_pattern[] = {
// [ 0 - 9 ]
0x5b, 0x30, 0x2d, 0x39, 0x5d, 0};
-static const UChar gRuleSet_name_start_char_pattern[] = {
+static const char16_t gRuleSet_name_start_char_pattern[] = {
// [ _ \ p { L } ]
0x5b, 0x5f, 0x5c, 0x70, 0x7b, 0x4c, 0x7d, 0x5d, 0 };
-static const UChar kAny[] = {0x61, 0x6e, 0x79, 0x00}; // "any"
+static const char16_t kAny[] = {0x61, 0x6e, 0x79, 0x00}; // "any"
U_CDECL_BEGIN
@@ -92,23 +92,23 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb)
fRB = rb;
fScanIndex = 0;
fNextIndex = 0;
- fQuoteMode = FALSE;
+ fQuoteMode = false;
fLineNum = 1;
fCharNum = 0;
fLastChar = 0;
- fStateTable = NULL;
+ fStateTable = nullptr;
fStack[0] = 0;
fStackPtr = 0;
- fNodeStack[0] = NULL;
+ fNodeStack[0] = nullptr;
fNodeStackPtr = 0;
- fReverseRule = FALSE;
- fLookAheadRule = FALSE;
- fNoChainInRule = FALSE;
+ fReverseRule = false;
+ fLookAheadRule = false;
+ fNoChainInRule = false;
- fSymbolTable = NULL;
- fSetTable = NULL;
+ fSymbolTable = nullptr;
+ fSetTable = nullptr;
fRuleNum = 0;
fOptionStart = 0;
@@ -146,11 +146,11 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb)
}
fSymbolTable = new RBBISymbolTable(this, rb->fRules, *rb->fStatus);
- if (fSymbolTable == NULL) {
+ if (fSymbolTable == nullptr) {
*rb->fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
- fSetTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, rb->fStatus);
+ fSetTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, rb->fStatus);
if (U_FAILURE(*rb->fStatus)) {
return;
}
@@ -166,9 +166,9 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb)
//------------------------------------------------------------------------------
RBBIRuleScanner::~RBBIRuleScanner() {
delete fSymbolTable;
- if (fSetTable != NULL) {
+ if (fSetTable != nullptr) {
uhash_close(fSetTable);
- fSetTable = NULL;
+ fSetTable = nullptr;
}
@@ -199,9 +199,9 @@ RBBIRuleScanner::~RBBIRuleScanner() {
//------------------------------------------------------------------------------
UBool RBBIRuleScanner::doParseActions(int32_t action)
{
- RBBINode *n = NULL;
+ RBBINode *n = nullptr;
- UBool returnVal = TRUE;
+ UBool returnVal = true;
switch (action) {
@@ -213,7 +213,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doNoChain:
// Scanned a '^' while on the rule start state.
- fNoChainInRule = TRUE;
+ fNoChainInRule = true;
break;
@@ -345,7 +345,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
catNode->fRightChild = endNode;
fNodeStack[fNodeStackPtr] = catNode;
endNode->fVal = fRuleNum;
- endNode->fLookAheadEnd = TRUE;
+ endNode->fLookAheadEnd = true;
thisRule = catNode;
// TODO: Disable chaining out of look-ahead (hard break) rules.
@@ -354,13 +354,13 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
}
// Mark this node as being the root of a rule.
- thisRule->fRuleRoot = TRUE;
+ thisRule->fRuleRoot = true;
// Flag if chaining into this rule is wanted.
//
if (fRB->fChainRules && // If rule chaining is enabled globally via !!chain
!fNoChainInRule) { // and no '^' chain-in inhibit was on this rule
- thisRule->fChainIn = TRUE;
+ thisRule->fChainIn = true;
}
@@ -374,7 +374,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
//
RBBINode **destRules = (fReverseRule? &fRB->fSafeRevTree : fRB->fDefaultTree);
- if (*destRules != NULL) {
+ if (*destRules != nullptr) {
// This is not the first rule encountered.
// OR previous stuff (from *destRules)
// with the current rule expression (on the Node Stack)
@@ -398,9 +398,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
// Just move its parse tree from the stack to *destRules.
*destRules = fNodeStack[fNodeStackPtr];
}
- fReverseRule = FALSE; // in preparation for the next rule.
- fLookAheadRule = FALSE;
- fNoChainInRule = FALSE;
+ fReverseRule = false; // in preparation for the next rule.
+ fLookAheadRule = false;
+ fNoChainInRule = false;
fNodeStackPtr = 0;
}
break;
@@ -408,7 +408,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doRuleError:
error(U_BRK_RULE_SYNTAX);
- returnVal = FALSE;
+ returnVal = false;
break;
@@ -484,7 +484,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
if (U_FAILURE(*fRB->fStatus)) {
break;
}
- findSetFor(UnicodeString(TRUE, kAny, 3), n);
+ findSetFor(UnicodeString(true, kAny, 3), n);
n->fFirstPos = fScanIndex;
n->fLastPos = fNextIndex;
fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText);
@@ -501,7 +501,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
n->fFirstPos = fScanIndex;
n->fLastPos = fNextIndex;
fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText);
- fLookAheadRule = TRUE;
+ fLookAheadRule = true;
break;
@@ -534,7 +534,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doTagExpectedError:
error(U_BRK_MALFORMED_RULE_TAG);
- returnVal = FALSE;
+ returnVal = false;
break;
case doOptionStart:
@@ -546,9 +546,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
{
UnicodeString opt(fRB->fRules, fOptionStart, fScanIndex-fOptionStart);
if (opt == UNICODE_STRING("chain", 5)) {
- fRB->fChainRules = TRUE;
+ fRB->fChainRules = true;
} else if (opt == UNICODE_STRING("LBCMNoChain", 11)) {
- fRB->fLBCMNoChain = TRUE;
+ fRB->fLBCMNoChain = true;
} else if (opt == UNICODE_STRING("forward", 7)) {
fRB->fDefaultTree = &fRB->fForwardTree;
} else if (opt == UNICODE_STRING("reverse", 7)) {
@@ -558,7 +558,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
} else if (opt == UNICODE_STRING("safe_reverse", 12)) {
fRB->fDefaultTree = &fRB->fSafeRevTree;
} else if (opt == UNICODE_STRING("lookAheadHardBreak", 18)) {
- fRB->fLookAheadHardBreak = TRUE;
+ fRB->fLookAheadHardBreak = true;
} else if (opt == UNICODE_STRING("quoted_literals_only", 20)) {
fRuleSets[kRuleSet_rule_char-128].clear();
} else if (opt == UNICODE_STRING("unquoted_literals", 17)) {
@@ -570,7 +570,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
break;
case doReverseDir:
- fReverseRule = TRUE;
+ fReverseRule = true;
break;
case doStartVariableName:
@@ -583,7 +583,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doEndVariableName:
n = fNodeStack[fNodeStackPtr];
- if (n==NULL || n->fType != RBBINode::varRef) {
+ if (n==nullptr || n->fType != RBBINode::varRef) {
error(U_BRK_INTERNAL_ERROR);
break;
}
@@ -598,9 +598,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doCheckVarDef:
n = fNodeStack[fNodeStackPtr];
- if (n->fLeftChild == NULL) {
+ if (n->fLeftChild == nullptr) {
error(U_BRK_UNDEFINED_VARIABLE);
- returnVal = FALSE;
+ returnVal = false;
}
break;
@@ -609,11 +609,11 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
case doRuleErrorAssignExpr:
error(U_BRK_ASSIGN_ERROR);
- returnVal = FALSE;
+ returnVal = false;
break;
case doExit:
- returnVal = FALSE;
+ returnVal = false;
break;
case doScanUnicodeSet:
@@ -622,7 +622,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action)
default:
error(U_BRK_INTERNAL_ERROR);
- returnVal = FALSE;
+ returnVal = false;
break;
}
return returnVal && U_SUCCESS(*fRB->fStatus);
@@ -737,7 +737,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode
// If so, just use the cached set in the new node.
// delete any set provided by the caller, since we own it.
el = (RBBISetTableEl *)uhash_get(fSetTable, &s);
- if (el != NULL) {
+ if (el != nullptr) {
delete setToAdopt;
node->fLeftChild = el->val;
U_ASSERT(node->fLeftChild->fType == RBBINode::uset);
@@ -747,7 +747,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode
// Haven't seen this set before.
// If the caller didn't provide us with a prebuilt set,
// create a new UnicodeSet now.
- if (setToAdopt == NULL) {
+ if (setToAdopt == nullptr) {
if (s.compare(kAny, -1) == 0) {
setToAdopt = new UnicodeSet(0x000000, 0x10ffff);
} else {
@@ -762,7 +762,7 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode
// This new uset node becomes the child of the caller's setReference node.
//
RBBINode *usetNode = new RBBINode(RBBINode::uset);
- if (usetNode == NULL) {
+ if (usetNode == nullptr) {
error(U_MEMORY_ALLOCATION_ERROR);
return;
}
@@ -783,14 +783,14 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode
//
el = (RBBISetTableEl *)uprv_malloc(sizeof(RBBISetTableEl));
UnicodeString *tkey = new UnicodeString(s);
- if (tkey == NULL || el == NULL || setToAdopt == NULL) {
+ if (tkey == nullptr || el == nullptr || setToAdopt == nullptr) {
// Delete to avoid memory leak
delete tkey;
- tkey = NULL;
+ tkey = nullptr;
uprv_free(el);
- el = NULL;
+ el = nullptr;
delete setToAdopt;
- setToAdopt = NULL;
+ setToAdopt = nullptr;
error(U_MEMORY_ALLOCATION_ERROR);
return;
@@ -809,15 +809,15 @@ void RBBIRuleScanner::findSetFor(const UnicodeString &s, RBBINode *node, Unicode
// Numeric because there is no portable way to enter them as literals.
// (Think EBCDIC).
//
-static const UChar chCR = 0x0d; // New lines, for terminating comments.
-static const UChar chLF = 0x0a;
-static const UChar chNEL = 0x85; // NEL newline variant
-static const UChar chLS = 0x2028; // Unicode Line Separator
-static const UChar chApos = 0x27; // single quote, for quoted chars.
-static const UChar chPound = 0x23; // '#', introduces a comment.
-static const UChar chBackSlash = 0x5c; // '\' introduces a char escape
-static const UChar chLParen = 0x28;
-static const UChar chRParen = 0x29;
+static const char16_t chCR = 0x0d; // New lines, for terminating comments.
+static const char16_t chLF = 0x0a;
+static const char16_t chNEL = 0x85; // NEL newline variant
+static const char16_t chLS = 0x2028; // Unicode Line Separator
+static const char16_t chApos = 0x27; // single quote, for quoted chars.
+static const char16_t chPound = 0x23; // '#', introduces a comment.
+static const char16_t chBackSlash = 0x5c; // '\' introduces a char escape
+static const char16_t chLParen = 0x28;
+static const char16_t chRParen = 0x29;
//------------------------------------------------------------------------------
@@ -872,7 +872,7 @@ UChar32 RBBIRuleScanner::nextCharLL() {
fCharNum=0;
if (fQuoteMode) {
error(U_BRK_NEW_LINE_IN_QUOTED_STRING);
- fQuoteMode = FALSE;
+ fQuoteMode = false;
}
}
else {
@@ -901,7 +901,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
fScanIndex = fNextIndex;
c.fChar = nextCharLL();
- c.fEscaped = FALSE;
+ c.fEscaped = false;
//
// check for '' sequence.
@@ -910,7 +910,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
if (c.fChar == chApos) {
if (fRB->fRules.char32At(fNextIndex) == chApos) {
c.fChar = nextCharLL(); // get nextChar officially so character counts
- c.fEscaped = TRUE; // stay correct.
+ c.fEscaped = true; // stay correct.
}
else
{
@@ -918,18 +918,18 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
// Toggle quoting mode.
// Return either '(' or ')', because quotes cause a grouping of the quoted text.
fQuoteMode = !fQuoteMode;
- if (fQuoteMode == TRUE) {
+ if (fQuoteMode) {
c.fChar = chLParen;
} else {
c.fChar = chRParen;
}
- c.fEscaped = FALSE; // The paren that we return is not escaped.
+ c.fEscaped = false; // The paren that we return is not escaped.
return;
}
}
if (fQuoteMode) {
- c.fEscaped = TRUE;
+ c.fEscaped = true;
}
else
{
@@ -963,7 +963,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
// Use UnicodeString::unescapeAt() to handle them.
//
if (c.fChar == chBackSlash) {
- c.fEscaped = TRUE;
+ c.fEscaped = true;
int32_t startX = fNextIndex;
c.fChar = fRB->fRules.unescapeAt(fNextIndex);
if (fNextIndex == startX) {
@@ -1032,7 +1032,7 @@ void RBBIRuleScanner::parse() {
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPrintf("."); fflush(stdout);}
#endif
- if (tableEl->fCharClass < 127 && fC.fEscaped == FALSE && tableEl->fCharClass == fC.fChar) {
+ if (tableEl->fCharClass < 127 && fC.fEscaped == false && tableEl->fCharClass == fC.fChar) {
// Table row specified an individual character, not a set, and
// the input character is not escaped, and
// the input character matched it.
@@ -1057,7 +1057,7 @@ void RBBIRuleScanner::parse() {
}
if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class &&
- fC.fEscaped == FALSE && // char is not escaped &&
+ fC.fEscaped == false && // char is not escaped &&
fC.fChar != (UChar32)-1) { // char is not EOF
U_ASSERT((tableEl->fCharClass-128) < UPRV_LENGTHOF(fRuleSets));
if (fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) {
@@ -1076,7 +1076,7 @@ void RBBIRuleScanner::parse() {
// We've found the row of the state table that matches the current input
// character from the rules string.
// Perform any action specified by this row in the state table.
- if (doParseActions((int32_t)tableEl->fAction) == FALSE) {
+ if (doParseActions((int32_t)tableEl->fAction) == false) {
// Break out of the state machine loop if the
// the action signalled some kind of error, or
// the action was to exit, occurs on normal end-of-rules-input.
@@ -1119,7 +1119,7 @@ void RBBIRuleScanner::parse() {
// If there are no forward rules set an error.
//
- if (fRB->fForwardTree == NULL) {
+ if (fRB->fForwardTree == nullptr) {
error(U_BRK_RULE_SYNTAX);
return;
}
@@ -1133,13 +1133,13 @@ void RBBIRuleScanner::parse() {
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "symbols")) {fSymbolTable->rbbiSymtablePrint();}
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ptree")) {
RBBIDebugPrintf("Completed Forward Rules Parse Tree...\n");
- RBBINode::printTree(fRB->fForwardTree, TRUE);
+ RBBINode::printTree(fRB->fForwardTree, true);
RBBIDebugPrintf("\nCompleted Reverse Rules Parse Tree...\n");
- RBBINode::printTree(fRB->fReverseTree, TRUE);
+ RBBINode::printTree(fRB->fReverseTree, true);
RBBIDebugPrintf("\nCompleted Safe Point Forward Rules Parse Tree...\n");
- RBBINode::printTree(fRB->fSafeFwdTree, TRUE);
+ RBBINode::printTree(fRB->fSafeFwdTree, true);
RBBIDebugPrintf("\nCompleted Safe Point Reverse Rules Parse Tree...\n");
- RBBINode::printTree(fRB->fSafeRevTree, TRUE);
+ RBBINode::printTree(fRB->fSafeRevTree, true);
}
#endif
}
@@ -1154,7 +1154,7 @@ void RBBIRuleScanner::parse() {
void RBBIRuleScanner::printNodeStack(const char *title) {
int i;
RBBIDebugPrintf("%s. Dumping node stack...\n", title);
- for (i=fNodeStackPtr; i>0; i--) {RBBINode::printTree(fNodeStack[i], TRUE);}
+ for (i=fNodeStackPtr; i>0; i--) {RBBINode::printTree(fNodeStack[i], true);}
}
#endif
@@ -1169,16 +1169,16 @@ void RBBIRuleScanner::printNodeStack(const char *title) {
//------------------------------------------------------------------------------
RBBINode *RBBIRuleScanner::pushNewNode(RBBINode::NodeType t) {
if (U_FAILURE(*fRB->fStatus)) {
- return NULL;
+ return nullptr;
}
if (fNodeStackPtr >= kStackSize - 1) {
error(U_BRK_RULE_SYNTAX);
RBBIDebugPuts("RBBIRuleScanner::pushNewNode - stack overflow.");
- return NULL;
+ return nullptr;
}
fNodeStackPtr++;
fNodeStack[fNodeStackPtr] = new RBBINode(t);
- if (fNodeStack[fNodeStackPtr] == NULL) {
+ if (fNodeStack[fNodeStackPtr] == nullptr) {
*fRB->fStatus = U_MEMORY_ALLOCATION_ERROR;
}
return fNodeStack[fNodeStackPtr];
@@ -1214,7 +1214,7 @@ void RBBIRuleScanner::scanSet() {
startPos = fScanIndex;
UErrorCode localStatus = U_ZERO_ERROR;
uset = new UnicodeSet();
- if (uset == NULL) {
+ if (uset == nullptr) {
localStatus = U_MEMORY_ALLOCATION_ERROR;
} else {
uset->applyPatternIgnoreSpace(fRB->fRules, pos, fSymbolTable, localStatus);
@@ -1232,7 +1232,7 @@ void RBBIRuleScanner::scanSet() {
// Verify that the set contains at least one code point.
//
- U_ASSERT(uset!=NULL);
+ U_ASSERT(uset!=nullptr);
if (uset->isEmpty()) {
// This set is empty.
// Make it an error, because it almost certainly is not what the user wanted.
diff --git a/contrib/libs/icu/common/rbbiscan.h b/contrib/libs/icu/common/rbbiscan.h
index 33fdf033546..8a419b9d76b 100644
--- a/contrib/libs/icu/common/rbbiscan.h
+++ b/contrib/libs/icu/common/rbbiscan.h
@@ -86,7 +86,7 @@ private:
void error(UErrorCode e); // error reporting convenience function.
void fixOpStack(RBBINode::OpPrecedence p);
// a character.
- void findSetFor(const UnicodeString &s, RBBINode *node, UnicodeSet *setToAdopt = NULL);
+ void findSetFor(const UnicodeString &s, RBBINode *node, UnicodeSet *setToAdopt = nullptr);
UChar32 nextCharLL();
#ifdef RBBI_DEBUG
@@ -158,8 +158,8 @@ private:
UnicodeSet *gRuleSet_name_char;
UnicodeSet *gRuleSet_name_start_char;
- RBBIRuleScanner(const RBBIRuleScanner &other); // forbid copying of this class
- RBBIRuleScanner &operator=(const RBBIRuleScanner &other); // forbid copying of this class
+ RBBIRuleScanner(const RBBIRuleScanner &other) = delete; // forbid copying of this class
+ RBBIRuleScanner &operator=(const RBBIRuleScanner &other) = delete; // forbid copying of this class
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/rbbisetb.cpp b/contrib/libs/icu/common/rbbisetb.cpp
index 29faeb8c456..e6c72954bc3 100644
--- a/contrib/libs/icu/common/rbbisetb.cpp
+++ b/contrib/libs/icu/common/rbbisetb.cpp
@@ -74,7 +74,7 @@ RBBISetBuilder::~RBBISetBuilder()
RangeDescriptor *nextRangeDesc;
// Walk through & delete the linked list of RangeDescriptors
- for (nextRangeDesc = fRangeList; nextRangeDesc!=NULL;) {
+ for (nextRangeDesc = fRangeList; nextRangeDesc!=nullptr;) {
RangeDescriptor *r = nextRangeDesc;
nextRangeDesc = r->fNext;
delete r;
@@ -104,7 +104,7 @@ void RBBISetBuilder::buildRanges() {
// that is in no sets.
//
fRangeList = new RangeDescriptor(*fStatus); // will check for status here
- if (fRangeList == NULL) {
+ if (fRangeList == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -121,7 +121,7 @@ void RBBISetBuilder::buildRanges() {
int ni;
for (ni=0; ; ni++) { // Loop over each of the UnicodeSets encountered in the input rules
usetNode = (RBBINode *)this->fRB->fUSetNodes->elementAt(ni);
- if (usetNode==NULL) {
+ if (usetNode==nullptr) {
break;
}
@@ -252,7 +252,7 @@ void RBBISetBuilder::buildRanges() {
UnicodeString bofString(u"bof");
for (ni=0; ; ni++) { // Loop over each of the UnicodeSets encountered in the input rules
usetNode = (RBBINode *)this->fRB->fUSetNodes->elementAt(ni);
- if (usetNode==NULL) {
+ if (usetNode==nullptr) {
break;
}
UnicodeSet *inputSet = usetNode->fInputSet;
@@ -261,7 +261,7 @@ void RBBISetBuilder::buildRanges() {
}
if (inputSet->contains(bofString)) {
addValToSet(usetNode, 2);
- fSawBOF = TRUE;
+ fSawBOF = true;
}
}
@@ -376,12 +376,12 @@ void RBBISetBuilder::addValToSets(UVector *sets, uint32_t val) {
void RBBISetBuilder::addValToSet(RBBINode *usetNode, uint32_t val) {
RBBINode *leafNode = new RBBINode(RBBINode::leafChar);
- if (leafNode == NULL) {
+ if (leafNode == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
leafNode->fVal = (unsigned short)val;
- if (usetNode->fLeftChild == NULL) {
+ if (usetNode->fLeftChild == nullptr) {
usetNode->fLeftChild = leafNode;
leafNode->fParent = usetNode;
} else {
@@ -389,7 +389,7 @@ void RBBISetBuilder::addValToSet(RBBINode *usetNode, uint32_t val) {
// Set up an OR node, with the previous stuff as the left child
// and the new value as the right child.
RBBINode *orNode = new RBBINode(RBBINode::opOr);
- if (orNode == NULL) {
+ if (orNode == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -507,9 +507,9 @@ void RBBISetBuilder::printRangeGroups() {
RBBINode *usetNode = (RBBINode *)rlRange->fIncludesSets->elementAt(i);
UnicodeString setName = UNICODE_STRING("anon", 4);
RBBINode *setRef = usetNode->fParent;
- if (setRef != NULL) {
+ if (setRef != nullptr) {
RBBINode *varRef = setRef->fParent;
- if (varRef != NULL && varRef->fType == RBBINode::varRef) {
+ if (varRef != nullptr && varRef->fType == RBBINode::varRef) {
setName = varRef->fText;
}
}
@@ -551,16 +551,16 @@ void RBBISetBuilder::printSets() {
UnicodeString setName;
usetNode = (RBBINode *)fRB->fUSetNodes->elementAt(i);
- if (usetNode == NULL) {
+ if (usetNode == nullptr) {
break;
}
RBBIDebugPrintf("%3d ", i);
setName = UNICODE_STRING("anonymous", 9);
setRef = usetNode->fParent;
- if (setRef != NULL) {
+ if (setRef != nullptr) {
varRef = setRef->fParent;
- if (varRef != NULL && varRef->fType == RBBINode::varRef) {
+ if (varRef != nullptr && varRef->fType == RBBINode::varRef) {
setName = varRef->fText;
}
}
@@ -568,8 +568,8 @@ void RBBISetBuilder::printSets() {
RBBIDebugPrintf(" ");
RBBI_DEBUG_printUnicodeString(usetNode->fText);
RBBIDebugPrintf("\n");
- if (usetNode->fLeftChild != NULL) {
- RBBINode::printTree(usetNode->fLeftChild, TRUE);
+ if (usetNode->fLeftChild != nullptr) {
+ RBBINode::printTree(usetNode->fLeftChild, true);
}
}
RBBIDebugPrintf("\n");
diff --git a/contrib/libs/icu/common/rbbisetb.h b/contrib/libs/icu/common/rbbisetb.h
index 6409a4ea579..cd09d3317a3 100644
--- a/contrib/libs/icu/common/rbbisetb.h
+++ b/contrib/libs/icu/common/rbbisetb.h
@@ -134,8 +134,8 @@ private:
UBool fSawBOF;
- RBBISetBuilder(const RBBISetBuilder &other); // forbid copying of this class
- RBBISetBuilder &operator=(const RBBISetBuilder &other); // forbid copying of this class
+ RBBISetBuilder(const RBBISetBuilder &other) = delete; // forbid copying of this class
+ RBBISetBuilder &operator=(const RBBISetBuilder &other) = delete; // forbid copying of this class
};
diff --git a/contrib/libs/icu/common/rbbistbl.cpp b/contrib/libs/icu/common/rbbistbl.cpp
index 627ec1827cd..844351bd0df 100644
--- a/contrib/libs/icu/common/rbbistbl.cpp
+++ b/contrib/libs/icu/common/rbbistbl.cpp
@@ -41,12 +41,12 @@ U_CDECL_END
U_NAMESPACE_BEGIN
RBBISymbolTable::RBBISymbolTable(RBBIRuleScanner *rs, const UnicodeString &rules, UErrorCode &status)
- :fRules(rules), fRuleScanner(rs), ffffString(UChar(0xffff))
+ :fRules(rules), fRuleScanner(rs), ffffString(char16_t(0xffff))
{
- fHashTable = NULL;
- fCachedSetLookup = NULL;
+ fHashTable = nullptr;
+ fCachedSetLookup = nullptr;
- fHashTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, &status);
+ fHashTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, &status);
// uhash_open checks status
if (U_FAILURE(status)) {
return;
@@ -79,8 +79,8 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const
RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const
el = (RBBISymbolTableEntry *)uhash_get(fHashTable, &s);
- if (el == NULL) {
- return NULL;
+ if (el == nullptr) {
+ return nullptr;
}
varRefNode = el->val;
@@ -98,7 +98,7 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const
// The variable refers to something other than just a set.
// return the original source string for the expression
retString = &exprNode->fText;
- This->fCachedSetLookup = NULL;
+ This->fCachedSetLookup = nullptr;
}
return retString;
}
@@ -118,7 +118,7 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const
// and we just need to remember what set to return between these two calls.
const UnicodeFunctor *RBBISymbolTable::lookupMatcher(UChar32 ch) const
{
- UnicodeSet *retVal = NULL;
+ UnicodeSet *retVal = nullptr;
RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const
if (ch == 0xffff) {
retVal = fCachedSetLookup;
@@ -144,7 +144,7 @@ UnicodeString RBBISymbolTable::parseReference(const UnicodeString& text,
int32_t i = start;
UnicodeString result;
while (i < limit) {
- UChar c = text.charAt(i);
+ char16_t c = text.charAt(i);
if ((i==start && !u_isIDStart(c)) || !u_isIDPart(c)) {
break;
}
@@ -163,15 +163,15 @@ UnicodeString RBBISymbolTable::parseReference(const UnicodeString& text,
//
// RBBISymbolTable::lookupNode Given a key (a variable name), return the
// corresponding RBBI Node. If there is no entry
-// in the table for this name, return NULL.
+// in the table for this name, return nullptr.
//
RBBINode *RBBISymbolTable::lookupNode(const UnicodeString &key) const{
- RBBINode *retNode = NULL;
+ RBBINode *retNode = nullptr;
RBBISymbolTableEntry *el;
el = (RBBISymbolTableEntry *)uhash_get(fHashTable, &key);
- if (el != NULL) {
+ if (el != nullptr) {
retNode = el->val;
}
return retNode;
@@ -191,13 +191,13 @@ void RBBISymbolTable::addEntry (const UnicodeString &key, RBBINode *
return;
}
e = (RBBISymbolTableEntry *)uhash_get(fHashTable, &key);
- if (e != NULL) {
+ if (e != nullptr) {
err = U_BRK_VARIABLE_REDFINITION;
return;
}
e = new RBBISymbolTableEntry;
- if (e == NULL) {
+ if (e == nullptr) {
err = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -207,7 +207,7 @@ void RBBISymbolTable::addEntry (const UnicodeString &key, RBBINode *
}
-RBBISymbolTableEntry::RBBISymbolTableEntry() : UMemory(), key(), val(NULL) {}
+RBBISymbolTableEntry::RBBISymbolTableEntry() : UMemory(), key(), val(nullptr) {}
RBBISymbolTableEntry::~RBBISymbolTableEntry() {
// The "val" of a symbol table entry is a variable reference node.
@@ -215,7 +215,7 @@ RBBISymbolTableEntry::~RBBISymbolTableEntry() {
// Unlike other node types, children of variable reference nodes are not
// automatically recursively deleted. We do it manually here.
delete val->fLeftChild;
- val->fLeftChild = NULL;
+ val->fLeftChild = nullptr;
delete val;
@@ -233,10 +233,10 @@ void RBBISymbolTable::rbbiSymtablePrint() const {
"-------------------------------------------------------------------\n");
int32_t pos = UHASH_FIRST;
- const UHashElement *e = NULL;
+ const UHashElement *e = nullptr;
for (;;) {
e = uhash_nextElement(fHashTable, &pos);
- if (e == NULL ) {
+ if (e == nullptr ) {
break;
}
RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer;
@@ -249,13 +249,13 @@ void RBBISymbolTable::rbbiSymtablePrint() const {
pos = -1;
for (;;) {
e = uhash_nextElement(fHashTable, &pos);
- if (e == NULL ) {
+ if (e == nullptr ) {
break;
}
RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer;
RBBIDebugPrintf("%s\n", CStr(s->key)());
- RBBINode::printTree(s->val, TRUE);
- RBBINode::printTree(s->val->fLeftChild, FALSE);
+ RBBINode::printTree(s->val, true);
+ RBBINode::printTree(s->val->fLeftChild, false);
RBBIDebugPrintf("\n");
}
}
diff --git a/contrib/libs/icu/common/rbbitblb.cpp b/contrib/libs/icu/common/rbbitblb.cpp
index a495f17a878..0c2bcff4e51 100644
--- a/contrib/libs/icu/common/rbbitblb.cpp
+++ b/contrib/libs/icu/common/rbbitblb.cpp
@@ -73,7 +73,7 @@ void RBBITableBuilder::buildForwardTable() {
// If there were no rules, just return. This situation can easily arise
// for the reverse rules.
- if (fTree==NULL) {
+ if (fTree==nullptr) {
return;
}
@@ -85,7 +85,7 @@ void RBBITableBuilder::buildForwardTable() {
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ftree")) {
RBBIDebugPuts("\nParse tree after flattening variable references.");
- RBBINode::printTree(fTree, TRUE);
+ RBBINode::printTree(fTree, true);
}
#endif
@@ -99,7 +99,7 @@ void RBBITableBuilder::buildForwardTable() {
RBBINode *bofTop = new RBBINode(RBBINode::opCat);
RBBINode *bofLeaf = new RBBINode(RBBINode::leafChar);
// Delete and exit if memory allocation failed.
- if (bofTop == NULL || bofLeaf == NULL) {
+ if (bofTop == nullptr || bofLeaf == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
delete bofTop;
delete bofLeaf;
@@ -119,7 +119,7 @@ void RBBITableBuilder::buildForwardTable() {
//
RBBINode *cn = new RBBINode(RBBINode::opCat);
// Exit if memory allocation failed.
- if (cn == NULL) {
+ if (cn == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -127,7 +127,7 @@ void RBBITableBuilder::buildForwardTable() {
fTree->fParent = cn;
RBBINode *endMarkerNode = cn->fRightChild = new RBBINode(RBBINode::endMark);
// Delete and exit if memory allocation failed.
- if (cn->fRightChild == NULL) {
+ if (cn->fRightChild == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
delete cn;
return;
@@ -143,7 +143,7 @@ void RBBITableBuilder::buildForwardTable() {
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "stree")) {
RBBIDebugPuts("\nParse tree after flattening Unicode Set references.");
- RBBINode::printTree(fTree, TRUE);
+ RBBINode::printTree(fTree, true);
}
#endif
@@ -203,20 +203,20 @@ void RBBITableBuilder::buildForwardTable() {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::calcNullable(RBBINode *n) {
- if (n == NULL) {
+ if (n == nullptr) {
return;
}
if (n->fType == RBBINode::setRef ||
n->fType == RBBINode::endMark ) {
// These are non-empty leaf node types.
- n->fNullable = FALSE;
+ n->fNullable = false;
return;
}
if (n->fType == RBBINode::lookAhead || n->fType == RBBINode::tag) {
// Lookahead marker node. It's a leaf, so no recursion on children.
// It's nullable because it does not match any literal text from the input stream.
- n->fNullable = TRUE;
+ n->fNullable = true;
return;
}
@@ -234,10 +234,10 @@ void RBBITableBuilder::calcNullable(RBBINode *n) {
n->fNullable = n->fLeftChild->fNullable && n->fRightChild->fNullable;
}
else if (n->fType == RBBINode::opStar || n->fType == RBBINode::opQuestion) {
- n->fNullable = TRUE;
+ n->fNullable = true;
}
else {
- n->fNullable = FALSE;
+ n->fNullable = false;
}
}
@@ -250,7 +250,7 @@ void RBBITableBuilder::calcNullable(RBBINode *n) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::calcFirstPos(RBBINode *n) {
- if (n == NULL) {
+ if (n == nullptr) {
return;
}
if (n->fType == RBBINode::leafChar ||
@@ -296,7 +296,7 @@ void RBBITableBuilder::calcFirstPos(RBBINode *n) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::calcLastPos(RBBINode *n) {
- if (n == NULL) {
+ if (n == nullptr) {
return;
}
if (n->fType == RBBINode::leafChar ||
@@ -342,7 +342,7 @@ void RBBITableBuilder::calcLastPos(RBBINode *n) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::calcFollowPos(RBBINode *n) {
- if (n == NULL ||
+ if (n == nullptr ||
n->fType == RBBINode::leafChar ||
n->fType == RBBINode::endMark) {
return;
@@ -387,7 +387,7 @@ void RBBITableBuilder::calcFollowPos(RBBINode *n) {
//
//-----------------------------------------------------------------------------
void RBBITableBuilder::addRuleRootNodes(UVector *dest, RBBINode *node) {
- if (node == NULL || U_FAILURE(*fStatus)) {
+ if (node == nullptr || U_FAILURE(*fStatus)) {
return;
}
U_ASSERT(!dest->hasDeleter());
@@ -567,21 +567,21 @@ void RBBITableBuilder::buildStateTable() {
return;
}
RBBIStateDescriptor *failState;
- // Set it to NULL to avoid uninitialized warning
- RBBIStateDescriptor *initialState = NULL;
+ // Set it to nullptr to avoid uninitialized warning
+ RBBIStateDescriptor *initialState = nullptr;
//
// Add a dummy state 0 - the stop state. Not from Aho.
int lastInputSymbol = fRB->fSetBuilder->getNumCharCategories() - 1;
failState = new RBBIStateDescriptor(lastInputSymbol, fStatus);
- if (failState == NULL) {
+ if (failState == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
goto ExitBuildSTdeleteall;
}
failState->fPositions = new UVector(*fStatus);
- if (failState->fPositions == NULL) {
+ if (failState->fPositions == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
}
- if (failState->fPositions == NULL || U_FAILURE(*fStatus)) {
+ if (failState->fPositions == nullptr || U_FAILURE(*fStatus)) {
goto ExitBuildSTdeleteall;
}
fDStates->addElement(failState, *fStatus);
@@ -592,14 +592,14 @@ void RBBITableBuilder::buildStateTable() {
// initially, the only unmarked state in Dstates is firstpos(root),
// where toot is the root of the syntax tree for (r)#;
initialState = new RBBIStateDescriptor(lastInputSymbol, fStatus);
- if (initialState == NULL) {
+ if (initialState == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(*fStatus)) {
goto ExitBuildSTdeleteall;
}
initialState->fPositions = new UVector(*fStatus);
- if (initialState->fPositions == NULL) {
+ if (initialState->fPositions == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(*fStatus)) {
@@ -613,22 +613,22 @@ void RBBITableBuilder::buildStateTable() {
// while there is an unmarked state T in Dstates do begin
for (;;) {
- RBBIStateDescriptor *T = NULL;
+ RBBIStateDescriptor *T = nullptr;
int32_t tx;
for (tx=1; tx<fDStates->size(); tx++) {
RBBIStateDescriptor *temp;
temp = (RBBIStateDescriptor *)fDStates->elementAt(tx);
- if (temp->fMarked == FALSE) {
+ if (temp->fMarked == false) {
T = temp;
break;
}
}
- if (T == NULL) {
+ if (T == nullptr) {
break;
}
// mark T;
- T->fMarked = TRUE;
+ T->fMarked = true;
// for each input symbol a do begin
int32_t a;
@@ -636,15 +636,15 @@ void RBBITableBuilder::buildStateTable() {
// let U be the set of positions that are in followpos(p)
// for some position p in T
// such that the symbol at position p is a;
- UVector *U = NULL;
+ UVector *U = nullptr;
RBBINode *p;
int32_t px;
for (px=0; px<T->fPositions->size(); px++) {
p = (RBBINode *)T->fPositions->elementAt(px);
if ((p->fType == RBBINode::leafChar) && (p->fVal == a)) {
- if (U == NULL) {
+ if (U == nullptr) {
U = new UVector(*fStatus);
- if (U == NULL) {
+ if (U == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
goto ExitBuildSTdeleteall;
}
@@ -655,8 +655,8 @@ void RBBITableBuilder::buildStateTable() {
// if U is not empty and not in DStates then
int32_t ux = 0;
- UBool UinDstates = FALSE;
- if (U != NULL) {
+ UBool UinDstates = false;
+ if (U != nullptr) {
U_ASSERT(U->size() > 0);
int ix;
for (ix=0; ix<fDStates->size(); ix++) {
@@ -666,7 +666,7 @@ void RBBITableBuilder::buildStateTable() {
delete U;
U = temp2->fPositions;
ux = ix;
- UinDstates = TRUE;
+ UinDstates = true;
break;
}
}
@@ -675,7 +675,7 @@ void RBBITableBuilder::buildStateTable() {
if (!UinDstates)
{
RBBIStateDescriptor *newState = new RBBIStateDescriptor(lastInputSymbol, fStatus);
- if (newState == NULL) {
+ if (newState == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(*fStatus)) {
@@ -942,7 +942,7 @@ void RBBITableBuilder::mergeRuleStatusVals() {
for (n=0; n<fDStates->size(); n++) {
RBBIStateDescriptor *sd = (RBBIStateDescriptor *)fDStates->elementAt(n);
UVector *thisStatesTagValues = sd->fTagVals;
- if (thisStatesTagValues == NULL) {
+ if (thisStatesTagValues == nullptr) {
// No tag values are explicitly associated with this state.
// Set the default tag value.
sd->fTagsIdx = 0;
@@ -1012,10 +1012,10 @@ void RBBITableBuilder::mergeRuleStatusVals() {
void RBBITableBuilder::sortedAdd(UVector **vector, int32_t val) {
int32_t i;
- if (*vector == NULL) {
+ if (*vector == nullptr) {
*vector = new UVector(*fStatus);
}
- if (*vector == NULL || U_FAILURE(*fStatus)) {
+ if (*vector == nullptr || U_FAILURE(*fStatus)) {
return;
}
UVector *vec = *vector;
@@ -1053,7 +1053,7 @@ void RBBITableBuilder::setAdd(UVector *dest, UVector *source) {
void **destLim, **sourceLim;
if (destOriginalSize > destArray.getCapacity()) {
- if (destArray.resize(destOriginalSize) == NULL) {
+ if (destArray.resize(destOriginalSize) == nullptr) {
return;
}
}
@@ -1061,7 +1061,7 @@ void RBBITableBuilder::setAdd(UVector *dest, UVector *source) {
destLim = destPtr + destOriginalSize; // destArray.getArrayLimit()?
if (sourceSize > sourceArray.getCapacity()) {
- if (sourceArray.resize(sourceSize) == NULL) {
+ if (sourceArray.resize(sourceSize) == nullptr) {
return;
}
}
@@ -1125,13 +1125,13 @@ UBool RBBITableBuilder::setEquals(UVector *a, UVector *b) {
//-----------------------------------------------------------------------------
#ifdef RBBI_DEBUG
void RBBITableBuilder::printPosSets(RBBINode *n) {
- if (n==NULL) {
+ if (n==nullptr) {
return;
}
printf("\n");
RBBINode::printNodeHeader();
RBBINode::printNode(n);
- RBBIDebugPrintf(" Nullable: %s\n", n->fNullable?"TRUE":"FALSE");
+ RBBIDebugPrintf(" Nullable: %s\n", n->fNullable?"true":"false");
RBBIDebugPrintf(" firstpos: ");
printSet(n->fFirstPosSet);
@@ -1339,7 +1339,7 @@ int32_t RBBITableBuilder::getTableSize() const {
int32_t numCols;
int32_t rowSize;
- if (fTree == NULL) {
+ if (fTree == nullptr) {
return 0;
}
@@ -1373,7 +1373,7 @@ void RBBITableBuilder::exportTable(void *where) {
uint32_t state;
int col;
- if (U_FAILURE(*fStatus) || fTree == NULL) {
+ if (U_FAILURE(*fStatus) || fTree == nullptr) {
return;
}
@@ -1651,7 +1651,7 @@ void RBBITableBuilder::printSet(UVector *s) {
int32_t i;
for (i=0; i<s->size(); i++) {
const RBBINode *v = static_cast<const RBBINode *>(s->elementAt(i));
- RBBIDebugPrintf("%5d", v==NULL? -1 : v->fSerialNum);
+ RBBIDebugPrintf("%5d", v==nullptr? -1 : v->fSerialNum);
}
RBBIDebugPrintf("\n");
}
@@ -1773,19 +1773,19 @@ void RBBITableBuilder::printRuleStatusTable() {
//-----------------------------------------------------------------------------
RBBIStateDescriptor::RBBIStateDescriptor(int lastInputSymbol, UErrorCode *fStatus) {
- fMarked = FALSE;
+ fMarked = false;
fAccepting = 0;
fLookAhead = 0;
fTagsIdx = 0;
- fTagVals = NULL;
- fPositions = NULL;
- fDtran = NULL;
+ fTagVals = nullptr;
+ fPositions = nullptr;
+ fDtran = nullptr;
fDtran = new UVector32(lastInputSymbol+1, *fStatus);
if (U_FAILURE(*fStatus)) {
return;
}
- if (fDtran == NULL) {
+ if (fDtran == nullptr) {
*fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1800,9 +1800,9 @@ RBBIStateDescriptor::~RBBIStateDescriptor() {
delete fPositions;
delete fDtran;
delete fTagVals;
- fPositions = NULL;
- fDtran = NULL;
- fTagVals = NULL;
+ fPositions = nullptr;
+ fDtran = nullptr;
+ fTagVals = nullptr;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/rbbitblb.h b/contrib/libs/icu/common/rbbitblb.h
index 38607a819ac..01eee3da4ef 100644
--- a/contrib/libs/icu/common/rbbitblb.h
+++ b/contrib/libs/icu/common/rbbitblb.h
@@ -156,7 +156,7 @@ private:
public:
#ifdef RBBI_DEBUG
void printSet(UVector *s);
- void printPosSets(RBBINode *n /* = NULL*/);
+ void printPosSets(RBBINode *n /* = nullptr */);
void printStates();
void printRuleStatusTable();
void printReverseTable();
@@ -219,8 +219,8 @@ public:
~RBBIStateDescriptor();
private:
- RBBIStateDescriptor(const RBBIStateDescriptor &other); // forbid copying of this class
- RBBIStateDescriptor &operator=(const RBBIStateDescriptor &other); // forbid copying of this class
+ RBBIStateDescriptor(const RBBIStateDescriptor &other) = delete; // forbid copying of this class
+ RBBIStateDescriptor &operator=(const RBBIStateDescriptor &other) = delete; // forbid copying of this class
};
diff --git a/contrib/libs/icu/common/resbund.cpp b/contrib/libs/icu/common/resbund.cpp
index 47c0fe1c6ed..54383c981d1 100644
--- a/contrib/libs/icu/common/resbund.cpp
+++ b/contrib/libs/icu/common/resbund.cpp
@@ -177,13 +177,13 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ResourceBundle)
ResourceBundle::ResourceBundle(UErrorCode &err)
- :UObject(), fLocale(NULL)
+ :UObject(), fLocale(nullptr)
{
fResource = ures_open(0, Locale::getDefault().getName(), &err);
}
ResourceBundle::ResourceBundle(const ResourceBundle &other)
- :UObject(other), fLocale(NULL)
+ :UObject(other), fLocale(nullptr)
{
UErrorCode status = U_ZERO_ERROR;
@@ -191,23 +191,23 @@ ResourceBundle::ResourceBundle(const ResourceBundle &other)
fResource = ures_copyResb(0, other.fResource, &status);
} else {
/* Copying a bad resource bundle */
- fResource = NULL;
+ fResource = nullptr;
}
}
ResourceBundle::ResourceBundle(UResourceBundle *res, UErrorCode& err)
- :UObject(), fLocale(NULL)
+ :UObject(), fLocale(nullptr)
{
if (res) {
fResource = ures_copyResb(0, res, &err);
} else {
/* Copying a bad resource bundle */
- fResource = NULL;
+ fResource = nullptr;
}
}
ResourceBundle::ResourceBundle(const char* path, const Locale& locale, UErrorCode& err)
- :UObject(), fLocale(NULL)
+ :UObject(), fLocale(nullptr)
{
fResource = ures_open(path, locale.getName(), &err);
}
@@ -220,18 +220,18 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other)
}
if(fResource != 0) {
ures_close(fResource);
- fResource = NULL;
+ fResource = nullptr;
}
- if (fLocale != NULL) {
+ if (fLocale != nullptr) {
delete fLocale;
- fLocale = NULL;
+ fLocale = nullptr;
}
UErrorCode status = U_ZERO_ERROR;
if (other.fResource) {
fResource = ures_copyResb(0, other.fResource, &status);
} else {
/* Copying a bad resource bundle */
- fResource = NULL;
+ fResource = nullptr;
}
return *this;
}
@@ -241,7 +241,7 @@ ResourceBundle::~ResourceBundle()
if(fResource != 0) {
ures_close(fResource);
}
- if(fLocale != NULL) {
+ if(fLocale != nullptr) {
delete(fLocale);
}
}
@@ -253,8 +253,8 @@ ResourceBundle::clone() const {
UnicodeString ResourceBundle::getString(UErrorCode& status) const {
int32_t len = 0;
- const UChar *r = ures_getString(fResource, &len, &status);
- return UnicodeString(TRUE, r, len);
+ const char16_t *r = ures_getString(fResource, &len, &status);
+ return UnicodeString(true, r, len);
}
const uint8_t *ResourceBundle::getBinary(int32_t& len, UErrorCode& status) const {
@@ -273,27 +273,27 @@ int32_t ResourceBundle::getInt(UErrorCode& status) const {
return ures_getInt(fResource, &status);
}
-const char *ResourceBundle::getName(void) const {
+const char *ResourceBundle::getName() const {
return ures_getName(fResource);
}
-const char *ResourceBundle::getKey(void) const {
+const char *ResourceBundle::getKey() const {
return ures_getKey(fResource);
}
-UResType ResourceBundle::getType(void) const {
+UResType ResourceBundle::getType() const {
return ures_getType(fResource);
}
-int32_t ResourceBundle::getSize(void) const {
+int32_t ResourceBundle::getSize() const {
return ures_getSize(fResource);
}
-UBool ResourceBundle::hasNext(void) const {
+UBool ResourceBundle::hasNext() const {
return ures_hasNext(fResource);
}
-void ResourceBundle::resetIterator(void) {
+void ResourceBundle::resetIterator() {
ures_resetIterator(fResource);
}
@@ -311,14 +311,14 @@ ResourceBundle ResourceBundle::getNext(UErrorCode& status) {
UnicodeString ResourceBundle::getNextString(UErrorCode& status) {
int32_t len = 0;
- const UChar* r = ures_getNextString(fResource, &len, 0, &status);
- return UnicodeString(TRUE, r, len);
+ const char16_t* r = ures_getNextString(fResource, &len, 0, &status);
+ return UnicodeString(true, r, len);
}
UnicodeString ResourceBundle::getNextString(const char ** key, UErrorCode& status) {
int32_t len = 0;
- const UChar* r = ures_getNextString(fResource, &len, key, &status);
- return UnicodeString(TRUE, r, len);
+ const char16_t* r = ures_getNextString(fResource, &len, key, &status);
+ return UnicodeString(true, r, len);
}
ResourceBundle ResourceBundle::get(int32_t indexR, UErrorCode& status) const {
@@ -335,8 +335,8 @@ ResourceBundle ResourceBundle::get(int32_t indexR, UErrorCode& status) const {
UnicodeString ResourceBundle::getStringEx(int32_t indexS, UErrorCode& status) const {
int32_t len = 0;
- const UChar* r = ures_getStringByIndex(fResource, indexS, &len, &status);
- return UnicodeString(TRUE, r, len);
+ const char16_t* r = ures_getStringByIndex(fResource, indexS, &len, &status);
+ return UnicodeString(true, r, len);
}
ResourceBundle ResourceBundle::get(const char* key, UErrorCode& status) const {
@@ -363,8 +363,8 @@ ResourceBundle ResourceBundle::getWithFallback(const char* key, UErrorCode& stat
}
UnicodeString ResourceBundle::getStringEx(const char* key, UErrorCode& status) const {
int32_t len = 0;
- const UChar* r = ures_getStringByKey(fResource, key, &len, &status);
- return UnicodeString(TRUE, r, len);
+ const char16_t* r = ures_getStringByKey(fResource, key, &len, &status);
+ return UnicodeString(true, r, len);
}
const char*
@@ -377,17 +377,17 @@ void ResourceBundle::getVersion(UVersionInfo versionInfo) const {
ures_getVersion(fResource, versionInfo);
}
-const Locale &ResourceBundle::getLocale(void) const {
+const Locale &ResourceBundle::getLocale() const {
static UMutex gLocaleLock;
Mutex lock(&gLocaleLock);
- if (fLocale != NULL) {
+ if (fLocale != nullptr) {
return *fLocale;
}
UErrorCode status = U_ZERO_ERROR;
const char *localeName = ures_getLocaleInternal(fResource, &status);
ResourceBundle *ncThis = const_cast<ResourceBundle *>(this);
ncThis->fLocale = new Locale(localeName);
- return ncThis->fLocale != NULL ? *ncThis->fLocale : Locale::getDefault();
+ return ncThis->fLocale != nullptr ? *ncThis->fLocale : Locale::getDefault();
}
const Locale ResourceBundle::getLocale(ULocDataLocaleType type, UErrorCode &status) const
diff --git a/contrib/libs/icu/common/resbund_cnv.cpp b/contrib/libs/icu/common/resbund_cnv.cpp
index 45c0b399bff..7f83f06f0e0 100644
--- a/contrib/libs/icu/common/resbund_cnv.cpp
+++ b/contrib/libs/icu/common/resbund_cnv.cpp
@@ -27,14 +27,14 @@ U_NAMESPACE_BEGIN
ResourceBundle::ResourceBundle( const UnicodeString& path,
const Locale& locale,
UErrorCode& error)
- :UObject(), fLocale(NULL)
+ :UObject(), fLocale(nullptr)
{
constructForLocale(path, locale, error);
}
ResourceBundle::ResourceBundle( const UnicodeString& path,
UErrorCode& error)
- :UObject(), fLocale(NULL)
+ :UObject(), fLocale(nullptr)
{
constructForLocale(path, Locale::getDefault(), error);
}
@@ -45,11 +45,11 @@ ResourceBundle::constructForLocale(const UnicodeString& path,
UErrorCode& error)
{
if (path.isEmpty()) {
- fResource = ures_open(NULL, locale.getName(), &error);
+ fResource = ures_open(nullptr, locale.getName(), &error);
}
else {
UnicodeString nullTerminatedPath(path);
- nullTerminatedPath.append((UChar)0);
+ nullTerminatedPath.append((char16_t)0);
fResource = ures_openU(nullTerminatedPath.getBuffer(), locale.getName(), &error);
}
}
diff --git a/contrib/libs/icu/common/resource.h b/contrib/libs/icu/common/resource.h
index 48f5b9fa6ec..79ed897bd12 100644
--- a/contrib/libs/icu/common/resource.h
+++ b/contrib/libs/icu/common/resource.h
@@ -45,7 +45,7 @@ class ResourceValue;
class U_COMMON_API ResourceArray {
public:
/** Constructs an empty array object. */
- ResourceArray() : items16(NULL), items32(NULL), length(0) {}
+ ResourceArray() : items16(nullptr), items32(nullptr), length(0) {}
/** Only for implementation use. @internal */
ResourceArray(const uint16_t *i16, const uint32_t *i32, int32_t len,
@@ -80,7 +80,7 @@ private:
class U_COMMON_API ResourceTable {
public:
/** Constructs an empty table object. */
- ResourceTable() : keys16(NULL), keys32(NULL), items16(NULL), items32(NULL), length(0) {}
+ ResourceTable() : keys16(nullptr), keys32(nullptr), items16(nullptr), items32(nullptr), length(0) {}
/** Only for implementation use. @internal */
ResourceTable(const uint16_t *k16, const int32_t *k32,
@@ -136,22 +136,22 @@ public:
*
* @see ures_getString()
*/
- virtual const UChar *getString(int32_t &length, UErrorCode &errorCode) const = 0;
+ virtual const char16_t *getString(int32_t &length, UErrorCode &errorCode) const = 0;
inline UnicodeString getUnicodeString(UErrorCode &errorCode) const {
int32_t len = 0;
- const UChar *r = getString(len, errorCode);
+ const char16_t *r = getString(len, errorCode);
return UnicodeString(true, r, len);
}
/**
* Sets U_RESOURCE_TYPE_MISMATCH if this is not an alias resource.
*/
- virtual const UChar *getAliasString(int32_t &length, UErrorCode &errorCode) const = 0;
+ virtual const char16_t *getAliasString(int32_t &length, UErrorCode &errorCode) const = 0;
inline UnicodeString getAliasUnicodeString(UErrorCode &errorCode) const {
int32_t len = 0;
- const UChar *r = getAliasString(len, errorCode);
+ const char16_t *r = getAliasString(len, errorCode);
return UnicodeString(true, r, len);
}
@@ -286,8 +286,8 @@ public:
UErrorCode &errorCode) = 0;
private:
- ResourceSink(const ResourceSink &); // no copy constructor
- ResourceSink &operator=(const ResourceSink &); // no assignment operator
+ ResourceSink(const ResourceSink &) = delete; // no copy constructor
+ ResourceSink &operator=(const ResourceSink &) = delete; // no assignment operator
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/ruleiter.cpp b/contrib/libs/icu/common/ruleiter.cpp
index 41eea23c0dc..690635a9089 100644
--- a/contrib/libs/icu/common/ruleiter.cpp
+++ b/contrib/libs/icu/common/ruleiter.cpp
@@ -39,7 +39,7 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod
if (U_FAILURE(ec)) return DONE;
UChar32 c = DONE;
- isEscaped = FALSE;
+ isEscaped = false;
for (;;) {
c = _current();
@@ -75,7 +75,7 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod
int32_t offset = 0;
c = lookahead(tempEscape, MAX_U_NOTATION_LEN).unescapeAt(offset);
jumpahead(offset);
- isEscaped = TRUE;
+ isEscaped = true;
if (c < 0) {
ec = U_MALFORMED_UNICODE_ESCAPE;
return DONE;
@@ -130,7 +130,7 @@ void RuleCharacterIterator::jumpahead(int32_t count) {
UnicodeString& RuleCharacterIterator::toString(UnicodeString& result) const {
int32_t b = pos.getIndex();
text.extract(0, b, result);
- return result.append((UChar) 0x7C).append(text, b, 0x7FFFFFFF); // Insert '|' at index
+ return result.append((char16_t) 0x7C).append(text, b, 0x7FFFFFFF); // Insert '|' at index
}
*/
diff --git a/contrib/libs/icu/common/ruleiter.h b/contrib/libs/icu/common/ruleiter.h
index 09af1297842..41731407da2 100644
--- a/contrib/libs/icu/common/ruleiter.h
+++ b/contrib/libs/icu/common/ruleiter.h
@@ -66,28 +66,28 @@ public:
/**
* Value returned when there are no more characters to iterate.
*/
- enum { DONE = -1 };
+ static constexpr int32_t DONE = -1;
/**
* Bitmask option to enable parsing of variable names. If (options &
* PARSE_VARIABLES) != 0, then an embedded variable will be expanded to
* its value. Variables are parsed using the SymbolTable API.
*/
- enum { PARSE_VARIABLES = 1 };
+ static constexpr int32_t PARSE_VARIABLES = 1;
/**
* Bitmask option to enable parsing of escape sequences. If (options &
* PARSE_ESCAPES) != 0, then an embedded escape sequence will be expanded
* to its value. Escapes are parsed using Utility.unescapeAt().
*/
- enum { PARSE_ESCAPES = 2 };
+ static constexpr int32_t PARSE_ESCAPES = 2;
/**
* Bitmask option to enable skipping of whitespace. If (options &
* SKIP_WHITESPACE) != 0, then Pattern_White_Space characters will be silently
* skipped, as if they were not present in the input.
*/
- enum { SKIP_WHITESPACE = 4 };
+ static constexpr int32_t SKIP_WHITESPACE = 4;
/**
* Constructs an iterator over the given text, starting at the given
diff --git a/contrib/libs/icu/common/schriter.cpp b/contrib/libs/icu/common/schriter.cpp
index 83b3db4ab0a..d4bac8fd4f2 100644
--- a/contrib/libs/icu/common/schriter.cpp
+++ b/contrib/libs/icu/common/schriter.cpp
@@ -93,7 +93,7 @@ StringCharacterIterator::operator==(const ForwardCharacterIterator& that) const
return false;
}
- StringCharacterIterator& realThat = (StringCharacterIterator&)that;
+ const StringCharacterIterator& realThat = static_cast<const StringCharacterIterator&>(that);
return text == realThat.text
&& pos == realThat.pos
diff --git a/contrib/libs/icu/common/serv.cpp b/contrib/libs/icu/common/serv.cpp
index 0c54a4dce99..5248f7c192b 100644
--- a/contrib/libs/icu/common/serv.cpp
+++ b/contrib/libs/icu/common/serv.cpp
@@ -25,7 +25,7 @@ U_NAMESPACE_BEGIN
******************************************************************
*/
-const UChar ICUServiceKey::PREFIX_DELIMITER = 0x002F; /* '/' */
+const char16_t ICUServiceKey::PREFIX_DELIMITER = 0x002F; /* '/' */
ICUServiceKey::ICUServiceKey(const UnicodeString& id)
: _id(id) {
@@ -64,7 +64,7 @@ ICUServiceKey::currentDescriptor(UnicodeString& result) const
UBool
ICUServiceKey::fallback()
{
- return FALSE;
+ return false;
}
UBool
@@ -144,7 +144,7 @@ SimpleFactory::create(const ICUServiceKey& key, const ICUService* service, UErro
return service->cloneInstance(_instance);
}
}
- return NULL;
+ return nullptr;
}
void
@@ -243,13 +243,13 @@ public:
CacheEntry* unref() {
if ((--refcount) == 0) {
delete this;
- return NULL;
+ return nullptr;
}
return this;
}
/**
- * Return TRUE if there is at least one reference to this and the
+ * Return true if there is at least one reference to this and the
* resource has not been released.
*/
UBool isShared() const {
@@ -294,14 +294,14 @@ StringPair::create(const UnicodeString& displayName,
{
if (U_SUCCESS(status)) {
StringPair* sp = new StringPair(displayName, id);
- if (sp == NULL || sp->isBogus()) {
+ if (sp == nullptr || sp->isBogus()) {
status = U_MEMORY_ALLOCATION_ERROR;
delete sp;
- return NULL;
+ return nullptr;
}
return sp;
}
- return NULL;
+ return nullptr;
}
UBool
@@ -332,20 +332,20 @@ static UMutex lock;
ICUService::ICUService()
: name()
, timestamp(0)
-, factories(NULL)
-, serviceCache(NULL)
-, idCache(NULL)
-, dnCache(NULL)
+, factories(nullptr)
+, serviceCache(nullptr)
+, idCache(nullptr)
+, dnCache(nullptr)
{
}
ICUService::ICUService(const UnicodeString& newName)
: name(newName)
, timestamp(0)
-, factories(NULL)
-, serviceCache(NULL)
-, idCache(NULL)
-, dnCache(NULL)
+, factories(nullptr)
+, serviceCache(nullptr)
+, idCache(nullptr)
+, dnCache(nullptr)
{
}
@@ -355,20 +355,20 @@ ICUService::~ICUService()
Mutex mutex(&lock);
clearCaches();
delete factories;
- factories = NULL;
+ factories = nullptr;
}
}
UObject*
ICUService::get(const UnicodeString& descriptor, UErrorCode& status) const
{
- return get(descriptor, NULL, status);
+ return get(descriptor, nullptr, status);
}
UObject*
ICUService::get(const UnicodeString& descriptor, UnicodeString* actualReturn, UErrorCode& status) const
{
- UObject* result = NULL;
+ UObject* result = nullptr;
ICUServiceKey* key = createKey(&descriptor, status);
if (key) {
result = getKey(*key, actualReturn, status);
@@ -380,7 +380,7 @@ ICUService::get(const UnicodeString& descriptor, UnicodeString* actualReturn, UE
UObject*
ICUService::getKey(ICUServiceKey& key, UErrorCode& status) const
{
- return getKey(key, NULL, status);
+ return getKey(key, nullptr, status);
}
// this is a vector that subclasses of ICUService can override to further customize the result object
@@ -389,7 +389,7 @@ ICUService::getKey(ICUServiceKey& key, UErrorCode& status) const
UObject*
ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, UErrorCode& status) const
{
- return getKey(key, actualReturn, NULL, status);
+ return getKey(key, actualReturn, nullptr, status);
}
// make it possible to call reentrantly on systems that don't have reentrant mutexes.
@@ -417,7 +417,7 @@ UObject*
ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUServiceFactory* factory, UErrorCode& status) const
{
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (isDefault()) {
@@ -426,7 +426,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
ICUService* ncthis = (ICUService*)this; // cast away semantic const
- CacheEntry* result = NULL;
+ CacheEntry* result = nullptr;
{
// The factory list can't be modified until we're done,
// otherwise we might update the cache with an invalid result.
@@ -437,30 +437,30 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
// if factory is not null, we're calling from within the mutex,
// and since some unix machines don't have reentrant mutexes we
// need to make sure not to try to lock it again.
- XMutex mutex(&lock, factory != NULL);
+ XMutex mutex(&lock, factory != nullptr);
- if (serviceCache == NULL) {
+ if (serviceCache == nullptr) {
ncthis->serviceCache = new Hashtable(status);
- if (ncthis->serviceCache == NULL) {
+ if (ncthis->serviceCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(status)) {
delete serviceCache;
- return NULL;
+ return nullptr;
}
serviceCache->setValueDeleter(cacheDeleter);
}
UnicodeString currentDescriptor;
LocalPointer<UVector> cacheDescriptorList;
- UBool putInCache = FALSE;
+ UBool putInCache = false;
int32_t startIndex = 0;
int32_t limit = factories->size();
- UBool cacheResult = TRUE;
+ UBool cacheResult = true;
- if (factory != NULL) {
+ if (factory != nullptr) {
for (int32_t i = 0; i < limit; ++i) {
if (factory == (const ICUServiceFactory*)factories->elementAt(i)) {
startIndex = i + 1;
@@ -470,36 +470,36 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
if (startIndex == 0) {
// throw new InternalError("Factory " + factory + "not registered with service: " + this);
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- cacheResult = FALSE;
+ cacheResult = false;
}
do {
currentDescriptor.remove();
key.currentDescriptor(currentDescriptor);
result = (CacheEntry*)serviceCache->get(currentDescriptor);
- if (result != NULL) {
+ if (result != nullptr) {
break;
}
// first test of cache failed, so we'll have to update
// the cache if we eventually succeed-- that is, if we're
// going to update the cache at all.
- putInCache = TRUE;
+ putInCache = true;
int32_t index = startIndex;
while (index < limit) {
ICUServiceFactory* f = (ICUServiceFactory*)factories->elementAt(index++);
LocalPointer<UObject> service(f->create(key, this, status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (service.isValid()) {
result = new CacheEntry(currentDescriptor, service.getAlias());
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
service.orphan(); // result now owns service.
@@ -513,32 +513,32 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
// fallback to the one that succeeded, we want to hit the
// cache the first time next goaround.
if (cacheDescriptorList.isNull()) {
- cacheDescriptorList.adoptInsteadAndCheckErrorCode(new UVector(uprv_deleteUObject, NULL, 5, status), status);
+ cacheDescriptorList.adoptInsteadAndCheckErrorCode(new UVector(uprv_deleteUObject, nullptr, 5, status), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
}
LocalPointer<UnicodeString> idToCache(new UnicodeString(currentDescriptor), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (idToCache->isBogus()) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
cacheDescriptorList->adoptElement(idToCache.orphan(), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
} while (key.fallback());
outerEnd:
- if (result != NULL) {
+ if (result != nullptr) {
if (putInCache && cacheResult) {
serviceCache->put(result->actualDescriptor, result, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (cacheDescriptorList.isValid()) {
@@ -547,7 +547,7 @@ outerEnd:
serviceCache->put(*desc, result, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
result->ref();
@@ -556,9 +556,9 @@ outerEnd:
}
}
- if (actualReturn != NULL) {
+ if (actualReturn != nullptr) {
// strip null prefix
- if (result->actualDescriptor.indexOf((UChar)0x2f) == 0) { // U+002f=slash (/)
+ if (result->actualDescriptor.indexOf((char16_t)0x2f) == 0) { // U+002f=slash (/)
actualReturn->remove();
actualReturn->append(result->actualDescriptor,
1,
@@ -570,7 +570,7 @@ outerEnd:
if (actualReturn->isBogus()) {
status = U_MEMORY_ALLOCATION_ERROR;
delete result;
- return NULL;
+ return nullptr;
}
}
@@ -588,12 +588,12 @@ outerEnd:
UObject*
ICUService::handleDefault(const ICUServiceKey& /* key */, UnicodeString* /* actualIDReturn */, UErrorCode& /* status */) const
{
- return NULL;
+ return nullptr;
}
UVector&
ICUService::getVisibleIDs(UVector& result, UErrorCode& status) const {
- return getVisibleIDs(result, NULL, status);
+ return getVisibleIDs(result, nullptr, status);
}
UVector&
@@ -609,26 +609,23 @@ ICUService::getVisibleIDs(UVector& result, const UnicodeString* matchID, UErrorC
{
Mutex mutex(&lock);
const Hashtable* map = getVisibleIDMap(status);
- if (map != NULL) {
+ if (map != nullptr) {
ICUServiceKey* fallbackKey = createKey(matchID, status);
for (int32_t pos = UHASH_FIRST; U_SUCCESS(status); ) {
const UHashElement* e = map->nextElement(pos);
- if (e == NULL) {
+ if (e == nullptr) {
break;
}
const UnicodeString* id = (const UnicodeString*)e->key.pointer;
- if (fallbackKey != NULL) {
+ if (fallbackKey != nullptr) {
if (!fallbackKey->isFallbackOf(*id)) {
continue;
}
}
- LocalPointer<UnicodeString> idClone(new UnicodeString(*id), status);
- if (U_SUCCESS(status) && idClone->isBogus()) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
+ LocalPointer<UnicodeString> idClone(id->clone(), status);
result.adoptElement(idClone.orphan(), status);
}
delete fallbackKey;
@@ -643,23 +640,23 @@ ICUService::getVisibleIDs(UVector& result, const UnicodeString* matchID, UErrorC
const Hashtable*
ICUService::getVisibleIDMap(UErrorCode& status) const {
- if (U_FAILURE(status)) return NULL;
+ if (U_FAILURE(status)) return nullptr;
// must only be called when lock is already held
ICUService* ncthis = (ICUService*)this; // cast away semantic const
- if (idCache == NULL) {
+ if (idCache == nullptr) {
ncthis->idCache = new Hashtable(status);
- if (idCache == NULL) {
+ if (idCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- } else if (factories != NULL) {
+ } else if (factories != nullptr) {
for (int32_t pos = factories->size(); --pos >= 0;) {
ICUServiceFactory* f = (ICUServiceFactory*)factories->elementAt(pos);
f->updateVisibleIDs(*idCache, status);
}
if (U_FAILURE(status)) {
delete idCache;
- ncthis->idCache = NULL;
+ ncthis->idCache = nullptr;
}
}
}
@@ -681,9 +678,9 @@ ICUService::getDisplayName(const UnicodeString& id, UnicodeString& result, const
UErrorCode status = U_ZERO_ERROR;
Mutex mutex(&lock);
const Hashtable* map = getVisibleIDMap(status);
- if (map != NULL) {
+ if (map != nullptr) {
ICUServiceFactory* f = (ICUServiceFactory*)map->get(id);
- if (f != NULL) {
+ if (f != nullptr) {
f->getDisplayName(id, locale, result);
return result;
}
@@ -691,11 +688,11 @@ ICUService::getDisplayName(const UnicodeString& id, UnicodeString& result, const
// fallback
status = U_ZERO_ERROR;
ICUServiceKey* fallbackKey = createKey(&id, status);
- while (fallbackKey != NULL && fallbackKey->fallback()) {
+ while (fallbackKey != nullptr && fallbackKey->fallback()) {
UnicodeString us;
fallbackKey->currentID(us);
f = (ICUServiceFactory*)map->get(us);
- if (f != NULL) {
+ if (f != nullptr) {
f->getDisplayName(id, locale, result);
delete fallbackKey;
return result;
@@ -711,14 +708,14 @@ ICUService::getDisplayName(const UnicodeString& id, UnicodeString& result, const
UVector&
ICUService::getDisplayNames(UVector& result, UErrorCode& status) const
{
- return getDisplayNames(result, Locale::getDefault(), NULL, status);
+ return getDisplayNames(result, Locale::getDefault(), nullptr, status);
}
UVector&
ICUService::getDisplayNames(UVector& result, const Locale& locale, UErrorCode& status) const
{
- return getDisplayNames(result, locale, NULL, status);
+ return getDisplayNames(result, locale, nullptr, status);
}
UVector&
@@ -733,25 +730,25 @@ ICUService::getDisplayNames(UVector& result,
ICUService* ncthis = (ICUService*)this; // cast away semantic const
Mutex mutex(&lock);
- if (dnCache != NULL && dnCache->locale != locale) {
+ if (dnCache != nullptr && dnCache->locale != locale) {
delete dnCache;
- ncthis->dnCache = NULL;
+ ncthis->dnCache = nullptr;
}
- if (dnCache == NULL) {
+ if (dnCache == nullptr) {
const Hashtable* m = getVisibleIDMap(status);
if (U_FAILURE(status)) {
return result;
}
ncthis->dnCache = new DNCache(locale);
- if (dnCache == NULL) {
+ if (dnCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return result;
}
int32_t pos = UHASH_FIRST;
- const UHashElement* entry = NULL;
- while ((entry = m->nextElement(pos)) != NULL) {
+ const UHashElement* entry = nullptr;
+ while ((entry = m->nextElement(pos)) != nullptr) {
const UnicodeString* id = (const UnicodeString*)entry->key.pointer;
ICUServiceFactory* f = (ICUServiceFactory*)entry->value.pointer;
UnicodeString dname;
@@ -765,7 +762,7 @@ ICUService::getDisplayNames(UVector& result,
}
}
delete dnCache;
- ncthis->dnCache = NULL;
+ ncthis->dnCache = nullptr;
return result;
}
}
@@ -777,10 +774,10 @@ ICUService::getDisplayNames(UVector& result,
* at the next position, which in this case will be 0.
*/
int32_t pos = UHASH_FIRST;
- const UHashElement *entry = NULL;
- while ((entry = dnCache->cache.nextElement(pos)) != NULL) {
+ const UHashElement *entry = nullptr;
+ while ((entry = dnCache->cache.nextElement(pos)) != nullptr) {
const UnicodeString* id = (const UnicodeString*)entry->value.pointer;
- if (matchKey != NULL && !matchKey->isFallbackOf(*id)) {
+ if (matchKey != nullptr && !matchKey->isFallbackOf(*id)) {
continue;
}
const UnicodeString* dn = (const UnicodeString*)entry->key.pointer;
@@ -799,37 +796,37 @@ ICUService::getDisplayNames(UVector& result,
URegistryKey
ICUService::registerInstance(UObject* objToAdopt, const UnicodeString& id, UErrorCode& status)
{
- return registerInstance(objToAdopt, id, TRUE, status);
+ return registerInstance(objToAdopt, id, true, status);
}
URegistryKey
ICUService::registerInstance(UObject* objToAdopt, const UnicodeString& id, UBool visible, UErrorCode& status)
{
ICUServiceKey* key = createKey(&id, status);
- if (key != NULL) {
+ if (key != nullptr) {
UnicodeString canonicalID;
key->canonicalID(canonicalID);
delete key;
ICUServiceFactory* f = createSimpleFactory(objToAdopt, canonicalID, visible, status);
- if (f != NULL) {
+ if (f != nullptr) {
return registerFactory(f, status);
}
}
delete objToAdopt;
- return NULL;
+ return nullptr;
}
ICUServiceFactory*
ICUService::createSimpleFactory(UObject* objToAdopt, const UnicodeString& id, UBool visible, UErrorCode& status)
{
if (U_SUCCESS(status)) {
- if ((objToAdopt != NULL) && (!id.isBogus())) {
+ if ((objToAdopt != nullptr) && (!id.isBogus())) {
return new SimpleFactory(objToAdopt, id, visible);
}
status = U_ILLEGAL_ARGUMENT_ERROR;
}
- return NULL;
+ return nullptr;
}
URegistryKey
@@ -867,13 +864,13 @@ UBool
ICUService::unregister(URegistryKey rkey, UErrorCode& status)
{
ICUServiceFactory *factory = (ICUServiceFactory*)rkey;
- UBool result = FALSE;
- if (factory != NULL && factories != NULL) {
+ UBool result = false;
+ if (factory != nullptr && factories != nullptr) {
Mutex mutex(&lock);
if (factories->removeElement(factory)) {
clearCaches();
- result = TRUE;
+ result = true;
} else {
status = U_ILLEGAL_ARGUMENT_ERROR;
delete factory;
@@ -899,7 +896,7 @@ ICUService::reset()
void
ICUService::reInitializeFactories()
{
- if (factories != NULL) {
+ if (factories != nullptr) {
factories->removeAllElements();
}
}
@@ -913,7 +910,7 @@ ICUService::isDefault() const
ICUServiceKey*
ICUService::createKey(const UnicodeString* id, UErrorCode& status) const
{
- return (U_FAILURE(status) || id == NULL) ? NULL : new ICUServiceKey(*id);
+ return (U_FAILURE(status) || id == nullptr) ? nullptr : new ICUServiceKey(*id);
}
void
@@ -922,29 +919,29 @@ ICUService::clearCaches()
// callers synchronize before use
++timestamp;
delete dnCache;
- dnCache = NULL;
+ dnCache = nullptr;
delete idCache;
- idCache = NULL;
- delete serviceCache; serviceCache = NULL;
+ idCache = nullptr;
+ delete serviceCache; serviceCache = nullptr;
}
void
ICUService::clearServiceCache()
{
// callers synchronize before use
- delete serviceCache; serviceCache = NULL;
+ delete serviceCache; serviceCache = nullptr;
}
UBool
ICUService::acceptsListener(const EventListener& l) const
{
- return dynamic_cast<const ServiceListener*>(&l) != NULL;
+ return dynamic_cast<const ServiceListener*>(&l) != nullptr;
}
void
ICUService::notifyListener(EventListener& l) const
{
- ((ServiceListener&)l).serviceChanged(*this);
+ (static_cast<ServiceListener&>(l)).serviceChanged(*this);
}
UnicodeString&
@@ -956,7 +953,7 @@ ICUService::getName(UnicodeString& result) const
int32_t
ICUService::countFactories() const
{
- return factories == NULL ? 0 : factories->size();
+ return factories == nullptr ? 0 : factories->size();
}
int32_t
diff --git a/contrib/libs/icu/common/serv.h b/contrib/libs/icu/common/serv.h
index 3bd3d9a9b9e..9aea548fc3a 100644
--- a/contrib/libs/icu/common/serv.h
+++ b/contrib/libs/icu/common/serv.h
@@ -74,7 +74,7 @@ class U_COMMON_API ICUServiceKey : public UObject {
const UnicodeString _id;
protected:
- static const UChar PREFIX_DELIMITER;
+ static const char16_t PREFIX_DELIMITER;
public:
@@ -217,7 +217,7 @@ class U_COMMON_API ICUServiceFactory : public UObject {
/**
* <p>Create a service object from the key, if this factory
- * supports the key. Otherwise, return NULL.</p>
+ * supports the key. Otherwise, return nullptr.</p>
*
* <p>If the factory supports the key, then it can call
* the service's getKey(ICUServiceKey, String[], ICUServiceFactory) method
@@ -230,7 +230,7 @@ class U_COMMON_API ICUServiceFactory : public UObject {
* @param key the service key.
* @param service the service with which this factory is registered.
* @param status the error code status.
- * @return the service object, or NULL if the factory does not support the key.
+ * @return the service object, or nullptr if the factory does not support the key.
*/
virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const = 0;
@@ -292,7 +292,7 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
/**
* <p>Construct a SimpleFactory that maps a single ID to a single
* service instance. If visible is true, the ID will be visible.
- * The instance must not be NULL. The SimpleFactory will adopt
+ * The instance must not be nullptr. The SimpleFactory will adopt
* the instance, which must not be changed subsequent to this call.</p>
*
* @param instanceToAdopt the service instance to adopt.
@@ -313,7 +313,7 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
* @param key the service key.
* @param service the service with which this factory is registered.
* @param status the error code status.
- * @return the service object, or NULL if the factory does not support the key.
+ * @return the service object, or nullptr if the factory does not support the key.
*/
virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const override;
@@ -420,7 +420,7 @@ public:
* @param displayName the displayName.
* @param id the ID.
* @param status the error code status.
- * @return a StringPair if the creation was successful, otherwise NULL.
+ * @return a StringPair if the creation was successful, otherwise nullptr.
*/
static StringPair* create(const UnicodeString& displayName,
const UnicodeString& id,
@@ -593,7 +593,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
*
* @param descriptor the descriptor.
* @param status the error code status.
- * @return the service instance, or NULL.
+ * @return the service instance, or nullptr.
*/
UObject* get(const UnicodeString& descriptor, UErrorCode& status) const;
@@ -602,9 +602,9 @@ class U_COMMON_API ICUService : public ICUNotifier {
* createKey to create a key from the provided descriptor.</p>
*
* @param descriptor the descriptor.
- * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or NULL.
+ * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or nullptr.
* @param status the error code status.
- * @return the service instance, or NULL.
+ * @return the service instance, or nullptr.
*/
UObject* get(const UnicodeString& descriptor, UnicodeString* actualReturn, UErrorCode& status) const;
@@ -613,15 +613,15 @@ class U_COMMON_API ICUService : public ICUNotifier {
*
* @param key the key.
* @param status the error code status.
- * @return the service instance, or NULL.
+ * @return the service instance, or nullptr.
*/
UObject* getKey(ICUServiceKey& key, UErrorCode& status) const;
/**
* <p>Given a key, return a service object, and, if actualReturn
- * is not NULL, the descriptor with which it was found in the
+ * is not nullptr, the descriptor with which it was found in the
* first element of actualReturn. If no service object matches
- * this key, returns NULL and leaves actualReturn unchanged.</p>
+ * this key, returns nullptr and leaves actualReturn unchanged.</p>
*
* <p>This queries the cache using the key's descriptor, and if no
* object in the cache matches, tries the key on each
@@ -635,9 +635,9 @@ class U_COMMON_API ICUService : public ICUNotifier {
* result before returning it.
*
* @param key the key.
- * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or NULL.
+ * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or nullptr.
* @param status the error code status.
- * @return the service instance, or NULL.
+ * @return the service instance, or nullptr.
*/
virtual UObject* getKey(ICUServiceKey& key, UnicodeString* actualReturn, UErrorCode& status) const;
@@ -648,10 +648,10 @@ class U_COMMON_API ICUService : public ICUNotifier {
* should not call it directly, but call through one of the other get functions.</p>
*
* @param key the key.
- * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or NULL.
+ * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or nullptr.
* @param factory the factory making the recursive call.
* @param status the error code status.
- * @return the service instance, or NULL.
+ * @return the service instance, or nullptr.
*/
UObject* getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUServiceFactory* factory, UErrorCode& status) const;
@@ -677,11 +677,11 @@ class U_COMMON_API ICUService : public ICUNotifier {
* new elements, if any, are added.</p>
*
* <p>matchID is passed to createKey to create a key. If the key
- * is not NULL, its isFallbackOf method is used to filter out IDs
+ * is not nullptr, its isFallbackOf method is used to filter out IDs
* that don't match the key or have it as a fallback.</p>
*
* @param result a vector to hold the returned IDs.
- * @param matchID an ID used to filter the result, or NULL if all IDs are desired.
+ * @param matchID an ID used to filter the result, or nullptr if all IDs are desired.
* @param status the error code status.
* @return the result vector.
*/
@@ -711,7 +711,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
/**
* <p>Convenience override of getDisplayNames(const Locale&, const UnicodeString*) that
- * uses the current default Locale as the locale and NULL for
+ * uses the current default Locale as the locale and nullptr for
* the matchID.</p>
*
* @param result a vector to hold the returned displayName/id StringPairs.
@@ -722,7 +722,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
/**
* <p>Convenience override of getDisplayNames(const Locale&, const UnicodeString*) that
- * uses NULL for the matchID.</p>
+ * uses nullptr for the matchID.</p>
*
* @param result a vector to hold the returned displayName/id StringPairs.
* @param locale the locale in which to localize the ID.
@@ -746,12 +746,12 @@ class U_COMMON_API ICUService : public ICUNotifier {
* discarded before new elements, if any, are added.</p>
*
* <p>matchID is passed to createKey to create a key. If the key
- * is not NULL, its isFallbackOf method is used to filter out IDs
+ * is not nullptr, its isFallbackOf method is used to filter out IDs
* that don't match the key or have it as a fallback.</p>
*
* @param result a vector to hold the returned displayName/id StringPairs.
* @param locale the locale in which to localize the ID.
- * @param matchID an ID used to filter the result, or NULL if all IDs are desired.
+ * @param matchID an ID used to filter the result, or nullptr if all IDs are desired.
* @param status the error code status.
* @return the result vector. */
UVector& getDisplayNames(UVector& result,
@@ -830,7 +830,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
*
* <p>This issues a serviceChanged notification to registered listeners.</p>
*/
- virtual void reset(void);
+ virtual void reset();
/**
* <p>Return true if the service is in its default state.</p>
@@ -838,10 +838,10 @@ class U_COMMON_API ICUService : public ICUNotifier {
* <p>The default implementation returns true if there are no
* factories registered.</p>
*/
- virtual UBool isDefault(void) const;
+ virtual UBool isDefault() const;
/**
- * <p>Create a key from an ID. If ID is NULL, returns NULL.</p>
+ * <p>Create a key from an ID. If ID is nullptr, returns nullptr.</p>
*
* <p>The default implementation creates an ICUServiceKey instance.
* Subclasses can override to define more useful keys appropriate
@@ -849,7 +849,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
*
* @param a pointer to the ID for which to create a default ICUServiceKey.
* @param status the error code status.
- * @return the ICUServiceKey corresponding to ID, or NULL.
+ * @return the ICUServiceKey corresponding to ID, or nullptr.
*/
virtual ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const;
@@ -859,7 +859,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
* This is public so factories can call it, but should really be protected.</p>
*
* @param instance the service instance to clone.
- * @return a clone of the passed-in instance, or NULL if cloning was unsuccessful.
+ * @return a clone of the passed-in instance, or nullptr if cloning was unsuccessful.
*/
virtual UObject* cloneInstance(UObject* instance) const = 0;
@@ -895,18 +895,18 @@ class U_COMMON_API ICUService : public ICUNotifier {
* directly, since it must only be called while holding write
* access to the factory list.</p>
*/
- virtual void reInitializeFactories(void);
+ virtual void reInitializeFactories();
/**
* <p>Default handler for this service if no factory in the factory list
* handled the key passed to getKey.</p>
*
- * <p>The default implementation returns NULL.</p>
+ * <p>The default implementation returns nullptr.</p>
*
* @param key the key.
- * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or NULL.
+ * @param actualReturn a pointer to a UnicodeString to hold the matched descriptor, or nullptr.
* @param status the error code status.
- * @return the service instance, or NULL.
+ * @return the service instance, or nullptr.
*/
virtual UObject* handleDefault(const ICUServiceKey& key, UnicodeString* actualReturn, UErrorCode& status) const;
@@ -918,7 +918,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
* should generally not call this method directly, as it must only
* be called while synchronized on the factory lock.</p>
*/
- virtual void clearCaches(void);
+ virtual void clearCaches();
/**
* <p>Return true if the listener is accepted.</p>
@@ -955,7 +955,7 @@ class U_COMMON_API ICUService : public ICUNotifier {
* the resolution of IDs also changes, requiring the cache to be
* flushed, but not the visible IDs themselves.</p>
*/
- void clearServiceCache(void);
+ void clearServiceCache();
/**
* <p>Return a map from visible IDs to factories.
@@ -972,14 +972,14 @@ class U_COMMON_API ICUService : public ICUNotifier {
*
* @return the timestamp.
*/
- int32_t getTimestamp(void) const;
+ int32_t getTimestamp() const;
/**
* <p>Return the number of registered factories.</p>
*
* @return the number of factories registered at the time of the call.
*/
- int32_t countFactories(void) const;
+ int32_t countFactories() const;
private:
diff --git a/contrib/libs/icu/common/servlk.cpp b/contrib/libs/icu/common/servlk.cpp
index 538982ca362..ba275ea3011 100644
--- a/contrib/libs/icu/common/servlk.cpp
+++ b/contrib/libs/icu/common/servlk.cpp
@@ -21,9 +21,9 @@
#include "charstr.h"
#include "uassert.h"
-#define UNDERSCORE_CHAR ((UChar)0x005f)
-#define AT_SIGN_CHAR ((UChar)64)
-#define PERIOD_CHAR ((UChar)46)
+#define UNDERSCORE_CHAR ((char16_t)0x005f)
+#define AT_SIGN_CHAR ((char16_t)64)
+#define PERIOD_CHAR ((char16_t)46)
U_NAMESPACE_BEGIN
@@ -41,8 +41,8 @@ LocaleKey::createWithCanonicalFallback(const UnicodeString* primaryID,
int32_t kind,
UErrorCode& status)
{
- if (primaryID == NULL || U_FAILURE(status)) {
- return NULL;
+ if (primaryID == nullptr || U_FAILURE(status)) {
+ return nullptr;
}
UnicodeString canonicalPrimaryID;
LocaleUtility::canonicalLocaleString(primaryID, canonicalPrimaryID);
@@ -61,7 +61,7 @@ LocaleKey::LocaleKey(const UnicodeString& primaryID,
{
_fallbackID.setToBogus();
if (_primaryID.length() != 0) {
- if (canonicalFallbackID != NULL && _primaryID != *canonicalFallbackID) {
+ if (canonicalFallbackID != nullptr && _primaryID != *canonicalFallbackID) {
_fallbackID = *canonicalFallbackID;
}
}
@@ -74,7 +74,7 @@ LocaleKey::~LocaleKey() {}
UnicodeString&
LocaleKey::prefix(UnicodeString& result) const {
if (_kind != KIND_ANY) {
- UChar buffer[64];
+ char16_t buffer[64];
uprv_itou(buffer, 64, _kind, 10, 0);
UnicodeString temp(buffer);
result.append(temp);
@@ -126,24 +126,24 @@ LocaleKey::fallback() {
int x = _currentID.lastIndexOf(UNDERSCORE_CHAR);
if (x != -1) {
_currentID.remove(x); // truncate current or fallback, whichever we're pointing to
- return TRUE;
+ return true;
}
if (!_fallbackID.isBogus()) {
_currentID = _fallbackID;
_fallbackID.setToBogus();
- return TRUE;
+ return true;
}
if (_currentID.length() > 0) {
_currentID.remove(0); // completely truncate
- return TRUE;
+ return true;
}
_currentID.setToBogus();
}
- return FALSE;
+ return false;
}
UBool
diff --git a/contrib/libs/icu/common/servlkf.cpp b/contrib/libs/icu/common/servlkf.cpp
index 84f2347cdde..f5bb0418c4e 100644
--- a/contrib/libs/icu/common/servlkf.cpp
+++ b/contrib/libs/icu/common/servlkf.cpp
@@ -22,9 +22,9 @@
#include "ucln_cmn.h"
#include "uassert.h"
-#define UNDERSCORE_CHAR ((UChar)0x005f)
-#define AT_SIGN_CHAR ((UChar)64)
-#define PERIOD_CHAR ((UChar)46)
+#define UNDERSCORE_CHAR ((char16_t)0x005f)
+#define AT_SIGN_CHAR ((char16_t)64)
+#define PERIOD_CHAR ((char16_t)46)
U_NAMESPACE_BEGIN
@@ -47,14 +47,14 @@ LocaleKeyFactory::~LocaleKeyFactory() {
UObject*
LocaleKeyFactory::create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const {
if (handlesKey(key, status)) {
- const LocaleKey& lkey = (const LocaleKey&)key;
+ const LocaleKey& lkey = static_cast<const LocaleKey&>(key);
int32_t kind = lkey.kind();
Locale loc;
lkey.currentLocale(loc);
return handleCreate(loc, kind, service, status);
}
- return NULL;
+ return nullptr;
}
UBool
@@ -63,9 +63,9 @@ LocaleKeyFactory::handlesKey(const ICUServiceKey& key, UErrorCode& status) const
if (supported) {
UnicodeString id;
key.currentID(id);
- return supported->get(id) != NULL;
+ return supported->get(id) != nullptr;
}
- return FALSE;
+ return false;
}
void
@@ -73,9 +73,9 @@ LocaleKeyFactory::updateVisibleIDs(Hashtable& result, UErrorCode& status) const
const Hashtable* supported = getSupportedIDs(status);
if (supported) {
UBool visible = (_coverage & 0x1) == 0;
- const UHashElement* elem = NULL;
+ const UHashElement* elem = nullptr;
int32_t pos = UHASH_FIRST;
- while ((elem = supported->nextElement(pos)) != NULL) {
+ while ((elem = supported->nextElement(pos)) != nullptr) {
const UnicodeString& id = *((const UnicodeString*)elem->key.pointer);
if (!visible) {
result.remove(id);
@@ -109,7 +109,7 @@ LocaleKeyFactory::handleCreate(const Locale& /* loc */,
int32_t /* kind */,
const ICUService* /* service */,
UErrorCode& /* status */) const {
- return NULL;
+ return nullptr;
}
//UBool
@@ -120,7 +120,7 @@ LocaleKeyFactory::handleCreate(const Locale& /* loc */,
const Hashtable*
LocaleKeyFactory::getSupportedIDs(UErrorCode& /* status */) const {
- return NULL;
+ return nullptr;
}
#ifdef SERVICE_DEBUG
diff --git a/contrib/libs/icu/common/servloc.h b/contrib/libs/icu/common/servloc.h
index 29c50a27d1a..49d12409058 100644
--- a/contrib/libs/icu/common/servloc.h
+++ b/contrib/libs/icu/common/servloc.h
@@ -258,7 +258,7 @@ public:
protected:
/**
* Utility method used by create(ICUServiceKey, ICUService). Subclasses can implement
- * this instead of create. The default returns NULL.
+ * this instead of create. The default returns nullptr.
*/
virtual UObject* handleCreate(const Locale& loc, int32_t kind, const ICUService* service, UErrorCode& status) const;
@@ -518,7 +518,7 @@ class U_COMMON_API ICULocaleService : public ICUService
* Convenience method for callers using locales. This returns the standard
* service ID enumeration.
*/
- virtual StringEnumeration* getAvailableLocales(void) const;
+ virtual StringEnumeration* getAvailableLocales() const;
protected:
diff --git a/contrib/libs/icu/common/servls.cpp b/contrib/libs/icu/common/servls.cpp
index 7108afd4a52..978a956df7c 100644
--- a/contrib/libs/icu/common/servls.cpp
+++ b/contrib/libs/icu/common/servls.cpp
@@ -20,9 +20,9 @@
#include "charstr.h"
#include "uassert.h"
-#define UNDERSCORE_CHAR ((UChar)0x005f)
-#define AT_SIGN_CHAR ((UChar)64)
-#define PERIOD_CHAR ((UChar)46)
+#define UNDERSCORE_CHAR ((char16_t)0x005f)
+#define AT_SIGN_CHAR ((char16_t)64)
+#define PERIOD_CHAR ((char16_t)46)
U_NAMESPACE_BEGIN
@@ -44,13 +44,13 @@ ICULocaleService::~ICULocaleService()
UObject*
ICULocaleService::get(const Locale& locale, UErrorCode& status) const
{
- return get(locale, LocaleKey::KIND_ANY, NULL, status);
+ return get(locale, LocaleKey::KIND_ANY, nullptr, status);
}
UObject*
ICULocaleService::get(const Locale& locale, int32_t kind, UErrorCode& status) const
{
- return get(locale, kind, NULL, status);
+ return get(locale, kind, nullptr, status);
}
UObject*
@@ -62,7 +62,7 @@ ICULocaleService::get(const Locale& locale, Locale* actualReturn, UErrorCode& st
UObject*
ICULocaleService::get(const Locale& locale, int32_t kind, Locale* actualReturn, UErrorCode& status) const
{
- UObject* result = NULL;
+ UObject* result = nullptr;
if (U_FAILURE(status)) {
return result;
}
@@ -73,13 +73,13 @@ ICULocaleService::get(const Locale& locale, int32_t kind, Locale* actualReturn,
} else {
ICUServiceKey* key = createKey(&locName, kind, status);
if (key) {
- if (actualReturn == NULL) {
+ if (actualReturn == nullptr) {
result = getKey(*key, status);
} else {
UnicodeString temp;
result = getKey(*key, &temp, status);
- if (result != NULL) {
+ if (result != nullptr) {
key->parseSuffix(temp);
LocaleUtility::initLocaleFromName(temp, *actualReturn);
}
@@ -117,11 +117,11 @@ URegistryKey
ICULocaleService::registerInstance(UObject* objToAdopt, const Locale& locale, int32_t kind, int32_t coverage, UErrorCode& status)
{
ICUServiceFactory * factory = new SimpleLocaleKeyFactory(objToAdopt, locale, kind, coverage);
- if (factory != NULL) {
+ if (factory != nullptr) {
return registerFactory(factory, status);
}
delete objToAdopt;
- return NULL;
+ return nullptr;
}
#if 0
@@ -143,11 +143,11 @@ URegistryKey
ICULocaleService::registerInstance(UObject* objToAdopt, const UnicodeString& locale, int32_t kind, int32_t coverage, UErrorCode& status)
{
ICUServiceFactory * factory = new SimpleLocaleKeyFactory(objToAdopt, locale, kind, coverage);
- if (factory != NULL) {
+ if (factory != nullptr) {
return registerFactory(factory, status);
}
delete objToAdopt;
- return NULL;
+ return nullptr;
}
#endif
@@ -162,7 +162,7 @@ private:
ServiceEnumeration(const ICULocaleService* service, UErrorCode &status)
: _service(service)
, _timestamp(service->getTimestamp())
- , _ids(uprv_deleteUObject, NULL, status)
+ , _ids(uprv_deleteUObject, nullptr, status)
, _pos(0)
{
_service->getVisibleIDs(_ids, status);
@@ -171,7 +171,7 @@ private:
ServiceEnumeration(const ServiceEnumeration &other, UErrorCode &status)
: _service(other._service)
, _timestamp(other._timestamp)
- , _ids(uprv_deleteUObject, NULL, status)
+ , _ids(uprv_deleteUObject, nullptr, status)
, _pos(0)
{
if(U_SUCCESS(status)) {
@@ -179,7 +179,8 @@ private:
length = other._ids.size();
for(i = 0; i < length; ++i) {
- _ids.addElementX(((UnicodeString *)other._ids.elementAt(i))->clone(), status);
+ LocalPointer<UnicodeString> clonedId(((UnicodeString *)other._ids.elementAt(i))->clone(), status);
+ _ids.adoptElement(clonedId.orphan(), status);
}
if(U_SUCCESS(status)) {
@@ -196,7 +197,7 @@ public:
return result;
}
delete result;
- return NULL;
+ return nullptr;
}
virtual ~ServiceEnumeration();
@@ -206,7 +207,7 @@ public:
ServiceEnumeration *cl = new ServiceEnumeration(*this, status);
if(U_FAILURE(status)) {
delete cl;
- cl = NULL;
+ cl = nullptr;
}
return cl;
}
@@ -214,11 +215,11 @@ public:
UBool upToDate(UErrorCode& status) const {
if (U_SUCCESS(status)) {
if (_timestamp == _service->getTimestamp()) {
- return TRUE;
+ return true;
}
status = U_ENUM_OUT_OF_SYNC_ERROR;
}
- return FALSE;
+ return false;
}
virtual int32_t count(UErrorCode& status) const override {
@@ -229,7 +230,7 @@ public:
if (upToDate(status) && (_pos < _ids.size())) {
return (const UnicodeString*)_ids[_pos++];
}
- return NULL;
+ return nullptr;
}
virtual void reset(UErrorCode& status) override {
@@ -244,8 +245,8 @@ public:
}
public:
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
ServiceEnumeration::~ServiceEnumeration() {}
@@ -253,7 +254,7 @@ ServiceEnumeration::~ServiceEnumeration() {}
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ServiceEnumeration)
StringEnumeration*
-ICULocaleService::getAvailableLocales(void) const
+ICULocaleService::getAvailableLocales() const
{
return ServiceEnumeration::create(this);
}
diff --git a/contrib/libs/icu/common/servnotf.cpp b/contrib/libs/icu/common/servnotf.cpp
index 342e0d9f24d..b2ad663a488 100644
--- a/contrib/libs/icu/common/servnotf.cpp
+++ b/contrib/libs/icu/common/servnotf.cpp
@@ -23,16 +23,16 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EventListener)
static UMutex notifyLock;
-ICUNotifier::ICUNotifier(void)
-: listeners(NULL)
+ICUNotifier::ICUNotifier()
+: listeners(nullptr)
{
}
-ICUNotifier::~ICUNotifier(void) {
+ICUNotifier::~ICUNotifier() {
{
Mutex lmx(&notifyLock);
delete listeners;
- listeners = NULL;
+ listeners = nullptr;
}
}
@@ -41,15 +41,19 @@ void
ICUNotifier::addListener(const EventListener* l, UErrorCode& status)
{
if (U_SUCCESS(status)) {
- if (l == NULL) {
+ if (l == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
if (acceptsListener(*l)) {
Mutex lmx(&notifyLock);
- if (listeners == NULL) {
- listeners = new UVector(5, status);
+ if (listeners == nullptr) {
+ LocalPointer<UVector> lpListeners(new UVector(5, status), status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+ listeners = lpListeners.orphan();
} else {
for (int i = 0, e = listeners->size(); i < e; ++i) {
const EventListener* el = (const EventListener*)(listeners->elementAt(i));
@@ -59,7 +63,7 @@ ICUNotifier::addListener(const EventListener* l, UErrorCode& status)
}
}
- listeners->addElementX((void*)l, status); // cast away const
+ listeners->addElement((void*)l, status); // cast away const
}
#ifdef NOTIFIER_DEBUG
else {
@@ -74,14 +78,14 @@ void
ICUNotifier::removeListener(const EventListener *l, UErrorCode& status)
{
if (U_SUCCESS(status)) {
- if (l == NULL) {
+ if (l == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
{
Mutex lmx(&notifyLock);
- if (listeners != NULL) {
+ if (listeners != nullptr) {
// identity equality check
for (int i = 0, e = listeners->size(); i < e; ++i) {
const EventListener* el = (const EventListener*)listeners->elementAt(i);
@@ -89,7 +93,7 @@ ICUNotifier::removeListener(const EventListener *l, UErrorCode& status)
listeners->removeElementAt(i);
if (listeners->size() == 0) {
delete listeners;
- listeners = NULL;
+ listeners = nullptr;
}
return;
}
@@ -100,15 +104,13 @@ ICUNotifier::removeListener(const EventListener *l, UErrorCode& status)
}
void
-ICUNotifier::notifyChanged(void)
+ICUNotifier::notifyChanged()
{
- if (listeners != NULL) {
- Mutex lmx(&notifyLock);
- if (listeners != NULL) {
- for (int i = 0, e = listeners->size(); i < e; ++i) {
- EventListener* el = (EventListener*)listeners->elementAt(i);
- notifyListener(*el);
- }
+ Mutex lmx(&notifyLock);
+ if (listeners != nullptr) {
+ for (int i = 0, e = listeners->size(); i < e; ++i) {
+ EventListener* el = (EventListener*)listeners->elementAt(i);
+ notifyListener(*el);
}
}
}
diff --git a/contrib/libs/icu/common/servnotf.h b/contrib/libs/icu/common/servnotf.h
index e3b2cac32e4..840fe1ae87f 100644
--- a/contrib/libs/icu/common/servnotf.h
+++ b/contrib/libs/icu/common/servnotf.h
@@ -75,9 +75,9 @@ class U_COMMON_API ICUNotifier : public UMemory {
private: UVector* listeners;
public:
- ICUNotifier(void);
+ ICUNotifier();
- virtual ~ICUNotifier(void);
+ virtual ~ICUNotifier();
/**
* Add a listener to be notified when notifyChanged is called.
@@ -101,7 +101,7 @@ public:
* indefinitely block the calling thread. Callers should beware of
* deadlock situations.
*/
- virtual void notifyChanged(void);
+ virtual void notifyChanged();
protected:
/**
diff --git a/contrib/libs/icu/common/servrbf.cpp b/contrib/libs/icu/common/servrbf.cpp
index 94279ab3a15..a4feca2c3b0 100644
--- a/contrib/libs/icu/common/servrbf.cpp
+++ b/contrib/libs/icu/common/servrbf.cpp
@@ -22,9 +22,9 @@
#include "ucln_cmn.h"
#include "uassert.h"
-#define UNDERSCORE_CHAR ((UChar)0x005f)
-#define AT_SIGN_CHAR ((UChar)64)
-#define PERIOD_CHAR ((UChar)46)
+#define UNDERSCORE_CHAR ((char16_t)0x005f)
+#define AT_SIGN_CHAR ((char16_t)64)
+#define PERIOD_CHAR ((char16_t)46)
U_NAMESPACE_BEGIN
@@ -48,7 +48,7 @@ ICUResourceBundleFactory::getSupportedIDs(UErrorCode& status) const
if (U_SUCCESS(status)) {
return LocaleUtility::getAvailableLocaleNames(_bundleName);
}
- return NULL;
+ return nullptr;
}
UObject*
@@ -63,11 +63,11 @@ ICUResourceBundleFactory::handleCreate(const Locale& loc, int32_t /* kind */, co
int32_t length;
length=_bundleName.extract(0, INT32_MAX, pkg, (int32_t)sizeof(pkg), US_INV);
if(length>=(int32_t)sizeof(pkg)) {
- return NULL;
+ return nullptr;
}
return new ResourceBundle(pkg, loc, status);
}
- return NULL;
+ return nullptr;
}
#ifdef SERVICE_DEBUG
diff --git a/contrib/libs/icu/common/servslkf.cpp b/contrib/libs/icu/common/servslkf.cpp
index 09154d1b919..b3ab1cc9ce9 100644
--- a/contrib/libs/icu/common/servslkf.cpp
+++ b/contrib/libs/icu/common/servslkf.cpp
@@ -21,9 +21,9 @@
#include "charstr.h"
#include "uassert.h"
-#define UNDERSCORE_CHAR ((UChar)0x005f)
-#define AT_SIGN_CHAR ((UChar)64)
-#define PERIOD_CHAR ((UChar)46)
+#define UNDERSCORE_CHAR ((char16_t)0x005f)
+#define AT_SIGN_CHAR ((char16_t)64)
+#define PERIOD_CHAR ((char16_t)46)
U_NAMESPACE_BEGIN
@@ -57,14 +57,14 @@ SimpleLocaleKeyFactory::SimpleLocaleKeyFactory(UObject* objToAdopt,
SimpleLocaleKeyFactory::~SimpleLocaleKeyFactory()
{
delete _obj;
- _obj = NULL;
+ _obj = nullptr;
}
UObject*
SimpleLocaleKeyFactory::create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const
{
if (U_SUCCESS(status)) {
- const LocaleKey& lkey = (const LocaleKey&)key;
+ const LocaleKey& lkey = static_cast<const LocaleKey&>(key);
if (_kind == LocaleKey::KIND_ANY || _kind == lkey.kind()) {
UnicodeString keyID;
lkey.currentID(keyID);
@@ -73,7 +73,7 @@ SimpleLocaleKeyFactory::create(const ICUServiceKey& key, const ICUService* servi
}
}
}
- return NULL;
+ return nullptr;
}
//UBool
diff --git a/contrib/libs/icu/common/sharedobject.h b/contrib/libs/icu/common/sharedobject.h
index 6ccfb27b018..5532ec48d88 100644
--- a/contrib/libs/icu/common/sharedobject.h
+++ b/contrib/libs/icu/common/sharedobject.h
@@ -38,8 +38,8 @@ public:
virtual ~UnifiedCacheBase();
private:
- UnifiedCacheBase(const UnifiedCacheBase &);
- UnifiedCacheBase &operator=(const UnifiedCacheBase &);
+ UnifiedCacheBase(const UnifiedCacheBase &) = delete;
+ UnifiedCacheBase &operator=(const UnifiedCacheBase &) = delete;
};
/**
@@ -57,14 +57,14 @@ public:
SharedObject() :
softRefCount(0),
hardRefCount(0),
- cachePtr(NULL) {}
+ cachePtr(nullptr) {}
/** Initializes totalRefCount, softRefCount to 0. */
SharedObject(const SharedObject &other) :
UObject(other),
softRefCount(0),
hardRefCount(0),
- cachePtr(NULL) {}
+ cachePtr(nullptr) {}
virtual ~SharedObject();
@@ -116,7 +116,7 @@ public:
* If there are multiple owners, then ptr is replaced with a
* copy-constructed clone,
* and that is returned.
- * Returns NULL if cloning failed.
+ * Returns nullptr if cloning failed.
*
* T must be a subclass of SharedObject.
*/
@@ -125,7 +125,7 @@ public:
const T *p = ptr;
if(p->getRefCount() <= 1) { return const_cast<T *>(p); }
T *p2 = new T(*p);
- if(p2 == NULL) { return NULL; }
+ if(p2 == nullptr) { return nullptr; }
p->removeRef();
ptr = p2;
p2->addRef();
@@ -135,7 +135,7 @@ public:
/**
* Makes dest an owner of the object pointed to by src while adjusting
* reference counts and deleting the previous object dest pointed to
- * if necessary. Before this call is made, dest must either be NULL or
+ * if necessary. Before this call is made, dest must either be nullptr or
* be included in the reference count of the object it points to.
*
* T must be a subclass of SharedObject.
@@ -143,20 +143,20 @@ public:
template<typename T>
static void copyPtr(const T *src, const T *&dest) {
if(src != dest) {
- if(dest != NULL) { dest->removeRef(); }
+ if(dest != nullptr) { dest->removeRef(); }
dest = src;
- if(src != NULL) { src->addRef(); }
+ if(src != nullptr) { src->addRef(); }
}
}
/**
- * Equivalent to copyPtr(NULL, dest).
+ * Equivalent to copyPtr(nullptr, dest).
*/
template<typename T>
static void clearPtr(const T *&ptr) {
- if (ptr != NULL) {
+ if (ptr != nullptr) {
ptr->removeRef();
- ptr = NULL;
+ ptr = nullptr;
}
}
diff --git a/contrib/libs/icu/common/simpleformatter.cpp b/contrib/libs/icu/common/simpleformatter.cpp
index f7f7aead617..16256270727 100644
--- a/contrib/libs/icu/common/simpleformatter.cpp
+++ b/contrib/libs/icu/common/simpleformatter.cpp
@@ -25,11 +25,11 @@ namespace {
*/
const int32_t ARG_NUM_LIMIT = 0x100;
/**
- * Initial and maximum char/UChar value set for a text segment.
+ * Initial and maximum char/char16_t value set for a text segment.
* Segment length char values are from ARG_NUM_LIMIT+1 to this value here.
* Normally 0xffff, but can be as small as ARG_NUM_LIMIT+1 for testing.
*/
-const UChar SEGMENT_LENGTH_PLACEHOLDER_CHAR = 0xffff;
+const char16_t SEGMENT_LENGTH_PLACEHOLDER_CHAR = 0xffff;
/**
* Maximum length of a text segment. Longer segments are split into shorter ones.
*/
@@ -45,7 +45,7 @@ enum {
};
inline UBool isInvalidArray(const void *array, int32_t length) {
- return (length < 0 || (array == NULL && length != 0));
+ return (length < 0 || (array == nullptr && length != 0));
}
} // namespace
@@ -65,32 +65,32 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
int32_t min, int32_t max,
UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
// Parse consistent with MessagePattern, but
// - support only simple numbered arguments
// - build a simple binary structure into the result string
- const UChar *patternBuffer = pattern.getBuffer();
+ const char16_t *patternBuffer = pattern.getBuffer();
int32_t patternLength = pattern.length();
// Reserve the first char for the number of arguments.
- compiledPattern.setTo((UChar)0);
+ compiledPattern.setTo((char16_t)0);
int32_t textLength = 0;
int32_t maxArg = -1;
- UBool inQuote = FALSE;
+ UBool inQuote = false;
for (int32_t i = 0; i < patternLength;) {
- UChar c = patternBuffer[i++];
+ char16_t c = patternBuffer[i++];
if (c == APOS) {
if (i < patternLength && (c = patternBuffer[i]) == APOS) {
// double apostrophe, skip the second one
++i;
} else if (inQuote) {
// skip the quote-ending apostrophe
- inQuote = FALSE;
+ inQuote = false;
continue;
} else if (c == OPEN_BRACE || c == CLOSE_BRACE) {
// Skip the quote-starting apostrophe, find the end of the quoted literal text.
++i;
- inQuote = TRUE;
+ inQuote = true;
} else {
// The apostrophe is part of literal text.
c = APOS;
@@ -98,7 +98,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
} else if (!inQuote && c == OPEN_BRACE) {
if (textLength > 0) {
compiledPattern.setCharAt(compiledPattern.length() - textLength - 1,
- (UChar)(ARG_NUM_LIMIT + textLength));
+ (char16_t)(ARG_NUM_LIMIT + textLength));
textLength = 0;
}
int32_t argNumber;
@@ -123,13 +123,13 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
}
if (argNumber < 0 || c != CLOSE_BRACE) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
}
if (argNumber > maxArg) {
maxArg = argNumber;
}
- compiledPattern.append((UChar)argNumber);
+ compiledPattern.append((char16_t)argNumber);
continue;
} // else: c is part of literal text
// Append c and track the literal-text segment length.
@@ -144,22 +144,22 @@ UBool SimpleFormatter::applyPatternMinMaxArguments(
}
if (textLength > 0) {
compiledPattern.setCharAt(compiledPattern.length() - textLength - 1,
- (UChar)(ARG_NUM_LIMIT + textLength));
+ (char16_t)(ARG_NUM_LIMIT + textLength));
}
int32_t argCount = maxArg + 1;
if (argCount < min || max < argCount) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
- compiledPattern.setCharAt(0, (UChar)argCount);
- return TRUE;
+ compiledPattern.setCharAt(0, (char16_t)argCount);
+ return true;
}
UnicodeString& SimpleFormatter::format(
const UnicodeString &value0,
UnicodeString &appendTo, UErrorCode &errorCode) const {
const UnicodeString *values[] = { &value0 };
- return formatAndAppend(values, 1, appendTo, NULL, 0, errorCode);
+ return formatAndAppend(values, 1, appendTo, nullptr, 0, errorCode);
}
UnicodeString& SimpleFormatter::format(
@@ -167,7 +167,7 @@ UnicodeString& SimpleFormatter::format(
const UnicodeString &value1,
UnicodeString &appendTo, UErrorCode &errorCode) const {
const UnicodeString *values[] = { &value0, &value1 };
- return formatAndAppend(values, 2, appendTo, NULL, 0, errorCode);
+ return formatAndAppend(values, 2, appendTo, nullptr, 0, errorCode);
}
UnicodeString& SimpleFormatter::format(
@@ -176,7 +176,7 @@ UnicodeString& SimpleFormatter::format(
const UnicodeString &value2,
UnicodeString &appendTo, UErrorCode &errorCode) const {
const UnicodeString *values[] = { &value0, &value1, &value2 };
- return formatAndAppend(values, 3, appendTo, NULL, 0, errorCode);
+ return formatAndAppend(values, 3, appendTo, nullptr, 0, errorCode);
}
UnicodeString& SimpleFormatter::formatAndAppend(
@@ -192,7 +192,7 @@ UnicodeString& SimpleFormatter::formatAndAppend(
return appendTo;
}
return format(compiledPattern.getBuffer(), compiledPattern.length(), values,
- appendTo, NULL, TRUE,
+ appendTo, nullptr, true,
offsets, offsetsLength, errorCode);
}
@@ -207,7 +207,7 @@ UnicodeString &SimpleFormatter::formatAndReplace(
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return result;
}
- const UChar *cp = compiledPattern.getBuffer();
+ const char16_t *cp = compiledPattern.getBuffer();
int32_t cpLength = compiledPattern.length();
if (valuesLength < getArgumentLimit(cp, cpLength)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
@@ -241,12 +241,12 @@ UnicodeString &SimpleFormatter::formatAndReplace(
result.remove();
}
return format(cp, cpLength, values,
- result, &resultCopy, FALSE,
+ result, &resultCopy, false,
offsets, offsetsLength, errorCode);
}
UnicodeString SimpleFormatter::getTextWithNoArguments(
- const UChar *compiledPattern,
+ const char16_t *compiledPattern,
int32_t compiledPatternLength,
int32_t* offsets,
int32_t offsetsLength) {
@@ -272,7 +272,7 @@ UnicodeString SimpleFormatter::getTextWithNoArguments(
}
UnicodeString &SimpleFormatter::format(
- const UChar *compiledPattern, int32_t compiledPatternLength,
+ const char16_t *compiledPattern, int32_t compiledPatternLength,
const UnicodeString *const *values,
UnicodeString &result, const UnicodeString *resultCopy, UBool forbidResultAsValue,
int32_t *offsets, int32_t offsetsLength,
@@ -287,7 +287,7 @@ UnicodeString &SimpleFormatter::format(
int32_t n = compiledPattern[i++];
if (n < ARG_NUM_LIMIT) {
const UnicodeString *value = values[n];
- if (value == NULL) {
+ if (value == nullptr) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return result;
}
diff --git a/contrib/libs/icu/common/static_unicode_sets.cpp b/contrib/libs/icu/common/static_unicode_sets.cpp
index 5dab3931a70..0db5ea000d4 100644
--- a/contrib/libs/icu/common/static_unicode_sets.cpp
+++ b/contrib/libs/icu/common/static_unicode_sets.cpp
@@ -31,7 +31,7 @@ alignas(UnicodeSet)
char gEmptyUnicodeSet[sizeof(UnicodeSet)];
// Whether the gEmptyUnicodeSet is initialized and ready to use.
-UBool gEmptyUnicodeSetInitialized = FALSE;
+UBool gEmptyUnicodeSetInitialized = false;
inline UnicodeSet* getImpl(Key key) {
UnicodeSet* candidate = gUnicodeSets[key];
@@ -72,7 +72,7 @@ void saveSet(Key key, const UnicodeString& unicodeSetPattern, UErrorCode& status
class ParseDataSink : public ResourceSink {
public:
- void put(const char* key, ResourceValue& value, UBool /*noFallback*/, UErrorCode& status) U_OVERRIDE {
+ void put(const char* key, ResourceValue& value, UBool /*noFallback*/, UErrorCode& status) override {
ResourceTable contextsTable = value.getTable(status);
if (U_FAILURE(status)) { return; }
for (int i = 0; contextsTable.getKeyAndValue(i, key, value); i++) {
@@ -118,7 +118,7 @@ class ParseDataSink : public ResourceSink {
} else {
// Unknown class of parse lenients
// TODO(ICU-20428): Make ICU automatically accept new classes?
- U_ASSERT(FALSE);
+ U_ASSERT(false);
}
if (U_FAILURE(status)) { return; }
}
@@ -129,19 +129,19 @@ class ParseDataSink : public ResourceSink {
};
-icu::UInitOnce gNumberParseUniSetsInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gNumberParseUniSetsInitOnce {};
UBool U_CALLCONV cleanupNumberParseUniSets() {
if (gEmptyUnicodeSetInitialized) {
reinterpret_cast<UnicodeSet*>(gEmptyUnicodeSet)->~UnicodeSet();
- gEmptyUnicodeSetInitialized = FALSE;
+ gEmptyUnicodeSetInitialized = false;
}
for (int32_t i = 0; i < UNISETS_KEY_COUNT; i++) {
delete gUnicodeSets[i];
gUnicodeSets[i] = nullptr;
}
gNumberParseUniSetsInitOnce.reset();
- return TRUE;
+ return true;
}
void U_CALLCONV initNumberParseUniSets(UErrorCode& status) {
@@ -150,7 +150,7 @@ void U_CALLCONV initNumberParseUniSets(UErrorCode& status) {
// Initialize the empty instance for well-defined fallback behavior
new(gEmptyUnicodeSet) UnicodeSet();
reinterpret_cast<UnicodeSet*>(gEmptyUnicodeSet)->freeze();
- gEmptyUnicodeSetInitialized = TRUE;
+ gEmptyUnicodeSetInitialized = true;
// These sets were decided after discussion with icu-design@. See tickets #13084 and #13309.
// Zs+TAB is "horizontal whitespace" according to UTS #18 (blank property).
diff --git a/contrib/libs/icu/common/stringpiece.cpp b/contrib/libs/icu/common/stringpiece.cpp
index 99089e08ef9..eb9766c0180 100644
--- a/contrib/libs/icu/common/stringpiece.cpp
+++ b/contrib/libs/icu/common/stringpiece.cpp
@@ -16,7 +16,7 @@
U_NAMESPACE_BEGIN
StringPiece::StringPiece(const char* str)
- : ptr_(str), length_((str == NULL) ? 0 : static_cast<int32_t>(uprv_strlen(str))) { }
+ : ptr_(str), length_((str == nullptr) ? 0 : static_cast<int32_t>(uprv_strlen(str))) { }
StringPiece::StringPiece(const StringPiece& x, int32_t pos) {
if (pos < 0) {
@@ -45,7 +45,7 @@ StringPiece::StringPiece(const StringPiece& x, int32_t pos, int32_t len) {
void StringPiece::set(const char* str) {
ptr_ = str;
- if (str != NULL)
+ if (str != nullptr)
length_ = static_cast<int32_t>(uprv_strlen(str));
else
length_ = 0;
diff --git a/contrib/libs/icu/common/stringtriebuilder.cpp b/contrib/libs/icu/common/stringtriebuilder.cpp
index 4d52a88af74..2a40dc88fd8 100644
--- a/contrib/libs/icu/common/stringtriebuilder.cpp
+++ b/contrib/libs/icu/common/stringtriebuilder.cpp
@@ -36,7 +36,7 @@ U_CDECL_END
U_NAMESPACE_BEGIN
-StringTrieBuilder::StringTrieBuilder() : nodes(NULL) {}
+StringTrieBuilder::StringTrieBuilder() : nodes(nullptr) {}
StringTrieBuilder::~StringTrieBuilder() {
deleteCompactBuilder();
@@ -47,10 +47,10 @@ StringTrieBuilder::createCompactBuilder(int32_t sizeGuess, UErrorCode &errorCode
if(U_FAILURE(errorCode)) {
return;
}
- nodes=uhash_openSize(hashStringTrieNode, equalStringTrieNodes, NULL,
+ nodes=uhash_openSize(hashStringTrieNode, equalStringTrieNodes, nullptr,
sizeGuess, &errorCode);
if(U_SUCCESS(errorCode)) {
- if(nodes==NULL) {
+ if(nodes==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
} else {
uhash_setKeyDeleter(nodes, uprv_deleteUObject);
@@ -61,7 +61,7 @@ StringTrieBuilder::createCompactBuilder(int32_t sizeGuess, UErrorCode &errorCode
void
StringTrieBuilder::deleteCompactBuilder() {
uhash_close(nodes);
- nodes=NULL;
+ nodes=nullptr;
}
void
@@ -85,16 +85,16 @@ StringTrieBuilder::build(UStringTrieBuildOption buildOption, int32_t elementsLen
// have a common prefix of length unitIndex.
int32_t
StringTrieBuilder::writeNode(int32_t start, int32_t limit, int32_t unitIndex) {
- UBool hasValue=FALSE;
+ UBool hasValue=false;
int32_t value=0;
int32_t type;
if(unitIndex==getElementStringLength(start)) {
// An intermediate or final value.
value=getElementValue(start++);
if(start==limit) {
- return writeValueAndFinal(value, TRUE); // final-value node
+ return writeValueAndFinal(value, true); // final-value node
}
- hasValue=TRUE;
+ hasValue=true;
}
// Now all [start..limit[ strings are longer than unitIndex.
int32_t minUnit=getElementUnit(start, unitIndex);
@@ -133,7 +133,7 @@ StringTrieBuilder::writeNode(int32_t start, int32_t limit, int32_t unitIndex) {
// length different units at unitIndex
int32_t
StringTrieBuilder::writeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex, int32_t length) {
- UChar middleUnits[kMaxSplitBranchLevels];
+ char16_t middleUnits[kMaxSplitBranchLevels];
int32_t lessThan[kMaxSplitBranchLevels];
int32_t ltLength=0;
while(length>getMaxBranchLinearSubNodeLength()) {
@@ -154,7 +154,7 @@ StringTrieBuilder::writeBranchSubNode(int32_t start, int32_t limit, int32_t unit
int32_t unitNumber=0;
do {
int32_t i=starts[unitNumber]=start;
- UChar unit=getElementUnit(i++, unitIndex);
+ char16_t unit=getElementUnit(i++, unitIndex);
i=indexOfElementWithNextUnit(i, unitIndex, unit);
isFinal[unitNumber]= start==i-1 && unitIndex+1==getElementStringLength(start);
start=i;
@@ -207,9 +207,9 @@ StringTrieBuilder::writeBranchSubNode(int32_t start, int32_t limit, int32_t unit
StringTrieBuilder::Node *
StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
- UBool hasValue=FALSE;
+ UBool hasValue=false;
int32_t value=0;
if(unitIndex==getElementStringLength(start)) {
// An intermediate or final value.
@@ -217,7 +217,7 @@ StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UEr
if(start==limit) {
return registerFinalValue(value, errorCode);
}
- hasValue=TRUE;
+ hasValue=true;
}
Node *node;
// Now all [start..limit[ strings are longer than unitIndex.
@@ -244,7 +244,7 @@ StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UEr
Node *subNode=makeBranchSubNode(start, limit, unitIndex, length, errorCode);
node=new BranchHeadNode(length, subNode);
}
- if(hasValue && node!=NULL) {
+ if(hasValue && node!=nullptr) {
if(matchNodesCanHaveValues()) {
((ValueNode *)node)->setValue(value);
} else {
@@ -260,9 +260,9 @@ StringTrieBuilder::Node *
StringTrieBuilder::makeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex,
int32_t length, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
- UChar middleUnits[kMaxSplitBranchLevels];
+ char16_t middleUnits[kMaxSplitBranchLevels];
Node *lessThan[kMaxSplitBranchLevels];
int32_t ltLength=0;
while(length>getMaxBranchLinearSubNodeLength()) {
@@ -278,18 +278,18 @@ StringTrieBuilder::makeBranchSubNode(int32_t start, int32_t limit, int32_t unitI
length=length-length/2;
}
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
ListBranchNode *listNode=new ListBranchNode();
- if(listNode==NULL) {
+ if(listNode==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// For each unit, find its elements array start and whether it has a final value.
int32_t unitNumber=0;
do {
int32_t i=start;
- UChar unit=getElementUnit(i++, unitIndex);
+ char16_t unit=getElementUnit(i++, unitIndex);
i=indexOfElementWithNextUnit(i, unitIndex, unit);
if(start==i-1 && unitIndex+1==getElementStringLength(start)) {
listNode->add(unit, getElementValue(start));
@@ -299,7 +299,7 @@ StringTrieBuilder::makeBranchSubNode(int32_t start, int32_t limit, int32_t unitI
start=i;
} while(++unitNumber<length-1);
// unitNumber==length-1, and the maxUnit elements range is [start..limit[
- UChar unit=getElementUnit(start, unitIndex);
+ char16_t unit=getElementUnit(start, unitIndex);
if(start==limit-1 && unitIndex+1==getElementStringLength(start)) {
listNode->add(unit, getElementValue(start));
} else {
@@ -319,14 +319,14 @@ StringTrieBuilder::Node *
StringTrieBuilder::registerNode(Node *newNode, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
delete newNode;
- return NULL;
+ return nullptr;
}
- if(newNode==NULL) {
+ if(newNode==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
const UHashElement *old=uhash_find(nodes, newNode);
- if(old!=NULL) {
+ if(old!=nullptr) {
delete newNode;
return (Node *)old->key.pointer;
}
@@ -339,7 +339,7 @@ StringTrieBuilder::registerNode(Node *newNode, UErrorCode &errorCode) {
U_ASSERT(oldValue==0);
if(U_FAILURE(errorCode)) {
delete newNode;
- return NULL;
+ return nullptr;
}
return newNode;
}
@@ -347,17 +347,17 @@ StringTrieBuilder::registerNode(Node *newNode, UErrorCode &errorCode) {
StringTrieBuilder::Node *
StringTrieBuilder::registerFinalValue(int32_t value, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
FinalValueNode key(value);
const UHashElement *old=uhash_find(nodes, &key);
- if(old!=NULL) {
+ if(old!=nullptr) {
return (Node *)old->key.pointer;
}
Node *newNode=new FinalValueNode(value);
- if(newNode==NULL) {
+ if(newNode==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// If uhash_puti() returns a non-zero value from an equivalent, previously
// registered node, then uhash_find() failed to find that and we will leak newNode.
@@ -368,7 +368,7 @@ StringTrieBuilder::registerFinalValue(int32_t value, UErrorCode &errorCode) {
U_ASSERT(oldValue==0);
if(U_FAILURE(errorCode)) {
delete newNode;
- return NULL;
+ return nullptr;
}
return newNode;
}
@@ -404,13 +404,13 @@ StringTrieBuilder::FinalValueNode::operator==(const Node &other) const {
if(!Node::operator==(other)) {
return false;
}
- const FinalValueNode &o=(const FinalValueNode &)other;
+ const FinalValueNode &o=static_cast<const FinalValueNode &>(other);
return value==o.value;
}
void
StringTrieBuilder::FinalValueNode::write(StringTrieBuilder &builder) {
- offset=builder.writeValueAndFinal(value, TRUE);
+ offset=builder.writeValueAndFinal(value, true);
}
bool
@@ -421,7 +421,7 @@ StringTrieBuilder::ValueNode::operator==(const Node &other) const {
if(!Node::operator==(other)) {
return false;
}
- const ValueNode &o=(const ValueNode &)other;
+ const ValueNode &o=static_cast<const ValueNode &>(other);
return hasValue==o.hasValue && (!hasValue || value==o.value);
}
@@ -433,7 +433,7 @@ StringTrieBuilder::IntermediateValueNode::operator==(const Node &other) const {
if(!ValueNode::operator==(other)) {
return false;
}
- const IntermediateValueNode &o=(const IntermediateValueNode &)other;
+ const IntermediateValueNode &o=static_cast<const IntermediateValueNode &>(other);
return next==o.next;
}
@@ -448,7 +448,7 @@ StringTrieBuilder::IntermediateValueNode::markRightEdgesFirst(int32_t edgeNumber
void
StringTrieBuilder::IntermediateValueNode::write(StringTrieBuilder &builder) {
next->write(builder);
- offset=builder.writeValueAndFinal(value, FALSE);
+ offset=builder.writeValueAndFinal(value, false);
}
bool
@@ -459,7 +459,7 @@ StringTrieBuilder::LinearMatchNode::operator==(const Node &other) const {
if(!ValueNode::operator==(other)) {
return false;
}
- const LinearMatchNode &o=(const LinearMatchNode &)other;
+ const LinearMatchNode &o=static_cast<const LinearMatchNode &>(other);
return length==o.length && next==o.next;
}
@@ -479,7 +479,7 @@ StringTrieBuilder::ListBranchNode::operator==(const Node &other) const {
if(!Node::operator==(other)) {
return false;
}
- const ListBranchNode &o=(const ListBranchNode &)other;
+ const ListBranchNode &o=static_cast<const ListBranchNode &>(other);
for(int32_t i=0; i<length; ++i) {
if(units[i]!=o.units[i] || values[i]!=o.values[i] || equal[i]!=o.equal[i]) {
return false;
@@ -496,7 +496,7 @@ StringTrieBuilder::ListBranchNode::markRightEdgesFirst(int32_t edgeNumber) {
int32_t i=length;
do {
Node *edge=equal[--i];
- if(edge!=NULL) {
+ if(edge!=nullptr) {
edgeNumber=edge->markRightEdgesFirst(edgeNumber-step);
}
// For all but the rightmost edge, decrement the edge number.
@@ -515,18 +515,18 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) {
// Instead we write the minUnit sub-node last, for a shorter delta.
int32_t unitNumber=length-1;
Node *rightEdge=equal[unitNumber];
- int32_t rightEdgeNumber= rightEdge==NULL ? firstEdgeNumber : rightEdge->getOffset();
+ int32_t rightEdgeNumber= rightEdge==nullptr ? firstEdgeNumber : rightEdge->getOffset();
do {
--unitNumber;
- if(equal[unitNumber]!=NULL) {
+ if(equal[unitNumber]!=nullptr) {
equal[unitNumber]->writeUnlessInsideRightEdge(firstEdgeNumber, rightEdgeNumber, builder);
}
} while(unitNumber>0);
// The maxUnit sub-node is written as the very last one because we do
// not jump for it at all.
unitNumber=length-1;
- if(rightEdge==NULL) {
- builder.writeValueAndFinal(values[unitNumber], TRUE);
+ if(rightEdge==nullptr) {
+ builder.writeValueAndFinal(values[unitNumber], true);
} else {
rightEdge->write(builder);
}
@@ -535,15 +535,15 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) {
while(--unitNumber>=0) {
int32_t value;
UBool isFinal;
- if(equal[unitNumber]==NULL) {
+ if(equal[unitNumber]==nullptr) {
// Write the final value for the one string ending with this unit.
value=values[unitNumber];
- isFinal=TRUE;
+ isFinal=true;
} else {
// Write the delta to the start position of the sub-node.
U_ASSERT(equal[unitNumber]->getOffset()>0);
value=offset-equal[unitNumber]->getOffset();
- isFinal=FALSE;
+ isFinal=false;
}
builder.writeValueAndFinal(value, isFinal);
offset=builder.write(units[unitNumber]);
@@ -558,7 +558,7 @@ StringTrieBuilder::SplitBranchNode::operator==(const Node &other) const {
if(!Node::operator==(other)) {
return false;
}
- const SplitBranchNode &o=(const SplitBranchNode &)other;
+ const SplitBranchNode &o=static_cast<const SplitBranchNode &>(other);
return unit==o.unit && lessThan==o.lessThan && greaterOrEqual==o.greaterOrEqual;
}
@@ -592,7 +592,7 @@ StringTrieBuilder::BranchHeadNode::operator==(const Node &other) const {
if(!ValueNode::operator==(other)) {
return false;
}
- const BranchHeadNode &o=(const BranchHeadNode &)other;
+ const BranchHeadNode &o=static_cast<const BranchHeadNode &>(other);
return length==o.length && next==o.next;
}
diff --git a/contrib/libs/icu/common/uarrsort.cpp b/contrib/libs/icu/common/uarrsort.cpp
index c17dbb2e2b1..f9daa4b30ff 100644
--- a/contrib/libs/icu/common/uarrsort.cpp
+++ b/contrib/libs/icu/common/uarrsort.cpp
@@ -75,7 +75,7 @@ U_CAPI int32_t U_EXPORT2
uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize,
UComparator *cmp, const void *context) {
int32_t start=0;
- UBool found=FALSE;
+ UBool found=false;
/* Binary search until we get down to a tiny sub-array. */
while((limit-start)>=MIN_QSORT) {
@@ -90,10 +90,10 @@ uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize
* However, if there are many equal items, then it should be
* faster to continue with the binary search.
* It seems likely that we either have all unique items
- * (where found will never become TRUE in the insertion sort)
+ * (where found will never become true in the insertion sort)
* or potentially many duplicates.
*/
- found=TRUE;
+ found=true;
start=i+1;
} else if(diff<0) {
limit=i;
@@ -106,7 +106,7 @@ uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize
while(start<limit) {
int32_t diff=cmp(context, item, array+start*itemSize);
if(diff==0) {
- found=TRUE;
+ found=true;
} else if(diff<0) {
break;
}
@@ -256,10 +256,10 @@ U_CAPI void U_EXPORT2
uprv_sortArray(void *array, int32_t length, int32_t itemSize,
UComparator *cmp, const void *context,
UBool sortStable, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
- if((length>0 && array==NULL) || length<0 || itemSize<=0 || cmp==NULL) {
+ if((length>0 && array==nullptr) || length<0 || itemSize<=0 || cmp==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
diff --git a/contrib/libs/icu/common/ubidi.cpp b/contrib/libs/icu/common/ubidi.cpp
index 6d27827c504..fcf82fa97a8 100644
--- a/contrib/libs/icu/common/ubidi.cpp
+++ b/contrib/libs/icu/common/ubidi.cpp
@@ -34,14 +34,14 @@
* rules of the BiDi algorithm, in this example to the second rule of the
* resolution of weak types.
*
- * For handling surrogate pairs, where two UChar's form one "abstract" (or UTF-32)
- * character according to UTF-16, the second UChar gets the directional property of
+ * For handling surrogate pairs, where two char16_t's form one "abstract" (or UTF-32)
+ * character according to UTF-16, the second char16_t gets the directional property of
* the entire character assigned, while the first one gets a BN, a boundary
* neutral, type, which is ignored by most of the algorithm according to
* rule (X9) and the implementation suggestions of the BiDi algorithm.
*
* Later, adjustWSLevels() will set the level for each BN to that of the
- * following character (UChar), which results in surrogate pairs getting the
+ * following character (char16_t), which results in surrogate pairs getting the
* same level on each of their surrogates.
*
* In a UTF-8 implementation, the same thing could be done: the last byte of
@@ -124,7 +124,7 @@ static const Flags flagO[2]={ DIRPROP_FLAG(LRO), DIRPROP_FLAG(RLO) };
/* UBiDi object management -------------------------------------------------- */
U_CAPI UBiDi * U_EXPORT2
-ubidi_open(void)
+ubidi_open()
{
UErrorCode errorCode=U_ZERO_ERROR;
return ubidi_openSized(0, 0, &errorCode);
@@ -135,21 +135,21 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
UBiDi *pBiDi;
/* check the argument values */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
} else if(maxLength<0 || maxRunCount<0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL; /* invalid arguments */
+ return nullptr; /* invalid arguments */
}
/* allocate memory for the object */
pBiDi=(UBiDi *)uprv_malloc(sizeof(UBiDi));
- if(pBiDi==NULL) {
+ if(pBiDi==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- /* reset the object, all pointers NULL, all flags FALSE, all sizes 0 */
+ /* reset the object, all pointers nullptr, all flags false, all sizes 0 */
uprv_memset(pBiDi, 0, sizeof(UBiDi));
/* allocate memory for arrays as requested */
@@ -160,7 +160,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
}
} else {
- pBiDi->mayAllocateText=TRUE;
+ pBiDi->mayAllocateText=true;
}
if(maxRunCount>0) {
@@ -171,25 +171,25 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
}
} else {
- pBiDi->mayAllocateRuns=TRUE;
+ pBiDi->mayAllocateRuns=true;
}
if(U_SUCCESS(*pErrorCode)) {
return pBiDi;
} else {
ubidi_close(pBiDi);
- return NULL;
+ return nullptr;
}
}
/*
- * We are allowed to allocate memory if memory==NULL or
- * mayAllocate==TRUE for each array that we need.
+ * We are allowed to allocate memory if memory==nullptr or
+ * mayAllocate==true for each array that we need.
* We also try to grow memory as needed if we
* allocate it.
*
* Assume sizeNeeded>0.
- * If *pMemory!=NULL, then assume *pSize>0.
+ * If *pMemory!=nullptr, then assume *pSize>0.
*
* ### this realloc() may unnecessarily copy the old data,
* which we know we don't need any more;
@@ -199,22 +199,22 @@ U_CFUNC UBool
ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAllocate, int32_t sizeNeeded) {
void **pMemory = (void **)bidiMem;
/* check for existing memory */
- if(*pMemory==NULL) {
+ if(*pMemory==nullptr) {
/* we need to allocate memory */
- if(mayAllocate && (*pMemory=uprv_malloc(sizeNeeded))!=NULL) {
+ if(mayAllocate && (*pMemory=uprv_malloc(sizeNeeded))!=nullptr) {
*pSize=sizeNeeded;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
} else {
if(sizeNeeded<=*pSize) {
/* there is already enough memory */
- return TRUE;
+ return true;
}
else if(!mayAllocate) {
/* not enough memory, and we must not allocate */
- return FALSE;
+ return false;
} else {
/* we try to grow */
void *memory;
@@ -222,13 +222,13 @@ ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAlloc
* realloc, but it is needed when adding runs using getRunsMemory()
* in setParaRunsOnly()
*/
- if((memory=uprv_realloc(*pMemory, sizeNeeded))!=NULL) {
+ if((memory=uprv_realloc(*pMemory, sizeNeeded))!=nullptr) {
*pMemory=memory;
*pSize=sizeNeeded;
- return TRUE;
+ return true;
} else {
/* we failed to grow */
- return FALSE;
+ return false;
}
}
}
@@ -236,27 +236,27 @@ ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAlloc
U_CAPI void U_EXPORT2
ubidi_close(UBiDi *pBiDi) {
- if(pBiDi!=NULL) {
- pBiDi->pParaBiDi=NULL; /* in case one tries to reuse this block */
- if(pBiDi->dirPropsMemory!=NULL) {
+ if(pBiDi!=nullptr) {
+ pBiDi->pParaBiDi=nullptr; /* in case one tries to reuse this block */
+ if(pBiDi->dirPropsMemory!=nullptr) {
uprv_free(pBiDi->dirPropsMemory);
}
- if(pBiDi->levelsMemory!=NULL) {
+ if(pBiDi->levelsMemory!=nullptr) {
uprv_free(pBiDi->levelsMemory);
}
- if(pBiDi->openingsMemory!=NULL) {
+ if(pBiDi->openingsMemory!=nullptr) {
uprv_free(pBiDi->openingsMemory);
}
- if(pBiDi->parasMemory!=NULL) {
+ if(pBiDi->parasMemory!=nullptr) {
uprv_free(pBiDi->parasMemory);
}
- if(pBiDi->runsMemory!=NULL) {
+ if(pBiDi->runsMemory!=nullptr) {
uprv_free(pBiDi->runsMemory);
}
- if(pBiDi->isolatesMemory!=NULL) {
+ if(pBiDi->isolatesMemory!=nullptr) {
uprv_free(pBiDi->isolatesMemory);
}
- if(pBiDi->insertPoints.points!=NULL) {
+ if(pBiDi->insertPoints.points!=nullptr) {
uprv_free(pBiDi->insertPoints.points);
}
@@ -268,7 +268,7 @@ ubidi_close(UBiDi *pBiDi) {
U_CAPI void U_EXPORT2
ubidi_setInverse(UBiDi *pBiDi, UBool isInverse) {
- if(pBiDi!=NULL) {
+ if(pBiDi!=nullptr) {
pBiDi->isInverse=isInverse;
pBiDi->reorderingMode = isInverse ? UBIDI_REORDER_INVERSE_NUMBERS_AS_L
: UBIDI_REORDER_DEFAULT;
@@ -277,10 +277,10 @@ ubidi_setInverse(UBiDi *pBiDi, UBool isInverse) {
U_CAPI UBool U_EXPORT2
ubidi_isInverse(UBiDi *pBiDi) {
- if(pBiDi!=NULL) {
+ if(pBiDi!=nullptr) {
return pBiDi->isInverse;
} else {
- return FALSE;
+ return false;
}
}
@@ -300,8 +300,8 @@ ubidi_isInverse(UBiDi *pBiDi) {
* fallbacks for unsupported combinations.
*/
U_CAPI void U_EXPORT2
-ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode) {
- if ((pBiDi!=NULL) && (reorderingMode >= UBIDI_REORDER_DEFAULT)
+ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode) UPRV_NO_SANITIZE_UNDEFINED {
+ if ((pBiDi!=nullptr) && (reorderingMode >= UBIDI_REORDER_DEFAULT)
&& (reorderingMode < UBIDI_REORDER_COUNT)) {
pBiDi->reorderingMode = reorderingMode;
pBiDi->isInverse = (UBool)(reorderingMode == UBIDI_REORDER_INVERSE_NUMBERS_AS_L);
@@ -310,7 +310,7 @@ ubidi_setReorderingMode(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode) {
U_CAPI UBiDiReorderingMode U_EXPORT2
ubidi_getReorderingMode(UBiDi *pBiDi) {
- if (pBiDi!=NULL) {
+ if (pBiDi!=nullptr) {
return pBiDi->reorderingMode;
} else {
return UBIDI_REORDER_DEFAULT;
@@ -322,14 +322,14 @@ ubidi_setReorderingOptions(UBiDi *pBiDi, uint32_t reorderingOptions) {
if (reorderingOptions & UBIDI_OPTION_REMOVE_CONTROLS) {
reorderingOptions&=~UBIDI_OPTION_INSERT_MARKS;
}
- if (pBiDi!=NULL) {
+ if (pBiDi!=nullptr) {
pBiDi->reorderingOptions=reorderingOptions;
}
}
U_CAPI uint32_t U_EXPORT2
ubidi_getReorderingOptions(UBiDi *pBiDi) {
- if (pBiDi!=NULL) {
+ if (pBiDi!=nullptr) {
return pBiDi->reorderingOptions;
} else {
return 0;
@@ -337,14 +337,14 @@ ubidi_getReorderingOptions(UBiDi *pBiDi) {
}
U_CAPI UBiDiDirection U_EXPORT2
-ubidi_getBaseDirection(const UChar *text,
+ubidi_getBaseDirection(const char16_t *text,
int32_t length){
int32_t i;
UChar32 uchar;
UCharDirection dir;
- if( text==NULL || length<-1 ){
+ if( text==nullptr || length<-1 ){
return UBIDI_NEUTRAL;
}
@@ -373,7 +373,7 @@ int32_t length){
*/
static DirProp
firstL_R_AL(UBiDi *pBiDi) {
- const UChar *text=pBiDi->prologue;
+ const char16_t *text=pBiDi->prologue;
int32_t length=pBiDi->proLength;
int32_t i;
UChar32 uchar;
@@ -403,17 +403,17 @@ checkParaCount(UBiDi *pBiDi) {
int32_t count=pBiDi->paraCount;
if(pBiDi->paras==pBiDi->simpleParas) {
if(count<=SIMPLE_PARAS_COUNT)
- return TRUE;
+ return true;
if(!getInitialParasMemory(pBiDi, SIMPLE_PARAS_COUNT * 2))
- return FALSE;
+ return false;
pBiDi->paras=pBiDi->parasMemory;
uprv_memcpy(pBiDi->parasMemory, pBiDi->simpleParas, SIMPLE_PARAS_COUNT * sizeof(Para));
- return TRUE;
+ return true;
}
if(!getInitialParasMemory(pBiDi, count * 2))
- return FALSE;
+ return false;
pBiDi->paras=pBiDi->parasMemory;
- return TRUE;
+ return true;
}
/*
@@ -426,7 +426,7 @@ checkParaCount(UBiDi *pBiDi) {
*/
static UBool
getDirProps(UBiDi *pBiDi) {
- const UChar *text=pBiDi->text;
+ const char16_t *text=pBiDi->text;
DirProp *dirProps=pBiDi->dirPropsMemory; /* pBiDi->dirProps is const */
int32_t i=0, originalLength=pBiDi->originalLength;
@@ -579,8 +579,8 @@ getDirProps(UBiDi *pBiDi) {
}
if(i<originalLength) { /* B not last char in text */
pBiDi->paraCount++;
- if(checkParaCount(pBiDi)==FALSE) /* not enough memory for a new para entry */
- return FALSE;
+ if(checkParaCount(pBiDi)==false) /* not enough memory for a new para entry */
+ return false;
if(isDefaultLevel) {
pBiDi->paras[pBiDi->paraCount-1].level=defaultParaLevel;
state=SEEKING_STRONG_FOR_PARA;
@@ -636,7 +636,7 @@ getDirProps(UBiDi *pBiDi) {
}
pBiDi->flags=flags;
pBiDi->lastArabicPos=lastArabicPos;
- return TRUE;
+ return true;
}
/* determine the paragraph level at position index */
@@ -743,14 +743,14 @@ bracketProcessPDI(BracketData *bd) {
}
/* newly found opening bracket: create an openings entry */
-static UBool /* return TRUE if success */
-bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
+static UBool /* return true if success */
+bracketAddOpening(BracketData *bd, char16_t match, int32_t position) {
IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
Opening *pOpening;
if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */
UBiDi *pBiDi=bd->pBiDi;
if(!getInitialOpeningsMemory(pBiDi, pLastIsoRun->limit * 2))
- return FALSE;
+ return false;
if(bd->openings==bd->simpleOpenings)
uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings,
SIMPLE_OPENINGS_COUNT * sizeof(Opening));
@@ -764,7 +764,7 @@ bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
pOpening->contextPos=pLastIsoRun->contextPos;
pOpening->flags=0;
pLastIsoRun->limit++;
- return TRUE;
+ return true;
}
/* change N0c1 to N0c2 when a preceding bracket is assigned the embedding level */
@@ -804,7 +804,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) {
DirProp newProp;
pOpening=&bd->openings[openIdx];
direction=(UBiDiDirection)(pLastIsoRun->level&1);
- stable=TRUE; /* assume stable until proved otherwise */
+ stable=true; /* assume stable until proved otherwise */
/* The stable flag is set when brackets are paired and their
level is resolved and cannot be changed by what will be
@@ -873,7 +873,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) {
}
/* handle strong characters, digits and candidates for closing brackets */
-static UBool /* return TRUE if success */
+static UBool /* return true if success */
bracketProcessChar(BracketData *bd, int32_t position) {
IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
DirProp *dirProps, dirProp, newProp;
@@ -881,7 +881,7 @@ bracketProcessChar(BracketData *bd, int32_t position) {
dirProps=bd->pBiDi->dirProps;
dirProp=dirProps[position];
if(dirProp==ON) {
- UChar c, match;
+ char16_t c, match;
int32_t idx;
/* First see if it is a matching closing bracket. Hopefully, this is
more efficient than checking if it is a closing bracket at all */
@@ -912,13 +912,13 @@ bracketProcessChar(BracketData *bd, int32_t position) {
}
/* matching brackets are not overridden by LRO/RLO */
bd->pBiDi->levels[bd->openings[idx].position]&=~UBIDI_LEVEL_OVERRIDE;
- return TRUE;
+ return true;
}
/* We get here only if the ON character is not a matching closing
bracket or it is a case of N0d */
/* Now see if it is an opening bracket */
if(c)
- match= static_cast<UChar>(u_getBidiPairedBracket(c)); /* get the matching char */
+ match= static_cast<char16_t>(u_getBidiPairedBracket(c)); /* get the matching char */
else
match=0;
if(match!=c && /* has a matching char */
@@ -927,14 +927,14 @@ bracketProcessChar(BracketData *bd, int32_t position) {
create an opening entry for each synonym */
if(match==0x232A) { /* RIGHT-POINTING ANGLE BRACKET */
if(!bracketAddOpening(bd, 0x3009, position))
- return FALSE;
+ return false;
}
else if(match==0x3009) { /* RIGHT ANGLE BRACKET */
if(!bracketAddOpening(bd, 0x232A, position))
- return FALSE;
+ return false;
}
if(!bracketAddOpening(bd, match, position))
- return FALSE;
+ return false;
}
}
level=bd->pBiDi->levels[position];
@@ -998,7 +998,7 @@ bracketProcessChar(BracketData *bd, int32_t position) {
if(position>bd->openings[i].position)
bd->openings[i].flags|=flag;
}
- return TRUE;
+ return true;
}
/* perform (X1)..(X9) ------------------------------------------------------- */
@@ -1072,7 +1072,7 @@ static UBiDiDirection
resolveExplicitLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) {
DirProp *dirProps=pBiDi->dirProps;
UBiDiLevel *levels=pBiDi->levels;
- const UChar *text=pBiDi->text;
+ const char16_t *text=pBiDi->text;
int32_t i=0, length=pBiDi->length;
Flags flags=pBiDi->flags; /* collect all directionalities in the text */
@@ -1797,7 +1797,7 @@ addPoint(UBiDi *pBiDi, int32_t pos, int32_t flag)
if (pInsertPoints->capacity == 0)
{
pInsertPoints->points=static_cast<Point *>(uprv_malloc(sizeof(Point)*FIRSTALLOC));
- if (pInsertPoints->points == NULL)
+ if (pInsertPoints->points == nullptr)
{
pInsertPoints->errorCode=U_MEMORY_ALLOCATION_ERROR;
return;
@@ -1809,7 +1809,7 @@ addPoint(UBiDi *pBiDi, int32_t pos, int32_t flag)
Point * savePoints=pInsertPoints->points;
pInsertPoints->points=static_cast<Point *>(uprv_realloc(pInsertPoints->points,
pInsertPoints->capacity*2*sizeof(Point)));
- if (pInsertPoints->points == NULL)
+ if (pInsertPoints->points == nullptr)
{
pInsertPoints->points=savePoints;
pInsertPoints->errorCode=U_MEMORY_ALLOCATION_ERROR;
@@ -2068,7 +2068,7 @@ processPropertySeq(UBiDi *pBiDi, LevState *pLevState, uint8_t _prop,
*/
static DirProp
lastL_R_AL(UBiDi *pBiDi) {
- const UChar *text=pBiDi->prologue;
+ const char16_t *text=pBiDi->prologue;
int32_t length=pBiDi->proLength;
int32_t i;
UChar32 uchar;
@@ -2096,7 +2096,7 @@ lastL_R_AL(UBiDi *pBiDi) {
*/
static DirProp
firstL_R_AL_EN_AN(UBiDi *pBiDi) {
- const UChar *text=pBiDi->epilogue;
+ const char16_t *text=pBiDi->epilogue;
int32_t length=pBiDi->epiLength;
int32_t i;
UChar32 uchar;
@@ -2326,13 +2326,13 @@ adjustWSLevels(UBiDi *pBiDi) {
U_CAPI void U_EXPORT2
ubidi_setContext(UBiDi *pBiDi,
- const UChar *prologue, int32_t proLength,
- const UChar *epilogue, int32_t epiLength,
+ const char16_t *prologue, int32_t proLength,
+ const char16_t *epilogue, int32_t epiLength,
UErrorCode *pErrorCode) {
/* check the argument values */
RETURN_VOID_IF_NULL_OR_FAILING_ERRCODE(pErrorCode);
- if(pBiDi==NULL || proLength<-1 || epiLength<-1 ||
- (prologue==NULL && proLength!=0) || (epilogue==NULL && epiLength!=0)) {
+ if(pBiDi==nullptr || proLength<-1 || epiLength<-1 ||
+ (prologue==nullptr && proLength!=0) || (epilogue==nullptr && epiLength!=0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -2362,11 +2362,11 @@ setParaSuccess(UBiDi *pBiDi) {
#define BIDI_ABS(x) ((x)>=0 ? (x) : (-(x)))
static void
-setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length,
+setParaRunsOnly(UBiDi *pBiDi, const char16_t *text, int32_t length,
UBiDiLevel paraLevel, UErrorCode *pErrorCode) {
- int32_t *runsOnlyMemory = NULL;
+ int32_t *runsOnlyMemory = nullptr;
int32_t *visualMap;
- UChar *visualText;
+ char16_t *visualText;
int32_t saveLength, saveTrailingWSStart;
const UBiDiLevel *levels;
UBiDiLevel *saveLevels;
@@ -2381,17 +2381,17 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length,
pBiDi->reorderingMode=UBIDI_REORDER_DEFAULT;
if(length==0) {
- ubidi_setPara(pBiDi, text, length, paraLevel, NULL, pErrorCode);
+ ubidi_setPara(pBiDi, text, length, paraLevel, nullptr, pErrorCode);
goto cleanup3;
}
/* obtain memory for mapping table and visual text */
- runsOnlyMemory=static_cast<int32_t *>(uprv_malloc(length*(sizeof(int32_t)+sizeof(UChar)+sizeof(UBiDiLevel))));
- if(runsOnlyMemory==NULL) {
+ runsOnlyMemory=static_cast<int32_t *>(uprv_malloc(length*(sizeof(int32_t)+sizeof(char16_t)+sizeof(UBiDiLevel))));
+ if(runsOnlyMemory==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
goto cleanup3;
}
visualMap=runsOnlyMemory;
- visualText=(UChar *)&visualMap[length];
+ visualText=(char16_t *)&visualMap[length];
saveLevels=(UBiDiLevel *)&visualText[length];
saveOptions=pBiDi->reorderingOptions;
if(saveOptions & UBIDI_OPTION_INSERT_MARKS) {
@@ -2399,7 +2399,7 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length,
pBiDi->reorderingOptions|=UBIDI_OPTION_REMOVE_CONTROLS;
}
paraLevel&=1; /* accept only 0 or 1 */
- ubidi_setPara(pBiDi, text, length, paraLevel, NULL, pErrorCode);
+ ubidi_setPara(pBiDi, text, length, paraLevel, nullptr, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
goto cleanup3;
}
@@ -2432,12 +2432,12 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length,
* than the original text. But we don't want the levels memory to be
* reallocated shorter than the original length, since we need to restore
* the levels as after the first call to ubidi_setpara() before returning.
- * We will force mayAllocateText to FALSE before the second call to
+ * We will force mayAllocateText to false before the second call to
* ubidi_setpara(), and will restore it afterwards.
*/
saveMayAllocateText=pBiDi->mayAllocateText;
- pBiDi->mayAllocateText=FALSE;
- ubidi_setPara(pBiDi, visualText, visualLength, paraLevel, NULL, pErrorCode);
+ pBiDi->mayAllocateText=false;
+ ubidi_setPara(pBiDi, visualText, visualLength, paraLevel, nullptr, pErrorCode);
pBiDi->mayAllocateText=saveMayAllocateText;
ubidi_getRuns(pBiDi, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
@@ -2551,7 +2551,7 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length,
/* ubidi_setPara ------------------------------------------------------------ */
U_CAPI void U_EXPORT2
-ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
+ubidi_setPara(UBiDi *pBiDi, const char16_t *text, int32_t length,
UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels,
UErrorCode *pErrorCode) {
UBiDiDirection direction;
@@ -2559,7 +2559,7 @@ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
/* check the argument values */
RETURN_VOID_IF_NULL_OR_FAILING_ERRCODE(pErrorCode);
- if(pBiDi==NULL || text==NULL || length<-1 ||
+ if(pBiDi==nullptr || text==nullptr || length<-1 ||
(paraLevel>UBIDI_MAX_EXPLICIT_LEVEL && paraLevel<UBIDI_DEFAULT_LTR)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
@@ -2576,16 +2576,16 @@ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
}
/* initialize the UBiDi structure */
- pBiDi->pParaBiDi=NULL; /* mark unfinished setPara */
+ pBiDi->pParaBiDi=nullptr; /* mark unfinished setPara */
pBiDi->text=text;
pBiDi->length=pBiDi->originalLength=pBiDi->resultLength=length;
pBiDi->paraLevel=paraLevel;
pBiDi->direction=(UBiDiDirection)(paraLevel&1);
pBiDi->paraCount=1;
- pBiDi->dirProps=NULL;
- pBiDi->levels=NULL;
- pBiDi->runs=NULL;
+ pBiDi->dirProps=nullptr;
+ pBiDi->levels=nullptr;
+ pBiDi->runs=nullptr;
pBiDi->insertPoints.size=0; /* clean up from last call */
pBiDi->insertPoints.confirmed=0; /* clean up from last call */
@@ -2640,7 +2640,7 @@ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
pBiDi->trailingWSStart=length; /* the levels[] will reflect the WS run */
/* are explicit levels specified? */
- if(embeddingLevels==NULL) {
+ if(embeddingLevels==nullptr) {
/* no: determine explicit levels according to the (Xn) rules */\
if(getLevelsMemory(pBiDi, length)) {
pBiDi->levels=pBiDi->levelsMemory;
@@ -2737,7 +2737,7 @@ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
* Examples for "insignificant" ones are empty embeddings
* LRE-PDF, LRE-RLE-PDF-PDF, etc.
*/
- if(embeddingLevels==NULL && pBiDi->paraCount<=1 &&
+ if(embeddingLevels==nullptr && pBiDi->paraCount<=1 &&
!(pBiDi->flags&DIRPROP_FLAG_MULTI_RUNS)) {
resolveImplicitLevels(pBiDi, 0, length,
GET_LR_FROM_LEVEL(GET_PARALEVEL(pBiDi, 0)),
@@ -2856,17 +2856,17 @@ ubidi_setPara(UBiDi *pBiDi, const UChar *text, int32_t length,
U_CAPI void U_EXPORT2
ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR) {
- if(pBiDi!=NULL) {
+ if(pBiDi!=nullptr) {
pBiDi->orderParagraphsLTR=orderParagraphsLTR;
}
}
U_CAPI UBool U_EXPORT2
ubidi_isOrderParagraphsLTR(UBiDi *pBiDi) {
- if(pBiDi!=NULL) {
+ if(pBiDi!=nullptr) {
return pBiDi->orderParagraphsLTR;
} else {
- return FALSE;
+ return false;
}
}
@@ -2879,12 +2879,12 @@ ubidi_getDirection(const UBiDi *pBiDi) {
}
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
ubidi_getText(const UBiDi *pBiDi) {
if(IS_VALID_PARA_OR_LINE(pBiDi)) {
return pBiDi->text;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -2952,13 +2952,13 @@ ubidi_getParagraphByIndex(const UBiDi *pBiDi, int32_t paraIndex,
} else {
paraStart=0;
}
- if(pParaStart!=NULL) {
+ if(pParaStart!=nullptr) {
*pParaStart=paraStart;
}
- if(pParaLimit!=NULL) {
+ if(pParaLimit!=nullptr) {
*pParaLimit=pBiDi->paras[paraIndex].limit;
}
- if(pParaLevel!=NULL) {
+ if(pParaLevel!=nullptr) {
*pParaLevel=GET_PARALEVEL(pBiDi, paraStart);
}
}
@@ -2987,7 +2987,7 @@ ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn,
const void **oldContext, UErrorCode *pErrorCode)
{
RETURN_VOID_IF_NULL_OR_FAILING_ERRCODE(pErrorCode);
- if(pBiDi==NULL) {
+ if(pBiDi==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -3006,7 +3006,7 @@ ubidi_setClassCallback(UBiDi *pBiDi, UBiDiClassCallback *newFn,
U_CAPI void U_EXPORT2
ubidi_getClassCallback(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context)
{
- if(pBiDi==NULL) {
+ if(pBiDi==nullptr) {
return;
}
if( fn )
@@ -3024,7 +3024,7 @@ ubidi_getCustomizedClass(UBiDi *pBiDi, UChar32 c)
{
UCharDirection dir;
- if( pBiDi->fnClassCallback == NULL ||
+ if( pBiDi->fnClassCallback == nullptr ||
(dir = (*pBiDi->fnClassCallback)(pBiDi->coClassCallback, c)) == U_BIDI_CLASS_DEFAULT )
{
dir = ubidi_getClass(c);
diff --git a/contrib/libs/icu/common/ubidi_props.cpp b/contrib/libs/icu/common/ubidi_props.cpp
index afcc4aaf4f9..8f3f6a65c4b 100644
--- a/contrib/libs/icu/common/ubidi_props.cpp
+++ b/contrib/libs/icu/common/ubidi_props.cpp
@@ -53,7 +53,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32
/* add the start code point to the USet */
const USetAdder *sa=(const USetAdder *)context;
sa->add(sa->set, start);
- return TRUE;
+ return true;
}
U_CFUNC void
@@ -69,7 +69,7 @@ ubidi_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) {
}
/* add the start code point of each same-value range of the trie */
- utrie2_enum(&ubidi_props_singleton.trie, NULL, _enumPropertyStartsRange, sa);
+ utrie2_enum(&ubidi_props_singleton.trie, nullptr, _enumPropertyStartsRange, sa);
/* add the code points from the bidi mirroring table */
length=ubidi_props_singleton.indexes[UBIDI_IX_MIRROR_LENGTH];
diff --git a/contrib/libs/icu/common/ubidi_props_data.h b/contrib/libs/icu/common/ubidi_props_data.h
index aad919fa2ef..5dcd1d7c781 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={0xe,0,0,0};
+static const UVersionInfo ubidi_props_dataVersion={0xf,0,0,0};
-static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6a98,0x64a8,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6};
+static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6bc0,0x65d0,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6};
-static const uint16_t ubidi_props_trieIndex[12876]={
+static const uint16_t ubidi_props_trieIndex[13024]={
0x387,0x38f,0x397,0x39f,0x3b7,0x3bf,0x3c7,0x3cf,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,
0x3a7,0x3af,0x3a7,0x3af,0x3d5,0x3dd,0x3e5,0x3ed,0x3f5,0x3fd,0x3f9,0x401,0x409,0x411,0x40c,0x414,
0x3a7,0x3af,0x3a7,0x3af,0x41c,0x424,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x42a,0x432,0x43a,0x442,
@@ -185,61 +185,61 @@ static const uint16_t ubidi_props_trieIndex[12876]={
0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9a6,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,
0x9ae,0x9b2,0x43c,0x43c,0x43c,0x43c,0x9c2,0x9ba,0x43c,0x9ca,0x43c,0x43c,0x9d2,0x9d8,0x43c,0x43c,
0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9e8,0x9e0,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,
-0x43c,0x43c,0x43c,0x9f0,0x43c,0x9f8,0x43c,0x43c,0x43c,0x9fc,0xa03,0xa09,0xa11,0xa15,0xa1d,0x43c,
-0x51b,0xa25,0xa2c,0xa33,0x41e,0xa3b,0x569,0x3a7,0x501,0xa42,0x3a7,0xa48,0x41e,0xa4d,0xa55,0x3a7,
-0x3a7,0xa5a,0x3a7,0x3a7,0x3a7,0x3a7,0x836,0xa62,0x41e,0x5a3,0x57e,0xa69,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0xa25,0xa71,0x3a7,0x3a7,0xa79,0xa81,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa85,0xa8d,0x3a7,
-0x3a7,0xa95,0x57e,0xa9d,0x3a7,0xaa3,0x3a7,0x3a7,0x60f,0xaab,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0xab0,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xab7,0xabf,0x3a7,0x3a7,0x3a7,0xac2,0x57e,0xaca,
-0xace,0xad6,0x3a7,0xadd,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0xae4,0x3a7,0x3a7,0xaf2,0xaec,0x3a7,0x3a7,0x3a7,0xafa,0xb02,0x3a7,0xb06,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x5a5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb13,0xb0e,0x3a7,
+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,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0xb1b,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb22,
-0x3a7,0xb28,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,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0xa49,0x3a7,0xb2e,0x3a7,0x3a7,0xb36,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,0x3a7,0x3a7,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,0xb3e,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,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,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,0xb46,0x500,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0xb4e,0xb56,0xb5c,0x3a7,0xb62,0x67c,0x67c,0xb6a,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x67c,0x67c,0xb72,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb78,
-0x3a7,0xb7f,0x3a7,0xb7b,0x3a7,0xb82,0x3a7,0xb8a,0xb8e,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xb96,0x3f5,0xb9d,0xba4,0xbac,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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xbb4,0xbbc,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0xb28,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa75,0x3a7,
-0xbc1,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,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,0xbc9,
-0x43c,0xbd1,0xbd1,0xbd8,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,
+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,0xbe0,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,
-0xbe8,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xbf0,0x67c,0x67c,0x67f,0xbf5,0xbf9,
-0x858,0xc01,0x3c9,0x3a7,0xc07,0x3a7,0xc0c,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7,
+0x43c,0x4a6,0x4a6,0xc03,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,
+0xc0b,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xc13,0x67c,0x67c,0x67f,0xc18,0xc1c,
+0x858,0xc24,0x3c9,0x3a7,0xc2a,0x3a7,0xc2f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7,
0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,
-0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0xc14,
-0x98f,0x67c,0x67c,0x67c,0x67f,0x67c,0x67c,0xc1c,0xc24,0xbf0,0x67c,0xc2c,0x67c,0xc34,0xc39,0x3a7,
-0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67f,0xc41,0xc4d,0xc52,0xc5a,
-0xc49,0x67c,0x67c,0x67c,0x67c,0xc62,0x67c,0x792,0xc6a,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
+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,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc71,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,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,
-0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc71,0xc81,0xc79,0xc79,0xc79,0xc82,0xc82,0xc82,
-0xc82,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xc8a,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
-0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
-0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
-0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,
-0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0xc82,0x386,0x386,0x386,0x12,0x12,0x12,0x12,
+0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc96,0xca6,0xc9e,0xc9e,0xc9e,0xca7,0xca7,0xca7,
+0xca7,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xcaf,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
+0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
+0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
+0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,
+0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0x386,0x386,0x386,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,8,7,8,9,7,0x12,0x12,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,7,7,7,8,9,0xa,0xa,4,
4,4,0xa,0xa,0x310a,0xf20a,0xa,3,6,3,6,6,2,2,2,2,
@@ -384,7 +384,7 @@ static const uint16_t ubidi_props_trieIndex[12876]={
0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
0xb1,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0xb1,0,0xb1,0,0xb1,0x310a,0xf20a,0x310a,0xf20a,0,0,
@@ -654,6 +654,9 @@ static const uint16_t ubidi_props_trieIndex[12876]={
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,
1,1,1,1,1,1,1,1,1,1,1,0xb1,0xb1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,
+0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xb1,0xb1,0xb1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0x4d,0x4d,0x4d,0x8d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
0x4d,0xd,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x4d,0x4d,0x4d,
0x8d,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,
@@ -721,104 +724,110 @@ static const uint16_t ubidi_props_trieIndex[12876]={
0,0,0xb1,0,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0xb1,0xb1,0,0,0,0xb1,0,0xb1,
+0,0,0,0,0,0,0,0,0xb1,0,0xb1,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,4,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,0,0,0,0,
0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,4,4,4,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0xa0,0xa0,0xa0,0xa0,
-0xa0,0xa0,0xa0,0xa0,0xa0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,
+0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xb1,0,0,0,
+0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0xa,0,0xb1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0xa,0,0xb1,0,0,0,
+0,0,0,0,0xb2,0xb2,0xb2,0xb2,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,0xb2,0xb2,0xb2,0xb2,0,0,0,0,
+0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0,0,
+0,0,0,0,0,0,0,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb1,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0xb1,
-0xb1,0xb1,0,0,0,0,0,0,0,0,0,0xb2,0xb2,0xb2,0xb2,0xb2,
-0xb2,0xb2,0xb2,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,
+0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0xa,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0xa,0xa,0xb1,0xb1,0xb1,0xa,0,0,
+0,0,0,0,0xa,0xa,0xb1,0xb1,0xb1,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,0,0,0xa,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,0xa,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,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0x100a,0,0,0,0,
+0,0,0,0,0,0,0,0x100a,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0x100a,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0x100a,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,0x100a,0,0,0,0,
-0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,
+0,0,0,0,0,0,0,0x100a,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,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,
-0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0,0,0,0,0,0,0,0,0xb1,0,0,0,0,0,0,
-0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,
-0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,
+2,2,2,2,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0xb1,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,
+0,0,0,0,0,0xb1,0,0,0,0,0,0,0,0,0,0,
+0xb1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0,0xb1,
+0xb1,0,0xb1,0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0xb1,0xb1,0xb1,0xb1,
+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,0xb1,0xb1,0xb1,0xb1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0xb1,0xb1,0xb1,0xb1,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1,1,1,1,1,
-1,1,1,1,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
-0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
-0x41,0x41,0x41,0x41,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,
-0xa,0xa,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0xa,0xa,2,2,2,2,2,2,2,2,2,2,2,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,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0xa,0,0,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,1,1,1,1,1,1,1,1,1,
+0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
+0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xa1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,0xd,0xd,0xd,0xd,
+0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,1,0xd,0xd,0xd,0xd,
+0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa,0xd,0xd,
+0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,
+0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
+0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
+2,2,2,2,2,2,2,2,2,2,2,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,0,0,0,0,0,0,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,0xa,0xa,0xa,0xa,
0xa,0xa,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,0xa,0xa,0xa,
-0xa,0xa,0xa,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,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,
-0xa,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0,0,0xa,0xa,0,0,0,0,0,0,0,0,0,0,
+0xa,0xa,0xa,0xa,0,0,0,0,0xa,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,0xa,0xa,0xa,0xa,0xa,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,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0,0,0,0xa,0xa,0xa,0xa,
-0xa,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,
-0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,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,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,
+0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,
+0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,
0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0xa,0xa,0xa,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0xa,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0,0,
+0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
-0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,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,2,2,2,2,2,2,2,2,
-2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0xa,0xa,0xa,0xa,0xa,0xa,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0xa,0xa,0xa,0xa,0xa,
+0xa,0xa,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0xa,0xa,0xa,0xa,
+0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,
+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,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,0,0,0,0,0,0,0,0,0,
-0,0,0x12,0x12,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,
+0,0,0,0,0,0,0x12,0x12,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,
0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,
-0xb2,0xb2,0xb2,0xb2,0x12,0xb2,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0x12,0xb2,0x12,0x12,0x12,0x12,0x12,0x12,
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
-0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
-0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0,0,0
+0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xb1,0xb1,0xb1,0xb1,
+0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0x12,0x12,0x12,0x12,
+0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0,0,0
};
static const uint32_t ubidi_props_mirrors[40]={
@@ -916,7 +925,7 @@ static const uint8_t ubidi_props_jgArray2[612]={
};
static const UBiDiProps ubidi_props_singleton={
- NULL,
+ nullptr,
ubidi_props_indexes,
ubidi_props_mirrors,
ubidi_props_jgArray,
@@ -924,16 +933,16 @@ static const UBiDiProps ubidi_props_singleton={
{
ubidi_props_trieIndex,
ubidi_props_trieIndex+3612,
- NULL,
+ nullptr,
3612,
- 9264,
+ 9412,
0x1a0,
0xe9c,
0x0,
0x0,
0x110000,
- 0x3248,
- NULL, 0, FALSE, FALSE, 0, NULL
+ 0x32dc,
+ 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 fea239380a3..63c4f9190a9 100644
--- a/contrib/libs/icu/common/ubidiln.cpp
+++ b/contrib/libs/icu/common/ubidiln.cpp
@@ -37,7 +37,7 @@
* This means that there is a UBiDi object with a levels
* and a dirProps array.
* paraLevel and direction are also set.
- * Only if the length of the text is zero, then levels==dirProps==NULL.
+ * Only if the length of the text is zero, then levels==dirProps==nullptr.
*
* The overall directionality of the paragraph
* or line is used to bypass the reordering steps if possible.
@@ -101,7 +101,7 @@ setTrailingWSStart(UBiDi *pBiDi) {
are already set to paragraph level.
Setting trailingWSStart to pBidi->length will avoid changing the
level of B chars from 0 to paraLevel in ubidi_getLevels when
- orderParagraphsLTR==TRUE.
+ orderParagraphsLTR==true.
*/
if(dirProps[start-1]==B) {
pBiDi->trailingWSStart=start; /* currently == pBiDi->length */
@@ -134,25 +134,25 @@ ubidi_setLine(const UBiDi *pParaBiDi,
RETURN_VOID_IF_NOT_VALID_PARA(pParaBiDi, *pErrorCode);
RETURN_VOID_IF_BAD_RANGE(start, 0, limit, *pErrorCode);
RETURN_VOID_IF_BAD_RANGE(limit, 0, pParaBiDi->length+1, *pErrorCode);
- if(pLineBiDi==NULL) {
+ if(pLineBiDi==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- if(ubidi_getParagraph(pParaBiDi, start, NULL, NULL, NULL, pErrorCode) !=
- ubidi_getParagraph(pParaBiDi, limit-1, NULL, NULL, NULL, pErrorCode)) {
+ if(ubidi_getParagraph(pParaBiDi, start, nullptr, nullptr, nullptr, pErrorCode) !=
+ ubidi_getParagraph(pParaBiDi, limit-1, nullptr, nullptr, nullptr, pErrorCode)) {
/* the line crosses a paragraph boundary */
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
/* set the values in pLineBiDi from its pParaBiDi parent */
- pLineBiDi->pParaBiDi=NULL; /* mark unfinished setLine */
+ pLineBiDi->pParaBiDi=nullptr; /* mark unfinished setLine */
pLineBiDi->text=pParaBiDi->text+start;
length=pLineBiDi->length=limit-start;
pLineBiDi->resultLength=pLineBiDi->originalLength=length;
pLineBiDi->paraLevel=GET_PARALEVEL(pParaBiDi, start);
pLineBiDi->paraCount=pParaBiDi->paraCount;
- pLineBiDi->runs=NULL;
+ pLineBiDi->runs=nullptr;
pLineBiDi->flags=0;
pLineBiDi->reorderingMode=pParaBiDi->reorderingMode;
pLineBiDi->reorderingOptions=pParaBiDi->reorderingOptions;
@@ -263,11 +263,11 @@ U_CAPI const UBiDiLevel * U_EXPORT2
ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) {
int32_t start, length;
- RETURN_IF_NULL_OR_FAILING_ERRCODE(pErrorCode, NULL);
- RETURN_IF_NOT_VALID_PARA_OR_LINE(pBiDi, *pErrorCode, NULL);
+ RETURN_IF_NULL_OR_FAILING_ERRCODE(pErrorCode, nullptr);
+ RETURN_IF_NOT_VALID_PARA_OR_LINE(pBiDi, *pErrorCode, nullptr);
if((length=pBiDi->length)<=0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if((start=pBiDi->trailingWSStart)==length) {
/* the current levels array reflects the WS run */
@@ -297,7 +297,7 @@ ubidi_getLevels(UBiDi *pBiDi, UErrorCode *pErrorCode) {
} else {
/* out of memory */
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
}
@@ -373,10 +373,10 @@ ubidi_getVisualRun(UBiDi *pBiDi, int32_t runIndex,
RETURN_IF_BAD_RANGE(runIndex, 0, pBiDi->runCount, errorCode, UBIDI_LTR);
start=pBiDi->runs[runIndex].logicalStart;
- if(pLogicalStart!=NULL) {
+ if(pLogicalStart!=nullptr) {
*pLogicalStart=GET_INDEX(start);
}
- if(pLength!=NULL) {
+ if(pLength!=nullptr) {
if(runIndex>0) {
*pLength=pBiDi->runs[runIndex].visualLimit-
pBiDi->runs[runIndex-1].visualLimit;
@@ -535,7 +535,7 @@ static int32_t getRunFromLogicalIndex(UBiDi *pBiDi, int32_t logicalIndex) {
/*
* Compute the runs array from the levels array.
- * After ubidi_getRuns() returns TRUE, runCount is guaranteed to be >0
+ * After ubidi_getRuns() returns true, runCount is guaranteed to be >0
* and the runs are reordered.
* Odd-level runs have visualStart on their visual right edge and
* they progress visually to the left.
@@ -551,7 +551,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
* includes the case of length==0 (handled in setPara)..
*/
if (pBiDi->runCount>=0) {
- return TRUE;
+ return true;
}
if(pBiDi->direction!=UBIDI_MIXED) {
@@ -608,7 +608,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
if(getRunsMemory(pBiDi, runCount)) {
runs=pBiDi->runsMemory;
} else {
- return FALSE;
+ return false;
}
/* set the runs */
@@ -694,7 +694,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
/* handle remove BiDi control characters */
if(pBiDi->controlCount>0) {
int32_t runIndex;
- const UChar *start=pBiDi->text, *limit=start+pBiDi->length, *pu;
+ const char16_t *start=pBiDi->text, *limit=start+pBiDi->length, *pu;
for(pu=start; pu<limit; pu++) {
if(IS_BIDI_CONTROL_CHAR(*pu)) {
runIndex=getRunFromLogicalIndex(pBiDi, (int32_t)(pu-start));
@@ -703,7 +703,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) {
}
}
- return TRUE;
+ return true;
}
static UBool
@@ -713,8 +713,8 @@ prepareReorder(const UBiDiLevel *levels, int32_t length,
int32_t start;
UBiDiLevel level, minLevel, maxLevel;
- if(levels==NULL || length<=0) {
- return FALSE;
+ if(levels==nullptr || length<=0) {
+ return false;
}
/* determine minLevel and maxLevel */
@@ -723,7 +723,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length,
for(start=length; start>0;) {
level=levels[--start];
if(level>UBIDI_MAX_EXPLICIT_LEVEL+1) {
- return FALSE;
+ return false;
}
if(level<minLevel) {
minLevel=level;
@@ -741,7 +741,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length,
indexMap[start]=start;
}
- return TRUE;
+ return true;
}
/* reorder a line based on a levels array (L2) ------------------------------ */
@@ -751,7 +751,7 @@ ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap
int32_t start, limit, sumOfSosEos;
UBiDiLevel minLevel = 0, maxLevel = 0;
- if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
+ if(indexMap==nullptr || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
return;
}
@@ -814,7 +814,7 @@ ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap)
int32_t start, end, limit, temp;
UBiDiLevel minLevel = 0, maxLevel = 0;
- if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
+ if(indexMap==nullptr || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
return;
}
@@ -941,7 +941,7 @@ ubidi_getVisualIndex(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode)
Run *runs=pBiDi->runs;
int32_t i, j, start, limit, length, insertRemove;
int32_t visualStart=0, controlFound=0;
- UChar uchar=pBiDi->text[logicalIndex];
+ char16_t uchar=pBiDi->text[logicalIndex];
/* is the logical index pointing to a control ? */
if(IS_BIDI_CONTROL_CHAR(uchar)) {
return UBIDI_MAP_NOWHERE;
@@ -1036,7 +1036,7 @@ ubidi_getLogicalIndex(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode)
/* handle removed BiDi control characters */
int32_t controlFound=0, insertRemove, length;
int32_t logicalStart, logicalEnd, visualStart=0, j, k;
- UChar uchar;
+ char16_t uchar;
UBool evenRun;
/* add number of controls until visual index */
for(i=0; ; i++, visualStart+=length) {
@@ -1113,7 +1113,7 @@ ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) {
ubidi_countRuns(pBiDi, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
/* no op */
- } else if(indexMap==NULL) {
+ } else if(indexMap==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
} else {
/* fill a logical-to-visual index map using the runs[] */
@@ -1171,7 +1171,7 @@ ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) {
int32_t controlFound=0, runCount=pBiDi->runCount;
int32_t length, insertRemove;
UBool evenRun;
- UChar uchar;
+ char16_t uchar;
visualStart=0;
/* subtract number of controls found until each index */
for(i=0; i<runCount; i++, visualStart+=length) {
@@ -1210,7 +1210,7 @@ ubidi_getLogicalMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) {
U_CAPI void U_EXPORT2
ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) {
RETURN_VOID_IF_NULL_OR_FAILING_ERRCODE(pErrorCode);
- if(indexMap==NULL) {
+ if(indexMap==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1277,7 +1277,7 @@ ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) {
else if(pBiDi->controlCount>0) {
int32_t runCount=pBiDi->runCount, logicalEnd;
int32_t insertRemove, length, i, j, k, m;
- UChar uchar;
+ char16_t uchar;
UBool evenRun;
runs=pBiDi->runs;
visualStart=0;
@@ -1317,7 +1317,7 @@ ubidi_getVisualMap(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode) {
U_CAPI void U_EXPORT2
ubidi_invertMap(const int32_t *srcMap, int32_t *destMap, int32_t length) {
- if(srcMap!=NULL && destMap!=NULL && length>0) {
+ if(srcMap!=nullptr && destMap!=nullptr && length>0) {
const int32_t *pi;
int32_t destLength=-1, count=0;
/* find highest value and count positive indexes in srcMap */
diff --git a/contrib/libs/icu/common/ubiditransform.cpp b/contrib/libs/icu/common/ubiditransform.cpp
index d56bf1518bf..01f5901a2c2 100644
--- a/contrib/libs/icu/common/ubiditransform.cpp
+++ b/contrib/libs/icu/common/ubiditransform.cpp
@@ -78,8 +78,8 @@ typedef struct {
struct UBiDiTransform {
UBiDi *pBidi; /* pointer to a UBiDi object */
const ReorderingScheme *pActiveScheme; /* effective reordering scheme */
- UChar *src; /* input text */
- UChar *dest; /* output text */
+ char16_t *src; /* input text */
+ char16_t *dest; /* output text */
uint32_t srcLength; /* input text length - not really needed as we are zero-terminated and can u_strlen */
uint32_t srcSize; /* input text capacity excluding the trailing zero */
uint32_t destSize; /* output text capacity */
@@ -92,10 +92,10 @@ struct UBiDiTransform {
U_CAPI UBiDiTransform* U_EXPORT2
ubiditransform_open(UErrorCode *pErrorCode)
{
- UBiDiTransform *pBiDiTransform = NULL;
+ UBiDiTransform *pBiDiTransform = nullptr;
if (U_SUCCESS(*pErrorCode)) {
pBiDiTransform = (UBiDiTransform*) uprv_calloc(1, sizeof(UBiDiTransform));
- if (pBiDiTransform == NULL) {
+ if (pBiDiTransform == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -105,11 +105,11 @@ ubiditransform_open(UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2
ubiditransform_close(UBiDiTransform *pBiDiTransform)
{
- if (pBiDiTransform != NULL) {
- if (pBiDiTransform->pBidi != NULL) {
+ if (pBiDiTransform != nullptr) {
+ if (pBiDiTransform->pBidi != nullptr) {
ubidi_close(pBiDiTransform->pBidi);
}
- if (pBiDiTransform->src != NULL) {
+ if (pBiDiTransform->src != nullptr) {
uprv_free(pBiDiTransform->src);
}
uprv_free(pBiDiTransform);
@@ -129,8 +129,8 @@ static UBool
action_resolve(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
ubidi_setPara(pTransform->pBidi, pTransform->src, pTransform->srcLength,
- pTransform->pActiveScheme->baseLevel, NULL, pErrorCode);
- return FALSE;
+ pTransform->pActiveScheme->baseLevel, nullptr, pErrorCode);
+ return false;
}
/**
@@ -150,7 +150,7 @@ action_reorder(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
*pTransform->pDestLength = pTransform->srcLength;
pTransform->reorderingOptions = UBIDI_REORDER_DEFAULT;
- return TRUE;
+ return true;
}
/**
@@ -166,9 +166,9 @@ static UBool
action_setInverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
(void)pErrorCode;
- ubidi_setInverse(pTransform->pBidi, TRUE);
+ ubidi_setInverse(pTransform->pBidi, true);
ubidi_setReorderingMode(pTransform->pBidi, UBIDI_REORDER_INVERSE_LIKE_DIRECT);
- return FALSE;
+ return false;
}
/**
@@ -186,7 +186,7 @@ action_setRunsOnly(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
(void)pErrorCode;
ubidi_setReorderingMode(pTransform->pBidi, UBIDI_REORDER_RUNS_ONLY);
- return FALSE;
+ return false;
}
/**
@@ -205,7 +205,7 @@ action_reverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
pTransform->dest, pTransform->destSize,
UBIDI_REORDER_DEFAULT, pErrorCode);
*pTransform->pDestLength = pTransform->srcLength;
- return TRUE;
+ return true;
}
/**
@@ -215,12 +215,12 @@ action_reverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
*
* @param pTransform A pointer to the <code>UBiDiTransform</code> structure.
* @param newSrc A pointer whose value is to be used as input text.
- * @param newLength A length of the new text in <code>UChar</code>s.
- * @param newSize A new source capacity in <code>UChar</code>s.
+ * @param newLength A length of the new text in <code>char16_t</code>s.
+ * @param newSize A new source capacity in <code>char16_t</code>s.
* @param pErrorCode Pointer to the error code value.
*/
static void
-updateSrc(UBiDiTransform *pTransform, const UChar *newSrc, uint32_t newLength,
+updateSrc(UBiDiTransform *pTransform, const char16_t *newSrc, uint32_t newLength,
uint32_t newSize, UErrorCode *pErrorCode)
{
if (newSize < newLength) {
@@ -229,12 +229,12 @@ updateSrc(UBiDiTransform *pTransform, const UChar *newSrc, uint32_t newLength,
}
if (newSize > pTransform->srcSize) {
newSize += 50; // allocate slightly more than needed right now
- if (pTransform->src != NULL) {
+ if (pTransform->src != nullptr) {
uprv_free(pTransform->src);
- pTransform->src = NULL;
+ pTransform->src = nullptr;
}
- pTransform->src = (UChar *)uprv_malloc(newSize * sizeof(UChar));
- if (pTransform->src == NULL) {
+ pTransform->src = (char16_t *)uprv_malloc(newSize * sizeof(char16_t));
+ if (pTransform->src == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
//pTransform->srcLength = pTransform->srcSize = 0;
return;
@@ -274,7 +274,7 @@ static UBool
action_shapeArabic(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
{
if ((pTransform->letters | pTransform->digits) == 0) {
- return FALSE;
+ return false;
}
if (pTransform->pActiveScheme->lettersDir == pTransform->pActiveScheme->digitsDir) {
doShape(pTransform, pTransform->letters | pTransform->digits | pTransform->pActiveScheme->lettersDir,
@@ -288,7 +288,7 @@ action_shapeArabic(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
pErrorCode);
}
}
- return TRUE;
+ return true;
}
/**
@@ -306,11 +306,11 @@ action_mirror(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
UChar32 c;
uint32_t i = 0, j = 0;
if (0 == (pTransform->reorderingOptions & UBIDI_DO_MIRRORING)) {
- return FALSE;
+ return false;
}
if (pTransform->destSize < pTransform->srcLength) {
*pErrorCode = U_BUFFER_OVERFLOW_ERROR;
- return FALSE;
+ return false;
}
do {
UBool isOdd = ubidi_getLevelAt(pTransform->pBidi, i) & 1;
@@ -320,7 +320,7 @@ action_mirror(UBiDiTransform *pTransform, UErrorCode *pErrorCode)
*pTransform->pDestLength = pTransform->srcLength;
pTransform->reorderingOptions = UBIDI_REORDER_DEFAULT;
- return TRUE;
+ return true;
}
/**
@@ -331,52 +331,52 @@ static const ReorderingScheme Schemes[] =
{
/* 0: Logical LTR => Visual LTR */
{LTR, LOGICAL, LTR, VISUAL, SHAPE_LOGICAL, SHAPE_LOGICAL, LTR,
- {action_shapeArabic, action_resolve, action_reorder, NULL}},
+ {action_shapeArabic, action_resolve, action_reorder, nullptr}},
/* 1: Logical RTL => Visual LTR */
{RTL, LOGICAL, LTR, VISUAL, SHAPE_LOGICAL, SHAPE_VISUAL, RTL,
- {action_resolve, action_reorder, action_shapeArabic, NULL}},
+ {action_resolve, action_reorder, action_shapeArabic, nullptr}},
/* 2: Logical LTR => Visual RTL */
{LTR, LOGICAL, RTL, VISUAL, SHAPE_LOGICAL, SHAPE_LOGICAL, LTR,
- {action_shapeArabic, action_resolve, action_reorder, action_reverse, NULL}},
+ {action_shapeArabic, action_resolve, action_reorder, action_reverse, nullptr}},
/* 3: Logical RTL => Visual RTL */
{RTL, LOGICAL, RTL, VISUAL, SHAPE_LOGICAL, SHAPE_VISUAL, RTL,
- {action_resolve, action_reorder, action_shapeArabic, action_reverse, NULL}},
+ {action_resolve, action_reorder, action_shapeArabic, action_reverse, nullptr}},
/* 4: Visual LTR => Logical RTL */
{LTR, VISUAL, RTL, LOGICAL, SHAPE_LOGICAL, SHAPE_VISUAL, RTL,
- {action_shapeArabic, action_setInverse, action_resolve, action_reorder, NULL}},
+ {action_shapeArabic, action_setInverse, action_resolve, action_reorder, nullptr}},
/* 5: Visual RTL => Logical RTL */
{RTL, VISUAL, RTL, LOGICAL, SHAPE_LOGICAL, SHAPE_VISUAL, RTL,
- {action_reverse, action_shapeArabic, action_setInverse, action_resolve, action_reorder, NULL}},
+ {action_reverse, action_shapeArabic, action_setInverse, action_resolve, action_reorder, nullptr}},
/* 6: Visual LTR => Logical LTR */
{LTR, VISUAL, LTR, LOGICAL, SHAPE_LOGICAL, SHAPE_LOGICAL, LTR,
- {action_setInverse, action_resolve, action_reorder, action_shapeArabic, NULL}},
+ {action_setInverse, action_resolve, action_reorder, action_shapeArabic, nullptr}},
/* 7: Visual RTL => Logical LTR */
{RTL, VISUAL, LTR, LOGICAL, SHAPE_LOGICAL, SHAPE_LOGICAL, LTR,
- {action_reverse, action_setInverse, action_resolve, action_reorder, action_shapeArabic, NULL}},
+ {action_reverse, action_setInverse, action_resolve, action_reorder, action_shapeArabic, nullptr}},
/* 8: Logical LTR => Logical RTL */
{LTR, LOGICAL, RTL, LOGICAL, SHAPE_LOGICAL, SHAPE_LOGICAL, LTR,
- {action_shapeArabic, action_resolve, action_mirror, action_setRunsOnly, action_resolve, action_reorder, NULL}},
+ {action_shapeArabic, action_resolve, action_mirror, action_setRunsOnly, action_resolve, action_reorder, nullptr}},
/* 9: Logical RTL => Logical LTR */
{RTL, LOGICAL, LTR, LOGICAL, SHAPE_LOGICAL, SHAPE_LOGICAL, RTL,
- {action_resolve, action_mirror, action_setRunsOnly, action_resolve, action_reorder, action_shapeArabic, NULL}},
+ {action_resolve, action_mirror, action_setRunsOnly, action_resolve, action_reorder, action_shapeArabic, nullptr}},
/* 10: Visual LTR => Visual RTL */
{LTR, VISUAL, RTL, VISUAL, SHAPE_LOGICAL, SHAPE_VISUAL, LTR,
- {action_shapeArabic, action_setInverse, action_resolve, action_mirror, action_reverse, NULL}},
+ {action_shapeArabic, action_setInverse, action_resolve, action_mirror, action_reverse, nullptr}},
/* 11: Visual RTL => Visual LTR */
{RTL, VISUAL, LTR, VISUAL, SHAPE_LOGICAL, SHAPE_VISUAL, LTR,
- {action_reverse, action_shapeArabic, action_setInverse, action_resolve, action_mirror, NULL}},
+ {action_reverse, action_shapeArabic, action_setInverse, action_resolve, action_mirror, nullptr}},
/* 12: Logical LTR => Logical LTR */
{LTR, LOGICAL, LTR, LOGICAL, SHAPE_LOGICAL, SHAPE_LOGICAL, LTR,
- {action_resolve, action_mirror, action_shapeArabic, NULL}},
+ {action_resolve, action_mirror, action_shapeArabic, nullptr}},
/* 13: Logical RTL => Logical RTL */
{RTL, LOGICAL, RTL, LOGICAL, SHAPE_VISUAL, SHAPE_LOGICAL, RTL,
- {action_resolve, action_mirror, action_shapeArabic, NULL}},
+ {action_resolve, action_mirror, action_shapeArabic, nullptr}},
/* 14: Visual LTR => Visual LTR */
{LTR, VISUAL, LTR, VISUAL, SHAPE_LOGICAL, SHAPE_VISUAL, LTR,
- {action_resolve, action_mirror, action_shapeArabic, NULL}},
+ {action_resolve, action_mirror, action_shapeArabic, nullptr}},
/* 15: Visual RTL => Visual RTL */
{RTL, VISUAL, RTL, VISUAL, SHAPE_LOGICAL, SHAPE_VISUAL, LTR,
- {action_reverse, action_resolve, action_mirror, action_shapeArabic, action_reverse, NULL}}
+ {action_reverse, action_resolve, action_mirror, action_shapeArabic, action_reverse, nullptr}}
};
static const uint32_t nSchemes = sizeof(Schemes) / sizeof(*Schemes);
@@ -387,7 +387,7 @@ static const uint32_t nSchemes = sizeof(Schemes) / sizeof(*Schemes);
* of the first strong bidi character.
*/
static void
-resolveBaseDirection(const UChar *text, uint32_t length,
+resolveBaseDirection(const char16_t *text, uint32_t length,
UBiDiLevel *pInLevel, UBiDiLevel *pOutLevel)
{
switch (*pInLevel) {
@@ -417,7 +417,7 @@ resolveBaseDirection(const UChar *text, uint32_t length,
* Finds a valid <code>ReorderingScheme</code> matching the
* caller-defined scheme.
*
- * @return A valid <code>ReorderingScheme</code> object or NULL
+ * @return A valid <code>ReorderingScheme</code> object or nullptr
*/
static const ReorderingScheme*
findMatchingScheme(UBiDiLevel inLevel, UBiDiLevel outLevel,
@@ -431,34 +431,34 @@ findMatchingScheme(UBiDiLevel inLevel, UBiDiLevel outLevel,
return pScheme;
}
}
- return NULL;
+ return nullptr;
}
U_CAPI uint32_t U_EXPORT2
ubiditransform_transform(UBiDiTransform *pBiDiTransform,
- const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destSize,
+ const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destSize,
UBiDiLevel inParaLevel, UBiDiOrder inOrder,
UBiDiLevel outParaLevel, UBiDiOrder outOrder,
UBiDiMirroring doMirroring, uint32_t shapingOptions,
UErrorCode *pErrorCode)
{
uint32_t destLength = 0;
- UBool textChanged = FALSE;
+ UBool textChanged = false;
const UBiDiTransform *pOrigTransform = pBiDiTransform;
- const UBiDiAction *action = NULL;
+ const UBiDiAction *action = nullptr;
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (src == NULL || dest == NULL) {
+ if (src == nullptr || dest == nullptr) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
CHECK_LEN(src, srcLength, pErrorCode);
CHECK_LEN(dest, destSize, pErrorCode);
- if (pBiDiTransform == NULL) {
+ if (pBiDiTransform == nullptr) {
pBiDiTransform = ubiditransform_open(pErrorCode);
if (U_FAILURE(*pErrorCode)) {
return 0;
@@ -470,7 +470,7 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform,
pBiDiTransform->pActiveScheme = findMatchingScheme(inParaLevel, outParaLevel,
inOrder, outOrder);
- if (pBiDiTransform->pActiveScheme == NULL) {
+ if (pBiDiTransform->pActiveScheme == nullptr) {
goto cleanup;
}
pBiDiTransform->reorderingOptions = doMirroring ? UBIDI_DO_MIRRORING
@@ -486,7 +486,7 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform,
if (U_FAILURE(*pErrorCode)) {
goto cleanup;
}
- if (pBiDiTransform->pBidi == NULL) {
+ if (pBiDiTransform->pBidi == nullptr) {
pBiDiTransform->pBidi = ubidi_openSized(0, 0, pErrorCode);
if (U_FAILURE(*pErrorCode)) {
goto cleanup;
@@ -503,10 +503,10 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform,
updateSrc(pBiDiTransform, pBiDiTransform->dest, *pBiDiTransform->pDestLength,
*pBiDiTransform->pDestLength, pErrorCode);
}
- textChanged = TRUE;
+ textChanged = true;
}
}
- ubidi_setInverse(pBiDiTransform->pBidi, FALSE);
+ ubidi_setInverse(pBiDiTransform->pBidi, false);
if (!textChanged && U_SUCCESS(*pErrorCode)) {
/* Text was not changed - just copy src to dest */
@@ -521,8 +521,8 @@ cleanup:
if (pOrigTransform != pBiDiTransform) {
ubiditransform_close(pBiDiTransform);
} else {
- pBiDiTransform->dest = NULL;
- pBiDiTransform->pDestLength = NULL;
+ pBiDiTransform->dest = nullptr;
+ pBiDiTransform->pDestLength = nullptr;
pBiDiTransform->srcLength = 0;
pBiDiTransform->destSize = 0;
}
diff --git a/contrib/libs/icu/common/ubidiwrt.cpp b/contrib/libs/icu/common/ubidiwrt.cpp
index a69c0a4b8b1..969807c2437 100644
--- a/contrib/libs/icu/common/ubidiwrt.cpp
+++ b/contrib/libs/icu/common/ubidiwrt.cpp
@@ -56,8 +56,8 @@
* we are writing RTL output in reverse.
*/
static int32_t
-doWriteForward(const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destSize,
+doWriteForward(const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destSize,
uint16_t options,
UErrorCode *pErrorCode) {
/* optimize for several combinations of options */
@@ -93,7 +93,7 @@ doWriteForward(const UChar *src, int32_t srcLength,
case UBIDI_REMOVE_BIDI_CONTROLS: {
/* copy the LTR run and remove any BiDi control characters */
int32_t remaining=destSize;
- UChar c;
+ char16_t c;
do {
c=*src++;
if(!IS_BIDI_CONTROL_CHAR(c)) {
@@ -149,8 +149,8 @@ doWriteForward(const UChar *src, int32_t srcLength,
}
static int32_t
-doWriteReverse(const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destSize,
+doWriteReverse(const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destSize,
uint16_t options,
UErrorCode *pErrorCode) {
/*
@@ -248,7 +248,7 @@ doWriteReverse(const UChar *src, int32_t srcLength,
/* we need to find out the destination length of the run,
which will not include the BiDi control characters */
int32_t length=srcLength;
- UChar ch;
+ char16_t ch;
i=0;
do {
@@ -306,26 +306,26 @@ doWriteReverse(const UChar *src, int32_t srcLength,
}
U_CAPI int32_t U_EXPORT2
-ubidi_writeReverse(const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destSize,
+ubidi_writeReverse(const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destSize,
uint16_t options,
UErrorCode *pErrorCode) {
int32_t destLength;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
/* more error checking */
- if( src==NULL || srcLength<-1 ||
- destSize<0 || (destSize>0 && dest==NULL))
+ if( src==nullptr || srcLength<-1 ||
+ destSize<0 || (destSize>0 && dest==nullptr))
{
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
/* do input and output overlap? */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((src>=dest && src<dest+destSize) ||
(dest>=src && dest<src+srcLength)))
{
@@ -355,29 +355,29 @@ ubidi_writeReverse(const UChar *src, int32_t srcLength,
#endif
U_CAPI int32_t U_EXPORT2
ubidi_writeReordered(UBiDi *pBiDi,
- UChar *dest, int32_t destSize,
+ char16_t *dest, int32_t destSize,
uint16_t options,
UErrorCode *pErrorCode) {
- const UChar *text;
- UChar *saveDest;
+ const char16_t *text;
+ char16_t *saveDest;
int32_t length, destCapacity;
int32_t run, runCount, logicalStart, runLength;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
/* more error checking */
- if( pBiDi==NULL ||
- (text=pBiDi->text)==NULL || (length=pBiDi->length)<0 ||
- destSize<0 || (destSize>0 && dest==NULL))
+ if( pBiDi==nullptr ||
+ (text=pBiDi->text)==nullptr || (length=pBiDi->length)<0 ||
+ destSize<0 || (destSize>0 && dest==nullptr))
{
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
/* do input and output overlap? */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((text>=dest && text<dest+destSize) ||
(dest>=text && dest<text+pBiDi->originalLength)))
{
@@ -451,7 +451,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
dest, destSize,
options, pErrorCode);
}
- if(dest!=NULL) {
+ if(dest!=nullptr) {
dest+=runLength;
}
destSize-=runLength;
@@ -459,8 +459,8 @@ ubidi_writeReordered(UBiDi *pBiDi,
} else {
/* insert BiDi controls for "inverse BiDi" */
const DirProp *dirProps=pBiDi->dirProps;
- const UChar *src;
- UChar uc;
+ const char16_t *src;
+ char16_t uc;
UBiDiDirection dir;
int32_t markFlag;
@@ -495,7 +495,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
runLength=doWriteForward(src, runLength,
dest, destSize,
(uint16_t)(options&~UBIDI_DO_MIRRORING), pErrorCode);
- if(dest!=NULL) {
+ if(dest!=nullptr) {
dest+=runLength;
}
destSize-=runLength;
@@ -539,7 +539,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
runLength=doWriteReverse(src, runLength,
dest, destSize,
options, pErrorCode);
- if(dest!=NULL) {
+ if(dest!=nullptr) {
dest+=runLength;
}
destSize-=runLength;
@@ -578,7 +578,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
dest, destSize,
options, pErrorCode);
}
- if(dest!=NULL) {
+ if(dest!=nullptr) {
dest+=runLength;
}
destSize-=runLength;
@@ -586,7 +586,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
} else {
/* insert BiDi controls for "inverse BiDi" */
const DirProp *dirProps=pBiDi->dirProps;
- const UChar *src;
+ const char16_t *src;
UBiDiDirection dir;
for(run=runCount; --run>=0;) {
@@ -605,7 +605,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
runLength=doWriteReverse(src, runLength,
dest, destSize,
(uint16_t)(options&~UBIDI_DO_MIRRORING), pErrorCode);
- if(dest!=NULL) {
+ if(dest!=nullptr) {
dest+=runLength;
}
destSize-=runLength;
@@ -627,7 +627,7 @@ ubidi_writeReordered(UBiDi *pBiDi,
runLength=doWriteForward(src, runLength,
dest, destSize,
options, pErrorCode);
- if(dest!=NULL) {
+ if(dest!=nullptr) {
dest+=runLength;
}
destSize-=runLength;
diff --git a/contrib/libs/icu/common/ubrk.cpp b/contrib/libs/icu/common/ubrk.cpp
index bb5bdd1b501..46ec0d785ad 100644
--- a/contrib/libs/icu/common/ubrk.cpp
+++ b/contrib/libs/icu/common/ubrk.cpp
@@ -33,7 +33,7 @@ U_NAMESPACE_USE
U_CAPI UBreakIterator* U_EXPORT2
ubrk_open(UBreakIteratorType type,
const char *locale,
- const UChar *text,
+ const char16_t *text,
int32_t textLength,
UErrorCode *status)
{
@@ -79,7 +79,7 @@ ubrk_open(UBreakIteratorType type,
UBreakIterator *uBI = (UBreakIterator *)result;
- if (text != NULL) {
+ if (text != nullptr) {
ubrk_setText(uBI, text, textLength, status);
}
return uBI;
@@ -94,14 +94,14 @@ ubrk_open(UBreakIteratorType type,
//
//------------------------------------------------------------------------------
U_CAPI UBreakIterator* U_EXPORT2
-ubrk_openRules( const UChar *rules,
+ubrk_openRules( const char16_t *rules,
int32_t rulesLength,
- const UChar *text,
+ const char16_t *text,
int32_t textLength,
UParseError *parseErr,
UErrorCode *status) {
- if (status == NULL || U_FAILURE(*status)){
+ if (status == nullptr || U_FAILURE(*status)){
return 0;
}
@@ -113,7 +113,7 @@ ubrk_openRules( const UChar *rules,
}
UBreakIterator *uBI = (UBreakIterator *)result;
- if (text != NULL) {
+ if (text != nullptr) {
ubrk_setText(uBI, text, textLength, status);
}
return uBI;
@@ -122,22 +122,22 @@ ubrk_openRules( const UChar *rules,
U_CAPI UBreakIterator* U_EXPORT2
ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength,
- const UChar * text, int32_t textLength,
+ const char16_t * text, int32_t textLength,
UErrorCode * status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if (rulesLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
LocalPointer<RuleBasedBreakIterator> lpRBBI(new RuleBasedBreakIterator(binaryRules, rulesLength, *status), *status);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
UBreakIterator *uBI = reinterpret_cast<UBreakIterator *>(lpRBBI.orphan());
- if (text != NULL) {
+ if (text != nullptr) {
ubrk_setText(uBI, text, textLength, status);
}
return uBI;
@@ -151,24 +151,24 @@ ubrk_safeClone(
int32_t *pBufferSize,
UErrorCode *status)
{
- if (status == NULL || U_FAILURE(*status)){
- return NULL;
+ if (status == nullptr || U_FAILURE(*status)){
+ return nullptr;
}
- if (bi == NULL) {
+ if (bi == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if (pBufferSize != NULL) {
+ if (pBufferSize != nullptr) {
int32_t inputSize = *pBufferSize;
*pBufferSize = 1;
if (inputSize == 0) {
- return NULL; // preflighting for deprecated functionality
+ return nullptr; // preflighting for deprecated functionality
}
}
BreakIterator *newBI = ((BreakIterator *)bi)->clone();
- if (newBI == NULL) {
+ if (newBI == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- } else {
+ } else if (pBufferSize != nullptr) {
*status = U_SAFECLONE_ALLOCATED_WARNING;
}
return (UBreakIterator *)newBI;
@@ -176,15 +176,7 @@ ubrk_safeClone(
U_CAPI UBreakIterator * U_EXPORT2
ubrk_clone(const UBreakIterator *bi, UErrorCode *status) {
- if (U_FAILURE(*status)) {
- return nullptr;
- }
- BreakIterator *newBI = ((BreakIterator *)bi)->clone();
- if (newBI == nullptr) {
- *status = U_MEMORY_ALLOCATION_ERROR;
- return nullptr;
- }
- return (UBreakIterator *)newBI;
+ return ubrk_safeClone(bi, nullptr, nullptr, status);
}
@@ -196,14 +188,14 @@ ubrk_close(UBreakIterator *bi)
U_CAPI void U_EXPORT2
ubrk_setText(UBreakIterator* bi,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
UErrorCode* status)
{
UText ut = UTEXT_INITIALIZER;
utext_openUChars(&ut, text, textLength, status);
((BreakIterator*)bi)->setText(&ut, *status);
- // A stack allocated UText wrapping a UChar * string
+ // A stack allocated UText wrapping a char16_t * string
// can be dumped without explicitly closing it.
}
@@ -312,11 +304,11 @@ ubrk_getLocaleByType(const UBreakIterator *bi,
ULocDataLocaleType type,
UErrorCode* status)
{
- if (bi == NULL) {
+ if (bi == nullptr) {
if (U_SUCCESS(*status)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
- return NULL;
+ return nullptr;
}
return ((BreakIterator*)bi)->getLocaleID(type, *status);
}
@@ -339,12 +331,12 @@ ubrk_getBinaryRules(UBreakIterator *bi,
if (U_FAILURE(*status)) {
return 0;
}
- if ((binaryRules == NULL && rulesCapacity > 0) || rulesCapacity < 0) {
+ if ((binaryRules == nullptr && rulesCapacity > 0) || rulesCapacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
RuleBasedBreakIterator* rbbi;
- if ((rbbi = dynamic_cast<RuleBasedBreakIterator*>(reinterpret_cast<BreakIterator*>(bi))) == NULL) {
+ if ((rbbi = dynamic_cast<RuleBasedBreakIterator*>(reinterpret_cast<BreakIterator*>(bi))) == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -354,7 +346,7 @@ ubrk_getBinaryRules(UBreakIterator *bi,
*status = U_INDEX_OUTOFBOUNDS_ERROR;
return 0;
}
- if (binaryRules != NULL) { // if not preflighting
+ if (binaryRules != nullptr) { // if not preflighting
// Here we know rulesLength <= INT32_MAX and rulesCapacity >= 0, can cast safely
if ((int32_t)rulesLength > rulesCapacity) {
*status = U_BUFFER_OVERFLOW_ERROR;
diff --git a/contrib/libs/icu/common/ucase.cpp b/contrib/libs/icu/common/ucase.cpp
index 4aa856507aa..392e1266ae4 100644
--- a/contrib/libs/icu/common/ucase.cpp
+++ b/contrib/libs/icu/common/ucase.cpp
@@ -22,27 +22,14 @@
#include "unicode/utypes.h"
#include "unicode/unistr.h"
#include "unicode/uset.h"
-#include "unicode/udata.h" /* UDataInfo */
#include "unicode/utf16.h"
-#include "ucmndata.h" /* DataHeader */
-#include "udatamem.h"
-#include "umutex.h"
-#include "uassert.h"
#include "cmemory.h"
-#include "utrie2.h"
+#include "uassert.h"
#include "ucase.h"
+#include "umutex.h"
+#include "utrie2.h"
-struct UCaseProps {
- UDataMemory *mem;
- const int32_t *indexes;
- const uint16_t *exceptions;
- const uint16_t *unfold;
-
- UTrie2 trie;
- uint8_t formatVersion[4];
-};
-
-/* ucase_props_data.h is machine-generated by gencase --csource */
+/* ucase_props_data.h is machine-generated by genprops/casepropsbuilder.cpp */
#define INCLUDED_FROM_UCASE_CPP
#include "ucase_props_data.h"
@@ -53,7 +40,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 /*end*/, ui
/* add the start code point to the USet */
const USetAdder *sa=(const USetAdder *)context;
sa->add(sa->set, start);
- return TRUE;
+ return true;
}
U_CFUNC void U_EXPORT2
@@ -63,7 +50,7 @@ ucase_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) {
}
/* add the start code point of each same-value range of the trie */
- utrie2_enum(&ucase_props_singleton.trie, NULL, _enumPropertyStartsRange, sa);
+ utrie2_enum(&ucase_props_singleton.trie, nullptr, _enumPropertyStartsRange, sa);
/* add code points with hardcoded properties, plus the ones following them */
@@ -77,6 +64,13 @@ ucase_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) {
/* data access primitives --------------------------------------------------- */
+U_CAPI const struct UCaseProps * U_EXPORT2
+ucase_getSingleton(int32_t *pExceptionsLength, int32_t *pUnfoldLength) {
+ *pExceptionsLength = UPRV_LENGTHOF(ucase_props_exceptions);
+ *pUnfoldLength = UPRV_LENGTHOF(ucase_props_unfold);
+ return &ucase_props_singleton;
+}
+
U_CFUNC const UTrie2 * U_EXPORT2
ucase_getTrie() {
return &ucase_props_singleton.trie;
@@ -201,47 +195,17 @@ ucase_totitle(UChar32 c) {
return c;
}
-static const UChar iDot[2] = { 0x69, 0x307 };
-static const UChar jDot[2] = { 0x6a, 0x307 };
-static const UChar iOgonekDot[3] = { 0x12f, 0x307 };
-static const UChar iDotGrave[3] = { 0x69, 0x307, 0x300 };
-static const UChar iDotAcute[3] = { 0x69, 0x307, 0x301 };
-static const UChar iDotTilde[3] = { 0x69, 0x307, 0x303 };
+static const char16_t iDot[2] = { 0x69, 0x307 };
+static const char16_t jDot[2] = { 0x6a, 0x307 };
+static const char16_t iOgonekDot[3] = { 0x12f, 0x307 };
+static const char16_t iDotGrave[3] = { 0x69, 0x307, 0x300 };
+static const char16_t iDotAcute[3] = { 0x69, 0x307, 0x301 };
+static const char16_t iDotTilde[3] = { 0x69, 0x307, 0x303 };
U_CFUNC void U_EXPORT2
ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
- uint16_t props;
-
- /*
- * Hardcode the case closure of i and its relatives and ignore the
- * data file data for these characters.
- * The Turkic dotless i and dotted I with their case mapping conditions
- * and case folding option make the related characters behave specially.
- * This code matches their closure behavior to their case folding behavior.
- */
-
- switch(c) {
- case 0x49:
- /* regular i and I are in one equivalence class */
- sa->add(sa->set, 0x69);
- return;
- case 0x69:
- sa->add(sa->set, 0x49);
- return;
- case 0x130:
- /* dotted I is in a class with <0069 0307> (for canonical equivalence with <0049 0307>) */
- sa->addString(sa->set, iDot, 2);
- return;
- case 0x131:
- /* dotless i is in a class by itself */
- return;
- default:
- /* otherwise use the data file data */
- break;
- }
-
- props=UTRIE2_GET16(&ucase_props_singleton.trie, c);
+ uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c);
if(!UCASE_HAS_EXCEPTION(props)) {
if(UCASE_GET_TYPE(props)!=UCASE_NONE) {
/* add the one simple case mapping, no matter what type it is */
@@ -255,19 +219,42 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
* c has exceptions, so there may be multiple simple and/or
* full case mappings. Add them all.
*/
- const uint16_t *pe0, *pe=GET_EXCEPTIONS(&ucase_props_singleton, props);
- const UChar *closure;
+ const uint16_t *pe=GET_EXCEPTIONS(&ucase_props_singleton, props);
uint16_t excWord=*pe++;
- int32_t idx, closureLength, fullLength, length;
-
- pe0=pe;
+ const uint16_t *pe0=pe;
+
+ // Hardcode the case closure of i and its relatives and ignore the
+ // data file data for these characters.
+ // The Turkic dotless i and dotted I with their case mapping conditions
+ // and case folding option make the related characters behave specially.
+ // This code matches their closure behavior to their case folding behavior.
+ if (excWord&UCASE_EXC_CONDITIONAL_FOLD) {
+ // These characters have Turkic case foldings. Hardcode their closure.
+ if (c == 0x49) {
+ // Regular i and I are in one equivalence class.
+ sa->add(sa->set, 0x69);
+ return;
+ } else if (c == 0x130) {
+ // Dotted I is in a class with <0069 0307>
+ // (for canonical equivalence with <0049 0307>).
+ sa->addString(sa->set, iDot, 2);
+ return;
+ }
+ } else if (c == 0x69) {
+ sa->add(sa->set, 0x49);
+ return;
+ } else if (c == 0x131) {
+ // Dotless i is in a class by itself.
+ return;
+ }
/* add all simple case mappings */
- for(idx=UCASE_EXC_LOWER; idx<=UCASE_EXC_TITLE; ++idx) {
+ for(int32_t idx=UCASE_EXC_LOWER; idx<=UCASE_EXC_TITLE; ++idx) {
if(HAS_SLOT(excWord, idx)) {
pe=pe0;
- GET_SLOT_VALUE(excWord, idx, pe, c);
- sa->add(sa->set, c);
+ UChar32 mapping;
+ GET_SLOT_VALUE(excWord, idx, pe, mapping);
+ sa->add(sa->set, mapping);
}
}
if(HAS_SLOT(excWord, UCASE_EXC_DELTA)) {
@@ -278,19 +265,22 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
}
/* get the closure string pointer & length */
+ const char16_t *closure;
+ int32_t closureLength;
if(HAS_SLOT(excWord, UCASE_EXC_CLOSURE)) {
pe=pe0;
GET_SLOT_VALUE(excWord, UCASE_EXC_CLOSURE, pe, closureLength);
closureLength&=UCASE_CLOSURE_MAX_LENGTH; /* higher bits are reserved */
- closure=(const UChar *)pe+1; /* behind this slot, unless there are full case mappings */
+ closure=(const char16_t *)pe+1; /* behind this slot, unless there are full case mappings */
} else {
closureLength=0;
- closure=NULL;
+ closure=nullptr;
}
/* add the full case folding */
if(HAS_SLOT(excWord, UCASE_EXC_FULL_MAPPINGS)) {
pe=pe0;
+ int32_t fullLength;
GET_SLOT_VALUE(excWord, UCASE_EXC_FULL_MAPPINGS, pe, fullLength);
/* start of full case mapping strings */
@@ -303,9 +293,9 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
fullLength>>=4;
/* add the full case folding string */
- length=fullLength&0xf;
+ int32_t length=fullLength&0xf;
if(length!=0) {
- sa->addString(sa->set, (const UChar *)pe, length);
+ sa->addString(sa->set, (const char16_t *)pe, length);
pe+=length;
}
@@ -315,13 +305,150 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
fullLength>>=4;
pe+=fullLength;
- closure=(const UChar *)pe; /* behind full case mappings */
+ closure=(const char16_t *)pe; /* behind full case mappings */
}
/* add each code point in the closure string */
- for(idx=0; idx<closureLength;) {
- U16_NEXT_UNSAFE(closure, idx, c);
- sa->add(sa->set, c);
+ for(int32_t idx=0; idx<closureLength;) {
+ UChar32 mapping;
+ U16_NEXT_UNSAFE(closure, idx, mapping);
+ sa->add(sa->set, mapping);
+ }
+ }
+}
+
+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);
+ if(!UCASE_HAS_EXCEPTION(props)) {
+ if(UCASE_GET_TYPE(props)!=UCASE_NONE) {
+ /* add the one simple case mapping, no matter what type it is */
+ int32_t delta=UCASE_GET_DELTA(props);
+ if(delta!=0) {
+ sa->add(sa->set, c+delta);
+ }
+ }
+ } else {
+ // c has exceptions. Add the mappings relevant for scf=Simple_Case_Folding.
+ const uint16_t *pe=GET_EXCEPTIONS(&ucase_props_singleton, props);
+ uint16_t excWord=*pe++;
+ const uint16_t *pe0=pe;
+
+ // Hardcode the case closure of i and its relatives and ignore the
+ // data file data for these characters, like in ucase_addCaseClosure().
+ if (excWord&UCASE_EXC_CONDITIONAL_FOLD) {
+ // These characters have Turkic case foldings. Hardcode their closure.
+ if (c == 0x49) {
+ // Regular i and I are in one equivalence class.
+ sa->add(sa->set, 0x69);
+ return;
+ } else if (c == 0x130) {
+ // For scf=Simple_Case_Folding, dotted I is in a class by itself.
+ return;
+ }
+ } else if (c == 0x69) {
+ sa->add(sa->set, 0x49);
+ return;
+ } else if (c == 0x131) {
+ // Dotless i is in a class by itself.
+ return;
+ }
+
+ // Add all simple case mappings.
+ for(int32_t idx=UCASE_EXC_LOWER; idx<=UCASE_EXC_TITLE; ++idx) {
+ if(HAS_SLOT(excWord, idx)) {
+ pe=pe0;
+ UChar32 mapping;
+ GET_SLOT_VALUE(excWord, idx, pe, mapping);
+ addOneSimpleCaseClosure(c, mapping, sa);
+ }
+ }
+ if(HAS_SLOT(excWord, UCASE_EXC_DELTA)) {
+ pe=pe0;
+ 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);
+ }
+
+ /* get the closure string pointer & length */
+ const char16_t *closure;
+ int32_t closureLength;
+ if(HAS_SLOT(excWord, UCASE_EXC_CLOSURE)) {
+ pe=pe0;
+ GET_SLOT_VALUE(excWord, UCASE_EXC_CLOSURE, pe, closureLength);
+ closureLength&=UCASE_CLOSURE_MAX_LENGTH; /* higher bits are reserved */
+ closure=(const char16_t *)pe+1; /* behind this slot, unless there are full case mappings */
+ } else {
+ closureLength=0;
+ closure=nullptr;
+ }
+
+ // Skip the full case mappings.
+ if(closureLength > 0 && HAS_SLOT(excWord, UCASE_EXC_FULL_MAPPINGS)) {
+ pe=pe0;
+ int32_t fullLength;
+ GET_SLOT_VALUE(excWord, UCASE_EXC_FULL_MAPPINGS, pe, fullLength);
+
+ /* start of full case mapping strings */
+ ++pe;
+
+ fullLength&=0xffff; /* bits 16 and higher are reserved */
+
+ // Skip all 4 full case mappings.
+ pe+=fullLength&UCASE_FULL_LOWER;
+ fullLength>>=4;
+ pe+=fullLength&0xf;
+ fullLength>>=4;
+ pe+=fullLength&0xf;
+ fullLength>>=4;
+ pe+=fullLength;
+
+ closure=(const char16_t *)pe; /* behind full case mappings */
+ }
+
+ // Add each code point in the closure string whose scf maps back to c.
+ for(int32_t idx=0; idx<closureLength;) {
+ UChar32 mapping;
+ U16_NEXT_UNSAFE(closure, idx, mapping);
+ addOneSimpleCaseClosure(c, mapping, sa);
}
}
}
@@ -331,7 +458,7 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
* must be length>0 and max>0 and length<=max
*/
static inline int32_t
-strcmpMax(const UChar *s, int32_t length, const UChar *t, int32_t max) {
+strcmpMax(const char16_t *s, int32_t length, const char16_t *t, int32_t max) {
int32_t c1, c2;
max-=length; /* we require length<=max, so no need to decrement max in the loop */
@@ -356,11 +483,11 @@ strcmpMax(const UChar *s, int32_t length, const UChar *t, int32_t max) {
}
U_CFUNC UBool U_EXPORT2
-ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa) {
+ucase_addStringCaseClosure(const char16_t *s, int32_t length, const USetAdder *sa) {
int32_t i, start, limit, result, unfoldRows, unfoldRowWidth, unfoldStringWidth;
- if(ucase_props_singleton.unfold==NULL || s==NULL) {
- return FALSE; /* no reverse case folding data, or no string */
+ if(ucase_props_singleton.unfold==nullptr || s==nullptr) {
+ return false; /* no reverse case folding data, or no string */
}
if(length<=1) {
/* the string is too short to find any match */
@@ -370,7 +497,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
* but this does not make much practical difference because
* a single supplementary code point would just not be found
*/
- return FALSE;
+ return false;
}
const uint16_t *unfold=ucase_props_singleton.unfold;
@@ -381,7 +508,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
if(length>unfoldStringWidth) {
/* the string is too long to find any match */
- return FALSE;
+ return false;
}
/* do a binary search for the string */
@@ -389,7 +516,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
limit=unfoldRows;
while(start<limit) {
i=(start+limit)/2;
- const UChar *p=reinterpret_cast<const UChar *>(unfold+(i*unfoldRowWidth));
+ const char16_t *p=reinterpret_cast<const char16_t *>(unfold+(i*unfoldRowWidth));
result=strcmpMax(s, length, p, unfoldStringWidth);
if(result==0) {
@@ -401,7 +528,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
sa->add(sa->set, c);
ucase_addCaseClosure(c, sa);
}
- return TRUE;
+ return true;
} else if(result<0) {
limit=i;
} else /* result>0 */ {
@@ -409,13 +536,13 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa)
}
}
- return FALSE; /* string not found */
+ return false; /* string not found */
}
U_NAMESPACE_BEGIN
FullCaseFoldingIterator::FullCaseFoldingIterator()
- : unfold(reinterpret_cast<const UChar *>(ucase_props_singleton.unfold)),
+ : unfold(reinterpret_cast<const char16_t *>(ucase_props_singleton.unfold)),
unfoldRows(unfold[UCASE_UNFOLD_ROWS]),
unfoldRowWidth(unfold[UCASE_UNFOLD_ROW_WIDTH]),
unfoldStringWidth(unfold[UCASE_UNFOLD_STRING_WIDTH]),
@@ -427,7 +554,7 @@ FullCaseFoldingIterator::FullCaseFoldingIterator()
UChar32
FullCaseFoldingIterator::next(UnicodeString &full) {
// Advance past the last-delivered code point.
- const UChar *p=unfold+(currentRow*unfoldRowWidth);
+ const char16_t *p=unfold+(currentRow*unfoldRowWidth);
if(rowCpIndex>=unfoldRowWidth || p[rowCpIndex]==0) {
++currentRow;
p+=unfoldRowWidth;
@@ -437,7 +564,7 @@ FullCaseFoldingIterator::next(UnicodeString &full) {
// Set "full" to the NUL-terminated string in the first unfold column.
int32_t length=unfoldStringWidth;
while(length>0 && p[length-1]==0) { --length; }
- full.setTo(FALSE, p, length);
+ full.setTo(false, p, length);
// Return the code point.
UChar32 c;
U16_NEXT_UNSAFE(p, rowCpIndex, c);
@@ -690,7 +817,7 @@ ucase_isCaseSensitive(UChar32 c) {
* - The general category of C is
* Nonspacing Mark (Mn), or Enclosing Mark (Me), or Format Control (Cf), or
* Letter Modifier (Lm), or Symbol Modifier (Sk)
- * - C is one of the following characters
+ * - C is one of the following characters
* U+0027 APOSTROPHE
* U+00AD SOFT HYPHEN (SHY)
* U+2019 RIGHT SINGLE QUOTATION MARK
@@ -714,7 +841,7 @@ ucase_isCaseSensitive(UChar32 c) {
#define is_sep(c) ((c)=='_' || (c)=='-' || (c)==0)
/**
- * Requires non-NULL locale ID but otherwise does the equivalent of
+ * Requires non-nullptr locale ID but otherwise does the equivalent of
* checking for language codes as if uloc_getLanguage() were called:
* Accepts both 2- and 3-letter codes and accepts case variants.
*/
@@ -727,7 +854,7 @@ ucase_getCaseLocale(const char *locale) {
* examined and copied/transformed.
*
* Because this code does not want to depend on uloc, the caller must
- * pass in a non-NULL locale, i.e., may need to call uloc_getDefault().
+ * pass in a non-nullptr locale, i.e., may need to call uloc_getDefault().
*/
char c=*locale++;
// Fastpath for English "en" which is often used for default (=root locale) case mappings,
@@ -910,8 +1037,8 @@ static UBool
isFollowedByCasedLetter(UCaseContextIterator *iter, void *context, int8_t dir) {
UChar32 c;
- if(iter==NULL) {
- return FALSE;
+ if(iter==nullptr) {
+ return false;
}
for(/* dir!=0 sets direction */; (c=iter(context, dir))>=0; dir=0) {
@@ -919,13 +1046,13 @@ isFollowedByCasedLetter(UCaseContextIterator *iter, void *context, int8_t dir) {
if(type&4) {
/* case-ignorable, continue with the loop */
} else if(type!=UCASE_NONE) {
- return TRUE; /* followed by cased letter */
+ return true; /* followed by cased letter */
} else {
- return FALSE; /* uncased and not case-ignorable */
+ return false; /* uncased and not case-ignorable */
}
}
- return FALSE; /* not followed by cased letter */
+ return false; /* not followed by cased letter */
}
/* Is preceded by Soft_Dotted character with no intervening cc=230 ? */
@@ -935,20 +1062,20 @@ isPrecededBySoftDotted(UCaseContextIterator *iter, void *context) {
int32_t dotType;
int8_t dir;
- if(iter==NULL) {
- return FALSE;
+ if(iter==nullptr) {
+ return false;
}
for(dir=-1; (c=iter(context, dir))>=0; dir=0) {
dotType=getDotType(c);
if(dotType==UCASE_SOFT_DOTTED) {
- return TRUE; /* preceded by TYPE_i */
+ return true; /* preceded by TYPE_i */
} else if(dotType!=UCASE_OTHER_ACCENT) {
- return FALSE; /* preceded by different base character (not TYPE_i), or intervening cc==230 */
+ return false; /* preceded by different base character (not TYPE_i), or intervening cc==230 */
}
}
- return FALSE; /* not preceded by TYPE_i */
+ return false; /* not preceded by TYPE_i */
}
/*
@@ -992,21 +1119,21 @@ isPrecededBy_I(UCaseContextIterator *iter, void *context) {
int32_t dotType;
int8_t dir;
- if(iter==NULL) {
- return FALSE;
+ if(iter==nullptr) {
+ return false;
}
for(dir=-1; (c=iter(context, dir))>=0; dir=0) {
if(c==0x49) {
- return TRUE; /* preceded by I */
+ return true; /* preceded by I */
}
dotType=getDotType(c);
if(dotType!=UCASE_OTHER_ACCENT) {
- return FALSE; /* preceded by different base character (not I), or intervening cc==230 */
+ return false; /* preceded by different base character (not I), or intervening cc==230 */
}
}
- return FALSE; /* not preceded by I */
+ return false; /* not preceded by I */
}
/* Is followed by one or more cc==230 ? */
@@ -1016,20 +1143,20 @@ isFollowedByMoreAbove(UCaseContextIterator *iter, void *context) {
int32_t dotType;
int8_t dir;
- if(iter==NULL) {
- return FALSE;
+ if(iter==nullptr) {
+ return false;
}
for(dir=1; (c=iter(context, dir))>=0; dir=0) {
dotType=getDotType(c);
if(dotType==UCASE_ABOVE) {
- return TRUE; /* at least one cc==230 following */
+ return true; /* at least one cc==230 following */
} else if(dotType!=UCASE_OTHER_ACCENT) {
- return FALSE; /* next base character, no more cc==230 following */
+ return false; /* next base character, no more cc==230 following */
}
}
- return FALSE; /* no more cc==230 following */
+ return false; /* no more cc==230 following */
}
/* Is followed by a dot above (without cc==230 in between) ? */
@@ -1039,31 +1166,33 @@ isFollowedByDotAbove(UCaseContextIterator *iter, void *context) {
int32_t dotType;
int8_t dir;
- if(iter==NULL) {
- return FALSE;
+ if(iter==nullptr) {
+ return false;
}
for(dir=1; (c=iter(context, dir))>=0; dir=0) {
if(c==0x307) {
- return TRUE;
+ return true;
}
dotType=getDotType(c);
if(dotType!=UCASE_OTHER_ACCENT) {
- return FALSE; /* next base character or cc==230 in between */
+ return false; /* next base character or cc==230 in between */
}
}
- return FALSE; /* no dot above following */
+ return false; /* no dot above following */
}
U_CAPI int32_t U_EXPORT2
ucase_toFullLower(UChar32 c,
UCaseContextIterator *iter, void *context,
- const UChar **pString,
+ const char16_t **pString,
int32_t loc) {
// The sign of the result has meaning, input must be non-negative so that it can be returned as is.
U_ASSERT(c >= 0);
UChar32 result=c;
+ // Reset the output pointer in case it was uninitialized.
+ *pString=nullptr;
uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c);
if(!UCASE_HAS_EXCEPTION(props)) {
if(UCASE_IS_UPPER_OR_TITLE(props)) {
@@ -1148,7 +1277,6 @@ ucase_toFullLower(UChar32 c,
0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE
0307; ; 0307; 0307; az After_I; # COMBINING DOT ABOVE
*/
- *pString=nullptr;
return 0; /* remove the dot (continue without output) */
} else if(loc==UCASE_LOC_TURKISH && c==0x49 && !isFollowedByDotAbove(iter, context)) {
/*
@@ -1185,7 +1313,7 @@ ucase_toFullLower(UChar32 c,
full&=UCASE_FULL_LOWER;
if(full!=0) {
/* set the output pointer to the lowercase mapping */
- *pString=reinterpret_cast<const UChar *>(pe+1);
+ *pString=reinterpret_cast<const char16_t *>(pe+1);
/* return the string length */
return full;
@@ -1209,12 +1337,14 @@ ucase_toFullLower(UChar32 c,
static int32_t
toUpperOrTitle(UChar32 c,
UCaseContextIterator *iter, void *context,
- const UChar **pString,
+ const char16_t **pString,
int32_t loc,
UBool upperNotTitle) {
// The sign of the result has meaning, input must be non-negative so that it can be returned as is.
U_ASSERT(c >= 0);
UChar32 result=c;
+ // Reset the output pointer in case it was uninitialized.
+ *pString=nullptr;
uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c);
if(!UCASE_HAS_EXCEPTION(props)) {
if(UCASE_GET_TYPE(props)==UCASE_LOWER) {
@@ -1252,7 +1382,6 @@ toUpperOrTitle(UChar32 c,
0307; 0307; ; ; lt After_Soft_Dotted; # COMBINING DOT ABOVE
*/
- *pString=nullptr;
return 0; /* remove the dot (continue without output) */
} else if(c==0x0587) {
// See ICU-13416:
@@ -1290,7 +1419,7 @@ toUpperOrTitle(UChar32 c,
if(full!=0) {
/* set the output pointer to the result string */
- *pString=reinterpret_cast<const UChar *>(pe);
+ *pString=reinterpret_cast<const char16_t *>(pe);
/* return the string length */
return full;
@@ -1319,17 +1448,17 @@ toUpperOrTitle(UChar32 c,
U_CAPI int32_t U_EXPORT2
ucase_toFullUpper(UChar32 c,
UCaseContextIterator *iter, void *context,
- const UChar **pString,
+ const char16_t **pString,
int32_t caseLocale) {
- return toUpperOrTitle(c, iter, context, pString, caseLocale, TRUE);
+ return toUpperOrTitle(c, iter, context, pString, caseLocale, true);
}
U_CAPI int32_t U_EXPORT2
ucase_toFullTitle(UChar32 c,
UCaseContextIterator *iter, void *context,
- const UChar **pString,
+ const char16_t **pString,
int32_t caseLocale) {
- return toUpperOrTitle(c, iter, context, pString, caseLocale, FALSE);
+ return toUpperOrTitle(c, iter, context, pString, caseLocale, false);
}
/* case folding ------------------------------------------------------------- */
@@ -1444,11 +1573,13 @@ ucase_fold(UChar32 c, uint32_t options) {
U_CAPI int32_t U_EXPORT2
ucase_toFullFolding(UChar32 c,
- const UChar **pString,
+ const char16_t **pString,
uint32_t options) {
// The sign of the result has meaning, input must be non-negative so that it can be returned as is.
U_ASSERT(c >= 0);
UChar32 result=c;
+ // Reset the output pointer in case it was uninitialized.
+ *pString=nullptr;
uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c);
if(!UCASE_HAS_EXCEPTION(props)) {
if(UCASE_IS_UPPER_OR_TITLE(props)) {
@@ -1495,7 +1626,7 @@ ucase_toFullFolding(UChar32 c,
if(full!=0) {
/* set the output pointer to the result string */
- *pString=reinterpret_cast<const UChar *>(pe);
+ *pString=reinterpret_cast<const char16_t *>(pe);
/* return the string length */
return full;
@@ -1542,7 +1673,7 @@ U_CAPI UChar32 U_EXPORT2
u_tolower(UChar32 c) {
return ucase_tolower(c);
}
-
+
/* Transforms the Unicode character to its upper case equivalent.*/
U_CAPI UChar32 U_EXPORT2
u_toupper(UChar32 c) {
@@ -1564,7 +1695,7 @@ u_foldCase(UChar32 c, uint32_t options) {
U_CFUNC int32_t U_EXPORT2
ucase_hasBinaryProperty(UChar32 c, UProperty which) {
/* case mapping properties */
- const UChar *resultString;
+ const char16_t *resultString;
switch(which) {
case UCHAR_LOWERCASE:
return (UBool)(UCASE_LOWER==ucase_getType(c));
@@ -1591,18 +1722,18 @@ ucase_hasBinaryProperty(UChar32 c, UProperty which) {
* start sets for normalization and case mappings.
*/
case UCHAR_CHANGES_WHEN_LOWERCASED:
- return (UBool)(ucase_toFullLower(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0);
+ return (UBool)(ucase_toFullLower(c, nullptr, nullptr, &resultString, UCASE_LOC_ROOT)>=0);
case UCHAR_CHANGES_WHEN_UPPERCASED:
- return (UBool)(ucase_toFullUpper(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0);
+ return (UBool)(ucase_toFullUpper(c, nullptr, nullptr, &resultString, UCASE_LOC_ROOT)>=0);
case UCHAR_CHANGES_WHEN_TITLECASED:
- return (UBool)(ucase_toFullTitle(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0);
+ return (UBool)(ucase_toFullTitle(c, nullptr, nullptr, &resultString, UCASE_LOC_ROOT)>=0);
/* case UCHAR_CHANGES_WHEN_CASEFOLDED: -- in uprops.c */
case UCHAR_CHANGES_WHEN_CASEMAPPED:
return (UBool)(
- ucase_toFullLower(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0 ||
- ucase_toFullUpper(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0 ||
- ucase_toFullTitle(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0);
+ ucase_toFullLower(c, nullptr, nullptr, &resultString, UCASE_LOC_ROOT)>=0 ||
+ ucase_toFullUpper(c, nullptr, nullptr, &resultString, UCASE_LOC_ROOT)>=0 ||
+ ucase_toFullTitle(c, nullptr, nullptr, &resultString, UCASE_LOC_ROOT)>=0);
default:
- return FALSE;
+ return false;
}
}
diff --git a/contrib/libs/icu/common/ucase.h b/contrib/libs/icu/common/ucase.h
index a018f82b81b..e03b311870f 100644
--- a/contrib/libs/icu/common/ucase.h
+++ b/contrib/libs/icu/common/ucase.h
@@ -108,6 +108,10 @@ ucase_fold(UChar32 c, uint32_t options);
U_CFUNC void U_EXPORT2
ucase_addCaseClosure(UChar32 c, const USetAdder *sa);
+/** Case closure with only scf=Simple_Case_Folding. */
+U_CFUNC void U_EXPORT2
+ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa);
+
/**
* Maps the string to single code points and adds the associated case closure
* mappings.
@@ -139,10 +143,10 @@ public:
*/
UChar32 next(UnicodeString &full);
private:
- FullCaseFoldingIterator(const FullCaseFoldingIterator &); // no copy
- FullCaseFoldingIterator &operator=(const FullCaseFoldingIterator &); // no assignment
+ FullCaseFoldingIterator(const FullCaseFoldingIterator &) = delete; // no copy
+ FullCaseFoldingIterator &operator=(const FullCaseFoldingIterator &) = delete; // no assignment
- const UChar *unfold;
+ const char16_t *unfold;
int32_t unfoldRows;
int32_t unfoldRowWidth;
int32_t unfoldStringWidth;
@@ -159,9 +163,9 @@ private:
namespace LatinCase {
/** Case mapping/folding data for code points up to U+017F. */
-constexpr UChar LIMIT = 0x180;
+constexpr char16_t LIMIT = 0x180;
/** U+017F case-folds and uppercases crossing the ASCII boundary. */
-constexpr UChar LONG_S = 0x17f;
+constexpr char16_t LONG_S = 0x17f;
/** Exception: Complex mapping, or too-large delta. */
constexpr int8_t EXC = -0x80;
@@ -312,6 +316,21 @@ UCaseMapFull(UChar32 c,
U_CDECL_END
+/* for icuexportdata -------------------------------------------------------- */
+
+struct UCaseProps {
+ void *mem; // TODO: was unused, and type UDataMemory -- remove
+ const int32_t *indexes;
+ const uint16_t *exceptions;
+ const uint16_t *unfold;
+
+ UTrie2 trie;
+ uint8_t formatVersion[4];
+};
+
+U_CAPI const struct UCaseProps * U_EXPORT2
+ucase_getSingleton(int32_t *pExceptionsLength, int32_t *pUnfoldLength);
+
/* file definitions --------------------------------------------------------- */
#define UCASE_DATA_NAME "ucase"
diff --git a/contrib/libs/icu/common/ucase_props_data.h b/contrib/libs/icu/common/ucase_props_data.h
index 8bbf403cdca..7e6de63fb71 100644
--- a/contrib/libs/icu/common/ucase_props_data.h
+++ b/contrib/libs/icu/common/ucase_props_data.h
@@ -9,145 +9,145 @@
#ifdef INCLUDED_FROM_UCASE_CPP
-static const UVersionInfo ucase_props_dataVersion={0xe,0,0,0};
+static const UVersionInfo ucase_props_dataVersion={0xf,0,0,0};
-static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x7512,0x64e8,0x683,0x172,0,0,0,0,0,0,0,0,0,0,3};
+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 uint16_t ucase_props_trieIndex[12908]={
-0x354,0x35c,0x364,0x36c,0x37a,0x382,0x38a,0x392,0x39a,0x3a2,0x3a9,0x3b1,0x3b9,0x3c1,0x3c9,0x3d1,
-0x3d7,0x3df,0x3e7,0x3ef,0x3f7,0x3ff,0x407,0x40f,0x417,0x41f,0x427,0x42f,0x437,0x43f,0x447,0x44f,
-0x457,0x45f,0x467,0x46f,0x477,0x47f,0x487,0x48f,0x48b,0x493,0x498,0x4a0,0x4a7,0x4af,0x4b7,0x4bf,
-0x4c7,0x4cf,0x4d7,0x4df,0x373,0x37b,0x4e4,0x4ec,0x4f1,0x4f9,0x501,0x509,0x508,0x510,0x515,0x51d,
-0x525,0x52c,0x530,0x373,0x537,0x354,0x547,0x53f,0x54f,0x551,0x559,0x561,0x565,0x566,0x56e,0x576,
-0x57e,0x566,0x586,0x58b,0x57e,0x566,0x593,0x59b,0x565,0x5a3,0x5ab,0x5b3,0x5bb,0x373,0x5c3,0x373,
-0x5cb,0x5cd,0x5d5,0x5b3,0x565,0x5a3,0x5dc,0x5b3,0x5e4,0x5e6,0x56e,0x5b3,0x565,0x373,0x5ee,0x373,
-0x373,0x5f4,0x5fb,0x373,0x373,0x5ff,0x607,0x373,0x60b,0x612,0x373,0x619,0x621,0x628,0x630,0x373,
-0x373,0x635,0x63d,0x645,0x64d,0x655,0x65c,0x664,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x66c,0x373,0x373,0x67c,0x67c,0x674,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x684,0x68a,0x572,0x572,0x373,0x690,0x698,0x373,
-0x6a0,0x373,0x6a8,0x373,0x6af,0x6b5,0x373,0x373,0x373,0x6bd,0x373,0x373,0x373,0x373,0x373,0x373,
-0x6c4,0x373,0x6cb,0x6d3,0x373,0x6db,0x6e3,0x373,0x5a2,0x6e7,0x6ef,0x6f5,0x5e4,0x6fd,0x373,0x704,
-0x373,0x709,0x373,0x70f,0x717,0x71b,0x723,0x72b,0x733,0x738,0x73b,0x743,0x753,0x74b,0x763,0x75b,
-0x39a,0x76b,0x39a,0x773,0x776,0x39a,0x77e,0x39a,0x786,0x78e,0x796,0x79e,0x7a6,0x7ae,0x7b6,0x7be,
-0x7c6,0x7cd,0x373,0x7d5,0x7dd,0x373,0x7e5,0x7ed,0x7f5,0x7fd,0x805,0x80d,0x815,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x818,0x81e,0x824,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x82c,0x830,0x834,0x83c,0x39a,0x39a,0x39a,0x844,0x84c,0x853,0x373,0x858,0x373,0x373,0x373,0x860,
-0x373,0x6a5,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x564,0x868,0x373,0x373,0x86f,0x373,0x373,0x877,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x87f,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x70f,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x885,0x373,0x88d,0x892,0x89a,0x373,0x373,0x8a2,0x8aa,0x8b2,0x39a,0x8b7,0x8bf,0x8c5,0x8cc,0x8d3,
-0x8db,0x8e2,0x373,0x373,0x373,0x373,0x8e9,0x8f1,0x373,0x8f9,0x900,0x373,0x54f,0x905,0x90d,0x6af,
-0x373,0x913,0x91b,0x91f,0x373,0x927,0x92f,0x937,0x373,0x93d,0x941,0x949,0x959,0x951,0x373,0x961,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x969,0x373,0x373,0x373,0x373,0x971,0x54f,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x976,0x97e,0x982,0x373,0x373,0x373,0x373,0x356,0x35c,0x98a,0x992,0x999,0x50a,0x373,0x373,0x9a1,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0xdd0,0xdd0,0xde8,0xe28,0xe68,0xea4,0xee4,0xf24,0xf5c,0xf9c,0xfdc,0x101c,0x105c,0x109c,0x10dc,0x111c,
-0x115c,0x119c,0x11dc,0x121c,0x122c,0x1260,0x129c,0x12dc,0x131c,0x135c,0xdcc,0x1390,0x13c4,0x1404,0x1420,0x1454,
-0x9e1,0xa1f,0xa5f,0xa9e,0x188,0x188,0xad6,0x188,0x188,0x188,0x188,0x188,0x188,0xaff,0x188,0x188,
-0x188,0x188,0x188,0x188,0x188,0xb3f,0x188,0xb7f,0x188,0xba5,0xbe0,0xc1f,0xc5f,0xc99,0xcd0,0x188,
+static const uint16_t ucase_props_trieIndex[13148]={
+0x355,0x35d,0x365,0x36d,0x37b,0x383,0x38b,0x393,0x39b,0x3a3,0x3aa,0x3b2,0x3ba,0x3c2,0x3ca,0x3d2,
+0x3d8,0x3e0,0x3e8,0x3f0,0x3f8,0x400,0x408,0x410,0x418,0x420,0x428,0x430,0x438,0x440,0x448,0x450,
+0x458,0x460,0x468,0x470,0x478,0x480,0x488,0x490,0x48c,0x494,0x499,0x4a1,0x4a8,0x4b0,0x4b8,0x4c0,
+0x4c8,0x4d0,0x4d8,0x4e0,0x374,0x37c,0x4e5,0x4ed,0x4f2,0x4fa,0x502,0x50a,0x509,0x511,0x516,0x51e,
+0x526,0x52d,0x531,0x374,0x538,0x355,0x548,0x540,0x550,0x552,0x55a,0x562,0x566,0x567,0x56f,0x577,
+0x57f,0x567,0x587,0x58c,0x57f,0x567,0x594,0x59c,0x566,0x5a4,0x5ac,0x5b4,0x5bc,0x374,0x5c4,0x374,
+0x5cc,0x5ce,0x5d6,0x5b4,0x566,0x5a4,0x5dd,0x5b4,0x5e5,0x5e7,0x56f,0x5b4,0x566,0x374,0x5ef,0x374,
+0x374,0x5f5,0x5fc,0x374,0x374,0x600,0x608,0x374,0x60c,0x613,0x374,0x61a,0x622,0x629,0x631,0x374,
+0x374,0x636,0x63e,0x646,0x64e,0x656,0x65d,0x665,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x66d,0x374,0x374,0x67d,0x67d,0x675,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x685,0x68b,0x573,0x573,0x374,0x691,0x699,0x374,
+0x6a1,0x374,0x6a9,0x374,0x6b0,0x6b6,0x374,0x374,0x374,0x6be,0x374,0x374,0x374,0x374,0x374,0x374,
+0x6c5,0x374,0x6cc,0x6d4,0x374,0x6dc,0x6e4,0x374,0x5a3,0x6e8,0x6f0,0x6f6,0x5e5,0x6fe,0x374,0x705,
+0x374,0x70a,0x374,0x710,0x718,0x71c,0x724,0x72c,0x734,0x739,0x73c,0x744,0x754,0x74c,0x764,0x75c,
+0x39b,0x76c,0x39b,0x774,0x777,0x39b,0x77f,0x39b,0x787,0x78f,0x797,0x79f,0x7a7,0x7af,0x7b7,0x7bf,
+0x7c7,0x7ce,0x374,0x7d6,0x7de,0x374,0x7e6,0x7ee,0x7f6,0x7fe,0x806,0x80e,0x816,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x819,0x81f,0x825,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x82d,0x831,0x835,0x83d,0x39b,0x39b,0x39b,0x845,0x84d,0x854,0x374,0x859,0x374,0x374,0x374,0x861,
+0x374,0x6a6,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x565,0x869,0x374,0x374,0x870,0x374,0x374,0x878,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x880,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x710,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x886,0x374,0x88e,0x893,0x89b,0x374,0x374,0x8a3,0x8ab,0x8b3,0x39b,0x8b8,0x8c0,0x8c6,0x8cd,0x8d4,
+0x8dc,0x8e3,0x374,0x374,0x374,0x374,0x8ea,0x8f2,0x374,0x8fa,0x901,0x374,0x550,0x906,0x90e,0x6b0,
+0x374,0x914,0x91c,0x920,0x374,0x928,0x930,0x938,0x374,0x93e,0x942,0x94a,0x95a,0x952,0x374,0x962,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x96a,0x374,0x374,0x374,0x374,0x972,0x550,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x977,0x97f,0x983,0x374,0x374,0x374,0x374,0x357,0x35d,0x98b,0x993,0x99a,0x50b,0x374,0x374,0x9a2,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0xdd4,0xdd4,0xdec,0xe2c,0xe6c,0xea8,0xee8,0xf28,0xf60,0xfa0,0xfe0,0x1020,0x1060,0x10a0,0x10e0,0x1120,
+0x1160,0x11a0,0x11e0,0x1220,0x1230,0x1264,0x12a0,0x12e0,0x1320,0x1360,0xdd0,0x1394,0x13c8,0x1408,0x1424,0x1458,
+0x9e1,0xa1f,0xa5f,0xa9e,0x188,0x188,0xad9,0x188,0x188,0x188,0x188,0x188,0x188,0xb02,0x188,0x188,
+0x188,0x188,0x188,0x188,0x188,0xb42,0x188,0xb82,0x188,0xba8,0xbe3,0xc22,0xc62,0xc9c,0xcd3,0x188,
0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,
0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,
0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,
@@ -172,642 +172,657 @@ static const uint16_t ucase_props_trieIndex[12908]={
0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,
0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,
0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,
-0xd10,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x9a8,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x9b0,0x373,0x373,0x373,0x9b3,0x373,0x373,0x373,
-0x373,0x9bb,0x9c1,0x9c5,0x373,0x373,0x9c9,0x9cd,0x9d3,0x373,0x373,0x373,0x9da,0x9de,0x9e6,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x9f6,0x9ee,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x9fe,
-0xa02,0x373,0x373,0x373,0x373,0x373,0xa0a,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0xa12,0xa16,0xa1e,0xa22,0x373,0xa29,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0xa2f,0x373,0x373,0x373,0x373,0xa36,0x373,0xa3e,0x373,0x373,0x373,0x565,
-0xa40,0xa47,0xa4b,0x5e4,0xa53,0xa5b,0x373,0xa63,0xa6a,0x373,0xa70,0x5e4,0xa75,0xa7d,0x373,0x373,
-0xa82,0x373,0x373,0x373,0x373,0x356,0xa8a,0x5e4,0x5e6,0xa92,0xa99,0x373,0x373,0x373,0x373,0x373,
-0xa40,0xaa1,0x373,0x373,0xaa9,0xab1,0x373,0x373,0x373,0x373,0x373,0x373,0xab5,0xabd,0x373,0x373,
-0xac5,0x4ce,0x373,0x373,0xacd,0x373,0x373,0xad3,0xadb,0x373,0x373,0x373,0x373,0x373,0x373,0xae0,
-0x373,0x373,0x373,0xae8,0xaf0,0x373,0x373,0xaf8,0xb00,0x373,0x373,0x373,0xb03,0x9b0,0xb0b,0xb0f,
-0xb17,0x373,0xb1e,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xb25,
-0x373,0x373,0x971,0xb2d,0x373,0x373,0x373,0xb33,0xb3b,0x373,0xb3f,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0xb45,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xb4b,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0xb52,0x373,0xb58,0x5a2,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0xae8,0xaf0,0x373,0x373,0x373,0x373,0x373,0x373,0x6a5,0x373,0xb5e,0x373,0x373,0xb66,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xb6b,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0xb73,0x5a2,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x8aa,0xb7b,0xb82,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xb89,0xb91,0xb97,0x373,0x373,
-0x373,0x373,0xb9f,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0xba7,0xbaf,0xbb4,0xbba,0xbc2,0xbca,0xbd2,0xbab,0xbda,0xbe2,0xbea,0xbf1,0xbac,0xba7,0xbaf,0xbaa,
-0xbba,0xbad,0xba8,0xbf9,0xbab,0xc01,0xc09,0xc11,0xc18,0xc04,0xc0c,0xc14,0xc1b,0xc07,0xc23,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x8aa,
-0xc2b,0x8aa,0xc32,0xc39,0xc41,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xc51,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xc49,
-0xc59,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xc5d,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0xaa5,0x373,0xa27,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xc65,
-0x373,0xc6d,0xc75,0xc7c,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xba3,0xc84,0xc84,0xc8a,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0xa65,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x565,0x8aa,0x8aa,0x8aa,0x373,0x373,0x373,0x373,0x8aa,0x8aa,0x8aa,0x8aa,0x8aa,0x8aa,0x8aa,0xc92,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,0x373,
-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,4,0,0,0,0,0,0,4,0,
-0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,
-0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xa,0x5a,0x7a,0x1012,0x1012,0x1012,0x1012,
-0x1012,0x1012,0x1012,0xba,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,0,0,4,0,
-4,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf9,0xf031,0x149,0xf011,0xf011,0xf011,0xf011,
-0xf011,0xf011,0xf011,0x189,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,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,0,0,0,0,0,0,0,0,0,
-4,0,1,0,0,4,0,4,0,0,0,0,4,0x1c9,0,4,
-4,0,1,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1fa,0x1012,0x1012,
-0x1012,0x1012,0x1012,0x1012,0x5a,0x5a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,
-0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x239,0xf011,0xf011,0xf011,0xf011,0xf011,0x2d9,0xf011,0xf011,
-0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0,
-0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x3c91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0xd13,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x9a9,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x9b1,0x374,0x374,0x374,0x9b4,0x374,0x374,0x374,
+0x374,0x9bc,0x9c2,0x9c6,0x374,0x374,0x9ca,0x9ce,0x9d4,0x374,0x374,0x374,0x9db,0x9df,0x9e7,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x9f7,0x9ef,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x9ff,
+0xa03,0x374,0x374,0x374,0x374,0x374,0xa0b,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0xa13,0xa17,0xa1f,0xa23,0x374,0xa2a,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0xa30,0x374,0xa34,0x374,0x374,0xa3c,0x374,0xa44,0x374,0x374,0x374,0x566,
+0xa46,0xa4d,0xa51,0x5e5,0xa59,0xa61,0x374,0xa69,0xa70,0x374,0xa76,0x5e5,0xa7b,0xa83,0x374,0x374,
+0xa88,0x566,0x374,0x374,0x374,0x357,0xa90,0x5e5,0x5e7,0xa98,0xa9f,0x374,0x374,0x374,0x374,0x374,
+0xa46,0xaa7,0x374,0x374,0xaaf,0xab7,0x374,0x374,0x374,0x374,0x374,0x374,0xabb,0xac3,0x374,0x374,
+0xacb,0x4cf,0x374,0x374,0xad3,0x374,0x374,0xad9,0xae1,0x374,0x374,0x374,0x374,0x374,0x374,0xae6,
+0x374,0x374,0x374,0xaee,0xaf6,0x374,0x374,0xafe,0xb06,0x374,0x374,0x374,0xb09,0x9b1,0xb11,0xb15,
+0xb1d,0x374,0xb24,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xb2b,
+0x374,0x374,0x972,0xb33,0x374,0x374,0x374,0xb39,0xb41,0x374,0xb45,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0xb4b,0x5e5,0xb51,0xb59,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xb5d,0xb65,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xb6b,0x374,0xb71,0x5a3,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0xaee,0xaf6,0x374,0x374,0x374,0x374,0x374,0x374,0x6a6,0x374,0xb77,0x374,
+0x374,0xb7f,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0xb84,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0xb8c,0x5a3,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x8ab,0xb94,0xb9b,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xba2,0xbaa,
+0xbb0,0x374,0x374,0x374,0x374,0xbb8,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0xbc0,0xbc8,0xbcd,0xbd3,0xbdb,0xbe3,0xbeb,0xbc4,0xbf3,0xbfb,0xc03,0xc0a,0xbc5,
+0xbc0,0xbc8,0xbc3,0xbd3,0xbc6,0xbc1,0xc12,0xbc4,0xc1a,0xc22,0xc2a,0xc31,0xc1d,0xc25,0xc2d,0xc34,
+0xc20,0xc3c,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x8ab,0xc44,0x8ab,0xc4b,0xc52,0xc5a,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xc6a,0xc72,0x374,0x374,0x374,0x374,
+0x374,0x374,0xc62,0xc7a,0xc8d,0xc80,0xc85,0x374,0x374,0x374,0x374,0xc95,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xaab,0x374,0xa28,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xc9d,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0xca1,0x374,0xca9,0xcb1,0xcb8,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0xbbc,0xcc0,0xcc0,0xcc6,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0xa6b,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x566,0x8ab,0x8ab,0x8ab,0x374,0x374,0x374,0x374,0x8ab,0x8ab,0x8ab,0x8ab,0x8ab,
+0x8ab,0x8ab,0xcce,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,0x374,
+0x374,0x374,0x374,0x354,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,4,0,0,0,0,
+0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,
+0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xa,0x5a,0x7a,
+0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xba,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,
+0,0,4,0,4,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf9,0xf031,0x149,
+0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x189,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,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,0,0,0,0,0,
+0,0,0,0,4,0,1,0,0,4,0,4,0,0,0,0,
+4,0x1c9,0,4,4,0,1,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,
+0x1012,0x1fa,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x5a,0x5a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
+0x1012,0x1012,0x1012,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x239,0xf011,0xf011,0xf011,0xf011,
+0xf011,0x2d9,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
+0xf011,0xf011,0xf011,0,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x3c91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x31a,0xff91,0x92,0xff91,0x92,0xff91,0x31a,0xffb1,0x33a,0x389,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x3d9,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x31a,0xff91,0x92,0xff91,0x92,0xff91,0x31a,0xffb1,0x33a,0x389,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,
+0xff91,0x3d9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xc392,0x92,0xff91,0x92,
-0xff91,0x92,0xff91,0x459,0x6191,0x6912,0x92,0xff91,0x92,0xff91,0x6712,0x92,0xff91,0x6692,0x6692,0x92,
-0xff91,1,0x2792,0x6512,0x6592,0x92,0xff91,0x6692,0x6792,0x3091,0x6992,0x6892,0x92,0xff91,0x5191,1,
-0x6992,0x6a92,0x4111,0x6b12,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x6d12,0x92,0xff91,0x6d12,1,1,
-0x92,0xff91,0x6d12,0x92,0xff91,0x6c92,0x6c92,0x92,0xff91,0x92,0xff91,0x6d92,0x92,0xff91,1,0,
-0x92,0xff91,1,0x1c11,0,0,0,0,0x48a,0x4bb,0x4f9,0x52a,0x55b,0x599,0x5ca,0x5fb,
-0x639,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,
-0xff91,0xd891,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x669,0x6ea,0x71b,0x759,0x92,0xff91,0xcf92,0xe412,0x92,0xff91,0x92,0xff91,
+0xc392,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x459,0x6191,0x6912,0x92,0xff91,0x92,0xff91,0x6712,0x92,
+0xff91,0x6692,0x6692,0x92,0xff91,1,0x2792,0x6512,0x6592,0x92,0xff91,0x6692,0x6792,0x3091,0x6992,0x6892,
+0x92,0xff91,0x5191,1,0x6992,0x6a92,0x4111,0x6b12,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x6d12,0x92,
+0xff91,0x6d12,1,1,0x92,0xff91,0x6d12,0x92,0xff91,0x6c92,0x6c92,0x92,0xff91,0x92,0xff91,0x6d92,
+0x92,0xff91,1,0,0x92,0xff91,1,0x1c11,0,0,0,0,0x48a,0x4bb,0x4f9,0x52a,
+0x55b,0x599,0x5ca,0x5fb,0x639,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,
+0xff91,0x92,0xff91,0x92,0xff91,0xd891,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x669,0x6ea,0x71b,0x759,0x92,0xff91,0xcf92,0xe412,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xbf12,1,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-1,1,1,1,1,1,0x78a,0x92,0xff91,0xae92,0x7aa,0x7c9,0x7c9,0x92,0xff91,0x9e92,
-0x2292,0x2392,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x7e9,0x809,0x829,0x9711,
-0x9911,1,0x9991,0x9991,1,0x9b11,1,0x9a91,0x849,1,1,1,0x9991,0x869,1,0x9891,
-1,0x889,0x8a9,1,0x97b1,0x9691,0x8a9,0x8c9,0x8e9,1,1,0x9691,1,0x909,0x9591,1,
-1,0x9511,1,1,1,1,1,1,1,0x929,1,1,0x9311,1,0x949,0x9311,
-1,1,1,0x969,0x9311,0xdd91,0x9391,0x9391,0xdc91,1,1,1,1,1,0x9291,1,
-0,1,1,1,1,1,1,1,1,0x989,0x9a9,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,5,5,0x25,5,
-5,5,5,5,5,4,4,4,0x14,4,0x14,4,5,5,4,4,
+0xbf12,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,1,1,1,1,1,1,0x78a,0x92,0xff91,0xae92,0x7aa,0x7c9,
+0x7c9,0x92,0xff91,0x9e92,0x2292,0x2392,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x7e9,0x809,0x829,0x9711,0x9911,1,0x9991,0x9991,1,0x9b11,1,0x9a91,0x849,1,1,1,
+0x9991,0x869,1,0x9891,1,0x889,0x8a9,1,0x97b1,0x9691,0x8a9,0x8c9,0x8e9,1,1,0x9691,
+1,0x909,0x9591,1,1,0x9511,1,1,1,1,1,1,1,0x929,1,1,
+0x9311,1,0x949,0x9311,1,1,1,0x969,0x9311,0xdd91,0x9391,0x9391,0xdc91,1,1,1,
+1,1,0x9291,1,0,1,1,1,1,1,1,1,1,0x989,0x9a9,1,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+5,5,0x25,5,5,5,5,5,5,4,4,4,0x14,4,0x14,4,
+5,5,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,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,
-5,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,4,4,0x54,0x54,0x44,0x44,
-0x44,0x44,0x44,0x9cc,0x54,0x44,0x54,0x44,0x54,0x44,0x44,0x44,0x44,0x44,0x44,0x54,
-0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
-0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x74,0x64,0x64,
-0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x54,0x44,
-0x44,0x9dd,0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x64,0x64,4,0x44,0x44,0x44,0x64,
-0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,
-0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x92,0xff91,0x92,0xff91,
-4,4,0x92,0xff91,0,0,5,0x4111,0x4111,0x4111,0,0x3a12,0,0,0,0,
-4,4,0x1312,4,0x1292,0x1292,0x1292,0,0x2012,0,0x1f92,0x1f92,0xa29,0x1012,0xafa,0x1012,
-0x1012,0xb3a,0x1012,0x1012,0xb7a,0xbca,0xc1a,0x1012,0xc5a,0x1012,0x1012,0x1012,0xc9a,0xcda,0,0xd1a,
-0x1012,0x1012,0xd5a,0x1012,0x1012,0xd9a,0x1012,0x1012,0xed11,0xed91,0xed91,0xed91,0xdd9,0xf011,0xea9,0xf011,
-0xf011,0xee9,0xf011,0xf011,0xf29,0xf79,0xfc9,0xf011,0x1009,0xf011,0xf011,0xf011,0x1049,0x1089,0x10c9,0x10f9,
-0xf011,0xf011,0x1139,0xf011,0xf011,0x1179,0xf011,0xf011,0xe011,0xe091,0xe091,0x412,0x11b9,0x11e9,2,2,
-2,0x1239,0x1269,0xfc11,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x1299,0x12c9,0x391,0xc631,
-0x12fa,0x1349,0,0x92,0xff91,0xfc92,0x92,0xff91,1,0xbf12,0xbf12,0xbf12,0x2812,0x2812,0x2812,0x2812,
-0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x1012,0x1012,0x137a,0x1012,
-0x13ba,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x13fa,0x1012,0x1012,0x143a,0x147a,0x1012,
-0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x14ca,0x1012,0x1012,0x1012,0x1012,0x1012,0xf011,0xf011,0x1509,0xf011,
-0x1549,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x1589,0xf011,0xf011,0x15c9,0x1609,0xf011,
-0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x1659,0xf011,0xf011,0xf011,0xf011,0xf011,0xd811,0xd811,0xd811,0xd811,
-0xd811,0xd811,0xd831,0xd811,0xd831,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0x92,0xff91,0x169a,0x16d9,
+5,5,5,5,5,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,4,4,
+0x54,0x54,0x44,0x44,0x44,0x44,0x44,0x9cc,0x54,0x44,0x54,0x44,0x54,0x44,0x44,0x44,
+0x44,0x44,0x44,0x54,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
+0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
+0x64,0x74,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x44,
+0x44,0x44,0x54,0x44,0x44,0x9dd,0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x64,0x64,4,
+0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x44,0x64,0x64,0x64,0x64,
+0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+0x92,0xff91,0x92,0xff91,4,4,0x92,0xff91,0,0,5,0x4111,0x4111,0x4111,0,0x3a12,
+0,0,0,0,4,4,0x1312,4,0x1292,0x1292,0x1292,0,0x2012,0,0x1f92,0x1f92,
+0xa29,0x1012,0xafa,0x1012,0x1012,0xb3a,0x1012,0x1012,0xb7a,0xbca,0xc1a,0x1012,0xc5a,0x1012,0x1012,0x1012,
+0xc9a,0xcda,0,0xd1a,0x1012,0x1012,0xd5a,0x1012,0x1012,0xd9a,0x1012,0x1012,0xed11,0xed91,0xed91,0xed91,
+0xdd9,0xf011,0xea9,0xf011,0xf011,0xee9,0xf011,0xf011,0xf29,0xf79,0xfc9,0xf011,0x1009,0xf011,0xf011,0xf011,
+0x1049,0x1089,0x10c9,0x10f9,0xf011,0xf011,0x1139,0xf011,0xf011,0x1179,0xf011,0xf011,0xe011,0xe091,0xe091,0x412,
+0x11b9,0x11e9,2,2,2,0x1239,0x1269,0xfc11,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,0x44,
-0x44,0x44,0x44,0x44,4,4,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x1299,0x12c9,0x391,0xc631,0x12fa,0x1349,0,0x92,0xff91,0xfc92,0x92,0xff91,1,0xbf12,0xbf12,0xbf12,
+0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,0x2812,
+0x1012,0x1012,0x137a,0x1012,0x13ba,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x13fa,0x1012,
+0x1012,0x143a,0x147a,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x14ca,0x1012,0x1012,0x1012,0x1012,0x1012,
+0xf011,0xf011,0x1509,0xf011,0x1549,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x1589,0xf011,
+0xf011,0x15c9,0x1609,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0x1659,0xf011,0xf011,0xf011,0xf011,0xf011,
+0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd831,0xd811,0xd831,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,0xd811,
+0x92,0xff91,0x169a,0x16d9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0,0x44,0x44,0x44,0x44,0x44,4,4,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x792,0x92,0xff91,0x92,
-0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xf891,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,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,0,0,4,0,0,0,0,0,4,
-1,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,
+0x792,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xf891,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0,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,0,0,4,0,0,
+0,0,0,4,1,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,0x1719,1,0,0,0,0,0,0,0,0,0x64,0x44,0x44,
-0x44,0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64,
-0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44,0x64,0x64,0x64,0x64,
-0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0x64,0,0x64,0x64,0,
-0x44,0x64,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,
+0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0x1719,1,0,0,0,0,0,0,0,
+0,0x64,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,
+0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44,
+0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0x64,
+0,0x64,0x64,0,0x44,0x64,0,0x64,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,
-4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,
-4,4,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,
-0x44,0x44,0x44,0x44,0x64,0x64,0x64,0,4,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,4,0,0,0,
-0,0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,
-0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0,0,0,0,
-0,0,0,0,0,0,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,
-0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,0,0x44,
-0x44,0x44,0x44,0x64,0x44,4,4,0x44,0x44,0,0x64,0x44,0x44,0x64,0,0,
+0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,
+4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,
+0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0,4,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,4,0,0x64,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,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x64,0x44,0x64,
-0x64,0x44,0x64,0x44,0x44,0x44,0x64,0x44,0x64,0x44,0x64,0x44,0x64,0x44,0x44,0,
+4,0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x64,
+0x64,0x64,0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64,
0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,
+0x44,4,0,0x44,0x44,0x44,0x44,0x64,0x44,4,4,0x44,0x44,0,0x64,0x44,
+0x44,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,4,0,0x64,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,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x64,
+0x64,0x64,0x44,0x64,0x64,0x44,0x64,0x44,0x44,0x44,0x64,0x44,0x64,0x44,0x64,0x44,
+0x64,0x44,0x44,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,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,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,0x44,
-0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x44,4,4,0,0,0,0,4,0,
-0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,4,0x44,
-0x44,0x44,0x44,0x44,4,0x44,0x44,0x44,4,0x44,0x44,0x44,0x44,0x44,0,0,
+0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0x64,0x64,0x64,0,0,0,0,
-0,0,0,0,4,0,0,0,0,0,0,0,4,4,0,0,
-0,0,0,0,0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,4,0x64,
-0x44,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,
-0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0,0,0,0,
-0,0,0,0,0,4,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,
-0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,4,4,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,4,0,
-0x64,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,
-0,0x64,0,0,0,0x44,0x64,0x44,0x44,4,4,4,0,0,0,0,
-0,0,0,0,0,0,4,4,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,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x44,4,4,0,0,
+0,0,4,0,0,0x64,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,
+0x44,0x44,4,0x44,0x44,0x44,0x44,0x44,4,0x44,0x44,0x44,4,0x44,0x44,0x44,
+0x44,0x44,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,0x64,0x64,0x64,
+0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,
+4,4,0,0,0,0,0,0,0x44,0x64,0x64,0x64,0x44,0x44,0x44,0x44,
+0x44,0x44,4,0x64,0x44,0x44,0x64,0x44,0x44,0x64,0x44,0x44,0x44,0x64,0x64,0x64,
+0x64,0x64,0x64,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,
+0,0,0,0,0,0,0,0,0,4,0x44,0x44,0x44,0x44,0x44,0x64,
+0x64,0x64,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+4,4,4,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,0x64,0,0,0,0,4,4,4,4,0,0,0,
-0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0,
+0,0,4,0,0x64,0,0,0,0,4,4,4,4,4,4,4,
+4,0,0,0,0,0x64,0,0,0,0x44,0x64,0x44,0x44,4,4,4,
0,0,0,0,0,0,0,0,0,0,4,4,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,0,0,0,
-0,0,0,0,0,0,0x44,0,0,4,4,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,4,4,0,0,0,0,4,
-4,0,0,4,4,0x64,0,0,0,4,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,
-0,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,
-4,4,0,4,4,0,0,0,0,0x64,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0x64,0,0,0,0,4,4,4,
+4,0,0,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,0,4,4,
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,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0x44,0,0,4,4,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,0x64,0,0,4,0,4,4,4,
-4,0,0,0,0,0,0,0,0,0x64,0,0,0,0,0,0,
-0,4,4,0,0,0,0,0,0,0,0,0,0,0,4,4,
+0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,
+0,0,0,4,4,0,0,4,4,0x64,0,0,0,4,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,4,0,
+4,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,
+0,4,4,4,4,4,0,4,4,0,0,0,0,0x64,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,4,0,0,0,
-0,0,0,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,4,0,0,0,
-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,4,4,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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0x64,0,4,4,4,0,0,0,0,0,4,4,4,0,4,4,
-4,0x64,0,0,0,0,0,0,0,0x64,0x64,0,0,0,0,0,
-0,0,0,0,0,0,4,0,0,0,0,0,4,0x64,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,0,4,
+0,4,4,4,4,0,0,0,0,0,0,0,0,0x64,0,0,
+0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,
+0,0,4,4,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,
-4,4,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0x64,0,0,0,0,0,0,0,4,4,4,0,4,0,
+4,0,0,0,0,0,0,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,0,0,4,4,4,4,0x64,0x64,0x64,0,0,0,0,0,
-0,0,4,4,0x64,0x64,0x64,0x64,4,4,4,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,
-4,4,4,4,0x64,0x64,0x64,4,4,0,0,0,0,0,0,0,
-0,0,4,0,0x64,0x64,0x64,0x64,4,4,0,0,0,0,0,0,
+4,0,0,0,4,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,0x64,0x64,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0,0x64,
-0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0x64,0x64,4,0x64,4,4,4,4,4,0x64,0x64,
-0x64,0x64,4,0,0x64,4,0x44,0x44,0x64,0,0x44,0x44,0,0,0,0,
-0,4,4,4,4,4,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,4,4,4,4,4,4,4,0,0,0,
-0,0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0x64,0,4,4,4,0,0,0,0,0,4,4,
+4,0,4,4,4,0x64,0,0,0,0,0,0,0,0x64,0x64,0,
+0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,
+4,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,4,4,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,4,4,4,4,0,4,4,4,4,4,0x64,0,0x64,0x64,0,
-0,4,4,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,4,4,0,0,
-0,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,
-0,0,0,0,0,0,4,0,0,4,4,0,0,0,0,0,
-0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,4,0,0,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,
-0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,
-0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0,0x175a,0,0,0,0,0,0x175a,0,0,
-0x1779,0x17a9,0x17d9,0x1809,0x1839,0x1869,0x1899,0x18c9,0x18f9,0x1929,0x1959,0x1989,0x19b9,0x19e9,0x1a19,0x1a49,
-0x1a79,0x1aa9,0x1ad9,0x1b09,0x1b39,0x1b69,0x1b99,0x1bc9,0x1bf9,0x1c29,0x1c59,0x1c89,0x1cb9,0x1ce9,0x1d19,0x1d49,
-0x1d79,0x1da9,0x1dd9,0x1e09,0x1e39,0x1e69,0x1e99,0x1ec9,0x1ef9,0x1f29,0x1f59,0,4,0x1f89,0x1fb9,0x1fe9,
+0,0,0,0,0,0,0,0x64,0x64,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0x64,0,0,0,0,0,0,0,4,4,
+4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,4,0,0,4,4,4,4,0x64,0x64,0x64,0,
+0,0,0,0,0,0,4,4,0x64,0x64,0x64,0x64,4,4,4,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,0x44,0x44,0x44,
-0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,
-0x203a,0x203a,0x203a,0x203a,0x203a,0x203a,0,0,0x2059,0x2089,0x20b9,0x20e9,0x2119,0x2149,0,0,
-0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,
-0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,
+0,4,0,0,4,4,4,4,0x64,0x64,0x64,4,4,0,0,0,
+0,0,0,0,0,0,4,0,0x64,0x64,0x64,0x64,4,4,4,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,4,4,0x64,0x60,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,4,4,0x60,0,0,0,
+0,0,0,0,0,0,0,0,0x64,0x64,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,4,4,0,4,4,4,4,4,4,4,0,0,
-0,0,0,0,0,0,4,0,0,4,4,4,4,4,4,4,
-4,4,0x64,4,0,0,0,4,0,0,0,0,0,0x44,0,0,
-0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,
+0,0x64,0,0x64,0,0x64,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0x64,0x64,4,0x64,4,4,4,
+4,4,0x64,0x64,0x64,0x64,4,0,0x64,4,0x44,0x44,0x64,0,0x44,0x44,
+0,0,0,0,0,4,4,4,4,4,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,4,4,4,4,4,4,
+4,0,0,0,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,0,0,
-0,0,0,4,0,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,0x64,
+0,0x64,0x64,0,0,4,4,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,4,4,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,0x64,0,0,
+4,4,0,0,0,0,4,4,4,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,
+0,0,0,0,0,0,0,0,0,0,4,0,0,4,4,0,
+0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,4,0,0,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,
+0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,
+0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0x175a,0,0x175a,0,0,0,0,
+0,0x175a,0,0,0x1779,0x17a9,0x17d9,0x1809,0x1839,0x1869,0x1899,0x18c9,0x18f9,0x1929,0x1959,0x1989,
+0x19b9,0x19e9,0x1a19,0x1a49,0x1a79,0x1aa9,0x1ad9,0x1b09,0x1b39,0x1b69,0x1b99,0x1bc9,0x1bf9,0x1c29,0x1c59,0x1c89,
+0x1cb9,0x1ce9,0x1d19,0x1d49,0x1d79,0x1da9,0x1dd9,0x1e09,0x1e39,0x1e69,0x1e99,0x1ec9,0x1ef9,0x1f29,0x1f59,0,
+5,0x1f89,0x1fb9,0x1fe9,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,0x44,0x44,0x44,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,
+0x201a,0x201a,0x201a,0x201a,0x203a,0x203a,0x203a,0x203a,0x203a,0x203a,0,0,0x2059,0x2089,0x20b9,0x20e9,
+0x2119,0x2149,0,0,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,
+0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,0x201a,
+0x201a,0x201a,0x201a,0x201a,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,4,4,0x64,0x60,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,
+0x60,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,0,4,4,4,4,4,
+4,4,0,0,0,0,0,0,0,0,4,0,0,4,4,4,
+4,4,4,4,4,4,0x64,4,0,0,0,4,0,0,0,0,
+0,0x44,0,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,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,0,0,0,0,0,
-0,0,0,0,4,4,4,0,0,0,0,4,4,0,0,0,
-0,0,0,0,0,0,4,0,0,0,0,0,0,0x64,0x44,0x64,
+0,0,0,0,0,4,4,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,0x44,0x64,0,0,4,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,0,0,0,4,4,4,0,0,0,0,4,
+4,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,
+0,0x64,0x44,0x64,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0x44,0x64,0,0,4,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,0,
+0x64,0,4,0,0,4,4,4,4,4,4,4,4,0,0,0,
+0,0,0,4,4,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0x64,
+0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,
+0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,4,0x64,
+0x64,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x44,0x44,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,4,0,4,4,4,4,4,4,4,0,0x64,0,4,0,
-0,4,4,4,4,4,4,4,4,0,0,0,0,0,0,4,
-4,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0x64,0,0,0,0,
-0,0,0,4,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,
-0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,4,0x64,0x64,0x44,0x44,0x64,
-0x64,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x44,0x44,0,0,0,0,0,
+0,0,0,0,0x64,0,4,4,4,4,4,0,4,0,0,0,
+0,0,4,0,0x60,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,
-0x64,0,4,4,4,4,4,0,4,0,0,0,0,0,4,0,
-0x60,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,0x44,
-0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,4,4,4,4,0,0,4,4,0x60,0x64,
-4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0x64,0,4,4,0,0,0,4,0,4,
-4,4,0x60,0x60,0,0,0,0,0,0,0,0,0,0,0,0,
-4,4,4,4,4,4,4,4,0,0,4,0x64,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,0,0,0x2179,0x21a9,0x21d9,0x2209,
-0x2239,0x2289,0x22d9,0x2309,0x2339,0,0,0,0,0,0,0,0x236a,0x236a,0x236a,0x236a,
+0,0,0,0x44,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,
+4,4,0x60,0x64,4,4,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0x64,0,4,4,0,0,
+0,4,0,4,4,4,0x60,0x60,0,0,0,0,0,0,0,0,
+0,0,0,0,4,4,4,4,4,4,4,4,0,0,4,0x64,
+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,0,0,
+0x2179,0x21a9,0x21d9,0x2209,0x2239,0x2289,0x22d9,0x2309,0x2339,0,0,0,0,0,0,0,
0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,
-0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0,0,0x236a,0x236a,0x236a,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0,
-0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x64,0x64,0x64,0x44,0,0x64,0x64,
-0x64,0x64,0x64,0x64,0x64,0,0,0,0,0x64,0,0,0,0,0,0,
-0x44,0,0,0,0x44,0x44,0,0,0,0,0,0,1,1,1,1,
+0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0x236a,0,0,0x236a,0x236a,0x236a,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0x44,0x44,0x44,0,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0x64,0x64,0x64,0x64,
+0x44,0,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0,0,0x64,0,0,
+0,0,0,0,0x44,0,0,0,0x44,0x44,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,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,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x25,5,
-5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,
-1,1,1,1,5,0x2389,1,1,1,0x23a9,1,1,5,5,5,5,
-0x25,5,5,5,0x25,5,5,5,5,5,5,5,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,0x23c9,1,1,1,1,1,
-1,1,0x21,1,1,1,1,5,5,5,5,5,0x44,0x44,0x44,0x44,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+5,5,0x25,5,5,5,5,5,5,5,5,1,1,1,1,1,
+1,1,1,1,1,1,1,1,5,0x2389,1,1,1,0x23a9,1,1,
+5,5,5,5,0x25,5,5,5,0x25,5,5,5,5,5,5,5,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x23c9,1,
+1,1,1,1,1,1,0x21,1,1,1,1,5,5,5,5,5,
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
-0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x44,0x64,0x64,0x44,0x64,0x44,0x44,0x64,0x44,
-0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x64,0x64,0x44,0x44,0x44,
-0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x23ea,0x2429,0x92,0xff91,
+0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x44,0x64,0x64,0x44,0x64,
+0x44,0x44,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,0x44,0x44,0x64,0x64,0x64,
+0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xffb1,0x92,0xff91,
0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x2469,0x24e9,
-0x2569,0x25e9,0x2669,0x26e9,1,1,0x271a,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
-0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,
-0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0,0,
-0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0,0,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,
-0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,
-0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0,0,
-0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0,0,0x2769,0x411,0x27e9,0x411,0x2899,0x411,0x2949,0x411,
-0,0xfc12,0,0xfc12,0,0xfc12,0,0xfc12,0x411,0x411,0x411,0x411,0x411,0x411,0x411,0x411,
-0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x2511,0x2511,0x2b11,0x2b11,0x2b11,0x2b11,0x3211,0x3211,
-0x4011,0x4011,0x3811,0x3811,0x3f11,0x3f11,0,0,0x29f9,0x2a69,0x2ad9,0x2b49,0x2bb9,0x2c29,0x2c99,0x2d09,
-0x2d7b,0x2deb,0x2e5b,0x2ecb,0x2f3b,0x2fab,0x301b,0x308b,0x30f9,0x3169,0x31d9,0x3249,0x32b9,0x3329,0x3399,0x3409,
-0x347b,0x34eb,0x355b,0x35cb,0x363b,0x36ab,0x371b,0x378b,0x37f9,0x3869,0x38d9,0x3949,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,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,0,0,0,0,
-0,0,0,0,4,4,4,4,4,0,4,4,4,4,4,4,
-4,4,4,4,0,0x25,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,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,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,0x64,0x64,0x64,0x44,
-0x44,4,4,4,4,0x44,4,4,4,0x64,0x64,0x44,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,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,0x812,0x812,0x812,0x812,
-0x812,0x812,0x812,0x812,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,
-0xf811,0xf811,0xf811,0xf811,0,0,0,0x92,0xff91,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,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,
-0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,
-0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,
+0x23ea,0x2429,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x2469,0x24e9,0x2569,0x25e9,0x2669,0x26e9,1,1,0x271a,1,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xffb1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x411,0x411,0x411,0x411,
+0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,
+0x411,0x411,0,0,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0,0,0x411,0x411,0x411,0x411,
+0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,
+0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x411,0x411,0x411,0x411,
+0x411,0x411,0,0,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0,0,0x2769,0x411,0x27e9,0x411,
+0x2899,0x411,0x2949,0x411,0,0xfc12,0,0xfc12,0,0xfc12,0,0xfc12,0x411,0x411,0x411,0x411,
+0x411,0x411,0x411,0x411,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0xfc12,0x2511,0x2511,0x2b11,0x2b11,
+0x2b11,0x2b11,0x3211,0x3211,0x4011,0x4011,0x3811,0x3811,0x3f11,0x3f11,0,0,0x29f9,0x2a69,0x2ad9,0x2b49,
+0x2bb9,0x2c29,0x2c99,0x2d09,0x2d7b,0x2deb,0x2e5b,0x2ecb,0x2f3b,0x2fab,0x301b,0x308b,0x30f9,0x3169,0x31d9,0x3249,
+0x32b9,0x3329,0x3399,0x3409,0x347b,0x34eb,0x355b,0x35cb,0x363b,0x36ab,0x371b,0x378b,0x37f9,0x3869,0x38d9,0x3949,
+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,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,
+0,0,0,0,0,0,0,0,4,4,4,4,4,0,4,4,
+4,4,4,4,4,4,4,4,0,0x25,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,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,0x44,0x44,0x64,0x64,0x44,0x44,0x44,0x44,
+0x64,0x64,0x64,0x44,0x44,4,4,4,4,0x44,4,4,4,0x64,0x64,0x44,
+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,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,
+0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,
+0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0xf811,0,0,0,0x92,0xff91,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,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,
+0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xd12,0xf311,0xf311,0xf311,0xf311,
+0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0xf311,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,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,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,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,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,
+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,
+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,0,0x5059,0,0,0,0,0,0x5059,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,0x44,0x44,0x44,0x44,
+0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0,0x5059,0,0,0,0,0,0x5059,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,
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
-0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x60,0x60,
-0,4,4,4,4,4,0,0,0,0,0,4,0,0,0,0,
+0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0,0,0x64,0x64,
+0x64,0x64,0x60,0x60,0,4,4,4,4,4,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,0,0,0x64,0x64,4,4,4,4,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0x64,0x64,4,4,4,4,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,4,4,4,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,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,
-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,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,
+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,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,
-0x92,0xff91,0x92,0xff91,5,5,0x44,0x44,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0x44,0x44,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,
+0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,5,5,0x44,0x44,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,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,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,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,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,4,4,
-4,0x92,0xff91,0,5,5,1,0,0,0,0,0,0,0,4,0,
-0,0,0x64,0,0,0,0,4,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,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,0x64,4,0,0,0,0,0,0,
+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,
+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,
+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,
+0,0,4,0,0,0,0x64,0,0,0,0,4,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,4,4,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,0x64,4,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,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,
+0,0,0,0,0,0,0,4,0,0,0,0,0,0,4,4,
+4,4,4,0x64,0x64,0x64,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,0,0x60,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0x64,0,0,4,4,
+4,4,0,0,4,4,0,0,0x60,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,4,4,4,4,4,4,0,
+0,4,4,0,0,4,4,0,0,0,0,0,0,0,0,0,
+0,0,0,4,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,
-0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
-0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,0,0,0,
-0,0,0,4,0,0,0,0,0,0,4,4,4,4,4,0x64,
-0x64,0x64,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,0,0x60,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0x64,0,0,4,4,4,4,0,0,
-4,4,0,0,0x60,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,4,4,4,4,4,4,0,0,4,4,0,
-0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,
-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,4,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,0x44,0,0x44,0x44,
-0x64,0,0,0x44,0x44,0,0,0,0,0,0x44,0x44,0,0x44,0,0,
+4,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,
-0,0,0,0,0,0,0,0,0,4,0,0,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,4,
-5,5,5,5,1,1,1,1,1,1,1,1,1,4,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,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,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,0,0,0,0,
-0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,
-0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,4,0,0,4,0,0,
-0,0,0,0,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
+0x44,0,0x44,0x44,0x64,0,0,0x44,0x44,0,0,0,0,0,0x44,0x44,
+0,0x44,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,4,0,0,
+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,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,
+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,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,
+0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,
+0x44,0x44,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0x44,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,
+0,4,0,0,0,0,0,0,0,0,0,0,0,0x1012,0x1012,0x1012,
0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
-0x1012,0x1012,0x1012,0,0,0,4,0,4,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
+0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0,0,0,4,0,4,0xf011,0xf011,0xf011,
0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
-0xf011,0xf011,0xf011,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,0,0,0,4,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,
+0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,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,0,0,0,4,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,0x64,0,0,
-0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,4,4,4,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,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0x1412,0x1412,0x1412,0x1412,
+0,0x64,0,0,0x64,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,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,
+0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,
0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,
-0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0xec11,0xec11,0xec11,0xec11,
-0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,
-0xec11,0xec11,0xec11,0xec11,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,
-0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0,0,0,0,0xec11,0xec11,0xec11,0xec11,
0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,
0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,
-0x1392,0x1392,0x1392,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0,0x1392,0x1392,0,0xec91,
-0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,0xec91,0xec91,0xec91,0xec91,
-0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,0xec91,0xec91,0xec91,0xec91,
-0xec91,0xec91,0,0xec91,0xec91,0,0,0,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,0,0,0,0,0,5,4,4,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,4,4,4,0,4,4,0,
-0,0,0,0,4,0x64,4,0x44,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0x44,0x64,0x64,0,0,0,0,0x64,0,0,0,0,0,0x44,0x64,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,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,
+0,0,0,0,0,0,0,0,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,
+0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0x1412,0,0,0,0,
+0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,
+0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0xec11,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0x1392,0x1392,0x1392,0x1392,
+0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0,
+0x1392,0x1392,0,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,
+0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,
+0xec91,0xec91,0xec91,0xec91,0xec91,0xec91,0,0xec91,0xec91,0,0,0,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,0,0,0,0,0,5,4,4,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,4,4,4,
+0,4,4,0,0,0,0,0,4,0x64,4,0x44,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0x44,0x64,0x64,0,0,0,0,0x64,0,0,0,0,
+0,0x44,0x64,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,0x2012,0x2012,0x2012,0x2012,
0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,
-0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,
+0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0x2012,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0xe011,0xe011,0xe011,0xe011,
0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,
-0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0,0,0,0,
+0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0xe011,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0x44,0x44,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0x64,
-0x44,0x44,0x44,0x64,0x44,0x64,0x64,0x64,0x64,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0x44,0x64,0x44,0x64,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,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,4,4,4,4,4,4,4,4,
-4,4,0x64,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,0x64,0,0,4,
-4,0,0,0,0,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,0,0,0x64,0x64,0,0,4,0,0,0,0,4,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,0x44,0x44,0x44,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,0x64,0x64,
+0,0,0,0,0,0,0x64,0x64,0x44,0x44,0x44,0x64,0x44,0x64,0x64,0x64,
+0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0x44,0x64,0x44,0x64,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,4,
-4,4,4,4,0,4,4,4,4,4,4,0x64,0x64,0,0,0,
+4,4,4,4,4,4,4,4,4,4,0x64,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,0x64,0,0,4,4,0,0,0,0,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,0,0,0,4,4,4,4,4,4,
-4,4,4,0,0x60,0,0,0,0,0,0,0,0,4,0x64,4,
-4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,4,4,4,0,0,4,0x60,0x64,4,
-0,0,0,0,0,0,4,0,0,0,0,4,4,4,4,4,
-4,0x64,0x64,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,0x60,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,
-0x44,0,0,0,0x44,0x44,0x44,0x44,0x44,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0x64,4,4,0,0x64,0,0,0,0,0,
+0,0,0,0,0,0,0,4,4,4,4,0,0,0x64,0x64,0,
+0,4,0,0,0,0,4,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,0x44,0x44,0x44,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,0x44,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,0,4,0,
-0,0,0,4,4,0,0x64,0x64,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,4,4,4,4,4,0,4,4,4,
+4,4,4,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,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,0,
-0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,
-4,4,0,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,
+0,0,4,4,4,4,4,4,4,4,4,0,0x60,0,0,0,
+0,0,0,0,0,4,0x64,4,4,0,0,4,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
+4,4,0,0,4,0x60,0x64,4,0,0,0,0,0,0,4,0,
+0,0,0,4,4,4,4,4,4,0x64,0x64,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4,4,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,0,
-0,4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,4,
-0,4,0,0,4,4,4,4,4,4,0x60,0x64,0,0,0,0,
+4,0,0,0,0,0,0,0,0,0,0,0,0,0x60,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,4,4,4,0,0,4,4,
-4,4,0,4,4,4,4,0x64,0,0,0,0,0,0,0,0,
+0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0,0x44,0x44,0x44,0x44,
+0x44,0,0,0,0,0,0,0,0,0,0,0,0,0,0x64,4,
+4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0x44,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,0,0x64,0x64,0,0,0,0,0,
-0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
-0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
-0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
-0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
+4,4,4,4,4,0,4,0,0,0,0,4,4,0,0x64,0x64,
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,4,4,0x60,0x64,0,
-0,0,0,0x64,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,4,4,
+4,4,0,0,0,0,0,0,4,4,0,0x64,0x64,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4,4,4,4,0,0,4,4,0,0,0,0,0,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,4,4,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
-0x64,4,4,4,4,0,0,4,4,4,4,0,0,0,0,0,
-0,0,0,0x64,0,0,0,0,0,0,0,0,0,4,4,4,
-4,4,4,0,0,4,4,4,0,0,0,0,0,0,0,0,
-0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,0,
-4,0x64,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,0,4,4,4,4,
-4,4,0,0x64,4,4,4,4,4,4,4,4,0,0,4,4,
-4,4,4,4,4,0,4,4,0,4,4,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,
-4,4,4,0,0,0,4,0,4,4,0,4,4,4,0x64,4,
-0x64,0x64,0,4,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,0,0,
-0,4,0,0x64,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,4,4,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,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0x64,0x64,0x64,0x64,0x64,0,0,0,
+4,4,4,4,4,4,4,0,0,4,0,0x64,0,0,0,0,
+0,0,0,0,0,0,0,4,0,4,0,0,4,4,4,4,
+4,4,0x60,0x64,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,4,4,4,0,0,4,4,4,4,0,4,4,4,4,0x64,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0x44,0x44,0x44,0x44,0x44,0x44,0x44,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,4,0,4,4,0,0,0,
-0,0,0,0,0,0,0,0,0x60,0x60,0,0,0,0,0,0,
+0,0x64,0x64,0,0,0,0,0,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
+0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,
+0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0x1012,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
+0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,
+0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,0xf011,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,4,4,0x60,0x64,0,0,0,0,0x64,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,4,4,4,4,0,0,4,4,
+0,0,0,0,0,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,0,0,0,0,0,0,4,0x64,4,4,4,4,0,0,4,
+4,4,4,0,0,0,0,0,0,0,0,0x64,0,0,0,0,
+0,0,0,0,0,4,4,4,4,4,4,0,0,4,4,4,
+0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,
+4,4,4,4,4,4,4,0,4,0x64,0,0,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,0,0,0,0,
+4,4,4,0,4,4,4,4,4,4,0,0x64,4,4,4,4,
+4,4,4,4,0,0,4,4,4,4,4,4,4,0,4,4,
+0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,4,4,4,4,4,4,0,0,0,4,0,
+4,4,0,4,4,4,0x64,4,0x64,0x64,0,4,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,4,0x64,0,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,
+0,0,0,0,4,4,0,0,0,4,0,0x64,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
+4,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,4,4,4,4,4,0,
+0,0,0,0,4,0x60,0x64,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,0x60,0x60,0x64,0x64,0x64,0,0,
-0,0x60,0x60,0x60,0x60,0x60,0x60,4,4,4,4,4,4,4,4,0x64,
-0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0x44,0x44,0x44,0x44,0x44,0x64,0x64,
+0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,
+4,4,4,4,4,0,0,0,0,0,0,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,0,0,0,0x64,0x64,0x64,0x64,
+0x64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,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,4,0,4,
+4,0,0,0,0,0,0,0,0,0,0,0,0x60,0x60,0,0,
+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,
+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,4,0x64,0,
+4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,
+4,4,4,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,0,0,0,0,0,0,0,0,0,0,0,0x60,0x60,0x64,
+0x64,0x64,0,0,0,0x60,0x60,0x60,0x60,0x60,0x60,4,4,4,4,4,
+4,4,4,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0x44,0x44,0x44,
+0x44,0x44,0x64,0x64,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0x44,0x44,0x44,0x44,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0x44,0x44,0x44,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,0x44,0x44,0x44,0x44,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x44,0x44,
-0x44,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,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,0x21,0x21,
-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,1,1,
-1,1,1,1,1,0,0x21,0x21,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,1,1,1,1,1,1,
1,1,0x21,0x21,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,2,0,2,2,0,0,2,0,0,2,2,0,
-0,2,2,2,2,0,2,2,2,2,2,2,2,2,1,1,
-1,1,0,1,0,1,0x21,0x21,1,1,1,1,0,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,1,1,1,1,2,2,0,2,
-2,2,2,0,0,2,2,2,2,2,2,2,2,0,2,2,
-2,2,2,2,2,0,1,1,1,1,1,1,1,1,0x21,0x21,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-2,2,0,2,2,2,2,0,2,2,2,2,2,0,2,0,
-0,0,2,2,2,2,2,2,2,0,1,1,1,1,1,1,
+1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,1,1,1,1,1,1,1,0,0x21,0x21,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,1,1,
+1,1,1,1,1,1,0x21,0x21,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,2,0,2,2,0,0,2,0,
+0,2,2,0,0,2,2,2,2,0,2,2,2,2,2,2,
+2,2,1,1,1,1,0,1,0,1,0x21,0x21,1,1,1,1,
+0,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,1,1,1,1,
+2,2,0,2,2,2,2,0,0,2,2,2,2,2,2,2,
+2,0,2,2,2,2,2,2,2,0,1,1,1,1,1,1,
1,1,0x21,0x21,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,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,2,2,0,2,2,2,2,0,2,2,2,2,
+2,0,2,0,0,0,2,2,2,2,2,2,2,0,1,1,
+1,1,1,1,1,1,0x21,0x21,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,1,1,1,1,1,1,0,0,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,2,2,
+2,2,2,2,2,2,2,2,1,1,1,1,1,1,0,0,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,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,0,
-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,0,
+2,2,2,2,2,2,2,2,2,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,1,1,0,1,1,1,1,1,1,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,0,
-1,1,1,1,1,1,2,1,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,
+1,1,1,0,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,0,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,
+2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+1,1,1,0,1,1,1,1,1,1,2,1,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,4,4,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,4,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,0,0,0,4,
-4,4,4,4,0,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,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0x44,0x44,0x44,0x44,
-0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,0,0x44,
-0x44,0x44,0x44,0x44,1,1,1,1,1,1,1,1,1,1,0,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x21,1,
-1,1,1,0,0x44,0x44,0,0x44,0x44,0,0x44,0x44,0x44,0x44,0x44,0,
+4,4,4,4,4,4,4,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,4,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,
+0,0,0,4,4,4,4,4,0,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,0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,
+0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+0x44,0,0,0x44,0x44,0x44,0x44,0x44,1,1,1,1,1,1,1,1,
+1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,0x21,1,1,1,1,0,0,0,0,0,0,1,1,1,
+1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0x44,0x44,0,0x44,0x44,0,0x44,0x44,
+0x44,0x44,0x44,0,0,0,0,0,5,5,5,5,5,5,5,5,
+5,5,5,5,5,5,5,5,0x25,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,0x44,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,
+0x25,0x25,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,0x44,0x44,0x44,0x44,0x44,0x44,0x44,4,4,4,4,4,
-4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
+0x64,0x64,0x64,0x44,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0,0,0,0,0,
0,0,0,0,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,
0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,0x1112,
@@ -959,23 +974,23 @@ static const uint16_t ucase_props_unfold[370]={
};
static const UCaseProps ucase_props_singleton={
- NULL,
+ nullptr,
ucase_props_indexes,
ucase_props_exceptions,
ucase_props_unfold,
{
ucase_props_trieIndex,
- ucase_props_trieIndex+3408,
- NULL,
- 3408,
- 9500,
+ ucase_props_trieIndex+3412,
+ nullptr,
+ 3412,
+ 9736,
0x188,
- 0xdcc,
+ 0xdd0,
0x0,
0x0,
0xe0800,
- 0x3268,
- NULL, 0, FALSE, FALSE, 0, NULL
+ 0x3358,
+ nullptr, 0, false, false, 0, nullptr
},
{ 4,0,0,0 }
};
diff --git a/contrib/libs/icu/common/ucasemap.cpp b/contrib/libs/icu/common/ucasemap.cpp
index ed72bda828f..1d8a8b6c2f7 100644
--- a/contrib/libs/icu/common/ucasemap.cpp
+++ b/contrib/libs/icu/common/ucasemap.cpp
@@ -49,7 +49,7 @@ U_NAMESPACE_USE
UCaseMap::UCaseMap(const char *localeID, uint32_t opts, UErrorCode *pErrorCode) :
#if !UCONFIG_NO_BREAK_ITERATION
- iter(NULL),
+ iter(nullptr),
#endif
caseLocale(UCASE_LOC_UNKNOWN), options(opts) {
ucasemap_setLocale(this, localeID, pErrorCode);
@@ -64,15 +64,15 @@ UCaseMap::~UCaseMap() {
U_CAPI UCaseMap * U_EXPORT2
ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
UCaseMap *csm = new UCaseMap(locale, options, pErrorCode);
- if(csm==NULL) {
+ if(csm==nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
} else if (U_FAILURE(*pErrorCode)) {
delete csm;
- return NULL;
+ return nullptr;
}
return csm;
}
@@ -97,7 +97,7 @@ ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return;
}
- if (locale != NULL && *locale == 0) {
+ if (locale != nullptr && *locale == 0) {
csm->locale[0] = 0;
csm->caseLocale = UCASE_LOC_ROOT;
return;
@@ -112,8 +112,7 @@ ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode) {
if(length==sizeof(csm->locale)) {
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
}
- if(U_SUCCESS(*pErrorCode)) {
- csm->caseLocale=UCASE_LOC_UNKNOWN;
+ if(U_SUCCESS(*pErrorCode)) {
csm->caseLocale = ucase_getCaseLocale(csm->locale);
} else {
csm->locale[0]=0;
@@ -137,14 +136,14 @@ namespace {
/* append a full case mapping result, see UCASE_MAX_STRING_LENGTH */
inline UBool
-appendResult(int32_t cpLength, int32_t result, const UChar *s,
+appendResult(int32_t cpLength, int32_t result, const char16_t *s,
ByteSink &sink, uint32_t options, icu::Edits *edits, UErrorCode &errorCode) {
U_ASSERT(U_SUCCESS(errorCode));
/* decode the result */
if(result<0) {
/* (not) original code point */
- if(edits!=NULL) {
+ if(edits!=nullptr) {
edits->addUnchanged(cpLength);
}
if((options & U_OMIT_UNCHANGED_TEXT) == 0) {
@@ -158,7 +157,7 @@ appendResult(int32_t cpLength, int32_t result, const UChar *s,
ByteSinkUtil::appendCodePoint(cpLength, result, sink, edits);
}
}
- return TRUE;
+ return true;
}
// See unicode/utf8.h U8_APPEND_UNSAFE().
@@ -293,7 +292,7 @@ void toLower(int32_t caseLocale, uint32_t options,
break;
}
// slow path
- const UChar *s;
+ const char16_t *s;
if (caseLocale >= 0) {
csc->cpStart = cpStart;
csc->cpLimit = srcIndex;
@@ -403,7 +402,7 @@ void toUpper(int32_t caseLocale, uint32_t options,
// slow path
csc->cpStart = cpStart;
csc->cpLimit = srcIndex;
- const UChar *s;
+ const char16_t *s;
c = ucase_toFullUpper(c, utf8_caseContextIterator, csc, &s, caseLocale);
if (c >= 0) {
ByteSinkUtil::appendUnchanged(src + prev, cpStart - prev,
@@ -420,6 +419,97 @@ void toUpper(int32_t caseLocale, uint32_t options,
#if !UCONFIG_NO_BREAK_ITERATION
+namespace {
+
+constexpr uint8_t ACUTE_BYTE0 = u8"\u0301"[0];
+
+constexpr uint8_t ACUTE_BYTE1 = u8"\u0301"[1];
+
+/**
+ * Input: c is a letter I with or without acute accent.
+ * start is the index in src after c, and is less than segmentLimit.
+ * If a plain i/I is followed by a plain j/J,
+ * or an i/I with acute (precomposed or decomposed) is followed by a j/J with acute,
+ * then we output accordingly.
+ *
+ * @return the src index after the titlecased sequence, or the start index if no Dutch IJ
+ */
+int32_t maybeTitleDutchIJ(const uint8_t *src, UChar32 c, int32_t start, int32_t segmentLimit,
+ ByteSink &sink, uint32_t options, icu::Edits *edits, UErrorCode &errorCode) {
+ U_ASSERT(start < segmentLimit);
+
+ int32_t index = start;
+ bool withAcute = false;
+
+ // If the conditions are met, then the following variables tell us what to output.
+ int32_t unchanged1 = 0; // code units before the j, or the whole sequence (0..3)
+ bool doTitleJ = false; // true if the j needs to be titlecased
+ int32_t unchanged2 = 0; // after the j (0 or 1)
+
+ // next character after the first letter
+ UChar32 c2;
+ c2 = src[index++];
+
+ // Is the first letter an i/I with accent?
+ if (c == u'I') {
+ if (c2 == ACUTE_BYTE0 && index < segmentLimit && src[index++] == ACUTE_BYTE1) {
+ withAcute = true;
+ unchanged1 = 2; // ACUTE is 2 code units in UTF-8
+ if (index == segmentLimit) { return start; }
+ c2 = src[index++];
+ }
+ } else { // Í
+ withAcute = true;
+ }
+
+ // Is the next character a j/J?
+ if (c2 == u'j') {
+ doTitleJ = true;
+ } else if (c2 == u'J') {
+ ++unchanged1;
+ } else {
+ return start;
+ }
+
+ // A plain i/I must be followed by a plain j/J.
+ // An i/I with acute must be followed by a j/J with acute.
+ if (withAcute) {
+ if ((index + 1) >= segmentLimit || src[index++] != ACUTE_BYTE0 || src[index++] != ACUTE_BYTE1) {
+ return start;
+ }
+ if (doTitleJ) {
+ unchanged2 = 2; // ACUTE is 2 code units in UTF-8
+ } else {
+ unchanged1 = unchanged1 + 2; // ACUTE is 2 code units in UTF-8
+ }
+ }
+
+ // There must not be another combining mark.
+ if (index < segmentLimit) {
+ int32_t cp;
+ int32_t i = index;
+ U8_NEXT(src, i, segmentLimit, cp);
+ uint32_t typeMask = U_GET_GC_MASK(cp);
+ if ((typeMask & U_GC_M_MASK) != 0) {
+ return start;
+ }
+ }
+
+ // Output the rest of the Dutch IJ.
+ ByteSinkUtil::appendUnchanged(src + start, unchanged1, sink, options, edits, errorCode);
+ start += unchanged1;
+ if (doTitleJ) {
+ ByteSinkUtil::appendCodePoint(1, u'J', sink, edits);
+ ++start;
+ }
+ ByteSinkUtil::appendUnchanged(src + start, unchanged2, sink, options, edits, errorCode);
+
+ U_ASSERT(start + unchanged2 == index);
+ return index;
+}
+
+} // namespace
+
U_CFUNC void U_CALLCONV
ucasemap_internalUTF8ToTitle(
int32_t caseLocale, uint32_t options, BreakIterator *iter,
@@ -435,14 +525,14 @@ ucasemap_internalUTF8ToTitle(
csc.p=(void *)src;
csc.limit=srcLength;
int32_t prev=0;
- UBool isFirstIndex=TRUE;
+ UBool isFirstIndex=true;
/* titlecasing loop */
while(prev<srcLength) {
/* find next index where to titlecase */
int32_t index;
if(isFirstIndex) {
- isFirstIndex=FALSE;
+ isFirstIndex=false;
index=iter->first();
} else {
index=iter->next();
@@ -490,7 +580,7 @@ ucasemap_internalUTF8ToTitle(
if(c>=0) {
csc.cpStart=titleStart;
csc.cpLimit=titleLimit;
- const UChar *s;
+ const char16_t *s;
c=ucase_toFullTitle(c, utf8_caseContextIterator, &csc, &s, caseLocale);
if (!appendResult(titleLimit-titleStart, c, s, sink, options, edits, errorCode)) {
return;
@@ -504,19 +594,14 @@ ucasemap_internalUTF8ToTitle(
}
/* Special case Dutch IJ titlecasing */
- if (titleStart+1 < index &&
- caseLocale == UCASE_LOC_DUTCH &&
- (src[titleStart] == 0x0049 || src[titleStart] == 0x0069)) {
- if (src[titleStart+1] == 0x006A) {
- ByteSinkUtil::appendCodePoint(1, 0x004A, sink, edits);
- titleLimit++;
- } else if (src[titleStart+1] == 0x004A) {
- // Keep the capital J from getting lowercased.
- if (!ByteSinkUtil::appendUnchanged(src+titleStart+1, 1,
- sink, options, edits, errorCode)) {
- return;
- }
- titleLimit++;
+ if (titleLimit < index &&
+ caseLocale == UCASE_LOC_DUTCH) {
+ if (c < 0) {
+ c = ~c;
+ }
+
+ if (c == u'I' || c == u'Í') {
+ titleLimit = maybeTitleDutchIJ(src, c, titleLimit, index, sink, options, edits, errorCode);
}
}
@@ -558,12 +643,12 @@ UBool isFollowedByCasedLetter(const uint8_t *s, int32_t i, int32_t length) {
if ((type & UCASE_IGNORABLE) != 0) {
// Case-ignorable, continue with the loop.
} else if (type != UCASE_NONE) {
- return TRUE; // Followed by cased letter.
+ return true; // Followed by cased letter.
} else {
- return FALSE; // Uncased and not case-ignorable.
+ return false; // Uncased and not case-ignorable.
}
}
- return FALSE; // Not followed by cased letter.
+ return false; // Not followed by cased letter.
}
// Keep this consistent with the UTF-16 version in ustrcase.cpp and the Java version in CaseMap.java.
@@ -622,7 +707,7 @@ void toUpper(uint32_t options,
nextState |= AFTER_VOWEL_WITH_ACCENT;
}
// Map according to Greek rules.
- UBool addTonos = FALSE;
+ UBool addTonos = false;
if (upper == 0x397 &&
(data & HAS_ACCENT) != 0 &&
numYpogegrammeni == 0 &&
@@ -633,7 +718,7 @@ void toUpper(uint32_t options,
if (i == nextIndex) {
upper = 0x389; // Preserve the precomposed form.
} else {
- addTonos = TRUE;
+ addTonos = true;
}
} else if ((data & HAS_DIALYTIKA) != 0) {
// Preserve a vowel with dialytika in precomposed form if it exists.
@@ -648,7 +733,7 @@ void toUpper(uint32_t options,
UBool change;
if (edits == nullptr && (options & U_OMIT_UNCHANGED_TEXT) == 0) {
- change = TRUE; // common, simple usage
+ change = true; // common, simple usage
} else {
// Find out first whether we are changing the text.
U_ASSERT(0x370 <= upper && upper <= 0x3ff); // 2-byte UTF-8, main Greek block
@@ -672,11 +757,11 @@ void toUpper(uint32_t options,
int32_t newLength = (i2 - i) + numYpogegrammeni * 2; // 2 bytes per U+0399
change |= oldLength != newLength;
if (change) {
- if (edits != NULL) {
+ if (edits != nullptr) {
edits->addReplace(oldLength, newLength);
}
} else {
- if (edits != NULL) {
+ if (edits != nullptr) {
edits->addUnchanged(oldLength);
}
// Write unchanged text?
@@ -698,8 +783,8 @@ void toUpper(uint32_t options,
}
}
} else if(c>=0) {
- const UChar *s;
- c=ucase_toFullUpper(c, NULL, NULL, &s, UCASE_LOC_GREEK);
+ const char16_t *s;
+ c=ucase_toFullUpper(c, nullptr, nullptr, &s, UCASE_LOC_GREEK);
if (!appendResult(nextIndex - i, c, s, sink, options, edits, errorCode)) {
return;
}
@@ -806,8 +891,8 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P
return 0;
}
if( destCapacity<0 ||
- (dest==NULL && destCapacity>0) ||
- (src==NULL && srcLength!=0) || srcLength<-1
+ (dest==nullptr && destCapacity>0) ||
+ (src==nullptr && srcLength!=0) || srcLength<-1
) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -819,7 +904,7 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P
}
/* check for overlapping source and destination */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((src>=dest && src<(dest+destCapacity)) ||
(dest>=src && dest<(src+srcLength)))
) {
@@ -855,7 +940,7 @@ ucasemap_utf8ToLower(const UCaseMap *csm,
csm->caseLocale, csm->options, UCASEMAP_BREAK_ITERATOR_NULL
dest, destCapacity,
src, srcLength,
- ucasemap_internalUTF8ToLower, NULL, *pErrorCode);
+ ucasemap_internalUTF8ToLower, nullptr, *pErrorCode);
}
U_CAPI int32_t U_EXPORT2
@@ -867,7 +952,7 @@ ucasemap_utf8ToUpper(const UCaseMap *csm,
csm->caseLocale, csm->options, UCASEMAP_BREAK_ITERATOR_NULL
dest, destCapacity,
src, srcLength,
- ucasemap_internalUTF8ToUpper, NULL, *pErrorCode);
+ ucasemap_internalUTF8ToUpper, nullptr, *pErrorCode);
}
U_CAPI int32_t U_EXPORT2
@@ -879,7 +964,7 @@ ucasemap_utf8FoldCase(const UCaseMap *csm,
UCASE_LOC_ROOT, csm->options, UCASEMAP_BREAK_ITERATOR_NULL
dest, destCapacity,
src, srcLength,
- ucasemap_internalUTF8Fold, NULL, *pErrorCode);
+ ucasemap_internalUTF8Fold, nullptr, *pErrorCode);
}
U_NAMESPACE_BEGIN
diff --git a/contrib/libs/icu/common/ucasemap_imp.h b/contrib/libs/icu/common/ucasemap_imp.h
index e17a0ae5a36..71d0e9033fe 100644
--- a/contrib/libs/icu/common/ucasemap_imp.h
+++ b/contrib/libs/icu/common/ucasemap_imp.h
@@ -139,16 +139,16 @@ ustrcase_getCaseLocale(const char *locale);
/** Implements UStringCaseMapper. */
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToLower(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode);
/** Implements UStringCaseMapper. */
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToUpper(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode);
@@ -158,8 +158,8 @@ ustrcase_internalToUpper(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_IT
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToTitle(int32_t caseLocale, uint32_t options,
icu::BreakIterator *iter,
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode);
@@ -168,8 +168,8 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options,
/** Implements UStringCaseMapper. */
U_CFUNC int32_t U_CALLCONV
ustrcase_internalFold(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode);
@@ -179,8 +179,8 @@ ustrcase_internalFold(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERA
*/
U_CFUNC int32_t
ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
UStringCaseMapper *stringCaseMapper,
icu::Edits *edits,
UErrorCode &errorCode);
@@ -192,8 +192,8 @@ ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
*/
U_CFUNC int32_t
ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
UStringCaseMapper *stringCaseMapper,
UErrorCode &errorCode);
diff --git a/contrib/libs/icu/common/ucasemap_titlecase_brkiter.cpp b/contrib/libs/icu/common/ucasemap_titlecase_brkiter.cpp
index c21dfb7698a..c2b44a2c788 100644
--- a/contrib/libs/icu/common/ucasemap_titlecase_brkiter.cpp
+++ b/contrib/libs/icu/common/ucasemap_titlecase_brkiter.cpp
@@ -66,7 +66,7 @@ int32_t CaseMap::utf8ToTitle(
utext_openUTF8(&utext, src, srcLength, &errorCode);
LocalPointer<BreakIterator> ownedIter;
iter = ustrcase_getTitleBreakIterator(nullptr, locale, options, iter, ownedIter, errorCode);
- if(iter==NULL) {
+ if(iter==nullptr) {
utext_close(&utext);
return 0;
}
@@ -111,7 +111,7 @@ ucasemap_utf8ToTitle(UCaseMap *csm,
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if(csm->iter==NULL) {
+ if(csm->iter==nullptr) {
LocalPointer<BreakIterator> ownedIter;
BreakIterator *iter = ustrcase_getTitleBreakIterator(
nullptr, csm->locale, csm->options, nullptr, ownedIter, *pErrorCode);
@@ -126,7 +126,7 @@ ucasemap_utf8ToTitle(UCaseMap *csm,
csm->caseLocale, csm->options, csm->iter,
dest, destCapacity,
src, srcLength,
- ucasemap_internalUTF8ToTitle, NULL, *pErrorCode);
+ ucasemap_internalUTF8ToTitle, nullptr, *pErrorCode);
utext_close(&utext);
return length;
}
diff --git a/contrib/libs/icu/common/ucat.cpp b/contrib/libs/icu/common/ucat.cpp
index dac56eeb5ce..2f7fdcd980c 100644
--- a/contrib/libs/icu/common/ucat.cpp
+++ b/contrib/libs/icu/common/ucat.cpp
@@ -43,18 +43,18 @@ u_catopen(const char* name, const char* locale, UErrorCode* ec) {
U_CAPI void U_EXPORT2
u_catclose(u_nl_catd catd) {
- ures_close((UResourceBundle*) catd); /* may be NULL */
+ ures_close((UResourceBundle*) catd); /* may be nullptr */
}
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
u_catgets(u_nl_catd catd, int32_t set_num, int32_t msg_num,
- const UChar* s,
+ const char16_t* s,
int32_t* len, UErrorCode* ec) {
char key[MAX_KEY_LEN];
- const UChar* result;
+ const char16_t* result;
- if (ec == NULL || U_FAILURE(*ec)) {
+ if (ec == nullptr || U_FAILURE(*ec)) {
goto ERROR;
}
@@ -69,7 +69,7 @@ u_catgets(u_nl_catd catd, int32_t set_num, int32_t msg_num,
ERROR:
/* In case of any failure, return s */
- if (len != NULL) {
+ if (len != nullptr) {
*len = u_strlen(s);
}
return s;
diff --git a/contrib/libs/icu/common/uchar.cpp b/contrib/libs/icu/common/uchar.cpp
index 61e9c3d900d..ff12962baa5 100644
--- a/contrib/libs/icu/common/uchar.cpp
+++ b/contrib/libs/icu/common/uchar.cpp
@@ -76,7 +76,7 @@ U_CAPI void U_EXPORT2
u_enumCharTypes(UCharEnumTypeRange *enumRange, const void *context) {
struct _EnumTypeCallback callback;
- if(enumRange==NULL) {
+ if(enumRange==nullptr) {
return;
}
@@ -126,7 +126,7 @@ u_isxdigit(UChar32 c) {
(c<=0x66 && c>=0x41 && (c<=0x46 || c>=0x61)) ||
(c>=0xff21 && c<=0xff46 && (c<=0xff26 || c>=0xff41))
) {
- return TRUE;
+ return true;
}
GET_PROPS(c, props);
@@ -249,7 +249,7 @@ U_CAPI UBool U_EXPORT2
u_isprint(UChar32 c) {
uint32_t props;
GET_PROPS(c, props);
- /* comparing ==0 returns FALSE for the categories mentioned */
+ /* comparing ==0 returns false for the categories mentioned */
return (UBool)((CAT_MASK(props)&U_GC_C_MASK)==0);
}
@@ -273,7 +273,7 @@ U_CAPI UBool U_EXPORT2
u_isgraph(UChar32 c) {
uint32_t props;
GET_PROPS(c, props);
- /* comparing ==0 returns FALSE for the categories mentioned */
+ /* comparing ==0 returns false for the categories mentioned */
return (UBool)((CAT_MASK(props)&
(U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK))
==0);
@@ -291,7 +291,7 @@ u_isgraphPOSIX(UChar32 c) {
uint32_t props;
GET_PROPS(c, props);
/* \p{space}\p{gc=Control} == \p{gc=Z}\p{Control} */
- /* comparing ==0 returns FALSE for the categories mentioned */
+ /* comparing ==0 returns false for the categories mentioned */
return (UBool)((CAT_MASK(props)&
(U_GC_CC_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK))
==0);
@@ -304,30 +304,6 @@ u_ispunct(UChar32 c) {
return (UBool)((CAT_MASK(props)&U_GC_P_MASK)!=0);
}
-/* Checks if the Unicode character can start a Unicode identifier.*/
-U_CAPI UBool U_EXPORT2
-u_isIDStart(UChar32 c) {
- /* same as u_isalpha() */
- uint32_t props;
- GET_PROPS(c, props);
- return (UBool)((CAT_MASK(props)&(U_GC_L_MASK|U_GC_NL_MASK))!=0);
-}
-
-/* Checks if the Unicode character can be a Unicode identifier part other than starting the
- identifier.*/
-U_CAPI UBool U_EXPORT2
-u_isIDPart(UChar32 c) {
- uint32_t props;
- GET_PROPS(c, props);
- return (UBool)(
- (CAT_MASK(props)&
- (U_GC_ND_MASK|U_GC_NL_MASK|
- U_GC_L_MASK|
- U_GC_PC_MASK|U_GC_MC_MASK|U_GC_MN_MASK)
- )!=0 ||
- u_isIDIgnorable(c));
-}
-
/*Checks if the Unicode character can be ignorable in a Java or Unicode identifier.*/
U_CAPI UBool U_EXPORT2
u_isIDIgnorable(UChar32 c) {
@@ -509,7 +485,7 @@ u_forDigit(int32_t digit, int8_t radix) {
U_CAPI void U_EXPORT2
u_getUnicodeVersion(UVersionInfo versionArray) {
- if(versionArray!=NULL) {
+ if(versionArray!=nullptr) {
uprv_memcpy(versionArray, dataVersion, U_MAX_VERSION_LENGTH);
}
}
@@ -546,7 +522,7 @@ uprv_getMaxValues(int32_t column) {
U_CAPI void U_EXPORT2
u_charAge(UChar32 c, UVersionInfo versionArray) {
- if(versionArray!=NULL) {
+ if(versionArray!=nullptr) {
uint32_t version=u_getUnicodeProperties(c, 0)>>UPROPS_AGE_SHIFT;
versionArray[0]=(uint8_t)(version>>4);
versionArray[1]=(uint8_t)(version&0xf);
@@ -556,7 +532,7 @@ u_charAge(UChar32 c, UVersionInfo versionArray) {
U_CAPI UScriptCode U_EXPORT2
uscript_getScript(UChar32 c, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return USCRIPT_INVALID_CODE;
}
if((uint32_t)c>0x10ffff) {
@@ -577,7 +553,7 @@ uscript_getScript(UChar32 c, UErrorCode *pErrorCode) {
}
U_CAPI UBool U_EXPORT2
-uscript_hasScript(UChar32 c, UScriptCode sc) {
+uscript_hasScript(UChar32 c, UScriptCode sc) UPRV_NO_SANITIZE_UNDEFINED {
uint32_t scriptX=u_getUnicodeProperties(c, 0)&UPROPS_SCRIPT_X_MASK;
uint32_t codeOrIndex=uprops_mergeScriptCodeOrIndex(scriptX);
if(scriptX<UPROPS_SCRIPT_X_WITH_COMMON) {
@@ -591,7 +567,7 @@ uscript_hasScript(UChar32 c, UScriptCode sc) {
uint32_t sc32=sc;
if(sc32>0x7fff) {
/* Guard against bogus input that would make us go past the Script_Extensions terminator. */
- return FALSE;
+ return false;
}
while(sc32>*scx) {
++scx;
@@ -603,10 +579,10 @@ U_CAPI int32_t U_EXPORT2
uscript_getScriptExtensions(UChar32 c,
UScriptCode *scripts, int32_t capacity,
UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(capacity<0 || (capacity>0 && scripts==NULL)) {
+ if(capacity<0 || (capacity>0 && scripts==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -654,7 +630,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32
sa->add(sa->set, start);
(void)end;
(void)value;
- return TRUE;
+ return true;
}
#define USET_ADD_CP_AND_NEXT(sa, cp) sa->add(sa->set, cp); sa->add(sa->set, cp+1)
@@ -666,7 +642,7 @@ uchar_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) {
}
/* add the start code point of each same-value range of the main trie */
- utrie2_enum(&propsTrie, NULL, _enumPropertyStartsRange, sa);
+ utrie2_enum(&propsTrie, nullptr, _enumPropertyStartsRange, sa);
/* add code points with hardcoded properties, plus the ones following them */
@@ -728,5 +704,5 @@ upropsvec_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode) {
}
/* add the start code point of each same-value range of the properties vectors trie */
- utrie2_enum(&propsVectorsTrie, NULL, _enumPropertyStartsRange, sa);
+ utrie2_enum(&propsVectorsTrie, nullptr, _enumPropertyStartsRange, sa);
}
diff --git a/contrib/libs/icu/common/uchar_props_data.h b/contrib/libs/icu/common/uchar_props_data.h
index c45b9da3fd0..f4d3932574d 100644
--- a/contrib/libs/icu/common/uchar_props_data.h
+++ b/contrib/libs/icu/common/uchar_props_data.h
@@ -9,146 +9,146 @@
#ifdef INCLUDED_FROM_UCHAR_C
-static const UVersionInfo dataVersion={0xe,0,0,0};
+static const UVersionInfo dataVersion={0xf,0,0,0};
-static const uint16_t propsTrie_index[22688]={
-0x48c,0x494,0x49c,0x4a4,0x4bc,0x4c4,0x4cc,0x4d4,0x4dc,0x4e4,0x4ea,0x4f2,0x4fa,0x502,0x50a,0x512,
-0x518,0x520,0x528,0x530,0x533,0x53b,0x543,0x54b,0x553,0x55b,0x557,0x55f,0x567,0x56f,0x574,0x57c,
-0x584,0x58c,0x590,0x598,0x5a0,0x5a8,0x5b0,0x5b8,0x5b4,0x5bc,0x5c1,0x5c9,0x5cf,0x5d7,0x5df,0x5e7,
-0x5ef,0x5f7,0x5ff,0x607,0x60c,0x614,0x617,0x61f,0x627,0x62f,0x635,0x63d,0x63c,0x644,0x64c,0x654,
-0x664,0x65c,0x66c,0x674,0x67a,0x5f7,0x68a,0x682,0x69a,0x69c,0x6a4,0x692,0x6b4,0x6ba,0x6c2,0x6ac,
-0x6d2,0x6d8,0x6e0,0x6ca,0x6f0,0x6f6,0x6fe,0x6e8,0x70e,0x714,0x71c,0x706,0x72c,0x734,0x73c,0x724,
-0x74c,0x752,0x75a,0x744,0x76a,0x770,0x778,0x762,0x788,0x78d,0x795,0x780,0x7a5,0x7ac,0x7b4,0x79d,
-0x638,0x7bc,0x7c4,0x4ac,0x7cc,0x7d3,0x7db,0x4ac,0x7e3,0x7eb,0x7f3,0x7f8,0x800,0x807,0x80f,0x4ac,
-0x5f7,0x817,0x81f,0x827,0x82f,0x584,0x83f,0x837,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x847,0x5f7,0x84f,0x853,0x85b,0x5f7,0x861,0x5f7,0x867,0x86f,0x877,0x584,0x584,0x87f,
-0x887,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x88c,0x894,0x5f7,0x5f7,0x89c,0x8a4,0x8ac,0x8b4,0x8bc,0x5f7,0x8c4,0x8cc,0x8d4,
-0x8e4,0x5f7,0x8ec,0x8ee,0x8f6,0x8dc,0x5f7,0x8f9,0x90d,0x901,0x909,0x915,0x5f7,0x91d,0x923,0x92b,
-0x933,0x5f7,0x943,0x94b,0x953,0x93b,0x963,0x4ac,0x96b,0x96e,0x976,0x95b,0x986,0x97e,0x5f7,0x98d,
-0x5f7,0x99c,0x995,0x9a4,0x9ac,0x9b0,0x9b8,0x9c0,0x52c,0x9c8,0x9cb,0x9d1,0x9d8,0x9cb,0x553,0x553,
-0x4dc,0x4dc,0x4dc,0x4dc,0x9e0,0x4dc,0x4dc,0x4dc,0x9f0,0x9f8,0xa00,0xa08,0xa10,0xa14,0xa1c,0x9e8,
-0xa34,0xa3c,0xa24,0xa2c,0xa44,0xa4c,0xa54,0xa5c,0xa74,0xa64,0xa6c,0xa7c,0xa84,0xa93,0xa98,0xa8b,
-0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa8,0xab0,0x92b,0xab3,0xabb,0xac2,0xac7,0xacf,
-0x92b,0xad6,0xad5,0xae6,0xae9,0x92b,0x92b,0xade,0x92b,0x92b,0x92b,0x92b,0x92b,0xaf8,0xb00,0xaf0,
-0x92b,0x92b,0x92b,0xb05,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0xb0b,0xb13,0x92b,0xb1b,0xb22,
-0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0xaa0,0xaa0,0xaa0,0xaa0,0xb2a,0xaa0,0xb31,0xb38,
-0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0xaa0,0x92b,0xb40,0xb47,0xb4b,0xb51,0x92b,0x92b,0x92b,
-0x584,0x58c,0x52c,0xb59,0x4dc,0x4dc,0x4dc,0xb61,0x52c,0xb69,0x5f7,0xb6f,0xb7f,0xb77,0xb77,0x553,
-0xb87,0xb8f,0xb97,0x4ac,0xb9f,0x92b,0x92b,0xba6,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0xbae,0xbb4,
-0xbc4,0xbbc,0x638,0x5f7,0xbcc,0x887,0x5f7,0xbd4,0xbdc,0xbe0,0x5f7,0x5f7,0xbe5,0x5f7,0x92b,0xbec,
-0xad0,0xbf4,0xbfa,0x92b,0xbf4,0xc02,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,
-0xc0a,0x5f7,0x5f7,0x5f7,0xc12,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0xc18,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc1d,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x92b,0x92b,
-0xc25,0x5f7,0xc28,0x5f7,0xc30,0xc36,0xc3e,0xc46,0xc4b,0x5f7,0x5f7,0xc4f,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc56,0x5f7,0xc5d,0xc63,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc6b,0x5f7,0x5f7,0x5f7,0xc73,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc75,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc7c,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0xc83,0x5f7,0x5f7,0x5f7,0xc8a,0xc92,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc97,0x5f7,0x5f7,0xc9f,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xca3,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xca6,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xca9,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0xcaf,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0xcb7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0xcbc,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xcc1,0x5f7,0x5f7,0x5f7,0xcc6,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0xcce,0xcd5,0xcd9,0x5f7,0x5f7,0x5f7,0xce0,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0xcee,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0xce6,0x92b,0xcf6,0x9a4,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0xcfb,0xd03,0x4dc,0xd13,0xd0b,0x5f7,0x5f7,0xd1b,0xd23,0xd33,0x4dc,0xd38,0xd40,0xd46,0xd4d,0xd2b,
-0xd55,0xd5d,0x5f7,0xd65,0xd75,0xd78,0xd6d,0xd80,0x64c,0xd88,0xd8f,0x8ed,0x69a,0xd9f,0xd97,0xda7,
-0x5f7,0xdaf,0xdb7,0xdbf,0x5f7,0xdc7,0xdcf,0xdd7,0xddf,0xde7,0xdeb,0xdf3,0x52c,0x52c,0x5f7,0xdfb,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xe03,0xe0f,0xe07,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,
-0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0x5f7,0x5f7,0x5f7,0xe27,0x5f7,0xce1,0xe2e,0xe33,
-0x5f7,0x5f7,0x5f7,0xe3b,0x5f7,0x5f7,0x8f8,0x4ac,0xe51,0xe41,0xe49,0x5f7,0x5f7,0xe59,0xe61,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xe66,0x92f,0x5f7,0xe6e,0x5f7,0xe74,0xe78,
-0xe80,0xe88,0xe8f,0xe97,0x5f7,0x5f7,0x5f7,0xe9d,0xeb5,0x49c,0xebd,0xec5,0xeca,0x90d,0xea5,0xead,
-0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,
-0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,0xe17,
-0x12b0,0x12b0,0x12f0,0x1330,0x1370,0x13a8,0x13e8,0x1428,0x1460,0x14a0,0x14cc,0x150c,0x154c,0x155c,0x159c,0x15d0,
-0x1610,0x1640,0x1680,0x16c0,0x16d0,0x1704,0x173c,0x177c,0x17bc,0x17fc,0x1830,0x185c,0x189c,0x18d4,0x18f0,0x1930,
-0xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0xa40,0xc0d,0xa40,0xa40,0xa40,0xa40,0xc4d,0x1db,0x1db,
-0xc8d,0xccd,0xa40,0xa40,0xa40,0xcf6,0xd36,0xd56,0xa40,0xd7c,0xdbc,0xdfc,0xe3c,0xe7c,0xebc,0xefc,
-0xf3c,0xf73,0x1db,0x1db,0xf97,0xfcb,0x1db,0xff3,0x1db,0x1db,0x1db,0x1db,0x1020,0x1db,0x1db,0x1db,
-0x1db,0x1db,0x1db,0x1db,0x1034,0x1db,0x106c,0x10ac,0x1db,0x10b7,0x1db,0x1db,0x1db,0x10ed,0xa40,0x112d,
-0x1db,0x1db,0x116d,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
+static const uint16_t propsTrie_index[23016]={
+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,
+0x5f8,0x600,0x608,0x610,0x615,0x61d,0x620,0x628,0x630,0x638,0x63e,0x646,0x645,0x64d,0x655,0x65d,
+0x66d,0x665,0x675,0x67d,0x683,0x600,0x693,0x68b,0x6a3,0x6a5,0x6ad,0x69b,0x6bd,0x6c3,0x6cb,0x6b5,
+0x6db,0x6e1,0x6e9,0x6d3,0x6f9,0x6ff,0x707,0x6f1,0x717,0x71d,0x725,0x70f,0x735,0x73d,0x745,0x72d,
+0x755,0x75b,0x763,0x74d,0x773,0x779,0x781,0x76b,0x791,0x796,0x79e,0x789,0x7ae,0x7b5,0x7bd,0x7a6,
+0x641,0x7c5,0x7cd,0x4b5,0x7d5,0x7dc,0x7e4,0x4b5,0x7ec,0x7f4,0x7fc,0x801,0x809,0x810,0x818,0x4b5,
+0x600,0x820,0x828,0x830,0x838,0x58d,0x848,0x840,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x850,0x600,0x858,0x85c,0x864,0x600,0x86a,0x600,0x870,0x878,0x880,0x58d,0x58d,0x888,
+0x890,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x895,0x89d,0x600,0x600,0x8a5,0x8ad,0x8b5,0x8bd,0x8c5,0x600,0x8cd,0x8d5,0x8dd,
+0x8ed,0x600,0x8f5,0x8f7,0x8ff,0x8e5,0x600,0x902,0x916,0x90a,0x912,0x91e,0x600,0x926,0x92c,0x934,
+0x93c,0x600,0x94c,0x954,0x95c,0x944,0x96c,0x4b5,0x974,0x977,0x97f,0x964,0x98f,0x987,0x600,0x996,
+0x600,0x9a5,0x99e,0x9ad,0x9b5,0x9b9,0x9c1,0x9c9,0x535,0x9d1,0x9d4,0x9da,0x9e1,0x9d4,0x55c,0x55c,
+0x4e5,0x4e5,0x4e5,0x4e5,0x9e9,0x4e5,0x4e5,0x4e5,0x9f9,0xa01,0xa09,0xa11,0xa19,0xa1d,0xa25,0x9f1,
+0xa3d,0xa45,0xa2d,0xa35,0xa4d,0xa55,0xa5d,0xa65,0xa7d,0xa6d,0xa75,0xa85,0xa8d,0xa9c,0xaa1,0xa94,
+0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xab1,0xab9,0x934,0xabc,0xac4,0xacb,0xad0,0xad8,
+0x934,0xadf,0xade,0xaef,0xaf2,0x934,0x934,0xae7,0x934,0x934,0x934,0x934,0x934,0xb01,0xb09,0xaf9,
+0x934,0x934,0x934,0xb0e,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xb14,0xb1c,0x934,0xb24,0xb2b,
+0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xaa9,0xaa9,0xaa9,0xaa9,0xb33,0xaa9,0xb3a,0xb41,
+0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0x934,0xb49,0xb50,0xb54,0xb5a,0x934,0x934,0x934,
+0x58d,0x595,0x535,0xb62,0x4e5,0x4e5,0x4e5,0xb6a,0x535,0xb72,0x600,0xb78,0xb88,0xb80,0xb80,0x55c,
+0xb90,0xb98,0xba0,0x4b5,0xba8,0x934,0x934,0xbaf,0x934,0x934,0x934,0x934,0x934,0x934,0xbb7,0xbbd,
+0xbcd,0xbc5,0x641,0x600,0xbd5,0x890,0x600,0xbdd,0xbe5,0xbe9,0x600,0x600,0xbee,0x600,0x934,0xbf5,
+0xad9,0xbfd,0xc03,0x934,0xbfd,0xc0b,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,
+0xc13,0x600,0x600,0x600,0xc1b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0xc21,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc26,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,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,
+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,0x600,0x600,0x600,0x600,0x600,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,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,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,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+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,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcb2,0x600,0x600,0x600,
+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,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,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,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,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,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,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,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,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,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,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,
+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,
+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,
+0xc8e,0xcce,0xa40,0xa40,0xa40,0xcf7,0xd37,0xd57,0xa40,0xd7d,0xdbd,0xdfd,0xe3d,0xe7d,0xebd,0xefd,
+0xf3d,0xf74,0x1db,0x1db,0xf98,0xfcc,0x1db,0xff4,0x1db,0x1db,0x1db,0x1db,0x1021,0x1db,0x1db,0x1db,
+0x1db,0x1db,0x1db,0x1db,0x1035,0x1db,0x106d,0x10ad,0x1db,0x10b8,0x1db,0x1db,0x1db,0x10ee,0xa40,0x112e,
+0x1db,0x1db,0x116e,0x1db,0x1191,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,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,
@@ -170,1033 +170,1044 @@ static const uint16_t propsTrie_index[22688]={
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,0xa40,
0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
-0x11ad,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
+0x11d1,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,
0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,
-0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x11ed,
+0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1211,
0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,
-0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x11ed,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0xed2,0xed9,0xee1,0x4ac,0x5f7,0x5f7,0x5f7,0xee9,0xef9,0xef1,0xf10,0xf01,0xf08,0xf18,0xf1c,0xf20,
-0x4ac,0x4ac,0x4ac,0x4ac,0x8ed,0x5f7,0xf28,0xf30,0x5f7,0xf38,0xf40,0xf44,0xf4c,0x5f7,0xf54,0x4ac,
-0x584,0x58e,0xf5c,0x5f7,0xf60,0xf68,0xf78,0xf70,0x5f7,0xf80,0x5f7,0xf87,0xf97,0xf8f,0x4ac,0x4ac,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xb7f,0x8f9,0xf9f,0xfaf,0xfa7,0x4ac,0x4ac,
-0xfbf,0xfb7,0xfc2,0xfca,0x90d,0xfd2,0x4ac,0xfda,0xfe2,0xfea,0x4ac,0x4ac,0x5f7,0xffa,0x1002,0xff2,
-0x1012,0x1019,0x100a,0x1021,0x1029,0x4ac,0x1039,0x1031,0x5f7,0x103c,0x1044,0x104c,0x1054,0x105c,0x4ac,0x4ac,
-0x5f7,0x5f7,0x1064,0x4ac,0x584,0x106c,0x52c,0x1074,0x5f7,0x107c,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x1084,0x5f7,0x108c,0x4ac,0x4ac,0x1094,0x109c,0x10a3,0xfd6,0x10ab,0xfd6,0x10b3,0xb7f,
-0x10c3,0x62d,0x10cb,0x10bb,0x986,0x10d3,0x10db,0x10e1,0x10f9,0x10e9,0x10f1,0x10fd,0x986,0x110d,0x1105,0x1115,
-0x1125,0x111d,0x4ac,0x4ac,0x112c,0x1134,0x64f,0x113c,0x114c,0x1152,0x115a,0x1144,0x4ac,0x4ac,0x4ac,0x4ac,
-0x5f7,0x1162,0x116a,0x1172,0x5f7,0x117a,0x1182,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x118a,0x1192,0x4ac,
-0x5f7,0x119a,0x11a2,0x11aa,0x5f7,0x11ba,0x11b2,0x4ac,0x867,0x11c2,0x11ca,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x5f7,0x11d2,0x4ac,0x4ac,0x4ac,0x584,0x52c,0x11da,0x11ea,0x11f0,0x11e2,0x4ac,0x4ac,0x1200,0x1204,0x11f8,
-0x121c,0x120c,0x1214,0x5f7,0x122a,0x1224,0x5f7,0x8ee,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x1240,0x1245,0x1232,0x123a,0x1255,0x124d,0x4ac,0x4ac,0x1264,0x1268,0x125c,0x1278,0x1270,0x11b2,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x127c,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x1283,0x1293,0x128b,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x8f8,0x4ac,0x4ac,0x4ac,
-0x12a3,0x12ab,0x12b3,0x129b,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x12bb,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0xfd6,0x5f7,0x5f7,0x12c3,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x12cb,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x11ca,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x8ee,0x90d,
-0xd9b,0x5f7,0x90d,0x12d3,0x12d8,0x5f7,0x12e8,0x12f0,0x12f8,0x12e0,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x584,
-0x52c,0x1300,0x4ac,0x4ac,0x4ac,0x5f7,0x5f7,0x1308,0x130d,0x1313,0x4ac,0x4ac,0x131b,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x1323,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x8f9,0x4ac,0x1064,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x1329,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x1331,
-0x1335,0x133c,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xe07,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x5f7,0x5f7,0x1342,0x1347,0x134f,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x553,0x135f,0x1366,0x92b,0x92b,0x92b,0x1357,0x4ac,0x92b,0x92b,0x92b,0x92b,
-0x92b,0x92b,0x92b,0xbae,0x92b,0x136d,0x92b,0x1374,0x137c,0x1382,0x92b,0xad5,0x92b,0x92b,0x138a,0x4ac,
-0x4ac,0x4ac,0x4ac,0x1392,0x92b,0x92b,0xad2,0x139a,0x4ac,0x4ac,0x4ac,0x4ac,0x13aa,0x13b1,0x13b6,0x13bc,
-0x13c4,0x13cc,0x13d4,0x13ae,0x13dc,0x13e4,0x13ec,0x13f1,0x13c3,0x13aa,0x13b1,0x13ad,0x13bc,0x13f9,0x13ab,0x13fc,
-0x13ae,0x1404,0x140c,0x1414,0x141b,0x1407,0x140f,0x1417,0x141e,0x140a,0x1426,0x13a2,0x92b,0x92b,0x92b,0x92b,
-0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x553,0x1436,0x553,0x143d,
-0x1444,0x142e,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x1453,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x144b,0x145b,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x146b,0x1463,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0xfd6,0x1473,0x5f7,0x147b,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x1483,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x148b,0x4ac,0x584,0x149b,0x1493,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x14a3,
-0x14b3,0x14ab,0x4ac,0x4ac,0x14c3,0x14bb,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x14d3,0x14db,0x14e3,0x14eb,
-0x14f3,0x14fb,0x4ac,0x14cb,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x92b,0x1503,0x92b,0x92b,
-0xba6,0x136b,0x150b,0xbae,0x1513,0x92b,0x92b,0x92b,0x92b,0xbb0,0x4ac,0x151b,0x1523,0x1527,0x152f,0x1537,
-0x4ac,0x4ac,0x4ac,0x4ac,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x153f,0x92b,0x92b,0x92b,0x92b,
-0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,
-0x92b,0x92b,0x1547,0x154f,0x92b,0x92b,0x92b,0xba6,0x92b,0x92b,0x1557,0x155f,0x1503,0x92b,0x1567,0x92b,
-0x156f,0x1574,0x4ac,0x4ac,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0x92b,0xba6,0x157c,
-0x1588,0x158d,0x1595,0x1584,0x92b,0x92b,0x92b,0x92b,0x159d,0x92b,0xad5,0x11ae,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x15a5,0x5f7,0x5f7,0x15ac,
-0x5f7,0x5f7,0x5f7,0x15b4,0x5f7,0x15bc,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xc87,0x5f7,0x5f7,0x15c4,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x15cc,0x15d4,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0xcc6,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x15db,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x15e2,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x15e9,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x4ac,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x8ee,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xf60,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x1090,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x15f1,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x5f7,0x5f7,
-0x5f7,0x15f9,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0xf60,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,
-0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x15ff,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x160f,0x1607,0x1607,
-0x1607,0x4ac,0x4ac,0x4ac,0x4ac,0x553,0x553,0x553,0x553,0x553,0x553,0x553,0x1617,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,
-0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0x4ac,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,
-0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0x161f,0x48b,0x48b,0x48b,
-0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
+0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1211,
+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,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,
+0x600,0x600,0x600,0x600,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,
+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,
+0x600,0x600,0x600,0x600,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,
+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,
+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,
+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,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,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,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,
+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,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,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,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,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,
+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,
+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,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,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,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,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,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,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,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,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,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,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
+0x600,0x600,0x600,0x600,0x600,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,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,
+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,
+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,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,
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,0x18,0x18,0x18,0x17,
-0x17,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,0x14,0x17,0x15,0x1a,0x16,
-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,0xf,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+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,
+0x18,0x18,0x18,0x17,0x17,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,0x14,
+0x17,0x15,0x1a,0x16,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,0xf,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,
+0,0,0,0,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,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
-0xc,0x17,0x19,0x19,0x19,0x19,0x1b,0x17,0x1a,0x1b,5,0x1c,0x18,0x10,0x1b,0x1a,
-0x1b,0x18,0x34b,0x38b,0x1a,2,0x17,0x17,0x1a,0x30b,5,0x1d,0x34cb,0x344b,0x3ccb,0x17,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,0x18,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,0x18,2,2,2,2,2,2,2,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,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,2,1,2,1,2,1,2,1,
-2,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
+0xf,0xf,0xf,0xf,0xc,0x17,0x19,0x19,0x19,0x19,0x1b,0x17,0x1a,0x1b,5,0x1c,
+0x18,0x10,0x1b,0x1a,0x1b,0x18,0x34b,0x38b,0x1a,2,0x17,0x17,0x1a,0x30b,5,0x1d,
+0x34cb,0x344b,0x3ccb,0x17,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,1,1,1,1,1,1,1,1,1,0x18,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,0x18,2,2,2,2,
+2,2,2,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,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
-1,1,2,1,2,1,2,2,2,1,1,2,1,2,1,1,
-2,1,1,1,2,2,1,1,1,1,2,1,1,2,1,1,
-1,2,2,2,1,1,2,1,1,2,1,2,1,2,1,1,
-2,1,2,2,1,2,1,1,2,1,1,1,2,1,2,1,
-1,2,2,5,1,2,2,2,5,5,5,5,1,3,2,1,
-3,2,1,3,2,1,2,1,2,1,2,1,2,1,2,1,
+1,2,1,2,1,2,1,2,1,2,1,2,2,1,2,1,
2,1,2,1,2,2,1,2,1,2,1,2,1,2,1,2,
-1,2,1,2,1,2,1,2,2,1,3,2,1,2,1,1,
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,
+1,2,1,2,1,1,2,1,2,1,2,2,2,1,1,2,
+1,2,1,1,2,1,1,1,2,2,1,1,1,1,2,1,
+1,2,1,1,1,2,2,2,1,1,2,1,1,2,1,2,
+1,2,1,1,2,1,2,2,1,2,1,1,2,1,1,1,
+2,1,2,1,1,2,2,5,1,2,2,2,5,5,5,5,
+1,3,2,1,3,2,1,3,2,1,2,1,2,1,2,1,
+2,1,2,1,2,1,2,1,2,2,1,2,1,2,1,2,
+1,2,1,2,1,2,1,2,1,2,1,2,2,1,3,2,
+1,2,1,1,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,2,2,2,2,2,2,1,1,2,1,1,2,
-2,1,2,1,1,1,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,1,2,2,2,2,2,2,2,1,1,
+2,1,1,2,2,1,2,1,1,1,1,2,1,2,1,2,
+1,2,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,2,2,2,2,2,2,2,2,2,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,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,2,2,2,2,2,2,2,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x1a,0x1a,
-0x1a,0x1a,4,4,4,4,4,4,4,4,4,4,4,4,0x1a,0x1a,
-0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,4,4,4,
-4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,0x1a,4,0x1a,0x1a,0x1a,0x1a,0x1a,
-0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,6,6,6,6,
+4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+4,4,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4,4,
+4,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+4,4,4,4,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,0x1a,4,0x1a,
+0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,1,2,1,2,
-4,0x1a,1,2,0,0,4,2,2,2,0x17,1,0,0,0,0,
-0x1a,0x1a,1,0x17,1,1,1,0,1,0,1,1,2,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,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,1,
-2,2,1,1,1,2,2,2,1,2,1,2,1,2,1,2,
+1,2,1,2,4,0x1a,1,2,0,0,4,2,2,2,0x17,1,
+0,0,0,0,0x1a,0x1a,1,0x17,1,1,1,0,1,0,1,1,
+2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,1,0,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,1,2,2,1,1,1,2,2,2,1,2,1,2,
1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
-2,2,2,2,1,2,0x18,1,2,1,1,2,2,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+1,2,1,2,2,2,2,2,1,2,0x18,1,2,1,1,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,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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
+2,2,2,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,0x1b,6,6,6,6,6,7,7,1,2,1,2,1,2,
+1,2,1,2,1,2,0x1b,6,6,6,6,6,7,7,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,1,2,
1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
-1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,
+1,2,1,2,1,1,2,1,2,1,2,1,2,1,2,1,
+2,1,2,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,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,
-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,1,0,0,4,0x17,0x17,
-0x17,0x17,0x17,0x17,2,2,2,2,2,2,2,2,2,2,2,2,
+1,2,1,2,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,1,0,
+0,4,0x17,0x17,0x17,0x17,0x17,0x17,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,0x17,0x13,0,0,0x1b,0x1b,0x19,0,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+2,2,2,2,2,2,2,2,2,0x17,0x13,0,0,0x1b,0x1b,0x19,
+0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,0x13,6,0x17,6,6,0x17,
-6,6,0x17,6,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,0,0,0,0,5,5,5,5,0x17,
-0x17,0,0,0,0,0,0,0,0,0,0,0,0x10,0x10,0x10,0x10,
-0x10,0x10,0x18,0x18,0x18,0x17,0x17,0x19,0x17,0x17,0x1b,0x1b,6,6,6,6,
-6,6,6,6,6,6,6,0x17,0x10,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,5,5,5,5,5,5,5,5,5,5,4,5,5,5,
-5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,5,5,6,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,6,6,6,0x13,6,
+0x17,6,6,0x17,6,6,0x17,6,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,0,0,0,0,5,
+5,5,5,0x17,0x17,0,0,0,0,0,0,0,0,0,0,0,
+0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x18,0x18,0x17,0x17,0x19,0x17,0x17,0x1b,0x1b,
+6,6,6,6,6,6,6,6,6,6,6,0x17,0x10,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,5,5,5,5,5,5,5,5,5,5,
-0x17,5,6,6,6,6,6,6,6,0x10,0x1b,6,6,6,6,6,
-6,4,4,6,6,0x1b,6,6,6,6,5,5,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,0x1b,0x1b,5,0x17,0x17,0x17,0x17,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0x10,5,6,5,5,
+4,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,
+6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,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,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,6,6,6,6,6,6,6,6,6,6,6,6,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,
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,6,6,6,
-6,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,
+5,5,5,5,0x17,5,6,6,6,6,6,6,6,0x10,0x1b,6,
+6,6,6,6,6,4,4,6,6,0x1b,6,6,6,6,5,5,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,0x1b,0x1b,5,
+0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0x10,
+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,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,4,4,0x1b,0x17,0x17,0x17,4,0,0,6,0x19,0x19,
-6,6,6,6,4,6,6,6,4,6,6,6,6,6,0,0,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,
+6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+6,6,6,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,5,5,6,6,6,6,4,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,5,5,5,5,6,6,6,0,0,0x17,0,
-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,6,6,6,6,6,6,
+6,6,6,6,6,5,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-0x1a,5,5,5,5,5,5,0,0x10,0x10,0,0,0,0,0,0,
-6,6,6,6,6,6,6,6,6,6,0x10,6,6,6,6,6,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,
+6,6,6,6,6,6,6,6,4,4,0x1b,0x17,0x17,0x17,4,0,
+0,6,0x19,0x19,6,6,6,6,4,6,6,6,4,6,6,6,
+6,6,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+0x17,0x17,0x17,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,4,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,5,5,5,5,6,6,6,
+0,0,0x17,0,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,5,5,5,0x1a,5,5,5,5,5,5,0,0x10,0x10,0,0,
+0,0,0,0,6,6,6,6,6,6,6,6,6,6,0x10,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,
-5,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,5,5,6,6,0x17,0x17,0x49,0x89,
-0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,4,5,5,5,5,5,5,
-5,5,5,5,5,5,5,5,6,6,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,5,6,8,6,5,8,8,
-8,6,6,6,6,6,6,6,6,8,8,8,8,6,8,8,
-5,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,
-5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,
-5,5,0x19,0x19,0x37cb,0x35cb,0x3fcb,0x34cb,0x3ccb,0x94b,0x1b,0x19,5,0x17,6,0,
-5,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,0,0,0,5,5,
-5,5,0,0,6,5,8,8,8,6,6,6,6,0,0,8,
-8,0,0,8,8,6,5,0,0,0,0,0,0,0,0,8,
-0,0,0,0,5,5,0,5,0,0,0,0,0,0,0x49,0x89,
-0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,6,6,5,5,5,6,0x17,0,
-0,0,0,0,0,0,0,0,0,6,6,8,0,5,5,5,
-5,5,5,0,0,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,0,5,5,0,0,6,0,8,8,
-8,6,6,0,0,0,0,6,6,0,0,6,6,6,0,0,
-0,6,0,0,0,0,0,0,0,5,5,5,5,0,5,0,
-5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,
-0x17,0x19,0,0,0,0,0,0,0,5,6,6,6,6,6,6,
-0,6,6,8,0,5,5,5,5,5,5,5,5,5,0,5,
-5,5,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,0,6,5,8,8,8,6,6,6,6,6,0,6,
-6,8,0,8,8,6,0,0,5,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,5,5,6,6,0,0,0x49,0x89,
-0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x1b,5,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,
+6,6,6,6,6,6,6,6,6,6,6,6,5,5,5,5,
+5,5,5,5,5,4,6,6,6,6,6,6,6,6,6,6,
+6,6,6,6,6,6,6,6,6,6,6,6,5,5,6,6,
+0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,4,5,5,
+5,5,5,5,5,5,5,5,5,5,5,5,6,6,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,5,6,8,
+6,5,8,8,8,6,6,6,6,6,6,6,6,8,8,8,
+8,6,8,8,5,6,6,6,6,6,6,6,5,5,5,5,
+5,5,5,5,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
+0x1c9,0x209,0x249,0x289,5,5,0x19,0x19,0x37cb,0x35cb,0x3fcb,0x34cb,0x3ccb,0x94b,0x1b,0x19,
+5,0x17,6,0,5,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,0,
+0,0,5,5,5,5,0,0,6,5,8,8,8,6,6,6,
+6,0,0,8,8,0,0,8,8,6,5,0,0,0,0,0,
+0,0,0,8,0,0,0,0,5,5,0,5,0,0,0,0,
+0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,6,6,5,5,
+5,6,0x17,0,0,0,0,0,0,0,0,0,0,6,6,8,
+0,5,5,5,5,5,5,0,0,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,0,5,5,0,0,
+6,0,8,8,8,6,6,0,0,0,0,6,6,0,0,6,
+6,6,0,0,0,6,0,0,0,0,0,0,0,5,5,5,
+5,0,5,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
+0x1c9,0x209,0x249,0x289,0x17,0x19,0,0,0,0,0,0,0,5,6,6,
+6,6,6,6,0,6,6,8,0,5,5,5,5,5,5,5,
+5,5,0,5,5,5,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,0,6,5,8,8,8,6,6,6,
+6,6,0,6,6,8,0,8,8,6,0,0,5,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,5,5,6,6,
+0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x1b,5,0x34cb,0x344b,
+0x3ccb,0x37cb,0x35cb,0x3fcb,0,0,0,0,0,0,0,0,0,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,0,
+6,5,8,6,8,6,6,6,6,0,0,8,8,0,0,8,
+8,6,0,0,0,0,0,0,0,6,6,8,0,0,0,0,
+5,5,0,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
+0x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x1b,0,
+0,0,0,0,0,0,6,5,0,5,5,5,5,5,5,0,
+0,0,5,5,5,0,5,5,5,5,0,0,0,5,5,0,
+5,0,5,5,0,0,0,5,5,0,0,0,5,5,5,0,
+0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,
+0,0,8,8,6,8,8,0,0,0,8,8,8,0,8,8,
+8,6,0,0,5,0,0,0,0,0,0,8,0,0,0,0,
+0,0,0,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
+0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0x17,0x54b,0x58b,0x5cb,0x60b,
+0x58b,0x5cb,0x60b,0x1b,6,8,8,8,6,5,5,5,5,5,5,5,
+5,0,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,
+5,5,5,5,5,5,0,0,6,5,6,6,6,8,8,8,
+8,0,6,6,6,0,6,6,6,6,0,0,0,0,0,0,
+0,6,6,0,5,5,5,0,0,5,0,0,5,5,6,6,
+0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,5,5,8,
+0,0,0,0,0,0,0,0,0,0,0,0,5,6,8,8,
+0x17,5,5,5,5,5,5,5,5,0,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,0,5,5,5,5,5,0,0,
+6,5,8,6,8,8,8,8,8,0,6,8,8,0,8,8,
+6,6,0,0,0,0,0,0,0,8,8,0,0,0,0,0,
+0,5,5,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
+0x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,5,5,
+5,5,5,5,6,6,8,8,5,5,5,5,5,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,5,
+5,5,5,6,6,5,8,8,8,6,6,6,6,0,8,8,
+8,0,8,8,8,6,5,0x1b,0,0,0,0,5,5,5,8,
+0xcc0b,0xca0b,0xcb4b,0xc90b,0x364b,0xc94b,0x350b,5,0,0,0,0,0,0,0x49,0x89,
+0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,8,8,0x17,0,0,0,
0,0,0,0,0,0,0,0,0,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,0,6,5,8,6,
-8,6,6,6,6,0,0,8,8,0,0,8,8,6,0,0,
-0,0,0,0,0,6,6,8,0,0,0,0,5,5,0,5,
-0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,
-0x7cb,0x1e4b,0x784b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x1b,0,0,0,0,0,
-0,0,6,5,0,5,5,5,5,5,5,0,0,0,5,5,
-5,0,5,5,5,5,0,0,0,5,5,0,5,0,5,5,
-0,0,0,5,5,0,0,0,5,5,5,0,0,0,5,5,
-5,5,5,5,5,5,5,5,5,5,0,0,0,0,8,8,
-6,8,8,0,0,0,8,8,8,0,8,8,8,6,0,0,
-5,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,
-5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,
-0,0,0,0,0,0,0,0x17,0x54b,0x58b,0x5cb,0x60b,0x58b,0x5cb,0x60b,0x1b,
-6,8,8,8,6,5,5,5,5,5,5,5,5,0,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,5,5,5,5,
-5,5,0,0,6,5,6,6,6,8,8,8,8,0,6,6,
-6,0,6,6,6,6,0,0,0,0,0,0,0,6,6,0,
-5,5,5,0,0,5,0,0,5,5,6,6,0,0,0x49,0x89,
-0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,5,5,0,0,0,0,0,
-0,0,0,0,0,0,0,0,5,6,8,8,0x17,5,5,5,
-5,5,5,5,5,0,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,0,5,5,5,5,5,0,0,6,5,8,6,
-8,8,8,8,8,0,6,8,8,0,8,8,6,6,0,0,
-0,0,0,0,0,8,8,0,0,0,0,0,0,5,5,0,
-5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,
-0x7cb,0x1e4b,0x784b,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,5,5,5,5,5,5,
-6,6,8,8,5,5,5,5,5,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,5,5,5,5,6,
-6,5,8,8,8,6,6,6,6,0,8,8,8,0,8,8,
-8,6,5,0x1b,0,0,0,0,5,5,5,8,0xcc0b,0xca0b,0xcb4b,0xc90b,
-0x364b,0xc94b,0x350b,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
-0x1c9,0x209,0x249,0x289,0,0,8,8,0x17,0,0,0,0,0,0,0,
-0,0,0,0,0,6,8,8,0,5,5,5,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,0,0,0,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,0,5,0,0,
-5,5,5,5,5,5,5,0,0,0,6,0,0,0,0,8,
-8,8,6,6,6,0,6,0,8,8,8,8,8,8,8,8,
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-5,6,5,5,6,6,6,6,6,6,6,0,0,0,0,0x19,
-5,5,5,5,5,5,4,6,6,6,6,6,6,6,6,0x17,
-0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0,0,0,
-0,5,5,0,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,5,5,5,
-0,5,0,5,5,5,5,5,5,5,5,5,5,6,5,5,
-6,6,6,6,6,6,6,6,6,5,0,0,5,5,5,5,
-5,0,4,0,6,6,6,6,6,6,0,0,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,5,5,5,5,5,0x1b,0x1b,0x1b,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1b,
-0x17,0x1b,0x1b,0x1b,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0x344b,0x3c4b,0x444b,0x4c4b,0x544b,0x5c4b,0x644b,0x6c4b,0x744b,0x2c4b,
-0x1b,6,0x1b,6,0x1b,6,0x14,0x15,0x14,0x15,8,8,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,0,0,0,
-0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,
-6,6,6,6,6,0x17,6,6,5,5,5,5,5,6,6,6,
-6,6,6,6,6,6,6,6,0,6,6,6,6,6,6,6,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
+0,0,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,
+0,5,0,0,5,5,5,5,5,5,5,0,0,0,6,0,
+0,0,0,8,8,8,6,6,6,0,6,0,8,8,8,8,
+8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5,
+5,5,5,5,5,6,5,5,6,6,6,6,6,6,6,0,
+0,0,0,0x19,5,5,5,5,5,5,4,6,6,6,6,6,
+6,6,6,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,
+0,0,0,0,0,5,5,0,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,5,5,5,0,5,0,5,5,5,5,5,5,5,5,5,
+5,6,5,5,6,6,6,6,6,6,6,6,6,5,0,0,
+5,5,5,5,5,0,4,0,6,6,6,6,6,6,6,0,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,5,5,5,5,
+5,0x1b,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+0x17,0x17,0x17,0x1b,0x17,0x1b,0x1b,0x1b,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x344b,0x3c4b,0x444b,0x4c4b,0x544b,0x5c4b,
+0x644b,0x6c4b,0x744b,0x2c4b,0x1b,6,0x1b,6,0x1b,6,0x14,0x15,0x14,0x15,8,8,
+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,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,
+6,6,6,8,6,6,6,6,6,0x17,6,6,5,5,5,5,
+5,6,6,6,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,6,6,
-6,6,6,6,6,6,6,6,6,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x17,0x17,0x17,0x17,
-0x17,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0,0,0,0,0,5,5,5,5,
-5,5,5,5,5,5,5,8,8,6,6,6,6,8,6,6,
-6,6,6,6,8,6,6,8,8,6,6,5,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5,
-5,5,8,8,6,6,5,5,5,5,6,6,6,5,8,8,
-8,5,5,8,8,8,8,8,8,8,5,5,5,6,6,6,
-6,5,5,5,5,5,5,5,5,5,5,5,5,5,6,8,
-8,6,6,8,8,8,8,8,8,6,5,8,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,8,8,8,6,0x1b,0x1b,2,2,2,2,
+6,6,6,6,6,6,6,6,6,6,6,6,6,0,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,
+0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0,0,0,0,0,
+5,5,5,5,5,5,5,5,5,5,5,8,8,6,6,6,
+6,8,6,6,6,6,6,6,8,6,6,8,8,6,6,5,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,
+5,5,5,5,5,5,8,8,6,6,5,5,5,5,6,6,
+6,5,8,8,8,5,5,8,8,8,8,8,8,8,5,5,
+5,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,
+5,5,6,8,8,6,6,8,8,8,8,8,8,6,5,8,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,8,8,8,6,0x1b,0x1b,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,0x17,4,2,2,2,1,1,1,1,
-1,1,0,1,0,0,0,0,0,1,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,0,5,5,5,5,0,0,5,5,5,5,
-5,5,5,0,5,0,5,5,5,5,0,0,5,5,5,5,
-5,5,5,5,5,0,5,5,5,5,0,0,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,
-5,5,0,0,5,5,5,5,5,5,5,0,5,0,5,5,
-5,5,0,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,5,5,
-5,5,5,5,5,0,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,6,6,6,0x17,0x17,0x17,0x17,
-0x17,0x17,0x17,0x17,0x17,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,
-0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x788b,0,0,0,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,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,1,
-1,1,0,0,2,2,2,2,2,2,0,0,0x13,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,0x1b,0x17,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-0xc,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,0x14,0x15,0,0,0,
-5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x98a,0x9ca,
-0xa0a,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,5,5,5,5,5,5,
-5,5,6,6,6,8,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,6,6,8,0x17,0x17,0,0,0,0,0,0,0,0,0,
+2,2,2,2,2,2,2,2,2,2,2,0x17,4,2,2,2,
+1,1,1,1,1,1,0,1,0,0,0,0,0,1,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,0,5,5,5,5,0,0,
+5,5,5,5,5,5,5,0,5,0,5,5,5,5,0,0,
+5,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-5,5,6,6,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,5,5,
-5,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,
+5,0,5,5,5,5,0,0,5,5,5,5,5,5,5,0,
+5,0,5,5,5,5,0,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,5,5,5,5,5,5,5,0,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,6,6,8,6,6,6,6,6,6,6,8,8,
-8,8,8,8,8,8,6,8,8,6,6,6,6,6,6,6,
-6,6,6,6,0x17,0x17,0x17,4,0x17,0x17,0x17,0x19,5,6,0,0,
-0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
-0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0,0,0,0,0,0,
-5,5,5,5,5,5,5,5,5,6,5,0,0,0,0,0,
+5,5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,
+0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,
+0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x788b,0,0,0,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x17,0x17,6,6,6,0x10,6,
-0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
-5,5,5,4,5,5,5,5,5,5,5,5,5,5,5,5,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,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,1,1,1,0,0,2,2,2,2,2,2,0,0,
+0x13,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+5,0x1b,0x17,5,5,5,5,5,5,5,5,5,5,5,5,5,
+5,5,5,5,0xc,5,5,5,5,5,5,5,5,5,5,5,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x14,
+0x15,0,0,0,5,5,5,5,5,5,5,5,5,5,5,0x17,
+0x17,0x17,0x98a,0x9ca,0xa0a,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,5,5,
+5,5,5,5,5,5,6,6,6,8,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,6,6,8,0x17,0x17,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,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,5,5,5,0,6,6,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,6,6,8,6,6,6,6,6,
+6,6,8,8,8,8,8,8,8,8,6,8,8,6,6,6,
+6,6,6,6,6,6,6,6,0x17,0x17,0x17,4,0x17,0x17,0x17,0x19,
+5,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
+0,0,0,0,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0,0,
+0,0,0,0,5,5,5,5,5,5,5,5,5,6,5,0,
+0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
+5,5,5,5,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x17,0x17,6,
+6,6,0x10,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
+0,0,0,0,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,0,0,0,0,0,0,0,5,5,5,5,5,6,6,5,
+5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5,
+5,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,0,0,
+0,0,0,0,0,0,0,0,6,6,6,8,8,8,8,6,
+6,8,8,8,0,0,0,0,8,8,6,8,8,8,8,8,
+8,6,6,6,0,0,0,0,0x1b,0,0,0,0x17,0x17,0x49,0x89,
+0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,5,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,5,5,5,5,5,5,
+5,5,5,5,5,5,0,0,5,5,5,5,5,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,0,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,6,6,6,8,8,8,8,6,6,8,8,8,
-0,0,0,0,8,8,6,8,8,8,8,8,8,6,6,6,
-0,0,0,0,0x1b,0,0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,
-0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,5,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,5,5,5,5,5,5,5,5,5,5,
-5,5,0,0,5,5,5,5,5,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,0,5,5,5,5,5,5,5,5,5,5,5,5,
-5,5,5,5,5,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0x30b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x30b,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,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,5,5,6,6,8,8,6,0,0,0x17,0x17,0x17,0x17,0x17,0x17,
-0x17,0x17,0x17,4,0x17,0x17,0x17,0x17,0x17,0x17,0,0,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,7,6,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-5,8,6,8,6,6,6,6,6,6,6,0,6,8,6,8,
-8,6,6,6,6,6,6,6,6,8,8,8,8,8,8,6,
-6,6,6,6,6,6,6,6,6,0,0,6,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,
-0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0x17,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,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,0,6,6,6,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,6,8,6,6,
-6,6,6,8,6,8,8,8,8,8,6,8,8,5,5,5,
-5,5,5,5,5,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
-0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,5,8,6,6,6,6,8,8,
-6,6,8,6,6,6,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
-0x249,0x289,5,5,5,5,5,5,6,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,5,5,6,8,6,6,8,8,
-8,6,8,6,6,6,8,8,0,0,0,0,0,0,0,0,
-0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
-0,5,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,
-5,5,5,5,8,8,8,8,8,8,8,8,6,6,6,6,
-6,6,6,6,8,8,6,6,0,0,0,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,5,5,4,4,4,4,4,4,0x17,0x17,
-2,2,2,2,2,2,2,2,2,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,1,1,1,1,1,1,1,1,0,0,1,1,1,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,
-6,6,6,0x17,6,6,6,6,6,6,6,6,6,6,6,6,
-6,8,6,6,6,6,6,6,6,5,5,5,5,6,5,5,
-5,5,5,5,6,5,5,8,6,6,5,0,0,0,0,0,
-2,2,2,2,2,2,2,2,2,2,2,2,4,4,4,4,
+5,5,5,5,5,5,5,6,6,8,8,6,0,0,0x17,0x17,
+0x17,0x17,0x17,0x17,0x17,0x17,0x17,4,0x17,0x17,0x17,0x17,0x17,0x17,0,0,
+6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,
+5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+5,5,5,5,5,8,6,8,6,6,6,6,6,6,6,0,
+6,8,6,8,8,6,6,6,6,6,6,6,6,8,8,8,
+8,8,8,6,6,6,6,6,6,6,6,6,6,0,0,6,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
+0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
+0x17,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6,
+6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,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,0,
+6,6,6,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,
+6,8,6,6,6,6,6,8,6,8,8,8,8,8,6,8,
+8,5,5,5,5,5,5,5,5,0,0,0,0x49,0x89,0xc9,0x109,
+0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,5,8,6,6,
+6,6,8,8,6,6,8,6,6,6,5,5,0x49,0x89,0xc9,0x109,
+0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,6,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,5,5,6,8,
+6,6,8,8,8,6,8,6,6,6,8,8,0,0,0,0,
+0,0,0,0,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
+0x249,0x289,0,0,0,5,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
+0x249,0x289,5,5,5,5,5,5,8,8,8,8,8,8,8,8,
+6,6,6,6,6,6,6,6,8,8,6,6,0,0,0,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,5,5,4,4,4,4,
+4,4,0x17,0x17,2,2,2,2,2,2,2,2,2,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,1,1,1,1,1,1,1,1,0,
+0,1,1,1,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,
+0,0,0,0,6,6,6,0x17,6,6,6,6,6,6,6,6,
+6,6,6,6,6,8,6,6,6,6,6,6,6,5,5,5,
+5,6,5,5,5,5,5,5,6,5,5,8,6,6,5,0,
+0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,
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,4,4,4,4,4,4,2,
-2,2,2,2,2,2,2,2,2,2,2,2,4,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,4,4,4,4,4,
-1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
-1,2,1,2,1,2,2,2,2,2,2,2,2,2,1,2,
-2,2,2,2,2,2,2,2,1,1,1,1,1,0x1a,0x1a,0x1a,
-0,0,2,2,2,0,2,2,1,1,1,1,3,0x1a,0x1a,0,
-2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,
-2,2,2,2,2,2,0,0,1,1,1,1,1,1,0,0,
-2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,
-2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,
-2,2,2,2,2,2,0,0,1,1,1,1,1,1,0,0,
-2,2,2,2,2,2,2,2,0,1,0,1,0,1,0,1,
-2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,
-2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,
-2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,
-2,2,2,2,2,0,2,2,1,1,1,1,3,0x1a,2,0x1a,
-0x1a,0x1a,2,2,2,0,2,2,1,1,1,1,3,0x1a,0x1a,0x1a,
-2,2,2,2,0,0,2,2,1,1,1,1,0,0x1a,0x1a,0x1a,
-0x16,0x17,0x17,0x17,0x18,0x14,0x15,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
-0x17,0x17,0x18,0x17,0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xc,
-0x10,0x10,0x10,0x10,0x10,0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x2cb,4,0,0,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,0x18,0x14,0x15,4,
-0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x10,0x10,0x10,0x10,0x10,
-0x13,0x13,0x13,0x13,0x13,0x13,0x17,0x17,0x1c,0x1d,0x14,0x1c,0x1c,0x1d,0x14,0x1c,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xd,0xe,0x10,0x10,0x10,0x10,0x10,0xc,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1c,0x1d,0x17,0x17,0x17,0x17,0x16,
-0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,0x18,0x14,0x15,0,
-4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,
-0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+4,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,
+4,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,4,
+4,4,4,4,1,2,1,2,1,2,1,2,1,2,1,2,
+1,2,1,2,1,2,1,2,1,2,2,2,2,2,2,2,
+2,2,1,2,2,2,2,2,2,2,2,2,1,1,1,1,
+1,0x1a,0x1a,0x1a,0,0,2,2,2,0,2,2,1,1,1,1,
+3,0x1a,0x1a,0,2,2,2,2,2,2,2,2,1,1,1,1,
+1,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1,
+1,1,0,0,2,2,2,2,2,2,2,2,1,1,1,1,
+1,1,1,1,2,2,2,2,2,2,2,2,1,1,1,1,
+1,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1,
+1,1,0,0,2,2,2,2,2,2,2,2,0,1,0,1,
+0,1,0,1,2,2,2,2,2,2,2,2,1,1,1,1,
+1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
+2,2,0,0,2,2,2,2,2,2,2,2,3,3,3,3,
+3,3,3,3,2,2,2,2,2,2,2,2,3,3,3,3,
+3,3,3,3,2,2,2,2,2,0,2,2,1,1,1,1,
+3,0x1a,2,0x1a,0x1a,0x1a,2,2,2,0,2,2,1,1,1,1,
+3,0x1a,0x1a,0x1a,2,2,2,2,0,0,2,2,1,1,1,1,
+0,0x1a,0x1a,0x1a,0x16,0x17,0x17,0x17,0x18,0x14,0x15,0x17,0x17,0x17,0x17,0x17,
+0x17,0x17,0x17,0x17,0x17,0x17,0x18,0x17,0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+0x17,0x17,0x17,0xc,0x10,0x10,0x10,0x10,0x10,0,0x10,0x10,0x10,0x10,0x10,0x10,
+0x10,0x10,0x10,0x10,0x2cb,4,0,0,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,
+0x18,0x14,0x15,4,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x10,
+0x10,0x10,0x10,0x10,0x13,0x13,0x13,0x13,0x13,0x13,0x17,0x17,0x1c,0x1d,0x14,0x1c,
+0x1c,0x1d,0x14,0x1c,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xd,0xe,0x10,0x10,
+0x10,0x10,0x10,0xc,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1c,0x1d,0x17,
+0x17,0x17,0x17,0x16,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,
+0x18,0x14,0x15,0,4,4,4,4,4,4,4,4,4,4,4,4,
+4,0,0,0,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
-0x19,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,7,7,7,
-7,6,7,7,7,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,
-0x1b,0x1b,0x1b,0x1b,1,0x1b,1,0x1b,1,0x1b,1,1,1,1,0x1b,2,
-1,1,1,1,2,5,5,5,5,2,0x1b,0x1b,2,2,1,1,
-0x18,0x18,0x18,0x18,0x18,1,2,2,2,2,0x1b,0x18,0x1b,0x1b,2,0x1b,
-0x358b,0x360b,0x364b,0x348b,0x388b,0x350b,0x390b,0x3d0b,0x410b,0x354b,0x454b,0x35cb,0x3dcb,0x45cb,0x4dcb,0x58b,
-0x1b,0x1b,1,0x1b,0x1b,0x1b,0x1b,1,0x1b,0x1b,2,1,1,1,2,2,
-1,1,1,2,0x1b,1,0x1b,0x1b,0x18,1,1,1,1,1,0x1b,0x1b,
-0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,0x11ca,0x1e4a,0x980a,0x784a,
-0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,0x11ca,0x1e4a,0x980a,0x784a,
-0x784a,0x984a,0x788a,1,2,0x6ca,0x11ca,0x988a,0x78ca,0x54b,0x1b,0x1b,0,0,0,0,
-0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x1b,0x1b,
+0x19,0x19,0x19,0x19,0x19,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,7,7,7,7,6,7,7,7,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,0x1b,0x1b,0x1b,0x1b,1,0x1b,1,0x1b,1,0x1b,1,1,
+1,1,0x1b,2,1,1,1,1,2,5,5,5,5,2,0x1b,0x1b,
+2,2,1,1,0x18,0x18,0x18,0x18,0x18,1,2,2,2,2,0x1b,0x18,
+0x1b,0x1b,2,0x1b,0x358b,0x360b,0x364b,0x348b,0x388b,0x350b,0x390b,0x3d0b,0x410b,0x354b,0x454b,0x35cb,
+0x3dcb,0x45cb,0x4dcb,0x58b,0x1b,0x1b,1,0x1b,0x1b,0x1b,0x1b,1,0x1b,0x1b,2,1,
+1,1,2,2,1,1,1,2,0x1b,1,0x1b,0x1b,0x18,1,1,1,
+1,1,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,
+0x11ca,0x1e4a,0x980a,0x784a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,
+0x11ca,0x1e4a,0x980a,0x784a,0x784a,0x984a,0x788a,1,2,0x6ca,0x11ca,0x988a,0x78ca,0x54b,0x1b,0x1b,
+0,0,0,0,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,
0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,
-0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,
-0x1b,0x1b,0x18,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x18,0x1b,0x1b,0x18,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x18,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x1b,0x1b,0x1b,0x1b,
+0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,
0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,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,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,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,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,
+0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,
+0x18,0x18,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,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,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x2cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0xa4b,0x30b,0x34b,0x38b,
-0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,
-0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0xa4b,0x30b,0x34b,0x38b,0x3cb,
+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,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,
+0xa4b,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,
0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0xa4b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,
+0x98b,0x9cb,0xa0b,0xa4b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,
+0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x18,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,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x18,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,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,
-0x14,0x15,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b,0x38b,0x3cb,
-0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,
-0x18,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,
-0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x14,0x15,0x14,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,
+0x14,0x15,0x14,0x15,0x14,0x15,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,
+0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,
+0x48b,0x4cb,0x50b,0x7cb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,
+0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,
0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,
-0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x14,0x15,
+0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
-0x18,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x14,0x15,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,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,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,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,2,1,1,1,2,2,1,
+2,1,2,1,2,1,1,1,1,2,1,2,2,1,2,2,
+2,2,2,2,4,4,1,1,1,2,1,2,2,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,1,2,1,2,6,6,6,1,2,0,0,0,0,
+0,0x17,0x17,0x17,0x17,0x344b,0x17,0x17,2,2,2,2,2,2,0,2,
+0,0,0,0,0,2,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,4,
+0x17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,
+5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0,
+5,5,5,5,5,5,5,0,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,0,0,0,0,0,0,0,0,0,
+0x17,0x17,0x1c,0x1d,0x1c,0x1d,0x17,0x17,0x17,0x1c,0x1d,0x17,0x1c,0x1d,0x17,0x17,
+0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x13,0x17,0x1c,0x1d,0x17,0x17,
+0x1c,0x1d,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x17,0x17,4,
+0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x13,0x17,0x17,0x17,0x17,
+0x13,0x17,0x14,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+0x1b,0x1b,0x17,0x17,0x17,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x13,0,0,
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,0,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,1,2,1,1,1,2,2,1,2,1,2,1,
-2,1,1,1,1,2,1,2,2,1,2,2,2,2,2,2,
-4,4,1,1,1,2,1,2,2,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,
-2,1,2,6,6,6,1,2,0,0,0,0,0,0x17,0x17,0x17,
-0x17,0x344b,0x17,0x17,2,2,2,2,2,2,0,2,0,0,0,0,
-0,2,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,4,0x17,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,6,5,5,5,5,
-5,5,5,0,5,5,5,5,5,5,5,0,5,5,5,5,
-5,5,5,0,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,0,0,0,0,0,0,0,0,0,0x17,0x17,0x1c,0x1d,
-0x1c,0x1d,0x17,0x17,0x17,0x1c,0x1d,0x17,0x1c,0x1d,0x17,0x17,0x17,0x17,0x17,0x17,
-0x17,0x17,0x17,0x13,0x17,0x17,0x13,0x17,0x1c,0x1d,0x17,0x17,0x1c,0x1d,0x14,0x15,
-0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x17,0x17,4,0x17,0x17,0x17,0x17,
-0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x13,0x17,0x17,0x17,0x17,0x13,0x17,0x14,0x17,
-0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x17,0x17,
-0x17,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x13,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,0,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,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,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,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,0x13,0x14,0x15,0x15,
+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,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,
+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,
+0x13,0x14,0x15,0x15,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,0x1a,
+0x1a,4,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,0x17,
+4,4,4,5,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,0,0,6,6,0x1a,0x1a,4,4,5,
+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,
+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,
+0xb4b,0xb8b,0xbcb,0xc0b,0xc4b,0xc8b,0xccb,0xd0b,0xd4b,0xd8b,0xdcb,0xe0b,0x1b,0x1b,0x1b,0x1b,
+0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0xe4b,0xe8b,0xecb,
+0xf0b,0xf4b,0xf8b,0xfcb,0x100b,0x104b,0x108b,0x10cb,0x110b,0x114b,0x118b,0x11cb,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,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,0x17,4,4,4,5,
-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,0x685,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,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,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,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,0xb4b,0xb8b,0xbcb,0xc0b,
-0xc4b,0xc8b,0xccb,0xd0b,0xd4b,0xd8b,0xdcb,0xe0b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0xe4b,0xe8b,0xecb,0xf0b,0xf4b,0xf8b,0xfcb,
-0x100b,0x104b,0x108b,0x10cb,0x110b,0x114b,0x118b,0x11cb,5,5,5,5,5,0x685,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,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,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,0x685,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,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,0x585,5,5,0x705,5,5,5,0x7885,5,0x605,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,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,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,5,5,5,5,5,5,0x7985,0x7c5,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,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,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,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,5,5,5,5,5,5,5,0x7a85,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,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,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,0x585,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,0x585,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,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,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,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,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,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,0x1e45,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,5,5,5,5,5,5,0x785,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,0x1e45,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,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,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,
+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,5,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,5,5,5,5,5,5,5,0x6c5,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,
-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,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,
+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,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,
+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,
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,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,
+0x1a,0x1a,0x1a,0x1a,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,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,
+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,
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,
+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,
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,0x11,0x11,0x11,0x11,
+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,
-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,
+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,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,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,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,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,
-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,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,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,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,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,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,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,6,6,6,6,6,0,0,0,0,0,
+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,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,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,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,
5,5,5,5,5,5,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,
-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,
+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,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,
-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,
+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,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,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,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,0x58b,0x11cb,0x17,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,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,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,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+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,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b,
+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,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b,
+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,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,
+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,
-5,5,5,5,5,5,5,5,5,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,
-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,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,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,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,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,
+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,
+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,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,5,5,5,5,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,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,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,6,6,0,0,0,0,0,
+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,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,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,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,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,
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,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,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,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,
+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,
-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,
+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,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,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,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,
-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,
+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,
@@ -1215,8 +1226,10 @@ static const uint16_t propsTrie_index[22688]={
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,0,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,
+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,
@@ -1241,145 +1254,153 @@ static const uint16_t propsTrie_index[22688]={
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,
-0,0,0,0,5,5,5,0,0,0,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,
+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,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,0x1b,0x1b,0x1b,0x1b,
+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,
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,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,
+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,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,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,
-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,
+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,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,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,
-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,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,
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,
-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,
+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,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,6,6,0,6,
-6,0,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,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,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,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,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,
-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,
+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,
-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,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,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,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,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,0x1a,0x1a,0x1a,0x1a,0x1a,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,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0x1b,0x1b,0x1b,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,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,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,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,
@@ -1388,13 +1409,12 @@ static const uint16_t propsTrie_index[22688]={
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,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,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,0,0,0,0,0,0,0,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,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,
-0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,
-0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,
+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,
@@ -1416,176 +1436,177 @@ static const uint16_t propsTrie_index[22688]={
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,5,5,5,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x10,0x10,0x10,
+5,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0,0x10,0,0,
+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,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,
+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,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0,0,0,0,0,0
+0x11,0x11,0,0,0,0,0,0
};
static const UTrie2 propsTrie={
propsTrie_index,
- propsTrie_index+4656,
- NULL,
- 4656,
- 18032,
+ propsTrie_index+4692,
+ nullptr,
+ 4692,
+ 18324,
0xa40,
- 0x12b0,
+ 0x12d4,
0x0,
0x0,
0x110000,
- 0x589c,
- NULL, 0, FALSE, FALSE, 0, NULL
+ 0x59e4,
+ nullptr, 0, false, false, 0, nullptr
};
-static const uint16_t propsVectorsTrie_index[32060]={
-0x511,0x519,0x521,0x529,0x541,0x549,0x551,0x559,0x561,0x569,0x571,0x579,0x581,0x589,0x591,0x599,
-0x5a0,0x5a8,0x5b0,0x5b8,0x5bb,0x5c3,0x5cb,0x5d3,0x5db,0x5e3,0x5eb,0x5f3,0x5fb,0x603,0x60b,0x613,
-0x61b,0x623,0x62a,0x632,0x63a,0x642,0x64a,0x652,0x65a,0x662,0x667,0x66f,0x676,0x67e,0x686,0x68e,
-0x696,0x69e,0x6a6,0x6ae,0x6b5,0x6bd,0x6c5,0x6cd,0x6d5,0x6dd,0x6e5,0x6ed,0x6f5,0x6fd,0x705,0x70d,
-0x1aba,0xd5a,0xe2e,0x1162,0x1299,0x1c7b,0x1e12,0x1c73,0x1367,0x1377,0x135f,0x136f,0x7da,0x7e0,0x7e8,0x7f0,
-0x7f8,0x7fe,0x806,0x80e,0x816,0x81c,0x824,0x82c,0x834,0x83a,0x842,0x84a,0x852,0x85a,0x862,0x869,
-0x871,0x877,0x87f,0x887,0x88f,0x895,0x89d,0x8a5,0x8ad,0x137f,0x8b5,0x8bd,0x8c5,0x8cc,0x8d4,0x8dc,
-0x8e4,0x8e8,0x8f0,0x8f7,0x8ff,0x907,0x90f,0x917,0x169a,0x16a2,0x91f,0x927,0x92f,0x937,0x93f,0x946,
-0x1700,0x16f0,0x16f8,0x19f5,0x19fd,0x138f,0x94e,0x1387,0x15e3,0x15e3,0x15e5,0x13a3,0x13a4,0x1397,0x1399,0x139b,
-0x1708,0x170a,0x956,0x170a,0x95e,0x963,0x96b,0x170f,0x971,0x170a,0x977,0x97f,0xc3a,0x1717,0x1717,0x987,
-0x1727,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,0x1728,
-0x1728,0x1728,0x1728,0x171f,0x98f,0x1730,0x1730,0x997,0xb62,0xb6a,0xb72,0xb7a,0x1740,0x1738,0x99f,0x9a7,
-0x9af,0x174a,0x1752,0x9b7,0x1748,0x9bf,0x1ac2,0xd62,0xb82,0xb8a,0xb92,0xb97,0x195b,0xc61,0xc68,0x18b7,
-0xc12,0x1aca,0xd6a,0xd72,0xd7a,0xd82,0xf38,0xf3c,0x19bb,0x19c0,0xca0,0xca8,0x1a31,0x1a39,0x1b93,0xe36,
-0x1a41,0xcee,0xcf6,0x1a49,0x10e2,0x118a,0xf10,0xd8a,0x18d7,0x18bf,0x18cf,0x18c7,0x1973,0x196b,0x1927,0x19b3,
-0x13ac,0x13ac,0x13ac,0x13ac,0x13af,0x13ac,0x13ac,0x13b7,0x9c7,0x13bf,0x9cb,0x9d3,0x13bf,0x9db,0x9e3,0x9eb,
-0x13cf,0x13c7,0x13d7,0x9f3,0x9fb,0x13df,0xa03,0xa0b,0x13e7,0x13ef,0x13f7,0x13ff,0xa13,0x1407,0x140e,0x1416,
-0x141e,0x1426,0x142e,0x1436,0x143e,0x1445,0x144d,0x1455,0x145d,0x1465,0x1468,0x146a,0x175a,0x184d,0x1853,0x19a3,
-0x1472,0xa1b,0xa23,0x1598,0x159d,0x15a0,0x15a6,0x147a,0x15ae,0x15ae,0x148a,0x1482,0x1492,0x149a,0x14a2,0x14aa,
-0x14b2,0x14ba,0x14c2,0x14ca,0x185b,0x18af,0x1a05,0x1b5b,0x14da,0x14e0,0x14e8,0x14f0,0x14d2,0x14f8,0x1863,0x186a,
-0x1762,0x1762,0x1762,0x1762,0x1762,0x1762,0x1762,0x1762,0x1872,0x1872,0x1872,0x1872,0x187a,0x1881,0x1883,0x188a,
-0x1892,0x1896,0x1896,0x1899,0x1896,0x1896,0x189f,0x1896,0x18df,0x19ab,0x1a0d,0xb9f,0xba5,0x1cbf,0x1cc7,0x1d9d,
-0x194b,0x193f,0x1943,0x19c8,0x192f,0x192f,0x192f,0xc22,0x1937,0xc42,0x198b,0xc90,0xc2a,0xc32,0xc32,0x1a51,
-0x197b,0x1a15,0xc78,0xc80,0xa2b,0x176a,0x176a,0xa33,0x1772,0x1772,0x1772,0x1772,0x1772,0x1772,0xa3b,0x715,
-0x15cb,0x15ed,0xa43,0x15f5,0xa4b,0x15fd,0x1605,0x160d,0xa53,0xa58,0x1615,0x161c,0xa5d,0x177a,0x199b,0xc1a,
-0xa65,0x1677,0x167e,0x1624,0x1686,0x168a,0x162c,0x1630,0x1649,0x1649,0x164b,0x1638,0x1640,0x1640,0x1641,0x1692,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,
-0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1782,0x1785,0x18e7,0x18e7,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-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,
-0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x1653,0x165a,0x1ab2,0x1e7e,
-0x178d,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,
-0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,0x1793,
-0x1793,0x1793,0x1793,0x1793,0xa6d,0x179b,0xa75,0x1ad2,0x1a5d,0x1a5d,0x1a5d,0x1a5d,0x1a5d,0x1a5d,0x1a5d,0x1a5d,
-0x1a59,0xcfe,0x1a6d,0x1a65,0x1a6f,0x1ada,0x1ada,0xd92,0x1953,0x19d0,0x1a25,0x1a29,0x1a1d,0x1b8b,0xcb0,0xcb7,
-0x1983,0xc88,0x19d8,0xcbf,0x1a77,0x1a7a,0xd06,0x1ae2,0x1a8a,0x1a82,0xd0e,0xd9a,0x1aea,0x1aee,0xda2,0xfec,
-0x1a92,0xd16,0xd1e,0x1af6,0x1b06,0x1afe,0xdaa,0xee0,0xe3e,0xe46,0x1d0d,0xf9c,0x1dba,0x1dba,0x1b0e,0xdb2,
-0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,
-0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,
-0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,
-0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,
-0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,
-0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,
-0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,
-0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,
-0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,
-0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,
-0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,
-0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,
-0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,
-0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,
-0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,
-0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,
-0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,
-0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,
-0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,
-0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,
-0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,
-0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0x16e8,0x16e2,0x16e3,0x16e4,0x16e5,0x16e6,0x16e7,0xa7d,0xdba,0xdbd,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,
-0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,0x16ba,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,
-0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x15b6,0x1662,0x1662,0x1662,0x1662,0x1662,0x1662,0x1662,0x1662,
-0x1667,0x166f,0x18a7,0x132c,0x1993,0x1993,0x1330,0x1337,0xa85,0xa8d,0xa95,0x1518,0x151f,0x1527,0xa9d,0x152f,
-0x156d,0x156d,0x1500,0x1508,0x1537,0x1564,0x1565,0x1575,0x153f,0x1544,0x154c,0x1554,0xaa5,0x155c,0xaad,0x1510,
-0xc98,0x157d,0xab5,0xabd,0x1585,0x158b,0x1590,0xac5,0xad5,0x15d3,0x15db,0x15be,0x15c3,0xadd,0xae5,0xacd,
-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,0x16aa,0x16b2,0x16b2,0x16b2,0x16b2,
-0x14c4,0x14c4,0x1504,0x1544,0x1584,0x15c4,0x1604,0x1644,0x1680,0x16c0,0x16ec,0x172c,0x176c,0x17ac,0x17ec,0x182c,
-0x186c,0x18a8,0x18e8,0x1928,0x1968,0x199c,0x19d8,0x1a18,0x1a58,0x1a98,0x1ad4,0x1b14,0x1b54,0x1b94,0x1bd4,0x1c14,
-0xe59,0xa80,0xac0,0xb00,0xb40,0xb6b,0xed9,0xa40,0xefb,0xa40,0xa40,0xa40,0xa40,0xbab,0x1381,0x1381,
-0xf3b,0xfbb,0xa40,0xa40,0xa40,0xbeb,0xf7b,0xc2b,0xa40,0xc51,0xc91,0xcd1,0xd11,0xd51,0xe99,0xdc9,
-0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,0x12c1,
-0x12c1,0x12c1,0x12c1,0x12c1,0xffb,0x1301,0x1136,0x1176,0x1341,0x1181,0x13c1,0x13c1,0x13c1,0x103b,0x105b,0x109b,
-0x1401,0x1401,0x10db,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,
-0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x105b,0x10f6,
+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,
+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,
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,
@@ -1608,1868 +1629,1908 @@ static const uint16_t propsVectorsTrie_index[32060]={
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,
-0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,
-0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x1241,0x11c1,
-0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,
-0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1201,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0xbf7,0xbfa,0xdc5,0x1d5d,0xff4,0x71d,0x531,0x108e,0xcc7,0xd46,0x531,0x531,0x1c8b,0xee8,0xef0,0x1da5,
-0xc4a,0xc51,0xc59,0x1b16,0x1d3d,0x531,0x1d1d,0xfc4,0x1b1e,0xdcd,0xdd5,0xddd,0x101c,0x725,0x531,0x531,
-0x1b26,0x1b26,0x72d,0x531,0x1dd2,0x10a6,0x1dca,0x10ae,0x1ebe,0x11a0,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0xde5,0x1f16,0x1291,0x531,0x531,0x1ede,0x11c8,0x11cf,0x11d6,0x12cd,0x12d1,0x1248,0x11de,
-0x1b9b,0x1b9d,0xe4e,0xe55,0x1b2e,0x1b36,0xded,0xf08,0x1c83,0xed0,0xed8,0xfbc,0x1ca3,0x1ca7,0x1caf,0x103c,
-0xf87,0xf8c,0x735,0x531,0x1096,0x109e,0x1d05,0xf94,0xf69,0xf6f,0xf77,0xf7f,0x531,0x531,0x531,0x531,
-0x1e42,0x1e3a,0x1110,0x1118,0x1d85,0x1d7d,0x1064,0x531,0x531,0x531,0x531,0x531,0x1d6d,0x1024,0x102c,0x1034,
-0x1d35,0x1d2d,0xfd4,0x1108,0x1cb7,0xf18,0x73d,0x531,0x1074,0x107c,0x745,0x531,0x531,0x531,0x531,0x531,
-0x1eb6,0x1182,0x74d,0x531,0x531,0x1d95,0x1d8d,0x106c,0x1250,0x1256,0x125e,0x531,0x531,0x11e6,0x11ea,0x11f2,
-0x1e76,0x1e6e,0x116a,0x1e66,0x1e5e,0x115a,0x1d65,0x1014,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x10c6,0x10cb,0x10d3,0x10da,0x10fa,0x1100,0x531,0x531,0x113e,0x1142,0x114a,0x1192,0x1198,0x755,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x11b0,0x531,0x531,0x531,0x531,0x531,0x759,0x1efe,0x1238,
-0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,
-0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e0,0x19e5,0xccf,0xcd6,0xcd6,0xcd6,
-0x19ed,0x19ed,0x19ed,0xcde,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x1dc2,0x761,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x765,0x1f2e,0x1f2e,0x12a1,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,
-0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0xe5d,0xfdc,0xfe4,0x1f36,
-0x12d9,0x12e1,0xf20,0x1d55,0x1d4d,0x1004,0x100c,0x76d,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x1ed6,0x1ece,0x11c0,
-0x531,0x531,0x531,0x1c9b,0x1c9b,0xef8,0x1c93,0xf00,0x531,0x531,0x10f2,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x771,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x1ced,0x1ced,0x1ced,0xf44,0xf49,
-0x779,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x1f46,0x1301,0x1308,0x1f3e,0x1f3e,0x1f3e,0x781,
-0x531,0x17c0,0x17c0,0x17c0,0x17c0,0x17c0,0x17c0,0x17c0,0xafb,0x17d0,0xb03,0x17d1,0x17c8,0x17d9,0x17df,0x17e7,
-0xb0b,0x190f,0x190f,0x789,0x531,0x531,0x531,0x531,0x11b8,0x18ff,0x18ff,0xc02,0xce6,0x531,0x531,0x531,
-0x531,0x1818,0x181f,0xb13,0x1822,0xb1b,0xb23,0xb2b,0x181c,0xb33,0xb3b,0xb43,0x1821,0x1829,0x1818,0x181f,
-0x181b,0x1822,0x182a,0x1819,0x1820,0x181c,0xb4a,0x17ef,0x17f7,0x17fe,0x1805,0x17f2,0x17fa,0x1801,0x1808,0xb52,
-0x1810,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,0x1dea,
-0x1dea,0x1dda,0x1ddd,0x1dda,0x1de4,0x10b6,0x791,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x12bd,0x12c5,0x12c5,0x12c5,0x12c5,0x12c5,0x12c5,
-0x12c5,0x10ea,0x799,0x531,0x531,0x531,0x531,0x531,0x531,0x1ef6,0x11fa,0x7a1,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x7a5,0x12e9,0x1f06,0x1240,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x12a9,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0x1d25,0xfcc,0x531,0x1e32,0x1e2a,0x10be,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x7ad,0x1ec6,0x11a8,0x531,0x531,0x1202,0x1203,0x7b5,0x531,0x531,0x531,0x531,
-0x531,0xe95,0xe9d,0xea5,0xead,0xeb5,0xebd,0xec4,0xec8,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x7b9,0x1044,0x1d75,0x104a,0x1d75,0x1052,0x1057,0x105c,
-0x105c,0x1dfa,0x1e1a,0x1e22,0x1e8e,0x1e02,0x1ee6,0x1e0a,0x1e96,0x1eee,0x1eee,0x1172,0x117a,0x121a,0x1220,0x1228,
-0x1230,0x1f0e,0x1f0e,0x1f0e,0x1f0e,0x1274,0x1f0e,0x127a,0x127e,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,
-0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,
-0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c1,0x7c2,0xb5a,0x1832,0x1832,0x1832,0x7ca,0x7ca,0x7ca,
-0x7ca,0x1907,0x1907,0x1907,0x1907,0x1907,0x1907,0x1907,0x7d2,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,
-0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,
-0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,
-0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,
-0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0xbad,0xbb4,0xbbc,0xbc4,0x18ef,0x18ef,0x18ef,
-0xbcc,0xbd4,0xbd7,0x191f,0x1917,0xc0a,0xd26,0xd2a,0xd2e,0x531,0x531,0x531,0x531,0xd36,0x1a9a,0xd3e,
-0xf30,0x17a3,0xaed,0xaf3,0xffc,0xbdf,0x1963,0xc70,0x531,0x17b8,0x17ab,0x17b0,0x18f7,0xbe7,0xbef,0x1120,
-0x1126,0x1cf5,0xf51,0x1ce5,0xf28,0x12f1,0x12f9,0x531,0x531,0x1d15,0x1d15,0x1d15,0x1d15,0x1d15,0x1d15,0x1d15,
-0x1d15,0x1d15,0xfa4,0xfac,0xfb4,0x12b1,0x12b5,0x531,0x531,0x1aa2,0xd4e,0x1aaa,0x1aaa,0xd52,0xe65,0xe6d,
-0xe75,0x1b6b,0x1b53,0x1b73,0x1b7b,0x1b63,0xdfd,0xe01,0xe08,0xe10,0xe14,0xe1c,0xe24,0xe26,0xe26,0xe26,
-0xe26,0x1bdc,0x1be4,0x1bdc,0x1bea,0x1bf2,0x1bbd,0x1bfa,0x1c02,0x1bdc,0x1c0a,0x1c12,0x1c19,0x1c21,0x1bc5,0x1bdc,
-0x1c26,0x1bcd,0x1bd4,0x1c2e,0x1c34,0x1cd6,0x1cdd,0x1ccf,0x1c3b,0x1c43,0x1c4b,0x1c53,0x1d45,0x1c5b,0x1c63,0xe7d,
-0xe85,0x1bad,0x1bad,0x1bad,0xe8d,0x1cfd,0x1cfd,0xf59,0xf61,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,
-0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b40,0x1b3e,0x1b48,0x1b3e,0x1b3e,
-0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b4b,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0x1b3e,0xdf5,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,
-0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1db2,0x1dad,0x1dad,0x1dad,0x1084,0x1086,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x112e,0x1bb5,0x1e86,0x1e86,0x1e86,0x1e86,
-0x1e86,0x1e86,0x1e86,0x1ea6,0x1136,0x120b,0x1212,0x1eae,0x1eae,0x1eae,0x1eae,0x1eae,0x1eae,0x1eae,0x1eae,0x1eae,
-0x1eae,0x1eae,0x1152,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,
-0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,0x1e52,
-0x1e52,0x1e52,0x1e56,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,0x1f26,
-0x1f26,0x1266,0x126c,0x1286,0x1289,0x1289,0x1289,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,
-0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x531,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183d,0x1310,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1318,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1845,0x1845,0x1845,0x1845,0x1845,
-0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x133f,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x131c,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,
-0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,
-0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1324,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,0x1310,
-0x1310,0x1310,0x1310,0x1310,0x1310,0x131c,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1347,
-0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x1c6b,0x134f,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1357,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16c2,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16ca,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,
-0x16d2,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,0x16da,
-0x16da,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,0x183a,
-0x183a,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,0x1b83,
-0x1b83,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,0x1df2,
-0x1df2,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,0x1e4a,
-0x1e4a,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,0x1e9e,
-0x1e9e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,
-0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,
-0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,
-0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,
-0x1f1e,0x510,0x510,0x510,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d6,0x2df,0x2d9,
-0x2d9,0x2dc,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,
-0x2d3,0x2d3,0x2d3,0x2d3,0x7cb,0x7c5,0x7aa,0x78f,0x79b,0x798,0x78f,0x7a7,0x795,0x7a1,0x78f,0x7bc,
-0x7b3,0x7a4,0x7c8,0x79e,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x7b0,0x7ad,
-0x7b6,0x7b6,0x7b6,0x7c5,0x78f,0x7d7,0x7d7,0x7d7,0x7d7,0x7d7,0x7d7,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,
-0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x7d1,0x795,
-0x79b,0x7a1,0x7c2,0x789,0x7bf,0x7d4,0x7d4,0x7d4,0x7d4,0x7d4,0x7d4,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,
-0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x7ce,0x795,
-0x7b9,0x792,0x7b6,0x2d3,0,0,0,0,0,0,0,0,0,0,0,0,
+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,
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,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2f1,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,
-0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,
-0x2e2,0x2e2,0x2e2,0x2e2,0x2e5,0x63c,0x7e0,0x7e3,0x642,0x7e3,0x7dd,0x636,0x62d,0x2eb,0x64b,0x2ee,
-0x7e6,0x624,0x639,0x7da,0x63f,0x648,0x62a,0x62a,0x630,0x2e8,0x636,0x633,0x62d,0x62a,0x64b,0x2ee,
-0x627,0x627,0x627,0x63c,0x2f7,0x2f7,0x2f7,0x2f7,0x2f7,0x2f7,0x654,0x2f7,0x2f7,0x2f7,0x2f7,0x2f7,
-0x2f7,0x2f7,0x2f7,0x2f7,0x654,0x2f7,0x2f7,0x2f7,0x2f7,0x2f7,0x2f7,0x645,0x654,0x2f7,0x2f7,0x2f7,
-0x2f7,0x2f7,0x654,0x64e,0x651,0x651,0x2f4,0x2f4,0x2f4,0x2f4,0x64e,0x2f4,0x651,0x651,0x651,0x2f4,
-0x651,0x651,0x2f4,0x2f4,0x64e,0x2f4,0x651,0x651,0x2f4,0x2f4,0x2f4,0x645,0x64e,0x651,0x651,0x2f4,
-0x651,0x2f4,0x64e,0x2f4,0x303,0x65a,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,
-0x303,0x2fa,0x303,0x2fa,0x300,0x657,0x303,0x65a,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x65a,
-0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x660,0x657,0x303,0x2fa,0x303,0x65a,
-0x303,0x2fa,0x303,0x2fa,0x303,0x657,0x663,0x65d,0x303,0x2fa,0x303,0x2fa,0x657,0x303,0x2fa,0x303,
-0x2fa,0x303,0x2fa,0x663,0x65d,0x660,0x657,0x303,0x65a,0x303,0x2fa,0x303,0x65a,0x666,0x660,0x657,
-0x303,0x65a,0x303,0x2fa,0x303,0x2fa,0x660,0x657,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,
-0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x660,0x657,0x303,0x2fa,0x303,0x65a,
-0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x2fa,0x303,0x303,0x2fa,0x303,
-0x2fa,0x303,0x2fa,0x2fd,0x306,0x312,0x312,0x306,0x312,0x306,0x312,0x312,0x306,0x312,0x312,0x312,
-0x306,0x306,0x312,0x312,0x312,0x312,0x306,0x312,0x312,0x306,0x312,0x312,0x312,0x306,0x306,0x306,
-0x312,0x312,0x306,0x312,0x315,0x309,0x312,0x306,0x312,0x306,0x312,0x312,0x306,0x312,0x306,0x306,
-0x312,0x306,0x312,0x315,0x309,0x312,0x312,0x312,0x306,0x312,0x306,0x312,0x312,0x306,0x306,0x30f,
-0x312,0x306,0x306,0x306,0x30f,0x30f,0x30f,0x30f,0x318,0x318,0x30c,0x318,0x318,0x30c,0x318,0x318,
-0x30c,0x315,0x669,0x315,0x669,0x315,0x669,0x315,0x669,0x315,0x669,0x315,0x669,0x315,0x669,0x315,
-0x669,0x306,0x315,0x309,0x315,0x309,0x315,0x309,0x312,0x306,0x315,0x309,0x315,0x309,0x315,0x309,
-0x315,0x309,0x315,0x309,0x309,0x318,0x318,0x30c,0x315,0x309,0x9bd,0x9bd,0x9c0,0x9ba,0x315,0x309,
-0x315,0x309,0x315,0x309,0x315,0x309,0x315,0x309,0x315,0x309,0x315,0x309,0x315,0x309,0x315,0x309,
-0x315,0x309,0x315,0x309,0x315,0x309,0x315,0x309,0x9c0,0x9ba,0x9c0,0x9ba,0x9bd,0x9b7,0x9c0,0x9ba,
-0xb79,0xc72,0x9bd,0x9b7,0x9bd,0x9b7,0x9c0,0x9ba,0x9c0,0x9ba,0x9c0,0x9ba,0x9c0,0x9ba,0x9c0,0x9ba,
-0x9c0,0x9ba,0x9c0,0x9ba,0xc72,0xc72,0xc72,0xd6b,0xd6b,0xd6b,0xd6e,0xd6e,0xd6b,0xd6e,0xd6e,0xd6b,
-0xd6b,0xd6e,0xeac,0xeaf,0xeaf,0xeaf,0xeaf,0xeac,0xeaf,0xeac,0xeaf,0xeac,0xeaf,0xeac,0xeaf,0xeac,
-0x31b,0x66c,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,
-0x31b,0x66c,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,
-0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,
-0x31e,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,0x31b,
-0x31b,0x31b,0x31b,0x31b,0x31b,0x9c3,0x9c3,0x9c3,0x9c3,0x9c3,0xc75,0xc75,0x333,0x333,0x333,0x333,
-0x333,0x333,0x333,0x333,0x333,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x327,0x327,0x324,0x324,
-0x672,0x324,0x32a,0x675,0x32d,0x675,0x675,0x675,0x32d,0x675,0x32a,0x32a,0x678,0x330,0x324,0x324,
-0x324,0x324,0x324,0x324,0x66f,0x66f,0x66f,0x66f,0x321,0x66f,0x324,0xaef,0x333,0x333,0x333,0x333,
-0x333,0x324,0x324,0x324,0x324,0x324,0x9cc,0x9cc,0x9c9,0x9c6,0x9c9,0xc78,0xc78,0xc78,0xc78,0xc78,
-0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0xc78,0x67b,0x67b,0x67b,0x67b,
-0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,
-0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,
-0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,
-0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67b,0x67e,0x67e,0x91e,0x67e,
-0x67e,0x921,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xc2a,0xd35,0xd35,0xd35,0xd35,
-0xd35,0xd35,0xd35,0xd35,0xe70,0xe70,0xe70,0xe70,0xe73,0xd38,0xd38,0xd38,0x681,0x681,0xaf5,0xc6f,
-0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xf5a,0xf57,0xf5a,0xf57,
-0x33f,0x348,0xf5a,0xf57,9,9,0x34e,0xeb2,0xeb2,0xeb2,0x336,0x149d,9,9,9,9,
-0x34b,0x339,0x35d,0x33c,0x35d,0x35d,0x35d,9,0x35d,9,0x35d,0x35d,0x354,0x687,0x687,0x687,
-0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,0x687,9,0x687,
-0x687,0x687,0x687,0x687,0x687,0x687,0x35d,0x35d,0x354,0x354,0x354,0x354,0x354,0x684,0x684,0x684,
-0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x684,0x351,0x684,
-0x684,0x684,0x684,0x684,0x684,0x684,0x354,0x354,0x354,0x354,0x354,0xf5a,0x360,0x360,0x363,0x35d,
-0x35d,0x360,0x357,0x9cf,0xb82,0xb7f,0x35a,0x9cf,0x35a,0x9cf,0x35a,0x9cf,0x35a,0x9cf,0x345,0x342,
-0x345,0x342,0x345,0x342,0x345,0x342,0x345,0x342,0x345,0x342,0x345,0x342,0x360,0x360,0x357,0x351,
-0xb31,0xb2e,0xb7c,0xc7e,0xc7b,0xc81,0xc7e,0xc7b,0xd71,0xd74,0xd74,0xd74,0x9de,0x693,0x36f,0x372,
-0x36f,0x36f,0x36f,0x372,0x36f,0x36f,0x36f,0x36f,0x372,0x9de,0x372,0x36f,0x690,0x690,0x690,0x690,
-0x690,0x690,0x690,0x690,0x690,0x693,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,
-0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x690,0x68a,0x68a,0x68a,0x68a,
-0x68a,0x68a,0x68a,0x68a,0x68a,0x68d,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,
-0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x9d8,0x68d,0x369,0x36c,0x369,0x369,0x369,0x36c,
-0x369,0x369,0x369,0x369,0x36c,0x9d8,0x36c,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,
-0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x372,0x36c,
-0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x366,0x92a,0x92d,0x90f,0x90f,0x1101,
-0x9d2,0x9d2,0xb88,0xb85,0x9db,0x9d5,0x9db,0x9d5,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,
-0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,
-0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,
-0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x369,0x36f,0x372,0x36c,0x36f,0x369,0xb88,0xb85,0x36f,
-0x369,0xb88,0xb85,0x36f,0x369,0xb88,0xb85,0xeb5,0x372,0x36c,0x372,0x36c,0x36f,0x369,0x372,0x36c,
-0x36f,0x369,0x372,0x36c,0x372,0x36c,0x372,0x36c,0x36f,0x369,0x372,0x36c,0x372,0x36c,0x372,0x36c,
-0x36f,0x369,0x372,0x36c,0x9de,0x9d8,0x372,0x36c,0x372,0x36c,0x372,0x36c,0x372,0x36c,0xd7a,0xd77,
-0x372,0x36c,0xeb8,0xeb5,0xeb8,0xeb5,0xeb8,0xeb5,0xbee,0xbeb,0xbee,0xbeb,0xbee,0xbeb,0xbee,0xbeb,
-0xbee,0xbeb,0xbee,0xbeb,0xbee,0xbeb,0xbee,0xbeb,0xee5,0xee2,0xee5,0xee2,0xfd5,0xfd2,0xfd5,0xfd2,
-0xfd5,0xfd2,0xfd5,0xfd2,0xfd5,0xfd2,0xfd5,0xfd2,0xfd5,0xfd2,0xfd5,0xfd2,0x113a,0x1137,0x1317,0x1314,
-0x14d3,0x14d0,0x14d3,0x14d0,0x14d3,0x14d0,0x14d3,0x14d0,0xc,0x384,0x384,0x384,0x384,0x384,0x384,0x384,
-0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,0x384,
-0x384,0x384,0x384,0xc,0xc,0x387,0x375,0x375,0x375,0x37b,0x375,0x378,0x18d8,0x37e,0x37e,0x37e,
-0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,
-0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x37e,0x381,
-0x18d8,0x38a,0x9e1,0xc,0xc,0x14a0,0x14a0,0x13bc,0xf,0x951,0x951,0x951,0x951,0x951,0x951,0x951,
-0x951,0x951,0x951,0x951,0x951,0x951,0x951,0x951,0x951,0x951,0xd7d,0x951,0x951,0x951,0x951,0x951,
-0x951,0x951,0x951,0x951,0x951,0x951,0x951,0x951,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,
-0x38d,0x38d,0xebb,0x38d,0x38d,0x38d,0x399,0x38d,0x390,0x38d,0x38d,0x39c,0x954,0xd80,0xd83,0xd80,
-0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,
-0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,0x39f,
-0x39f,0x39f,0x39f,0xf,0xf,0xf,0xf,0x18db,0x39f,0x39f,0x39f,0x396,0x393,0xf,0xf,0xf,
-0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xc96,0xc96,0xc96,0xc96,0x13bf,0x14a3,0xf63,0xf63,
-0xf63,0xf60,0xf60,0xd89,0x897,0xc90,0xc8d,0xc8d,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xf5d,0xf5d,
-0xf5d,0xf5d,0xf5d,0x894,0x149a,0x1aeb,0xd8c,0x89a,0x12de,0x3ba,0x3bd,0x3bd,0x3bd,0x3bd,0x3bd,0x3ba,
-0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0xf66,0xf66,0xf66,0xf66,0xf66,0x89d,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0x915,0x915,0x915,0x915,0x915,0x915,0x915,0x915,0xb28,0xb28,0xb28,0xc84,0xc8a,
-0xc87,0xd86,0xd86,0xd86,0xd86,0xd86,0xd86,0x12db,0x930,0x930,0x930,0x930,0x930,0x930,0x930,0x930,
-0x930,0x930,0x3b4,0x3b1,0x3ae,0x3ab,0xb8b,0xb8b,0x912,0x3ba,0x3ba,0x3c6,0x3ba,0x3c0,0x3c0,0x3c0,
-0x3c0,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x9e7,0x9e7,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0x9e7,0x3bd,0x3ba,0x3bd,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,0x3ba,
-0x3ba,0x3ba,0x3ba,0x9e7,0x3ba,0x3ba,0x3ba,0x3bd,0x933,0x3ba,0x3a5,0x3a5,0x3a5,0x3a5,0x3a5,0x3a5,
-0x3a5,0x3a2,0x3ab,0x3a8,0x3a8,0x3a5,0x3a5,0x3a5,0x3a5,0x3c3,0x3c3,0x3a5,0x3a5,0x3ab,0x3a8,0x3a8,
-0x3a8,0x3a5,0xc93,0xc93,0x3b7,0x3b7,0x3b7,0x3b7,0x3b7,0x3b7,0x3b7,0x3b7,0x3b7,0x3b7,0x9e7,0x9e7,
-0x9e7,0x9e4,0x9e4,0xc93,0x9fc,0x9fc,0x9fc,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f6,0x9f3,
-0x9f6,0x9f3,0x12,0x9ff,0x9f9,0x9ea,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,
-0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,0x9f9,
-0x9f9,0xc99,0xc99,0xc99,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,0x9f0,
-0x9f0,0x9f0,0x9f0,0x9f0,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x9ed,0x12,
-0x12,0xc99,0xc99,0xc99,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,
-0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,
-0xde9,0xde9,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,0xfe7,
-0xfe7,0xfe7,0xfe7,0xfe7,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,0xa05,0xa05,0xa05,0xa05,0xa05,0xa05,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,
-0xa02,0xa02,0xa02,0xa02,0xa02,0xb8e,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
-0x15,0x15,0x15,0x15,0xefd,0xefd,0xefd,0xefd,0xefd,0xefd,0xefd,0xefd,0xefd,0xefd,0xf00,0xf00,
-0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,
-0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xef4,
-0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xef4,0xf03,0xf03,0xef7,0xef7,0xefa,0xf09,0xf06,0x102,
-0x102,0x18ff,0x1902,0x1902,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0xb01,0xb01,0xb04,0xb04,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,0xb01,
-0x6f,0x6f,0x6f,0x6f,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1605,0x1605,0x1605,0x1605,0x1605,
-0x1605,0x1605,0x1605,0x1605,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x163e,0x163e,0x163e,
-0x163e,0x163e,0x163e,0x163e,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x16b,0x16b,0x16b,
+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,
+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,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,
-0x1c5,0x1c5,0x1c5,0x1c5,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1476,0x1476,0x1476,0x1476,0x1476,0x1476,0x1476,0x1476,0x1476,0x1476,0x1aa,0x1aa,
-0x1aa,0x1aa,0x1aa,0x1aa,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48,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,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,
-0x24c,0x24c,0x24c,0x24c,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x194d,0x194d,0x194d,0x194d,0x194d,0x194d,0x194d,0x194d,0x194d,0x194d,0x252,0x252,
-0x252,0x252,0x252,0x252,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1aaf,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,
-0x28e,0x28e,0x28e,0x28e,0x1740,0x1740,0x1740,0x1740,0x20a,0x20a,0x20a,0x20a,0x20a,0x20a,0x20a,0x20a,
-0x20a,0x20a,0x20a,0x20a,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,
-0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,
-0x162c,0x162c,0x162c,0x162c,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x2a3,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,
-0x2a3,0x1bb1,0x1bb1,0x2a3,0x16a4,0x16a4,0x16a4,0x16a4,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,
-0x1f2,0x1f2,0x1f2,0x1f2,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,
-0x2b8,0x2b8,0x2b8,0x2b8,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0xde0,0xde0,0xddd,0xddd,0xddd,0xde0,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5,
+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,0x216,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,
-0x1758,0x1758,0x1758,0x1758,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x17dc,0x17dc,0x222,0x17dc,0x17dc,0x222,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x222,
-0x222,0x222,0x222,0x222,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x273,0x273,
-0x273,0x273,0x1a04,0x19fe,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,
-0x1b81,0x1b81,0x1b81,0x1b81,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0x258,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,
-0x1962,0x1962,0x1962,0x1962,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,
-0x276,0x276,0x276,0x276,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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0x94e,0x94e,3,3,3,3,3,3,3,3,3,3,3,3,
+0,0,0x95d,0x95d,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,3,3,
-3,3,3,3,3,3,0x94e,0x94e,6,6,6,6,6,6,6,6,
+3,3,3,3,3,3,0x95d,0x95d,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,
-0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,0x14a9,0x3e1,0x3f0,0x3f0,0x18,0x3f6,0x3f6,0x3f6,
-0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x18,0x18,0x3f6,0x3f6,0x18,0x18,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,
-0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x18,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,0x3f6,
-0x3f6,0x18,0x3f6,0x18,0x18,0x18,0x3f6,0x3f6,0x3f6,0x3f6,0x18,0x18,0x3e4,0xc9f,0x3e1,0x3f0,
-0x3f0,0x3e1,0x3e1,0x3e1,0x3e1,0x18,0x18,0x3f0,0x3f0,0x18,0x18,0x3f3,0x3f3,0x3e7,0xd92,0x18,
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3e1,0x18,0x18,0x18,0x18,0x3f9,0x3f9,0x18,0x3f9,
-0x3f6,0x3f6,0x3e1,0x3e1,0x18,0x18,0x939,0x939,0x939,0x939,0x939,0x939,0x939,0x939,0x939,0x939,
-0x3f6,0x3f6,0x3ed,0x3ed,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ed,0x3ea,0x1110,0x1839,0x1836,0x18de,0x18,
-0x1b,0xca2,0x3fc,0xca5,0x1b,0x408,0x408,0x408,0x408,0x408,0x408,0x1b,0x1b,0x1b,0x1b,0x408,
-0x408,0x1b,0x1b,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x408,
-0x408,0x1b,0x408,0x408,0x408,0x408,0x408,0x408,0x408,0x1b,0x408,0x40b,0x1b,0x408,0x40b,0x1b,
-0x408,0x408,0x1b,0x1b,0x3ff,0x1b,0x405,0x405,0x405,0x3fc,0x3fc,0x1b,0x1b,0x1b,0x1b,0x3fc,
-0x3fc,0x1b,0x1b,0x3fc,0x3fc,0x402,0x1b,0x1b,0x1b,0xf6f,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
-0x1b,0x40b,0x40b,0x40b,0x408,0x1b,0x40b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x93c,0x93c,
-0x93c,0x93c,0x93c,0x93c,0x93c,0x93c,0x93c,0x93c,0x3fc,0x3fc,0x408,0x408,0x408,0xf6f,0x18e1,0x1b,
-0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1e,0x40e,0x40e,0x417,0x1e,0x41a,0x41a,0x41a,
-0x41a,0x41a,0x41a,0x41a,0xcae,0x41a,0x1e,0x41a,0x41a,0x41a,0x1e,0x41a,0x41a,0x41a,0x41a,0x41a,
-0x41a,0x41a,0x41a,0x41a,0x41a,0x41a,0x41a,0x41a,0x41a,0x1e,0x41a,0x41a,0x41a,0x41a,0x41a,0x41a,
-0x41a,0x1e,0x41a,0x41a,0x1e,0x41a,0x41a,0x41a,0x41a,0x41a,0x1e,0x1e,0x411,0x41a,0x417,0x417,
-0x417,0x40e,0x40e,0x40e,0x40e,0x40e,0x1e,0x40e,0x40e,0x417,0x1e,0x417,0x417,0x414,0x1e,0x1e,
-0x41a,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
-0x41a,0xcae,0xca8,0xca8,0x1e,0x1e,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,
-0x13c2,0xcab,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x16b9,0x183c,0x183c,0x183c,0x183f,0x183f,0x183f,
-0x21,0x41d,0x42c,0x42c,0x21,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x21,0x21,0x432,
-0x432,0x21,0x21,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x432,
-0x432,0x21,0x432,0x432,0x432,0x432,0x432,0x432,0x432,0x21,0x432,0x432,0x21,0xcb1,0x432,0x432,
-0x432,0x432,0x21,0x21,0x420,0x432,0x41d,0x41d,0x42c,0x41d,0x41d,0x41d,0xf72,0x21,0x21,0x42c,
-0x42f,0x21,0x21,0x42f,0x42f,0x423,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x1a49,0x41d,0x41d,
-0x21,0x21,0x21,0x21,0x435,0x435,0x21,0x432,0x432,0x432,0xf72,0xf72,0x21,0x21,0x429,0x429,
-0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x426,0xcb1,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,0x12ea,
-0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x24,0x24,0x438,0x444,0x24,0x444,0x444,0x444,
-0x444,0x444,0x444,0x24,0x24,0x24,0x444,0x444,0x444,0x24,0x444,0x444,0x447,0x444,0x24,0x24,
-0x24,0x444,0x444,0x24,0x444,0x24,0x444,0x444,0x24,0x24,0x24,0x444,0x444,0x24,0x24,0x24,
-0x444,0x444,0x444,0x24,0x24,0x24,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0x444,0xd95,0x444,
-0x444,0x444,0x24,0x24,0x24,0x24,0x438,0x43e,0x438,0x43e,0x43e,0x24,0x24,0x24,0x43e,0x43e,
-0x43e,0x24,0x441,0x441,0x441,0x43b,0x24,0x24,0xf75,0x24,0x24,0x24,0x24,0x24,0x24,0x438,
-0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0xea9,0x945,0x945,0x945,0x945,0x945,
-0x945,0x945,0x945,0x945,0x942,0x942,0x942,0xd65,0xcb4,0xcb4,0xcb4,0xcb4,0xcb4,0xcb7,0xcb4,0x24,
-0x24,0x24,0x24,0x24,0x14ac,0x456,0x456,0x456,0x18e4,0x459,0x459,0x459,0x459,0x459,0x459,0x459,
-0x459,0x27,0x459,0x459,0x459,0x27,0x459,0x459,0x459,0x459,0x459,0x459,0x459,0x459,0x459,0x459,
-0x459,0x459,0x459,0x459,0x459,0x27,0x459,0x459,0x459,0x459,0x459,0x459,0x459,0x459,0x459,0x459,
-0x14af,0x459,0x459,0x459,0x459,0x459,0x27,0x27,0x1aee,0xf7e,0x44a,0x44a,0x44a,0x456,0x456,0x456,
-0x456,0x27,0x44a,0x44a,0x44d,0x27,0x44a,0x44a,0x44a,0x450,0x27,0x27,0x27,0x27,0x27,0x27,
-0x27,0x44a,0x44a,0x27,0xf7e,0xf7e,0x16bc,0x27,0x27,0x1af1,0x27,0x27,0x459,0x459,0xf78,0xf78,
-0x27,0x27,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0x27,0x27,0x27,0x27,
-0x27,0x27,0x27,0x19ad,0xf7b,0xf7b,0xf7b,0xf7b,0xf7b,0xf7b,0xf7b,0xf7b,0x177c,0x14b2,0x462,0x462,
-0x18e7,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x2a,0x468,0x468,0x468,0x2a,0x468,0x468,
-0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x2a,0x468,0x468,
-0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x2a,0x468,0x468,0x468,0x468,0x468,0x2a,0x2a,
-0xcba,0xcbd,0x462,0x45c,0x465,0x462,0x45c,0x462,0x462,0x2a,0x45c,0x465,0x465,0x2a,0x465,0x465,
-0x45c,0x45f,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x45c,0x45c,0x2a,0x2a,0x2a,0x2a,0x2a,
-0x2a,0x1af4,0x468,0x2a,0x468,0x468,0xec1,0xec1,0x2a,0x2a,0x948,0x948,0x948,0x948,0x948,0x948,
-0x948,0x948,0x948,0x948,0x2a,0xec4,0xec4,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
-0x2a,0x2a,0x2a,0x2a,0x1842,0x14b5,0x474,0x474,0x1a4c,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,
-0x47a,0x2d,0x47a,0x47a,0x47a,0x2d,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,
-0x47a,0x47a,0x47a,0x47a,0x474,0x46b,0x46b,0x46b,0xf81,0x2d,0x474,0x474,0x474,0x2d,0x477,0x477,
-0x477,0x46e,0x12f0,0x177f,0x2d,0x2d,0x2d,0x2d,0x1782,0x1782,0x1782,0x46b,0x177f,0x177f,0x177f,0x177f,
-0x177f,0x177f,0x177f,0x16bf,0x47a,0x47a,0xf81,0xf81,0x2d,0x2d,0x471,0x471,0x471,0x471,0x471,0x471,
-0x471,0x471,0x471,0x471,0xf84,0xf84,0xf84,0xf84,0xf84,0xf84,0x177f,0x177f,0x177f,0xf87,0xf8a,0xf8a,
-0xf8a,0xf8a,0xf8a,0xf8a,0x30,0x1a4f,0xa11,0xa11,0x30,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,
-0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0x30,0x30,0x30,0xa17,0xa17,
-0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,
-0xa17,0xa17,0x30,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0x30,0xa17,0x30,0x30,
-0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0x30,0x30,0x30,0xa0b,0x30,0x30,0x30,0x30,0xa08,
-0xa11,0xa11,0xa08,0xa08,0xa08,0x30,0xa08,0x30,0xa11,0xa11,0xa14,0xa11,0xa14,0xa14,0xa14,0xa08,
-0x30,0x30,0x30,0x30,0x30,0x30,0x14b8,0x14b8,0x14b8,0x14b8,0x14b8,0x14b8,0x14b8,0x14b8,0x14b8,0x14b8,
-0x30,0x30,0xa11,0xa11,0xa0e,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
-0x33,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,
-0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,0x495,
-0x495,0x480,0x495,0x492,0x480,0x480,0x480,0x480,0x480,0x480,0x486,0x33,0x33,0x33,0x33,0x47d,
-0x49b,0x49b,0x49b,0x49b,0x49b,0x495,0x498,0x483,0x483,0x483,0x483,0x483,0x483,0x480,0x483,0x489,
-0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x48c,0x48c,0x33,0x33,0x33,0x33,
+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,
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,0x4aa,0x4aa,0x36,
-0x4aa,0x36,0x19b3,0x4aa,0x4aa,0x19b3,0x4aa,0x36,0x19b3,0x4aa,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,
-0x4aa,0x4aa,0x4aa,0x4aa,0x19b3,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x19b3,0x4aa,0x4aa,0x4aa,
-0x36,0x4aa,0x36,0x4aa,0x19b3,0x19b3,0x4aa,0x4aa,0x19b3,0x4aa,0x4aa,0x4aa,0x4aa,0x49e,0x4aa,0x4a7,
-0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x19b0,0x49e,0x49e,0x4aa,0x36,0x36,0x4b3,0x4b3,0x4b3,0x4b3,
-0x4b3,0x36,0x4b0,0x36,0x4a1,0x4a1,0x4a1,0x4a1,0x4a1,0x49e,0x36,0x36,0x4a4,0x4a4,0x4a4,0x4a4,
-0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x36,0x36,0x4ad,0x4ad,0x13c5,0x13c5,0x36,0x36,0x36,0x36,
+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,
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,0x98a,0x98a,0x98a,0x98d,
-0x98a,0x98a,0x98a,0x98a,0x39,0x98a,0x98a,0x98a,0x98a,0x98d,0x98a,0x98a,0x98a,0x98a,0x98d,0x98a,
-0x98a,0x98a,0x98a,0x98d,0x98a,0x98a,0x98a,0x98a,0x98d,0x98a,0x98a,0x98a,0x98a,0x98a,0x98a,0x98a,
-0x98a,0x98a,0x98a,0x98a,0x98a,0x98d,0xa26,0xf96,0xf96,0x39,0x39,0x39,0x39,0x957,0x957,0x95a,
-0x957,0x95a,0x95a,0x963,0x95a,0x963,0x957,0x957,0x957,0x957,0x957,0x984,0x957,0x95a,0x95d,0x95d,
-0x960,0x969,0x95d,0x95d,0x98a,0x98a,0x98a,0x98a,0x12f9,0x12f3,0x12f3,0x12f3,0x957,0x957,0x957,0x95a,
-0x957,0x957,0xa1a,0x957,0x39,0x957,0x957,0x957,0x957,0x95a,0x957,0x957,0x957,0x957,0x95a,0x957,
-0x957,0x957,0x957,0x95a,0x957,0x957,0x957,0x957,0x95a,0x957,0xa1a,0xa1a,0xa1a,0x957,0x957,0x957,
-0x957,0x957,0x957,0x957,0xa1a,0x95a,0xa1a,0xa1a,0xa1a,0x39,0xa23,0xa23,0xa20,0xa20,0xa20,0xa20,
-0xa20,0xa20,0xa1d,0xa20,0xa20,0xa20,0xa20,0xa20,0xa20,0x39,0xf8d,0xa20,0xd98,0xd98,0xf90,0xf93,
-0xf8d,0x1113,0x1113,0x1113,0x1113,0x12f6,0x12f6,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+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,
0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
-0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x3c,0x13cb,
-0x3c,0x3c,0x3c,0x3c,0x3c,0x13cb,0x3c,0x3c,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,
-0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xda7,
-0xa50,0x3f,0xa50,0xa50,0xa50,0xa50,0x3f,0x3f,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0x3f,
-0xa50,0x3f,0xa50,0xa50,0xa50,0xa50,0x3f,0x3f,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xda7,
-0xa50,0x3f,0xa50,0xa50,0xa50,0xa50,0x3f,0x3f,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xda7,0xa50,0x3f,0xa50,0xa50,
-0xa50,0xa50,0x3f,0x3f,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0x3f,0xa50,0x3f,0xa50,0xa50,
-0xa50,0xa50,0x3f,0x3f,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xda7,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0x3f,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xda7,0xa50,0x3f,0xa50,0xa50,0xa50,0xa50,0x3f,0x3f,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xda7,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0x3f,0x3f,0x12fc,0x12fc,0xda1,0xda4,0xa4a,0xa53,0xa47,
-0xa47,0xa47,0xa47,0xa53,0xa53,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa44,0xa44,
-0xa44,0xa44,0xa44,0xa44,0xa44,0xa44,0xa44,0xa44,0xa44,0x3f,0x3f,0x3f,0xa56,0xa56,0xa56,0xa56,
-0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,
-0xa56,0x16c5,0x42,0x42,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x42,0x42,0xa68,0xa6b,0xa6b,0xa6b,
-0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,
-0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa6b,0xa65,0xa62,0x45,0x45,0x45,0xa71,0xa71,0xa71,0xa71,
-0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa6e,0xa6e,0xa6e,0xa71,0xa71,0xa71,0x14bb,0x14bb,0x14bb,
-0x14bb,0x14bb,0x14bb,0x14bb,0x14bb,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0xa92,0xa92,0xa92,0xa92,
-0xa92,0xa92,0xa74,0xa92,0xa92,0xa77,0xa77,0xa77,0xa77,0xa77,0xa77,0xa77,0xa77,0xa77,0xa7a,0xa77,
-0xa89,0xa89,0xa8c,0xa95,0xa83,0xa80,0xa89,0xa86,0xa95,0xcc0,0x4b,0x4b,0xa8f,0xa8f,0xa8f,0xa8f,
-0xa8f,0xa8f,0xa8f,0xa8f,0xa8f,0xa8f,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0xcc3,0xcc3,0xcc3,0xcc3,
-0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0xcc3,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0xaa4,0xaa4,0xb1c,0xb1f,
-0xaaa,0xb19,0xaa7,0xaa4,0xaad,0xabc,0xab0,0xabf,0xabf,0xabf,0xa9b,0x1af7,0xab3,0xab3,0xab3,0xab3,
-0xab3,0xab3,0xab3,0xab3,0xab3,0xab3,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0x18ea,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xa9e,0xfb4,0x4e,0x4e,0x4e,0x4e,0x4e,0x116a,0x116a,0x116a,0x116a,
-0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x51,0x51,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x51,0x51,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x51,0x4da,0x51,0x4da,0x51,0x4da,0x51,0x4da,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x4d7,0x51,0x51,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x51,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4d1,0x4d7,0x4d1,0x4d1,0x4ce,0x4d7,0x4d7,
-0x4d7,0x51,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4ce,0x4ce,0x4ce,0x4d7,0x4d7,0x4d7,0x4d7,
-0x51,0x51,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x51,0x4ce,0x4ce,0x4ce,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4ce,0x4ce,0x4ce,0x51,0x51,0x4d7,0x4d7,
-0x4d7,0x51,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4d4,0x4d1,0x51,0xb94,0xb97,0xb97,0xb97,
-0xfbd,0x54,0x1497,0x1497,0x1497,0x1497,0x4e3,0x4e3,0x4e3,0x4e3,0x4e3,0x4e3,0x52e,0xba9,0x57,0x57,
-0x6c9,0x52e,0x52e,0x52e,0x52e,0x52e,0x534,0x546,0x534,0x540,0x53a,0x6cc,0x52b,0x6c6,0x6c6,0x6c6,
-0x6c6,0x52b,0x52b,0x52b,0x52b,0x52b,0x531,0x543,0x531,0x53d,0x537,0x57,0xdb0,0xdb0,0xdb0,0xdb0,
-0xdb0,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x57,0x57,0x57,0x1afa,0x5a,0x5a,0x5a,
-0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x555,0x555,0x555,0x555,
-0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x555,0x552,0x552,0x552,0x552,0x555,0xacb,0xacb,
-0xbaf,0xbb5,0xbb5,0xbb2,0xbb2,0xbb2,0xbb2,0xdb6,0xec7,0xec7,0xec7,0xec7,0x10fe,0x5d,0x5d,0x5d,
-0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x585,0x585,0x585,0xad4,
-0xed0,0xfc3,0xfc3,0xfc3,0xfc3,0x125d,0x16cb,0x16cb,0x60,0x60,0x60,0x60,0x6f3,0x6f3,0x6f3,0x6f3,
-0x6f3,0x6f3,0x6f3,0x6f3,0x6f3,0x6f3,0x591,0x591,0x58e,0x58e,0x58e,0x58e,0x5b2,0x5b2,0x5b2,0x5b2,
-0x5b2,0xadd,0xadd,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,0x5b5,0x5b5,0x5b5,0x5b5,
-0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
-0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,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,0x69,0xaf8,0xaf8,0xaf8,0xaf8,0xafb,0xaf8,0xaf8,0xaf8,0xaf8,
-0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xafb,
-0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0xafe,0xafe,0xafe,0xafe,
-0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,
-0xafe,0xafe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x72,0x813,0x80d,0x813,
-0x80d,0x813,0x80d,0x813,0x80d,0x813,0x80d,0x80d,0x810,0x80d,0x810,0x80d,0x810,0x80d,0x810,0x80d,
-0x810,0x80d,0x810,0x80d,0x810,0x80d,0x810,0x80d,0x810,0x80d,0x810,0x80d,0x80d,0x80d,0x80d,0x813,
-0x80d,0x813,0x80d,0x813,0x80d,0x80d,0x80d,0x80d,0x80d,0x80d,0x813,0x80d,0x80d,0x80d,0x80d,0x80d,
-0x810,0xc4e,0xc4e,0x72,0x72,0x927,0x927,0x8ee,0x8ee,0x816,0x819,0xc4b,0x75,0x75,0x75,0x75,
-0x75,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,
-0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x10ec,0x18b1,0x1998,
-0x78,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,
-0x82e,0x82e,0x82e,0x78,0x8f7,0x8f7,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,0x8fa,
-0x8fa,0x8fa,0x8fa,0x8fa,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,
-0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,0x837,
-0x837,0xd4a,0xd4a,0x7b,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,
-0xb10,0x7e,0x7e,0x7e,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,
-0xb16,0xb16,0xb16,0xb16,0xb16,0xc57,0xb16,0xb16,0xb16,0xc57,0xb16,0x81,0x81,0x81,0x81,0x81,
-0x81,0x81,0x81,0x81,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,
-0x1191,0x1191,0x1191,0x1191,0x9ae,0x9ae,0x9ae,0x9ae,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
-0x84,0x84,0x84,0x84,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,
-0x1206,0x1206,0x1206,0x1206,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x5fa,0x87,0x87,0x87,0x87,0x87,
-0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x87,0x87,0x87,0x87,
-0x87,0xae9,0x5eb,0x5f1,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x5ee,0x5f1,0x5f1,
-0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x87,0x5f1,0x5f1,0x5f1,0x5f1,
-0x5f1,0x87,0x5f1,0x87,0x5f1,0x5f1,0x87,0x5f1,0x5f1,0x87,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,0x5f1,
-0x5f1,0x5f1,0x5f1,0x5f4,0x606,0x600,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,
-0x603,0x609,0x606,0x600,0x1311,0x1311,0x1afd,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
-0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x606,0x600,0x603,0x609,0x606,0x600,0x606,0x600,0x606,
-0x600,0x606,0x606,0x600,0x600,0x600,0x600,0x603,0x600,0x600,0x603,0x600,0x603,0x603,0x603,0x600,
-0x603,0x603,0x603,0x603,0x8a,0x8a,0x603,0x603,0x603,0x603,0x600,0x600,0x603,0x600,0x600,0x600,
-0x600,0x603,0x600,0x600,0x600,0x600,0x600,0x603,0x603,0x603,0x600,0x600,0x8a,0x8a,0x8a,0x8a,
-0x8a,0x8a,0x8a,0x1afd,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,
-0xb34,0xb34,0xb34,0xb34,0x84f,0x861,0x85e,0x861,0x85e,0xc6c,0xc6c,0xd56,0xd53,0x852,0x852,0x852,
-0x852,0x864,0x864,0x864,0x87c,0x87f,0x88e,0x8d,0x882,0x885,0x891,0x891,0x879,0x870,0x86a,0x870,
-0x86a,0x870,0x86a,0x86d,0x86d,0x888,0x888,0x88b,0x888,0x888,0x888,0x8d,0x888,0x876,0x873,0x86d,
-0x8d,0x8d,0x8d,0x8d,0x612,0x61e,0x612,0xbe8,0x612,0x90,0x612,0x61e,0x612,0x61e,0x612,0x61e,
-0x612,0x61e,0x612,0x61e,0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,
-0x61e,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x61b,
-0x615,0x90,0x90,0x60f,0x750,0x753,0x768,0x76b,0x74a,0x753,0x753,0x96,0x732,0x735,0x735,0x735,
-0x735,0x732,0x732,0x96,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0xaec,0xaec,0xaec,
-0x9b1,0x72c,0x621,0x621,0x96,0x77a,0x759,0x74a,0x753,0x750,0x74a,0x75c,0x74d,0x747,0x74a,0x768,
-0x75f,0x756,0x777,0x74a,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x774,0x765,0x762,
-0x768,0x768,0x768,0x77a,0x73b,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,0x96,0x96,0x96,0x738,0x738,0x738,0x738,0x738,0x738,0x96,0x96,0x738,0x738,
-0x738,0x738,0x738,0x738,0x96,0x96,0x738,0x738,0x738,0x738,0x738,0x738,0x96,0x96,0x738,0x738,
-0x738,0x96,0x96,0x96,0xb37,0xb37,0xb37,0xb37,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
-0x99,0x184e,0x184e,0x184e,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,
-0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0x9c,0x9c,0x9c,0x9c,0x9c,0x1614,0x1614,0x1614,0x1614,
-0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0xb46,0xb46,0xb46,0xb46,
-0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,
-0xb46,0xb46,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0xb52,0xb52,0xb52,0xb52,
-0xb52,0xb52,0xb52,0xa2,0xa2,0xfcf,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,
-0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0x16d1,0x16d1,0x16d1,0x16d1,
-0x16d1,0x16d1,0x16d1,0x16d1,0x16d1,0x1b00,0x1b00,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
-0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xa5,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb6a,0xa5,0xb6a,0xb6a,0xa5,0xa5,0xb6a,0xa5,
-0xa5,0xb6a,0xb6a,0xa5,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb67,0xb67,0xb67,0xb67,0xa5,0xb67,0xa5,0xb67,0xb67,0xb67,0xb67,0xcde,0xb67,0xb67,
-0xa5,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb67,0xb67,0xb67,0xb67,
-0xb6a,0xb6a,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xa5,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xa5,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xa5,0xb6a,0xa5,0xa5,0xa5,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xa5,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xdc8,0xdc8,0xa5,0xa5,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb67,0xb67,0xb67,0xb61,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xedf,0xedc,0xa5,0xa5,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,
-0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xa8,0xb70,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+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,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,
-0xbf7,0xbf7,0xbf7,0xbf7,0xbf7,0x1b06,0xbf7,0xbf7,0xbf7,0xbf7,0xbf1,0xbf1,0xbf4,0x1b03,0xab,0xab,
-0xab,0xab,0xab,0xab,0xab,0xab,0xab,0x1b06,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,
-0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xc00,0xbfa,0xbfa,0xbfd,0xc60,0xc60,0xae,
-0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,
-0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc06,0xc03,0xc03,0xb1,0xb1,0xb1,0xb1,
-0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,
-0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xb4,0xc0c,0xc0c,0xc0c,0xb4,0xc09,0xc09,0xb4,0xb4,0xb4,0xb4,
-0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,
-0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,
-0xcf0,0xcf0,0xcf0,0xcf0,0xcf0,0x14d6,0x14d6,0xb7,0xce1,0xce1,0xce1,0xced,0xced,0xced,0xced,0xce1,
-0xce1,0xced,0xced,0xced,0xb7,0xb7,0xb7,0xb7,0xced,0xced,0xce1,0xced,0xced,0xced,0xced,0xced,
-0xced,0xce4,0xce4,0xce4,0xb7,0xb7,0xb7,0xb7,0xce7,0xb7,0xb7,0xb7,0xcf3,0xcf3,0xcea,0xcea,
-0xcea,0xcea,0xcea,0xcea,0xcea,0xcea,0xcea,0xcea,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,
-0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xcf6,0xba,0xba,0xcf6,0xcf6,0xcf6,0xcf6,
-0xcf6,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0x14d9,0x14d9,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,
-0xbd,0xbd,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0xbd,0x1a52,0x14d9,0x14d9,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,
-0xc0,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,
-0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xc0,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,
-0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xc0,0xd1a,0xd1a,0xc0,0xd1a,
-0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xc0,0xc0,
-0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xc0,0xc0,
+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,
-0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,
-0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xc3,0xc3,0xc3,0xc3,0xc3,
-0xd5c,0xd5c,0xd62,0xc6,0xc6,0xc6,0xc6,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,
-0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,0xd59,
-0xc6,0xc6,0xc6,0xd5f,0xd5f,0xd5f,0xd5f,0xd5f,0xd5f,0xd5f,0xd5f,0xd5f,0xd23,0xd23,0xd23,0xd23,
-0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,
-0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xc9,0xd20,0xd2c,0xd2c,0xd2c,0xd2c,
-0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,
-0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xcc,0xcc,0xd29,0xd29,0xd29,0xd29,
-0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1812,0x1812,0x1812,0x1812,
-0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0xd2f,0xd2f,0xd2f,0xd2f,
-0xd2f,0xd2f,0xcf,0xcf,0xd2f,0xcf,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,
-0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xcf,0xd2f,
-0xd2f,0xcf,0xcf,0xcf,0xd2f,0xcf,0xcf,0xd2f,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,
-0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd2,
-0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,
-0xde3,0xde3,0xde3,0x14dc,0x14dc,0x1788,0x1788,0xd8,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,
-0x10cb,0x10cb,0x10cb,0x10cb,0x1a61,0x129,0x129,0x129,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,
-0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdec,
-0xdec,0xdf2,0xdf2,0xdec,0xdb,0xdb,0xdef,0xdef,0x10fb,0x10fb,0x10fb,0x10fb,0xde,0xde,0xde,0xde,
-0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,
-0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xc5d,0xe07,0xe04,0xe07,0xe04,0xe04,0xdfb,0xdfb,0xdfb,
-0xdfb,0xdfb,0xdfb,0x1146,0x1143,0x1146,0x1143,0x1140,0x1140,0x1140,0x13d4,0x13d1,0xe1,0xe1,0xe1,0xe1,
-0xe1,0xe01,0xdfe,0xdfe,0xdfe,0xdfb,0xe01,0xdfe,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,
-0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe4,
-0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe4,
-0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe4,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe4,
-0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe4,0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,
-0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,0xe0d,
-0xe0d,0xe0d,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xea,0x13d7,
-0xea,0xea,0xea,0xea,0xea,0x13d7,0xea,0xea,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,
-0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe2b,0xe1f,0xe1f,0xe1f,0xed,0xe1f,0xe1f,0xed,
-0xed,0xed,0xed,0xed,0xe1f,0xe1f,0xe1f,0xe1f,0xe2b,0xe2b,0xe2b,0xe2b,0xed,0xe2b,0xe2b,0xe2b,
-0xed,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,
-0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0x18f3,0x18f3,0xed,0xed,0xe1c,0xe1c,0xe1c,0xed,
-0xed,0xed,0xed,0xe22,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0x18f0,0xed,0xed,0xed,
-0xed,0xed,0xed,0xed,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe2e,0xe2e,0xe25,0xed,0xed,0xed,
-0xed,0xed,0xed,0xed,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0x114c,0x114c,
-0xf0,0xf0,0xf0,0xf0,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3d,0xe3d,0xe3d,0xe3a,0xe3a,0xe3d,0xe3a,
-0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,
-0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0x1149,0xf0,0xf0,0xf0,0xe34,0xe34,
-0xe43,0xe43,0xe43,0xe43,0xf3,0xf3,0xf3,0xf3,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,
-0xe40,0xe43,0xe43,0xe43,0xe43,0xe43,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,
-0x14eb,0x14f1,0x14ee,0x1833,0x178e,0x1857,0x1857,0x1857,0x1857,0x1857,0x18f9,0x18f6,0x18fc,0x18f6,0x18fc,0x19b9,
-0x1a55,0x1a55,0x1a55,0x1b18,0x1b18,0x1b12,0x1b0f,0x1b12,0x1b0f,0x1b12,0x1b0f,0x1b12,0x1b0f,0x1b15,0xf6,0xf6,
+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,
-0xe67,0xe67,0xe67,0xe64,0xe64,0xe5b,0xe5b,0xe64,0xe61,0xe61,0xe61,0xe61,0x1a58,0xf9,0xf9,0xf9,
-0x12ba,0x12ba,0x12ba,0x12bd,0x12bd,0x12bd,0x12b4,0x12b4,0x12b7,0x12b4,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d,
-0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0x13e3,0x13e3,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xe6d,
-0x1323,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0x1320,
-0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,0xc30,
-0xe9a,0xe8b,0xe85,0xe97,0xe94,0xe8e,0xe8e,0xe9d,0xe88,0xe91,0xff,0xff,0xff,0xff,0xff,0xff,
-0xf21,0xf21,0xf0c,0xf21,0xf24,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0x1b1b,0x105,0x105,0x105,
-0xf1b,0xf1b,0xf1b,0xf1b,0xf1b,0xf1b,0xf1b,0xf1b,0xf1b,0xf1b,0xf2d,0xf2d,0xf12,0xf18,0xf2d,0xf2d,
-0xf15,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,
-0xf0f,0xf0f,0xf0f,0xf0f,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0x1b1e,0x1b1e,0x105,
-0x1b27,0x1b21,0x19bf,0x19bc,0x19bf,0x19bf,0x19bf,0x1a5e,0x1a5b,0x1a5e,0x1a5b,0x108,0x108,0x108,0x108,0x108,
-0x1b27,0x1b21,0x108,0x1b21,0x108,0x1b21,0x1b27,0x1b21,0x1b27,0x1b21,0x108,0x108,0x108,0x108,0x108,0x108,
-0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x1b24,0x1b24,
-0x1b24,0x1a5e,0x1a5b,0x14fa,0x13ec,0x13ec,0x1326,0x1026,0x1026,0x1026,0x1026,0x1026,0xf3c,0xf3c,0xf3c,0xf3c,
-0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,
-0xf39,0xf39,0xf3f,0xf3f,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0xf48,0xf48,0xf48,0xf48,
-0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,0xf48,
-0xf48,0xf48,0xf42,0xf42,0xf42,0xf42,0x1155,0x1155,0x10e,0x10e,0x10e,0xf45,0x1500,0x1500,0x1500,0x1500,
-0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,
-0x1500,0x1500,0x1500,0x1500,0x1500,0x16e0,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,
+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,0xf51,0xf51,0xf51,0x1506,0x1506,0x1506,0x1506,0x1506,
-0x1506,0x1506,0x1506,0x1506,0x1506,0x1506,0x1506,0x114,0xf4e,0xf4e,0xf4e,0xf4e,0x1503,0x114,0x114,0x114,
-0x114,0x114,0x114,0x114,0x114,0x114,0x114,0x114,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,
-0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0xf54,0x190b,0x190b,0x190b,0x190b,0x190b,0x190b,
-0x190b,0x117,0x117,0x117,0x117,0x117,0x117,0x117,0x104d,0x104d,0x104d,0x104d,0x104a,0x104a,0x104a,0x104a,
-0x104a,0x104a,0x104a,0x104a,0x103b,0x103b,0x103b,0x103b,0x103b,0x103b,0x103b,0x103b,0x104a,0x104a,0x1041,0x103e,
-0x11a,0x11a,0x11a,0x1050,0x1050,0x1044,0x1044,0x1044,0x1047,0x1047,0x1047,0x1047,0x1047,0x1047,0x1047,0x1047,
-0x1047,0x1047,0x11a,0x11a,0x11a,0x104d,0x104d,0x104d,0x1053,0x1053,0x1053,0x1053,0x1053,0x1053,0x1053,0x1053,
-0x1053,0x1053,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,
-0x1068,0x1068,0x106b,0x106b,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,
-0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x1092,0x1092,0x1092,0x1092,0x108c,0x1794,0x120,0x120,
-0x120,0x120,0x120,0x120,0x120,0x120,0x1098,0x1098,0x108f,0x108f,0x108f,0x108f,0x108f,0x108f,0x108f,0x108f,
-0x108f,0x108f,0x120,0x120,0x120,0x120,0x120,0x120,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10aa,
-0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10b0,0x10b3,0x123,0x123,0x123,0x123,
-0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x10ad,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,
-0x10c5,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10c2,0x10c2,0x10b9,0x10b9,0x10c2,0x10c2,0x10b9,0x10b9,0x126,
-0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x10c5,0x10c5,0x10c5,0x10b9,0x10c5,0x10c5,0x10c5,0x10c5,
-0x10c5,0x10c5,0x10c5,0x10c5,0x10b9,0x10c2,0x126,0x126,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,
-0x10bf,0x10bf,0x126,0x126,0x10bc,0x10c8,0x10c8,0x10c8,0x1512,0x129,0x129,0x129,0x129,0x129,0x129,0x129,
+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,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,
-0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,
-0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10d1,0x12c,0x12c,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,
-0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,
-0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x12f,0x12f,0x12f,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,
-0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x132,0x132,0x132,0x132,0x132,0x132,0x132,
-0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,
-0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,
-0x10dd,0x10dd,0x135,0x135,0x135,0x135,0x135,0x10da,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,
-0x10e0,0x10e0,0x10e0,0x10e0,0x138,0x138,0x138,0x138,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,
-0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x13b,0x13b,0x13b,0x13b,
-0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x115b,0x115b,0x115b,0x115b,0x1164,0x115b,0x115b,0x115b,
-0x1164,0x115b,0x115b,0x115b,0x115b,0x1158,0x13e,0x13e,0x1161,0x1161,0x1161,0x1161,0x1161,0x1161,0x1161,0x1167,
-0x1161,0x1167,0x1161,0x1161,0x1161,0x1167,0x1167,0x13e,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,
-0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x141,0x141,
-0x141,0x141,0x141,0x141,0x141,0x141,0x141,0x141,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,
-0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1182,0x116d,0x1182,
-0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x116d,0x144,0x1176,0x117f,0x116d,0x117f,0x117f,0x116d,0x116d,0x116d,
-0x116d,0x116d,0x116d,0x116d,0x116d,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x116d,0x116d,0x1173,0x1173,0x1173,
-0x1173,0x1173,0x1173,0x1173,0x1173,0x144,0x144,0x1170,0x117c,0x117c,0x117c,0x117c,0x117c,0x117c,0x117c,0x117c,
-0x117c,0x117c,0x144,0x144,0x144,0x144,0x144,0x144,0x117c,0x117c,0x117c,0x117c,0x117c,0x117c,0x117c,0x117c,
-0x117c,0x117c,0x144,0x144,0x144,0x144,0x144,0x144,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1188,
-0x118b,0x118b,0x118b,0x118b,0x1179,0x1179,0x144,0x144,0x1551,0x1551,0x1551,0x1551,0x1551,0x1551,0x1551,0x1551,
-0x1551,0x1551,0x1551,0x1551,0x1551,0x1551,0x154e,0x1a73,0x12cf,0x12a8,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,0x12c6,
-0x12c6,0x12ae,0x12ab,0x12a2,0x12a2,0x12cc,0x12a2,0x12a2,0x12a2,0x12a2,0x12b1,0x148b,0x1491,0x148e,0x148e,0x18d2,
-0x16a7,0x16a7,0x1a40,0x147,0x147,0x147,0x147,0x147,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,
-0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x1197,0x1197,0x119a,0x11a3,0x119d,0x119d,0x119d,0x11a3,
-0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,
-0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,0x1293,
-0x1293,0x1293,0x1293,0x1293,0x1293,0x150,0x150,0x150,0x11c1,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b8,
-0x11c7,0x11c7,0x11b5,0x11b5,0x11b5,0x11b5,0x153,0x12c3,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,
-0x11bb,0x11bb,0x153,0x153,0x153,0x153,0x11b5,0x11b5,0x11e5,0x11d9,0x11e5,0x156,0x156,0x156,0x156,0x156,
+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,0x11e2,0x11e2,0x11e8,0x11dc,0x11df,0x11fd,0x11fd,0x11fd,0x11f7,0x11f7,0x11ee,0x11f7,0x11f7,
-0x11ee,0x11f7,0x11f7,0x1200,0x11fa,0x11f1,0x159,0x159,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,0x11f4,
-0x11f4,0x11f4,0x159,0x159,0x159,0x159,0x159,0x159,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x1206,0x15c,
-0x15c,0x15c,0x15c,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,
-0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,0x1203,
-0x15c,0x15c,0x15c,0x15c,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,
-0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x15f,0x120c,0x1209,0x1209,0x1209,0x1209,
-0x1209,0x1209,0x1209,0x1209,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,
-0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x162,0x162,0x162,0x1218,0x121b,0x121b,
-0x121b,0x121b,0x121b,0x121b,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,
-0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x165,0x165,0x1221,0x1221,0x1221,0x1221,
-0x1221,0x1221,0x1221,0x1221,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,
-0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x168,0x168,0x168,0x168,0x168,0x1227,0x1227,0x1227,0x1227,
-0x1227,0x1227,0x1227,0x1227,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,
-0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,
-0x1230,0x1230,0x1230,0x16e,0x124b,0x124b,0x1b2a,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,
-0x171,0x1914,0x171,0x171,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,
-0x146a,0x146a,0x146a,0x146a,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,
-0x1251,0x1251,0x1251,0x174,0x19e3,0x19e3,0x19e3,0x19e3,0x19e3,0x19e3,0x19e3,0x19e6,0x19e0,0x26a,0x26a,0x26a,
-0x26a,0x26a,0x26a,0x26a,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,
-0x1815,0x1a64,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,
+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,
+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,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,
-0x129c,0x1395,0x1395,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,
-0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,0x1299,
-0x1299,0x1299,0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1818,0x17a,0x17a,0x17a,0x17a,
-0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x1296,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,
-0x13b9,0x13b9,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,
-0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,
-0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,
-0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,
-0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,0x133b,
-0x133b,0x1335,0x1335,0x1335,0x17d,0x17d,0x1338,0x17d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x133e,0x1347,
-0x1341,0x1341,0x1347,0x1347,0x1347,0x1341,0x1347,0x1341,0x1341,0x1341,0x134a,0x134a,0x180,0x180,0x180,0x180,
-0x180,0x180,0x180,0x180,0x1344,0x1344,0x1344,0x1344,0x183,0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x183,
-0x183,0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x183,0x183,0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x183,
-0x183,0x183,0x183,0x183,0x183,0x183,0x183,0x183,0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x183,
-0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x1350,0x183,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,
-0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1356,0x1368,
-0x1368,0x135c,0x135c,0x135c,0x135c,0x135c,0x186,0x186,0x186,0x186,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,
-0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x1359,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,
-0x135f,0x135f,0x135f,0x135f,0x1b30,0x1b33,0x1b33,0x1b2d,0x1b2d,0x1b33,0x186,0x186,0x186,0x186,0x186,0x186,
-0x186,0x186,0x186,0x1521,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,
-0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x189,0x189,0x189,
-0x189,0x189,0x189,0x189,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,
-0x136e,0x136e,0x136e,0x18c,0x18c,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,
-0x136e,0x136e,0x136e,0x1524,0x18c,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,
-0x136e,0x136e,0x136e,0x139e,0x18c,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,0x136e,
-0x136e,0x136e,0x136e,0x136e,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,
-0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x1524,0x18c,0x18c,0x18c,0x18c,0x18c,0x18c,
-0x18c,0x18c,0x18c,0x18c,0x13b3,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,
-0x169e,0x1530,0x1530,0x1530,0x1770,0x1821,0x1821,0x185a,0x185a,0x1a22,0x1acd,0x1acd,0x18f,0x18f,0x18f,0x18f,
-0x18f,0x1b9c,0x1b9c,0x1b9c,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x1530,0x169b,
-0x169b,0x18f,0x18f,0x18f,0x1530,0x1530,0x1530,0x1530,0x1821,0x1821,0x1821,0x18bd,0x18bd,0x199e,0x1a22,0x1acd,
-0x1acd,0x18f,0x18f,0x18f,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,
-0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,
-0x192,0x192,0x192,0x192,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,
-0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,
-0x140d,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x195,0x140d,0x195,0x195,0x140d,0x195,0x140d,0x140d,0x140d,
-0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,0x195,0x140d,
-0x195,0x195,0x195,0x195,0x195,0x195,0x140d,0x195,0x195,0x195,0x195,0x140d,0x195,0x140d,0x195,0x140d,
-0x195,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x195,0x140d,0x195,0x195,0x140d,0x195,0x140d,0x195,0x140d,
-0x195,0x140d,0x195,0x140d,0x195,0x140d,0x140d,0x195,0x140d,0x195,0x195,0x140d,0x140d,0x140d,0x140d,0x195,
-0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x140d,
-0x140d,0x195,0x140d,0x195,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,
-0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,
-0x195,0x195,0x195,0x195,0x195,0x140d,0x140d,0x140d,0x195,0x140d,0x140d,0x140d,0x140d,0x140d,0x195,0x140d,
-0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,0x140d,
-0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,
-0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,
-0x140a,0x140a,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195,
-0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1410,0x1410,0x1410,0x1410,0x1410,0x141f,0x1410,0x1413,0x1413,
-0x1410,0x1410,0x1410,0x1416,0x1416,0x198,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,
-0x1419,0x1425,0x1425,0x1425,0x1920,0x191d,0x191d,0x1a6a,0x198,0x198,0x198,0x198,0x198,0x198,0x198,0x198,
-0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,
-0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x1431,0x142e,0x1428,0x1428,0x142e,0x142e,
-0x1437,0x1437,0x1431,0x1434,0x1434,0x142e,0x142b,0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,0x19b,
-0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,
-0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x143a,0x19e,0x19e,0x19e,0x19e,0x16f5,0x16f5,0x143a,0x143a,
-0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,
-0x19e,0x19e,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,
-0x1446,0x1446,0x1446,0x1446,0x1446,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x1a1,0x1a1,0x1a1,0x1a1,0x19c5,
-0x1446,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,
-0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x19c8,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1440,
-0x1440,0x1440,0x1440,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,0x1449,
-0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x146a,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,
-0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,
-0x146d,0x146d,0x146d,0x146d,0x146d,0x146d,0x146d,0x146d,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,
-0x12c9,0x12c6,0x12c9,0x12a5,0x12c6,0x12cc,0x12cc,0x12cf,0x12cc,0x12cf,0x12d2,0x12c6,0x12cf,0x12cf,0x12c6,0x12c6,
-0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x1470,0x1479,0x1470,0x1479,0x1479,
-0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x147c,0x1473,0x19ce,0x1b3f,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,
-0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1ad,0x1ad,
-0x153f,0x153f,0x153f,0x153f,0x153f,0x1545,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,
-0x154b,0x154b,0x154b,0x154b,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1548,
-0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x2b5,0x1b8a,0x1b8a,0x1b8a,0x1b8a,
-0x16aa,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,0x1b3,0x1b3,0x1b3,0x1b3,
-0x1a73,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b45,0x1b42,0x1b42,0x1b42,0x1b6,
-0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,
-0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,
-0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,
-0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x1b9,0x1b9,0x1b9,
-0x1b9,0x1b9,0x1b9,0x1b9,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x1b9,0x1b9,
-0x155a,0x1554,0x1557,0x1560,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1bc,0x1bc,0x1bc,0x1bc,
-0x1bc,0x1bc,0x1bc,0x1bc,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,
-0x154b,0x154b,0x154b,0x154b,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,
-0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1923,0x1923,0x1923,0x1923,0x1bf,0x1bf,0x1bf,
-0x1bf,0x1bf,0x1bf,0x1bf,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,
-0x1bf,0x1bf,0x1bf,0x1bf,0x1b9f,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,
-0x1bf,0x1bf,0x1bf,0x1bf,0x170a,0x16ad,0x156f,0x16b3,0x1c2,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,
-0x1578,0x1c2,0x1c2,0x1578,0x1578,0x1c2,0x1c2,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,
-0x1578,0x1578,0x1578,0x1578,0x1578,0x1c2,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1c2,0x1578,0x1578,
-0x1c2,0x1578,0x1578,0x1578,0x1578,0x1578,0x1c2,0x19aa,0x16b0,0x1578,0x1569,0x156f,0x1569,0x156f,0x156f,0x156f,
-0x156f,0x1c2,0x1c2,0x156f,0x156f,0x1c2,0x1c2,0x1572,0x1572,0x1575,0x1c2,0x1c2,0x170d,0x1c2,0x1c2,0x1c2,
-0x1c2,0x1c2,0x1c2,0x1569,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x157b,0x1578,0x1578,0x1578,0x1578,0x156f,0x156f,
-0x1c2,0x1c2,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x1c2,0x1c2,0x1c2,0x156c,0x156c,0x156c,0x156c,
-0x156c,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1590,0x1590,0x1590,0x1590,
-0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1c5,0x1590,
-0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x1590,0x158a,0x158a,0x158a,0x157e,
-0x157e,0x157e,0x158a,0x158a,0x157e,0x158d,0x1581,0x157e,0x1593,0x1593,0x1587,0x1593,0x1593,0x1584,0x17a3,0x1c5,
-0x15a2,0x15a2,0x15a2,0x1596,0x1596,0x1596,0x1596,0x1596,0x1596,0x1599,0x159c,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,
-0x159f,0x159f,0x159f,0x159f,0x159f,0x159f,0x159f,0x159f,0x159f,0x159f,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,
-0x1710,0x1710,0x1710,0x1710,0x15ae,0x15ab,0x19d1,0x19d1,0x1a79,0x1a7c,0x1a76,0x1a76,0x1cb,0x1cb,0x1cb,0x1cb,
-0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,
-0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,
-0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,
-0x15c0,0x15c0,0x15c0,0x15b7,0x15ba,0x15bd,0x15c0,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,
-0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15c3,0x15c3,0x1d4,0x1d4,0x1d4,0x1d4,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,
-0x15cc,0x15cc,0x16b6,0x15cc,0x15cc,0x15cc,0x15c9,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,
-0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x1d7,0x1d7,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,
-0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,
-0x15db,0x15ed,0x15ed,0x15e1,0x15ea,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,
-0x15e4,0x15e4,0x15e4,0x15e4,0x15e4,0x15e4,0x15e4,0x15e4,0x15e4,0x15e4,0x1da,0x1da,0x1da,0x1da,0x1da,0x1da,
-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,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x1dd,
-0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x1dd,0x1dd,0x1dd,0x1dd,0x15f6,0x15f6,
-0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,
-0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,0x15f9,0x1602,0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,
-0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15ff,0x15ff,0x15ff,0x15ff,0x15ff,0x1e0,
-0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,
-0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1608,0x1e3,
-0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,
-0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1611,0x1611,0x1611,0x1611,0x1611,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,
-0x162c,0x162c,0x162f,0x162f,0x1632,0x1623,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,
-0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1e9,0x1623,0x1623,0x1623,0x1623,0x1623,
-0x1623,0x1623,0x1e9,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,
-0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x162c,0x162c,0x162c,
-0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,
-0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,
-0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,0x1644,
-0x1644,0x1644,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1641,0x1641,0x1641,0x1641,0x1ef,0x1ef,0x1ef,
-0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x1647,
-0x1659,0x1659,0x1647,0x1647,0x1647,0x1647,0x1f5,0x1f5,0x1659,0x1659,0x165c,0x165c,0x1647,0x1647,0x1659,0x164d,
-0x164a,0x1650,0x1662,0x1662,0x1653,0x1653,0x1656,0x1656,0x1656,0x1662,0x1719,0x1719,0x1719,0x1719,0x1719,0x1719,
-0x1719,0x1719,0x1719,0x1719,0x1719,0x1719,0x1719,0x1719,0x1716,0x1716,0x1716,0x1716,0x1713,0x1713,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,
-0x1f8,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,
-0x1665,0x1665,0x1665,0x1665,0x1665,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,
-0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1fb,0x1fb,0x1fb,0x1fb,
-0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,
-0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,
-0x1668,0x1668,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,
-0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,
-0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1fb,0x1fb,0x1a7f,0x1a7f,0x1fb,0x1fb,
-0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,
-0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,
-0x166b,0x167a,0x1671,0x166e,0x1680,0x1680,0x1674,0x1680,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,
-0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,
-0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1683,0x1683,0x1683,0x1683,0x1683,0x1683,
-0x1683,0x1683,0x1683,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x168c,
-0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,
-0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x172e,0x1926,0x204,0x204,0x171c,0x171c,0x171c,
-0x1728,0x1728,0x171c,0x171c,0x171c,0x171c,0x172b,0x171c,0x171c,0x171c,0x171c,0x171f,0x204,0x204,0x204,0x204,
-0x1725,0x1725,0x1725,0x1725,0x1725,0x1725,0x1725,0x1725,0x1725,0x1725,0x1722,0x1722,0x1731,0x1731,0x1731,0x1722,
-0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,
-0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,
-0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,
-0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x20d,0x1746,0x1746,0x20d,0x20d,
-0x20d,0x20d,0x20d,0x1743,0x1743,0x1743,0x1743,0x1743,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x210,
-0x1749,0x210,0x1749,0x1749,0x1749,0x1749,0x210,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,
-0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x210,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,0x1749,
-0x1749,0x174c,0x210,0x210,0x210,0x210,0x210,0x210,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,
-0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,
-0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x213,0x213,0x213,0x213,0x213,
-0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,
-0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x213,0x213,0x213,0x213,0x213,
-0x213,0x213,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x175b,0x175b,0x175b,0x175b,0x1758,0x175b,0x175b,0x175e,
-0x1761,0x175e,0x175e,0x175b,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,
-0x216,0x216,0x216,0x1758,0x1758,0x1758,0x1758,0x1758,0x17b8,0x17b8,0x17b8,0x17b8,0x17af,0x17af,0x17af,0x17a9,
-0x17ac,0x17ac,0x17ac,0x19d4,0x219,0x219,0x219,0x219,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,0x17b5,
-0x17b5,0x17b5,0x219,0x219,0x219,0x219,0x17b2,0x17b2,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,
-0x17d3,0x21c,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,
-0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d3,0x17d0,0x17be,0x17be,0x17be,0x17be,
-0x17be,0x17be,0x17be,0x21c,0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x17d0,0x17c1,0x17d3,0x17d6,0x17d6,0x17ca,
-0x17c7,0x17c7,0x21c,0x21c,0x21c,0x21c,0x21c,0x21c,0x21c,0x21c,0x21c,0x21c,0x17cd,0x17cd,0x17cd,0x17cd,
-0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,
-0x17c4,0x17c4,0x17c4,0x17c4,0x17c4,0x21c,0x21c,0x21c,0x17e2,0x17e5,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,
-0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,
-0x17d9,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,
-0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x222,
-0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,
-0x17dc,0x222,0x222,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x182a,0x18c6,0x1a2e,0x1a31,0x1ad9,0x225,0x225,0x225,
-0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x1ad6,0x1ad6,0x225,0x225,0x225,0x225,0x225,0x225,
-0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,
-0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x228,0x228,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,
-0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x228,0x17e8,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,
-0x17df,0x17e8,0x17df,0x17df,0x17e8,0x17df,0x17df,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,
-0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x22b,0x22b,0x22b,
+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,
+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,
-0x1806,0x1806,0x17f7,0x17f1,0x17f1,0x1806,0x17f4,0x1809,0x1809,0x1809,0x1809,0x180c,0x180c,0x1800,0x17fd,0x17fa,
-0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1a82,0x1800,0x22e,0x17fa,0x1929,0x19d7,
-0x1a85,0x1a85,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,
-0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,
-0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,
-0x1812,0x1812,0x1812,0x1812,0x231,0x231,0x231,0x231,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,0x231,0x231,0x231,0x231,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,
-0x182d,0x182d,0x182d,0x182d,0x182d,0x19a7,0x19a7,0x19a7,0x19a7,0x19a7,0x1a34,0x1a34,0x1a34,0x1a34,0x1a34,0x1a34,
-0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x1ba8,0x1ba8,0x1ba8,0x237,0x237,0x237,0x237,0x237,
-0x237,0x237,0x237,0x237,0x237,0x237,0x237,0x237,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,
-0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x23a,
-0x186c,0x186c,0x23a,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,
-0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x186c,0x1860,0x1860,0x1860,0x1860,0x1860,0x1860,0x23a,
-0x23a,0x23a,0x1860,0x23a,0x1860,0x1860,0x23a,0x1860,0x1860,0x1860,0x1863,0x1860,0x1866,0x1866,0x186f,0x1860,
-0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x1869,0x1869,0x1869,0x1869,0x1869,0x1869,0x1869,0x1869,
-0x1869,0x1869,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,
-0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,
-0x18cf,0x18cf,0x18cf,0x18cf,0x23d,0x23d,0x23d,0x23d,0x187e,0x1881,0x1881,0x240,0x240,0x240,0x240,0x240,
-0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,
-0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1890,0x1890,0x1890,0x1890,0x1890,0x1890,0x1890,0x1890,
-0x1890,0x1890,0x1890,0x243,0x243,0x243,0x243,0x243,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,
-0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x189c,0x189f,0x18ae,0x18ae,0x189f,0x18a2,0x189c,0x1899,
-0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x1887,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1884,
-0x1884,0x1872,0x1872,0x1872,0x1887,0x1887,0x1887,0x1887,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,
-0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x249,0x249,0x249,0x249,
-0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,
-0x192f,0x192f,0x192f,0x192f,0x192f,0x192f,0x249,0x249,0x1a3d,0x1a3d,0x1a3d,0x1a3d,0x1adf,0x27c,0x27c,0x27c,
-0x1a3d,0x1a3d,0x1a3d,0x1bab,0x1bab,0x27c,0x27c,0x27c,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,
-0x1941,0x1941,0x1941,0x1941,0x193e,0x193e,0x193e,0x1932,0x1932,0x1932,0x1932,0x1932,0x1932,0x1932,0x1932,0x1932,
-0x193e,0x1938,0x1935,0x193b,0x24c,0x24c,0x24c,0x24c,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,
-0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,
-0x1944,0x1944,0x1944,0x24f,0x24f,0x1944,0x1944,0x1944,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x252,0x1953,
-0x1953,0x252,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,
-0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1950,0x1950,0x1950,0x1950,0x1950,0x252,
-0x1947,0x1947,0x252,0x1950,0x1950,0x1947,0x1950,0x194a,0x1953,0x252,0x252,0x252,0x252,0x252,0x252,0x252,
-0x195c,0x195c,0x195f,0x195f,0x1956,0x1956,0x1956,0x1956,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,
-0x1959,0x1959,0x1959,0x1959,0x1959,0x1959,0x1959,0x1959,0x1959,0x1959,0x255,0x255,0x255,0x255,0x255,0x255,
-0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1965,0x1962,0x1962,0x1962,
-0x1965,0x1962,0x1962,0x1962,0x1962,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,
-0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,
-0x196e,0x196e,0x196e,0x1968,0x1968,0x196b,0x196b,0x1971,0x1971,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,
-0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,
-0x1974,0x1974,0x1974,0x1974,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,
-0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,
-0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x1977,0x197a,0x1983,0x1977,0x1977,0x261,0x261,0x261,0x261,0x261,
-0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1989,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,
-0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,
-0x1992,0x1992,0x198c,0x198c,0x198c,0x198c,0x198c,0x198c,0x198c,0x198c,0x198c,0x198c,0x198c,0x198f,0x198f,0x198f,
-0x198f,0x1995,0x1995,0x1995,0x1995,0x1995,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,
-0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,
-0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x1b72,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,
-0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x19e9,0x26d,
-0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,
-0x270,0x270,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,
-0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f8,0x19f5,0x19f5,0x19f5,0x19ec,0x19ec,0x19ec,0x19ec,
-0x270,0x270,0x19ec,0x19ec,0x19f5,0x19f5,0x19f5,0x19f5,0x19ef,0x19f8,0x19f2,0x19f8,0x19f5,0x270,0x270,0x270,
-0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,
-0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,
-0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x273,0x273,0x273,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x1a04,
-0x1a04,0x1a04,0x1a04,0x1a04,0x1a07,0x1a07,0x273,0x273,0x276,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,
+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,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x276,0x276,0x279,0x279,0x279,0x279,
-0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1a37,0x1a37,0x1a37,0x279,
-0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1a3a,0x1a3a,0x1a3a,0x1a3a,
-0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,
-0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x1a3d,0x1a3d,0x1a3d,0x1adf,0x1adf,0x1adf,0x1adf,0x27c,
-0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x1a3d,0x1a3d,0x1a3d,0x1a3d,0x1a3d,0x1a3d,0x1adf,0x1adf,
-0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1bab,0x1bab,0x1bab,0x1bab,0x27c,0x27c,0x27c,
-0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1bab,0x1bab,0x1bab,0x1bab,0x27c,0x27c,0x27c,0x27c,0x27c,
-0x1adf,0x1adf,0x1adf,0x1bae,0x1bae,0x1bae,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,
-0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1adf,0x1bab,0x1bab,0x1bab,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,
-0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,
-0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,
-0x1a13,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,
-0x1a0d,0x1a0d,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x1a10,
-0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a16,0x1a16,0x1a16,0x1a16,
-0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x282,0x282,0x282,0x282,0x282,0x1a19,
-0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a88,0x1a88,0x1a88,0x1a88,0x1a88,0x1a88,0x1a88,0x285,0x285,0x285,0x285,
-0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,
-0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x288,0x288,0x1aa6,0x288,0x288,0x1aa6,0x1aa6,0x1aa6,0x1aa6,
-0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x288,0x1aa6,0x1aa6,0x288,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,
-0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1aa6,0x1a8e,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x288,0x1a9d,
-0x1aa0,0x288,0x288,0x1a8e,0x1a8e,0x1aa3,0x1a94,0x1aa9,0x1a9d,0x1aa9,0x1a9d,0x1a91,0x1aac,0x1a97,0x1aac,0x288,
-0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,
-0x1a9a,0x1a9a,0x288,0x288,0x288,0x288,0x288,0x288,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,
-0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x28b,0x28b,
-0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,
-0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,
-0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,
-0x1ab2,0x1ab2,0x1ab2,0x291,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,
-0x1ab2,0x1ab2,0x1ab2,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,
-0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x1ab5,0x1ab5,0x1ab5,0x1ab5,0x1ab5,0x1ab5,0x1ab5,0x1ab5,
-0x1ab5,0x1ab5,0x291,0x291,0x291,0x291,0x291,0x291,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,
-0x1ae8,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,
-0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,
-0x294,0x294,0x294,0x294,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x297,0x1ab8,
-0x1ab8,0x1abb,0x297,0x297,0x1abe,0x1abe,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297,
-0x297,0x297,0x297,0x297,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b51,0x1b4e,0x1b51,0x1b51,0x1b51,
-0x1b51,0x1b51,0x1b51,0x29a,0x1b54,0x1b54,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x1b4b,0x1b4b,0x1b4b,0x1b4b,
-0x1b4b,0x1b4b,0x1b4b,0x1b4b,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,
-0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b57,0x1b57,0x29d,0x29d,0x29d,0x29d,0x29d,0x29d,0x29d,0x29d,0x29d,
-0x29d,0x29d,0x29d,0x29d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x2a0,0x1b5d,0x1b5d,0x1b5d,0x1b5d,
-0x2a0,0x1b5d,0x1b5d,0x2a0,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,
-0x1b5d,0x1b5d,0x1b5d,0x2a0,0x1b60,0x1b66,0x1b66,0x1b63,0x1b63,0x1b63,0x2a6,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,
-0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,
-0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x2a6,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x2a6,
-0x2a6,0x2a6,0x2a6,0x2a6,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b6c,0x1b69,
-0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,
-0x1b69,0x1b69,0x1b69,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,
-0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,
-0x2a9,0x2a9,0x2a9,0x2a9,0x1b72,0x1b72,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b75,0x1b75,0x1b75,0x1b75,0x2ac,0x2ac,
-0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,
-0x2ac,0x2ac,0x2ac,0x2ac,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,
-0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,
-0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,
-0x1b7b,0x1b7b,0x1b7b,0x2af,0x1b78,0x1b78,0x1b78,0x1b78,0x1b78,0x1b78,0x1b78,0x1b78,0x1b78,0x1b78,0x2af,0x2af,
-0x2af,0x2af,0x2af,0x2af,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,
-0x1542,0x1542,0x1542,0x1542,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,
-0x1b81,0x1b81,0x1b7e,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,
-0x2b2,0x2b2,0x2b2,0x2b2,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x2b5,
-0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x2b5,0x1b8a,0x1b8a,0x2b5,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,
-0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x2b5,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,
-0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x2b5,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x2b5,0x1b87,
-0x1b87,0x2b5,0x2b5,0x2b5,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,
-0x1b90,0x1b90,0x2b8,0x2b8,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,
-0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,
+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,
+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,
+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,
-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,
-0x18c9,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,
-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,0x94e,0x94e,
-0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,
-0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,
-0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0x128d,0x128d,0x128d,0x2be,0x2be,
-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,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,
+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,0x2be,0x2be,0x2be,0x2be,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,0x2c1,0x2c1,0x129f,0x129f,0x129f,0x129f,
-0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,
-0x129f,0x1b99,0x1b99,0x1b99,0x1b99,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,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,0x2c7,0x2c7,0x1773,0x1773,0x2ca,0x2ca,
-0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x18c9,0x18c9,0x18c9,0x18c9,
-0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x3d8,0x3cc,0x3cc,0x3cc,
-0x3cc,0x3cc,0x3cc,0x3cc,0x3cc,0x3d8,0x3d8,0x3d8,0x3d8,0x3d2,0x110a,0x12e4,0x3db,0x918,0x91b,0x3c9,
-0x3c9,0x1107,0x12e1,0x12e1,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x3de,0x1107,0x3cc,0x3cc,0x3d8,
-0xc9c,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,
-0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3cc,0x3cc,
-0x8a0,0x8a3,0x936,0x936,0x936,0x936,0x936,0x936,0x936,0x936,0x936,0x936,0x3d5,0xf6c,0xf69,0x12e7,
-0x12e7,0x12e7,0x12e7,0x12e7,0x14a6,0x110d,0x110d,0xebe,0xebe,0xd8f,0xebe,0xebe,0x3db,0x3db,0x3db,0x3db,
-0x3db,0x3db,0x3db,0x3db,0x3db,0x3de,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3de,0x3db,0x3db,
-0x3de,0x3db,0x3db,0x3db,0x3db,0x3db,0x12e1,0x12e4,0x3cf,0x3db,0x3d8,0x3d8,0x47a,0x47a,0x47a,0x47a,
-0x47a,0x47a,0x47a,0x47a,0x47a,0x12ed,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,
-0x47a,0x47a,0x47a,0x47a,0x47a,0x47a,0x12ed,0x1845,0x1845,0xf8a,0x46b,0x474,0x4b6,0x4b6,0x4b6,0x4b6,
-0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,0x4b6,
-0x4b6,0x4b6,0x4b6,0xb91,0xb91,0xd9b,0xd9b,0x8a6,0xd9e,0x13c8,0x13c8,0x13c8,0x4b9,0x4b9,0x4b9,0x4b9,
-0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,
-0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4bf,0x4bf,0x4bf,0x1122,
-0x1122,0x1122,0x1122,0x1122,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,
-0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,
-0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x4bc,0x111f,0x111f,0x111f,0x111f,0x111f,0x111f,0x4c2,0x4bf,0x4bf,0x4bf,
-0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,
-0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,
-0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,
-0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,
-0x4cb,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c8,0x990,0xfb7,0xfb7,0xfba,0xfb7,0x4cb,0x4c5,0x4cb,0x4c5,
-0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,
-0x4cb,0x4c5,0x4cb,0x4c5,0x4cb,0x4c5,0xfba,0xfb7,0xfba,0xfb7,0xfba,0xfb7,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4d7,0x4d7,0x4d7,0x4d7,
-0x4d7,0x4d7,0x4d7,0x4d7,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x4da,0x696,0x696,0x699,0x4f5,
-0x6a5,0x6a2,0x6a2,0x69f,0x51f,0x51f,0x4dd,0x4dd,0x4dd,0x4dd,0x4dd,0xb22,0x6a8,0x501,0x6c0,0x6c3,
-0x516,0x6a8,0x504,0x504,0x4f5,0x510,0x510,0x696,0x51c,0x519,0x69c,0x4ef,0x4e6,0x4e6,0x4e9,0x4e9,
-0x4e9,0x4e9,0x4e9,0x4ec,0x4e9,0x4e9,0x4e9,0x4e0,0x528,0x525,0x522,0x522,0x6b4,0x50a,0x507,0x6b1,
-0x6ae,0x6ab,0x6bd,0x4f8,0x6ba,0x6ba,0x50d,0x510,0x6b7,0x6b7,0x50d,0x510,0x4f2,0x4f5,0x4f5,0x4f5,
-0x513,0x4fe,0x4fb,0xba6,0xac5,0xac5,0xac2,0xac2,0xac2,0xac2,0xb9d,0xb9d,0xb9d,0xb9d,0xba3,0xcc9,
-0xcc6,0xdaa,0xdad,0xba0,0xdad,0xdad,0xdad,0xdad,0xdaa,0xdad,0xdad,0xb9a,0x54c,0x54c,0x54c,0x54c,
-0x54c,0x54c,0x54c,0x549,0x54f,0x72f,0x54c,0x993,0x9b4,0xac8,0xac8,0xac8,0xbac,0xbac,0xdb3,0xdb3,
-0xdb3,0xdb3,0x112b,0x112e,0x112e,0x1302,0x1494,0x14be,0x14c1,0x14c1,0x16c8,0x1848,0x55b,0x55b,0x573,0x6d5,
-0x558,0x6cf,0x55b,0x570,0x558,0x6d5,0x56a,0x573,0x573,0x573,0x56a,0x56a,0x573,0x573,0x573,0x6db,
-0x558,0x573,0x6d8,0x558,0x567,0x573,0x573,0x573,0x573,0x573,0x558,0x558,0x55e,0x6cf,0x6d2,0x558,
-0x573,0x558,0x6de,0x558,0x573,0x561,0x579,0x6e1,0x573,0x573,0x564,0x56a,0x573,0x573,0x576,0x573,
-0x56a,0x56d,0x56d,0x56d,0x56d,0xad1,0xace,0xccc,0xdbc,0xbc1,0xbc4,0xbc4,0xbbe,0xbbb,0xbbb,0xbbb,
-0xbbb,0xbc4,0xbc1,0xbc1,0xbc1,0xbc1,0xbb8,0xbbb,0xdb9,0xeca,0xecd,0xfc0,0x1131,0x1131,0x1131,0x6e7,
-0x6e4,0x57c,0x57f,0x57f,0x57f,0x57f,0x57f,0x6e4,0x6e7,0x6e7,0x6e4,0x57f,0x6ed,0x6ed,0x6ed,0x6ed,
-0x6ed,0x6ed,0x6ed,0x6ed,0x6ed,0x6ed,0x6ed,0x6ed,0x588,0x588,0x588,0x588,0x6ea,0x6ea,0x6ea,0x6ea,
-0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x6ea,0x582,0x582,0x582,0x582,0x582,0x582,0x58e,0x58e,0x58e,0x58e,
-0x58e,0x58e,0x58e,0x58e,0x58b,0x58e,0x58e,0x58e,0x58e,0x58e,0x591,0x58b,0x58e,0x58e,0x58b,0x58b,
-0x58b,0x58b,0x58e,0x58e,0x6f0,0x6f0,0x58b,0x58b,0x58e,0x58e,0x58e,0x58e,0x58e,0x58e,0x58e,0x58e,
-0x58e,0x58e,0x58e,0x58e,0x58e,0x591,0x591,0x591,0x58e,0x58e,0x6f3,0x58e,0x6f3,0x58e,0x58e,0x58e,
-0x58e,0x58e,0x58e,0x58e,0x58b,0x58e,0x58b,0x58b,0x58b,0x58b,0x58b,0x58b,0x58e,0x58e,0x58b,0x6f0,
-0x58b,0x58b,0x58b,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xad7,0xbc7,0xbc7,0xbc7,0xbc7,
-0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0xbc7,0x6f6,0x594,0x6f6,0x6f6,0x597,0x594,0x594,0x6f6,
-0x6f6,0x597,0x594,0x6f6,0x597,0x594,0x594,0x6f6,0x594,0x6f6,0x5a3,0x5a0,0x594,0x6f6,0x594,0x594,
-0x594,0x594,0x6f6,0x594,0x594,0x6f6,0x6f6,0x6f6,0x6f6,0x594,0x594,0x6f6,0x597,0x6f6,0x597,0x6f6,
-0x6f6,0x6f6,0x6f6,0x6f6,0x6fc,0x59a,0x6f6,0x59a,0x59a,0x594,0x594,0x594,0x6f6,0x6f6,0x6f6,0x6f6,
-0x594,0x594,0x594,0x594,0x6f6,0x6f6,0x594,0x594,0x594,0x597,0x594,0x594,0x597,0x594,0x594,0x597,
-0x6f6,0x597,0x594,0x594,0x6f6,0x594,0x594,0x594,0x594,0x594,0x6f6,0x594,0x594,0x594,0x594,0x594,
-0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x6f9,0x6f6,0x597,0x594,0x6f6,0x6f6,0x6f6,0x6f6,
-0x594,0x594,0x6f6,0x6f6,0x594,0x597,0x6f9,0x6f9,0x597,0x597,0x594,0x594,0x597,0x597,0x594,0x594,
-0x597,0x597,0x594,0x594,0x594,0x594,0x594,0x594,0x597,0x597,0x6f6,0x6f6,0x597,0x597,0x6f6,0x6f6,
-0x597,0x597,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x6f6,0x594,0x594,
-0x594,0x6f6,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x6f6,0x594,0x594,0x594,0x594,0x594,0x594,
-0x597,0x597,0x597,0x597,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,
-0x594,0x594,0x594,0x6f6,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,
-0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,0x594,
-0x594,0x594,0x594,0x594,0x597,0x597,0x597,0x597,0x594,0x594,0x594,0x594,0x594,0x594,0x597,0x597,
-0x597,0x597,0x594,0x59d,0x594,0x594,0xbca,0xbca,0xbca,0xbca,0xbca,0xbca,0xbca,0xbca,0xbca,0xbca,
-0xbca,0xbca,0xbca,0xbca,0x5a6,0xada,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5af,0x5ac,0x5af,0x5ac,
-0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x6ff,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x7ef,0x7ef,
-0x5a6,0x5a6,0x5a6,0x5a6,0x5a9,0x5a9,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x7f5,0x7f2,0x5a6,
-0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,
-0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,0x5a6,
-0x5a6,0x5a6,0x5a6,0xada,0xbd0,0xada,0xada,0xada,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,
-0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,
-0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x5b2,0x708,0x708,0x708,0x708,0x708,0x708,0x708,0x708,
-0x708,0x708,0x5b8,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,
-0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xd3b,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,
-0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x5bb,0x5be,0x5be,0x5be,
-0x5be,0x5be,0x5be,0x5be,0x5be,0x5be,0x5be,0x5be,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,
-0x70e,0x70e,0x70e,0x70e,0x5be,0x5be,0x5be,0x5be,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,
-0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,
-0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x5c1,0x5c1,0x711,0x711,0x711,0x711,0xbd3,0xbd3,
-0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0xbd3,0x717,0x717,0x5c4,0x714,0x714,0x714,0x714,0x714,
-0x714,0x714,0x5c4,0x5c4,0x5c4,0x5c4,0x5c7,0x5c7,0x5c7,0x5c7,0x717,0x717,0x5c7,0x5c7,0x717,0x717,
-0x5c4,0x5c4,0x5c4,0x5c4,0x717,0x717,0x5c7,0x5c7,0x717,0x717,0x5c4,0x5c4,0x5c4,0x5c4,0x717,0x717,
-0x714,0x5c4,0x5c7,0x717,0x5c4,0x5c4,0x714,0x717,0x717,0x717,0x5c7,0x5c7,0x5c4,0x5c4,0x5c4,0x5c4,
-0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x717,0x714,0x717,0x714,0x5c4,0x5c7,
-0x5c7,0x5c7,0x5c7,0x5c7,0x5c7,0x5c4,0x5c4,0x714,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,0xae0,
-0xbd6,0xbd6,0xbd6,0xbd6,0xbd6,0xc45,0xc45,0xbd6,0x5cd,0x5cd,0x5cd,0x5cd,0x5ca,0x720,0x720,0x5ca,
-0x5ca,0x71a,0x5ca,0x5ca,0x5ca,0x5ca,0x71a,0x71a,0x5ca,0x5ca,0x5ca,0x5ca,0xd44,0xd44,0xbd9,0xbd9,
-0xdc5,0xae3,0x5cd,0x5cd,0x71d,0x5d0,0x71d,0x5cd,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,
-0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,
-0x5ca,0x5cd,0x5cd,0x5cd,0x5ca,0x5ca,0x5ca,0x5ca,0x720,0x5ca,0x720,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,
-0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x5ca,0x5ca,0x5ca,0x5ca,
-0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x5ca,0x720,0x720,0x5d3,0x720,0x71a,0x71a,0x5ca,0x71a,
-0x71d,0x71a,0x71a,0x5ca,0x71a,0x720,0x5d3,0x720,0xae3,0xae3,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,
-0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xdc2,0xe79,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,
-0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d9,0x1389,0x1389,0x1389,
-0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x14c7,0x5df,0x5df,0x5df,0x5df,0x1389,0x5d9,0x5d9,
-0x5df,0x5df,0x138c,0x138c,0x5e5,0x5e5,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,
-0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x1389,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,
-0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x726,0x5d9,0x5d9,
-0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x1389,0x5d9,0x1389,0x5d9,
-0x5d9,0x5d9,0x5d9,0x1389,0x1389,0x1389,0x5d9,0x1287,0x5d9,0x5d9,0x5d9,0x5e2,0x5e2,0x5e2,0x5e2,0x130e,
-0x130e,0x5d9,0x5dc,0x5dc,0x5df,0x5d9,0x5d9,0x5d9,0xbe2,0xbdf,0xbe2,0xbdf,0xbe2,0xbdf,0xbe2,0xbdf,
-0xbe2,0xbdf,0xbe2,0xbdf,0xbe2,0xbdf,0x723,0x723,0x723,0x723,0x723,0x723,0x723,0x723,0x723,0x723,
-0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,
-0x1389,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x1389,
-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,0x5fd,0x5fd,
-0x5fd,0x5fd,0x5fd,0x5fd,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
-0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
-0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,0xb34,
-0x606,0x606,0x94b,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x5fd,0x5fd,0xbe5,0xd68,0x1afd,0x1afd,
-0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,
-0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,
-0x606,0x600,0x606,0x600,0x606,0x600,0x606,0x600,0x606,0x600,0x606,0x600,0x603,0x609,0x606,0x600,
-0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x606,0x600,0x603,0x609,
-0x606,0x600,0x606,0x600,0x603,0x609,0x606,0x600,0x603,0x609,0x606,0x600,0x606,0x600,0x1311,0x1311,
-0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x606,0x600,0x606,0x600,
-0x606,0x600,0x603,0x609,0x603,0x609,0x606,0x600,0x606,0x600,0x606,0x600,0x606,0x600,0x606,0x600,
-0x606,0x600,0x606,0x600,0x603,0x606,0x600,0x603,0x606,0x600,0x603,0x609,0x600,0x600,0x600,0x600,
-0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
-0x600,0x600,0x600,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x606,0x606,0x606,0x606,
-0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x600,0x600,0x600,
-0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x603,0x603,0x603,
-0x603,0x603,0x603,0x603,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x600,0x606,0x909,0x90c,
-0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,0x1afd,
-0x603,0x600,0x603,0x603,0x603,0x603,0x603,0x603,0x600,0x603,0x600,0x600,0x603,0x603,0x600,0x600,
-0x603,0x603,0x600,0x603,0x600,0x603,0x600,0x600,0x603,0x600,0x600,0x603,0x600,0x603,0x600,0x600,
-0x603,0x600,0x603,0x603,0x600,0x600,0x600,0x603,0x600,0x600,0x600,0x600,0x600,0x603,0x600,0x600,
-0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
-0x600,0x600,0x600,0x600,0x603,0x603,0x600,0x600,0x603,0x600,0x603,0x600,0x600,0x600,0x600,0x600,
-0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,
-0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,0x603,
-0x603,0x603,0x603,0x609,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,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,
-0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x606,0x606,0x606,0x606,0x606,0x606,0x606,
-0x606,0x606,0x606,0x606,0x60c,0x60c,0x60c,0x60c,0xfcc,0xfcc,0xfcc,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,
-0x14ca,0x14ca,0x16ce,0x16ce,0x855,0x85b,0x85b,0x867,0x867,0x858,0x84f,0x858,0x84f,0x858,0x84f,0x858,
-0x84f,0x858,0x84f,0x858,0x61b,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x618,
-0x61e,0x61b,0x615,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,
-0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x61b,0x615,0x618,
-0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,
-0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,0x61e,0x61b,0x615,0x618,
-0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,0x705,
-0x705,0x705,0x705,0x705,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,
-0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,
-0x702,0x702,0x702,0x702,0x702,0x702,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,
-0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x70b,0x708,0x708,0x708,0x708,0x708,0x708,0x708,0x708,
-0x708,0x708,0x708,0x708,0x708,0x708,0x708,0x708,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,
-0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,
-0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x70e,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,
-0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,
-0x729,0x729,0x729,0x729,0x729,0x729,0x729,0x729,0xc33,0x8b8,0x8b2,0x8af,0x8b5,0x8ac,0x73e,0x741,
-0x741,0x741,0x741,0x741,0x741,0x741,0x741,0x741,0x8be,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,
-0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,
-0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x73e,0x8bb,0x8bb,0x744,0x8cd,0x8d0,0x8d6,
-0x7fb,0x807,0x8eb,0x804,0x8c4,0x8c1,0x8c4,0x8c1,0x8ca,0x8c7,0x8ca,0x8c7,0x8c4,0x8c1,0x801,0x8d6,
-0x8c4,0x8c1,0x8c4,0x8c1,0x8c4,0x8c1,0x8c4,0x8c1,0x8dc,0x8e2,0x8df,0x8df,0x74a,0x786,0x786,0x786,
-0x786,0x786,0x786,0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x780,
-0x780,0x780,0x780,0x780,0x780,0x780,0x780,0x74d,0x768,0x747,0x76e,0x771,0x76b,0x783,0x783,0x783,
-0x783,0x783,0x783,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,
-0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x77d,0x74d,0x768,0x747,0x768,0xc36,0x7e9,0x7e9,0x7e9,0x7e9,
-0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,
-0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x7e9,0x1281,0x1281,
-0x1281,0x1281,0x1281,0x7ec,0x801,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x804,0x924,0x924,
-0x924,0x924,0x80a,0x80a,0x8d9,0x8e8,0x8e8,0x8e8,0x8e8,0x8e5,0x7fe,0x8d3,0xb07,0xb07,0xb07,0xc48,
-0xc66,0xc63,0xb25,0x8a9,0x810,0x80d,0x810,0x813,0x80d,0x810,0x80d,0x810,0x80d,0x810,0x80d,0x80d,
-0x80d,0x80d,0x80d,0x80d,0x810,0x810,0x80d,0x810,0x810,0x80d,0x810,0x810,0x80d,0x810,0x810,0x80d,
-0x810,0x810,0x80d,0x80d,0xc69,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,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,0x81c,0x81c,0x81c,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,
-0x81c,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,0x81c,0x81f,0x822,0x822,0x81f,0x81f,0x81f,0x81f,0x8f1,
-0x8f4,0x825,0x828,0xc51,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,
-0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,
-0x82e,0x82e,0x82e,0x82e,0x831,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,
-0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,0x82e,
-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,0xd4d,0xd4d,0xe7c,0x834,
-0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0xd47,0xd47,0xd47,0xd47,
+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,
+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,0x1a46,
-0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,
-0x903,0x840,0x840,0x840,0x840,0x840,0x840,0xd50,0xd50,0xd50,0xd50,0x906,0x906,0x906,0x906,0x906,
-0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,
-0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,0x840,
-0x840,0x840,0xd50,0xd50,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,
-0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,0x843,
-0x843,0x843,0x843,0x843,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,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,0xe7f,0xe7f,
-0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,
-0xe7f,0xe7f,0xe7f,0xe7f,0x10ef,0x10ef,0x10ef,0x10ef,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,
+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,0x849,0x849,0x84c,0x84c,0x849,0x84c,0x849,0x84c,
-0x84c,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x84c,0x849,0x84c,0x849,0x84c,
-0x84c,0x849,0x849,0x84c,0x84c,0x84c,0x849,0x849,0x849,0x849,0x1485,0x1485,0xc5a,0xc5a,0xc5a,0xc5a,
-0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0x8fd,0x8fd,0x8fd,0x8fd,
-0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,
-0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x8fd,0x12c0,0x12c0,0x12c0,0x12c0,
-0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0xd47,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,
-0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,
-0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,
-0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0x900,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,
-0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0xc54,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,
-0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,0x903,
-0x903,0x903,0x903,0x903,0x903,0x903,0x903,0xd50,0x98a,0x96c,0x96c,0x96c,0x96c,0x966,0x96c,0x96c,
-0x97e,0x96c,0x96c,0x969,0x975,0x97b,0x97b,0x97b,0x97b,0x97b,0x97e,0x966,0x972,0x966,0x966,0x966,
-0x95d,0x95d,0x966,0x966,0x966,0x966,0x966,0x966,0x981,0x981,0x981,0x981,0x981,0x981,0x981,0x981,
-0x981,0x981,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0x969,0x95d,0x966,0x95d,
-0x966,0x95d,0x978,0x96f,0x978,0x96f,0x987,0x987,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,
-0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,
-0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x996,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,
-0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,
-0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x999,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,
-0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,
-0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,
-0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,
-0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x99f,0x99f,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,0x9a2,0x9a2,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,
-0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,
-0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a5,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,
+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,0x9a8,0x9a8,0x9a8,0x9a8,0x9ab,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,
+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,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,
-0xa3b,0xa3b,0xfb1,0xa3b,0xa3b,0xa3b,0xa3e,0xa3b,0xfb1,0xa3b,0xa3b,0xfa8,0xa35,0xa29,0xa29,0xa29,
-0xa29,0xa38,0xa29,0xf99,0xf99,0xf99,0xa29,0xa2c,0xa35,0xa2f,0xf9f,0xfab,0xfab,0xf99,0xf99,0xfb1,
-0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xa41,0xa41,0xa32,0xa32,0xa32,0xa32,
-0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa38,0xa38,0xa29,0xa29,0xfb1,0xfb1,0xfb1,0xfb1,0xf99,0xf99,
-0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,
-0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,0xa3b,
-0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xda7,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xda7,0xa50,0xa50,0xa50,0xa50,
-0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa50,0xa56,0xa56,0xa56,0xa56,
-0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,
-0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa5c,0xa5c,0xa5c,0xa5c,
-0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa59,0xa5f,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,
-0xa5c,0xa5c,0xa5c,0x1128,0x1128,0x1128,0x1128,0x1128,0x1128,0x1128,0x1128,0x1128,0x1125,0xa5c,0xa5c,0xa5c,
-0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,
-0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,0xa5c,
-0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,
-0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,0xa71,
-0xa95,0xa95,0xa95,0xa98,0xa98,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,
-0xa95,0xa95,0xa95,0xa95,0xa7d,0xa7d,0xa92,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa74,0xa92,0xa92,
-0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,
-0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,0xa95,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xaa1,0xaa1,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab9,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,
-0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,0xab6,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,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,
-0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,
-0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xae6,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,
+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,0xaf8,0xaf8,0xaf8,0xaf8,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,
-0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,
-0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xafe,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,
+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,
-0x138f,0x138f,0x138f,0x1ac1,0x1ac1,0x1ac1,0x1ac1,0x1ac1,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,
-0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,
-0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,
-0x1ac4,0x1ac4,0x1ac4,0x1ac4,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,
-0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb13,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,
+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,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb16,0xb16,0xc57,0xc57,
-0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,
-0xc57,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb16,0xb3a,0xb3a,0xb3a,0xb3a,
-0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,
-0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0xb3a,0x14cd,0xb43,0xb43,0xb43,0xb43,
-0xb43,0xb43,0xcdb,0xcdb,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,
-0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xcd8,0xcd8,
-0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,
-0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,
-0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,0xb43,
-0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,
-0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,
-0xb55,0xb55,0xb55,0xb55,0xb55,0xb4c,0xb58,0xb5e,0xb5e,0xb5e,0xb52,0xb52,0xb52,0xb5b,0xb4f,0xb4f,
-0xb4f,0xb4f,0xb4f,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,
-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,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,
-0xb52,0xb52,0xb55,0xb55,0xb5e,0xb5e,0xb5e,0xb52,0xb52,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,
-0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,
-0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb5e,0xb5e,0xb5e,0xb5e,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,
-0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb52,0xb52,0xb52,
+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,0x16d1,0x16d1,0xb6a,0xb61,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb61,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb61,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb61,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb61,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
+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,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,
-0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,
-0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xb6a,0xb6a,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,0xb6d,0xb6d,0xb6d,0xb6d,0xb6d,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,
-0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,
-0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0xb73,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,
-0x1aca,0x1aca,0x1b96,0x1b96,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,
+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,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,
-0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbd0,0xbcd,0xbd0,0xbcd,0xbcd,0xbcd,0xbcd,
-0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xbcd,0xccf,0xcd2,0xdbf,0xdbf,0xdbf,
-0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xdbf,0xed6,0xed6,0xed6,0xed6,0xbdc,0xbdc,0xbdc,0xbdc,
-0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0xdc2,0xe76,
-0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xfc6,0x1260,0x1260,0xdcb,0xdcb,0xdcb,0xdcb,
-0xdcb,0xdd1,0xdce,0xee8,0xee8,0xee8,0xee8,0x13ce,0xfd8,0x13ce,0x131a,0x131a,0xc0f,0xc0f,0xc0f,0xc0f,
-0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc0f,0xc3c,0xc39,
-0xc3c,0xc39,0xc3c,0xc39,0x10e9,0x10e6,0xfde,0xfdb,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,
-0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,
-0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,
-0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc18,0xc18,0xc18,0xc1e,0xc1b,0xc42,0xc3f,0xc1e,
-0xc1b,0xc1e,0xc1b,0xc1e,0xc1b,0xc1e,0xc1b,0xc1e,0xc1b,0xc1e,0xc1b,0xc1e,0xc1b,0xc1e,0xc1b,0xc1e,
-0xc1b,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,
-0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,
-0xc18,0xc18,0xc18,0xc18,0xc1e,0xc1b,0xc1e,0xc1b,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,
-0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,
-0xc18,0xc18,0xc18,0xc18,0xc1e,0xc1b,0xc18,0xc18,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,
-0xc21,0xc21,0xc21,0xc21,0xc27,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,
-0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,
-0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc27,0xc27,0xc27,0xc21,0xc21,0xc21,0xc21,0xc21,
-0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,
-0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc24,0xc21,0xc21,0xc21,0xc5a,0xc5a,0xc5a,0xc5a,
-0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,
-0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xc5a,0xcd5,0xd41,0xdc2,0xdc2,
-0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xe76,0xe76,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xdc2,0xed9,0xfc6,
-0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0x1284,0x1284,0x1263,0xcf9,0xcf9,0xcf9,0xcf9,
-0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,
-0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xcf9,0xd08,0xd08,0xd08,0xd08,
-0xd08,0xd08,0xcff,0xcff,0xcff,0xcff,0xcff,0xcfc,0xd11,0xd11,0xd11,0xd0b,0xd11,0xd11,0xd11,0xd11,
-0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd0b,0xd11,0xd11,0xd11,0xd11,0xd05,0xd05,0xd0e,0xd0e,
-0xd0e,0xd0e,0xd02,0xd02,0xd02,0xd02,0xd02,0xd08,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,
-0xdd7,0xdd7,0xdd7,0xdd7,0xdd4,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xd11,0xd11,0xd11,0xd11,
-0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd0b,0xd11,0xd11,0xd11,0xd11,0xd11,
-0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd11,0xd05,0xd05,0xd05,0xd08,0xd08,0xd08,0xd08,
-0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,
-0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd14,0xd14,0xd14,0xd14,
-0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xd14,0xdda,0xdda,0xdda,0xdda,0xdda,0xdda,
-0xeeb,0xeeb,0xeeb,0xeeb,0xeeb,0xeeb,0xeeb,0x10f2,0x10f2,0xfe1,0xfe1,0xfe1,0xd17,0xd17,0xd17,0xd17,
-0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,
-0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd17,0xd1d,0xd1d,0xd1d,0xd1d,
-0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,
-0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd26,0xd26,0xd26,0xd26,
-0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,
-0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd32,0xd32,0xd32,0xd32,
-0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,
-0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,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,0xd3e,0xd3e,0xde0,0xde0,0xde0,0xde0,
-0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,
-0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde0,0xde6,0xde6,0xde6,0xde6,
-0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,
-0xde6,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde3,0xde6,0xde6,0xde6,0xde6,
-0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,
-0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xde6,0xea6,0xea6,0xdf8,0xdf8,
-0xeee,0xeee,0xeee,0xeee,0xeee,0xeee,0xeee,0xfed,0xfed,0xfed,0xfed,0xfed,0xfea,0xfea,0xfea,0xfea,
-0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xfea,0xe07,0xe04,0xe07,0xe04,
-0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,
-0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe07,0xe04,0xe13,0xe13,0xe13,0xe13,
-0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,
-0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe13,0xe19,0xe19,0xe19,0xe19,
-0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0x1b0c,0xe16,0xe16,0xe16,0xe16,
-0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,
-0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0xe16,0x1b09,0xe19,0xe19,0xe19,0xe19,
-0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,
-0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xe19,0xea0,0xea0,0xea0,0xea0,
-0xea0,0xea0,0xea0,0xea0,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,0xe31,
-0xe31,0xe31,0xe31,0xef1,0xef1,0xef1,0xef1,0xff0,0xff0,0xff0,0xff0,0xff0,0xe3a,0xe3a,0xe3a,0xe3a,
-0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,
-0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe43,0xe43,0xe43,0xe43,
-0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,
-0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe4c,0xe4c,0xe4c,0xe4c,
+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,
+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,0xe4c,0xe4c,0xe4c,0xe46,0xe49,0xe49,0xe49,0xe49,
-0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,
-0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe55,0xe55,0xe55,0xe55,
-0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe52,0xe52,0xe52,0xe52,0xe52,0xe52,
-0xe52,0xe52,0xe4f,0xe58,0xffc,0xff6,0x1005,0xff3,0xe55,0xe55,0xff3,0xff3,0xe67,0xe67,0xe5b,0xe67,
-0xe67,0xe67,0xe5e,0xe67,0xe67,0xe67,0xe67,0xe5b,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,
-0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe6a,0xe6a,0xe6a,0xe6a,
-0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,
-0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,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,0xea3,0xea3,0xea3,0xea3,
-0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0xea3,0x10fb,0x10fb,0x10fb,0x10fb,
-0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0xed6,0xed6,0xed6,0xed3,
-0xed3,0xed3,0xed3,0xed3,0x1134,0x1380,0x1380,0x1380,0x1380,0x1305,0x1305,0x1305,0x1383,0x1308,0x1308,0x1383,
-0x14c4,0x14c4,0x14c4,0x14c4,0x14c4,0x14c4,0x14c4,0x1785,0x1785,0x1785,0x1785,0x184b,0xeeb,0xeeb,0xeeb,0xeeb,
-0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe1,0xfe4,0xfe4,0xfe4,0xfe4,
-0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfea,0xfea,0xfea,0xfea,
-0xfea,0xfea,0xfea,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,
-0x14df,0x14e2,0x1854,0x1854,0x18d5,0x1854,0x1bb4,0x178b,0x131d,0x113d,0xeee,0xeee,0xf0c,0xf0c,0xf0c,0xf0c,
-0xf1e,0xf27,0xf2a,0xf27,0xf2a,0xf27,0xf2a,0xf27,0xf2a,0xf27,0xf2a,0xf27,0xf27,0xf27,0xf2a,0xf27,
-0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,0xf27,
-0xf27,0xf27,0xf27,0xf27,0xf0f,0xf0c,0xf0c,0xf0c,0xf0c,0xf0c,0xf0c,0xf21,0xf0c,0xf21,0xf1e,0xf1e,
-0xf33,0xf30,0xf33,0xf33,0xf33,0xf30,0xf30,0xf33,0xf30,0xf33,0xf30,0xf33,0xf30,0x1017,0x1017,0x1017,
-0x1152,0x100e,0x1017,0x100e,0xf30,0xf33,0xf30,0xf30,0x100e,0x100e,0x100e,0x100e,0x1011,0x1014,0x1152,0x1152,
-0xf36,0xf36,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,
-0x1020,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,
-0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,
-0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,
-0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,
-0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,0xf4b,
-0xf4b,0xf4b,0xf4b,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,0x1500,
-0x1500,0x1500,0x1500,0x1500,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,
-0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,
-0xf51,0xf51,0xf51,0xf51,0xf99,0xfb1,0xfa8,0xfae,0xfae,0xfb1,0xfb1,0xfa8,0xfa8,0xfae,0xfae,0xfae,
-0xfae,0xfae,0xfb1,0xfb1,0xfb1,0xf99,0xf99,0xf99,0xf99,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,
-0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xfb1,0xf99,0xfa8,0xfab,0xf99,0xf99,0xfae,0xfae,0xfae,0xfae,0xfae,
-0xfae,0xf9c,0xfb1,0xfae,0xfa5,0xfa5,0xfa5,0xfa5,0xfa5,0xfa5,0xfa5,0xfa5,0xfa5,0xfa5,0x111c,0x111c,
-0x1119,0x1116,0xfa2,0xfa2,0xfc9,0xfc9,0xfc9,0xfc9,0x1284,0x1284,0x1263,0x1263,0x1263,0x1260,0x1260,0x1260,
-0x1260,0x1263,0x1386,0x1263,0x1263,0x1263,0x1260,0x1263,0x1284,0x1260,0x1260,0x1260,0x1263,0x1263,0x1260,0x1260,
-0x1263,0x1260,0x1260,0x1263,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,0xfe1,0xfe1,0xfe4,0xfe4,0xfe4,0xfe4,0xfe4,
-0xfe4,0x14d9,0x14d9,0x14d9,0x10f2,0xfe1,0xfe1,0xfe1,0xfe1,0x1290,0x126c,0x126c,0x126c,0x126c,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0x1002,0x1002,0xfff,0xff9,0xfff,0xff9,0xfff,0xff9,0xfff,0xff9,0xff6,0xff6,
-0xff6,0xff6,0x100b,0x1008,0xff6,0x114f,0x13da,0x13dd,0x13dd,0x13da,0x13da,0x13da,0x13da,0x13da,0x13e0,0x13e0,
-0x14f4,0x14e8,0x14e8,0x14e5,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x101d,0x101a,0x101a,0x1029,
-0x1020,0x1329,0x1326,0x16da,0x1329,0x1326,0x13e9,0x13e6,0x14f7,0x14f7,0x14fd,0x14f7,0x14fd,0x14f7,0x14fd,0x14f7,
-0x14fd,0x14f7,0x14fd,0x14f7,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,
-0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,0x1029,0x1020,
-0x1029,0x1020,0x1029,0x1020,0x1023,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1020,0x1029,0x1020,0x1029,
-0x1020,0x1029,0x1029,0x1020,0x102c,0x102c,0x1032,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,
-0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,
-0x1038,0x1038,0x1038,0x1038,0x1038,0x1032,0x102c,0x102c,0x102c,0x102c,0x1032,0x1032,0x102c,0x102c,0x1035,0x13f2,
-0x13ef,0x13ef,0x1038,0x1038,0x102f,0x102f,0x102f,0x102f,0x102f,0x102f,0x102f,0x102f,0x102f,0x102f,0x13f5,0x13f5,
-0x13f5,0x13f5,0x13f5,0x13f5,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,
+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,
+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,0x104d,0x104d,0x104d,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,
-0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1056,0x1059,0x1059,0x1059,0x105c,
-0x1059,0x1059,0x105f,0x105f,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,
+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,
-0x1062,0x1062,0x1062,0x1062,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,
-0x106e,0x1065,0x1074,0x1071,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,
0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,
-0x106b,0x106b,0x106b,0x106b,0x132f,0x132c,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,
-0x1086,0x1080,0x1083,0x1104,0x1077,0x1077,0x1077,0x107d,0x13f8,0x13f8,0x13f8,0x13f8,0x13f8,0x13f8,0x13f8,0x13f8,
-0x107a,0x107a,0x107d,0x1089,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,
-0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,0x1086,0x1080,
-0x1086,0x1080,0x1086,0x1080,0x150c,0x1509,0x150c,0x1509,0x150f,0x150f,0x16e3,0x13f8,0x1092,0x1092,0x1095,0x1095,
-0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,
-0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1095,0x1092,0x1092,0x1092,0x1092,
-0x1092,0x1092,0x1092,0x1092,0x1092,0x1092,0x1092,0x1092,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x109b,0x109b,
-0x109b,0x109b,0x109b,0x109e,0x109e,0x109e,0x10f8,0x10a7,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,
-0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,0x10a1,
-0x10a1,0x10a1,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,
-0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,
-0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,
-0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10c5,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,
-0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,
-0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10e0,0x10e0,0x10e0,0x10e0,0x10f5,0x10e0,0x10e0,0x10e0,
-0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,
-0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,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,0x10e3,0x10e3,0x10e3,0x10ef,0x10ef,0x10ef,0x10ef,0x128a,0x128a,0x128a,0x128a,
-0x128a,0x128a,0x128a,0x128a,0x1482,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x18b4,0x18b4,
-0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,
-0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x1164,0x115b,0x115b,
-0x115e,0x115e,0x1164,0x115b,0x115b,0x115b,0x115b,0x115b,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,
-0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,
-0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x116a,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,
-0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,
-0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,
-0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,
-0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x118e,0x1194,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,
-0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,
-0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,
-0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x12d5,0x11ac,0x12d8,0x11ac,0x11ac,0x11ac,0x11ac,
-0x11a9,0x11a9,0x11a9,0x11ac,0x16e6,0x16e9,0x1911,0x190e,0x11af,0x11af,0x11af,0x11be,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,0x11b2,0x11be,0x11be,0x11af,0x11af,
-0x11af,0x11af,0x11be,0x11be,0x11af,0x11af,0x11be,0x11be,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,
-0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d3,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11ca,
-0x11ca,0x11ca,0x11d0,0x11cd,0x1515,0x1518,0x151b,0x151b,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,
-0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11d6,0x11e2,0x11d6,0x11d6,0x11d6,0x11eb,0x11eb,0x11d6,
-0x11d6,0x11eb,0x11e2,0x11eb,0x11eb,0x11e2,0x11d6,0x11d9,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,
-0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,
-0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11e2,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,
-0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,
-0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,
-0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,0x1215,
-0x1215,0x1215,0x1215,0x1215,0x1215,0x1212,0x1212,0x1212,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,
-0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,
-0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,
-0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,
-0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x122d,0x1233,0x1233,0x1242,0x1245,0x1245,0x1245,0x1245,0x1245,
-0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,
-0x1245,0x1245,0x1248,0x1245,0x1248,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,
-0x1245,0x1245,0x1245,0x1248,0x1245,0x1245,0x1245,0x1245,0x1242,0x1242,0x1242,0x1236,0x1236,0x1236,0x1236,0x1242,
-0x1242,0x123c,0x1239,0x123f,0x123f,0x124e,0x124b,0x124b,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,
-0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,
-0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1257,0x1257,0x1257,0x1254,0x1254,0x1254,0x1251,0x1251,
-0x1251,0x1251,0x1254,0x1251,0x1251,0x1251,0x1257,0x1254,0x1257,0x1254,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,
-0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,0x1251,
-0x1251,0x1251,0x1251,0x1251,0x1251,0x1257,0x1254,0x1254,0x1251,0x1251,0x1251,0x1251,0x1272,0x1272,0x1272,0x1272,
-0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1275,0x1275,0x1275,0x125a,0x1917,0x137d,0x127e,0x137d,0x137d,
-0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x127e,0x137d,0x127e,0x1263,0x1263,0x130b,0x1260,
-0x130b,0x130b,0x130b,0x130b,0x1260,0x1260,0x1284,0x1260,0x1260,0x1260,0x1260,0x1260,0x1260,0x1263,0x1284,0x1284,
-0x1263,0x1284,0x1260,0x1263,0x1263,0x1266,0x1284,0x1260,0x1260,0x1284,0x1263,0x1263,0x137a,0x137a,0x137a,0x137a,
-0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x126f,0x126f,0x126f,0x126f,0x1392,0x1374,0x1278,0x1392,0x1392,0x1392,
-0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1392,0x1815,0x1815,0x1815,0x1815,0x1815,0x1272,0x1272,0x1272,0x1272,
-0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x151e,0x151e,0x1a64,0x1a64,0x1a64,0x1272,0x1272,0x1272,0x1272,
-0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x1272,0x137d,0x137d,0x127e,0x137d,
-0x137d,0x137d,0x127e,0x137d,0x137d,0x137d,0x1278,0x1278,0x1278,0x1278,0x1278,0x1377,0x137a,0x137a,0x137a,0x137a,
-0x137a,0x137a,0x137a,0x127b,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x127b,0x137a,0x137a,0x137a,0x137a,
-0x137a,0x137a,0x137a,0x137a,0x137a,0x137a,0x13fb,0x13fb,0x19c2,0x1a64,0x1a64,0x1a64,0x137a,0x137a,0x137a,0x137a,
-0x137a,0x137a,0x137a,0x137a,0x137a,0x127b,0x137a,0x127b,0x127b,0x137a,0x137a,0x127b,0x129f,0x129f,0x129f,0x129f,
-0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,
-0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x129f,0x1329,0x1326,0x1329,0x1326,
-0x1329,0x1326,0x1329,0x1326,0x1329,0x1326,0x13e9,0x14fd,0x14fd,0x14fd,0x1791,0x1905,0x14fd,0x14fd,0x16dd,0x16dd,
-0x16dd,0x16d7,0x16dd,0x16d7,0x1908,0x1905,0x19bf,0x19bc,0x19bf,0x19bc,0x19bf,0x19bc,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,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x1362,0x1353,0x1362,0x1365,
-0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,
-0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1353,0x1353,0x1353,0x1353,
-0x1353,0x1353,0x1353,0x1353,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,
-0x136b,0x136b,0x136b,0x136b,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,0x1371,0x1371,
-0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,
-0x1371,0x1371,0x1371,0x1371,0x139b,0x1398,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,
-0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,
-0x18ba,0x18ba,0x18ba,0x18ba,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a1,0x13a1,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a1,0x13a4,0x13a4,0x13a4,0x13a1,0x13a4,0x13a1,0x13a4,0x13a1,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a7,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a1,0x13a4,0x13a1,0x13a1,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,
-0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x13a1,0x1527,0x1527,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x1767,0x1767,0x1767,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x1767,0x1767,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a7,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x152a,0x152a,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x1527,0x1527,0x152a,0x152a,0x13a4,0x13a4,0x13a7,0x13a7,0x13a7,0x1692,0x13a4,0x13a7,
-0x13a4,0x13a4,0x13a7,0x152d,0x152d,0x152a,0x152a,0x1767,0x1767,0x1767,0x1767,0x1767,0x152a,0x152a,0x152a,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x152a,0x152a,0x1692,0x152a,0x152a,0x152a,
-0x1767,0x1767,0x1767,0x176a,0x176a,0x176a,0x176a,0x176a,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x13a4,0x152a,0x13a7,0x13a7,0x13a4,0x13a4,0x13a7,0x13a7,
-0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,
-0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a4,0x13a4,0x13a4,
-0x13a7,0x13a4,0x13a4,0x13a4,0x13a4,0x13a7,0x13a7,0x13a7,0x13a4,0x13a7,0x13a7,0x13a7,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a7,0x13a4,0x13a7,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x1692,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x152a,0x1767,0x13fe,0x13fe,0x13fe,0x13fe,0x1527,0x1527,0x1527,0x1527,
-0x1527,0x1527,0x152a,0x1767,0x1767,0x1767,0x1767,0x16ec,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,
-0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x152d,0x152d,0x152a,0x152a,0x152a,0x152a,0x181e,0x152a,0x152a,0x152a,0x152a,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,
-0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x152a,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x1488,0x13aa,0x13aa,0x13aa,
-0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x1488,0x13aa,0x13aa,
-0x13aa,0x1488,0x13aa,0x1488,0x13aa,0x1488,0x13aa,0x1488,0x13aa,0x13aa,0x13aa,0x1488,0x13aa,0x13aa,0x13aa,0x13aa,
-0x13aa,0x13aa,0x1488,0x1488,0x13aa,0x13aa,0x13aa,0x13aa,0x1488,0x13aa,0x1488,0x1488,0x13aa,0x13aa,0x13aa,0x13aa,
-0x1488,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x13aa,0x1698,0x1698,0x176d,
-0x176d,0x13ad,0x13ad,0x13ad,0x13aa,0x13aa,0x13aa,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x1617,0x1617,0x1617,0x1617,
-0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x13b0,0x13b0,0x13b0,0x13b0,
-0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,
-0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b3,
-0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,
-0x13b3,0x13b3,0x13b3,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b6,0x13b6,0x13b6,0x13b6,
+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,
+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,0x179a,0x179a,0x1797,0x16ef,
-0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1401,0x1401,0x1401,0x1401,0x1401,0x1401,0x1404,0x1404,0x1404,0x1404,
-0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1404,0x1533,0x1407,0x1536,0x1407,0x1407,
-0x1407,0x1407,0x1407,0x1407,0x1407,0x1407,0x1407,0x1407,0x1407,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x16f2,
-0x16f2,0x1b39,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x1a67,0x1a67,0x1410,0x1410,0x1410,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,0x1422,0x1422,0x1422,0x1422,0x143d,0x143d,0x143d,0x143d,
-0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,
-0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x1443,0x1443,0x1443,0x1443,
-0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,
-0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x19c8,0x1446,0x1446,0x1446,0x1446,
-0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,
-0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x1446,0x144c,0x144c,0x1458,0x145e,
-0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,
-0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x1458,
-0x1458,0x1458,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x1458,0x145b,0x145e,0x1461,0x1461,
-0x145e,0x1464,0x1464,0x144f,0x1452,0x16f8,0x16fb,0x16fb,0x16fb,0x153c,0x1a70,0x1a6d,0x1455,0x1455,0x1455,0x1455,
-0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1539,0x1701,0x1704,0x16fe,0x1707,0x1707,0x147f,0x147f,0x147f,0x147f,
-0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,
-0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x14d9,0x14d9,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x18ed,0x18ed,0x18ed,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,
-0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x19b6,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x14d9,0x1851,0x18ed,
-0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x152a,0x152a,0x152a,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,
-0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x1527,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152d,0x152a,0x152a,0x152a,0x152a,0x1695,0x1695,0x152a,
-0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x152a,0x181b,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,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,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,
+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,
+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,
+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,
+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,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,
-0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,
-0x1563,0x1563,0x1563,0x1563,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,
-0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,
-0x1566,0x1566,0x1566,0x1566,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,
-0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,0x15a5,
-0x15a5,0x15a5,0x15a5,0x1596,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,
-0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15ae,0x15a8,
-0x15b1,0x15b1,0x15b1,0x15b1,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,0x15b4,
-0x15b4,0x15b4,0x15b4,0x15b4,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15c6,0x15cf,0x15cf,0x15cf,
-0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,
-0x15cf,0x15cf,0x15cf,0x15cf,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,
-0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,
-0x15d8,0x15d8,0x15d8,0x15d8,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,
-0x15ea,0x15ea,0x15ea,0x15ea,0x15e7,0x15e7,0x15e7,0x15db,0x15db,0x15db,0x15db,0x15db,0x15db,0x15db,0x15db,0x15e7,
-0x15e7,0x15db,0x15e7,0x15de,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,
+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,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,
-0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,
-0x160e,0x160b,0x160b,0x160b,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,
-0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x1617,0x161d,0x161d,0x161d,0x161a,0x161a,0x161a,
-0x1617,0x1617,0x1617,0x1617,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,
-0x162c,0x162c,0x162c,0x162c,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1632,0x1632,0x1626,0x1623,0x1623,
-0x1623,0x1623,0x1623,0x1623,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,
-0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,0x162c,
-0x162c,0x162c,0x162c,0x162c,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,
-0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1635,0x1635,0x1635,0x1635,0x1635,
-0x1635,0x1635,0x1635,0x1635,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,
-0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,
-0x163b,0x163b,0x163b,0x163b,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,
-0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,
-0x165f,0x165f,0x165f,0x165f,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,
-0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,0x1668,
-0x1668,0x1668,0x1668,0x1668,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,
-0x1680,0x1680,0x1680,0x1680,0x166b,0x167a,0x167a,0x166b,0x166b,0x166b,0x166b,0x166b,0x166b,0x167a,0x166b,0x167d,
-0x167d,0x166b,0x167d,0x166b,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,
-0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,
-0x1680,0x1680,0x1680,0x1680,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,
-0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,
-0x1689,0x1689,0x1689,0x1689,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,
-0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,0x168f,
-0x168f,0x168f,0x168f,0x168f,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,
-0x16d4,0x16d4,0x16d4,0x16d4,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,
-0x18ed,0x18ed,0x18ed,0x19b6,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,
-0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,0x16f5,
-0x16f5,0x16f5,0x16f5,0x16f5,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,
-0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,
-0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x173a,0x1737,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,
-0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x1734,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,
-0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,
-0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,0x173d,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,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,
+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,
+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,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,
-0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,
-0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,
-0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,
-0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x175b,0x175b,0x175b,0x175b,0x1758,
-0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x175b,0x175b,0x175b,
-0x175b,0x175b,0x175b,0x175b,0x175b,0x1758,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,
-0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,
-0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,
-0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,
-0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x185d,0x185d,0x185d,0x185d,0x185d,0x185d,0x185d,0x185d,
-0x185d,0x185d,0x185d,0x185d,0x1ad3,0x1a28,0x1a28,0x1a2b,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,
-0x1779,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x18c3,0x1776,0x1776,0x1776,0x1776,0x1776,0x1824,0x1824,0x1824,
-0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,
-0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x1776,0x19a1,0x19a1,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,
-0x1a28,0x1a28,0x1a28,0x1ad0,0x1ba2,0x1a2b,0x1a2b,0x1a2b,0x18c0,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,
-0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c0,0x18c0,0x1a67,0x1a67,0x1a67,0x1a67,0x1a67,0x1a67,0x1a67,0x1a67,
-0x1b39,0x1b3c,0x1b36,0x1b36,0x1b36,0x1b36,0x1b36,0x1b36,0x1b36,0x1b36,0x1b36,0x191a,0x179d,0x179d,0x179d,0x179d,
-0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x179d,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1827,0x1824,
-0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x1827,0x18c3,0x18c3,0x1827,0x1827,0x1827,0x1827,0x1827,
-0x1827,0x1827,0x1824,0x17a6,0x1827,0x1827,0x1827,0x1a28,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x17a6,0x1824,
-0x1824,0x1824,0x1824,0x1824,0x18c0,0x19a1,0x19a1,0x19a1,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,
-0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x18c0,0x17bb,0x17bb,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,
-0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,
-0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17b8,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,
-0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,
-0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x17bb,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,
-0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1806,0x1806,0x1806,
-0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,
-0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,
-0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,0x1809,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,0x182d,0x182d,0x182d,0x182d,0x182d,0x182d,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,
-0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,
-0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,
-0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1887,0x1887,0x1887,0x1887,0x19da,0x19da,0x188a,0x188a,
-0x188a,0x188a,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x1884,
-0x1875,0x1878,0x187b,0x188d,0x188d,0x192c,0x187e,0x187e,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,
-0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,
-0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x1887,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,
-0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x1893,0x1899,0x1896,0x1896,0x1896,
-0x1896,0x18a5,0x18ab,0x1896,0x1896,0x1896,0x1896,0x18a2,0x18a8,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,0x1896,
-0x1896,0x1896,0x1896,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,
-0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,0x18b4,
-0x18b4,0x18b4,0x18b4,0x199b,0x199b,0x199b,0x199b,0x199b,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,
-0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1b93,0x1b93,0x1b93,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,
+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,
+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,
+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,
0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,
-0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,
-0x18c0,0x18c0,0x18c0,0x18c0,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x1a28,0x1ad0,0x19a1,0x19a1,0x19a1,0x19a1,0x1ad3,
-0x1ad0,0x1ba2,0x19a1,0x1a28,0x19a1,0x19a1,0x19a1,0x19a1,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x18c0,0x19a1,
-0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,
-0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,
-0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,
-0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,
+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,0x1ba5,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,
-0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,
-0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x18cf,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,
-0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,
-0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,
-0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,
-0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x195c,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,
-0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,
-0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,
-0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,
-0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,
-0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,
-0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,
-0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,
-0x1989,0x1989,0x1989,0x1989,0x1989,0x1986,0x1986,0x1986,0x19a1,0x19a1,0x19a1,0x1ad0,0x1ad0,0x1a28,0x1a28,0x1a28,
-0x1a28,0x1a28,0x1a28,0x1ad0,0x1ad0,0x1ad0,0x1a28,0x1a28,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a4,0x19a4,0x19a1,
-0x19a4,0x19a4,0x1a28,0x1a2b,0x1a28,0x1a28,0x1a28,0x1a28,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,
-0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,
-0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,
-0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,
-0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a04,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,
-0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a43,0x1a43,0x1a0d,0x1a43,0x1a0d,0x1a0d,0x1a0d,0x1a0d,
-0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a13,0x1a13,0x1a13,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,
+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,
-0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,
-0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,
-0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1ab2,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,
-0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,
-0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,
-0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,
-0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,
-0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,
-0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,
-0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,
-0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,
-0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,
-0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,
+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,
-0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,
-0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,
-0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0x1b90,0,0,0,0
+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
};
static const UTrie2 propsVectorsTrie={
propsVectorsTrie_index,
- propsVectorsTrie_index+5188,
- NULL,
- 5188,
- 26872,
+ propsVectorsTrie_index+5348,
+ nullptr,
+ 5348,
+ 27344,
0xa40,
- 0x14c4,
+ 0x1564,
0x0,
0x0,
0x110000,
- 0x7d38,
- NULL, 0, FALSE, FALSE, 0, NULL
+ 0x7fb0,
+ nullptr, 0, false, false, 0, nullptr
};
-static const uint32_t propsVectors[7095]={
+static const uint32_t propsVectors[7230]={
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,
@@ -3493,429 +3554,437 @@ static const uint32_t propsVectors[7095]={
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,0xc267,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,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,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,0x200002,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,0x230400,0x41001d0c,0x7c00100,
-0x23040f,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,
-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,0x2802000,0x962460,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,0x962460,
-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,0x2802000,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,0x23040f,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,0x23040f,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};
+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};
-static const int32_t countPropsVectors=7095;
+static const int32_t countPropsVectors=7230;
static const int32_t propsVectorsColumns=3;
static const uint16_t scriptExtensions[282]={
0x800e,0x8019,8,0x8059,8,2,8,0x8038,8,6,8,0x8019,2,0x22,0x25,0x57,
@@ -3937,6 +4006,6 @@ static const uint16_t scriptExtensions[282]={
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};
-static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2c64,0x2c64,0x2c64,0x2c64,0x6b06,3,0x86bd,0x874a,0x874a,0x874a,0xb40c5,0x2a75a31,0,0,0,0};
+static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d08,0x2d08,0x2d08,0x2d08,0x6ce6,3,0x8924,0x89b1,0x89b1,0x89b1,0xb47c7,0x2a75a31,0,0,0,0};
#endif // INCLUDED_FROM_UCHAR_C
diff --git a/contrib/libs/icu/common/ucharstrie.cpp b/contrib/libs/icu/common/ucharstrie.cpp
index e0b33af5194..ba9cea7ba39 100644
--- a/contrib/libs/icu/common/ucharstrie.cpp
+++ b/contrib/libs/icu/common/ucharstrie.cpp
@@ -30,8 +30,8 @@ UCharsTrie::~UCharsTrie() {
UStringTrieResult
UCharsTrie::current() const {
- const UChar *pos=pos_;
- if(pos==NULL) {
+ const char16_t *pos=pos_;
+ if(pos==nullptr) {
return USTRINGTRIE_NO_MATCH;
} else {
int32_t node;
@@ -59,7 +59,7 @@ UCharsTrie::nextForCodePoint(UChar32 cp) {
}
UStringTrieResult
-UCharsTrie::branchNext(const UChar *pos, int32_t length, int32_t uchar) {
+UCharsTrie::branchNext(const char16_t *pos, int32_t length, int32_t uchar) {
// Branch according to the current unit.
if(length==0) {
length=*pos++;
@@ -121,7 +121,7 @@ UCharsTrie::branchNext(const UChar *pos, int32_t length, int32_t uchar) {
}
UStringTrieResult
-UCharsTrie::nextImpl(const UChar *pos, int32_t uchar) {
+UCharsTrie::nextImpl(const char16_t *pos, int32_t uchar) {
int32_t node=*pos++;
for(;;) {
if(node<kMinLinearMatch) {
@@ -153,8 +153,8 @@ UCharsTrie::nextImpl(const UChar *pos, int32_t uchar) {
UStringTrieResult
UCharsTrie::next(int32_t uchar) {
- const UChar *pos=pos_;
- if(pos==NULL) {
+ const char16_t *pos=pos_;
+ if(pos==nullptr) {
return USTRINGTRIE_NO_MATCH;
}
int32_t length=remainingMatchLength_; // Actual remaining match length minus 1.
@@ -176,13 +176,13 @@ UCharsTrie::next(int32_t uchar) {
UStringTrieResult
UCharsTrie::next(ConstChar16Ptr ptr, int32_t sLength) {
- const UChar *s=ptr;
+ const char16_t *s=ptr;
if(sLength<0 ? *s==0 : sLength==0) {
// Empty input.
return current();
}
- const UChar *pos=pos_;
- if(pos==NULL) {
+ const char16_t *pos=pos_;
+ if(pos==nullptr) {
return USTRINGTRIE_NO_MATCH;
}
int32_t length=remainingMatchLength_; // Actual remaining match length minus 1.
@@ -282,13 +282,13 @@ UCharsTrie::next(ConstChar16Ptr ptr, int32_t sLength) {
}
}
-const UChar *
-UCharsTrie::findUniqueValueFromBranch(const UChar *pos, int32_t length,
+const char16_t *
+UCharsTrie::findUniqueValueFromBranch(const char16_t *pos, int32_t length,
UBool haveUniqueValue, int32_t &uniqueValue) {
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison unit
- if(NULL==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) {
- return NULL;
+ if(nullptr==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) {
+ return nullptr;
}
length=length-(length>>1);
pos=skipDelta(pos);
@@ -304,24 +304,24 @@ UCharsTrie::findUniqueValueFromBranch(const UChar *pos, int32_t length,
if(isFinal) {
if(haveUniqueValue) {
if(value!=uniqueValue) {
- return NULL;
+ return nullptr;
}
} else {
uniqueValue=value;
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
}
} else {
if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) {
- return NULL;
+ return nullptr;
}
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
}
} while(--length>1);
return pos+1; // ignore the last comparison unit
}
UBool
-UCharsTrie::findUniqueValue(const UChar *pos, UBool haveUniqueValue, int32_t &uniqueValue) {
+UCharsTrie::findUniqueValue(const char16_t *pos, UBool haveUniqueValue, int32_t &uniqueValue) {
int32_t node=*pos++;
for(;;) {
if(node<kMinLinearMatch) {
@@ -329,10 +329,10 @@ UCharsTrie::findUniqueValue(const UChar *pos, UBool haveUniqueValue, int32_t &un
node=*pos++;
}
pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue);
- if(pos==NULL) {
- return FALSE;
+ if(pos==nullptr) {
+ return false;
}
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
node=*pos++;
} else if(node<kMinValueLead) {
// linear-match node
@@ -348,14 +348,14 @@ UCharsTrie::findUniqueValue(const UChar *pos, UBool haveUniqueValue, int32_t &un
}
if(haveUniqueValue) {
if(value!=uniqueValue) {
- return FALSE;
+ return false;
}
} else {
uniqueValue=value;
- haveUniqueValue=TRUE;
+ haveUniqueValue=true;
}
if(isFinal) {
- return TRUE;
+ return true;
}
pos=skipNodeValue(pos, node);
node&=kNodeTypeMask;
@@ -365,8 +365,8 @@ UCharsTrie::findUniqueValue(const UChar *pos, UBool haveUniqueValue, int32_t &un
int32_t
UCharsTrie::getNextUChars(Appendable &out) const {
- const UChar *pos=pos_;
- if(pos==NULL) {
+ const char16_t *pos=pos_;
+ if(pos==nullptr) {
return 0;
}
if(remainingMatchLength_>=0) {
@@ -397,7 +397,7 @@ UCharsTrie::getNextUChars(Appendable &out) const {
}
void
-UCharsTrie::getNextBranchUChars(const UChar *pos, int32_t length, Appendable &out) {
+UCharsTrie::getNextBranchUChars(const char16_t *pos, int32_t length, Appendable &out) {
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison unit
getNextBranchUChars(jumpByDelta(pos), length>>1, out);
diff --git a/contrib/libs/icu/common/ucharstriebuilder.cpp b/contrib/libs/icu/common/ucharstriebuilder.cpp
index 3871df6c274..95b32711a8e 100644
--- a/contrib/libs/icu/common/ucharstriebuilder.cpp
+++ b/contrib/libs/icu/common/ucharstriebuilder.cpp
@@ -47,7 +47,7 @@ public:
return strings[stringOffset];
}
- UChar charAt(int32_t index, const UnicodeString &strings) const {
+ char16_t charAt(int32_t index, const UnicodeString &strings) const {
return strings[stringOffset+1+index];
}
@@ -75,7 +75,7 @@ UCharsTrieElement::setTo(const UnicodeString &s, int32_t val,
return;
}
stringOffset=strings.length();
- strings.append((UChar)length);
+ strings.append((char16_t)length);
value=val;
strings.append(s);
}
@@ -86,8 +86,8 @@ UCharsTrieElement::compareStringTo(const UCharsTrieElement &other, const Unicode
}
UCharsTrieBuilder::UCharsTrieBuilder(UErrorCode & /*errorCode*/)
- : elements(NULL), elementsCapacity(0), elementsLength(0),
- uchars(NULL), ucharsCapacity(0), ucharsLength(0) {}
+ : elements(nullptr), elementsCapacity(0), elementsLength(0),
+ uchars(nullptr), ucharsCapacity(0), ucharsLength(0) {}
UCharsTrieBuilder::~UCharsTrieBuilder() {
delete[] elements;
@@ -112,7 +112,7 @@ UCharsTrieBuilder::add(const UnicodeString &s, int32_t value, UErrorCode &errorC
newCapacity=4*elementsCapacity;
}
UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity];
- if(newElements==NULL) {
+ if(newElements==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return *this;
}
@@ -145,13 +145,13 @@ U_CDECL_END
UCharsTrie *
UCharsTrieBuilder::build(UStringTrieBuildOption buildOption, UErrorCode &errorCode) {
buildUChars(buildOption, errorCode);
- UCharsTrie *newTrie=NULL;
+ UCharsTrie *newTrie=nullptr;
if(U_SUCCESS(errorCode)) {
newTrie=new UCharsTrie(uchars, uchars+(ucharsCapacity-ucharsLength));
- if(newTrie==NULL) {
+ if(newTrie==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
} else {
- uchars=NULL; // The new trie now owns the array.
+ uchars=nullptr; // The new trie now owns the array.
ucharsCapacity=0;
}
}
@@ -163,7 +163,7 @@ UCharsTrieBuilder::buildUnicodeString(UStringTrieBuildOption buildOption, Unicod
UErrorCode &errorCode) {
buildUChars(buildOption, errorCode);
if(U_SUCCESS(errorCode)) {
- result.setTo(FALSE, uchars+(ucharsCapacity-ucharsLength), ucharsLength);
+ result.setTo(false, uchars+(ucharsCapacity-ucharsLength), ucharsLength);
}
return result;
}
@@ -173,7 +173,7 @@ UCharsTrieBuilder::buildUChars(UStringTrieBuildOption buildOption, UErrorCode &e
if(U_FAILURE(errorCode)) {
return;
}
- if(uchars!=NULL && ucharsLength>0) {
+ if(uchars!=nullptr && ucharsLength>0) {
// Already built.
return;
}
@@ -188,7 +188,7 @@ UCharsTrieBuilder::buildUChars(UStringTrieBuildOption buildOption, UErrorCode &e
}
uprv_sortArray(elements, elementsLength, (int32_t)sizeof(UCharsTrieElement),
compareElementStrings, &strings,
- FALSE, // need not be a stable sort
+ false, // need not be a stable sort
&errorCode);
if(U_FAILURE(errorCode)) {
return;
@@ -204,7 +204,7 @@ UCharsTrieBuilder::buildUChars(UStringTrieBuildOption buildOption, UErrorCode &e
prev.fastCopyFrom(current);
}
}
- // Create and UChar-serialize the trie for the elements.
+ // Create and char16_t-serialize the trie for the elements.
ucharsLength=0;
int32_t capacity=strings.length();
if(capacity<1024) {
@@ -212,8 +212,8 @@ UCharsTrieBuilder::buildUChars(UStringTrieBuildOption buildOption, UErrorCode &e
}
if(ucharsCapacity<capacity) {
uprv_free(uchars);
- uchars=static_cast<UChar *>(uprv_malloc(capacity*2));
- if(uchars==NULL) {
+ uchars=static_cast<char16_t *>(uprv_malloc(capacity*2));
+ if(uchars==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
ucharsCapacity=0;
return;
@@ -221,7 +221,7 @@ UCharsTrieBuilder::buildUChars(UStringTrieBuildOption buildOption, UErrorCode &e
ucharsCapacity=capacity;
}
StringTrieBuilder::build(buildOption, elementsLength, errorCode);
- if(uchars==NULL) {
+ if(uchars==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -231,7 +231,7 @@ UCharsTrieBuilder::getElementStringLength(int32_t i) const {
return elements[i].getStringLength(strings);
}
-UChar
+char16_t
UCharsTrieBuilder::getElementUnit(int32_t i, int32_t unitIndex) const {
return elements[i].charAt(unitIndex, strings);
}
@@ -257,7 +257,7 @@ UCharsTrieBuilder::countElementUnits(int32_t start, int32_t limit, int32_t unitI
int32_t length=0; // Number of different units at unitIndex.
int32_t i=start;
do {
- UChar unit=elements[i++].charAt(unitIndex, strings);
+ char16_t unit=elements[i++].charAt(unitIndex, strings);
while(i<limit && unit==elements[i].charAt(unitIndex, strings)) {
++i;
}
@@ -269,7 +269,7 @@ UCharsTrieBuilder::countElementUnits(int32_t start, int32_t limit, int32_t unitI
int32_t
UCharsTrieBuilder::skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const {
do {
- UChar unit=elements[i++].charAt(unitIndex, strings);
+ char16_t unit=elements[i++].charAt(unitIndex, strings);
while(unit==elements[i].charAt(unitIndex, strings)) {
++i;
}
@@ -278,14 +278,14 @@ UCharsTrieBuilder::skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t
}
int32_t
-UCharsTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, UChar unit) const {
+UCharsTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const {
while(unit==elements[i].charAt(unitIndex, strings)) {
++i;
}
return i;
}
-UCharsTrieBuilder::UCTLinearMatchNode::UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode)
+UCharsTrieBuilder::UCTLinearMatchNode::UCTLinearMatchNode(const char16_t *units, int32_t len, Node *nextNode)
: LinearMatchNode(len, nextNode), s(units) {
hash=hash*37u+ustr_hashUCharsN(units, len);
}
@@ -298,7 +298,7 @@ UCharsTrieBuilder::UCTLinearMatchNode::operator==(const Node &other) const {
if(!LinearMatchNode::operator==(other)) {
return false;
}
- const UCTLinearMatchNode &o=(const UCTLinearMatchNode &)other;
+ const UCTLinearMatchNode &o=static_cast<const UCTLinearMatchNode &>(other);
return 0==u_memcmp(s, o.s, length);
}
@@ -321,21 +321,21 @@ UCharsTrieBuilder::createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t l
UBool
UCharsTrieBuilder::ensureCapacity(int32_t length) {
- if(uchars==NULL) {
- return FALSE; // previous memory allocation had failed
+ if(uchars==nullptr) {
+ return false; // previous memory allocation had failed
}
if(length>ucharsCapacity) {
int32_t newCapacity=ucharsCapacity;
do {
newCapacity*=2;
} while(newCapacity<=length);
- UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2));
- if(newUChars==NULL) {
+ char16_t *newUChars=static_cast<char16_t *>(uprv_malloc(newCapacity*2));
+ if(newUChars==nullptr) {
// unable to allocate memory
uprv_free(uchars);
- uchars=NULL;
+ uchars=nullptr;
ucharsCapacity=0;
- return FALSE;
+ return false;
}
u_memcpy(newUChars+(newCapacity-ucharsLength),
uchars+(ucharsCapacity-ucharsLength), ucharsLength);
@@ -343,7 +343,7 @@ UCharsTrieBuilder::ensureCapacity(int32_t length) {
uchars=newUChars;
ucharsCapacity=newCapacity;
}
- return TRUE;
+ return true;
}
int32_t
@@ -351,13 +351,13 @@ UCharsTrieBuilder::write(int32_t unit) {
int32_t newLength=ucharsLength+1;
if(ensureCapacity(newLength)) {
ucharsLength=newLength;
- uchars[ucharsCapacity-ucharsLength]=(UChar)unit;
+ uchars[ucharsCapacity-ucharsLength]=(char16_t)unit;
}
return ucharsLength;
}
int32_t
-UCharsTrieBuilder::write(const UChar *s, int32_t length) {
+UCharsTrieBuilder::write(const char16_t *s, int32_t length) {
int32_t newLength=ucharsLength+length;
if(ensureCapacity(newLength)) {
ucharsLength=newLength;
@@ -376,22 +376,22 @@ UCharsTrieBuilder::writeValueAndFinal(int32_t i, UBool isFinal) {
if(0<=i && i<=UCharsTrie::kMaxOneUnitValue) {
return write(i|(isFinal<<15));
}
- UChar intUnits[3];
+ char16_t intUnits[3];
int32_t length;
if(i<0 || i>UCharsTrie::kMaxTwoUnitValue) {
- intUnits[0]=(UChar)(UCharsTrie::kThreeUnitValueLead);
- intUnits[1]=(UChar)((uint32_t)i>>16);
- intUnits[2]=(UChar)i;
+ intUnits[0]=(char16_t)(UCharsTrie::kThreeUnitValueLead);
+ intUnits[1]=(char16_t)((uint32_t)i>>16);
+ intUnits[2]=(char16_t)i;
length=3;
// } else if(i<=UCharsTrie::kMaxOneUnitValue) {
- // intUnits[0]=(UChar)(i);
+ // intUnits[0]=(char16_t)(i);
// length=1;
} else {
- intUnits[0]=(UChar)(UCharsTrie::kMinTwoUnitValueLead+(i>>16));
- intUnits[1]=(UChar)i;
+ intUnits[0]=(char16_t)(UCharsTrie::kMinTwoUnitValueLead+(i>>16));
+ intUnits[1]=(char16_t)i;
length=2;
}
- intUnits[0]=(UChar)(intUnits[0]|(isFinal<<15));
+ intUnits[0]=(char16_t)(intUnits[0]|(isFinal<<15));
return write(intUnits, length);
}
@@ -400,22 +400,22 @@ UCharsTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node
if(!hasValue) {
return write(node);
}
- UChar intUnits[3];
+ char16_t intUnits[3];
int32_t length;
if(value<0 || value>UCharsTrie::kMaxTwoUnitNodeValue) {
- intUnits[0]=(UChar)(UCharsTrie::kThreeUnitNodeValueLead);
- intUnits[1]=(UChar)((uint32_t)value>>16);
- intUnits[2]=(UChar)value;
+ intUnits[0]=(char16_t)(UCharsTrie::kThreeUnitNodeValueLead);
+ intUnits[1]=(char16_t)((uint32_t)value>>16);
+ intUnits[2]=(char16_t)value;
length=3;
} else if(value<=UCharsTrie::kMaxOneUnitNodeValue) {
- intUnits[0]=(UChar)((value+1)<<6);
+ intUnits[0]=(char16_t)((value+1)<<6);
length=1;
} else {
- intUnits[0]=(UChar)(UCharsTrie::kMinTwoUnitNodeValueLead+((value>>10)&0x7fc0));
- intUnits[1]=(UChar)value;
+ intUnits[0]=(char16_t)(UCharsTrie::kMinTwoUnitNodeValueLead+((value>>10)&0x7fc0));
+ intUnits[1]=(char16_t)value;
length=2;
}
- intUnits[0]|=(UChar)node;
+ intUnits[0]|=(char16_t)node;
return write(intUnits, length);
}
@@ -426,17 +426,17 @@ UCharsTrieBuilder::writeDeltaTo(int32_t jumpTarget) {
if(i<=UCharsTrie::kMaxOneUnitDelta) {
return write(i);
}
- UChar intUnits[3];
+ char16_t intUnits[3];
int32_t length;
if(i<=UCharsTrie::kMaxTwoUnitDelta) {
- intUnits[0]=(UChar)(UCharsTrie::kMinTwoUnitDeltaLead+(i>>16));
+ intUnits[0]=(char16_t)(UCharsTrie::kMinTwoUnitDeltaLead+(i>>16));
length=1;
} else {
- intUnits[0]=(UChar)(UCharsTrie::kThreeUnitDeltaLead);
- intUnits[1]=(UChar)(i>>16);
+ intUnits[0]=(char16_t)(UCharsTrie::kThreeUnitDeltaLead);
+ intUnits[1]=(char16_t)(i>>16);
length=2;
}
- intUnits[length++]=(UChar)i;
+ intUnits[length++]=(char16_t)i;
return write(intUnits, length);
}
diff --git a/contrib/libs/icu/common/ucharstrieiterator.cpp b/contrib/libs/icu/common/ucharstrieiterator.cpp
index b3132241fe2..176aed68259 100644
--- a/contrib/libs/icu/common/ucharstrieiterator.cpp
+++ b/contrib/libs/icu/common/ucharstrieiterator.cpp
@@ -26,8 +26,8 @@ UCharsTrie::Iterator::Iterator(ConstChar16Ptr trieUChars, int32_t maxStringLengt
: uchars_(trieUChars),
pos_(uchars_), initialPos_(uchars_),
remainingMatchLength_(-1), initialRemainingMatchLength_(-1),
- skipValue_(FALSE),
- maxLength_(maxStringLength), value_(0), stack_(NULL) {
+ skipValue_(false),
+ maxLength_(maxStringLength), value_(0), stack_(nullptr) {
if(U_FAILURE(errorCode)) {
return;
}
@@ -38,7 +38,7 @@ UCharsTrie::Iterator::Iterator(ConstChar16Ptr trieUChars, int32_t maxStringLengt
// via the UnicodeString and UVector32 implementations, so this additional
// cost is minimal.
stack_=new UVector32(errorCode);
- if(stack_==NULL) {
+ if(stack_==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -48,8 +48,8 @@ UCharsTrie::Iterator::Iterator(const UCharsTrie &trie, int32_t maxStringLength,
: uchars_(trie.uchars_), pos_(trie.pos_), initialPos_(trie.pos_),
remainingMatchLength_(trie.remainingMatchLength_),
initialRemainingMatchLength_(trie.remainingMatchLength_),
- skipValue_(FALSE),
- maxLength_(maxStringLength), value_(0), stack_(NULL) {
+ skipValue_(false),
+ maxLength_(maxStringLength), value_(0), stack_(nullptr) {
if(U_FAILURE(errorCode)) {
return;
}
@@ -57,7 +57,7 @@ UCharsTrie::Iterator::Iterator(const UCharsTrie &trie, int32_t maxStringLength,
if(U_FAILURE(errorCode)) {
return;
}
- if(stack_==NULL) {
+ if(stack_==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -82,7 +82,7 @@ UCharsTrie::Iterator &
UCharsTrie::Iterator::reset() {
pos_=initialPos_;
remainingMatchLength_=initialRemainingMatchLength_;
- skipValue_=FALSE;
+ skipValue_=false;
int32_t length=remainingMatchLength_+1; // Remaining match length.
if(maxLength_>0 && length>maxLength_) {
length=maxLength_;
@@ -95,17 +95,17 @@ UCharsTrie::Iterator::reset() {
}
UBool
-UCharsTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty(); }
+UCharsTrie::Iterator::hasNext() const { return pos_!=nullptr || !stack_->isEmpty(); }
UBool
UCharsTrie::Iterator::next(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
- const UChar *pos=pos_;
- if(pos==NULL) {
+ const char16_t *pos=pos_;
+ if(pos==nullptr) {
if(stack_->isEmpty()) {
- return FALSE;
+ return false;
}
// Pop the state off the stack and continue with the next outbound edge of
// the branch node.
@@ -117,8 +117,8 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
length=(int32_t)((uint32_t)length>>16);
if(length>1) {
pos=branchNext(pos, length, errorCode);
- if(pos==NULL) {
- return TRUE; // Reached a final value.
+ if(pos==nullptr) {
+ return true; // Reached a final value.
}
} else {
str_.append(*pos++);
@@ -135,7 +135,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
if(skipValue_) {
pos=skipNodeValue(pos, node);
node&=kNodeTypeMask;
- skipValue_=FALSE;
+ skipValue_=false;
} else {
// Deliver value for the string so far.
UBool isFinal=(UBool)(node>>15);
@@ -145,16 +145,16 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
value_=readNodeValue(pos, node);
}
if(isFinal || (maxLength_>0 && str_.length()==maxLength_)) {
- pos_=NULL;
+ pos_=nullptr;
} else {
// We cannot skip the value right here because it shares its
// lead unit with a match node which we have to evaluate
// next time.
// Instead, keep pos_ on the node lead unit itself.
pos_=pos-1;
- skipValue_=TRUE;
+ skipValue_=true;
}
- return TRUE;
+ return true;
}
}
if(maxLength_>0 && str_.length()==maxLength_) {
@@ -165,8 +165,8 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
node=*pos++;
}
pos=branchNext(pos, node+1, errorCode);
- if(pos==NULL) {
- return TRUE; // Reached a final value.
+ if(pos==nullptr) {
+ return true; // Reached a final value.
}
} else {
// Linear-match node, append length units to str_.
@@ -182,8 +182,8 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) {
}
// Branch node, needs to take the first outbound edge and push state for the rest.
-const UChar *
-UCharsTrie::Iterator::branchNext(const UChar *pos, int32_t length, UErrorCode &errorCode) {
+const char16_t *
+UCharsTrie::Iterator::branchNext(const char16_t *pos, int32_t length, UErrorCode &errorCode) {
while(length>kMaxBranchLinearSubNodeLength) {
++pos; // ignore the comparison unit
// Push state for the greater-or-equal edge.
@@ -195,7 +195,7 @@ UCharsTrie::Iterator::branchNext(const UChar *pos, int32_t length, UErrorCode &e
}
// List of key-value pairs where values are either final values or jump deltas.
// Read the first (key, value) pair.
- UChar trieUnit=*pos++;
+ char16_t trieUnit=*pos++;
int32_t node=*pos++;
UBool isFinal=(UBool)(node>>15);
int32_t value=readValue(pos, node&=0x7fff);
@@ -204,9 +204,9 @@ UCharsTrie::Iterator::branchNext(const UChar *pos, int32_t length, UErrorCode &e
stack_->addElement(((length-1)<<16)|str_.length(), errorCode);
str_.append(trieUnit);
if(isFinal) {
- pos_=NULL;
+ pos_=nullptr;
value_=value;
- return NULL;
+ return nullptr;
} else {
return pos+value;
}
diff --git a/contrib/libs/icu/common/uchriter.cpp b/contrib/libs/icu/common/uchriter.cpp
index 2967375a6a3..a7d30977e09 100644
--- a/contrib/libs/icu/common/uchriter.cpp
+++ b/contrib/libs/icu/common/uchriter.cpp
@@ -75,7 +75,7 @@ UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
return false;
}
- UCharCharacterIterator& realThat = (UCharCharacterIterator&)that;
+ const UCharCharacterIterator& realThat = static_cast<const UCharCharacterIterator&>(that);
return text == realThat.text
&& textLength == realThat.textLength
@@ -94,7 +94,7 @@ UCharCharacterIterator::clone() const {
return new UCharCharacterIterator(*this);
}
-UChar
+char16_t
UCharCharacterIterator::first() {
pos = begin;
if(pos < end) {
@@ -104,7 +104,7 @@ UCharCharacterIterator::first() {
}
}
-UChar
+char16_t
UCharCharacterIterator::firstPostInc() {
pos = begin;
if(pos < end) {
@@ -114,7 +114,7 @@ UCharCharacterIterator::firstPostInc() {
}
}
-UChar
+char16_t
UCharCharacterIterator::last() {
pos = end;
if(pos > begin) {
@@ -124,7 +124,7 @@ UCharCharacterIterator::last() {
}
}
-UChar
+char16_t
UCharCharacterIterator::setIndex(int32_t position) {
if(position < begin) {
pos = begin;
@@ -140,7 +140,7 @@ UCharCharacterIterator::setIndex(int32_t position) {
}
}
-UChar
+char16_t
UCharCharacterIterator::current() const {
if (pos >= begin && pos < end) {
return text[pos];
@@ -149,7 +149,7 @@ UCharCharacterIterator::current() const {
}
}
-UChar
+char16_t
UCharCharacterIterator::next() {
if (pos + 1 < end) {
return text[++pos];
@@ -160,7 +160,7 @@ UCharCharacterIterator::next() {
}
}
-UChar
+char16_t
UCharCharacterIterator::nextPostInc() {
if (pos < end) {
return text[pos++];
@@ -171,10 +171,10 @@ UCharCharacterIterator::nextPostInc() {
UBool
UCharCharacterIterator::hasNext() {
- return (UBool)(pos < end ? TRUE : FALSE);
+ return (UBool)(pos < end ? true : false);
}
-UChar
+char16_t
UCharCharacterIterator::previous() {
if (pos > begin) {
return text[--pos];
@@ -185,7 +185,7 @@ UCharCharacterIterator::previous() {
UBool
UCharCharacterIterator::hasPrevious() {
- return (UBool)(pos > begin ? TRUE : FALSE);
+ return (UBool)(pos > begin ? true : false);
}
UChar32
diff --git a/contrib/libs/icu/common/ucln_cmn.cpp b/contrib/libs/icu/common/ucln_cmn.cpp
index f3e07c6b891..c63bd221929 100644
--- a/contrib/libs/icu/common/ucln_cmn.cpp
+++ b/contrib/libs/icu/common/ucln_cmn.cpp
@@ -37,11 +37,11 @@ static cleanupFunc *gLibCleanupFunctions[UCLN_COMMON];
Please be sure that you have read ucln.h
************************************************/
U_CAPI void U_EXPORT2
-u_cleanup(void)
+u_cleanup()
{
UTRACE_ENTRY_OC(UTRACE_U_CLEANUP);
- icu::umtx_lock(NULL); /* Force a memory barrier, so that we are sure to see */
- icu::umtx_unlock(NULL); /* all state left around by any other threads. */
+ icu::umtx_lock(nullptr); /* Force a memory barrier, so that we are sure to see */
+ icu::umtx_unlock(nullptr); /* all state left around by any other threads. */
ucln_lib_cleanup();
@@ -57,7 +57,7 @@ U_CAPI void U_EXPORT2 ucln_cleanupOne(ECleanupLibraryType libType)
if (gLibCleanupFunctions[libType])
{
gLibCleanupFunctions[libType]();
- gLibCleanupFunctions[libType] = NULL;
+ gLibCleanupFunctions[libType] = nullptr;
}
}
@@ -102,7 +102,7 @@ ucln_registerCleanup(ECleanupLibraryType type,
}
}
-U_CFUNC UBool ucln_lib_cleanup(void) {
+U_CFUNC UBool ucln_lib_cleanup() {
int32_t libType = UCLN_START;
int32_t commonFunc = UCLN_COMMON_START;
@@ -114,11 +114,11 @@ U_CFUNC UBool ucln_lib_cleanup(void) {
if (gCommonCleanupFunctions[commonFunc])
{
gCommonCleanupFunctions[commonFunc]();
- gCommonCleanupFunctions[commonFunc] = NULL;
+ gCommonCleanupFunctions[commonFunc] = nullptr;
}
}
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
ucln_unRegisterAutomaticCleanup();
#endif
- return TRUE;
+ return true;
}
diff --git a/contrib/libs/icu/common/ucmndata.cpp b/contrib/libs/icu/common/ucmndata.cpp
index 4215d66257d..69575d4e830 100644
--- a/contrib/libs/icu/common/ucmndata.cpp
+++ b/contrib/libs/icu/common/ucmndata.cpp
@@ -34,7 +34,7 @@
U_CFUNC uint16_t
udata_getHeaderSize(const DataHeader *udh) {
- if(udh==NULL) {
+ if(udh==nullptr) {
return 0;
} else if(udh->info.isBigEndian==U_IS_BIG_ENDIAN) {
/* same endianness */
@@ -48,7 +48,7 @@ udata_getHeaderSize(const DataHeader *udh) {
U_CFUNC uint16_t
udata_getInfoSize(const UDataInfo *info) {
- if(info==NULL) {
+ if(info==nullptr) {
return 0;
} else if(info->isBigEndian==U_IS_BIG_ENDIAN) {
/* same endianness */
@@ -216,7 +216,7 @@ static uint32_t U_CALLCONV
offsetTOCEntryCount(const UDataMemory *pData) {
int32_t retVal=0;
const UDataOffsetTOC *toc = (UDataOffsetTOC *)pData->toc;
- if (toc != NULL) {
+ if (toc != nullptr) {
retVal = toc->count;
}
return retVal;
@@ -229,7 +229,7 @@ offsetTOCLookupFn(const UDataMemory *pData,
UErrorCode *pErrorCode) {
(void)pErrorCode;
const UDataOffsetTOC *toc = (UDataOffsetTOC *)pData->toc;
- if(toc!=NULL) {
+ if(toc!=nullptr) {
const char *base=(const char *)toc;
int32_t number, count=(int32_t)toc->count;
@@ -257,7 +257,7 @@ offsetTOCLookupFn(const UDataMemory *pData,
#ifdef UDATA_DEBUG
fprintf(stderr, "%s: Not found.\n", tocEntryName);
#endif
- return NULL;
+ return nullptr;
}
} else {
#ifdef UDATA_DEBUG
@@ -271,7 +271,7 @@ offsetTOCLookupFn(const UDataMemory *pData,
static uint32_t U_CALLCONV pointerTOCEntryCount(const UDataMemory *pData) {
const PointerTOC *toc = (PointerTOC *)pData->toc;
- return (uint32_t)((toc != NULL) ? (toc->count) : 0);
+ return (uint32_t)((toc != nullptr) ? (toc->count) : 0);
}
static const DataHeader * U_CALLCONV pointerTOCLookupFn(const UDataMemory *pData,
@@ -279,7 +279,7 @@ static const DataHeader * U_CALLCONV pointerTOCLookupFn(const UDataMemory *pData
int32_t *pLength,
UErrorCode *pErrorCode) {
(void)pErrorCode;
- if(pData->toc!=NULL) {
+ if(pData->toc!=nullptr) {
const PointerTOC *toc = (PointerTOC *)pData->toc;
int32_t number, count=(int32_t)toc->count;
@@ -301,7 +301,7 @@ static const DataHeader * U_CALLCONV pointerTOCLookupFn(const UDataMemory *pData
#ifdef UDATA_DEBUG
fprintf(stderr, "%s: Not found.\n", name);
#endif
- return NULL;
+ return nullptr;
}
} else {
return pData->pHeader;
@@ -328,7 +328,7 @@ U_CFUNC void udata_checkCommonData(UDataMemory *udm, UErrorCode *err) {
return;
}
- if(udm==NULL || udm->pHeader==NULL) {
+ if(udm==nullptr || udm->pHeader==nullptr) {
*err=U_INVALID_FORMAT_ERROR;
} else if(!(udm->pHeader->dataHeader.magic1==0xda &&
udm->pHeader->dataHeader.magic2==0x27 &&
diff --git a/contrib/libs/icu/common/ucnv.cpp b/contrib/libs/icu/common/ucnv.cpp
index 5dcf35e0438..a7a07d65d61 100644
--- a/contrib/libs/icu/common/ucnv.cpp
+++ b/contrib/libs/icu/common/ucnv.cpp
@@ -48,7 +48,7 @@
typedef struct UAmbiguousConverter {
const char *name;
- const UChar variant5c;
+ const char16_t variant5c;
} UAmbiguousConverter;
static const UAmbiguousConverter ambiguousConverters[]={
@@ -75,11 +75,11 @@ ucnv_open (const char *name,
{
UConverter *r;
- if (err == NULL || U_FAILURE (*err)) {
- return NULL;
+ if (err == nullptr || U_FAILURE (*err)) {
+ return nullptr;
}
- r = ucnv_createConverter(NULL, name, err);
+ r = ucnv_createConverter(nullptr, name, err);
return r;
}
@@ -89,21 +89,21 @@ ucnv_openPackage (const char *packageName, const char *converterName, UErrorCo
return ucnv_createConverterFromPackage(packageName, converterName, err);
}
-/*Extracts the UChar* to a char* and calls through createConverter */
+/*Extracts the char16_t* to a char* and calls through createConverter */
U_CAPI UConverter* U_EXPORT2
-ucnv_openU (const UChar * name,
+ucnv_openU (const char16_t * name,
UErrorCode * err)
{
char asciiName[UCNV_MAX_CONVERTER_NAME_LENGTH];
- if (err == NULL || U_FAILURE(*err))
- return NULL;
- if (name == NULL)
- return ucnv_open (NULL, err);
+ if (err == nullptr || U_FAILURE(*err))
+ return nullptr;
+ if (name == nullptr)
+ return ucnv_open (nullptr, err);
if (u_strlen(name) >= UCNV_MAX_CONVERTER_NAME_LENGTH)
{
*err = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
return ucnv_open(u_austrcpy(asciiName, name), err);
}
@@ -140,14 +140,14 @@ ucnv_openCCSID (int32_t codepage,
char myName[UCNV_MAX_CONVERTER_NAME_LENGTH];
int32_t myNameLen;
- if (err == NULL || U_FAILURE (*err))
- return NULL;
+ if (err == nullptr || U_FAILURE (*err))
+ return nullptr;
/* ucnv_copyPlatformString could return "ibm-" or "cp" */
myNameLen = ucnv_copyPlatformString(myName, platform);
T_CString_integerToString(myName + myNameLen, codepage, 10);
- return ucnv_createConverter(NULL, myName, err);
+ return ucnv_createConverter(nullptr, myName, err);
}
/* Creating a temporary stack-based object that can be used in one thread,
@@ -163,48 +163,48 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U
UErrorCode cbErr;
UConverterToUnicodeArgs toUArgs = {
sizeof(UConverterToUnicodeArgs),
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ true,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
};
UConverterFromUnicodeArgs fromUArgs = {
sizeof(UConverterFromUnicodeArgs),
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ true,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
};
UTRACE_ENTRY_OC(UTRACE_UCNV_CLONE);
- if (status == NULL || U_FAILURE(*status)){
+ if (status == nullptr || U_FAILURE(*status)){
UTRACE_EXIT_STATUS(status? *status: U_ILLEGAL_ARGUMENT_ERROR);
- return NULL;
+ return nullptr;
}
- if (cnv == NULL) {
+ if (cnv == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
UTRACE_EXIT_STATUS(*status);
- return NULL;
+ return nullptr;
}
UTRACE_DATA3(UTRACE_OPEN_CLOSE, "clone converter %s at %p into stackBuffer %p",
ucnv_getName(cnv, status), cnv, stackBuffer);
- if (cnv->sharedData->impl->safeClone != NULL) {
+ if (cnv->sharedData->impl->safeClone != nullptr) {
/* call the custom safeClone function for sizing */
bufferSizeNeeded = 0;
- cnv->sharedData->impl->safeClone(cnv, NULL, &bufferSizeNeeded, status);
+ cnv->sharedData->impl->safeClone(cnv, nullptr, &bufferSizeNeeded, status);
if (U_FAILURE(*status)) {
UTRACE_EXIT_STATUS(*status);
- return NULL;
+ return nullptr;
}
}
else
@@ -213,7 +213,7 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U
bufferSizeNeeded = sizeof(UConverter);
}
- if (pBufferSize == NULL) {
+ if (pBufferSize == nullptr) {
stackBufferSize = 1;
pBufferSize = &stackBufferSize;
} else {
@@ -221,7 +221,7 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U
if (stackBufferSize <= 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
UTRACE_EXIT_VALUE(bufferSizeNeeded);
- return NULL;
+ return nullptr;
}
}
@@ -242,58 +242,61 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U
}
/* Now, see if we must allocate any memory */
- if (stackBufferSize < bufferSizeNeeded || stackBuffer == NULL)
+ if (stackBufferSize < bufferSizeNeeded || stackBuffer == nullptr)
{
/* allocate one here...*/
localConverter = allocatedConverter = (UConverter *) uprv_malloc (bufferSizeNeeded);
- if(localConverter == NULL) {
+ if(localConverter == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
UTRACE_EXIT_STATUS(*status);
- return NULL;
+ return nullptr;
+ }
+ // If pBufferSize was nullptr as the input, pBufferSize is set to &stackBufferSize in this function.
+ if (pBufferSize != &stackBufferSize) {
+ *status = U_SAFECLONE_ALLOCATED_WARNING;
}
- *status = U_SAFECLONE_ALLOCATED_WARNING;
/* record the fact that memory was allocated */
*pBufferSize = bufferSizeNeeded;
} else {
/* just use the stack buffer */
localConverter = (UConverter*) stackBuffer;
- allocatedConverter = NULL;
+ allocatedConverter = nullptr;
}
uprv_memset(localConverter, 0, bufferSizeNeeded);
/* Copy initial state */
uprv_memcpy(localConverter, cnv, sizeof(UConverter));
- localConverter->isCopyLocal = localConverter->isExtraLocal = FALSE;
+ localConverter->isCopyLocal = localConverter->isExtraLocal = false;
/* copy the substitution string */
if (cnv->subChars == (uint8_t *)cnv->subUChars) {
localConverter->subChars = (uint8_t *)localConverter->subUChars;
} else {
localConverter->subChars = (uint8_t *)uprv_malloc(UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR);
- if (localConverter->subChars == NULL) {
+ if (localConverter->subChars == nullptr) {
uprv_free(allocatedConverter);
UTRACE_EXIT_STATUS(*status);
- return NULL;
+ return nullptr;
}
uprv_memcpy(localConverter->subChars, cnv->subChars, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR);
}
/* now either call the safeclone fcn or not */
- if (cnv->sharedData->impl->safeClone != NULL) {
+ if (cnv->sharedData->impl->safeClone != nullptr) {
/* call the custom safeClone function */
localConverter = cnv->sharedData->impl->safeClone(cnv, localConverter, pBufferSize, status);
}
- if(localConverter==NULL || U_FAILURE(*status)) {
- if (allocatedConverter != NULL && allocatedConverter->subChars != (uint8_t *)allocatedConverter->subUChars) {
+ if(localConverter==nullptr || U_FAILURE(*status)) {
+ if (allocatedConverter != nullptr && allocatedConverter->subChars != (uint8_t *)allocatedConverter->subUChars) {
uprv_free(allocatedConverter->subChars);
}
uprv_free(allocatedConverter);
UTRACE_EXIT_STATUS(*status);
- return NULL;
+ return nullptr;
}
/* increment refcount of shared data if needed */
@@ -303,21 +306,25 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U
if(localConverter == (UConverter*)stackBuffer) {
/* we're using user provided data - set to not destroy */
- localConverter->isCopyLocal = TRUE;
+ localConverter->isCopyLocal = true;
}
/* allow callback functions to handle any memory allocation */
toUArgs.converter = fromUArgs.converter = localConverter;
cbErr = U_ZERO_ERROR;
- cnv->fromCharErrorBehaviour(cnv->toUContext, &toUArgs, NULL, 0, UCNV_CLONE, &cbErr);
+ cnv->fromCharErrorBehaviour(cnv->toUContext, &toUArgs, nullptr, 0, UCNV_CLONE, &cbErr);
cbErr = U_ZERO_ERROR;
- cnv->fromUCharErrorBehaviour(cnv->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLONE, &cbErr);
+ cnv->fromUCharErrorBehaviour(cnv->fromUContext, &fromUArgs, nullptr, 0, 0, UCNV_CLONE, &cbErr);
UTRACE_EXIT_PTR_STATUS(localConverter, *status);
return localConverter;
}
-
+U_CAPI UConverter* U_EXPORT2
+ucnv_clone(const UConverter* cnv, UErrorCode *status)
+{
+ return ucnv_safeClone(cnv, nullptr, nullptr, status);
+}
/*Decreases the reference counter in the shared immutable section of the object
*and frees the mutable part*/
@@ -329,7 +336,7 @@ ucnv_close (UConverter * converter)
UTRACE_ENTRY_OC(UTRACE_UCNV_CLOSE);
- if (converter == NULL)
+ if (converter == nullptr)
{
UTRACE_EXIT();
return;
@@ -345,36 +352,36 @@ ucnv_close (UConverter * converter)
if (converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) {
UConverterToUnicodeArgs toUArgs = {
sizeof(UConverterToUnicodeArgs),
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ true,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
};
toUArgs.converter = converter;
errorCode = U_ZERO_ERROR;
- converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_CLOSE, &errorCode);
+ converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, nullptr, 0, UCNV_CLOSE, &errorCode);
}
if (converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) {
UConverterFromUnicodeArgs fromUArgs = {
sizeof(UConverterFromUnicodeArgs),
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ true,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
};
fromUArgs.converter = converter;
errorCode = U_ZERO_ERROR;
- converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLOSE, &errorCode);
+ converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, nullptr, 0, 0, UCNV_CLOSE, &errorCode);
}
- if (converter->sharedData->impl->close != NULL) {
+ if (converter->sharedData->impl->close != nullptr) {
converter->sharedData->impl->close(converter);
}
@@ -393,7 +400,7 @@ ucnv_close (UConverter * converter)
UTRACE_EXIT();
}
-/*returns a single Name from the list, will return NULL if out of bounds
+/*returns a single Name from the list, will return nullptr if out of bounds
*/
U_CAPI const char* U_EXPORT2
ucnv_getAvailableName (int32_t n)
@@ -405,7 +412,7 @@ ucnv_getAvailableName (int32_t n)
return name;
}
}
- return NULL;
+ return nullptr;
}
U_CAPI int32_t U_EXPORT2
@@ -472,7 +479,7 @@ ucnv_setSubstChars (UConverter * converter,
U_CAPI void U_EXPORT2
ucnv_setSubstString(UConverter *cnv,
- const UChar *s,
+ const char16_t *s,
int32_t length,
UErrorCode *err) {
alignas(UConverter) char cloneBuffer[U_CNV_SAFECLONE_BUFFERSIZE];
@@ -485,14 +492,14 @@ ucnv_setSubstString(UConverter *cnv,
/* Let the following functions check all arguments. */
cloneSize = sizeof(cloneBuffer);
clone = ucnv_safeClone(cnv, cloneBuffer, &cloneSize, err);
- ucnv_setFromUCallBack(clone, UCNV_FROM_U_CALLBACK_STOP, NULL, NULL, NULL, err);
+ ucnv_setFromUCallBack(clone, UCNV_FROM_U_CALLBACK_STOP, nullptr, nullptr, nullptr, err);
length8 = ucnv_fromUChars(clone, chars, (int32_t)sizeof(chars), s, length, err);
ucnv_close(clone);
if (U_FAILURE(*err)) {
return;
}
- if (cnv->sharedData->impl->writeSub == NULL
+ if (cnv->sharedData->impl->writeSub == nullptr
#if !UCONFIG_NO_LEGACY_CONVERSION
|| (cnv->sharedData->staticData->conversionType == UCNV_MBCS &&
ucnv_MBCSGetType(cnv) != UCNV_EBCDIC_STATEFUL)
@@ -510,7 +517,7 @@ ucnv_setSubstString(UConverter *cnv,
if (length > UCNV_ERROR_BUFFER_LENGTH) {
/*
* Should not occur. The converter should output at least one byte
- * per UChar, which means that ucnv_fromUChars() should catch all
+ * per char16_t, which means that ucnv_fromUChars() should catch all
* overflows.
*/
*err = U_BUFFER_OVERFLOW_ERROR;
@@ -532,7 +539,7 @@ ucnv_setSubstString(UConverter *cnv,
if (cnv->subChars == (uint8_t *)cnv->subUChars) {
/* Allocate a new buffer for the string. */
cnv->subChars = (uint8_t *)uprv_malloc(UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR);
- if (cnv->subChars == NULL) {
+ if (cnv->subChars == nullptr) {
cnv->subChars = (uint8_t *)cnv->subUChars;
*err = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -562,7 +569,7 @@ ucnv_setSubstString(UConverter *cnv,
*/
static void _reset(UConverter *converter, UConverterResetChoice choice,
UBool callCallback) {
- if(converter == NULL) {
+ if(converter == nullptr) {
return;
}
@@ -573,32 +580,32 @@ static void _reset(UConverter *converter, UConverterResetChoice choice,
if(choice<=UCNV_RESET_TO_UNICODE && converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) {
UConverterToUnicodeArgs toUArgs = {
sizeof(UConverterToUnicodeArgs),
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ true,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
};
toUArgs.converter = converter;
errorCode = U_ZERO_ERROR;
- converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_RESET, &errorCode);
+ converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, nullptr, 0, UCNV_RESET, &errorCode);
}
if(choice!=UCNV_RESET_TO_UNICODE && converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) {
UConverterFromUnicodeArgs fromUArgs = {
sizeof(UConverterFromUnicodeArgs),
- TRUE,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
+ true,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
};
fromUArgs.converter = converter;
errorCode = U_ZERO_ERROR;
- converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_RESET, &errorCode);
+ converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, nullptr, 0, 0, UCNV_RESET, &errorCode);
}
}
@@ -618,7 +625,7 @@ static void _reset(UConverter *converter, UConverterResetChoice choice,
converter->preFromULength = 0;
}
- if (converter->sharedData->impl->reset != NULL) {
+ if (converter->sharedData->impl->reset != nullptr) {
/* call the custom reset function */
converter->sharedData->impl->reset(converter, choice);
}
@@ -627,19 +634,19 @@ static void _reset(UConverter *converter, UConverterResetChoice choice,
U_CAPI void U_EXPORT2
ucnv_reset(UConverter *converter)
{
- _reset(converter, UCNV_RESET_BOTH, TRUE);
+ _reset(converter, UCNV_RESET_BOTH, true);
}
U_CAPI void U_EXPORT2
ucnv_resetToUnicode(UConverter *converter)
{
- _reset(converter, UCNV_RESET_TO_UNICODE, TRUE);
+ _reset(converter, UCNV_RESET_TO_UNICODE, true);
}
U_CAPI void U_EXPORT2
ucnv_resetFromUnicode(UConverter *converter)
{
- _reset(converter, UCNV_RESET_FROM_UNICODE, TRUE);
+ _reset(converter, UCNV_RESET_FROM_UNICODE, true);
}
U_CAPI int8_t U_EXPORT2
@@ -660,7 +667,7 @@ ucnv_getName (const UConverter * converter, UErrorCode * err)
{
if (U_FAILURE (*err))
- return NULL;
+ return nullptr;
if(converter->sharedData->impl->getName){
const char* temp= converter->sharedData->impl->getName(converter);
if(temp)
@@ -826,7 +833,7 @@ static void
_fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
UConverterFromUnicode fromUnicode;
UConverter *cnv;
- const UChar *s;
+ const char16_t *s;
char *t;
int32_t *offsets;
int32_t sourceIndex;
@@ -834,8 +841,8 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
UBool converterSawEndOfInput, calledCallback;
/* variables for m:n conversion */
- UChar replay[UCNV_EXT_MAX_UCHARS];
- const UChar *realSource, *realSourceLimit;
+ char16_t replay[UCNV_EXT_MAX_UCHARS];
+ const char16_t *realSource, *realSourceLimit;
int32_t realSourceIndex;
UBool realFlush;
@@ -846,11 +853,11 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
/* get the converter implementation function */
sourceIndex=0;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
fromUnicode=cnv->sharedData->impl->fromUnicode;
} else {
fromUnicode=cnv->sharedData->impl->fromUnicodeWithOffsets;
- if(fromUnicode==NULL) {
+ if(fromUnicode==nullptr) {
/* there is no WithOffsets implementation */
fromUnicode=cnv->sharedData->impl->fromUnicode;
/* we will write -1 for each offset */
@@ -860,11 +867,11 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
if(cnv->preFromULength>=0) {
/* normal mode */
- realSource=NULL;
+ realSource=nullptr;
/* avoid compiler warnings - not otherwise necessary, and the values do not matter */
- realSourceLimit=NULL;
- realFlush=FALSE;
+ realSourceLimit=nullptr;
+ realFlush=false;
realSourceIndex=0;
} else {
/*
@@ -880,7 +887,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR);
pArgs->source=replay;
pArgs->sourceLimit=replay-cnv->preFromULength;
- pArgs->flush=FALSE;
+ pArgs->flush=false;
sourceIndex=-1;
cnv->preFromULength=0;
@@ -916,11 +923,11 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
cnv->fromUChar32==0);
} else {
/* handle error from ucnv_convertEx() */
- converterSawEndOfInput=FALSE;
+ converterSawEndOfInput=false;
}
/* no callback called yet for this iteration */
- calledCallback=FALSE;
+ calledCallback=false;
/* no sourceIndex adjustment for conversion, only for callback output */
errorInputLength=0;
@@ -935,7 +942,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
*/
for(;;) {
/* update offsets if we write any */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
int32_t length=(int32_t)(pArgs->target-t);
if(length>0) {
_updateOffsets(offsets, length, sourceIndex, errorInputLength);
@@ -960,7 +967,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
* switch the source to new replay units (cannot occur while replaying)
* after offset handling and before end-of-input and callback handling
*/
- if(realSource==NULL) {
+ if(realSource==nullptr) {
realSource=pArgs->source;
realSourceLimit=pArgs->sourceLimit;
realFlush=pArgs->flush;
@@ -969,7 +976,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR);
pArgs->source=replay;
pArgs->sourceLimit=replay-cnv->preFromULength;
- pArgs->flush=FALSE;
+ pArgs->flush=false;
if((sourceIndex+=cnv->preFromULength)<0) {
sourceIndex=-1;
}
@@ -977,7 +984,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
cnv->preFromULength=0;
} else {
/* see implementation note before _fromUnicodeWithCallback() */
- U_ASSERT(realSource==NULL);
+ U_ASSERT(realSource==nullptr);
*err=U_INTERNAL_PROGRAM_ERROR;
}
}
@@ -993,14 +1000,14 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
* (continue converting by breaking out of only the inner loop)
*/
break;
- } else if(realSource!=NULL) {
+ } else if(realSource!=nullptr) {
/* switch back from replaying to the real source and continue */
pArgs->source=realSource;
pArgs->sourceLimit=realSourceLimit;
pArgs->flush=realFlush;
sourceIndex=realSourceIndex;
- realSource=NULL;
+ realSource=nullptr;
break;
} else if(pArgs->flush && cnv->fromUChar32!=0) {
/*
@@ -1010,7 +1017,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
/* inject an error and continue with callback handling */
*err=U_TRUNCATED_CHAR_FOUND;
- calledCallback=FALSE; /* new error condition */
+ calledCallback=false; /* new error condition */
} else {
/* input consumed */
if(pArgs->flush) {
@@ -1026,7 +1033,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
}
/* reset the converter without calling the callback function */
- _reset(cnv, UCNV_RESET_FROM_UNICODE, FALSE);
+ _reset(cnv, UCNV_RESET_FROM_UNICODE, false);
}
/* done successfully */
@@ -1056,7 +1063,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
* copied back into the UConverter
* and the real arguments must be restored
*/
- if(realSource!=NULL) {
+ if(realSource!=nullptr) {
int32_t length;
U_ASSERT(cnv->preFromULength==0);
@@ -1103,7 +1110,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
* that a callback was called;
* if the callback did not resolve the error, then we return
*/
- calledCallback=TRUE;
+ calledCallback=true;
}
}
}
@@ -1111,7 +1118,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) {
/*
* Output the fromUnicode overflow buffer.
* Call this function if(cnv->charErrorBufferLength>0).
- * @return TRUE if overflow
+ * @return true if overflow
*/
static UBool
ucnv_outputOverflowFromUnicode(UConverter *cnv,
@@ -1123,10 +1130,10 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv,
int32_t i, length;
t=*target;
- if(pOffsets!=NULL) {
+ if(pOffsets!=nullptr) {
offsets=*pOffsets;
} else {
- offsets=NULL;
+ offsets=nullptr;
}
overflow=(char *)cnv->charErrorBuffer;
@@ -1143,16 +1150,16 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv,
cnv->charErrorBufferLength=(int8_t)j;
*target=t;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*pOffsets=offsets;
}
*err=U_BUFFER_OVERFLOW_ERROR;
- return TRUE;
+ return true;
}
/* copy the overflow contents to the target */
*t++=overflow[i++];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1; /* no source index available for old output */
}
}
@@ -1160,29 +1167,29 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv,
/* the overflow buffer is completely copied to the target */
cnv->charErrorBufferLength=0;
*target=t;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*pOffsets=offsets;
}
- return FALSE;
+ return false;
}
U_CAPI void U_EXPORT2
ucnv_fromUnicode(UConverter *cnv,
char **target, const char *targetLimit,
- const UChar **source, const UChar *sourceLimit,
+ const char16_t **source, const char16_t *sourceLimit,
int32_t *offsets,
UBool flush,
UErrorCode *err) {
UConverterFromUnicodeArgs args;
- const UChar *s;
+ const char16_t *s;
char *t;
/* check parameters */
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return;
}
- if(cnv==NULL || target==NULL || source==NULL) {
+ if(cnv==nullptr || target==nullptr || source==nullptr) {
*err=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1193,10 +1200,10 @@ ucnv_fromUnicode(UConverter *cnv,
if ((const void *)U_MAX_PTR(sourceLimit) == (const void *)sourceLimit) {
/*
Prevent code from going into an infinite loop in case we do hit this
- limit. The limit pointer is expected to be on a UChar * boundary.
+ limit. The limit pointer is expected to be on a char16_t * boundary.
This also prevents the next argument check from failing.
*/
- sourceLimit = (const UChar *)(((const char *)sourceLimit) - 1);
+ sourceLimit = (const char16_t *)(((const char *)sourceLimit) - 1);
}
/*
@@ -1215,8 +1222,8 @@ ucnv_fromUnicode(UConverter *cnv,
* consumed or the target filled (unless an error occurs).
* An adjustment would be targetLimit=t+0x7fffffff; for example.
*
- * 3) Make sure that the user didn't incorrectly cast a UChar * pointer
- * to a char * pointer and provide an incomplete UChar code unit.
+ * 3) Make sure that the user didn't incorrectly cast a char16_t * pointer
+ * to a char * pointer and provide an incomplete char16_t code unit.
*/
if (sourceLimit<s || targetLimit<t ||
((size_t)(sourceLimit-s)>(size_t)0x3fffffff && sourceLimit>s) ||
@@ -1272,7 +1279,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
UConverterToUnicode toUnicode;
UConverter *cnv;
const char *s;
- UChar *t;
+ char16_t *t;
int32_t *offsets;
int32_t sourceIndex;
int32_t errorInputLength;
@@ -1291,11 +1298,11 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
/* get the converter implementation function */
sourceIndex=0;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
toUnicode=cnv->sharedData->impl->toUnicode;
} else {
toUnicode=cnv->sharedData->impl->toUnicodeWithOffsets;
- if(toUnicode==NULL) {
+ if(toUnicode==nullptr) {
/* there is no WithOffsets implementation */
toUnicode=cnv->sharedData->impl->toUnicode;
/* we will write -1 for each offset */
@@ -1305,11 +1312,11 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
if(cnv->preToULength>=0) {
/* normal mode */
- realSource=NULL;
+ realSource=nullptr;
/* avoid compiler warnings - not otherwise necessary, and the values do not matter */
- realSourceLimit=NULL;
- realFlush=FALSE;
+ realSourceLimit=nullptr;
+ realFlush=false;
realSourceIndex=0;
} else {
/*
@@ -1325,7 +1332,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
uprv_memcpy(replay, cnv->preToU, -cnv->preToULength);
pArgs->source=replay;
pArgs->sourceLimit=replay-cnv->preToULength;
- pArgs->flush=FALSE;
+ pArgs->flush=false;
sourceIndex=-1;
cnv->preToULength=0;
@@ -1361,11 +1368,11 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
cnv->toULength==0);
} else {
/* handle error from getNextUChar() or ucnv_convertEx() */
- converterSawEndOfInput=FALSE;
+ converterSawEndOfInput=false;
}
/* no callback called yet for this iteration */
- calledCallback=FALSE;
+ calledCallback=false;
/* no sourceIndex adjustment for conversion, only for callback output */
errorInputLength=0;
@@ -1380,7 +1387,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
*/
for(;;) {
/* update offsets if we write any */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
int32_t length=(int32_t)(pArgs->target-t);
if(length>0) {
_updateOffsets(offsets, length, sourceIndex, errorInputLength);
@@ -1405,7 +1412,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
* switch the source to new replay units (cannot occur while replaying)
* after offset handling and before end-of-input and callback handling
*/
- if(realSource==NULL) {
+ if(realSource==nullptr) {
realSource=pArgs->source;
realSourceLimit=pArgs->sourceLimit;
realFlush=pArgs->flush;
@@ -1414,7 +1421,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
uprv_memcpy(replay, cnv->preToU, -cnv->preToULength);
pArgs->source=replay;
pArgs->sourceLimit=replay-cnv->preToULength;
- pArgs->flush=FALSE;
+ pArgs->flush=false;
if((sourceIndex+=cnv->preToULength)<0) {
sourceIndex=-1;
}
@@ -1422,7 +1429,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
cnv->preToULength=0;
} else {
/* see implementation note before _fromUnicodeWithCallback() */
- U_ASSERT(realSource==NULL);
+ U_ASSERT(realSource==nullptr);
*err=U_INTERNAL_PROGRAM_ERROR;
}
}
@@ -1438,14 +1445,14 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
* (continue converting by breaking out of only the inner loop)
*/
break;
- } else if(realSource!=NULL) {
+ } else if(realSource!=nullptr) {
/* switch back from replaying to the real source and continue */
pArgs->source=realSource;
pArgs->sourceLimit=realSourceLimit;
pArgs->flush=realFlush;
sourceIndex=realSourceIndex;
- realSource=NULL;
+ realSource=nullptr;
break;
} else if(pArgs->flush && cnv->toULength>0) {
/*
@@ -1455,7 +1462,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
/* inject an error and continue with callback handling */
*err=U_TRUNCATED_CHAR_FOUND;
- calledCallback=FALSE; /* new error condition */
+ calledCallback=false; /* new error condition */
} else {
/* input consumed */
if(pArgs->flush) {
@@ -1471,7 +1478,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
}
/* reset the converter without calling the callback function */
- _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE);
+ _reset(cnv, UCNV_RESET_TO_UNICODE, false);
}
/* done successfully */
@@ -1503,7 +1510,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
* copied back into the UConverter
* and the real arguments must be restored
*/
- if(realSource!=NULL) {
+ if(realSource!=nullptr) {
int32_t length;
U_ASSERT(cnv->preToULength==0);
@@ -1549,7 +1556,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
* that a callback was called;
* if the callback did not resolve the error, then we return
*/
- calledCallback=TRUE;
+ calledCallback=true;
}
}
}
@@ -1557,22 +1564,22 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
/*
* Output the toUnicode overflow buffer.
* Call this function if(cnv->UCharErrorBufferLength>0).
- * @return TRUE if overflow
+ * @return true if overflow
*/
static UBool
ucnv_outputOverflowToUnicode(UConverter *cnv,
- UChar **target, const UChar *targetLimit,
+ char16_t **target, const char16_t *targetLimit,
int32_t **pOffsets,
UErrorCode *err) {
int32_t *offsets;
- UChar *overflow, *t;
+ char16_t *overflow, *t;
int32_t i, length;
t=*target;
- if(pOffsets!=NULL) {
+ if(pOffsets!=nullptr) {
offsets=*pOffsets;
} else {
- offsets=NULL;
+ offsets=nullptr;
}
overflow=cnv->UCharErrorBuffer;
@@ -1589,16 +1596,16 @@ ucnv_outputOverflowToUnicode(UConverter *cnv,
cnv->UCharErrorBufferLength=(int8_t)j;
*target=t;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*pOffsets=offsets;
}
*err=U_BUFFER_OVERFLOW_ERROR;
- return TRUE;
+ return true;
}
/* copy the overflow contents to the target */
*t++=overflow[i++];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1; /* no source index available for old output */
}
}
@@ -1606,29 +1613,29 @@ ucnv_outputOverflowToUnicode(UConverter *cnv,
/* the overflow buffer is completely copied to the target */
cnv->UCharErrorBufferLength=0;
*target=t;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*pOffsets=offsets;
}
- return FALSE;
+ return false;
}
U_CAPI void U_EXPORT2
ucnv_toUnicode(UConverter *cnv,
- UChar **target, const UChar *targetLimit,
+ char16_t **target, const char16_t *targetLimit,
const char **source, const char *sourceLimit,
int32_t *offsets,
UBool flush,
UErrorCode *err) {
UConverterToUnicodeArgs args;
const char *s;
- UChar *t;
+ char16_t *t;
/* check parameters */
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return;
}
- if(cnv==NULL || target==NULL || source==NULL) {
+ if(cnv==nullptr || target==nullptr || source==nullptr) {
*err=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1639,10 +1646,10 @@ ucnv_toUnicode(UConverter *cnv,
if ((const void *)U_MAX_PTR(targetLimit) == (const void *)targetLimit) {
/*
Prevent code from going into an infinite loop in case we do hit this
- limit. The limit pointer is expected to be on a UChar * boundary.
+ limit. The limit pointer is expected to be on a char16_t * boundary.
This also prevents the next argument check from failing.
*/
- targetLimit = (const UChar *)(((const char *)targetLimit) - 1);
+ targetLimit = (const char16_t *)(((const char *)targetLimit) - 1);
}
/*
@@ -1661,8 +1668,8 @@ ucnv_toUnicode(UConverter *cnv,
* consumed or the target filled (unless an error occurs).
* An adjustment would be sourceLimit=t+0x7fffffff; for example.
*
- * 3) Make sure that the user didn't incorrectly cast a UChar * pointer
- * to a char * pointer and provide an incomplete UChar code unit.
+ * 3) Make sure that the user didn't incorrectly cast a char16_t * pointer
+ * to a char * pointer and provide an incomplete char16_t code unit.
*/
if (sourceLimit<s || targetLimit<t ||
((size_t)(sourceLimit-s)>(size_t)0x7fffffff && sourceLimit>s) ||
@@ -1716,20 +1723,20 @@ ucnv_toUnicode(UConverter *cnv,
U_CAPI int32_t U_EXPORT2
ucnv_fromUChars(UConverter *cnv,
char *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ const char16_t *src, int32_t srcLength,
UErrorCode *pErrorCode) {
- const UChar *srcLimit;
+ const char16_t *srcLimit;
char *originalDest, *destLimit;
int32_t destLength;
/* check arguments */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if( cnv==NULL ||
- destCapacity<0 || (destCapacity>0 && dest==NULL) ||
- srcLength<-1 || (srcLength!=0 && src==NULL)
+ if( cnv==nullptr ||
+ destCapacity<0 || (destCapacity>0 && dest==nullptr) ||
+ srcLength<-1 || (srcLength!=0 && src==nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -1747,7 +1754,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, 0, true, pErrorCode);
destLength=(int32_t)(dest-originalDest);
/* if an overflow occurs, then get the preflighting length */
@@ -1758,7 +1765,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, 0, true, pErrorCode);
destLength+=(int32_t)(dest-buffer);
} while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR);
}
@@ -1771,21 +1778,21 @@ ucnv_fromUChars(UConverter *cnv,
U_CAPI int32_t U_EXPORT2
ucnv_toUChars(UConverter *cnv,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
UErrorCode *pErrorCode) {
const char *srcLimit;
- UChar *originalDest, *destLimit;
+ char16_t *originalDest, *destLimit;
int32_t destLength;
/* check arguments */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if( cnv==NULL ||
- destCapacity<0 || (destCapacity>0 && dest==NULL) ||
- srcLength<-1 || (srcLength!=0 && src==NULL))
+ if( cnv==nullptr ||
+ destCapacity<0 || (destCapacity>0 && dest==nullptr) ||
+ srcLength<-1 || (srcLength!=0 && src==nullptr))
{
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -1803,19 +1810,19 @@ 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, 0, true, pErrorCode);
destLength=(int32_t)(dest-originalDest);
/* if an overflow occurs, then get the preflighting length */
if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR)
{
- UChar buffer[1024];
+ char16_t buffer[1024];
destLimit=buffer+UPRV_LENGTHOF(buffer);
do {
dest=buffer;
*pErrorCode=U_ZERO_ERROR;
- ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode);
+ ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode);
destLength+=(int32_t)(dest-buffer);
}
while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR);
@@ -1834,17 +1841,17 @@ ucnv_getNextUChar(UConverter *cnv,
const char **source, const char *sourceLimit,
UErrorCode *err) {
UConverterToUnicodeArgs args;
- UChar buffer[U16_MAX_LENGTH];
+ char16_t buffer[U16_MAX_LENGTH];
const char *s;
UChar32 c;
int32_t i, length;
/* check parameters */
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return 0xffff;
}
- if(cnv==NULL || source==NULL) {
+ if(cnv==nullptr || source==nullptr) {
*err=U_ILLEGAL_ARGUMENT_ERROR;
return 0xffff;
}
@@ -1876,7 +1883,7 @@ ucnv_getNextUChar(UConverter *cnv,
/* flush the target overflow buffer */
if(cnv->UCharErrorBufferLength>0) {
- UChar *overflow;
+ char16_t *overflow;
overflow=cnv->UCharErrorBuffer;
i=0;
@@ -1900,16 +1907,16 @@ ucnv_getNextUChar(UConverter *cnv,
}
/*
- * flush==TRUE is implied for ucnv_getNextUChar()
+ * flush==true is implied for ucnv_getNextUChar()
*
* do not simply return even if s==sourceLimit because the converter may
- * not have seen flush==TRUE before
+ * not have seen flush==true before
*/
/* prepare the converter arguments */
args.converter=cnv;
- args.flush=TRUE;
- args.offsets=NULL;
+ args.flush=true;
+ args.offsets=nullptr;
args.source=s;
args.sourceLimit=sourceLimit;
args.target=buffer;
@@ -1925,12 +1932,12 @@ ucnv_getNextUChar(UConverter *cnv,
* U_TRUNCATED_CHAR_FOUND for truncated input,
* in addition to setting toULength/toUBytes[]
*/
- if(cnv->toULength==0 && cnv->sharedData->impl->getNextUChar!=NULL) {
+ if(cnv->toULength==0 && cnv->sharedData->impl->getNextUChar!=nullptr) {
c=cnv->sharedData->impl->getNextUChar(&args, err);
*source=s=args.source;
if(*err==U_INDEX_OUTOFBOUNDS_ERROR) {
/* reset the converter without calling the callback function */
- _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE);
+ _reset(cnv, UCNV_RESET_TO_UNICODE, false);
return 0xffff; /* no output */
} else if(U_SUCCESS(*err) && c>=0) {
return c;
@@ -1942,7 +1949,7 @@ ucnv_getNextUChar(UConverter *cnv,
}
}
- /* convert to one UChar in buffer[0], or handle getNextUChar() errors */
+ /* convert to one char16_t in buffer[0], or handle getNextUChar() errors */
_toUnicodeWithCallback(&args, err);
if(*err==U_BUFFER_OVERFLOW_ERROR) {
@@ -1953,7 +1960,7 @@ ucnv_getNextUChar(UConverter *cnv,
length=(int32_t)(args.target-buffer);
} else {
/* write the lead surrogate from the overflow buffer */
- buffer[0]=(UChar)c;
+ buffer[0]=(char16_t)c;
args.target=buffer+1;
i=0;
length=1;
@@ -1975,7 +1982,7 @@ ucnv_getNextUChar(UConverter *cnv,
/* consume c=buffer[0], done */
} else {
/* got a lead surrogate, see if a trail surrogate follows */
- UChar c2;
+ char16_t c2;
if(cnv->UCharErrorBufferLength>0) {
/* got overflow output from the conversion */
@@ -2038,13 +2045,13 @@ U_CAPI void U_EXPORT2
ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
char **target, const char *targetLimit,
const char **source, const char *sourceLimit,
- UChar *pivotStart, UChar **pivotSource,
- UChar **pivotTarget, const UChar *pivotLimit,
+ char16_t *pivotStart, char16_t **pivotSource,
+ char16_t **pivotTarget, const char16_t *pivotLimit,
UBool reset, UBool flush,
UErrorCode *pErrorCode) {
- UChar pivotBuffer[CHUNK_SIZE];
- const UChar *myPivotSource;
- UChar *myPivotTarget;
+ char16_t pivotBuffer[CHUNK_SIZE];
+ const char16_t *myPivotSource;
+ char16_t *myPivotTarget;
const char *s;
char *t;
@@ -2053,13 +2060,13 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
UConverterConvert convert;
/* error checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
- if( targetCnv==NULL || sourceCnv==NULL ||
- source==NULL || *source==NULL ||
- target==NULL || *target==NULL || targetLimit==NULL
+ if( targetCnv==nullptr || sourceCnv==nullptr ||
+ source==nullptr || *source==nullptr ||
+ target==nullptr || *target==nullptr || targetLimit==nullptr
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
@@ -2067,7 +2074,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
s=*source;
t=*target;
- if((sourceLimit!=NULL && sourceLimit<s) || targetLimit<t) {
+ if((sourceLimit!=nullptr && sourceLimit<s) || targetLimit<t) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -2077,14 +2084,14 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
* int32_t. See ucnv_toUnicode() for a more detailed comment.
*/
if(
- (sourceLimit!=NULL && ((size_t)(sourceLimit-s)>(size_t)0x7fffffff && sourceLimit>s)) ||
+ (sourceLimit!=nullptr && ((size_t)(sourceLimit-s)>(size_t)0x7fffffff && sourceLimit>s)) ||
((size_t)(targetLimit-t)>(size_t)0x7fffffff && targetLimit>t)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- if(pivotStart==NULL) {
+ if(pivotStart==nullptr) {
if(!flush) {
/* streaming conversion requires an explicit pivot buffer */
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
@@ -2093,19 +2100,19 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
/* use the stack pivot buffer */
myPivotSource=myPivotTarget=pivotStart=pivotBuffer;
- pivotSource=(UChar **)&myPivotSource;
+ pivotSource=(char16_t **)&myPivotSource;
pivotTarget=&myPivotTarget;
pivotLimit=pivotBuffer+CHUNK_SIZE;
} else if( pivotStart>=pivotLimit ||
- pivotSource==NULL || *pivotSource==NULL ||
- pivotTarget==NULL || *pivotTarget==NULL ||
- pivotLimit==NULL
+ pivotSource==nullptr || *pivotSource==nullptr ||
+ pivotTarget==nullptr || *pivotTarget==nullptr ||
+ pivotLimit==nullptr
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- if(sourceLimit==NULL) {
+ if(sourceLimit==nullptr) {
/* get limit of single-byte-NUL-terminated source string */
sourceLimit=uprv_strchr(*source, 0);
}
@@ -2116,7 +2123,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
*pivotSource=*pivotTarget=pivotStart;
} else if(targetCnv->charErrorBufferLength>0) {
/* output the targetCnv overflow buffer */
- if(ucnv_outputOverflowFromUnicode(targetCnv, target, targetLimit, NULL, pErrorCode)) {
+ if(ucnv_outputOverflowFromUnicode(targetCnv, target, targetLimit, nullptr, pErrorCode)) {
/* U_BUFFER_OVERFLOW_ERROR */
return;
}
@@ -2133,15 +2140,15 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
/* Is direct-UTF-8 conversion available? */
if( sourceCnv->sharedData->staticData->conversionType==UCNV_UTF8 &&
- targetCnv->sharedData->impl->fromUTF8!=NULL
+ targetCnv->sharedData->impl->fromUTF8!=nullptr
) {
convert=targetCnv->sharedData->impl->fromUTF8;
} else if( targetCnv->sharedData->staticData->conversionType==UCNV_UTF8 &&
- sourceCnv->sharedData->impl->toUTF8!=NULL
+ sourceCnv->sharedData->impl->toUTF8!=nullptr
) {
convert=sourceCnv->sharedData->impl->toUTF8;
} else {
- convert=NULL;
+ convert=nullptr;
}
/*
@@ -2163,21 +2170,21 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
* conversion, with function call overhead outweighing the benefits
* of direct conversion.
*/
- if(convert!=NULL && (pivotLimit-pivotStart)>32) {
+ if(convert!=nullptr && (pivotLimit-pivotStart)>32) {
pivotLimit=pivotStart+32;
}
/* prepare the converter arguments */
fromUArgs.converter=targetCnv;
- fromUArgs.flush=FALSE;
- fromUArgs.offsets=NULL;
+ fromUArgs.flush=false;
+ fromUArgs.offsets=nullptr;
fromUArgs.target=*target;
fromUArgs.targetLimit=targetLimit;
fromUArgs.size=sizeof(fromUArgs);
toUArgs.converter=sourceCnv;
toUArgs.flush=flush;
- toUArgs.offsets=NULL;
+ toUArgs.offsets=nullptr;
toUArgs.source=s;
toUArgs.sourceLimit=sourceLimit;
toUArgs.targetLimit=pivotLimit;
@@ -2190,7 +2197,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
*
* Otherwise stop using s and t from here on.
*/
- s=t=NULL;
+ s=t=nullptr;
/*
* conversion loop
@@ -2222,7 +2229,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
_fromUnicodeWithCallback(&fromUArgs, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
/* target overflow, or conversion error */
- *pivotSource=(UChar *)fromUArgs.source;
+ *pivotSource=(char16_t *)fromUArgs.source;
break;
}
@@ -2243,7 +2250,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
*/
/* output the sourceCnv overflow buffer */
if(sourceCnv->UCharErrorBufferLength>0) {
- if(ucnv_outputOverflowToUnicode(sourceCnv, pivotTarget, pivotLimit, NULL, pErrorCode)) {
+ if(ucnv_outputOverflowToUnicode(sourceCnv, pivotTarget, pivotLimit, nullptr, pErrorCode)) {
/* U_BUFFER_OVERFLOW_ERROR */
*pErrorCode=U_ZERO_ERROR;
}
@@ -2270,7 +2277,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
* but not if continuing a partial match
* or flushing the toUnicode replay buffer
*/
- if(convert!=NULL && targetCnv->preFromUFirstCP<0 && sourceCnv->preToULength==0) {
+ if(convert!=nullptr && targetCnv->preFromUFirstCP<0 && sourceCnv->preToULength==0) {
if(*pErrorCode==U_USING_DEFAULT_WARNING) {
/* remove a warning that may be set by this function */
*pErrorCode=U_ZERO_ERROR;
@@ -2324,8 +2331,8 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
/* input consumed */
if(flush) {
/* reset the converters without calling the callback functions */
- _reset(sourceCnv, UCNV_RESET_TO_UNICODE, FALSE);
- _reset(targetCnv, UCNV_RESET_FROM_UNICODE, FALSE);
+ _reset(sourceCnv, UCNV_RESET_TO_UNICODE, false);
+ _reset(targetCnv, UCNV_RESET_FROM_UNICODE, false);
}
/* done successfully */
@@ -2365,7 +2372,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
sourceCnv->preToULength>=0 &&
sourceCnv->UCharErrorBufferLength==0
) {
- fromUArgs.flush=TRUE;
+ fromUArgs.flush=true;
}
}
@@ -2398,8 +2405,8 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) {
- UChar pivotBuffer[CHUNK_SIZE];
- UChar *pivot, *pivot2;
+ char16_t pivotBuffer[CHUNK_SIZE];
+ char16_t *pivot, *pivot2;
char *myTarget;
const char *sourceLimit;
@@ -2429,8 +2436,8 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter,
&myTarget, targetLimit,
&source, sourceLimit,
pivotBuffer, &pivot, &pivot2, pivotBuffer+CHUNK_SIZE,
- FALSE,
- TRUE,
+ false,
+ true,
pErrorCode);
targetLength=(int32_t)(myTarget-target);
}
@@ -2452,8 +2459,8 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter,
&myTarget, targetLimit,
&source, sourceLimit,
pivotBuffer, &pivot, &pivot2, pivotBuffer+CHUNK_SIZE,
- FALSE,
- TRUE,
+ false,
+ true,
pErrorCode);
targetLength+=(int32_t)(myTarget-targetBuffer);
} while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR);
@@ -2475,12 +2482,12 @@ ucnv_convert(const char *toConverterName, const char *fromConverterName,
UConverter *inConverter, *outConverter;
int32_t targetLength;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if( source==NULL || sourceLength<-1 ||
- targetCapacity<0 || (targetCapacity>0 && target==NULL)
+ if( source==nullptr || sourceLength<-1 ||
+ targetCapacity<0 || (targetCapacity>0 && target==nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -2526,12 +2533,12 @@ ucnv_convertAlgorithmic(UBool convertToAlgorithmic,
UConverter *algoConverter, *to, *from;
int32_t targetLength;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if( cnv==NULL || source==NULL || sourceLength<-1 ||
- targetCapacity<0 || (targetCapacity>0 && target==NULL)
+ if( cnv==nullptr || source==nullptr || sourceLength<-1 ||
+ targetCapacity<0 || (targetCapacity>0 && target==nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -2578,7 +2585,7 @@ ucnv_toAlgorithmic(UConverterType algorithmicType,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) {
- return ucnv_convertAlgorithmic(TRUE, algorithmicType, cnv,
+ return ucnv_convertAlgorithmic(true, algorithmicType, cnv,
target, targetCapacity,
source, sourceLength,
pErrorCode);
@@ -2589,8 +2596,13 @@ ucnv_fromAlgorithmic(UConverter *cnv,
UConverterType algorithmicType,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
- UErrorCode *pErrorCode) {
- return ucnv_convertAlgorithmic(FALSE, algorithmicType, cnv,
+ UErrorCode *pErrorCode) UPRV_NO_SANITIZE_UNDEFINED {
+
+ if(algorithmicType<0 || UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES<=algorithmicType) {
+ *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+ return ucnv_convertAlgorithmic(false, algorithmicType, cnv,
target, targetCapacity,
source, sourceLength,
pErrorCode);
@@ -2613,11 +2625,11 @@ ucnv_getStarters(const UConverter* converter,
UBool starters[256],
UErrorCode* err)
{
- if (err == NULL || U_FAILURE(*err)) {
+ if (err == nullptr || U_FAILURE(*err)) {
return;
}
- if(converter->sharedData->impl->getStarters != NULL) {
+ if(converter->sharedData->impl->getStarters != nullptr) {
converter->sharedData->impl->getStarters(converter, starters, err);
} else {
*err = U_ILLEGAL_ARGUMENT_ERROR;
@@ -2630,14 +2642,14 @@ static const UAmbiguousConverter *ucnv_getAmbiguous(const UConverter *cnv)
const char *name;
int32_t i;
- if(cnv==NULL) {
- return NULL;
+ if(cnv==nullptr) {
+ return nullptr;
}
errorCode=U_ZERO_ERROR;
name=ucnv_getName(cnv, &errorCode);
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
for(i=0; i<UPRV_LENGTHOF(ambiguousConverters); ++i)
@@ -2648,18 +2660,18 @@ static const UAmbiguousConverter *ucnv_getAmbiguous(const UConverter *cnv)
}
}
- return NULL;
+ return nullptr;
}
U_CAPI void U_EXPORT2
ucnv_fixFileSeparator(const UConverter *cnv,
- UChar* source,
+ char16_t* source,
int32_t sourceLength) {
const UAmbiguousConverter *a;
int32_t i;
- UChar variant5c;
+ char16_t variant5c;
- if(cnv==NULL || source==NULL || sourceLength<=0 || (a=ucnv_getAmbiguous(cnv))==NULL)
+ if(cnv==nullptr || source==nullptr || sourceLength<=0 || (a=ucnv_getAmbiguous(cnv))==nullptr)
{
return;
}
@@ -2674,7 +2686,7 @@ ucnv_fixFileSeparator(const UConverter *cnv,
U_CAPI UBool U_EXPORT2
ucnv_isAmbiguous(const UConverter *cnv) {
- return (UBool)(ucnv_getAmbiguous(cnv)!=NULL);
+ return (UBool)(ucnv_getAmbiguous(cnv)!=nullptr);
}
U_CAPI void U_EXPORT2
@@ -2695,11 +2707,11 @@ ucnv_getInvalidChars (const UConverter * converter,
int8_t * len,
UErrorCode * err)
{
- if (err == NULL || U_FAILURE(*err))
+ if (err == nullptr || U_FAILURE(*err))
{
return;
}
- if (len == NULL || errBytes == NULL || converter == NULL)
+ if (len == nullptr || errBytes == nullptr || converter == nullptr)
{
*err = U_ILLEGAL_ARGUMENT_ERROR;
return;
@@ -2717,15 +2729,15 @@ ucnv_getInvalidChars (const UConverter * converter,
U_CAPI void U_EXPORT2
ucnv_getInvalidUChars (const UConverter * converter,
- UChar *errChars,
+ char16_t *errChars,
int8_t * len,
UErrorCode * err)
{
- if (err == NULL || U_FAILURE(*err))
+ if (err == nullptr || U_FAILURE(*err))
{
return;
}
- if (len == NULL || errChars == NULL || converter == NULL)
+ if (len == nullptr || errChars == nullptr || converter == nullptr)
{
*err = U_ILLEGAL_ARGUMENT_ERROR;
return;
@@ -2756,16 +2768,16 @@ ucnv_detectUnicodeSignature( const char* source,
char start[SIG_MAX_LEN]={ '\xa5', '\xa5', '\xa5', '\xa5', '\xa5' };
int i = 0;
- if((pErrorCode==NULL) || U_FAILURE(*pErrorCode)){
- return NULL;
+ if((pErrorCode==nullptr) || U_FAILURE(*pErrorCode)){
+ return nullptr;
}
- if(source == NULL || sourceLength < -1){
+ if(source == nullptr || sourceLength < -1){
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(signatureLength == NULL) {
+ if(signatureLength == nullptr) {
signatureLength = &dummy;
}
@@ -2829,16 +2841,16 @@ ucnv_detectUnicodeSignature( const char* source,
/* no known Unicode signature byte sequence recognized */
*signatureLength=0;
- return NULL;
+ return nullptr;
}
U_CAPI int32_t U_EXPORT2
ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status)
{
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return -1;
}
- if(cnv == NULL){
+ if(cnv == nullptr){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -2857,10 +2869,10 @@ ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status)
U_CAPI int32_t U_EXPORT2
ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status){
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return -1;
}
- if(cnv == NULL){
+ if(cnv == nullptr){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -2878,12 +2890,12 @@ ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status){
U_CAPI UBool U_EXPORT2
ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
- if (cnv == NULL) {
+ if (cnv == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
switch (ucnv_getType(cnv)) {
@@ -2893,9 +2905,9 @@ ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){
case UCNV_UTF32_LittleEndian:
case UCNV_UTF32:
case UCNV_US_ASCII:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
#endif
diff --git a/contrib/libs/icu/common/ucnv2022.cpp b/contrib/libs/icu/common/ucnv2022.cpp
index aa1e169c99c..5989c1b405a 100644
--- a/contrib/libs/icu/common/ucnv2022.cpp
+++ b/contrib/libs/icu/common/ucnv2022.cpp
@@ -348,13 +348,13 @@ static const int32_t escSeqStateTable_Key_2022[MAX_STATES_2022] = {
static const char* const escSeqStateTable_Result_2022[MAX_STATES_2022] = {
/* 0 1 2 3 4 5 6 7 8 9 */
- NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,"latin1" ,"latin1"
+ nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,"latin1" ,"latin1"
,"latin1" ,"ibm-865" ,"ibm-865" ,"ibm-865" ,"ibm-865" ,"ibm-865" ,"ibm-865" ,"JISX0201" ,"JISX0201" ,"latin1"
- ,"latin1" ,NULL ,"JISX-208" ,"ibm-5478" ,"JISX-208" ,NULL ,NULL ,NULL ,NULL ,"UTF8"
- ,"ISO-8859-1" ,"ISO-8859-7" ,"JIS-X-208" ,NULL ,"ibm-955" ,"ibm-367" ,"ibm-952" ,"ibm-949" ,"JISX-212" ,"ibm-1383"
+ ,"latin1" ,nullptr ,"JISX-208" ,"ibm-5478" ,"JISX-208" ,nullptr ,nullptr ,nullptr ,nullptr ,"UTF8"
+ ,"ISO-8859-1" ,"ISO-8859-7" ,"JIS-X-208" ,nullptr ,"ibm-955" ,"ibm-367" ,"ibm-952" ,"ibm-949" ,"JISX-212" ,"ibm-1383"
,"ibm-952" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-5478" ,"ibm-949" ,"ISO-IR-165"
,"CNS-11643-1992,1" ,"CNS-11643-1992,2" ,"CNS-11643-1992,3" ,"CNS-11643-1992,4" ,"CNS-11643-1992,5" ,"CNS-11643-1992,6" ,"CNS-11643-1992,7" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian"
- ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,NULL ,"latin1" ,"ibm-912" ,"ibm-913" ,"ibm-914" ,"ibm-813" ,"ibm-1089"
+ ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,nullptr ,"latin1" ,"ibm-912" ,"ibm-913" ,"ibm-914" ,"ibm-813" ,"ibm-1089"
,"ibm-920" ,"ibm-915" ,"ibm-915" ,"latin1"
};
@@ -481,7 +481,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
char myLocale[7]={' ',' ',' ',' ',' ',' ', '\0'};
cnv->extraInfo = uprv_malloc (sizeof (UConverterDataISO2022));
- if(cnv->extraInfo != NULL) {
+ if(cnv->extraInfo != nullptr) {
UConverterNamePieces stackPieces;
UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
UConverterDataISO2022 *myConverterData=(UConverterDataISO2022 *) cnv->extraInfo;
@@ -491,7 +491,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
uprv_memset(myConverterData, 0, sizeof(UConverterDataISO2022));
myConverterData->currentType = ASCII1;
- cnv->fromUnicodeStatus =FALSE;
+ cnv->fromUnicodeStatus =false;
if(pArgs->locale){
uprv_strncpy(myLocale, pArgs->locale, sizeof(myLocale)-1);
}
@@ -557,7 +557,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
if(pArgs->onlyTestIsLoadable) {
ucnv_canCreateConverter(cnvName, errorCode); /* errorCode carries result */
uprv_free(cnv->extraInfo);
- cnv->extraInfo=NULL;
+ cnv->extraInfo=nullptr;
return;
} else {
myConverterData->currentConverter=ucnv_open(cnvName, errorCode);
@@ -623,7 +623,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
#endif // !UCONFIG_ONLY_HTML_CONVERSION
else{
#ifdef U_ENABLE_GENERIC_ISO_2022
- myConverterData->isFirstBuffer = TRUE;
+ myConverterData->isFirstBuffer = true;
/* append the UTF-8 escape sequence */
cnv->charErrorBufferLength = 3;
@@ -659,10 +659,10 @@ _ISO2022Close(UConverter *converter) {
UConverterSharedData **array = myData->myConverterArray;
int32_t i;
- if (converter->extraInfo != NULL) {
+ if (converter->extraInfo != nullptr) {
/*close the array of converter pointers and free the memory*/
for (i=0; i<UCNV_2022_MAX_CONVERTERS; i++) {
- if(array[i]!=NULL) {
+ if(array[i]!=nullptr) {
ucnv_unloadSharedDataIfReady(array[i]);
}
}
@@ -671,7 +671,7 @@ _ISO2022Close(UConverter *converter) {
if(!converter->isExtraLocal){
uprv_free (converter->extraInfo);
- converter->extraInfo = NULL;
+ converter->extraInfo = nullptr;
}
}
}
@@ -682,7 +682,7 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
uprv_memset(&myConverterData->toU2022State, 0, sizeof(ISO2022State));
myConverterData->key = 0;
- myConverterData->isEmptySegment = FALSE;
+ myConverterData->isEmptySegment = false;
}
if(choice!=UCNV_RESET_TO_UNICODE) {
uprv_memset(&myConverterData->fromU2022State, 0, sizeof(ISO2022State));
@@ -690,11 +690,11 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) {
#ifdef U_ENABLE_GENERIC_ISO_2022
if(myConverterData->locale[0] == 0){
if(choice<=UCNV_RESET_TO_UNICODE) {
- myConverterData->isFirstBuffer = TRUE;
+ myConverterData->isFirstBuffer = true;
myConverterData->key = 0;
if (converter->mode == UCNV_SO){
ucnv_close (myConverterData->currentConverter);
- myConverterData->currentConverter=NULL;
+ myConverterData->currentConverter=nullptr;
}
converter->mode = UCNV_SI;
}
@@ -729,7 +729,7 @@ _ISO2022getName(const UConverter* cnv){
UConverterDataISO2022* myData= (UConverterDataISO2022*)cnv->extraInfo;
return myData->name;
}
- return NULL;
+ return nullptr;
}
U_CDECL_END
@@ -891,7 +891,7 @@ DONE:
case ISO_2022:
{
const char *chosenConverterName = escSeqStateTable_Result_2022[offset];
- if(chosenConverterName == NULL) {
+ if(chosenConverterName == nullptr) {
/* SS2 or SS3 */
*err = U_UNSUPPORTED_ESCAPE_SEQUENCE;
_this->toUCallbackReason = UCNV_UNASSIGNED;
@@ -1171,7 +1171,7 @@ MBCS_FROM_UCHAR32_ISO2022(UConverterSharedData* sharedData,
}
cx=sharedData->mbcs.extIndexes;
- if(cx!=NULL) {
+ if(cx!=nullptr) {
return ucnv_extSimpleMatchFromU(cx, c, value, useFallback);
}
@@ -1259,7 +1259,7 @@ T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args,
UErrorCode* err){
const char* mySourceLimit, *realSourceLimit;
const char* sourceStart;
- const UChar* myTargetStart;
+ const char16_t* myTargetStart;
UConverter* saveThis;
UConverterDataISO2022* myData;
int8_t length;
@@ -1274,7 +1274,7 @@ T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args,
mySourceLimit = getEndOfBuffer_2022(&(args->source), realSourceLimit, args->flush);
if(args->source < mySourceLimit) {
- if(myData->currentConverter==NULL) {
+ if(myData->currentConverter==nullptr) {
myData->currentConverter = ucnv_open("ASCII",err);
if(U_FAILURE(*err)){
return;
@@ -1285,7 +1285,7 @@ T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args,
}
/* convert to before the ESC or until the end of the buffer */
- myData->isFirstBuffer=FALSE;
+ myData->isFirstBuffer=false;
sourceStart = args->source;
myTargetStart = args->target;
args->converter = myData->currentConverter;
@@ -1322,7 +1322,7 @@ T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args,
*/
if (U_FAILURE(*err) ||
(args->source == realSourceLimit) ||
- (args->offsets != NULL && (args->target != myTargetStart || args->source != sourceStart) ||
+ (args->offsets != nullptr && (args->target != myTargetStart || args->source != sourceStart) ||
(mySourceLimit < realSourceLimit && myData->currentConverter->toULength > 0))
) {
/* copy partial or error input for truncated detection and error handling */
@@ -1351,7 +1351,7 @@ T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args,
realSourceLimit,
ISO_2022,
err);
- if (U_FAILURE(*err) || (args->source != sourceStart && args->offsets != NULL)) {
+ if (U_FAILURE(*err) || (args->source != sourceStart && args->offsets != nullptr)) {
/* let the ucnv.c code update its current offset */
return;
}
@@ -1667,8 +1667,8 @@ UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args
ISO2022State *pFromU2022State;
uint8_t *target = (uint8_t *) args->target;
const uint8_t *targetLimit = (const uint8_t *) args->targetLimit;
- const UChar* source = args->source;
- const UChar* sourceLimit = args->sourceLimit;
+ const char16_t* source = args->source;
+ const char16_t* sourceLimit = args->sourceLimit;
int32_t* offsets = args->offsets;
UChar32 sourceChar;
char buffer[8];
@@ -1703,7 +1703,7 @@ getTrail:
/*look ahead to find the trail surrogate*/
if(source < sourceLimit) {
/* test the following code unit */
- UChar trail=(UChar) *source;
+ char16_t trail=(char16_t) *source;
if(U16_IS_TRAIL(trail)) {
source++;
sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
@@ -1848,7 +1848,7 @@ getTrail:
len = 1;
cs = cs0;
g = 0;
- useFallback = FALSE;
+ useFallback = false;
}
break;
case JISX208:
@@ -1864,7 +1864,7 @@ getTrail:
len = len2;
cs = cs0;
g = 0;
- useFallback = FALSE;
+ useFallback = false;
}
} else if(len == 0 && useFallback &&
(uint32_t)(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) {
@@ -1872,7 +1872,7 @@ getTrail:
len = -2;
cs = cs0;
g = 0;
- useFallback = FALSE;
+ useFallback = false;
}
break;
case ISO8859_7:
@@ -1886,7 +1886,7 @@ getTrail:
len = len2;
cs = cs0;
g = 2;
- useFallback = FALSE;
+ useFallback = false;
}
break;
default:
@@ -1911,7 +1911,7 @@ getTrail:
len = len2;
cs = cs0;
g = 0;
- useFallback = FALSE;
+ useFallback = false;
}
break;
}
@@ -2082,7 +2082,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
UErrorCode* err){
char tempBuf[2];
const char *mySource = (char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const char *mySourceLimit = args->sourceLimit;
uint32_t targetUniChar = 0x0000;
uint32_t mySourceChar = 0x0000;
@@ -2121,7 +2121,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
continue;
} else {
/* only JIS7 uses SI/SO, not ISO-2022-JP-x */
- myData->isEmptySegment = FALSE; /* reset this, we have a different error */
+ myData->isEmptySegment = false; /* reset this, we have a different error */
break;
}
@@ -2133,7 +2133,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
continue;
} else {
/* only JIS7 uses SI/SO, not ISO-2022-JP-x */
- myData->isEmptySegment = FALSE; /* reset this, we have a different error */
+ myData->isEmptySegment = false; /* reset this, we have a different error */
break;
}
@@ -2159,12 +2159,12 @@ escape:
if(U_FAILURE(*err)){
args->target = myTarget;
args->source = mySource;
- myData->isEmptySegment = FALSE; /* Reset to avoid future spurious errors */
+ myData->isEmptySegment = false; /* Reset to avoid future spurious errors */
return;
}
/* If we successfully completed an escape sequence, we begin a new segment, empty so far */
if(myData->key==0) {
- myData->isEmptySegment = TRUE;
+ myData->isEmptySegment = true;
}
continue;
@@ -2181,7 +2181,7 @@ escape:
U_FALLTHROUGH;
default:
/* convert one or two bytes */
- myData->isEmptySegment = FALSE;
+ myData->isEmptySegment = false;
cs = (StateEnum)pToU2022State->cs[pToU2022State->g];
if( (uint8_t)(mySourceChar - 0xa1) <= (0xdf - 0xa1) && myData->version==4 &&
!IS_JP_DBCS(cs)
@@ -2262,7 +2262,7 @@ getTrailByte:
tempBuf[0] = (char)(tmpSourceChar >> 8);
tempBuf[1] = (char)(tmpSourceChar);
}
- targetUniChar = ucnv_MBCSSimpleGetNextUChar(myData->myConverterArray[cs], tempBuf, 2, FALSE);
+ targetUniChar = ucnv_MBCSSimpleGetNextUChar(myData->myConverterArray[cs], tempBuf, 2, false);
} else if (!(trailIsOk || IS_2022_CONTROL(trailByte))) {
/* report a pair of illegal bytes if the second byte is not a DBCS starter */
++mySource;
@@ -2281,25 +2281,25 @@ getTrailByte:
if(args->offsets){
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
- *(myTarget++)=(UChar)targetUniChar;
+ *(myTarget++)=(char16_t)targetUniChar;
}
else if(targetUniChar > missingCharMarker){
/* disassemble the surrogate pair and write to output*/
targetUniChar-=0x0010000;
- *myTarget = (UChar)(0xd800+(UChar)(targetUniChar>>10));
+ *myTarget = (char16_t)(0xd800+(char16_t)(targetUniChar>>10));
if(args->offsets){
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
++myTarget;
if(myTarget< args->targetLimit){
- *myTarget = (UChar)(0xdc00+(UChar)(targetUniChar&0x3ff));
+ *myTarget = (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff));
if(args->offsets){
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
++myTarget;
}else{
args->converter->UCharErrorBuffer[args->converter->UCharErrorBufferLength++]=
- (UChar)(0xdc00+(UChar)(targetUniChar&0x3ff));
+ (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff));
}
}
@@ -2356,8 +2356,8 @@ UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterFromUnicodeArgs*
static void U_CALLCONV
UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args, UErrorCode* err){
- const UChar *source = args->source;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *source = args->source;
+ const char16_t *sourceLimit = args->sourceLimit;
unsigned char *target = (unsigned char *) args->target;
unsigned char *targetLimit = (unsigned char *) args->targetLimit;
int32_t* offsets = args->offsets;
@@ -2480,7 +2480,7 @@ getTrail:
/*look ahead to find the trail surrogate*/
if(source < sourceLimit) {
/* test the following code unit */
- UChar trail=(UChar) *source;
+ char16_t trail=(char16_t) *source;
if(U16_IS_TRAIL(trail)) {
source++;
sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
@@ -2534,7 +2534,7 @@ getTrail:
int32_t sourceIndex;
/* we are switching to ASCII */
- isTargetByteDBCS=FALSE;
+ isTargetByteDBCS=false;
/* get the source index of the last input character */
/*
@@ -2624,10 +2624,10 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC_IBM(UConverterToUnicodeArgs *args
*/
ucnv_MBCSToUnicodeWithOffsets(&subArgs, err);
- if(args->offsets != NULL && sourceStart != args->source) {
+ if(args->offsets != nullptr && sourceStart != args->source) {
/* update offsets to base them on the actual start of the input */
int32_t *offsets = args->offsets;
- UChar *target = args->target;
+ char16_t *target = args->target;
int32_t delta = (int32_t)(args->source - sourceStart);
while(target < subArgs.target) {
if(*offsets >= 0) {
@@ -2675,10 +2675,10 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
UErrorCode* err){
char tempBuf[2];
const char *mySource = ( char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const char *mySourceLimit = args->sourceLimit;
UChar32 targetUniChar = 0x0000;
- UChar mySourceChar = 0x0000;
+ char16_t mySourceChar = 0x0000;
UConverterDataISO2022* myData;
UConverterSharedData* sharedData ;
UBool useFallback;
@@ -2712,7 +2712,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
if(mySourceChar==UCNV_SI){
myData->toU2022State.g = 0;
if (myData->isEmptySegment) {
- myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */
+ myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */
*err = U_ILLEGAL_ESCAPE_SEQUENCE;
args->converter->toUCallbackReason = UCNV_IRREGULAR;
args->converter->toUBytes[0] = (uint8_t)mySourceChar;
@@ -2725,13 +2725,13 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
continue;
}else if(mySourceChar==UCNV_SO){
myData->toU2022State.g = 1;
- myData->isEmptySegment = TRUE; /* Begin a new segment, empty so far */
+ myData->isEmptySegment = true; /* Begin a new segment, empty so far */
/*consume the source */
continue;
}else if(mySourceChar==ESC_2022){
mySource--;
escape:
- myData->isEmptySegment = FALSE; /* Any invalid ESC sequences will be detected separately, so just reset this */
+ myData->isEmptySegment = false; /* Any invalid ESC sequences will be detected separately, so just reset this */
changeState_2022(args->converter,&(mySource),
mySourceLimit, ISO_2022_KR, err);
if(U_FAILURE(*err)){
@@ -2742,7 +2742,7 @@ escape:
continue;
}
- myData->isEmptySegment = FALSE; /* Any invalid char errors will be detected separately, so just reset this */
+ myData->isEmptySegment = false; /* Any invalid char errors will be detected separately, so just reset this */
if(myData->toU2022State.g == 1) {
if(mySource < mySourceLimit) {
int leadIsOk, trailIsOk;
@@ -2772,7 +2772,7 @@ getTrailByte:
/* report a pair of illegal bytes if the second byte is not a DBCS starter */
++mySource;
/* add another bit so that the code below writes 2 bytes in case of error */
- mySourceChar = static_cast<UChar>(0x10000 | (mySourceChar << 8) | trailByte);
+ mySourceChar = static_cast<char16_t>(0x10000 | (mySourceChar << 8) | trailByte);
}
} else {
args->converter->toUBytes[0] = (uint8_t)mySourceChar;
@@ -2789,7 +2789,7 @@ getTrailByte:
if(args->offsets) {
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
- *(myTarget++)=(UChar)targetUniChar;
+ *(myTarget++)=(char16_t)targetUniChar;
}
else {
/* Call the callback function*/
@@ -2919,8 +2919,8 @@ UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterFromUnicodeArgs* args
ISO2022State *pFromU2022State;
uint8_t *target = (uint8_t *) args->target;
const uint8_t *targetLimit = (const uint8_t *) args->targetLimit;
- const UChar* source = args->source;
- const UChar* sourceLimit = args->sourceLimit;
+ const char16_t* source = args->source;
+ const char16_t* sourceLimit = args->sourceLimit;
int32_t* offsets = args->offsets;
UChar32 sourceChar;
char buffer[8];
@@ -2952,7 +2952,7 @@ getTrail:
/*look ahead to find the trail surrogate*/
if(source < sourceLimit) {
/* test the following code unit */
- UChar trail=(UChar) *source;
+ char16_t trail=(char16_t) *source;
if(U16_IS_TRAIL(trail)) {
source++;
sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
@@ -3092,7 +3092,7 @@ getTrail:
len = 2;
} else {
len = -2;
- useFallback = FALSE;
+ useFallback = false;
}
if(cs == CNS_11643_1) {
g = 1;
@@ -3119,7 +3119,7 @@ getTrail:
len = len2;
cs = cs0;
g = 1;
- useFallback = FALSE;
+ useFallback = false;
}
}
}
@@ -3268,7 +3268,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
UErrorCode* err){
char tempBuf[3];
const char *mySource = (char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const char *mySourceLimit = args->sourceLimit;
uint32_t targetUniChar = 0x0000;
uint32_t mySourceChar = 0x0000;
@@ -3301,7 +3301,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
case UCNV_SI:
pToU2022State->g=0;
if (myData->isEmptySegment) {
- myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */
+ myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */
*err = U_ILLEGAL_ESCAPE_SEQUENCE;
args->converter->toUCallbackReason = UCNV_IRREGULAR;
args->converter->toUBytes[0] = static_cast<uint8_t>(mySourceChar);
@@ -3315,11 +3315,11 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
case UCNV_SO:
if(pToU2022State->cs[1] != 0) {
pToU2022State->g=1;
- myData->isEmptySegment = TRUE; /* Begin a new segment, empty so far */
+ myData->isEmptySegment = true; /* Begin a new segment, empty so far */
continue;
} else {
/* illegal to have SO before a matching designator */
- myData->isEmptySegment = FALSE; /* Handling a different error, reset this to avoid future spurious errs */
+ myData->isEmptySegment = false; /* Handling a different error, reset this to avoid future spurious errs */
break;
}
@@ -3345,7 +3345,7 @@ escape:
if(U_FAILURE(*err)){
args->target = myTarget;
args->source = mySource;
- myData->isEmptySegment = FALSE; /* Reset to avoid future spurious errors */
+ myData->isEmptySegment = false; /* Reset to avoid future spurious errors */
return;
}
continue;
@@ -3358,7 +3358,7 @@ escape:
U_FALLTHROUGH;
default:
/* convert one or two bytes */
- myData->isEmptySegment = FALSE;
+ myData->isEmptySegment = false;
if(pToU2022State->g != 0) {
if(mySource < mySourceLimit) {
UConverterSharedData *cnv;
@@ -3397,7 +3397,7 @@ getTrailByte:
tempBuf[1] = (char) trailByte;
tempBufLen = 2;
}
- targetUniChar = ucnv_MBCSSimpleGetNextUChar(cnv, tempBuf, tempBufLen, FALSE);
+ targetUniChar = ucnv_MBCSSimpleGetNextUChar(cnv, tempBuf, tempBufLen, false);
mySourceChar = (mySourceChar << 8) | trailByte;
} else if (!(trailIsOk || IS_2022_CONTROL(trailByte))) {
/* report a pair of illegal bytes if the second byte is not a DBCS starter */
@@ -3417,7 +3417,7 @@ getTrailByte:
}
else{
if(mySourceChar <= 0x7f) {
- targetUniChar = (UChar) mySourceChar;
+ targetUniChar = (char16_t) mySourceChar;
}
}
break;
@@ -3426,25 +3426,25 @@ getTrailByte:
if(args->offsets){
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
- *(myTarget++)=(UChar)targetUniChar;
+ *(myTarget++)=(char16_t)targetUniChar;
}
else if(targetUniChar > missingCharMarker){
/* disassemble the surrogate pair and write to output*/
targetUniChar-=0x0010000;
- *myTarget = (UChar)(0xd800+(UChar)(targetUniChar>>10));
+ *myTarget = (char16_t)(0xd800+(char16_t)(targetUniChar>>10));
if(args->offsets){
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
++myTarget;
if(myTarget< args->targetLimit){
- *myTarget = (UChar)(0xdc00+(UChar)(targetUniChar&0x3ff));
+ *myTarget = (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff));
if(args->offsets){
args->offsets[myTarget - args->target] = (int32_t)(mySource - args->source - (mySourceChar <= 0xff ? 1 : 2));
}
++myTarget;
}else{
args->converter->UCharErrorBuffer[args->converter->UCharErrorBufferLength++]=
- (UChar)(0xdc00+(UChar)(targetUniChar&0x3ff));
+ (char16_t)(0xdc00+(char16_t)(targetUniChar&0x3ff));
}
}
@@ -3599,7 +3599,7 @@ _ISO_2022_SafeClone(
if (*pBufferSize == 0) { /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = (int32_t)sizeof(struct cloneStruct);
- return NULL;
+ return nullptr;
}
cnvData = (UConverterDataISO2022 *)cnv->extraInfo;
@@ -3609,23 +3609,23 @@ _ISO_2022_SafeClone(
uprv_memcpy(&localClone->mydata, cnvData, sizeof(UConverterDataISO2022));
localClone->cnv.extraInfo = &localClone->mydata; /* set pointer to extra data */
- localClone->cnv.isExtraLocal = TRUE;
+ localClone->cnv.isExtraLocal = true;
/* share the subconverters */
- if(cnvData->currentConverter != NULL) {
+ if(cnvData->currentConverter != nullptr) {
size = (int32_t)sizeof(UConverter);
localClone->mydata.currentConverter =
ucnv_safeClone(cnvData->currentConverter,
&localClone->currentConverter,
&size, status);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
}
for(i=0; i<UCNV_2022_MAX_CONVERTERS; ++i) {
- if(cnvData->myConverterArray[i] != NULL) {
+ if(cnvData->myConverterArray[i] != nullptr) {
ucnv_incrementRefCount(cnvData->myConverterArray[i]);
}
}
@@ -3721,7 +3721,7 @@ _ISO_2022_GetUnicodeSet(const UConverter *cnv,
for (i=0; i<UCNV_2022_MAX_CONVERTERS; i++) {
UConverterSetFilter filter;
- if(cnvData->myConverterArray[i]!=NULL) {
+ if(cnvData->myConverterArray[i]!=nullptr) {
if(cnvData->locale[0]=='j' && i==JISX208) {
/*
* Only add code points that map to Shift-JIS codes
@@ -3769,8 +3769,8 @@ _ISO_2022_GetUnicodeSet(const UConverter *cnv,
static const UConverterImpl _ISO2022Impl={
UCNV_ISO_2022,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_ISO2022Open,
_ISO2022Close,
@@ -3782,21 +3782,21 @@ static const UConverterImpl _ISO2022Impl={
ucnv_fromUnicode_UTF8,
ucnv_fromUnicode_UTF8_OFFSETS_LOGIC,
#else
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
#endif
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_ISO2022getName,
_ISO_2022_WriteSub,
_ISO_2022_SafeClone,
_ISO_2022_GetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _ISO2022StaticData={
sizeof(UConverterStaticData),
@@ -3805,11 +3805,11 @@ static const UConverterStaticData _ISO2022StaticData={
UCNV_IBM,
UCNV_ISO_2022,
1,
- 3, /* max 3 bytes per UChar from UTF-8 (4 bytes from surrogate _pair_) */
+ 3, /* max 3 bytes per char16_t from UTF-8 (4 bytes from surrogate _pair_) */
{ 0x1a, 0, 0, 0 },
1,
- FALSE,
- FALSE,
+ false,
+ false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -3821,8 +3821,8 @@ const UConverterSharedData _ISO2022Data=
static const UConverterImpl _ISO2022JPImpl={
UCNV_ISO_2022,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_ISO2022Open,
_ISO2022Close,
@@ -3832,16 +3832,16 @@ static const UConverterImpl _ISO2022JPImpl={
UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC,
UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC,
UConverter_fromUnicode_ISO_2022_JP_OFFSETS_LOGIC,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_ISO2022getName,
_ISO_2022_WriteSub,
_ISO_2022_SafeClone,
_ISO_2022_GetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _ISO2022JPStaticData={
sizeof(UConverterStaticData),
@@ -3850,11 +3850,11 @@ static const UConverterStaticData _ISO2022JPStaticData={
UCNV_IBM,
UCNV_ISO_2022,
1,
- 6, /* max 6 bytes per UChar: 4-byte escape sequence + DBCS */
+ 6, /* max 6 bytes per char16_t: 4-byte escape sequence + DBCS */
{ 0x1a, 0, 0, 0 },
1,
- FALSE,
- FALSE,
+ false,
+ false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -3872,8 +3872,8 @@ const UConverterSharedData _ISO2022JPData=
static const UConverterImpl _ISO2022KRImpl={
UCNV_ISO_2022,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_ISO2022Open,
_ISO2022Close,
@@ -3883,16 +3883,16 @@ static const UConverterImpl _ISO2022KRImpl={
UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC,
UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC,
UConverter_fromUnicode_ISO_2022_KR_OFFSETS_LOGIC,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_ISO2022getName,
_ISO_2022_WriteSub,
_ISO_2022_SafeClone,
_ISO_2022_GetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _ISO2022KRStaticData={
sizeof(UConverterStaticData),
@@ -3901,11 +3901,11 @@ static const UConverterStaticData _ISO2022KRStaticData={
UCNV_IBM,
UCNV_ISO_2022,
1,
- 8, /* max 8 bytes per UChar */
+ 8, /* max 8 bytes per char16_t */
{ 0x1a, 0, 0, 0 },
1,
- FALSE,
- FALSE,
+ false,
+ false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -3923,8 +3923,8 @@ static const UConverterImpl _ISO2022CNImpl={
UCNV_ISO_2022,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_ISO2022Open,
_ISO2022Close,
@@ -3934,16 +3934,16 @@ static const UConverterImpl _ISO2022CNImpl={
UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC,
UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC,
UConverter_fromUnicode_ISO_2022_CN_OFFSETS_LOGIC,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_ISO2022getName,
_ISO_2022_WriteSub,
_ISO_2022_SafeClone,
_ISO_2022_GetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _ISO2022CNStaticData={
sizeof(UConverterStaticData),
@@ -3952,11 +3952,11 @@ static const UConverterStaticData _ISO2022CNStaticData={
UCNV_IBM,
UCNV_ISO_2022,
1,
- 8, /* max 8 bytes per UChar: 4-byte CNS designator + 2 bytes for SS2/SS3 + DBCS */
+ 8, /* max 8 bytes per char16_t: 4-byte CNS designator + 2 bytes for SS2/SS3 + DBCS */
{ 0x1a, 0, 0, 0 },
1,
- FALSE,
- FALSE,
+ false,
+ false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnv_bld.cpp b/contrib/libs/icu/common/ucnv_bld.cpp
index d08eec73696..564b645bed7 100644
--- a/contrib/libs/icu/common/ucnv_bld.cpp
+++ b/contrib/libs/icu/common/ucnv_bld.cpp
@@ -57,10 +57,10 @@ extern void UCNV_DEBUG_LOG(char *what, char *who, void *p, int l);
static const UConverterSharedData * const
converterData[UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES]={
- NULL, NULL,
+ nullptr, nullptr,
#if UCONFIG_NO_LEGACY_CONVERSION
- NULL,
+ nullptr,
#else
&_MBCSData,
#endif
@@ -68,22 +68,22 @@ converterData[UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES]={
&_Latin1Data,
&_UTF8Data, &_UTF16BEData, &_UTF16LEData,
#if UCONFIG_ONLY_HTML_CONVERSION
- NULL, NULL,
+ nullptr, nullptr,
#else
&_UTF32BEData, &_UTF32LEData,
#endif
- NULL,
+ nullptr,
#if UCONFIG_NO_LEGACY_CONVERSION
- NULL,
+ nullptr,
#else
&_ISO2022Data,
#endif
#if UCONFIG_NO_LEGACY_CONVERSION || UCONFIG_ONLY_HTML_CONVERSION
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr,
#else
&_LMBCSData1,&_LMBCSData2, &_LMBCSData3, &_LMBCSData4, &_LMBCSData5, &_LMBCSData6,
&_LMBCSData8,&_LMBCSData11,&_LMBCSData16,&_LMBCSData17,&_LMBCSData18,&_LMBCSData19,
@@ -91,27 +91,27 @@ converterData[UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES]={
#endif
#if UCONFIG_ONLY_HTML_CONVERSION
- NULL,
+ nullptr,
#else
&_SCSUData,
#endif
#if UCONFIG_NO_LEGACY_CONVERSION || UCONFIG_ONLY_HTML_CONVERSION
- NULL,
+ nullptr,
#else
&_ISCIIData,
#endif
&_ASCIIData,
#if UCONFIG_ONLY_HTML_CONVERSION
- NULL, NULL, &_UTF16Data, NULL, NULL, NULL,
+ nullptr, nullptr, &_UTF16Data, nullptr, nullptr, nullptr,
#else
&_UTF7Data, &_Bocu1Data, &_UTF16Data, &_UTF32Data, &_CESU8Data, &_IMAPData,
#endif
#if UCONFIG_NO_LEGACY_CONVERSION || UCONFIG_ONLY_HTML_CONVERSION
- NULL,
+ nullptr,
#else
&_CompoundTextData
#endif
@@ -193,20 +193,20 @@ static struct {
/*initializes some global variables */
-static UHashtable *SHARED_DATA_HASHTABLE = NULL;
+static UHashtable *SHARED_DATA_HASHTABLE = nullptr;
static icu::UMutex cnvCacheMutex;
/* Note: the global mutex is used for */
/* reference count updates. */
-static const char **gAvailableConverters = NULL;
+static const char **gAvailableConverters = nullptr;
static uint16_t gAvailableConverterCount = 0;
-static icu::UInitOnce gAvailableConvertersInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gAvailableConvertersInitOnce {};
#if !U_CHARSET_IS_UTF8
/* This contains the resolved converter name. So no further alias lookup is needed again. */
-static char gDefaultConverterNameBuffer[UCNV_MAX_CONVERTER_NAME_LENGTH + 1]; /* +1 for NULL */
-static const char *gDefaultConverterName = NULL;
+static char gDefaultConverterNameBuffer[UCNV_MAX_CONVERTER_NAME_LENGTH + 1]; /* +1 for nullptr */
+static const char *gDefaultConverterName = nullptr;
/*
If the default converter is an algorithmic converter, this is the cached value.
@@ -214,7 +214,7 @@ We don't cache a full UConverter and clone it because ucnv_clone doesn't have
less overhead than an algorithmic open. We don't cache non-algorithmic converters
because ucnv_flushCache must be able to unload the default converter and its table.
*/
-static const UConverterSharedData *gDefaultAlgorithmicSharedData = NULL;
+static const UConverterSharedData *gDefaultAlgorithmicSharedData = nullptr;
/* Does gDefaultConverterName have a converter option and require extra parsing? */
static UBool gDefaultConverterContainsOption;
@@ -232,7 +232,7 @@ ucnv_flushAvailableConverterCache() {
gAvailableConverterCount = 0;
if (gAvailableConverters) {
uprv_free((char **)gAvailableConverters);
- gAvailableConverters = NULL;
+ gAvailableConverters = nullptr;
}
gAvailableConvertersInitOnce.reset();
}
@@ -241,28 +241,28 @@ ucnv_flushAvailableConverterCache() {
/* in use by open converters. */
/* Not thread safe. */
/* Not supported API. */
-static UBool U_CALLCONV ucnv_cleanup(void) {
+static UBool U_CALLCONV ucnv_cleanup() {
ucnv_flushCache();
- if (SHARED_DATA_HASHTABLE != NULL && uhash_count(SHARED_DATA_HASHTABLE) == 0) {
+ if (SHARED_DATA_HASHTABLE != nullptr && uhash_count(SHARED_DATA_HASHTABLE) == 0) {
uhash_close(SHARED_DATA_HASHTABLE);
- SHARED_DATA_HASHTABLE = NULL;
+ SHARED_DATA_HASHTABLE = nullptr;
}
/* Isn't called from flushCache because other threads may have preexisting references to the table. */
ucnv_flushAvailableConverterCache();
#if !U_CHARSET_IS_UTF8
- gDefaultConverterName = NULL;
+ gDefaultConverterName = nullptr;
gDefaultConverterNameBuffer[0] = 0;
- gDefaultConverterContainsOption = FALSE;
- gDefaultAlgorithmicSharedData = NULL;
+ gDefaultConverterContainsOption = false;
+ gDefaultAlgorithmicSharedData = nullptr;
#endif
- return (SHARED_DATA_HASHTABLE == NULL);
+ return (SHARED_DATA_HASHTABLE == nullptr);
}
U_CAPI void U_EXPORT2
-ucnv_enableCleanup(void) {
+ucnv_enableCleanup() {
ucln_common_registerCleanup(UCLN_COMMON_UCNV, ucnv_cleanup);
}
@@ -295,22 +295,22 @@ ucnv_data_unFlattenClone(UConverterLoadArgs *pArgs, UDataMemory *pData, UErrorCo
UConverterType type = (UConverterType)source->conversionType;
if(U_FAILURE(*status))
- return NULL;
+ return nullptr;
if( (uint16_t)type >= UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES ||
- converterData[type] == NULL ||
+ converterData[type] == nullptr ||
!converterData[type]->isReferenceCounted ||
converterData[type]->referenceCounter != 1 ||
source->structSize != sizeof(UConverterStaticData))
{
*status = U_INVALID_TABLE_FORMAT;
- return NULL;
+ return nullptr;
}
data = (UConverterSharedData *)uprv_malloc(sizeof(UConverterSharedData));
- if(data == NULL) {
+ if(data == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
/* copy initial values from the static structure for this type */
@@ -318,16 +318,16 @@ ucnv_data_unFlattenClone(UConverterLoadArgs *pArgs, UDataMemory *pData, UErrorCo
data->staticData = source;
- data->sharedDataCached = FALSE;
+ data->sharedDataCached = false;
/* fill in fields from the loaded data */
data->dataMemory = (void*)pData; /* for future use */
- if(data->impl->load != NULL) {
+ if(data->impl->load != nullptr) {
data->impl->load(data, pArgs, raw + source->structSize, status);
if(U_FAILURE(*status)) {
uprv_free(data);
- return NULL;
+ return nullptr;
}
}
return data;
@@ -346,16 +346,16 @@ static UConverterSharedData *createConverterFromFile(UConverterLoadArgs *pArgs,
if (U_FAILURE (*err)) {
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
UTRACE_DATA2(UTRACE_OPEN_CLOSE, "load converter %s from package %s", pArgs->name, pArgs->pkg);
- data = udata_openChoice(pArgs->pkg, DATA_TYPE, pArgs->name, isCnvAcceptable, NULL, err);
+ data = udata_openChoice(pArgs->pkg, DATA_TYPE, pArgs->name, isCnvAcceptable, nullptr, err);
if(U_FAILURE(*err))
{
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
sharedData = ucnv_data_unFlattenClone(pArgs, data, err);
@@ -363,7 +363,7 @@ static UConverterSharedData *createConverterFromFile(UConverterLoadArgs *pArgs,
{
udata_close(data);
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
/*
@@ -413,7 +413,7 @@ getAlgorithmicTypeFromName(const char *realName)
}
}
- return NULL;
+ return nullptr;
}
/*
@@ -437,11 +437,11 @@ ucnv_shareConverterData(UConverterSharedData * data)
{
UErrorCode err = U_ZERO_ERROR;
/*Lazy evaluates the Hashtable itself */
- /*void *sanity = NULL;*/
+ /*void *sanity = nullptr;*/
- if (SHARED_DATA_HASHTABLE == NULL)
+ if (SHARED_DATA_HASHTABLE == nullptr)
{
- SHARED_DATA_HASHTABLE = uhash_openSize(uhash_hashChars, uhash_compareChars, NULL,
+ SHARED_DATA_HASHTABLE = uhash_openSize(uhash_hashChars, uhash_compareChars, nullptr,
ucnv_io_countKnownConverters(&err)*UCNV_CACHE_LOAD_FACTOR,
&err);
ucnv_enableCleanup();
@@ -454,7 +454,7 @@ ucnv_shareConverterData(UConverterSharedData * data)
/*
sanity = ucnv_getSharedConverterData (data->staticData->name);
- if(sanity != NULL)
+ if(sanity != nullptr)
{
UCNV_DEBUG_LOG("put:overwrite!",data->staticData->name,sanity);
}
@@ -462,11 +462,11 @@ ucnv_shareConverterData(UConverterSharedData * data)
*/
/* Mark it shared */
- data->sharedDataCached = TRUE;
+ data->sharedDataCached = true;
uhash_put(SHARED_DATA_HASHTABLE,
(void*) data->staticData->name, /* Okay to cast away const as long as
- keyDeleter == NULL */
+ keyDeleter == nullptr */
data,
&err);
UCNV_DEBUG_LOG("put", data->staticData->name,data);
@@ -475,17 +475,17 @@ ucnv_shareConverterData(UConverterSharedData * data)
/* Look up a converter name in the shared data cache. */
/* cnvCacheMutex must be held by the caller to protect the hash table. */
-/* gets the shared data from the SHARED_DATA_HASHTABLE (might return NULL if it isn't there)
+/* gets the shared data from the SHARED_DATA_HASHTABLE (might return nullptr if it isn't there)
* @param name The name of the shared data
* @return the shared data from the SHARED_DATA_HASHTABLE
*/
static UConverterSharedData *
ucnv_getSharedConverterData(const char *name)
{
- /*special case when no Table has yet been created we return NULL */
- if (SHARED_DATA_HASHTABLE == NULL)
+ /*special case when no Table has yet been created we return nullptr */
+ if (SHARED_DATA_HASHTABLE == nullptr)
{
- return NULL;
+ return nullptr;
}
else
{
@@ -502,11 +502,11 @@ ucnv_getSharedConverterData(const char *name)
*/
/* Deletes (frees) the Shared data it's passed. first it checks the referenceCounter to
* see if anyone is using it, if not it frees all the memory stemming from sharedConverterData and
- * returns TRUE,
- * otherwise returns FALSE
+ * returns true,
+ * otherwise returns false
* @param sharedConverterData The shared data
* @return if not it frees all the memory stemming from sharedConverterData and
- * returns TRUE, otherwise returns FALSE
+ * returns true, otherwise returns false
*/
static UBool
ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData)
@@ -515,15 +515,15 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData)
UTRACE_DATA2(UTRACE_OPEN_CLOSE, "unload converter %s shared data %p", deadSharedData->staticData->name, deadSharedData);
if (deadSharedData->referenceCounter > 0) {
- UTRACE_EXIT_VALUE((int32_t)FALSE);
- return FALSE;
+ UTRACE_EXIT_VALUE((int32_t)false);
+ return false;
}
- if (deadSharedData->impl->unload != NULL) {
+ if (deadSharedData->impl->unload != nullptr) {
deadSharedData->impl->unload(deadSharedData);
}
- if(deadSharedData->dataMemory != NULL)
+ if(deadSharedData->dataMemory != nullptr)
{
UDataMemory *data = (UDataMemory*)deadSharedData->dataMemory;
udata_close(data);
@@ -531,35 +531,35 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData)
uprv_free(deadSharedData);
- UTRACE_EXIT_VALUE((int32_t)TRUE);
- return TRUE;
+ UTRACE_EXIT_VALUE((int32_t)true);
+ return true;
}
/**
* Load a non-algorithmic converter.
- * If pkg==NULL, then this function must be called inside umtx_lock(&cnvCacheMutex).
+ * If pkg==nullptr, then this function must be called inside umtx_lock(&cnvCacheMutex).
*/
UConverterSharedData *
ucnv_load(UConverterLoadArgs *pArgs, UErrorCode *err) {
UConverterSharedData *mySharedConverterData;
- if(err == NULL || U_FAILURE(*err)) {
- return NULL;
+ if(err == nullptr || U_FAILURE(*err)) {
+ return nullptr;
}
- if(pArgs->pkg != NULL && *pArgs->pkg != 0) {
+ if(pArgs->pkg != nullptr && *pArgs->pkg != 0) {
/* application-provided converters are not currently cached */
return createConverterFromFile(pArgs, err);
}
mySharedConverterData = ucnv_getSharedConverterData(pArgs->name);
- if (mySharedConverterData == NULL)
+ if (mySharedConverterData == nullptr)
{
/*Not cached, we need to stream it in from file */
mySharedConverterData = createConverterFromFile(pArgs, err);
- if (U_FAILURE (*err) || (mySharedConverterData == NULL))
+ if (U_FAILURE (*err) || (mySharedConverterData == nullptr))
{
- return NULL;
+ return nullptr;
}
else if (!pArgs->onlyTestIsLoadable)
{
@@ -584,12 +584,12 @@ ucnv_load(UConverterLoadArgs *pArgs, UErrorCode *err) {
*/
U_CAPI void
ucnv_unload(UConverterSharedData *sharedData) {
- if(sharedData != NULL) {
+ if(sharedData != nullptr) {
if (sharedData->referenceCounter > 0) {
sharedData->referenceCounter--;
}
- if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == FALSE)) {
+ if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == false)) {
ucnv_deleteSharedConverterData(sharedData);
}
}
@@ -598,7 +598,7 @@ ucnv_unload(UConverterSharedData *sharedData) {
U_CFUNC void
ucnv_unloadSharedDataIfReady(UConverterSharedData *sharedData)
{
- if(sharedData != NULL && sharedData->isReferenceCounted) {
+ if(sharedData != nullptr && sharedData->isReferenceCounted) {
umtx_lock(&cnvCacheMutex);
ucnv_unload(sharedData);
umtx_unlock(&cnvCacheMutex);
@@ -608,7 +608,7 @@ ucnv_unloadSharedDataIfReady(UConverterSharedData *sharedData)
U_CFUNC void
ucnv_incrementRefCount(UConverterSharedData *sharedData)
{
- if(sharedData != NULL && sharedData->isReferenceCounted) {
+ if(sharedData != nullptr && sharedData->isReferenceCounted) {
umtx_lock(&cnvCacheMutex);
sharedData->referenceCounter++;
umtx_unlock(&cnvCacheMutex);
@@ -703,10 +703,10 @@ parseConverterOptions(const char *inName,
/*Logic determines if the converter is Algorithmic AND/OR cached
*depending on that:
- * -we either go to get data from disk and cache it (Data=TRUE, Cached=False)
- * -Get it from a Hashtable (Data=X, Cached=TRUE)
- * -Call dataConverter initializer (Data=TRUE, Cached=TRUE)
- * -Call AlgorithmicConverter initializer (Data=FALSE, Cached=TRUE)
+ * -we either go to get data from disk and cache it (Data=true, Cached=false)
+ * -Get it from a Hashtable (Data=X, Cached=true)
+ * -Call dataConverter initializer (Data=true, Cached=true)
+ * -Call AlgorithmicConverter initializer (Data=false, Cached=true)
*/
U_CFUNC UConverterSharedData *
ucnv_loadSharedData(const char *converterName,
@@ -715,27 +715,27 @@ ucnv_loadSharedData(const char *converterName,
UErrorCode * err) {
UConverterNamePieces stackPieces;
UConverterLoadArgs stackArgs;
- UConverterSharedData *mySharedConverterData = NULL;
+ UConverterSharedData *mySharedConverterData = nullptr;
UErrorCode internalErrorCode = U_ZERO_ERROR;
- UBool mayContainOption = TRUE;
- UBool checkForAlgorithmic = TRUE;
+ UBool mayContainOption = true;
+ UBool checkForAlgorithmic = true;
if (U_FAILURE (*err)) {
- return NULL;
+ return nullptr;
}
- if(pPieces == NULL) {
- if(pArgs != NULL) {
+ if(pPieces == nullptr) {
+ if(pArgs != nullptr) {
/*
* Bad: We may set pArgs pointers to stackPieces fields
* which will be invalid after this function returns.
*/
*err = U_INTERNAL_PROGRAM_ERROR;
- return NULL;
+ return nullptr;
}
pPieces = &stackPieces;
}
- if(pArgs == NULL) {
+ if(pArgs == nullptr) {
uprv_memset(&stackArgs, 0, sizeof(stackArgs));
stackArgs.size = (int32_t)sizeof(stackArgs);
pArgs = &stackArgs;
@@ -749,20 +749,20 @@ ucnv_loadSharedData(const char *converterName,
pArgs->locale = pPieces->locale;
pArgs->options = pPieces->options;
- /* In case "name" is NULL we want to open the default converter. */
- if (converterName == NULL) {
+ /* In case "name" is nullptr we want to open the default converter. */
+ if (converterName == nullptr) {
#if U_CHARSET_IS_UTF8
pArgs->name = "UTF-8";
return (UConverterSharedData *)converterData[UCNV_UTF8];
#else
/* Call ucnv_getDefaultName first to query the name from the OS. */
pArgs->name = ucnv_getDefaultName();
- if (pArgs->name == NULL) {
+ if (pArgs->name == nullptr) {
*err = U_MISSING_RESOURCE_ERROR;
- return NULL;
+ return nullptr;
}
mySharedConverterData = (UConverterSharedData *)gDefaultAlgorithmicSharedData;
- checkForAlgorithmic = FALSE;
+ checkForAlgorithmic = false;
mayContainOption = gDefaultConverterContainsOption;
/* the default converter name is already canonical */
#endif
@@ -777,12 +777,12 @@ ucnv_loadSharedData(const char *converterName,
parseConverterOptions(converterName, pPieces, pArgs, err);
if (U_FAILURE(*err)) {
/* Very bad name used. */
- return NULL;
+ return nullptr;
}
/* get the canonical converter name */
pArgs->name = ucnv_io_getConverterName(pArgs->name, &mayContainOption, &internalErrorCode);
- if (U_FAILURE(internalErrorCode) || pArgs->name == NULL) {
+ if (U_FAILURE(internalErrorCode) || pArgs->name == nullptr) {
/*
* set the input name in case the converter was added
* without updating the alias table, or when there is no alias table
@@ -802,7 +802,7 @@ ucnv_loadSharedData(const char *converterName,
if (checkForAlgorithmic) {
mySharedConverterData = (UConverterSharedData *)getAlgorithmicTypeFromName(pArgs->name);
}
- if (mySharedConverterData == NULL)
+ if (mySharedConverterData == nullptr)
{
/* it is a data-based converter, get its shared data. */
/* Hold the cnvCacheMutex through the whole process of checking the */
@@ -810,14 +810,14 @@ ucnv_loadSharedData(const char *converterName,
/* to prevent other threads from modifying the cache during the */
/* process. */
pArgs->nestedLoads=1;
- pArgs->pkg=NULL;
+ pArgs->pkg=nullptr;
umtx_lock(&cnvCacheMutex);
mySharedConverterData = ucnv_load(pArgs, err);
umtx_unlock(&cnvCacheMutex);
- if (U_FAILURE (*err) || (mySharedConverterData == NULL))
+ if (U_FAILURE (*err) || (mySharedConverterData == nullptr))
{
- return NULL;
+ return nullptr;
}
}
@@ -851,7 +851,7 @@ ucnv_createConverter(UConverter *myUConverter, const char *converterName, UError
/* exit with error */
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
U_CFUNC UBool
@@ -866,7 +866,7 @@ ucnv_canCreateConverter(const char *converterName, UErrorCode *err) {
if(U_SUCCESS(*err)) {
UTRACE_DATA1(UTRACE_OPEN_CLOSE, "test if can open converter %s", converterName);
- stackArgs.onlyTestIsLoadable=TRUE;
+ stackArgs.onlyTestIsLoadable=true;
mySharedConverterData = ucnv_loadSharedData(converterName, &stackPieces, &stackArgs, err);
ucnv_createConverterFromSharedData(
&myUConverter, mySharedConverterData,
@@ -894,15 +894,15 @@ ucnv_createAlgorithmicConverter(UConverter *myUConverter,
if(type<0 || UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES<=type) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
UTRACE_EXIT_STATUS(U_ILLEGAL_ARGUMENT_ERROR);
- return NULL;
+ return nullptr;
}
sharedData = converterData[type];
- if(sharedData == NULL || sharedData->isReferenceCounted) {
+ if(sharedData == nullptr || sharedData->isReferenceCounted) {
/* not a valid type, or not an algorithmic converter */
*err = U_ILLEGAL_ARGUMENT_ERROR;
UTRACE_EXIT_STATUS(U_ILLEGAL_ARGUMENT_ERROR);
- return NULL;
+ return nullptr;
}
stackArgs.name = "";
@@ -928,7 +928,7 @@ ucnv_createConverterFromPackage(const char *packageName, const char *converterNa
if(U_FAILURE(*err)) {
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
UTRACE_DATA2(UTRACE_OPEN_CLOSE, "open converter %s from package %s", converterName, packageName);
@@ -941,7 +941,7 @@ ucnv_createConverterFromPackage(const char *packageName, const char *converterNa
if (U_FAILURE(*err)) {
/* Very bad name used. */
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
stackArgs.nestedLoads=1;
stackArgs.pkg=packageName;
@@ -951,16 +951,16 @@ ucnv_createConverterFromPackage(const char *packageName, const char *converterNa
if (U_FAILURE(*err)) {
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
/* create the actual converter */
- myUConverter = ucnv_createConverterFromSharedData(NULL, mySharedConverterData, &stackArgs, err);
+ myUConverter = ucnv_createConverterFromSharedData(nullptr, mySharedConverterData, &stackArgs, err);
if (U_FAILURE(*err)) {
ucnv_close(myUConverter);
UTRACE_EXIT_STATUS(*err);
- return NULL;
+ return nullptr;
}
UTRACE_EXIT_PTR_STATUS(myUConverter, *err);
@@ -980,24 +980,24 @@ ucnv_createConverterFromSharedData(UConverter *myUConverter,
ucnv_unloadSharedDataIfReady(mySharedConverterData);
return myUConverter;
}
- if(myUConverter == NULL)
+ if(myUConverter == nullptr)
{
myUConverter = (UConverter *) uprv_malloc (sizeof (UConverter));
- if(myUConverter == NULL)
+ if(myUConverter == nullptr)
{
*err = U_MEMORY_ALLOCATION_ERROR;
ucnv_unloadSharedDataIfReady(mySharedConverterData);
- return NULL;
+ return nullptr;
}
- isCopyLocal = FALSE;
+ isCopyLocal = false;
} else {
- isCopyLocal = TRUE;
+ isCopyLocal = true;
}
/* initialize the converter */
uprv_memset(myUConverter, 0, sizeof(UConverter));
myUConverter->isCopyLocal = isCopyLocal;
- /*myUConverter->isExtraLocal = FALSE;*/ /* Set by the memset call */
+ /*myUConverter->isExtraLocal = false;*/ /* Set by the memset call */
myUConverter->sharedData = mySharedConverterData;
myUConverter->options = pArgs->options;
if(!pArgs->onlyTestIsLoadable) {
@@ -1013,12 +1013,12 @@ ucnv_createConverterFromSharedData(UConverter *myUConverter,
myUConverter->toUCallbackReason = UCNV_ILLEGAL; /* default reason to invoke (*fromCharErrorBehaviour) */
}
- if(mySharedConverterData->impl->open != NULL) {
+ if(mySharedConverterData->impl->open != nullptr) {
mySharedConverterData->impl->open(myUConverter, pArgs, err);
if(U_FAILURE(*err) && !pArgs->onlyTestIsLoadable) {
/* don't ucnv_close() if onlyTestIsLoadable because not fully initialized */
ucnv_close(myUConverter);
- return NULL;
+ return nullptr;
}
}
@@ -1030,7 +1030,7 @@ ucnv_createConverterFromSharedData(UConverter *myUConverter,
U_CAPI int32_t U_EXPORT2
ucnv_flushCache ()
{
- UConverterSharedData *mySharedData = NULL;
+ UConverterSharedData *mySharedData = nullptr;
int32_t pos;
int32_t tableDeletedNum = 0;
const UHashElement *e;
@@ -1045,7 +1045,7 @@ ucnv_flushCache ()
/*if shared data hasn't even been lazy evaluated yet
* return 0
*/
- if (SHARED_DATA_HASHTABLE == NULL) {
+ if (SHARED_DATA_HASHTABLE == nullptr) {
UTRACE_EXIT_VALUE((int32_t)0);
return 0;
}
@@ -1072,7 +1072,7 @@ ucnv_flushCache ()
do {
remaining = 0;
pos = UHASH_FIRST;
- while ((e = uhash_nextElement (SHARED_DATA_HASHTABLE, &pos)) != NULL)
+ while ((e = uhash_nextElement (SHARED_DATA_HASHTABLE, &pos)) != nullptr)
{
mySharedData = (UConverterSharedData *) e->value.pointer;
/*deletes only if reference counter == 0 */
@@ -1083,7 +1083,7 @@ ucnv_flushCache ()
UCNV_DEBUG_LOG("del",mySharedData->staticData->name,mySharedData);
uhash_removeElement(SHARED_DATA_HASHTABLE, e);
- mySharedData->sharedDataCached = FALSE;
+ mySharedData->sharedDataCached = false;
ucnv_deleteSharedConverterData (mySharedData);
} else {
++remaining;
@@ -1102,7 +1102,7 @@ ucnv_flushCache ()
static void U_CALLCONV initAvailableConvertersList(UErrorCode &errCode) {
U_ASSERT(gAvailableConverterCount == 0);
- U_ASSERT(gAvailableConverters == NULL);
+ U_ASSERT(gAvailableConverters == nullptr);
ucnv_enableCleanup();
UEnumeration *allConvEnum = ucnv_openAllNames(&errCode);
@@ -1121,13 +1121,13 @@ static void U_CALLCONV initAvailableConvertersList(UErrorCode &errCode) {
/* Open the default converter to make sure that it has first dibs in the hash table. */
UErrorCode localStatus = U_ZERO_ERROR;
UConverter tempConverter;
- ucnv_close(ucnv_createConverter(&tempConverter, NULL, &localStatus));
+ ucnv_close(ucnv_createConverter(&tempConverter, nullptr, &localStatus));
gAvailableConverterCount = 0;
for (int32_t idx = 0; idx < allConverterCount; idx++) {
localStatus = U_ZERO_ERROR;
- const char *converterName = uenum_next(allConvEnum, NULL, &localStatus);
+ const char *converterName = uenum_next(allConvEnum, nullptr, &localStatus);
if (ucnv_canCreateConverter(converterName, &localStatus)) {
gAvailableConverters[gAvailableConverterCount++] = converterName;
}
@@ -1158,7 +1158,7 @@ ucnv_bld_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode) {
}
*pErrorCode = U_INDEX_OUTOFBOUNDS_ERROR;
}
- return NULL;
+ return nullptr;
}
/* default converter name --------------------------------------------------- */
@@ -1181,7 +1181,7 @@ internalSetName(const char *name, UErrorCode *status) {
UConverterNamePieces stackPieces;
UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
int32_t length=(int32_t)(uprv_strlen(name));
- UBool containsOption = (UBool)(uprv_strchr(name, UCNV_OPTION_SEP_CHAR) != NULL);
+ UBool containsOption = (UBool)(uprv_strchr(name, UCNV_OPTION_SEP_CHAR) != nullptr);
const UConverterSharedData *algorithmicSharedData;
stackArgs.name = name;
@@ -1240,22 +1240,22 @@ ucnv_getDefaultName() {
icu::Mutex lock(&cnvCacheMutex);
name = gDefaultConverterName;
}
- if(name==NULL) {
+ if(name==nullptr) {
UErrorCode errorCode = U_ZERO_ERROR;
- UConverter *cnv = NULL;
+ UConverter *cnv = nullptr;
name = uprv_getDefaultCodepage();
/* if the name is there, test it out and get the canonical name with options */
- if(name != NULL) {
+ if(name != nullptr) {
cnv = ucnv_open(name, &errorCode);
- if(U_SUCCESS(errorCode) && cnv != NULL) {
+ if(U_SUCCESS(errorCode) && cnv != nullptr) {
name = ucnv_getName(cnv, &errorCode);
}
}
- if(name == NULL || name[0] == 0
- || U_FAILURE(errorCode) || cnv == NULL
+ if(name == nullptr || name[0] == 0
+ || U_FAILURE(errorCode) || cnv == nullptr
|| uprv_strlen(name)>=sizeof(gDefaultConverterNameBuffer))
{
/* Panic time, let's use a fallback. */
@@ -1288,21 +1288,21 @@ See internalSetName or the API reference for details.
*/
U_CAPI void U_EXPORT2
ucnv_setDefaultName(const char *converterName) {
- if(converterName==NULL) {
+ if(converterName==nullptr) {
/* reset to the default codepage */
- gDefaultConverterName=NULL;
+ gDefaultConverterName=nullptr;
} else {
UErrorCode errorCode = U_ZERO_ERROR;
- UConverter *cnv = NULL;
- const char *name = NULL;
+ UConverter *cnv = nullptr;
+ const char *name = nullptr;
/* if the name is there, test it out and get the canonical name with options */
cnv = ucnv_open(converterName, &errorCode);
- if(U_SUCCESS(errorCode) && cnv != NULL) {
+ if(U_SUCCESS(errorCode) && cnv != nullptr) {
name = ucnv_getName(cnv, &errorCode);
}
- if(U_SUCCESS(errorCode) && name!=NULL) {
+ if(U_SUCCESS(errorCode) && name!=nullptr) {
internalSetName(name, &errorCode);
}
/* else this converter is bad to use. Don't change it to a bad value. */
@@ -1342,7 +1342,7 @@ ucnv_swap(const UDataSwapper *ds,
_MBCSHeader *outMBCSHeader;
_MBCSHeader mbcsHeader;
uint32_t mbcsHeaderLength;
- UBool noFromU=FALSE;
+ UBool noFromU=false;
uint8_t outputType;
@@ -1353,7 +1353,7 @@ ucnv_swap(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -1376,7 +1376,7 @@ ucnv_swap(const UDataSwapper *ds,
}
inBytes=(const uint8_t *)inData+headerSize;
- outBytes=(uint8_t *)outData+headerSize;
+ outBytes=(outData == nullptr) ? nullptr : (uint8_t *)outData+headerSize;
/* read the initial UConverterStaticData structure after the UDataInfo header */
inStaticData=(const UConverterStaticData *)inBytes;
@@ -1416,7 +1416,7 @@ ucnv_swap(const UDataSwapper *ds,
}
inBytes+=staticDataSize;
- outBytes+=staticDataSize;
+ if (outBytes != nullptr) outBytes+=staticDataSize;
if(length>=0) {
length-=(int32_t)staticDataSize;
}
@@ -1509,7 +1509,7 @@ ucnv_swap(const UDataSwapper *ds,
}
/* avoid compiler warnings - not otherwise necessary, and the value does not matter */
- inExtIndexes=NULL;
+ inExtIndexes=nullptr;
} else {
/* there is extension data after the base data, see ucnv_ext.h */
if(length>=0 && length<(extOffset+UCNV_EXT_INDEXES_MIN_LENGTH*4)) {
diff --git a/contrib/libs/icu/common/ucnv_cb.cpp b/contrib/libs/icu/common/ucnv_cb.cpp
index 1bb00120149..dd559270dd7 100644
--- a/contrib/libs/icu/common/ucnv_cb.cpp
+++ b/contrib/libs/icu/common/ucnv_cb.cpp
@@ -54,8 +54,8 @@ ucnv_cbFromUWriteBytes (UConverterFromUnicodeArgs *args,
U_CAPI void U_EXPORT2
ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args,
- const UChar** source,
- const UChar* sourceLimit,
+ const char16_t** source,
+ const char16_t* sourceLimit,
int32_t offsetIndex,
UErrorCode * err)
{
@@ -85,8 +85,8 @@ ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args,
args->targetLimit,
source,
sourceLimit,
- NULL, /* no offsets */
- FALSE, /* no flush */
+ nullptr, /* no offsets */
+ false, /* no flush */
err);
if(args->offsets)
@@ -140,8 +140,8 @@ ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args,
newTargetLimit,
source,
sourceLimit,
- NULL,
- FALSE,
+ nullptr,
+ false,
&err2);
/* We can go ahead and overwrite the length here. We know just how
@@ -200,12 +200,12 @@ ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args,
* and will not recurse.
* At worst we should get a U_BUFFER_OVERFLOW_ERROR.
*/
- const UChar *source = (const UChar *)converter->subChars;
+ const char16_t *source = (const char16_t *)converter->subChars;
ucnv_cbFromUWriteUChars(args, &source, source - length, offsetIndex, err);
return;
}
- if(converter->sharedData->impl->writeSub!=NULL) {
+ if(converter->sharedData->impl->writeSub!=nullptr) {
converter->sharedData->impl->writeSub(args, offsetIndex, err);
}
else if(converter->subChar1!=0 && (uint16_t)converter->invalidUCharBuffer[0]<=(uint16_t)0xffu) {
@@ -226,7 +226,7 @@ ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args,
U_CAPI void U_EXPORT2
ucnv_cbToUWriteUChars (UConverterToUnicodeArgs *args,
- const UChar* source,
+ const char16_t* source,
int32_t length,
int32_t offsetIndex,
UErrorCode * err)
@@ -248,7 +248,7 @@ ucnv_cbToUWriteSub (UConverterToUnicodeArgs *args,
int32_t offsetIndex,
UErrorCode * err)
{
- static const UChar kSubstituteChar1 = 0x1A, kSubstituteChar = 0xFFFD;
+ static const char16_t kSubstituteChar1 = 0x1A, kSubstituteChar = 0xFFFD;
/* could optimize this case, just one uchar */
if(args->converter->invalidCharLength == 1 && args->converter->subChar1 != 0) {
diff --git a/contrib/libs/icu/common/ucnv_cnv.cpp b/contrib/libs/icu/common/ucnv_cnv.cpp
index ea71acf92c7..ffff9429ad9 100644
--- a/contrib/libs/icu/common/ucnv_cnv.cpp
+++ b/contrib/libs/icu/common/ucnv_cnv.cpp
@@ -62,7 +62,7 @@ ucnv_fromUWriteBytes(UConverter *cnv,
int32_t *o;
/* write bytes */
- if(offsets==NULL || (o=*offsets)==NULL) {
+ if(offsets==nullptr || (o=*offsets)==nullptr) {
while(length>0 && t<targetLimit) {
*t++=*bytes++;
--length;
@@ -80,7 +80,7 @@ ucnv_fromUWriteBytes(UConverter *cnv,
/* write overflow */
if(length>0) {
- if(cnv!=NULL) {
+ if(cnv!=nullptr) {
t=(char *)cnv->charErrorBuffer;
cnv->charErrorBufferLength=(int8_t)length;
do {
@@ -93,16 +93,16 @@ ucnv_fromUWriteBytes(UConverter *cnv,
U_CFUNC void
ucnv_toUWriteUChars(UConverter *cnv,
- const UChar *uchars, int32_t length,
- UChar **target, const UChar *targetLimit,
+ const char16_t *uchars, int32_t length,
+ char16_t **target, const char16_t *targetLimit,
int32_t **offsets,
int32_t sourceIndex,
UErrorCode *pErrorCode) {
- UChar *t=*target;
+ char16_t *t=*target;
int32_t *o;
/* write UChars */
- if(offsets==NULL || (o=*offsets)==NULL) {
+ if(offsets==nullptr || (o=*offsets)==nullptr) {
while(length>0 && t<targetLimit) {
*t++=*uchars++;
--length;
@@ -120,7 +120,7 @@ ucnv_toUWriteUChars(UConverter *cnv,
/* write overflow */
if(length>0) {
- if(cnv!=NULL) {
+ if(cnv!=nullptr) {
t=cnv->UCharErrorBuffer;
cnv->UCharErrorBufferLength=(int8_t)length;
do {
@@ -134,30 +134,30 @@ ucnv_toUWriteUChars(UConverter *cnv,
U_CFUNC void
ucnv_toUWriteCodePoint(UConverter *cnv,
UChar32 c,
- UChar **target, const UChar *targetLimit,
+ char16_t **target, const char16_t *targetLimit,
int32_t **offsets,
int32_t sourceIndex,
UErrorCode *pErrorCode) {
- UChar *t;
+ char16_t *t;
int32_t *o;
t=*target;
if(t<targetLimit) {
if(c<=0xffff) {
- *t++=(UChar)c;
+ *t++=(char16_t)c;
c=U_SENTINEL;
} else /* c is a supplementary code point */ {
*t++=U16_LEAD(c);
c=U16_TRAIL(c);
if(t<targetLimit) {
- *t++=(UChar)c;
+ *t++=(char16_t)c;
c=U_SENTINEL;
}
}
/* write offsets */
- if(offsets!=NULL && (o=*offsets)!=NULL) {
+ if(offsets!=nullptr && (o=*offsets)!=nullptr) {
*o++=sourceIndex;
if((*target+1)<t) {
*o++=sourceIndex;
@@ -170,7 +170,7 @@ ucnv_toUWriteCodePoint(UConverter *cnv,
/* write overflow from c */
if(c>=0) {
- if(cnv!=NULL) {
+ if(cnv!=nullptr) {
int8_t i=0;
U16_APPEND_UNSAFE(cnv->UCharErrorBuffer, i, c);
cnv->UCharErrorBufferLength=i;
diff --git a/contrib/libs/icu/common/ucnv_ct.cpp b/contrib/libs/icu/common/ucnv_ct.cpp
index b40e1b2c970..46f30e5ece6 100644
--- a/contrib/libs/icu/common/ucnv_ct.cpp
+++ b/contrib/libs/icu/common/ucnv_ct.cpp
@@ -225,23 +225,23 @@ static COMPOUND_TEXT_CONVERTERS getState(int codepoint) {
static COMPOUND_TEXT_CONVERTERS findStateFromEscSeq(const char* source, const char* sourceLimit, const uint8_t* toUBytesBuffer, int32_t toUBytesBufferLength, UErrorCode *err) {
COMPOUND_TEXT_CONVERTERS state = INVALID;
- UBool matchFound = FALSE;
+ UBool matchFound = false;
int32_t i, n, offset = toUBytesBufferLength;
for (i = 0; i < NUM_OF_CONVERTERS; i++) {
- matchFound = TRUE;
+ matchFound = true;
for (n = 0; escSeqCompoundText[i][n] != 0; n++) {
if (n < toUBytesBufferLength) {
if (toUBytesBuffer[n] != escSeqCompoundText[i][n]) {
- matchFound = FALSE;
+ matchFound = false;
break;
}
} else if ((source + (n - offset)) >= sourceLimit) {
*err = U_TRUNCATED_CHAR_FOUND;
- matchFound = FALSE;
+ matchFound = false;
break;
} else if (*(source + (n - offset)) != escSeqCompoundText[i][n]) {
- matchFound = FALSE;
+ matchFound = false;
break;
}
}
@@ -261,13 +261,13 @@ static COMPOUND_TEXT_CONVERTERS findStateFromEscSeq(const char* source, const ch
static void U_CALLCONV
_CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
cnv->extraInfo = uprv_malloc (sizeof (UConverterDataCompoundText));
- if (cnv->extraInfo != NULL) {
+ if (cnv->extraInfo != nullptr) {
UConverterDataCompoundText *myConverterData = (UConverterDataCompoundText *) cnv->extraInfo;
UConverterNamePieces stackPieces;
UConverterLoadArgs stackArgs=UCNV_LOAD_ARGS_INITIALIZER;
- myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_0] = NULL;
+ myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_0] = nullptr;
myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_1] = ucnv_loadSharedData("icu-internal-compound-s1", &stackPieces, &stackArgs, errorCode);
myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_2] = ucnv_loadSharedData("icu-internal-compound-s2", &stackPieces, &stackArgs, errorCode);
myConverterData->myConverterArray[COMPOUND_TEXT_SINGLE_3] = ucnv_loadSharedData("icu-internal-compound-s3", &stackPieces, &stackArgs, errorCode);
@@ -306,16 +306,16 @@ _CompoundTextClose(UConverter *converter) {
UConverterDataCompoundText* myConverterData = (UConverterDataCompoundText*)(converter->extraInfo);
int32_t i;
- if (converter->extraInfo != NULL) {
+ if (converter->extraInfo != nullptr) {
/*close the array of converter pointers and free the memory*/
for (i = 0; i < NUM_OF_CONVERTERS; i++) {
- if (myConverterData->myConverterArray[i] != NULL) {
+ if (myConverterData->myConverterArray[i] != nullptr) {
ucnv_unloadSharedDataIfReady(myConverterData->myConverterArray[i]);
}
}
uprv_free(converter->extraInfo);
- converter->extraInfo = NULL;
+ converter->extraInfo = nullptr;
}
}
@@ -336,8 +336,8 @@ UConverter_fromUnicode_CompoundText_OFFSETS(UConverterFromUnicodeArgs* args, UEr
UConverter *cnv = args->converter;
uint8_t *target = (uint8_t *) args->target;
const uint8_t *targetLimit = (const uint8_t *) args->targetLimit;
- const UChar* source = args->source;
- const UChar* sourceLimit = args->sourceLimit;
+ const char16_t* source = args->source;
+ const char16_t* sourceLimit = args->sourceLimit;
/* int32_t* offsets = args->offsets; */
UChar32 sourceChar;
UBool useFallback = cnv->useFallback;
@@ -368,7 +368,7 @@ getTrail:
/*look ahead to find the trail surrogate*/
if(source < sourceLimit) {
/* test the following code unit */
- UChar trail=(UChar) *source;
+ char16_t trail=(char16_t) *source;
if(U16_IS_TRAIL(trail)) {
source++;
sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
@@ -467,14 +467,14 @@ static void U_CALLCONV
UConverter_toUnicode_CompoundText_OFFSETS(UConverterToUnicodeArgs *args,
UErrorCode* err){
const char *mySource = (char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const char *mySourceLimit = args->sourceLimit;
const char *tmpSourceLimit = mySourceLimit;
uint32_t mySourceChar = 0x0000;
COMPOUND_TEXT_CONVERTERS currentState, tmpState;
int32_t sourceOffset = 0;
UConverterDataCompoundText *myConverterData = (UConverterDataCompoundText *) args->converter->extraInfo;
- UConverterSharedData* savedSharedData = NULL;
+ UConverterSharedData* savedSharedData = nullptr;
UConverterToUnicodeArgs subArgs;
int32_t minArgsSize;
@@ -602,8 +602,8 @@ static const UConverterImpl _CompoundTextImpl = {
UCNV_COMPOUND_TEXT,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_CompoundTextOpen,
_CompoundTextClose,
@@ -613,15 +613,15 @@ static const UConverterImpl _CompoundTextImpl = {
UConverter_toUnicode_CompoundText_OFFSETS,
UConverter_fromUnicode_CompoundText_OFFSETS,
UConverter_fromUnicode_CompoundText_OFFSETS,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_CompoundTextgetName,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_CompoundText_GetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _CompoundTextStaticData = {
@@ -634,8 +634,8 @@ static const UConverterStaticData _CompoundTextStaticData = {
6,
{ 0xef, 0, 0, 0 },
1,
- FALSE,
- FALSE,
+ false,
+ false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnv_err.cpp b/contrib/libs/icu/common/ucnv_err.cpp
index 4210673ef93..761c442632f 100644
--- a/contrib/libs/icu/common/ucnv_err.cpp
+++ b/contrib/libs/icu/common/ucnv_err.cpp
@@ -91,7 +91,7 @@ U_CAPI void U_EXPORT2
UCNV_FROM_U_CALLBACK_STOP (
const void *context,
UConverterFromUnicodeArgs *fromUArgs,
- const UChar* codeUnits,
+ const char16_t* codeUnits,
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
@@ -132,7 +132,7 @@ U_CAPI void U_EXPORT2
UCNV_FROM_U_CALLBACK_SKIP (
const void *context,
UConverterFromUnicodeArgs *fromUArgs,
- const UChar* codeUnits,
+ const char16_t* codeUnits,
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
@@ -150,7 +150,7 @@ UCNV_FROM_U_CALLBACK_SKIP (
*/
*err = U_ZERO_ERROR;
}
- else if (context == NULL || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
+ else if (context == nullptr || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
{
*err = U_ZERO_ERROR;
}
@@ -163,7 +163,7 @@ U_CAPI void U_EXPORT2
UCNV_FROM_U_CALLBACK_SUBSTITUTE (
const void *context,
UConverterFromUnicodeArgs *fromArgs,
- const UChar* codeUnits,
+ const char16_t* codeUnits,
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
@@ -180,7 +180,7 @@ UCNV_FROM_U_CALLBACK_SUBSTITUTE (
*/
*err = U_ZERO_ERROR;
}
- else if (context == NULL || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
+ else if (context == nullptr || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
{
*err = U_ZERO_ERROR;
ucnv_cbFromUWriteSub(fromArgs, 0, err);
@@ -199,23 +199,23 @@ U_CAPI void U_EXPORT2
UCNV_FROM_U_CALLBACK_ESCAPE (
const void *context,
UConverterFromUnicodeArgs *fromArgs,
- const UChar *codeUnits,
+ const char16_t *codeUnits,
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode * err)
{
- UChar valueString[VALUE_STRING_LENGTH];
+ char16_t valueString[VALUE_STRING_LENGTH];
int32_t valueStringLength = 0;
int32_t i = 0;
- const UChar *myValueSource = NULL;
+ const char16_t *myValueSource = nullptr;
UErrorCode err2 = U_ZERO_ERROR;
- UConverterFromUCallback original = NULL;
+ UConverterFromUCallback original = nullptr;
const void *originalContext;
- UConverterFromUCallback ignoredCallback = NULL;
+ UConverterFromUCallback ignoredCallback = nullptr;
const void *ignoredContext;
if (reason > UCNV_IRREGULAR)
@@ -233,7 +233,7 @@ UCNV_FROM_U_CALLBACK_ESCAPE (
ucnv_setFromUCallBack (fromArgs->converter,
(UConverterFromUCallback) UCNV_FROM_U_CALLBACK_SUBSTITUTE,
- NULL,
+ nullptr,
&original,
&originalContext,
&err2);
@@ -243,12 +243,12 @@ UCNV_FROM_U_CALLBACK_ESCAPE (
*err = err2;
return;
}
- if(context==NULL)
+ if(context==nullptr)
{
while (i < length)
{
- valueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
- valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
+ valueString[valueStringLength++] = (char16_t) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
+ valueString[valueStringLength++] = (char16_t) UNICODE_U_CODEPOINT; /* adding U */
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[i++], 16, 4);
}
}
@@ -259,78 +259,78 @@ UCNV_FROM_U_CALLBACK_ESCAPE (
case UCNV_PRV_ESCAPE_JAVA:
while (i < length)
{
- valueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
- valueString[valueStringLength++] = (UChar) UNICODE_U_LOW_CODEPOINT; /* adding u */
+ valueString[valueStringLength++] = (char16_t) UNICODE_RS_CODEPOINT; /* adding \ */
+ valueString[valueStringLength++] = (char16_t) UNICODE_U_LOW_CODEPOINT; /* adding u */
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[i++], 16, 4);
}
break;
case UCNV_PRV_ESCAPE_C:
- valueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
+ valueString[valueStringLength++] = (char16_t) UNICODE_RS_CODEPOINT; /* adding \ */
if(length==2){
- valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
+ valueString[valueStringLength++] = (char16_t) UNICODE_U_CODEPOINT; /* adding U */
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, codePoint, 16, 8);
}
else{
- valueString[valueStringLength++] = (UChar) UNICODE_U_LOW_CODEPOINT; /* adding u */
+ valueString[valueStringLength++] = (char16_t) UNICODE_U_LOW_CODEPOINT; /* adding u */
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[0], 16, 4);
}
break;
case UCNV_PRV_ESCAPE_XML_DEC:
- valueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
- valueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
+ valueString[valueStringLength++] = (char16_t) UNICODE_AMP_CODEPOINT; /* adding & */
+ valueString[valueStringLength++] = (char16_t) UNICODE_HASH_CODEPOINT; /* adding # */
if(length==2){
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, codePoint, 10, 0);
}
else{
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[0], 10, 0);
}
- valueString[valueStringLength++] = (UChar) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
+ valueString[valueStringLength++] = (char16_t) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
break;
case UCNV_PRV_ESCAPE_XML_HEX:
- valueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
- valueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
- valueString[valueStringLength++] = (UChar) UNICODE_X_LOW_CODEPOINT; /* adding x */
+ valueString[valueStringLength++] = (char16_t) UNICODE_AMP_CODEPOINT; /* adding & */
+ valueString[valueStringLength++] = (char16_t) UNICODE_HASH_CODEPOINT; /* adding # */
+ valueString[valueStringLength++] = (char16_t) UNICODE_X_LOW_CODEPOINT; /* adding x */
if(length==2){
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, codePoint, 16, 0);
}
else{
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[0], 16, 0);
}
- valueString[valueStringLength++] = (UChar) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
+ valueString[valueStringLength++] = (char16_t) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
break;
case UCNV_PRV_ESCAPE_UNICODE:
- valueString[valueStringLength++] = (UChar) UNICODE_LEFT_CURLY_CODEPOINT; /* adding { */
- valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
- valueString[valueStringLength++] = (UChar) UNICODE_PLUS_CODEPOINT; /* adding + */
+ valueString[valueStringLength++] = (char16_t) UNICODE_LEFT_CURLY_CODEPOINT; /* adding { */
+ valueString[valueStringLength++] = (char16_t) UNICODE_U_CODEPOINT; /* adding U */
+ valueString[valueStringLength++] = (char16_t) UNICODE_PLUS_CODEPOINT; /* adding + */
if (length == 2) {
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, codePoint, 16, 4);
} else {
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[0], 16, 4);
}
- valueString[valueStringLength++] = (UChar) UNICODE_RIGHT_CURLY_CODEPOINT; /* adding } */
+ valueString[valueStringLength++] = (char16_t) UNICODE_RIGHT_CURLY_CODEPOINT; /* adding } */
break;
case UCNV_PRV_ESCAPE_CSS2:
- valueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
+ valueString[valueStringLength++] = (char16_t) UNICODE_RS_CODEPOINT; /* adding \ */
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, codePoint, 16, 0);
/* Always add space character, because the next character might be whitespace,
which would erroneously be considered the termination of the escape sequence. */
- valueString[valueStringLength++] = (UChar) UNICODE_SPACE_CODEPOINT;
+ valueString[valueStringLength++] = (char16_t) UNICODE_SPACE_CODEPOINT;
break;
default:
while (i < length)
{
- valueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
- valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
+ valueString[valueStringLength++] = (char16_t) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
+ valueString[valueStringLength++] = (char16_t) UNICODE_U_CODEPOINT; /* adding U */
valueStringLength += uprv_itou (valueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint16_t)codeUnits[i++], 16, 4);
}
}
@@ -373,7 +373,7 @@ UCNV_TO_U_CALLBACK_SKIP (
(void)length;
if (reason <= UCNV_IRREGULAR)
{
- if (context == NULL || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
+ if (context == nullptr || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
{
*err = U_ZERO_ERROR;
}
@@ -395,7 +395,7 @@ UCNV_TO_U_CALLBACK_SUBSTITUTE (
(void)length;
if (reason <= UCNV_IRREGULAR)
{
- if (context == NULL || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
+ if (context == nullptr || (*((char*)context) == UCNV_PRV_STOP_ON_ILLEGAL && reason == UCNV_UNASSIGNED))
{
*err = U_ZERO_ERROR;
ucnv_cbToUWriteSub(toArgs,0,err);
@@ -417,7 +417,7 @@ UCNV_TO_U_CALLBACK_ESCAPE (
UConverterCallbackReason reason,
UErrorCode * err)
{
- UChar uniValueString[VALUE_STRING_LENGTH];
+ char16_t uniValueString[VALUE_STRING_LENGTH];
int32_t valueStringLength = 0;
int32_t i = 0;
@@ -426,12 +426,12 @@ UCNV_TO_U_CALLBACK_ESCAPE (
return;
}
- if(context==NULL)
+ if(context==nullptr)
{
while (i < length)
{
- uniValueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
- uniValueString[valueStringLength++] = (UChar) UNICODE_X_CODEPOINT; /* adding X */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_X_CODEPOINT; /* adding X */
valueStringLength += uprv_itou (uniValueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint8_t) codeUnits[i++], 16, 2);
}
}
@@ -442,36 +442,36 @@ UCNV_TO_U_CALLBACK_ESCAPE (
case UCNV_PRV_ESCAPE_XML_DEC:
while (i < length)
{
- uniValueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
- uniValueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_AMP_CODEPOINT; /* adding & */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_HASH_CODEPOINT; /* adding # */
valueStringLength += uprv_itou (uniValueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint8_t)codeUnits[i++], 10, 0);
- uniValueString[valueStringLength++] = (UChar) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
}
break;
case UCNV_PRV_ESCAPE_XML_HEX:
while (i < length)
{
- uniValueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
- uniValueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
- uniValueString[valueStringLength++] = (UChar) UNICODE_X_LOW_CODEPOINT; /* adding x */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_AMP_CODEPOINT; /* adding & */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_HASH_CODEPOINT; /* adding # */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_X_LOW_CODEPOINT; /* adding x */
valueStringLength += uprv_itou (uniValueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint8_t)codeUnits[i++], 16, 0);
- uniValueString[valueStringLength++] = (UChar) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_SEMICOLON_CODEPOINT; /* adding ; */
}
break;
case UCNV_PRV_ESCAPE_C:
while (i < length)
{
- uniValueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
- uniValueString[valueStringLength++] = (UChar) UNICODE_X_LOW_CODEPOINT; /* adding x */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_RS_CODEPOINT; /* adding \ */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_X_LOW_CODEPOINT; /* adding x */
valueStringLength += uprv_itou (uniValueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint8_t)codeUnits[i++], 16, 2);
}
break;
default:
while (i < length)
{
- uniValueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
- uniValueString[valueStringLength++] = (UChar) UNICODE_X_CODEPOINT; /* adding X */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
+ uniValueString[valueStringLength++] = (char16_t) UNICODE_X_CODEPOINT; /* adding X */
uprv_itou (uniValueString + valueStringLength, VALUE_STRING_LENGTH - valueStringLength, (uint8_t) codeUnits[i++], 16, 2);
valueStringLength += 2;
}
diff --git a/contrib/libs/icu/common/ucnv_ext.cpp b/contrib/libs/icu/common/ucnv_ext.cpp
index 7dea4eef41a..10d00a62c2c 100644
--- a/contrib/libs/icu/common/ucnv_ext.cpp
+++ b/contrib/libs/icu/common/ucnv_ext.cpp
@@ -108,7 +108,7 @@ ucnv_extFindToU(const uint32_t *toUSection, int32_t length, uint8_t byte) {
}
/*
- * TRUE if not an SI/SO stateful converter,
+ * true if not an SI/SO stateful converter,
* or if the match length fits with the current converter state
*/
#define UCNV_EXT_TO_U_VERIFY_SISO_MATCH(sisoState, match) \
@@ -132,7 +132,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
int32_t i, j, idx, length, matchLength;
uint8_t b;
- if(cx==NULL || cx[UCNV_EXT_TO_U_LENGTH]<=0) {
+ if(cx==nullptr || cx[UCNV_EXT_TO_U_LENGTH]<=0) {
return 0; /* no extension data, no match */
}
@@ -154,7 +154,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
srcLength=1;
}
}
- flush=TRUE;
+ flush=true;
}
/* we must not remember fallback matches when not using fallbacks */
@@ -198,7 +198,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
}
}
- /* search for the current UChar */
+ /* search for the current char16_t */
value=ucnv_extFindToU(toUSection, length, b);
if(value==0) {
/* no match here, stop with the longest match so far */
@@ -236,7 +236,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
static inline void
ucnv_extWriteToU(UConverter *cnv, const int32_t *cx,
uint32_t value,
- UChar **target, const UChar *targetLimit,
+ char16_t **target, const char16_t *targetLimit,
int32_t **offsets, int32_t srcIndex,
UErrorCode *pErrorCode) {
/* output the result */
@@ -251,7 +251,7 @@ ucnv_extWriteToU(UConverter *cnv, const int32_t *cx,
/* output a string - with correct data we have resultLength>0 */
ucnv_toUWriteUChars(
cnv,
- UCNV_EXT_ARRAY(cx, UCNV_EXT_TO_U_UCHARS_INDEX, UChar)+
+ UCNV_EXT_ARRAY(cx, UCNV_EXT_TO_U_UCHARS_INDEX, char16_t)+
UCNV_EXT_TO_U_GET_INDEX(value),
UCNV_EXT_TO_U_GET_LENGTH(value),
target, targetLimit,
@@ -279,7 +279,7 @@ U_CFUNC UBool
ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx,
int32_t firstLength,
const char **src, const char *srcLimit,
- UChar **target, const UChar *targetLimit,
+ char16_t **target, const char16_t *targetLimit,
int32_t **offsets, int32_t srcIndex,
UBool flush,
UErrorCode *pErrorCode) {
@@ -302,7 +302,7 @@ ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx,
target, targetLimit,
offsets, srcIndex,
pErrorCode);
- return TRUE;
+ return true;
} else if(match<0) {
/* save state for partial match */
const char *s;
@@ -323,9 +323,9 @@ ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx,
}
*src=s; /* same as *src=srcLimit; because we reached the end of input */
cnv->preToULength=(int8_t)match;
- return TRUE;
+ return true;
} else /* match==0 no match */ {
- return FALSE;
+ return false;
}
}
@@ -343,9 +343,9 @@ ucnv_extSimpleMatchToU(const int32_t *cx,
/* try to match */
match=ucnv_extMatchToU(cx, -1,
source, length,
- NULL, 0,
+ nullptr, 0,
&value,
- useFallback, TRUE);
+ useFallback, true);
if(match==length) {
/* write result for simple, single-character conversion */
if(UCNV_EXT_TO_U_IS_CODE_POINT(value)) {
@@ -358,7 +358,7 @@ ucnv_extSimpleMatchToU(const int32_t *cx,
* - match>0 && value points to string: simple conversion cannot handle multiple code points
* - match>0 && match!=length: not all input consumed, forbidden for this function
* - match==0: no match found in the first place
- * - match<0: partial match, not supported for simple conversion (and flush==TRUE)
+ * - match<0: partial match, not supported for simple conversion (and flush==true)
*/
return 0xfffe;
}
@@ -459,10 +459,10 @@ extFromUUseMapping(UBool useFallback, uint32_t value, UChar32 firstCP) {
}
/*
- * @return index of the UChar, if found; else <0
+ * @return index of the char16_t, if found; else <0
*/
static inline int32_t
-ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
+ucnv_extFindFromU(const char16_t *fromUSection, int32_t length, char16_t u) {
int32_t i, start, limit;
/* binary search */
@@ -508,7 +508,7 @@ ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
}
/*
- * @param cx pointer to extension data; if NULL, returns 0
+ * @param cx pointer to extension data; if nullptr, returns 0
* @param firstCP the first code point before all the other UChars
* @param pre UChars that must match; !initialMatch: partial match with them
* @param preLength length of pre, >=0
@@ -516,13 +516,13 @@ ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
* @param srcLength length of src, >=0
* @param pMatchValue [out] output result value for the match from the data structure
* @param useFallback "use fallback" flag, usually from cnv->useFallback
- * @param flush TRUE if the end of the input stream is reached
+ * @param flush true if the end of the input stream is reached
* @return >1: matched, return value=total match length (number of input units matched)
* 1: matched, no mapping but request for <subchar1>
* (only for the first code point)
* 0: no match
* <0: partial match, return value=negative total match length
- * (partial matches are never returned for flush==TRUE)
+ * (partial matches are never returned for flush==true)
* (partial matches are never returned as being longer than UCNV_EXT_MAX_UCHARS)
* the matchLength is 2 if only firstCP matched, and >2 if firstCP and
* further code units matched
@@ -530,21 +530,21 @@ ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
static int32_t
ucnv_extMatchFromU(const int32_t *cx,
UChar32 firstCP,
- const UChar *pre, int32_t preLength,
- const UChar *src, int32_t srcLength,
+ const char16_t *pre, int32_t preLength,
+ const char16_t *src, int32_t srcLength,
uint32_t *pMatchValue,
UBool useFallback, UBool flush) {
const uint16_t *stage12, *stage3;
const uint32_t *stage3b;
- const UChar *fromUTableUChars, *fromUSectionUChars;
+ const char16_t *fromUTableUChars, *fromUSectionUChars;
const uint32_t *fromUTableValues, *fromUSectionValues;
uint32_t value, matchValue;
int32_t i, j, idx, length, matchLength;
- UChar c;
+ char16_t c;
- if(cx==NULL) {
+ if(cx==nullptr) {
return 0; /* no extension data, no match */
}
@@ -575,7 +575,7 @@ ucnv_extMatchFromU(const int32_t *cx,
idx=(int32_t)UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value);
/* initialize */
- fromUTableUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, UChar);
+ fromUTableUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, char16_t);
fromUTableValues=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_VALUES_INDEX, uint32_t);
matchValue=0;
@@ -618,7 +618,7 @@ ucnv_extMatchFromU(const int32_t *cx,
}
}
- /* search for the current UChar */
+ /* search for the current char16_t */
idx=ucnv_extFindFromU(fromUSectionUChars, length, c);
if(idx<0) {
/* no match here, stop with the longest match so far */
@@ -749,7 +749,7 @@ ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx,
U_CFUNC UBool
ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
UChar32 cp,
- const UChar **src, const UChar *srcLimit,
+ const char16_t **src, const char16_t *srcLimit,
char **target, const char *targetLimit,
int32_t **offsets, int32_t srcIndex,
UBool flush,
@@ -759,7 +759,7 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
/* try to match */
match=ucnv_extMatchFromU(cx, cp,
- NULL, 0,
+ nullptr, 0,
*src, (int32_t)(srcLimit-*src),
&value,
cnv->useFallback, flush);
@@ -778,10 +778,10 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
target, targetLimit,
offsets, srcIndex,
pErrorCode);
- return TRUE;
+ return true;
} else if(match<0) {
/* save state for partial match */
- const UChar *s;
+ const char16_t *s;
int32_t j;
/* copy the first code point */
@@ -795,13 +795,13 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
}
*src=s; /* same as *src=srcLimit; because we reached the end of input */
cnv->preFromULength=(int8_t)match;
- return TRUE;
+ return true;
} else if(match==1) {
/* matched, no mapping but request for <subchar1> */
- cnv->useSubChar1=TRUE;
- return FALSE;
+ cnv->useSubChar1=true;
+ return false;
} else /* match==0 no match */ {
- return FALSE;
+ return false;
}
}
@@ -819,10 +819,10 @@ ucnv_extSimpleMatchFromU(const int32_t *cx,
/* try to match */
match=ucnv_extMatchFromU(cx,
cp,
- NULL, 0,
- NULL, 0,
+ nullptr, 0,
+ nullptr, 0,
&value,
- useFallback, TRUE);
+ useFallback, true);
if(match>=2) {
/* write result for simple, single-character conversion */
int32_t length;
@@ -854,7 +854,7 @@ ucnv_extSimpleMatchFromU(const int32_t *cx,
* - match>1 && resultLength>4: result too long for simple conversion
* - match==1: no match found, <subchar1> preferred
* - match==0: no match found in the first place
- * - match<0: partial match, not supported for simple conversion (and flush==TRUE)
+ * - match<0: partial match, not supported for simple conversion (and flush==true)
*/
return 0;
}
@@ -901,7 +901,7 @@ ucnv_extContinueMatchFromU(UConverter *cnv,
pErrorCode);
} else if(match<0) {
/* save state for partial match */
- const UChar *s;
+ const char16_t *s;
int32_t j;
/* just _append_ the newly consumed input to preFromU[] */
@@ -934,7 +934,7 @@ ucnv_extContinueMatchFromU(UConverter *cnv,
if(match==1) {
/* matched, no mapping but request for <subchar1> */
- cnv->useSubChar1=TRUE;
+ cnv->useSubChar1=true;
}
/* move the first code point to the error field */
@@ -961,12 +961,12 @@ extSetUseMapping(UConverterUnicodeSet which, int32_t minLength, uint32_t value)
// Do not add entries with reserved bits set.
if(((value&(UCNV_EXT_FROM_U_ROUNDTRIP_FLAG|UCNV_EXT_FROM_U_RESERVED_MASK))!=
UCNV_EXT_FROM_U_ROUNDTRIP_FLAG)) {
- return FALSE;
+ return false;
}
} else /* UCNV_ROUNDTRIP_AND_FALLBACK_SET */ {
// Do not add entries with reserved bits set.
if((value&UCNV_EXT_FROM_U_RESERVED_MASK)!=0) {
- return FALSE;
+ return false;
}
}
// Do not add <subchar1> entries or other (future?) pseudo-entries
@@ -981,16 +981,16 @@ ucnv_extGetUnicodeSetString(const UConverterSharedData *sharedData,
UConverterUnicodeSet which,
int32_t minLength,
UChar32 firstCP,
- UChar s[UCNV_EXT_MAX_UCHARS], int32_t length,
+ char16_t s[UCNV_EXT_MAX_UCHARS], int32_t length,
int32_t sectionIndex,
UErrorCode *pErrorCode) {
- const UChar *fromUSectionUChars;
+ const char16_t *fromUSectionUChars;
const uint32_t *fromUSectionValues;
uint32_t value;
int32_t i, count;
- fromUSectionUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, UChar)+sectionIndex;
+ fromUSectionUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, char16_t)+sectionIndex;
fromUSectionValues=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_VALUES_INDEX, uint32_t)+sectionIndex;
/* read first pair of the section */
@@ -1039,12 +1039,12 @@ ucnv_extGetUnicodeSet(const UConverterSharedData *sharedData,
uint32_t value;
int32_t st1, stage1Length, st2, st3, minLength;
- UChar s[UCNV_EXT_MAX_UCHARS];
+ char16_t s[UCNV_EXT_MAX_UCHARS];
UChar32 c;
int32_t length;
cx=sharedData->mbcs.extIndexes;
- if(cx==NULL) {
+ if(cx==nullptr) {
return;
}
diff --git a/contrib/libs/icu/common/ucnv_io.cpp b/contrib/libs/icu/common/ucnv_io.cpp
index 7a95a3f1e61..48bb5be42bd 100644
--- a/contrib/libs/icu/common/ucnv_io.cpp
+++ b/contrib/libs/icu/common/ucnv_io.cpp
@@ -174,8 +174,8 @@ typedef struct UAliasContext {
static const char DATA_NAME[] = "cnvalias";
static const char DATA_TYPE[] = "icu";
-static UDataMemory *gAliasData=NULL;
-static icu::UInitOnce gAliasDataInitOnce = U_INITONCE_INITIALIZER;
+static UDataMemory *gAliasData=nullptr;
+static icu::UInitOnce gAliasDataInitOnce {};
enum {
tocLengthIndex=0,
@@ -216,17 +216,17 @@ isAcceptable(void * /*context*/,
pInfo->formatVersion[0]==3);
}
-static UBool U_CALLCONV ucnv_io_cleanup(void)
+static UBool U_CALLCONV ucnv_io_cleanup()
{
if (gAliasData) {
udata_close(gAliasData);
- gAliasData = NULL;
+ gAliasData = nullptr;
}
gAliasDataInitOnce.reset();
uprv_memset(&gMainTable, 0, sizeof(gMainTable));
- return TRUE; /* Everything was cleaned up */
+ return true; /* Everything was cleaned up */
}
static void U_CALLCONV initAliasData(UErrorCode &errCode) {
@@ -238,8 +238,8 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) {
ucln_common_registerCleanup(UCLN_COMMON_UCNV_IO, ucnv_io_cleanup);
- U_ASSERT(gAliasData == NULL);
- data = udata_openChoice(NULL, DATA_TYPE, DATA_NAME, isAcceptable, NULL, &errCode);
+ U_ASSERT(gAliasData == nullptr);
+ data = udata_openChoice(nullptr, DATA_TYPE, DATA_NAME, isAcceptable, nullptr, &errCode);
if(U_FAILURE(errCode)) {
return;
}
@@ -317,9 +317,9 @@ haveAliasData(UErrorCode *pErrorCode) {
static inline UBool
isAlias(const char *alias, UErrorCode *pErrorCode) {
- if(alias==NULL) {
+ if(alias==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
return (UBool)(*alias!=0);
}
@@ -388,13 +388,13 @@ ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
char *dstItr = dst;
uint8_t type, nextType;
char c1;
- UBool afterDigit = FALSE;
+ UBool afterDigit = false;
while ((c1 = *name++) != 0) {
type = GET_ASCII_TYPE(c1);
switch (type) {
case UIGNORE:
- afterDigit = FALSE;
+ afterDigit = false;
continue; /* ignore all but letters and digits */
case ZERO:
if (!afterDigit) {
@@ -405,11 +405,11 @@ ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
}
break;
case NONZERO:
- afterDigit = TRUE;
+ afterDigit = true;
break;
default:
c1 = (char)type; /* lowercased letter */
- afterDigit = FALSE;
+ afterDigit = false;
break;
}
*dstItr++ = c1;
@@ -423,13 +423,13 @@ ucnv_io_stripEBCDICForCompare(char *dst, const char *name) {
char *dstItr = dst;
uint8_t type, nextType;
char c1;
- UBool afterDigit = FALSE;
+ UBool afterDigit = false;
while ((c1 = *name++) != 0) {
type = GET_EBCDIC_TYPE(c1);
switch (type) {
case UIGNORE:
- afterDigit = FALSE;
+ afterDigit = false;
continue; /* ignore all but letters and digits */
case ZERO:
if (!afterDigit) {
@@ -440,11 +440,11 @@ ucnv_io_stripEBCDICForCompare(char *dst, const char *name) {
}
break;
case NONZERO:
- afterDigit = TRUE;
+ afterDigit = true;
break;
default:
c1 = (char)type; /* lowercased letter */
- afterDigit = FALSE;
+ afterDigit = false;
break;
}
*dstItr++ = c1;
@@ -479,14 +479,14 @@ ucnv_compareNames(const char *name1, const char *name2) {
int rc;
uint8_t type, nextType;
char c1, c2;
- UBool afterDigit1 = FALSE, afterDigit2 = FALSE;
+ UBool afterDigit1 = false, afterDigit2 = false;
for (;;) {
while ((c1 = *name1++) != 0) {
type = GET_CHAR_TYPE(c1);
switch (type) {
case UIGNORE:
- afterDigit1 = FALSE;
+ afterDigit1 = false;
continue; /* ignore all but letters and digits */
case ZERO:
if (!afterDigit1) {
@@ -497,11 +497,11 @@ ucnv_compareNames(const char *name1, const char *name2) {
}
break;
case NONZERO:
- afterDigit1 = TRUE;
+ afterDigit1 = true;
break;
default:
c1 = (char)type; /* lowercased letter */
- afterDigit1 = FALSE;
+ afterDigit1 = false;
break;
}
break; /* deliver c1 */
@@ -510,7 +510,7 @@ ucnv_compareNames(const char *name1, const char *name2) {
type = GET_CHAR_TYPE(c2);
switch (type) {
case UIGNORE:
- afterDigit2 = FALSE;
+ afterDigit2 = false;
continue; /* ignore all but letters and digits */
case ZERO:
if (!afterDigit2) {
@@ -521,11 +521,11 @@ ucnv_compareNames(const char *name1, const char *name2) {
}
break;
case NONZERO:
- afterDigit2 = TRUE;
+ afterDigit2 = true;
break;
default:
c2 = (char)type; /* lowercased letter */
- afterDigit2 = FALSE;
+ afterDigit2 = false;
break;
}
break; /* deliver c2 */
@@ -615,7 +615,7 @@ findConverter(const char *alias, UBool *containsOption, UErrorCode *pErrorCode)
/*
* Is this alias in this list?
- * alias and listOffset should be non-NULL.
+ * alias and listOffset should be non-nullptr.
*/
static inline UBool
isAliasInList(const char *alias, uint32_t listOffset) {
@@ -628,11 +628,11 @@ isAliasInList(const char *alias, uint32_t listOffset) {
if (currList[currAlias]
&& ucnv_compareNames(alias, GET_STRING(currList[currAlias]))==0)
{
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
/*
@@ -650,7 +650,7 @@ findTaggedAliasListsOffset(const char *alias, const char *standard, UErrorCode *
uint32_t tagNum = getTagNumber(standard);
/* Make a quick guess. Hopefully they used a TR22 canonical alias. */
- convNum = findConverter(alias, NULL, &myErr);
+ convNum = findConverter(alias, nullptr, &myErr);
if (myErr != U_ZERO_ERROR) {
*pErrorCode = myErr;
}
@@ -701,7 +701,7 @@ findTaggedConverterNum(const char *alias, const char *standard, UErrorCode *pErr
uint32_t tagNum = getTagNumber(standard);
/* Make a quick guess. Hopefully they used a TR22 canonical alias. */
- convNum = findConverter(alias, NULL, &myErr);
+ convNum = findConverter(alias, nullptr, &myErr);
if (myErr != U_ZERO_ERROR) {
*pErrorCode = myErr;
}
@@ -762,7 +762,7 @@ ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *p
}
}
- return NULL;
+ return nullptr;
}
U_CDECL_BEGIN
@@ -804,7 +804,7 @@ ucnv_io_nextStandardAliases(UEnumeration *enumerator,
if (resultLength) {
*resultLength = 0;
}
- return NULL;
+ return nullptr;
}
static void U_CALLCONV
@@ -822,8 +822,8 @@ U_CDECL_END
/* Enumerate the aliases for the specified converter and standard tag */
static const UEnumeration gEnumAliases = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_io_closeUEnumeration,
ucnv_io_countStandardAliases,
uenum_unextDefault,
@@ -836,7 +836,7 @@ ucnv_openStandardNames(const char *convName,
const char *standard,
UErrorCode *pErrorCode)
{
- UEnumeration *myEnum = NULL;
+ UEnumeration *myEnum = nullptr;
if (haveAliasData(pErrorCode) && isAlias(convName, pErrorCode)) {
uint32_t listOffset = findTaggedAliasListsOffset(convName, standard, pErrorCode);
@@ -847,16 +847,16 @@ ucnv_openStandardNames(const char *convName,
UAliasContext *myContext;
myEnum = static_cast<UEnumeration *>(uprv_malloc(sizeof(UEnumeration)));
- if (myEnum == NULL) {
+ if (myEnum == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(myEnum, &gEnumAliases, sizeof(UEnumeration));
myContext = static_cast<UAliasContext *>(uprv_malloc(sizeof(UAliasContext)));
- if (myContext == NULL) {
+ if (myContext == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
uprv_free(myEnum);
- return NULL;
+ return nullptr;
}
myContext->listOffset = listOffset;
myContext->listIdx = 0;
@@ -870,7 +870,7 @@ ucnv_openStandardNames(const char *convName,
static uint16_t
ucnv_io_countAliases(const char *alias, UErrorCode *pErrorCode) {
if(haveAliasData(pErrorCode) && isAlias(alias, pErrorCode)) {
- uint32_t convNum = findConverter(alias, NULL, pErrorCode);
+ uint32_t convNum = findConverter(alias, nullptr, pErrorCode);
if (convNum < gMainTable.converterListSize) {
/* tagListNum - 1 is the ALL tag */
int32_t listOffset = gMainTable.taggedAliasArray[(gMainTable.tagListSize - 1)*gMainTable.converterListSize + convNum];
@@ -889,7 +889,7 @@ static uint16_t
ucnv_io_getAliases(const char *alias, uint16_t start, const char **aliases, UErrorCode *pErrorCode) {
if(haveAliasData(pErrorCode) && isAlias(alias, pErrorCode)) {
uint32_t currAlias;
- uint32_t convNum = findConverter(alias, NULL, pErrorCode);
+ uint32_t convNum = findConverter(alias, nullptr, pErrorCode);
if (convNum < gMainTable.converterListSize) {
/* tagListNum - 1 is the ALL tag */
int32_t listOffset = gMainTable.taggedAliasArray[(gMainTable.tagListSize - 1)*gMainTable.converterListSize + convNum];
@@ -913,7 +913,7 @@ ucnv_io_getAliases(const char *alias, uint16_t start, const char **aliases, UErr
static const char *
ucnv_io_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode) {
if(haveAliasData(pErrorCode) && isAlias(alias, pErrorCode)) {
- uint32_t convNum = findConverter(alias, NULL, pErrorCode);
+ uint32_t convNum = findConverter(alias, nullptr, pErrorCode);
if (convNum < gMainTable.converterListSize) {
/* tagListNum - 1 is the ALL tag */
int32_t listOffset = gMainTable.taggedAliasArray[(gMainTable.tagListSize - 1)*gMainTable.converterListSize + convNum];
@@ -932,7 +932,7 @@ ucnv_io_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode) {
}
/* else converter not found */
}
- return NULL;
+ return nullptr;
}
static uint16_t
@@ -954,7 +954,7 @@ ucnv_getStandard(uint16_t n, UErrorCode *pErrorCode) {
*pErrorCode = U_INDEX_OUTOFBOUNDS_ERROR;
}
- return NULL;
+ return nullptr;
}
U_CAPI const char * U_EXPORT2
@@ -974,7 +974,7 @@ ucnv_getStandardName(const char *alias, const char *standard, UErrorCode *pError
}
}
- return NULL;
+ return nullptr;
}
U_CAPI uint16_t U_EXPORT2
@@ -997,7 +997,7 @@ ucnv_getAliases(const char *alias, const char **aliases, UErrorCode *pErrorCode)
}
U_CAPI uint16_t U_EXPORT2
-ucnv_countStandards(void)
+ucnv_countStandards()
{
UErrorCode err = U_ZERO_ERROR;
return ucnv_io_countStandards(&err);
@@ -1013,7 +1013,7 @@ ucnv_getCanonicalName(const char *alias, const char *standard, UErrorCode *pErro
}
}
- return NULL;
+ return nullptr;
}
U_CDECL_BEGIN
@@ -1042,7 +1042,7 @@ ucnv_io_nextAllConverters(UEnumeration *enumerator,
if (resultLength) {
*resultLength = 0;
}
- return NULL;
+ return nullptr;
}
static void U_CALLCONV
@@ -1051,8 +1051,8 @@ ucnv_io_resetAllConverters(UEnumeration *enumerator, UErrorCode * /*pErrorCode*/
}
U_CDECL_END
static const UEnumeration gEnumAllConverters = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_io_closeUEnumeration,
ucnv_io_countAllConverters,
uenum_unextDefault,
@@ -1062,21 +1062,21 @@ static const UEnumeration gEnumAllConverters = {
U_CAPI UEnumeration * U_EXPORT2
ucnv_openAllNames(UErrorCode *pErrorCode) {
- UEnumeration *myEnum = NULL;
+ UEnumeration *myEnum = nullptr;
if (haveAliasData(pErrorCode)) {
uint16_t *myContext;
myEnum = static_cast<UEnumeration *>(uprv_malloc(sizeof(UEnumeration)));
- if (myEnum == NULL) {
+ if (myEnum == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(myEnum, &gEnumAllConverters, sizeof(UEnumeration));
myContext = static_cast<uint16_t *>(uprv_malloc(sizeof(uint16_t)));
- if (myContext == NULL) {
+ if (myContext == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
uprv_free(myEnum);
- return NULL;
+ return nullptr;
}
*myContext = 0;
myEnum->context = myContext;
@@ -1153,7 +1153,7 @@ ucnv_swapAliases(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -1251,7 +1251,7 @@ ucnv_swapAliases(const UDataSwapper *ds,
tempTable.resort=resort;
} else {
tempTable.rows=(TempRow *)uprv_malloc(count*sizeof(TempRow)+count*2);
- if(tempTable.rows==NULL) {
+ if(tempTable.rows==nullptr) {
udata_printError(ds, "ucnv_swapAliases(): unable to allocate memory for sorting tables (max length: %u)\n",
count);
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
@@ -1288,7 +1288,7 @@ ucnv_swapAliases(const UDataSwapper *ds,
uprv_sortArray(tempTable.rows, (int32_t)count, sizeof(TempRow),
io_compareRows, &tempTable,
- FALSE, pErrorCode);
+ false, pErrorCode);
if(U_SUCCESS(*pErrorCode)) {
/* copy/swap/permutate items */
diff --git a/contrib/libs/icu/common/ucnv_lmb.cpp b/contrib/libs/icu/common/ucnv_lmb.cpp
index 6969727927e..ab14a119efb 100644
--- a/contrib/libs/icu/common/ucnv_lmb.cpp
+++ b/contrib/libs/icu/common/ucnv_lmb.cpp
@@ -242,15 +242,15 @@ static const char * const OptGroupByteToCPName[ULMBCS_GRP_LAST + 1] = {
/* 0x0004 */ "windows-1256",
/* 0x0005 */ "windows-1251",
/* 0x0006 */ "ibm-852",
- /* 0x0007 */ NULL, /* Unused */
+ /* 0x0007 */ nullptr, /* Unused */
/* 0x0008 */ "windows-1254",
- /* 0x0009 */ NULL, /* Control char HT */
- /* 0x000A */ NULL, /* Control char LF */
+ /* 0x0009 */ nullptr, /* Control char HT */
+ /* 0x000A */ nullptr, /* Control char LF */
/* 0x000B */ "windows-874",
- /* 0x000C */ NULL, /* Unused */
- /* 0x000D */ NULL, /* Control char CR */
- /* 0x000E */ NULL, /* Unused */
- /* 0x000F */ NULL, /* Control chars: 0x0F20 + C0/C1 character: algorithmic */
+ /* 0x000C */ nullptr, /* Unused */
+ /* 0x000D */ nullptr, /* Control char CR */
+ /* 0x000E */ nullptr, /* Unused */
+ /* 0x000F */ nullptr, /* Control chars: 0x0F20 + C0/C1 character: algorithmic */
/* 0x0010 */ "windows-932",
/* 0x0011 */ "windows-949",
/* 0x0012 */ "windows-950",
@@ -298,8 +298,8 @@ ambiguous mappings: */
static const struct _UniLMBCSGrpMap
{
- const UChar uniStartRange;
- const UChar uniEndRange;
+ const char16_t uniStartRange;
+ const char16_t uniEndRange;
const ulmbcs_byte_t GrpType;
} UniLMBCSGrpMap[]
=
@@ -445,7 +445,7 @@ static const struct _UniLMBCSGrpMap
};
static ulmbcs_byte_t
-FindLMBCSUniRange(UChar uniChar)
+FindLMBCSUniRange(char16_t uniChar)
{
const struct _UniLMBCSGrpMap * pTable = UniLMBCSGrpMap;
@@ -530,7 +530,7 @@ static const struct _LocaleLMBCSGrpMap
/* {"vi", ULMBCS_GRP_L1}, */
{"zhTW", ULMBCS_GRP_TW},
{"zh", ULMBCS_GRP_CN},
- {NULL, ULMBCS_GRP_L1}
+ {nullptr, ULMBCS_GRP_L1}
};
@@ -589,28 +589,28 @@ U_CDECL_END
#define DECLARE_LMBCS_DATA(n) \
static const UConverterImpl _LMBCSImpl##n={\
UCNV_LMBCS_##n,\
- NULL,NULL,\
+ nullptr,nullptr,\
_LMBCSOpen##n,\
_LMBCSClose,\
- NULL,\
+ nullptr,\
_LMBCSToUnicodeWithOffsets,\
_LMBCSToUnicodeWithOffsets,\
_LMBCSFromUnicode,\
_LMBCSFromUnicode,\
- NULL,\
- NULL,\
- NULL,\
- NULL,\
+ nullptr,\
+ nullptr,\
+ nullptr,\
+ nullptr,\
_LMBCSSafeClone,\
ucnv_getCompleteUnicodeSet,\
- NULL,\
- NULL\
+ nullptr,\
+ nullptr\
};\
static const UConverterStaticData _LMBCSStaticData##n={\
sizeof(UConverterStaticData),\
"LMBCS-" #n,\
0, UCNV_IBM, UCNV_LMBCS_##n, 1, 3,\
- { 0x3f, 0, 0, 0 },1,FALSE,FALSE,0,0,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} \
+ { 0x3f, 0, 0, 0 },1,false,false,0,0,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} \
};\
const UConverterSharedData _LMBCSData##n= \
UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_LMBCSStaticData##n, &_LMBCSImpl##n);
@@ -635,7 +635,7 @@ _LMBCSOpenWorker(UConverter* _this,
{
UConverterDataLMBCS * extraInfo = (UConverterDataLMBCS*)uprv_malloc (sizeof (UConverterDataLMBCS));
_this->extraInfo = extraInfo;
- if(extraInfo != NULL)
+ if(extraInfo != nullptr)
{
UConverterNamePieces stackPieces;
UConverterLoadArgs stackArgs= UCNV_LOAD_ARGS_INITIALIZER;
@@ -647,7 +647,7 @@ _LMBCSOpenWorker(UConverter* _this,
for (i=0; i <= ULMBCS_GRP_LAST && U_SUCCESS(*err); i++)
{
- if(OptGroupByteToCPName[i] != NULL) {
+ if(OptGroupByteToCPName[i] != nullptr) {
extraInfo->OptGrpConverter[i] = ucnv_loadSharedData(OptGroupByteToCPName[i], &stackPieces, &stackArgs, err);
}
}
@@ -669,19 +669,19 @@ U_CDECL_BEGIN
static void U_CALLCONV
_LMBCSClose(UConverter * _this)
{
- if (_this->extraInfo != NULL)
+ if (_this->extraInfo != nullptr)
{
ulmbcs_byte_t Ix;
UConverterDataLMBCS * extraInfo = (UConverterDataLMBCS *) _this->extraInfo;
for (Ix=0; Ix <= ULMBCS_GRP_LAST; Ix++)
{
- if (extraInfo->OptGrpConverter[Ix] != NULL)
+ if (extraInfo->OptGrpConverter[Ix] != nullptr)
ucnv_unloadSharedDataIfReady(extraInfo->OptGrpConverter[Ix]);
}
if (!_this->isExtraLocal) {
uprv_free (_this->extraInfo);
- _this->extraInfo = NULL;
+ _this->extraInfo = nullptr;
}
}
}
@@ -703,7 +703,7 @@ _LMBCSSafeClone(const UConverter *cnv,
if(*pBufferSize<=0) {
*pBufferSize=(int32_t)sizeof(LMBCSClone);
- return NULL;
+ return nullptr;
}
extraInfo=(UConverterDataLMBCS *)cnv->extraInfo;
@@ -715,13 +715,13 @@ _LMBCSSafeClone(const UConverter *cnv,
/* share the subconverters */
for(i = 0; i <= ULMBCS_GRP_LAST; ++i) {
- if(extraInfo->OptGrpConverter[i] != NULL) {
+ if(extraInfo->OptGrpConverter[i] != nullptr) {
ucnv_incrementRefCount(extraInfo->OptGrpConverter[i]);
}
}
newLMBCS->cnv.extraInfo = &newLMBCS->lmbcs;
- newLMBCS->cnv.isExtraLocal = TRUE;
+ newLMBCS->cnv.isExtraLocal = true;
return &newLMBCS->cnv;
}
@@ -748,7 +748,7 @@ LMBCSConversionWorker (
UConverterDataLMBCS * extraInfo, /* subconverters, opt & locale groups */
ulmbcs_byte_t group, /* The group to try */
ulmbcs_byte_t * pStartLMBCS, /* where to put the results */
- UChar * pUniChar, /* The input unicode character */
+ char16_t * pUniChar, /* The input unicode character */
ulmbcs_byte_t * lastConverterIndex, /* output: track last successful group used */
UBool * groups_tried /* output: track any unsuccessful groups */
)
@@ -763,14 +763,14 @@ LMBCSConversionWorker (
U_ASSERT(xcnv);
U_ASSERT(group<ULMBCS_GRP_UNICODE);
- bytesConverted = ucnv_MBCSFromUChar32(xcnv, *pUniChar, &value, FALSE);
+ bytesConverted = ucnv_MBCSFromUChar32(xcnv, *pUniChar, &value, false);
/* get the first result byte */
if(bytesConverted > 0) {
firstByte = (ulmbcs_byte_t)(value >> ((bytesConverted - 1) * 8));
} else {
/* most common failure mode is an unassigned character */
- groups_tried[group] = TRUE;
+ groups_tried[group] = true;
return 0;
}
@@ -824,7 +824,7 @@ LMBCSConversionWorker (
know we are writing LMBCS using the Unicode group
*/
static size_t
-LMBCSConvertUni(ulmbcs_byte_t * pLMBCS, UChar uniChar)
+LMBCSConvertUni(ulmbcs_byte_t * pLMBCS, char16_t uniChar)
{
/* encode into LMBCS Unicode range */
uint8_t LowCh = (uint8_t)(uniChar & 0x00FF);
@@ -853,7 +853,7 @@ _LMBCSFromUnicode(UConverterFromUnicodeArgs* args,
UErrorCode* err)
{
ulmbcs_byte_t lastConverterIndex = 0;
- UChar uniChar;
+ char16_t uniChar;
ulmbcs_byte_t LMBCS[ULMBCS_CHARSIZE_MAX];
ulmbcs_byte_t * pLMBCS;
int32_t bytes_written;
@@ -1085,7 +1085,7 @@ _LMBCSFromUnicode(UConverterFromUnicodeArgs* args,
/* A function to call when we are looking at the Unicode group byte in LMBCS */
-static UChar
+static char16_t
GetUniFromLMBCSUni(char const ** ppLMBCSin) /* Called with LMBCS-style Unicode byte stream */
{
uint8_t HighCh = *(*ppLMBCSin)++; /* Big-endian Unicode in LMBCS compatibility group*/
@@ -1096,7 +1096,7 @@ GetUniFromLMBCSUni(char const ** ppLMBCSin) /* Called with LMBCS-style Unicode
HighCh = LowCh;
LowCh = 0; /* zero-byte in LSB special character */
}
- return (UChar)((HighCh << 8) | LowCh);
+ return (char16_t)((HighCh << 8) | LowCh);
}
@@ -1177,7 +1177,7 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args,
{
group = CurByte; /* group byte is in the source */
extraInfo = (UConverterDataLMBCS *) args->converter->extraInfo;
- if (group > ULMBCS_GRP_LAST || (cnv = extraInfo->OptGrpConverter[group]) == NULL)
+ if (group > ULMBCS_GRP_LAST || (cnv = extraInfo->OptGrpConverter[group]) == nullptr)
{
/* this is not a valid group byte - no converter*/
*err = U_INVALID_CHAR_FOUND;
@@ -1191,11 +1191,11 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args,
if (*args->source == group) {
/* single byte */
++args->source;
- uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 1, FALSE);
+ uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 1, false);
++args->source;
} else {
/* double byte */
- uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 2, FALSE);
+ uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 2, false);
args->source += 2;
}
}
@@ -1220,7 +1220,7 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args,
/* Lookup value must include opt group */
bytes[0] = group;
bytes[1] = CurByte;
- uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, bytes, 2, FALSE);
+ uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, bytes, 2, false);
}
}
}
@@ -1236,13 +1236,13 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args,
CHECK_SOURCE_LIMIT(0);
/* let the MBCS conversion consume CurByte again */
- uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 1, FALSE);
+ uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 1, false);
}
else
{
CHECK_SOURCE_LIMIT(1);
/* let the MBCS conversion consume CurByte again */
- uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 2, FALSE);
+ uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 2, false);
++args->source;
}
}
@@ -1264,10 +1264,10 @@ _LMBCSToUnicodeWithOffsets(UConverterToUnicodeArgs* args,
UErrorCode* err)
{
char LMBCS [ULMBCS_CHARSIZE_MAX];
- UChar uniChar; /* one output UNICODE char */
+ char16_t uniChar; /* one output UNICODE char */
const char * saveSource; /* beginning of current code point */
const char * pStartLMBCS = args->source; /* beginning of whole string */
- const char * errSource = NULL; /* pointer to actual input in case an error occurs */
+ const char * errSource = nullptr; /* pointer to actual input in case an error occurs */
int8_t savebytes = 0;
/* Process from source to limit, or until error */
@@ -1292,7 +1292,7 @@ _LMBCSToUnicodeWithOffsets(UConverterToUnicodeArgs* args,
args->source = errSource = LMBCS;
args->sourceLimit = LMBCS+size_old+size_new;
savebytes = (int8_t)(size_old+size_new);
- uniChar = (UChar) _LMBCSGetNextUCharWorker(args, err);
+ uniChar = (char16_t) _LMBCSGetNextUCharWorker(args, err);
args->source = saveSource + ((args->source - LMBCS) - size_old);
args->sourceLimit = saveSourceLimit;
@@ -1314,7 +1314,7 @@ _LMBCSToUnicodeWithOffsets(UConverterToUnicodeArgs* args,
else
{
errSource = saveSource;
- uniChar = (UChar) _LMBCSGetNextUCharWorker(args, err);
+ uniChar = (char16_t) _LMBCSGetNextUCharWorker(args, err);
savebytes = (int8_t)(args->source - saveSource);
}
if (U_SUCCESS(*err))
diff --git a/contrib/libs/icu/common/ucnv_set.cpp b/contrib/libs/icu/common/ucnv_set.cpp
index 926cee0de81..872d8bc0662 100644
--- a/contrib/libs/icu/common/ucnv_set.cpp
+++ b/contrib/libs/icu/common/ucnv_set.cpp
@@ -34,23 +34,23 @@ ucnv_getUnicodeSet(const UConverter *cnv,
UConverterUnicodeSet whichSet,
UErrorCode *pErrorCode) {
/* argument checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
- if(cnv==NULL || setFillIn==NULL || whichSet<UCNV_ROUNDTRIP_SET || UCNV_SET_COUNT<=whichSet) {
+ if(cnv==nullptr || setFillIn==nullptr || whichSet<UCNV_ROUNDTRIP_SET || UCNV_SET_COUNT<=whichSet) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
/* does this converter support this function? */
- if(cnv->sharedData->impl->getUnicodeSet==NULL) {
+ if(cnv->sharedData->impl->getUnicodeSet==nullptr) {
*pErrorCode=U_UNSUPPORTED_ERROR;
return;
}
{
USetAdder sa={
- NULL,
+ nullptr,
uset_add,
uset_addRange,
uset_addString,
diff --git a/contrib/libs/icu/common/ucnv_u16.cpp b/contrib/libs/icu/common/ucnv_u16.cpp
index a5e8367400a..c3bcfef50cb 100644
--- a/contrib/libs/icu/common/ucnv_u16.cpp
+++ b/contrib/libs/icu/common/ucnv_u16.cpp
@@ -52,12 +52,12 @@ static void U_CALLCONV
_UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source;
+ const char16_t *source;
char *target;
int32_t *offsets;
uint32_t targetCapacity, length, sourceIndex;
- UChar c, trail;
+ char16_t c, trail;
char overflow[4];
source=pArgs->source;
@@ -92,7 +92,7 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
/* c!=0 indicates in several places outside the main loops that a surrogate was found */
- if((c=(UChar)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) {
+ if((c=(char16_t)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) {
/* the last buffer ended with a lead surrogate, output the surrogate pair */
++source;
--length;
@@ -102,7 +102,7 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
target[3]=(uint8_t)trail;
target+=4;
targetCapacity-=4;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1;
*offsets++=-1;
*offsets++=-1;
@@ -123,7 +123,7 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
count>>=1;
length-=count;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
while(count>0) {
c=*source++;
if(U16_IS_SINGLE(c)) {
@@ -257,11 +257,11 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source;
- UChar *target;
+ char16_t *target;
int32_t *offsets;
uint32_t targetCapacity, length, count, sourceIndex;
- UChar c, trail;
+ char16_t c, trail;
if(pArgs->converter->mode<8) {
_UTF16ToUnicodeWithOffsets(pArgs, pErrorCode);
@@ -287,7 +287,7 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
sourceIndex=0;
c=0;
- /* complete a partial UChar or pair from the last call */
+ /* complete a partial char16_t or pair from the last call */
if(cnv->toUnicodeStatus!=0) {
/*
* special case: single byte from a previous buffer,
@@ -306,11 +306,11 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
++sourceIndex;
--length;
if(count==2) {
- c=((UChar)p[0]<<8)|p[1];
+ c=((char16_t)p[0]<<8)|p[1];
if(U16_IS_SINGLE(c)) {
/* output the BMP code point */
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1;
}
--targetCapacity;
@@ -325,14 +325,14 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
break;
}
} else if(count==4) {
- c=((UChar)p[0]<<8)|p[1];
- trail=((UChar)p[2]<<8)|p[3];
+ c=((char16_t)p[0]<<8)|p[1];
+ trail=((char16_t)p[2]<<8)|p[3];
if(U16_IS_TRAIL(trail)) {
/* output the surrogate pair */
*target++=c;
if(targetCapacity>=2) {
*target++=trail;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1;
*offsets++=-1;
}
@@ -384,14 +384,14 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
length-=count;
count>>=1;
targetCapacity-=count;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
do {
- c=((UChar)source[0]<<8)|source[1];
+ c=((char16_t)source[0]<<8)|source[1];
source+=2;
if(U16_IS_SINGLE(c)) {
*target++=c;
} else if(U16_IS_SURROGATE_LEAD(c) && count>=2 &&
- U16_IS_TRAIL(trail=((UChar)source[0]<<8)|source[1])
+ U16_IS_TRAIL(trail=((char16_t)source[0]<<8)|source[1])
) {
source+=2;
--count;
@@ -403,14 +403,14 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
} while(--count>0);
} else {
do {
- c=((UChar)source[0]<<8)|source[1];
+ c=((char16_t)source[0]<<8)|source[1];
source+=2;
if(U16_IS_SINGLE(c)) {
*target++=c;
*offsets++=sourceIndex;
sourceIndex+=2;
} else if(U16_IS_SURROGATE_LEAD(c) && count>=2 &&
- U16_IS_TRAIL(trail=((UChar)source[0]<<8)|source[1])
+ U16_IS_TRAIL(trail=((char16_t)source[0]<<8)|source[1])
) {
source+=2;
--count;
@@ -447,12 +447,12 @@ _UTF16BEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(U16_IS_SURROGATE_LEAD(c)) {
if(length>=2) {
- if(U16_IS_TRAIL(trail=((UChar)source[0]<<8)|source[1])) {
+ if(U16_IS_TRAIL(trail=((char16_t)source[0]<<8)|source[1])) {
/* output the surrogate pair, will overflow (see conditions comment above) */
source+=2;
length-=2;
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
cnv->UCharErrorBuffer[0]=trail;
@@ -509,7 +509,7 @@ _UTF16BEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
}
if(s+2>sourceLimit) {
- /* only one byte: truncated UChar */
+ /* only one byte: truncated char16_t */
pArgs->converter->toUBytes[0]=*s++;
pArgs->converter->toULength=1;
pArgs->source=(const char *)s;
@@ -517,7 +517,7 @@ _UTF16BEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
return 0xffff;
}
- /* get one UChar */
+ /* get one char16_t */
c=((UChar32)*s<<8)|s[1];
s+=2;
@@ -525,10 +525,10 @@ _UTF16BEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
if(U_IS_SURROGATE(c)) {
if(U16_IS_SURROGATE_LEAD(c)) {
if(s+2<=sourceLimit) {
- UChar trail;
+ char16_t trail;
- /* get a second UChar and see if it is a trail surrogate */
- trail=((UChar)*s<<8)|s[1];
+ /* get a second char16_t and see if it is a trail surrogate */
+ trail=((char16_t)*s<<8)|s[1];
if(U16_IS_TRAIL(trail)) {
c=U16_GET_SUPPLEMENTARY(c, trail);
s+=2;
@@ -610,11 +610,11 @@ U_CDECL_END
static const UConverterImpl _UTF16BEImpl={
UCNV_UTF16_BigEndian,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF16BEOpen,
- NULL,
+ nullptr,
_UTF16BEReset,
_UTF16BEToUnicodeWithOffsets,
@@ -623,21 +623,21 @@ static const UConverterImpl _UTF16BEImpl={
_UTF16BEFromUnicodeWithOffsets,
_UTF16BEGetNextUChar,
- NULL,
+ nullptr,
_UTF16BEGetName,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _UTF16BEStaticData={
sizeof(UConverterStaticData),
"UTF-16BE",
1200, UCNV_IBM, UCNV_UTF16_BigEndian, 2, 2,
- { 0xff, 0xfd, 0, 0 },2,FALSE,FALSE,
+ { 0xff, 0xfd, 0, 0 },2,false,false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -653,12 +653,12 @@ static void U_CALLCONV
_UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source;
+ const char16_t *source;
char *target;
int32_t *offsets;
uint32_t targetCapacity, length, sourceIndex;
- UChar c, trail;
+ char16_t c, trail;
char overflow[4];
source=pArgs->source;
@@ -693,7 +693,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
/* c!=0 indicates in several places outside the main loops that a surrogate was found */
- if((c=(UChar)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) {
+ if((c=(char16_t)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) {
/* the last buffer ended with a lead surrogate, output the surrogate pair */
++source;
--length;
@@ -703,7 +703,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
target[3]=(uint8_t)(trail>>8);
target+=4;
targetCapacity-=4;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1;
*offsets++=-1;
*offsets++=-1;
@@ -724,7 +724,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
count>>=1;
length-=count;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
while(count>0) {
c=*source++;
if(U16_IS_SINGLE(c)) {
@@ -858,11 +858,11 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source;
- UChar *target;
+ char16_t *target;
int32_t *offsets;
uint32_t targetCapacity, length, count, sourceIndex;
- UChar c, trail;
+ char16_t c, trail;
if(pArgs->converter->mode<8) {
_UTF16ToUnicodeWithOffsets(pArgs, pErrorCode);
@@ -888,7 +888,7 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
sourceIndex=0;
c=0;
- /* complete a partial UChar or pair from the last call */
+ /* complete a partial char16_t or pair from the last call */
if(cnv->toUnicodeStatus!=0) {
/*
* special case: single byte from a previous buffer,
@@ -907,11 +907,11 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
++sourceIndex;
--length;
if(count==2) {
- c=((UChar)p[1]<<8)|p[0];
+ c=((char16_t)p[1]<<8)|p[0];
if(U16_IS_SINGLE(c)) {
/* output the BMP code point */
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1;
}
--targetCapacity;
@@ -926,14 +926,14 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
break;
}
} else if(count==4) {
- c=((UChar)p[1]<<8)|p[0];
- trail=((UChar)p[3]<<8)|p[2];
+ c=((char16_t)p[1]<<8)|p[0];
+ trail=((char16_t)p[3]<<8)|p[2];
if(U16_IS_TRAIL(trail)) {
/* output the surrogate pair */
*target++=c;
if(targetCapacity>=2) {
*target++=trail;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=-1;
*offsets++=-1;
}
@@ -985,14 +985,14 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
length-=count;
count>>=1;
targetCapacity-=count;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
do {
- c=((UChar)source[1]<<8)|source[0];
+ c=((char16_t)source[1]<<8)|source[0];
source+=2;
if(U16_IS_SINGLE(c)) {
*target++=c;
} else if(U16_IS_SURROGATE_LEAD(c) && count>=2 &&
- U16_IS_TRAIL(trail=((UChar)source[1]<<8)|source[0])
+ U16_IS_TRAIL(trail=((char16_t)source[1]<<8)|source[0])
) {
source+=2;
--count;
@@ -1004,14 +1004,14 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
} while(--count>0);
} else {
do {
- c=((UChar)source[1]<<8)|source[0];
+ c=((char16_t)source[1]<<8)|source[0];
source+=2;
if(U16_IS_SINGLE(c)) {
*target++=c;
*offsets++=sourceIndex;
sourceIndex+=2;
} else if(U16_IS_SURROGATE_LEAD(c) && count>=2 &&
- U16_IS_TRAIL(trail=((UChar)source[1]<<8)|source[0])
+ U16_IS_TRAIL(trail=((char16_t)source[1]<<8)|source[0])
) {
source+=2;
--count;
@@ -1048,12 +1048,12 @@ _UTF16LEToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(U16_IS_SURROGATE_LEAD(c)) {
if(length>=2) {
- if(U16_IS_TRAIL(trail=((UChar)source[1]<<8)|source[0])) {
+ if(U16_IS_TRAIL(trail=((char16_t)source[1]<<8)|source[0])) {
/* output the surrogate pair, will overflow (see conditions comment above) */
source+=2;
length-=2;
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
cnv->UCharErrorBuffer[0]=trail;
@@ -1110,7 +1110,7 @@ _UTF16LEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
}
if(s+2>sourceLimit) {
- /* only one byte: truncated UChar */
+ /* only one byte: truncated char16_t */
pArgs->converter->toUBytes[0]=*s++;
pArgs->converter->toULength=1;
pArgs->source=(const char *)s;
@@ -1118,7 +1118,7 @@ _UTF16LEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
return 0xffff;
}
- /* get one UChar */
+ /* get one char16_t */
c=((UChar32)s[1]<<8)|*s;
s+=2;
@@ -1126,10 +1126,10 @@ _UTF16LEGetNextUChar(UConverterToUnicodeArgs *pArgs, UErrorCode *err) {
if(U_IS_SURROGATE(c)) {
if(U16_IS_SURROGATE_LEAD(c)) {
if(s+2<=sourceLimit) {
- UChar trail;
+ char16_t trail;
- /* get a second UChar and see if it is a trail surrogate */
- trail=((UChar)s[1]<<8)|*s;
+ /* get a second char16_t and see if it is a trail surrogate */
+ trail=((char16_t)s[1]<<8)|*s;
if(U16_IS_TRAIL(trail)) {
c=U16_GET_SUPPLEMENTARY(c, trail);
s+=2;
@@ -1211,11 +1211,11 @@ U_CDECL_END
static const UConverterImpl _UTF16LEImpl={
UCNV_UTF16_LittleEndian,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF16LEOpen,
- NULL,
+ nullptr,
_UTF16LEReset,
_UTF16LEToUnicodeWithOffsets,
@@ -1224,14 +1224,14 @@ static const UConverterImpl _UTF16LEImpl={
_UTF16LEFromUnicodeWithOffsets,
_UTF16LEGetNextUChar,
- NULL,
+ nullptr,
_UTF16LEGetName,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
@@ -1239,7 +1239,7 @@ static const UConverterStaticData _UTF16LEStaticData={
sizeof(UConverterStaticData),
"UTF-16LE",
1202, UCNV_IBM, UCNV_UTF16_LittleEndian, 2, 2,
- { 0xfd, 0xff, 0, 0 },2,FALSE,FALSE,
+ { 0xfd, 0xff, 0, 0 },2,false,false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -1447,7 +1447,7 @@ _UTF16ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
}
/* add BOM size to offsets - see comment at offsetDelta declaration */
- if(offsets!=NULL && offsetDelta!=0) {
+ if(offsets!=nullptr && offsetDelta!=0) {
int32_t *offsetsLimit=pArgs->offsets;
while(offsets<offsetsLimit) {
*offsets++ += offsetDelta;
@@ -1493,11 +1493,11 @@ U_CDECL_END
static const UConverterImpl _UTF16Impl = {
UCNV_UTF16,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF16Open,
- NULL,
+ nullptr,
_UTF16Reset,
_UTF16ToUnicodeWithOffsets,
@@ -1506,14 +1506,14 @@ static const UConverterImpl _UTF16Impl = {
_UTF16PEFromUnicodeWithOffsets,
_UTF16GetNextUChar,
- NULL, /* ### TODO implement getStarters for all Unicode encodings?! */
+ nullptr, /* ### TODO implement getStarters for all Unicode encodings?! */
_UTF16GetName,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _UTF16StaticData = {
@@ -1526,7 +1526,7 @@ static const UConverterStaticData _UTF16StaticData = {
#else
{ 0xfd, 0xff, 0, 0 }, 2,
#endif
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -1538,11 +1538,11 @@ const UConverterSharedData _UTF16Data =
static const UConverterImpl _UTF16v2Impl = {
UCNV_UTF16,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF16Open,
- NULL,
+ nullptr,
_UTF16Reset,
_UTF16ToUnicodeWithOffsets,
@@ -1551,14 +1551,14 @@ static const UConverterImpl _UTF16v2Impl = {
_UTF16BEFromUnicodeWithOffsets,
_UTF16GetNextUChar,
- NULL, /* ### TODO implement getStarters for all Unicode encodings?! */
+ nullptr, /* ### TODO implement getStarters for all Unicode encodings?! */
_UTF16GetName,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _UTF16v2StaticData = {
@@ -1567,7 +1567,7 @@ static const UConverterStaticData _UTF16v2StaticData = {
1204, /* CCSID for BOM sensitive UTF-16 */
UCNV_IBM, UCNV_UTF16, 2, 2,
{ 0xff, 0xfd, 0, 0 }, 2,
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnv_u32.cpp b/contrib/libs/icu/common/ucnv_u32.cpp
index bf6bd11dbac..d513e8e7e0e 100644
--- a/contrib/libs/icu/common/ucnv_u32.cpp
+++ b/contrib/libs/icu/common/ucnv_u32.cpp
@@ -48,9 +48,9 @@ T_UConverter_toUnicode_UTF32_BE(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const unsigned char *sourceLimit = (unsigned char *) args->sourceLimit;
- const UChar *targetLimit = args->targetLimit;
+ const char16_t *targetLimit = args->targetLimit;
unsigned char *toUBytes = args->converter->toUBytes;
uint32_t ch, i;
@@ -87,18 +87,18 @@ morebytes:
if (ch <= MAXIMUM_UCS2)
{
/* fits in 16 bits */
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
}
else {
/* write out the surrogates */
*(myTarget++) = U16_LEAD(ch);
ch = U16_TRAIL(ch);
if (myTarget < targetLimit) {
- *(myTarget++) = (UChar)ch;
+ *(myTarget++) = (char16_t)ch;
}
else {
/* Put in overflow buffer (not handled here) */
- args->converter->UCharErrorBuffer[0] = (UChar) ch;
+ args->converter->UCharErrorBuffer[0] = (char16_t) ch;
args->converter->UCharErrorBufferLength = 1;
*err = U_BUFFER_OVERFLOW_ERROR;
break;
@@ -127,10 +127,10 @@ T_UConverter_toUnicode_UTF32_BE_OFFSET_LOGIC(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
int32_t *myOffsets = args->offsets;
const unsigned char *sourceLimit = (unsigned char *) args->sourceLimit;
- const UChar *targetLimit = args->targetLimit;
+ const char16_t *targetLimit = args->targetLimit;
unsigned char *toUBytes = args->converter->toUBytes;
uint32_t ch, i;
int32_t offsetNum = 0;
@@ -167,7 +167,7 @@ morebytes:
/* Normal valid byte when the loop has not prematurely terminated (i < inBytes) */
if (ch <= MAXIMUM_UCS2) {
/* fits in 16 bits */
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
*(myOffsets++) = offsetNum;
}
else {
@@ -177,12 +177,12 @@ morebytes:
ch = U16_TRAIL(ch);
if (myTarget < targetLimit)
{
- *(myTarget++) = (UChar)ch;
+ *(myTarget++) = (char16_t)ch;
*(myOffsets++) = offsetNum;
}
else {
/* Put in overflow buffer (not handled here) */
- args->converter->UCharErrorBuffer[0] = (UChar) ch;
+ args->converter->UCharErrorBuffer[0] = (char16_t) ch;
args->converter->UCharErrorBufferLength = 1;
*err = U_BUFFER_OVERFLOW_ERROR;
break;
@@ -213,9 +213,9 @@ static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_BE(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
- const UChar *mySource = args->source;
+ const char16_t *mySource = args->source;
unsigned char *myTarget;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *sourceLimit = args->sourceLimit;
const unsigned char *targetLimit = (unsigned char *) args->targetLimit;
UChar32 ch, ch2;
unsigned int indexToWrite;
@@ -314,10 +314,10 @@ static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_BE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
- const UChar *mySource = args->source;
+ const char16_t *mySource = args->source;
unsigned char *myTarget;
int32_t *myOffsets;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *sourceLimit = args->sourceLimit;
const unsigned char *targetLimit = (unsigned char *) args->targetLimit;
UChar32 ch, ch2;
int32_t offsetNum = 0;
@@ -465,12 +465,12 @@ U_CDECL_END
static const UConverterImpl _UTF32BEImpl = {
UCNV_UTF32_BigEndian,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
T_UConverter_toUnicode_UTF32_BE,
T_UConverter_toUnicode_UTF32_BE_OFFSET_LOGIC,
@@ -478,14 +478,14 @@ static const UConverterImpl _UTF32BEImpl = {
T_UConverter_fromUnicode_UTF32_BE_OFFSET_LOGIC,
T_UConverter_getNextUChar_UTF32_BE,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
/* The 1232 CCSID refers to any version of Unicode with any endianness of UTF-32 */
@@ -494,7 +494,7 @@ static const UConverterStaticData _UTF32BEStaticData = {
"UTF-32BE",
1232,
UCNV_IBM, UCNV_UTF32_BigEndian, 4, 4,
- { 0, 0, 0xff, 0xfd }, 4, FALSE, FALSE,
+ { 0, 0, 0xff, 0xfd }, 4, false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -510,9 +510,9 @@ T_UConverter_toUnicode_UTF32_LE(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const unsigned char *sourceLimit = (unsigned char *) args->sourceLimit;
- const UChar *targetLimit = args->targetLimit;
+ const char16_t *targetLimit = args->targetLimit;
unsigned char *toUBytes = args->converter->toUBytes;
uint32_t ch, i;
@@ -554,18 +554,18 @@ morebytes:
/* Normal valid byte when the loop has not prematurely terminated (i < inBytes) */
if (ch <= MAXIMUM_UCS2) {
/* fits in 16 bits */
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
}
else {
/* write out the surrogates */
*(myTarget++) = U16_LEAD(ch);
ch = U16_TRAIL(ch);
if (myTarget < targetLimit) {
- *(myTarget++) = (UChar)ch;
+ *(myTarget++) = (char16_t)ch;
}
else {
/* Put in overflow buffer (not handled here) */
- args->converter->UCharErrorBuffer[0] = (UChar) ch;
+ args->converter->UCharErrorBuffer[0] = (char16_t) ch;
args->converter->UCharErrorBufferLength = 1;
*err = U_BUFFER_OVERFLOW_ERROR;
break;
@@ -595,10 +595,10 @@ T_UConverter_toUnicode_UTF32_LE_OFFSET_LOGIC(UConverterToUnicodeArgs * args,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
int32_t *myOffsets = args->offsets;
const unsigned char *sourceLimit = (unsigned char *) args->sourceLimit;
- const UChar *targetLimit = args->targetLimit;
+ const char16_t *targetLimit = args->targetLimit;
unsigned char *toUBytes = args->converter->toUBytes;
uint32_t ch, i;
int32_t offsetNum = 0;
@@ -643,7 +643,7 @@ morebytes:
if (ch <= MAXIMUM_UCS2)
{
/* fits in 16 bits */
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
*(myOffsets++) = offsetNum;
}
else {
@@ -653,13 +653,13 @@ morebytes:
ch = U16_TRAIL(ch);
if (myTarget < targetLimit)
{
- *(myTarget++) = (UChar)ch;
+ *(myTarget++) = (char16_t)ch;
*(myOffsets++) = offsetNum;
}
else
{
/* Put in overflow buffer (not handled here) */
- args->converter->UCharErrorBuffer[0] = (UChar) ch;
+ args->converter->UCharErrorBuffer[0] = (char16_t) ch;
args->converter->UCharErrorBufferLength = 1;
*err = U_BUFFER_OVERFLOW_ERROR;
break;
@@ -691,9 +691,9 @@ static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_LE(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
- const UChar *mySource = args->source;
+ const char16_t *mySource = args->source;
unsigned char *myTarget;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *sourceLimit = args->sourceLimit;
const unsigned char *targetLimit = (unsigned char *) args->targetLimit;
UChar32 ch, ch2;
unsigned int indexToWrite;
@@ -800,10 +800,10 @@ static void U_CALLCONV
T_UConverter_fromUnicode_UTF32_LE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args,
UErrorCode * err)
{
- const UChar *mySource = args->source;
+ const char16_t *mySource = args->source;
unsigned char *myTarget;
int32_t *myOffsets;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *sourceLimit = args->sourceLimit;
const unsigned char *targetLimit = (unsigned char *) args->targetLimit;
UChar32 ch, ch2;
unsigned int indexToWrite;
@@ -960,12 +960,12 @@ U_CDECL_END
static const UConverterImpl _UTF32LEImpl = {
UCNV_UTF32_LittleEndian,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
T_UConverter_toUnicode_UTF32_LE,
T_UConverter_toUnicode_UTF32_LE_OFFSET_LOGIC,
@@ -973,14 +973,14 @@ static const UConverterImpl _UTF32LEImpl = {
T_UConverter_fromUnicode_UTF32_LE_OFFSET_LOGIC,
T_UConverter_getNextUChar_UTF32_LE,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
/* The 1232 CCSID refers to any version of Unicode with any endianness of UTF-32 */
@@ -989,7 +989,7 @@ static const UConverterStaticData _UTF32LEStaticData = {
"UTF-32LE",
1234,
UCNV_IBM, UCNV_UTF32_LittleEndian, 4, 4,
- { 0xfd, 0xff, 0, 0 }, 4, FALSE, FALSE,
+ { 0xfd, 0xff, 0, 0 }, 4, false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -1110,7 +1110,7 @@ _UTF32ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
/* some of the bytes are from a previous buffer, replay those first */
pArgs->source=utf32BOM+(state&4); /* select the correct BOM */
pArgs->sourceLimit=pArgs->source+((state&3)-count); /* replay previous bytes */
- pArgs->flush=FALSE; /* this sourceLimit is not the real source stream limit */
+ pArgs->flush=false; /* this sourceLimit is not the real source stream limit */
/* no offsets: bytes from previous buffer, and not enough for output */
T_UConverter_toUnicode_UTF32_BE(pArgs, pErrorCode);
@@ -1126,7 +1126,7 @@ _UTF32ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
case 8:
/* call UTF-32BE */
pArgs->source=source;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
T_UConverter_toUnicode_UTF32_BE(pArgs, pErrorCode);
} else {
T_UConverter_toUnicode_UTF32_BE_OFFSET_LOGIC(pArgs, pErrorCode);
@@ -1136,7 +1136,7 @@ _UTF32ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
case 9:
/* call UTF-32LE */
pArgs->source=source;
- if(offsets==NULL) {
+ if(offsets==nullptr) {
T_UConverter_toUnicode_UTF32_LE(pArgs, pErrorCode);
} else {
T_UConverter_toUnicode_UTF32_LE_OFFSET_LOGIC(pArgs, pErrorCode);
@@ -1149,7 +1149,7 @@ _UTF32ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
}
/* add BOM size to offsets - see comment at offsetDelta declaration */
- if(offsets!=NULL && offsetDelta!=0) {
+ if(offsets!=nullptr && offsetDelta!=0) {
int32_t *offsetsLimit=pArgs->offsets;
while(offsets<offsetsLimit) {
*offsets++ += offsetDelta;
@@ -1202,11 +1202,11 @@ U_CDECL_END
static const UConverterImpl _UTF32Impl = {
UCNV_UTF32,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF32Open,
- NULL,
+ nullptr,
_UTF32Reset,
_UTF32ToUnicodeWithOffsets,
@@ -1220,14 +1220,14 @@ static const UConverterImpl _UTF32Impl = {
#endif
_UTF32GetNextUChar,
- NULL, /* ### TODO implement getStarters for all Unicode encodings?! */
- NULL,
- NULL,
- NULL,
+ nullptr, /* ### TODO implement getStarters for all Unicode encodings?! */
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
/* The 1236 CCSID refers to any version of Unicode with a BOM sensitive endianness of UTF-32 */
@@ -1241,7 +1241,7 @@ static const UConverterStaticData _UTF32StaticData = {
#else
{ 0xfd, 0xff, 0, 0 }, 4,
#endif
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnv_u7.cpp b/contrib/libs/icu/common/ucnv_u7.cpp
index de9f3f42ec9..398b528e832 100644
--- a/contrib/libs/icu/common/ucnv_u7.cpp
+++ b/contrib/libs/icu/common/ucnv_u7.cpp
@@ -184,12 +184,12 @@ static void U_CALLCONV
_UTF7Reset(UConverter *cnv, UConverterResetChoice choice) {
if(choice<=UCNV_RESET_TO_UNICODE) {
/* reset toUnicode */
- cnv->toUnicodeStatus=0x1000000; /* inDirectMode=TRUE */
+ cnv->toUnicodeStatus=0x1000000; /* inDirectMode=true */
cnv->toULength=0;
}
if(choice!=UCNV_RESET_TO_UNICODE) {
/* reset fromUnicode */
- cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=TRUE */
+ cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */
}
}
@@ -212,8 +212,8 @@ _UTF7ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t *offsets;
uint8_t *bytes;
@@ -280,13 +280,13 @@ directMode:
} else if(b!=PLUS) {
/* write directly encoded character */
*target++=b;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
} else /* PLUS */ {
/* switch to Unicode mode */
nextSourceIndex=++sourceIndex;
- inDirectMode=FALSE;
+ inDirectMode=false;
byteIndex=0;
bits=0;
base64Counter=-1;
@@ -320,16 +320,16 @@ unicodeMode:
* base64Value==-1 for any legal character except base64 and minus sign, or
* base64Value==-3 for illegal characters:
* 1. In either case, leave Unicode mode.
- * 2.1. If we ended with an incomplete UChar or none after the +, then
+ * 2.1. If we ended with an incomplete char16_t or none after the +, then
* generate an error for the preceding erroneous sequence and deal with
* the current (possibly illegal) character next time through.
- * 2.2. Else the current char comes after a complete UChar, which was already
+ * 2.2. Else the current char comes after a complete char16_t, which was already
* pushed to the output buf, so:
* 2.2.1. If the current char is legal, just save it for processing next time.
* It may be for example, a plus which we need to deal with in direct mode.
* 2.2.2. Else if the current char is illegal, we might as well deal with it here.
*/
- inDirectMode=TRUE;
+ inDirectMode=true;
if(base64Counter==-1) {
/* illegal: + immediately followed by something other than base64 or minus sign */
/* include the plus sign in the reported sequence, but not the subsequent char */
@@ -339,14 +339,14 @@ unicodeMode:
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
break;
} else if(bits!=0) {
- /* bits are illegally left over, a UChar is incomplete */
+ /* bits are illegally left over, a char16_t is incomplete */
/* don't include current char (legal or illegal) in error seq */
--source;
--byteIndex;
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
break;
} else {
- /* previous UChar was complete */
+ /* previous char16_t was complete */
if(base64Value==-3) {
/* current character is illegal, deal with it here */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
@@ -374,8 +374,8 @@ unicodeMode:
++base64Counter;
break;
case 2:
- *target++=(UChar)((bits<<4)|(base64Value>>2));
- if(offsets!=NULL) {
+ *target++=(char16_t)((bits<<4)|(base64Value>>2));
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex-1;
}
@@ -385,8 +385,8 @@ unicodeMode:
base64Counter=3;
break;
case 5:
- *target++=(UChar)((bits<<2)|(base64Value>>4));
- if(offsets!=NULL) {
+ *target++=(char16_t)((bits<<2)|(base64Value>>4));
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex-1;
}
@@ -396,8 +396,8 @@ unicodeMode:
base64Counter=6;
break;
case 7:
- *target++=(UChar)((bits<<6)|base64Value);
- if(offsets!=NULL) {
+ *target++=(char16_t)((bits<<6)|base64Value);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex;
}
@@ -411,17 +411,17 @@ unicodeMode:
}
} else /*base64Value==-2*/ {
/* minus sign terminates the base64 sequence */
- inDirectMode=TRUE;
+ inDirectMode=true;
if(base64Counter==-1) {
/* +- i.e. a minus immediately following a plus */
*target++=PLUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
/* absorb the minus and leave the Unicode Mode */
if(bits!=0) {
- /* bits are illegally left over, a UChar is incomplete */
+ /* bits are illegally left over, a char16_t is incomplete */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
break;
}
@@ -462,12 +462,12 @@ static void U_CALLCONV
_UTF7FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target, *targetLimit;
int32_t *offsets;
int32_t length, targetCapacity, sourceIndex;
- UChar c;
+ char16_t c;
/* UTF-7 state */
const UBool *encodeDirectly;
@@ -511,7 +511,7 @@ directMode:
if(c<=127 && encodeDirectly[c]) {
/* encode directly */
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
} else if(c==PLUS) {
@@ -519,14 +519,14 @@ directMode:
*target++=PLUS;
if(target<targetLimit) {
*target++=MINUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
/* realign length and targetCapacity */
goto directMode;
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
cnv->charErrorBuffer[0]=MINUS;
@@ -538,10 +538,10 @@ directMode:
/* un-read this character and switch to Unicode Mode */
--source;
*target++=PLUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
- inDirectMode=FALSE;
+ inDirectMode=false;
base64Counter=0;
goto unicodeMode;
}
@@ -558,7 +558,7 @@ unicodeMode:
c=*source++;
if(c<=127 && encodeDirectly[c]) {
/* encode directly */
- inDirectMode=TRUE;
+ inDirectMode=true;
/* trick: back out this character to make this easier */
--source;
@@ -567,7 +567,7 @@ unicodeMode:
if(base64Counter!=0) {
/* write remaining bits for the previous character */
*target++=toBase64[bits];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
}
@@ -575,7 +575,7 @@ unicodeMode:
/* need to terminate with a minus */
if(target<targetLimit) {
*target++=MINUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
@@ -601,12 +601,12 @@ unicodeMode:
*target++=toBase64[c>>10];
if(target<targetLimit) {
*target++=toBase64[(c>>4)&0x3f];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
cnv->charErrorBuffer[0]=toBase64[(c>>4)&0x3f];
@@ -622,13 +622,13 @@ unicodeMode:
*target++=toBase64[(c>>8)&0x3f];
if(target<targetLimit) {
*target++=toBase64[(c>>2)&0x3f];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
@@ -637,7 +637,7 @@ unicodeMode:
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
cnv->charErrorBuffer[0]=toBase64[(c>>8)&0x3f];
@@ -654,13 +654,13 @@ unicodeMode:
*target++=toBase64[(c>>6)&0x3f];
if(target<targetLimit) {
*target++=toBase64[c&0x3f];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
@@ -669,7 +669,7 @@ unicodeMode:
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
cnv->charErrorBuffer[0]=toBase64[(c>>6)&0x3f];
@@ -699,7 +699,7 @@ unicodeMode:
if (base64Counter!=0) {
if(target<targetLimit) {
*target++=toBase64[bits];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
@@ -710,7 +710,7 @@ unicodeMode:
/* Add final MINUS to terminate unicodeMode */
if(target<targetLimit) {
*target++=MINUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
@@ -719,7 +719,7 @@ unicodeMode:
}
}
/* reset the state for the next conversion */
- cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=TRUE */
+ cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */
} else {
/* set the converter state back into UConverter */
cnv->fromUnicodeStatus=
@@ -748,27 +748,27 @@ U_CDECL_END
static const UConverterImpl _UTF7Impl={
UCNV_UTF7,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF7Open,
- NULL,
+ nullptr,
_UTF7Reset,
_UTF7ToUnicodeWithOffsets,
_UTF7ToUnicodeWithOffsets,
_UTF7FromUnicodeWithOffsets,
_UTF7FromUnicodeWithOffsets,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_UTF7GetName,
- NULL, /* we don't need writeSub() because we never call a callback at fromUnicode() */
- NULL,
+ nullptr, /* we don't need writeSub() because we never call a callback at fromUnicode() */
+ nullptr,
ucnv_getCompleteUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _UTF7StaticData={
@@ -778,7 +778,7 @@ static const UConverterStaticData _UTF7StaticData={
UCNV_IBM, UCNV_UTF7,
1, 4,
{ 0x3f, 0, 0, 0 }, 1, /* the subchar is not used */
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -896,8 +896,8 @@ _IMAPToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t *offsets;
uint8_t *bytes;
@@ -914,7 +914,7 @@ _IMAPToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
int32_t sourceIndex, nextSourceIndex;
- UChar c;
+ char16_t c;
uint8_t b;
/* set up the local pointers */
@@ -965,13 +965,13 @@ directMode:
} else if(b!=AMPERSAND) {
/* write directly encoded character */
*target++=b;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
} else /* AMPERSAND */ {
/* switch to Unicode mode */
nextSourceIndex=++sourceIndex;
- inDirectMode=FALSE;
+ inDirectMode=false;
byteIndex=0;
bits=0;
base64Counter=-1;
@@ -1002,7 +1002,7 @@ unicodeMode:
++nextSourceIndex;
if(b>0x7e) {
/* illegal - test other illegal US-ASCII values by base64Value==-3 */
- inDirectMode=TRUE;
+ inDirectMode=true;
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
break;
} else if((base64Value=FROM_BASE64_IMAP(b))>=0) {
@@ -1021,15 +1021,15 @@ unicodeMode:
++base64Counter;
break;
case 2:
- c=(UChar)((bits<<4)|(base64Value>>2));
+ c=(char16_t)((bits<<4)|(base64Value>>2));
if(isLegalIMAP(c)) {
/* illegal */
- inDirectMode=TRUE;
+ inDirectMode=true;
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
goto endloop;
}
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex-1;
}
@@ -1039,15 +1039,15 @@ unicodeMode:
base64Counter=3;
break;
case 5:
- c=(UChar)((bits<<2)|(base64Value>>4));
+ c=(char16_t)((bits<<2)|(base64Value>>4));
if(isLegalIMAP(c)) {
/* illegal */
- inDirectMode=TRUE;
+ inDirectMode=true;
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
goto endloop;
}
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex-1;
}
@@ -1057,15 +1057,15 @@ unicodeMode:
base64Counter=6;
break;
case 7:
- c=(UChar)((bits<<6)|base64Value);
+ c=(char16_t)((bits<<6)|base64Value);
if(isLegalIMAP(c)) {
/* illegal */
- inDirectMode=TRUE;
+ inDirectMode=true;
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
goto endloop;
}
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex;
}
@@ -1079,17 +1079,17 @@ unicodeMode:
}
} else if(base64Value==-2) {
/* minus sign terminates the base64 sequence */
- inDirectMode=TRUE;
+ inDirectMode=true;
if(base64Counter==-1) {
/* &- i.e. a minus immediately following an ampersand */
*target++=AMPERSAND;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
/* absorb the minus and leave the Unicode Mode */
if(bits!=0 || (base64Counter!=0 && base64Counter!=3 && base64Counter!=6)) {
- /* bits are illegally left over, a UChar is incomplete */
+ /* bits are illegally left over, a char16_t is incomplete */
/* base64Counter other than 0, 3, 6 means non-minimal zero-padding, also illegal */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
break;
@@ -1109,7 +1109,7 @@ unicodeMode:
/* base64Value==-1 for characters that are illegal only in Unicode mode */
/* base64Value==-3 for illegal characters */
/* illegal */
- inDirectMode=TRUE;
+ inDirectMode=true;
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
break;
}
@@ -1144,7 +1144,7 @@ endloop:
}
/* else if(base64Counter!=-1) byteIndex remains 0 because there is no particular byte sequence */
- inDirectMode=TRUE; /* avoid looping */
+ inDirectMode=true; /* avoid looping */
*pErrorCode=U_TRUNCATED_CHAR_FOUND;
}
@@ -1163,12 +1163,12 @@ static void U_CALLCONV
_IMAPFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target, *targetLimit;
int32_t *offsets;
int32_t length, targetCapacity, sourceIndex;
- UChar c;
+ char16_t c;
uint8_t b;
/* UTF-7 state */
@@ -1210,7 +1210,7 @@ directMode:
if(inSetDIMAP(c)) {
/* encode directly */
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
} else if(c==AMPERSAND) {
@@ -1218,14 +1218,14 @@ directMode:
*target++=AMPERSAND;
if(target<targetLimit) {
*target++=MINUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
/* realign length and targetCapacity */
goto directMode;
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
cnv->charErrorBuffer[0]=MINUS;
@@ -1237,10 +1237,10 @@ directMode:
/* un-read this character and switch to Unicode Mode */
--source;
*target++=AMPERSAND;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
- inDirectMode=FALSE;
+ inDirectMode=false;
base64Counter=0;
goto unicodeMode;
}
@@ -1257,7 +1257,7 @@ unicodeMode:
c=*source++;
if(isLegalIMAP(c)) {
/* encode directly */
- inDirectMode=TRUE;
+ inDirectMode=true;
/* trick: back out this character to make this easier */
--source;
@@ -1266,14 +1266,14 @@ unicodeMode:
if(base64Counter!=0) {
/* write remaining bits for the previous character */
*target++=TO_BASE64_IMAP(bits);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
}
/* need to terminate with a minus */
if(target<targetLimit) {
*target++=MINUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
@@ -1300,12 +1300,12 @@ unicodeMode:
if(target<targetLimit) {
b=(uint8_t)((c>>4)&0x3f);
*target++=TO_BASE64_IMAP(b);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
b=(uint8_t)((c>>4)&0x3f);
@@ -1325,13 +1325,13 @@ unicodeMode:
if(target<targetLimit) {
b=(uint8_t)((c>>2)&0x3f);
*target++=TO_BASE64_IMAP(b);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
@@ -1341,7 +1341,7 @@ unicodeMode:
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
b=(uint8_t)((c>>8)&0x3f);
@@ -1363,13 +1363,13 @@ unicodeMode:
if(target<targetLimit) {
b=(uint8_t)(c&0x3f);
*target++=TO_BASE64_IMAP(b);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex++;
}
@@ -1379,7 +1379,7 @@ unicodeMode:
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
}
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex++;
}
b=(uint8_t)((c>>6)&0x3f);
@@ -1411,7 +1411,7 @@ unicodeMode:
if(base64Counter!=0) {
if(target<targetLimit) {
*target++=TO_BASE64_IMAP(bits);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
@@ -1422,7 +1422,7 @@ unicodeMode:
/* need to terminate with a minus */
if(target<targetLimit) {
*target++=MINUS;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex-1;
}
} else {
@@ -1431,7 +1431,7 @@ unicodeMode:
}
}
/* reset the state for the next conversion */
- cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=TRUE */
+ cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */
} else {
/* set the converter state back into UConverter */
cnv->fromUnicodeStatus=
@@ -1450,26 +1450,26 @@ U_CDECL_END
static const UConverterImpl _IMAPImpl={
UCNV_IMAP_MAILBOX,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_UTF7Open,
- NULL,
+ nullptr,
_UTF7Reset,
_IMAPToUnicodeWithOffsets,
_IMAPToUnicodeWithOffsets,
_IMAPFromUnicodeWithOffsets,
_IMAPFromUnicodeWithOffsets,
- NULL,
+ nullptr,
- NULL,
- NULL,
- NULL, /* we don't need writeSub() because we never call a callback at fromUnicode() */
- NULL,
+ nullptr,
+ nullptr,
+ nullptr, /* we don't need writeSub() because we never call a callback at fromUnicode() */
+ nullptr,
ucnv_getCompleteUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _IMAPStaticData={
@@ -1479,7 +1479,7 @@ static const UConverterStaticData _IMAPStaticData={
UCNV_IBM, UCNV_IMAP_MAILBOX,
1, 4,
{ 0x3f, 0, 0, 0 }, 1, /* the subchar is not used */
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnv_u8.cpp b/contrib/libs/icu/common/ucnv_u8.cpp
index 1ef7fa2f02f..cf3bb22a02a 100644
--- a/contrib/libs/icu/common/ucnv_u8.cpp
+++ b/contrib/libs/icu/common/ucnv_u8.cpp
@@ -56,7 +56,7 @@ static const uint32_t offsetsFromUTF8[5] = {0,
static UBool hasCESU8Data(const UConverter *cnv)
{
#if UCONFIG_ONLY_HTML_CONVERSION
- return FALSE;
+ return false;
#else
return (UBool)(cnv->sharedData == &_CESU8Data);
#endif
@@ -67,9 +67,9 @@ static void U_CALLCONV ucnv_toUnicode_UTF8 (UConverterToUnicodeArgs * args,
{
UConverter *cnv = args->converter;
const unsigned char *mySource = (unsigned char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const unsigned char *sourceLimit = (unsigned char *) args->sourceLimit;
- const UChar *targetLimit = args->targetLimit;
+ const char16_t *targetLimit = args->targetLimit;
unsigned char *toUBytes = cnv->toUBytes;
UBool isCESU8 = hasCESU8Data(cnv);
uint32_t ch, ch2 = 0;
@@ -93,7 +93,7 @@ static void U_CALLCONV ucnv_toUnicode_UTF8 (UConverterToUnicodeArgs * args,
ch = *(mySource++);
if (U8_IS_SINGLE(ch)) /* Simple case */
{
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
}
else
{
@@ -137,7 +137,7 @@ morebytes:
if (ch <= MAXIMUM_UCS2)
{
/* fits in 16 bits */
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
}
else
{
@@ -146,12 +146,12 @@ morebytes:
ch = U16_TRAIL(ch);
if (myTarget < targetLimit)
{
- *(myTarget++) = (UChar)ch;
+ *(myTarget++) = (char16_t)ch;
}
else
{
/* Put in overflow buffer (not handled here) */
- cnv->UCharErrorBuffer[0] = (UChar) ch;
+ cnv->UCharErrorBuffer[0] = (char16_t) ch;
cnv->UCharErrorBufferLength = 1;
*err = U_BUFFER_OVERFLOW_ERROR;
break;
@@ -183,11 +183,11 @@ static void U_CALLCONV ucnv_toUnicode_UTF8_OFFSETS_LOGIC (UConverterToUnicodeAr
{
UConverter *cnv = args->converter;
const unsigned char *mySource = (unsigned char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
int32_t *myOffsets = args->offsets;
int32_t offsetNum = 0;
const unsigned char *sourceLimit = (unsigned char *) args->sourceLimit;
- const UChar *targetLimit = args->targetLimit;
+ const char16_t *targetLimit = args->targetLimit;
unsigned char *toUBytes = cnv->toUBytes;
UBool isCESU8 = hasCESU8Data(cnv);
uint32_t ch, ch2 = 0;
@@ -210,7 +210,7 @@ static void U_CALLCONV ucnv_toUnicode_UTF8_OFFSETS_LOGIC (UConverterToUnicodeAr
ch = *(mySource++);
if (U8_IS_SINGLE(ch)) /* Simple case */
{
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
*(myOffsets++) = offsetNum++;
}
else
@@ -253,7 +253,7 @@ morebytes:
if (ch <= MAXIMUM_UCS2)
{
/* fits in 16 bits */
- *(myTarget++) = (UChar) ch;
+ *(myTarget++) = (char16_t) ch;
*(myOffsets++) = offsetNum;
}
else
@@ -264,12 +264,12 @@ morebytes:
ch = U16_TRAIL(ch);
if (myTarget < targetLimit)
{
- *(myTarget++) = (UChar)ch;
+ *(myTarget++) = (char16_t)ch;
*(myOffsets++) = offsetNum;
}
else
{
- cnv->UCharErrorBuffer[0] = (UChar) ch;
+ cnv->UCharErrorBuffer[0] = (char16_t) ch;
cnv->UCharErrorBufferLength = 1;
*err = U_BUFFER_OVERFLOW_ERROR;
}
@@ -301,8 +301,8 @@ U_CFUNC void U_CALLCONV ucnv_fromUnicode_UTF8 (UConverterFromUnicodeArgs * args
UErrorCode * err)
{
UConverter *cnv = args->converter;
- const UChar *mySource = args->source;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *mySource = args->source;
+ const char16_t *sourceLimit = args->sourceLimit;
uint8_t *myTarget = (uint8_t *) args->target;
const uint8_t *targetLimit = (uint8_t *) args->targetLimit;
uint8_t *tempPtr;
@@ -415,9 +415,9 @@ U_CFUNC void U_CALLCONV ucnv_fromUnicode_UTF8_OFFSETS_LOGIC (UConverterFromUnic
UErrorCode * err)
{
UConverter *cnv = args->converter;
- const UChar *mySource = args->source;
+ const char16_t *mySource = args->source;
int32_t *myOffsets = args->offsets;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *sourceLimit = args->sourceLimit;
uint8_t *myTarget = (uint8_t *) args->target;
const uint8_t *targetLimit = (uint8_t *) args->targetLimit;
uint8_t *tempPtr;
@@ -859,12 +859,12 @@ U_CDECL_END
static const UConverterImpl _UTF8Impl={
UCNV_UTF8,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_toUnicode_UTF8,
ucnv_toUnicode_UTF8_OFFSETS_LOGIC,
@@ -872,10 +872,10 @@ static const UConverterImpl _UTF8Impl={
ucnv_fromUnicode_UTF8_OFFSETS_LOGIC,
ucnv_getNextUChar_UTF8,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_getNonSurrogateUnicodeSet,
ucnv_UTF8FromUTF8,
@@ -887,8 +887,8 @@ static const UConverterStaticData _UTF8StaticData={
sizeof(UConverterStaticData),
"UTF-8",
1208, UCNV_IBM, UCNV_UTF8,
- 1, 3, /* max 3 bytes per UChar from UTF-8 (4 bytes from surrogate _pair_) */
- { 0xef, 0xbf, 0xbd, 0 },3,FALSE,FALSE,
+ 1, 3, /* max 3 bytes per char16_t from UTF-8 (4 bytes from surrogate _pair_) */
+ { 0xef, 0xbf, 0xbd, 0 },3,false,false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -903,27 +903,27 @@ const UConverterSharedData _UTF8Data=
static const UConverterImpl _CESU8Impl={
UCNV_CESU8,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_toUnicode_UTF8,
ucnv_toUnicode_UTF8_OFFSETS_LOGIC,
ucnv_fromUnicode_UTF8,
ucnv_fromUnicode_UTF8_OFFSETS_LOGIC,
- NULL,
+ nullptr,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_getCompleteUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _CESU8StaticData={
@@ -931,7 +931,7 @@ static const UConverterStaticData _CESU8StaticData={
"CESU-8",
9400, /* CCSID for CESU-8 */
UCNV_UNKNOWN, UCNV_CESU8, 1, 3,
- { 0xef, 0xbf, 0xbd, 0 },3,FALSE,FALSE,
+ { 0xef, 0xbf, 0xbd, 0 },3,false,false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnvbocu.cpp b/contrib/libs/icu/common/ucnvbocu.cpp
index 7c2aab56558..007722e474b 100644
--- a/contrib/libs/icu/common/ucnvbocu.cpp
+++ b/contrib/libs/icu/common/ucnvbocu.cpp
@@ -195,7 +195,7 @@ bocu1TrailToByte[BOCU1_TRAIL_CONTROLS_COUNT]={
* what we need here.
* This macro adjust the results so that the modulo-value m is always >=0.
*
- * For positive n, the if() condition is always FALSE.
+ * For positive n, the if() condition is always false.
*
* @param n Number to be split into quotient and rest.
* Will be modified to contain the quotient.
@@ -392,7 +392,7 @@ static void U_CALLCONV
_Bocu1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
int32_t *offsets;
@@ -456,7 +456,7 @@ fastSingle:
}
/* restore real values */
targetCapacity=(int32_t)((const uint8_t *)pArgs->targetLimit-target);
- sourceIndex=nextSourceIndex; /* wrong if offsets==NULL but does not matter */
+ sourceIndex=nextSourceIndex; /* wrong if offsets==nullptr but does not matter */
/* regular loop for all cases */
while(source<sourceLimit) {
@@ -485,7 +485,7 @@ fastSingle:
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
++nextSourceIndex;
@@ -653,7 +653,7 @@ static void U_CALLCONV
_Bocu1FromUnicode(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
@@ -729,7 +729,7 @@ fastSingle:
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
c=U16_GET_SUPPLEMENTARY(c, trail);
@@ -916,7 +916,7 @@ decodeBocu1LeadByte(int32_t b) {
}
/* return the state for decoding the trail byte(s) */
- return (diff<<2)|count;
+ return ((uint32_t)diff<<2)|count;
}
/**
@@ -957,8 +957,8 @@ _Bocu1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t *offsets;
int32_t prev, count, diff, c;
@@ -1009,7 +1009,7 @@ fastSingle:
if(BOCU1_START_NEG_2<=(c=*source) && c<BOCU1_START_POS_2) {
c=prev+(c-BOCU1_MIDDLE);
if(c<0x3000) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
*offsets++=nextSourceIndex++;
prev=BOCU1_SIMPLE_PREV(c);
} else {
@@ -1019,7 +1019,7 @@ fastSingle:
if(c!=0x20) {
prev=BOCU1_ASCII_PREV;
}
- *target++=(UChar)c;
+ *target++=(char16_t)c;
*offsets++=nextSourceIndex++;
} else {
break;
@@ -1027,7 +1027,7 @@ fastSingle:
++source;
--count;
}
- sourceIndex=nextSourceIndex; /* wrong if offsets==NULL but does not matter */
+ sourceIndex=nextSourceIndex; /* wrong if offsets==nullptr but does not matter */
/* decode a sequence of single and lead bytes */
while(source<sourceLimit) {
@@ -1043,7 +1043,7 @@ fastSingle:
/* Write a code point directly from a single-byte difference. */
c=prev+(c-BOCU1_MIDDLE);
if(c<0x3000) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
*offsets++=sourceIndex;
prev=BOCU1_SIMPLE_PREV(c);
sourceIndex=nextSourceIndex;
@@ -1057,7 +1057,7 @@ fastSingle:
if(c!=0x20) {
prev=BOCU1_ASCII_PREV;
}
- *target++=(UChar)c;
+ *target++=(char16_t)c;
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex;
continue;
@@ -1128,7 +1128,7 @@ getTrail:
/* calculate the next prev and output c */
prev=BOCU1_PREV(c);
if(c<=0xffff) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
*offsets++=sourceIndex;
} else {
/* output surrogate pair */
@@ -1157,7 +1157,7 @@ endloop:
} else {
/* set the converter state back into UConverter */
cnv->toUnicodeStatus=(uint32_t)prev;
- cnv->mode=(diff<<2)|count;
+ cnv->mode=(int32_t)((uint32_t)diff<<2)|count;
}
cnv->toULength=byteIndex;
@@ -1180,8 +1180,8 @@ _Bocu1ToUnicode(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t prev, count, diff, c;
@@ -1224,7 +1224,7 @@ fastSingle:
if(BOCU1_START_NEG_2<=(c=*source) && c<BOCU1_START_POS_2) {
c=prev+(c-BOCU1_MIDDLE);
if(c<0x3000) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
prev=BOCU1_SIMPLE_PREV(c);
} else {
break;
@@ -1233,7 +1233,7 @@ fastSingle:
if(c!=0x20) {
prev=BOCU1_ASCII_PREV;
}
- *target++=(UChar)c;
+ *target++=(char16_t)c;
} else {
break;
}
@@ -1254,7 +1254,7 @@ fastSingle:
/* Write a code point directly from a single-byte difference. */
c=prev+(c-BOCU1_MIDDLE);
if(c<0x3000) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
prev=BOCU1_SIMPLE_PREV(c);
goto fastSingle;
}
@@ -1266,7 +1266,7 @@ fastSingle:
if(c!=0x20) {
prev=BOCU1_ASCII_PREV;
}
- *target++=(UChar)c;
+ *target++=(char16_t)c;
continue;
} else if(BOCU1_START_NEG_3<=c && c<BOCU1_START_POS_3 && source<sourceLimit) {
/* Optimize two-byte case. */
@@ -1332,7 +1332,7 @@ getTrail:
/* calculate the next prev and output c */
prev=BOCU1_PREV(c);
if(c<=0xffff) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
} else {
/* output surrogate pair */
*target++=U16_LEAD(c);
@@ -1356,7 +1356,7 @@ endloop:
} else {
/* set the converter state back into UConverter */
cnv->toUnicodeStatus=(uint32_t)prev;
- cnv->mode=(diff<<2)|count;
+ cnv->mode=((uint32_t)diff<<2)|count;
}
cnv->toULength=byteIndex;
@@ -1371,27 +1371,27 @@ endloop:
static const UConverterImpl _Bocu1Impl={
UCNV_BOCU1,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
_Bocu1ToUnicode,
_Bocu1ToUnicodeWithOffsets,
_Bocu1FromUnicode,
_Bocu1FromUnicodeWithOffsets,
- NULL,
+ nullptr,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
ucnv_getCompleteUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _Bocu1StaticData={
@@ -1399,9 +1399,9 @@ static const UConverterStaticData _Bocu1StaticData={
"BOCU-1",
1214, /* CCSID for BOCU-1 */
UCNV_IBM, UCNV_BOCU1,
- 1, 4, /* one UChar generates at least 1 byte and at most 4 bytes */
+ 1, 4, /* one char16_t generates at least 1 byte and at most 4 bytes */
{ 0x1a, 0, 0, 0 }, 1, /* BOCU-1 never needs to write a subchar */
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnvdisp.cpp b/contrib/libs/icu/common/ucnvdisp.cpp
index ac86b985970..0830042d0bb 100644
--- a/contrib/libs/icu/common/ucnvdisp.cpp
+++ b/contrib/libs/icu/common/ucnvdisp.cpp
@@ -35,25 +35,25 @@
U_CAPI int32_t U_EXPORT2
ucnv_getDisplayName(const UConverter *cnv,
const char *displayLocale,
- UChar *displayName, int32_t displayNameCapacity,
+ char16_t *displayName, int32_t displayNameCapacity,
UErrorCode *pErrorCode) {
UResourceBundle *rb;
- const UChar *name;
+ const char16_t *name;
int32_t length;
UErrorCode localStatus = U_ZERO_ERROR;
/* check arguments */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(cnv==NULL || displayNameCapacity<0 || (displayNameCapacity>0 && displayName==NULL)) {
+ if(cnv==nullptr || displayNameCapacity<0 || (displayNameCapacity>0 && displayName==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
/* open the resource bundle and get the display name string */
- rb=ures_open(NULL, displayLocale, pErrorCode);
+ rb=ures_open(nullptr, displayLocale, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
return 0;
}
diff --git a/contrib/libs/icu/common/ucnvhz.cpp b/contrib/libs/icu/common/ucnvhz.cpp
index 6b2f5faaf0a..fa0f2b40ea7 100644
--- a/contrib/libs/icu/common/ucnvhz.cpp
+++ b/contrib/libs/icu/common/ucnvhz.cpp
@@ -42,7 +42,7 @@
while(len-->0){ \
if(targetIndex < targetLength){ \
args->target[targetIndex] = (unsigned char) *strToAppend; \
- if(args->offsets!=NULL){ \
+ if(args->offsets!=nullptr){ \
*(offsets++) = sourceIndex-1; \
} \
targetIndex++; \
@@ -84,7 +84,7 @@ _HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
cnv->mode=0;
cnv->fromUChar32=0x0000;
cnv->extraInfo = uprv_calloc(1, sizeof(UConverterDataHZ));
- if(cnv->extraInfo != NULL){
+ if(cnv->extraInfo != nullptr){
((UConverterDataHZ*)cnv->extraInfo)->gbConverter = gbConverter;
}
else {
@@ -96,12 +96,12 @@ _HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
static void U_CALLCONV
_HZClose(UConverter *cnv){
- if(cnv->extraInfo != NULL) {
+ if(cnv->extraInfo != nullptr) {
ucnv_close (((UConverterDataHZ *) (cnv->extraInfo))->gbConverter);
if(!cnv->isExtraLocal) {
uprv_free(cnv->extraInfo);
}
- cnv->extraInfo = NULL;
+ cnv->extraInfo = nullptr;
}
}
@@ -110,19 +110,19 @@ _HZReset(UConverter *cnv, UConverterResetChoice choice){
if(choice<=UCNV_RESET_TO_UNICODE) {
cnv->toUnicodeStatus = 0;
cnv->mode=0;
- if(cnv->extraInfo != NULL){
- ((UConverterDataHZ*)cnv->extraInfo)->isStateDBCS = FALSE;
- ((UConverterDataHZ*)cnv->extraInfo)->isEmptySegment = FALSE;
+ if(cnv->extraInfo != nullptr){
+ ((UConverterDataHZ*)cnv->extraInfo)->isStateDBCS = false;
+ ((UConverterDataHZ*)cnv->extraInfo)->isEmptySegment = false;
}
}
if(choice!=UCNV_RESET_TO_UNICODE) {
cnv->fromUnicodeStatus= 0;
cnv->fromUChar32=0x0000;
- if(cnv->extraInfo != NULL){
- ((UConverterDataHZ*)cnv->extraInfo)->isEscapeAppended = FALSE;
+ if(cnv->extraInfo != nullptr){
+ ((UConverterDataHZ*)cnv->extraInfo)->isEscapeAppended = false;
((UConverterDataHZ*)cnv->extraInfo)->targetIndex = 0;
((UConverterDataHZ*)cnv->extraInfo)->sourceIndex = 0;
- ((UConverterDataHZ*)cnv->extraInfo)->isTargetUCharDBCS = FALSE;
+ ((UConverterDataHZ*)cnv->extraInfo)->isTargetUCharDBCS = false;
}
}
}
@@ -157,7 +157,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
UErrorCode* err){
char tempBuf[2];
const char *mySource = ( char *) args->source;
- UChar *myTarget = args->target;
+ char16_t *myTarget = args->target;
const char *mySourceLimit = args->sourceLimit;
UChar32 targetUniChar = 0x0000;
int32_t mySourceChar = 0x0000;
@@ -166,7 +166,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
tempBuf[1]=0;
/* Calling code already handles this situation. */
- /*if ((args->converter == NULL) || (args->targetLimit < args->target) || (mySourceLimit < args->source)){
+ /*if ((args->converter == nullptr) || (args->targetLimit < args->target) || (mySourceLimit < args->source)){
*err = U_ILLEGAL_ARGUMENT_ERROR;
return;
}*/
@@ -188,14 +188,14 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
if(args->offsets) {
args->offsets[myTarget - args->target]=(int32_t)(mySource - args->source - 2);
}
- *(myTarget++)=(UChar)mySourceChar;
- myData->isEmptySegment = FALSE;
+ *(myTarget++)=(char16_t)mySourceChar;
+ myData->isEmptySegment = false;
continue;
case UCNV_OPEN_BRACE:
case UCNV_CLOSE_BRACE:
myData->isStateDBCS = (mySourceChar == UCNV_OPEN_BRACE);
if (myData->isEmptySegment) {
- myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */
+ myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */
*err = U_ILLEGAL_ESCAPE_SEQUENCE;
args->converter->toUCallbackReason = UCNV_IRREGULAR;
args->converter->toUBytes[0] = UCNV_TILDE;
@@ -205,7 +205,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
args->source = mySource;
return;
}
- myData->isEmptySegment = TRUE;
+ myData->isEmptySegment = true;
continue;
default:
/* if the first byte is equal to TILDE and the trail byte
@@ -217,7 +217,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
* - If any of the non-initial bytes could be the start of a character,
* we stop the illegal sequence before the first one of those.
*/
- myData->isEmptySegment = FALSE; /* different error here, reset this to avoid spurious future error */
+ myData->isEmptySegment = false; /* different error here, reset this to avoid spurious future error */
*err = U_ILLEGAL_ESCAPE_SEQUENCE;
args->converter->toUBytes[0] = UCNV_TILDE;
if( myData->isStateDBCS ?
@@ -244,7 +244,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
} else {
/* add another bit to distinguish a 0 byte from not having seen a lead byte */
args->converter->toUnicodeStatus = (uint32_t) (mySourceChar | 0x100);
- myData->isEmptySegment = FALSE; /* the segment has something, either valid or will produce a different error, so reset this */
+ myData->isEmptySegment = false; /* the segment has something, either valid or will produce a different error, so reset this */
}
continue;
}
@@ -288,11 +288,11 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
args->converter->mode = UCNV_TILDE;
continue;
} else if(mySourceChar <= 0x7f) {
- targetUniChar = (UChar)mySourceChar; /* ASCII */
- myData->isEmptySegment = FALSE; /* the segment has something valid */
+ targetUniChar = (char16_t)mySourceChar; /* ASCII */
+ myData->isEmptySegment = false; /* the segment has something valid */
} else {
targetUniChar = 0xffff;
- myData->isEmptySegment = FALSE; /* different error here, reset this to avoid spurious future error */
+ myData->isEmptySegment = false; /* different error here, reset this to avoid spurious future error */
}
}
if(targetUniChar < 0xfffe){
@@ -300,7 +300,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
args->offsets[myTarget - args->target]=(int32_t)(mySource - args->source - 1-(myData->isStateDBCS));
}
- *(myTarget++)=(UChar)targetUniChar;
+ *(myTarget++)=(char16_t)targetUniChar;
}
else /* targetUniChar>=0xfffe */ {
if(targetUniChar == 0xfffe){
@@ -335,7 +335,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
static void U_CALLCONV
UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
UErrorCode * err){
- const UChar *mySource = args->source;
+ const char16_t *mySource = args->source;
char *myTarget = args->target;
int32_t* offsets = args->offsets;
int32_t mySourceIndex = 0;
@@ -348,10 +348,10 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
UBool isTargetUCharDBCS = (UBool) myConverterData->isTargetUCharDBCS;
UBool oldIsTargetUCharDBCS;
int len =0;
- const char* escSeq=NULL;
+ const char* escSeq=nullptr;
/* Calling code already handles this situation. */
- /*if ((args->converter == NULL) || (args->targetLimit < myTarget) || (args->sourceLimit < args->source)){
+ /*if ((args->converter == nullptr) || (args->targetLimit < myTarget) || (args->sourceLimit < args->source)){
*err = U_ILLEGAL_ARGUMENT_ERROR;
return;
}*/
@@ -363,7 +363,7 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
targetUniChar = missingCharMarker;
if (myTargetIndex < targetLength){
- mySourceChar = (UChar) mySource[mySourceIndex++];
+ mySourceChar = (char16_t) mySource[mySourceIndex++];
oldIsTargetUCharDBCS = isTargetUCharDBCS;
@@ -396,13 +396,13 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args,
len =ESC_LEN;
escSeq = SB_ESCAPE;
CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex);
- myConverterData->isEscapeAppended = TRUE;
+ myConverterData->isEscapeAppended = true;
}
else{ /* Shifting from a single byte to double byte mode*/
len =ESC_LEN;
escSeq = DB_ESCAPE;
CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex);
- myConverterData->isEscapeAppended = TRUE;
+ myConverterData->isEscapeAppended = true;
}
}
@@ -453,7 +453,7 @@ getTrail:
/*look ahead to find the trail surrogate*/
if(mySourceIndex < mySourceLength) {
/* test the following code unit */
- UChar trail=(UChar) args->source[mySourceIndex];
+ char16_t trail=(char16_t) args->source[mySourceIndex];
if(U16_IS_TRAIL(trail)) {
++mySourceIndex;
mySourceChar=U16_GET_SUPPLEMENTARY(args->converter->fromUChar32, trail);
@@ -507,7 +507,7 @@ _HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *e
if( convData->isTargetUCharDBCS){
*p++= UCNV_TILDE;
*p++= UCNV_CLOSE_BRACE;
- convData->isTargetUCharDBCS=FALSE;
+ convData->isTargetUCharDBCS=false;
}
*p++= (char)cnv->subChars[0];
@@ -550,7 +550,7 @@ _HZ_SafeClone(const UConverter *cnv,
uprv_memcpy(&localClone->mydata, cnv->extraInfo, sizeof(UConverterDataHZ));
localClone->cnv.extraInfo = &localClone->mydata;
- localClone->cnv.isExtraLocal = TRUE;
+ localClone->cnv.isExtraLocal = true;
/* deep-clone the sub-converter */
size = (int32_t)sizeof(UConverter);
@@ -579,8 +579,8 @@ static const UConverterImpl _HZImpl={
UCNV_HZ,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_HZOpen,
_HZClose,
@@ -590,15 +590,15 @@ static const UConverterImpl _HZImpl={
UConverter_toUnicode_HZ_OFFSETS_LOGIC,
UConverter_fromUnicode_HZ_OFFSETS_LOGIC,
UConverter_fromUnicode_HZ_OFFSETS_LOGIC,
- NULL,
+ nullptr,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_HZ_WriteSub,
_HZ_SafeClone,
_HZ_GetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _HZStaticData={
@@ -611,8 +611,8 @@ static const UConverterStaticData _HZStaticData={
4,
{ 0x1a, 0, 0, 0 },
1,
- FALSE,
- FALSE,
+ false,
+ false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */
diff --git a/contrib/libs/icu/common/ucnvisci.cpp b/contrib/libs/icu/common/ucnvisci.cpp
index f303e7e24fc..507a50c8925 100644
--- a/contrib/libs/icu/common/ucnvisci.cpp
+++ b/contrib/libs/icu/common/ucnvisci.cpp
@@ -119,8 +119,8 @@ typedef enum {
#define ISCII_CNV_PREFIX "ISCII,version="
typedef struct {
- UChar contextCharToUnicode; /* previous Unicode codepoint for contextual analysis */
- UChar contextCharFromUnicode; /* previous Unicode codepoint for contextual analysis */
+ char16_t contextCharToUnicode; /* previous Unicode codepoint for contextual analysis */
+ char16_t contextCharFromUnicode; /* previous Unicode codepoint for contextual analysis */
uint16_t defDeltaToUnicode; /* delta for switching to default state when DEF is encountered */
uint16_t currentDeltaFromUnicode; /* current delta in Indic block */
uint16_t currentDeltaToUnicode; /* current delta in Indic block */
@@ -172,7 +172,7 @@ static const uint8_t pnjMap[80] = {
static UBool
isPNJConsonant(UChar32 c) {
if (c < 0xa00 || 0xa50 <= c) {
- return FALSE;
+ return false;
} else {
return (UBool)(pnjMap[c - 0xa00] & 1);
}
@@ -181,7 +181,7 @@ isPNJConsonant(UChar32 c) {
static UBool
isPNJBindiTippi(UChar32 c) {
if (c < 0xa00 || 0xa50 <= c) {
- return FALSE;
+ return false;
} else {
return (UBool)(pnjMap[c - 0xa00] >> 1);
}
@@ -195,14 +195,14 @@ _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
cnv->extraInfo = uprv_malloc(sizeof(UConverterDataISCII));
- if (cnv->extraInfo != NULL) {
+ if (cnv->extraInfo != nullptr) {
int32_t len=0;
UConverterDataISCII *converterData=
(UConverterDataISCII *) cnv->extraInfo;
converterData->contextCharToUnicode=NO_CHAR_MARKER;
cnv->toUnicodeStatus = missingCharMarker;
converterData->contextCharFromUnicode=0x0000;
- converterData->resetToDefaultToUnicode=FALSE;
+ converterData->resetToDefaultToUnicode=false;
/* check if the version requested is supported */
if ((pArgs->options & UCNV_OPTIONS_VERSION_MASK) < 9) {
/* initialize state variables */
@@ -214,7 +214,7 @@ _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
= converterData->currentMaskToUnicode
= converterData->defMaskToUnicode = lookupInitialData[pArgs->options & UCNV_OPTIONS_VERSION_MASK].maskEnum;
- converterData->isFirstBuffer=TRUE;
+ converterData->isFirstBuffer=true;
(void)uprv_strcpy(converterData->name, ISCII_CNV_PREFIX);
len = (int32_t)uprv_strlen(converterData->name);
converterData->name[len]= (char)((pArgs->options & UCNV_OPTIONS_VERSION_MASK) + '0');
@@ -223,7 +223,7 @@ _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
converterData->prevToUnicodeStatus = 0x0000;
} else {
uprv_free(cnv->extraInfo);
- cnv->extraInfo = NULL;
+ cnv->extraInfo = nullptr;
*errorCode = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -234,11 +234,11 @@ _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) {
static void U_CALLCONV
_ISCIIClose(UConverter *cnv) {
- if (cnv->extraInfo!=NULL) {
+ if (cnv->extraInfo!=nullptr) {
if (!cnv->isExtraLocal) {
uprv_free(cnv->extraInfo);
}
- cnv->extraInfo=NULL;
+ cnv->extraInfo=nullptr;
}
}
@@ -248,7 +248,7 @@ _ISCIIgetName(const UConverter* cnv) {
UConverterDataISCII* myData= (UConverterDataISCII*)cnv->extraInfo;
return myData->name;
}
- return NULL;
+ return nullptr;
}
static void U_CALLCONV
@@ -267,8 +267,8 @@ _ISCIIReset(UConverter *cnv, UConverterResetChoice choice) {
data->contextCharFromUnicode=0x00;
data->currentMaskFromUnicode=data->defMaskToUnicode;
data->currentDeltaFromUnicode=data->defDeltaToUnicode;
- data->isFirstBuffer=TRUE;
- data->resetToDefaultToUnicode=FALSE;
+ data->isFirstBuffer=true;
+ data->resetToDefaultToUnicode=false;
}
}
@@ -895,8 +895,8 @@ static const uint16_t nuktaSpecialCases[][2]={
static void U_CALLCONV
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
UConverterFromUnicodeArgs * args, UErrorCode * err) {
- const UChar *source = args->source;
- const UChar *sourceLimit = args->sourceLimit;
+ const char16_t *source = args->source;
+ const char16_t *sourceLimit = args->sourceLimit;
unsigned char *target = (unsigned char *) args->target;
unsigned char *targetLimit = (unsigned char *) args->targetLimit;
int32_t* offsets = args->offsets;
@@ -906,9 +906,9 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
UConverterDataISCII *converterData;
uint16_t newDelta=0;
uint16_t range = 0;
- UBool deltaChanged = FALSE;
+ UBool deltaChanged = false;
- if ((args->converter == NULL) || (args->targetLimit < args->target) || (args->sourceLimit < args->source)) {
+ if ((args->converter == nullptr) || (args->targetLimit < args->target) || (args->sourceLimit < args->source)) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -986,8 +986,8 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
if (newDelta!= converterData->currentDeltaFromUnicode || converterData->isFirstBuffer) {
converterData->currentDeltaFromUnicode = newDelta;
converterData->currentMaskFromUnicode = lookupInitialData[range].maskEnum;
- deltaChanged =TRUE;
- converterData->isFirstBuffer=FALSE;
+ deltaChanged =true;
+ converterData->isFirstBuffer=false;
}
if (converterData->currentDeltaFromUnicode == PNJ_DELTA) {
@@ -1024,7 +1024,7 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
temp =(uint16_t)(ATR<<8);
temp += (uint16_t)((uint8_t) lookupInitialData[range].isciiLang);
/* reset */
- deltaChanged=FALSE;
+ deltaChanged=false;
/* now append ATR and language code */
WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,temp,err);
if (U_FAILURE(*err)) {
@@ -1052,7 +1052,7 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC(
}
} else if (targetByteUnit != missingCharMarker) {
if (targetByteUnit==ISCII_HALANT) {
- converterData->contextCharFromUnicode = (UChar)targetByteUnit;
+ converterData->contextCharFromUnicode = (char16_t)targetByteUnit;
}
/* write targetByteUnit to target*/
WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,targetByteUnit,err);
@@ -1068,7 +1068,7 @@ getTrail:
/*look ahead to find the trail surrogate*/
if (source < sourceLimit) {
/* test the following code unit */
- UChar trail= (*source);
+ char16_t trail= (*source);
if (U16_IS_TRAIL(trail)) {
source++;
sourceChar=U16_GET_SUPPLEMENTARY(sourceChar, trail);
@@ -1131,13 +1131,13 @@ static const uint16_t lookupTable[][2]={
} \
/* now write the targetUniChar */ \
if(target<args->targetLimit){ \
- *(target)++ = (UChar)targetUniChar; \
+ *(target)++ = (char16_t)targetUniChar; \
if(offsets){ \
*(offsets)++ = (int32_t)(offset); \
} \
}else{ \
args->converter->UCharErrorBuffer[args->converter->UCharErrorBufferLength++] = \
- (UChar)targetUniChar; \
+ (char16_t)targetUniChar; \
*err = U_BUFFER_OVERFLOW_ERROR; \
} \
} UPRV_BLOCK_MACRO_END
@@ -1179,20 +1179,20 @@ static const uint16_t lookupTable[][2]={
static void U_CALLCONV
UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCode* err) {
const char *source = ( char *) args->source;
- UChar *target = args->target;
+ char16_t *target = args->target;
const char *sourceLimit = args->sourceLimit;
- const UChar* targetLimit = args->targetLimit;
+ const char16_t* targetLimit = args->targetLimit;
uint32_t targetUniChar = 0x0000;
uint8_t sourceChar = 0x0000;
UConverterDataISCII* data;
- UChar32* toUnicodeStatus=NULL;
+ UChar32* toUnicodeStatus=nullptr;
UChar32 tempTargetUniChar = 0x0000;
- UChar* contextCharToUnicode= NULL;
+ char16_t* contextCharToUnicode= nullptr;
UBool found;
int i;
int offset = 0;
- if ((args->converter == NULL) || (target < args->target) || (source < args->source)) {
+ if ((args->converter == nullptr) || (target < args->target) || (source < args->source)) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1293,7 +1293,7 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo
case ISCII_INV:
case EXT:
case ATR:
- *contextCharToUnicode = (UChar)sourceChar;
+ *contextCharToUnicode = (char16_t)sourceChar;
if (*toUnicodeStatus != missingCharMarker) {
/* Write the previous toUnicodeStatus, this was delayed to handle consonant clustering for Gurmukhi script. */
@@ -1330,7 +1330,7 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo
break;
case 0x0A:
case 0x0D:
- data->resetToDefaultToUnicode = TRUE;
+ data->resetToDefaultToUnicode = true;
GET_MAPPING(sourceChar,targetUniChar,data)
;
*contextCharToUnicode = sourceChar;
@@ -1338,12 +1338,12 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo
case ISCII_VOWEL_SIGN_E:
i=1;
- found=FALSE;
+ found=false;
for (; i<vowelSignESpecialCases[0][0]; i++) {
U_ASSERT(i<UPRV_LENGTHOF(vowelSignESpecialCases));
if (vowelSignESpecialCases[i][0]==(uint8_t)*contextCharToUnicode) {
targetUniChar=vowelSignESpecialCases[i][1];
- found=TRUE;
+ found=true;
break;
}
}
@@ -1397,12 +1397,12 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo
} else {
/* try to handle <CHAR> + ISCII_NUKTA special mappings */
i=1;
- found =FALSE;
+ found =false;
for (; i<nuktaSpecialCases[0][0]; i++) {
if (nuktaSpecialCases[i][0]==(uint8_t)
*contextCharToUnicode) {
targetUniChar=nuktaSpecialCases[i][1];
- found =TRUE;
+ found =true;
break;
}
}
@@ -1471,11 +1471,11 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo
if (targetUniChar != missingCharMarker) {
/* now save the targetUniChar for delayed write */
- *toUnicodeStatus = (UChar) targetUniChar;
- if (data->resetToDefaultToUnicode==TRUE) {
+ *toUnicodeStatus = (char16_t) targetUniChar;
+ if (data->resetToDefaultToUnicode) {
data->currentDeltaToUnicode = data->defDeltaToUnicode;
data->currentMaskToUnicode = data->defMaskToUnicode;
- data->resetToDefaultToUnicode=FALSE;
+ data->resetToDefaultToUnicode=false;
}
} else {
@@ -1550,7 +1550,7 @@ _ISCII_SafeClone(const UConverter *cnv,
uprv_memcpy(&localClone->mydata, cnv->extraInfo, sizeof(UConverterDataISCII));
localClone->cnv.extraInfo = &localClone->mydata;
- localClone->cnv.isExtraLocal = TRUE;
+ localClone->cnv.isExtraLocal = true;
return &localClone->cnv;
}
@@ -1589,8 +1589,8 @@ static const UConverterImpl _ISCIIImpl={
UCNV_ISCII,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_ISCIIOpen,
_ISCIIClose,
@@ -1600,15 +1600,15 @@ static const UConverterImpl _ISCIIImpl={
UConverter_toUnicode_ISCII_OFFSETS_LOGIC,
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC,
UConverter_fromUnicode_ISCII_OFFSETS_LOGIC,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_ISCIIgetName,
- NULL,
+ nullptr,
_ISCII_SafeClone,
_ISCIIGetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _ISCIIStaticData={
@@ -1621,8 +1621,8 @@ static const UConverterStaticData _ISCIIStaticData={
4,
{ 0x1a, 0, 0, 0 },
0x1,
- FALSE,
- FALSE,
+ false,
+ false,
0x0,
0x0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */
diff --git a/contrib/libs/icu/common/ucnvlat1.cpp b/contrib/libs/icu/common/ucnvlat1.cpp
index 358bc0caa25..09206885269 100644
--- a/contrib/libs/icu/common/ucnvlat1.cpp
+++ b/contrib/libs/icu/common/ucnvlat1.cpp
@@ -36,7 +36,7 @@ static void U_CALLCONV
_Latin1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
const uint8_t *source;
- UChar *target;
+ char16_t *target;
int32_t targetCapacity, length;
int32_t *offsets;
@@ -51,7 +51,7 @@ _Latin1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
sourceIndex=0;
/*
- * since the conversion here is 1:1 UChar:uint8_t, we need only one counter
+ * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
* for the minimum of the sourceLength and targetCapacity
*/
length=(int32_t)((const uint8_t *)pArgs->sourceLimit-source);
@@ -82,7 +82,7 @@ _Latin1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
source+=8;
} while(--count>0);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
do {
offsets[0]=sourceIndex++;
offsets[1]=sourceIndex++;
@@ -108,7 +108,7 @@ _Latin1ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
pArgs->target=target;
/* set offsets */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
while(length>0) {
*offsets++=sourceIndex++;
--length;
@@ -137,13 +137,13 @@ static void U_CALLCONV
_Latin1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target, *oldTarget;
int32_t targetCapacity, length;
int32_t *offsets;
UChar32 cp;
- UChar c, max;
+ char16_t c, max;
int32_t sourceIndex;
@@ -168,7 +168,7 @@ _Latin1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
sourceIndex= cp==0 ? 0 : -1;
/*
- * since the conversion here is 1:1 UChar:uint8_t, we need only one counter
+ * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
* for the minimum of the sourceLength and targetCapacity
*/
length=(int32_t)(sourceLimit-source);
@@ -185,7 +185,7 @@ _Latin1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
/* unroll the loop with the most common case */
if(targetCapacity>=16) {
int32_t count, loops;
- UChar u, oredChars;
+ char16_t u, oredChars;
loops=count=targetCapacity>>4;
do {
@@ -233,7 +233,7 @@ _Latin1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
count=loops-count;
targetCapacity-=16*count;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
oldTarget+=16*count;
while(count>0) {
*offsets++=sourceIndex++;
@@ -274,7 +274,7 @@ _Latin1FromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
cp=U16_GET_SUPPLEMENTARY(cp, trail);
@@ -300,7 +300,7 @@ getTrail:
noMoreInput:
/* set offsets since the start */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
size_t count=target-oldTarget;
while(count>0) {
*offsets++=sourceIndex++;
@@ -438,12 +438,12 @@ U_CDECL_END
static const UConverterImpl _Latin1Impl={
UCNV_LATIN_1,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
_Latin1ToUnicodeWithOffsets,
_Latin1ToUnicodeWithOffsets,
@@ -451,13 +451,13 @@ static const UConverterImpl _Latin1Impl={
_Latin1FromUnicodeWithOffsets,
_Latin1GetNextUChar,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
_Latin1GetUnicodeSet,
- NULL,
+ nullptr,
ucnv_Latin1FromUTF8
};
@@ -465,7 +465,7 @@ static const UConverterStaticData _Latin1StaticData={
sizeof(UConverterStaticData),
"ISO-8859-1",
819, UCNV_IBM, UCNV_LATIN_1, 1, 1,
- { 0x1a, 0, 0, 0 }, 1, FALSE, FALSE,
+ { 0x1a, 0, 0, 0 }, 1, false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -482,7 +482,7 @@ static void U_CALLCONV
_ASCIIToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
const uint8_t *source, *sourceLimit;
- UChar *target, *oldTarget;
+ char16_t *target, *oldTarget;
int32_t targetCapacity, length;
int32_t *offsets;
@@ -501,7 +501,7 @@ _ASCIIToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
sourceIndex=0;
/*
- * since the conversion here is 1:1 UChar:uint8_t, we need only one counter
+ * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
* for the minimum of the sourceLength and targetCapacity
*/
length=(int32_t)(sourceLimit-source);
@@ -512,7 +512,7 @@ _ASCIIToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(targetCapacity>=8) {
/* This loop is unrolled for speed and improved pipelining. */
int32_t count, loops;
- UChar oredChars;
+ char16_t oredChars;
loops=count=targetCapacity>>3;
do {
@@ -536,7 +536,7 @@ _ASCIIToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
count=loops-count;
targetCapacity-=count*8;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
oldTarget+=count*8;
while(count>0) {
offsets[0]=sourceIndex++;
@@ -572,7 +572,7 @@ _ASCIIToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
}
/* set offsets since the start */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
size_t count=target-oldTarget;
while(count>0) {
*offsets++=sourceIndex++;
@@ -717,12 +717,12 @@ U_CDECL_END
static const UConverterImpl _ASCIIImpl={
UCNV_US_ASCII,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
_ASCIIToUnicodeWithOffsets,
_ASCIIToUnicodeWithOffsets,
@@ -730,13 +730,13 @@ static const UConverterImpl _ASCIIImpl={
_Latin1FromUnicodeWithOffsets,
_ASCIIGetNextUChar,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
_ASCIIGetUnicodeSet,
- NULL,
+ nullptr,
ucnv_ASCIIFromUTF8
};
@@ -744,7 +744,7 @@ static const UConverterStaticData _ASCIIStaticData={
sizeof(UConverterStaticData),
"US-ASCII",
367, UCNV_IBM, UCNV_US_ASCII, 1, 1,
- { 0x1a, 0, 0, 0 }, 1, FALSE, FALSE,
+ { 0x1a, 0, 0, 0 }, 1, false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnvmbcs.cpp b/contrib/libs/icu/common/ucnvmbcs.cpp
index 420aa02af5b..d7606039800 100644
--- a/contrib/libs/icu/common/ucnvmbcs.cpp
+++ b/contrib/libs/icu/common/ucnvmbcs.cpp
@@ -373,7 +373,7 @@
* @param value contains 1..4 bytes of the first byte sequence, right-aligned
* @param codePoints resulting Unicode code points, or negative if a byte sequence does
* not map to anything
- * @return TRUE to continue enumeration, FALSE to stop
+ * @return true to continue enumeration, false to stop
*/
typedef UBool U_CALLCONV
UConverterEnumToUCallback(const void *context, uint32_t value, UChar32 codePoints[32]);
@@ -438,8 +438,8 @@ static const UConverterImpl _SBCSUTF8Impl={
ucnv_MBCSUnload,
ucnv_MBCSOpen,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_MBCSToUnicodeWithOffsets,
ucnv_MBCSToUnicodeWithOffsets,
@@ -450,10 +450,10 @@ static const UConverterImpl _SBCSUTF8Impl={
ucnv_MBCSGetStarters,
ucnv_MBCSGetName,
ucnv_MBCSWriteSub,
- NULL,
+ nullptr,
ucnv_MBCSGetUnicodeSet,
- NULL,
+ nullptr,
ucnv_SBCSFromUTF8
};
@@ -464,8 +464,8 @@ static const UConverterImpl _DBCSUTF8Impl={
ucnv_MBCSUnload,
ucnv_MBCSOpen,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_MBCSToUnicodeWithOffsets,
ucnv_MBCSToUnicodeWithOffsets,
@@ -476,10 +476,10 @@ static const UConverterImpl _DBCSUTF8Impl={
ucnv_MBCSGetStarters,
ucnv_MBCSGetName,
ucnv_MBCSWriteSub,
- NULL,
+ nullptr,
ucnv_MBCSGetUnicodeSet,
- NULL,
+ nullptr,
ucnv_DBCSFromUTF8
};
@@ -490,8 +490,8 @@ static const UConverterImpl _MBCSImpl={
ucnv_MBCSUnload,
ucnv_MBCSOpen,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnv_MBCSToUnicodeWithOffsets,
ucnv_MBCSToUnicodeWithOffsets,
@@ -502,10 +502,10 @@ static const UConverterImpl _MBCSImpl={
ucnv_MBCSGetStarters,
ucnv_MBCSGetName,
ucnv_MBCSWriteSub,
- NULL,
+ nullptr,
ucnv_MBCSGetUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
/* Static data is in tools/makeconv/ucnvstat.c for data-based
@@ -514,7 +514,7 @@ static const UConverterImpl _MBCSImpl={
const UConverterSharedData _MBCSData={
sizeof(UConverterSharedData), 1,
- NULL, NULL, FALSE, TRUE, &_MBCSImpl,
+ nullptr, nullptr, false, true, &_MBCSImpl,
0, UCNV_MBCS_TABLE_INITIALIZER
};
@@ -668,7 +668,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[],
value|(uint32_t)b,
callback, context,
pErrorCode)) {
- return FALSE;
+ return false;
}
}
codePoints[b&0x1f]=U_SENTINEL;
@@ -683,7 +683,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[],
action=MBCS_ENTRY_FINAL_ACTION(entry);
if(action==MBCS_STATE_VALID_DIRECT_16) {
/* output BMP code point */
- c=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
} else if(action==MBCS_STATE_VALID_16) {
int32_t finalOffset=offset+MBCS_ENTRY_FINAL_VALUE_16(entry);
c=unicodeCodeUnits[finalOffset];
@@ -719,13 +719,13 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[],
if(((++b)&0x1f)==0) {
if(anyCodePoints>=0) {
if(!callback(context, value|(uint32_t)(b-0x20), codePoints)) {
- return FALSE;
+ return false;
}
anyCodePoints=-1;
}
}
}
- return TRUE;
+ return true;
}
/*
@@ -1104,16 +1104,16 @@ ucnv_MBCSGetUnicodeSet(const UConverter *cnv,
static UChar32
_extFromU(UConverter *cnv, const UConverterSharedData *sharedData,
UChar32 cp,
- const UChar **source, const UChar *sourceLimit,
+ const char16_t **source, const char16_t *sourceLimit,
uint8_t **target, const uint8_t *targetLimit,
int32_t **offsets, int32_t sourceIndex,
UBool flush,
UErrorCode *pErrorCode) {
const int32_t *cx;
- cnv->useSubChar1=FALSE;
+ cnv->useSubChar1=false;
- if( (cx=sharedData->mbcs.extIndexes)!=NULL &&
+ if( (cx=sharedData->mbcs.extIndexes)!=nullptr &&
ucnv_extInitialMatchFromU(
cnv, cx,
cp, source, sourceLimit,
@@ -1172,13 +1172,13 @@ static int8_t
_extToU(UConverter *cnv, const UConverterSharedData *sharedData,
int8_t length,
const uint8_t **source, const uint8_t *sourceLimit,
- UChar **target, const UChar *targetLimit,
+ char16_t **target, const char16_t *targetLimit,
int32_t **offsets, int32_t sourceIndex,
UBool flush,
UErrorCode *pErrorCode) {
const int32_t *cx;
- if( (cx=sharedData->mbcs.extIndexes)!=NULL &&
+ if( (cx=sharedData->mbcs.extIndexes)!=nullptr &&
ucnv_extInitialMatchToU(
cnv, cx,
length, (const char **)source, (const char *)sourceLimit,
@@ -1286,7 +1286,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
mbcsTable->stateTable[0][EBCDIC_LF]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF) &&
mbcsTable->stateTable[0][EBCDIC_NL]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL)
)) {
- return FALSE;
+ return false;
}
if(mbcsTable->outputType==MBCS_OUTPUT_1) {
@@ -1294,7 +1294,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
EBCDIC_RT_LF==MBCS_SINGLE_RESULT_FROM_U(table, results, U_LF) &&
EBCDIC_RT_NL==MBCS_SINGLE_RESULT_FROM_U(table, results, U_NL)
)) {
- return FALSE;
+ return false;
}
} else /* MBCS_OUTPUT_2_SISO */ {
stage2Entry=MBCS_STAGE_2_FROM_U(table, U_LF);
@@ -1302,7 +1302,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, U_LF)!=0 &&
EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF)
)) {
- return FALSE;
+ return false;
}
stage2Entry=MBCS_STAGE_2_FROM_U(table, U_NL);
@@ -1310,7 +1310,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, U_NL)!=0 &&
EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL)
)) {
- return FALSE;
+ return false;
}
}
@@ -1334,7 +1334,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
* ucnv_MBCSSizeofFromUBytes() function.
*/
*pErrorCode=U_INVALID_FORMAT_ERROR;
- return FALSE;
+ return false;
}
/*
@@ -1349,9 +1349,9 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
sizeofFromUBytes+
UCNV_MAX_CONVERTER_NAME_LENGTH+20;
p=(uint8_t *)uprv_malloc(size);
- if(p==NULL) {
+ if(p==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
/* copy and modify the to-Unicode state table */
@@ -1383,21 +1383,21 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) {
uprv_strcat(name, UCNV_SWAP_LFNL_OPTION_STRING);
/* set the pointers */
- icu::umtx_lock(NULL);
- if(mbcsTable->swapLFNLStateTable==NULL) {
+ icu::umtx_lock(nullptr);
+ if(mbcsTable->swapLFNLStateTable==nullptr) {
mbcsTable->swapLFNLStateTable=newStateTable;
mbcsTable->swapLFNLFromUnicodeBytes=(uint8_t *)newResults;
mbcsTable->swapLFNLName=name;
- newStateTable=NULL;
+ newStateTable=nullptr;
}
- icu::umtx_unlock(NULL);
+ icu::umtx_unlock(nullptr);
/* release the allocated memory if another thread beat us to it */
- if(newStateTable!=NULL) {
+ if(newStateTable!=nullptr) {
uprv_free(newStateTable);
}
- return TRUE;
+ return true;
}
/* reconstitute omitted fromUnicode data ------------------------------------ */
@@ -1477,7 +1477,7 @@ writeStage3Roundtrip(const void *context, uint32_t value, UChar32 codePoints[32]
/* set the roundtrip flag */
*stage2|=(1UL<<(16+(c&0xf)));
}
- return TRUE;
+ return true;
}
static void
@@ -1489,7 +1489,7 @@ reconstituteData(UConverterMBCSTable *mbcsTable,
uint32_t *stage2;
uint32_t dataLength=stage1Length*2+fullStage2Length*4+mbcsTable->fromUBytesLength;
mbcsTable->reconstitutedData=(uint8_t *)uprv_malloc(dataLength);
- if(mbcsTable->reconstitutedData==NULL) {
+ if(mbcsTable->reconstitutedData==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1561,7 +1561,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
_MBCSHeader *header=(_MBCSHeader *)raw;
uint32_t offset;
uint32_t headerLength;
- UBool noFromU=FALSE;
+ UBool noFromU=false;
if(header->version[0]==4) {
headerLength=MBCS_HEADER_V4_LENGTH;
@@ -1593,7 +1593,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
const char *baseName;
/* extension-only file, load the base table and set values appropriately */
- if((extIndexes=mbcsTable->extIndexes)==NULL) {
+ if((extIndexes=mbcsTable->extIndexes)==nullptr) {
/* extension-only file without extension */
*pErrorCode=U_INVALID_TABLE_FORMAT;
return;
@@ -1626,7 +1626,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
return;
}
if( baseSharedData->staticData->conversionType!=UCNV_MBCS ||
- baseSharedData->mbcs.baseSharedData!=NULL
+ baseSharedData->mbcs.baseSharedData!=nullptr
) {
ucnv_unload(baseSharedData);
*pErrorCode=U_INVALID_TABLE_FORMAT;
@@ -1657,15 +1657,15 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
* It is easier to just create the data for the extension converter
* separately when it is requested.
*/
- mbcsTable->swapLFNLStateTable=NULL;
- mbcsTable->swapLFNLFromUnicodeBytes=NULL;
- mbcsTable->swapLFNLName=NULL;
+ mbcsTable->swapLFNLStateTable=nullptr;
+ mbcsTable->swapLFNLFromUnicodeBytes=nullptr;
+ mbcsTable->swapLFNLName=nullptr;
/*
* The reconstitutedData must be deleted only when the base converter
* is unloaded.
*/
- mbcsTable->reconstitutedData=NULL;
+ mbcsTable->reconstitutedData=nullptr;
/*
* Set a special, runtime-only outputType if the extension converter
@@ -1703,7 +1703,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
/* allocate a new state table and copy the base state table contents */
count=mbcsTable->countStates;
newStateTable=(int32_t (*)[256])uprv_malloc((count+1)*1024);
- if(newStateTable==NULL) {
+ if(newStateTable==nullptr) {
ucnv_unload(baseSharedData);
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
@@ -1726,7 +1726,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
}
mbcsTable->stateTable=(const int32_t (*)[256])newStateTable;
mbcsTable->countStates=(uint8_t)(count+1);
- mbcsTable->stateTableOwned=TRUE;
+ mbcsTable->stateTableOwned=true;
mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
}
@@ -1805,7 +1805,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
(header->version[2]>=(MBCS_FAST_MAX>>8))
)
) {
- mbcsTable->utf8Friendly=TRUE;
+ mbcsTable->utf8Friendly=true;
if(mbcsTable->countStates==1) {
/*
@@ -1828,7 +1828,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData,
mbcsTable->mbcsIndex=(const uint16_t *)
(mbcsTable->fromUnicodeBytes+
(noFromU ? 0 : mbcsTable->fromUBytesLength));
- mbcsTable->maxFastUChar=(((UChar)header->version[2])<<8)|0xff;
+ mbcsTable->maxFastUChar=(((char16_t)header->version[2])<<8)|0xff;
}
}
@@ -1880,16 +1880,16 @@ static void U_CALLCONV
ucnv_MBCSUnload(UConverterSharedData *sharedData) {
UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
- if(mbcsTable->swapLFNLStateTable!=NULL) {
+ if(mbcsTable->swapLFNLStateTable!=nullptr) {
uprv_free(mbcsTable->swapLFNLStateTable);
}
if(mbcsTable->stateTableOwned) {
uprv_free((void *)mbcsTable->stateTable);
}
- if(mbcsTable->baseSharedData!=NULL) {
+ if(mbcsTable->baseSharedData!=nullptr) {
ucnv_unload(mbcsTable->baseSharedData);
}
- if(mbcsTable->reconstitutedData!=NULL) {
+ if(mbcsTable->reconstitutedData!=nullptr) {
uprv_free(mbcsTable->reconstitutedData);
}
}
@@ -1919,9 +1919,9 @@ ucnv_MBCSOpen(UConverter *cnv,
/* do this because double-checked locking is broken */
UBool isCached;
- icu::umtx_lock(NULL);
- isCached=mbcsTable->swapLFNLStateTable!=NULL;
- icu::umtx_unlock(NULL);
+ icu::umtx_lock(nullptr);
+ isCached=mbcsTable->swapLFNLStateTable!=nullptr;
+ icu::umtx_unlock(nullptr);
if(!isCached) {
if(!_EBCDICSwapLFNL(cnv->sharedData, pErrorCode)) {
@@ -1935,18 +1935,18 @@ ucnv_MBCSOpen(UConverter *cnv,
}
}
- if(uprv_strstr(pArgs->name, "18030")!=NULL) {
- if(uprv_strstr(pArgs->name, "gb18030")!=NULL || uprv_strstr(pArgs->name, "GB18030")!=NULL) {
+ if(uprv_strstr(pArgs->name, "18030")!=nullptr) {
+ if(uprv_strstr(pArgs->name, "gb18030")!=nullptr || uprv_strstr(pArgs->name, "GB18030")!=nullptr) {
/* set a flag for GB 18030 mode, which changes the callback behavior */
cnv->options|=_MBCS_OPTION_GB18030;
}
- } else if((uprv_strstr(pArgs->name, "KEIS")!=NULL) || (uprv_strstr(pArgs->name, "keis")!=NULL)) {
+ } else if((uprv_strstr(pArgs->name, "KEIS")!=nullptr) || (uprv_strstr(pArgs->name, "keis")!=nullptr)) {
/* set a flag for KEIS converter, which changes the SI/SO character sequence */
cnv->options|=_MBCS_OPTION_KEIS;
- } else if((uprv_strstr(pArgs->name, "JEF")!=NULL) || (uprv_strstr(pArgs->name, "jef")!=NULL)) {
+ } else if((uprv_strstr(pArgs->name, "JEF")!=nullptr) || (uprv_strstr(pArgs->name, "jef")!=nullptr)) {
/* set a flag for JEF converter, which changes the SI/SO character sequence */
cnv->options|=_MBCS_OPTION_JEF;
- } else if((uprv_strstr(pArgs->name, "JIPS")!=NULL) || (uprv_strstr(pArgs->name, "jips")!=NULL)) {
+ } else if((uprv_strstr(pArgs->name, "JIPS")!=nullptr) || (uprv_strstr(pArgs->name, "jips")!=nullptr)) {
/* set a flag for JIPS converter, which changes the SI/SO character sequence */
cnv->options|=_MBCS_OPTION_JIPS;
}
@@ -1957,7 +1957,7 @@ ucnv_MBCSOpen(UConverter *cnv,
}
extIndexes=mbcsTable->extIndexes;
- if(extIndexes!=NULL) {
+ if(extIndexes!=nullptr) {
maxBytesPerUChar=(int8_t)UCNV_GET_MAX_BYTES_PER_UCHAR(extIndexes);
if(outputType==MBCS_OUTPUT_2_SISO) {
++maxBytesPerUChar; /* SO + multiple DBCS */
@@ -1989,7 +1989,7 @@ U_CDECL_BEGIN
static const char* U_CALLCONV
ucnv_MBCSGetName(const UConverter *cnv) {
- if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0 && cnv->sharedData->mbcs.swapLFNLName!=NULL) {
+ if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0 && cnv->sharedData->mbcs.swapLFNLName!=nullptr) {
return cnv->sharedData->mbcs.swapLFNLName;
} else {
return cnv->sharedData->staticData->name;
@@ -2034,8 +2034,8 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t *offsets;
const int32_t (*stateTable)[256];
@@ -2043,7 +2043,7 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
int32_t sourceIndex;
int32_t entry;
- UChar c;
+ char16_t c;
uint8_t action;
/* set up the local pointers */
@@ -2085,8 +2085,8 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
/* test the most common case first */
if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
- if(offsets!=NULL) {
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
@@ -2105,14 +2105,14 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
) {
entry=MBCS_ENTRY_FINAL_VALUE(entry);
/* output surrogate pair */
- *target++=(UChar)(0xd800|(UChar)(entry>>10));
- if(offsets!=NULL) {
+ *target++=(char16_t)(0xd800|(char16_t)(entry>>10));
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
- c=(UChar)(0xdc00|(UChar)(entry&0x3ff));
+ c=(char16_t)(0xdc00|(char16_t)(entry&0x3ff));
if(target<targetLimit) {
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
@@ -2128,8 +2128,8 @@ ucnv_MBCSSingleToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
} else if(action==MBCS_STATE_FALLBACK_DIRECT_16) {
if(UCNV_TO_U_USE_FALLBACK(cnv)) {
/* output BMP code point */
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
- if(offsets!=NULL) {
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
@@ -2186,7 +2186,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit, *lastSource;
- UChar *target;
+ char16_t *target;
int32_t targetCapacity, length;
int32_t *offsets;
@@ -2216,7 +2216,7 @@ ucnv_MBCSSingleToBMPWithOffsets(UConverterToUnicodeArgs *pArgs,
lastSource=source;
/*
- * since the conversion here is 1:1 UChar:uint8_t, we need only one counter
+ * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
* for the minimum of the sourceLength and targetCapacity
*/
length=(int32_t)(sourceLimit-source);
@@ -2234,37 +2234,37 @@ unrolled:
loops=count=targetCapacity>>4;
do {
oredEntries=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
oredEntries|=entry=stateTable[0][*source++];
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
/* were all 16 entries really valid? */
if(!MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(oredEntries)) {
@@ -2277,7 +2277,7 @@ unrolled:
count=loops-count;
targetCapacity-=16*count;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
lastSource+=16*count;
while(count>0) {
*offsets++=sourceIndex++;
@@ -2310,7 +2310,7 @@ unrolled:
/* test the most common case first */
if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
--targetCapacity;
continue;
}
@@ -2323,7 +2323,7 @@ unrolled:
if(action==MBCS_STATE_FALLBACK_DIRECT_16) {
if(UCNV_TO_U_USE_FALLBACK(cnv)) {
/* output BMP code point */
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
--targetCapacity;
continue;
}
@@ -2338,7 +2338,7 @@ unrolled:
}
/* set offsets since the start or the last extension */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
int32_t count=(int32_t)(source-lastSource);
/* predecrement: do not set the offset for the callback-causing character */
@@ -2388,7 +2388,7 @@ unrolled:
}
/* set offsets since the start or the last callback */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
size_t count=source-lastSource;
while(count>0) {
*offsets++=sourceIndex++;
@@ -2411,13 +2411,13 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) {
if( !MBCS_ENTRY_IS_TRANSITION(entry) &&
MBCS_ENTRY_FINAL_ACTION(entry)!=MBCS_STATE_ILLEGAL
) {
- return TRUE;
+ return true;
}
entry=row[0x41];
if( !MBCS_ENTRY_IS_TRANSITION(entry) &&
MBCS_ENTRY_FINAL_ACTION(entry)!=MBCS_STATE_ILLEGAL
) {
- return TRUE;
+ return true;
}
/* Then test for final entries in this state. */
for(b=0; b<=0xff; ++b) {
@@ -2425,7 +2425,7 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) {
if( !MBCS_ENTRY_IS_TRANSITION(entry) &&
MBCS_ENTRY_FINAL_ACTION(entry)!=MBCS_STATE_ILLEGAL
) {
- return TRUE;
+ return true;
}
}
/* Then recurse for transition entries. */
@@ -2434,10 +2434,10 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) {
if( MBCS_ENTRY_IS_TRANSITION(entry) &&
hasValidTrailBytes(stateTable, (uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry))
) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*
@@ -2454,7 +2454,7 @@ isSingleOrLead(const int32_t (*stateTable)[256], uint8_t state, UBool isDBCSOnly
} else {
uint8_t action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry));
if(action==MBCS_STATE_CHANGE_ONLY && isDBCSOnly) {
- return FALSE; /* SI/SO are illegal for DBCS-only conversion */
+ return false; /* SI/SO are illegal for DBCS-only conversion */
} else {
return action!=MBCS_STATE_ILLEGAL;
}
@@ -2466,8 +2466,8 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t *offsets;
const int32_t (*stateTable)[256];
@@ -2481,7 +2481,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
int32_t sourceIndex, nextSourceIndex;
int32_t entry;
- UChar c;
+ char16_t c;
uint8_t action;
/* use optimized function if possible */
@@ -2558,7 +2558,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(byteIndex==0) {
/* optimized loop for 1/2-byte input and BMP output */
- if(offsets==NULL) {
+ if(offsets==nullptr) {
do {
entry=stateTable[state][*source];
if(MBCS_ENTRY_IS_TRANSITION(entry)) {
@@ -2585,7 +2585,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
++source;
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
state=(uint8_t)MBCS_ENTRY_FINAL_STATE(entry); /* typically 0 */
} else {
/* leave the optimized loop */
@@ -2593,7 +2593,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
}
}
} while(source<sourceLimit && target<targetLimit);
- } else /* offsets!=NULL */ {
+ } else /* offsets!=nullptr */ {
do {
entry=stateTable[state][*source];
if(MBCS_ENTRY_IS_TRANSITION(entry)) {
@@ -2608,7 +2608,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
) {
++source;
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=(nextSourceIndex+=2);
}
@@ -2625,8 +2625,8 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
++source;
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
- if(offsets!=NULL) {
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=++nextSourceIndex;
}
@@ -2682,15 +2682,15 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(c<0xfffe) {
/* output BMP code point */
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
} else if(c==0xfffe) {
if(UCNV_TO_U_USE_FALLBACK(cnv) && (entry=(int32_t)ucnv_MBCSGetFallback(&cnv->sharedData->mbcs, offset))!=0xfffe) {
/* output fallback BMP code point */
- *target++=(UChar)entry;
- if(offsets!=NULL) {
+ *target++=(char16_t)entry;
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
@@ -2701,8 +2701,8 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
}
} else if(action==MBCS_STATE_VALID_DIRECT_16) {
/* output BMP code point */
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
- if(offsets!=NULL) {
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
@@ -2712,20 +2712,20 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
if(c<0xd800) {
/* output BMP code point below 0xd800 */
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
} else if(UCNV_TO_U_USE_FALLBACK(cnv) ? c<=0xdfff : c<=0xdbff) {
/* output roundtrip or fallback surrogate pair */
- *target++=(UChar)(c&0xdbff);
- if(offsets!=NULL) {
+ *target++=(char16_t)(c&0xdbff);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
if(target<targetLimit) {
*target++=unicodeCodeUnits[offset];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
@@ -2740,7 +2740,7 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
} else if(UCNV_TO_U_USE_FALLBACK(cnv) ? (c&0xfffe)==0xe000 : c==0xe000) {
/* output roundtrip BMP code point above 0xd800 or fallback BMP code point */
*target++=unicodeCodeUnits[offset];
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
@@ -2753,15 +2753,15 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
) {
entry=MBCS_ENTRY_FINAL_VALUE(entry);
/* output surrogate pair */
- *target++=(UChar)(0xd800|(UChar)(entry>>10));
- if(offsets!=NULL) {
+ *target++=(char16_t)(0xd800|(char16_t)(entry>>10));
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
- c=(UChar)(0xdc00|(UChar)(entry&0x3ff));
+ c=(char16_t)(0xdc00|(char16_t)(entry&0x3ff));
if(target<targetLimit) {
*target++=c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
@@ -2793,8 +2793,8 @@ ucnv_MBCSToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
} else if(action==MBCS_STATE_FALLBACK_DIRECT_16) {
if(UCNV_TO_U_USE_FALLBACK(cnv)) {
/* output BMP code point */
- *target++=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
- if(offsets!=NULL) {
+ *target++=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
byteIndex=0;
@@ -2908,7 +2908,7 @@ ucnv_MBCSSingleGetNextUChar(UConverterToUnicodeArgs *pArgs,
if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
- return (UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ return (char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
}
/*
@@ -2924,7 +2924,7 @@ ucnv_MBCSSingleGetNextUChar(UConverterToUnicodeArgs *pArgs,
} else if(action==MBCS_STATE_FALLBACK_DIRECT_16) {
if(UCNV_TO_U_USE_FALLBACK(cnv)) {
/* output BMP code point */
- return (UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ return (char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
}
} else if(action==MBCS_STATE_UNASSIGNED) {
/* just fall through */
@@ -3054,7 +3054,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs,
action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry));
if(action==MBCS_STATE_VALID_DIRECT_16) {
/* output BMP code point */
- c=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
break;
} else if(action==MBCS_STATE_VALID_16) {
offset+=MBCS_ENTRY_FINAL_VALUE_16(entry);
@@ -3112,7 +3112,7 @@ ucnv_MBCSGetNextUChar(UConverterToUnicodeArgs *pArgs,
} else if(action==MBCS_STATE_FALLBACK_DIRECT_16) {
if(UCNV_TO_U_USE_FALLBACK(cnv)) {
/* output BMP code point */
- c=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
break;
}
} else if(action==MBCS_STATE_UNASSIGNED) {
@@ -3213,7 +3213,7 @@ ucnv_MBCSSingleSimpleGetNextUChar(UConverterSharedData *sharedData,
if(MBCS_ENTRY_FINAL_IS_VALID_DIRECT_16(entry)) {
/* output BMP code point */
- return (UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ return (char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
}
/*
@@ -3229,7 +3229,7 @@ ucnv_MBCSSingleSimpleGetNextUChar(UConverterSharedData *sharedData,
return 0xfffe;
}
/* output BMP code point */
- return (UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ return (char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
} else if(action==MBCS_STATE_FALLBACK_DIRECT_20) {
if(!TO_U_USE_FALLBACK(useFallback)) {
return 0xfffe;
@@ -3331,7 +3331,7 @@ ucnv_MBCSSimpleGetNextUChar(UConverterSharedData *sharedData,
break;
} else if(action==MBCS_STATE_VALID_DIRECT_16) {
/* output BMP code point */
- c=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
break;
} else if(action==MBCS_STATE_VALID_16_PAIR) {
offset+=MBCS_ENTRY_FINAL_VALUE_16(entry);
@@ -3360,7 +3360,7 @@ ucnv_MBCSSimpleGetNextUChar(UConverterSharedData *sharedData,
break;
}
/* output BMP code point */
- c=(UChar)MBCS_ENTRY_FINAL_VALUE_16(entry);
+ c=(char16_t)MBCS_ENTRY_FINAL_VALUE_16(entry);
break;
} else if(action==MBCS_STATE_FALLBACK_DIRECT_20) {
if(!TO_U_USE_FALLBACK(useFallback)) {
@@ -3391,7 +3391,7 @@ ucnv_MBCSSimpleGetNextUChar(UConverterSharedData *sharedData,
if(c==0xfffe) {
/* try an extension mapping */
const int32_t *cx=sharedData->mbcs.extIndexes;
- if(cx!=NULL) {
+ if(cx!=nullptr) {
return ucnv_extSimpleMatchToU(cx, source, length, useFallback);
}
}
@@ -3406,7 +3406,7 @@ static void
ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
int32_t *offsets;
@@ -3468,14 +3468,14 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
if(targetCapacity>0) {
/*
* Get a correct Unicode code point:
- * a single UChar for a BMP code point or
+ * a single char16_t for a BMP code point or
* a matched surrogate pair for a "supplementary code point".
*/
c=*source++;
++nextSourceIndex;
if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) {
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
sourceIndex=nextSourceIndex;
}
@@ -3506,7 +3506,7 @@ ucnv_MBCSDoubleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
++nextSourceIndex;
@@ -3585,7 +3585,7 @@ unassigned:
if(value<=0xff) {
/* this is easy because we know that there is enough space */
*target++=(uint8_t)value;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
@@ -3593,13 +3593,13 @@ unassigned:
*target++=(uint8_t)(value>>8);
if(2<=targetCapacity) {
*target++=(uint8_t)value;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
}
targetCapacity-=2;
} else {
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
cnv->charErrorBuffer[0]=(char)value;
@@ -3638,7 +3638,7 @@ static void
ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
int32_t *offsets;
@@ -3701,7 +3701,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
if(targetCapacity>0) {
/*
* Get a correct Unicode code point:
- * a single UChar for a BMP code point or
+ * a single char16_t for a BMP code point or
* a matched surrogate pair for a "supplementary code point".
*/
c=*source++;
@@ -3711,7 +3711,7 @@ ucnv_MBCSSingleFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
++nextSourceIndex;
@@ -3750,7 +3750,7 @@ getTrail:
/* length==1 */
/* this is easy because we know that there is enough space */
*target++=(uint8_t)value;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
@@ -3814,7 +3814,7 @@ static void
ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit, *lastSource;
+ const char16_t *source, *sourceLimit, *lastSource;
uint8_t *target;
int32_t targetCapacity, length;
int32_t *offsets;
@@ -3861,7 +3861,7 @@ ucnv_MBCSSingleFromBMPWithOffsets(UConverterFromUnicodeArgs *pArgs,
lastSource=source;
/*
- * since the conversion here is 1:1 UChar:uint8_t, we need only one counter
+ * since the conversion here is 1:1 char16_t:uint8_t, we need only one counter
* for the minimum of the sourceLength and targetCapacity
*/
length=(int32_t)(sourceLimit-source);
@@ -3908,7 +3908,7 @@ unrolled:
count=loops-count;
targetCapacity-=4*count;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
lastSource+=4*count;
while(count>0) {
*offsets++=sourceIndex++;
@@ -3926,7 +3926,7 @@ unrolled:
while(targetCapacity>0) {
/*
* Get a correct Unicode code point:
- * a single UChar for a BMP code point or
+ * a single char16_t for a BMP code point or
* a matched surrogate pair for a "supplementary code point".
*/
c=*source++;
@@ -3960,7 +3960,7 @@ unrolled:
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
c=U16_GET_SUPPLEMENTARY(c, trail);
@@ -3992,7 +3992,7 @@ getTrail:
length=U16_LENGTH(c);
/* set offsets since the start or the last extension */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
int32_t count=(int32_t)(source-lastSource);
/* do not set the offset for this character */
@@ -4042,7 +4042,7 @@ getTrail:
}
/* set offsets since the start or the last callback */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
size_t count=source-lastSource;
if (count > 0 && *pErrorCode == U_TRUNCATED_CHAR_FOUND) {
/*
@@ -4071,7 +4071,7 @@ U_CFUNC void
ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
int32_t *offsets;
@@ -4135,7 +4135,7 @@ ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
if(cnv->sharedData->mbcs.utf8Friendly) {
mbcsIndex=cnv->sharedData->mbcs.mbcsIndex;
} else {
- mbcsIndex=NULL;
+ mbcsIndex=nullptr;
}
if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0) {
bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
@@ -4197,14 +4197,14 @@ ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
if(targetCapacity>0) {
/*
* Get a correct Unicode code point:
- * a single UChar for a BMP code point or
+ * a single char16_t for a BMP code point or
* a matched surrogate pair for a "supplementary code point".
*/
c=*source++;
++nextSourceIndex;
if(c<=0x7f && IS_ASCII_ROUNDTRIP(c, asciiRoundtrips)) {
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
prevSourceIndex=sourceIndex;
sourceIndex=nextSourceIndex;
@@ -4218,7 +4218,7 @@ ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
* to avoid dealing with surrogates.
* MBCS_FAST_MAX must be >=0xd7ff.
*/
- if(c<=0xd7ff && mbcsIndex!=NULL) {
+ if(c<=0xd7ff && mbcsIndex!=nullptr) {
value=mbcsIndex[c>>6];
/* get the bytes and the length for the output (copied from below and adapted for utf8Friendly data) */
@@ -4390,7 +4390,7 @@ ucnv_MBCSFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
getTrail:
if(source<sourceLimit) {
/* test the following code unit */
- UChar trail=*source;
+ char16_t trail=*source;
if(U16_IS_TRAIL(trail)) {
++source;
++nextSourceIndex;
@@ -4628,7 +4628,7 @@ unassigned:
targetCapacity=(int32_t)(pArgs->targetLimit-(char *)target);
/* normal end of conversion: prepare for a new character */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
prevSourceIndex=sourceIndex;
sourceIndex=nextSourceIndex;
}
@@ -4640,7 +4640,7 @@ unassigned:
/* write the output character bytes from value and length */
/* from the first if in the loop we know that targetCapacity>0 */
if(length<=targetCapacity) {
- if(offsets==NULL) {
+ if(offsets==nullptr) {
switch(length) {
/* each branch falls through to the next one */
case 4:
@@ -4719,19 +4719,19 @@ unassigned:
/* each branch falls through to the next one */
case 3:
*target++=(uint8_t)(value>>16);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
case 2:
*target++=(uint8_t)(value>>8);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
case 1:
*target++=(uint8_t)value;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
@@ -4749,7 +4749,7 @@ unassigned:
/* normal end of conversion: prepare for a new character */
c=0;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
prevSourceIndex=sourceIndex;
sourceIndex=nextSourceIndex;
}
@@ -4787,7 +4787,7 @@ unassigned:
*target++=(uint8_t)siBytes[1];
}
}
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
/* set the last source character's index (sourceIndex points at sourceLimit now) */
*offsets++=prevSourceIndex;
}
@@ -4961,7 +4961,7 @@ ucnv_MBCSFromUChar32(UConverterSharedData *sharedData,
}
cx=sharedData->mbcs.extIndexes;
- if(cx!=NULL) {
+ if(cx!=nullptr) {
length=ucnv_extSimpleMatchFromU(cx, c, pValue, useFallback);
return length>=0 ? length : -length; /* return abs(length); */
}
@@ -5257,12 +5257,12 @@ moreBytes:
* If we have a partial match on c, we will return and revert
* to UTF-8->UTF-16->charset conversion.
*/
- static const UChar nul=0;
- const UChar *noSource=&nul;
+ static const char16_t nul=0;
+ const char16_t *noSource=&nul;
c=_extFromU(cnv, cnv->sharedData,
c, &noSource, noSource,
&target, target+targetCapacity,
- NULL, -1,
+ nullptr, -1,
pFromUArgs->flush,
pErrorCode);
@@ -5560,12 +5560,12 @@ unassigned:
* If we have a partial match on c, we will return and revert
* to UTF-8->UTF-16->charset conversion.
*/
- static const UChar nul=0;
- const UChar *noSource=&nul;
+ static const char16_t nul=0;
+ const char16_t *noSource=&nul;
c=_extFromU(cnv, cnv->sharedData,
c, &noSource, noSource,
&target, target+targetCapacity,
- NULL, -1,
+ nullptr, -1,
pFromUArgs->flush,
pErrorCode);
@@ -5658,7 +5658,7 @@ ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs,
/* first, select between subChar and subChar1 */
if( cnv->subChar1!=0 &&
- (cnv->sharedData->mbcs.extIndexes!=NULL ?
+ (cnv->sharedData->mbcs.extIndexes!=nullptr ?
cnv->useSubChar1 :
(cnv->invalidUCharBuffer[0]<=0xff))
) {
@@ -5672,7 +5672,7 @@ ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs,
}
/* reset the selector for the next code point */
- cnv->useSubChar1=FALSE;
+ cnv->useSubChar1=false;
if (cnv->sharedData->mbcs.outputType == MBCS_OUTPUT_2_SISO) {
p=buffer;
diff --git a/contrib/libs/icu/common/ucnvscsu.cpp b/contrib/libs/icu/common/ucnvscsu.cpp
index 7b580291e1d..2138e289cad 100644
--- a/contrib/libs/icu/common/ucnvscsu.cpp
+++ b/contrib/libs/icu/common/ucnvscsu.cpp
@@ -163,7 +163,7 @@ _SCSUReset(UConverter *cnv, UConverterResetChoice choice) {
/* reset toUnicode */
uprv_memcpy(scsu->toUDynamicOffsets, initialDynamicOffsets, 32);
- scsu->toUIsSingleByteMode=TRUE;
+ scsu->toUIsSingleByteMode=true;
scsu->toUState=readCommand;
scsu->toUQuoteWindow=scsu->toUDynamicWindow=0;
scsu->toUByteOne=0;
@@ -174,7 +174,7 @@ _SCSUReset(UConverter *cnv, UConverterResetChoice choice) {
/* reset fromUnicode */
uprv_memcpy(scsu->fromUDynamicOffsets, initialDynamicOffsets, 32);
- scsu->fromUIsSingleByteMode=TRUE;
+ scsu->fromUIsSingleByteMode=true;
scsu->fromUDynamicWindow=0;
scsu->nextWindowUseIndex=0;
@@ -200,8 +200,8 @@ _SCSUOpen(UConverter *cnv,
return;
}
cnv->extraInfo=uprv_malloc(sizeof(SCSUData));
- if(cnv->extraInfo!=NULL) {
- if(locale!=NULL && locale[0]=='j' && locale[1]=='a' && (locale[2]==0 || locale[2]=='_')) {
+ if(cnv->extraInfo!=nullptr) {
+ if(locale!=nullptr && locale[0]=='j' && locale[1]=='a' && (locale[2]==0 || locale[2]=='_')) {
((SCSUData *)cnv->extraInfo)->locale=l_ja;
} else {
((SCSUData *)cnv->extraInfo)->locale=lGeneric;
@@ -218,11 +218,11 @@ _SCSUOpen(UConverter *cnv,
static void U_CALLCONV
_SCSUClose(UConverter *cnv) {
- if(cnv->extraInfo!=NULL) {
+ if(cnv->extraInfo!=nullptr) {
if(!cnv->isExtraLocal) {
uprv_free(cnv->extraInfo);
}
- cnv->extraInfo=NULL;
+ cnv->extraInfo=nullptr;
}
}
@@ -234,8 +234,8 @@ _SCSUToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs,
UConverter *cnv;
SCSUData *scsu;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
int32_t *offsets;
UBool isSingleByteMode;
uint8_t state, byteOne;
@@ -294,33 +294,33 @@ fastSingle:
++nextSourceIndex;
if(b<=0x7f) {
/* write US-ASCII graphic character or DEL */
- *target++=(UChar)b;
- if(offsets!=NULL) {
+ *target++=(char16_t)b;
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
/* write from dynamic window */
uint32_t c=scsu->toUDynamicOffsets[dynamicWindow]+(b&0x7f);
if(c<=0xffff) {
- *target++=(UChar)c;
- if(offsets!=NULL) {
+ *target++=(char16_t)c;
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
/* output surrogate pair */
- *target++=(UChar)(0xd7c0+(c>>10));
+ *target++=(char16_t)(0xd7c0+(c>>10));
if(target<targetLimit) {
- *target++=(UChar)(0xdc00|(c&0x3ff));
- if(offsets!=NULL) {
+ *target++=(char16_t)(0xdc00|(c&0x3ff));
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
}
} else {
/* target overflow */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
- cnv->UCharErrorBuffer[0]=(UChar)(0xdc00|(c&0x3ff));
+ cnv->UCharErrorBuffer[0]=(char16_t)(0xdc00|(c&0x3ff));
cnv->UCharErrorBufferLength=1;
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
goto endloop;
@@ -347,8 +347,8 @@ singleByteMode:
/* here: b<0x20 because otherwise we would be in fastSingle */
if((1UL<<b)&0x2601 /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */) {
/* CR/LF/TAB/NUL */
- *target++=(UChar)b;
- if(offsets!=NULL) {
+ *target++=(char16_t)b;
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
sourceIndex=nextSourceIndex;
@@ -371,7 +371,7 @@ singleByteMode:
state=quotePairOne;
} else if(b==SCU) {
sourceIndex=nextSourceIndex;
- isSingleByteMode=FALSE;
+ isSingleByteMode=false;
goto fastUnicode;
} else /* Srs */ {
/* callback(illegal) */
@@ -392,8 +392,8 @@ singleByteMode:
state=quotePairTwo;
break;
case quotePairTwo:
- *target++=(UChar)((byteOne<<8)|b);
- if(offsets!=NULL) {
+ *target++=(char16_t)((byteOne<<8)|b);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
sourceIndex=nextSourceIndex;
@@ -402,33 +402,33 @@ singleByteMode:
case quoteOne:
if(b<0x80) {
/* all static offsets are in the BMP */
- *target++=(UChar)(staticOffsets[quoteWindow]+b);
- if(offsets!=NULL) {
+ *target++=(char16_t)(staticOffsets[quoteWindow]+b);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
/* write from dynamic window */
uint32_t c=scsu->toUDynamicOffsets[quoteWindow]+(b&0x7f);
if(c<=0xffff) {
- *target++=(UChar)c;
- if(offsets!=NULL) {
+ *target++=(char16_t)c;
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
} else {
/* output surrogate pair */
- *target++=(UChar)(0xd7c0+(c>>10));
+ *target++=(char16_t)(0xd7c0+(c>>10));
if(target<targetLimit) {
- *target++=(UChar)(0xdc00|(c&0x3ff));
- if(offsets!=NULL) {
+ *target++=(char16_t)(0xdc00|(c&0x3ff));
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
}
} else {
/* target overflow */
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
- cnv->UCharErrorBuffer[0]=(UChar)(0xdc00|(c&0x3ff));
+ cnv->UCharErrorBuffer[0]=(char16_t)(0xdc00|(c&0x3ff));
cnv->UCharErrorBufferLength=1;
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
goto endloop;
@@ -478,8 +478,8 @@ singleByteMode:
if(state==readCommand) {
fastUnicode:
while(source+1<sourceLimit && target<targetLimit && (uint8_t)((b=*source)-UC0)>(Urs-UC0)) {
- *target++=(UChar)((b<<8)|source[1]);
- if(offsets!=NULL) {
+ *target++=(char16_t)((b<<8)|source[1]);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
sourceIndex=nextSourceIndex;
@@ -508,17 +508,17 @@ fastUnicode:
} else if(/* UC0<=b && */ b<=UC7) {
dynamicWindow=(int8_t)(b-UC0);
sourceIndex=nextSourceIndex;
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
goto fastSingle;
} else if(/* UD0<=b && */ b<=UD7) {
dynamicWindow=(int8_t)(b-UD0);
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
cnv->toUBytes[0]=b;
cnv->toULength=1;
state=defineOne;
goto singleByteMode;
} else if(b==UDX) {
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
cnv->toUBytes[0]=b;
cnv->toULength=1;
state=definePairOne;
@@ -542,8 +542,8 @@ fastUnicode:
state=quotePairTwo;
break;
case quotePairTwo:
- *target++=(UChar)((byteOne<<8)|b);
- if(offsets!=NULL) {
+ *target++=(char16_t)((byteOne<<8)|b);
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
sourceIndex=nextSourceIndex;
@@ -588,8 +588,8 @@ _SCSUToUnicode(UConverterToUnicodeArgs *pArgs,
UConverter *cnv;
SCSUData *scsu;
const uint8_t *source, *sourceLimit;
- UChar *target;
- const UChar *targetLimit;
+ char16_t *target;
+ const char16_t *targetLimit;
UBool isSingleByteMode;
uint8_t state, byteOne;
int8_t quoteWindow, dynamicWindow;
@@ -639,20 +639,20 @@ fastSingle:
++source;
if(b<=0x7f) {
/* write US-ASCII graphic character or DEL */
- *target++=(UChar)b;
+ *target++=(char16_t)b;
} else {
/* write from dynamic window */
uint32_t c=scsu->toUDynamicOffsets[dynamicWindow]+(b&0x7f);
if(c<=0xffff) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
} else {
/* output surrogate pair */
- *target++=(UChar)(0xd7c0+(c>>10));
+ *target++=(char16_t)(0xd7c0+(c>>10));
if(target<targetLimit) {
- *target++=(UChar)(0xdc00|(c&0x3ff));
+ *target++=(char16_t)(0xdc00|(c&0x3ff));
} else {
/* target overflow */
- cnv->UCharErrorBuffer[0]=(UChar)(0xdc00|(c&0x3ff));
+ cnv->UCharErrorBuffer[0]=(char16_t)(0xdc00|(c&0x3ff));
cnv->UCharErrorBufferLength=1;
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
goto endloop;
@@ -677,7 +677,7 @@ singleByteMode:
/* here: b<0x20 because otherwise we would be in fastSingle */
if((1UL<<b)&0x2601 /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */) {
/* CR/LF/TAB/NUL */
- *target++=(UChar)b;
+ *target++=(char16_t)b;
goto fastSingle;
} else if(SC0<=b) {
if(b<=SC7) {
@@ -695,7 +695,7 @@ singleByteMode:
} else if(b==SQU) {
state=quotePairOne;
} else if(b==SCU) {
- isSingleByteMode=FALSE;
+ isSingleByteMode=false;
goto fastUnicode;
} else /* Srs */ {
/* callback(illegal) */
@@ -716,26 +716,26 @@ singleByteMode:
state=quotePairTwo;
break;
case quotePairTwo:
- *target++=(UChar)((byteOne<<8)|b);
+ *target++=(char16_t)((byteOne<<8)|b);
state=readCommand;
goto fastSingle;
case quoteOne:
if(b<0x80) {
/* all static offsets are in the BMP */
- *target++=(UChar)(staticOffsets[quoteWindow]+b);
+ *target++=(char16_t)(staticOffsets[quoteWindow]+b);
} else {
/* write from dynamic window */
uint32_t c=scsu->toUDynamicOffsets[quoteWindow]+(b&0x7f);
if(c<=0xffff) {
- *target++=(UChar)c;
+ *target++=(char16_t)c;
} else {
/* output surrogate pair */
- *target++=(UChar)(0xd7c0+(c>>10));
+ *target++=(char16_t)(0xd7c0+(c>>10));
if(target<targetLimit) {
- *target++=(UChar)(0xdc00|(c&0x3ff));
+ *target++=(char16_t)(0xdc00|(c&0x3ff));
} else {
/* target overflow */
- cnv->UCharErrorBuffer[0]=(UChar)(0xdc00|(c&0x3ff));
+ cnv->UCharErrorBuffer[0]=(char16_t)(0xdc00|(c&0x3ff));
cnv->UCharErrorBufferLength=1;
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
goto endloop;
@@ -782,7 +782,7 @@ singleByteMode:
if(state==readCommand) {
fastUnicode:
while(source+1<sourceLimit && target<targetLimit && (uint8_t)((b=*source)-UC0)>(Urs-UC0)) {
- *target++=(UChar)((b<<8)|source[1]);
+ *target++=(char16_t)((b<<8)|source[1]);
source+=2;
}
}
@@ -805,17 +805,17 @@ fastUnicode:
state=quotePairTwo;
} else if(/* UC0<=b && */ b<=UC7) {
dynamicWindow=(int8_t)(b-UC0);
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
goto fastSingle;
} else if(/* UD0<=b && */ b<=UD7) {
dynamicWindow=(int8_t)(b-UD0);
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
cnv->toUBytes[0]=b;
cnv->toULength=1;
state=defineOne;
goto singleByteMode;
} else if(b==UDX) {
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
cnv->toUBytes[0]=b;
cnv->toULength=1;
state=definePairOne;
@@ -839,7 +839,7 @@ fastUnicode:
state=quotePairTwo;
break;
case quotePairTwo:
- *target++=(UChar)((byteOne<<8)|b);
+ *target++=(char16_t)((byteOne<<8)|b);
state=readCommand;
goto fastUnicode;
}
@@ -1012,7 +1012,7 @@ _SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
SCSUData *scsu;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
int32_t *offsets;
@@ -1029,7 +1029,7 @@ _SCSUFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
/* variables for compression heuristics */
uint32_t offset;
- UChar lead, trail;
+ char16_t lead, trail;
int code;
int8_t window;
@@ -1076,7 +1076,7 @@ loop:
if((c-0x20)<=0x5f) {
/* pass US-ASCII graphic character through */
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
@@ -1084,7 +1084,7 @@ loop:
if((1UL<<c)&0x2601 /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */) {
/* CR/LF/TAB/NUL */
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
@@ -1097,14 +1097,14 @@ loop:
} else if((delta=c-currentOffset)<=0x7f) {
/* use the current dynamic window */
*target++=(uint8_t)(delta|0x80);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
} else if(U16_IS_SURROGATE(c)) {
if(U16_IS_SURROGATE_LEAD(c)) {
getTrailSingle:
- lead=(UChar)c;
+ lead=(char16_t)c;
if(source<sourceLimit) {
/* test the following code unit */
trail=*source;
@@ -1135,7 +1135,7 @@ getTrailSingle:
if((delta=c-currentOffset)<=0x7f) {
/* use the current dynamic window */
*target++=(uint8_t)(delta|0x80);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
@@ -1159,9 +1159,9 @@ getTrailSingle:
goto outputBytes;
} else {
/* change to Unicode mode and output this (lead, trail) pair */
- isSingleByteMode=FALSE;
+ isSingleByteMode=false;
*target++=(uint8_t)SCU;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
@@ -1218,7 +1218,7 @@ getTrailSingle:
* switch to Unicode mode if this is the last character in the block
* or there is at least one more ideograph following immediately
*/
- isSingleByteMode=FALSE;
+ isSingleByteMode=false;
c|=SCU<<16;
length=3;
goto outputBytes;
@@ -1255,7 +1255,7 @@ getTrailSingle:
if(targetCapacity>=2) {
*target++=(uint8_t)(c>>8);
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
}
@@ -1269,13 +1269,13 @@ getTrailSingle:
if(!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400))) {
if(((uint32_t)(c-0x30)<10 || (uint32_t)(c-0x61)<26 || (uint32_t)(c-0x41)<26)) {
/* ASCII digit or letter */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
c|=((uint32_t)(UC0+dynamicWindow)<<8)|c;
length=2;
goto outputBytes;
} else if((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) {
/* there is a dynamic window that contains this character, change to it */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
dynamicWindow=window;
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(scsu, dynamicWindow);
@@ -1284,7 +1284,7 @@ getTrailSingle:
goto outputBytes;
} else if((code=getDynamicOffset(c, &offset))>=0) {
/* define a dynamic window with this character */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
@@ -1301,7 +1301,7 @@ getTrailSingle:
/* c is a surrogate */
if(U16_IS_SURROGATE_LEAD(c)) {
getTrailUnicode:
- lead=(UChar)c;
+ lead=(char16_t)c;
if(source<sourceLimit) {
/* test the following code unit */
trail=*source;
@@ -1337,7 +1337,7 @@ getTrailUnicode:
* the following character is not uncompressible,
* change to the window
*/
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
dynamicWindow=window;
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(scsu, dynamicWindow);
@@ -1348,7 +1348,7 @@ getTrailUnicode:
(code=getDynamicOffset(c, &offset))>=0
) {
/* two supplementary characters in (probably) the same window - define an extended one */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
code-=0x200;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
@@ -1392,7 +1392,7 @@ outputBytes:
/* write the output character bytes from c and length [code copied from ucnvmbcs.c] */
/* from the first if in the loop we know that targetCapacity>0 */
if(length<=targetCapacity) {
- if(offsets==NULL) {
+ if(offsets==nullptr) {
switch(length) {
/* each branch falls through to the next one */
case 4:
@@ -1480,19 +1480,19 @@ outputBytes:
/* each branch falls through to the next one */
case 3:
*target++=(uint8_t)(c>>16);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
case 2:
*target++=(uint8_t)(c>>8);
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
case 1:
*target++=(uint8_t)c;
- if(offsets!=NULL) {
+ if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
@@ -1520,7 +1520,7 @@ _SCSUFromUnicode(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
SCSUData *scsu;
- const UChar *source, *sourceLimit;
+ const char16_t *source, *sourceLimit;
uint8_t *target;
int32_t targetCapacity;
@@ -1534,7 +1534,7 @@ _SCSUFromUnicode(UConverterFromUnicodeArgs *pArgs,
/* variables for compression heuristics */
uint32_t offset;
- UChar lead, trail;
+ char16_t lead, trail;
int code;
int8_t window;
@@ -1594,7 +1594,7 @@ loop:
} else if(U16_IS_SURROGATE(c)) {
if(U16_IS_SURROGATE_LEAD(c)) {
getTrailSingle:
- lead=(UChar)c;
+ lead=(char16_t)c;
if(source<sourceLimit) {
/* test the following code unit */
trail=*source;
@@ -1645,7 +1645,7 @@ getTrailSingle:
goto outputBytes;
} else {
/* change to Unicode mode and output this (lead, trail) pair */
- isSingleByteMode=FALSE;
+ isSingleByteMode=false;
*target++=(uint8_t)SCU;
--targetCapacity;
c=((uint32_t)lead<<16)|trail;
@@ -1701,7 +1701,7 @@ getTrailSingle:
* switch to Unicode mode if this is the last character in the block
* or there is at least one more ideograph following immediately
*/
- isSingleByteMode=FALSE;
+ isSingleByteMode=false;
c|=SCU<<16;
length=3;
goto outputBytes;
@@ -1746,13 +1746,13 @@ getTrailSingle:
if(!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400))) {
if(((uint32_t)(c-0x30)<10 || (uint32_t)(c-0x61)<26 || (uint32_t)(c-0x41)<26)) {
/* ASCII digit or letter */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
c|=((uint32_t)(UC0+dynamicWindow)<<8)|c;
length=2;
goto outputBytes;
} else if((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) {
/* there is a dynamic window that contains this character, change to it */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
dynamicWindow=window;
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(scsu, dynamicWindow);
@@ -1761,7 +1761,7 @@ getTrailSingle:
goto outputBytes;
} else if((code=getDynamicOffset(c, &offset))>=0) {
/* define a dynamic window with this character */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
@@ -1778,7 +1778,7 @@ getTrailSingle:
/* c is a surrogate */
if(U16_IS_SURROGATE_LEAD(c)) {
getTrailUnicode:
- lead=(UChar)c;
+ lead=(char16_t)c;
if(source<sourceLimit) {
/* test the following code unit */
trail=*source;
@@ -1813,7 +1813,7 @@ getTrailUnicode:
* the following character is not uncompressible,
* change to the window
*/
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
dynamicWindow=window;
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(scsu, dynamicWindow);
@@ -1824,7 +1824,7 @@ getTrailUnicode:
(code=getDynamicOffset(c, &offset))>=0
) {
/* two supplementary characters in (probably) the same window - define an extended one */
- isSingleByteMode=TRUE;
+ isSingleByteMode=true;
code-=0x200;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
@@ -1923,7 +1923,7 @@ outputBytes:
cnv->charErrorBufferLength=(int8_t)length;
/* now output what fits into the regular target */
- c>>=8*length; /* length was reduced by targetCapacity */
+ c = (length == 4) ? 0 : c >> 8*length; /* length was reduced by targetCapacity */
switch(targetCapacity) {
/* each branch falls through to the next one */
case 3:
@@ -1991,7 +1991,7 @@ _SCSUSafeClone(const UConverter *cnv,
uprv_memcpy(&localClone->mydata, cnv->extraInfo, sizeof(SCSUData));
localClone->cnv.extraInfo = &localClone->mydata;
- localClone->cnv.isExtraLocal = TRUE;
+ localClone->cnv.isExtraLocal = true;
return &localClone->cnv;
}
@@ -2000,8 +2000,8 @@ U_CDECL_END
static const UConverterImpl _SCSUImpl={
UCNV_SCSU,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
_SCSUOpen,
_SCSUClose,
@@ -2011,15 +2011,15 @@ static const UConverterImpl _SCSUImpl={
_SCSUToUnicodeWithOffsets,
_SCSUFromUnicode,
_SCSUFromUnicodeWithOffsets,
- NULL,
+ nullptr,
- NULL,
+ nullptr,
_SCSUGetName,
- NULL,
+ nullptr,
_SCSUSafeClone,
ucnv_getCompleteUnicodeSet,
- NULL,
- NULL
+ nullptr,
+ nullptr
};
static const UConverterStaticData _SCSUStaticData={
@@ -2027,13 +2027,13 @@ static const UConverterStaticData _SCSUStaticData={
"SCSU",
1212, /* CCSID for SCSU */
UCNV_IBM, UCNV_SCSU,
- 1, 3, /* one UChar generates at least 1 byte and at most 3 bytes */
+ 1, 3, /* one char16_t generates at least 1 byte and at most 3 bytes */
/*
* The subchar here is ignored because _SCSUOpen() sets U+fffd as a Unicode
* substitution string.
*/
{ 0x0e, 0xff, 0xfd, 0 }, 3,
- FALSE, FALSE,
+ false, false,
0,
0,
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/contrib/libs/icu/common/ucnvsel.cpp b/contrib/libs/icu/common/ucnvsel.cpp
index 2dff5ac1bc8..a286646395b 100644
--- a/contrib/libs/icu/common/ucnvsel.cpp
+++ b/contrib/libs/icu/common/ucnvsel.cpp
@@ -104,7 +104,7 @@ static void generateSelectorData(UConverterSelector* result,
UChar32 start_char;
UChar32 end_char;
UErrorCode smallStatus = U_ZERO_ERROR;
- uset_getItem(unicode_point_set, j, &start_char, &end_char, NULL, 0,
+ uset_getItem(unicode_point_set, j, &start_char, &end_char, nullptr, 0,
&smallStatus);
if (U_FAILURE(smallStatus)) {
// this will be reached for the converters that fill the set with
@@ -128,7 +128,7 @@ static void generateSelectorData(UConverterSelector* result,
UChar32 start_char;
UChar32 end_char;
- uset_getItem(excludedCodePoints, j, &start_char, &end_char, NULL, 0,
+ uset_getItem(excludedCodePoints, j, &start_char, &end_char, nullptr, 0,
status);
for (int32_t col = 0; col < columns; col++) {
upvec_setValue(upvec, start_char, end_char, col, static_cast<uint32_t>(~0), static_cast<uint32_t>(~0),
@@ -140,25 +140,25 @@ static void generateSelectorData(UConverterSelector* result,
// alright. Now, let's put things in the same exact form you'd get when you
// unserialize things.
result->trie = upvec_compactToUTrie2WithRowIndexes(upvec, status);
- result->pv = upvec_cloneArray(upvec, &result->pvCount, NULL, status);
+ result->pv = upvec_cloneArray(upvec, &result->pvCount, nullptr, status);
result->pvCount *= columns; // number of uint32_t = rows * columns
- result->ownPv = TRUE;
+ result->ownPv = true;
}
/* open a selector. If converterListSize is 0, build for all converters.
- If excludedCodePoints is NULL, don't exclude any codepoints */
+ If excludedCodePoints is nullptr, don't exclude any codepoints */
U_CAPI UConverterSelector* U_EXPORT2
ucnvsel_open(const char* const* converterList, int32_t converterListSize,
const USet* excludedCodePoints,
const UConverterUnicodeSet whichSet, UErrorCode* status) {
// check if already failed
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
// ensure args make sense!
- if (converterListSize < 0 || (converterList == NULL && converterListSize != 0)) {
+ if (converterListSize < 0 || (converterList == nullptr && converterListSize != 0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
// allocate a new converter
@@ -166,28 +166,28 @@ ucnvsel_open(const char* const* converterList, int32_t converterListSize,
(UConverterSelector*)uprv_malloc(sizeof(UConverterSelector)));
if (newSelector.isNull()) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(newSelector.getAlias(), 0, sizeof(UConverterSelector));
if (converterListSize == 0) {
- converterList = NULL;
+ converterList = nullptr;
converterListSize = ucnv_countAvailable();
}
newSelector->encodings =
(char**)uprv_malloc(converterListSize * sizeof(char*));
if (!newSelector->encodings) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- newSelector->encodings[0] = NULL; // now we can call ucnvsel_close()
+ newSelector->encodings[0] = nullptr; // now we can call ucnvsel_close()
// make a backup copy of the list of converters
int32_t totalSize = 0;
int32_t i;
for (i = 0; i < converterListSize; i++) {
totalSize +=
- (int32_t)uprv_strlen(converterList != NULL ? converterList[i] : ucnv_getAvailableName(i)) + 1;
+ (int32_t)uprv_strlen(converterList != nullptr ? converterList[i] : ucnv_getAvailableName(i)) + 1;
}
// 4-align the totalSize to 4-align the size of the serialized form
int32_t encodingStrPadding = totalSize & 3;
@@ -198,13 +198,13 @@ ucnvsel_open(const char* const* converterList, int32_t converterListSize,
char* allStrings = (char*) uprv_malloc(totalSize);
if (!allStrings) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
for (i = 0; i < converterListSize; i++) {
newSelector->encodings[i] = allStrings;
uprv_strcpy(newSelector->encodings[i],
- converterList != NULL ? converterList[i] : ucnv_getAvailableName(i));
+ converterList != nullptr ? converterList[i] : ucnv_getAvailableName(i));
allStrings += uprv_strlen(newSelector->encodings[i]) + 1;
}
while (encodingStrPadding > 0) {
@@ -212,14 +212,14 @@ ucnvsel_open(const char* const* converterList, int32_t converterListSize,
--encodingStrPadding;
}
- newSelector->ownEncodingStrings = TRUE;
+ newSelector->ownEncodingStrings = true;
newSelector->encodingsCount = converterListSize;
UPropsVectors *upvec = upvec_open((converterListSize+31)/32, status);
generateSelectorData(newSelector.getAlias(), upvec, excludedCodePoints, whichSet, status);
upvec_close(upvec);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return newSelector.orphan();
@@ -289,13 +289,13 @@ ucnvsel_serialize(const UConverterSelector* sel,
// ensure args make sense!
uint8_t *p = (uint8_t *)buffer;
if (bufferCapacity < 0 ||
- (bufferCapacity > 0 && (p == NULL || (U_POINTER_MASK_LSB(p, 3) != 0)))
+ (bufferCapacity > 0 && (p == nullptr || (U_POINTER_MASK_LSB(p, 3) != 0)))
) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
// add up the size of the serialized form
- int32_t serializedTrieSize = utrie2_serialize(sel->trie, NULL, 0, status);
+ int32_t serializedTrieSize = utrie2_serialize(sel->trie, nullptr, 0, status);
if (*status != U_BUFFER_OVERFLOW_ERROR && U_FAILURE(*status)) {
return 0;
}
@@ -466,21 +466,21 @@ U_CAPI UConverterSelector* U_EXPORT2
ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status) {
// check if already failed
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
// ensure args make sense!
const uint8_t *p = (const uint8_t *)buffer;
if (length <= 0 ||
- (length > 0 && (p == NULL || (U_POINTER_MASK_LSB(p, 3) != 0)))
+ (length > 0 && (p == nullptr || (U_POINTER_MASK_LSB(p, 3) != 0)))
) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
// header
if (length < 32) {
// not even enough space for a minimal header
*status = U_INDEX_OUTOFBOUNDS_ERROR;
- return NULL;
+ return nullptr;
}
const DataHeader *pHeader = (const DataHeader *)p;
if (!(
@@ -493,40 +493,40 @@ ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* statu
)) {
/* header not valid or dataFormat not recognized */
*status = U_INVALID_FORMAT_ERROR;
- return NULL;
+ return nullptr;
}
if (pHeader->info.formatVersion[0] != 1) {
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
- uint8_t* swapped = NULL;
+ uint8_t* swapped = nullptr;
if (pHeader->info.isBigEndian != U_IS_BIG_ENDIAN ||
pHeader->info.charsetFamily != U_CHARSET_FAMILY
) {
// swap the data
UDataSwapper *ds =
udata_openSwapperForInputData(p, length, U_IS_BIG_ENDIAN, U_CHARSET_FAMILY, status);
- int32_t totalSize = ucnvsel_swap(ds, p, -1, NULL, status);
+ int32_t totalSize = ucnvsel_swap(ds, p, -1, nullptr, status);
if (U_FAILURE(*status)) {
udata_closeSwapper(ds);
- return NULL;
+ return nullptr;
}
if (length < totalSize) {
udata_closeSwapper(ds);
*status = U_INDEX_OUTOFBOUNDS_ERROR;
- return NULL;
+ return nullptr;
}
swapped = (uint8_t*)uprv_malloc(totalSize);
- if (swapped == NULL) {
+ if (swapped == nullptr) {
udata_closeSwapper(ds);
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
ucnvsel_swap(ds, p, length, swapped, status);
udata_closeSwapper(ds);
if (U_FAILURE(*status)) {
uprv_free(swapped);
- return NULL;
+ return nullptr;
}
p = swapped;
pHeader = (const DataHeader *)p;
@@ -535,7 +535,7 @@ ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* statu
// not even enough space for the header and the indexes
uprv_free(swapped);
*status = U_INDEX_OUTOFBOUNDS_ERROR;
- return NULL;
+ return nullptr;
}
p += pHeader->dataHeader.headerSize;
length -= pHeader->dataHeader.headerSize;
@@ -544,7 +544,7 @@ ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* statu
if (length < indexes[UCNVSEL_INDEX_SIZE]) {
uprv_free(swapped);
*status = U_INDEX_OUTOFBOUNDS_ERROR;
- return NULL;
+ return nullptr;
}
p += UCNVSEL_INDEX_COUNT * 4;
// create and populate the selector object
@@ -552,12 +552,12 @@ ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* statu
char **encodings =
(char **)uprv_malloc(
indexes[UCNVSEL_INDEX_NAMES_COUNT] * sizeof(char *));
- if (sel == NULL || encodings == NULL) {
+ if (sel == nullptr || encodings == nullptr) {
uprv_free(swapped);
uprv_free(sel);
uprv_free(encodings);
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(sel, 0, sizeof(UConverterSelector));
sel->pvCount = indexes[UCNVSEL_INDEX_PV_COUNT];
@@ -567,12 +567,12 @@ ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* statu
sel->swapped = swapped;
// trie
sel->trie = utrie2_openFromSerialized(UTRIE2_16_VALUE_BITS,
- p, indexes[UCNVSEL_INDEX_TRIE_SIZE], NULL,
+ p, indexes[UCNVSEL_INDEX_TRIE_SIZE], nullptr,
status);
p += indexes[UCNVSEL_INDEX_TRIE_SIZE];
if (U_FAILURE(*status)) {
ucnvsel_close(sel);
- return NULL;
+ return nullptr;
}
// bit vectors
sel->pv = (uint32_t *)p;
@@ -622,14 +622,14 @@ static const char* U_CALLCONV ucnvsel_next_encoding(UEnumeration* enumerator,
UErrorCode* status) {
// check if already failed
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
int16_t cur = ((Enumerator*)(enumerator->context))->cur;
const UConverterSelector* sel;
const char* result;
if (cur >= ((Enumerator*)(enumerator->context))->length) {
- return NULL;
+ return nullptr;
}
sel = ((Enumerator*)(enumerator->context))->sel;
result = sel->encodings[((Enumerator*)(enumerator->context))->index[cur] ];
@@ -653,8 +653,8 @@ U_CDECL_END
static const UEnumeration defaultEncodings = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucnvsel_close_selector_iterator,
ucnvsel_count_encodings,
uenum_unextDefault,
@@ -732,7 +732,7 @@ static UEnumeration *selectForMask(const UConverterSelector* sel,
v >>= 1;
}
}
- } //otherwise, index will remain NULL (and will never be touched by
+ } //otherwise, index will remain nullptr (and will never be touched by
//the enumerator code anyway)
en->context = result.orphan();
return en.orphan();
@@ -741,34 +741,34 @@ static UEnumeration *selectForMask(const UConverterSelector* sel,
/* check a string against the selector - UTF16 version */
U_CAPI UEnumeration * U_EXPORT2
ucnvsel_selectForString(const UConverterSelector* sel,
- const UChar *s, int32_t length, UErrorCode *status) {
+ const char16_t *s, int32_t length, UErrorCode *status) {
// check if already failed
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
// ensure args make sense!
- if (sel == NULL || (s == NULL && length != 0)) {
+ if (sel == nullptr || (s == nullptr && length != 0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
int32_t columns = (sel->encodingsCount+31)/32;
uint32_t* mask = (uint32_t*) uprv_malloc(columns * 4);
- if (mask == NULL) {
+ if (mask == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(mask, ~0, columns *4);
- if(s!=NULL) {
- const UChar *limit;
+ if(s!=nullptr) {
+ const char16_t *limit;
if (length >= 0) {
limit = s + length;
} else {
- limit = NULL;
+ limit = nullptr;
}
- while (limit == NULL ? *s != 0 : s != limit) {
+ while (limit == nullptr ? *s != 0 : s != limit) {
UChar32 c;
uint16_t pvIndex;
UTRIE2_U16_NEXT16(sel->trie, s, limit, c, pvIndex);
@@ -786,19 +786,19 @@ ucnvsel_selectForUTF8(const UConverterSelector* sel,
const char *s, int32_t length, UErrorCode *status) {
// check if already failed
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
// ensure args make sense!
- if (sel == NULL || (s == NULL && length != 0)) {
+ if (sel == nullptr || (s == nullptr && length != 0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
int32_t columns = (sel->encodingsCount+31)/32;
uint32_t* mask = (uint32_t*) uprv_malloc(columns * 4);
- if (mask == NULL) {
+ if (mask == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(mask, ~0, columns *4);
@@ -806,7 +806,7 @@ ucnvsel_selectForUTF8(const UConverterSelector* sel,
length = (int32_t)uprv_strlen(s);
}
- if(s!=NULL) {
+ if(s!=nullptr) {
const char *limit = s + length;
while (s != limit) {
diff --git a/contrib/libs/icu/common/ucol_data.h b/contrib/libs/icu/common/ucol_data.h
index 83f54abba13..28cf94ffc83 100644
--- a/contrib/libs/icu/common/ucol_data.h
+++ b/contrib/libs/icu/common/ucol_data.h
@@ -43,7 +43,7 @@ typedef struct {
uint32_t magic; /* magic number - lets us know whether reserved data is reset or junked */
uint32_t mappingPosition; /* const uint8_t *mappingPosition; */
uint32_t expansion; /* uint32_t *expansion; */
- uint32_t contractionIndex; /* UChar *contractionIndex; */
+ uint32_t contractionIndex; /* char16_t *contractionIndex; */
uint32_t contractionCEs; /* uint32_t *contractionCEs; */
uint32_t contractionSize; /* needed for various closures */
/*int32_t latinOneMapping;*/ /* this is now handled in the trie itself *//* fast track to latin1 chars */
@@ -60,7 +60,7 @@ typedef struct {
/* in contractions. */
int32_t contractionUCACombosSize; /* number of UCA contraction items. */
- /*Length is contractionUCACombosSize*contractionUCACombosWidth*sizeof(UChar) */
+ /*Length is contractionUCACombosSize*contractionUCACombosWidth*sizeof(char16_t) */
UBool jamoSpecial; /* is jamoSpecial */
UBool isBigEndian; /* is this data big endian? from the UDataInfo header*/
uint8_t charSetFamily; /* what is the charset family of this data from the UDataInfo header*/
diff --git a/contrib/libs/icu/common/ucol_swp.cpp b/contrib/libs/icu/common/ucol_swp.cpp
index 1af19863fa8..b5894a1feff 100644
--- a/contrib/libs/icu/common/ucol_swp.cpp
+++ b/contrib/libs/icu/common/ucol_swp.cpp
@@ -33,20 +33,20 @@
U_CAPI UBool U_EXPORT2
ucol_looksLikeCollationBinary(const UDataSwapper *ds,
const void *inData, int32_t length) {
- if(ds==NULL || inData==NULL || length<-1) {
- return FALSE;
+ if(ds==nullptr || inData==nullptr || length<-1) {
+ return false;
}
// First check for format version 4+ which has a standard data header.
UErrorCode errorCode=U_ZERO_ERROR;
- (void)udata_swapDataHeader(ds, inData, -1, NULL, &errorCode);
+ (void)udata_swapDataHeader(ds, inData, -1, nullptr, &errorCode);
if(U_SUCCESS(errorCode)) {
const UDataInfo &info=*(const UDataInfo *)((const char *)inData+4);
if(info.dataFormat[0]==0x55 && // dataFormat="UCol"
info.dataFormat[1]==0x43 &&
info.dataFormat[2]==0x6f &&
info.dataFormat[3]==0x6c) {
- return TRUE;
+ return true;
}
}
@@ -64,7 +64,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
if(length<0) {
header.size=udata_readInt32(ds, inHeader->size);
} else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
- return FALSE;
+ return false;
}
header.magic=ds->readUInt32(inHeader->magic);
@@ -73,14 +73,14 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
inHeader->formatVersion[0]==3 /*&&
inHeader->formatVersion[1]>=0*/
)) {
- return FALSE;
+ return false;
}
if(inHeader->isBigEndian!=ds->inIsBigEndian || inHeader->charSetFamily!=ds->inCharset) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
namespace {
@@ -103,7 +103,7 @@ swapFormatVersion3(const UDataSwapper *ds,
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<-1 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<-1 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -204,7 +204,7 @@ swapFormatVersion3(const UDataSwapper *ds,
/* swap the contractions */
if(header.contractionSize!=0) {
- /* contractionIndex: UChar[] */
+ /* contractionIndex: char16_t[] */
ds->swapArray16(ds, inBytes+header.contractionIndex, header.contractionSize*2,
outBytes+header.contractionIndex, pErrorCode);
@@ -336,7 +336,7 @@ swapFormatVersion4(const UDataSwapper *ds,
for(int32_t i=indexesLength; i<=IX_TOTAL_SIZE; ++i) {
indexes[i]=-1;
}
- inIndexes=NULL; // Make sure we do not accidentally use these instead of indexes[].
+ inIndexes=nullptr; // Make sure we do not accidentally use these instead of indexes[].
// Get the total length of the data.
int32_t size;
@@ -506,7 +506,7 @@ ucol_swap(const UDataSwapper *ds,
inData=(const char *)inData+headerSize;
if(length>=0) { length-=headerSize; }
- outData=(char *)outData+headerSize;
+ outData=(outData == nullptr) ? nullptr : (char *)outData+headerSize;
int32_t collationSize;
if(info.formatVersion[0]>=4) {
collationSize=swapFormatVersion4(ds, inData, length, outData, *pErrorCode);
@@ -537,7 +537,7 @@ ucol_swapInverseUCA(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
diff --git a/contrib/libs/icu/common/ucptrie_impl.h b/contrib/libs/icu/common/ucptrie_impl.h
index 048353c80df..a7a80a8f08a 100644
--- a/contrib/libs/icu/common/ucptrie_impl.h
+++ b/contrib/libs/icu/common/ucptrie_impl.h
@@ -54,80 +54,76 @@ struct UCPTrieHeader {
uint16_t shiftedHighStart;
};
+// Constants for use with UCPTrieHeader.options.
+constexpr uint16_t UCPTRIE_OPTIONS_DATA_LENGTH_MASK = 0xf000;
+constexpr uint16_t UCPTRIE_OPTIONS_DATA_NULL_OFFSET_MASK = 0xf00;
+constexpr uint16_t UCPTRIE_OPTIONS_RESERVED_MASK = 0x38;
+constexpr uint16_t UCPTRIE_OPTIONS_VALUE_BITS_MASK = 7;
+
/**
- * Constants for use with UCPTrieHeader.options.
- * @internal
+ * Value for index3NullOffset which indicates that there is no index-3 null block.
+ * Bit 15 is unused for this value because this bit is used if the index-3 contains
+ * 18-bit indexes.
*/
-enum {
- UCPTRIE_OPTIONS_DATA_LENGTH_MASK = 0xf000,
- UCPTRIE_OPTIONS_DATA_NULL_OFFSET_MASK = 0xf00,
- UCPTRIE_OPTIONS_RESERVED_MASK = 0x38,
- UCPTRIE_OPTIONS_VALUE_BITS_MASK = 7,
- /**
- * Value for index3NullOffset which indicates that there is no index-3 null block.
- * Bit 15 is unused for this value because this bit is used if the index-3 contains
- * 18-bit indexes.
- */
- UCPTRIE_NO_INDEX3_NULL_OFFSET = 0x7fff,
- UCPTRIE_NO_DATA_NULL_OFFSET = 0xfffff
-};
+constexpr int32_t UCPTRIE_NO_INDEX3_NULL_OFFSET = 0x7fff;
+constexpr int32_t UCPTRIE_NO_DATA_NULL_OFFSET = 0xfffff;
// Internal constants.
-enum {
- /** The length of the BMP index table. 1024=0x400 */
- UCPTRIE_BMP_INDEX_LENGTH = 0x10000 >> UCPTRIE_FAST_SHIFT,
- UCPTRIE_SMALL_LIMIT = 0x1000,
- UCPTRIE_SMALL_INDEX_LENGTH = UCPTRIE_SMALL_LIMIT >> UCPTRIE_FAST_SHIFT,
+/** The length of the BMP index table. 1024=0x400 */
+constexpr int32_t UCPTRIE_BMP_INDEX_LENGTH = 0x10000 >> UCPTRIE_FAST_SHIFT;
- /** Shift size for getting the index-3 table offset. */
- UCPTRIE_SHIFT_3 = 4,
+constexpr int32_t UCPTRIE_SMALL_LIMIT = 0x1000;
+constexpr int32_t UCPTRIE_SMALL_INDEX_LENGTH = UCPTRIE_SMALL_LIMIT >> UCPTRIE_FAST_SHIFT;
- /** Shift size for getting the index-2 table offset. */
- UCPTRIE_SHIFT_2 = 5 + UCPTRIE_SHIFT_3,
+/** Shift size for getting the index-3 table offset. */
+constexpr int32_t UCPTRIE_SHIFT_3 = 4;
- /** Shift size for getting the index-1 table offset. */
- UCPTRIE_SHIFT_1 = 5 + UCPTRIE_SHIFT_2,
+/** Shift size for getting the index-2 table offset. */
+constexpr int32_t UCPTRIE_SHIFT_2 = 5 + UCPTRIE_SHIFT_3;
- /**
- * Difference between two shift sizes,
- * for getting an index-2 offset from an index-3 offset. 5=9-4
- */
- UCPTRIE_SHIFT_2_3 = UCPTRIE_SHIFT_2 - UCPTRIE_SHIFT_3,
+/** Shift size for getting the index-1 table offset. */
+constexpr int32_t UCPTRIE_SHIFT_1 = 5 + UCPTRIE_SHIFT_2;
- /**
- * Difference between two shift sizes,
- * for getting an index-1 offset from an index-2 offset. 5=14-9
- */
- UCPTRIE_SHIFT_1_2 = UCPTRIE_SHIFT_1 - UCPTRIE_SHIFT_2,
+/**
+ * Difference between two shift sizes,
+ * for getting an index-2 offset from an index-3 offset. 5=9-4
+ */
+constexpr int32_t UCPTRIE_SHIFT_2_3 = UCPTRIE_SHIFT_2 - UCPTRIE_SHIFT_3;
- /**
- * Number of index-1 entries for the BMP. (4)
- * This part of the index-1 table is omitted from the serialized form.
- */
- UCPTRIE_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UCPTRIE_SHIFT_1,
+/**
+ * Difference between two shift sizes,
+ * for getting an index-1 offset from an index-2 offset. 5=14-9
+ */
+constexpr int32_t UCPTRIE_SHIFT_1_2 = UCPTRIE_SHIFT_1 - UCPTRIE_SHIFT_2;
- /** Number of entries in an index-2 block. 32=0x20 */
- UCPTRIE_INDEX_2_BLOCK_LENGTH = 1 << UCPTRIE_SHIFT_1_2,
+/**
+ * Number of index-1 entries for the BMP. (4)
+ * This part of the index-1 table is omitted from the serialized form.
+ */
+constexpr int32_t UCPTRIE_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UCPTRIE_SHIFT_1;
- /** Mask for getting the lower bits for the in-index-2-block offset. */
- UCPTRIE_INDEX_2_MASK = UCPTRIE_INDEX_2_BLOCK_LENGTH - 1,
+/** Number of entries in an index-2 block. 32=0x20 */
+constexpr int32_t UCPTRIE_INDEX_2_BLOCK_LENGTH = 1 << UCPTRIE_SHIFT_1_2;
- /** Number of code points per index-2 table entry. 512=0x200 */
- UCPTRIE_CP_PER_INDEX_2_ENTRY = 1 << UCPTRIE_SHIFT_2,
+/** Mask for getting the lower bits for the in-index-2-block offset. */
+constexpr int32_t UCPTRIE_INDEX_2_MASK = UCPTRIE_INDEX_2_BLOCK_LENGTH - 1;
- /** Number of entries in an index-3 block. 32=0x20 */
- UCPTRIE_INDEX_3_BLOCK_LENGTH = 1 << UCPTRIE_SHIFT_2_3,
+/** Number of code points per index-2 table entry. 512=0x200 */
+constexpr int32_t UCPTRIE_CP_PER_INDEX_2_ENTRY = 1 << UCPTRIE_SHIFT_2;
- /** Mask for getting the lower bits for the in-index-3-block offset. */
- UCPTRIE_INDEX_3_MASK = UCPTRIE_INDEX_3_BLOCK_LENGTH - 1,
+/** Number of entries in an index-3 block. 32=0x20 */
+constexpr int32_t UCPTRIE_INDEX_3_BLOCK_LENGTH = 1 << UCPTRIE_SHIFT_2_3;
- /** Number of entries in a small data block. 16=0x10 */
- UCPTRIE_SMALL_DATA_BLOCK_LENGTH = 1 << UCPTRIE_SHIFT_3,
+/** Mask for getting the lower bits for the in-index-3-block offset. */
+constexpr int32_t UCPTRIE_INDEX_3_MASK = UCPTRIE_INDEX_3_BLOCK_LENGTH - 1;
+
+/** Number of entries in a small data block. 16=0x10 */
+constexpr int32_t UCPTRIE_SMALL_DATA_BLOCK_LENGTH = 1 << UCPTRIE_SHIFT_3;
+
+/** Mask for getting the lower bits for the in-small-data-block offset. */
+constexpr int32_t UCPTRIE_SMALL_DATA_MASK = UCPTRIE_SMALL_DATA_BLOCK_LENGTH - 1;
- /** Mask for getting the lower bits for the in-small-data-block offset. */
- UCPTRIE_SMALL_DATA_MASK = UCPTRIE_SMALL_DATA_BLOCK_LENGTH - 1
-};
typedef UChar32
UCPTrieGetRange(const void *trie, UChar32 start,
diff --git a/contrib/libs/icu/common/ucurr.cpp b/contrib/libs/icu/common/ucurr.cpp
index 67aab4e8ffe..ffca8aac5f1 100644
--- a/contrib/libs/icu/common/ucurr.cpp
+++ b/contrib/libs/icu/common/ucurr.cpp
@@ -49,7 +49,7 @@ using namespace icu;
#endif
typedef struct IsoCodeEntry {
- const UChar *isoCode; /* const because it's a reference to a resource bundle string. */
+ const char16_t *isoCode; /* const because it's a reference to a resource bundle string. */
UDate from;
UDate to;
} IsoCodeEntry;
@@ -96,12 +96,12 @@ static const char CURRENCIES_VARIANT[] = "Currencies%variant";
static const char CURRENCYPLURALS[] = "CurrencyPlurals";
// ISO codes mapping table
-static const UHashtable* gIsoCodes = NULL;
-static icu::UInitOnce gIsoCodesInitOnce = U_INITONCE_INITIALIZER;
+static const UHashtable* gIsoCodes = nullptr;
+static icu::UInitOnce gIsoCodesInitOnce {};
// Currency symbol equivalances
-static const icu::Hashtable* gCurrSymbolsEquiv = NULL;
-static icu::UInitOnce gCurrSymbolsEquivInitOnce = U_INITONCE_INITIALIZER;
+static const icu::Hashtable* gCurrSymbolsEquiv = nullptr;
+static icu::UInitOnce gCurrSymbolsEquivInitOnce {};
U_NAMESPACE_BEGIN
@@ -117,8 +117,8 @@ public:
}
inline ~EquivIterator() { }
- // next returns the next equivalent string or NULL if there are no more.
- // If s has no equivalent strings, next returns NULL on the first call.
+ // next returns the next equivalent string or nullptr if there are no more.
+ // If s has no equivalent strings, next returns nullptr on the first call.
const icu::UnicodeString *next();
private:
const icu::Hashtable& _hash;
@@ -129,12 +129,12 @@ private:
const icu::UnicodeString *
EquivIterator::next() {
const icu::UnicodeString* _next = (const icu::UnicodeString*) _hash.get(*_current);
- if (_next == NULL) {
+ if (_next == nullptr) {
U_ASSERT(_current == _start);
- return NULL;
+ return nullptr;
}
if (*_next == *_start) {
- return NULL;
+ return nullptr;
}
_current = _next;
return _next;
@@ -161,7 +161,7 @@ static void makeEquivalent(
const icu::UnicodeString *firstRight = rightIter.next();
const icu::UnicodeString *nextLeft = firstLeft;
const icu::UnicodeString *nextRight = firstRight;
- while (nextLeft != NULL && nextRight != NULL) {
+ while (nextLeft != nullptr && nextRight != nullptr) {
if (*nextLeft == rhs || *nextRight == lhs) {
// Already equivalent
return;
@@ -172,17 +172,17 @@ static void makeEquivalent(
// Not equivalent. Must join.
icu::UnicodeString *newFirstLeft;
icu::UnicodeString *newFirstRight;
- if (firstRight == NULL && firstLeft == NULL) {
+ if (firstRight == nullptr && firstLeft == nullptr) {
// Neither lhs or rhs belong to an equivalence circle, so we form
// a new equivalnce circle of just lhs and rhs.
newFirstLeft = new icu::UnicodeString(rhs);
newFirstRight = new icu::UnicodeString(lhs);
- } else if (firstRight == NULL) {
+ } else if (firstRight == nullptr) {
// lhs belongs to an equivalence circle, but rhs does not, so we link
// rhs into lhs' circle.
newFirstLeft = new icu::UnicodeString(rhs);
newFirstRight = new icu::UnicodeString(*firstLeft);
- } else if (firstLeft == NULL) {
+ } else if (firstLeft == nullptr) {
// rhs belongs to an equivlance circle, but lhs does not, so we link
// lhs into rhs' circle.
newFirstLeft = new icu::UnicodeString(*firstRight);
@@ -193,7 +193,7 @@ static void makeEquivalent(
newFirstLeft = new icu::UnicodeString(*firstRight);
newFirstRight = new icu::UnicodeString(*firstLeft);
}
- if (newFirstLeft == NULL || newFirstRight == NULL) {
+ if (newFirstLeft == nullptr || newFirstRight == nullptr) {
delete newFirstLeft;
delete newFirstRight;
status = U_MEMORY_ALLOCATION_ERROR;
@@ -209,7 +209,7 @@ static void makeEquivalent(
static int32_t countEquivalent(const icu::Hashtable &hash, const icu::UnicodeString &s) {
int32_t result = 0;
icu::EquivIterator iter(hash, s);
- while (iter.next() != NULL) {
+ while (iter.next() != nullptr) {
++result;
}
#ifdef UCURR_DEBUG_EQUIV
@@ -231,30 +231,30 @@ static const icu::Hashtable* getCurrSymbolsEquiv();
* Cleanup callback func
*/
static UBool U_CALLCONV
-isoCodes_cleanup(void)
+isoCodes_cleanup()
{
- if (gIsoCodes != NULL) {
+ if (gIsoCodes != nullptr) {
uhash_close(const_cast<UHashtable *>(gIsoCodes));
- gIsoCodes = NULL;
+ gIsoCodes = nullptr;
}
gIsoCodesInitOnce.reset();
- return TRUE;
+ return true;
}
/**
* Cleanup callback func
*/
static UBool U_CALLCONV
-currSymbolsEquiv_cleanup(void)
+currSymbolsEquiv_cleanup()
{
delete const_cast<icu::Hashtable *>(gCurrSymbolsEquiv);
- gCurrSymbolsEquiv = NULL;
+ gCurrSymbolsEquiv = nullptr;
gCurrSymbolsEquivInitOnce.reset();
- return TRUE;
+ return true;
}
/**
- * Deleter for OlsonToMetaMappingEntry
+ * Deleter for IsoCodeEntry
*/
static void U_CALLCONV
deleteIsoCodeEntry(void *obj) {
@@ -272,11 +272,11 @@ deleteUnicode(void *obj) {
}
/**
- * Unfortunately, we have to convert the UChar* currency code to char*
+ * Unfortunately, we have to convert the char16_t* currency code to char*
* to use it as a resource key.
*/
static inline char*
-myUCharsToChars(char* resultOfLen4, const UChar* currency) {
+myUCharsToChars(char* resultOfLen4, const char16_t* currency) {
u_UCharsToChars(currency, resultOfLen4, ISO_CURRENCY_CODE_LENGTH);
resultOfLen4[ISO_CURRENCY_CODE_LENGTH] = 0;
return resultOfLen4;
@@ -291,7 +291,7 @@ myUCharsToChars(char* resultOfLen4, const UChar* currency) {
* and cashRounding ).
*/
static const int32_t*
-_findMetaData(const UChar* currency, UErrorCode& ec) {
+_findMetaData(const char16_t* currency, UErrorCode& ec) {
if (currency == 0 || *currency == 0) {
if (U_SUCCESS(ec)) {
@@ -315,10 +315,10 @@ _findMetaData(const UChar* currency, UErrorCode& ec) {
// Look up our currency, or if that's not available, then DEFAULT
char buf[ISO_CURRENCY_CODE_LENGTH+1];
UErrorCode ec2 = U_ZERO_ERROR; // local error code: soft failure
- UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), NULL, &ec2);
+ UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), nullptr, &ec2);
if (U_FAILURE(ec2)) {
ures_close(rb);
- rb = ures_getByKey(currencyMeta,DEFAULT_META, NULL, &ec);
+ rb = ures_getByKey(currencyMeta,DEFAULT_META, nullptr, &ec);
if (U_FAILURE(ec)) {
ures_close(currencyMeta);
ures_close(rb);
@@ -349,7 +349,7 @@ _findMetaData(const UChar* currency, UErrorCode& ec) {
static void
idForLocale(const char* locale, char* countryAndVariant, int capacity, UErrorCode* ec)
{
- ulocimp_getRegionForSupplementalData(locale, FALSE, countryAndVariant, capacity, ec);
+ ulocimp_getRegionForSupplementalData(locale, false, countryAndVariant, capacity, ec);
}
// ------------------------------------------
@@ -361,7 +361,7 @@ idForLocale(const char* locale, char* countryAndVariant, int capacity, UErrorCod
// don't use ICUService since we don't need fallback
U_CDECL_BEGIN
-static UBool U_CALLCONV currency_cleanup(void);
+static UBool U_CALLCONV currency_cleanup();
U_CDECL_END
#if !UCONFIG_NO_SERVICE
@@ -372,10 +372,10 @@ static CReg* gCRegHead = 0;
struct CReg : public icu::UMemory {
CReg *next;
- UChar iso[ISO_CURRENCY_CODE_LENGTH+1];
+ char16_t iso[ISO_CURRENCY_CODE_LENGTH+1];
char id[ULOC_FULLNAME_CAPACITY];
- CReg(const UChar* _iso, const char* _id)
+ CReg(const char16_t* _iso, const char* _id)
: next(0)
{
int32_t len = (int32_t)uprv_strlen(_id);
@@ -388,7 +388,7 @@ struct CReg : public icu::UMemory {
iso[ISO_CURRENCY_CODE_LENGTH] = 0;
}
- static UCurrRegistryKey reg(const UChar* _iso, const char* _id, UErrorCode* status)
+ static UCurrRegistryKey reg(const char16_t* _iso, const char* _id, UErrorCode* status)
{
if (status && U_SUCCESS(*status) && _iso && _id) {
CReg* n = new CReg(_iso, _id);
@@ -409,7 +409,7 @@ struct CReg : public icu::UMemory {
}
static UBool unreg(UCurrRegistryKey key) {
- UBool found = FALSE;
+ UBool found = false;
umtx_lock(&gCRegLock);
CReg** p = &gCRegHead;
@@ -417,7 +417,7 @@ struct CReg : public icu::UMemory {
if (*p == key) {
*p = ((CReg*)key)->next;
delete (CReg*)key;
- found = TRUE;
+ found = true;
break;
}
p = &((*p)->next);
@@ -427,8 +427,8 @@ struct CReg : public icu::UMemory {
return found;
}
- static const UChar* get(const char* id) {
- const UChar* result = NULL;
+ static const char16_t* get(const char* id) {
+ const char16_t* result = nullptr;
umtx_lock(&gCRegLock);
CReg* p = gCRegHead;
@@ -446,7 +446,7 @@ struct CReg : public icu::UMemory {
}
/* This doesn't need to be thread safe. It's for u_cleanup only. */
- static void cleanup(void) {
+ static void cleanup() {
while (gCRegHead) {
CReg* n = gCRegHead;
gCRegHead = gCRegHead->next;
@@ -458,14 +458,14 @@ struct CReg : public icu::UMemory {
// -------------------------------------
U_CAPI UCurrRegistryKey U_EXPORT2
-ucurr_register(const UChar* isoCode, const char* locale, UErrorCode *status)
+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);
}
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -476,7 +476,7 @@ ucurr_unregister(UCurrRegistryKey key, UErrorCode* status)
if (status && U_SUCCESS(*status)) {
return CReg::unreg(key);
}
- return FALSE;
+ return false;
}
#endif /* UCONFIG_NO_SERVICE */
@@ -485,14 +485,14 @@ ucurr_unregister(UCurrRegistryKey key, UErrorCode* status)
/**
* Release all static memory held by currency.
*/
-/*The declaration here is needed so currency_cleanup(void)
+/*The declaration here is needed so currency_cleanup()
* can call this function.
*/
static UBool U_CALLCONV
-currency_cache_cleanup(void);
+currency_cache_cleanup();
U_CDECL_BEGIN
-static UBool U_CALLCONV currency_cleanup(void) {
+static UBool U_CALLCONV currency_cleanup() {
#if !UCONFIG_NO_SERVICE
CReg::cleanup();
#endif
@@ -503,7 +503,7 @@ static UBool U_CALLCONV currency_cleanup(void) {
isoCodes_cleanup();
currSymbolsEquiv_cleanup();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -511,7 +511,7 @@ U_CDECL_END
U_CAPI int32_t U_EXPORT2
ucurr_forLocale(const char* locale,
- UChar* buff,
+ char16_t* buff,
int32_t buffCapacity,
UErrorCode* ec) {
if (U_FAILURE(*ec)) { return 0; }
@@ -540,7 +540,7 @@ ucurr_forLocale(const char* locale,
}
#if !UCONFIG_NO_SERVICE
- const UChar* result = CReg::get(id);
+ const char16_t* result = CReg::get(id);
if (result) {
if(buffCapacity > u_strlen(result)) {
u_strcpy(buff, result);
@@ -555,7 +555,7 @@ ucurr_forLocale(const char* locale,
idDelim[0] = 0;
}
- const UChar* s = NULL; // Currency code from data file.
+ const char16_t* s = nullptr; // Currency code from data file.
if (id[0] == 0) {
// No point looking in the data for an empty string.
// This is what we would get.
@@ -566,9 +566,32 @@ ucurr_forLocale(const char* locale,
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 *currencyReq = ures_getByIndex(countryArray, 0, NULL, &localStatus);
- s = ures_getStringByKey(currencyReq, "id", &resLen, &localStatus);
- ures_close(currencyReq);
+ // https://unicode-org.atlassian.net/browse/ICU-21997
+ // Prefer to use currencies that are legal tender.
+ if (U_SUCCESS(localStatus)) {
+ int32_t arrayLength = ures_getSize(countryArray);
+ for (int32_t i = 0; i < arrayLength; ++i) {
+ LocalUResourceBundlePointer currencyReq(
+ ures_getByIndex(countryArray, i, nullptr, &localStatus));
+ // The currency is legal tender if it is *not* marked with tender{"false"}.
+ UErrorCode tenderStatus = localStatus;
+ const char16_t *tender =
+ ures_getStringByKey(currencyReq.getAlias(), "tender", nullptr, &tenderStatus);
+ bool isTender = U_FAILURE(tenderStatus) || u_strcmp(tender, u"false") != 0;
+ if (!isTender && s != nullptr) {
+ // We already have a non-tender currency. Ignore all following non-tender ones.
+ continue;
+ }
+ // Fetch the currency code.
+ s = ures_getStringByKey(currencyReq.getAlias(), "id", &resLen, &localStatus);
+ if (isTender) {
+ break;
+ }
+ }
+ if (U_SUCCESS(localStatus) && s == nullptr) {
+ localStatus = U_MISSING_RESOURCE_ERROR;
+ }
+ }
ures_close(countryArray);
}
@@ -598,12 +621,12 @@ ucurr_forLocale(const char* locale,
* Modify the given locale name by removing the rightmost _-delimited
* element. If there is none, empty the string ("" == root).
* NOTE: The string "root" is not recognized; do not use it.
- * @return TRUE if the fallback happened; FALSE if locale is already
+ * @return true if the fallback happened; false if locale is already
* root ("").
*/
static UBool fallback(char *loc) {
if (!*loc) {
- return FALSE;
+ return false;
}
UErrorCode status = U_ZERO_ERROR;
if (uprv_strcmp(loc, "en_GB") == 0) {
@@ -618,17 +641,17 @@ static UBool fallback(char *loc) {
}
/*
char *i = uprv_strrchr(loc, '_');
- if (i == NULL) {
+ if (i == nullptr) {
i = loc;
}
*i = 0;
*/
- return TRUE;
+ return true;
}
-U_CAPI const UChar* U_EXPORT2
-ucurr_getName(const UChar* currency,
+U_CAPI const char16_t* U_EXPORT2
+ucurr_getName(const char16_t* currency,
const char* locale,
UCurrNameStyle nameStyle,
UBool* isChoiceFormat, // fillin
@@ -682,7 +705,7 @@ ucurr_getName(const UChar* currency,
/* Normalize the keyword value to uppercase */
T_CString_toUpperCase(buf);
- const UChar* s = NULL;
+ const char16_t* s = nullptr;
ec2 = U_ZERO_ERROR;
LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc, &ec2));
@@ -711,7 +734,7 @@ ucurr_getName(const UChar* currency,
choice = UCURR_SYMBOL_NAME;
}
}
- if (s == NULL) {
+ if (s == nullptr) {
ures_getByKey(rb.getAlias(), CURRENCIES, rb.getAlias(), &ec2);
ures_getByKeyWithFallback(rb.getAlias(), buf, rb.getAlias(), &ec2);
s = ures_getStringByIndex(rb.getAlias(), choice, len, &ec2);
@@ -728,11 +751,11 @@ ucurr_getName(const UChar* currency,
// We no longer support choice format data in names. Data should not contain
// choice patterns.
- if (isChoiceFormat != NULL) {
- *isChoiceFormat = FALSE;
+ if (isChoiceFormat != nullptr) {
+ *isChoiceFormat = false;
}
if (U_SUCCESS(ec2)) {
- U_ASSERT(s != NULL);
+ U_ASSERT(s != nullptr);
return s;
}
@@ -742,8 +765,8 @@ ucurr_getName(const UChar* currency,
return currency;
}
-U_CAPI const UChar* U_EXPORT2
-ucurr_getPluralName(const UChar* currency,
+U_CAPI const char16_t* U_EXPORT2
+ucurr_getPluralName(const char16_t* currency,
const char* locale,
UBool* isChoiceFormat,
const char* pluralCount,
@@ -778,7 +801,7 @@ ucurr_getPluralName(const UChar* currency,
char buf[ISO_CURRENCY_CODE_LENGTH+1];
myUCharsToChars(buf, currency);
- const UChar* s = NULL;
+ const char16_t* s = nullptr;
ec2 = U_ZERO_ERROR;
UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc, &ec2);
@@ -808,7 +831,7 @@ ucurr_getPluralName(const UChar* currency,
|| (ec2 == U_USING_FALLBACK_WARNING && *ec != U_USING_DEFAULT_WARNING)) {
*ec = ec2;
}
- U_ASSERT(s != NULL);
+ U_ASSERT(s != nullptr);
return s;
}
@@ -829,7 +852,7 @@ ucurr_getPluralName(const UChar* currency,
typedef struct {
const char* IsoCode; // key
- UChar* currencyName; // value
+ char16_t* currencyName; // value
int32_t currencyNameLen; // value length
int32_t flag; // flags
} CurrencyNameStruct;
@@ -880,7 +903,7 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_
U_NAMESPACE_USE
*total_currency_name_count = 0;
*total_currency_symbol_count = 0;
- const UChar* s = NULL;
+ const char16_t* s = nullptr;
char locale[ULOC_FULLNAME_CAPACITY] = "";
uprv_strcpy(locale, loc);
const icu::Hashtable *currencySymbolsEquiv = getCurrSymbolsEquiv();
@@ -888,15 +911,15 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_
UErrorCode ec2 = U_ZERO_ERROR;
// TODO: ures_openDirect?
UResourceBundle* rb = ures_open(U_ICUDATA_CURR, locale, &ec2);
- UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, NULL, &ec2);
+ UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2);
int32_t n = ures_getSize(curr);
for (int32_t i=0; i<n; ++i) {
- UResourceBundle* names = ures_getByIndex(curr, i, NULL, &ec2);
+ UResourceBundle* names = ures_getByIndex(curr, i, nullptr, &ec2);
int32_t len;
s = ures_getStringByIndex(names, UCURR_SYMBOL_NAME, &len, &ec2);
++(*total_currency_symbol_count); // currency symbol
- if (currencySymbolsEquiv != NULL) {
- *total_currency_symbol_count += countEquivalent(*currencySymbolsEquiv, UnicodeString(TRUE, s, len));
+ if (currencySymbolsEquiv != nullptr) {
+ *total_currency_symbol_count += countEquivalent(*currencySymbolsEquiv, UnicodeString(true, s, len));
}
++(*total_currency_symbol_count); // iso code
++(*total_currency_name_count); // long name
@@ -905,10 +928,10 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_
// currency plurals
UErrorCode ec3 = U_ZERO_ERROR;
- UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, NULL, &ec3);
+ UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, nullptr, &ec3);
n = ures_getSize(curr_p);
for (int32_t i=0; i<n; ++i) {
- UResourceBundle* names = ures_getByIndex(curr_p, i, NULL, &ec3);
+ UResourceBundle* names = ures_getByIndex(curr_p, i, nullptr, &ec3);
*total_currency_name_count += ures_getSize(names);
ures_close(names);
}
@@ -922,14 +945,14 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_
}
}
-static UChar*
-toUpperCase(const UChar* source, int32_t len, const char* locale) {
- UChar* dest = NULL;
+static char16_t*
+toUpperCase(const char16_t* source, int32_t len, const char* locale) {
+ char16_t* dest = nullptr;
UErrorCode ec = U_ZERO_ERROR;
int32_t destLen = u_strToUpper(dest, 0, source, len, locale, &ec);
ec = U_ZERO_ERROR;
- dest = (UChar*)uprv_malloc(sizeof(UChar) * MAX(destLen, len));
+ dest = (char16_t*)uprv_malloc(sizeof(char16_t) * MAX(destLen, len));
u_strToUpper(dest, destLen, source, len, locale, &ec);
if (U_FAILURE(ec)) {
u_memcpy(dest, source, len);
@@ -970,14 +993,14 @@ collectCurrencyNames(const char* locale,
*currencySymbols = (CurrencyNameStruct*)uprv_malloc
(sizeof(CurrencyNameStruct) * (*total_currency_symbol_count));
- if(currencyNames == NULL || currencySymbols == NULL) {
+ if(currencyNames == nullptr || currencySymbols == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(ec)) return;
- const UChar* s = NULL; // currency name
- char* iso = NULL; // currency ISO code
+ const char16_t* s = nullptr; // currency name
+ char* iso = nullptr; // currency ISO code
*total_currency_name_count = 0;
*total_currency_symbol_count = 0;
@@ -986,16 +1009,16 @@ collectCurrencyNames(const char* locale,
UErrorCode ec4 = U_ZERO_ERROR;
// Using hash to remove duplicates caused by locale fallback
- UHashtable* currencyIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &ec3);
- UHashtable* currencyPluralIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &ec4);
+ UHashtable* currencyIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &ec3);
+ UHashtable* currencyPluralIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &ec4);
for (int32_t localeLevel = 0; ; ++localeLevel) {
ec2 = U_ZERO_ERROR;
// TODO: ures_openDirect
UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc, &ec2);
- UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, NULL, &ec2);
+ UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2);
int32_t n = ures_getSize(curr);
for (int32_t i=0; i<n; ++i) {
- UResourceBundle* names = ures_getByIndex(curr, i, NULL, &ec2);
+ UResourceBundle* names = ures_getByIndex(curr, i, nullptr, &ec2);
int32_t len;
s = ures_getStringByIndex(names, UCURR_SYMBOL_NAME, &len, &ec2);
// TODO: uhash_put wont change key/value?
@@ -1003,7 +1026,7 @@ collectCurrencyNames(const char* locale,
if (localeLevel == 0) {
uhash_put(currencyIsoCodes, iso, iso, &ec3);
} else {
- if (uhash_get(currencyIsoCodes, iso) != NULL) {
+ if (uhash_get(currencyIsoCodes, iso) != nullptr) {
ures_close(names);
continue;
} else {
@@ -1012,18 +1035,18 @@ collectCurrencyNames(const char* locale,
}
// Add currency symbol.
(*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;
- (*currencySymbols)[*total_currency_symbol_count].currencyName = (UChar*)s;
+ (*currencySymbols)[*total_currency_symbol_count].currencyName = (char16_t*)s;
(*currencySymbols)[*total_currency_symbol_count].flag = 0;
(*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = len;
// Add equivalent symbols
- if (currencySymbolsEquiv != NULL) {
- UnicodeString str(TRUE, s, len);
+ if (currencySymbolsEquiv != nullptr) {
+ UnicodeString str(true, s, len);
icu::EquivIterator iter(*currencySymbolsEquiv, str);
const UnicodeString *symbol;
- while ((symbol = iter.next()) != NULL) {
+ while ((symbol = iter.next()) != nullptr) {
(*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;
(*currencySymbols)[*total_currency_symbol_count].currencyName =
- const_cast<UChar*>(symbol->getBuffer());
+ const_cast<char16_t*>(symbol->getBuffer());
(*currencySymbols)[*total_currency_symbol_count].flag = 0;
(*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = symbol->length();
}
@@ -1032,7 +1055,7 @@ collectCurrencyNames(const char* locale,
// Add currency long name.
s = ures_getStringByIndex(names, UCURR_LONG_NAME, &len, &ec2);
(*currencyNames)[*total_currency_name_count].IsoCode = iso;
- UChar* upperName = toUpperCase(s, len, locale);
+ char16_t* upperName = toUpperCase(s, len, locale);
(*currencyNames)[*total_currency_name_count].currencyName = upperName;
(*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED;
(*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len;
@@ -1040,7 +1063,7 @@ collectCurrencyNames(const char* locale,
// put (iso, 3, and iso) in to array
// Add currency ISO code.
(*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;
- (*currencySymbols)[*total_currency_symbol_count].currencyName = (UChar*)uprv_malloc(sizeof(UChar)*3);
+ (*currencySymbols)[*total_currency_symbol_count].currencyName = (char16_t*)uprv_malloc(sizeof(char16_t)*3);
// Must convert iso[] into Unicode
u_charsToUChars(iso, (*currencySymbols)[*total_currency_symbol_count].currencyName, 3);
(*currencySymbols)[*total_currency_symbol_count].flag = NEED_TO_BE_DELETED;
@@ -1051,16 +1074,16 @@ collectCurrencyNames(const char* locale,
// currency plurals
UErrorCode ec5 = U_ZERO_ERROR;
- UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, NULL, &ec5);
+ UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, nullptr, &ec5);
n = ures_getSize(curr_p);
for (int32_t i=0; i<n; ++i) {
- UResourceBundle* names = ures_getByIndex(curr_p, i, NULL, &ec5);
+ UResourceBundle* names = ures_getByIndex(curr_p, i, nullptr, &ec5);
iso = (char*)ures_getKey(names);
// Using hash to remove duplicated ISO codes in fallback chain.
if (localeLevel == 0) {
uhash_put(currencyPluralIsoCodes, iso, iso, &ec4);
} else {
- if (uhash_get(currencyPluralIsoCodes, iso) != NULL) {
+ if (uhash_get(currencyPluralIsoCodes, iso) != nullptr) {
ures_close(names);
continue;
} else {
@@ -1074,7 +1097,7 @@ collectCurrencyNames(const char* locale,
// currency long name?
s = ures_getStringByIndex(names, j, &len, &ec5);
(*currencyNames)[*total_currency_name_count].IsoCode = iso;
- UChar* upperName = toUpperCase(s, len, locale);
+ char16_t* upperName = toUpperCase(s, len, locale);
(*currencyNames)[*total_currency_name_count].currencyName = upperName;
(*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED;
(*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len;
@@ -1141,7 +1164,7 @@ collectCurrencyNames(const char* locale,
static int32_t
binarySearch(const CurrencyNameStruct* currencyNames,
int32_t indexInCurrencyNames,
- const UChar key,
+ const char16_t key,
int32_t* begin, int32_t* end) {
#ifdef UCURR_DEBUG
printf("key = %x\n", key);
@@ -1255,14 +1278,14 @@ binarySearch(const CurrencyNameStruct* currencyNames,
static void
linearSearch(const CurrencyNameStruct* currencyNames,
int32_t begin, int32_t end,
- const UChar* text, int32_t textLen,
+ const char16_t* text, int32_t textLen,
int32_t *partialMatchLen,
int32_t *maxMatchLen, int32_t* maxMatchIndex) {
int32_t initialPartialMatchLen = *partialMatchLen;
for (int32_t index = begin; index <= end; ++index) {
int32_t len = currencyNames[index].currencyNameLen;
if (len > *maxMatchLen && len <= textLen &&
- uprv_memcmp(currencyNames[index].currencyName, text, len * sizeof(UChar)) == 0) {
+ uprv_memcmp(currencyNames[index].currencyName, text, len * sizeof(char16_t)) == 0) {
*partialMatchLen = MAX(*partialMatchLen, len);
*maxMatchIndex = index;
*maxMatchLen = len;
@@ -1294,7 +1317,7 @@ linearSearch(const CurrencyNameStruct* currencyNames,
static void
searchCurrencyName(const CurrencyNameStruct* currencyNames,
int32_t total_currency_count,
- const UChar* text, int32_t textLen,
+ const char16_t* text, int32_t textLen,
int32_t *partialMatchLen,
int32_t* maxMatchLen, int32_t* maxMatchIndex) {
*maxMatchIndex = -1;
@@ -1365,7 +1388,7 @@ typedef struct {
#define CURRENCY_NAME_CACHE_NUM 10
// Reserve 10 cache entries.
-static CurrencyNameCacheEntry* currCache[CURRENCY_NAME_CACHE_NUM] = {NULL};
+static CurrencyNameCacheEntry* currCache[CURRENCY_NAME_CACHE_NUM] = {nullptr};
// Using an index to indicate which entry to be replaced when cache is full.
// It is a simple round-robin replacement strategy.
static int8_t currentCacheEntryIndex = 0;
@@ -1394,14 +1417,14 @@ deleteCacheEntry(CurrencyNameCacheEntry* entry) {
// Cache clean up
static UBool U_CALLCONV
-currency_cache_cleanup(void) {
+currency_cache_cleanup() {
for (int32_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) {
if (currCache[i]) {
deleteCacheEntry(currCache[i]);
currCache[i] = 0;
}
}
- return TRUE;
+ return true;
}
@@ -1414,17 +1437,17 @@ static CurrencyNameCacheEntry*
getCacheEntry(const char* locale, UErrorCode& ec) {
int32_t total_currency_name_count = 0;
- CurrencyNameStruct* currencyNames = NULL;
+ CurrencyNameStruct* currencyNames = nullptr;
int32_t total_currency_symbol_count = 0;
- CurrencyNameStruct* currencySymbols = NULL;
- CurrencyNameCacheEntry* cacheEntry = NULL;
+ CurrencyNameStruct* currencySymbols = nullptr;
+ CurrencyNameCacheEntry* cacheEntry = nullptr;
umtx_lock(&gCurrencyCacheMutex);
// in order to handle racing correctly,
// not putting 'search' in a separate function.
int8_t found = -1;
for (int8_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) {
- if (currCache[i]!= NULL &&
+ if (currCache[i]!= nullptr &&
uprv_strcmp(locale, currCache[i]->locale) == 0) {
found = i;
break;
@@ -1438,12 +1461,12 @@ getCacheEntry(const char* locale, UErrorCode& ec) {
if (found == -1) {
collectCurrencyNames(locale, &currencyNames, &total_currency_name_count, &currencySymbols, &total_currency_symbol_count, ec);
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
umtx_lock(&gCurrencyCacheMutex);
// check again.
for (int8_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) {
- if (currCache[i]!= NULL &&
+ if (currCache[i]!= nullptr &&
uprv_strcmp(locale, currCache[i]->locale) == 0) {
found = i;
break;
@@ -1500,7 +1523,7 @@ uprv_parseCurrency(const char* locale,
icu::ParsePosition& pos,
int8_t type,
int32_t* partialMatchLen,
- UChar* result,
+ char16_t* result,
UErrorCode& ec) {
U_NAMESPACE_USE
if (U_FAILURE(ec)) {
@@ -1518,8 +1541,8 @@ uprv_parseCurrency(const char* locale,
int32_t start = pos.getIndex();
- UChar inputText[MAX_CURRENCY_NAME_LEN];
- UChar upperText[MAX_CURRENCY_NAME_LEN];
+ char16_t inputText[MAX_CURRENCY_NAME_LEN];
+ char16_t upperText[MAX_CURRENCY_NAME_LEN];
int32_t textLen = MIN(MAX_CURRENCY_NAME_LEN, text.length() - start);
text.extract(start, textLen, inputText);
UErrorCode ec1 = U_ZERO_ERROR;
@@ -1607,13 +1630,13 @@ void uprv_currencyLeads(const char* locale, icu::UnicodeSet& result, UErrorCode&
* DecimalFormat and DecimalFormatSymbols.
*/
U_CAPI void
-uprv_getStaticCurrencyName(const UChar* iso, const char* loc,
+uprv_getStaticCurrencyName(const char16_t* iso, const char* loc,
icu::UnicodeString& result, UErrorCode& ec)
{
U_NAMESPACE_USE
int32_t len;
- const UChar* currname = ucurr_getName(iso, loc, UCURR_SYMBOL_NAME,
+ const char16_t* currname = ucurr_getName(iso, loc, UCURR_SYMBOL_NAME,
nullptr /* isChoiceFormat */, &len, &ec);
if (U_SUCCESS(ec)) {
result.setTo(currname, len);
@@ -1621,12 +1644,12 @@ uprv_getStaticCurrencyName(const UChar* iso, const char* loc,
}
U_CAPI int32_t U_EXPORT2
-ucurr_getDefaultFractionDigits(const UChar* currency, UErrorCode* ec) {
+ucurr_getDefaultFractionDigits(const char16_t* currency, UErrorCode* ec) {
return ucurr_getDefaultFractionDigitsForUsage(currency,UCURR_USAGE_STANDARD,ec);
}
U_CAPI int32_t U_EXPORT2
-ucurr_getDefaultFractionDigitsForUsage(const UChar* currency, const UCurrencyUsage usage, UErrorCode* ec) {
+ucurr_getDefaultFractionDigitsForUsage(const char16_t* currency, const UCurrencyUsage usage, UErrorCode* ec) {
int32_t fracDigits = 0;
if (U_SUCCESS(*ec)) {
switch (usage) {
@@ -1644,12 +1667,12 @@ ucurr_getDefaultFractionDigitsForUsage(const UChar* currency, const UCurrencyUsa
}
U_CAPI double U_EXPORT2
-ucurr_getRoundingIncrement(const UChar* currency, UErrorCode* ec) {
+ucurr_getRoundingIncrement(const char16_t* currency, UErrorCode* ec) {
return ucurr_getRoundingIncrementForUsage(currency, UCURR_USAGE_STANDARD, ec);
}
U_CAPI double U_EXPORT2
-ucurr_getRoundingIncrementForUsage(const UChar* currency, const UCurrencyUsage usage, UErrorCode* ec) {
+ucurr_getRoundingIncrementForUsage(const char16_t* currency, const UCurrencyUsage usage, UErrorCode* ec) {
double result = 0.0;
const int32_t *data = _findMetaData(currency, *ec);
@@ -1928,6 +1951,7 @@ static const struct CurrencyList {
{"SHP", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"SIT", UCURR_COMMON|UCURR_DEPRECATED},
{"SKK", UCURR_COMMON|UCURR_DEPRECATED},
+ {"SLE", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"SLL", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"SOS", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"SRD", UCURR_COMMON|UCURR_NON_DEPRECATED},
@@ -1965,6 +1989,7 @@ static const struct CurrencyList {
{"UYW", UCURR_UNCOMMON|UCURR_NON_DEPRECATED},
{"UZS", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"VEB", UCURR_COMMON|UCURR_DEPRECATED},
+ {"VED", UCURR_UNCOMMON|UCURR_NON_DEPRECATED},
{"VEF", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"VES", UCURR_COMMON|UCURR_NON_DEPRECATED},
{"VND", UCURR_COMMON|UCURR_NON_DEPRECATED},
@@ -2007,7 +2032,7 @@ static const struct CurrencyList {
{"ZWD", UCURR_COMMON|UCURR_DEPRECATED},
{"ZWL", UCURR_COMMON|UCURR_DEPRECATED},
{"ZWR", UCURR_COMMON|UCURR_DEPRECATED},
- { NULL, 0 } // Leave here to denote the end of the list.
+ { nullptr, 0 } // Leave here to denote the end of the list.
};
#define UCURR_MATCHES_BITMASK(variable, typeToMatch) \
@@ -2020,7 +2045,7 @@ ucurr_countCurrencyList(UEnumeration *enumerator, UErrorCode * /*pErrorCode*/) {
int32_t count = 0;
/* Count the number of items matching the type we are looking for. */
- for (int32_t idx = 0; gCurrencyList[idx].currency != NULL; idx++) {
+ for (int32_t idx = 0; gCurrencyList[idx].currency != nullptr; idx++) {
if (UCURR_MATCHES_BITMASK(gCurrencyList[idx].currType, currType)) {
count++;
}
@@ -2050,7 +2075,7 @@ ucurr_nextCurrencyList(UEnumeration *enumerator,
if (resultLength) {
*resultLength = 0;
}
- return NULL;
+ return nullptr;
}
static void U_CALLCONV
@@ -2076,34 +2101,34 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){
// process each entry in currency map
for (int32_t i=0; i<ures_getSize(currencyMapArray); i++) {
// get the currency resource
- UResourceBundle *currencyArray = ures_getByIndex(currencyMapArray, i, NULL, &localStatus);
+ UResourceBundle *currencyArray = ures_getByIndex(currencyMapArray, i, nullptr, &localStatus);
// process each currency
if (U_SUCCESS(localStatus)) {
for (int32_t j=0; j<ures_getSize(currencyArray); j++) {
// get the currency resource
- UResourceBundle *currencyRes = ures_getByIndex(currencyArray, j, NULL, &localStatus);
+ UResourceBundle *currencyRes = ures_getByIndex(currencyArray, j, nullptr, &localStatus);
IsoCodeEntry *entry = (IsoCodeEntry*)uprv_malloc(sizeof(IsoCodeEntry));
- if (entry == NULL) {
+ if (entry == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
// get the ISO code
int32_t isoLength = 0;
- UResourceBundle *idRes = ures_getByKey(currencyRes, "id", NULL, &localStatus);
- if (idRes == NULL) {
+ UResourceBundle *idRes = ures_getByKey(currencyRes, "id", nullptr, &localStatus);
+ if (idRes == nullptr) {
continue;
}
- const UChar *isoCode = ures_getString(idRes, &isoLength, &localStatus);
+ const char16_t *isoCode = ures_getString(idRes, &isoLength, &localStatus);
// get from date
UDate fromDate = U_DATE_MIN;
- UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", NULL, &localStatus);
+ UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", nullptr, &localStatus);
if (U_SUCCESS(localStatus)) {
int32_t fromLength = 0;
const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus);
- int64_t currDate64 = (int64_t)fromArray[0] << 32;
+ int64_t currDate64 = ((uint64_t)fromArray[0]) << 32;
currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
fromDate = (UDate)currDate64;
}
@@ -2112,12 +2137,12 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){
// get to date
UDate toDate = U_DATE_MAX;
localStatus = U_ZERO_ERROR;
- UResourceBundle *toRes = ures_getByKey(currencyRes, "to", NULL, &localStatus);
+ UResourceBundle *toRes = ures_getByKey(currencyRes, "to", nullptr, &localStatus);
if (U_SUCCESS(localStatus)) {
int32_t toLength = 0;
const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus);
- int64_t currDate64 = (int64_t)toArray[0] << 32;
+ int64_t currDate64 = (uint64_t)toArray[0] << 32;
currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
toDate = (UDate)currDate64;
}
@@ -2131,7 +2156,7 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){
entry->to = toDate;
localStatus = U_ZERO_ERROR;
- uhash_put(isoCodes, (UChar *)isoCode, entry, &localStatus);
+ uhash_put(isoCodes, (char16_t *)isoCode, entry, &localStatus);
}
} else {
*status = localStatus;
@@ -2146,8 +2171,8 @@ ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode* status){
}
static const UEnumeration gEnumCurrencyList = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ucurr_closeCurrencyList,
ucurr_countCurrencyList,
uenum_unextDefault,
@@ -2158,10 +2183,10 @@ U_CDECL_END
static void U_CALLCONV initIsoCodes(UErrorCode &status) {
- U_ASSERT(gIsoCodes == NULL);
+ U_ASSERT(gIsoCodes == nullptr);
ucln_common_registerCleanup(UCLN_COMMON_CURRENCY, currency_cleanup);
- UHashtable *isoCodes = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
+ UHashtable *isoCodes = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
if (U_FAILURE(status)) {
return;
}
@@ -2196,11 +2221,11 @@ static void populateCurrSymbolsEquiv(icu::Hashtable *hash, UErrorCode &status) {
}
static void U_CALLCONV initCurrSymbolsEquiv() {
- U_ASSERT(gCurrSymbolsEquiv == NULL);
+ U_ASSERT(gCurrSymbolsEquiv == nullptr);
UErrorCode status = U_ZERO_ERROR;
ucln_common_registerCleanup(UCLN_COMMON_CURRENCY, currency_cleanup);
icu::Hashtable *temp = new icu::Hashtable(status);
- if (temp == NULL) {
+ if (temp == nullptr) {
return;
}
if (U_FAILURE(status)) {
@@ -2217,22 +2242,22 @@ static void U_CALLCONV initCurrSymbolsEquiv() {
}
U_CAPI UBool U_EXPORT2
-ucurr_isAvailable(const UChar* isoCode, UDate from, UDate to, UErrorCode* eErrorCode) {
+ucurr_isAvailable(const char16_t* isoCode, UDate from, UDate to, UErrorCode* eErrorCode) {
umtx_initOnce(gIsoCodesInitOnce, &initIsoCodes, *eErrorCode);
if (U_FAILURE(*eErrorCode)) {
- return FALSE;
+ return false;
}
IsoCodeEntry* result = (IsoCodeEntry *) uhash_get(gIsoCodes, isoCode);
- if (result == NULL) {
- return FALSE;
+ if (result == nullptr) {
+ return false;
} else if (from > to) {
*eErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
} else if ((from > result->to) || (to < result->from)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static const icu::Hashtable* getCurrSymbolsEquiv() {
@@ -2242,20 +2267,20 @@ static const icu::Hashtable* getCurrSymbolsEquiv() {
U_CAPI UEnumeration * U_EXPORT2
ucurr_openISOCurrencies(uint32_t currType, UErrorCode *pErrorCode) {
- UEnumeration *myEnum = NULL;
+ UEnumeration *myEnum = nullptr;
UCurrencyContext *myContext;
myEnum = (UEnumeration*)uprv_malloc(sizeof(UEnumeration));
- if (myEnum == NULL) {
+ if (myEnum == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(myEnum, &gEnumCurrencyList, sizeof(UEnumeration));
myContext = (UCurrencyContext*)uprv_malloc(sizeof(UCurrencyContext));
- if (myContext == NULL) {
+ if (myContext == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
uprv_free(myEnum);
- return NULL;
+ return nullptr;
}
myContext->currType = currType;
myContext->listIdx = 0;
@@ -2270,7 +2295,7 @@ ucurr_countCurrencies(const char* locale,
{
int32_t currCount = 0;
- if (ec != NULL && U_SUCCESS(*ec))
+ if (ec != nullptr && U_SUCCESS(*ec))
{
// local variables
UErrorCode localStatus = U_ZERO_ERROR;
@@ -2304,21 +2329,21 @@ ucurr_countCurrencies(const char* locale,
for (int32_t i=0; i<ures_getSize(countryArray); i++)
{
// get the currency resource
- UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, NULL, &localStatus);
+ UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, nullptr, &localStatus);
// get the from date
int32_t fromLength = 0;
- UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", NULL, &localStatus);
+ UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", nullptr, &localStatus);
const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus);
- int64_t currDate64 = (int64_t)fromArray[0] << 32;
+ int64_t currDate64 = (int64_t)((uint64_t)(fromArray[0]) << 32);
currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
UDate fromDate = (UDate)currDate64;
if (ures_getSize(currencyRes)> 2)
{
int32_t toLength = 0;
- UResourceBundle *toRes = ures_getByKey(currencyRes, "to", NULL, &localStatus);
+ UResourceBundle *toRes = ures_getByKey(currencyRes, "to", nullptr, &localStatus);
const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus);
currDate64 = (int64_t)toArray[0] << 32;
@@ -2374,15 +2399,15 @@ U_CAPI int32_t U_EXPORT2
ucurr_forLocaleAndDate(const char* locale,
UDate date,
int32_t index,
- UChar* buff,
+ char16_t* buff,
int32_t buffCapacity,
UErrorCode* ec)
{
int32_t resLen = 0;
int32_t currIndex = 0;
- const UChar* s = NULL;
+ const char16_t* s = nullptr;
- if (ec != NULL && U_SUCCESS(*ec))
+ if (ec != nullptr && U_SUCCESS(*ec))
{
// check the arguments passed
if ((buff && buffCapacity) || !buffCapacity )
@@ -2426,22 +2451,22 @@ ucurr_forLocaleAndDate(const char* locale,
for (int32_t i=0; i<ures_getSize(countryArray); i++)
{
// get the currency resource
- UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, NULL, &localStatus);
+ UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, nullptr, &localStatus);
s = ures_getStringByKey(currencyRes, "id", &resLen, &localStatus);
// get the from date
int32_t fromLength = 0;
- UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", NULL, &localStatus);
+ UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", nullptr, &localStatus);
const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus);
- int64_t currDate64 = (int64_t)fromArray[0] << 32;
+ int64_t currDate64 = (int64_t)((uint64_t)fromArray[0] << 32);
currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
UDate fromDate = (UDate)currDate64;
if (ures_getSize(currencyRes)> 2)
{
int32_t toLength = 0;
- UResourceBundle *toRes = ures_getByKey(currencyRes, "to", NULL, &localStatus);
+ UResourceBundle *toRes = ures_getByKey(currencyRes, "to", nullptr, &localStatus);
const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus);
currDate64 = (int64_t)toArray[0] << 32;
@@ -2525,8 +2550,8 @@ ucurr_forLocaleAndDate(const char* locale,
}
static const UEnumeration defaultKeywordValues = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ulist_close_keyword_values_iterator,
ulist_count_keyword_values,
uenum_unextDefault,
@@ -2537,21 +2562,21 @@ 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);
+ ulocimp_getRegionForSupplementalData(locale, true, prefRegion, sizeof(prefRegion), status);
// Read value from supplementalData
UList *values = ulist_createEmptyList(status);
UList *otherValues = ulist_createEmptyList(status);
UEnumeration *en = (UEnumeration *)uprv_malloc(sizeof(UEnumeration));
- if (U_FAILURE(*status) || en == NULL) {
- if (en == NULL) {
+ if (U_FAILURE(*status) || en == nullptr) {
+ if (en == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
uprv_free(en);
}
ulist_deleteList(values);
ulist_deleteList(otherValues);
- return NULL;
+ return nullptr;
}
memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
en->context = values;
@@ -2570,7 +2595,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 = uprv_strcmp(region, prefRegion) == 0 ? true : false;
if (!isPrefRegion && commonlyUsed) {
// With commonlyUsed=true, we do not put
// currencies for other regions in the
@@ -2589,17 +2614,17 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key,
}
char *curID = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY);
int32_t curIDLength = ULOC_KEYWORDS_CAPACITY;
- if (curID == NULL) {
+ if (curID == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
break;
}
#if U_CHARSET_FAMILY==U_ASCII_FAMILY
- ures_getUTF8StringByKey(&curbndl, "id", curID, &curIDLength, TRUE, status);
+ ures_getUTF8StringByKey(&curbndl, "id", curID, &curIDLength, true, status);
/* optimize - use the utf-8 string */
#else
{
- const UChar* defString = ures_getStringByKey(&curbndl, "id", &curIDLength, status);
+ const char16_t* defString = ures_getStringByKey(&curbndl, "id", &curIDLength, status);
if(U_SUCCESS(*status)) {
if(curIDLength+1 > ULOC_KEYWORDS_CAPACITY) {
*status = U_BUFFER_OVERFLOW_ERROR;
@@ -2613,19 +2638,19 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key,
if (U_FAILURE(*status)) {
break;
}
- UBool hasTo = FALSE;
+ UBool hasTo = false;
ures_getByKey(&curbndl, "to", &to, status);
if (U_FAILURE(*status)) {
// Do nothing here...
*status = U_ZERO_ERROR;
} else {
- hasTo = TRUE;
+ hasTo = true;
}
if (isPrefRegion && !hasTo && !ulist_containsString(values, curID, (int32_t)uprv_strlen(curID))) {
// Currently active currency for the target country
- ulist_addItemEndList(values, curID, TRUE, status);
+ ulist_addItemEndList(values, curID, true, status);
} else if (!ulist_containsString(otherValues, curID, (int32_t)uprv_strlen(curID)) && !commonlyUsed) {
- ulist_addItemEndList(otherValues, curID, TRUE, status);
+ ulist_addItemEndList(otherValues, curID, true, status);
} else {
uprv_free(curID);
}
@@ -2638,17 +2663,17 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key,
// This could happen if no valid region is supplied in the input
// locale. In this case, we use the CLDR's default.
uenum_close(en);
- en = ucurr_getKeywordValuesForLocale(key, "und", TRUE, status);
+ en = ucurr_getKeywordValuesForLocale(key, "und", true, status);
}
} else {
// Consolidate the list
- char *value = NULL;
+ char *value = nullptr;
ulist_resetList(otherValues);
- while ((value = (char *)ulist_getNext(otherValues)) != NULL) {
+ while ((value = (char *)ulist_getNext(otherValues)) != nullptr) {
if (!ulist_containsString(values, value, (int32_t)uprv_strlen(value))) {
char *tmpValue = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY);
uprv_memcpy(tmpValue, value, uprv_strlen(value) + 1);
- ulist_addItemEndList(values, tmpValue, TRUE, status);
+ ulist_addItemEndList(values, tmpValue, true, status);
if (U_FAILURE(*status)) {
break;
}
@@ -2660,8 +2685,8 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key,
} else {
ulist_deleteList(values);
uprv_free(en);
- values = NULL;
- en = NULL;
+ values = nullptr;
+ en = nullptr;
}
ures_close(&to);
ures_close(&curbndl);
@@ -2676,7 +2701,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key,
U_CAPI int32_t U_EXPORT2
-ucurr_getNumericCode(const UChar* currency) {
+ucurr_getNumericCode(const char16_t* currency) {
int32_t code = 0;
if (currency && u_strlen(currency) == ISO_CURRENCY_CODE_LENGTH) {
UErrorCode status = U_ZERO_ERROR;
diff --git a/contrib/libs/icu/common/udata.cpp b/contrib/libs/icu/common/udata.cpp
index ec9c999cea4..76d970f3f28 100644
--- a/contrib/libs/icu/common/udata.cpp
+++ b/contrib/libs/icu/common/udata.cpp
@@ -104,12 +104,12 @@ static UDataMemory *udata_findCachedData(const char *path, UErrorCode &err);
* that they really need, reducing the size of binaries that take advantage
* of this.
*/
-static UDataMemory *gCommonICUDataArray[10] = { NULL }; // Access protected by icu global mutex.
+static UDataMemory *gCommonICUDataArray[10] = { nullptr }; // Access protected by icu global mutex.
-static u_atomic_int32_t gHaveTriedToLoadCommonData = ATOMIC_INT32_T_INITIALIZER(0); // See extendICUData().
+static u_atomic_int32_t gHaveTriedToLoadCommonData {0}; // See extendICUData().
-static UHashtable *gCommonDataCache = NULL; /* Global hash table of opened ICU data files. */
-static icu::UInitOnce gCommonDataCacheInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable *gCommonDataCache = nullptr; /* Global hash table of opened ICU data files. */
+static icu::UInitOnce gCommonDataCacheInitOnce {};
#if !defined(ICU_DATA_DIR_WINDOWS)
static UDataFileAccess gDataFileAccess = UDATA_DEFAULT_ACCESS; // Access not synchronized.
@@ -120,41 +120,41 @@ static UDataFileAccess gDataFileAccess = UDATA_NO_FILES;
#endif
static UBool U_CALLCONV
-udata_cleanup(void)
+udata_cleanup()
{
int32_t i;
if (gCommonDataCache) { /* Delete the cache of user data mappings. */
uhash_close(gCommonDataCache); /* Table owns the contents, and will delete them. */
- gCommonDataCache = NULL; /* Cleanup is not thread safe. */
+ gCommonDataCache = nullptr; /* Cleanup is not thread safe. */
}
gCommonDataCacheInitOnce.reset();
- for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray) && gCommonICUDataArray[i] != NULL; ++i) {
+ for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray) && gCommonICUDataArray[i] != nullptr; ++i) {
udata_close(gCommonICUDataArray[i]);
- gCommonICUDataArray[i] = NULL;
+ gCommonICUDataArray[i] = nullptr;
}
gHaveTriedToLoadCommonData = 0;
- return TRUE; /* Everything was cleaned up */
+ return true; /* Everything was cleaned up */
}
static UBool U_CALLCONV
findCommonICUDataByName(const char *inBasename, UErrorCode &err)
{
- UBool found = FALSE;
+ UBool found = false;
int32_t i;
UDataMemory *pData = udata_findCachedData(inBasename, err);
- if (U_FAILURE(err) || pData == NULL)
- return FALSE;
+ if (U_FAILURE(err) || pData == nullptr)
+ return false;
{
Mutex lock;
for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray); ++i) {
- if ((gCommonICUDataArray[i] != NULL) && (gCommonICUDataArray[i]->pHeader == pData->pHeader)) {
+ if ((gCommonICUDataArray[i] != nullptr) && (gCommonICUDataArray[i]->pHeader == pData->pHeader)) {
/* The data pointer is already in the array. */
- found = TRUE;
+ found = true;
break;
}
}
@@ -174,9 +174,9 @@ setCommonICUData(UDataMemory *pData, /* The new common data. Belongs to ca
{
UDataMemory *newCommonData = UDataMemory_createNewInstance(pErr);
int32_t i;
- UBool didUpdate = FALSE;
+ UBool didUpdate = false;
if (U_FAILURE(*pErr)) {
- return FALSE;
+ return false;
}
/* For the assignment, other threads must cleanly see either the old */
@@ -184,18 +184,18 @@ setCommonICUData(UDataMemory *pData, /* The new common data. Belongs to ca
/* deleted - someone may still have a pointer to it lying around in */
/* their locals. */
UDatamemory_assign(newCommonData, pData);
- umtx_lock(NULL);
+ umtx_lock(nullptr);
for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray); ++i) {
- if (gCommonICUDataArray[i] == NULL) {
+ if (gCommonICUDataArray[i] == nullptr) {
gCommonICUDataArray[i] = newCommonData;
- didUpdate = TRUE;
+ didUpdate = true;
break;
} else if (gCommonICUDataArray[i]->pHeader == pData->pHeader) {
/* The same data pointer is already in the array. */
break;
}
}
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
if (i == UPRV_LENGTHOF(gCommonICUDataArray) && warn) {
*pErr = U_USING_DEFAULT_WARNING;
@@ -216,7 +216,7 @@ setCommonICUDataPointer(const void *pData, UBool /*warn*/, UErrorCode *pErrorCod
UDataMemory_init(&tData);
UDataMemory_setData(&tData, pData);
udata_checkCommonData(&tData, pErrorCode);
- return setCommonICUData(&tData, FALSE, pErrorCode);
+ return setCommonICUData(&tData, false, pErrorCode);
}
#endif
@@ -224,7 +224,7 @@ setCommonICUDataPointer(const void *pData, UBool /*warn*/, UErrorCode *pErrorCod
static const char *
findBasename(const char *path) {
const char *basename=uprv_strrchr(path, U_FILE_SEP_CHAR);
- if(basename==NULL) {
+ if(basename==nullptr) {
return path;
} else {
return basename+1;
@@ -235,13 +235,13 @@ findBasename(const char *path) {
static const char *
packageNameFromPath(const char *path)
{
- if((path == NULL) || (*path == 0)) {
+ if((path == nullptr) || (*path == 0)) {
return U_ICUDATA_NAME;
}
path = findBasename(path);
- if((path == NULL) || (*path == 0)) {
+ if((path == nullptr) || (*path == 0)) {
return U_ICUDATA_NAME;
}
@@ -281,12 +281,12 @@ static void U_CALLCONV DataCacheElement_deleter(void *pDCEl) {
}
static void U_CALLCONV udata_initHashTable(UErrorCode &err) {
- U_ASSERT(gCommonDataCache == NULL);
- gCommonDataCache = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &err);
+ U_ASSERT(gCommonDataCache == nullptr);
+ gCommonDataCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &err);
if (U_FAILURE(err)) {
return;
}
- U_ASSERT(gCommonDataCache != NULL);
+ U_ASSERT(gCommonDataCache != nullptr);
uhash_setValueDeleter(gCommonDataCache, DataCacheElement_deleter);
ucln_common_registerCleanup(UCLN_COMMON_UDATA, udata_cleanup);
}
@@ -305,20 +305,20 @@ static UHashtable *udata_getHashTable(UErrorCode &err) {
static UDataMemory *udata_findCachedData(const char *path, UErrorCode &err)
{
UHashtable *htable;
- UDataMemory *retVal = NULL;
+ UDataMemory *retVal = nullptr;
DataCacheElement *el;
const char *baseName;
htable = udata_getHashTable(err);
if (U_FAILURE(err)) {
- return NULL;
+ return nullptr;
}
baseName = findBasename(path); /* Cache remembers only the base name, not the full path. */
- umtx_lock(NULL);
+ umtx_lock(nullptr);
el = (DataCacheElement *)uhash_get(htable, baseName);
- umtx_unlock(NULL);
- if (el != NULL) {
+ umtx_unlock(nullptr);
+ if (el != nullptr) {
retVal = el->item;
}
#ifdef UDATA_DEBUG
@@ -333,45 +333,45 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr
const char *baseName;
int32_t nameLen;
UHashtable *htable;
- DataCacheElement *oldValue = NULL;
+ DataCacheElement *oldValue = nullptr;
UErrorCode subErr = U_ZERO_ERROR;
htable = udata_getHashTable(*pErr);
if (U_FAILURE(*pErr)) {
- return NULL;
+ return nullptr;
}
/* Create a new DataCacheElement - the thingy we store in the hash table -
* and copy the supplied path and UDataMemoryItems into it.
*/
newElement = (DataCacheElement *)uprv_malloc(sizeof(DataCacheElement));
- if (newElement == NULL) {
+ if (newElement == nullptr) {
*pErr = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
newElement->item = UDataMemory_createNewInstance(pErr);
if (U_FAILURE(*pErr)) {
uprv_free(newElement);
- return NULL;
+ return nullptr;
}
UDatamemory_assign(newElement->item, item);
baseName = findBasename(path);
nameLen = (int32_t)uprv_strlen(baseName);
newElement->name = (char *)uprv_malloc(nameLen+1);
- if (newElement->name == NULL) {
+ if (newElement->name == nullptr) {
*pErr = U_MEMORY_ALLOCATION_ERROR;
uprv_free(newElement->item);
uprv_free(newElement);
- return NULL;
+ return nullptr;
}
uprv_strcpy(newElement->name, baseName);
/* Stick the new DataCacheElement into the hash table.
*/
- umtx_lock(NULL);
+ umtx_lock(nullptr);
oldValue = (DataCacheElement *)uhash_get(htable, path);
- if (oldValue != NULL) {
+ if (oldValue != nullptr) {
subErr = U_USING_DEFAULT_WARNING;
}
else {
@@ -381,7 +381,7 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr
newElement, /* Value */
&subErr);
}
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
#ifdef UDATA_DEBUG
fprintf(stderr, "Cache: [%s] <<< %p : %s. vFunc=%p\n", newElement->name,
@@ -393,7 +393,7 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr
uprv_free(newElement->name);
uprv_free(newElement->item);
uprv_free(newElement);
- return oldValue ? oldValue->item : NULL;
+ return oldValue ? oldValue->item : nullptr;
}
return newElement->item;
@@ -429,14 +429,14 @@ private:
CharString pathBuffer; /* output path for this it'ion */
CharString packageStub; /* example: "/icudt28b". Will ignore that leaf in set paths. */
- UBool checkLastFour; /* if TRUE then allow paths such as '/foo/myapp.dat'
+ UBool checkLastFour; /* if true then allow paths such as '/foo/myapp.dat'
* to match, checks last 4 chars of suffix with
* last 4 of path, then previous chars. */
};
/**
* @param iter The iterator to be initialized. Its current state does not matter.
- * @param inPath The full pathname to be iterated over. If NULL, defaults to U_ICUDATA_NAME
+ * @param inPath The full pathname to be iterated over. If nullptr, defaults to U_ICUDATA_NAME
* @param pkg Package which is being searched for, ex "icudt28l". Will ignore leaf directories such as /icudt28l
* @param item Item to be searched for. Can include full path, such as /a/b/foo.dat
* @param inSuffix Optional item suffix, if not-null (ex. ".dat") then 'path' can contain 'item' explicitly.
@@ -453,14 +453,14 @@ UDataPathIterator::UDataPathIterator(const char *inPath, const char *pkg,
fprintf(stderr, "SUFFIX1=%s PATH=%s\n", inSuffix, inPath);
#endif
/** Path **/
- if(inPath == NULL) {
+ if(inPath == nullptr) {
path = u_getDataDirectory();
} else {
path = inPath;
}
/** Package **/
- if(pkg != NULL) {
+ if(pkg != nullptr) {
packageStub.append(U_FILE_SEP_CHAR, *pErrorCode).append(pkg, *pErrorCode);
#ifdef UDATA_DEBUG
fprintf(stderr, "STUB=%s [%d]\n", packageStub.data(), packageStub.length());
@@ -483,7 +483,7 @@ UDataPathIterator::UDataPathIterator(const char *inPath, const char *pkg,
#endif
/** Suffix **/
- if(inSuffix != NULL) {
+ if(inSuffix != nullptr) {
suffix = inSuffix;
} else {
suffix = "";
@@ -501,7 +501,7 @@ UDataPathIterator::UDataPathIterator(const char *inPath, const char *pkg,
suffix.data(),
itemPath.data(),
nextPath,
- checkLastFour?"TRUE":"false");
+ checkLastFour?"true":"false");
#endif
}
@@ -510,21 +510,21 @@ UDataPathIterator::UDataPathIterator(const char *inPath, const char *pkg,
*
* @param iter The Iter to be used
* @param len If set, pointer to the length of the returned path, for convenience.
- * @return Pointer to the next path segment, or NULL if there are no more.
+ * @return Pointer to the next path segment, or nullptr if there are no more.
*/
const char *UDataPathIterator::next(UErrorCode *pErrorCode)
{
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- const char *currentPath = NULL;
+ const char *currentPath = nullptr;
int32_t pathLen = 0;
const char *pathBasename;
do
{
- if( nextPath == NULL ) {
+ if( nextPath == nullptr ) {
break;
}
currentPath = nextPath;
@@ -535,7 +535,7 @@ const char *UDataPathIterator::next(UErrorCode *pErrorCode)
} else {
/* fix up next for next time */
nextPath = uprv_strchr(currentPath, U_PATH_SEP_CHAR);
- if(nextPath == NULL) {
+ if(nextPath == nullptr) {
/* segment: entire path */
pathLen = (int32_t)uprv_strlen(currentPath);
} else {
@@ -568,7 +568,7 @@ const char *UDataPathIterator::next(UErrorCode *pErrorCode)
/* check for .dat files */
pathBasename = findBasename(pathBuffer.data());
- if(checkLastFour == TRUE &&
+ if(checkLastFour &&
(pathLen>=4) &&
uprv_strncmp(pathBuffer.data() +(pathLen-4), suffix.data(), 4)==0 && /* suffix matches */
uprv_strncmp(findBasename(pathBuffer.data()), basename, basenameLen)==0 && /* base matches */
@@ -626,7 +626,7 @@ const char *UDataPathIterator::next(UErrorCode *pErrorCode)
} while(path);
/* fell way off the end */
- return NULL;
+ return nullptr;
}
U_NAMESPACE_END
@@ -652,8 +652,8 @@ extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT;
* to its data package, if it is linked in.
*/
/*
-extern const void *uprv_getICUData_collation(void) ATTRIBUTE_WEAK;
-extern const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK;
+extern const void *uprv_getICUData_collation() ATTRIBUTE_WEAK;
+extern const void *uprv_getICUData_conversion() ATTRIBUTE_WEAK;
*/
/*----------------------------------------------------------------------*
@@ -668,7 +668,7 @@ extern const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK;
*----------------------------------------------------------------------*/
static UDataMemory *
openCommonData(const char *path, /* Path from OpenChoice? */
- int32_t commonDataIndex, /* ICU Data (index >= 0) if path == NULL */
+ int32_t commonDataIndex, /* ICU Data (index >= 0) if path == nullptr */
UErrorCode *pErrorCode)
{
UDataMemory tData;
@@ -676,7 +676,7 @@ openCommonData(const char *path, /* Path from OpenChoice? */
const char *inBasename;
if (U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
UDataMemory_init(&tData);
@@ -685,11 +685,11 @@ openCommonData(const char *path, /* Path from OpenChoice? */
if (commonDataIndex >= 0) {
/* "mini-cache" for common ICU data */
if(commonDataIndex >= UPRV_LENGTHOF(gCommonICUDataArray)) {
- return NULL;
+ return nullptr;
}
{
Mutex lock;
- if(gCommonICUDataArray[commonDataIndex] != NULL) {
+ if(gCommonICUDataArray[commonDataIndex] != nullptr) {
return gCommonICUDataArray[commonDataIndex];
}
#if !defined(ICU_DATA_DIR_WINDOWS)
@@ -698,7 +698,7 @@ openCommonData(const char *path, /* Path from OpenChoice? */
for(i = 0; i < commonDataIndex; ++i) {
if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) {
/* The linked-in data is already in the list. */
- return NULL;
+ return nullptr;
}
}
#endif
@@ -711,15 +711,15 @@ openCommonData(const char *path, /* Path from OpenChoice? */
*/
/*
if (uprv_getICUData_collation) {
- setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErrorCode);
+ setCommonICUDataPointer(uprv_getICUData_collation(), false, pErrorCode);
}
if (uprv_getICUData_conversion) {
- setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pErrorCode);
+ setCommonICUDataPointer(uprv_getICUData_conversion(), false, pErrorCode);
}
*/
#if !defined(ICU_DATA_DIR_WINDOWS)
// When using the Windows system data, we expect only a single data file.
- setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode);
+ setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, false, pErrorCode);
{
Mutex lock;
return gCommonICUDataArray[commonDataIndex];
@@ -746,14 +746,14 @@ openCommonData(const char *path, /* Path from OpenChoice? */
if (U_SUCCESS(*pErrorCode)) {
*pErrorCode=U_FILE_ACCESS_ERROR;
}
- return NULL;
+ return nullptr;
}
/* Is the requested common data file already open and cached? */
/* Note that the cache is keyed by the base name only. The rest of the path, */
/* if any, is not considered. */
UDataMemory *dataToReturn = udata_findCachedData(inBasename, *pErrorCode);
- if (dataToReturn != NULL || U_FAILURE(*pErrorCode)) {
+ if (dataToReturn != nullptr || U_FAILURE(*pErrorCode)) {
return dataToReturn;
}
@@ -761,9 +761,9 @@ openCommonData(const char *path, /* Path from OpenChoice? */
* Hunt it down, trying all the path locations
*/
- UDataPathIterator iter(u_getDataDirectory(), inBasename, path, ".dat", TRUE, pErrorCode);
+ UDataPathIterator iter(u_getDataDirectory(), inBasename, path, ".dat", true, pErrorCode);
- while ((UDataMemory_isLoaded(&tData)==FALSE) && (pathBuffer = iter.next(pErrorCode)) != NULL)
+ while ((UDataMemory_isLoaded(&tData)==false) && (pathBuffer = iter.next(pErrorCode)) != nullptr)
{
#ifdef UDATA_DEBUG
fprintf(stderr, "ocd: trying path %s - ", pathBuffer);
@@ -774,7 +774,7 @@ openCommonData(const char *path, /* Path from OpenChoice? */
#endif
}
if (U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
#if defined(OS390_STUBDATA) && defined(OS390BATCH)
@@ -789,12 +789,12 @@ openCommonData(const char *path, /* Path from OpenChoice? */
#endif
if (U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
if (!UDataMemory_isLoaded(&tData)) {
/* no common data */
*pErrorCode=U_FILE_ACCESS_ERROR;
- return NULL;
+ return nullptr;
}
/* we have mapped a file, check its header */
@@ -822,7 +822,7 @@ static UBool extendICUData(UErrorCode *pErr)
{
UDataMemory *pData;
UDataMemory copyPData;
- UBool didUpdate = FALSE;
+ UBool didUpdate = false;
/*
* There is a chance for a race condition here.
@@ -848,7 +848,7 @@ static UBool extendICUData(UErrorCode *pErr)
/* How about if there is no pData, eh... */
UDataMemory_init(&copyPData);
- if(pData != NULL) {
+ if(pData != nullptr) {
UDatamemory_assign(&copyPData, 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. */
@@ -859,7 +859,7 @@ static UBool extendICUData(UErrorCode *pErr)
didUpdate = /* no longer using this result */
setCommonICUData(&copyPData,/* The new common data. */
- FALSE, /* No warnings if write didn't happen */
+ false, /* No warnings if write didn't happen */
pErr); /* setCommonICUData honors errors; NOP if error set */
}
@@ -889,11 +889,11 @@ U_CAPI void U_EXPORT2
udata_setCommonData(const void *data, UErrorCode *pErrorCode) {
UDataMemory dataMemory;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
- if(data==NULL) {
+ if(data==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -906,7 +906,7 @@ udata_setCommonData(const void *data, UErrorCode *pErrorCode) {
/* we have good data */
/* Set it up as the ICU Common Data. */
- setCommonICUData(&dataMemory, TRUE, pErrorCode);
+ setCommonICUData(&dataMemory, true, pErrorCode);
}
/*---------------------------------------------------------------------------
@@ -919,10 +919,10 @@ udata_setAppData(const char *path, const void *data, UErrorCode *err)
{
UDataMemory udm;
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return;
}
- if(data==NULL) {
+ if(data==nullptr) {
*err=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -941,7 +941,7 @@ udata_setAppData(const char *path, const void *data, UErrorCode *err)
* acceptable to the app. *
* If the data is good, create and return a UDataMemory *
* object that can be returned to the application. *
- * Return NULL on any sort of failure. *
+ * Return nullptr on any sort of failure. *
* *
*----------------------------------------------------------------------------*/
static UDataMemory *
@@ -958,19 +958,19 @@ checkDataItem
UErrorCode *fatalErr /* Bad error, caller should return immediately */
)
{
- UDataMemory *rDataMem = NULL; /* the new UDataMemory, to be returned. */
+ UDataMemory *rDataMem = nullptr; /* the new UDataMemory, to be returned. */
if (U_FAILURE(*fatalErr)) {
- return NULL;
+ return nullptr;
}
if(pHeader->dataHeader.magic1==0xda &&
pHeader->dataHeader.magic2==0x27 &&
- (isAcceptable==NULL || isAcceptable(context, type, name, &pHeader->info))
+ (isAcceptable==nullptr || isAcceptable(context, type, name, &pHeader->info))
) {
rDataMem=UDataMemory_createNewInstance(fatalErr);
if (U_FAILURE(*fatalErr)) {
- return NULL;
+ return nullptr;
}
rDataMem->pHeader = pHeader;
} else {
@@ -999,9 +999,9 @@ static UDataMemory *doLoadFromIndividualFiles(const char *pkgName,
/* look in ind. files: package\nam.typ ========================= */
/* init path iterator for individual files */
- UDataPathIterator iter(dataPath, pkgName, path, tocEntryPathSuffix, FALSE, pErrorCode);
+ UDataPathIterator iter(dataPath, pkgName, path, tocEntryPathSuffix, false, pErrorCode);
- while ((pathBuffer = iter.next(pErrorCode)) != NULL)
+ while ((pathBuffer = iter.next(pErrorCode)) != nullptr)
{
#ifdef UDATA_DEBUG
fprintf(stderr, "UDATA: trying individual file %s\n", pathBuffer);
@@ -1009,7 +1009,7 @@ static UDataMemory *doLoadFromIndividualFiles(const char *pkgName,
if (uprv_mapFile(&dataMemory, pathBuffer, pErrorCode))
{
pEntryData = checkDataItem(dataMemory.pHeader, isAcceptable, context, type, name, subErrorCode, pErrorCode);
- if (pEntryData != NULL) {
+ if (pEntryData != nullptr) {
/* Data is good.
* Hand off ownership of the backing memory to the user's UDataMemory.
* and return it. */
@@ -1027,7 +1027,7 @@ static UDataMemory *doLoadFromIndividualFiles(const char *pkgName,
/* If we had a nasty error, bail out completely. */
if (U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
/* Otherwise remember that we found data but didn't like it for some reason */
@@ -1037,7 +1037,7 @@ static UDataMemory *doLoadFromIndividualFiles(const char *pkgName,
fprintf(stderr, "%s\n", UDataMemory_isLoaded(&dataMemory)?"LOADED":"not loaded");
#endif
}
- return NULL;
+ return nullptr;
}
/**
@@ -1055,7 +1055,7 @@ static UDataMemory *doLoadFromCommonData(UBool isICUData, const char * /*pkgName
const DataHeader *pHeader;
UDataMemory *pCommonData;
int32_t commonDataIndex;
- UBool checkedExtendedICUData = FALSE;
+ UBool checkedExtendedICUData = false;
/* try to get common data. The loop is for platforms such as the 390 that do
* not initially load the full set of ICU data. If the lookup of an ICU data item
* fails, the full (but slower to load) set is loaded, the and the loop repeats,
@@ -1068,7 +1068,7 @@ static UDataMemory *doLoadFromCommonData(UBool isICUData, const char * /*pkgName
for (commonDataIndex = isICUData ? 0 : -1;;) {
pCommonData=openCommonData(path, commonDataIndex, subErrorCode); /** search for pkg **/
- if(U_SUCCESS(*subErrorCode) && pCommonData!=NULL) {
+ if(U_SUCCESS(*subErrorCode) && pCommonData!=nullptr) {
int32_t length;
/* look up the data piece in the common data */
@@ -1077,15 +1077,15 @@ static UDataMemory *doLoadFromCommonData(UBool isICUData, const char * /*pkgName
fprintf(stderr, "%s: pHeader=%p - %s\n", tocEntryName, (void*) pHeader, u_errorName(*subErrorCode));
#endif
- if(pHeader!=NULL) {
+ if(pHeader!=nullptr) {
pEntryData = checkDataItem(pHeader, isAcceptable, context, type, name, subErrorCode, pErrorCode);
#ifdef UDATA_DEBUG
fprintf(stderr, "pEntryData=%p\n", (void*) pEntryData);
#endif
if (U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if (pEntryData != NULL) {
+ if (pEntryData != nullptr) {
pEntryData->length = length;
return pEntryData;
}
@@ -1094,20 +1094,20 @@ static UDataMemory *doLoadFromCommonData(UBool isICUData, const char * /*pkgName
// If we failed due to being out-of-memory, then stop early and report the error.
if (*subErrorCode == U_MEMORY_ALLOCATION_ERROR) {
*pErrorCode = *subErrorCode;
- return NULL;
+ return nullptr;
}
/* Data wasn't found. If we were looking for an ICUData item and there is
* more data available, load it and try again,
* otherwise break out of this loop. */
if (!isICUData) {
- return NULL;
- } else if (pCommonData != NULL) {
+ return nullptr;
+ } else if (pCommonData != nullptr) {
++commonDataIndex; /* try the next data package */
} else if ((!checkedExtendedICUData) && extendICUData(subErrorCode)) {
- checkedExtendedICUData = TRUE;
- /* try this data package slot again: it changed from NULL to non-NULL */
+ checkedExtendedICUData = true;
+ /* try this data package slot again: it changed from nullptr to non-nullptr */
} else {
- return NULL;
+ return nullptr;
}
}
}
@@ -1160,7 +1160,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
UDataMemoryIsAcceptable *isAcceptable, void *context,
UErrorCode *pErrorCode)
{
- UDataMemory *retVal = NULL;
+ UDataMemory *retVal = nullptr;
const char *dataPath;
@@ -1169,30 +1169,30 @@ doOpenChoice(const char *path, const char *type, const char *name,
UErrorCode subErrorCode=U_ZERO_ERROR;
const char *treeChar;
- UBool isICUData = FALSE;
+ UBool isICUData = false;
FileTracer::traceOpen(path, type, name);
/* Is this path ICU data? */
- if(path == NULL ||
+ if(path == nullptr ||
!strcmp(path, U_ICUDATA_ALIAS) || /* "ICUDATA" */
!uprv_strncmp(path, U_ICUDATA_NAME U_TREE_SEPARATOR_STRING, /* "icudt26e-" */
uprv_strlen(U_ICUDATA_NAME U_TREE_SEPARATOR_STRING)) ||
!uprv_strncmp(path, U_ICUDATA_ALIAS U_TREE_SEPARATOR_STRING, /* "ICUDATA-" */
uprv_strlen(U_ICUDATA_ALIAS U_TREE_SEPARATOR_STRING))) {
- isICUData = TRUE;
+ isICUData = true;
}
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) /* Windows: try "foo\bar" and "foo/bar" */
/* remap from alternate path char to the main one */
CharString altSepPath;
if(path) {
- if(uprv_strchr(path,U_FILE_ALT_SEP_CHAR) != NULL) {
+ if(uprv_strchr(path,U_FILE_ALT_SEP_CHAR) != nullptr) {
altSepPath.append(path, *pErrorCode);
char *p;
- while ((p = uprv_strchr(altSepPath.data(), U_FILE_ALT_SEP_CHAR)) != NULL) {
+ while ((p = uprv_strchr(altSepPath.data(), U_FILE_ALT_SEP_CHAR)) != nullptr) {
*p = U_FILE_SEP_CHAR;
}
#if defined (UDATA_DEBUG)
@@ -1210,7 +1210,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
CharString treeName;
/* ======= Set up strings */
- if(path==NULL) {
+ if(path==nullptr) {
pkgName.append(U_ICUDATA_NAME, *pErrorCode);
} else {
const char *pkg;
@@ -1232,7 +1232,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
pkgName.append(U_ICUDATA_NAME, *pErrorCode);
} else {
pkgName.append(path, (int32_t)(treeChar-path), *pErrorCode);
- if (first == NULL) {
+ if (first == nullptr) {
/*
This user data has no path, but there is a tree name.
Look up the correct path from the data cache later.
@@ -1271,7 +1271,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
tocEntryName.append(U_TREE_ENTRY_SEP_CHAR, *pErrorCode).append(name, *pErrorCode);
tocEntryPath.append(U_FILE_SEP_CHAR, *pErrorCode).append(name, *pErrorCode);
- if(type!=NULL && *type!=0) {
+ if(type!=nullptr && *type!=0) {
tocEntryName.append(".", *pErrorCode).append(type, *pErrorCode);
tocEntryPath.append(".", *pErrorCode).append(type, *pErrorCode);
}
@@ -1284,7 +1284,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
#endif
#if !defined(ICU_DATA_DIR_WINDOWS)
- if(path == NULL) {
+ if(path == nullptr) {
path = COMMON_DATA_NAME; /* "icudt26e" */
}
#else
@@ -1309,7 +1309,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
#endif
retVal = doLoadFromIndividualFiles(/* pkgName.data() */ "", tzFilesDir, tocEntryPathSuffix,
/* path */ "", type, name, isAcceptable, context, &subErrorCode, pErrorCode);
- if((retVal != NULL) || U_FAILURE(*pErrorCode)) {
+ if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
return retVal;
}
}
@@ -1324,7 +1324,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
retVal = doLoadFromCommonData(isICUData,
pkgName.data(), dataPath, tocEntryPathSuffix, tocEntryName.data(),
path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
- if((retVal != NULL) || U_FAILURE(*pErrorCode)) {
+ if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
return retVal;
}
}
@@ -1339,7 +1339,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
if ((dataPath && *dataPath) || !isICUData) {
retVal = doLoadFromIndividualFiles(pkgName.data(), dataPath, tocEntryPathSuffix,
path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
- if((retVal != NULL) || U_FAILURE(*pErrorCode)) {
+ if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
return retVal;
}
}
@@ -1354,7 +1354,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
retVal = doLoadFromCommonData(isICUData,
pkgName.data(), dataPath, tocEntryPathSuffix, tocEntryName.data(),
path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
- if((retVal != NULL) || U_FAILURE(*pErrorCode)) {
+ if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
return retVal;
}
}
@@ -1369,7 +1369,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
retVal = doLoadFromCommonData(isICUData,
pkgName.data(), "", tocEntryPathSuffix, tocEntryName.data(),
path, type, name, isAcceptable, context, &subErrorCode, pErrorCode);
- if((retVal != NULL) || U_FAILURE(*pErrorCode)) {
+ if((retVal != nullptr) || U_FAILURE(*pErrorCode)) {
return retVal;
}
}
@@ -1395,17 +1395,17 @@ U_CAPI UDataMemory * U_EXPORT2
udata_open(const char *path, const char *type, const char *name,
UErrorCode *pErrorCode) {
#ifdef UDATA_DEBUG
- fprintf(stderr, "udata_open(): Opening: %s : %s . %s\n", (path?path:"NULL"), name, type);
+ fprintf(stderr, "udata_open(): Opening: %s : %s . %s\n", (path?path:"nullptr"), name, type);
fflush(stderr);
#endif
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
- } else if(name==NULL || *name==0) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
+ } else if(name==nullptr || *name==0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
} else {
- return doOpenChoice(path, type, name, NULL, NULL, pErrorCode);
+ return doOpenChoice(path, type, name, nullptr, nullptr, pErrorCode);
}
}
@@ -1416,14 +1416,14 @@ udata_openChoice(const char *path, const char *type, const char *name,
UDataMemoryIsAcceptable *isAcceptable, void *context,
UErrorCode *pErrorCode) {
#ifdef UDATA_DEBUG
- fprintf(stderr, "udata_openChoice(): Opening: %s : %s . %s\n", (path?path:"NULL"), name, type);
+ fprintf(stderr, "udata_openChoice(): Opening: %s : %s . %s\n", (path?path:"nullptr"), name, type);
#endif
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
- } else if(name==NULL || *name==0 || isAcceptable==NULL) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
+ } else if(name==nullptr || *name==0 || isAcceptable==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
} else {
return doOpenChoice(path, type, name, isAcceptable, context, pErrorCode);
}
@@ -1433,8 +1433,8 @@ udata_openChoice(const char *path, const char *type, const char *name,
U_CAPI void U_EXPORT2
udata_getInfo(UDataMemory *pData, UDataInfo *pInfo) {
- if(pInfo!=NULL) {
- if(pData!=NULL && pData->pHeader!=NULL) {
+ if(pInfo!=nullptr) {
+ if(pData!=nullptr && pData->pHeader!=nullptr) {
const UDataInfo *info=&pData->pHeader->info;
uint16_t dataInfoSize=udata_getInfoSize(info);
if(pInfo->size>dataInfoSize) {
diff --git a/contrib/libs/icu/common/udatamem.cpp b/contrib/libs/icu/common/udatamem.cpp
index 6bf7c01235c..02be852320d 100644
--- a/contrib/libs/icu/common/udatamem.cpp
+++ b/contrib/libs/icu/common/udatamem.cpp
@@ -42,14 +42,14 @@ U_CFUNC UDataMemory *UDataMemory_createNewInstance(UErrorCode *pErr) {
UDataMemory *This;
if (U_FAILURE(*pErr)) {
- return NULL;
+ return nullptr;
}
This = (UDataMemory *)uprv_malloc(sizeof(UDataMemory));
- if (This == NULL) {
+ if (This == nullptr) {
*pErr = U_MEMORY_ALLOCATION_ERROR; }
else {
UDataMemory_init(This);
- This->heapAllocated = TRUE;
+ This->heapAllocated = true;
}
return This;
}
@@ -59,7 +59,7 @@ U_CFUNC const DataHeader *
UDataMemory_normalizeDataPointer(const void *p) {
/* allow the data to be optionally prepended with an alignment-forcing double value */
const DataHeader *pdh = (const DataHeader *)p;
- if(pdh==NULL || (pdh->dataHeader.magic1==0xda && pdh->dataHeader.magic2==0x27)) {
+ if(pdh==nullptr || (pdh->dataHeader.magic1==0xda && pdh->dataHeader.magic2==0x27)) {
return pdh;
} else {
#if U_PLATFORM == U_PF_OS400
@@ -90,7 +90,7 @@ U_CFUNC void UDataMemory_setData (UDataMemory *This, const void *dataAddr) {
U_CAPI void U_EXPORT2
udata_close(UDataMemory *pData) {
- if(pData!=NULL) {
+ if(pData!=nullptr) {
uprv_unmapFile(pData);
if(pData->heapAllocated ) {
uprv_free(pData);
@@ -102,10 +102,10 @@ udata_close(UDataMemory *pData) {
U_CAPI const void * U_EXPORT2
udata_getMemory(UDataMemory *pData) {
- if(pData!=NULL && pData->pHeader!=NULL) {
+ if(pData!=nullptr && pData->pHeader!=nullptr) {
return (char *)(pData->pHeader)+udata_getHeaderSize(pData->pHeader);
} else {
- return NULL;
+ return nullptr;
}
}
@@ -131,7 +131,7 @@ udata_getMemory(UDataMemory *pData) {
*/
U_CAPI int32_t U_EXPORT2
udata_getLength(const UDataMemory *pData) {
- if(pData!=NULL && pData->pHeader!=NULL && pData->length>=0) {
+ if(pData!=nullptr && pData->pHeader!=nullptr && pData->length>=0) {
/*
* subtract the header size,
* return only the size of the actual data starting at udata_getMemory()
@@ -149,13 +149,13 @@ udata_getLength(const UDataMemory *pData) {
*/
U_CAPI const void * U_EXPORT2
udata_getRawMemory(const UDataMemory *pData) {
- if(pData!=NULL && pData->pHeader!=NULL) {
+ if(pData!=nullptr && pData->pHeader!=nullptr) {
return pData->pHeader;
} else {
- return NULL;
+ return nullptr;
}
}
U_CFUNC UBool UDataMemory_isLoaded(const UDataMemory *This) {
- return This->pHeader != NULL;
+ return This->pHeader != nullptr;
}
diff --git a/contrib/libs/icu/common/udatamem.h b/contrib/libs/icu/common/udatamem.h
index a05dd697568..3db2af43aad 100644
--- a/contrib/libs/icu/common/udatamem.h
+++ b/contrib/libs/icu/common/udatamem.h
@@ -44,7 +44,7 @@ struct UDataMemory {
int32_t length; /* Length of the data in bytes; -1 if unknown. */
};
-U_CFUNC UDataMemory *UDataMemory_createNewInstance(UErrorCode *pErr);
+U_CAPI UDataMemory* U_EXPORT2 UDataMemory_createNewInstance(UErrorCode *pErr);
U_CFUNC void UDatamemory_assign (UDataMemory *dest, UDataMemory *source);
U_CFUNC void UDataMemory_init (UDataMemory *This);
U_CFUNC UBool UDataMemory_isLoaded(const UDataMemory *This);
diff --git a/contrib/libs/icu/common/udataswp.cpp b/contrib/libs/icu/common/udataswp.cpp
index 86f302bd9c3..bbce1a8ecd7 100644
--- a/contrib/libs/icu/common/udataswp.cpp
+++ b/contrib/libs/icu/common/udataswp.cpp
@@ -38,10 +38,10 @@ uprv_swapArray16(const UDataSwapper *ds,
int32_t count;
uint16_t x;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length&1)!=0 || outData==NULL) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length&1)!=0 || outData==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -63,10 +63,10 @@ static int32_t U_CALLCONV
uprv_copyArray16(const UDataSwapper *ds,
const void *inData, int32_t length, void *outData,
UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length&1)!=0 || outData==NULL) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length&1)!=0 || outData==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -86,10 +86,10 @@ uprv_swapArray32(const UDataSwapper *ds,
int32_t count;
uint32_t x;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length&3)!=0 || outData==NULL) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length&3)!=0 || outData==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -111,10 +111,10 @@ static int32_t U_CALLCONV
uprv_copyArray32(const UDataSwapper *ds,
const void *inData, int32_t length, void *outData,
UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length&3)!=0 || outData==NULL) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length&3)!=0 || outData==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -133,10 +133,10 @@ uprv_swapArray64(const UDataSwapper *ds,
uint64_t *q;
int32_t count;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length&7)!=0 || outData==NULL) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length&7)!=0 || outData==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -160,10 +160,10 @@ static int32_t U_CALLCONV
uprv_copyArray64(const UDataSwapper *ds,
const void *inData, int32_t length, void *outData,
UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length&7)!=0 || outData==NULL) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length&7)!=0 || outData==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -236,10 +236,10 @@ udata_swapInvStringBlock(const UDataSwapper *ds,
const char *inChars;
int32_t stringsLength;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -273,7 +273,7 @@ udata_printError(const UDataSwapper *ds,
...) {
va_list args;
- if(ds->printError!=NULL) {
+ if(ds->printError!=nullptr) {
va_start(args, fmt);
ds->printError(ds->printErrorContext, fmt, args);
va_end(args);
@@ -290,10 +290,10 @@ udata_swapDataHeader(const UDataSwapper *ds,
uint16_t headerSize, infoSize;
/* argument checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<-1 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<-1 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -365,19 +365,19 @@ udata_openSwapper(UBool inIsBigEndian, uint8_t inCharset,
UErrorCode *pErrorCode) {
UDataSwapper *swapper;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
}
if(inCharset>U_EBCDIC_FAMILY || outCharset>U_EBCDIC_FAMILY) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
/* allocate the swapper */
swapper=(UDataSwapper *)uprv_malloc(sizeof(UDataSwapper));
- if(swapper==NULL) {
+ if(swapper==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(swapper, 0, sizeof(UDataSwapper));
@@ -423,15 +423,15 @@ udata_openSwapperForInputData(const void *data, int32_t length,
UBool inIsBigEndian;
int8_t inCharset;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
}
- if( data==NULL ||
+ if( data==nullptr ||
(length>=0 && length<(int32_t)sizeof(DataHeader)) ||
outCharset>U_EBCDIC_FAMILY
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
pHeader=(const DataHeader *)data;
diff --git a/contrib/libs/icu/common/uenum.cpp b/contrib/libs/icu/common/uenum.cpp
index 11d895ebcd7..7aab58c44c7 100644
--- a/contrib/libs/icu/common/uenum.cpp
+++ b/contrib/libs/icu/common/uenum.cpp
@@ -33,21 +33,21 @@ static const int32_t PAD = 8;
or reallocating it if at least 'capacity' bytes are not available. */
static void* _getBuffer(UEnumeration* en, int32_t capacity) {
- if (en->baseContext != NULL) {
+ if (en->baseContext != nullptr) {
if (((_UEnumBuffer*) en->baseContext)->len < capacity) {
capacity += PAD;
en->baseContext = uprv_realloc(en->baseContext,
sizeof(int32_t) + capacity);
- if (en->baseContext == NULL) {
- return NULL;
+ if (en->baseContext == nullptr) {
+ return nullptr;
}
((_UEnumBuffer*) en->baseContext)->len = capacity;
}
} else {
capacity += PAD;
en->baseContext = uprv_malloc(sizeof(int32_t) + capacity);
- if (en->baseContext == NULL) {
- return NULL;
+ if (en->baseContext == nullptr) {
+ return nullptr;
}
((_UEnumBuffer*) en->baseContext)->len = capacity;
}
@@ -59,7 +59,7 @@ U_CAPI void U_EXPORT2
uenum_close(UEnumeration* en)
{
if (en) {
- if (en->close != NULL) {
+ if (en->close != nullptr) {
if (en->baseContext) {
uprv_free(en->baseContext);
}
@@ -76,7 +76,7 @@ uenum_count(UEnumeration* en, UErrorCode* status)
if (!en || U_FAILURE(*status)) {
return -1;
}
- if (en->count != NULL) {
+ if (en->count != nullptr) {
return en->count(en, status);
} else {
*status = U_UNSUPPORTED_ERROR;
@@ -85,18 +85,18 @@ uenum_count(UEnumeration* en, UErrorCode* status)
}
/* Don't call this directly. Only uenum_unext should be calling this. */
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
uenum_unextDefault(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status)
{
- UChar *ustr = NULL;
+ char16_t *ustr = nullptr;
int32_t len = 0;
- if (en->next != NULL) {
+ if (en->next != nullptr) {
const char *cstr = en->next(en, &len, status);
- if (cstr != NULL) {
- ustr = (UChar*) _getBuffer(en, (len+1) * sizeof(UChar));
- if (ustr == NULL) {
+ if (cstr != nullptr) {
+ ustr = (char16_t*) _getBuffer(en, (len+1) * sizeof(char16_t));
+ if (ustr == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
u_charsToUChars(cstr, ustr, len+1);
@@ -117,39 +117,39 @@ uenum_nextDefault(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status)
{
- if (en->uNext != NULL) {
+ if (en->uNext != nullptr) {
char *tempCharVal;
- const UChar *tempUCharVal = en->uNext(en, resultLength, status);
- if (tempUCharVal == NULL) {
- return NULL;
+ const char16_t *tempUCharVal = en->uNext(en, resultLength, status);
+ if (tempUCharVal == nullptr) {
+ return nullptr;
}
tempCharVal = (char*)
_getBuffer(en, (*resultLength+1) * sizeof(char));
if (!tempCharVal) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
u_UCharsToChars(tempUCharVal, tempCharVal, *resultLength + 1);
return tempCharVal;
} else {
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
}
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
uenum_unext(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status)
{
if (!en || U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (en->uNext != NULL) {
+ if (en->uNext != nullptr) {
return en->uNext(en, resultLength, status);
} else {
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
}
@@ -159,10 +159,10 @@ uenum_next(UEnumeration* en,
UErrorCode* status)
{
if (!en || U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (en->next != NULL) {
- if (resultLength != NULL) {
+ if (en->next != nullptr) {
+ if (resultLength != nullptr) {
return en->next(en, resultLength, status);
}
else {
@@ -171,7 +171,7 @@ uenum_next(UEnumeration* en,
}
} else {
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
}
@@ -181,7 +181,7 @@ uenum_reset(UEnumeration* en, UErrorCode* status)
if (!en || U_FAILURE(*status)) {
return;
}
- if (en->reset != NULL) {
+ if (en->reset != nullptr) {
en->reset(en, status);
} else {
*status = U_UNSUPPORTED_ERROR;
diff --git a/contrib/libs/icu/common/uhash.cpp b/contrib/libs/icu/common/uhash.cpp
index 2e331b71722..4d92dfa93fe 100644
--- a/contrib/libs/icu/common/uhash.cpp
+++ b/contrib/libs/icu/common/uhash.cpp
@@ -44,9 +44,9 @@
* The central function is _uhash_find(). This function looks for a
* slot matching the given key and hashcode. If one is found, it
* returns a pointer to that slot. If the table is full, and no match
- * is found, it returns NULL -- in theory. This would make the code
+ * is found, it returns nullptr -- in theory. This would make the code
* more complicated, since all callers of _uhash_find() would then
- * have to check for a NULL result. To keep this from happening, we
+ * have to check for a nullptr result. To keep this from happening, we
* don't allow the table to fill. When there is only one
* empty/deleted slot left, uhash_put() will refuse to increase the
* count, and fail. This simplifies the code. In practice, one will
@@ -120,10 +120,10 @@ static const float RESIZE_POLICY_RATIO_TABLE[6] = {
/* This macro expects a UHashTok.pointer as its keypointer and
valuepointer parameters */
#define HASH_DELETE_KEY_VALUE(hash, keypointer, valuepointer) UPRV_BLOCK_MACRO_BEGIN { \
- if (hash->keyDeleter != NULL && keypointer != NULL) { \
+ if (hash->keyDeleter != nullptr && keypointer != nullptr) { \
(*hash->keyDeleter)(keypointer); \
} \
- if (hash->valueDeleter != NULL && valuepointer != NULL) { \
+ if (hash->valueDeleter != nullptr && valuepointer != nullptr) { \
(*hash->valueDeleter)(valuepointer); \
} \
} UPRV_BLOCK_MACRO_END
@@ -148,16 +148,16 @@ _uhash_setElement(UHashtable *hash, UHashElement* e,
UHashTok key, UHashTok value, int8_t hint) {
UHashTok oldValue = e->value;
- if (hash->keyDeleter != NULL && e->key.pointer != NULL &&
+ if (hash->keyDeleter != nullptr && e->key.pointer != nullptr &&
e->key.pointer != key.pointer) { /* Avoid double deletion */
(*hash->keyDeleter)(e->key.pointer);
}
- if (hash->valueDeleter != NULL) {
- if (oldValue.pointer != NULL &&
+ if (hash->valueDeleter != nullptr) {
+ if (oldValue.pointer != nullptr &&
oldValue.pointer != value.pointer) { /* Avoid double deletion */
(*hash->valueDeleter)(oldValue.pointer);
}
- oldValue.pointer = NULL;
+ oldValue.pointer = nullptr;
}
/* Compilers should copy the UHashTok union correctly, but even if
* they do, memory heap tools (e.g. BoundsChecker) can get
@@ -187,13 +187,13 @@ _uhash_internalRemoveElement(UHashtable *hash, UHashElement* e) {
UHashTok empty;
U_ASSERT(!IS_EMPTY_OR_DELETED(e->hashcode));
--hash->count;
- empty.pointer = NULL; empty.integer = 0;
+ empty.pointer = nullptr; empty.integer = 0;
return _uhash_setElement(hash, e, HASH_DELETED, empty, empty, 0);
}
static void
_uhash_internalSetResizePolicy(UHashtable *hash, enum UHashResizePolicy policy) {
- U_ASSERT(hash != NULL);
+ U_ASSERT(hash != nullptr);
U_ASSERT(((int32_t)policy) >= 0);
U_ASSERT(((int32_t)policy) < 3);
hash->lowWaterRatio = RESIZE_POLICY_RATIO_TABLE[policy * 2];
@@ -227,12 +227,12 @@ _uhash_allocate(UHashtable *hash,
p = hash->elements = (UHashElement*)
uprv_malloc(sizeof(UHashElement) * hash->length);
- if (hash->elements == NULL) {
+ if (hash->elements == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- emptytok.pointer = NULL; /* Only one of these two is needed */
+ emptytok.pointer = nullptr; /* Only one of these two is needed */
emptytok.integer = 0; /* but we don't know which one. */
limit = p + hash->length;
@@ -256,22 +256,22 @@ _uhash_init(UHashtable *result,
int32_t primeIndex,
UErrorCode *status)
{
- if (U_FAILURE(*status)) return NULL;
- U_ASSERT(keyHash != NULL);
- U_ASSERT(keyComp != NULL);
+ if (U_FAILURE(*status)) return nullptr;
+ U_ASSERT(keyHash != nullptr);
+ U_ASSERT(keyComp != nullptr);
result->keyHasher = keyHash;
result->keyComparator = keyComp;
result->valueComparator = valueComp;
- result->keyDeleter = NULL;
- result->valueDeleter = NULL;
- result->allocated = FALSE;
+ result->keyDeleter = nullptr;
+ result->valueDeleter = nullptr;
+ result->allocated = false;
_uhash_internalSetResizePolicy(result, U_GROW);
_uhash_allocate(result, primeIndex, status);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return result;
@@ -285,20 +285,20 @@ _uhash_create(UHashFunction *keyHash,
UErrorCode *status) {
UHashtable *result;
- if (U_FAILURE(*status)) return NULL;
+ if (U_FAILURE(*status)) return nullptr;
result = (UHashtable*) uprv_malloc(sizeof(UHashtable));
- if (result == NULL) {
+ if (result == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
_uhash_init(result, keyHash, keyComp, valueComp, primeIndex, status);
- result->allocated = TRUE;
+ result->allocated = true;
if (U_FAILURE(*status)) {
uprv_free(result);
- return NULL;
+ return nullptr;
}
return result;
@@ -323,7 +323,7 @@ _uhash_create(UHashFunction *keyHash,
* values so that the searches stop within a reasonable amount of time.
* This can be changed by changing the high/low water marks.
*
- * In theory, this function can return NULL, if it is full (no empty
+ * In theory, this function can return nullptr, if it is full (no empty
* or deleted slots) and if no matching key is found. In practice, we
* prevent this elsewhere (in uhash_put) by making sure the last slot
* in the table is never filled.
@@ -424,7 +424,7 @@ _uhash_rehash(UHashtable *hash, UErrorCode *status) {
for (i = oldLength - 1; i >= 0; --i) {
if (!IS_EMPTY_OR_DELETED(old[i].hashcode)) {
UHashElement *e = _uhash_find(hash, old[i].key, old[i].hashcode);
- U_ASSERT(e != NULL);
+ U_ASSERT(e != nullptr);
U_ASSERT(e->hashcode == HASH_EMPTY);
e->key = old[i].key;
e->value = old[i].value;
@@ -448,8 +448,8 @@ _uhash_remove(UHashtable *hash,
*/
UHashTok result;
UHashElement* e = _uhash_find(hash, key, hash->keyHasher(key));
- U_ASSERT(e != NULL);
- result.pointer = NULL;
+ U_ASSERT(e != nullptr);
+ result.pointer = nullptr;
result.integer = 0;
if (!IS_EMPTY_OR_DELETED(e->hashcode)) {
result = _uhash_internalRemoveElement(hash, e);
@@ -470,7 +470,7 @@ _uhash_put(UHashtable *hash,
/* Put finds the position in the table for the new value. If the
* key is already in the table, it is deleted, if there is a
- * non-NULL keyDeleter. Then the key, the hash and the value are
+ * non-nullptr keyDeleter. Then the key, the hash and the value are
* all put at the position in their respective arrays.
*/
int32_t hashcode;
@@ -480,12 +480,12 @@ _uhash_put(UHashtable *hash,
if (U_FAILURE(*status)) {
goto err;
}
- U_ASSERT(hash != NULL);
+ U_ASSERT(hash != nullptr);
if ((hint & HINT_VALUE_POINTER) ?
- value.pointer == NULL :
+ value.pointer == nullptr :
value.integer == 0 && (hint & HINT_ALLOW_ZERO) == 0) {
- /* Disallow storage of NULL values, since NULL is returned by
- * get() to indicate an absent key. Storing NULL == removing.
+ /* Disallow storage of nullptr values, since nullptr is returned by
+ * get() to indicate an absent key. Storing nullptr == removing.
*/
return _uhash_remove(hash, key);
}
@@ -498,12 +498,12 @@ _uhash_put(UHashtable *hash,
hashcode = (*hash->keyHasher)(key);
e = _uhash_find(hash, key, hashcode);
- U_ASSERT(e != NULL);
+ U_ASSERT(e != nullptr);
if (IS_EMPTY_OR_DELETED(e->hashcode)) {
/* Important: We must never actually fill the table up. If we
- * do so, then _uhash_find() will return NULL, and we'll have
- * to check for NULL after every call to _uhash_find(). To
+ * do so, then _uhash_find() will return nullptr, and we'll have
+ * to check for nullptr after every call to _uhash_find(). To
* avoid this we make sure there is always at least one empty
* or deleted slot in the table. This only is a problem if we
* are out of memory and rehash isn't working.
@@ -518,18 +518,18 @@ _uhash_put(UHashtable *hash,
}
/* We must in all cases handle storage properly. If there was an
- * old key, then it must be deleted (if the deleter != NULL).
+ * old key, then it must be deleted (if the deleter != nullptr).
* Make hashcodes stored in table positive.
*/
return _uhash_setElement(hash, e, hashcode & 0x7FFFFFFF, key, value, hint);
err:
- /* If the deleters are non-NULL, this method adopts its key and/or
+ /* If the deleters are non-nullptr, this method adopts its key and/or
* value arguments, and we must be sure to delete the key and/or
* value in all cases, even upon failure.
*/
HASH_DELETE_KEY_VALUE(hash, key.pointer, value.pointer);
- emptytok.pointer = NULL; emptytok.integer = 0;
+ emptytok.pointer = nullptr; emptytok.integer = 0;
return emptytok;
}
@@ -591,19 +591,19 @@ uhash_initSize(UHashtable *fillinResult,
U_CAPI void U_EXPORT2
uhash_close(UHashtable *hash) {
- if (hash == NULL) {
+ if (hash == nullptr) {
return;
}
- if (hash->elements != NULL) {
- if (hash->keyDeleter != NULL || hash->valueDeleter != NULL) {
+ if (hash->elements != nullptr) {
+ if (hash->keyDeleter != nullptr || hash->valueDeleter != nullptr) {
int32_t pos=UHASH_FIRST;
UHashElement *e;
- while ((e = (UHashElement*) uhash_nextElement(hash, &pos)) != NULL) {
+ while ((e = (UHashElement*) uhash_nextElement(hash, &pos)) != nullptr) {
HASH_DELETE_KEY_VALUE(hash, e->key.pointer, e->value.pointer);
}
}
uprv_free(hash->elements);
- hash->elements = NULL;
+ hash->elements = nullptr;
}
if (hash->allocated) {
uprv_free(hash);
@@ -828,9 +828,9 @@ U_CAPI void U_EXPORT2
uhash_removeAll(UHashtable *hash) {
int32_t pos = UHASH_FIRST;
const UHashElement *e;
- U_ASSERT(hash != NULL);
+ U_ASSERT(hash != nullptr);
if (hash->count != 0) {
- while ((e = uhash_nextElement(hash, &pos)) != NULL) {
+ while ((e = uhash_nextElement(hash, &pos)) != nullptr) {
uhash_removeElement(hash, e);
}
}
@@ -866,7 +866,7 @@ uhash_find(const UHashtable *hash, const void* key) {
const UHashElement *e;
keyholder.pointer = (void*) key;
e = _uhash_find(hash, keyholder, hash->keyHasher(keyholder));
- return IS_EMPTY_OR_DELETED(e->hashcode) ? NULL : e;
+ return IS_EMPTY_OR_DELETED(e->hashcode) ? nullptr : e;
}
U_CAPI const UHashElement* U_EXPORT2
@@ -875,7 +875,7 @@ uhash_nextElement(const UHashtable *hash, int32_t *pos) {
* EMPTY and not DELETED.
*/
int32_t i;
- U_ASSERT(hash != NULL);
+ U_ASSERT(hash != nullptr);
for (i = *pos + 1; i < hash->length; ++i) {
if (!IS_EMPTY_OR_DELETED(hash->elements[i].hashcode)) {
*pos = i;
@@ -884,18 +884,18 @@ uhash_nextElement(const UHashtable *hash, int32_t *pos) {
}
/* No more elements */
- return NULL;
+ return nullptr;
}
U_CAPI void* U_EXPORT2
uhash_removeElement(UHashtable *hash, const UHashElement* e) {
- U_ASSERT(hash != NULL);
- U_ASSERT(e != NULL);
+ U_ASSERT(hash != nullptr);
+ U_ASSERT(e != nullptr);
if (!IS_EMPTY_OR_DELETED(e->hashcode)) {
UHashElement *nce = (UHashElement *)e;
return _uhash_internalRemoveElement(hash, nce).pointer;
}
- return NULL;
+ return nullptr;
}
/********************************************************************
@@ -928,20 +928,20 @@ uhash_tokp(void* p) {
U_CAPI int32_t U_EXPORT2
uhash_hashUChars(const UHashTok key) {
- const UChar *s = (const UChar *)key.pointer;
- return s == NULL ? 0 : ustr_hashUCharsN(s, u_strlen(s));
+ const char16_t *s = (const char16_t *)key.pointer;
+ return s == nullptr ? 0 : ustr_hashUCharsN(s, u_strlen(s));
}
U_CAPI int32_t U_EXPORT2
uhash_hashChars(const UHashTok key) {
const char *s = (const char *)key.pointer;
- return s == NULL ? 0 : static_cast<int32_t>(ustr_hashCharsN(s, static_cast<int32_t>(uprv_strlen(s))));
+ return s == nullptr ? 0 : static_cast<int32_t>(ustr_hashCharsN(s, static_cast<int32_t>(uprv_strlen(s))));
}
U_CAPI int32_t U_EXPORT2
uhash_hashIChars(const UHashTok key) {
const char *s = (const char *)key.pointer;
- return s == NULL ? 0 : ustr_hashICharsN(s, static_cast<int32_t>(uprv_strlen(s)));
+ return s == nullptr ? 0 : ustr_hashICharsN(s, static_cast<int32_t>(uprv_strlen(s)));
}
U_CAPI UBool U_EXPORT2
@@ -949,7 +949,7 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){
int32_t count1, count2, pos, i;
if(hash1==hash2){
- return TRUE;
+ return true;
}
/*
@@ -960,22 +960,22 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){
* with 64-bit pointers and 32-bit integer hashes.
* A valueComparator is normally optional.
*/
- if (hash1==NULL || hash2==NULL ||
+ if (hash1==nullptr || hash2==nullptr ||
hash1->keyComparator != hash2->keyComparator ||
hash1->valueComparator != hash2->valueComparator ||
- hash1->valueComparator == NULL)
+ hash1->valueComparator == nullptr)
{
/*
Normally we would return an error here about incompatible hash tables,
- but we return FALSE instead.
+ but we return false instead.
*/
- return FALSE;
+ return false;
}
count1 = uhash_count(hash1);
count2 = uhash_count(hash2);
if(count1!=count2){
- return FALSE;
+ return false;
}
pos=UHASH_FIRST;
@@ -989,11 +989,11 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){
*/
const UHashElement* elem2 = _uhash_find(hash2, key1, hash2->keyHasher(key1));
const UHashTok val2 = elem2->value;
- if(hash1->valueComparator(val1, val2)==FALSE){
- return FALSE;
+ if(hash1->valueComparator(val1, val2)==false){
+ return false;
}
}
- return TRUE;
+ return true;
}
/********************************************************************
@@ -1002,13 +1002,13 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){
U_CAPI UBool U_EXPORT2
uhash_compareUChars(const UHashTok key1, const UHashTok key2) {
- const UChar *p1 = (const UChar*) key1.pointer;
- const UChar *p2 = (const UChar*) key2.pointer;
+ const char16_t *p1 = (const char16_t*) key1.pointer;
+ const char16_t *p2 = (const char16_t*) key2.pointer;
if (p1 == p2) {
- return TRUE;
+ return true;
}
- if (p1 == NULL || p2 == NULL) {
- return FALSE;
+ if (p1 == nullptr || p2 == nullptr) {
+ return false;
}
while (*p1 != 0 && *p1 == *p2) {
++p1;
@@ -1022,10 +1022,10 @@ uhash_compareChars(const UHashTok key1, const UHashTok key2) {
const char *p1 = (const char*) key1.pointer;
const char *p2 = (const char*) key2.pointer;
if (p1 == p2) {
- return TRUE;
+ return true;
}
- if (p1 == NULL || p2 == NULL) {
- return FALSE;
+ if (p1 == nullptr || p2 == nullptr) {
+ return false;
}
while (*p1 != 0 && *p1 == *p2) {
++p1;
@@ -1039,10 +1039,10 @@ uhash_compareIChars(const UHashTok key1, const UHashTok key2) {
const char *p1 = (const char*) key1.pointer;
const char *p2 = (const char*) key2.pointer;
if (p1 == p2) {
- return TRUE;
+ return true;
}
- if (p1 == NULL || p2 == NULL) {
- return FALSE;
+ if (p1 == nullptr || p2 == nullptr) {
+ return false;
}
while (*p1 != 0 && uprv_tolower(*p1) == uprv_tolower(*p2)) {
++p1;
diff --git a/contrib/libs/icu/common/uidna.cpp b/contrib/libs/icu/common/uidna.cpp
index ac2f9c3c8cd..949d128f93c 100644
--- a/contrib/libs/icu/common/uidna.cpp
+++ b/contrib/libs/icu/common/uidna.cpp
@@ -30,7 +30,7 @@
#include "sprpimpl.h"
/* it is official IDNA ACE Prefix is "xn--" */
-static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ;
+static const char16_t ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ;
#define ACE_PREFIX_LENGTH 4
#define MAX_LABEL_LENGTH 63
@@ -47,8 +47,8 @@ static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ;
#define CAPITAL_A 0x0041
#define CAPITAL_Z 0x005A
-inline static UChar
-toASCIILower(UChar ch){
+inline static char16_t
+toASCIILower(char16_t ch){
if(CAPITAL_A <= ch && ch <= CAPITAL_Z){
return ch + LOWER_CASE_DELTA;
}
@@ -56,23 +56,23 @@ toASCIILower(UChar ch){
}
inline static UBool
-startsWithPrefix(const UChar* src , int32_t srcLength){
+startsWithPrefix(const char16_t* src , int32_t srcLength){
if(srcLength < ACE_PREFIX_LENGTH){
- return FALSE;
+ return false;
}
for(int8_t i=0; i< ACE_PREFIX_LENGTH; i++){
if(toASCIILower(src[i]) != ACE_PREFIX[i]){
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
inline static int32_t
-compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len,
- const UChar* s2, int32_t s2Len){
+compareCaseInsensitiveASCII(const char16_t* s1, int32_t s1Len,
+ const char16_t* s2, int32_t s2Len){
int32_t minLength;
int32_t lengthResult;
@@ -92,7 +92,7 @@ compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len,
lengthResult = 0;
}
- UChar c1,c2;
+ char16_t c1,c2;
int32_t rc;
for(int32_t i =0;/* no condition */;i++) {
@@ -126,15 +126,15 @@ compareCaseInsensitiveASCII(const UChar* s1, int32_t s1Len,
* @return true if the char is a label separator
* @stable ICU 2.8
*/
-static inline UBool isLabelSeparator(UChar ch){
+static inline UBool isLabelSeparator(char16_t ch){
switch(ch){
case 0x002e:
case 0x3002:
case 0xFF0E:
case 0xFF61:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -142,14 +142,14 @@ static inline UBool isLabelSeparator(UChar ch){
// if *limit == separator then the length returned does not include
// the separtor.
static inline int32_t
-getNextSeparator(UChar *src, int32_t srcLength,
- UChar **limit, UBool *done){
+getNextSeparator(char16_t *src, int32_t srcLength,
+ char16_t **limit, UBool *done){
if(srcLength == -1){
int32_t i;
for(i=0 ; ;i++){
if(src[i] == 0){
*limit = src + i; // point to null
- *done = TRUE;
+ *done = true;
return i;
}
if(isLabelSeparator(src[i])){
@@ -169,15 +169,15 @@ getNextSeparator(UChar *src, int32_t srcLength,
// we have not found the delimiter
// if(i==srcLength)
*limit = src+srcLength;
- *done = TRUE;
+ *done = true;
return i;
}
}
-static inline UBool isLDHChar(UChar ch){
+static inline UBool isLDHChar(char16_t ch){
// high runner case
if(ch>0x007A){
- return FALSE;
+ return false;
}
//[\\u002D \\u0030-\\u0039 \\u0041-\\u005A \\u0061-\\u007A]
if( (ch==0x002D) ||
@@ -185,14 +185,14 @@ static inline UBool isLDHChar(UChar ch){
(0x0041 <= ch && ch <= 0x005A) ||
(0x0061 <= ch && ch <= 0x007A)
){
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static int32_t
-_internal_toASCII(const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+_internal_toASCII(const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UStringPrepProfile* nameprep,
UParseError* parseError,
@@ -200,21 +200,21 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
{
// TODO Revisit buffer handling. The label should not be over 63 ASCII characters. ICU4J may need to be updated too.
- UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE];
+ char16_t b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE];
//initialize pointers to stack buffers
- UChar *b1 = b1Stack, *b2 = b2Stack;
+ char16_t *b1 = b1Stack, *b2 = b2Stack;
int32_t b1Len=0, b2Len,
b1Capacity = MAX_LABEL_BUFFER_SIZE,
b2Capacity = MAX_LABEL_BUFFER_SIZE ,
reqLength=0;
int32_t namePrepOptions = ((options & UIDNA_ALLOW_UNASSIGNED) != 0) ? USPREP_ALLOW_UNASSIGNED: 0;
- UBool* caseFlags = NULL;
+ UBool* caseFlags = nullptr;
// the source contains all ascii codepoints
- UBool srcIsASCII = TRUE;
+ UBool srcIsASCII = true;
// assume the source contains all LDH codepoints
- UBool srcIsLDH = TRUE;
+ UBool srcIsLDH = true;
int32_t j=0;
@@ -228,8 +228,8 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
}
if(srcLength > b1Capacity){
- b1 = (UChar*) uprv_malloc(srcLength * U_SIZEOF_UCHAR);
- if(b1==NULL){
+ b1 = (char16_t*) uprv_malloc(srcLength * U_SIZEOF_UCHAR);
+ if(b1==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -239,13 +239,13 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
// step 1
for( j=0;j<srcLength;j++){
if(src[j] > 0x7F){
- srcIsASCII = FALSE;
+ srcIsASCII = false;
}
b1[b1Len++] = src[j];
}
// step 2 is performed only if the source contains non ASCII
- if(srcIsASCII == FALSE){
+ if(srcIsASCII == false){
// step 2
b1Len = usprep_prepare(nameprep, src, srcLength, b1, b1Capacity, namePrepOptions, parseError, status);
@@ -256,8 +256,8 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
if(b1 != b1Stack){
uprv_free(b1);
}
- b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
- if(b1==NULL){
+ b1 = (char16_t*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -277,29 +277,29 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
}
// for step 3 & 4
- srcIsASCII = TRUE;
+ srcIsASCII = true;
for( j=0;j<b1Len;j++){
// check if output of usprep_prepare is all ASCII
if(b1[j] > 0x7F){
- srcIsASCII = FALSE;
- }else if(isLDHChar(b1[j])==FALSE){ // if the char is in ASCII range verify that it is an LDH character
- srcIsLDH = FALSE;
+ srcIsASCII = false;
+ }else if(isLDHChar(b1[j])==false){ // if the char is in ASCII range verify that it is an LDH character
+ srcIsLDH = false;
failPos = j;
}
}
- if(useSTD3ASCIIRules == TRUE){
+ if(useSTD3ASCIIRules){
// verify 3a and 3b
// 3(a) Verify the absence of non-LDH ASCII code points; that is, the
// absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F.
// 3(b) Verify the absence of leading and trailing hyphen-minus; that
// is, the absence of U+002D at the beginning and end of the
// sequence.
- if( srcIsLDH == FALSE /* source at this point should not contain anyLDH characters */
+ if( srcIsLDH == false /* source at this point should not contain anyLDH characters */
|| b1[0] == HYPHEN || b1[b1Len-1] == HYPHEN){
*status = U_IDNA_STD3_ASCII_RULES_ERROR;
/* populate the parseError struct */
- if(srcIsLDH==FALSE){
+ if(srcIsLDH==false){
// failPos is always set the index of failure
uprv_syntaxError(b1,failPos, b1Len,parseError);
}else if(b1[0] == HYPHEN){
@@ -331,15 +331,15 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
// do not preserve the case flags for now!
// TODO: Preserve the case while implementing the RFE
// caseFlags = (UBool*) uprv_malloc(b1Len * sizeof(UBool));
- // uprv_memset(caseFlags,TRUE,b1Len);
+ // uprv_memset(caseFlags,true,b1Len);
b2Len = u_strToPunycode(b1,b1Len,b2,b2Capacity,caseFlags, status);
if(*status == U_BUFFER_OVERFLOW_ERROR){
// redo processing of string
/* we do not have enough room so grow the buffer*/
- b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
- if(b2 == NULL){
+ b2 = (char16_t*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2 == nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -391,8 +391,8 @@ CLEANUP:
}
static int32_t
-_internal_toUnicode(const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+_internal_toUnicode(const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UStringPrepProfile* nameprep,
UParseError* parseError,
@@ -404,20 +404,20 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
int32_t namePrepOptions = ((options & UIDNA_ALLOW_UNASSIGNED) != 0) ? USPREP_ALLOW_UNASSIGNED: 0;
// TODO Revisit buffer handling. The label should not be over 63 ASCII characters. ICU4J may need to be updated too.
- UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE], b3Stack[MAX_LABEL_BUFFER_SIZE];
+ char16_t b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE], b3Stack[MAX_LABEL_BUFFER_SIZE];
//initialize pointers to stack buffers
- UChar *b1 = b1Stack, *b2 = b2Stack, *b1Prime=NULL, *b3=b3Stack;
+ char16_t *b1 = b1Stack, *b2 = b2Stack, *b1Prime=nullptr, *b3=b3Stack;
int32_t b1Len = 0, b2Len, b1PrimeLen, b3Len,
b1Capacity = MAX_LABEL_BUFFER_SIZE,
b2Capacity = MAX_LABEL_BUFFER_SIZE,
b3Capacity = MAX_LABEL_BUFFER_SIZE,
reqLength=0;
- UBool* caseFlags = NULL;
+ UBool* caseFlags = nullptr;
- UBool srcIsASCII = TRUE;
- /*UBool srcIsLDH = TRUE;
+ UBool srcIsASCII = true;
+ /*UBool srcIsLDH = true;
int32_t failPos =0;*/
// step 1: find out if all the codepoints in src are ASCII
@@ -425,12 +425,12 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
srcLength = 0;
for(;src[srcLength]!=0;){
if(src[srcLength]> 0x7f){
- srcIsASCII = FALSE;
- }/*else if(isLDHChar(src[srcLength])==FALSE){
+ srcIsASCII = false;
+ }/*else if(isLDHChar(src[srcLength])==false){
// here we do not assemble surrogates
// since we know that LDH code points
// are in the ASCII range only
- srcIsLDH = FALSE;
+ srcIsLDH = false;
failPos = srcLength;
}*/
srcLength++;
@@ -438,13 +438,13 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
}else if(srcLength > 0){
for(int32_t j=0; j<srcLength; j++){
if(src[j]> 0x7f){
- srcIsASCII = FALSE;
+ srcIsASCII = false;
break;
- }/*else if(isLDHChar(src[j])==FALSE){
+ }/*else if(isLDHChar(src[j])==false){
// here we do not assemble surrogates
// since we know that LDH code points
// are in the ASCII range only
- srcIsLDH = FALSE;
+ srcIsLDH = false;
failPos = j;
}*/
}
@@ -452,14 +452,14 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
return 0;
}
- if(srcIsASCII == FALSE){
+ if(srcIsASCII == false){
// step 2: process the string
b1Len = usprep_prepare(nameprep, src, srcLength, b1, b1Capacity, namePrepOptions, parseError, status);
if(*status == U_BUFFER_OVERFLOW_ERROR){
// redo processing of string
/* we do not have enough room so grow the buffer*/
- b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
- if(b1==NULL){
+ b1 = (char16_t*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -475,7 +475,7 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
}else{
//just point src to b1
- b1 = (UChar*) src;
+ b1 = (char16_t*) src;
b1Len = srcLength;
}
@@ -498,8 +498,8 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
if(*status == U_BUFFER_OVERFLOW_ERROR){
// redo processing of string
/* we do not have enough room so grow the buffer*/
- b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
- if(b2==NULL){
+ b2 = (char16_t*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -516,8 +516,8 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
if(*status == U_BUFFER_OVERFLOW_ERROR){
// redo processing of string
/* we do not have enough room so grow the buffer*/
- b3 = (UChar*) uprv_malloc(b3Len * U_SIZEOF_UCHAR);
- if(b3==NULL){
+ b3 = (char16_t*) uprv_malloc(b3Len * U_SIZEOF_UCHAR);
+ if(b3==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -548,13 +548,13 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
else{
// See the start of this if statement for why this is commented out.
// verify that STD3 ASCII rules are satisfied
- /*if(useSTD3ASCIIRules == TRUE){
- if( srcIsLDH == FALSE // source contains some non-LDH characters
+ /*if(useSTD3ASCIIRules == true){
+ if( srcIsLDH == false // source contains some non-LDH characters
|| src[0] == HYPHEN || src[srcLength-1] == HYPHEN){
*status = U_IDNA_STD3_ASCII_RULES_ERROR;
// populate the parseError struct
- if(srcIsLDH==FALSE){
+ if(srcIsLDH==false){
// failPos is always set the index of failure
uprv_syntaxError(src,failPos, srcLength,parseError);
}else if(src[0] == HYPHEN){
@@ -608,16 +608,16 @@ CLEANUP:
}
U_CAPI int32_t U_EXPORT2
-uidna_toASCII(const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+uidna_toASCII(const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status){
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return 0;
}
- if((src==NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ if((src==nullptr) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -637,16 +637,16 @@ uidna_toASCII(const UChar* src, int32_t srcLength,
}
U_CAPI int32_t U_EXPORT2
-uidna_toUnicode(const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+uidna_toUnicode(const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status){
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return 0;
}
- if( (src==NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ if( (src==nullptr) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -666,16 +666,16 @@ uidna_toUnicode(const UChar* src, int32_t srcLength,
U_CAPI int32_t U_EXPORT2
-uidna_IDNToASCII( const UChar *src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+uidna_IDNToASCII( const char16_t *src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UParseError *parseError,
UErrorCode *status){
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return 0;
}
- if((src==NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ if((src==nullptr) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -689,13 +689,13 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength,
}
//initialize pointers
- UChar *delimiter = (UChar*)src;
- UChar *labelStart = (UChar*)src;
- UChar *currentDest = (UChar*) dest;
+ char16_t *delimiter = (char16_t*)src;
+ char16_t *labelStart = (char16_t*)src;
+ char16_t *currentDest = (char16_t*) dest;
int32_t remainingLen = srcLength;
int32_t remainingDestCapacity = destCapacity;
int32_t labelLen = 0, labelReqLength = 0;
- UBool done = FALSE;
+ UBool done = false;
for(;;){
@@ -731,7 +731,7 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength,
remainingDestCapacity = 0;
}
- if(done == TRUE){
+ if(done){
break;
}
@@ -759,16 +759,16 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength,
}
U_CAPI int32_t U_EXPORT2
-uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+uidna_IDNToUnicode( const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status){
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return 0;
}
- if((src==NULL) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
+ if((src==nullptr) || (srcLength < -1) || (destCapacity<0) || (!dest && destCapacity > 0)){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -782,13 +782,13 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
}
//initialize pointers
- UChar *delimiter = (UChar*)src;
- UChar *labelStart = (UChar*)src;
- UChar *currentDest = (UChar*) dest;
+ char16_t *delimiter = (char16_t*)src;
+ char16_t *labelStart = (char16_t*)src;
+ char16_t *currentDest = (char16_t*) dest;
int32_t remainingLen = srcLength;
int32_t remainingDestCapacity = destCapacity;
int32_t labelLen = 0, labelReqLength = 0;
- UBool done = FALSE;
+ UBool done = false;
for(;;){
@@ -800,7 +800,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
// is returned immediately in that step.
// </quote>
// _internal_toUnicode will copy the label.
- /*if(labelLen==0 && done==FALSE){
+ /*if(labelLen==0 && done==false){
*status = U_IDNA_ZERO_LENGTH_LABEL_ERROR;
break;
}*/
@@ -829,7 +829,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
remainingDestCapacity = 0;
}
- if(done == TRUE){
+ if(done){
break;
}
@@ -858,17 +858,17 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
}
U_CAPI int32_t U_EXPORT2
-uidna_compare( const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+uidna_compare( const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
int32_t options,
UErrorCode* status){
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return -1;
}
- UChar b1Stack[MAX_IDN_BUFFER_SIZE], b2Stack[MAX_IDN_BUFFER_SIZE];
- UChar *b1 = b1Stack, *b2 = b2Stack;
+ char16_t b1Stack[MAX_IDN_BUFFER_SIZE], b2Stack[MAX_IDN_BUFFER_SIZE];
+ char16_t *b1 = b1Stack, *b2 = b2Stack;
int32_t b1Len, b2Len, b1Capacity = MAX_IDN_BUFFER_SIZE, b2Capacity = MAX_IDN_BUFFER_SIZE;
int32_t result=-1;
@@ -877,8 +877,8 @@ uidna_compare( const UChar *s1, int32_t length1,
b1Len = uidna_IDNToASCII(s1, length1, b1, b1Capacity, options, &parseError, status);
if(*status == U_BUFFER_OVERFLOW_ERROR){
// redo processing of string
- b1 = (UChar*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
- if(b1==NULL){
+ b1 = (char16_t*) uprv_malloc(b1Len * U_SIZEOF_UCHAR);
+ if(b1==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
@@ -892,8 +892,8 @@ uidna_compare( const UChar *s1, int32_t length1,
b2Len = uidna_IDNToASCII(s2,length2, b2,b2Capacity, options, &parseError, status);
if(*status == U_BUFFER_OVERFLOW_ERROR){
// redo processing of string
- b2 = (UChar*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
- if(b2==NULL){
+ b2 = (char16_t*) uprv_malloc(b2Len * U_SIZEOF_UCHAR);
+ if(b2==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
goto CLEANUP;
}
diff --git a/contrib/libs/icu/common/uinit.cpp b/contrib/libs/icu/common/uinit.cpp
index 624431be02c..dc3867b17e5 100644
--- a/contrib/libs/icu/common/uinit.cpp
+++ b/contrib/libs/icu/common/uinit.cpp
@@ -26,11 +26,11 @@
U_NAMESPACE_BEGIN
-static UInitOnce gICUInitOnce = U_INITONCE_INITIALIZER;
+static UInitOnce gICUInitOnce {};
static UBool U_CALLCONV uinit_cleanup() {
gICUInitOnce.reset();
- return TRUE;
+ return true;
}
static void U_CALLCONV
diff --git a/contrib/libs/icu/common/uinvchar.cpp b/contrib/libs/icu/common/uinvchar.cpp
index 52b89065685..096a8e28d11 100644
--- a/contrib/libs/icu/common/uinvchar.cpp
+++ b/contrib/libs/icu/common/uinvchar.cpp
@@ -182,8 +182,8 @@ static const uint32_t invariantChars[4]={
U_CAPI void U_EXPORT2
-u_charsToUChars(const char *cs, UChar *us, int32_t length) {
- UChar u;
+u_charsToUChars(const char *cs, char16_t *us, int32_t length) {
+ char16_t u;
uint8_t c;
/*
@@ -193,7 +193,7 @@ u_charsToUChars(const char *cs, UChar *us, int32_t length) {
*/
while(length>0) {
c=(uint8_t)(*cs++);
- u=(UChar)CHAR_TO_UCHAR(c);
+ u=(char16_t)CHAR_TO_UCHAR(c);
U_ASSERT((u!=0 || c==0)); /* only invariant chars converted? */
*us++=u;
--length;
@@ -201,13 +201,13 @@ u_charsToUChars(const char *cs, UChar *us, int32_t length) {
}
U_CAPI void U_EXPORT2
-u_UCharsToChars(const UChar *us, char *cs, int32_t length) {
- UChar u;
+u_UCharsToChars(const char16_t *us, char *cs, int32_t length) {
+ char16_t u;
while(length>0) {
u=*us++;
if(!UCHAR_IS_INVARIANT(u)) {
- U_ASSERT(FALSE); /* Variant characters were used. These are not portable in ICU. */
+ U_ASSERT(false); /* Variant characters were used. These are not portable in ICU. */
u=0;
}
*cs++=(char)UCHAR_TO_CHAR(u);
@@ -245,23 +245,23 @@ uprv_isInvariantString(const char *s, int32_t length) {
*/
#if U_CHARSET_FAMILY==U_ASCII_FAMILY
if(!UCHAR_IS_INVARIANT(c)) {
- return FALSE; /* found a variant char */
+ return false; /* found a variant char */
}
#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
c=CHAR_TO_UCHAR(c);
if(c==0 || !UCHAR_IS_INVARIANT(c)) {
- return FALSE; /* found a variant char */
+ return false; /* found a variant char */
}
#else
# error U_CHARSET_FAMILY is not valid
#endif
}
- return TRUE;
+ return true;
}
U_CAPI UBool U_EXPORT2
-uprv_isInvariantUString(const UChar *s, int32_t length) {
- UChar c;
+uprv_isInvariantUString(const char16_t *s, int32_t length) {
+ char16_t c;
for(;;) {
if(length<0) {
@@ -284,10 +284,10 @@ uprv_isInvariantUString(const UChar *s, int32_t length) {
* for strings with variant characters
*/
if(!UCHAR_IS_INVARIANT(c)) {
- return FALSE; /* found a variant char */
+ return false; /* found a variant char */
}
}
- return TRUE;
+ return true;
}
/* UDataSwapFn implementations used in udataswp.c ------- */
@@ -303,10 +303,10 @@ uprv_ebcdicFromAscii(const UDataSwapper *ds,
int32_t count;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -340,10 +340,10 @@ uprv_copyAscii(const UDataSwapper *ds,
int32_t count;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -380,10 +380,10 @@ uprv_asciiFromEbcdic(const UDataSwapper *ds,
int32_t count;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -417,10 +417,10 @@ uprv_copyEbcdic(const UDataSwapper *ds,
int32_t count;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<0 || (length>0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -457,13 +457,13 @@ uprv_isEbcdicAtSign(char c) {
U_CFUNC int32_t
uprv_compareInvAscii(const UDataSwapper *ds,
const char *outString, int32_t outLength,
- const UChar *localString, int32_t localLength) {
+ const char16_t *localString, int32_t localLength) {
(void)ds;
int32_t minLength;
UChar32 c1, c2;
uint8_t c;
- if(outString==NULL || outLength<-1 || localString==NULL || localLength<-1) {
+ if(outString==nullptr || outLength<-1 || localString==nullptr || localLength<-1) {
return 0;
}
@@ -503,13 +503,13 @@ uprv_compareInvAscii(const UDataSwapper *ds,
U_CFUNC int32_t
uprv_compareInvEbcdic(const UDataSwapper *ds,
const char *outString, int32_t outLength,
- const UChar *localString, int32_t localLength) {
+ const char16_t *localString, int32_t localLength) {
(void)ds;
int32_t minLength;
UChar32 c1, c2;
uint8_t c;
- if(outString==NULL || outLength<-1 || localString==NULL || localLength<-1) {
+ if(outString==nullptr || outLength<-1 || localString==nullptr || localLength<-1) {
return 0;
}
diff --git a/contrib/libs/icu/common/uiter.cpp b/contrib/libs/icu/common/uiter.cpp
index b9252d81c2d..be59eab2ee7 100644
--- a/contrib/libs/icu/common/uiter.cpp
+++ b/contrib/libs/icu/common/uiter.cpp
@@ -47,7 +47,7 @@ noopMove(UCharIterator * /*iter*/, int32_t /*delta*/, UCharIteratorOrigin /*orig
static UBool U_CALLCONV
noopHasNext(UCharIterator * /*iter*/) {
- return FALSE;
+ return false;
}
static UChar32 U_CALLCONV
@@ -74,7 +74,7 @@ static const UCharIterator noopIterator={
noopCurrent,
noopCurrent,
noopCurrent,
- NULL,
+ nullptr,
noopGetState,
noopSetState
};
@@ -82,14 +82,14 @@ static const UCharIterator noopIterator={
/* UCharIterator implementation for simple strings -------------------------- */
/*
- * This is an implementation of a code unit (UChar) iterator
- * for UChar * strings.
+ * This is an implementation of a code unit (char16_t) iterator
+ * for char16_t * strings.
*
* The UCharIterator.context field holds a pointer to the string.
*/
static int32_t U_CALLCONV
-stringIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) {
+stringIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) UPRV_NO_SANITIZE_UNDEFINED {
switch(origin) {
case UITER_ZERO:
return 0;
@@ -109,7 +109,7 @@ stringIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) {
}
static int32_t U_CALLCONV
-stringIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) {
+stringIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) UPRV_NO_SANITIZE_UNDEFINED {
int32_t pos;
switch(origin) {
@@ -154,7 +154,7 @@ stringIteratorHasPrevious(UCharIterator *iter) {
static UChar32 U_CALLCONV
stringIteratorCurrent(UCharIterator *iter) {
if(iter->index<iter->limit) {
- return ((const UChar *)(iter->context))[iter->index];
+ return ((const char16_t *)(iter->context))[iter->index];
} else {
return U_SENTINEL;
}
@@ -163,7 +163,7 @@ stringIteratorCurrent(UCharIterator *iter) {
static UChar32 U_CALLCONV
stringIteratorNext(UCharIterator *iter) {
if(iter->index<iter->limit) {
- return ((const UChar *)(iter->context))[iter->index++];
+ return ((const char16_t *)(iter->context))[iter->index++];
} else {
return U_SENTINEL;
}
@@ -172,7 +172,7 @@ stringIteratorNext(UCharIterator *iter) {
static UChar32 U_CALLCONV
stringIteratorPrevious(UCharIterator *iter) {
if(iter->index>iter->start) {
- return ((const UChar *)(iter->context))[--iter->index];
+ return ((const char16_t *)(iter->context))[--iter->index];
} else {
return U_SENTINEL;
}
@@ -185,9 +185,9 @@ stringIteratorGetState(const UCharIterator *iter) {
static void U_CALLCONV
stringIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
/* do nothing */
- } else if(iter==NULL) {
+ } else if(iter==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
} else if((int32_t)state<iter->start || iter->limit<(int32_t)state) {
*pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR;
@@ -205,13 +205,13 @@ static const UCharIterator stringIterator={
stringIteratorCurrent,
stringIteratorNext,
stringIteratorPrevious,
- NULL,
+ nullptr,
stringIteratorGetState,
stringIteratorSetState
};
U_CAPI void U_EXPORT2
-uiter_setString(UCharIterator *iter, const UChar *s, int32_t length) {
+uiter_setString(UCharIterator *iter, const char16_t *s, int32_t length) {
if(iter!=0) {
if(s!=0 && length>=-1) {
*iter=stringIterator;
@@ -231,12 +231,12 @@ uiter_setString(UCharIterator *iter, const UChar *s, int32_t length) {
/* UCharIterator implementation for UTF-16BE strings ------------------------ */
/*
- * This is an implementation of a code unit (UChar) iterator
+ * This is an implementation of a code unit (char16_t) iterator
* for UTF-16BE strings, i.e., strings in byte-vectors where
- * each UChar is stored as a big-endian pair of bytes.
+ * each char16_t is stored as a big-endian pair of bytes.
*
* The UCharIterator.context field holds a pointer to the string.
- * Everything works just like with a normal UChar iterator (uiter_setString),
+ * Everything works just like with a normal char16_t iterator (uiter_setString),
* except that UChars are assembled from byte pairs.
*/
@@ -244,7 +244,7 @@ uiter_setString(UCharIterator *iter, const UChar *s, int32_t length) {
static inline UChar32
utf16BEIteratorGet(UCharIterator *iter, int32_t index) {
const uint8_t *p=(const uint8_t *)iter->context;
- return ((UChar)p[2*index]<<8)|(UChar)p[2*index+1];
+ return ((char16_t)p[2*index]<<8)|(char16_t)p[2*index+1];
}
static UChar32 U_CALLCONV
@@ -291,13 +291,13 @@ static const UCharIterator utf16BEIterator={
utf16BEIteratorCurrent,
utf16BEIteratorNext,
utf16BEIteratorPrevious,
- NULL,
+ nullptr,
stringIteratorGetState,
stringIteratorSetState
};
/*
- * Count the number of UChars in a UTF-16BE string before a terminating UChar NUL,
+ * Count the number of UChars in a UTF-16BE string before a terminating char16_t NUL,
* i.e., before a pair of 0 bytes where the first 0 byte is at an even
* offset from s.
*/
@@ -306,10 +306,10 @@ utf16BE_strlen(const char *s) {
if(IS_POINTER_EVEN(s)) {
/*
* even-aligned, call u_strlen(s)
- * we are probably on a little-endian machine, but searching for UChar NUL
+ * we are probably on a little-endian machine, but searching for char16_t NUL
* does not care about endianness
*/
- return u_strlen((const UChar *)s);
+ return u_strlen((const char16_t *)s);
} else {
/* odd-aligned, search for pair of 0 bytes */
const char *p=s;
@@ -323,15 +323,15 @@ utf16BE_strlen(const char *s) {
U_CAPI void U_EXPORT2
uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length) {
- if(iter!=NULL) {
+ if(iter!=nullptr) {
/* allow only even-length strings (the input length counts bytes) */
- if(s!=NULL && (length==-1 || (length>=0 && IS_EVEN(length)))) {
+ if(s!=nullptr && (length==-1 || (length>=0 && IS_EVEN(length)))) {
/* length/=2, except that >>=1 also works for -1 (-1/2==0, -1>>1==-1) */
length>>=1;
if(U_IS_BIG_ENDIAN && IS_POINTER_EVEN(s)) {
- /* big-endian machine and 2-aligned UTF-16BE string: use normal UChar iterator */
- uiter_setString(iter, (const UChar *)s, length);
+ /* big-endian machine and 2-aligned UTF-16BE string: use normal char16_t iterator */
+ uiter_setString(iter, (const char16_t *)s, length);
return;
}
@@ -359,7 +359,7 @@ uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length) {
*/
static int32_t U_CALLCONV
-characterIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) {
+characterIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) UPRV_NO_SANITIZE_UNDEFINED {
switch(origin) {
case UITER_ZERO:
return 0;
@@ -379,7 +379,7 @@ characterIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) {
}
static int32_t U_CALLCONV
-characterIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) {
+characterIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) UPRV_NO_SANITIZE_UNDEFINED {
switch(origin) {
case UITER_ZERO:
((CharacterIterator *)(iter->context))->setIndex(delta);
@@ -445,9 +445,9 @@ characterIteratorGetState(const UCharIterator *iter) {
static void U_CALLCONV
characterIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
/* do nothing */
- } else if(iter==NULL || iter->context==NULL) {
+ } else if(iter==nullptr || iter->context==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
} else if((int32_t)state<((CharacterIterator *)(iter->context))->startIndex() || ((CharacterIterator *)(iter->context))->endIndex()<(int32_t)state) {
*pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR;
@@ -465,7 +465,7 @@ static const UCharIterator characterIteratorWrapper={
characterIteratorCurrent,
characterIteratorNext,
characterIteratorPrevious,
- NULL,
+ nullptr,
characterIteratorGetState,
characterIteratorSetState
};
@@ -485,7 +485,7 @@ uiter_setCharacterIterator(UCharIterator *iter, CharacterIterator *charIter) {
/* UCharIterator wrapper around Replaceable --------------------------------- */
/*
- * This is an implementation of a code unit (UChar) iterator
+ * This is an implementation of a code unit (char16_t) iterator
* based on a Replaceable object.
*
* The UCharIterator.context field holds a pointer to the Replaceable.
@@ -529,7 +529,7 @@ static const UCharIterator replaceableIterator={
replaceableIteratorCurrent,
replaceableIteratorNext,
replaceableIteratorPrevious,
- NULL,
+ nullptr,
stringIteratorGetState,
stringIteratorSetState
};
@@ -561,7 +561,7 @@ uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep) {
/*
* Minimal implementation:
- * Maintain a single-UChar buffer for an additional surrogate.
+ * Maintain a single-char16_t buffer for an additional surrogate.
* The caller must not modify start and limit because they are used internally.
*
* Use UCharIterator fields as follows:
@@ -586,7 +586,7 @@ uiter_setReplaceable(UCharIterator *iter, const Replaceable *rep) {
*/
static int32_t U_CALLCONV
-utf8IteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) {
+utf8IteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) UPRV_NO_SANITIZE_UNDEFINED {
switch(origin) {
case UITER_ZERO:
case UITER_START:
@@ -666,7 +666,7 @@ utf8IteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin) {
}
static int32_t U_CALLCONV
-utf8IteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) {
+utf8IteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) UPRV_NO_SANITIZE_UNDEFINED {
const uint8_t *s;
UChar32 c;
int32_t pos; /* requested UTF-16 index */
@@ -678,24 +678,24 @@ utf8IteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin)
case UITER_ZERO:
case UITER_START:
pos=delta;
- havePos=TRUE;
+ havePos=true;
/* iter->index<0 (unknown) is possible */
break;
case UITER_CURRENT:
if(iter->index>=0) {
pos=iter->index+delta;
- havePos=TRUE;
+ havePos=true;
} else {
/* the current UTF-16 index is unknown after setState(), use only delta */
pos=0;
- havePos=FALSE;
+ havePos=false;
}
break;
case UITER_LIMIT:
case UITER_LENGTH:
if(iter->length>=0) {
pos=iter->length+delta;
- havePos=TRUE;
+ havePos=true;
} else {
/* pin to the end, avoid counting the length */
iter->index=-1;
@@ -706,7 +706,7 @@ utf8IteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin)
} else {
/* the current UTF-16 index is unknown, use only delta */
pos=0;
- havePos=FALSE;
+ havePos=false;
}
}
break;
@@ -873,7 +873,7 @@ utf8IteratorNext(UCharIterator *iter) {
int32_t index;
if(iter->reservedField!=0) {
- UChar trail=U16_TRAIL(iter->reservedField);
+ char16_t trail=U16_TRAIL(iter->reservedField);
iter->reservedField=0;
if((index=iter->index)>=0) {
iter->index=index+1;
@@ -908,7 +908,7 @@ utf8IteratorPrevious(UCharIterator *iter) {
int32_t index;
if(iter->reservedField!=0) {
- UChar lead=U16_LEAD(iter->reservedField);
+ char16_t lead=U16_LEAD(iter->reservedField);
iter->reservedField=0;
iter->start-=4; /* we stayed behind the supplementary code point; go before it now */
if((index=iter->index)>0) {
@@ -951,9 +951,9 @@ utf8IteratorSetState(UCharIterator *iter,
uint32_t state,
UErrorCode *pErrorCode)
{
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
/* do nothing */
- } else if(iter==NULL) {
+ } else if(iter==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
} else if(state==utf8IteratorGetState(iter)) {
/* setting to the current state: no-op */
@@ -995,7 +995,7 @@ static const UCharIterator utf8Iterator={
utf8IteratorCurrent,
utf8IteratorNext,
utf8IteratorPrevious,
- NULL,
+ nullptr,
utf8IteratorGetState,
utf8IteratorSetState
};
@@ -1085,7 +1085,7 @@ uiter_previous32(UCharIterator *iter) {
U_CAPI uint32_t U_EXPORT2
uiter_getState(const UCharIterator *iter) {
- if(iter==NULL || iter->getState==NULL) {
+ if(iter==nullptr || iter->getState==nullptr) {
return UITER_NO_STATE;
} else {
return iter->getState(iter);
@@ -1094,11 +1094,11 @@ uiter_getState(const UCharIterator *iter) {
U_CAPI void U_EXPORT2
uiter_setState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
/* do nothing */
- } else if(iter==NULL) {
+ } else if(iter==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- } else if(iter->setState==NULL) {
+ } else if(iter->setState==nullptr) {
*pErrorCode=U_UNSUPPORTED_ERROR;
} else {
iter->setState(iter, state, pErrorCode);
diff --git a/contrib/libs/icu/common/ulist.cpp b/contrib/libs/icu/common/ulist.cpp
index c5180431c31..5bdf534c84d 100644
--- a/contrib/libs/icu/common/ulist.cpp
+++ b/contrib/libs/icu/common/ulist.cpp
@@ -34,21 +34,21 @@ struct UList {
static void ulist_addFirstItem(UList *list, UListNode *newItem);
U_CAPI UList *U_EXPORT2 ulist_createEmptyList(UErrorCode *status) {
- UList *newList = NULL;
+ UList *newList = nullptr;
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
newList = (UList *)uprv_malloc(sizeof(UList));
- if (newList == NULL) {
+ if (newList == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- newList->curr = NULL;
- newList->head = NULL;
- newList->tail = NULL;
+ newList->curr = nullptr;
+ newList->head = nullptr;
+ newList->tail = nullptr;
newList->size = 0;
return newList;
@@ -59,20 +59,20 @@ U_CAPI UList *U_EXPORT2 ulist_createEmptyList(UErrorCode *status) {
* This function properly sets the pointers for the first item added.
*/
static void ulist_addFirstItem(UList *list, UListNode *newItem) {
- newItem->next = NULL;
- newItem->previous = NULL;
+ newItem->next = nullptr;
+ newItem->previous = nullptr;
list->head = newItem;
list->tail = newItem;
}
static void ulist_removeItem(UList *list, UListNode *p) {
- if (p->previous == NULL) {
+ if (p->previous == nullptr) {
// p is the list head.
list->head = p->next;
} else {
p->previous->next = p->next;
}
- if (p->next == NULL) {
+ if (p->next == nullptr) {
// p is the list tail.
list->tail = p->previous;
} else {
@@ -89,9 +89,9 @@ static void ulist_removeItem(UList *list, UListNode *p) {
}
U_CAPI void U_EXPORT2 ulist_addItemEndList(UList *list, const void *data, UBool forceDelete, UErrorCode *status) {
- UListNode *newItem = NULL;
+ UListNode *newItem = nullptr;
- if (U_FAILURE(*status) || list == NULL || data == NULL) {
+ if (U_FAILURE(*status) || list == nullptr || data == nullptr) {
if (forceDelete) {
uprv_free((void *)data);
}
@@ -99,7 +99,7 @@ U_CAPI void U_EXPORT2 ulist_addItemEndList(UList *list, const void *data, UBool
}
newItem = (UListNode *)uprv_malloc(sizeof(UListNode));
- if (newItem == NULL) {
+ if (newItem == nullptr) {
if (forceDelete) {
uprv_free((void *)data);
}
@@ -112,7 +112,7 @@ U_CAPI void U_EXPORT2 ulist_addItemEndList(UList *list, const void *data, UBool
if (list->size == 0) {
ulist_addFirstItem(list, newItem);
} else {
- newItem->next = NULL;
+ newItem->next = nullptr;
newItem->previous = list->tail;
list->tail->next = newItem;
list->tail = newItem;
@@ -122,9 +122,9 @@ U_CAPI void U_EXPORT2 ulist_addItemEndList(UList *list, const void *data, UBool
}
U_CAPI void U_EXPORT2 ulist_addItemBeginList(UList *list, const void *data, UBool forceDelete, UErrorCode *status) {
- UListNode *newItem = NULL;
+ UListNode *newItem = nullptr;
- if (U_FAILURE(*status) || list == NULL || data == NULL) {
+ if (U_FAILURE(*status) || list == nullptr || data == nullptr) {
if (forceDelete) {
uprv_free((void *)data);
}
@@ -132,7 +132,7 @@ U_CAPI void U_EXPORT2 ulist_addItemBeginList(UList *list, const void *data, UBoo
}
newItem = (UListNode *)uprv_malloc(sizeof(UListNode));
- if (newItem == NULL) {
+ if (newItem == nullptr) {
if (forceDelete) {
uprv_free((void *)data);
}
@@ -145,7 +145,7 @@ U_CAPI void U_EXPORT2 ulist_addItemBeginList(UList *list, const void *data, UBoo
if (list->size == 0) {
ulist_addFirstItem(list, newItem);
} else {
- newItem->previous = NULL;
+ newItem->previous = nullptr;
newItem->next = list->head;
list->head->previous = newItem;
list->head = newItem;
@@ -155,38 +155,38 @@ U_CAPI void U_EXPORT2 ulist_addItemBeginList(UList *list, const void *data, UBoo
}
U_CAPI UBool U_EXPORT2 ulist_containsString(const UList *list, const char *data, int32_t length) {
- if (list != NULL) {
+ if (list != nullptr) {
const UListNode *pointer;
- for (pointer = list->head; pointer != NULL; pointer = pointer->next) {
+ for (pointer = list->head; pointer != nullptr; pointer = pointer->next) {
if (length == (int32_t)uprv_strlen((const char *)pointer->data)) {
if (uprv_memcmp(data, pointer->data, length) == 0) {
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
U_CAPI UBool U_EXPORT2 ulist_removeString(UList *list, const char *data) {
- if (list != NULL) {
+ if (list != nullptr) {
UListNode *pointer;
- for (pointer = list->head; pointer != NULL; pointer = pointer->next) {
+ for (pointer = list->head; pointer != nullptr; pointer = pointer->next) {
if (uprv_strcmp(data, (const char *)pointer->data) == 0) {
ulist_removeItem(list, pointer);
// Remove only the first occurrence, like Java LinkedList.remove(Object).
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
U_CAPI void *U_EXPORT2 ulist_getNext(UList *list) {
- UListNode *curr = NULL;
+ UListNode *curr = nullptr;
- if (list == NULL || list->curr == NULL) {
- return NULL;
+ if (list == nullptr || list->curr == nullptr) {
+ return nullptr;
}
curr = list->curr;
@@ -196,7 +196,7 @@ U_CAPI void *U_EXPORT2 ulist_getNext(UList *list) {
}
U_CAPI int32_t U_EXPORT2 ulist_getListSize(const UList *list) {
- if (list != NULL) {
+ if (list != nullptr) {
return list->size;
}
@@ -204,17 +204,17 @@ U_CAPI int32_t U_EXPORT2 ulist_getListSize(const UList *list) {
}
U_CAPI void U_EXPORT2 ulist_resetList(UList *list) {
- if (list != NULL) {
+ if (list != nullptr) {
list->curr = list->head;
}
}
U_CAPI void U_EXPORT2 ulist_deleteList(UList *list) {
- UListNode *listHead = NULL;
+ UListNode *listHead = nullptr;
- if (list != NULL) {
+ if (list != nullptr) {
listHead = list->head;
- while (listHead != NULL) {
+ while (listHead != nullptr) {
UListNode *listPointer = listHead->next;
if (listHead->forceDelete) {
@@ -225,12 +225,12 @@ U_CAPI void U_EXPORT2 ulist_deleteList(UList *list) {
listHead = listPointer;
}
uprv_free(list);
- list = NULL;
+ list = nullptr;
}
}
U_CAPI void U_EXPORT2 ulist_close_keyword_values_iterator(UEnumeration *en) {
- if (en != NULL) {
+ if (en != nullptr) {
ulist_deleteList((UList *)(en->context));
uprv_free(en);
}
@@ -247,11 +247,11 @@ U_CAPI int32_t U_EXPORT2 ulist_count_keyword_values(UEnumeration *en, UErrorCode
U_CAPI const char * U_EXPORT2 ulist_next_keyword_value(UEnumeration *en, int32_t *resultLength, UErrorCode *status) {
const char *s;
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
s = (const char *)ulist_getNext((UList *)(en->context));
- if (s != NULL && resultLength != NULL) {
+ if (s != nullptr && resultLength != nullptr) {
*resultLength = static_cast<int32_t>(uprv_strlen(s));
}
return s;
diff --git a/contrib/libs/icu/common/uloc.cpp b/contrib/libs/icu/common/uloc.cpp
index c8a3f1ff731..395df1466e4 100644
--- a/contrib/libs/icu/common/uloc.cpp
+++ b/contrib/libs/icu/common/uloc.cpp
@@ -56,7 +56,7 @@ U_NAMESPACE_USE
/* Locale stuff from locid.cpp */
U_CFUNC void locale_set_default(const char *id);
-U_CFUNC const char *locale_get_default(void);
+U_CFUNC const char *locale_get_default();
/* ### Data tables **************************************************/
@@ -71,8 +71,8 @@ U_CFUNC const char *locale_get_default(void);
* This list must be kept in sync with LANGUAGES_3, with corresponding
* entries matched.
*
- * This table should be terminated with a NULL entry, followed by a
- * second list, and another NULL entry. The first list is visible to
+ * This table should be terminated with a nullptr entry, followed by a
+ * second list, and another nullptr entry. The first list is visible to
* user code when this array is returned by API. The second list
* contains codes we support, but do not expose through user API.
*
@@ -102,7 +102,7 @@ static const char * const LANGUAGES[] = {
"asa", "ase", "ast", "av", "avk", "awa", "ay", "az",
"ba", "bal", "ban", "bar", "bas", "bax", "bbc", "bbj",
"be", "bej", "bem", "bew", "bez", "bfd", "bfq", "bg",
- "bgn", "bho", "bi", "bik", "bin", "bjn", "bkm", "bla",
+ "bgc", "bgn", "bho", "bi", "bik", "bin", "bjn", "bkm", "bla",
"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",
@@ -180,16 +180,16 @@ static const char * const LANGUAGES[] = {
"yao", "yap", "yav", "ybb", "yi", "yo", "yrl", "yue",
"za", "zap", "zbl", "zea", "zen", "zgh", "zh", "zu",
"zun", "zxx", "zza",
-NULL,
+nullptr,
"in", "iw", "ji", "jw", "mo", "sh", "swc", "tl", /* obsolete language codes */
-NULL
+nullptr
};
static const char* const DEPRECATED_LANGUAGES[]={
- "in", "iw", "ji", "jw", NULL, NULL
+ "in", "iw", "ji", "jw", "mo", nullptr, nullptr
};
static const char* const REPLACEMENT_LANGUAGES[]={
- "id", "he", "yi", "jv", NULL, NULL
+ "id", "he", "yi", "jv", "ro", nullptr, nullptr
};
/**
@@ -204,8 +204,8 @@ static const char* const REPLACEMENT_LANGUAGES[]={
* Where a 3-letter language code has no 2-letter equivalent, the
* 3-letter code occupies both LANGUAGES[i] and LANGUAGES_3[i].
*
- * This table should be terminated with a NULL entry, followed by a
- * second list, and another NULL entry. The two lists correspond to
+ * This table should be terminated with a nullptr entry, followed by a
+ * second list, and another nullptr entry. The two lists correspond to
* the two lists in LANGUAGES.
*/
/* Generated using org.unicode.cldr.icu.GenerateISO639LanguageTables */
@@ -219,7 +219,7 @@ static const char * const LANGUAGES_3[] = {
"asa", "ase", "ast", "ava", "avk", "awa", "aym", "aze",
"bak", "bal", "ban", "bar", "bas", "bax", "bbc", "bbj",
"bel", "bej", "bem", "bew", "bez", "bfd", "bfq", "bul",
- "bgn", "bho", "bis", "bik", "bin", "bjn", "bkm", "bla",
+ "bgc", "bgn", "bho", "bis", "bik", "bin", "bjn", "bkm", "bla",
"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",
@@ -297,10 +297,10 @@ static const char * const LANGUAGES_3[] = {
"yao", "yap", "yav", "ybb", "yid", "yor", "yrl", "yue",
"zha", "zap", "zbl", "zea", "zen", "zgh", "zho", "zul",
"zun", "zxx", "zza",
-NULL,
+nullptr,
/* "in", "iw", "ji", "jw", "mo", "sh", "swc", "tl", */
"ind", "heb", "yid", "jaw", "mol", "srp", "swc", "tgl",
-NULL
+nullptr
};
/**
@@ -312,8 +312,8 @@ NULL
* This list must be kept in sync with COUNTRIES_3, with corresponding
* entries matched.
*
- * This table should be terminated with a NULL entry, followed by a
- * second list, and another NULL entry. The first list is visible to
+ * This table should be terminated with a nullptr entry, followed by a
+ * second list, and another nullptr entry. The first list is visible to
* user code when this array is returned by API. The second list
* contains codes we support, but do not expose through user API.
*
@@ -333,7 +333,7 @@ static const char * const COUNTRIES[] = {
"BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI",
"BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV",
"BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG",
- "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR",
+ "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CQ", "CR",
"CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DG", "DJ", "DK",
"DM", "DO", "DZ", "EA", "EC", "EE", "EG", "EH", "ER",
"ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR",
@@ -358,17 +358,17 @@ static const char * const COUNTRIES[] = {
"TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ",
"VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF",
"WS", "XK", "YE", "YT", "ZA", "ZM", "ZW",
-NULL,
+nullptr,
"AN", "BU", "CS", "FX", "RO", "SU", "TP", "YD", "YU", "ZR", /* obsolete country codes */
-NULL
+nullptr
};
static const char* const DEPRECATED_COUNTRIES[] = {
- "AN", "BU", "CS", "DD", "DY", "FX", "HV", "NH", "RH", "SU", "TP", "UK", "VD", "YD", "YU", "ZR", NULL, NULL /* deprecated country list */
+ "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[] = {
/* "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", NULL, NULL /* replacement country codes */
+ "CW", "MM", "RS", "DE", "BJ", "FR", "BF", "VU", "ZW", "RU", "TL", "GB", "VN", "YE", "RS", "CD", nullptr, nullptr /* replacement country codes */
};
/**
@@ -380,8 +380,8 @@ static const char* const REPLACEMENT_COUNTRIES[] = {
* COUNTRIES_3[i]. The commented-out lines are copied from COUNTRIES
* to make eyeballing this baby easier.
*
- * This table should be terminated with a NULL entry, followed by a
- * second list, and another NULL entry. The two lists correspond to
+ * This table should be terminated with a nullptr entry, followed by a
+ * second list, and another nullptr entry. The two lists correspond to
* the two lists in COUNTRIES.
*/
static const char * const COUNTRIES_3[] = {
@@ -395,8 +395,8 @@ static const char * const COUNTRIES_3[] = {
"BEN", "BLM", "BMU", "BRN", "BOL", "BES", "BRA", "BHS", "BTN", "BVT",
/* "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", */
"BWA", "BLR", "BLZ", "CAN", "CCK", "COD", "CAF", "COG",
-/* "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", */
- "CHE", "CIV", "COK", "CHL", "CMR", "CHN", "COL", "CRI",
+/* "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CQ", "CR", */
+ "CHE", "CIV", "COK", "CHL", "CMR", "CHN", "COL", "CRQ", "CRI",
/* "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DG", "DJ", "DK", */
"CUB", "CPV", "CUW", "CXR", "CYP", "CZE", "DEU", "DGA", "DJI", "DNK",
/* "DM", "DO", "DZ", "EA", "EC", "EE", "EG", "EH", "ER", */
@@ -444,11 +444,11 @@ static const char * const COUNTRIES_3[] = {
/* "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", */
"VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF",
/* "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW", */
- "WSM", "XXK", "YEM", "MYT", "ZAF", "ZMB", "ZWE",
-NULL,
+ "WSM", "XKK", "YEM", "MYT", "ZAF", "ZMB", "ZWE",
+nullptr,
/* "AN", "BU", "CS", "FX", "RO", "SU", "TP", "YD", "YU", "ZR" */
"ANT", "BUR", "SCG", "FXX", "ROM", "SUN", "TMP", "YMD", "YUG", "ZAR",
-NULL
+nullptr
};
typedef struct CanonicalizationMap {
@@ -476,13 +476,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, "@") == NULL && getShortestSubtagLength(localeID) == 1)
+#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, NULL, err);
+ 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) {
@@ -502,20 +502,20 @@ static int32_t getShortestSubtagLength(const char *localeID) {
int32_t length = localeIDLength;
int32_t tmpLength = 0;
int32_t i;
- UBool reset = TRUE;
+ UBool reset = true;
for (i = 0; i < localeIDLength; i++) {
if (localeID[i] != '_' && localeID[i] != '-') {
if (reset) {
tmpLength = 0;
- reset = FALSE;
+ reset = false;
}
tmpLength++;
} else {
if (tmpLength != 0 && tmpLength < length) {
length = tmpLength;
}
- reset = TRUE;
+ reset = true;
}
}
@@ -533,8 +533,8 @@ static int32_t getShortestSubtagLength(const char *localeID) {
U_CAPI const char * U_EXPORT2
locale_getKeywordsStart(const char *localeID) {
- const char *result = NULL;
- if((result = uprv_strchr(localeID, '@')) != NULL) {
+ const char *result = nullptr;
+ if((result = uprv_strchr(localeID, '@')) != nullptr) {
return result;
}
#if (U_CHARSET_FAMILY == U_EBCDIC_FAMILY)
@@ -545,14 +545,14 @@ locale_getKeywordsStart(const char *localeID) {
static const uint8_t ebcdicSigns[] = { 0x7C, 0x44, 0x66, 0x80, 0xAC, 0xAE, 0xAF, 0xB5, 0xEC, 0xEF, 0x00 };
const uint8_t *charToFind = ebcdicSigns;
while(*charToFind) {
- if((result = uprv_strchr(localeID, *charToFind)) != NULL) {
+ if((result = uprv_strchr(localeID, *charToFind)) != nullptr) {
return result;
}
charToFind++;
}
}
#endif
- return NULL;
+ return nullptr;
}
/**
@@ -613,14 +613,14 @@ ulocimp_getKeywords(const char *localeID,
int32_t maxKeywords = ULOC_MAX_NO_KEYWORDS;
int32_t numKeywords = 0;
const char* pos = localeID;
- const char* equalSign = NULL;
- const char* semicolon = NULL;
+ const char* equalSign = nullptr;
+ const char* semicolon = nullptr;
int32_t i = 0, j, n;
if(prev == '@') { /* start of keyword definition */
/* we will grab pairs, trim spaces, lowercase keywords, sort and return */
do {
- UBool duplicate = FALSE;
+ UBool duplicate = false;
/* skip leading spaces */
while(*pos == ' ') {
pos++;
@@ -693,7 +693,7 @@ ulocimp_getKeywords(const char *localeID,
/* If this is a duplicate keyword, then ignore it */
for (j=0; j<numKeywords; ++j) {
if (uprv_strcmp(keywordList[j].keyword, keywordList[numKeywords].keyword) == 0) {
- duplicate = TRUE;
+ duplicate = true;
break;
}
}
@@ -704,7 +704,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, NULL, FALSE, status);
+ uprv_sortArray(keywordList, numKeywords, sizeof(KeywordStruct), compareKeywordStructs, nullptr, false, status);
/* Now construct the keyword part */
for(i = 0; i < numKeywords; i++) {
@@ -756,8 +756,8 @@ ulocimp_getKeywordValue(const char* localeID,
icu::ByteSink& sink,
UErrorCode* status)
{
- const char* startSearchHere = NULL;
- const char* nextSeparator = NULL;
+ const char* startSearchHere = nullptr;
+ const char* nextSeparator = nullptr;
char keywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN];
char localeKeywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN];
@@ -765,7 +765,7 @@ ulocimp_getKeywordValue(const char* localeID,
char tempBuffer[ULOC_FULLNAME_CAPACITY];
const char* tmpLocaleID;
- if (keywordName == NULL || keywordName[0] == 0) {
+ if (keywordName == nullptr || keywordName[0] == 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -783,7 +783,7 @@ ulocimp_getKeywordValue(const char* localeID,
}
startSearchHere = locale_getKeywordsStart(tmpLocaleID);
- if(startSearchHere == NULL) {
+ if(startSearchHere == nullptr) {
/* no keywords, return at once */
return;
}
@@ -876,12 +876,12 @@ uloc_setKeywordValue(const char* keywordName,
char keywordValueBuffer[ULOC_KEYWORDS_CAPACITY+1];
char localeKeywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN];
int32_t rc;
- char* nextSeparator = NULL;
- char* nextEqualsign = NULL;
- char* startSearchHere = NULL;
- char* keywordStart = NULL;
+ char* nextSeparator = nullptr;
+ char* nextEqualsign = nullptr;
+ char* startSearchHere = nullptr;
+ char* keywordStart = nullptr;
CharString updatedKeysAndValues;
- UBool handledInputKeyAndValue = FALSE;
+ UBool handledInputKeyAndValue = false;
char keyValuePrefix = '@';
if(U_FAILURE(*status)) {
@@ -890,13 +890,13 @@ uloc_setKeywordValue(const char* keywordName,
if (*status == U_STRING_NOT_TERMINATED_WARNING) {
*status = U_ZERO_ERROR;
}
- if (keywordName == NULL || keywordName[0] == 0 || bufferCapacity <= 1) {
+ if (keywordName == nullptr || keywordName[0] == 0 || bufferCapacity <= 1) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
bufLen = (int32_t)uprv_strlen(buffer);
if(bufferCapacity<bufLen) {
- /* The capacity is less than the length?! Is this NULL terminated? */
+ /* The capacity is less than the length?! Is this NUL terminated? */
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -925,7 +925,7 @@ uloc_setKeywordValue(const char* keywordName,
keywordValueBuffer[keywordValueLen] = 0; /* terminate */
startSearchHere = (char*)locale_getKeywordsStart(buffer);
- if(startSearchHere == NULL || (startSearchHere[1]==0)) {
+ if(startSearchHere == nullptr || (startSearchHere[1]==0)) {
if(keywordValueLen == 0) { /* no keywords = nothing to remove */
U_ASSERT(*status != U_STRING_NOT_TERMINATED_WARNING);
return bufLen;
@@ -1020,7 +1020,7 @@ uloc_setKeywordValue(const char* keywordName,
updatedKeysAndValues.append('=', *status);
updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status);
} /* else removing this entry, don't emit anything */
- handledInputKeyAndValue = TRUE;
+ handledInputKeyAndValue = true;
} else {
/* input keyword sorts earlier than current entry, add before current entry */
if (rc < 0 && keywordValueLen > 0 && !handledInputKeyAndValue) {
@@ -1030,7 +1030,7 @@ uloc_setKeywordValue(const char* keywordName,
updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status);
updatedKeysAndValues.append('=', *status);
updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status);
- handledInputKeyAndValue = TRUE;
+ handledInputKeyAndValue = true;
}
/* copy the current entry */
updatedKeysAndValues.append(keyValuePrefix, *status);
@@ -1046,7 +1046,7 @@ uloc_setKeywordValue(const char* keywordName,
updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status);
updatedKeysAndValues.append('=', *status);
updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status);
- handledInputKeyAndValue = TRUE;
+ handledInputKeyAndValue = true;
}
keywordStart = nextSeparator;
} /* end loop searching */
@@ -1089,7 +1089,7 @@ uloc_setKeywordValue(const char* keywordName,
#define _isPrefixLetter(a) ((a=='x')||(a=='X')||(a=='i')||(a=='I'))
-/*returns TRUE if one of the special prefixes is here (s=string)
+/*returns true if one of the special prefixes is here (s=string)
'x-' or 'i-' */
#define _isIDPrefix(s) (_isPrefixLetter(s[0])&&_isIDSeparator(s[1]))
@@ -1100,7 +1100,7 @@ uloc_setKeywordValue(const char* keywordName,
/**
* Lookup 'key' in the array 'list'. The array 'list' should contain
- * a NULL entry, followed by more entries, and a second NULL entry.
+ * a nullptr entry, followed by more entries, and a second nullptr entry.
*
* The 'list' param should be LANGUAGES, LANGUAGES_3, COUNTRIES, or
* COUNTRIES_3.
@@ -1110,7 +1110,7 @@ static int16_t _findIndex(const char* const* list, const char* key)
const char* const* anchor = list;
int32_t pass = 0;
- /* Make two passes through two NULL-terminated arrays at 'list' */
+ /* Make two passes through two nullptr-terminated arrays at 'list' */
while (pass++ < 2) {
while (*list) {
if (uprv_strcmp(key, *list) == 0) {
@@ -1118,7 +1118,7 @@ static int16_t _findIndex(const char* const* list, const char* key)
}
list++;
}
- ++list; /* skip final NULL *CWB*/
+ ++list; /* skip final nullptr *CWB*/
}
return -1;
}
@@ -1185,7 +1185,7 @@ ulocimp_getLanguage(const char *localeID,
}
}
- if(pEnd!=NULL) {
+ if(pEnd!=nullptr) {
*pEnd=localeID;
}
@@ -1199,7 +1199,7 @@ ulocimp_getScript(const char *localeID,
CharString result;
int32_t idLen = 0;
- if (pEnd != NULL) {
+ if (pEnd != nullptr) {
*pEnd = localeID;
}
@@ -1212,7 +1212,7 @@ ulocimp_getScript(const char *localeID,
/* If it's exactly 4 characters long, then it's a script and not a country. */
if (idLen == 4) {
int32_t i;
- if (pEnd != NULL) {
+ if (pEnd != nullptr) {
*pEnd = localeID+idLen;
}
if (idLen >= 1) {
@@ -1254,7 +1254,7 @@ ulocimp_getCountry(const char *localeID,
result.clear();
}
- if(pEnd!=NULL) {
+ if(pEnd!=nullptr) {
*pEnd=localeID;
}
@@ -1270,7 +1270,7 @@ _getVariant(const char *localeID,
char prev,
ByteSink& sink,
UBool needSeparator) {
- UBool hasVariant = FALSE;
+ UBool hasVariant = false;
/* get one or more variant tags and separate them with '_' */
if(_isIDSeparator(prev)) {
@@ -1278,12 +1278,12 @@ _getVariant(const char *localeID,
while(!_isTerminator(*localeID)) {
if (needSeparator) {
sink.Append("_", 1);
- needSeparator = FALSE;
+ needSeparator = false;
}
char c = (char)uprv_toupper(*localeID);
if (c == '-') c = '_';
sink.Append(&c, 1);
- hasVariant = TRUE;
+ hasVariant = true;
localeID++;
}
}
@@ -1292,7 +1292,7 @@ _getVariant(const char *localeID,
if(!hasVariant) {
if(prev=='@') {
/* keep localeID */
- } else if((localeID=locale_getKeywordsStart(localeID))!=NULL) {
+ } else if((localeID=locale_getKeywordsStart(localeID))!=nullptr) {
++localeID; /* point after the '@' */
} else {
return;
@@ -1300,7 +1300,7 @@ _getVariant(const char *localeID,
while(!_isTerminator(*localeID)) {
if (needSeparator) {
sink.Append("_", 1);
- needSeparator = FALSE;
+ needSeparator = false;
}
char c = (char)uprv_toupper(*localeID);
if (c == '-' || c == ',') c = '_';
@@ -1347,7 +1347,7 @@ uloc_kw_nextKeyword(UEnumeration* en,
len = (int32_t)uprv_strlen(((UKeywordsContext *)en->context)->current);
((UKeywordsContext *)en->context)->current += len+1;
} else {
- result = NULL;
+ result = nullptr;
}
if (resultLength) {
*resultLength = len;
@@ -1365,8 +1365,8 @@ U_CDECL_END
static const UEnumeration gKeywordsEnum = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
uloc_kw_closeKeywords,
uloc_kw_countKeywords,
uenum_unextDefault,
@@ -1409,7 +1409,7 @@ uloc_openKeywords(const char* localeID,
char tempBuffer[ULOC_FULLNAME_CAPACITY];
const char* tmpLocaleID;
- if(status==NULL || U_FAILURE(*status)) {
+ if(status==nullptr || U_FAILURE(*status)) {
return 0;
}
@@ -1417,7 +1417,7 @@ uloc_openKeywords(const char* localeID,
tmpLocaleID = _ConvertBCP47(localeID, tempBuffer,
sizeof(tempBuffer), status, nullptr);
} else {
- if (localeID==NULL) {
+ if (localeID==nullptr) {
localeID=uloc_getDefault();
}
tmpLocaleID=localeID;
@@ -1450,16 +1450,16 @@ uloc_openKeywords(const char* localeID,
}
/* keywords are located after '@' */
- if((tmpLocaleID = locale_getKeywordsStart(tmpLocaleID)) != NULL) {
+ if((tmpLocaleID = locale_getKeywordsStart(tmpLocaleID)) != nullptr) {
CharString keywords;
CharStringByteSink sink(&keywords);
- ulocimp_getKeywords(tmpLocaleID+1, '@', sink, FALSE, status);
+ ulocimp_getKeywords(tmpLocaleID+1, '@', sink, false, status);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return uloc_openKeywordList(keywords.data(), keywords.length(), status);
}
- return NULL;
+ return nullptr;
}
@@ -1493,8 +1493,8 @@ _canonicalize(const char* localeID,
CharString localeIDWithHyphens; // if localeID has a BPC47 extension and have _, tmpLocaleID points to this
const char* origLocaleID;
const char* tmpLocaleID;
- const char* keywordAssign = NULL;
- const char* separatorIndicator = NULL;
+ const char* keywordAssign = nullptr;
+ const char* separatorIndicator = nullptr;
if (_hasBCP47Extension(localeID)) {
const char* localeIDPtr = localeID;
@@ -1520,7 +1520,7 @@ _canonicalize(const char* localeID,
&(tempBuffer.requestedCapacity));
} while (tempBuffer.needToTryAgain(err));
} else {
- if (localeID==NULL) {
+ if (localeID==nullptr) {
localeID=uloc_getDefault();
}
tmpLocaleID=localeID;
@@ -1573,7 +1573,7 @@ _canonicalize(const char* localeID,
variantSize = -tag.length();
{
CharStringByteSink s(&tag);
- _getVariant(tmpLocaleID+1, *tmpLocaleID, s, FALSE);
+ _getVariant(tmpLocaleID+1, *tmpLocaleID, s, false);
}
variantSize += tag.length();
if (variantSize > 0) {
@@ -1585,13 +1585,13 @@ _canonicalize(const char* localeID,
/* Copy POSIX-style charset specifier, if any [mr.utf8] */
if (!OPTION_SET(options, _ULOC_CANONICALIZE) && *tmpLocaleID == '.') {
- UBool done = FALSE;
+ UBool done = false;
do {
char c = *tmpLocaleID;
switch (c) {
case 0:
case '@':
- done = TRUE;
+ done = true;
break;
default:
tag.append(c, *err);
@@ -1602,15 +1602,15 @@ _canonicalize(const char* localeID,
}
/* Scan ahead to next '@' and determine if it is followed by '=' and/or ';'
- After this, tmpLocaleID either points to '@' or is NULL */
- if ((tmpLocaleID=locale_getKeywordsStart(tmpLocaleID))!=NULL) {
+ After this, tmpLocaleID either points to '@' or is nullptr */
+ if ((tmpLocaleID=locale_getKeywordsStart(tmpLocaleID))!=nullptr) {
keywordAssign = uprv_strchr(tmpLocaleID, '=');
separatorIndicator = uprv_strchr(tmpLocaleID, ';');
}
/* Copy POSIX-style variant, if any [mr@FOO] */
if (!OPTION_SET(options, _ULOC_CANONICALIZE) &&
- tmpLocaleID != NULL && keywordAssign == NULL) {
+ tmpLocaleID != nullptr && keywordAssign == nullptr) {
for (;;) {
char c = *tmpLocaleID;
if (c == 0) {
@@ -1623,7 +1623,7 @@ _canonicalize(const char* localeID,
if (OPTION_SET(options, _ULOC_CANONICALIZE)) {
/* Handle @FOO variant if @ is present and not followed by = */
- if (tmpLocaleID!=NULL && keywordAssign==NULL) {
+ if (tmpLocaleID!=nullptr && keywordAssign==nullptr) {
/* Add missing '_' if needed */
if (fieldCount < 2 || (fieldCount < 3 && scriptSize > 0)) {
do {
@@ -1647,7 +1647,7 @@ _canonicalize(const char* localeID,
for (j=0; j<UPRV_LENGTHOF(CANONICALIZE_MAP); j++) {
StringPiece id(CANONICALIZE_MAP[j].id);
if (tag == id) {
- if (id.empty() && tmpLocaleID != NULL) {
+ if (id.empty() && tmpLocaleID != nullptr) {
break; /* Don't remap "" if keywords present */
}
tag.clear();
@@ -1660,11 +1660,11 @@ _canonicalize(const char* localeID,
sink.Append(tag.data(), tag.length());
if (!OPTION_SET(options, _ULOC_STRIP_KEYWORDS)) {
- if (tmpLocaleID!=NULL && keywordAssign!=NULL &&
+ if (tmpLocaleID!=nullptr && keywordAssign!=nullptr &&
(!separatorIndicator || separatorIndicator > keywordAssign)) {
sink.Append("@", 1);
++fieldCount;
- ulocimp_getKeywords(tmpLocaleID+1, '@', sink, TRUE, err);
+ ulocimp_getKeywords(tmpLocaleID+1, '@', sink, true, err);
}
}
}
@@ -1683,11 +1683,11 @@ uloc_getParent(const char* localeID,
if (U_FAILURE(*err))
return 0;
- if (localeID == NULL)
+ if (localeID == nullptr)
localeID = uloc_getDefault();
lastUnderscore=uprv_strrchr(localeID, '_');
- if(lastUnderscore!=NULL) {
+ if(lastUnderscore!=nullptr) {
i=(int32_t)(lastUnderscore-localeID);
} else {
i=0;
@@ -1714,15 +1714,15 @@ uloc_getLanguage(const char* localeID,
{
/* uloc_getLanguage will return a 2 character iso-639 code if one exists. *CWB*/
- if (err==NULL || U_FAILURE(*err)) {
+ if (err==nullptr || U_FAILURE(*err)) {
return 0;
}
- if(localeID==NULL) {
+ if(localeID==nullptr) {
localeID=uloc_getDefault();
}
- return ulocimp_getLanguage(localeID, NULL, *err).extract(language, languageCapacity, *err);
+ return ulocimp_getLanguage(localeID, nullptr, *err).extract(language, languageCapacity, *err);
}
U_CAPI int32_t U_EXPORT2
@@ -1731,11 +1731,11 @@ uloc_getScript(const char* localeID,
int32_t scriptCapacity,
UErrorCode* err)
{
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return 0;
}
- if(localeID==NULL) {
+ if(localeID==nullptr) {
localeID=uloc_getDefault();
}
@@ -1746,7 +1746,7 @@ uloc_getScript(const char* localeID,
}
if(_isIDSeparator(*localeID)) {
- return ulocimp_getScript(localeID+1, NULL, *err).extract(script, scriptCapacity, *err);
+ return ulocimp_getScript(localeID+1, nullptr, *err).extract(script, scriptCapacity, *err);
}
return u_terminateChars(script, scriptCapacity, 0, err);
}
@@ -1757,11 +1757,11 @@ uloc_getCountry(const char* localeID,
int32_t countryCapacity,
UErrorCode* err)
{
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return 0;
}
- if(localeID==NULL) {
+ if(localeID==nullptr) {
localeID=uloc_getDefault();
}
@@ -1783,7 +1783,7 @@ uloc_getCountry(const char* localeID,
localeID = scriptID;
}
if(_isIDSeparator(*localeID)) {
- return ulocimp_getCountry(localeID+1, NULL, *err).extract(country, countryCapacity, *err);
+ return ulocimp_getCountry(localeID+1, nullptr, *err).extract(country, countryCapacity, *err);
}
}
return u_terminateChars(country, countryCapacity, 0, err);
@@ -1799,14 +1799,14 @@ uloc_getVariant(const char* localeID,
const char* tmpLocaleID;
int32_t i=0;
- if(err==NULL || U_FAILURE(*err)) {
+ if(err==nullptr || U_FAILURE(*err)) {
return 0;
}
if (_hasBCP47Extension(localeID)) {
tmpLocaleID =_ConvertBCP47(localeID, tempBuffer, sizeof(tempBuffer), err, nullptr);
} else {
- if (localeID==NULL) {
+ if (localeID==nullptr) {
localeID=uloc_getDefault();
}
tmpLocaleID=localeID;
@@ -1847,7 +1847,7 @@ uloc_getVariant(const char* localeID,
}
CheckedArrayByteSink sink(variant, variantCapacity);
- _getVariant(tmpLocaleID+1, *tmpLocaleID, sink, FALSE);
+ _getVariant(tmpLocaleID+1, *tmpLocaleID, sink, false);
i = sink.NumberOfBytesAppended();
@@ -1981,7 +1981,7 @@ uloc_getISO3Language(const char* localeID)
char lang[ULOC_LANG_CAPACITY];
UErrorCode err = U_ZERO_ERROR;
- if (localeID == NULL)
+ if (localeID == nullptr)
{
localeID = uloc_getDefault();
}
@@ -2001,7 +2001,7 @@ uloc_getISO3Country(const char* localeID)
char cntry[ULOC_LANG_CAPACITY];
UErrorCode err = U_ZERO_ERROR;
- if (localeID == NULL)
+ if (localeID == nullptr)
{
localeID = uloc_getDefault();
}
@@ -2134,7 +2134,7 @@ U_CAPI const char* U_EXPORT2
uloc_toUnicodeLocaleKey(const char* keyword)
{
const char* bcpKey = ulocimp_toBcpKey(keyword);
- if (bcpKey == NULL && ultag_isUnicodeLocaleKey(keyword, -1)) {
+ if (bcpKey == nullptr && ultag_isUnicodeLocaleKey(keyword, -1)) {
// unknown keyword, but syntax is fine..
return keyword;
}
@@ -2144,8 +2144,8 @@ uloc_toUnicodeLocaleKey(const char* keyword)
U_CAPI const char* U_EXPORT2
uloc_toUnicodeLocaleType(const char* keyword, const char* value)
{
- const char* bcpType = ulocimp_toBcpType(keyword, value, NULL, NULL);
- if (bcpType == NULL && ultag_isUnicodeLocaleType(value, -1)) {
+ const char* bcpType = ulocimp_toBcpType(keyword, value, nullptr, nullptr);
+ if (bcpType == nullptr && ultag_isUnicodeLocaleType(value, -1)) {
// unknown keyword, but syntax is fine..
return value;
}
@@ -2158,11 +2158,11 @@ isWellFormedLegacyKey(const char* legacyKey)
const char* p = legacyKey;
while (*p) {
if (!UPRV_ISALPHANUM(*p)) {
- return FALSE;
+ return false;
}
p++;
}
- return TRUE;
+ return true;
}
static UBool
@@ -2173,13 +2173,13 @@ isWellFormedLegacyType(const char* legacyType)
while (*p) {
if (*p == '_' || *p == '/' || *p == '-') {
if (alphaNumLen == 0) {
- return FALSE;
+ return false;
}
alphaNumLen = 0;
} else if (UPRV_ISALPHANUM(*p)) {
alphaNumLen++;
} else {
- return FALSE;
+ return false;
}
p++;
}
@@ -2190,7 +2190,7 @@ U_CAPI const char* U_EXPORT2
uloc_toLegacyKey(const char* keyword)
{
const char* legacyKey = ulocimp_toLegacyKey(keyword);
- if (legacyKey == NULL) {
+ if (legacyKey == nullptr) {
// Checks if the specified locale key is well-formed with the legacy locale syntax.
//
// Note:
@@ -2208,8 +2208,8 @@ uloc_toLegacyKey(const char* keyword)
U_CAPI const char* U_EXPORT2
uloc_toLegacyType(const char* keyword, const char* value)
{
- const char* legacyType = ulocimp_toLegacyType(keyword, value, NULL, NULL);
- if (legacyType == NULL) {
+ const char* legacyType = ulocimp_toLegacyType(keyword, value, nullptr, nullptr);
+ if (legacyType == nullptr) {
// Checks if the specified locale type is well-formed with the legacy locale syntax.
//
// Note:
diff --git a/contrib/libs/icu/common/uloc_keytype.cpp b/contrib/libs/icu/common/uloc_keytype.cpp
index 580244124ee..a84b8609079 100644
--- a/contrib/libs/icu/common/uloc_keytype.cpp
+++ b/contrib/libs/icu/common/uloc_keytype.cpp
@@ -23,8 +23,8 @@
#include "uvector.h"
#include "udataswp.h" /* for InvChar functions */
-static UHashtable* gLocExtKeyMap = NULL;
-static icu::UInitOnce gLocExtKeyMapInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable* gLocExtKeyMap = nullptr;
+static icu::UInitOnce gLocExtKeyMapInitOnce {};
// bit flags for special types
typedef enum {
@@ -46,30 +46,30 @@ struct LocExtType : public icu::UMemory {
const char* bcpId;
};
-static icu::MemoryPool<icu::CharString>* gKeyTypeStringPool = NULL;
-static icu::MemoryPool<LocExtKeyData>* gLocExtKeyDataEntries = NULL;
-static icu::MemoryPool<LocExtType>* gLocExtTypeEntries = NULL;
+static icu::MemoryPool<icu::CharString>* gKeyTypeStringPool = nullptr;
+static icu::MemoryPool<LocExtKeyData>* gLocExtKeyDataEntries = nullptr;
+static icu::MemoryPool<LocExtType>* gLocExtTypeEntries = nullptr;
U_CDECL_BEGIN
static UBool U_CALLCONV
-uloc_key_type_cleanup(void) {
- if (gLocExtKeyMap != NULL) {
+uloc_key_type_cleanup() {
+ if (gLocExtKeyMap != nullptr) {
uhash_close(gLocExtKeyMap);
- gLocExtKeyMap = NULL;
+ gLocExtKeyMap = nullptr;
}
delete gLocExtKeyDataEntries;
- gLocExtKeyDataEntries = NULL;
+ gLocExtKeyDataEntries = nullptr;
delete gLocExtTypeEntries;
- gLocExtTypeEntries = NULL;
+ gLocExtTypeEntries = nullptr;
delete gKeyTypeStringPool;
- gKeyTypeStringPool = NULL;
+ gKeyTypeStringPool = nullptr;
gLocExtKeyMapInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -80,34 +80,34 @@ initFromResourceBundle(UErrorCode& sts) {
U_NAMESPACE_USE
ucln_common_registerCleanup(UCLN_COMMON_LOCALE_KEY_TYPE, uloc_key_type_cleanup);
- gLocExtKeyMap = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &sts);
+ gLocExtKeyMap = uhash_open(uhash_hashIChars, uhash_compareIChars, nullptr, &sts);
- LocalUResourceBundlePointer keyTypeDataRes(ures_openDirect(NULL, "keyTypeData", &sts));
- LocalUResourceBundlePointer keyMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "keyMap", NULL, &sts));
- LocalUResourceBundlePointer typeMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "typeMap", NULL, &sts));
+ LocalUResourceBundlePointer keyTypeDataRes(ures_openDirect(nullptr, "keyTypeData", &sts));
+ LocalUResourceBundlePointer keyMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "keyMap", nullptr, &sts));
+ LocalUResourceBundlePointer typeMapRes(ures_getByKey(keyTypeDataRes.getAlias(), "typeMap", nullptr, &sts));
if (U_FAILURE(sts)) {
return;
}
UErrorCode tmpSts = U_ZERO_ERROR;
- LocalUResourceBundlePointer typeAliasRes(ures_getByKey(keyTypeDataRes.getAlias(), "typeAlias", NULL, &tmpSts));
+ LocalUResourceBundlePointer typeAliasRes(ures_getByKey(keyTypeDataRes.getAlias(), "typeAlias", nullptr, &tmpSts));
tmpSts = U_ZERO_ERROR;
- LocalUResourceBundlePointer bcpTypeAliasRes(ures_getByKey(keyTypeDataRes.getAlias(), "bcpTypeAlias", NULL, &tmpSts));
+ LocalUResourceBundlePointer bcpTypeAliasRes(ures_getByKey(keyTypeDataRes.getAlias(), "bcpTypeAlias", nullptr, &tmpSts));
// initialize pools storing dynamically allocated objects
gKeyTypeStringPool = new icu::MemoryPool<icu::CharString>;
- if (gKeyTypeStringPool == NULL) {
+ if (gKeyTypeStringPool == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
return;
}
gLocExtKeyDataEntries = new icu::MemoryPool<LocExtKeyData>;
- if (gLocExtKeyDataEntries == NULL) {
+ if (gLocExtKeyDataEntries == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
return;
}
gLocExtTypeEntries = new icu::MemoryPool<LocExtType>;
- if (gLocExtTypeEntries == NULL) {
+ if (gLocExtTypeEntries == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -130,7 +130,7 @@ initFromResourceBundle(UErrorCode& sts) {
const char* bcpKeyId = legacyKeyId;
if (!uBcpKeyId.isEmpty()) {
icu::CharString* bcpKeyIdBuf = gKeyTypeStringPool->create();
- if (bcpKeyIdBuf == NULL) {
+ if (bcpKeyIdBuf == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -143,7 +143,7 @@ initFromResourceBundle(UErrorCode& sts) {
UBool isTZ = uprv_strcmp(legacyKeyId, "timezone") == 0;
- UHashtable* typeDataMap = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &sts);
+ UHashtable* typeDataMap = uhash_open(uhash_hashIChars, uhash_compareIChars, nullptr, &sts);
if (U_FAILURE(sts)) {
break;
}
@@ -154,21 +154,21 @@ initFromResourceBundle(UErrorCode& sts) {
if (typeAliasRes.isValid()) {
tmpSts = U_ZERO_ERROR;
- typeAliasResByKey.adoptInstead(ures_getByKey(typeAliasRes.getAlias(), legacyKeyId, NULL, &tmpSts));
+ typeAliasResByKey.adoptInstead(ures_getByKey(typeAliasRes.getAlias(), legacyKeyId, nullptr, &tmpSts));
if (U_FAILURE(tmpSts)) {
typeAliasResByKey.orphan();
}
}
if (bcpTypeAliasRes.isValid()) {
tmpSts = U_ZERO_ERROR;
- bcpTypeAliasResByKey.adoptInstead(ures_getByKey(bcpTypeAliasRes.getAlias(), bcpKeyId, NULL, &tmpSts));
+ bcpTypeAliasResByKey.adoptInstead(ures_getByKey(bcpTypeAliasRes.getAlias(), bcpKeyId, nullptr, &tmpSts));
if (U_FAILURE(tmpSts)) {
bcpTypeAliasResByKey.orphan();
}
}
// look up type map for the key, and walk through the mapping data
- LocalUResourceBundlePointer typeMapResByKey(ures_getByKey(typeMapRes.getAlias(), legacyKeyId, NULL, &sts));
+ LocalUResourceBundlePointer typeMapResByKey(ures_getByKey(typeMapRes.getAlias(), legacyKeyId, nullptr, &sts));
if (U_FAILURE(sts)) {
// We fail here if typeMap does not have an entry corresponding to every entry in keyMap (should
// not happen for valid keyTypeData), or if ures_getByKeyfails fails for some other reason
@@ -202,10 +202,10 @@ initFromResourceBundle(UErrorCode& sts) {
if (isTZ) {
// a timezone key uses a colon instead of a slash in the resource.
// e.g. America:Los_Angeles
- if (uprv_strchr(legacyTypeId, ':') != NULL) {
+ if (uprv_strchr(legacyTypeId, ':') != nullptr) {
icu::CharString* legacyTypeIdBuf =
gKeyTypeStringPool->create(legacyTypeId, sts);
- if (legacyTypeIdBuf == NULL) {
+ if (legacyTypeIdBuf == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -229,7 +229,7 @@ initFromResourceBundle(UErrorCode& sts) {
const char* bcpTypeId = legacyTypeId;
if (!uBcpTypeId.isEmpty()) {
icu::CharString* bcpTypeIdBuf = gKeyTypeStringPool->create();
- if (bcpTypeIdBuf == NULL) {
+ if (bcpTypeIdBuf == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -245,7 +245,7 @@ initFromResourceBundle(UErrorCode& sts) {
// type under the same key. So we use a single
// map for lookup.
LocExtType* t = gLocExtTypeEntries->create();
- if (t == NULL) {
+ if (t == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -269,19 +269,19 @@ initFromResourceBundle(UErrorCode& sts) {
while (ures_hasNext(typeAliasResByKey.getAlias()) && U_SUCCESS(sts)) {
int32_t toLen;
typeAliasDataEntry.adoptInstead(ures_getNextResource(typeAliasResByKey.getAlias(), typeAliasDataEntry.orphan(), &sts));
- const UChar* to = ures_getString(typeAliasDataEntry.getAlias(), &toLen, &sts);
+ const char16_t* to = ures_getString(typeAliasDataEntry.getAlias(), &toLen, &sts);
if (U_FAILURE(sts)) {
break;
}
// check if this is an alias of canonical legacy type
- if (uprv_compareInvWithUChar(NULL, legacyTypeId, -1, to, toLen) == 0) {
+ if (uprv_compareInvWithUChar(nullptr, legacyTypeId, -1, to, toLen) == 0) {
const char* from = ures_getKey(typeAliasDataEntry.getAlias());
if (isTZ) {
// replace colon with slash if necessary
- if (uprv_strchr(from, ':') != NULL) {
+ if (uprv_strchr(from, ':') != nullptr) {
icu::CharString* fromBuf =
gKeyTypeStringPool->create(from, sts);
- if (fromBuf == NULL) {
+ if (fromBuf == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -310,12 +310,12 @@ initFromResourceBundle(UErrorCode& sts) {
while (ures_hasNext(bcpTypeAliasResByKey.getAlias()) && U_SUCCESS(sts)) {
int32_t toLen;
bcpTypeAliasDataEntry.adoptInstead(ures_getNextResource(bcpTypeAliasResByKey.getAlias(), bcpTypeAliasDataEntry.orphan(), &sts));
- const UChar* to = ures_getString(bcpTypeAliasDataEntry.getAlias(), &toLen, &sts);
+ const char16_t* to = ures_getString(bcpTypeAliasDataEntry.getAlias(), &toLen, &sts);
if (U_FAILURE(sts)) {
break;
}
// check if this is an alias of bcp type
- if (uprv_compareInvWithUChar(NULL, bcpTypeId, -1, to, toLen) == 0) {
+ if (uprv_compareInvWithUChar(nullptr, bcpTypeId, -1, to, toLen) == 0) {
const char* from = ures_getKey(bcpTypeAliasDataEntry.getAlias());
uhash_put(typeDataMap, (void*)from, t, &sts);
}
@@ -331,7 +331,7 @@ initFromResourceBundle(UErrorCode& sts) {
}
LocExtKeyData* keyData = gLocExtKeyDataEntries->create();
- if (keyData == NULL) {
+ if (keyData == nullptr) {
sts = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -356,9 +356,9 @@ init() {
UErrorCode sts = U_ZERO_ERROR;
umtx_initOnce(gLocExtKeyMapInitOnce, &initFromResourceBundle, sts);
if (U_FAILURE(sts)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static UBool
@@ -368,7 +368,7 @@ isSpecialTypeCodepoints(const char* val) {
while (*p) {
if (*p == '-') {
if (subtagLen < 4 || subtagLen > 6) {
- return FALSE;
+ return false;
}
subtagLen = 0;
} else if ((*p >= '0' && *p <= '9') ||
@@ -376,7 +376,7 @@ isSpecialTypeCodepoints(const char* val) {
(*p >= 'a' && *p <= 'f')) { // also in EBCDIC
subtagLen++;
} else {
- return FALSE;
+ return false;
}
p++;
}
@@ -390,13 +390,13 @@ isSpecialTypeReorderCode(const char* val) {
while (*p) {
if (*p == '-') {
if (subtagLen < 3 || subtagLen > 8) {
- return FALSE;
+ return false;
}
subtagLen = 0;
} else if (uprv_isASCIILetter(*p)) {
subtagLen++;
} else {
- return FALSE;
+ return false;
}
p++;
}
@@ -412,7 +412,7 @@ isSpecialTypeRgKeyValue(const char* val) {
(subtagLen >= 2 && (*p == 'Z' || *p == 'z')) ) {
subtagLen++;
} else {
- return FALSE;
+ return false;
}
p++;
}
@@ -422,53 +422,53 @@ isSpecialTypeRgKeyValue(const char* val) {
U_CFUNC const char*
ulocimp_toBcpKey(const char* key) {
if (!init()) {
- return NULL;
+ return nullptr;
}
LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key);
- if (keyData != NULL) {
+ if (keyData != nullptr) {
return keyData->bcpId;
}
- return NULL;
+ return nullptr;
}
U_CFUNC const char*
ulocimp_toLegacyKey(const char* key) {
if (!init()) {
- return NULL;
+ return nullptr;
}
LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key);
- if (keyData != NULL) {
+ if (keyData != nullptr) {
return keyData->legacyId;
}
- return NULL;
+ return nullptr;
}
U_CFUNC const char*
ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType) {
- if (isKnownKey != NULL) {
- *isKnownKey = FALSE;
+ if (isKnownKey != nullptr) {
+ *isKnownKey = false;
}
- if (isSpecialType != NULL) {
- *isSpecialType = FALSE;
+ if (isSpecialType != nullptr) {
+ *isSpecialType = false;
}
if (!init()) {
- return NULL;
+ return nullptr;
}
LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key);
- if (keyData != NULL) {
- if (isKnownKey != NULL) {
- *isKnownKey = TRUE;
+ if (keyData != nullptr) {
+ if (isKnownKey != nullptr) {
+ *isKnownKey = true;
}
LocExtType* t = (LocExtType*)uhash_get(keyData->typeMap.getAlias(), type);
- if (t != NULL) {
+ if (t != nullptr) {
return t->bcpId;
}
if (keyData->specialTypes != SPECIALTYPE_NONE) {
- UBool matched = FALSE;
+ UBool matched = false;
if (keyData->specialTypes & SPECIALTYPE_CODEPOINTS) {
matched = isSpecialTypeCodepoints(type);
}
@@ -479,41 +479,41 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i
matched = isSpecialTypeRgKeyValue(type);
}
if (matched) {
- if (isSpecialType != NULL) {
- *isSpecialType = TRUE;
+ if (isSpecialType != nullptr) {
+ *isSpecialType = true;
}
return type;
}
}
}
- return NULL;
+ return nullptr;
}
U_CFUNC const char*
ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType) {
- if (isKnownKey != NULL) {
- *isKnownKey = FALSE;
+ if (isKnownKey != nullptr) {
+ *isKnownKey = false;
}
- if (isSpecialType != NULL) {
- *isSpecialType = FALSE;
+ if (isSpecialType != nullptr) {
+ *isSpecialType = false;
}
if (!init()) {
- return NULL;
+ return nullptr;
}
LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key);
- if (keyData != NULL) {
- if (isKnownKey != NULL) {
- *isKnownKey = TRUE;
+ if (keyData != nullptr) {
+ if (isKnownKey != nullptr) {
+ *isKnownKey = true;
}
LocExtType* t = (LocExtType*)uhash_get(keyData->typeMap.getAlias(), type);
- if (t != NULL) {
+ if (t != nullptr) {
return t->legacyId;
}
if (keyData->specialTypes != SPECIALTYPE_NONE) {
- UBool matched = FALSE;
+ UBool matched = false;
if (keyData->specialTypes & SPECIALTYPE_CODEPOINTS) {
matched = isSpecialTypeCodepoints(type);
}
@@ -524,13 +524,13 @@ ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool
matched = isSpecialTypeRgKeyValue(type);
}
if (matched) {
- if (isSpecialType != NULL) {
- *isSpecialType = TRUE;
+ if (isSpecialType != nullptr) {
+ *isSpecialType = true;
}
return type;
}
}
}
- return NULL;
+ return nullptr;
}
diff --git a/contrib/libs/icu/common/uloc_tag.cpp b/contrib/libs/icu/common/uloc_tag.cpp
index 0150e94cefd..43d597549f7 100644
--- a/contrib/libs/icu/common/uloc_tag.cpp
+++ b/contrib/libs/icu/common/uloc_tag.cpp
@@ -378,10 +378,10 @@ _isAlphaString(const char* s, int32_t len) {
int32_t i;
for (i = 0; i < len; i++) {
if (!ISALPHA(*(s + i))) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static UBool
@@ -389,10 +389,10 @@ _isNumericString(const char* s, int32_t len) {
int32_t i;
for (i = 0; i < len; i++) {
if (!ISNUMERIC(*(s + i))) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static UBool
@@ -400,10 +400,10 @@ _isAlphaNumericString(const char* s, int32_t len) {
int32_t i;
for (i = 0; i < len; i++) {
if (!ISALPHA(*(s + i)) && !ISNUMERIC(*(s + i))) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static UBool
@@ -412,9 +412,9 @@ _isAlphaNumericStringLimitedLength(const char* s, int32_t len, int32_t min, int3
len = (int32_t)uprv_strlen(s);
}
if (len >= min && len <= max && _isAlphaNumericString(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CFUNC UBool
@@ -428,9 +428,9 @@ ultag_isLanguageSubtag(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (len >= 2 && len <= 8 && _isAlphaString(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static UBool
@@ -443,9 +443,9 @@ _isExtlangSubtag(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (len == 3 && _isAlphaString(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CFUNC UBool
@@ -457,9 +457,9 @@ ultag_isScriptSubtag(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (len == 4 && _isAlphaString(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CFUNC UBool
@@ -472,12 +472,12 @@ ultag_isRegionSubtag(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (len == 2 && _isAlphaString(s, len)) {
- return TRUE;
+ return true;
}
if (len == 3 && _isNumericString(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static UBool
@@ -490,18 +490,18 @@ _isVariantSubtag(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (_isAlphaNumericStringLimitedLength(s, len, 5, 8)) {
- return TRUE;
+ return true;
}
if (len == 4 && ISNUMERIC(*s) && _isAlphaNumericString(s + 1, 3)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static UBool
_isSepListOf(UBool (*test)(const char*, int32_t), const char* s, int32_t len) {
const char *p = s;
- const char *pSubtag = NULL;
+ const char *pSubtag = nullptr;
if (len < 0) {
len = (int32_t)uprv_strlen(s);
@@ -509,20 +509,20 @@ _isSepListOf(UBool (*test)(const char*, int32_t), const char* s, int32_t len) {
while ((p - s) < len) {
if (*p == SEP) {
- if (pSubtag == NULL) {
- return FALSE;
+ if (pSubtag == nullptr) {
+ return false;
}
if (!test(pSubtag, (int32_t)(p - pSubtag))) {
- return FALSE;
+ return false;
}
- pSubtag = NULL;
- } else if (pSubtag == NULL) {
+ pSubtag = nullptr;
+ } else if (pSubtag == nullptr) {
pSubtag = p;
}
p++;
}
- if (pSubtag == NULL) {
- return FALSE;
+ if (pSubtag == nullptr) {
+ return false;
}
return test(pSubtag, (int32_t)(p - pSubtag));
}
@@ -557,9 +557,9 @@ _isExtensionSingleton(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (len == 1 && (ISALPHA(*s) || ISNUMERIC(*s)) && (uprv_tolower(*s) != PRIVATEUSE)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static UBool
@@ -610,9 +610,9 @@ ultag_isUnicodeLocaleKey(const char* s, int32_t len) {
len = (int32_t)uprv_strlen(s);
}
if (len == 2 && (ISALPHA(*s) || ISNUMERIC(*s)) && ISALPHA(s[1])) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CFUNC UBool
@@ -641,9 +641,9 @@ _isTKey(const char* s, int32_t len)
len = (int32_t)uprv_strlen(s);
}
if (len == 2 && ISALPHA(*s) && ISNUMERIC(*(s + 1))) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CAPI const char * U_EXPORT2
@@ -694,23 +694,23 @@ _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len)
case kStart:
if (ultag_isLanguageSubtag(s, len) && len != 4) {
state = kGotLanguage;
- return TRUE;
+ return true;
}
if (_isTKey(s, len)) {
state = kGotTKey;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
case kGotLanguage:
if (ultag_isScriptSubtag(s, len)) {
state = kGotScript;
- return TRUE;
+ return true;
}
U_FALLTHROUGH;
case kGotScript:
if (ultag_isRegionSubtag(s, len)) {
state = kGotRegion;
- return TRUE;
+ return true;
}
U_FALLTHROUGH;
case kGotRegion:
@@ -718,30 +718,30 @@ _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len)
case kGotVariant:
if (_isVariantSubtag(s, len)) {
state = kGotVariant;
- return TRUE;
+ return true;
}
if (_isTKey(s, len)) {
state = kGotTKey;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
case kGotTKey:
if (_isTValue(s, len)) {
state = kGotTValue;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
case kGotTValue:
if (_isTKey(s, len)) {
state = kGotTKey;
- return TRUE;
+ return true;
}
if (_isTValue(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
static UBool
@@ -755,32 +755,32 @@ _isUnicodeExtensionSubtag(int32_t& state, const char* s, int32_t len)
case kStart:
if (ultag_isUnicodeLocaleKey(s, len)) {
state = kGotKey;
- return TRUE;
+ return true;
}
if (ultag_isUnicodeLocaleAttribute(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
case kGotKey:
if (ultag_isUnicodeLocaleKey(s, len)) {
- return TRUE;
+ return true;
}
if (_isUnicodeLocaleTypeSubtag(s, len)) {
state = kGotType;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
case kGotType:
if (ultag_isUnicodeLocaleKey(s, len)) {
state = kGotKey;
- return TRUE;
+ return true;
}
if (_isUnicodeLocaleTypeSubtag(s, len)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
static UBool
@@ -798,7 +798,7 @@ _isStatefulSepListOf(UBool (*test)(int32_t&, const char*, int32_t), const char*
for (p = s; len > 0; p++, len--) {
if (*p == SEP) {
if (!test(state, start, subtagLen)) {
- return FALSE;
+ return false;
}
subtagLen = 0;
start = p + 1;
@@ -808,9 +808,9 @@ _isStatefulSepListOf(UBool (*test)(int32_t&, const char*, int32_t), const char*
}
if (test(state, start, subtagLen) && state >= 0) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CFUNC UBool
@@ -835,22 +835,22 @@ ultag_isUnicodeExtensionSubtags(const char* s, int32_t len) {
static UBool
_addVariantToList(VariantListEntry **first, VariantListEntry *var) {
- UBool bAdded = TRUE;
+ UBool bAdded = true;
- if (*first == NULL) {
- var->next = NULL;
+ if (*first == nullptr) {
+ var->next = nullptr;
*first = var;
} else {
VariantListEntry *prev, *cur;
int32_t cmp;
/* variants order should be preserved */
- prev = NULL;
+ prev = nullptr;
cur = *first;
- while (TRUE) {
- if (cur == NULL) {
+ while (true) {
+ if (cur == nullptr) {
prev->next = var;
- var->next = NULL;
+ var->next = nullptr;
break;
}
@@ -858,7 +858,7 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) {
cmp = uprv_compareInvCharsAsAscii(var->variant, cur->variant);
if (cmp == 0) {
/* duplicated variant */
- bAdded = FALSE;
+ bAdded = false;
break;
}
prev = cur;
@@ -871,27 +871,27 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) {
static UBool
_addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) {
- UBool bAdded = TRUE;
+ UBool bAdded = true;
- if (*first == NULL) {
- attr->next = NULL;
+ if (*first == nullptr) {
+ attr->next = nullptr;
*first = attr;
} else {
AttributeListEntry *prev, *cur;
int32_t cmp;
/* reorder variants in alphabetical order */
- prev = NULL;
+ prev = nullptr;
cur = *first;
- while (TRUE) {
- if (cur == NULL) {
+ while (true) {
+ if (cur == nullptr) {
prev->next = attr;
- attr->next = NULL;
+ attr->next = nullptr;
break;
}
cmp = uprv_compareInvCharsAsAscii(attr->attribute, cur->attribute);
if (cmp < 0) {
- if (prev == NULL) {
+ if (prev == nullptr) {
*first = attr;
} else {
prev->next = attr;
@@ -901,7 +901,7 @@ _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) {
}
if (cmp == 0) {
/* duplicated variant */
- bAdded = FALSE;
+ bAdded = false;
break;
}
prev = cur;
@@ -915,22 +915,22 @@ _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) {
static UBool
_addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool localeToBCP) {
- UBool bAdded = TRUE;
+ UBool bAdded = true;
- if (*first == NULL) {
- ext->next = NULL;
+ if (*first == nullptr) {
+ ext->next = nullptr;
*first = ext;
} else {
ExtensionListEntry *prev, *cur;
int32_t cmp;
/* reorder variants in alphabetical order */
- prev = NULL;
+ prev = nullptr;
cur = *first;
- while (TRUE) {
- if (cur == NULL) {
+ while (true) {
+ if (cur == nullptr) {
prev->next = ext;
- ext->next = NULL;
+ ext->next = nullptr;
break;
}
if (localeToBCP) {
@@ -969,7 +969,7 @@ _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool l
cmp = uprv_compareInvCharsAsAscii(ext->key, cur->key);
}
if (cmp < 0) {
- if (prev == NULL) {
+ if (prev == nullptr) {
*first = ext;
} else {
prev->next = ext;
@@ -979,7 +979,7 @@ _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool l
}
if (cmp == 0) {
/* duplicated extension key */
- bAdded = FALSE;
+ bAdded = false;
break;
}
prev = cur;
@@ -994,18 +994,18 @@ static void
_initializeULanguageTag(ULanguageTag* langtag) {
int32_t i;
- langtag->buf = NULL;
+ langtag->buf = nullptr;
langtag->language = EMPTY;
for (i = 0; i < MAXEXTLANG; i++) {
- langtag->extlang[i] = NULL;
+ langtag->extlang[i] = nullptr;
}
langtag->script = EMPTY;
langtag->region = EMPTY;
- langtag->variants = NULL;
- langtag->extensions = NULL;
+ langtag->variants = nullptr;
+ langtag->extensions = nullptr;
langtag->legacy = EMPTY;
langtag->privateuse = EMPTY;
@@ -1132,8 +1132,8 @@ _appendRegionToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool stri
}
static void _sortVariants(VariantListEntry* first) {
- for (VariantListEntry* var1 = first; var1 != NULL; var1 = var1->next) {
- for (VariantListEntry* var2 = var1->next; var2 != NULL; var2 = var2->next) {
+ 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.
if (uprv_compareInvCharsAsAscii(var1->variant, var2->variant) > 0) {
const char* temp = var1->variant;
@@ -1164,20 +1164,20 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
if (len > 0) {
char *p, *pVar;
- UBool bNext = TRUE;
+ UBool bNext = true;
VariantListEntry *var;
- VariantListEntry *varFirst = NULL;
+ VariantListEntry *varFirst = nullptr;
- pVar = NULL;
+ pVar = nullptr;
p = buf;
while (bNext) {
if (*p == SEP || *p == LOCALE_SEP || *p == 0) {
if (*p == 0) {
- bNext = FALSE;
+ bNext = false;
} else {
*p = 0; /* terminate */
}
- if (pVar == NULL) {
+ if (pVar == nullptr) {
if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
break;
@@ -1195,7 +1195,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
if (uprv_strcmp(pVar,POSIX_VALUE) || len != (int32_t)uprv_strlen(POSIX_VALUE)) {
/* emit the variant to the list */
var = (VariantListEntry*)uprv_malloc(sizeof(VariantListEntry));
- if (var == NULL) {
+ if (var == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -1211,7 +1211,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
} 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;
@@ -1222,15 +1222,15 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
}
}
/* reset variant starting position */
- pVar = NULL;
- } else if (pVar == NULL) {
+ pVar = nullptr;
+ } else if (pVar == nullptr) {
pVar = p;
}
p++;
}
if (U_SUCCESS(*status)) {
- if (varFirst != NULL) {
+ if (varFirst != nullptr) {
int32_t varLen;
/* per UTS35, we should sort the variants */
@@ -1238,7 +1238,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
/* write out validated/normalized variants to the target */
var = varFirst;
- while (var != NULL) {
+ while (var != nullptr) {
sink.Append("-", 1);
varLen = (int32_t)uprv_strlen(var->variant);
sink.Append(var->variant, varLen);
@@ -1249,7 +1249,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
/* clean up */
var = varFirst;
- while (var != NULL) {
+ while (var != nullptr) {
VariantListEntry *tmpVar = var->next;
uprv_free(var);
var = tmpVar;
@@ -1278,9 +1278,9 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
/* reorder extensions */
int32_t len;
const char *key;
- ExtensionListEntry *firstExt = NULL;
+ ExtensionListEntry *firstExt = nullptr;
ExtensionListEntry *ext;
- AttributeListEntry *firstAttr = NULL;
+ AttributeListEntry *firstAttr = nullptr;
AttributeListEntry *attr;
icu::MemoryPool<icu::CharString> extBufPool;
const char *bcpKey=nullptr, *bcpValue=nullptr;
@@ -1288,9 +1288,9 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
int32_t keylen;
UBool isBcpUExt;
- while (TRUE) {
- key = uenum_next(keywordEnum.getAlias(), NULL, status);
- if (key == NULL) {
+ while (true) {
+ key = uenum_next(keywordEnum.getAlias(), nullptr, status);
+ if (key == nullptr) {
break;
}
@@ -1322,7 +1322,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
if (uprv_strcmp(key, LOCALE_ATTRIBUTE_KEY) == 0) {
if (len > 0) {
int32_t i = 0;
- while (TRUE) {
+ while (true) {
attrBufLength = 0;
for (; i < len; i++) {
if (buf[i] != '-') {
@@ -1341,13 +1341,13 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
/* create AttributeListEntry */
attr = attrPool.create();
- if (attr == NULL) {
+ if (attr == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
break;
}
icu::CharString* attrValue =
strPool.create(attrBuf, attrBufLength, *status);
- if (attrValue == NULL) {
+ if (attrValue == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -1365,11 +1365,11 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
}
/* for a place holder ExtensionListEntry */
bcpKey = LOCALE_ATTRIBUTE_KEY;
- bcpValue = NULL;
+ bcpValue = nullptr;
}
} else if (isBcpUExt) {
bcpKey = uloc_toUnicodeLocaleKey(key);
- if (bcpKey == NULL) {
+ if (bcpKey == nullptr) {
if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
break;
@@ -1379,7 +1379,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
/* we've checked buf is null-terminated above */
bcpValue = uloc_toUnicodeLocaleType(key, buf.data());
- if (bcpValue == NULL) {
+ if (bcpValue == nullptr) {
if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
break;
@@ -1441,14 +1441,14 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
/* create ExtensionListEntry */
ext = extPool.create();
- if (ext == NULL) {
+ if (ext == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
break;
}
ext->key = bcpKey;
ext->value = bcpValue;
- if (!_addExtensionToList(&firstExt, ext, TRUE)) {
+ if (!_addExtensionToList(&firstExt, ext, true)) {
if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
break;
@@ -1460,25 +1460,25 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st
if (hadPosix) {
/* create ExtensionListEntry for POSIX */
ext = extPool.create();
- if (ext == NULL) {
+ if (ext == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
ext->key = POSIX_KEY;
ext->value = POSIX_VALUE;
- if (!_addExtensionToList(&firstExt, ext, TRUE)) {
+ if (!_addExtensionToList(&firstExt, ext, true)) {
// Silently ignore errors.
}
}
- if (U_SUCCESS(*status) && (firstExt != NULL || firstAttr != NULL)) {
- UBool startLDMLExtension = FALSE;
+ if (U_SUCCESS(*status) && (firstExt != nullptr || firstAttr != nullptr)) {
+ UBool startLDMLExtension = false;
for (ext = firstExt; ext; ext = ext->next) {
if (!startLDMLExtension && uprv_strlen(ext->key) > 1) {
/* first LDML u singlton extension */
sink.Append("-u", 2);
- startLDMLExtension = TRUE;
+ startLDMLExtension = true;
}
/* write out the sorted BCP47 attributes, extensions and private use */
@@ -1514,19 +1514,19 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
const char *pKwds; /* beginning of key-type pairs */
UBool variantExists = *posixVariant;
- ExtensionListEntry *kwdFirst = NULL; /* first LDML keyword */
+ ExtensionListEntry *kwdFirst = nullptr; /* first LDML keyword */
ExtensionListEntry *kwd, *nextKwd;
int32_t len;
/* Reset the posixVariant value */
- *posixVariant = FALSE;
+ *posixVariant = false;
pTag = ldmlext;
- pKwds = NULL;
+ pKwds = nullptr;
{
- AttributeListEntry *attrFirst = NULL; /* first attribute */
+ AttributeListEntry *attrFirst = nullptr; /* first attribute */
AttributeListEntry *attr, *nextAttr;
char attrBuf[ULOC_KEYWORD_AND_VALUES_CAPACITY];
@@ -1546,7 +1546,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
/* add this attribute to the list */
attr = attrPool.create();
- if (attr == NULL) {
+ if (attr == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1576,20 +1576,20 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
/* emit attributes as an LDML keyword, e.g. attribute=attr1-attr2 */
kwd = extPool.create();
- if (kwd == NULL) {
+ if (kwd == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
icu::CharString* value = kwdBuf.create();
- if (value == NULL) {
+ if (value == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
/* attribute subtags sorted in alphabetical order as type */
attr = attrFirst;
- while (attr != NULL) {
+ while (attr != nullptr) {
nextAttr = attr->next;
if (attr != attrFirst) {
value->append('-', *status);
@@ -1604,7 +1604,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
kwd->key = LOCALE_ATTRIBUTE_KEY;
kwd->value = value->data();
- if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) {
+ if (!_addExtensionToList(&kwdFirst, kwd, false)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1612,18 +1612,18 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
}
if (pKwds) {
- const char *pBcpKey = NULL; /* u extension key subtag */
- const char *pBcpType = NULL; /* beginning of u extension type subtag(s) */
+ const char *pBcpKey = nullptr; /* u extension key subtag */
+ const char *pBcpType = nullptr; /* beginning of u extension type subtag(s) */
int32_t bcpKeyLen = 0;
int32_t bcpTypeLen = 0;
- UBool isDone = FALSE;
+ UBool isDone = false;
pTag = pKwds;
/* BCP47 representation of LDML key/type pairs */
while (!isDone) {
- const char *pNextBcpKey = NULL;
+ const char *pNextBcpKey = nullptr;
int32_t nextBcpKeyLen = 0;
- UBool emitKeyword = FALSE;
+ UBool emitKeyword = false;
if (*pTag) {
/* locate next separator char */
@@ -1631,7 +1631,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
if (ultag_isUnicodeLocaleKey(pTag, len)) {
if (pBcpKey) {
- emitKeyword = TRUE;
+ emitKeyword = true;
pNextBcpKey = pTag;
nextBcpKeyLen = len;
} else {
@@ -1639,7 +1639,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
bcpKeyLen = len;
}
} else {
- U_ASSERT(pBcpKey != NULL);
+ U_ASSERT(pBcpKey != nullptr);
/* within LDML type subtags */
if (pBcpType) {
bcpTypeLen += (len + 1);
@@ -1657,17 +1657,17 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
}
} else {
/* processing last one */
- emitKeyword = TRUE;
- isDone = TRUE;
+ emitKeyword = true;
+ isDone = true;
}
if (emitKeyword) {
- const char *pKey = NULL; /* LDML key */
- const char *pType = NULL; /* LDML type */
+ const char *pKey = nullptr; /* LDML key */
+ const char *pType = nullptr; /* LDML type */
char bcpKeyBuf[3]; /* BCP key length is always 2 for now */
- U_ASSERT(pBcpKey != NULL);
+ U_ASSERT(pBcpKey != nullptr);
if (bcpKeyLen >= (int32_t)sizeof(bcpKeyBuf)) {
/* the BCP key is invalid */
@@ -1681,7 +1681,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
/* u extension key to LDML key */
pKey = uloc_toLegacyKey(bcpKeyBuf);
- if (pKey == NULL) {
+ if (pKey == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1692,7 +1692,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
*/
T_CString_toLowerCase(bcpKeyBuf);
icu::CharString* key = kwdBuf.create(bcpKeyBuf, bcpKeyLen, *status);
- if (key == NULL) {
+ if (key == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1715,7 +1715,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
/* BCP type to locale type */
pType = uloc_toLegacyType(pKey, bcpTypeBuf);
- if (pType == NULL) {
+ if (pType == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1727,7 +1727,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
/* normalize to lower case */
T_CString_toLowerCase(bcpTypeBuf);
icu::CharString* type = kwdBuf.create(bcpTypeBuf, bcpTypeLen, *status);
- if (type == NULL) {
+ if (type == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1744,11 +1744,11 @@ _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 == NULL) {
+ if (kwd == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1756,24 +1756,24 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
kwd->key = pKey;
kwd->value = pType;
- if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) {
+ if (!_addExtensionToList(&kwdFirst, kwd, false)) {
// duplicate keyword is allowed, Only the first
// is honored.
}
}
pBcpKey = pNextBcpKey;
- bcpKeyLen = pNextBcpKey != NULL ? nextBcpKeyLen : 0;
- pBcpType = NULL;
+ bcpKeyLen = pNextBcpKey != nullptr ? nextBcpKeyLen : 0;
+ pBcpType = nullptr;
bcpTypeLen = 0;
}
}
}
kwd = kwdFirst;
- while (kwd != NULL) {
+ while (kwd != nullptr) {
nextKwd = kwd->next;
- _addExtensionToList(appendTo, kwd, FALSE);
+ _addExtensionToList(appendTo, kwd, false);
kwd = nextKwd;
}
}
@@ -1783,12 +1783,12 @@ static void
_appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) {
int32_t i, n;
int32_t len;
- ExtensionListEntry *kwdFirst = NULL;
+ ExtensionListEntry *kwdFirst = nullptr;
ExtensionListEntry *kwd;
const char *key, *type;
icu::MemoryPool<ExtensionListEntry> extPool;
icu::MemoryPool<icu::CharString> kwdBuf;
- UBool posixVariant = FALSE;
+ UBool posixVariant = false;
if (U_FAILURE(*status)) {
return;
@@ -1803,7 +1803,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status)
if (*key == LDMLEXT) {
/* Determine if variants already exists */
if (ultag_getVariantsSize(langtag)) {
- posixVariant = TRUE;
+ posixVariant = true;
}
_appendLDMLExtensionAsKeywords(type, &kwdFirst, extPool, kwdBuf, &posixVariant, status);
@@ -1812,13 +1812,13 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status)
}
} else {
kwd = extPool.create();
- if (kwd == NULL) {
+ if (kwd == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
break;
}
kwd->key = key;
kwd->value = type;
- if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) {
+ if (!_addExtensionToList(&kwdFirst, kwd, false)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
break;
}
@@ -1830,12 +1830,12 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status)
if ((int32_t)uprv_strlen(type) > 0) {
/* add private use as a keyword */
kwd = extPool.create();
- if (kwd == NULL) {
+ if (kwd == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
kwd->key = PRIVATEUSE_KEY;
kwd->value = type;
- if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) {
+ if (!_addExtensionToList(&kwdFirst, kwd, false)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
}
@@ -1849,14 +1849,14 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status)
sink.Append(_POSIX, len);
}
- if (U_SUCCESS(*status) && kwdFirst != NULL) {
+ if (U_SUCCESS(*status) && kwdFirst != nullptr) {
/* write out the sorted keywords */
- UBool firstValue = TRUE;
+ UBool firstValue = true;
kwd = kwdFirst;
do {
if (firstValue) {
sink.Append("@", 1);
- firstValue = FALSE;
+ firstValue = false;
} else {
sink.Append(";", 1);
}
@@ -1899,21 +1899,21 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool
if (len > 0) {
char *p, *pPriv;
- UBool bNext = TRUE;
- UBool firstValue = TRUE;
+ UBool bNext = true;
+ UBool firstValue = true;
UBool writeValue;
- pPriv = NULL;
+ pPriv = nullptr;
p = buf;
while (bNext) {
- writeValue = FALSE;
+ writeValue = false;
if (*p == SEP || *p == LOCALE_SEP || *p == 0) {
if (*p == 0) {
- bNext = FALSE;
+ bNext = false;
} else {
*p = 0; /* terminate */
}
- if (pPriv != NULL) {
+ if (pPriv != nullptr) {
/* Private use in the canonical format is lowercase in BCP47 */
for (i = 0; *(pPriv + i) != 0; i++) {
*(pPriv + i) = uprv_tolower(*(pPriv + i));
@@ -1923,10 +1923,10 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool
if (_isPrivateuseValueSubtag(pPriv, -1)) {
if (firstValue) {
if (!_isVariantSubtag(pPriv, -1)) {
- writeValue = TRUE;
+ writeValue = true;
}
} else {
- writeValue = TRUE;
+ writeValue = true;
}
} else if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -1959,7 +1959,7 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool
tmpAppend[reslen++] = SEP;
}
- firstValue = FALSE;
+ firstValue = false;
}
len = (int32_t)uprv_strlen(pPriv);
@@ -1970,8 +1970,8 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool
}
}
/* reset private use starting position */
- pPriv = NULL;
- } else if (pPriv == NULL) {
+ pPriv = nullptr;
+ } else if (pPriv == nullptr) {
pPriv = p;
}
p++;
@@ -2026,15 +2026,15 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
ExtensionListEntry *pExtension;
char *pExtValueSubtag, *pExtValueSubtagEnd;
int32_t i;
- UBool privateuseVar = FALSE;
+ UBool privateuseVar = false;
int32_t legacyLen = 0;
- if (parsedLen != NULL) {
+ if (parsedLen != nullptr) {
*parsedLen = 0;
}
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if (tagLen < 0) {
@@ -2043,9 +2043,9 @@ 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 == NULL) {
+ if (tagBuf == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (tagLen > 0) {
@@ -2059,7 +2059,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
if (t.isNull()) {
uprv_free(tagBuf);
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
_initializeULanguageTag(t.getAlias());
t->buf = tagBuf;
@@ -2093,9 +2093,9 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
if (tagLen < newTagLength) {
uprv_free(tagBuf);
tagBuf = (char*)uprv_malloc(newTagLength + 1);
- if (tagBuf == NULL) {
+ if (tagBuf == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
t->buf = tagBuf;
tagLen = newTagLength;
@@ -2124,7 +2124,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
if (*redundantTagEnd == '\0' || *redundantTagEnd == SEP) {
const char* preferredTag = REDUNDANT[i + 1];
size_t preferredTagLen = uprv_strlen(preferredTag);
- uprv_strncpy(t->buf, preferredTag, preferredTagLen);
+ uprv_memcpy(t->buf, preferredTag, preferredTagLen);
if (*redundantTagEnd == SEP) {
uprv_memmove(tagBuf + preferredTagLen,
redundantTagEnd,
@@ -2154,9 +2154,9 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
next = LANG | PRIV;
pNext = pLastGoodPosition = tagBuf;
extlangIdx = 0;
- pExtension = NULL;
- pExtValueSubtag = NULL;
- pExtValueSubtagEnd = NULL;
+ pExtension = nullptr;
+ pExtValueSubtag = nullptr;
+ pExtValueSubtagEnd = nullptr;
while (pNext) {
char *pSep;
@@ -2173,7 +2173,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
}
if (*pSep == 0) {
/* last subtag */
- pNext = NULL;
+ pNext = nullptr;
} else {
pNext = pSep + 1;
}
@@ -2244,9 +2244,9 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
UBool isAdded;
var = (VariantListEntry*)uprv_malloc(sizeof(VariantListEntry));
- if (var == NULL) {
+ if (var == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
*pSep = 0;
var->variant = T_CString_toUpperCase(pSubtag);
@@ -2263,11 +2263,11 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
}
if (next & EXTS) {
if (_isExtensionSingleton(pSubtag, subtagLen)) {
- if (pExtension != NULL) {
- if (pExtValueSubtag == NULL || pExtValueSubtagEnd == NULL) {
+ if (pExtension != nullptr) {
+ if (pExtValueSubtag == nullptr || pExtValueSubtagEnd == nullptr) {
/* the previous extension is incomplete */
uprv_free(pExtension);
- pExtension = NULL;
+ pExtension = nullptr;
break;
}
@@ -2276,32 +2276,32 @@ 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, false)) {
pLastGoodPosition = pExtValueSubtagEnd;
} else {
/* stop parsing here */
uprv_free(pExtension);
- pExtension = NULL;
+ pExtension = nullptr;
break;
}
}
/* create a new extension */
pExtension = (ExtensionListEntry*)uprv_malloc(sizeof(ExtensionListEntry));
- if (pExtension == NULL) {
+ if (pExtension == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
*pSep = 0;
pExtension->key = T_CString_toLowerCase(pSubtag);
- pExtension->value = NULL; /* will be set later */
+ pExtension->value = nullptr; /* will be set later */
/*
* reset the start and the end location of extension value
* subtags for this extension
*/
- pExtValueSubtag = NULL;
- pExtValueSubtagEnd = NULL;
+ pExtValueSubtag = nullptr;
+ pExtValueSubtagEnd = nullptr;
next = EXTV;
continue;
@@ -2309,7 +2309,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
}
if (next & EXTV) {
if (_isExtensionSubtag(pSubtag, subtagLen)) {
- if (pExtValueSubtag == NULL) {
+ if (pExtValueSubtag == nullptr) {
/* if the start position of this extension's value is not yet,
this one is the first value subtag */
pExtValueSubtag = pSubtag;
@@ -2326,12 +2326,12 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
if (uprv_tolower(*pSubtag) == PRIVATEUSE && subtagLen == 1) {
char *pPrivuseVal;
- if (pExtension != NULL) {
+ if (pExtension != nullptr) {
/* Process the last extension */
- if (pExtValueSubtag == NULL || pExtValueSubtagEnd == NULL) {
+ if (pExtValueSubtag == nullptr || pExtValueSubtagEnd == nullptr) {
/* the previous extension is incomplete */
uprv_free(pExtension);
- pExtension = NULL;
+ pExtension = nullptr;
break;
} else {
/* terminate the previous extension value */
@@ -2339,20 +2339,20 @@ 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, false)) {
pLastGoodPosition = pExtValueSubtagEnd;
- pExtension = NULL;
+ pExtension = nullptr;
} else {
/* stop parsing here */
uprv_free(pExtension);
- pExtension = NULL;
+ pExtension = nullptr;
break;
}
}
}
/* The rest of part will be private use value subtags */
- if (pNext == NULL) {
+ if (pNext == nullptr) {
/* empty private use subtag */
break;
}
@@ -2371,7 +2371,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
}
if (*pSep == 0) {
/* last subtag */
- pNext = NULL;
+ pNext = nullptr;
} else {
pNext = pSep + 1;
}
@@ -2380,7 +2380,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
if (uprv_strncmp(pSubtag, PRIVUSE_VARIANT_PREFIX, uprv_strlen(PRIVUSE_VARIANT_PREFIX)) == 0) {
*pSep = 0;
next = VART;
- privateuseVar = TRUE;
+ privateuseVar = true;
break;
} else if (_isPrivateuseValueSubtag(pSubtag, subtagLen)) {
pLastGoodPosition = pSep;
@@ -2407,9 +2407,9 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
break;
}
- if (pExtension != NULL) {
+ if (pExtension != nullptr) {
/* Process the last extension */
- if (pExtValueSubtag == NULL || pExtValueSubtagEnd == NULL) {
+ if (pExtValueSubtag == nullptr || pExtValueSubtagEnd == nullptr) {
/* the previous extension is incomplete */
uprv_free(pExtension);
} else {
@@ -2417,7 +2417,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
*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, false)) {
pLastGoodPosition = pExtValueSubtagEnd;
} else {
uprv_free(pExtension);
@@ -2425,7 +2425,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
}
}
- if (parsedLen != NULL) {
+ if (parsedLen != nullptr) {
*parsedLen = (int32_t)(pLastGoodPosition - t->buf + parsedLenDelta);
}
@@ -2440,7 +2440,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
static void
ultag_close(ULanguageTag* langtag) {
- if (langtag == NULL) {
+ if (langtag == nullptr) {
return;
}
@@ -2476,7 +2476,7 @@ ultag_getLanguage(const ULanguageTag* langtag) {
static const char*
ultag_getJDKLanguage(const ULanguageTag* langtag) {
int32_t i;
- for (i = 0; DEPRECATEDLANGS[i] != NULL; i += 2) {
+ for (i = 0; DEPRECATEDLANGS[i] != nullptr; i += 2) {
if (uprv_compareInvCharsAsAscii(DEPRECATEDLANGS[i], langtag->language) == 0) {
return DEPRECATEDLANGS[i + 1];
}
@@ -2490,7 +2490,7 @@ ultag_getExtlang(const ULanguageTag* langtag, int32_t idx) {
if (idx >= 0 && idx < MAXEXTLANG) {
return langtag->extlang[idx];
}
- return NULL;
+ return nullptr;
}
static int32_t
@@ -2517,7 +2517,7 @@ ultag_getRegion(const ULanguageTag* langtag) {
static const char*
ultag_getVariant(const ULanguageTag* langtag, int32_t idx) {
- const char *var = NULL;
+ const char *var = nullptr;
VariantListEntry *cur = langtag->variants;
int32_t i = 0;
while (cur) {
@@ -2535,8 +2535,8 @@ static int32_t
ultag_getVariantsSize(const ULanguageTag* langtag) {
int32_t size = 0;
VariantListEntry *cur = langtag->variants;
- while (TRUE) {
- if (cur == NULL) {
+ while (true) {
+ if (cur == nullptr) {
break;
}
size++;
@@ -2547,7 +2547,7 @@ ultag_getVariantsSize(const ULanguageTag* langtag) {
static const char*
ultag_getExtensionKey(const ULanguageTag* langtag, int32_t idx) {
- const char *key = NULL;
+ const char *key = nullptr;
ExtensionListEntry *cur = langtag->extensions;
int32_t i = 0;
while (cur) {
@@ -2563,7 +2563,7 @@ ultag_getExtensionKey(const ULanguageTag* langtag, int32_t idx) {
static const char*
ultag_getExtensionValue(const ULanguageTag* langtag, int32_t idx) {
- const char *val = NULL;
+ const char *val = nullptr;
ExtensionListEntry *cur = langtag->extensions;
int32_t i = 0;
while (cur) {
@@ -2581,8 +2581,8 @@ static int32_t
ultag_getExtensionsSize(const ULanguageTag* langtag) {
int32_t size = 0;
ExtensionListEntry *cur = langtag->extensions;
- while (TRUE) {
- if (cur == NULL) {
+ while (true) {
+ if (cur == nullptr) {
break;
}
size++;
@@ -2648,7 +2648,7 @@ ulocimp_toLanguageTag(const char* localeID,
icu::CharString canonical;
int32_t reslen;
UErrorCode tmpStatus = U_ZERO_ERROR;
- UBool hadPosix = FALSE;
+ UBool hadPosix = false;
const char* pKeywordStart;
/* Note: uloc_canonicalize returns "en_US_POSIX" for input locale ID "". See #6835 */
@@ -2699,7 +2699,7 @@ ulocimp_toLanguageTag(const char* localeID,
pKeywordStart = locale_getKeywordsStart(canonical.data());
if (pKeywordStart == canonical.data()) {
int kwdCnt = 0;
- UBool done = FALSE;
+ UBool done = false;
icu::LocalUEnumerationPointer kwdEnum(uloc_openKeywords(canonical.data(), &tmpStatus));
if (U_SUCCESS(tmpStatus)) {
@@ -2720,15 +2720,15 @@ ulocimp_toLanguageTag(const char* localeID,
/* return private use only tag */
sink.Append("und-x-", 6);
sink.Append(buf.data(), buf.length());
- done = TRUE;
+ done = true;
} else if (strict) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- done = TRUE;
+ done = true;
}
/* if not strict mode, then "und" will be returned */
} else {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- done = TRUE;
+ done = true;
}
}
}
@@ -2782,11 +2782,11 @@ ulocimp_forLanguageTag(const char* langtag,
icu::ByteSink& sink,
int32_t* parsedLength,
UErrorCode* status) {
- UBool isEmpty = TRUE;
+ UBool isEmpty = true;
const char *subtag, *p;
int32_t len;
int32_t i, n;
- UBool noRegion = TRUE;
+ UBool noRegion = true;
icu::LocalULanguageTagPointer lt(ultag_parse(langtag, tagLen, parsedLength, status));
if (U_FAILURE(*status)) {
@@ -2799,7 +2799,7 @@ ulocimp_forLanguageTag(const char* langtag,
len = (int32_t)uprv_strlen(subtag);
if (len > 0) {
sink.Append(subtag, len);
- isEmpty = FALSE;
+ isEmpty = false;
}
}
@@ -2808,7 +2808,7 @@ ulocimp_forLanguageTag(const char* langtag,
len = (int32_t)uprv_strlen(subtag);
if (len > 0) {
sink.Append("_", 1);
- isEmpty = FALSE;
+ isEmpty = false;
/* write out the script in title case */
char c = uprv_toupper(*subtag);
@@ -2821,7 +2821,7 @@ ulocimp_forLanguageTag(const char* langtag,
len = (int32_t)uprv_strlen(subtag);
if (len > 0) {
sink.Append("_", 1);
- isEmpty = FALSE;
+ isEmpty = false;
/* write out the region in upper case */
p = subtag;
@@ -2830,7 +2830,7 @@ ulocimp_forLanguageTag(const char* langtag,
sink.Append(&c, 1);
p++;
}
- noRegion = FALSE;
+ noRegion = false;
}
/* variants */
@@ -2839,7 +2839,7 @@ ulocimp_forLanguageTag(const char* langtag,
if (n > 0) {
if (noRegion) {
sink.Append("_", 1);
- isEmpty = FALSE;
+ isEmpty = false;
}
for (i = 0; i < n; i++) {
diff --git a/contrib/libs/icu/common/ulocimp.h b/contrib/libs/icu/common/ulocimp.h
index 755e02c6b88..48341054e31 100644
--- a/contrib/libs/icu/common/ulocimp.h
+++ b/contrib/libs/icu/common/ulocimp.h
@@ -333,10 +333,10 @@ public:
int32_t requestedCapacity = ULOC_FULLNAME_CAPACITY;
// No heap allocation. Use only on the stack.
- static void* U_EXPORT2 operator new(size_t) U_NOEXCEPT = delete;
- static void* U_EXPORT2 operator new[](size_t) U_NOEXCEPT = delete;
+ 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*) U_NOEXCEPT = delete;
+ static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete;
#endif
PreflightingLocaleIDBuffer() {}
diff --git a/contrib/libs/icu/common/umapfile.cpp b/contrib/libs/icu/common/umapfile.cpp
index 3e714876a4d..faa6d807868 100644
--- a/contrib/libs/icu/common/umapfile.cpp
+++ b/contrib/libs/icu/common/umapfile.cpp
@@ -107,10 +107,10 @@ typedef HANDLE MemoryMap;
U_CFUNC UBool
uprv_mapFile(UDataMemory *pData, const char *path, UErrorCode *status) {
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
UDataMemory_init(pData); /* Clear the output struct. */
- return FALSE; /* no file access */
+ return false; /* no file access */
}
U_CFUNC void uprv_unmapFile(UDataMemory *pData) {
@@ -126,7 +126,7 @@ typedef HANDLE MemoryMap;
)
{
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
HANDLE map = nullptr;
@@ -147,15 +147,15 @@ typedef HANDLE MemoryMap;
// Convert from UTF-8 string to UTF-16 string.
wchar_t utf16Path[MAX_PATH];
int32_t pathUtf16Len = 0;
- u_strFromUTF8(reinterpret_cast<UChar*>(utf16Path), static_cast<int32_t>(UPRV_LENGTHOF(utf16Path)), &pathUtf16Len, path, -1, status);
+ u_strFromUTF8(reinterpret_cast<char16_t*>(utf16Path), static_cast<int32_t>(UPRV_LENGTHOF(utf16Path)), &pathUtf16Len, path, -1, status);
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
if (*status == U_STRING_NOT_TERMINATED_WARNING) {
// Report back an error instead of a warning.
*status = U_BUFFER_OVERFLOW_ERROR;
- return FALSE;
+ return false;
}
file = CreateFileW(utf16Path, GENERIC_READ, FILE_SHARE_READ, nullptr,
@@ -168,10 +168,10 @@ typedef HANDLE MemoryMap;
if (HRESULT_FROM_WIN32(GetLastError()) == E_OUTOFMEMORY) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
- return FALSE;
+ return false;
}
- // Note: We use NULL/nullptr for lpAttributes parameter below.
+ // Note: We use nullptr/nullptr for lpAttributes parameter below.
// This means our handle cannot be inherited and we will get the default security descriptor.
/* create an unnamed Windows file-mapping object for the specified file */
map = CreateFileMappingW(file, nullptr, PAGE_READONLY, 0, 0, nullptr);
@@ -183,17 +183,17 @@ typedef HANDLE MemoryMap;
if (HRESULT_FROM_WIN32(GetLastError()) == E_OUTOFMEMORY) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
- return FALSE;
+ return false;
}
/* map a view of the file into our address space */
pData->pHeader = reinterpret_cast<const DataHeader *>(MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0));
if (pData->pHeader == nullptr) {
CloseHandle(map);
- return FALSE;
+ return false;
}
pData->map = map;
- return TRUE;
+ return true;
}
U_CFUNC void
@@ -217,21 +217,21 @@ typedef HANDLE MemoryMap;
void *data;
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
UDataMemory_init(pData); /* Clear the output struct. */
/* determine the length of the file */
if(stat(path, &mystat)!=0 || mystat.st_size<=0) {
- return FALSE;
+ return false;
}
length=mystat.st_size;
/* open the file */
fd=open(path, O_RDONLY);
if(fd==-1) {
- return FALSE;
+ return false;
}
/* get a view of the mapping */
@@ -243,7 +243,7 @@ typedef HANDLE MemoryMap;
close(fd); /* no longer needed */
if(data==MAP_FAILED) {
// Possibly check the errno value for ENOMEM, and report U_MEMORY_ALLOCATION_ERROR?
- return FALSE;
+ return false;
}
pData->map = (char *)data + length;
@@ -252,7 +252,7 @@ typedef HANDLE MemoryMap;
#if U_PLATFORM == U_PF_IPHONE
posix_madvise(data, length, POSIX_MADV_RANDOM);
#endif
- return TRUE;
+ return true;
}
U_CFUNC void
@@ -291,21 +291,21 @@ typedef HANDLE MemoryMap;
void *p;
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
UDataMemory_init(pData); /* Clear the output struct. */
/* open the input file */
file=fopen(path, "rb");
if(file==nullptr) {
- return FALSE;
+ return false;
}
/* get the file length */
fileLength=umap_fsize(file);
if(ferror(file) || fileLength<=20) {
fclose(file);
- return FALSE;
+ return false;
}
/* allocate the memory to hold the file data */
@@ -313,21 +313,21 @@ typedef HANDLE MemoryMap;
if(p==nullptr) {
fclose(file);
*status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
/* read the file */
if(fileLength!=fread(p, 1, fileLength, file)) {
uprv_free(p);
fclose(file);
- return FALSE;
+ return false;
}
fclose(file);
pData->map=p;
pData->pHeader=(const DataHeader *)p;
pData->mapAddr=p;
- return TRUE;
+ return true;
}
U_CFUNC void
@@ -427,7 +427,7 @@ typedef HANDLE MemoryMap;
void *val=0;
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
inBasename=uprv_strrchr(path, U_FILE_SEP_CHAR);
@@ -447,14 +447,14 @@ typedef HANDLE MemoryMap;
/* determine the length of the file */
if(stat(path, &mystat)!=0 || mystat.st_size<=0) {
- return FALSE;
+ return false;
}
length=mystat.st_size;
/* open the file */
fd=open(path, O_RDONLY);
if(fd==-1) {
- return FALSE;
+ return false;
}
/* get a view of the mapping */
@@ -462,12 +462,12 @@ typedef HANDLE MemoryMap;
close(fd); /* no longer needed */
if(data==MAP_FAILED) {
// Possibly check the errorno value for ENOMEM, and report U_MEMORY_ALLOCATION_ERROR?
- return FALSE;
+ return false;
}
pData->map = (char *)data + length;
pData->pHeader=(const DataHeader *)data;
pData->mapAddr = data;
- return TRUE;
+ return true;
}
# ifdef OS390BATCH
@@ -503,16 +503,16 @@ typedef HANDLE MemoryMap;
val=dllqueryvar((dllhandle*)handle, U_ICUDATA_ENTRY_NAME);
if(val == 0) {
/* failed... so keep looking */
- return FALSE;
+ return false;
}
# ifdef UDATA_DEBUG
fprintf(stderr, "dllqueryvar(%08X, %s) -> %08X\n", handle, U_ICUDATA_ENTRY_NAME, val);
# endif
pData->pHeader=(const DataHeader *)val;
- return TRUE;
+ return true;
} else {
- return FALSE; /* no handle */
+ return false; /* no handle */
}
}
diff --git a/contrib/libs/icu/common/umapfile.h b/contrib/libs/icu/common/umapfile.h
index adc265203dc..042e71374c1 100644
--- a/contrib/libs/icu/common/umapfile.h
+++ b/contrib/libs/icu/common/umapfile.h
@@ -29,7 +29,7 @@
#include "unicode/udata.h"
#include "putilimp.h"
-U_CFUNC UBool uprv_mapFile(UDataMemory *pdm, const char *path, UErrorCode *status);
+U_CAPI UBool U_EXPORT2 uprv_mapFile(UDataMemory *pdm, const char *path, UErrorCode *status);
U_CFUNC void uprv_unmapFile(UDataMemory *pData);
/* MAP_NONE: no memory mapping, no file access at all */
diff --git a/contrib/libs/icu/common/umutex.h b/contrib/libs/icu/common/umutex.h
index 8d76b3f3e6f..1b8332409c6 100644
--- a/contrib/libs/icu/common/umutex.h
+++ b/contrib/libs/icu/common/umutex.h
@@ -71,7 +71,6 @@ U_NAMESPACE_BEGIN
****************************************************************************/
typedef std::atomic<int32_t> u_atomic_int32_t;
-#define ATOMIC_INT32_T_INITIALIZER(val) ATOMIC_VAR_INIT(val)
inline int32_t umtx_loadAcquire(u_atomic_int32_t &var) {
return var.load(std::memory_order_acquire);
@@ -96,18 +95,15 @@ inline int32_t umtx_atomic_dec(u_atomic_int32_t *var) {
*
*************************************************************************************************/
-struct UInitOnce {
- u_atomic_int32_t fState;
- UErrorCode fErrCode;
+struct U_COMMON_API UInitOnce {
+ u_atomic_int32_t fState {0};
+ UErrorCode fErrCode {U_ZERO_ERROR};
void reset() {fState = 0;}
UBool isReset() {return umtx_loadAcquire(fState) == 0;}
// Note: isReset() is used by service registration code.
// Thread safety of this usage needs review.
};
-#define U_INITONCE_INITIALIZER {ATOMIC_INT32_T_INITIALIZER(0), U_ZERO_ERROR}
-
-
U_COMMON_API UBool U_EXPORT2 umtx_initImplPreInit(UInitOnce &);
U_COMMON_API void U_EXPORT2 umtx_initImplPostInit(UInitOnce &);
diff --git a/contrib/libs/icu/common/unames.cpp b/contrib/libs/icu/common/unames.cpp
index 5776058f957..1b3192bf25e 100644
--- a/contrib/libs/icu/common/unames.cpp
+++ b/contrib/libs/icu/common/unames.cpp
@@ -101,11 +101,11 @@ typedef struct {
UChar32 code;
} FindName;
-#define DO_FIND_NAME NULL
+#define DO_FIND_NAME nullptr
-static UDataMemory *uCharNamesData=NULL;
-static UCharNames *uCharNames=NULL;
-static icu::UInitOnce gCharNamesInitOnce = U_INITONCE_INITIALIZER;
+static UDataMemory *uCharNamesData=nullptr;
+static UCharNames *uCharNames=nullptr;
+static icu::UInitOnce gCharNamesInitOnce {};
/*
* Maximum length of character names (regular & 1.0).
@@ -162,18 +162,18 @@ static const char * const charCatNames[U_CHAR_EXTENDED_CATEGORY_COUNT] = {
/* implementation ----------------------------------------------------------- */
-static UBool U_CALLCONV unames_cleanup(void)
+static UBool U_CALLCONV unames_cleanup()
{
if(uCharNamesData) {
udata_close(uCharNamesData);
- uCharNamesData = NULL;
+ uCharNamesData = nullptr;
}
if(uCharNames) {
- uCharNames = NULL;
+ uCharNames = nullptr;
}
gCharNamesInitOnce.reset();
gMaxNameLength=0;
- return TRUE;
+ return true;
}
static UBool U_CALLCONV
@@ -193,12 +193,12 @@ isAcceptable(void * /*context*/,
static void U_CALLCONV
loadCharNames(UErrorCode &status) {
- U_ASSERT(uCharNamesData == NULL);
- U_ASSERT(uCharNames == NULL);
+ U_ASSERT(uCharNamesData == nullptr);
+ U_ASSERT(uCharNames == nullptr);
- uCharNamesData = udata_openChoice(NULL, DATA_TYPE, DATA_NAME, isAcceptable, NULL, &status);
+ uCharNamesData = udata_openChoice(nullptr, DATA_TYPE, DATA_NAME, isAcceptable, nullptr, &status);
if(U_FAILURE(status)) {
- uCharNamesData = NULL;
+ uCharNamesData = nullptr;
} else {
uCharNames = (UCharNames *)udata_getMemory(uCharNamesData);
}
@@ -371,7 +371,7 @@ compareName(UCharNames *names,
if(c!=';') {
/* implicit letter */
if((char)c!=*otherName++) {
- return FALSE;
+ return false;
}
} else {
/* finished */
@@ -388,7 +388,7 @@ compareName(UCharNames *names,
if(c!=';') {
/* explicit letter */
if((char)c!=*otherName++) {
- return FALSE;
+ return false;
}
} else {
/* stop, but skip the semicolon if we are seeking
@@ -407,7 +407,7 @@ compareName(UCharNames *names,
uint8_t *tokenString=tokenStrings+token;
while((c=*tokenString++)!=0) {
if((char)c!=*otherName++) {
- return FALSE;
+ return false;
}
}
}
@@ -616,7 +616,7 @@ enumGroupNames(UCharNames *names, const uint16_t *group,
/* here, we assume that the buffer is large enough */
if(length>0) {
if(!fn(context, start, nameChoice, buffer, length)) {
- return FALSE;
+ return false;
}
}
++start;
@@ -626,12 +626,12 @@ enumGroupNames(UCharNames *names, const uint16_t *group,
while(start<=end) {
if(compareName(names, s+offsets[start&GROUP_MASK], lengths[start&GROUP_MASK], nameChoice, otherName)) {
((FindName *)context)->code=start;
- return FALSE;
+ return false;
}
++start;
}
}
- return TRUE;
+ return true;
}
/*
@@ -653,14 +653,14 @@ enumExtNames(UChar32 start, UChar32 end,
/* here, we assume that the buffer is large enough */
if(length>0) {
if(!fn(context, start, U_EXTENDED_CHAR_NAME, buffer, length)) {
- return FALSE;
+ return false;
}
}
++start;
}
}
- return TRUE;
+ return true;
}
static UBool
@@ -684,7 +684,7 @@ enumNames(UCharNames *names,
extLimit=limit;
}
if(!enumExtNames(start, extLimit-1, fn, context)) {
- return FALSE;
+ return false;
}
start=extLimit;
}
@@ -705,7 +705,7 @@ enumNames(UCharNames *names,
if(!enumGroupNames(names, group,
start, ((UChar32)startGroupMSB<<GROUP_SHIFT)+LINES_PER_GROUP-1,
fn, context, nameChoice)) {
- return FALSE;
+ return false;
}
group=NEXT_GROUP(group); /* continue with the next group */
}
@@ -718,7 +718,7 @@ enumNames(UCharNames *names,
end = limit;
}
if (!enumExtNames(start, end - 1, fn, context)) {
- return FALSE;
+ return false;
}
}
group=nextGroup;
@@ -729,7 +729,7 @@ enumNames(UCharNames *names,
const uint16_t *nextGroup;
start=(UChar32)group[GROUP_MSB]<<GROUP_SHIFT;
if(!enumGroupNames(names, group, start, start+LINES_PER_GROUP-1, fn, context, nameChoice)) {
- return FALSE;
+ return false;
}
nextGroup=NEXT_GROUP(group);
if (nextGroup < groupLimit && nextGroup[GROUP_MSB] > group[GROUP_MSB] + 1 && nameChoice == U_EXTENDED_CHAR_NAME) {
@@ -738,7 +738,7 @@ enumNames(UCharNames *names,
end = limit;
}
if (!enumExtNames((group[GROUP_MSB] + 1) << GROUP_SHIFT, end - 1, fn, context)) {
- return FALSE;
+ return false;
}
}
group=nextGroup;
@@ -753,7 +753,7 @@ enumNames(UCharNames *names,
start = next;
}
} else {
- return TRUE;
+ return true;
}
}
@@ -766,7 +766,7 @@ enumNames(UCharNames *names,
return enumExtNames(start, limit - 1, fn, context);
}
- return TRUE;
+ return true;
}
static uint16_t
@@ -801,7 +801,7 @@ writeFactorSuffix(const uint16_t *factors, uint16_t count,
/* write each element */
for(;;) {
- if(elementBases!=NULL) {
+ if(elementBases!=nullptr) {
*elementBases++=s;
}
@@ -811,7 +811,7 @@ writeFactorSuffix(const uint16_t *factors, uint16_t count,
while(*s++!=0) {}
--factor;
}
- if(elements!=NULL) {
+ if(elements!=nullptr) {
*elements++=s;
}
@@ -913,7 +913,7 @@ getAlgName(AlgorithmicRange *range, uint32_t code, UCharNameChoice nameChoice,
}
bufferPos+=writeFactorSuffix(factors, count,
- s, code-range->start, indexes, NULL, NULL, buffer, bufferLength);
+ s, code-range->start, indexes, nullptr, nullptr, buffer, bufferLength);
break;
}
default:
@@ -941,7 +941,7 @@ enumAlgNames(AlgorithmicRange *range,
uint16_t length;
if(nameChoice!=U_UNICODE_CHAR_NAME && nameChoice!=U_EXTENDED_CHAR_NAME) {
- return TRUE;
+ return true;
}
switch(range->type) {
@@ -952,12 +952,12 @@ enumAlgNames(AlgorithmicRange *range,
/* get the full name of the start character */
length=getAlgName(range, (uint32_t)start, nameChoice, buffer, sizeof(buffer));
if(length<=0) {
- return TRUE;
+ return true;
}
/* call the enumerator function with this first character */
if(!fn(context, start, nameChoice, buffer, length)) {
- return FALSE;
+ return false;
}
/* go to the end of the name; all these names have the same length */
@@ -984,7 +984,7 @@ enumAlgNames(AlgorithmicRange *range,
}
if(!fn(context, start, nameChoice, buffer, length)) {
- return FALSE;
+ return false;
}
}
break;
@@ -1018,7 +1018,7 @@ enumAlgNames(AlgorithmicRange *range,
/* call the enumerator function with this first character */
if(!fn(context, start, nameChoice, buffer, length)) {
- return FALSE;
+ return false;
}
/* enumerate the rest of the names */
@@ -1056,7 +1056,7 @@ enumAlgNames(AlgorithmicRange *range,
*t=0;
if(!fn(context, start, nameChoice, buffer, length)) {
- return FALSE;
+ return false;
}
}
break;
@@ -1066,7 +1066,7 @@ enumAlgNames(AlgorithmicRange *range,
break;
}
- return TRUE;
+ return true;
}
/*
@@ -1319,7 +1319,7 @@ calcNameSetLength(const uint16_t *tokens, uint16_t tokenCount, const uint8_t *to
++length;
} else {
/* count token word */
- if(tokenLengths!=NULL) {
+ if(tokenLengths!=nullptr) {
/* use cached token length */
tokenLength=tokenLengths[c];
if(tokenLength==0) {
@@ -1354,7 +1354,7 @@ calcGroupNameSetsLengths(int32_t maxNameLength) {
int32_t groupCount, lineNumber, length;
tokenLengths=(int8_t *)uprv_malloc(tokenCount);
- if(tokenLengths!=NULL) {
+ if(tokenLengths!=nullptr) {
uprv_memset(tokenLengths, 0, tokenCount);
}
@@ -1402,7 +1402,7 @@ calcGroupNameSetsLengths(int32_t maxNameLength) {
--groupCount;
}
- if(tokenLengths!=NULL) {
+ if(tokenLengths!=nullptr) {
uprv_free(tokenLengths);
}
@@ -1416,11 +1416,11 @@ calcNameSetsLengths(UErrorCode *pErrorCode) {
int32_t i, maxNameLength;
if(gMaxNameLength!=0) {
- return TRUE;
+ return true;
}
if(!isDataLoaded(pErrorCode)) {
- return FALSE;
+ return false;
}
/* set hex digits, used in various names, and <>-, used in extended names */
@@ -1437,7 +1437,7 @@ calcNameSetsLengths(UErrorCode *pErrorCode) {
/* set sets and lengths from group names, set global maximum values */
calcGroupNameSetsLengths(maxNameLength);
- return TRUE;
+ return true;
}
U_NAMESPACE_END
@@ -1456,10 +1456,10 @@ u_charName(UChar32 code, UCharNameChoice nameChoice,
int32_t length;
/* check the argument values */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
} else if(nameChoice>=U_CHAR_NAME_CHOICE_COUNT ||
- bufferLength<0 || (bufferLength>0 && buffer==NULL)
+ bufferLength<0 || (bufferLength>0 && buffer==nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -1505,9 +1505,9 @@ u_getISOComment(UChar32 /*c*/,
char *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
/* check the argument values */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
- } else if(destCapacity<0 || (destCapacity>0 && dest==NULL)) {
+ } else if(destCapacity<0 || (destCapacity>0 && dest==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1529,11 +1529,11 @@ u_charFromName(UCharNameChoice nameChoice,
char c0;
static constexpr UChar32 error = 0xffff; /* Undefined, but use this for backwards compatibility. */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return error;
}
- if(nameChoice>=U_CHAR_NAME_CHOICE_COUNT || name==NULL || *name==0) {
+ if(nameChoice>=U_CHAR_NAME_CHOICE_COUNT || name==nullptr || *name==0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return error;
}
@@ -1641,11 +1641,11 @@ u_enumCharNames(UChar32 start, UChar32 limit,
uint32_t *p;
uint32_t i;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
- if(nameChoice>=U_CHAR_NAME_CHOICE_COUNT || fn==NULL) {
+ if(nameChoice>=U_CHAR_NAME_CHOICE_COUNT || fn==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -1716,7 +1716,7 @@ uprv_getMaxCharNameLength() {
*/
static void
charSetToUSet(uint32_t cset[8], const USetAdder *sa) {
- UChar us[256];
+ char16_t us[256];
char cs[256];
int32_t i, length;
@@ -1736,12 +1736,12 @@ charSetToUSet(uint32_t cset[8], const USetAdder *sa) {
}
}
- /* convert the char string to a UChar string */
+ /* convert the char string to a char16_t string */
u_charsToUChars(cs, us, length);
- /* add each UChar to the USet */
+ /* add each char16_t to the USet */
for(i=0; i<length; ++i) {
- if(us[i]!=0 || cs[i]==0) { /* non-invariant chars become (UChar)0 */
+ if(us[i]!=0 || cs[i]==0) { /* non-invariant chars become (char16_t)0 */
sa->add(sa->set, us[i]);
}
}
@@ -1809,7 +1809,7 @@ makeTokenMap(const UDataSwapper *ds,
/* enter the converted character into the map and mark it used */
map[c1]=c2;
- usedOutChar[c2]=TRUE;
+ usedOutChar[c2]=true;
}
}
@@ -1850,7 +1850,7 @@ uchar_swapNames(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -1872,7 +1872,7 @@ uchar_swapNames(const UDataSwapper *ds,
}
inBytes=(const uint8_t *)inData+headerSize;
- outBytes=(uint8_t *)outData+headerSize;
+ outBytes=(outData == nullptr) ? nullptr : (uint8_t *)outData+headerSize;
if(length<0) {
algNamesOffset=ds->readUInt32(((const uint32_t *)inBytes)[3]);
} else {
@@ -1954,7 +1954,7 @@ uchar_swapNames(const UDataSwapper *ds,
* go through a temporary array to support in-place swapping
*/
temp=(uint16_t *)uprv_malloc(tokenCount*2);
- if(temp==NULL) {
+ if(temp==nullptr) {
udata_printError(ds, "out of memory swapping %u unames.icu tokens\n",
tokenCount);
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
diff --git a/contrib/libs/icu/common/unifiedcache.cpp b/contrib/libs/icu/common/unifiedcache.cpp
index 493ab79f6d9..1284c03813e 100644
--- a/contrib/libs/icu/common/unifiedcache.cpp
+++ b/contrib/libs/icu/common/unifiedcache.cpp
@@ -19,10 +19,10 @@
#include "uhash.h"
#include "ucln_cmn.h"
-static icu::UnifiedCache *gCache = NULL;
+static icu::UnifiedCache *gCache = nullptr;
static std::mutex *gCacheMutex = nullptr;
static std::condition_variable *gInProgressValueAddedCond;
-static icu::UInitOnce gCacheInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gCacheInitOnce {};
static const int32_t MAX_EVICT_ITERATIONS = 10;
static const int32_t DEFAULT_MAX_UNUSED = 1000;
@@ -38,27 +38,27 @@ static UBool U_CALLCONV unifiedcache_cleanup() {
gCacheMutex = nullptr;
gInProgressValueAddedCond->~condition_variable();
gInProgressValueAddedCond = nullptr;
- return TRUE;
+ return true;
}
U_CDECL_END
U_NAMESPACE_BEGIN
-U_CAPI int32_t U_EXPORT2
+int32_t U_EXPORT2
ucache_hashKeys(const UHashTok key) {
const CacheKeyBase *ckey = (const CacheKeyBase *) key.pointer;
return ckey->hashCode();
}
-U_CAPI UBool U_EXPORT2
+UBool U_EXPORT2
ucache_compareKeys(const UHashTok key1, const UHashTok key2) {
const CacheKeyBase *p1 = (const CacheKeyBase *) key1.pointer;
const CacheKeyBase *p2 = (const CacheKeyBase *) key2.pointer;
return *p1 == *p2;
}
-U_CAPI void U_EXPORT2
+void U_EXPORT2
ucache_deleteKey(void *obj) {
CacheKeyBase *p = (CacheKeyBase *) obj;
delete p;
@@ -68,19 +68,19 @@ CacheKeyBase::~CacheKeyBase() {
}
static void U_CALLCONV cacheInit(UErrorCode &status) {
- U_ASSERT(gCache == NULL);
+ U_ASSERT(gCache == nullptr);
ucln_common_registerCleanup(
UCLN_COMMON_UNIFIED_CACHE, unifiedcache_cleanup);
gCacheMutex = STATIC_NEW(std::mutex);
gInProgressValueAddedCond = STATIC_NEW(std::condition_variable);
gCache = new UnifiedCache(status);
- if (gCache == NULL) {
+ if (gCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(status)) {
delete gCache;
- gCache = NULL;
+ gCache = nullptr;
return;
}
}
@@ -88,14 +88,14 @@ static void U_CALLCONV cacheInit(UErrorCode &status) {
UnifiedCache *UnifiedCache::getInstance(UErrorCode &status) {
umtx_initOnce(gCacheInitOnce, &cacheInit, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- U_ASSERT(gCache != NULL);
+ U_ASSERT(gCache != nullptr);
return gCache;
}
UnifiedCache::UnifiedCache(UErrorCode &status) :
- fHashtable(NULL),
+ fHashtable(nullptr),
fEvictPos(UHASH_FIRST),
fNumValuesTotal(0),
fNumValuesInUse(0),
@@ -118,7 +118,7 @@ UnifiedCache::UnifiedCache(UErrorCode &status) :
fHashtable = uhash_open(
&ucache_hashKeys,
&ucache_compareKeys,
- NULL,
+ nullptr,
&status);
if (U_FAILURE(status)) {
return;
@@ -161,7 +161,7 @@ void UnifiedCache::flush() const {
// Use a loop in case cache items that are flushed held hard references to
// other cache items making those additional cache items eligible for
// flushing.
- while (_flush(FALSE));
+ while (_flush(false));
}
void UnifiedCache::handleUnreferencedObject() const {
@@ -196,7 +196,7 @@ void UnifiedCache::_dumpContents() const {
const UHashElement *element = uhash_nextElement(fHashtable, &pos);
char buffer[256];
int32_t cnt = 0;
- for (; element != NULL; element = uhash_nextElement(fHashtable, &pos)) {
+ for (; element != nullptr; element = uhash_nextElement(fHashtable, &pos)) {
const SharedObject *sharedObject =
(const SharedObject *) element->value.pointer;
const CacheKeyBase *key =
@@ -208,7 +208,7 @@ void UnifiedCache::_dumpContents() const {
"Unified Cache: Key '%s', error %d, value %p, total refcount %d, soft refcount %d\n",
key->writeDescription(buffer, 256),
key->creationStatus,
- sharedObject == fNoValue ? NULL :sharedObject,
+ sharedObject == fNoValue ? nullptr :sharedObject,
sharedObject->getRefCount(),
sharedObject->getSoftRefCount());
}
@@ -225,7 +225,7 @@ UnifiedCache::~UnifiedCache() {
// each other and entries with hard references from outside the cache.
// Nothing we can do about these so proceed to wipe out the cache.
std::lock_guard<std::mutex> lock(*gCacheMutex);
- _flush(TRUE);
+ _flush(true);
}
uhash_close(fHashtable);
fHashtable = nullptr;
@@ -236,7 +236,7 @@ UnifiedCache::~UnifiedCache() {
const UHashElement *
UnifiedCache::_nextElement() const {
const UHashElement *element = uhash_nextElement(fHashtable, &fEvictPos);
- if (element == NULL) {
+ if (element == nullptr) {
fEvictPos = UHASH_FIRST;
return uhash_nextElement(fHashtable, &fEvictPos);
}
@@ -244,7 +244,7 @@ UnifiedCache::_nextElement() const {
}
UBool UnifiedCache::_flush(UBool all) const {
- UBool result = FALSE;
+ UBool result = false;
int32_t origSize = uhash_count(fHashtable);
for (int32_t i = 0; i < origSize; ++i) {
const UHashElement *element = _nextElement();
@@ -257,7 +257,7 @@ UBool UnifiedCache::_flush(UBool all) const {
U_ASSERT(sharedObject->cachePtr == this);
uhash_removeElement(fHashtable, element);
removeSoftRef(sharedObject); // Deletes the sharedObject when softRefCount goes to zero.
- result = TRUE;
+ result = true;
}
}
return result;
@@ -305,7 +305,7 @@ void UnifiedCache::_putNew(
return;
}
CacheKeyBase *keyToAdopt = key.clone();
- if (keyToAdopt == NULL) {
+ if (keyToAdopt == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -327,11 +327,11 @@ void UnifiedCache::_putIfAbsentAndGet(
UErrorCode &status) const {
std::lock_guard<std::mutex> lock(*gCacheMutex);
const UHashElement *element = uhash_find(fHashtable, &key);
- if (element != NULL && !_inProgress(element)) {
+ if (element != nullptr && !_inProgress(element)) {
_fetch(element, value, status);
return;
}
- if (element == NULL) {
+ if (element == nullptr) {
UErrorCode putError = U_ZERO_ERROR;
// best-effort basis only.
_putNew(key, value, status, putError);
@@ -348,7 +348,7 @@ UBool UnifiedCache::_poll(
const CacheKeyBase &key,
const SharedObject *&value,
UErrorCode &status) const {
- U_ASSERT(value == NULL);
+ U_ASSERT(value == nullptr);
U_ASSERT(status == U_ZERO_ERROR);
std::unique_lock<std::mutex> lock(*gCacheMutex);
const UHashElement *element = uhash_find(fHashtable, &key);
@@ -356,23 +356,23 @@ UBool UnifiedCache::_poll(
// If the hash table contains an inProgress placeholder entry for this key,
// this means that another thread is currently constructing the value object.
// Loop, waiting for that construction to complete.
- while (element != NULL && _inProgress(element)) {
+ while (element != nullptr && _inProgress(element)) {
gInProgressValueAddedCond->wait(lock);
element = uhash_find(fHashtable, &key);
}
// If the hash table contains an entry for the key,
// fetch out the contents and return them.
- if (element != NULL) {
+ if (element != nullptr) {
_fetch(element, value, status);
- return TRUE;
+ return true;
}
// The hash table contained nothing for this key.
// Insert an inProgress place holder value.
// Our caller will create the final value and update the hash table.
_putNew(key, fNoValue, U_ZERO_ERROR, status);
- return FALSE;
+ return false;
}
void UnifiedCache::_get(
@@ -380,7 +380,7 @@ void UnifiedCache::_get(
const SharedObject *&value,
const void *creationContext,
UErrorCode &status) const {
- U_ASSERT(value == NULL);
+ U_ASSERT(value == nullptr);
U_ASSERT(status == U_ZERO_ERROR);
if (_poll(key, value, status)) {
if (value == fNoValue) {
@@ -392,9 +392,9 @@ void UnifiedCache::_get(
return;
}
value = key.createObject(creationContext, status);
- U_ASSERT(value == NULL || value->hasHardReferences());
- U_ASSERT(value != NULL || status != U_ZERO_ERROR);
- if (value == NULL) {
+ U_ASSERT(value == nullptr || value->hasHardReferences());
+ U_ASSERT(value != nullptr || status != U_ZERO_ERROR);
+ if (value == nullptr) {
SharedObject::copyPtr(fNoValue, value);
}
_putIfAbsentAndGet(key, value, status);
@@ -451,7 +451,7 @@ void UnifiedCache::_fetch(
UBool UnifiedCache::_inProgress(const UHashElement* element) const {
UErrorCode status = U_ZERO_ERROR;
- const SharedObject * value = NULL;
+ const SharedObject * value = nullptr;
_fetch(element, value, status);
UBool result = _inProgress(value, status);
removeHardRef(value);
@@ -471,7 +471,7 @@ UBool UnifiedCache::_isEvictable(const UHashElement *element) const
// Entries that are under construction are never evictable
if (_inProgress(theValue, theKey->fCreationStatus)) {
- return FALSE;
+ return false;
}
// We can evict entries that are either not a primary or have just
diff --git a/contrib/libs/icu/common/unifiedcache.h b/contrib/libs/icu/common/unifiedcache.h
index 07a734b8bd5..217031a27d2 100644
--- a/contrib/libs/icu/common/unifiedcache.h
+++ b/contrib/libs/icu/common/unifiedcache.h
@@ -57,21 +57,21 @@ class U_COMMON_API CacheKeyBase : public UObject {
* Create a new object for this key. Called by cache on cache miss.
* createObject must add a reference to the object it returns. Note
* that getting an object from the cache and returning it without calling
- * removeRef on it satisfies this requirement. It can also return NULL
+ * removeRef on it satisfies this requirement. It can also return nullptr
* and set status to an error.
*
* @param creationContext the context in which the object is being
- * created. May be NULL.
+ * created. May be nullptr.
* @param status Implementations can return a failure here.
* In addition, implementations may return a
- * non NULL object and set a warning status.
+ * non nullptr object and set a warning status.
*/
virtual const SharedObject *createObject(
const void *creationContext, UErrorCode &status) const = 0;
/**
* Writes a description of this key to buffer and returns buffer. Written
- * description is NULL terminated.
+ * description is nullptr terminated.
*/
virtual char *writeDescription(char *buffer, int32_t bufSize) const = 0;
@@ -196,14 +196,14 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Fetches a value from the cache by key. Equivalent to
- * get(key, NULL, ptr, status);
+ * get(key, nullptr, ptr, status);
*/
template<typename T>
void get(
const CacheKey<T>& key,
const T *&ptr,
UErrorCode &status) const {
- get(key, NULL, ptr, status);
+ get(key, nullptr, ptr, status);
}
/**
@@ -211,12 +211,12 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
*
* @param key the cache key.
* @param creationContext passed verbatim to createObject method of key
- * @param ptr On entry, ptr must be NULL or be included if
+ * @param ptr On entry, ptr must be nullptr or be included if
* the reference count of the object it points
* to. On exit, ptr points to the fetched object
* from the cache or is left unchanged on
* failure. Caller must call removeRef on ptr
- * if set to a non NULL value.
+ * if set to a non nullptr value.
* @param status Any error returned here. May be set to a
* warning value even if ptr is set.
*/
@@ -230,7 +230,7 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
return;
}
UErrorCode creationStatus = U_ZERO_ERROR;
- const SharedObject *value = NULL;
+ const SharedObject *value = nullptr;
_get(key, value, creationContext, creationStatus);
const T *tvalue = (const T *) value;
if (U_SUCCESS(creationStatus)) {
@@ -254,13 +254,13 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Convenience method to get a value of type T from cache for a
- * particular locale with creationContext == NULL.
+ * particular locale with creationContext == nullptr.
* @param loc the locale
- * @param ptr On entry, must be NULL or included in the ref count
+ * @param ptr On entry, must be nullptr or included in the ref count
* of the object to which it points.
* On exit, fetched value stored here or is left
* unchanged on failure. Caller must call removeRef on
- * ptr if set to a non NULL value.
+ * ptr if set to a non nullptr value.
* @param status Any error returned here. May be set to a
* warning value even if ptr is set.
*/
@@ -354,8 +354,8 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
mutable int64_t fAutoEvictedCount;
SharedObject *fNoValue;
- UnifiedCache(const UnifiedCache &other);
- UnifiedCache &operator=(const UnifiedCache &other);
+ UnifiedCache(const UnifiedCache &other) = delete;
+ UnifiedCache &operator=(const UnifiedCache &other) = delete;
/**
* Flushes the contents of the cache. If cache values hold references to other
@@ -376,14 +376,14 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Gets value out of cache.
- * On entry. gCacheMutex must not be held. value must be NULL. status
+ * On entry. gCacheMutex must not be held. value must be nullptr. status
* must be U_ZERO_ERROR.
* On exit. value and status set to what is in cache at key or on cache
* miss the key's createObject() is called and value and status are set to
* the result of that. In this latter case, best effort is made to add the
* value and status to the cache. If createObject() fails to create a value,
- * fNoValue is stored in cache, and value is set to NULL. Caller must call
- * removeRef on value if non NULL.
+ * fNoValue is stored in cache, and value is set to nullptr. Caller must call
+ * removeRef on value if non nullptr.
*/
void _get(
const CacheKeyBase &key,
@@ -393,7 +393,7 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Attempts to fetch value and status for key from cache.
- * On entry, gCacheMutex must not be held value must be NULL and status must
+ * On entry, gCacheMutex must not be held value must be nullptr and status must
* be U_ZERO_ERROR.
* On exit, either returns false (In this
* case caller should try to create the object) or returns true with value
@@ -478,7 +478,7 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Store a value and creation error status in given hash entry.
* On entry, gCacheMutex must be held. Hash entry element must be in progress.
- * value must be non NULL.
+ * value must be non nullptr.
* On Exit, soft reference added to value. value and status stored in hash
* entry. Soft reference removed from previous stored value. Waiting
* threads notified.
@@ -522,7 +522,7 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase {
/**
* Fetch value and error code from a particular hash entry.
- * On entry, gCacheMutex must be held. value must be either NULL or must be
+ * On entry, gCacheMutex must be held. value must be either nullptr or must be
* included in the ref count of the object to which it points.
* On exit, value and status set to what is in the hash entry. Caller must
* eventually call removeRef on value.
diff --git a/contrib/libs/icu/common/uniset.cpp b/contrib/libs/icu/common/uniset.cpp
index 92a81a1a02d..71f57fc12d4 100644
--- a/contrib/libs/icu/common/uniset.cpp
+++ b/contrib/libs/icu/common/uniset.cpp
@@ -82,7 +82,7 @@ static int32_t _dbgCount = 0;
static inline void _dbgct(UnicodeSet* set) {
UnicodeString str;
- set->toPattern(str, TRUE);
+ set->toPattern(str, true);
char buf[40];
str.extract(0, 39, buf, "");
printf("DEBUG UnicodeSet: ct 0x%08X; %d %s\n", set, ++_dbgCount, buf);
@@ -90,7 +90,7 @@ static inline void _dbgct(UnicodeSet* set) {
static inline void _dbgdt(UnicodeSet* set) {
UnicodeString str;
- set->toPattern(str, TRUE);
+ set->toPattern(str, true);
char buf[40];
str.extract(0, 39, buf, "");
printf("DEBUG UnicodeSet: dt 0x%08X; %d %s\n", set, --_dbgCount, buf);
@@ -204,7 +204,7 @@ UnicodeSet::~UnicodeSet() {
* Assigns this object to be a copy of another.
*/
UnicodeSet& UnicodeSet::operator=(const UnicodeSet& o) {
- return copyFrom(o, FALSE);
+ return copyFrom(o, false);
}
UnicodeSet& UnicodeSet::copyFrom(const UnicodeSet& o, UBool asThawed) {
@@ -226,7 +226,7 @@ UnicodeSet& UnicodeSet::copyFrom(const UnicodeSet& o, UBool asThawed) {
uprv_memcpy(list, o.list, (size_t)len*sizeof(UChar32));
if (o.bmpSet != nullptr && !asThawed) {
bmpSet = new BMPSet(*o.bmpSet, list, len);
- if (bmpSet == NULL) { // Check for memory allocation error.
+ if (bmpSet == nullptr) { // Check for memory allocation error.
setToBogus();
return *this;
}
@@ -243,7 +243,7 @@ UnicodeSet& UnicodeSet::copyFrom(const UnicodeSet& o, UBool asThawed) {
}
if (o.stringSpan != nullptr && !asThawed) {
stringSpan = new UnicodeSetStringSpan(*o.stringSpan, *strings);
- if (stringSpan == NULL) { // Check for memory allocation error.
+ if (stringSpan == nullptr) { // Check for memory allocation error.
setToBogus();
return *this;
}
@@ -265,7 +265,7 @@ UnicodeSet* UnicodeSet::clone() const {
}
UnicodeSet *UnicodeSet::cloneAsThawed() const {
- return new UnicodeSet(*this, TRUE);
+ return new UnicodeSet(*this, true);
}
/**
@@ -294,7 +294,7 @@ bool UnicodeSet::operator==(const UnicodeSet& o) const {
* @return the hash code value for this set.
* @see Object#hashCode()
*/
-int32_t UnicodeSet::hashCode(void) const {
+int32_t UnicodeSet::hashCode() const {
uint32_t result = static_cast<uint32_t>(len);
for (int32_t i = 0; i < len; ++i) {
result *= 1000003u;
@@ -314,7 +314,7 @@ int32_t UnicodeSet::hashCode(void) const {
*
* @return the number of elements in this set (its cardinality).
*/
-int32_t UnicodeSet::size(void) const {
+int32_t UnicodeSet::size() const {
int32_t n = 0;
int32_t count = getRangeCount();
for (int32_t i = 0; i < count; ++i) {
@@ -328,7 +328,7 @@ int32_t UnicodeSet::size(void) const {
*
* @return <tt>true</tt> if this set contains no elements.
*/
-UBool UnicodeSet::isEmpty(void) const {
+UBool UnicodeSet::isEmpty() const {
return len == 1 && !hasStrings();
}
@@ -345,14 +345,14 @@ UBool UnicodeSet::contains(UChar32 c) const {
//for (;;) {
// if (c < list[++i]) break;
//}
- if (bmpSet != NULL) {
+ if (bmpSet != nullptr) {
return bmpSet->contains(c);
}
- if (stringSpan != NULL) {
+ if (stringSpan != nullptr) {
return stringSpan->contains(c);
}
if (c >= UNICODESET_HIGH) { // Don't need to check LOW bound
- return FALSE;
+ return false;
}
int32_t i = findCodePoint(c);
return (UBool)(i & 1); // return true if odd
@@ -447,7 +447,7 @@ UBool UnicodeSet::containsAll(const UnicodeSet& c) const {
int32_t n = c.getRangeCount();
for (int i=0; i<n; ++i) {
if (!contains(c.getRangeStart(i), c.getRangeEnd(i))) {
- return FALSE;
+ return false;
}
}
return !c.hasStrings() || (strings != nullptr && strings->containsAll(*c.strings));
@@ -493,7 +493,7 @@ UBool UnicodeSet::containsNone(const UnicodeSet& c) const {
int32_t n = c.getRangeCount();
for (int32_t i=0; i<n; ++i) {
if (!containsNone(c.getRangeStart(i), c.getRangeEnd(i))) {
- return FALSE;
+ return false;
}
}
return strings == nullptr || !c.hasStrings() || strings->containsNone(*c.strings);
@@ -531,10 +531,10 @@ UBool UnicodeSet::matchesIndexValue(uint8_t v) const {
UChar32 high = getRangeEnd(i);
if ((low & ~0xFF) == (high & ~0xFF)) {
if ((low & 0xFF) <= v && v <= (high & 0xFF)) {
- return TRUE;
+ return true;
}
} else if ((low & 0xFF) <= v || v <= (high & 0xFF)) {
- return TRUE;
+ return true;
}
}
if (hasStrings()) {
@@ -545,11 +545,11 @@ UBool UnicodeSet::matchesIndexValue(uint8_t v) const {
}
UChar32 c = s.char32At(0);
if ((c & 0xFF) == v) {
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
/**
@@ -582,7 +582,7 @@ UMatchDegree UnicodeSet::matches(const Replaceable& text,
// firstChar is the leftmost char to match in the
// forward direction or the rightmost char to match in
// the reverse direction.
- UChar firstChar = text.charAt(offset);
+ char16_t firstChar = text.charAt(offset);
// If there are multiple strings that can match we
// return the longest match.
@@ -594,7 +594,7 @@ UMatchDegree UnicodeSet::matches(const Replaceable& text,
continue; // skip the empty string
}
- UChar c = trial.charAt(forward ? 0 : trial.length() - 1);
+ char16_t c = trial.charAt(forward ? 0 : trial.length() - 1);
// Strings are sorted, so we can optimize in the
// forward direction.
@@ -977,7 +977,7 @@ void UnicodeSet::_add(const UnicodeString& s) {
return;
}
UnicodeString* t = new UnicodeString(s);
- if (t == NULL) { // Check for memory allocation error.
+ if (t == nullptr) { // Check for memory allocation error.
setToBogus();
return;
}
@@ -1075,7 +1075,7 @@ UnicodeSet& UnicodeSet::removeAllStrings() {
*/
UnicodeSet* U_EXPORT2 UnicodeSet::createFrom(const UnicodeString& s) {
UnicodeSet *set = new UnicodeSet();
- if (set != NULL) { // Check for memory allocation error.
+ if (set != nullptr) { // Check for memory allocation error.
set->add(s);
}
return set;
@@ -1089,7 +1089,7 @@ UnicodeSet* U_EXPORT2 UnicodeSet::createFrom(const UnicodeString& s) {
*/
UnicodeSet* U_EXPORT2 UnicodeSet::createFromAll(const UnicodeString& s) {
UnicodeSet *set = new UnicodeSet();
- if (set != NULL) { // Check for memory allocation error.
+ if (set != nullptr) { // Check for memory allocation error.
set->addAll(s);
}
return set;
@@ -1218,7 +1218,7 @@ UnicodeSet& UnicodeSet::complement(UChar32 c) {
* This is equivalent to
* <code>complement(MIN_VALUE, MAX_VALUE)</code>.
*/
-UnicodeSet& UnicodeSet::complement(void) {
+UnicodeSet& UnicodeSet::complement() {
if (isFrozen() || isBogus()) {
return *this;
}
@@ -1272,12 +1272,12 @@ UnicodeSet& UnicodeSet::complement(const UnicodeString& s) {
* @see #add(char, char)
*/
UnicodeSet& UnicodeSet::addAll(const UnicodeSet& c) {
- if ( c.len>0 && c.list!=NULL ) {
+ if ( c.len>0 && c.list!=nullptr ) {
add(c.list, c.len, 0);
}
// Add strings in order
- if ( c.strings!=NULL ) {
+ if ( c.strings!=nullptr ) {
for (int32_t i=0; i<c.strings->size(); ++i) {
const UnicodeString* s = (const UnicodeString*)c.strings->elementAt(i);
if (!stringsContains(*s)) {
@@ -1361,14 +1361,14 @@ UnicodeSet& UnicodeSet::complementAll(const UnicodeSet& c) {
* Removes all of the elements from this set. This set will be
* empty after this call returns.
*/
-UnicodeSet& UnicodeSet::clear(void) {
+UnicodeSet& UnicodeSet::clear() {
if (isFrozen()) {
return *this;
}
list[0] = UNICODESET_HIGH;
len = 1;
releasePattern();
- if (strings != NULL) {
+ if (strings != nullptr) {
strings->removeAllElements();
}
// Remove bogus
@@ -1421,7 +1421,7 @@ UnicodeSet& UnicodeSet::compact() {
// Delete buffer first to defragment memory less.
if (buffer != stackList) {
uprv_free(buffer);
- buffer = NULL;
+ buffer = nullptr;
bufferCapacity = 0;
}
if (list == stackList) {
@@ -1464,7 +1464,7 @@ UnicodeSet::UnicodeSet(const uint16_t data[], int32_t dataLen, ESerialization se
}
if( (serialization != kSerialized)
- || (data==NULL)
+ || (data==nullptr)
|| (dataLen < 1)) {
ec = U_ILLEGAL_ARGUMENT_ERROR;
setToBogus();
@@ -1513,7 +1513,7 @@ int32_t UnicodeSet::serialize(uint16_t *dest, int32_t destCapacity, UErrorCode&
return 0;
}
- if (destCapacity<0 || (destCapacity>0 && dest==NULL)) {
+ if (destCapacity<0 || (destCapacity>0 && dest==nullptr)) {
ec=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1603,24 +1603,24 @@ int32_t UnicodeSet::serialize(uint16_t *dest, int32_t destCapacity, UErrorCode&
//----------------------------------------------------------------
/**
- * Allocate our strings vector and return TRUE if successful.
+ * Allocate our strings vector and return true if successful.
*/
UBool UnicodeSet::allocateStrings(UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
strings = new UVector(uprv_deleteUObject,
uhash_compareUnicodeString, 1, status);
- if (strings == NULL) { // Check for memory allocation error.
+ if (strings == nullptr) { // Check for memory allocation error.
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
if (U_FAILURE(status)) {
delete strings;
- strings = NULL;
- return FALSE;
+ strings = nullptr;
+ return false;
}
- return TRUE;
+ return true;
}
int32_t UnicodeSet::nextCapacity(int32_t minCapacity) {
@@ -1647,7 +1647,7 @@ bool UnicodeSet::ensureCapacity(int32_t newLen) {
}
int32_t newCapacity = nextCapacity(newLen);
UChar32* temp = (UChar32*) uprv_malloc(newCapacity * sizeof(UChar32));
- if (temp == NULL) {
+ if (temp == nullptr) {
setToBogus(); // set the object to bogus state if an OOM failure occurred.
return false;
}
@@ -1670,7 +1670,7 @@ bool UnicodeSet::ensureBufferCapacity(int32_t newLen) {
}
int32_t newCapacity = nextCapacity(newLen);
UChar32* temp = (UChar32*) uprv_malloc(newCapacity * sizeof(UChar32));
- if (temp == NULL) {
+ if (temp == nullptr) {
setToBogus();
return false;
}
@@ -1687,7 +1687,7 @@ bool UnicodeSet::ensureBufferCapacity(int32_t newLen) {
/**
* Swap list and buffer.
*/
-void UnicodeSet::swapBuffers(void) {
+void UnicodeSet::swapBuffers() {
// swap list and buffer
UChar32* temp = list;
list = buffer;
@@ -1763,7 +1763,7 @@ void UnicodeSet::exclusiveOr(const UChar32* other, int32_t otherLen, int8_t pola
// polarity = 3: ~x union ~y
void UnicodeSet::add(const UChar32* other, int32_t otherLen, int8_t polarity) {
- if (isFrozen() || isBogus() || other==NULL) {
+ if (isFrozen() || isBogus() || other==nullptr) {
return;
}
if (!ensureBufferCapacity(len + otherLen)) {
@@ -2030,7 +2030,7 @@ void UnicodeSet::_appendToPat(UnicodeString &result, UChar32 start, UChar32 end,
UnicodeString& UnicodeSet::_toPattern(UnicodeString& result,
UBool escapeUnprintable) const
{
- if (pat != NULL) {
+ if (pat != nullptr) {
int32_t i;
int32_t backslashCount = 0;
for (i=0; i<patLen; ) {
@@ -2151,7 +2151,7 @@ UnicodeString& UnicodeSet::_generatePattern(UnicodeString& result,
void UnicodeSet::releasePattern() {
if (pat) {
uprv_free(pat);
- pat = NULL;
+ pat = nullptr;
patLen = 0;
}
}
@@ -2161,7 +2161,7 @@ void UnicodeSet::releasePattern() {
*/
void UnicodeSet::setPattern(const char16_t *newPat, int32_t newPatLen) {
releasePattern();
- pat = (UChar *)uprv_malloc((newPatLen + 1) * sizeof(UChar));
+ pat = (char16_t *)uprv_malloc((newPatLen + 1) * sizeof(char16_t));
if (pat) {
patLen = newPatLen;
u_memcpy(pat, newPat, patLen);
@@ -2188,13 +2188,13 @@ UnicodeSet *UnicodeSet::freeze() {
// many relevant strings as UTF-16.
// (Thus needsStringSpanUTF8() implies needsStringSpanUTF16().)
delete stringSpan;
- stringSpan = NULL;
+ stringSpan = nullptr;
}
}
- if (stringSpan == NULL) {
+ if (stringSpan == nullptr) {
// No span-relevant strings: Optimize for code point spans.
bmpSet=new BMPSet(list, len);
- if (bmpSet == NULL) { // Check for memory allocation error.
+ if (bmpSet == nullptr) { // Check for memory allocation error.
setToBogus();
}
}
@@ -2202,8 +2202,8 @@ UnicodeSet *UnicodeSet::freeze() {
return this;
}
-int32_t UnicodeSet::span(const UChar *s, int32_t length, USetSpanCondition spanCondition) const {
- if(length>0 && bmpSet!=NULL) {
+int32_t UnicodeSet::span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const {
+ if(length>0 && bmpSet!=nullptr) {
return (int32_t)(bmpSet->span(s, s+length, spanCondition)-s);
}
if(length<0) {
@@ -2212,7 +2212,7 @@ int32_t UnicodeSet::span(const UChar *s, int32_t length, USetSpanCondition spanC
if(length==0) {
return 0;
}
- if(stringSpan!=NULL) {
+ if(stringSpan!=nullptr) {
return stringSpan->span(s, length, spanCondition);
} else if(hasStrings()) {
uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ?
@@ -2239,8 +2239,8 @@ int32_t UnicodeSet::span(const UChar *s, int32_t length, USetSpanCondition spanC
return prev;
}
-int32_t UnicodeSet::spanBack(const UChar *s, int32_t length, USetSpanCondition spanCondition) const {
- if(length>0 && bmpSet!=NULL) {
+int32_t UnicodeSet::spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const {
+ if(length>0 && bmpSet!=nullptr) {
return (int32_t)(bmpSet->spanBack(s, s+length, spanCondition)-s);
}
if(length<0) {
@@ -2249,7 +2249,7 @@ int32_t UnicodeSet::spanBack(const UChar *s, int32_t length, USetSpanCondition s
if(length==0) {
return 0;
}
- if(stringSpan!=NULL) {
+ if(stringSpan!=nullptr) {
return stringSpan->spanBack(s, length, spanCondition);
} else if(hasStrings()) {
uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ?
@@ -2277,7 +2277,7 @@ int32_t UnicodeSet::spanBack(const UChar *s, int32_t length, USetSpanCondition s
}
int32_t UnicodeSet::spanUTF8(const char *s, int32_t length, USetSpanCondition spanCondition) const {
- if(length>0 && bmpSet!=NULL) {
+ if(length>0 && bmpSet!=nullptr) {
const uint8_t *s0=(const uint8_t *)s;
return (int32_t)(bmpSet->spanUTF8(s0, length, spanCondition)-s0);
}
@@ -2287,7 +2287,7 @@ int32_t UnicodeSet::spanUTF8(const char *s, int32_t length, USetSpanCondition sp
if(length==0) {
return 0;
}
- if(stringSpan!=NULL) {
+ if(stringSpan!=nullptr) {
return stringSpan->spanUTF8((const uint8_t *)s, length, spanCondition);
} else if(hasStrings()) {
uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ?
@@ -2315,7 +2315,7 @@ int32_t UnicodeSet::spanUTF8(const char *s, int32_t length, USetSpanCondition sp
}
int32_t UnicodeSet::spanBackUTF8(const char *s, int32_t length, USetSpanCondition spanCondition) const {
- if(length>0 && bmpSet!=NULL) {
+ if(length>0 && bmpSet!=nullptr) {
const uint8_t *s0=(const uint8_t *)s;
return bmpSet->spanBackUTF8(s0, length, spanCondition);
}
@@ -2325,7 +2325,7 @@ int32_t UnicodeSet::spanBackUTF8(const char *s, int32_t length, USetSpanConditio
if(length==0) {
return 0;
}
- if(stringSpan!=NULL) {
+ if(stringSpan!=nullptr) {
return stringSpan->spanBackUTF8((const uint8_t *)s, length, spanCondition);
} else if(hasStrings()) {
uint32_t which= spanCondition==USET_SPAN_NOT_CONTAINED ?
diff --git a/contrib/libs/icu/common/uniset_closure.cpp b/contrib/libs/icu/common/uniset_closure.cpp
index 882231ba1a5..173a5cbaaef 100644
--- a/contrib/libs/icu/common/uniset_closure.cpp
+++ b/contrib/libs/icu/common/uniset_closure.cpp
@@ -25,9 +25,11 @@
#include "unicode/locid.h"
#include "unicode/parsepos.h"
#include "unicode/uniset.h"
+#include "unicode/utf16.h"
#include "cmemory.h"
#include "ruleiter.h"
#include "ucase.h"
+#include "uprops.h"
#include "util.h"
#include "uvector.h"
@@ -74,7 +76,7 @@ UnicodeSet& UnicodeSet::applyPattern(const UnicodeString& pattern,
if (options & USET_IGNORE_SPACE) {
// Skip over trailing whitespace
- ICU_Utility::skipWhitespace(pattern, i, TRUE);
+ ICU_Utility::skipWhitespace(pattern, i, true);
}
if (i != pattern.length()) {
@@ -123,7 +125,7 @@ _set_addRange(USet *set, UChar32 start, UChar32 end) {
}
static void U_CALLCONV
-_set_addString(USet *set, const UChar *str, int32_t length) {
+_set_addString(USet *set, const char16_t *str, int32_t length) {
((UnicodeSet *)set)->add(UnicodeString((UBool)(length<0), str, length));
}
@@ -134,14 +136,14 @@ _set_addString(USet *set, const UChar *str, int32_t length) {
// add the result of a full case mapping to the set
// use str as a temporary string to avoid constructing one
static inline void
-addCaseMapping(UnicodeSet &set, int32_t result, const UChar *full, UnicodeString &str) {
+addCaseMapping(UnicodeSet &set, int32_t result, const char16_t *full, UnicodeString &str) {
if(result >= 0) {
if(result > UCASE_MAX_STRING_LENGTH) {
// add a single-code point case mapping
set.add(result);
} else {
// add a string case mapping from full with length result
- str.setTo((UBool)FALSE, full, result);
+ str.setTo((UBool)false, full, result);
set.add(str);
}
}
@@ -149,102 +151,208 @@ addCaseMapping(UnicodeSet &set, int32_t result, const UChar *full, UnicodeString
// see ucase.h
}
+namespace {
+
+/** For case closure on a large set, look only at code points with relevant properties. */
+const UnicodeSet &maybeOnlyCaseSensitive(const UnicodeSet &src, UnicodeSet &subset) {
+ // The subset must have been constructed with all code points,
+ // so that the retainAll() intersection effectively copies all single code points from src.
+ U_ASSERT(subset.contains(0, 0x10ffff));
+ if (src.size() < 30) {
+ return src;
+ }
+ // Return the intersection of the src code points with Case_Sensitive ones.
+ UErrorCode errorCode = U_ZERO_ERROR;
+ const UnicodeSet *sensitive =
+ CharacterProperties::getBinaryPropertySet(UCHAR_CASE_SENSITIVE, errorCode);
+ if (U_FAILURE(errorCode)) {
+ return src;
+ }
+ // Start by copying the "smaller" set.
+ // (We "copy" by intersecting all Unicode *code points* with the first set,
+ // which omits any strings.)
+ if (src.getRangeCount() > sensitive->getRangeCount()) {
+ subset.retainAll(*sensitive);
+ subset.retainAll(src);
+ } else {
+ subset.retainAll(src);
+ subset.retainAll(*sensitive);
+ }
+ return subset;
+}
+
+// Per-character scf = Simple_Case_Folding of a string.
+// (Normally when we case-fold a string we use full case foldings.)
+bool scfString(const UnicodeString &s, UnicodeString &scf) {
+ // Iterate over the raw buffer for best performance.
+ const char16_t *p = s.getBuffer();
+ int32_t length = s.length();
+ // Loop while not needing modification.
+ for (int32_t i = 0; i < length;) {
+ UChar32 c;
+ U16_NEXT(p, i, length, c); // post-increments i
+ UChar32 scfChar = u_foldCase(c, U_FOLD_CASE_DEFAULT);
+ if (scfChar != c) {
+ // Copy the characters before c.
+ scf.setTo(p, i - U16_LENGTH(c));
+ // Loop over the rest of the string and keep case-folding.
+ for (;;) {
+ scf.append(scfChar);
+ if (i == length) {
+ return true;
+ }
+ U16_NEXT(p, i, length, c); // post-increments i
+ scfChar = u_foldCase(c, U_FOLD_CASE_DEFAULT);
+ }
+ }
+ }
+ return false;
+}
+
+} // namespace
+
UnicodeSet& UnicodeSet::closeOver(int32_t attribute) {
if (isFrozen() || isBogus()) {
return *this;
}
- if (attribute & (USET_CASE_INSENSITIVE | USET_ADD_CASE_MAPPINGS)) {
- {
- UnicodeSet foldSet(*this);
- UnicodeString str;
- USetAdder sa = {
- foldSet.toUSet(),
- _set_add,
- _set_addRange,
- _set_addString,
- NULL, // don't need remove()
- NULL // don't need removeRange()
- };
-
- // start with input set to guarantee inclusion
- // USET_CASE: remove strings because the strings will actually be reduced (folded);
- // therefore, start with no strings and add only those needed
- if ((attribute & USET_CASE_INSENSITIVE) && foldSet.hasStrings()) {
- foldSet.strings->removeAllElements();
- }
+ switch (attribute & USET_CASE_MASK) {
+ case 0:
+ break;
+ case USET_CASE_INSENSITIVE:
+ closeOverCaseInsensitive(/* simple= */ false);
+ break;
+ case USET_ADD_CASE_MAPPINGS:
+ closeOverAddCaseMappings();
+ break;
+ case USET_SIMPLE_CASE_INSENSITIVE:
+ closeOverCaseInsensitive(/* simple= */ true);
+ break;
+ default:
+ // bad option (unreachable)
+ break;
+ }
+ return *this;
+}
+
+void UnicodeSet::closeOverCaseInsensitive(bool simple) {
+ // Start with input set to guarantee inclusion.
+ UnicodeSet foldSet(*this);
+ // Full case mappings closure:
+ // Remove strings because the strings will actually be reduced (folded);
+ // therefore, start with no strings and add only those needed.
+ // Do this before processing code points, because they may add strings.
+ if (!simple && foldSet.hasStrings()) {
+ foldSet.strings->removeAllElements();
+ }
+
+ USetAdder sa = {
+ foldSet.toUSet(),
+ _set_add,
+ _set_addRange,
+ _set_addString,
+ nullptr, // don't need remove()
+ nullptr // don't need removeRange()
+ };
+
+ UnicodeSet subset(0, 0x10ffff);
+ const UnicodeSet &codePoints = maybeOnlyCaseSensitive(*this, subset);
- int32_t n = getRangeCount();
- UChar32 result;
- const UChar *full;
-
- for (int32_t i=0; i<n; ++i) {
- UChar32 start = getRangeStart(i);
- UChar32 end = getRangeEnd(i);
-
- if (attribute & USET_CASE_INSENSITIVE) {
- // full case closure
- for (UChar32 cp=start; cp<=end; ++cp) {
- ucase_addCaseClosure(cp, &sa);
- }
- } else {
- // add case mappings
- // (does not add long s for regular s, or Kelvin for k, for example)
- for (UChar32 cp=start; cp<=end; ++cp) {
- result = ucase_toFullLower(cp, NULL, NULL, &full, UCASE_LOC_ROOT);
- addCaseMapping(foldSet, result, full, str);
-
- result = ucase_toFullTitle(cp, NULL, NULL, &full, UCASE_LOC_ROOT);
- addCaseMapping(foldSet, result, full, str);
-
- result = ucase_toFullUpper(cp, NULL, NULL, &full, UCASE_LOC_ROOT);
- addCaseMapping(foldSet, result, full, str);
-
- result = ucase_toFullFolding(cp, &full, 0);
- addCaseMapping(foldSet, result, full, str);
- }
+ // Iterate over the ranges of single code points. Nested loop for each code point.
+ int32_t n = codePoints.getRangeCount();
+
+ for (int32_t i=0; i<n; ++i) {
+ UChar32 start = codePoints.getRangeStart(i);
+ UChar32 end = codePoints.getRangeEnd(i);
+
+ if (simple) {
+ for (UChar32 cp=start; cp<=end; ++cp) {
+ ucase_addSimpleCaseClosure(cp, &sa);
+ }
+ } else {
+ for (UChar32 cp=start; cp<=end; ++cp) {
+ ucase_addCaseClosure(cp, &sa);
+ }
+ }
+ }
+ if (hasStrings()) {
+ UnicodeString str;
+ for (int32_t j=0; j<strings->size(); ++j) {
+ const UnicodeString *pStr = (const UnicodeString *) strings->elementAt(j);
+ if (simple) {
+ if (scfString(*pStr, str)) {
+ foldSet.remove(*pStr).add(str);
+ }
+ } else {
+ str = *pStr;
+ str.foldCase();
+ if(!ucase_addStringCaseClosure(str.getBuffer(), str.length(), &sa)) {
+ foldSet.add(str); // does not map to code points: add the folded string itself
}
}
- if (hasStrings()) {
- if (attribute & USET_CASE_INSENSITIVE) {
- for (int32_t j=0; j<strings->size(); ++j) {
- str = *(const UnicodeString *) strings->elementAt(j);
- str.foldCase();
- if(!ucase_addStringCaseClosure(str.getBuffer(), str.length(), &sa)) {
- foldSet.add(str); // does not map to code points: add the folded string itself
- }
- }
- } else {
- Locale root("");
-#if !UCONFIG_NO_BREAK_ITERATION
- UErrorCode status = U_ZERO_ERROR;
- BreakIterator *bi = BreakIterator::createWordInstance(root, status);
- if (U_SUCCESS(status)) {
-#endif
- const UnicodeString *pStr;
+ }
+ }
+ *this = foldSet;
+}
+
+void UnicodeSet::closeOverAddCaseMappings() {
+ // Start with input set to guarantee inclusion.
+ UnicodeSet foldSet(*this);
+
+ UnicodeSet subset(0, 0x10ffff);
+ const UnicodeSet &codePoints = maybeOnlyCaseSensitive(*this, subset);
- for (int32_t j=0; j<strings->size(); ++j) {
- pStr = (const UnicodeString *) strings->elementAt(j);
- (str = *pStr).toLower(root);
- foldSet.add(str);
+ // Iterate over the ranges of single code points. Nested loop for each code point.
+ int32_t n = codePoints.getRangeCount();
+ UChar32 result;
+ const char16_t *full;
+ UnicodeString str;
+
+ for (int32_t i=0; i<n; ++i) {
+ UChar32 start = codePoints.getRangeStart(i);
+ UChar32 end = codePoints.getRangeEnd(i);
+
+ // add case mappings
+ // (does not add long s for regular s, or Kelvin for k, for example)
+ for (UChar32 cp=start; cp<=end; ++cp) {
+ result = ucase_toFullLower(cp, nullptr, nullptr, &full, UCASE_LOC_ROOT);
+ addCaseMapping(foldSet, result, full, str);
+
+ result = ucase_toFullTitle(cp, nullptr, nullptr, &full, UCASE_LOC_ROOT);
+ addCaseMapping(foldSet, result, full, str);
+
+ result = ucase_toFullUpper(cp, nullptr, nullptr, &full, UCASE_LOC_ROOT);
+ addCaseMapping(foldSet, result, full, str);
+
+ result = ucase_toFullFolding(cp, &full, 0);
+ addCaseMapping(foldSet, result, full, str);
+ }
+ }
+ if (hasStrings()) {
+ Locale root("");
#if !UCONFIG_NO_BREAK_ITERATION
- (str = *pStr).toTitle(bi, root);
- foldSet.add(str);
+ UErrorCode status = U_ZERO_ERROR;
+ BreakIterator *bi = BreakIterator::createWordInstance(root, status);
+ if (U_SUCCESS(status)) {
#endif
- (str = *pStr).toUpper(root);
- foldSet.add(str);
- (str = *pStr).foldCase();
- foldSet.add(str);
- }
+ for (int32_t j=0; j<strings->size(); ++j) {
+ const UnicodeString *pStr = (const UnicodeString *) strings->elementAt(j);
+ (str = *pStr).toLower(root);
+ foldSet.add(str);
#if !UCONFIG_NO_BREAK_ITERATION
- }
- delete bi;
+ (str = *pStr).toTitle(bi, root);
+ foldSet.add(str);
#endif
- }
+ (str = *pStr).toUpper(root);
+ foldSet.add(str);
+ (str = *pStr).foldCase();
+ foldSet.add(str);
}
- *this = foldSet;
+#if !UCONFIG_NO_BREAK_ITERATION
}
+ delete bi;
+#endif
}
- return *this;
+ *this = foldSet;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/uniset_props.cpp b/contrib/libs/icu/common/uniset_props.cpp
index 49d6caabc75..b3dbdf93c88 100644
--- a/contrib/libs/icu/common/uniset_props.cpp
+++ b/contrib/libs/icu/common/uniset_props.cpp
@@ -62,16 +62,16 @@ U_CDECL_BEGIN
static UBool U_CALLCONV uset_cleanup();
static UnicodeSet *uni32Singleton;
-static icu::UInitOnce uni32InitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce uni32InitOnce {};
/**
* Cleanup function for UnicodeSet
*/
-static UBool U_CALLCONV uset_cleanup(void) {
+static UBool U_CALLCONV uset_cleanup() {
delete uni32Singleton;
- uni32Singleton = NULL;
+ uni32Singleton = nullptr;
uni32InitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -82,9 +82,9 @@ namespace {
// Cache some sets for other services -------------------------------------- ***
void U_CALLCONV createUni32Set(UErrorCode &errorCode) {
- U_ASSERT(uni32Singleton == NULL);
+ U_ASSERT(uni32Singleton == nullptr);
uni32Singleton = new UnicodeSet(UNICODE_STRING_SIMPLE("[:age=3.2:]"), errorCode);
- if(uni32Singleton==NULL) {
+ if(uni32Singleton==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
} else {
uni32Singleton->freeze();
@@ -108,7 +108,7 @@ uniset_getUnicode32Instance(UErrorCode &errorCode) {
static inline UBool
isPerlOpen(const UnicodeString &pattern, int32_t pos) {
- UChar c;
+ char16_t c;
return pattern.charAt(pos)==u'\\' && ((c=pattern.charAt(pos+1))==u'p' || c==u'P');
}
@@ -162,15 +162,15 @@ UnicodeSet::UnicodeSet(const UnicodeString& pattern,
UnicodeSet& UnicodeSet::applyPattern(const UnicodeString& pattern,
UErrorCode& status) {
// Equivalent to
- // return applyPattern(pattern, USET_IGNORE_SPACE, NULL, status);
+ // return applyPattern(pattern, USET_IGNORE_SPACE, nullptr, status);
// but without dependency on closeOver().
ParsePosition pos(0);
- applyPatternIgnoreSpace(pattern, pos, NULL, status);
+ applyPatternIgnoreSpace(pattern, pos, nullptr, status);
if (U_FAILURE(status)) return *this;
int32_t i = pos.getIndex();
// Skip over trailing whitespace
- ICU_Utility::skipWhitespace(pattern, i, TRUE);
+ ICU_Utility::skipWhitespace(pattern, i, true);
if (i != pattern.length()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -193,7 +193,7 @@ UnicodeSet::applyPatternIgnoreSpace(const UnicodeString& pattern,
// _applyPattern calls add() etc., which set pat to empty.
UnicodeString rebuiltPat;
RuleCharacterIterator chars(pattern, symbols, pos);
- applyPattern(chars, symbols, rebuiltPat, USET_IGNORE_SPACE, NULL, 0, status);
+ applyPattern(chars, symbols, rebuiltPat, USET_IGNORE_SPACE, nullptr, 0, status);
if (U_FAILURE(status)) return;
if (chars.inVariable()) {
// syntaxError(chars, "Extra chars in variable value");
@@ -209,7 +209,7 @@ UnicodeSet::applyPatternIgnoreSpace(const UnicodeString& pattern,
*/
UBool UnicodeSet::resemblesPattern(const UnicodeString& pattern, int32_t pos) {
return ((pos+1) < pattern.length() &&
- pattern.charAt(pos) == (UChar)91/*[*/) ||
+ pattern.charAt(pos) == (char16_t)91/*[*/) ||
resemblesPropertyPattern(pattern, pos);
}
@@ -279,7 +279,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
}
UnicodeString patLocal, buf;
- UBool usePat = FALSE;
+ UBool usePat = false;
UnicodeSetPointer scratch;
RuleCharacterIterator::Pos backup;
@@ -287,9 +287,9 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
// lastItem: 0=none, 1=char, 2=set
int8_t lastItem = 0, mode = 0;
UChar32 lastChar = 0;
- UChar op = 0;
+ char16_t op = 0;
- UBool invert = FALSE;
+ UBool invert = false;
clear();
@@ -299,7 +299,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
(lastItem == 2 && (op == 0 || op == u'-' || op == u'&')));
UChar32 c = 0;
- UBool literal = FALSE;
+ UBool literal = false;
UnicodeSet* nested = 0; // alias - do not delete
// -------- Check for property pattern
@@ -336,7 +336,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
c = chars.next(opts, literal, ec);
if (U_FAILURE(ec)) return;
if (c == u'^' && !literal) {
- invert = TRUE;
+ invert = true;
patLocal.append(u'^');
chars.getPos(backup); // prepare to backup
c = chars.next(opts, literal, ec);
@@ -345,7 +345,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
// Fall through to handle special leading '-';
// otherwise restart loop for nested [], \p{}, etc.
if (c == u'-') {
- literal = TRUE;
+ literal = true;
// Fall through to handle literal '-' below
} else {
chars.setPos(backup); // backup
@@ -356,7 +356,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
const UnicodeFunctor *m = symbols->lookupMatcher(c);
if (m != 0) {
const UnicodeSet *ms = dynamic_cast<const UnicodeSet *>(m);
- if (ms == NULL) {
+ if (ms == nullptr) {
ec = U_MALFORMED_SET;
return;
}
@@ -381,7 +381,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
return;
}
add(lastChar, lastChar);
- _appendToPat(patLocal, lastChar, FALSE);
+ _appendToPat(patLocal, lastChar, false);
lastItem = 0;
op = 0;
}
@@ -408,11 +408,11 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
if (U_FAILURE(ec)) return;
break;
case 3: // `nested' already parsed
- nested->_toPattern(patLocal, FALSE);
+ nested->_toPattern(patLocal, false);
break;
}
- usePat = TRUE;
+ usePat = true;
if (mode == 0) {
// Entire pattern is a category; leave parse loop
@@ -454,7 +454,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
case u']':
if (lastItem == 1) {
add(lastChar, lastChar);
- _appendToPat(patLocal, lastChar, FALSE);
+ _appendToPat(patLocal, lastChar, false);
}
// Treat final trailing '-' as a literal
if (op == u'-') {
@@ -471,7 +471,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
case u'-':
if (op == 0) {
if (lastItem != 0) {
- op = (UChar) c;
+ op = (char16_t) c;
continue;
} else {
// Treat final trailing '-' as a literal
@@ -490,7 +490,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
return;
case u'&':
if (lastItem == 2 && op == 0) {
- op = (UChar) c;
+ op = (char16_t) c;
continue;
}
// syntaxError(chars, "'&' not after set");
@@ -508,17 +508,17 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
}
if (lastItem == 1) {
add(lastChar, lastChar);
- _appendToPat(patLocal, lastChar, FALSE);
+ _appendToPat(patLocal, lastChar, false);
}
lastItem = 0;
buf.truncate(0);
{
- UBool ok = FALSE;
+ UBool ok = false;
while (!chars.atEnd()) {
c = chars.next(opts, literal, ec);
if (U_FAILURE(ec)) return;
if (c == u'}' && !literal) {
- ok = TRUE;
+ ok = true;
break;
}
buf.append(c);
@@ -534,7 +534,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
// processing
add(buf);
patLocal.append(u'{');
- _appendToPat(patLocal, buf, FALSE);
+ _appendToPat(patLocal, buf, false);
patLocal.append(u'}');
continue;
case SymbolTable::SYMBOL_REF:
@@ -557,11 +557,11 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
if (anchor && op == 0) {
if (lastItem == 1) {
add(lastChar, lastChar);
- _appendToPat(patLocal, lastChar, FALSE);
+ _appendToPat(patLocal, lastChar, false);
}
add(U_ETHER);
- usePat = TRUE;
- patLocal.append((UChar) SymbolTable::SYMBOL_REF);
+ usePat = true;
+ patLocal.append((char16_t) SymbolTable::SYMBOL_REF);
patLocal.append(u']');
mode = 2;
continue;
@@ -594,14 +594,14 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
return;
}
add(lastChar, c);
- _appendToPat(patLocal, lastChar, FALSE);
+ _appendToPat(patLocal, lastChar, false);
patLocal.append(op);
- _appendToPat(patLocal, c, FALSE);
+ _appendToPat(patLocal, c, false);
lastItem = 0;
op = 0;
} else {
add(lastChar, lastChar);
- _appendToPat(patLocal, lastChar, FALSE);
+ _appendToPat(patLocal, lastChar, false);
lastChar = c;
}
break;
@@ -631,11 +631,8 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
* to close over case BEFORE COMPLEMENTING. This makes
* patterns like /[^abc]/i work.
*/
- if ((options & USET_CASE_INSENSITIVE) != 0) {
- (this->*caseClosure)(USET_CASE_INSENSITIVE);
- }
- else if ((options & USET_ADD_CASE_MAPPINGS) != 0) {
- (this->*caseClosure)(USET_ADD_CASE_MAPPINGS);
+ if ((options & USET_CASE_MASK) != 0) {
+ (this->*caseClosure)(options);
}
if (invert) {
complement().removeAllStrings(); // code point complement
@@ -646,7 +643,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars,
if (usePat) {
rebuiltPat.append(patLocal);
} else {
- _generatePattern(rebuiltPat, FALSE);
+ _generatePattern(rebuiltPat, false);
}
if (isBogus() && U_SUCCESS(ec)) {
// We likely ran out of memory. AHHH!
@@ -756,12 +753,12 @@ static UBool mungeCharName(char* dst, const char* src, int32_t dstCapacity) {
if (ch == ' ' && (j==0 || (j>0 && dst[j-1]==' '))) {
continue;
}
- if (j >= dstCapacity) return FALSE;
+ if (j >= dstCapacity) return false;
dst[j++] = ch;
}
if (j > 0 && dst[j-1] == ' ') --j;
dst[j] = 0;
- return TRUE;
+ return true;
}
} // namespace
@@ -789,7 +786,7 @@ UnicodeSet::applyIntPropertyValue(UProperty prop, int32_t value, UErrorCode& ec)
if (value == 0 || value == 1) {
const USet *set = u_getBinaryPropertySet(prop, &ec);
if (U_FAILURE(ec)) { return *this; }
- copyFrom(*UnicodeSet::fromUSet(set), TRUE);
+ copyFrom(*UnicodeSet::fromUSet(set), true);
if (value == 0) {
complement().removeAllStrings(); // code point complement
}
@@ -830,7 +827,7 @@ UnicodeSet::applyPropertyAlias(const UnicodeString& prop,
UProperty p;
int32_t v;
- UBool invert = FALSE;
+ UBool invert = false;
if (value.length() > 0) {
p = u_getPropertyEnum(pname.data());
@@ -948,7 +945,7 @@ UnicodeSet::applyPropertyAlias(const UnicodeString& prop,
// [:Assigned:]=[:^Cn:]
p = UCHAR_GENERAL_CATEGORY_MASK;
v = U_GC_CN_MASK;
- invert = TRUE;
+ invert = true;
} else {
FAIL(ec);
}
@@ -980,7 +977,7 @@ UBool UnicodeSet::resemblesPropertyPattern(const UnicodeString& pattern,
int32_t pos) {
// Patterns are at least 5 characters long
if ((pos+5) > pattern.length()) {
- return FALSE;
+ return false;
}
// Look for an opening [:, [:^, \p, or \P
@@ -997,8 +994,8 @@ UBool UnicodeSet::resemblesPropertyPattern(const UnicodeString& pattern,
*/
UBool UnicodeSet::resemblesPropertyPattern(RuleCharacterIterator& chars,
int32_t iterOpts) {
- // NOTE: literal will always be FALSE, because we don't parse escapes.
- UBool result = FALSE, literal;
+ // NOTE: literal will always be false, because we don't parse escapes.
+ UBool result = false, literal;
UErrorCode ec = U_ZERO_ERROR;
iterOpts &= ~RuleCharacterIterator::PARSE_ESCAPES;
RuleCharacterIterator::Pos pos;
@@ -1022,9 +1019,9 @@ UnicodeSet& UnicodeSet::applyPropertyPattern(const UnicodeString& pattern,
UErrorCode &ec) {
int32_t pos = ppos.getIndex();
- UBool posix = FALSE; // true for [:pat:], false for \p{pat} \P{pat} \N{pat}
- UBool isName = FALSE; // true for \N{pat}, o/w false
- UBool invert = FALSE;
+ UBool posix = false; // true for [:pat:], false for \p{pat} \P{pat} \N{pat}
+ UBool isName = false; // true for \N{pat}, o/w false
+ UBool invert = false;
if (U_FAILURE(ec)) return *this;
@@ -1036,15 +1033,15 @@ UnicodeSet& UnicodeSet::applyPropertyPattern(const UnicodeString& pattern,
// On entry, ppos should point to one of the following locations:
// Look for an opening [:, [:^, \p, or \P
if (isPOSIXOpen(pattern, pos)) {
- posix = TRUE;
+ posix = true;
pos += 2;
pos = ICU_Utility::skipWhitespace(pattern, pos);
if (pos < pattern.length() && pattern.charAt(pos) == u'^') {
++pos;
- invert = TRUE;
+ invert = true;
}
} else if (isPerlOpen(pattern, pos) || isNameOpen(pattern, pos)) {
- UChar c = pattern.charAt(pos+1);
+ char16_t c = pattern.charAt(pos+1);
invert = (c == u'P');
isName = (c == u'N');
pos += 2;
diff --git a/contrib/libs/icu/common/unisetspan.cpp b/contrib/libs/icu/common/unisetspan.cpp
index fe0d74f5b28..b7256d8fd16 100644
--- a/contrib/libs/icu/common/unisetspan.cpp
+++ b/contrib/libs/icu/common/unisetspan.cpp
@@ -70,7 +70,7 @@ public:
capacity=(int32_t)sizeof(staticList);
} else {
UBool *l=(UBool *)uprv_malloc(maxLength);
- if(l!=NULL) {
+ if(l!=nullptr) {
list=l;
capacity=maxLength;
}
@@ -98,7 +98,7 @@ public:
i-=capacity;
}
if(list[i]) {
- list[i]=FALSE;
+ list[i]=false;
--length;
}
start=i;
@@ -111,7 +111,7 @@ public:
if(i>=capacity) {
i-=capacity;
}
- list[i]=TRUE;
+ list[i]=true;
++length;
}
@@ -132,7 +132,7 @@ public:
int32_t i=start, result;
while(++i<capacity) {
if(list[i]) {
- list[i]=FALSE;
+ list[i]=false;
--length;
result=i-start;
start=i;
@@ -148,7 +148,7 @@ public:
while(!list[i]) {
++i;
}
- list[i]=FALSE;
+ list[i]=false;
--length;
start=i;
return result+=i;
@@ -165,10 +165,10 @@ private:
// Get the number of UTF-8 bytes for a UTF-16 (sub)string.
static int32_t
-getUTF8Length(const UChar *s, int32_t length) {
+getUTF8Length(const char16_t *s, int32_t length) {
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length8=0;
- u_strToUTF8(NULL, 0, &length8, s, length, &errorCode);
+ u_strToUTF8(nullptr, 0, &length8, s, length, &errorCode);
if(U_SUCCESS(errorCode) || errorCode==U_BUFFER_OVERFLOW_ERROR) {
return length8;
} else {
@@ -180,7 +180,7 @@ getUTF8Length(const UChar *s, int32_t length) {
// Append the UTF-8 version of the string to t and return the appended UTF-8 length.
static int32_t
-appendUTF8(const UChar *s, int32_t length, uint8_t *t, int32_t capacity) {
+appendUTF8(const char16_t *s, int32_t length, uint8_t *t, int32_t capacity) {
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length8=0;
u_strToUTF8((char *)t, capacity, &length8, s, length, &errorCode);
@@ -204,8 +204,8 @@ makeSpanLengthByte(int32_t spanLength) {
UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
const UVector &setStrings,
uint32_t which)
- : spanSet(0, 0x10ffff), pSpanNotSet(NULL), strings(setStrings),
- utf8Lengths(NULL), spanLengths(NULL), utf8(NULL),
+ : spanSet(0, 0x10ffff), pSpanNotSet(nullptr), strings(setStrings),
+ utf8Lengths(nullptr), spanLengths(nullptr), utf8(nullptr),
utf8Length(0),
maxLength16(0), maxLength8(0),
all((UBool)(which==ALL)) {
@@ -226,10 +226,10 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
int32_t stringsLength=strings.size();
int32_t i, spanLength;
- UBool someRelevant=FALSE;
+ UBool someRelevant=false;
for(i=0; i<stringsLength; ++i) {
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
if (length16==0) {
continue; // skip the empty string
@@ -237,9 +237,9 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
UBool thisRelevant;
spanLength=spanSet.span(s16, length16, USET_SPAN_CONTAINED);
if(spanLength<length16) { // Relevant string.
- someRelevant=thisRelevant=TRUE;
+ someRelevant=thisRelevant=true;
} else {
- thisRelevant=FALSE;
+ thisRelevant=false;
}
if((which&UTF16) && length16>maxLength16) {
maxLength16=length16;
@@ -283,8 +283,8 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
utf8Lengths=staticLengths;
} else {
utf8Lengths=(int32_t *)uprv_malloc(allocSize);
- if(utf8Lengths==NULL) {
- maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return FALSE.
+ if(utf8Lengths==nullptr) {
+ maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return false.
return; // Out of memory.
}
}
@@ -312,7 +312,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
for(i=0; i<stringsLength; ++i) {
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
spanLength=spanSet.span(s16, length16, USET_SPAN_CONTAINED);
if(spanLength<length16 && length16>0) { // Relevant string.
@@ -395,11 +395,11 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set,
// Copy constructor. Assumes which==ALL for a frozen set.
UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStringSpan,
const UVector &newParentSetStrings)
- : spanSet(otherStringSpan.spanSet), pSpanNotSet(NULL), strings(newParentSetStrings),
- utf8Lengths(NULL), spanLengths(NULL), utf8(NULL),
+ : spanSet(otherStringSpan.spanSet), pSpanNotSet(nullptr), strings(newParentSetStrings),
+ utf8Lengths(nullptr), spanLengths(nullptr), utf8(nullptr),
utf8Length(otherStringSpan.utf8Length),
maxLength16(otherStringSpan.maxLength16), maxLength8(otherStringSpan.maxLength8),
- all(TRUE) {
+ all(true) {
if(otherStringSpan.pSpanNotSet==&otherStringSpan.spanSet) {
pSpanNotSet=&spanSet;
} else {
@@ -414,8 +414,8 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStri
utf8Lengths=staticLengths;
} else {
utf8Lengths=(int32_t *)uprv_malloc(allocSize);
- if(utf8Lengths==NULL) {
- maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return FALSE.
+ if(utf8Lengths==nullptr) {
+ maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return false.
return; // Out of memory.
}
}
@@ -426,21 +426,21 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStri
}
UnicodeSetStringSpan::~UnicodeSetStringSpan() {
- if(pSpanNotSet!=NULL && pSpanNotSet!=&spanSet) {
+ if(pSpanNotSet!=nullptr && pSpanNotSet!=&spanSet) {
delete pSpanNotSet;
}
- if(utf8Lengths!=NULL && utf8Lengths!=staticLengths) {
+ if(utf8Lengths!=nullptr && utf8Lengths!=staticLengths) {
uprv_free(utf8Lengths);
}
}
void UnicodeSetStringSpan::addToSpanNotSet(UChar32 c) {
- if(pSpanNotSet==NULL || pSpanNotSet==&spanSet) {
+ if(pSpanNotSet==nullptr || pSpanNotSet==&spanSet) {
if(spanSet.contains(c)) {
return; // Nothing to do.
}
UnicodeSet *newSet=spanSet.cloneAsThawed();
- if(newSet==NULL) {
+ if(newSet==nullptr) {
return; // Out of memory.
} else {
pSpanNotSet=newSet;
@@ -451,30 +451,30 @@ void UnicodeSetStringSpan::addToSpanNotSet(UChar32 c) {
// Compare strings without any argument checks. Requires length>0.
static inline UBool
-matches16(const UChar *s, const UChar *t, int32_t length) {
+matches16(const char16_t *s, const char16_t *t, int32_t length) {
do {
if(*s++!=*t++) {
- return FALSE;
+ return false;
}
} while(--length>0);
- return TRUE;
+ return true;
}
static inline UBool
matches8(const uint8_t *s, const uint8_t *t, int32_t length) {
do {
if(*s++!=*t++) {
- return FALSE;
+ return false;
}
} while(--length>0);
- return TRUE;
+ return true;
}
// Compare 16-bit Unicode strings (which may be malformed UTF-16)
// at code point boundaries.
// That is, each edge of a match must not be in the middle of a surrogate pair.
static inline UBool
-matches16CPB(const UChar *s, int32_t start, int32_t limit, const UChar *t, int32_t length) {
+matches16CPB(const char16_t *s, int32_t start, int32_t limit, const char16_t *t, int32_t length) {
s+=start;
limit-=start;
return matches16(s, t, length) &&
@@ -485,8 +485,8 @@ matches16CPB(const UChar *s, int32_t start, int32_t limit, const UChar *t, int32
// Does the set contain the next code point?
// If so, return its length; otherwise return its negative length.
static inline int32_t
-spanOne(const UnicodeSet &set, const UChar *s, int32_t length) {
- UChar c=*s, c2;
+spanOne(const UnicodeSet &set, const char16_t *s, int32_t length) {
+ char16_t c=*s, c2;
if(c>=0xd800 && c<=0xdbff && length>=2 && U16_IS_TRAIL(c2=s[1])) {
return set.contains(U16_GET_SUPPLEMENTARY(c, c2)) ? 2 : -2;
}
@@ -494,8 +494,8 @@ spanOne(const UnicodeSet &set, const UChar *s, int32_t length) {
}
static inline int32_t
-spanOneBack(const UnicodeSet &set, const UChar *s, int32_t length) {
- UChar c=s[length-1], c2;
+spanOneBack(const UnicodeSet &set, const char16_t *s, int32_t length) {
+ char16_t c=s[length-1], c2;
if(c>=0xdc00 && c<=0xdfff && length>=2 && U16_IS_LEAD(c2=s[length-2])) {
return set.contains(U16_GET_SUPPLEMENTARY(c2, c)) ? 2 : -2;
}
@@ -634,7 +634,7 @@ spanOneBackUTF8(const UnicodeSet &set, const uint8_t *s, int32_t length) {
* Stop if spanLength==0, otherwise continue the loop.
*/
-int32_t UnicodeSetStringSpan::span(const UChar *s, int32_t length, USetSpanCondition spanCondition) const {
+int32_t UnicodeSetStringSpan::span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const {
if(spanCondition==USET_SPAN_NOT_CONTAINED) {
return spanNot(s, length);
}
@@ -659,7 +659,7 @@ int32_t UnicodeSetStringSpan::span(const UChar *s, int32_t length, USetSpanCondi
continue; // Irrelevant string. (Also the empty string.)
}
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
U_ASSERT(length>0);
@@ -699,7 +699,7 @@ int32_t UnicodeSetStringSpan::span(const UChar *s, int32_t length, USetSpanCondi
// to find the match from the earliest start.
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
if (length16==0) {
continue; // skip the empty string
@@ -798,7 +798,7 @@ int32_t UnicodeSetStringSpan::span(const UChar *s, int32_t length, USetSpanCondi
}
}
-int32_t UnicodeSetStringSpan::spanBack(const UChar *s, int32_t length, USetSpanCondition spanCondition) const {
+int32_t UnicodeSetStringSpan::spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const {
if(spanCondition==USET_SPAN_NOT_CONTAINED) {
return spanNotBack(s, length);
}
@@ -827,7 +827,7 @@ int32_t UnicodeSetStringSpan::spanBack(const UChar *s, int32_t length, USetSpanC
continue; // Irrelevant string. (Also the empty string.)
}
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
U_ASSERT(length>0);
@@ -869,7 +869,7 @@ int32_t UnicodeSetStringSpan::spanBack(const UChar *s, int32_t length, USetSpanC
// to find the match from the latest end.
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
if (length16==0) {
continue; // skip the empty string
@@ -1346,7 +1346,7 @@ int32_t UnicodeSetStringSpan::spanBackUTF8(const uint8_t *s, int32_t length, USe
* when there is not actually a match for such a set string.
*/
-int32_t UnicodeSetStringSpan::spanNot(const UChar *s, int32_t length) const {
+int32_t UnicodeSetStringSpan::spanNot(const char16_t *s, int32_t length) const {
int32_t pos=0, rest=length;
int32_t i, stringsLength=strings.size();
do {
@@ -1372,7 +1372,7 @@ int32_t UnicodeSetStringSpan::spanNot(const UChar *s, int32_t length) const {
continue; // Irrelevant string. (Also the empty string.)
}
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
U_ASSERT(length>0);
if(length16<=rest && matches16CPB(s, pos, length, s16, length16)) {
@@ -1389,7 +1389,7 @@ int32_t UnicodeSetStringSpan::spanNot(const UChar *s, int32_t length) const {
return length; // Reached the end of the string.
}
-int32_t UnicodeSetStringSpan::spanNotBack(const UChar *s, int32_t length) const {
+int32_t UnicodeSetStringSpan::spanNotBack(const char16_t *s, int32_t length) const {
int32_t pos=length;
int32_t i, stringsLength=strings.size();
do {
@@ -1416,7 +1416,7 @@ int32_t UnicodeSetStringSpan::spanNotBack(const UChar *s, int32_t length) const
continue; // Irrelevant string. (Also the empty string.)
}
const UnicodeString &string=*(const UnicodeString *)strings.elementAt(i);
- const UChar *s16=string.getBuffer();
+ const char16_t *s16=string.getBuffer();
int32_t length16=string.length();
U_ASSERT(length>0);
if(length16<=pos && matches16CPB(s, pos-length16, length, s16, length16)) {
diff --git a/contrib/libs/icu/common/unisetspan.h b/contrib/libs/icu/common/unisetspan.h
index 9a1307a9078..f1dc8e6f743 100644
--- a/contrib/libs/icu/common/unisetspan.h
+++ b/contrib/libs/icu/common/unisetspan.h
@@ -74,9 +74,9 @@ public:
// For fast UnicodeSet::contains(c).
inline UBool contains(UChar32 c) const;
- int32_t span(const UChar *s, int32_t length, USetSpanCondition spanCondition) const;
+ int32_t span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const;
- int32_t spanBack(const UChar *s, int32_t length, USetSpanCondition spanCondition) const;
+ int32_t spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const;
int32_t spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const;
@@ -95,8 +95,8 @@ private:
// so that a character span ends before any string.
void addToSpanNotSet(UChar32 c);
- int32_t spanNot(const UChar *s, int32_t length) const;
- int32_t spanNotBack(const UChar *s, int32_t length) const;
+ int32_t spanNot(const char16_t *s, int32_t length) const;
+ int32_t spanNotBack(const char16_t *s, int32_t length) const;
int32_t spanNotUTF8(const uint8_t *s, int32_t length) const;
int32_t spanNotBackUTF8(const uint8_t *s, int32_t length) const;
diff --git a/contrib/libs/icu/common/unistr.cpp b/contrib/libs/icu/common/unistr.cpp
index 077b4d6ef20..04f01cfa16c 100644
--- a/contrib/libs/icu/common/unistr.cpp
+++ b/contrib/libs/icu/common/unistr.cpp
@@ -44,7 +44,7 @@ void
print(const UnicodeString& s,
const char *name)
{
- UChar c;
+ char16_t c;
cout << name << ":|";
for(int i = 0; i < s.length(); ++i) {
c = s[i];
@@ -57,11 +57,11 @@ print(const UnicodeString& s,
}
void
-print(const UChar *s,
+print(const char16_t *s,
int32_t len,
const char *name)
{
- UChar c;
+ char16_t c;
cout << name << ":|";
for(int i = 0; i < len; ++i) {
c = s[i];
@@ -80,17 +80,17 @@ print(const UChar *s,
// need to copy areas that may overlap
static
inline void
-us_arrayCopy(const UChar *src, int32_t srcStart,
- UChar *dst, int32_t dstStart, int32_t count)
+us_arrayCopy(const char16_t *src, int32_t srcStart,
+ char16_t *dst, int32_t dstStart, int32_t count)
{
if(count>0) {
uprv_memmove(dst+dstStart, src+srcStart, (size_t)count*sizeof(*src));
}
}
-// u_unescapeAt() callback to get a UChar from a UnicodeString
+// u_unescapeAt() callback to get a char16_t from a UnicodeString
U_CDECL_BEGIN
-static UChar U_CALLCONV
+static char16_t U_CALLCONV
UnicodeString_charAt(int32_t offset, void *context) {
return ((icu::UnicodeString*) context)->charAt(offset);
}
@@ -159,8 +159,8 @@ UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) {
capacity = length;
}
if(allocate(capacity)) {
- UChar *array = getArrayStart();
- UChar unit = (UChar)c;
+ char16_t *array = getArrayStart();
+ char16_t unit = (char16_t)c;
for(int32_t i = 0; i < length; ++i) {
array[i] = unit;
}
@@ -177,9 +177,9 @@ UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) {
capacity = length;
}
if(allocate(capacity)) {
- UChar *array = getArrayStart();
- UChar lead = U16_LEAD(c);
- UChar trail = U16_TRAIL(c);
+ char16_t *array = getArrayStart();
+ char16_t lead = U16_LEAD(c);
+ char16_t trail = U16_TRAIL(c);
for(int32_t i = 0; i < length; i += 2) {
array[i] = lead;
array[i + 1] = trail;
@@ -189,7 +189,7 @@ UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) {
}
}
-UnicodeString::UnicodeString(UChar ch) {
+UnicodeString::UnicodeString(char16_t ch) {
fUnion.fFields.fLengthAndFlags = kLength1 | kShortString;
fUnion.fStackFields.fBuffer[0] = ch;
}
@@ -197,7 +197,7 @@ UnicodeString::UnicodeString(UChar ch) {
UnicodeString::UnicodeString(UChar32 ch) {
fUnion.fFields.fLengthAndFlags = kShortString;
int32_t i = 0;
- UBool isError = FALSE;
+ UBool isError = false;
U16_APPEND(fUnion.fStackFields.fBuffer, i, US_STACKBUF_SIZE, ch, isError);
// We test isError so that the compiler does not complain that we don't.
// If isError then i==0 which is what we want anyway.
@@ -206,12 +206,12 @@ UnicodeString::UnicodeString(UChar32 ch) {
}
}
-UnicodeString::UnicodeString(const UChar *text) {
+UnicodeString::UnicodeString(const char16_t *text) {
fUnion.fFields.fLengthAndFlags = kShortString;
doAppend(text, 0, -1);
}
-UnicodeString::UnicodeString(const UChar *text,
+UnicodeString::UnicodeString(const char16_t *text,
int32_t textLength) {
fUnion.fFields.fLengthAndFlags = kShortString;
doAppend(text, 0, textLength);
@@ -221,8 +221,8 @@ UnicodeString::UnicodeString(UBool isTerminated,
ConstChar16Ptr textPtr,
int32_t textLength) {
fUnion.fFields.fLengthAndFlags = kReadonlyAlias;
- const UChar *text = textPtr;
- if(text == NULL) {
+ const char16_t *text = textPtr;
+ if(text == nullptr) {
// treat as an empty string, do not alias
setToEmpty();
} else if(textLength < -1 ||
@@ -235,16 +235,16 @@ UnicodeString::UnicodeString(UBool isTerminated,
// text is terminated, or else it would have failed the above test
textLength = u_strlen(text);
}
- setArray(const_cast<UChar *>(text), textLength,
+ setArray(const_cast<char16_t *>(text), textLength,
isTerminated ? textLength + 1 : textLength);
}
}
-UnicodeString::UnicodeString(UChar *buff,
+UnicodeString::UnicodeString(char16_t *buff,
int32_t buffLength,
int32_t buffCapacity) {
fUnion.fFields.fLengthAndFlags = kWritableAlias;
- if(buff == NULL) {
+ if(buff == nullptr) {
// treat as an empty string, do not alias
setToEmpty();
} else if(buffLength < -1 || buffCapacity < 0 || buffLength > buffCapacity) {
@@ -252,7 +252,7 @@ UnicodeString::UnicodeString(UChar *buff,
} else {
if(buffLength == -1) {
// fLength = u_strlen(buff); but do not look beyond buffCapacity
- const UChar *p = buff, *limit = buff + buffCapacity;
+ const char16_t *p = buff, *limit = buff + buffCapacity;
while(p != limit && *p != 0) {
++p;
}
@@ -264,13 +264,13 @@ UnicodeString::UnicodeString(UChar *buff,
UnicodeString::UnicodeString(const char *src, int32_t length, EInvariant) {
fUnion.fFields.fLengthAndFlags = kShortString;
- if(src==NULL) {
+ if(src==nullptr) {
// treat as an empty string
} else {
if(length<0) {
length=(int32_t)uprv_strlen(src);
}
- if(cloneArrayIfNeeded(length, length, FALSE)) {
+ if(cloneArrayIfNeeded(length, length, false)) {
u_charsToUChars(src, getArrayStart(), length);
setLength(length);
} else {
@@ -308,8 +308,8 @@ UnicodeString::UnicodeString(const UnicodeString& that) {
copyFrom(that);
}
-UnicodeString::UnicodeString(UnicodeString &&src) U_NOEXCEPT {
- copyFieldsFrom(src, TRUE);
+UnicodeString::UnicodeString(UnicodeString &&src) noexcept {
+ copyFieldsFrom(src, true);
}
UnicodeString::UnicodeString(const UnicodeString& that,
@@ -328,13 +328,14 @@ UnicodeString::UnicodeString(const UnicodeString& that,
// Replaceable base class clone() default implementation, does not clone
Replaceable *
Replaceable::clone() const {
- return NULL;
+ return nullptr;
}
// UnicodeString overrides clone() with a real implementation
UnicodeString *
UnicodeString::clone() const {
- return new UnicodeString(*this);
+ LocalPointer<UnicodeString> clonedString(new UnicodeString(*this));
+ return clonedString.isValid() && !clonedString->isBogus() ? clonedString.orphan() : nullptr;
}
//========================================
@@ -369,7 +370,7 @@ UBool
UnicodeString::allocate(int32_t capacity) {
if(capacity <= US_STACKBUF_SIZE) {
fUnion.fFields.fLengthAndFlags = kShortString;
- return TRUE;
+ return true;
}
if(capacity <= kMaxCapacity) {
++capacity; // for the NUL
@@ -379,22 +380,22 @@ UnicodeString::allocate(int32_t capacity) {
// Round up to a multiple of 16.
numBytes = (numBytes + 15) & ~15;
int32_t *array = (int32_t *) uprv_malloc(numBytes);
- if(array != NULL) {
+ if(array != nullptr) {
// set initial refCount and point behind the refCount
*array++ = 1;
numBytes -= sizeof(int32_t);
- // have fArray point to the first UChar
- fUnion.fFields.fArray = (UChar *)array;
+ // have fArray point to the first char16_t
+ fUnion.fFields.fArray = (char16_t *)array;
fUnion.fFields.fCapacity = (int32_t)(numBytes / U_SIZEOF_UCHAR);
fUnion.fFields.fLengthAndFlags = kLongString;
- return TRUE;
+ return true;
}
}
fUnion.fFields.fLengthAndFlags = kIsBogus;
fUnion.fFields.fArray = 0;
fUnion.fFields.fCapacity = 0;
- return FALSE;
+ return false;
}
//========================================
@@ -459,13 +460,13 @@ UnicodeString UnicodeString::fromUTF32(const UChar32 *utf32, int32_t length) {
capacity = length + (length >> 4) + 4;
}
do {
- UChar *utf16 = result.getBuffer(capacity);
+ char16_t *utf16 = result.getBuffer(capacity);
int32_t length16;
UErrorCode errorCode = U_ZERO_ERROR;
u_strFromUTF32WithSub(utf16, result.getCapacity(), &length16,
utf32, length,
0xfffd, // Substitution character.
- NULL, // Don't care about number of substitutions.
+ nullptr, // Don't care about number of substitutions.
&errorCode);
result.releaseBuffer(length16);
if(errorCode == U_BUFFER_OVERFLOW_ERROR) {
@@ -475,7 +476,7 @@ UnicodeString UnicodeString::fromUTF32(const UChar32 *utf32, int32_t length) {
result.setToBogus();
}
break;
- } while(TRUE);
+ } while(true);
return result;
}
@@ -490,7 +491,7 @@ UnicodeString::operator=(const UnicodeString &src) {
UnicodeString &
UnicodeString::fastCopyFrom(const UnicodeString &src) {
- return copyFrom(src, TRUE);
+ return copyFrom(src, true);
}
UnicodeString &
@@ -526,7 +527,7 @@ UnicodeString::copyFrom(const UnicodeString &src, UBool fastCopy) {
case kLongString:
// src uses a refCounted string buffer, use that buffer with refCount
// src is const, use a cast - we don't actually change it
- ((UnicodeString &)src).addRef();
+ const_cast<UnicodeString &>(src).addRef();
// copy all fields, share the reference-counted buffer
fUnion.fFields.fArray = src.fUnion.fFields.fArray;
fUnion.fFields.fCapacity = src.fUnion.fFields.fCapacity;
@@ -571,16 +572,16 @@ UnicodeString::copyFrom(const UnicodeString &src, UBool fastCopy) {
return *this;
}
-UnicodeString &UnicodeString::operator=(UnicodeString &&src) U_NOEXCEPT {
+UnicodeString &UnicodeString::operator=(UnicodeString &&src) noexcept {
// No explicit check for self move assignment, consistent with standard library.
// Self move assignment causes no crash nor leak but might make the object bogus.
releaseArray();
- copyFieldsFrom(src, TRUE);
+ copyFieldsFrom(src, true);
return *this;
}
// Same as move assignment except without memory management.
-void UnicodeString::copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NOEXCEPT {
+void UnicodeString::copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) noexcept {
int16_t lengthAndFlags = fUnion.fFields.fLengthAndFlags = src.fUnion.fFields.fLengthAndFlags;
if(lengthAndFlags & kUsingStackBuffer) {
// Short string using the stack buffer, copy the contents.
@@ -600,18 +601,18 @@ void UnicodeString::copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NO
if(setSrcToBogus) {
// Set src to bogus without releasing any memory.
src.fUnion.fFields.fLengthAndFlags = kIsBogus;
- src.fUnion.fFields.fArray = NULL;
+ src.fUnion.fFields.fArray = nullptr;
src.fUnion.fFields.fCapacity = 0;
}
}
}
-void UnicodeString::swap(UnicodeString &other) U_NOEXCEPT {
+void UnicodeString::swap(UnicodeString &other) noexcept {
UnicodeString temp; // Empty short string: Known not to need releaseArray().
// Copy fields without resetting source values in between.
- temp.copyFieldsFrom(*this, FALSE);
- this->copyFieldsFrom(other, FALSE);
- other.copyFieldsFrom(temp, FALSE);
+ temp.copyFieldsFrom(*this, false);
+ this->copyFieldsFrom(other, false);
+ other.copyFieldsFrom(temp, false);
// Set temp to an empty string so that other's memory is not released twice.
temp.fUnion.fFields.fLengthAndFlags = kShortString;
}
@@ -625,7 +626,7 @@ UnicodeString UnicodeString::unescape() const {
if (result.isBogus()) {
return result;
}
- const UChar *array = getBuffer();
+ const char16_t *array = getBuffer();
int32_t len = length();
int32_t prev = 0;
for (int32_t i=0;;) {
@@ -661,10 +662,52 @@ UnicodeString::doEquals(const UnicodeString &text, int32_t len) const {
return uprv_memcmp(getArrayStart(), text.getArrayStart(), len * U_SIZEOF_UCHAR) == 0;
}
+UBool
+UnicodeString::doEqualsSubstring( int32_t start,
+ int32_t length,
+ const char16_t *srcChars,
+ int32_t srcStart,
+ int32_t srcLength) const
+{
+ // compare illegal string values
+ if(isBogus()) {
+ return false;
+ }
+
+ // pin indices to legal values
+ pinIndices(start, length);
+
+ if(srcChars == nullptr) {
+ // treat const char16_t *srcChars==nullptr as an empty string
+ return length == 0 ? true : false;
+ }
+
+ // get the correct pointer
+ const char16_t *chars = getArrayStart();
+
+ chars += start;
+ srcChars += srcStart;
+
+ // get the srcLength if necessary
+ if(srcLength < 0) {
+ srcLength = u_strlen(srcChars + srcStart);
+ }
+
+ if (length != srcLength) {
+ return false;
+ }
+
+ if(length == 0 || chars == srcChars) {
+ return true;
+ }
+
+ return u_memcmp(chars, srcChars, srcLength) == 0;
+}
+
int8_t
UnicodeString::doCompare( int32_t start,
int32_t length,
- const UChar *srcChars,
+ const char16_t *srcChars,
int32_t srcStart,
int32_t srcLength) const
{
@@ -676,13 +719,13 @@ UnicodeString::doCompare( int32_t start,
// pin indices to legal values
pinIndices(start, length);
- if(srcChars == NULL) {
- // treat const UChar *srcChars==NULL as an empty string
+ if(srcChars == nullptr) {
+ // treat const char16_t *srcChars==nullptr as an empty string
return length == 0 ? 0 : 1;
}
// get the correct pointer
- const UChar *chars = getArrayStart();
+ const char16_t *chars = getArrayStart();
chars += start;
srcChars += srcStart;
@@ -722,12 +765,12 @@ UnicodeString::doCompare( int32_t start,
# if U_IS_BIG_ENDIAN
// big-endian: byte comparison works
- result = uprv_memcmp(chars, srcChars, minLength * sizeof(UChar));
+ result = uprv_memcmp(chars, srcChars, minLength * sizeof(char16_t));
if(result != 0) {
return (int8_t)(result >> 15 | 1);
}
# else
- // little-endian: compare UChar units
+ // little-endian: compare char16_t units
do {
result = ((int32_t)*(chars++) - (int32_t)*(srcChars++));
if(result != 0) {
@@ -743,12 +786,12 @@ UnicodeString::doCompare( int32_t start,
int8_t
UnicodeString::doCompareCodePointOrder(int32_t start,
int32_t length,
- const UChar *srcChars,
+ const char16_t *srcChars,
int32_t srcStart,
int32_t srcLength) const
{
// compare illegal string values
- // treat const UChar *srcChars==NULL as an empty string
+ // treat const char16_t *srcChars==nullptr as an empty string
if(isBogus()) {
return -1;
}
@@ -756,11 +799,11 @@ UnicodeString::doCompareCodePointOrder(int32_t start,
// pin indices to legal values
pinIndices(start, length);
- if(srcChars == NULL) {
+ if(srcChars == nullptr) {
srcStart = srcLength = 0;
}
- int32_t diff = uprv_strCompare(getArrayStart() + start, length, (srcChars!=NULL)?(srcChars + srcStart):NULL, srcLength, FALSE, TRUE);
+ int32_t diff = uprv_strCompare(getArrayStart() + start, length, (srcChars!=nullptr)?(srcChars + srcStart):nullptr, srcLength, false, true);
/* translate the 32-bit result into an 8-bit one */
if(diff!=0) {
return (int8_t)(diff >> 15 | 1);
@@ -774,7 +817,7 @@ UnicodeString::getLength() const {
return length();
}
-UChar
+char16_t
UnicodeString::getCharAt(int32_t offset) const {
return charAt(offset);
}
@@ -789,7 +832,7 @@ UnicodeString::char32At(int32_t offset) const
{
int32_t len = length();
if((uint32_t)offset < (uint32_t)len) {
- const UChar *array = getArrayStart();
+ const char16_t *array = getArrayStart();
UChar32 c;
U16_GET(array, 0, offset, len, c);
return c;
@@ -801,7 +844,7 @@ UnicodeString::char32At(int32_t offset) const
int32_t
UnicodeString::getChar32Start(int32_t offset) const {
if((uint32_t)offset < (uint32_t)length()) {
- const UChar *array = getArrayStart();
+ const char16_t *array = getArrayStart();
U16_SET_CP_START(array, 0, offset);
return offset;
} else {
@@ -813,7 +856,7 @@ int32_t
UnicodeString::getChar32Limit(int32_t offset) const {
int32_t len = length();
if((uint32_t)offset < (uint32_t)len) {
- const UChar *array = getArrayStart();
+ const char16_t *array = getArrayStart();
U16_SET_CP_LIMIT(array, 0, offset, len);
return offset;
} else {
@@ -824,14 +867,14 @@ UnicodeString::getChar32Limit(int32_t offset) const {
int32_t
UnicodeString::countChar32(int32_t start, int32_t length) const {
pinIndices(start, length);
- // if(isBogus()) then fArray==0 and start==0 - u_countChar32() checks for NULL
+ // if(isBogus()) then fArray==0 and start==0 - u_countChar32() checks for nullptr
return u_countChar32(getArrayStart()+start, length);
}
UBool
UnicodeString::hasMoreChar32Than(int32_t start, int32_t length, int32_t number) const {
pinIndices(start, length);
- // if(isBogus()) then fArray==0 and start==0 - u_strHasMoreChar32Than() checks for NULL
+ // if(isBogus()) then fArray==0 and start==0 - u_strHasMoreChar32Than() checks for nullptr
return u_strHasMoreChar32Than(getArrayStart()+start, length, number);
}
@@ -845,7 +888,7 @@ UnicodeString::moveIndex32(int32_t index, int32_t delta) const {
index=len;
}
- const UChar *array = getArrayStart();
+ const char16_t *array = getArrayStart();
if(delta>0) {
U16_FWD_N(array, index, len, delta);
} else {
@@ -858,14 +901,14 @@ UnicodeString::moveIndex32(int32_t index, int32_t delta) const {
void
UnicodeString::doExtract(int32_t start,
int32_t length,
- UChar *dst,
+ char16_t *dst,
int32_t dstStart) const
{
// pin indices to legal values
pinIndices(start, length);
// do not copy anything if we alias dst itself
- const UChar *array = getArrayStart();
+ const char16_t *array = getArrayStart();
if(array + start != dst + dstStart) {
us_arrayCopy(array, start, dst, dstStart, length);
}
@@ -879,7 +922,7 @@ UnicodeString::extract(Char16Ptr dest, int32_t destCapacity,
if(isBogus() || destCapacity<0 || (destCapacity>0 && dest==0)) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
} else {
- const UChar *array = getArrayStart();
+ const char16_t *array = getArrayStart();
if(len>0 && len<=destCapacity && array!=dest) {
u_memcpy(dest, array, len);
}
@@ -898,7 +941,7 @@ UnicodeString::extract(int32_t start,
enum EInvariant) const
{
// if the arguments are illegal, then do nothing
- if(targetCapacity < 0 || (targetCapacity > 0 && target == NULL)) {
+ if(targetCapacity < 0 || (targetCapacity > 0 && target == nullptr)) {
return 0;
}
@@ -915,12 +958,12 @@ UnicodeString::extract(int32_t start,
UnicodeString
UnicodeString::tempSubString(int32_t start, int32_t len) const {
pinIndices(start, len);
- const UChar *array = getBuffer(); // not getArrayStart() to check kIsBogus & kOpenGetBuffer
- if(array==NULL) {
- array=fUnion.fStackFields.fBuffer; // anything not NULL because that would make an empty string
+ const char16_t *array = getBuffer(); // not getArrayStart() to check kIsBogus & kOpenGetBuffer
+ if(array==nullptr) {
+ array=fUnion.fStackFields.fBuffer; // anything not nullptr because that would make an empty string
len=-2; // bogus result string
}
- return UnicodeString(FALSE, array + start, len);
+ return UnicodeString(false, array + start, len);
}
int32_t
@@ -932,7 +975,7 @@ UnicodeString::toUTF8(int32_t start, int32_t len,
u_strToUTF8WithSub(target, capacity, &length8,
getBuffer() + start, len,
0xFFFD, // Standard substitution character.
- NULL, // Don't care about number of substitutions.
+ nullptr, // Don't care about number of substitutions.
&errorCode);
return length8;
}
@@ -971,7 +1014,7 @@ UnicodeString::toUTF8(ByteSink &sink) const {
if(length16 != 0) {
char stackBuffer[1024];
int32_t capacity = (int32_t)sizeof(stackBuffer);
- UBool utf8IsOwned = FALSE;
+ UBool utf8IsOwned = false;
char *utf8 = sink.GetAppendBuffer(length16 < capacity ? length16 : capacity,
3*length16,
stackBuffer, capacity,
@@ -981,17 +1024,17 @@ UnicodeString::toUTF8(ByteSink &sink) const {
u_strToUTF8WithSub(utf8, capacity, &length8,
getBuffer(), length16,
0xFFFD, // Standard substitution character.
- NULL, // Don't care about number of substitutions.
+ nullptr, // Don't care about number of substitutions.
&errorCode);
if(errorCode == U_BUFFER_OVERFLOW_ERROR) {
utf8 = (char *)uprv_malloc(length8);
- if(utf8 != NULL) {
- utf8IsOwned = TRUE;
+ if(utf8 != nullptr) {
+ utf8IsOwned = true;
errorCode = U_ZERO_ERROR;
u_strToUTF8WithSub(utf8, length8, &length8,
getBuffer(), length16,
0xFFFD, // Standard substitution character.
- NULL, // Don't care about number of substitutions.
+ nullptr, // Don't care about number of substitutions.
&errorCode);
} else {
errorCode = U_MEMORY_ALLOCATION_ERROR;
@@ -1015,14 +1058,14 @@ UnicodeString::toUTF32(UChar32 *utf32, int32_t capacity, UErrorCode &errorCode)
u_strToUTF32WithSub(utf32, capacity, &length32,
getBuffer(), length(),
0xfffd, // Substitution character.
- NULL, // Don't care about number of substitutions.
+ nullptr, // Don't care about number of substitutions.
&errorCode);
}
return length32;
}
int32_t
-UnicodeString::indexOf(const UChar *srcChars,
+UnicodeString::indexOf(const char16_t *srcChars,
int32_t srcStart,
int32_t srcLength,
int32_t start,
@@ -1041,9 +1084,9 @@ UnicodeString::indexOf(const UChar *srcChars,
pinIndices(start, length);
// find the first occurrence of the substring
- const UChar *array = getArrayStart();
- const UChar *match = u_strFindFirst(array + start, length, srcChars + srcStart, srcLength);
- if(match == NULL) {
+ const char16_t *array = getArrayStart();
+ const char16_t *match = u_strFindFirst(array + start, length, srcChars + srcStart, srcLength);
+ if(match == nullptr) {
return -1;
} else {
return (int32_t)(match - array);
@@ -1051,7 +1094,7 @@ UnicodeString::indexOf(const UChar *srcChars,
}
int32_t
-UnicodeString::doIndexOf(UChar c,
+UnicodeString::doIndexOf(char16_t c,
int32_t start,
int32_t length) const
{
@@ -1059,9 +1102,9 @@ UnicodeString::doIndexOf(UChar c,
pinIndices(start, length);
// find the first occurrence of c
- const UChar *array = getArrayStart();
- const UChar *match = u_memchr(array + start, c, length);
- if(match == NULL) {
+ const char16_t *array = getArrayStart();
+ const char16_t *match = u_memchr(array + start, c, length);
+ if(match == nullptr) {
return -1;
} else {
return (int32_t)(match - array);
@@ -1076,9 +1119,9 @@ UnicodeString::doIndexOf(UChar32 c,
pinIndices(start, length);
// find the first occurrence of c
- const UChar *array = getArrayStart();
- const UChar *match = u_memchr32(array + start, c, length);
- if(match == NULL) {
+ const char16_t *array = getArrayStart();
+ const char16_t *match = u_memchr32(array + start, c, length);
+ if(match == nullptr) {
return -1;
} else {
return (int32_t)(match - array);
@@ -1086,7 +1129,7 @@ UnicodeString::doIndexOf(UChar32 c,
}
int32_t
-UnicodeString::lastIndexOf(const UChar *srcChars,
+UnicodeString::lastIndexOf(const char16_t *srcChars,
int32_t srcStart,
int32_t srcLength,
int32_t start,
@@ -1105,9 +1148,9 @@ UnicodeString::lastIndexOf(const UChar *srcChars,
pinIndices(start, length);
// find the last occurrence of the substring
- const UChar *array = getArrayStart();
- const UChar *match = u_strFindLast(array + start, length, srcChars + srcStart, srcLength);
- if(match == NULL) {
+ const char16_t *array = getArrayStart();
+ const char16_t *match = u_strFindLast(array + start, length, srcChars + srcStart, srcLength);
+ if(match == nullptr) {
return -1;
} else {
return (int32_t)(match - array);
@@ -1115,7 +1158,7 @@ UnicodeString::lastIndexOf(const UChar *srcChars,
}
int32_t
-UnicodeString::doLastIndexOf(UChar c,
+UnicodeString::doLastIndexOf(char16_t c,
int32_t start,
int32_t length) const
{
@@ -1127,9 +1170,9 @@ UnicodeString::doLastIndexOf(UChar c,
pinIndices(start, length);
// find the last occurrence of c
- const UChar *array = getArrayStart();
- const UChar *match = u_memrchr(array + start, c, length);
- if(match == NULL) {
+ const char16_t *array = getArrayStart();
+ const char16_t *match = u_memrchr(array + start, c, length);
+ if(match == nullptr) {
return -1;
} else {
return (int32_t)(match - array);
@@ -1144,9 +1187,9 @@ UnicodeString::doLastIndexOf(UChar32 c,
pinIndices(start, length);
// find the last occurrence of c
- const UChar *array = getArrayStart();
- const UChar *match = u_memrchr32(array + start, c, length);
- if(match == NULL) {
+ const char16_t *array = getArrayStart();
+ const char16_t *match = u_memrchr32(array + start, c, length);
+ if(match == nullptr) {
return -1;
} else {
return (int32_t)(match - array);
@@ -1219,12 +1262,12 @@ UnicodeString::getTerminatedBuffer() {
if(!isWritable()) {
return nullptr;
}
- UChar *array = getArrayStart();
+ char16_t *array = getArrayStart();
int32_t len = length();
if(len < getCapacity()) {
if(fUnion.fFields.fLengthAndFlags & kBufferIsReadonly) {
// If len<capacity on a read-only alias, then array[len] is
- // either the original NUL (if constructed with (TRUE, s, length))
+ // either the original NUL (if constructed with (true, s, length))
// or one of the original string contents characters (if later truncated),
// therefore we can assume that array[len] is initialized memory.
if(array[len] == 0) {
@@ -1233,7 +1276,7 @@ UnicodeString::getTerminatedBuffer() {
} else if(((fUnion.fFields.fLengthAndFlags & kRefCounted) == 0 || refCount() == 1)) {
// kRefCounted: Do not write the NUL if the buffer is shared.
// That is mostly safe, except when the length of one copy was modified
- // without copy-on-write, e.g., via truncate(newLength) or remove(void).
+ // without copy-on-write, e.g., via truncate(newLength) or remove().
// Then the NUL would be written into the middle of another copy's string.
// Otherwise, the buffer is fully writable and it is anyway safe to write the NUL.
@@ -1263,8 +1306,8 @@ UnicodeString::setTo(UBool isTerminated,
return *this;
}
- const UChar *text = textPtr;
- if(text == NULL) {
+ const char16_t *text = textPtr;
+ if(text == nullptr) {
// treat as an empty string, do not alias
releaseArray();
setToEmpty();
@@ -1286,13 +1329,13 @@ UnicodeString::setTo(UBool isTerminated,
textLength = u_strlen(text);
}
fUnion.fFields.fLengthAndFlags = kReadonlyAlias;
- setArray((UChar *)text, textLength, isTerminated ? textLength + 1 : textLength);
+ setArray((char16_t *)text, textLength, isTerminated ? textLength + 1 : textLength);
return *this;
}
// setTo() analogous to the writable-aliasing constructor with the same signature
UnicodeString &
-UnicodeString::setTo(UChar *buffer,
+UnicodeString::setTo(char16_t *buffer,
int32_t buffLength,
int32_t buffCapacity) {
if(fUnion.fFields.fLengthAndFlags & kOpenGetBuffer) {
@@ -1300,7 +1343,7 @@ UnicodeString::setTo(UChar *buffer,
return *this;
}
- if(buffer == NULL) {
+ if(buffer == nullptr) {
// treat as an empty string, do not alias
releaseArray();
setToEmpty();
@@ -1312,7 +1355,7 @@ UnicodeString::setTo(UChar *buffer,
return *this;
} else if(buffLength == -1) {
// buffLength = u_strlen(buff); but do not look beyond buffCapacity
- const UChar *p = buffer, *limit = buffer + buffCapacity;
+ const char16_t *p = buffer, *limit = buffer + buffCapacity;
while(p != limit && *p != 0) {
++p;
}
@@ -1336,13 +1379,13 @@ UnicodeString &UnicodeString::setToUTF8(StringPiece utf8) {
} else {
capacity = length + 1; // +1 for the terminating NUL.
}
- UChar *utf16 = getBuffer(capacity);
+ char16_t *utf16 = getBuffer(capacity);
int32_t length16;
UErrorCode errorCode = U_ZERO_ERROR;
u_strFromUTF8WithSub(utf16, getCapacity(), &length16,
utf8.data(), length,
0xfffd, // Substitution character.
- NULL, // Don't care about number of substitutions.
+ nullptr, // Don't care about number of substitutions.
&errorCode);
releaseBuffer(length16);
if(U_FAILURE(errorCode)) {
@@ -1353,7 +1396,7 @@ UnicodeString &UnicodeString::setToUTF8(StringPiece utf8) {
UnicodeString&
UnicodeString::setCharAt(int32_t offset,
- UChar c)
+ char16_t c)
{
int32_t len = length();
if(cloneArrayIfNeeded() && len > 0) {
@@ -1372,9 +1415,9 @@ UnicodeString&
UnicodeString::replace(int32_t start,
int32_t _length,
UChar32 srcChar) {
- UChar buffer[U16_MAX_LENGTH];
+ char16_t buffer[U16_MAX_LENGTH];
int32_t count = 0;
- UBool isError = FALSE;
+ UBool isError = false;
U16_APPEND(buffer, count, U16_MAX_LENGTH, srcChar, isError);
// We test isError so that the compiler does not complain that we don't.
// If isError (srcChar is not a valid code point) then count==0 which means
@@ -1384,9 +1427,9 @@ UnicodeString::replace(int32_t start,
UnicodeString&
UnicodeString::append(UChar32 srcChar) {
- UChar buffer[U16_MAX_LENGTH];
+ char16_t buffer[U16_MAX_LENGTH];
int32_t _length = 0;
- UBool isError = FALSE;
+ UBool isError = false;
U16_APPEND(buffer, _length, U16_MAX_LENGTH, srcChar, isError);
// We test isError so that the compiler does not complain that we don't.
// If isError then _length==0 which turns the doAppend() into a no-op anyway.
@@ -1411,7 +1454,7 @@ UnicodeString::doReplace( int32_t start,
UnicodeString&
UnicodeString::doReplace(int32_t start,
int32_t length,
- const UChar *srcChars,
+ const char16_t *srcChars,
int32_t srcStart,
int32_t srcLength)
{
@@ -1470,7 +1513,7 @@ UnicodeString::doReplace(int32_t start,
newLength += srcLength;
// Check for insertion into ourself
- const UChar *oldArray = getArrayStart();
+ const char16_t *oldArray = getArrayStart();
if (isBufferWritable() &&
oldArray < srcChars + srcLength &&
srcChars < oldArray + oldLength) {
@@ -1483,9 +1526,9 @@ UnicodeString::doReplace(int32_t start,
return doReplace(start, length, copy.getArrayStart(), 0, srcLength);
}
- // cloneArrayIfNeeded(doCopyArray=FALSE) may change fArray but will not copy the current contents;
+ // cloneArrayIfNeeded(doCopyArray=false) may change fArray but will not copy the current contents;
// therefore we need to keep the current fArray
- UChar oldStackBuffer[US_STACKBUF_SIZE];
+ char16_t oldStackBuffer[US_STACKBUF_SIZE];
if((fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) && (newLength > US_STACKBUF_SIZE)) {
// copy the stack buffer contents because it will be overwritten with
// fUnion.fFields values
@@ -1496,14 +1539,14 @@ UnicodeString::doReplace(int32_t start,
// clone our array and allocate a bigger array if needed
int32_t *bufferToDelete = 0;
if(!cloneArrayIfNeeded(newLength, getGrowCapacity(newLength),
- FALSE, &bufferToDelete)
+ false, &bufferToDelete)
) {
return *this;
}
// now do the replace
- UChar *newArray = getArrayStart();
+ char16_t *newArray = getArrayStart();
if(newArray != oldArray) {
// if fArray changed, then we need to copy everything except what will change
us_arrayCopy(oldArray, 0, newArray, 0, start);
@@ -1546,8 +1589,8 @@ UnicodeString::doAppend(const UnicodeString& src, int32_t srcStart, int32_t srcL
}
UnicodeString&
-UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLength) {
- if(!isWritable() || srcLength == 0 || srcChars == NULL) {
+UnicodeString::doAppend(const char16_t *srcChars, int32_t srcStart, int32_t srcLength) {
+ if(!isWritable() || srcLength == 0 || srcChars == nullptr) {
return *this;
}
@@ -1570,7 +1613,7 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
}
// Check for append onto ourself
- const UChar* oldArray = getArrayStart();
+ const char16_t* oldArray = getArrayStart();
if (isBufferWritable() &&
oldArray < srcChars + srcLength &&
srcChars < oldArray + oldLength) {
@@ -1586,9 +1629,9 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
// optimize append() onto a large-enough, owned string
if((newLength <= getCapacity() && isBufferWritable()) ||
cloneArrayIfNeeded(newLength, getGrowCapacity(newLength))) {
- UChar *newArray = getArrayStart();
+ char16_t *newArray = getArrayStart();
// Do not copy characters when
- // UChar *buffer=str.getAppendBuffer(...);
+ // char16_t *buffer=str.getAppendBuffer(...);
// is followed by
// str.append(buffer, length);
// or
@@ -1620,9 +1663,9 @@ UnicodeString::copy(int32_t start, int32_t limit, int32_t dest) {
if (limit <= start) {
return; // Nothing to do; avoid bogus malloc call
}
- UChar* text = (UChar*) uprv_malloc( sizeof(UChar) * (limit - start) );
+ char16_t* text = (char16_t*) uprv_malloc( sizeof(char16_t) * (limit - start) );
// Check to make sure text is not null.
- if (text != NULL) {
+ if (text != nullptr) {
extractBetween(start, limit, text, 0);
insert(dest, text, 0, limit - start);
uprv_free(text);
@@ -1636,14 +1679,14 @@ UnicodeString::copy(int32_t start, int32_t limit, int32_t dest) {
* so we implement this function here.
*/
UBool Replaceable::hasMetaData() const {
- return TRUE;
+ return true;
}
/**
* Replaceable API
*/
UBool UnicodeString::hasMetaData() const {
- return FALSE;
+ return false;
}
UnicodeString&
@@ -1658,10 +1701,10 @@ UnicodeString::doReverse(int32_t start, int32_t length) {
return *this;
}
- UChar *left = getArrayStart() + start;
- UChar *right = left + length - 1; // -1 for inclusive boundary (length>=2)
- UChar swap;
- UBool hasSupplementary = FALSE;
+ char16_t *left = getArrayStart() + start;
+ char16_t *right = left + length - 1; // -1 for inclusive boundary (length>=2)
+ char16_t swap;
+ UBool hasSupplementary = false;
// Before the loop we know left<right because length>=2.
do {
@@ -1675,7 +1718,7 @@ UnicodeString::doReverse(int32_t start, int32_t length) {
/* if there are supplementary code points in the reversed range, then re-swap their surrogates */
if(hasSupplementary) {
- UChar swap2;
+ char16_t swap2;
left = getArrayStart() + start;
right = left + length - 1; // -1 so that we can look at *(left+1) if left<right
@@ -1694,14 +1737,14 @@ UnicodeString::doReverse(int32_t start, int32_t length) {
UBool
UnicodeString::padLeading(int32_t targetLength,
- UChar padChar)
+ char16_t padChar)
{
int32_t oldLength = length();
if(oldLength >= targetLength || !cloneArrayIfNeeded(targetLength)) {
- return FALSE;
+ return false;
} else {
// move contents up by padding width
- UChar *array = getArrayStart();
+ char16_t *array = getArrayStart();
int32_t start = targetLength - oldLength;
us_arrayCopy(array, 0, array, start, oldLength);
@@ -1710,26 +1753,26 @@ UnicodeString::padLeading(int32_t targetLength,
array[start] = padChar;
}
setLength(targetLength);
- return TRUE;
+ return true;
}
}
UBool
UnicodeString::padTrailing(int32_t targetLength,
- UChar padChar)
+ char16_t padChar)
{
int32_t oldLength = length();
if(oldLength >= targetLength || !cloneArrayIfNeeded(targetLength)) {
- return FALSE;
+ return false;
} else {
// fill in padding character
- UChar *array = getArrayStart();
+ char16_t *array = getArrayStart();
int32_t length = targetLength;
while(--length >= oldLength) {
array[length] = padChar;
}
setLength(targetLength);
- return TRUE;
+ return true;
}
}
@@ -1740,7 +1783,7 @@ int32_t
UnicodeString::doHashCode() const
{
/* Delegate hash computation to uhash. This makes UnicodeString
- * hashing consistent with UChar* hashing. */
+ * hashing consistent with char16_t* hashing. */
int32_t hashCode = ustr_hashUCharsN(getArrayStart(), length());
if (hashCode == kInvalidHashCode) {
hashCode = kEmptyHashCode;
@@ -1770,7 +1813,7 @@ UnicodeString::releaseBuffer(int32_t newLength) {
int32_t capacity=getCapacity();
if(newLength==-1) {
// the new length is the string length, capped by fCapacity
- const UChar *array=getArrayStart(), *p=array, *limit=array+capacity;
+ const char16_t *array=getArrayStart(), *p=array, *limit=array+capacity;
while(p<limit && *p!=0) {
++p;
}
@@ -1799,10 +1842,10 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
}
// while a getBuffer(minCapacity) is "open",
- // prevent any modifications of the string by returning FALSE here
+ // prevent any modifications of the string by returning false here
// if the string is bogus, then only an assignment or similar can revive it
if(!isWritable()) {
- return FALSE;
+ return false;
}
/*
@@ -1810,7 +1853,7 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
* the buffer is read-only, or
* the buffer is refCounted (shared), and refCount>1, or
* the buffer is too small.
- * Return FALSE if memory could not be allocated.
+ * Return false if memory could not be allocated.
*/
if(forceClone ||
fUnion.fFields.fLengthAndFlags & kBufferIsReadonly ||
@@ -1825,8 +1868,8 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
}
// save old values
- UChar oldStackBuffer[US_STACKBUF_SIZE];
- UChar *oldArray;
+ char16_t oldStackBuffer[US_STACKBUF_SIZE];
+ char16_t *oldArray;
int32_t oldLength = length();
int16_t flags = fUnion.fFields.fLengthAndFlags;
@@ -1838,11 +1881,11 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
us_arrayCopy(fUnion.fStackFields.fBuffer, 0, oldStackBuffer, 0, oldLength);
oldArray = oldStackBuffer;
} else {
- oldArray = NULL; // no need to copy from the stack buffer to itself
+ oldArray = nullptr; // no need to copy from the stack buffer to itself
}
} else {
oldArray = fUnion.fFields.fArray;
- U_ASSERT(oldArray!=NULL); /* when stack buffer is not used, oldArray must have a non-NULL reference */
+ U_ASSERT(oldArray!=nullptr); /* when stack buffer is not used, oldArray must have a non-nullptr reference */
}
// allocate a new array
@@ -1857,7 +1900,7 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
if(newCapacity < minLength) {
minLength = newCapacity;
}
- if(oldArray != NULL) {
+ if(oldArray != nullptr) {
us_arrayCopy(oldArray, 0, getArrayStart(), 0, minLength);
}
setLength(minLength);
@@ -1889,10 +1932,10 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
}
fUnion.fFields.fLengthAndFlags = flags;
setToBogus();
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
// UnicodeStringAppendable ------------------------------------------------- ***
@@ -1900,21 +1943,21 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
UnicodeStringAppendable::~UnicodeStringAppendable() {}
UBool
-UnicodeStringAppendable::appendCodeUnit(UChar c) {
+UnicodeStringAppendable::appendCodeUnit(char16_t c) {
return str.doAppend(&c, 0, 1).isWritable();
}
UBool
UnicodeStringAppendable::appendCodePoint(UChar32 c) {
- UChar buffer[U16_MAX_LENGTH];
+ char16_t buffer[U16_MAX_LENGTH];
int32_t cLength = 0;
- UBool isError = FALSE;
+ UBool isError = false;
U16_APPEND(buffer, cLength, U16_MAX_LENGTH, c, isError);
return !isError && str.doAppend(buffer, 0, cLength).isWritable();
}
UBool
-UnicodeStringAppendable::appendString(const UChar *s, int32_t length) {
+UnicodeStringAppendable::appendString(const char16_t *s, int32_t length) {
return str.doAppend(s, 0, length).isWritable();
}
@@ -1923,14 +1966,14 @@ UnicodeStringAppendable::reserveAppendCapacity(int32_t appendCapacity) {
return str.cloneArrayIfNeeded(str.length() + appendCapacity);
}
-UChar *
+char16_t *
UnicodeStringAppendable::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;
}
int32_t oldLength = str.length();
if(minCapacity <= (kMaxCapacity - oldLength) &&
@@ -1950,7 +1993,7 @@ U_NAMESPACE_USE
U_CAPI int32_t U_EXPORT2
uhash_hashUnicodeString(const UElement key) {
const UnicodeString *str = (const UnicodeString*) key.pointer;
- return (str == NULL) ? 0 : str->hashCode();
+ return (str == nullptr) ? 0 : str->hashCode();
}
// Moved here from uhash_us.cpp so that using a UVector of UnicodeString*
@@ -1960,10 +2003,10 @@ uhash_compareUnicodeString(const UElement key1, const UElement key2) {
const UnicodeString *str1 = (const UnicodeString*) key1.pointer;
const UnicodeString *str2 = (const UnicodeString*) key2.pointer;
if (str1 == str2) {
- return TRUE;
+ return true;
}
- if (str1 == NULL || str2 == NULL) {
- return FALSE;
+ if (str1 == nullptr || str2 == nullptr) {
+ return false;
}
return *str1 == *str2;
}
@@ -1976,7 +2019,12 @@ The vector deleting destructor is already a part of UObject,
but defining it here makes sure that it is included with this object file.
This makes sure that static library dependencies are kept to a minimum.
*/
-static void uprv_UnicodeStringDummy(void) {
+#if defined(__clang__) || U_GCC_MAJOR_MINOR >= 1100
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+static void uprv_UnicodeStringDummy() {
delete [] (new UnicodeString[2]);
}
+#pragma GCC diagnostic pop
+#endif
#endif
diff --git a/contrib/libs/icu/common/unistr_case.cpp b/contrib/libs/icu/common/unistr_case.cpp
index 2138d60c01c..57f307c203a 100644
--- a/contrib/libs/icu/common/unistr_case.cpp
+++ b/contrib/libs/icu/common/unistr_case.cpp
@@ -41,13 +41,13 @@ U_NAMESPACE_BEGIN
int8_t
UnicodeString::doCaseCompare(int32_t start,
int32_t length,
- const UChar *srcChars,
+ const char16_t *srcChars,
int32_t srcStart,
int32_t srcLength,
uint32_t options) const
{
// compare illegal string values
- // treat const UChar *srcChars==NULL as an empty string
+ // treat const char16_t *srcChars==nullptr as an empty string
if(isBogus()) {
return -1;
}
@@ -55,12 +55,12 @@ UnicodeString::doCaseCompare(int32_t start,
// pin indices to legal values
pinIndices(start, length);
- if(srcChars == NULL) {
+ if(srcChars == nullptr) {
srcStart = srcLength = 0;
}
// get the correct pointer
- const UChar *chars = getArrayStart();
+ const char16_t *chars = getArrayStart();
chars += start;
if(srcStart!=0) {
@@ -98,8 +98,8 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER
return *this;
}
- UChar oldBuffer[2 * US_STACKBUF_SIZE];
- UChar *oldArray;
+ char16_t oldBuffer[2 * US_STACKBUF_SIZE];
+ char16_t *oldArray;
int32_t oldLength = length();
int32_t newLength;
UBool writable = isBufferWritable();
@@ -115,7 +115,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER
if (writable ? oldLength <= UPRV_LENGTHOF(oldBuffer) : oldLength < US_STACKBUF_SIZE) {
// Short string: Copy the contents into a temporary buffer and
// case-map back into the current array, or into the stack buffer.
- UChar *buffer = getArrayStart();
+ char16_t *buffer = getArrayStart();
int32_t capacity;
oldArray = oldBuffer;
u_memcpy(oldBuffer, buffer, oldLength);
@@ -123,7 +123,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER
capacity = getCapacity();
} else {
// Switch from the read-only alias or shared heap buffer to the stack buffer.
- if (!cloneArrayIfNeeded(US_STACKBUF_SIZE, US_STACKBUF_SIZE, /* doCopyArray= */ FALSE)) {
+ if (!cloneArrayIfNeeded(US_STACKBUF_SIZE, US_STACKBUF_SIZE, /* doCopyArray= */ false)) {
return *this;
}
U_ASSERT(fUnion.fFields.fLengthAndFlags & kUsingStackBuffer);
@@ -132,13 +132,13 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER
}
#if !UCONFIG_NO_BREAK_ITERATION
if (iter != nullptr) {
- oldString.setTo(FALSE, oldArray, oldLength);
+ oldString.setTo(false, oldArray, oldLength);
iter->setText(oldString);
}
#endif
newLength = stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR
buffer, capacity,
- oldArray, oldLength, NULL, errorCode);
+ oldArray, oldLength, nullptr, errorCode);
if (U_SUCCESS(errorCode)) {
setLength(newLength);
return *this;
@@ -155,10 +155,10 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER
// and often does not change its length.
oldArray = getArrayStart();
Edits edits;
- UChar replacementChars[200];
+ char16_t replacementChars[200];
#if !UCONFIG_NO_BREAK_ITERATION
if (iter != nullptr) {
- oldString.setTo(FALSE, oldArray, oldLength);
+ oldString.setTo(false, oldArray, oldLength);
iter->setText(oldString);
}
#endif
@@ -194,14 +194,14 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER
// 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;
- if (!cloneArrayIfNeeded(newLength, newLength, FALSE, &bufferToDelete, TRUE)) {
+ if (!cloneArrayIfNeeded(newLength, newLength, false, &bufferToDelete, true)) {
return *this;
}
errorCode = U_ZERO_ERROR;
// No need to iter->setText() again: The case mapper restarts via iter->first().
newLength = stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR
getArrayStart(), getCapacity(),
- oldArray, oldLength, NULL, errorCode);
+ oldArray, oldLength, nullptr, errorCode);
if (bufferToDelete) {
uprv_free(bufferToDelete);
}
@@ -225,7 +225,7 @@ U_CAPI int32_t U_EXPORT2
uhash_hashCaselessUnicodeString(const UElement key) {
U_NAMESPACE_USE
const UnicodeString *str = (const UnicodeString*) key.pointer;
- if (str == NULL) {
+ if (str == nullptr) {
return 0;
}
// Inefficient; a better way would be to have a hash function in
@@ -241,10 +241,10 @@ uhash_compareCaselessUnicodeString(const UElement key1, const UElement key2) {
const UnicodeString *str1 = (const UnicodeString*) key1.pointer;
const UnicodeString *str2 = (const UnicodeString*) key2.pointer;
if (str1 == str2) {
- return TRUE;
+ return true;
}
- if (str1 == NULL || str2 == NULL) {
- return FALSE;
+ if (str1 == nullptr || str2 == nullptr) {
+ return false;
}
return str1->caseCompare(*str2, U_FOLD_CASE_DEFAULT) == 0;
}
diff --git a/contrib/libs/icu/common/unistr_case_locale.cpp b/contrib/libs/icu/common/unistr_case_locale.cpp
index f0f3048d06f..8b6a9ca0ca5 100644
--- a/contrib/libs/icu/common/unistr_case_locale.cpp
+++ b/contrib/libs/icu/common/unistr_case_locale.cpp
@@ -31,7 +31,7 @@ U_NAMESPACE_BEGIN
UnicodeString &
UnicodeString::toLower() {
- return caseMap(ustrcase_getCaseLocale(NULL), 0,
+ return caseMap(ustrcase_getCaseLocale(nullptr), 0,
UCASEMAP_BREAK_ITERATOR_NULL ustrcase_internalToLower);
}
@@ -43,7 +43,7 @@ UnicodeString::toLower(const Locale &locale) {
UnicodeString &
UnicodeString::toUpper() {
- return caseMap(ustrcase_getCaseLocale(NULL), 0,
+ return caseMap(ustrcase_getCaseLocale(nullptr), 0,
UCASEMAP_BREAK_ITERATOR_NULL ustrcase_internalToUpper);
}
diff --git a/contrib/libs/icu/common/unistr_cnv.cpp b/contrib/libs/icu/common/unistr_cnv.cpp
index 64d3c16801c..2d649b2d511 100644
--- a/contrib/libs/icu/common/unistr_cnv.cpp
+++ b/contrib/libs/icu/common/unistr_cnv.cpp
@@ -82,7 +82,7 @@ UnicodeString::UnicodeString(const char *src, int32_t srcLength,
fUnion.fFields.fLengthAndFlags = kShortString;
if(U_SUCCESS(errorCode)) {
// check arguments
- if(src==NULL) {
+ if(src==nullptr) {
// treat as an empty string, do nothing more
} else if(srcLength<-1) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
@@ -225,13 +225,13 @@ UnicodeString::extract(char *dest, int32_t destCapacity,
// get the converter
UBool isDefaultConverter;
if(cnv==0) {
- isDefaultConverter=TRUE;
+ isDefaultConverter=true;
cnv=u_getDefaultConverter(&errorCode);
if(U_FAILURE(errorCode)) {
return 0;
}
} else {
- isDefaultConverter=FALSE;
+ isDefaultConverter=false;
ucnv_resetFromUnicode(cnv);
}
@@ -259,7 +259,7 @@ UnicodeString::doExtract(int32_t start, int32_t length,
return 0;
}
- const UChar *src=getArrayStart()+start, *srcLimit=src+length;
+ const char16_t *src=getArrayStart()+start, *srcLimit=src+length;
char *originalDest=dest;
const char *destLimit;
@@ -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, 0, 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, 0, true, &errorCode);
length+=(int32_t)(dest-buffer);
} while(errorCode==U_BUFFER_OVERFLOW_ERROR);
}
@@ -322,7 +322,7 @@ UnicodeString::doCodepageCreate(const char *codepageData,
converter = u_getDefaultConverter(&status);
} else if(*codepage == 0) {
// use the "invariant characters" conversion
- if(cloneArrayIfNeeded(dataLength, dataLength, FALSE)) {
+ if(cloneArrayIfNeeded(dataLength, dataLength, false)) {
u_charsToUChars(codepageData, getArrayStart(), dataLength);
setLength(dataLength);
} else {
@@ -366,7 +366,7 @@ UnicodeString::doCodepageCreate(const char *codepageData,
// set up the conversion parameters
const char *mySource = codepageData;
const char *mySourceEnd = mySource + dataLength;
- UChar *array, *myTarget;
+ char16_t *array, *myTarget;
// estimate the size needed:
int32_t arraySize;
@@ -374,12 +374,12 @@ UnicodeString::doCodepageCreate(const char *codepageData,
// try to use the stack buffer
arraySize = US_STACKBUF_SIZE;
} else {
- // 1.25 UChar's per source byte should cover most cases
+ // 1.25 char16_t's per source byte should cover most cases
arraySize = dataLength + (dataLength >> 2);
}
// we do not care about the current contents
- UBool doCopyArray = FALSE;
+ UBool doCopyArray = false;
for(;;) {
if(!cloneArrayIfNeeded(arraySize, arraySize, doCopyArray)) {
setToBogus();
@@ -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, 0, true, &status);
// update the conversion parameters
setLength((int32_t)(myTarget - array));
@@ -401,10 +401,10 @@ UnicodeString::doCodepageCreate(const char *codepageData,
status = U_ZERO_ERROR;
// keep the previous conversion results
- doCopyArray = TRUE;
+ doCopyArray = true;
// estimate the new size needed, larger than before
- // try 2 UChar's per remaining source byte
+ // try 2 char16_t's per remaining source byte
arraySize = (int32_t)(length() + 2 * (mySourceEnd - mySource));
} else {
break;
diff --git a/contrib/libs/icu/common/unistr_props.cpp b/contrib/libs/icu/common/unistr_props.cpp
index 40064757902..3d05233bb9a 100644
--- a/contrib/libs/icu/common/unistr_props.cpp
+++ b/contrib/libs/icu/common/unistr_props.cpp
@@ -32,7 +32,7 @@ UnicodeString::trim()
return *this;
}
- UChar *array = getArrayStart();
+ char16_t *array = getArrayStart();
UChar32 c;
int32_t oldLength = this->length();
int32_t i = oldLength, length;
diff --git a/contrib/libs/icu/common/unorm.cpp b/contrib/libs/icu/common/unorm.cpp
index 2d9f46052ff..f2ef7fa6648 100644
--- a/contrib/libs/icu/common/unorm.cpp
+++ b/contrib/libs/icu/common/unorm.cpp
@@ -44,7 +44,7 @@ U_NAMESPACE_USE
/* quick check functions ---------------------------------------------------- */
U_CAPI UNormalizationCheckResult U_EXPORT2
-unorm_quickCheck(const UChar *src,
+unorm_quickCheck(const char16_t *src,
int32_t srcLength,
UNormalizationMode mode,
UErrorCode *pErrorCode) {
@@ -53,7 +53,7 @@ unorm_quickCheck(const UChar *src,
}
U_CAPI UNormalizationCheckResult U_EXPORT2
-unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
+unorm_quickCheckWithOptions(const char16_t *src, int32_t srcLength,
UNormalizationMode mode, int32_t options,
UErrorCode *pErrorCode) {
const Normalizer2 *n2=Normalizer2Factory::getInstance(mode, *pErrorCode);
@@ -68,7 +68,7 @@ unorm_quickCheckWithOptions(const UChar *src, int32_t srcLength,
}
U_CAPI UBool U_EXPORT2
-unorm_isNormalized(const UChar *src, int32_t srcLength,
+unorm_isNormalized(const char16_t *src, int32_t srcLength,
UNormalizationMode mode,
UErrorCode *pErrorCode) {
const Normalizer2 *n2=Normalizer2Factory::getInstance(mode, *pErrorCode);
@@ -76,7 +76,7 @@ unorm_isNormalized(const UChar *src, int32_t srcLength,
}
U_CAPI UBool U_EXPORT2
-unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
+unorm_isNormalizedWithOptions(const char16_t *src, int32_t srcLength,
UNormalizationMode mode, int32_t options,
UErrorCode *pErrorCode) {
const Normalizer2 *n2=Normalizer2Factory::getInstance(mode, *pErrorCode);
@@ -94,9 +94,9 @@ unorm_isNormalizedWithOptions(const UChar *src, int32_t srcLength,
/** Public API for normalizing. */
U_CAPI int32_t U_EXPORT2
-unorm_normalize(const UChar *src, int32_t srcLength,
+unorm_normalize(const char16_t *src, int32_t srcLength,
UNormalizationMode mode, int32_t options,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
const Normalizer2 *n2=Normalizer2Factory::getInstance(mode, *pErrorCode);
if(options&UNORM_UNICODE_3_2) {
@@ -115,20 +115,20 @@ unorm_normalize(const UChar *src, int32_t srcLength,
static int32_t
_iterate(UCharIterator *src, UBool forward,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
const Normalizer2 *n2,
UBool doNormalize, UBool *pNeededToNormalize,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0) || src==NULL) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0) || src==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- if(pNeededToNormalize!=NULL) {
- *pNeededToNormalize=FALSE;
+ if(pNeededToNormalize!=nullptr) {
+ *pNeededToNormalize=false;
}
if(!(forward ? src->hasNext(src) : src->hasPrevious(src))) {
return u_terminateUChars(dest, destCapacity, 0, pErrorCode);
@@ -163,7 +163,7 @@ _iterate(UCharIterator *src, UBool forward,
UnicodeString destString(dest, 0, destCapacity);
if(buffer.length()>0 && doNormalize) {
n2->normalize(buffer, destString, *pErrorCode).extract(dest, destCapacity, *pErrorCode);
- if(pNeededToNormalize!=NULL && U_SUCCESS(*pErrorCode)) {
+ if(pNeededToNormalize!=nullptr && U_SUCCESS(*pErrorCode)) {
*pNeededToNormalize= destString!=buffer;
}
return destString.length();
@@ -175,7 +175,7 @@ _iterate(UCharIterator *src, UBool forward,
static int32_t
unorm_iterate(UCharIterator *src, UBool forward,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UNormalizationMode mode, int32_t options,
UBool doNormalize, UBool *pNeededToNormalize,
UErrorCode *pErrorCode) {
@@ -195,11 +195,11 @@ unorm_iterate(UCharIterator *src, UBool forward,
U_CAPI int32_t U_EXPORT2
unorm_previous(UCharIterator *src,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UNormalizationMode mode, int32_t options,
UBool doNormalize, UBool *pNeededToNormalize,
UErrorCode *pErrorCode) {
- return unorm_iterate(src, FALSE,
+ return unorm_iterate(src, false,
dest, destCapacity,
mode, options,
doNormalize, pNeededToNormalize,
@@ -208,11 +208,11 @@ unorm_previous(UCharIterator *src,
U_CAPI int32_t U_EXPORT2
unorm_next(UCharIterator *src,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UNormalizationMode mode, int32_t options,
UBool doNormalize, UBool *pNeededToNormalize,
UErrorCode *pErrorCode) {
- return unorm_iterate(src, TRUE,
+ return unorm_iterate(src, true,
dest, destCapacity,
mode, options,
doNormalize, pNeededToNormalize,
@@ -222,22 +222,22 @@ unorm_next(UCharIterator *src,
/* Concatenation of normalized strings -------------------------------------- */
static int32_t
-_concatenate(const UChar *left, int32_t leftLength,
- const UChar *right, int32_t rightLength,
- UChar *dest, int32_t destCapacity,
+_concatenate(const char16_t *left, int32_t leftLength,
+ const char16_t *right, int32_t rightLength,
+ char16_t *dest, int32_t destCapacity,
const Normalizer2 *n2,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0) ||
- left==NULL || leftLength<-1 || right==NULL || rightLength<-1) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0) ||
+ left==nullptr || leftLength<-1 || right==nullptr || rightLength<-1) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
/* check for overlapping right and destination */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((right>=dest && right<(dest+destCapacity)) ||
(rightLength>0 && dest>=right && dest<(right+rightLength)))
) {
@@ -258,9 +258,9 @@ _concatenate(const UChar *left, int32_t leftLength,
}
U_CAPI int32_t U_EXPORT2
-unorm_concatenate(const UChar *left, int32_t leftLength,
- const UChar *right, int32_t rightLength,
- UChar *dest, int32_t destCapacity,
+unorm_concatenate(const char16_t *left, int32_t leftLength,
+ const char16_t *right, int32_t rightLength,
+ char16_t *dest, int32_t destCapacity,
UNormalizationMode mode, int32_t options,
UErrorCode *pErrorCode) {
const Normalizer2 *n2=Normalizer2Factory::getInstance(mode, *pErrorCode);
diff --git a/contrib/libs/icu/common/unormcmp.cpp b/contrib/libs/icu/common/unormcmp.cpp
index 689b0b53b2d..e11e716c8db 100644
--- a/contrib/libs/icu/common/unormcmp.cpp
+++ b/contrib/libs/icu/common/unormcmp.cpp
@@ -128,7 +128,7 @@ U_NAMESPACE_USE
/* stack element for previous-level source/decomposition pointers */
struct CmpEquivLevel {
- const UChar *start, *s, *limit;
+ const char16_t *start, *s, *limit;
};
typedef struct CmpEquivLevel CmpEquivLevel;
@@ -140,27 +140,27 @@ typedef struct CmpEquivLevel CmpEquivLevel;
/* internal function */
static int32_t
-unorm_cmpEquivFold(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+unorm_cmpEquivFold(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
uint32_t options,
UErrorCode *pErrorCode) {
const Normalizer2Impl *nfcImpl;
/* current-level start/limit - s1/s2 as current */
- const UChar *start1, *start2, *limit1, *limit2;
+ const char16_t *start1, *start2, *limit1, *limit2;
/* decomposition and case folding variables */
- const UChar *p;
+ const char16_t *p;
int32_t length;
/* stacks of previous-level start/current/limit */
CmpEquivLevel stack1[2], stack2[2];
/* buffers for algorithmic decompositions */
- UChar decomp1[4], decomp2[4];
+ char16_t decomp1[4], decomp2[4];
/* case folding buffers, only use current-level start/limit */
- UChar fold1[UCASE_MAX_STRING_LENGTH+1], fold2[UCASE_MAX_STRING_LENGTH+1];
+ char16_t fold1[UCASE_MAX_STRING_LENGTH+1], fold2[UCASE_MAX_STRING_LENGTH+1];
/* track which is the current level per string */
int32_t level1, level2;
@@ -180,7 +180,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
if((options&_COMPARE_EQUIV)!=0) {
nfcImpl=Normalizer2Factory::getNFCImpl(*pErrorCode);
} else {
- nfcImpl=NULL;
+ nfcImpl=nullptr;
}
if(U_FAILURE(*pErrorCode)) {
return 0;
@@ -189,14 +189,14 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
/* initialize */
start1=s1;
if(length1==-1) {
- limit1=NULL;
+ limit1=nullptr;
} else {
limit1=s1+length1;
}
start2=s2;
if(length2==-1) {
- limit2=NULL;
+ limit2=nullptr;
} else {
limit2=s2+length2;
}
@@ -214,7 +214,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
if(c1<0) {
/* get next code unit from string 1, post-increment */
for(;;) {
- if(s1==limit1 || ((c1=*s1)==0 && (limit1==NULL || (options&_STRNCMP_STYLE)))) {
+ if(s1==limit1 || ((c1=*s1)==0 && (limit1==nullptr || (options&_STRNCMP_STYLE)))) {
if(level1==0) {
c1=-1;
break;
@@ -228,7 +228,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
do {
--level1;
start1=stack1[level1].start; /*Not uninitialized*/
- } while(start1==NULL);
+ } while(start1==nullptr);
s1=stack1[level1].s; /*Not uninitialized*/
limit1=stack1[level1].limit; /*Not uninitialized*/
}
@@ -237,7 +237,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
if(c2<0) {
/* get next code unit from string 2, post-increment */
for(;;) {
- if(s2==limit2 || ((c2=*s2)==0 && (limit2==NULL || (options&_STRNCMP_STYLE)))) {
+ if(s2==limit2 || ((c2=*s2)==0 && (limit2==nullptr || (options&_STRNCMP_STYLE)))) {
if(level2==0) {
c2=-1;
break;
@@ -251,7 +251,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
do {
--level2;
start2=stack2[level2].start; /*Not uninitialized*/
- } while(start2==NULL);
+ } while(start2==nullptr);
s2=stack2[level2].s; /*Not uninitialized*/
limit2=stack2[level2].limit; /*Not uninitialized*/
}
@@ -277,7 +277,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
/* get complete code points for c1, c2 for lookups if either is a surrogate */
cp1=c1;
if(U_IS_SURROGATE(c1)) {
- UChar c;
+ char16_t c;
if(U_IS_SURROGATE_LEAD(c1)) {
if(s1!=limit1 && U16_IS_TRAIL(c=*s1)) {
@@ -293,7 +293,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
cp2=c2;
if(U_IS_SURROGATE(c2)) {
- UChar c;
+ char16_t c;
if(U_IS_SURROGATE_LEAD(c2)) {
if(s2!=limit2 && U16_IS_TRAIL(c=*s2)) {
@@ -431,7 +431,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
/* set empty intermediate level if skipped */
if(level1<2) {
- stack1[level1++].start=NULL;
+ stack1[level1++].start=nullptr;
}
/* set next level pointers to decomposition */
@@ -472,7 +472,7 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
/* set empty intermediate level if skipped */
if(level2<2) {
- stack2[level2++].start=NULL;
+ stack2[level2++].start=nullptr;
}
/* set next level pointers to decomposition */
@@ -529,14 +529,14 @@ unorm_cmpEquivFold(const UChar *s1, int32_t length1,
}
static
-UBool _normalize(const Normalizer2 *n2, const UChar *s, int32_t length,
+UBool _normalize(const Normalizer2 *n2, const char16_t *s, int32_t length,
UnicodeString &normalized, UErrorCode *pErrorCode) {
UnicodeString str(length<0, s, length);
// check if s fulfill the conditions
int32_t spanQCYes=n2->spanQuickCheckYes(str, *pErrorCode);
if (U_FAILURE(*pErrorCode)) {
- return FALSE;
+ return false;
}
/*
* ICU 2.4 had a further optimization:
@@ -548,18 +548,18 @@ UBool _normalize(const Normalizer2 *n2, const UChar *s, int32_t length,
*/
if(spanQCYes<str.length()) {
UnicodeString unnormalized=str.tempSubString(spanQCYes);
- normalized.setTo(FALSE, str.getBuffer(), spanQCYes);
+ normalized.setTo(false, str.getBuffer(), spanQCYes);
n2->normalizeSecondAndAppend(normalized, unnormalized, *pErrorCode);
if (U_SUCCESS(*pErrorCode)) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
U_CAPI int32_t U_EXPORT2
-unorm_compare(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+unorm_compare(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
uint32_t options,
UErrorCode *pErrorCode) {
/* argument checking */
diff --git a/contrib/libs/icu/common/unormimp.h b/contrib/libs/icu/common/unormimp.h
index d2604adb4a9..f107eac67f1 100644
--- a/contrib/libs/icu/common/unormimp.h
+++ b/contrib/libs/icu/common/unormimp.h
@@ -388,7 +388,7 @@ enum {
*
* Strings are either stored as a single code unit or as the length
* followed by that many units.
- * const UChar *s=extraData+(index from auxTrie data bits 9..0);
+ * const char16_t *s=extraData+(index from auxTrie data bits 9..0);
* int32_t length;
* if(*s<0xff00) {
* // s points to the single-unit string
diff --git a/contrib/libs/icu/common/uobject.cpp b/contrib/libs/icu/common/uobject.cpp
index e222b2ce9b9..c9e435ceca1 100644
--- a/contrib/libs/icu/common/uobject.cpp
+++ b/contrib/libs/icu/common/uobject.cpp
@@ -58,32 +58,32 @@ U_NAMESPACE_BEGIN
* and replace with uprv_malloc/uprv_free.
*/
-void * U_EXPORT2 UMemory::operator new(size_t size) U_NOEXCEPT {
+void * U_EXPORT2 UMemory::operator new(size_t size) noexcept {
return uprv_malloc(size);
}
-void U_EXPORT2 UMemory::operator delete(void *p) U_NOEXCEPT {
- if(p!=NULL) {
+void U_EXPORT2 UMemory::operator delete(void *p) noexcept {
+ if(p!=nullptr) {
uprv_free(p);
}
}
-void * U_EXPORT2 UMemory::operator new[](size_t size) U_NOEXCEPT {
+void * U_EXPORT2 UMemory::operator new[](size_t size) noexcept {
return uprv_malloc(size);
}
-void U_EXPORT2 UMemory::operator delete[](void *p) U_NOEXCEPT {
- if(p!=NULL) {
+void U_EXPORT2 UMemory::operator delete[](void *p) noexcept {
+ if(p!=nullptr) {
uprv_free(p);
}
}
#if U_HAVE_DEBUG_LOCATION_NEW
-void * U_EXPORT2 UMemory::operator new(size_t size, const char* /*file*/, int /*line*/) U_NOEXCEPT {
+void * U_EXPORT2 UMemory::operator new(size_t size, const char* /*file*/, int /*line*/) noexcept {
return UMemory::operator new(size);
}
-void U_EXPORT2 UMemory::operator delete(void* p, const char* /*file*/, int /*line*/) U_NOEXCEPT {
+void U_EXPORT2 UMemory::operator delete(void* p, const char* /*file*/, int /*line*/) noexcept {
UMemory::operator delete(p);
}
#endif /* U_HAVE_DEBUG_LOCATION_NEW */
@@ -93,7 +93,7 @@ void U_EXPORT2 UMemory::operator delete(void* p, const char* /*file*/, int /*lin
UObject::~UObject() {}
-UClassID UObject::getDynamicClassID() const { return NULL; }
+UClassID UObject::getDynamicClassID() const { return nullptr; }
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/uposixdefs.h b/contrib/libs/icu/common/uposixdefs.h
index 23c3f6d4667..826c9bb47a2 100644
--- a/contrib/libs/icu/common/uposixdefs.h
+++ b/contrib/libs/icu/common/uposixdefs.h
@@ -48,7 +48,7 @@
#endif
/*
- * Make sure things like readlink and such functions work.
+ * Make sure things like realpath and such functions work.
* Poorly upgraded Solaris machines can't have this defined.
* Cleanly installed Solaris can use this #define.
*
diff --git a/contrib/libs/icu/common/uprops.cpp b/contrib/libs/icu/common/uprops.cpp
index 5186a0c75ca..28540186c66 100644
--- a/contrib/libs/icu/common/uprops.cpp
+++ b/contrib/libs/icu/common/uprops.cpp
@@ -49,7 +49,7 @@ U_NAMESPACE_USE
namespace {
-icu::UInitOnce gLayoutInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gLayoutInitOnce {};
UDataMemory *gLayoutMemory = nullptr;
UCPTrie *gInpcTrie = nullptr; // Indic_Positional_Category
@@ -76,7 +76,7 @@ UBool U_CALLCONV uprops_cleanup() {
gMaxVoValue = 0;
gLayoutInitOnce.reset();
- return TRUE;
+ return true;
}
UBool U_CALLCONV
@@ -141,7 +141,7 @@ void U_CALLCONV ulayout_load(UErrorCode &errorCode) {
}
UBool ulayout_ensureData(UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
umtx_initOnce(gLayoutInitOnce, &ulayout_load, errorCode);
return U_SUCCESS(errorCode);
}
@@ -188,7 +188,7 @@ static UBool isJoinControl(const BinaryProperty &/*prop*/, UChar32 c, UProperty
#if UCONFIG_NO_NORMALIZATION
static UBool hasFullCompositionExclusion(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool hasFullCompositionExclusion(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
@@ -202,7 +202,7 @@ static UBool hasFullCompositionExclusion(const BinaryProperty &/*prop*/, UChar32
// UCHAR_NF*_INERT properties
#if UCONFIG_NO_NORMALIZATION
static UBool isNormInert(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty which) {
@@ -215,7 +215,7 @@ static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty wh
#if UCONFIG_NO_NORMALIZATION
static UBool changesWhenCasefolded(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
@@ -223,7 +223,7 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP
UErrorCode errorCode=U_ZERO_ERROR;
const Normalizer2 *nfcNorm2=Normalizer2::getNFCInstance(errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
if(nfcNorm2->getDecomposition(c, nfd)) {
/* c has a decomposition */
@@ -237,36 +237,36 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP
c=U_SENTINEL;
}
} else if(c<0) {
- return FALSE; /* protect against bad input */
+ return false; /* protect against bad input */
}
if(c>=0) {
/* single code point */
- const UChar *resultString;
+ const char16_t *resultString;
return (UBool)(ucase_toFullFolding(c, &resultString, U_FOLD_CASE_DEFAULT)>=0);
} else {
/* guess some large but stack-friendly capacity */
- UChar dest[2*UCASE_MAX_STRING_LENGTH];
+ char16_t dest[2*UCASE_MAX_STRING_LENGTH];
int32_t destLength;
destLength=u_strFoldCase(dest, UPRV_LENGTHOF(dest),
nfd.getBuffer(), nfd.length(),
U_FOLD_CASE_DEFAULT, &errorCode);
return (UBool)(U_SUCCESS(errorCode) &&
0!=u_strCompare(nfd.getBuffer(), nfd.length(),
- dest, destLength, FALSE));
+ dest, destLength, false));
}
}
#endif
#if UCONFIG_NO_NORMALIZATION
static UBool changesWhenNFKC_Casefolded(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
UErrorCode errorCode=U_ZERO_ERROR;
const Normalizer2Impl *kcf=Normalizer2Factory::getNFKC_CFImpl(errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
UnicodeString src(c);
UnicodeString dest;
@@ -276,9 +276,9 @@ static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32
ReorderingBuffer buffer(*kcf, dest);
// Small destCapacity for NFKC_CF(c).
if(buffer.init(5, errorCode)) {
- const UChar *srcArray=src.getBuffer();
- kcf->compose(srcArray, srcArray+src.length(), FALSE,
- TRUE, buffer, errorCode);
+ const char16_t *srcArray=src.getBuffer();
+ kcf->compose(srcArray, srcArray+src.length(), false,
+ true, buffer, errorCode);
}
}
return U_SUCCESS(errorCode) && dest!=src;
@@ -287,7 +287,7 @@ static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32
#if UCONFIG_NO_NORMALIZATION
static UBool isCanonSegmentStarter(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool isCanonSegmentStarter(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
@@ -416,15 +416,28 @@ u_hasBinaryProperty(UChar32 c, UProperty which) {
/* c is range-checked in the functions that are called from here */
if(which<UCHAR_BINARY_START || UCHAR_BINARY_LIMIT<=which) {
/* not a known binary property */
- return FALSE;
+ return false;
} else {
const BinaryProperty &prop=binProps[which];
return prop.contains(prop, c, which);
}
}
+/* Checks if the Unicode character can start a Unicode identifier.*/
U_CAPI UBool U_EXPORT2
-u_stringHasBinaryProperty(const UChar *s, int32_t length, UProperty which) {
+u_isIDStart(UChar32 c) {
+ return u_hasBinaryProperty(c, UCHAR_ID_START);
+}
+
+/* Checks if the Unicode character can be a Unicode identifier part other than starting the
+ identifier.*/
+U_CAPI UBool U_EXPORT2
+u_isIDPart(UChar32 c) {
+ return u_hasBinaryProperty(c, UCHAR_ID_CONTINUE);
+}
+
+U_CAPI UBool U_EXPORT2
+u_stringHasBinaryProperty(const char16_t *s, int32_t length, UProperty which) {
if (s == nullptr && length != 0) { return false; }
if (length == 1) {
return u_hasBinaryProperty(s[0], which); // single code point
@@ -670,7 +683,7 @@ U_CAPI int32_t U_EXPORT2
u_getIntPropertyMaxValue(UProperty which) {
if(which<UCHAR_INT_START) {
if(UCHAR_BINARY_START<=which && which<UCHAR_BINARY_LIMIT) {
- return 1; // maximum TRUE for all binary properties
+ return 1; // maximum true for all binary properties
}
} else if(which<UCHAR_INT_LIMIT) {
const IntProperty &prop=intProps[which-UCHAR_INT_START];
@@ -780,11 +793,11 @@ uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *p
#if !UCONFIG_NO_NORMALIZATION
U_CAPI int32_t U_EXPORT2
-u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+u_getFC_NFKC_Closure(UChar32 c, char16_t *dest, int32_t destCapacity, UErrorCode *pErrorCode) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0)) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -800,7 +813,7 @@ u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *p
}
// first: b = NFKC(Fold(a))
UnicodeString folded1String;
- const UChar *folded1;
+ const char16_t *folded1;
int32_t folded1Length=ucase_toFullFolding(c, &folded1, U_FOLD_CASE_DEFAULT);
if(folded1Length<0) {
const Normalizer2Impl *nfkcImpl=Normalizer2Factory::getImpl(nfkc);
@@ -812,7 +825,7 @@ u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *p
if(folded1Length>UCASE_MAX_STRING_LENGTH) {
folded1String.setTo(folded1Length);
} else {
- folded1String.setTo(FALSE, folded1, folded1Length);
+ folded1String.setTo(false, folded1, folded1Length);
}
}
UnicodeString kc1=nfkc->normalize(folded1String, *pErrorCode);
diff --git a/contrib/libs/icu/common/uprops.h b/contrib/libs/icu/common/uprops.h
index 2004394db64..1e06d035192 100644
--- a/contrib/libs/icu/common/uprops.h
+++ b/contrib/libs/icu/common/uprops.h
@@ -441,6 +441,7 @@ class CharacterProperties {
public:
CharacterProperties() = delete;
static const UnicodeSet *getInclusionsForProperty(UProperty prop, UErrorCode &errorCode);
+ static const UnicodeSet *getBinaryPropertySet(UProperty property, UErrorCode &errorCode);
};
// implemented in uniset_props.cpp
diff --git a/contrib/libs/icu/common/ures_cnv.cpp b/contrib/libs/icu/common/ures_cnv.cpp
index 1aa58e753ce..0a2b1e912c6 100644
--- a/contrib/libs/icu/common/ures_cnv.cpp
+++ b/contrib/libs/icu/common/ures_cnv.cpp
@@ -27,7 +27,7 @@
#include "ustr_cnv.h"
U_CAPI UResourceBundle * U_EXPORT2
-ures_openU(const UChar *myPath,
+ures_openU(const char16_t *myPath,
const char *localeID,
UErrorCode *status)
{
@@ -35,17 +35,17 @@ ures_openU(const UChar *myPath,
int32_t length;
char *path = pathBuffer;
- if(status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if(status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(myPath==NULL) {
- path = NULL;
+ if(myPath==nullptr) {
+ path = nullptr;
}
else {
length=u_strlen(myPath);
if(length>=(int32_t)sizeof(pathBuffer)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
} else if(uprv_isInvariantUString(myPath, length)) {
/*
* the invariant converter is sufficient for package and tree names
@@ -59,17 +59,17 @@ ures_openU(const UChar *myPath,
length=ucnv_fromUChars(cnv, path, (int32_t)sizeof(pathBuffer), myPath, length, status);
u_releaseDefaultConverter(cnv);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if(length>=(int32_t)sizeof(pathBuffer)) {
/* not NUL-terminated - path too long */
*status=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
#else
/* the default converter is not available */
*status=U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
#endif
}
}
diff --git a/contrib/libs/icu/common/uresbund.cpp b/contrib/libs/icu/common/uresbund.cpp
index a9c6459418c..d02bba8921e 100644
--- a/contrib/libs/icu/common/uresbund.cpp
+++ b/contrib/libs/icu/common/uresbund.cpp
@@ -48,8 +48,8 @@ Static cache for already opened resource bundles - mostly for keeping fallback i
TODO: This cache should probably be removed when the deprecated code is
completely removed.
*/
-static UHashtable *cache = NULL;
-static icu::UInitOnce gCacheInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable *cache = nullptr;
+static icu::UInitOnce gCacheInitOnce {};
static UMutex resbMutex;
@@ -83,12 +83,209 @@ static UBool U_CALLCONV compareEntries(const UHashTok p1, const UHashTok p2) {
static UBool chopLocale(char *name) {
char *i = uprv_strrchr(name, '_');
- if(i != NULL) {
+ if(i != nullptr) {
*i = '\0';
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
+}
+
+static UBool hasVariant(const char* localeID) {
+ UErrorCode err = U_ZERO_ERROR;
+ int32_t variantLength = uloc_getVariant(localeID, nullptr, 0, &err);
+ return variantLength != 0;
+}
+
+// This file contains the tables for doing locale fallback, which are generated
+// by the CLDR-to-ICU process directly from the CLDR data. This file should only
+// ever be included from here.
+#define INCLUDED_FROM_URESBUND_CPP
+#include "localefallback_data.h"
+
+static const char* performFallbackLookup(const char* key,
+ const char* keyStrs,
+ const char* valueStrs,
+ const int32_t* lookupTable,
+ int32_t lookupTableLength) {
+ const int32_t* bottom = lookupTable;
+ const int32_t* top = lookupTable + lookupTableLength;
+
+ while (bottom < top) {
+ // Effectively, divide by 2 and round down to an even index
+ const int32_t* middle = bottom + (((top - bottom) / 4) * 2);
+ const char* entryKey = &(keyStrs[*middle]);
+ int32_t strcmpResult = uprv_strcmp(key, entryKey);
+ if (strcmpResult == 0) {
+ return &(valueStrs[middle[1]]);
+ } else if (strcmpResult < 0) {
+ top = middle;
+ } else {
+ bottom = middle + 2;
+ }
+ }
+ return nullptr;
+}
+
+static CharString getDefaultScript(const CharString& language, const CharString& region) {
+ const char* defaultScript = nullptr;
+ UErrorCode err = U_ZERO_ERROR;
+
+ // the default script will be "Latn" if we don't find the locale ID in the tables
+ CharString result("Latn", err);
+
+ // if we were passed both language and region, make them into a locale ID and look that up in the default
+ // script table
+ if (!region.isEmpty()) {
+ CharString localeID;
+ localeID.append(language, err).append("_", err).append(region, err);
+ if (U_FAILURE(err)) {
+ return result;
+ }
+ defaultScript = performFallbackLookup(localeID.data(), dsLocaleIDChars, scriptCodeChars, defaultScriptTable, UPRV_LENGTHOF(defaultScriptTable));
+ }
+
+ // if we didn't find anything, look up just the language in the default script table
+ if (defaultScript == nullptr) {
+ defaultScript = performFallbackLookup(language.data(), dsLocaleIDChars, scriptCodeChars, defaultScriptTable, UPRV_LENGTHOF(defaultScriptTable));
+ }
+
+ // if either lookup above succeeded, copy the result from "defaultScript" into "result"; otherwise, return "Latn"
+ if (defaultScript != nullptr) {
+ result.clear();
+ result.append(defaultScript, err);
+ }
+ return result;
+}
+
+enum UResOpenType {
+ /**
+ * Open a resource bundle for the locale;
+ * if there is not even a base language bundle, then fall back to the default locale;
+ * if there is no bundle for that either, then load the root bundle.
+ *
+ * This is the default bundle loading behavior.
+ */
+ URES_OPEN_LOCALE_DEFAULT_ROOT,
+ // TODO: ICU ticket #11271 "consistent default locale across locale trees"
+ // Add an option to look at the main locale tree for whether to
+ // fall back to root directly (if the locale has main data) or
+ // fall back to the default locale first (if the locale does not even have main data).
+ /**
+ * Open a resource bundle for the locale;
+ * if there is not even a base language bundle, then load the root bundle;
+ * never fall back to the default locale.
+ *
+ * This is used for algorithms that have good pan-Unicode default behavior,
+ * such as case mappings, collation, and segmentation (BreakIterator).
+ */
+ URES_OPEN_LOCALE_ROOT,
+ /**
+ * Open a resource bundle for the exact bundle name as requested;
+ * no fallbacks, do not load parent bundles.
+ *
+ * This is used for supplemental (non-locale) data.
+ */
+ URES_OPEN_DIRECT
+};
+typedef enum UResOpenType UResOpenType;
+
+/**
+ * Internal function, determines the search path for resource bundle files.
+ * Currently, this function is used only by findFirstExisting() to help search for resource bundle files when a bundle for the specified
+ * locale doesn't exist. The code that supports inheritance of resources between existing resource bundle files continues to
+ * use chopLocale() below.
+ * @param name In-out parameter: On input, the locale ID to get a parent locale ID for (this is a locale's base name, without keywords); on output, the
+ * requested parent locale ID.
+ * @param origName The original locale ID the caller of findFirstExisting() requested. This is the same as `name` on the first call to this function,
+ * but as findFirstExisting() ascends the resource bundle's parent tree, this parameter will continue to be the original locale ID requested.
+ */
+static bool getParentLocaleID(char *name, const char *origName, UResOpenType openType) {
+ // early out if the locale ID has a variant code or ends with _
+ size_t nameLen = uprv_strlen(name);
+ if (!nameLen || name[nameLen - 1] == '_' || hasVariant(name)) {
+ return chopLocale(name);
+ }
+
+ 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;
+ if (U_FAILURE(err)) {
+ // hopefully this never happens...
+ return chopLocale(name);
+ }
+
+ // if the open type is URES_OPEN_LOCALE_DEFAULT_ROOT, first look the locale ID up in the parent locale table;
+ // if that table specifies a parent for it, return that (we don't do this for the other open types-- if we're not
+ // falling back through the system default locale, we also want to do straight truncation fallback instead
+ // of looking things up in the parent locale table-- see https://www.unicode.org/reports/tr35/tr35.html#Parent_Locales:
+ // "Collation data, however, is an exception...")
+ if (openType == URES_OPEN_LOCALE_DEFAULT_ROOT) {
+ const char* parentID = performFallbackLookup(name, parentLocaleChars, parentLocaleChars, parentLocaleTable, UPRV_LENGTHOF(parentLocaleTable));
+ if (parentID != nullptr) {
+ uprv_strcpy(name, parentID);
+ return true;
+ }
+ }
+
+ // 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()) {
+ workingLocale.append(language, err).append("_", err).append(region, err);
+ } else {
+ workingLocale.append(language, err).append("_", err).append(script, err);
+ }
+ } else if (!region.isEmpty()) {
+ // if "name" has region but not script, did the original locale ID specify a script?
+ // - 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);
+ if (!origNameScript.isEmpty()) {
+ workingLocale.append(language, err).append("_", err).append(origNameScript, err);
+ } else {
+ workingLocale.append(language, err).append("_", err).append(getDefaultScript(language, region), err);
+ }
+ } else if (!script.isEmpty()) {
+ // if "name" has script but not region (and our open type if URES_OPEN_LOCALE_DEFAULT_ROOT), is the script
+ // the default script for the language?
+ // - if so, remove it from the locale ID
+ // - 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()) {
+ workingLocale.append(language, err);
+ } else {
+ return false;
+ }
+ } else {
+ // if "name" just contains a language code, return false so the calling code falls back to "root"
+ return false;
+ }
+ if (U_SUCCESS(err) && !workingLocale.isEmpty()) {
+ uprv_strcpy(name, workingLocale.data());
+ return true;
+ } else {
+ return false;
+ }
}
/**
@@ -106,7 +303,7 @@ static UBool mayHaveParent(char *name) {
static void entryIncrease(UResourceDataEntry *entry) {
Mutex lock(&resbMutex);
entry->fCountExisting++;
- while(entry->fParent != NULL) {
+ while(entry->fParent != nullptr) {
entry = entry->fParent;
entry->fCountExisting++;
}
@@ -162,18 +359,18 @@ static void
free_entry(UResourceDataEntry *entry) {
UResourceDataEntry *alias;
res_unload(&(entry->fData));
- if(entry->fName != NULL && entry->fName != entry->fNameBuffer) {
+ if(entry->fName != nullptr && entry->fName != entry->fNameBuffer) {
uprv_free(entry->fName);
}
- if(entry->fPath != NULL) {
+ if(entry->fPath != nullptr) {
uprv_free(entry->fPath);
}
- if(entry->fPool != NULL) {
+ if(entry->fPool != nullptr) {
--entry->fPool->fCountExisting;
}
alias = entry->fAlias;
- if(alias != NULL) {
- while(alias->fAlias != NULL) {
+ if(alias != nullptr) {
+ while(alias->fAlias != nullptr) {
alias = alias->fAlias;
}
--alias->fCountExisting;
@@ -194,15 +391,15 @@ static int32_t ures_flushCache()
* return 0
*/
Mutex lock(&resbMutex);
- if (cache == NULL) {
+ if (cache == nullptr) {
return 0;
}
do {
- deletedMore = FALSE;
+ deletedMore = false;
/*creates an enumeration to iterate through every element in the table */
pos = UHASH_FIRST;
- while ((e = uhash_nextElement(cache, &pos)) != NULL)
+ while ((e = uhash_nextElement(cache, &pos)) != nullptr)
{
resB = (UResourceDataEntry *) e->value.pointer;
/* Deletes only if reference counter == 0
@@ -216,7 +413,7 @@ static int32_t ures_flushCache()
if (resB->fCountExisting == 0) {
rbDeletedNum++;
- deletedMore = TRUE;
+ deletedMore = true;
uhash_removeElement(cache, e);
free_entry(resB);
}
@@ -233,26 +430,26 @@ static int32_t ures_flushCache()
#ifdef URES_DEBUG
#include <stdio.h>
-U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void) {
- UBool cacheNotEmpty = FALSE;
+U_CAPI UBool U_EXPORT2 ures_dumpCacheContents() {
+ UBool cacheNotEmpty = false;
int32_t pos = UHASH_FIRST;
const UHashElement *e;
UResourceDataEntry *resB;
Mutex lock(&resbMutex);
- if (cache == NULL) {
- fprintf(stderr,"%s:%d: RB Cache is NULL.\n", __FILE__, __LINE__);
- return FALSE;
+ if (cache == nullptr) {
+ fprintf(stderr,"%s:%d: RB Cache is nullptr.\n", __FILE__, __LINE__);
+ return false;
}
- while ((e = uhash_nextElement(cache, &pos)) != NULL) {
- cacheNotEmpty=TRUE;
+ while ((e = uhash_nextElement(cache, &pos)) != nullptr) {
+ cacheNotEmpty=true;
resB = (UResourceDataEntry *) e->value.pointer;
fprintf(stderr,"%s:%d: RB Cache: Entry @0x%p, refcount %d, name %s:%s. Pool 0x%p, alias 0x%p, parent 0x%p\n",
__FILE__, __LINE__,
(void*)resB, resB->fCountExisting,
- resB->fName?resB->fName:"NULL",
- resB->fPath?resB->fPath:"NULL",
+ resB->fName?resB->fName:"nullptr",
+ resB->fPath?resB->fPath:"nullptr",
(void*)resB->fPool,
(void*)resB->fAlias,
(void*)resB->fParent);
@@ -264,21 +461,21 @@ U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void) {
#endif
-static UBool U_CALLCONV ures_cleanup(void)
+static UBool U_CALLCONV ures_cleanup()
{
- if (cache != NULL) {
+ if (cache != nullptr) {
ures_flushCache();
uhash_close(cache);
- cache = NULL;
+ cache = nullptr;
}
gCacheInitOnce.reset();
- return TRUE;
+ return true;
}
/** INTERNAL: Initializes the cache for resources */
static void U_CALLCONV createCache(UErrorCode &status) {
- U_ASSERT(cache == NULL);
- cache = uhash_open(hashEntry, compareEntries, NULL, &status);
+ U_ASSERT(cache == nullptr);
+ cache = uhash_open(hashEntry, compareEntries, nullptr, &status);
ucln_common_registerCleanup(UCLN_COMMON_URES, ures_cleanup);
}
@@ -290,7 +487,7 @@ static void initCache(UErrorCode *status) {
static void setEntryName(UResourceDataEntry *res, const char *name, UErrorCode *status) {
int32_t len = (int32_t)uprv_strlen(name);
- if(res->fName != NULL && res->fName != res->fNameBuffer) {
+ if(res->fName != nullptr && res->fName != res->fNameBuffer) {
uprv_free(res->fName);
}
if (len < (int32_t)sizeof(res->fNameBuffer)) {
@@ -299,7 +496,7 @@ static void setEntryName(UResourceDataEntry *res, const char *name, UErrorCode *
else {
res->fName = (char *)uprv_malloc(len+1);
}
- if(res->fName == NULL) {
+ if(res->fName == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
uprv_strcpy(res->fName, name);
@@ -314,21 +511,21 @@ getPoolEntry(const char *path, UErrorCode *status);
* CAUTION: resbMutex must be locked when calling this function.
*/
static UResourceDataEntry *init_entry(const char *localeID, const char *path, UErrorCode *status) {
- UResourceDataEntry *r = NULL;
+ UResourceDataEntry *r = nullptr;
UResourceDataEntry find;
/*int32_t hashValue;*/
const char *name;
char aliasName[100] = { 0 };
int32_t aliasLen = 0;
- /*UBool isAlias = FALSE;*/
+ /*UBool isAlias = false;*/
/*UHashTok hashkey; */
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
/* here we try to deduce the right locale name */
- if(localeID == NULL) { /* if localeID is NULL, we're trying to open default locale */
+ if(localeID == nullptr) { /* if localeID is nullptr, we're trying to open default locale */
name = uloc_getDefault();
} else if(*localeID == 0) { /* if localeID is "" then we try to open root locale */
name = kRootLocaleName;
@@ -345,12 +542,12 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
/* check to see if we already have this entry */
r = (UResourceDataEntry *)uhash_get(cache, &find);
- if(r == NULL) {
+ if(r == nullptr) {
/* if the entry is not yet in the hash table, we'll try to construct a new one */
r = (UResourceDataEntry *) uprv_malloc(sizeof(UResourceDataEntry));
- if(r == NULL) {
+ if(r == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memset(r, 0, sizeof(UResourceDataEntry));
@@ -359,15 +556,15 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
setEntryName(r, name, status);
if (U_FAILURE(*status)) {
uprv_free(r);
- return NULL;
+ return nullptr;
}
- if(path != NULL) {
+ if(path != nullptr) {
r->fPath = (char *)uprv_strdup(path);
- if(r->fPath == NULL) {
+ if(r->fPath == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
uprv_free(r);
- return NULL;
+ return nullptr;
}
}
@@ -378,7 +575,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
/* if we failed to load due to an out-of-memory error, exit early. */
if (*status == U_MEMORY_ALLOCATION_ERROR) {
uprv_free(r);
- return NULL;
+ return nullptr;
}
/* we have no such entry in dll, so it will always use fallback */
*status = U_USING_FALLBACK_WARNING;
@@ -405,8 +602,8 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
aliasres = res_getResource(&(r->fData), "%%ALIAS");
if (aliasres != RES_BOGUS) {
// No tracing: called during initial data loading
- const UChar *alias = res_getStringNoTrace(&(r->fData), aliasres, &aliasLen);
- if(alias != NULL && aliasLen > 0) { /* if there is actual alias - unload and load new data */
+ const char16_t *alias = res_getStringNoTrace(&(r->fData), aliasres, &aliasLen);
+ if(alias != nullptr && aliasLen > 0) { /* if there is actual alias - unload and load new data */
u_UCharsToChars(alias, aliasName, aliasLen+1);
r->fAlias = init_entry(aliasName, path, status);
}
@@ -415,15 +612,15 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
}
{
- UResourceDataEntry *oldR = NULL;
- if((oldR = (UResourceDataEntry *)uhash_get(cache, r)) == NULL) { /* if the data is not cached */
+ UResourceDataEntry *oldR = nullptr;
+ if((oldR = (UResourceDataEntry *)uhash_get(cache, r)) == nullptr) { /* if the data is not cached */
/* just insert it in the cache */
UErrorCode cacheStatus = U_ZERO_ERROR;
uhash_put(cache, (void *)r, r, &cacheStatus);
if (U_FAILURE(cacheStatus)) {
*status = cacheStatus;
free_entry(r);
- r = NULL;
+ r = nullptr;
}
} else {
/* somebody have already inserted it while we were working, discard newly opened data */
@@ -434,9 +631,9 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE
}
}
- if(r != NULL) {
+ if(r != nullptr) {
/* return the real bundle */
- while(r->fAlias != NULL) {
+ while(r->fAlias != nullptr) {
r = r->fAlias;
}
r->fCountExisting++; /* we increase its reference count */
@@ -453,7 +650,7 @@ static UResourceDataEntry *
getPoolEntry(const char *path, UErrorCode *status) {
UResourceDataEntry *poolBundle = init_entry(kPoolBundleName, path, status);
if( U_SUCCESS(*status) &&
- (poolBundle == NULL || poolBundle->fBogus != U_ZERO_ERROR || !poolBundle->fData.isPoolBundle)
+ (poolBundle == nullptr || poolBundle->fBogus != U_ZERO_ERROR || !poolBundle->fData.isPoolBundle)
) {
*status = U_INVALID_FORMAT_ERROR;
}
@@ -463,17 +660,19 @@ getPoolEntry(const char *path, UErrorCode *status) {
/* INTERNAL: */
/* CAUTION: resbMutex must be locked when calling this function! */
static UResourceDataEntry *
-findFirstExisting(const char* path, char* name, const char* defaultLocale,
- UBool *isRoot, UBool *hasChopped, UBool *isDefault, UErrorCode* status) {
- UResourceDataEntry *r = NULL;
- UBool hasRealData = FALSE;
- *hasChopped = TRUE; /* we're starting with a fresh name */
-
- while(*hasChopped && !hasRealData) {
+findFirstExisting(const char* path, char* name, const char* defaultLocale, UResOpenType openType,
+ UBool *isRoot, UBool *foundParent, UBool *isDefault, UErrorCode* status) {
+ UResourceDataEntry *r = nullptr;
+ UBool hasRealData = false;
+ *foundParent = true; /* we're starting with a fresh name */
+ char origName[ULOC_FULLNAME_CAPACITY];
+
+ uprv_strcpy(origName, name);
+ while(*foundParent && !hasRealData) {
r = init_entry(name, path, status);
/* Null pointer test */
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
*isDefault = (UBool)(uprv_strncmp(name, defaultLocale, uprv_strlen(name)) == 0);
hasRealData = (UBool)(r->fBogus == U_ZERO_ERROR);
@@ -485,7 +684,7 @@ findFirstExisting(const char* path, char* name, const char* defaultLocale,
/* are not updated yet. */
r->fCountExisting--;
/*entryCloseInt(r);*/
- r = NULL;
+ r = nullptr;
*status = U_USING_FALLBACK_WARNING;
} else {
uprv_strcpy(name, r->fName); /* this is needed for supporting aliases */
@@ -494,8 +693,14 @@ findFirstExisting(const char* path, char* name, const char* defaultLocale,
*isRoot = (UBool)(uprv_strcmp(name, kRootLocaleName) == 0);
/*Fallback data stuff*/
- *hasChopped = chopLocale(name);
- if (*hasChopped && *name == '\0') {
+ if (!hasRealData) {
+ *foundParent = getParentLocaleID(name, origName, openType);
+ } else {
+ // we've already found a real resource file; what we return to the caller is the parent
+ // locale ID for inheritance, which should come from chopLocale(), not getParentLocaleID()
+ *foundParent = chopLocale(name);
+ }
+ if (*foundParent && *name == '\0') {
uprv_strcpy(name, "und");
}
}
@@ -513,13 +718,13 @@ static void ures_setIsStackObject( UResourceBundle* resB, UBool state) {
}
static UBool ures_isStackObject(const UResourceBundle* resB) {
- return((resB->fMagic1 == MAGIC1 && resB->fMagic2 == MAGIC2)?FALSE:TRUE);
+ return((resB->fMagic1 == MAGIC1 && resB->fMagic2 == MAGIC2)?false:true);
}
U_CFUNC void ures_initStackObject(UResourceBundle* resB) {
uprv_memset(resB, 0, sizeof(UResourceBundle));
- ures_setIsStackObject(resB, TRUE);
+ ures_setIsStackObject(resB, true);
}
U_NAMESPACE_BEGIN
@@ -538,19 +743,19 @@ static UBool // returns U_SUCCESS(*status)
loadParentsExceptRoot(UResourceDataEntry *&t1,
char name[], int32_t nameCapacity,
UBool usingUSRData, char usrDataPath[], UErrorCode *status) {
- if (U_FAILURE(*status)) { return FALSE; }
- UBool checkParent = TRUE;
- while (checkParent && t1->fParent == NULL && !t1->fData.noFallback &&
+ if (U_FAILURE(*status)) { return false; }
+ UBool checkParent = true;
+ while (checkParent && t1->fParent == nullptr && !t1->fData.noFallback &&
res_getResource(&t1->fData,"%%ParentIsRoot") == RES_BOGUS) {
Resource parentRes = res_getResource(&t1->fData, "%%Parent");
if (parentRes != RES_BOGUS) { // An explicit parent was found.
int32_t parentLocaleLen = 0;
// No tracing: called during initial data loading
- const UChar *parentLocaleName = res_getStringNoTrace(&(t1->fData), parentRes, &parentLocaleLen);
- if(parentLocaleName != NULL && 0 < parentLocaleLen && parentLocaleLen < nameCapacity) {
+ const char16_t *parentLocaleName = res_getStringNoTrace(&(t1->fData), parentRes, &parentLocaleLen);
+ if(parentLocaleName != nullptr && 0 < parentLocaleLen && parentLocaleLen < nameCapacity) {
u_UCharsToChars(parentLocaleName, name, parentLocaleLen + 1);
if (uprv_strcmp(name, kRootLocaleName) == 0) {
- return TRUE;
+ return true;
}
}
}
@@ -559,16 +764,16 @@ loadParentsExceptRoot(UResourceDataEntry *&t1,
UResourceDataEntry *t2 = init_entry(name, t1->fPath, &parentStatus);
if (U_FAILURE(parentStatus)) {
*status = parentStatus;
- return FALSE;
+ return false;
}
- UResourceDataEntry *u2 = NULL;
+ UResourceDataEntry *u2 = nullptr;
UErrorCode usrStatus = U_ZERO_ERROR;
if (usingUSRData) { // This code inserts user override data into the inheritance chain.
u2 = init_entry(name, usrDataPath, &usrStatus);
// If we failed due to out-of-memory, report that to the caller and exit early.
if (usrStatus == U_MEMORY_ALLOCATION_ERROR) {
*status = usrStatus;
- return FALSE;
+ return false;
}
}
@@ -585,66 +790,34 @@ loadParentsExceptRoot(UResourceDataEntry *&t1,
t1 = t2;
checkParent = chopLocale(name) || mayHaveParent(name);
}
- return TRUE;
+ return true;
}
static UBool // returns U_SUCCESS(*status)
insertRootBundle(UResourceDataEntry *&t1, UErrorCode *status) {
- if (U_FAILURE(*status)) { return FALSE; }
+ if (U_FAILURE(*status)) { return false; }
UErrorCode parentStatus = U_ZERO_ERROR;
UResourceDataEntry *t2 = init_entry(kRootLocaleName, t1->fPath, &parentStatus);
if (U_FAILURE(parentStatus)) {
*status = parentStatus;
- return FALSE;
+ return false;
}
t1->fParent = t2;
t1 = t2;
- return TRUE;
+ return true;
}
-enum UResOpenType {
- /**
- * Open a resource bundle for the locale;
- * if there is not even a base language bundle, then fall back to the default locale;
- * if there is no bundle for that either, then load the root bundle.
- *
- * This is the default bundle loading behavior.
- */
- URES_OPEN_LOCALE_DEFAULT_ROOT,
- // TODO: ICU ticket #11271 "consistent default locale across locale trees"
- // Add an option to look at the main locale tree for whether to
- // fall back to root directly (if the locale has main data) or
- // fall back to the default locale first (if the locale does not even have main data).
- /**
- * Open a resource bundle for the locale;
- * if there is not even a base language bundle, then load the root bundle;
- * never fall back to the default locale.
- *
- * This is used for algorithms that have good pan-Unicode default behavior,
- * such as case mappings, collation, and segmentation (BreakIterator).
- */
- URES_OPEN_LOCALE_ROOT,
- /**
- * Open a resource bundle for the exact bundle name as requested;
- * no fallbacks, do not load parent bundles.
- *
- * This is used for supplemental (non-locale) data.
- */
- URES_OPEN_DIRECT
-};
-typedef enum UResOpenType UResOpenType;
-
static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
UResOpenType openType, UErrorCode* status) {
U_ASSERT(openType != URES_OPEN_DIRECT);
UErrorCode intStatus = U_ZERO_ERROR;
- UResourceDataEntry *r = NULL;
- UResourceDataEntry *t1 = NULL;
- UBool isDefault = FALSE;
- UBool isRoot = FALSE;
- UBool hasRealData = FALSE;
- UBool hasChopped = TRUE;
- UBool usingUSRData = U_USE_USRDATA && ( path == NULL || uprv_strncmp(path,U_ICUDATA_NAME,8) == 0);
+ UResourceDataEntry *r = nullptr;
+ UResourceDataEntry *t1 = nullptr;
+ UBool isDefault = false;
+ UBool isRoot = false;
+ UBool hasRealData = false;
+ UBool hasChopped = true;
+ UBool usingUSRData = U_USE_USRDATA && ( path == nullptr || uprv_strncmp(path,U_ICUDATA_NAME,8) == 0);
char name[ULOC_FULLNAME_CAPACITY];
char usrDataPath[96];
@@ -652,14 +825,14 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
initCache(status);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
uprv_strncpy(name, localeID, sizeof(name) - 1);
name[sizeof(name) - 1] = 0;
if ( usingUSRData ) {
- if ( path == NULL ) {
+ if ( path == nullptr ) {
uprv_strcpy(usrDataPath, U_USRDATA_NAME);
} else {
uprv_strncpy(usrDataPath, path, sizeof(usrDataPath) - 1);
@@ -676,7 +849,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
Mutex lock(&resbMutex); // Lock resbMutex until the end of this function.
/* We're going to skip all the locales that do not have any data */
- r = findFirstExisting(path, name, defaultLocale, &isRoot, &hasChopped, &isDefault, &intStatus);
+ r = findFirstExisting(path, name, defaultLocale, openType, &isRoot, &hasChopped, &isDefault, &intStatus);
// If we failed due to out-of-memory, report the failure and exit early.
if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
@@ -684,9 +857,9 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
goto finish;
}
- if(r != NULL) { /* if there is one real locale, we can look for parents. */
+ if(r != nullptr) { /* if there is one real locale, we can look for parents. */
t1 = r;
- hasRealData = TRUE;
+ hasRealData = true;
if ( usingUSRData ) { /* This code inserts user override data into the inheritance chain */
UErrorCode usrStatus = U_ZERO_ERROR;
UResourceDataEntry *u1 = init_entry(t1->fName, usrDataPath, &usrStatus);
@@ -695,7 +868,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
*status = intStatus;
goto finish;
}
- if ( u1 != NULL ) {
+ if ( u1 != nullptr ) {
if(u1->fBogus == U_ZERO_ERROR) {
u1->fParent = t1;
r = u1;
@@ -714,20 +887,20 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
/* we could have reached this point without having any real data */
/* if that is the case, we need to chain in the default locale */
- if(r==NULL && openType == URES_OPEN_LOCALE_DEFAULT_ROOT && !isDefault && !isRoot) {
+ if(r==nullptr && openType == URES_OPEN_LOCALE_DEFAULT_ROOT && !isDefault && !isRoot) {
/* insert default locale */
uprv_strcpy(name, defaultLocale);
- r = findFirstExisting(path, name, defaultLocale, &isRoot, &hasChopped, &isDefault, &intStatus);
+ r = findFirstExisting(path, name, defaultLocale, openType, &isRoot, &hasChopped, &isDefault, &intStatus);
// If we failed due to out-of-memory, report the failure and exit early.
if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
*status = intStatus;
goto finish;
}
intStatus = U_USING_DEFAULT_WARNING;
- if(r != NULL) { /* the default locale exists */
+ if(r != nullptr) { /* the default locale exists */
t1 = r;
- hasRealData = TRUE;
- isDefault = TRUE;
+ hasRealData = true;
+ isDefault = true;
// TODO: Why not if (usingUSRData) { ... } like in the non-default-locale code path?
if ((hasChopped || mayHaveParent(name)) && !isRoot) {
if (!loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), usingUSRData, usrDataPath, status)) {
@@ -737,26 +910,26 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
}
}
- /* we could still have r == NULL at this point - maybe even default locale is not */
+ /* we could still have r == nullptr at this point - maybe even default locale is not */
/* present */
- if(r == NULL) {
+ if(r == nullptr) {
uprv_strcpy(name, kRootLocaleName);
- r = findFirstExisting(path, name, defaultLocale, &isRoot, &hasChopped, &isDefault, &intStatus);
+ r = findFirstExisting(path, name, defaultLocale, openType, &isRoot, &hasChopped, &isDefault, &intStatus);
// If we failed due to out-of-memory, report the failure and exit early.
if (intStatus == U_MEMORY_ALLOCATION_ERROR) {
*status = intStatus;
goto finish;
}
- if(r != NULL) {
+ if(r != nullptr) {
t1 = r;
intStatus = U_USING_DEFAULT_WARNING;
- hasRealData = TRUE;
+ hasRealData = true;
} else { /* we don't even have the root locale */
*status = U_MISSING_RESOURCE_ERROR;
goto finish;
}
} else if(!isRoot && uprv_strcmp(t1->fName, kRootLocaleName) != 0 &&
- t1->fParent == NULL && !r->fData.noFallback) {
+ t1->fParent == nullptr && !r->fData.noFallback) {
if (!insertRootBundle(t1, status)) {
goto finish;
}
@@ -766,7 +939,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
}
// TODO: Does this ever loop?
- while(r != NULL && !isRoot && t1->fParent != NULL) {
+ while(r != nullptr && !isRoot && t1->fParent != nullptr) {
t1->fParent->fCountExisting++;
t1 = t1->fParent;
}
@@ -778,7 +951,7 @@ finish:
}
return r;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -792,12 +965,12 @@ static UResourceDataEntry *
entryOpenDirect(const char* path, const char* localeID, UErrorCode* status) {
initCache(status);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
// Note: We need to query the default locale *before* locking resbMutex.
- // If the localeID is NULL, then we want to use the default locale.
- if (localeID == NULL) {
+ // If the localeID is nullptr, then we want to use the default locale.
+ if (localeID == nullptr) {
localeID = uloc_getDefault();
} else if (*localeID == 0) {
// If the localeID is "", then we want to use the root locale.
@@ -811,34 +984,34 @@ entryOpenDirect(const char* path, const char* localeID, UErrorCode* status) {
if(U_SUCCESS(*status)) {
if(r->fBogus != U_ZERO_ERROR) {
r->fCountExisting--;
- r = NULL;
+ r = nullptr;
}
} else {
- r = NULL;
+ r = nullptr;
}
// Some code depends on the ures_openDirect() bundle to have a parent bundle chain,
// unless it is marked with "nofallback".
UResourceDataEntry *t1 = r;
- if(r != NULL && uprv_strcmp(localeID, kRootLocaleName) != 0 && // not root
- r->fParent == NULL && !r->fData.noFallback &&
+ if(r != nullptr && uprv_strcmp(localeID, kRootLocaleName) != 0 && // not root
+ r->fParent == nullptr && !r->fData.noFallback &&
uprv_strlen(localeID) < ULOC_FULLNAME_CAPACITY) {
char name[ULOC_FULLNAME_CAPACITY];
uprv_strcpy(name, localeID);
if(!chopLocale(name) || uprv_strcmp(name, kRootLocaleName) == 0 ||
- loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), FALSE, NULL, status)) {
- if(uprv_strcmp(t1->fName, kRootLocaleName) != 0 && t1->fParent == NULL) {
+ loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), false, nullptr, status)) {
+ if(uprv_strcmp(t1->fName, kRootLocaleName) != 0 && t1->fParent == nullptr) {
insertRootBundle(t1, status);
}
}
if(U_FAILURE(*status)) {
- r = NULL;
+ r = nullptr;
}
}
- if(r != NULL) {
+ if(r != nullptr) {
// TODO: Does this ever loop?
- while(t1->fParent != NULL) {
+ while(t1->fParent != nullptr) {
t1->fParent->fCountExisting++;
t1 = t1->fParent;
}
@@ -854,7 +1027,7 @@ entryOpenDirect(const char* path, const char* localeID, UErrorCode* status) {
static void entryCloseInt(UResourceDataEntry *resB) {
UResourceDataEntry *p = resB;
- while(resB != NULL) {
+ while(resB != nullptr) {
p = resB->fParent;
resB->fCountExisting--;
@@ -866,10 +1039,10 @@ static void entryCloseInt(UResourceDataEntry *resB) {
if(resB->fBogus == U_ZERO_ERROR) {
res_unload(&(resB->fData));
}
- if(resB->fName != NULL) {
+ if(resB->fName != nullptr) {
uprv_free(resB->fName);
}
- if(resB->fPath != NULL) {
+ if(resB->fPath != nullptr) {
uprv_free(resB->fPath);
}
uprv_free(resB);
@@ -891,7 +1064,7 @@ static void entryClose(UResourceDataEntry *resB) {
/*
U_CFUNC void ures_setResPath(UResourceBundle *resB, const char* toAdd) {
- if(resB->fResPath == NULL) {
+ if(resB->fResPath == nullptr) {
resB->fResPath = resB->fResBuf;
*(resB->fResPath) = 0;
}
@@ -908,7 +1081,7 @@ U_CFUNC void ures_setResPath(UResourceBundle *resB, const char* toAdd) {
*/
static void ures_appendResPath(UResourceBundle *resB, const char* toAdd, int32_t lenToAdd, UErrorCode *status) {
int32_t resPathLenOrig = resB->fResPathLen;
- if(resB->fResPath == NULL) {
+ if(resB->fResPath == nullptr) {
resB->fResPath = resB->fResBuf;
*(resB->fResPath) = 0;
resB->fResPathLen = 0;
@@ -918,7 +1091,7 @@ static void ures_appendResPath(UResourceBundle *resB, const char* toAdd, int32_t
if(resB->fResPath == resB->fResBuf) {
resB->fResPath = (char *)uprv_malloc((resB->fResPathLen+1)*sizeof(char));
/* Check that memory was allocated correctly. */
- if (resB->fResPath == NULL) {
+ if (resB->fResPath == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -926,7 +1099,7 @@ static void ures_appendResPath(UResourceBundle *resB, const char* toAdd, int32_t
} else {
char *temp = (char *)uprv_realloc(resB->fResPath, (resB->fResPathLen+1)*sizeof(char));
/* Check that memory was reallocated correctly. */
- if (temp == NULL) {
+ if (temp == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -940,23 +1113,23 @@ static void ures_freeResPath(UResourceBundle *resB) {
if (resB->fResPath && resB->fResPath != resB->fResBuf) {
uprv_free(resB->fResPath);
}
- resB->fResPath = NULL;
+ resB->fResPath = nullptr;
resB->fResPathLen = 0;
}
static void
ures_closeBundle(UResourceBundle* resB, UBool freeBundleObj)
{
- if(resB != NULL) {
- if(resB->fData != NULL) {
+ if(resB != nullptr) {
+ if(resB->fData != nullptr) {
entryClose(resB->fData);
}
- if(resB->fVersion != NULL) {
+ if(resB->fVersion != nullptr) {
uprv_free(resB->fVersion);
}
ures_freeResPath(resB);
- if(ures_isStackObject(resB) == FALSE && freeBundleObj) {
+ if(ures_isStackObject(resB) == false && freeBundleObj) {
uprv_free(resB);
}
#if 0 /*U_DEBUG*/
@@ -971,7 +1144,7 @@ ures_closeBundle(UResourceBundle* resB, UBool freeBundleObj)
U_CAPI void U_EXPORT2
ures_close(UResourceBundle* resB)
{
- ures_closeBundle(resB, TRUE);
+ ures_closeBundle(resB, true);
}
namespace {
@@ -994,7 +1167,7 @@ UResourceBundle *getAliasTargetAsResourceBundle(
if (U_FAILURE(*status)) { return resB; }
U_ASSERT(RES_GET_TYPE(r) == URES_ALIAS);
int32_t len = 0;
- const UChar *alias = res_getAlias(&resData, r, &len);
+ const char16_t *alias = res_getAlias(&resData, r, &len);
if(len <= 0) {
// bad alias
*status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -1214,12 +1387,12 @@ UResourceBundle *init_resb_result(
int32_t recursionDepth,
UResourceBundle *resB, UErrorCode *status) {
// TODO: When an error occurs: Should we return nullptr vs. resB?
- if(status == NULL || U_FAILURE(*status)) {
+ if(status == nullptr || U_FAILURE(*status)) {
return resB;
}
if (validLocaleDataEntry == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if(RES_GET_TYPE(r) == URES_ALIAS) {
// This is an alias, need to exchange with real data.
@@ -1231,20 +1404,20 @@ UResourceBundle *init_resb_result(
dataEntry->fData, r, key, idx,
validLocaleDataEntry, containerResPath, recursionDepth, resB, status);
}
- if(resB == NULL) {
+ if(resB == nullptr) {
resB = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle));
- if (resB == NULL) {
+ if (resB == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- ures_setIsStackObject(resB, FALSE);
- resB->fResPath = NULL;
+ ures_setIsStackObject(resB, false);
+ resB->fResPath = nullptr;
resB->fResPathLen = 0;
} else {
- if(resB->fData != NULL) {
+ if(resB->fData != nullptr) {
entryClose(resB->fData);
}
- if(resB->fVersion != NULL) {
+ if(resB->fVersion != nullptr) {
uprv_free(resB->fVersion);
}
/*
@@ -1254,7 +1427,7 @@ UResourceBundle *init_resb_result(
treated the same
*/
/*
- if(ures_isStackObject(resB) != FALSE) {
+ if(ures_isStackObject(resB) != false) {
ures_initStackObject(resB);
}
*/
@@ -1264,8 +1437,8 @@ UResourceBundle *init_resb_result(
}
resB->fData = dataEntry;
entryIncrease(resB->fData);
- resB->fHasFallback = FALSE;
- resB->fIsTopLevel = FALSE;
+ resB->fHasFallback = false;
+ resB->fIsTopLevel = false;
resB->fIndex = -1;
resB->fKey = key;
resB->fValidLocaleDataEntry = validLocaleDataEntry;
@@ -1273,7 +1446,7 @@ UResourceBundle *init_resb_result(
ures_appendResPath(
resB, containerResPath, static_cast<int32_t>(uprv_strlen(containerResPath)), status);
}
- if(key != NULL) {
+ if(key != nullptr) {
ures_appendResPath(resB, key, (int32_t)uprv_strlen(key), status);
if(resB->fResPath[resB->fResPathLen-1] != RES_PATH_SEPARATOR) {
ures_appendResPath(resB, RES_PATH_SEPARATOR_S, 1, status);
@@ -1292,7 +1465,7 @@ UResourceBundle *init_resb_result(
uprv_memset(resB->fResBuf + usedLen, 0, sizeof(resB->fResBuf) - usedLen);
}
- resB->fVersion = NULL;
+ resB->fVersion = nullptr;
resB->fRes = r;
resB->fSize = res_countArrayItems(&resB->getResData(), resB->fRes);
ResourceTracer(resB).trace("get");
@@ -1316,27 +1489,27 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin
if(U_FAILURE(*status) || r == original) {
return r;
}
- if(original != NULL) {
- if(r == NULL) {
- isStackObject = FALSE;
+ if(original != nullptr) {
+ if(r == nullptr) {
+ isStackObject = false;
r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle));
- /* test for NULL */
- if (r == NULL) {
+ /* test for nullptr */
+ if (r == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
} else {
isStackObject = ures_isStackObject(r);
- ures_closeBundle(r, FALSE);
+ ures_closeBundle(r, false);
}
uprv_memcpy(r, original, sizeof(UResourceBundle));
- r->fResPath = NULL;
+ r->fResPath = nullptr;
r->fResPathLen = 0;
if(original->fResPath) {
ures_appendResPath(r, original->fResPath, original->fResPathLen, status);
}
ures_setIsStackObject(r, isStackObject);
- if(r->fData != NULL) {
+ if(r->fData != nullptr) {
entryIncrease(r->fData);
}
}
@@ -1347,45 +1520,45 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin
* Functions to retrieve data from resource bundles.
*/
-U_CAPI const UChar* U_EXPORT2 ures_getString(const UResourceBundle* resB, int32_t* len, UErrorCode* status) {
- const UChar *s;
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+U_CAPI const char16_t* U_EXPORT2 ures_getString(const UResourceBundle* resB, int32_t* len, UErrorCode* status) {
+ const char16_t *s;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
s = res_getString({resB}, &resB->getResData(), resB->fRes, len);
- if (s == NULL) {
+ if (s == nullptr) {
*status = U_RESOURCE_TYPE_MISMATCH;
}
return s;
}
static const char *
-ures_toUTF8String(const UChar *s16, int32_t length16,
+ures_toUTF8String(const char16_t *s16, int32_t length16,
char *dest, int32_t *pLength,
UBool forceCopy,
UErrorCode *status) {
int32_t capacity;
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (pLength != NULL) {
+ if (pLength != nullptr) {
capacity = *pLength;
} else {
capacity = 0;
}
- if (capacity < 0 || (capacity > 0 && dest == NULL)) {
+ if (capacity < 0 || (capacity > 0 && dest == nullptr)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if (length16 == 0) {
/* empty string, return as read-only pointer */
- if (pLength != NULL) {
+ if (pLength != nullptr) {
*pLength = 0;
}
if (forceCopy) {
@@ -1398,18 +1571,18 @@ ures_toUTF8String(const UChar *s16, int32_t length16,
/* We need to transform the string to the destination buffer. */
if (capacity < length16) {
/* No chance for the string to fit. Pure preflighting. */
- return u_strToUTF8(NULL, 0, pLength, s16, length16, status);
+ return u_strToUTF8(nullptr, 0, pLength, s16, length16, status);
}
if (!forceCopy && (length16 <= 0x2aaaaaaa)) {
/*
- * We know the string will fit into dest because each UChar turns
+ * We know the string will fit into dest because each char16_t turns
* into at most three UTF-8 bytes. Fill the latter part of dest
* so that callers do not expect to use dest as a string pointer,
* hopefully leading to more robust code for when resource bundles
* may store UTF-8 natively.
* (In which case dest would not be used at all.)
*
- * We do not do this if forceCopy=TRUE because then the caller
+ * We do not do this if forceCopy=true because then the caller
* expects the string to start exactly at dest.
*
* The test above for <= 0x2aaaaaaa prevents overflows.
@@ -1431,22 +1604,22 @@ ures_getUTF8String(const UResourceBundle *resB,
UBool forceCopy,
UErrorCode *status) {
int32_t length16;
- const UChar *s16 = ures_getString(resB, &length16, status);
+ const char16_t *s16 = ures_getString(resB, &length16, status);
return ures_toUTF8String(s16, length16, dest, pLength, forceCopy, status);
}
U_CAPI const uint8_t* U_EXPORT2 ures_getBinary(const UResourceBundle* resB, int32_t* len,
UErrorCode* status) {
const uint8_t *p;
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
p = res_getBinary({resB}, &resB->getResData(), resB->fRes, len);
- if (p == NULL) {
+ if (p == nullptr) {
*status = U_RESOURCE_TYPE_MISMATCH;
}
return p;
@@ -1455,15 +1628,15 @@ U_CAPI const uint8_t* U_EXPORT2 ures_getBinary(const UResourceBundle* resB, int3
U_CAPI const int32_t* U_EXPORT2 ures_getIntVector(const UResourceBundle* resB, int32_t* len,
UErrorCode* status) {
const int32_t *p;
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
p = res_getIntVector({resB}, &resB->getResData(), resB->fRes, len);
- if (p == NULL) {
+ if (p == nullptr) {
*status = U_RESOURCE_TYPE_MISMATCH;
}
return p;
@@ -1472,10 +1645,10 @@ U_CAPI const int32_t* U_EXPORT2 ures_getIntVector(const UResourceBundle* resB, i
/* this function returns a signed integer */
/* it performs sign extension */
U_CAPI int32_t U_EXPORT2 ures_getInt(const UResourceBundle* resB, UErrorCode *status) {
- if (status==NULL || U_FAILURE(*status)) {
+ if (status==nullptr || U_FAILURE(*status)) {
return 0xffffffff;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0xffffffff;
}
@@ -1487,10 +1660,10 @@ U_CAPI int32_t U_EXPORT2 ures_getInt(const UResourceBundle* resB, UErrorCode *st
}
U_CAPI uint32_t U_EXPORT2 ures_getUInt(const UResourceBundle* resB, UErrorCode *status) {
- if (status==NULL || U_FAILURE(*status)) {
+ if (status==nullptr || U_FAILURE(*status)) {
return 0xffffffff;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0xffffffff;
}
@@ -1502,7 +1675,7 @@ U_CAPI uint32_t U_EXPORT2 ures_getUInt(const UResourceBundle* resB, UErrorCode *
}
U_CAPI UResType U_EXPORT2 ures_getType(const UResourceBundle *resB) {
- if(resB == NULL) {
+ if(resB == nullptr) {
return URES_NONE;
}
return res_getPublicType(resB->fRes);
@@ -1518,24 +1691,24 @@ U_CAPI const char * U_EXPORT2 ures_getKey(const UResourceBundle *resB) {
// However, I believe we have some data (e.g., in res_index) where the key
// strings are the data. Tracing the enclosing table should suffice.
//
- if(resB == NULL) {
- return NULL;
+ if(resB == nullptr) {
+ return nullptr;
}
return(resB->fKey);
}
U_CAPI int32_t U_EXPORT2 ures_getSize(const UResourceBundle *resB) {
- if(resB == NULL) {
+ if(resB == nullptr) {
return 0;
}
return resB->fSize;
}
-static const UChar* ures_getStringWithAlias(const UResourceBundle *resB, Resource r, int32_t sIndex, int32_t *len, UErrorCode *status) {
+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 UChar* result = 0;
- UResourceBundle *tempRes = ures_getByIndex(resB, sIndex, NULL, status);
+ const char16_t* result = 0;
+ UResourceBundle *tempRes = ures_getByIndex(resB, sIndex, nullptr, status);
result = ures_getString(tempRes, len, status);
ures_close(tempRes);
return result;
@@ -1545,28 +1718,28 @@ static const UChar* ures_getStringWithAlias(const UResourceBundle *resB, Resourc
}
U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resB){
- if(resB == NULL) {
+ if(resB == nullptr) {
return;
}
resB->fIndex = -1;
}
U_CAPI UBool U_EXPORT2 ures_hasNext(const UResourceBundle *resB) {
- if(resB == NULL) {
- return FALSE;
+ if(resB == nullptr) {
+ return false;
}
return (UBool)(resB->fIndex < resB->fSize-1);
}
-U_CAPI const UChar* U_EXPORT2 ures_getNextString(UResourceBundle *resB, int32_t* len, const char ** key, UErrorCode *status) {
+U_CAPI const char16_t* U_EXPORT2 ures_getNextString(UResourceBundle *resB, int32_t* len, const char ** key, UErrorCode *status) {
Resource r = RES_BOGUS;
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if(resB->fIndex == resB->fSize-1) {
@@ -1600,30 +1773,30 @@ U_CAPI const UChar* U_EXPORT2 ures_getNextString(UResourceBundle *resB, int32_t*
*status = U_RESOURCE_TYPE_MISMATCH;
U_FALLTHROUGH;
default:
- return NULL;
+ return nullptr;
}
}
- return NULL;
+ return nullptr;
}
U_CAPI UResourceBundle* U_EXPORT2 ures_getNextResource(UResourceBundle *resB, UResourceBundle *fillIn, UErrorCode *status) {
- const char *key = NULL;
+ const char *key = nullptr;
Resource r = RES_BOGUS;
- if (status==NULL || U_FAILURE(*status)) {
- /*return NULL;*/
+ if (status==nullptr || U_FAILURE(*status)) {
+ /*return nullptr;*/
return fillIn;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- /*return NULL;*/
+ /*return nullptr;*/
return fillIn;
}
if(resB->fIndex == resB->fSize-1) {
*status = U_INDEX_OUTOFBOUNDS_ERROR;
- /*return NULL;*/
+ /*return nullptr;*/
} else {
resB->fIndex++;
switch(RES_GET_TYPE(resB->fRes)) {
@@ -1649,25 +1822,25 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getNextResource(UResourceBundle *resB, UR
}
return init_resb_result(resB->fData, r, key, resB->fIndex, resB, fillIn, status);
default:
- /*return NULL;*/
+ /*return nullptr;*/
return fillIn;
}
}
- /*return NULL;*/
+ /*return nullptr;*/
return fillIn;
}
U_CAPI UResourceBundle* U_EXPORT2 ures_getByIndex(const UResourceBundle *resB, int32_t indexR, UResourceBundle *fillIn, UErrorCode *status) {
- const char* key = NULL;
+ const char* key = nullptr;
Resource r = RES_BOGUS;
- if (status==NULL || U_FAILURE(*status)) {
- /*return NULL;*/
+ if (status==nullptr || U_FAILURE(*status)) {
+ /*return nullptr;*/
return fillIn;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- /*return NULL;*/
+ /*return nullptr;*/
return fillIn;
}
@@ -1695,26 +1868,26 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByIndex(const UResourceBundle *resB, i
}
return init_resb_result(resB->fData, r, key, indexR, resB, fillIn, status);
default:
- /*return NULL;*/
+ /*return nullptr;*/
return fillIn;
}
} else {
*status = U_MISSING_RESOURCE_ERROR;
}
- /*return NULL;*/
+ /*return nullptr;*/
return fillIn;
}
-U_CAPI const UChar* U_EXPORT2 ures_getStringByIndex(const UResourceBundle *resB, int32_t indexS, int32_t* len, UErrorCode *status) {
- const char* key = NULL;
+U_CAPI const char16_t* U_EXPORT2 ures_getStringByIndex(const UResourceBundle *resB, int32_t indexS, int32_t* len, UErrorCode *status) {
+ const char* key = nullptr;
Resource r = RES_BOGUS;
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if(indexS >= 0 && resB->fSize > indexS) {
@@ -1752,7 +1925,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByIndex(const UResourceBundle *resB,
} else {
*status = U_MISSING_RESOURCE_ERROR;
}
- return NULL;
+ return nullptr;
}
U_CAPI const char * U_EXPORT2
@@ -1762,7 +1935,7 @@ ures_getUTF8StringByIndex(const UResourceBundle *resB,
UBool forceCopy,
UErrorCode *status) {
int32_t length16;
- const UChar *s16 = ures_getStringByIndex(resB, idx, &length16, status);
+ const char16_t *s16 = ures_getStringByIndex(resB, idx, &length16, status);
return ures_toUTF8String(s16, length16, dest, pLength, forceCopy, status);
}
@@ -1773,21 +1946,21 @@ ures_getUTF8StringByIndex(const UResourceBundle *resB,
U_CAPI UResourceBundle* U_EXPORT2
ures_findResource(const char* path, UResourceBundle *fillIn, UErrorCode *status)
{
- UResourceBundle *first = NULL;
+ UResourceBundle *first = nullptr;
UResourceBundle *result = fillIn;
- char *packageName = NULL;
- char *pathToResource = NULL, *save = NULL;
- char *locale = NULL, *localeEnd = NULL;
+ char *packageName = nullptr;
+ char *pathToResource = nullptr, *save = nullptr;
+ char *locale = nullptr, *localeEnd = nullptr;
int32_t length;
- if(status == NULL || U_FAILURE(*status)) {
+ if(status == nullptr || U_FAILURE(*status)) {
return result;
}
length = (int32_t)(uprv_strlen(path)+1);
save = pathToResource = (char *)uprv_malloc(length*sizeof(char));
- /* test for NULL */
- if(pathToResource == NULL) {
+ /* test for nullptr */
+ if(pathToResource == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return result;
}
@@ -1798,7 +1971,7 @@ ures_findResource(const char* path, UResourceBundle *fillIn, UErrorCode *status)
pathToResource++;
packageName = pathToResource;
pathToResource = uprv_strchr(pathToResource, RES_PATH_SEPARATOR);
- if(pathToResource == NULL) {
+ if(pathToResource == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
} else {
*pathToResource = 0;
@@ -1807,7 +1980,7 @@ ures_findResource(const char* path, UResourceBundle *fillIn, UErrorCode *status)
}
localeEnd = uprv_strchr(locale, RES_PATH_SEPARATOR);
- if(localeEnd != NULL) {
+ if(localeEnd != nullptr) {
*localeEnd = 0;
}
@@ -1832,7 +2005,7 @@ ures_findSubResource(const UResourceBundle *resB, char* path, UResourceBundle *f
UResourceBundle *result = fillIn;
const char *key;
- if(status == NULL || U_FAILURE(*status)) {
+ if(status == nullptr || U_FAILURE(*status)) {
return result;
}
@@ -1852,28 +2025,28 @@ ures_findSubResource(const UResourceBundle *resB, char* path, UResourceBundle *f
return result;
}
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
ures_getStringByKeyWithFallback(const UResourceBundle *resB,
const char* inKey,
int32_t* len,
UErrorCode *status) {
UResourceBundle stack;
- const UChar* retVal = NULL;
+ const char16_t* retVal = nullptr;
ures_initStackObject(&stack);
ures_getByKeyWithFallback(resB, inKey, &stack, status);
int32_t length;
retVal = ures_getString(&stack, &length, status);
ures_close(&stack);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if (length == 3 && retVal[0] == EMPTY_SET && retVal[1] == EMPTY_SET && retVal[2] == EMPTY_SET ) {
- retVal = NULL;
+ retVal = nullptr;
length = 0;
*status = U_MISSING_RESOURCE_ERROR;
}
- if (len != NULL) {
+ if (len != nullptr) {
*len = length;
}
return retVal;
@@ -1892,7 +2065,7 @@ static Resource getTableItemByKeyPath(const ResourceData *pResData, Resource tab
UResType type = (UResType)RES_GET_TYPE(resource); /* the current resource type */
while (*pathPart && resource != RES_BOGUS && URES_IS_CONTAINER(type)) {
char *nextPathPart = uprv_strchr(pathPart, RES_PATH_SEPARATOR);
- if (nextPathPart != NULL) {
+ if (nextPathPart != nullptr) {
*nextPathPart = 0; /* Terminating null for this part of path. */
nextPathPart++;
} else {
@@ -1989,12 +2162,12 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
UResourceBundle *fillIn,
UErrorCode *status) {
Resource res = RES_BOGUS, rootRes = RES_BOGUS;
- UResourceBundle *helper = NULL;
+ UResourceBundle *helper = nullptr;
- if (status==NULL || U_FAILURE(*status)) {
+ if (status==nullptr || U_FAILURE(*status)) {
return fillIn;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return fillIn;
}
@@ -2009,14 +2182,14 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
if(res == RES_BOGUS) {
UResourceDataEntry *dataEntry = resB->fData;
CharString path;
- char *myPath = NULL;
+ char *myPath = nullptr;
const char* resPath = resB->fResPath;
int32_t len = resB->fResPathLen;
- while(res == RES_BOGUS && (dataEntry->fParent != NULL || !didRootOnce)) { /* Otherwise, we'll look in parents */
- if (dataEntry->fParent != NULL) {
+ while(res == RES_BOGUS && (dataEntry->fParent != nullptr || !didRootOnce)) { /* Otherwise, we'll look in parents */
+ if (dataEntry->fParent != nullptr) {
dataEntry = dataEntry->fParent;
} else {
- // We can't just stop when we get to a bundle whose fParent is NULL. That'll work most of the time,
+ // We can't just stop when we get to a bundle whose fParent is nullptr. That'll work most of the time,
// but if the bundle that the caller passed to us was "root" (which happens in getAllItemsWithFallback(),
// this function will drop right out without doing anything if "root" doesn't contain the exact key path
// specified. In that case, we need one extra time through this loop to make sure we follow any
@@ -2037,7 +2210,7 @@ ures_getByKeyWithFallback(const UResourceBundle *resB,
res = res_findResource(&(dataEntry->fData), rootRes, &myPath, &key);
if (RES_GET_TYPE(res) == URES_ALIAS && *myPath) {
/* We hit an alias, but we didn't finish following the path. */
- helper = init_resb_result(dataEntry, res, NULL, -1, resB, helper, status);
+ helper = init_resb_result(dataEntry, res, nullptr, -1, resB, helper, status);
/*helper = init_resb_result(dataEntry, res, inKey, -1, resB, helper, status);*/
if(helper) {
dataEntry = helper->fData;
@@ -2116,7 +2289,7 @@ void getAllItemsWithFallback(
value.setData(bundle->getResData());
value.setValidLocaleDataEntry(bundle->fValidLocaleDataEntry);
UResourceDataEntry *parentEntry = bundle->fData->fParent;
- UBool hasParent = parentEntry != NULL && U_SUCCESS(parentEntry->fBogus);
+ UBool hasParent = parentEntry != nullptr && U_SUCCESS(parentEntry->fBogus);
value.setResource(bundle->fRes, ResourceTracer(bundle));
sink.put(bundle->fKey, value, !hasParent, errorCode);
if (hasParent) {
@@ -2133,7 +2306,7 @@ void getAllItemsWithFallback(
parentRef.fData = parentEntry;
parentRef.fValidLocaleDataEntry = bundle->fValidLocaleDataEntry;
parentRef.fHasFallback = !parentRef.getResData().noFallback;
- parentRef.fIsTopLevel = TRUE;
+ parentRef.fIsTopLevel = true;
parentRef.fRes = parentRef.getResData().rootRes;
parentRef.fSize = res_countArrayItems(&parentRef.getResData(), parentRef.fRes);
parentRef.fIndex = -1;
@@ -2143,7 +2316,7 @@ void getAllItemsWithFallback(
StackUResourceBundle containerBundle;
const UResourceBundle *rb;
UErrorCode pathErrorCode = U_ZERO_ERROR; // Ignore if parents up to root do not have this path.
- if (bundle->fResPath == NULL || *bundle->fResPath == 0) {
+ if (bundle->fResPath == nullptr || *bundle->fResPath == 0) {
rb = parentBundle.getAlias();
} else {
rb = ures_getByKeyWithFallback(parentBundle.getAlias(), bundle->fResPath,
@@ -2259,13 +2432,13 @@ ures_getAllItemsWithFallback(const UResourceBundle *bundle, const char *path,
U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, const char* inKey, UResourceBundle *fillIn, UErrorCode *status) {
Resource res = RES_BOGUS;
- UResourceDataEntry *dataEntry = NULL;
+ UResourceDataEntry *dataEntry = nullptr;
const char *key = inKey;
- if (status==NULL || U_FAILURE(*status)) {
+ if (status==nullptr || U_FAILURE(*status)) {
return fillIn;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return fillIn;
}
@@ -2276,7 +2449,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con
res = res_getTableItemByKey(&resB->getResData(), resB->fRes, &t, &key);
if(res == RES_BOGUS) {
key = inKey;
- if(resB->fHasFallback == TRUE) {
+ if(resB->fHasFallback) {
dataEntry = getFallbackData(resB, &key, &res, status);
if(U_SUCCESS(*status)) {
/* check if resB->fResPath gives the right name here */
@@ -2294,7 +2467,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con
#if 0
/* this is a kind of TODO item. If we have an array with an index table, we could do this. */
/* not currently */
- else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == TRUE) {
+ else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == true) {
/* here should go a first attempt to locate the key using index table */
dataEntry = getFallbackData(resB, &key, &res, status);
if(U_SUCCESS(*status)) {
@@ -2310,17 +2483,17 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con
return fillIn;
}
-U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, const char* inKey, int32_t* len, UErrorCode *status) {
+U_CAPI const char16_t* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, const char* inKey, int32_t* len, UErrorCode *status) {
Resource res = RES_BOGUS;
- UResourceDataEntry *dataEntry = NULL;
+ UResourceDataEntry *dataEntry = nullptr;
const char* key = inKey;
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if(resB == NULL) {
+ if(resB == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
int32_t type = RES_GET_TYPE(resB->fRes);
@@ -2331,7 +2504,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
if(res == RES_BOGUS) {
key = inKey;
- if(resB->fHasFallback == TRUE) {
+ if(resB->fHasFallback) {
dataEntry = getFallbackData(resB, &key, &res, status);
if(U_SUCCESS(*status)) {
switch (RES_GET_TYPE(res)) {
@@ -2340,8 +2513,8 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
return res_getString({resB, key}, &dataEntry->fData, res, len);
case URES_ALIAS:
{
- const UChar* result = 0;
- UResourceBundle *tempRes = ures_getByKey(resB, inKey, NULL, status);
+ const char16_t* result = 0;
+ UResourceBundle *tempRes = ures_getByKey(resB, inKey, nullptr, status);
result = ures_getString(tempRes, len, status);
ures_close(tempRes);
return result;
@@ -2362,8 +2535,8 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
return res_getString({resB, key}, &resB->getResData(), res, len);
case URES_ALIAS:
{
- const UChar* result = 0;
- UResourceBundle *tempRes = ures_getByKey(resB, inKey, NULL, status);
+ const char16_t* result = 0;
+ UResourceBundle *tempRes = ures_getByKey(resB, inKey, nullptr, status);
result = ures_getString(tempRes, len, status);
ures_close(tempRes);
return result;
@@ -2376,7 +2549,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
#if 0
/* this is a kind of TODO item. If we have an array with an index table, we could do this. */
/* not currently */
- else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == TRUE) {
+ else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == true) {
/* here should go a first attempt to locate the key using index table */
dataEntry = getFallbackData(resB, &key, &res, status);
if(U_SUCCESS(*status)) {
@@ -2390,7 +2563,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
else {
*status = U_RESOURCE_TYPE_MISMATCH;
}
- return NULL;
+ return nullptr;
}
U_CAPI const char * U_EXPORT2
@@ -2400,7 +2573,7 @@ ures_getUTF8StringByKey(const UResourceBundle *resB,
UBool forceCopy,
UErrorCode *status) {
int32_t length16;
- const UChar *s16 = ures_getStringByKey(resB, key, &length16, status);
+ const char16_t *s16 = ures_getStringByKey(resB, key, &length16, status);
return ures_toUTF8String(s16, length16, dest, pLength, forceCopy, status);
}
@@ -2413,12 +2586,12 @@ ures_getUTF8StringByKey(const UResourceBundle *resB,
U_CAPI const char* U_EXPORT2
ures_getLocaleInternal(const UResourceBundle* resourceBundle, UErrorCode* status)
{
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
if (!resourceBundle) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
} else {
return resourceBundle->fData->fName;
}
@@ -2436,12 +2609,12 @@ U_CAPI const char* U_EXPORT2
ures_getLocaleByType(const UResourceBundle* resourceBundle,
ULocDataLocaleType type,
UErrorCode* status) {
- if (status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if (status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
if (!resourceBundle) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
} else {
switch(type) {
case ULOC_ACTUAL_LOCALE:
@@ -2451,14 +2624,14 @@ ures_getLocaleByType(const UResourceBundle* resourceBundle,
case ULOC_REQUESTED_LOCALE:
default:
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
}
}
U_CFUNC const char* ures_getName(const UResourceBundle* resB) {
- if(resB == NULL) {
- return NULL;
+ if(resB == nullptr) {
+ return nullptr;
}
return resB->fData->fName;
@@ -2466,8 +2639,8 @@ U_CFUNC const char* ures_getName(const UResourceBundle* resB) {
#ifdef URES_DEBUG
U_CFUNC const char* ures_getPath(const UResourceBundle* resB) {
- if(resB == NULL) {
- return NULL;
+ if(resB == nullptr) {
+ return nullptr;
}
return resB->fData->fPath;
@@ -2478,7 +2651,7 @@ static UResourceBundle*
ures_openWithType(UResourceBundle *r, const char* path, const char* localeID,
UResOpenType openType, UErrorCode* status) {
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
UResourceDataEntry *entry;
@@ -2488,39 +2661,39 @@ ures_openWithType(UResourceBundle *r, const char* path, const char* localeID,
uloc_getBaseName(localeID, canonLocaleID, UPRV_LENGTHOF(canonLocaleID), status);
if(U_FAILURE(*status) || *status == U_STRING_NOT_TERMINATED_WARNING) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
entry = entryOpen(path, canonLocaleID, openType, status);
} else {
entry = entryOpenDirect(path, localeID, status);
}
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if(entry == NULL) {
+ if(entry == nullptr) {
*status = U_MISSING_RESOURCE_ERROR;
- return NULL;
+ return nullptr;
}
UBool isStackObject;
- if(r == NULL) {
+ if(r == nullptr) {
r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle));
- if(r == NULL) {
+ if(r == nullptr) {
entryClose(entry);
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- isStackObject = FALSE;
+ isStackObject = false;
} else { // fill-in
isStackObject = ures_isStackObject(r);
- ures_closeBundle(r, FALSE);
+ ures_closeBundle(r, false);
}
uprv_memset(r, 0, sizeof(UResourceBundle));
ures_setIsStackObject(r, isStackObject);
r->fValidLocaleDataEntry = r->fData = entry;
r->fHasFallback = openType != URES_OPEN_DIRECT && !r->getResData().noFallback;
- r->fIsTopLevel = TRUE;
+ r->fIsTopLevel = true;
r->fRes = r->getResData().rootRes;
r->fSize = res_countArrayItems(&r->getResData(), r->fRes);
r->fIndex = -1;
@@ -2532,12 +2705,12 @@ ures_openWithType(UResourceBundle *r, const char* path, const char* localeID,
U_CAPI UResourceBundle* U_EXPORT2
ures_open(const char* path, const char* localeID, UErrorCode* status) {
- return ures_openWithType(NULL, path, localeID, URES_OPEN_LOCALE_DEFAULT_ROOT, status);
+ return ures_openWithType(nullptr, path, localeID, URES_OPEN_LOCALE_DEFAULT_ROOT, status);
}
U_CAPI UResourceBundle* U_EXPORT2
ures_openNoDefault(const char* path, const char* localeID, UErrorCode* status) {
- return ures_openWithType(NULL, path, localeID, URES_OPEN_LOCALE_ROOT, status);
+ return ures_openWithType(nullptr, path, localeID, URES_OPEN_LOCALE_ROOT, status);
}
/**
@@ -2546,7 +2719,7 @@ ures_openNoDefault(const char* path, const char* localeID, UErrorCode* status) {
*/
U_CAPI UResourceBundle* U_EXPORT2
ures_openDirect(const char* path, const char* localeID, UErrorCode* status) {
- return ures_openWithType(NULL, path, localeID, URES_OPEN_DIRECT, status);
+ return ures_openWithType(nullptr, path, localeID, URES_OPEN_DIRECT, status);
}
/**
@@ -2559,7 +2732,7 @@ ures_openDirect(const char* path, const char* localeID, UErrorCode* status) {
U_CAPI void U_EXPORT2
ures_openFillIn(UResourceBundle *r, const char* path,
const char* localeID, UErrorCode* status) {
- if(U_SUCCESS(*status) && r == NULL) {
+ if(U_SUCCESS(*status) && r == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -2571,7 +2744,7 @@ ures_openFillIn(UResourceBundle *r, const char* path,
*/
U_CAPI void U_EXPORT2
ures_openDirectFillIn(UResourceBundle *r, const char* path, const char* localeID, UErrorCode* status) {
- if(U_SUCCESS(*status) && r == NULL) {
+ if(U_SUCCESS(*status) && r == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -2589,16 +2762,16 @@ ures_countArrayItems(const UResourceBundle* resourceBundle,
{
UResourceBundle resData;
ures_initStackObject(&resData);
- if (status==NULL || U_FAILURE(*status)) {
+ if (status==nullptr || U_FAILURE(*status)) {
return 0;
}
- if(resourceBundle == NULL) {
+ if(resourceBundle == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
ures_getByKey(resourceBundle, resourceKey, &resData, status);
- if(resData.getResData().data != NULL) {
+ if(resData.getResData().data != nullptr) {
int32_t result = res_countArrayItems(&resData.getResData(), resData.fRes);
ures_close(&resData);
return result;
@@ -2622,9 +2795,9 @@ ures_countArrayItems(const UResourceBundle* resourceBundle,
U_CAPI const char* U_EXPORT2
ures_getVersionNumberInternal(const UResourceBundle *resourceBundle)
{
- if (!resourceBundle) return NULL;
+ if (!resourceBundle) return nullptr;
- if(resourceBundle->fVersion == NULL) {
+ if(resourceBundle->fVersion == nullptr) {
/* If the version ID has not been built yet, then do so. Retrieve */
/* the minor version from the file. */
@@ -2632,7 +2805,7 @@ ures_getVersionNumberInternal(const UResourceBundle *resourceBundle)
int32_t minor_len = 0;
int32_t len;
- const UChar* minor_version = ures_getStringByKey(resourceBundle, kVersionTag, &minor_len, &status);
+ const char16_t* minor_version = ures_getStringByKey(resourceBundle, kVersionTag, &minor_len, &status);
/* Determine the length of of the final version string. This is */
/* the length of the major part + the length of the separator */
@@ -2647,8 +2820,8 @@ ures_getVersionNumberInternal(const UResourceBundle *resourceBundle)
((UResourceBundle *)resourceBundle)->fVersion = (char *)uprv_malloc(1 + len);
/* Check for null pointer. */
- if (((UResourceBundle *)resourceBundle)->fVersion == NULL) {
- return NULL;
+ if (((UResourceBundle *)resourceBundle)->fVersion == nullptr) {
+ return nullptr;
}
if(minor_len > 0) {
@@ -2713,8 +2886,8 @@ ures_loc_nextLocale(UEnumeration* en,
UErrorCode* status) {
ULocalesContext *ctx = (ULocalesContext *)en->context;
UResourceBundle *res = &(ctx->installed);
- UResourceBundle *k = NULL;
- const char *result = NULL;
+ UResourceBundle *k = nullptr;
+ const char *result = nullptr;
int32_t len = 0;
if(ures_hasNext(res) && (k = ures_getNextResource(res, &ctx->curr, status)) != 0) {
result = ures_getKey(k);
@@ -2736,8 +2909,8 @@ ures_loc_resetLocales(UEnumeration* en,
U_CDECL_END
static const UEnumeration gLocalesEnum = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ures_loc_closeLocales,
ures_loc_countLocales,
uenum_unextDefault,
@@ -2749,12 +2922,12 @@ static const UEnumeration gLocalesEnum = {
U_CAPI UEnumeration* U_EXPORT2
ures_openAvailableLocales(const char *path, UErrorCode *status)
{
- UResourceBundle *idx = NULL;
- UEnumeration *en = NULL;
- ULocalesContext *myContext = NULL;
+ UResourceBundle *idx = nullptr;
+ UEnumeration *en = nullptr;
+ ULocalesContext *myContext = nullptr;
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
myContext = static_cast<ULocalesContext *>(uprv_malloc(sizeof(ULocalesContext)));
en = (UEnumeration *)uprv_malloc(sizeof(UEnumeration));
@@ -2762,7 +2935,7 @@ ures_openAvailableLocales(const char *path, UErrorCode *status)
*status = U_MEMORY_ALLOCATION_ERROR;
uprv_free(en);
uprv_free(myContext);
- return NULL;
+ return nullptr;
}
uprv_memcpy(en, &gLocalesEnum, sizeof(UEnumeration));
@@ -2783,7 +2956,7 @@ ures_openAvailableLocales(const char *path, UErrorCode *status)
ures_close(&myContext->installed);
uprv_free(myContext);
uprv_free(en);
- en = NULL;
+ en = nullptr;
}
ures_close(idx);
@@ -2793,12 +2966,12 @@ ures_openAvailableLocales(const char *path, UErrorCode *status)
static UBool isLocaleInList(UEnumeration *locEnum, const char *locToSearch, UErrorCode *status) {
const char *loc;
- while ((loc = uenum_next(locEnum, NULL, status)) != NULL) {
+ while ((loc = uenum_next(locEnum, nullptr, status)) != nullptr) {
if (uprv_strcmp(loc, locToSearch) == 0) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
U_CAPI int32_t U_EXPORT2
@@ -2814,7 +2987,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
char parent[1024] = "";
char full[1024] = "";
UResourceBundle bund1, bund2;
- UResourceBundle *res = NULL;
+ UResourceBundle *res = nullptr;
UErrorCode subStatus = U_ZERO_ERROR;
int32_t length = 0;
if(U_FAILURE(*status)) return 0;
@@ -2836,7 +3009,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
if(isAvailable) {
UEnumeration *locEnum = ures_openAvailableLocales(path, &subStatus);
- *isAvailable = TRUE;
+ *isAvailable = true;
if (U_SUCCESS(subStatus)) {
*isAvailable = isLocaleInList(locEnum, parent, &subStatus);
}
@@ -2854,9 +3027,9 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
if(((subStatus == U_USING_FALLBACK_WARNING) ||
(subStatus == U_USING_DEFAULT_WARNING)) && isAvailable)
{
- *isAvailable = FALSE;
+ *isAvailable = false;
}
- isAvailable = NULL; /* only want to set this the first time around */
+ 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));
@@ -2866,7 +3039,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
} else if(subStatus == U_ZERO_ERROR) {
ures_getByKey(res,resName,&bund1, &subStatus);
if(subStatus == U_ZERO_ERROR) {
- const UChar *defUstr;
+ const char16_t *defUstr;
int32_t defLen;
/* look for default item */
#if defined(URES_TREE_DEBUG)
@@ -2894,7 +3067,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
subStatus = U_ZERO_ERROR;
- if (res != NULL) {
+ if (res != nullptr) {
uprv_strcpy(found, ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus));
}
@@ -2910,9 +3083,9 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
subStatus = U_ZERO_ERROR;
res = ures_open(path, parent, &subStatus);
if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) {
- *isAvailable = FALSE;
+ *isAvailable = false;
}
- isAvailable = NULL; /* only want to set this the first time around */
+ isAvailable = nullptr; /* only want to set this the first time around */
#if defined(URES_TREE_DEBUG)
fprintf(stderr, "%s;%s -> %s (looking for %s)\n",
@@ -2941,7 +3114,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
}
/* now, recalculate default kw if need be */
if(uprv_strlen(defLoc) > uprv_strlen(full)) {
- const UChar *defUstr;
+ const char16_t *defUstr;
int32_t defLen;
/* look for default item */
#if defined(URES_TREE_DEBUG)
@@ -2991,9 +3164,9 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
subStatus = U_ZERO_ERROR;
res = ures_open(path, parent, &subStatus);
if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) {
- *isAvailable = FALSE;
+ *isAvailable = false;
}
- isAvailable = NULL; /* only want to set this the first time around */
+ isAvailable = nullptr; /* only want to set this the first time around */
#if defined(URES_TREE_DEBUG)
fprintf(stderr, "%s;%s -> %s (looking for default %s)\n",
@@ -3017,7 +3190,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
/* now, recalculate default kw if need be */
if(uprv_strlen(defLoc) > uprv_strlen(full)) {
- const UChar *defUstr;
+ const char16_t *defUstr;
int32_t defLen;
/* look for default item */
#if defined(URES_TREE_DEBUG)
@@ -3120,7 +3293,7 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
const char *locale;
int32_t locLen;
- UEnumeration *locs = NULL;
+ UEnumeration *locs = nullptr;
UResourceBundle item;
UResourceBundle subItem;
@@ -3132,15 +3305,15 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
if(U_FAILURE(*status)) {
ures_close(&item);
ures_close(&subItem);
- return NULL;
+ return nullptr;
}
valuesBuf[0]=0;
valuesBuf[1]=0;
while((locale = uenum_next(locs, &locLen, status)) != 0) {
- UResourceBundle *bund = NULL;
- UResourceBundle *subPtr = NULL;
+ UResourceBundle *bund = nullptr;
+ UResourceBundle *subPtr = nullptr;
UErrorCode subStatus = U_ZERO_ERROR; /* don't fail if a bundle is unopenable */
bund = ures_open(path, locale, &subStatus);
@@ -3159,7 +3332,7 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
path?path:"<ICUDATA>", keyword, locale, u_errorName(subStatus));
#endif
ures_close(bund);
- bund = NULL;
+ bund = nullptr;
continue;
}
@@ -3172,18 +3345,18 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
#if defined(URES_TREE_DEBUG)
/* fprintf(stderr, "%s | %s | %s | %s\n", path?path:"<ICUDATA>", keyword, locale, k); */
#endif
- if(k == NULL || *k == 0 ||
+ if(k == nullptr || *k == 0 ||
uprv_strcmp(k, DEFAULT_TAG) == 0 || uprv_strncmp(k, "private-", 8) == 0) {
// empty or "default" or unlisted type
continue;
}
for(i=0; i<valuesCount; i++) {
if(!uprv_strcmp(valuesList[i],k)) {
- k = NULL; /* found duplicate */
+ k = nullptr; /* found duplicate */
break;
}
}
- if(k != NULL) {
+ if(k != nullptr) {
int32_t kLen = (int32_t)uprv_strlen(k);
if((valuesCount >= (VALUES_LIST_SIZE-1)) || /* no more space in list .. */
((valuesIndex+kLen+1+1) >= VALUES_BUF_SIZE)) { /* no more space in buffer (string + 2 nulls) */
@@ -3217,50 +3390,50 @@ ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status)
/* This code isn't needed, and given the documentation warnings the implementation is suspect */
U_CAPI UBool U_EXPORT2
ures_equal(const UResourceBundle* res1, const UResourceBundle* res2){
- if(res1==NULL || res2==NULL){
+ if(res1==nullptr || res2==nullptr){
return res1==res2; /* pointer comparison */
}
- if(res1->fKey==NULL|| res2->fKey==NULL){
+ if(res1->fKey==nullptr|| res2->fKey==nullptr){
return (res1->fKey==res2->fKey);
}else{
if(uprv_strcmp(res1->fKey, res2->fKey)!=0){
- return FALSE;
+ return false;
}
}
if(uprv_strcmp(res1->fData->fName, res2->fData->fName)!=0){
- return FALSE;
+ return false;
}
- if(res1->fData->fPath == NULL|| res2->fData->fPath==NULL){
+ if(res1->fData->fPath == nullptr|| res2->fData->fPath==nullptr){
return (res1->fData->fPath == res2->fData->fPath);
}else{
if(uprv_strcmp(res1->fData->fPath, res2->fData->fPath)!=0){
- return FALSE;
+ return false;
}
}
if(uprv_strcmp(res1->fData->fParent->fName, res2->fData->fParent->fName)!=0){
- return FALSE;
+ return false;
}
if(uprv_strcmp(res1->fData->fParent->fPath, res2->fData->fParent->fPath)!=0){
- return FALSE;
+ return false;
}
if(uprv_strncmp(res1->fResPath, res2->fResPath, res1->fResPathLen)!=0){
- return FALSE;
+ return false;
}
if(res1->fRes != res2->fRes){
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
U_CAPI UResourceBundle* U_EXPORT2
ures_clone(const UResourceBundle* res, UErrorCode* status){
- UResourceBundle* bundle = NULL;
- UResourceBundle* ret = NULL;
- if(U_FAILURE(*status) || res == NULL){
- return NULL;
+ UResourceBundle* bundle = nullptr;
+ UResourceBundle* ret = nullptr;
+ if(U_FAILURE(*status) || res == nullptr){
+ return nullptr;
}
bundle = ures_open(res->fData->fPath, res->fData->fName, status);
- if(res->fResPath!=NULL){
- ret = ures_findSubResource(bundle, res->fResPath, NULL, status);
+ if(res->fResPath!=nullptr){
+ ret = ures_findSubResource(bundle, res->fResPath, nullptr, status);
ures_close(bundle);
}else{
ret = bundle;
@@ -3269,8 +3442,8 @@ ures_clone(const UResourceBundle* res, UErrorCode* status){
}
U_CAPI const UResourceBundle* U_EXPORT2
ures_getParentBundle(const UResourceBundle* res){
- if(res==NULL){
- return NULL;
+ if(res==nullptr){
+ return nullptr;
}
return res->fParentRes;
}
@@ -3278,7 +3451,7 @@ ures_getParentBundle(const UResourceBundle* res){
U_CAPI void U_EXPORT2
ures_getVersionByKey(const UResourceBundle* res, const char *key, UVersionInfo ver, UErrorCode *status) {
- const UChar *str;
+ const char16_t *str;
int32_t len;
str = ures_getStringByKey(res, key, &len, status);
if(U_SUCCESS(*status)) {
diff --git a/contrib/libs/icu/common/uresdata.cpp b/contrib/libs/icu/common/uresdata.cpp
index 9af081be408..b219e40e218 100644
--- a/contrib/libs/icu/common/uresdata.cpp
+++ b/contrib/libs/icu/common/uresdata.cpp
@@ -62,8 +62,8 @@ static const struct {
static const struct {
int32_t length;
- UChar nul;
- UChar pad;
+ char16_t nul;
+ char16_t pad;
} gEmptyString={ 0, 0, 0 };
/*
@@ -234,7 +234,7 @@ res_init(ResourceData *pResData,
* formatVersion 1: compare key strings in native-charset order
* formatVersion 2 and up: compare key strings in ASCII order
*/
- pResData->useNativeStrcmp=TRUE;
+ pResData->useNativeStrcmp=true;
}
}
@@ -248,7 +248,7 @@ res_read(ResourceData *pResData,
if(U_FAILURE(*errorCode)) {
return;
}
- if(!isAcceptable(formatVersion, NULL, NULL, pInfo)) {
+ if(!isAcceptable(formatVersion, nullptr, nullptr, pInfo)) {
*errorCode=U_INVALID_FORMAT_ERROR;
return;
}
@@ -274,9 +274,9 @@ res_load(ResourceData *pResData,
U_CFUNC void
res_unload(ResourceData *pResData) {
- if(pResData->data!=NULL) {
+ if(pResData->data!=nullptr) {
udata_close(pResData->data);
- pResData->data=NULL;
+ pResData->data=nullptr;
}
}
@@ -307,17 +307,17 @@ res_getPublicType(Resource res) {
return (UResType)gPublicTypes[RES_GET_TYPE(res)];
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
res_getStringNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength) {
- const UChar *p;
+ const char16_t *p;
uint32_t offset=RES_GET_OFFSET(res);
int32_t length;
if(RES_GET_TYPE(res)==URES_STRING_V2) {
int32_t first;
if((int32_t)offset<pResData->poolStringIndexLimit) {
- p=(const UChar *)pResData->poolBundleStrings+offset;
+ p=(const char16_t *)pResData->poolBundleStrings+offset;
} else {
- p=(const UChar *)pResData->p16BitUnits+(offset-pResData->poolStringIndexLimit);
+ p=(const char16_t *)pResData->p16BitUnits+(offset-pResData->poolStringIndexLimit);
}
first=*p;
if(!U16_IS_TRAIL(first)) {
@@ -335,9 +335,9 @@ res_getStringNoTrace(const ResourceData *pResData, Resource res, int32_t *pLengt
} else if(res==offset) /* RES_GET_TYPE(res)==URES_STRING */ {
const int32_t *p32= res==0 ? &gEmptyString.length : pResData->pRoot+res;
length=*p32++;
- p=(const UChar *)p32;
+ p=(const char16_t *)p32;
} else {
- p=NULL;
+ p=nullptr;
length=0;
}
if(pLength) {
@@ -361,14 +361,14 @@ UBool isNoInheritanceMarker(const ResourceData *pResData, Resource res) {
} else if (res == offset) {
const int32_t *p32=pResData->pRoot+res;
int32_t length=*p32;
- const UChar *p=(const UChar *)p32;
+ const char16_t *p=(const char16_t *)p32;
return length == 3 && p[2] == 0x2205 && p[3] == 0x2205 && p[4] == 0x2205;
} else if (RES_GET_TYPE(res) == URES_STRING_V2) {
- const UChar *p;
+ const char16_t *p;
if((int32_t)offset<pResData->poolStringIndexLimit) {
- p=(const UChar *)pResData->poolBundleStrings+offset;
+ p=(const char16_t *)pResData->poolBundleStrings+offset;
} else {
- p=(const UChar *)pResData->p16BitUnits+(offset-pResData->poolStringIndexLimit);
+ p=(const char16_t *)pResData->p16BitUnits+(offset-pResData->poolStringIndexLimit);
}
int32_t first=*p;
if (first == 0x2205) { // implicit length
@@ -377,10 +377,10 @@ UBool isNoInheritanceMarker(const ResourceData *pResData, Resource res) {
return p[1] == 0x2205 && p[2] == 0x2205 && p[3] == 0x2205;
} else {
// Assume that the string has not been stored with more length units than necessary.
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
int32_t getStringArray(const ResourceData *pResData, const icu::ResourceArray &array,
@@ -389,7 +389,7 @@ int32_t getStringArray(const ResourceData *pResData, const icu::ResourceArray &a
if(U_FAILURE(errorCode)) {
return 0;
}
- if(dest == NULL ? capacity != 0 : capacity < 0) {
+ if(dest == nullptr ? capacity != 0 : capacity < 0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -404,29 +404,29 @@ int32_t getStringArray(const ResourceData *pResData, const icu::ResourceArray &a
for(int32_t i = 0; i < length; ++i) {
int32_t sLength;
// No tracing: handled by the caller
- const UChar *s = res_getStringNoTrace(pResData, array.internalGetResource(pResData, i), &sLength);
- if(s == NULL) {
+ const char16_t *s = res_getStringNoTrace(pResData, array.internalGetResource(pResData, i), &sLength);
+ if(s == nullptr) {
errorCode = U_RESOURCE_TYPE_MISMATCH;
return 0;
}
- dest[i].setTo(TRUE, s, sLength);
+ dest[i].setTo(true, s, sLength);
}
return length;
}
} // namespace
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
res_getAlias(const ResourceData *pResData, Resource res, int32_t *pLength) {
- const UChar *p;
+ const char16_t *p;
uint32_t offset=RES_GET_OFFSET(res);
int32_t length;
if(RES_GET_TYPE(res)==URES_ALIAS) {
const int32_t *p32= offset==0 ? &gEmptyString.length : pResData->pRoot+offset;
length=*p32++;
- p=(const UChar *)p32;
+ p=(const char16_t *)p32;
} else {
- p=NULL;
+ p=nullptr;
length=0;
}
if(pLength) {
@@ -445,7 +445,7 @@ res_getBinaryNoTrace(const ResourceData *pResData, Resource res, int32_t *pLengt
length=*p32++;
p=(const uint8_t *)p32;
} else {
- p=NULL;
+ p=nullptr;
length=0;
}
if(pLength) {
@@ -464,7 +464,7 @@ res_getIntVectorNoTrace(const ResourceData *pResData, Resource res, int32_t *pLe
p= offset==0 ? (const int32_t *)&gEmpty32 : pResData->pRoot+offset;
length=*p++;
} else {
- p=NULL;
+ p=nullptr;
length=0;
}
if(pLength) {
@@ -505,23 +505,23 @@ UResType ResourceDataValue::getType() const {
return res_getPublicType(res);
}
-const UChar *ResourceDataValue::getString(int32_t &length, UErrorCode &errorCode) const {
+const char16_t *ResourceDataValue::getString(int32_t &length, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
- const UChar *s = res_getString(fTraceInfo, &getData(), res, &length);
- if(s == NULL) {
+ const char16_t *s = res_getString(fTraceInfo, &getData(), res, &length);
+ if(s == nullptr) {
errorCode = U_RESOURCE_TYPE_MISMATCH;
}
return s;
}
-const UChar *ResourceDataValue::getAliasString(int32_t &length, UErrorCode &errorCode) const {
+const char16_t *ResourceDataValue::getAliasString(int32_t &length, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
- const UChar *s = res_getAlias(&getData(), res, &length);
- if(s == NULL) {
+ const char16_t *s = res_getAlias(&getData(), res, &length);
+ if(s == nullptr) {
errorCode = U_RESOURCE_TYPE_MISMATCH;
}
return s;
@@ -549,10 +549,10 @@ uint32_t ResourceDataValue::getUInt(UErrorCode &errorCode) const {
const int32_t *ResourceDataValue::getIntVector(int32_t &length, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
const int32_t *iv = res_getIntVector(fTraceInfo, &getData(), res, &length);
- if(iv == NULL) {
+ if(iv == nullptr) {
errorCode = U_RESOURCE_TYPE_MISMATCH;
}
return iv;
@@ -560,10 +560,10 @@ const int32_t *ResourceDataValue::getIntVector(int32_t &length, UErrorCode &erro
const uint8_t *ResourceDataValue::getBinary(int32_t &length, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
const uint8_t *b = res_getBinary(fTraceInfo, &getData(), res, &length);
- if(b == NULL) {
+ if(b == nullptr) {
errorCode = U_RESOURCE_TYPE_MISMATCH;
}
return b;
@@ -573,8 +573,8 @@ ResourceArray ResourceDataValue::getArray(UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
return ResourceArray();
}
- const uint16_t *items16 = NULL;
- const Resource *items32 = NULL;
+ const uint16_t *items16 = nullptr;
+ const Resource *items32 = nullptr;
uint32_t offset=RES_GET_OFFSET(res);
int32_t length = 0;
switch(RES_GET_TYPE(res)) {
@@ -599,10 +599,10 @@ ResourceTable ResourceDataValue::getTable(UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
return ResourceTable();
}
- const uint16_t *keys16 = NULL;
- const int32_t *keys32 = NULL;
- const uint16_t *items16 = NULL;
- const Resource *items32 = NULL;
+ const uint16_t *keys16 = nullptr;
+ const int32_t *keys32 = nullptr;
+ const uint16_t *items16 = nullptr;
+ const Resource *items32 = nullptr;
uint32_t offset = RES_GET_OFFSET(res);
int32_t length = 0;
switch(RES_GET_TYPE(res)) {
@@ -649,7 +649,7 @@ int32_t ResourceDataValue::getStringArrayOrStringAsArray(UnicodeString *dest, in
if(U_FAILURE(errorCode)) {
return 0;
}
- if(dest == NULL ? capacity != 0 : capacity < 0) {
+ if(dest == nullptr ? capacity != 0 : capacity < 0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -658,9 +658,9 @@ int32_t ResourceDataValue::getStringArrayOrStringAsArray(UnicodeString *dest, in
return 1;
}
int32_t sLength;
- const UChar *s = res_getString(fTraceInfo, &getData(), res, &sLength);
- if(s != NULL) {
- dest[0].setTo(TRUE, s, sLength);
+ const char16_t *s = res_getString(fTraceInfo, &getData(), res, &sLength);
+ if(s != nullptr) {
+ dest[0].setTo(true, s, sLength);
return 1;
}
errorCode = U_RESOURCE_TYPE_MISMATCH;
@@ -673,9 +673,9 @@ UnicodeString ResourceDataValue::getStringOrFirstOfArray(UErrorCode &errorCode)
return us;
}
int32_t sLength;
- const UChar *s = res_getString(fTraceInfo, &getData(), res, &sLength);
- if(s != NULL) {
- us.setTo(TRUE, s, sLength);
+ const char16_t *s = res_getString(fTraceInfo, &getData(), res, &sLength);
+ if(s != nullptr) {
+ us.setTo(true, s, sLength);
return us;
}
ResourceArray array = getArray(errorCode);
@@ -685,8 +685,8 @@ UnicodeString ResourceDataValue::getStringOrFirstOfArray(UErrorCode &errorCode)
if(array.getSize() > 0) {
// Tracing is already performed above (unimportant for trace that this is an array)
s = res_getStringNoTrace(&getData(), array.internalGetResource(&getData(), 0), &sLength);
- if(s != NULL) {
- us.setTo(TRUE, s, sLength);
+ if(s != nullptr) {
+ us.setTo(true, s, sLength);
return us;
}
}
@@ -714,7 +714,7 @@ res_getTableItemByKey(const ResourceData *pResData, Resource table,
uint32_t offset=RES_GET_OFFSET(table);
int32_t length;
int32_t idx;
- if(key == NULL || *key == NULL) {
+ if(key == nullptr || *key == nullptr) {
return RES_BOGUS;
}
switch(RES_GET_TYPE(table)) {
@@ -771,7 +771,7 @@ res_getTableItemByIndex(const ResourceData *pResData, Resource table,
length=*p++;
if(indexR<length) {
const Resource *p32=(const Resource *)(p+length+(~length&1));
- if(key!=NULL) {
+ if(key!=nullptr) {
*key=RES_GET_KEY16(pResData, p[indexR]);
}
return p32[indexR];
@@ -783,7 +783,7 @@ res_getTableItemByIndex(const ResourceData *pResData, Resource table,
const uint16_t *p=pResData->p16BitUnits+offset;
length=*p++;
if(indexR<length) {
- if(key!=NULL) {
+ if(key!=nullptr) {
*key=RES_GET_KEY16(pResData, p[indexR]);
}
return makeResourceFrom16(pResData, p[length+indexR]);
@@ -795,7 +795,7 @@ res_getTableItemByIndex(const ResourceData *pResData, Resource table,
const int32_t *p= pResData->pRoot+offset;
length=*p++;
if(indexR<length) {
- if(key!=NULL) {
+ if(key!=nullptr) {
*key=RES_GET_KEY32(pResData, p[indexR]);
}
return (Resource)p[length+indexR];
@@ -837,9 +837,9 @@ UBool icu::ResourceTable::getKeyAndValue(int32_t i,
// alive for the duration that fields are being read from it
// (including nested fields).
rdValue.setResource(res, ResourceTracer(fTraceInfo, key));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UBool icu::ResourceTable::findValue(const char *key, ResourceValue &value) const {
@@ -860,9 +860,9 @@ UBool icu::ResourceTable::findValue(const char *key, ResourceValue &value) const
}
// Same note about lifetime as in getKeyAndValue().
rdValue.setResource(res, ResourceTracer(fTraceInfo, key));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CAPI Resource U_EXPORT2
@@ -895,7 +895,7 @@ res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexR) {
}
uint32_t icu::ResourceArray::internalGetResource(const ResourceData *pResData, int32_t i) const {
- if (items16 != NULL) {
+ if (items16 != nullptr) {
return makeResourceFrom16(pResData, items16[i]);
} else {
return items32[i];
@@ -912,15 +912,15 @@ UBool icu::ResourceArray::getValue(int32_t i, icu::ResourceValue &value) const {
rdValue.setResource(
internalGetResource(&rdValue.getData(), i),
ResourceTracer(fTraceInfo, i));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
U_CFUNC Resource
res_findResource(const ResourceData *pResData, Resource r, char** path, const char** key) {
char *pathP = *path, *nextSepP = *path;
- char *closeIndex = NULL;
+ char *closeIndex = nullptr;
Resource t1 = r;
Resource t2;
int32_t indexR = 0;
@@ -944,7 +944,7 @@ res_findResource(const ResourceData *pResData, Resource r, char** path, const ch
/* if there are more separators, terminate string
* and set path to the remaining part of the string
*/
- if(nextSepP != NULL) {
+ if(nextSepP != nullptr) {
if(nextSepP == pathP) {
// Empty key string.
return RES_BOGUS;
@@ -967,7 +967,7 @@ res_findResource(const ResourceData *pResData, Resource r, char** path, const ch
} else {
t2 = RES_BOGUS; /* have an array, but don't have a valid index */
}
- *key = NULL;
+ *key = nullptr;
} else { /* can't do much here, except setting t2 to bogus */
t2 = RES_BOGUS;
}
@@ -1041,7 +1041,7 @@ enum {
static const char *const gUnknownKey="";
/* resource table key for collation binaries: "%%CollationBin" */
-static const UChar gCollationBinKey[]={
+static const char16_t gCollationBinKey[]={
0x25, 0x25,
0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x42, 0x69, 0x6e,
@@ -1098,7 +1098,7 @@ ures_swapResource(const UDataSwapper *ds,
count=udata_readInt32(ds, (int32_t)*p);
/* swap length */
ds->swapArray32(ds, p, 4, q, pErrorCode);
- /* swap each UChar (the terminating NUL would not change) */
+ /* swap each char16_t (the terminating NUL would not change) */
ds->swapArray16(ds, p+1, 2*count, q+1, pErrorCode);
break;
case URES_BINARY:
@@ -1109,7 +1109,7 @@ ures_swapResource(const UDataSwapper *ds,
/* swap known formats */
#if !UCONFIG_NO_COLLATION
- if( key!=NULL && /* the binary is in a table */
+ if( key!=nullptr && /* the binary is in a table */
(key!=gUnknownKey ?
/* its table key string is "%%CollationBin" */
0==ds->compareInvChars(ds, key, -1,
@@ -1139,7 +1139,7 @@ ures_swapResource(const UDataSwapper *ds,
qKey16=(uint16_t *)q;
count=ds->readUInt16(*pKey16);
- pKey32=qKey32=NULL;
+ pKey32=qKey32=nullptr;
/* swap count */
ds->swapArray16(ds, pKey16++, 2, qKey16++, pErrorCode);
@@ -1151,7 +1151,7 @@ ures_swapResource(const UDataSwapper *ds,
qKey32=(int32_t *)q;
count=udata_readInt32(ds, *pKey32);
- pKey16=qKey16=NULL;
+ pKey16=qKey16=nullptr;
/* swap count */
ds->swapArray32(ds, pKey32++, 4, qKey32++, pErrorCode);
@@ -1169,7 +1169,7 @@ ures_swapResource(const UDataSwapper *ds,
/* recurse */
for(i=0; i<count; ++i) {
const char *itemKey=gUnknownKey;
- if(pKey16!=NULL) {
+ if(pKey16!=nullptr) {
int32_t keyOffset=ds->readUInt16(pKey16[i]);
if(keyOffset<pTempTable->localKeyLimit) {
itemKey=(const char *)outBundle+keyOffset;
@@ -1191,7 +1191,7 @@ ures_swapResource(const UDataSwapper *ds,
if(pTempTable->majorFormatVersion>1 || ds->inCharset==ds->outCharset) {
/* no need to sort, just swap the offset/value arrays */
- if(pKey16!=NULL) {
+ if(pKey16!=nullptr) {
ds->swapArray16(ds, pKey16, count*2, qKey16, pErrorCode);
ds->swapArray32(ds, p, count*4, q, pErrorCode);
} else {
@@ -1209,7 +1209,7 @@ ures_swapResource(const UDataSwapper *ds,
* sorting indexes and sort that.
* Then we permutate and copy/swap the actual values.
*/
- if(pKey16!=NULL) {
+ if(pKey16!=nullptr) {
for(i=0; i<count; ++i) {
pTempTable->rows[i].keyIndex=ds->readUInt16(pKey16[i]);
pTempTable->rows[i].sortIndex=i;
@@ -1222,7 +1222,7 @@ ures_swapResource(const UDataSwapper *ds,
}
uprv_sortArray(pTempTable->rows, count, sizeof(Row),
ures_compareRows, pTempTable->keyChars,
- FALSE, pErrorCode);
+ false, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
udata_printError(ds, "ures_swapResource(table res=%08x).uprv_sortArray(%d items) failed\n",
res, count);
@@ -1237,7 +1237,7 @@ ures_swapResource(const UDataSwapper *ds,
* before the results are copied to the outBundle.
*/
/* keys */
- if(pKey16!=NULL) {
+ if(pKey16!=nullptr) {
uint16_t *rKey16;
if(pKey16!=qKey16) {
@@ -1301,7 +1301,7 @@ ures_swapResource(const UDataSwapper *ds,
/* recurse */
for(i=0; i<count; ++i) {
item=ds->readUInt32(p[i]);
- ures_swapResource(ds, inBundle, outBundle, item, NULL, pTempTable, pErrorCode);
+ ures_swapResource(ds, inBundle, outBundle, item, nullptr, pTempTable, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
udata_printError(ds, "ures_swapResource(array res=%08x)[%d].recurse(%08x) failed\n",
res, i, item);
@@ -1345,7 +1345,7 @@ ures_swap(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -1439,7 +1439,7 @@ ures_swap(const UDataSwapper *ds,
tempTable.resFlags=stackResFlags;
} else {
tempTable.resFlags=(uint32_t *)uprv_malloc(resFlagsLength);
- if(tempTable.resFlags==NULL) {
+ if(tempTable.resFlags==nullptr) {
udata_printError(ds, "ures_swap(): unable to allocate memory for tracking resources\n");
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return 0;
@@ -1476,7 +1476,7 @@ ures_swap(const UDataSwapper *ds,
tempTable.resort=resort;
} else {
tempTable.rows=(Row *)uprv_malloc(maxTableLength*sizeof(Row)+maxTableLength*4);
- if(tempTable.rows==NULL) {
+ if(tempTable.rows==nullptr) {
udata_printError(ds, "ures_swap(): unable to allocate memory for sorting tables (max length: %d)\n",
maxTableLength);
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
@@ -1489,7 +1489,7 @@ ures_swap(const UDataSwapper *ds,
}
/* swap the resources */
- ures_swapResource(ds, inBundle, outBundle, rootRes, NULL, &tempTable, pErrorCode);
+ ures_swapResource(ds, inBundle, outBundle, rootRes, nullptr, &tempTable, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
udata_printError(ds, "ures_swapResource(root res=%08x) failed\n",
rootRes);
diff --git a/contrib/libs/icu/common/uresdata.h b/contrib/libs/icu/common/uresdata.h
index b8a3adba634..171189051f1 100644
--- a/contrib/libs/icu/common/uresdata.h
+++ b/contrib/libs/icu/common/uresdata.h
@@ -482,7 +482,7 @@ U_CFUNC Resource res_findResource(const ResourceData *pResData, Resource r,
U_NAMESPACE_BEGIN
-inline const UChar* res_getString(const ResourceTracer& traceInfo,
+inline const char16_t* res_getString(const ResourceTracer& traceInfo,
const ResourceData *pResData, Resource res, int32_t *pLength) {
traceInfo.trace("string");
return res_getStringNoTrace(pResData, res, pLength);
@@ -536,8 +536,8 @@ public:
UResourceDataEntry *getValidLocaleDataEntry() const { return validLocaleDataEntry; }
Resource getResource() const { return res; }
virtual UResType getType() const override;
- virtual const UChar *getString(int32_t &length, UErrorCode &errorCode) const override;
- virtual const UChar *getAliasString(int32_t &length, UErrorCode &errorCode) const override;
+ virtual const char16_t *getString(int32_t &length, UErrorCode &errorCode) const override;
+ virtual const char16_t *getAliasString(int32_t &length, UErrorCode &errorCode) const override;
virtual int32_t getInt(UErrorCode &errorCode) const override;
virtual uint32_t getUInt(UErrorCode &errorCode) const override;
virtual const int32_t *getIntVector(int32_t &length, UErrorCode &errorCode) const override;
diff --git a/contrib/libs/icu/common/uresimp.h b/contrib/libs/icu/common/uresimp.h
index 4ac09bd8c4d..8a1679717e5 100644
--- a/contrib/libs/icu/common/uresimp.h
+++ b/contrib/libs/icu/common/uresimp.h
@@ -118,10 +118,10 @@ U_NAMESPACE_BEGIN
class U_COMMON_API StackUResourceBundle {
public:
// No heap allocation. Use only on the stack.
- static void* U_EXPORT2 operator new(size_t) U_NOEXCEPT = delete;
- static void* U_EXPORT2 operator new[](size_t) U_NOEXCEPT = delete;
+ 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*) U_NOEXCEPT = delete;
+ static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete;
#endif
StackUResourceBundle();
diff --git a/contrib/libs/icu/common/usc_impl.cpp b/contrib/libs/icu/common/usc_impl.cpp
index 111029b9749..cd5a4e5b8db 100644
--- a/contrib/libs/icu/common/usc_impl.cpp
+++ b/contrib/libs/icu/common/usc_impl.cpp
@@ -41,7 +41,7 @@ struct ParenStackEntry
struct UScriptRun
{
int32_t textLength;
- const UChar *textArray;
+ const char16_t *textArray;
int32_t scriptStart;
int32_t scriptLimit;
@@ -189,19 +189,19 @@ sameScript(UScriptCode scriptOne, UScriptCode scriptTwo)
}
U_CAPI UScriptRun * U_EXPORT2
-uscript_openRun(const UChar *src, int32_t length, UErrorCode *pErrorCode)
+uscript_openRun(const char16_t *src, int32_t length, UErrorCode *pErrorCode)
{
- UScriptRun *result = NULL;
+ UScriptRun *result = nullptr;
- if (pErrorCode == NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
+ if (pErrorCode == nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
}
result = (UScriptRun *)uprv_malloc(sizeof (UScriptRun));
- if (result == NULL) {
+ if (result == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uscript_setRunText(result, src, length, pErrorCode);
@@ -209,7 +209,7 @@ uscript_openRun(const UChar *src, int32_t length, UErrorCode *pErrorCode)
/* Release the UScriptRun if uscript_setRunText() returns an error */
if (U_FAILURE(*pErrorCode)) {
uprv_free(result);
- result = NULL;
+ result = nullptr;
}
return result;
@@ -218,7 +218,7 @@ uscript_openRun(const UChar *src, int32_t length, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2
uscript_closeRun(UScriptRun *scriptRun)
{
- if (scriptRun != NULL) {
+ if (scriptRun != nullptr) {
uprv_free(scriptRun);
}
}
@@ -226,7 +226,7 @@ uscript_closeRun(UScriptRun *scriptRun)
U_CAPI void U_EXPORT2
uscript_resetRun(UScriptRun *scriptRun)
{
- if (scriptRun != NULL) {
+ if (scriptRun != nullptr) {
scriptRun->scriptStart = 0;
scriptRun->scriptLimit = 0;
scriptRun->scriptCode = USCRIPT_INVALID_CODE;
@@ -237,13 +237,13 @@ uscript_resetRun(UScriptRun *scriptRun)
}
U_CAPI void U_EXPORT2
-uscript_setRunText(UScriptRun *scriptRun, const UChar *src, int32_t length, UErrorCode *pErrorCode)
+uscript_setRunText(UScriptRun *scriptRun, const char16_t *src, int32_t length, UErrorCode *pErrorCode)
{
- if (pErrorCode == NULL || U_FAILURE(*pErrorCode)) {
+ if (pErrorCode == nullptr || U_FAILURE(*pErrorCode)) {
return;
}
- if (scriptRun == NULL || length < 0 || ((src == NULL) != (length == 0))) {
+ if (scriptRun == nullptr || length < 0 || ((src == nullptr) != (length == 0))) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -260,16 +260,16 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
UErrorCode error = U_ZERO_ERROR;
/* if we've fallen off the end of the text, we're done */
- if (scriptRun == NULL || scriptRun->scriptLimit >= scriptRun->textLength) {
- return FALSE;
+ if (scriptRun == nullptr || scriptRun->scriptLimit >= scriptRun->textLength) {
+ return false;
}
SYNC_FIXUP(scriptRun);
scriptRun->scriptCode = USCRIPT_COMMON;
for (scriptRun->scriptStart = scriptRun->scriptLimit; scriptRun->scriptLimit < scriptRun->textLength; scriptRun->scriptLimit += 1) {
- UChar high = scriptRun->textArray[scriptRun->scriptLimit];
- UChar32 ch = high;
+ char16_t high = scriptRun->textArray[scriptRun->scriptLimit];
+ UChar32 ch = high;
UScriptCode sc;
int32_t pairIndex;
@@ -278,7 +278,7 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
* in the text, see if it's followed by a low surrogate
*/
if (high >= 0xD800 && high <= 0xDBFF && scriptRun->scriptLimit < scriptRun->textLength - 1) {
- UChar low = scriptRun->textArray[scriptRun->scriptLimit + 1];
+ char16_t low = scriptRun->textArray[scriptRun->scriptLimit + 1];
/*
* if it is followed by a low surrogate,
@@ -345,17 +345,17 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
}
- if (pRunStart != NULL) {
+ if (pRunStart != nullptr) {
*pRunStart = scriptRun->scriptStart;
}
- if (pRunLimit != NULL) {
+ if (pRunLimit != nullptr) {
*pRunLimit = scriptRun->scriptLimit;
}
- if (pRunScript != NULL) {
+ if (pRunScript != nullptr) {
*pRunScript = scriptRun->scriptCode;
}
- return TRUE;
+ return true;
}
diff --git a/contrib/libs/icu/common/uscript.cpp b/contrib/libs/icu/common/uscript.cpp
index f8bd7e7fdd1..3cc2b6675c9 100644
--- a/contrib/libs/icu/common/uscript.cpp
+++ b/contrib/libs/icu/common/uscript.cpp
@@ -107,20 +107,33 @@ uscript_getCode(const char* nameOrAbbrOrLocale,
if(U_FAILURE(*err)) {
return 0;
}
- if(nameOrAbbrOrLocale==NULL ||
- (fillIn == NULL ? capacity != 0 : capacity < 0)) {
+ if(nameOrAbbrOrLocale==nullptr ||
+ (fillIn == nullptr ? capacity != 0 : capacity < 0)) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- triedCode = FALSE;
- if(uprv_strchr(nameOrAbbrOrLocale, '-')==NULL && uprv_strchr(nameOrAbbrOrLocale, '_')==NULL ){
+ triedCode = false;
+ const char* lastSepPtr = uprv_strrchr(nameOrAbbrOrLocale, '-');
+ if (lastSepPtr==nullptr) {
+ lastSepPtr = uprv_strrchr(nameOrAbbrOrLocale, '_');
+ }
+ // Favor interpretation of nameOrAbbrOrLocale as a script alias if either
+ // 1. nameOrAbbrOrLocale does not contain -/_. Handles Han, Mro, Nko, etc.
+ // 2. The last instance of -/_ is at offset 3, and the portion after that is
+ // longer than 4 characters (i.e. not a script or region code). This handles
+ // Old_Hungarian, Old_Italic, etc. ("old" is a valid language code)
+ // 3. The last instance of -/_ is at offset 7, and the portion after that is
+ // 3 characters. This handles New_Tai_Lue ("new" is a valid language code).
+ if (lastSepPtr==nullptr
+ || (lastSepPtr-nameOrAbbrOrLocale == 3 && uprv_strlen(nameOrAbbrOrLocale) > 8)
+ || (lastSepPtr-nameOrAbbrOrLocale == 7 && uprv_strlen(nameOrAbbrOrLocale) == 11) ) {
/* try long and abbreviated script names first */
UScriptCode code = (UScriptCode) u_getPropertyValueEnum(UCHAR_SCRIPT, nameOrAbbrOrLocale);
if(code!=USCRIPT_INVALID_CODE) {
return setOneCode(code, fillIn, capacity, err);
}
- triedCode = TRUE;
+ triedCode = true;
}
internalErrorCode = U_ZERO_ERROR;
length = getCodesFromLocale(nameOrAbbrOrLocale, fillIn, capacity, err);
diff --git a/contrib/libs/icu/common/uscript_props.cpp b/contrib/libs/icu/common/uscript_props.cpp
index 07bae251ea3..b26164408a4 100644
--- a/contrib/libs/icu/common/uscript_props.cpp
+++ b/contrib/libs/icu/common/uscript_props.cpp
@@ -242,6 +242,8 @@ const int32_t SCRIPT_PROPS[] = {
0x16ABC | EXCLUSION, // Tnsa
0x1E290 | EXCLUSION, // Toto
0x10582 | EXCLUSION | CASED, // Vith
+ 0x11F1B | EXCLUSION | LB_LETTERS, // Kawi
+ 0x1E4E6 | EXCLUSION, // Nagm
// End copy-paste from parsescriptmetadata.py
};
@@ -256,9 +258,9 @@ int32_t getScriptProps(UScriptCode script) {
} // namespace
U_CAPI int32_t U_EXPORT2
-uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode) {
+uscript_getSampleString(UScriptCode script, char16_t *dest, int32_t capacity, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) { return 0; }
- if(capacity < 0 || (capacity > 0 && dest == NULL)) {
+ if(capacity < 0 || (capacity > 0 && dest == nullptr)) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
diff --git a/contrib/libs/icu/common/uset.cpp b/contrib/libs/icu/common/uset.cpp
index 871a5d8986f..b2d0b91d4b6 100644
--- a/contrib/libs/icu/common/uset.cpp
+++ b/contrib/libs/icu/common/uset.cpp
@@ -87,14 +87,14 @@ uset_addRange(USet* set, UChar32 start, UChar32 end) {
}
U_CAPI void U_EXPORT2
-uset_addString(USet* set, const UChar* str, int32_t strLen) {
+uset_addString(USet* set, const char16_t* str, int32_t strLen) {
// UnicodeString handles -1 for strLen
UnicodeString s(strLen<0, str, strLen);
((UnicodeSet*) set)->UnicodeSet::add(s);
}
U_CAPI void U_EXPORT2
-uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen) {
+uset_addAllCodePoints(USet* set, const char16_t *str, int32_t strLen) {
// UnicodeString handles -1 for strLen
UnicodeString s(str, strLen);
((UnicodeSet*) set)->UnicodeSet::addAll(s);
@@ -111,13 +111,13 @@ uset_removeRange(USet* set, UChar32 start, UChar32 end) {
}
U_CAPI void U_EXPORT2
-uset_removeString(USet* set, const UChar* str, int32_t strLen) {
+uset_removeString(USet* set, const char16_t* str, int32_t strLen) {
UnicodeString s(strLen==-1, str, strLen);
((UnicodeSet*) set)->UnicodeSet::remove(s);
}
U_CAPI void U_EXPORT2
-uset_removeAllCodePoints(USet *set, const UChar *str, int32_t length) {
+uset_removeAllCodePoints(USet *set, const char16_t *str, int32_t length) {
UnicodeString s(length==-1, str, length);
((UnicodeSet*) set)->UnicodeSet::removeAll(s);
}
@@ -133,13 +133,13 @@ uset_retain(USet* set, UChar32 start, UChar32 end) {
}
U_CAPI void U_EXPORT2
-uset_retainString(USet *set, const UChar *str, int32_t length) {
+uset_retainString(USet *set, const char16_t *str, int32_t length) {
UnicodeString s(length==-1, str, length);
((UnicodeSet*) set)->UnicodeSet::retain(s);
}
U_CAPI void U_EXPORT2
-uset_retainAllCodePoints(USet *set, const UChar *str, int32_t length) {
+uset_retainAllCodePoints(USet *set, const char16_t *str, int32_t length) {
UnicodeString s(length==-1, str, length);
((UnicodeSet*) set)->UnicodeSet::retainAll(s);
}
@@ -165,13 +165,13 @@ uset_complementRange(USet *set, UChar32 start, UChar32 end) {
}
U_CAPI void U_EXPORT2
-uset_complementString(USet *set, const UChar *str, int32_t length) {
+uset_complementString(USet *set, const char16_t *str, int32_t length) {
UnicodeString s(length==-1, str, length);
((UnicodeSet*) set)->UnicodeSet::complement(s);
}
U_CAPI void U_EXPORT2
-uset_complementAllCodePoints(USet *set, const UChar *str, int32_t length) {
+uset_complementAllCodePoints(USet *set, const char16_t *str, int32_t length) {
UnicodeString s(length==-1, str, length);
((UnicodeSet*) set)->UnicodeSet::complementAll(s);
}
@@ -212,7 +212,7 @@ uset_containsRange(const USet* set, UChar32 start, UChar32 end) {
}
U_CAPI UBool U_EXPORT2
-uset_containsString(const USet* set, const UChar* str, int32_t strLen) {
+uset_containsString(const USet* set, const char16_t* str, int32_t strLen) {
UnicodeString s(strLen==-1, str, strLen);
return ((const UnicodeSet*) set)->UnicodeSet::contains(s);
}
@@ -223,7 +223,7 @@ uset_containsAll(const USet* set1, const USet* set2) {
}
U_CAPI UBool U_EXPORT2
-uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen) {
+uset_containsAllCodePoints(const USet* set, const char16_t *str, int32_t strLen) {
// Create a string alias, since nothing is being added to the set.
UnicodeString s(strLen==-1, str, strLen);
return ((const UnicodeSet*) set)->UnicodeSet::containsAll(s);
@@ -240,12 +240,12 @@ uset_containsSome(const USet* set1, const USet* set2) {
}
U_CAPI int32_t U_EXPORT2
-uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition) {
+uset_span(const USet *set, const char16_t *s, int32_t length, USetSpanCondition spanCondition) {
return ((UnicodeSet*) set)->UnicodeSet::span(s, length, spanCondition);
}
U_CAPI int32_t U_EXPORT2
-uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition) {
+uset_spanBack(const USet *set, const char16_t *s, int32_t length, USetSpanCondition spanCondition) {
return ((UnicodeSet*) set)->UnicodeSet::spanBack(s, length, spanCondition);
}
@@ -315,7 +315,7 @@ uset_getItemCount(const USet* uset) {
U_CAPI int32_t U_EXPORT2
uset_getItem(const USet* uset, int32_t itemIndex,
UChar32* start, UChar32* end,
- UChar* str, int32_t strCapacity,
+ char16_t* str, int32_t strCapacity,
UErrorCode* ec) {
if (U_FAILURE(*ec)) return 0;
const UnicodeSet& set = *(const UnicodeSet*)uset;
@@ -344,12 +344,12 @@ uset_getItem(const USet* uset, int32_t itemIndex,
//uset_getRange(const USet* set, int32_t rangeIndex,
// UChar32* pStart, UChar32* pEnd) {
// if ((uint32_t) rangeIndex >= (uint32_t) uset_getRangeCount(set)) {
-// return FALSE;
+// return false;
// }
// const UnicodeSet* us = (const UnicodeSet*) set;
// *pStart = us->getRangeStart(rangeIndex);
// *pEnd = us->getRangeEnd(rangeIndex);
-// return TRUE;
+// return true;
//}
/*
@@ -372,7 +372,7 @@ uset_getItem(const USet* uset, int32_t itemIndex,
*/
U_CAPI int32_t U_EXPORT2
uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* ec) {
- if (ec==NULL || U_FAILURE(*ec)) {
+ if (ec==nullptr || U_FAILURE(*ec)) {
return 0;
}
@@ -383,12 +383,12 @@ U_CAPI UBool U_EXPORT2
uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength) {
int32_t length;
- if(fillSet==NULL) {
- return FALSE;
+ if(fillSet==nullptr) {
+ return false;
}
- if(src==NULL || srcLength<=0) {
+ if(src==nullptr || srcLength<=0) {
fillSet->length=fillSet->bmpLength=0;
- return FALSE;
+ return false;
}
length=*src++;
@@ -397,25 +397,25 @@ uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcL
length&=0x7fff;
if(srcLength<(2+length)) {
fillSet->length=fillSet->bmpLength=0;
- return FALSE;
+ return false;
}
fillSet->bmpLength=*src++;
} else {
/* only BMP values */
if(srcLength<(1+length)) {
fillSet->length=fillSet->bmpLength=0;
- return FALSE;
+ return false;
}
fillSet->bmpLength=length;
}
fillSet->array=src;
fillSet->length=length;
- return TRUE;
+ return true;
}
U_CAPI void U_EXPORT2
uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c) {
- if(fillSet==NULL || (uint32_t)c>0x10ffff) {
+ if(fillSet==nullptr || (uint32_t)c>0x10ffff) {
return;
}
@@ -450,8 +450,8 @@ U_CAPI UBool U_EXPORT2
uset_serializedContains(const USerializedSet* set, UChar32 c) {
const uint16_t* array;
- if(set==NULL || (uint32_t)c>0x10ffff) {
- return FALSE;
+ if(set==nullptr || (uint32_t)c>0x10ffff) {
+ return false;
}
array=set->array;
@@ -506,7 +506,7 @@ uset_serializedContains(const USerializedSet* set, UChar32 c) {
U_CAPI int32_t U_EXPORT2
uset_getSerializedRangeCount(const USerializedSet* set) {
- if(set==NULL) {
+ if(set==nullptr) {
return 0;
}
@@ -519,8 +519,8 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
const uint16_t* array;
int32_t bmpLength, length;
- if(set==NULL || rangeIndex<0 || pStart==NULL || pEnd==NULL) {
- return FALSE;
+ if(set==nullptr || rangeIndex<0 || pStart==nullptr || pEnd==nullptr) {
+ return false;
}
array=set->array;
@@ -537,7 +537,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
} else {
*pEnd=0x10ffff;
}
- return TRUE;
+ return true;
} else {
rangeIndex-=bmpLength;
rangeIndex*=2; /* address pairs of pairs of units */
@@ -551,9 +551,9 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
} else {
*pEnd=0x10ffff;
}
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
}
@@ -590,15 +590,15 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
// addRemove(USet* set, UChar32 c, int32_t doRemove) {
// int32_t i, length, more;
//
-// if(set==NULL || (uint32_t)c>0x10ffff) {
-// return FALSE;
+// if(set==nullptr || (uint32_t)c>0x10ffff) {
+// return false;
// }
//
// length=set->length;
// i=findChar(set->array, length, c);
// if((i&1)^doRemove) {
// /* c is already in the set */
-// return TRUE;
+// return true;
// }
//
// /* how many more array items do we need? */
@@ -615,7 +615,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
// }
// }
// }
-// return TRUE;
+// return true;
// } else if(i>0 && c==set->array[i-1]) {
// /* c is just after the previous range, extend that in-place by one */
// if(++c<=0x10ffff) {
@@ -632,7 +632,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
// /* extend the previous range (had limit 0x10ffff) to the end of Unicode */
// set->length=i-1;
// }
-// return TRUE;
+// return true;
// } else if(i==length && c==0x10ffff) {
// /* insert one range limit c */
// more=1;
@@ -646,8 +646,8 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
// /* reallocate */
// int32_t newCapacity=set->capacity+set->capacity/2+USET_GROW_DELTA;
// UChar32* newArray=(UChar32* )uprv_malloc(newCapacity*4);
-// if(newArray==NULL) {
-// return FALSE;
+// if(newArray==nullptr) {
+// return false;
// }
// set->capacity=newCapacity;
// uprv_memcpy(newArray, set->array, length*4);
@@ -667,7 +667,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
// }
// set->length+=more;
//
-// return TRUE;
+// return true;
// }
//
// U_CAPI UBool U_EXPORT2
diff --git a/contrib/libs/icu/common/uset_imp.h b/contrib/libs/icu/common/uset_imp.h
index 7233b9303c3..77197aaed77 100644
--- a/contrib/libs/icu/common/uset_imp.h
+++ b/contrib/libs/icu/common/uset_imp.h
@@ -58,5 +58,14 @@ typedef struct USetAdder USetAdder;
U_CDECL_END
-#endif
+#ifdef __cplusplus
+
+namespace {
+
+constexpr int32_t USET_CASE_MASK = USET_CASE_INSENSITIVE | USET_ADD_CASE_MAPPINGS;
+} // namespace
+
+#endif // __cplusplus
+
+#endif
diff --git a/contrib/libs/icu/common/uset_props.cpp b/contrib/libs/icu/common/uset_props.cpp
index f08e760b10d..6f6e0c550f9 100644
--- a/contrib/libs/icu/common/uset_props.cpp
+++ b/contrib/libs/icu/common/uset_props.cpp
@@ -30,12 +30,12 @@
U_NAMESPACE_USE
U_CAPI USet* U_EXPORT2
-uset_openPattern(const UChar* pattern, int32_t patternLength,
+uset_openPattern(const char16_t* pattern, int32_t patternLength,
UErrorCode* ec)
{
UnicodeString pat(patternLength==-1, pattern, patternLength);
UnicodeSet* set = new UnicodeSet(pat, *ec);
- /* test for NULL */
+ /* test for nullptr */
if(set == 0) {
*ec = U_MEMORY_ALLOCATION_ERROR;
return 0;
@@ -43,19 +43,19 @@ uset_openPattern(const UChar* pattern, int32_t patternLength,
if (U_FAILURE(*ec)) {
delete set;
- set = NULL;
+ set = nullptr;
}
return (USet*) set;
}
U_CAPI USet* U_EXPORT2
-uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
+uset_openPatternOptions(const char16_t* pattern, int32_t patternLength,
uint32_t options,
UErrorCode* ec)
{
UnicodeString pat(patternLength==-1, pattern, patternLength);
- UnicodeSet* set = new UnicodeSet(pat, options, NULL, *ec);
- /* test for NULL */
+ UnicodeSet* set = new UnicodeSet(pat, options, nullptr, *ec);
+ /* test for nullptr */
if(set == 0) {
*ec = U_MEMORY_ALLOCATION_ERROR;
return 0;
@@ -63,7 +63,7 @@ uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
if (U_FAILURE(*ec)) {
delete set;
- set = NULL;
+ set = nullptr;
}
return (USet*) set;
}
@@ -71,20 +71,20 @@ uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
U_CAPI int32_t U_EXPORT2
uset_applyPattern(USet *set,
- const UChar *pattern, int32_t patternLength,
+ const char16_t *pattern, int32_t patternLength,
uint32_t options,
UErrorCode *status){
// status code needs to be checked since we
// dereference it
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return 0;
}
// check only the set paramenter
- // if pattern is NULL or null terminate
+ // if pattern is nullptr or NUL terminated
// UnicodeString constructor takes care of it
- if(set == NULL){
+ if(set == nullptr){
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -93,7 +93,7 @@ uset_applyPattern(USet *set,
ParsePosition pos;
- ((UnicodeSet*) set)->applyPattern(pat, pos, options, NULL, *status);
+ ((UnicodeSet*) set)->applyPattern(pat, pos, options, nullptr, *status);
return pos.getIndex();
}
@@ -106,8 +106,8 @@ uset_applyIntPropertyValue(USet* set,
U_CAPI void U_EXPORT2
uset_applyPropertyAlias(USet* set,
- const UChar *prop, int32_t propLength,
- const UChar *value, int32_t valueLength,
+ const char16_t *prop, int32_t propLength,
+ const char16_t *value, int32_t valueLength,
UErrorCode* ec) {
UnicodeString p(prop, propLength);
@@ -117,19 +117,19 @@ uset_applyPropertyAlias(USet* set,
}
U_CAPI UBool U_EXPORT2
-uset_resemblesPattern(const UChar *pattern, int32_t patternLength,
+uset_resemblesPattern(const char16_t *pattern, int32_t patternLength,
int32_t pos) {
UnicodeString pat(pattern, patternLength);
return ((pos+1) < pat.length() &&
- pat.charAt(pos) == (UChar)91/*[*/) ||
+ pat.charAt(pos) == (char16_t)91/*[*/) ||
UnicodeSet::resemblesPattern(pat, pos);
}
U_CAPI int32_t U_EXPORT2
uset_toPattern(const USet* set,
- UChar* result, int32_t resultCapacity,
+ char16_t* result, int32_t resultCapacity,
UBool escapeUnprintable,
UErrorCode* ec) {
UnicodeString pat;
diff --git a/contrib/libs/icu/common/usetiter.cpp b/contrib/libs/icu/common/usetiter.cpp
index 79151690494..d24a15ab2df 100644
--- a/contrib/libs/icu/common/usetiter.cpp
+++ b/contrib/libs/icu/common/usetiter.cpp
@@ -20,7 +20,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnicodeSetIterator)
* @param set set to iterate over
*/
UnicodeSetIterator::UnicodeSetIterator(const UnicodeSet& uSet) {
- cpString = NULL;
+ cpString = nullptr;
reset(uSet);
}
@@ -28,8 +28,8 @@ UnicodeSetIterator::UnicodeSetIterator(const UnicodeSet& uSet) {
* Create an iterator. Convenience for when the contents are to be set later.
*/
UnicodeSetIterator::UnicodeSetIterator() {
- this->set = NULL;
- cpString = NULL;
+ this->set = nullptr;
+ cpString = nullptr;
reset();
}
@@ -49,20 +49,20 @@ UnicodeSetIterator::~UnicodeSetIterator() {
UBool UnicodeSetIterator::next() {
if (nextElement <= endElement) {
codepoint = codepointEnd = nextElement++;
- string = NULL;
- return TRUE;
+ string = nullptr;
+ return true;
}
if (range < endRange) {
loadRange(++range);
codepoint = codepointEnd = nextElement++;
- string = NULL;
- return TRUE;
+ string = nullptr;
+ return true;
}
- if (nextString >= stringCount) return FALSE;
+ if (nextString >= stringCount) return false;
codepoint = (UChar32)IS_STRING; // signal that value is actually a string
string = (const UnicodeString*) set->strings->elementAt(nextString++);
- return TRUE;
+ return true;
}
/**
@@ -77,25 +77,25 @@ UBool UnicodeSetIterator::next() {
* <br>Note also that the codepointEnd is undefined after calling this method.
*/
UBool UnicodeSetIterator::nextRange() {
- string = NULL;
+ string = nullptr;
if (nextElement <= endElement) {
codepointEnd = endElement;
codepoint = nextElement;
nextElement = endElement+1;
- return TRUE;
+ return true;
}
if (range < endRange) {
loadRange(++range);
codepointEnd = endElement;
codepoint = nextElement;
nextElement = endElement+1;
- return TRUE;
+ return true;
}
- if (nextString >= stringCount) return FALSE;
+ if (nextString >= stringCount) return false;
codepoint = (UChar32)IS_STRING; // signal that value is actually a string
string = (const UnicodeString*) set->strings->elementAt(nextString++);
- return TRUE;
+ return true;
}
/**
@@ -110,7 +110,7 @@ void UnicodeSetIterator::reset(const UnicodeSet& uSet) {
* Resets to the start, to allow the iteration to start over again.
*/
void UnicodeSetIterator::reset() {
- if (set == NULL) {
+ if (set == nullptr) {
// Set up indices to empty iteration
endRange = -1;
stringCount = 0;
@@ -125,7 +125,7 @@ void UnicodeSetIterator::reset() {
loadRange(range);
}
nextString = 0;
- string = NULL;
+ string = nullptr;
}
void UnicodeSetIterator::loadRange(int32_t iRange) {
@@ -135,11 +135,11 @@ void UnicodeSetIterator::loadRange(int32_t iRange) {
const UnicodeString& UnicodeSetIterator::getString() {
- if (string==NULL && codepoint!=(UChar32)IS_STRING) {
- if (cpString == NULL) {
+ if (string==nullptr && codepoint!=(UChar32)IS_STRING) {
+ if (cpString == nullptr) {
cpString = new UnicodeString();
}
- if (cpString != NULL) {
+ if (cpString != nullptr) {
cpString->setTo((UChar32)codepoint);
}
string = cpString;
diff --git a/contrib/libs/icu/common/ushape.cpp b/contrib/libs/icu/common/ushape.cpp
index ae13b5c1183..d0ac95e0b23 100644
--- a/contrib/libs/icu/common/ushape.cpp
+++ b/contrib/libs/icu/common/ushape.cpp
@@ -31,7 +31,7 @@
/*
* This implementation is designed for 16-bit Unicode strings.
* The main assumption is that the Arabic characters and their
- * presentation forms each fit into a single UChar.
+ * presentation forms each fit into a single char16_t.
* With UTF-8, they occupy 2 or 3 bytes, and more than the ASCII
* characters.
*/
@@ -78,7 +78,7 @@
#define DESHAPE_MODE 1
struct uShapeVariables {
- UChar tailChar;
+ char16_t tailChar;
uint32_t uShapeLamalefBegin;
uint32_t uShapeLamalefEnd;
uint32_t uShapeTashkeelBegin;
@@ -122,7 +122,7 @@ static const uint8_t tashkeelMedial[] = {
/* FE7F */ 1
};
-static const UChar yehHamzaToYeh[] =
+static const char16_t yehHamzaToYeh[] =
{
/* isolated*/ 0xFEEF,
/* final */ 0xFEF0
@@ -134,7 +134,7 @@ static const uint8_t IrrelevantPos[] = {
};
-static const UChar convertLamAlef[] =
+static const char16_t convertLamAlef[] =
{
/*FEF5*/ 0x0622,
/*FEF6*/ 0x0622,
@@ -146,7 +146,7 @@ static const UChar convertLamAlef[] =
/*FEFC*/ 0x0627
};
-static const UChar araLink[178]=
+static const char16_t araLink[178]=
{
1 + 32 + 256 * 0x11,/*0x0622*/
1 + 32 + 256 * 0x13,/*0x0623*/
@@ -294,7 +294,7 @@ static const uint8_t presBLink[]=
/*FEF*/ 1, 0, 1, 2,1 + 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0
};
-static const UChar convertFBto06[] =
+static const char16_t convertFBto06[] =
{
/***********0******1******2******3******4******5******6******7******8******9******A******B******C******D******E******F***/
/*FB5*/ 0x671, 0x671, 0x67B, 0x67B, 0x67B, 0x67B, 0x67E, 0x67E, 0x67E, 0x67E, 0, 0, 0, 0, 0x67A, 0x67A,
@@ -310,7 +310,7 @@ static const UChar convertFBto06[] =
/*FBF*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x6CC, 0x6CC, 0x6CC, 0x6CC
};
-static const UChar convertFEto06[] =
+static const char16_t convertFEto06[] =
{
/***********0******1******2******3******4******5******6******7******8******9******A******B******C******D******E******F***/
/*FE7*/ 0x64B, 0x64B, 0x64C, 0x64C, 0x64D, 0x64D, 0x64E, 0x64E, 0x64F, 0x64F, 0x650, 0x650, 0x651, 0x651, 0x652, 0x652,
@@ -339,11 +339,11 @@ static const uint8_t shapeTable[4][4][4]=
* we can safely just work with code units (again, at least UTF-16).
*/
static void
-_shapeToArabicDigitsWithContext(UChar *s, int32_t length,
- UChar digitBase,
+_shapeToArabicDigitsWithContext(char16_t *s, int32_t length,
+ char16_t digitBase,
UBool isLogical, UBool lastStrongWasAL) {
int32_t i;
- UChar c;
+ char16_t c;
digitBase-=0x30;
@@ -354,14 +354,14 @@ _shapeToArabicDigitsWithContext(UChar *s, int32_t length,
switch(ubidi_getClass(c)) {
case U_LEFT_TO_RIGHT: /* L */
case U_RIGHT_TO_LEFT: /* R */
- lastStrongWasAL=FALSE;
+ lastStrongWasAL=false;
break;
case U_RIGHT_TO_LEFT_ARABIC: /* AL */
- lastStrongWasAL=TRUE;
+ lastStrongWasAL=true;
break;
case U_EUROPEAN_NUMBER: /* EN */
if(lastStrongWasAL && (uint32_t)(c-0x30)<10) {
- s[i]=(UChar)(digitBase+c); /* digitBase+(c-0x30) - digitBase was modified above */
+ s[i]=(char16_t)(digitBase+c); /* digitBase+(c-0x30) - digitBase was modified above */
}
break;
default :
@@ -374,14 +374,14 @@ _shapeToArabicDigitsWithContext(UChar *s, int32_t length,
switch(ubidi_getClass(c)) {
case U_LEFT_TO_RIGHT: /* L */
case U_RIGHT_TO_LEFT: /* R */
- lastStrongWasAL=FALSE;
+ lastStrongWasAL=false;
break;
case U_RIGHT_TO_LEFT_ARABIC: /* AL */
- lastStrongWasAL=TRUE;
+ lastStrongWasAL=true;
break;
case U_EUROPEAN_NUMBER: /* EN */
if(lastStrongWasAL && (uint32_t)(c-0x30)<10) {
- s[i]=(UChar)(digitBase+c); /* digitBase+(c-0x30) - digitBase was modified above */
+ s[i]=(char16_t)(digitBase+c); /* digitBase+(c-0x30) - digitBase was modified above */
}
break;
default :
@@ -398,8 +398,8 @@ _shapeToArabicDigitsWithContext(UChar *s, int32_t length,
* U_SHAPE_TEXT_DIRECTION_LOGICAL
*/
static void
-invertBuffer(UChar *buffer, int32_t size, uint32_t /*options*/, int32_t lowlimit, int32_t highlimit) {
- UChar temp;
+invertBuffer(char16_t *buffer, int32_t size, uint32_t /*options*/, int32_t lowlimit, int32_t highlimit) {
+ char16_t temp;
int32_t i=0,j=0;
for(i=lowlimit,j=size-highlimit-1;i<j;i++,j--) {
temp = buffer[i];
@@ -416,8 +416,8 @@ invertBuffer(UChar *buffer, int32_t size, uint32_t /*options*/, int32_t lowlimit
* later it'll be converted into the 0xFExx LamAlefs
* in the shaping function.
*/
-static inline UChar
-changeLamAlef(UChar ch) {
+static inline char16_t
+changeLamAlef(char16_t ch) {
switch(ch) {
case 0x0622 :
return 0x065C;
@@ -437,8 +437,8 @@ changeLamAlef(UChar ch) {
* Arabic characters have four forms :
* Isolated, Initial, Middle and Final Form
*/
-static UChar
-getLink(UChar ch) {
+static char16_t
+getLink(char16_t ch) {
if(ch >= 0x0622 && ch <= 0x06D3) {
return(araLink[ch-0x0622]);
} else if(ch == 0x200D) {
@@ -460,7 +460,7 @@ getLink(UChar ch) {
* at each end of the logical buffer
*/
static void
-countSpaces(UChar *dest, int32_t size, uint32_t /*options*/, int32_t *spacesCountl, int32_t *spacesCountr) {
+countSpaces(char16_t *dest, int32_t size, uint32_t /*options*/, int32_t *spacesCountl, int32_t *spacesCountr) {
int32_t i = 0;
int32_t countl = 0,countr = 0;
while((dest[i] == SPACE_CHAR) && (countl < size)) {
@@ -482,7 +482,7 @@ countSpaces(UChar *dest, int32_t size, uint32_t /*options*/, int32_t *spacesCoun
*Function : Returns 1 for Tashkeel characters in 06 range else return 0
*/
static inline int32_t
-isTashkeelChar(UChar ch) {
+isTashkeelChar(char16_t ch) {
return (int32_t)( ch>=0x064B && ch<= 0x0652 );
}
@@ -491,7 +491,7 @@ isTashkeelChar(UChar ch) {
*Function : Returns 1 for Tashkeel characters in FE range else return 0
*/
static inline int32_t
-isTashkeelCharFE(UChar ch) {
+isTashkeelCharFE(char16_t ch) {
return (int32_t)( ch>=0xFE70 && ch<= 0xFE7F );
}
@@ -500,7 +500,7 @@ isTashkeelCharFE(UChar ch) {
*Function : Returns 1 for Alef characters else return 0
*/
static inline int32_t
-isAlefChar(UChar ch) {
+isAlefChar(char16_t ch) {
return (int32_t)( (ch==0x0622)||(ch==0x0623)||(ch==0x0625)||(ch==0x0627) );
}
@@ -509,7 +509,7 @@ isAlefChar(UChar ch) {
*Function : Returns 1 for LamAlef characters else return 0
*/
static inline int32_t
-isLamAlefChar(UChar ch) {
+isLamAlefChar(char16_t ch) {
return (int32_t)((ch>=0xFEF5)&&(ch<=0xFEFC) );
}
@@ -519,7 +519,7 @@ isLamAlefChar(UChar ch) {
*/
static inline int32_t
-isTailChar(UChar ch) {
+isTailChar(char16_t ch) {
if(ch == OLD_TAIL_CHAR || ch == NEW_TAIL_CHAR){
return 1;
}else{
@@ -534,7 +534,7 @@ isTailChar(UChar ch) {
*/
static inline int32_t
-isSeenTailFamilyChar(UChar ch) {
+isSeenTailFamilyChar(char16_t ch) {
if(ch >= 0xfeb1 && ch < 0xfebf){
return tailFamilyIsolatedFinal [ch - 0xFEB1];
}else{
@@ -548,7 +548,7 @@ isSeenTailFamilyChar(UChar ch) {
*/
static inline int32_t
-isSeenFamilyChar(UChar ch){
+isSeenFamilyChar(char16_t ch){
if(ch >= 0x633 && ch <= 0x636){
return 1;
}else {
@@ -563,7 +563,7 @@ isSeenFamilyChar(UChar ch){
* otherwise returns 0
*/
static inline int32_t
-isAlefMaksouraChar(UChar ch) {
+isAlefMaksouraChar(char16_t ch) {
return (int32_t)( (ch == 0xFEEF) || ( ch == 0xFEF0) || (ch == 0x0649));
}
@@ -573,7 +573,7 @@ isAlefMaksouraChar(UChar ch) {
* final is found otherwise returns 0
*/
static inline int32_t
-isYehHamzaChar(UChar ch) {
+isYehHamzaChar(char16_t ch) {
if((ch==0xFE89)||(ch==0xFE8A)){
return 1;
}else{
@@ -589,7 +589,7 @@ isYehHamzaChar(UChar ch) {
* returns 0
*/
static inline int32_t
-isTashkeelOnTatweelChar(UChar ch){
+isTashkeelOnTatweelChar(char16_t ch){
if(ch >= 0xfe70 && ch <= 0xfe7f && ch != NEW_TAIL_CHAR && ch != 0xFE75 && ch != SHADDA_TATWEEL_CHAR)
{
return tashkeelMedial [ch - 0xFE70];
@@ -608,7 +608,7 @@ isTashkeelOnTatweelChar(UChar ch){
* returns 2 otherwise returns 0
*/
static inline int32_t
-isIsolatedTashkeelChar(UChar ch){
+isIsolatedTashkeelChar(char16_t ch){
if(ch >= 0xfe70 && ch <= 0xfe7f && ch != NEW_TAIL_CHAR && ch != 0xFE75){
return (1 - tashkeelMedial [ch - 0xFE70]);
}else if(ch >= 0xfc5e && ch <= 0xfc63){
@@ -630,7 +630,7 @@ isIsolatedTashkeelChar(UChar ch){
*/
static int32_t
-calculateSize(const UChar *source, int32_t sourceLength,
+calculateSize(const char16_t *source, int32_t sourceLength,
int32_t destSize,uint32_t options) {
int32_t i = 0;
@@ -687,7 +687,7 @@ int32_t destSize,uint32_t options) {
*
*/
static int32_t
-handleTashkeelWithTatweel(UChar *dest, int32_t sourceLength,
+handleTashkeelWithTatweel(char16_t *dest, int32_t sourceLength,
int32_t /*destSize*/, uint32_t /*options*/,
UErrorCode * /*pErrorCode*/) {
int i;
@@ -725,14 +725,14 @@ handleTashkeelWithTatweel(UChar *dest, int32_t sourceLength,
*/
static int32_t
-handleGeneratedSpaces(UChar *dest, int32_t sourceLength,
+handleGeneratedSpaces(char16_t *dest, int32_t sourceLength,
int32_t destSize,
uint32_t options,
UErrorCode *pErrorCode,struct uShapeVariables shapeVars ) {
int32_t i = 0, j = 0;
int32_t count = 0;
- UChar *tempbuffer=NULL;
+ char16_t *tempbuffer=nullptr;
int lamAlefOption = 0;
int tashkeelOption = 0;
@@ -747,9 +747,9 @@ handleGeneratedSpaces(UChar *dest, int32_t sourceLength,
}
}
- tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
- /* Test for NULL */
- if(tempbuffer == NULL) {
+ tempbuffer = (char16_t *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
+ /* Test for nullptr */
+ if(tempbuffer == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -900,15 +900,15 @@ handleGeneratedSpaces(UChar *dest, int32_t sourceLength,
*/
static int32_t
-expandCompositCharAtBegin(UChar *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode) {
+expandCompositCharAtBegin(char16_t *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode) {
int32_t i = 0,j = 0;
int32_t countl = 0;
- UChar *tempbuffer=NULL;
+ char16_t *tempbuffer=nullptr;
- tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
+ tempbuffer = (char16_t *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
- /* Test for NULL */
- if(tempbuffer == NULL) {
+ /* Test for nullptr */
+ if(tempbuffer == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -960,17 +960,17 @@ expandCompositCharAtBegin(UChar *dest, int32_t sourceLength, int32_t destSize,UE
*/
static int32_t
-expandCompositCharAtEnd(UChar *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode) {
+expandCompositCharAtEnd(char16_t *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode) {
int32_t i = 0,j = 0;
int32_t countr = 0;
int32_t inpsize = sourceLength;
- UChar *tempbuffer=NULL;
- tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
+ char16_t *tempbuffer=nullptr;
+ tempbuffer = (char16_t *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
- /* Test for NULL */
- if(tempbuffer == NULL) {
+ /* Test for nullptr */
+ if(tempbuffer == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -1027,12 +1027,12 @@ expandCompositCharAtEnd(UChar *dest, int32_t sourceLength, int32_t destSize,UErr
*/
static int32_t
-expandCompositCharAtNear(UChar *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode,
+expandCompositCharAtNear(char16_t *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode,
int yehHamzaOption, int seenTailOption, int lamAlefOption, struct uShapeVariables shapeVars) {
int32_t i = 0;
- UChar lamalefChar, yehhamzaChar;
+ char16_t lamalefChar, yehhamzaChar;
for(i = 0 ;i<=sourceLength-1;i++) {
if (seenTailOption && isSeenTailFamilyChar(dest[i])) {
@@ -1080,13 +1080,13 @@ expandCompositCharAtNear(UChar *dest, int32_t sourceLength, int32_t destSize,UEr
*/
static int32_t
-expandCompositChar(UChar *dest, int32_t sourceLength,
+expandCompositChar(char16_t *dest, int32_t sourceLength,
int32_t destSize,uint32_t options,
UErrorCode *pErrorCode, int shapingMode,struct uShapeVariables shapeVars) {
int32_t i = 0,j = 0;
- UChar *tempbuffer=NULL;
+ char16_t *tempbuffer=nullptr;
int yehHamzaOption = 0;
int seenTailOption = 0;
int lamAlefOption = 0;
@@ -1154,10 +1154,10 @@ expandCompositChar(UChar *dest, int32_t sourceLength,
if (shapingMode == 1){
if ( (options&U_SHAPE_LAMALEF_MASK) == U_SHAPE_LAMALEF_RESIZE){
destSize = calculateSize(dest,sourceLength,destSize,options);
- tempbuffer = (UChar *)uprv_malloc((destSize+1)*U_SIZEOF_UCHAR);
+ tempbuffer = (char16_t *)uprv_malloc((destSize+1)*U_SIZEOF_UCHAR);
- /* Test for NULL */
- if(tempbuffer == NULL) {
+ /* Test for nullptr */
+ if(tempbuffer == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -1193,7 +1193,7 @@ expandCompositChar(UChar *dest, int32_t sourceLength,
* arabic Unicode buffer in FExx Range
*/
static int32_t
-shapeUnicode(UChar *dest, int32_t sourceLength,
+shapeUnicode(char16_t *dest, int32_t sourceLength,
int32_t destSize,uint32_t options,
UErrorCode *pErrorCode,
int tashkeelFlag, struct uShapeVariables shapeVars) {
@@ -1204,8 +1204,8 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
unsigned int Shape;
int32_t lamalef_found = 0;
int32_t seenfamFound = 0, yehhamzaFound =0, tashkeelFound = 0;
- UChar prevLink = 0, lastLink = 0, currLink, nextLink = 0;
- UChar wLamalef;
+ char16_t prevLink = 0, lastLink = 0, currLink, nextLink = 0;
+ char16_t wLamalef;
/*
* Converts the input buffer from FExx Range into 06xx Range
@@ -1215,9 +1215,9 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
*/
if ((options & U_SHAPE_PRESERVE_PRESENTATION_MASK) == U_SHAPE_PRESERVE_PRESENTATION_NOOP) {
for (i = 0; i < sourceLength; i++) {
- UChar inputChar = dest[i];
+ char16_t inputChar = dest[i];
if ( (inputChar >= 0xFB50) && (inputChar <= 0xFBFF)) {
- UChar c = convertFBto06 [ (inputChar - 0xFB50) ];
+ char16_t c = convertFBto06 [ (inputChar - 0xFB50) ];
if (c != 0)
dest[i] = c;
} else if ( (inputChar >= 0xFE70) && (inputChar <= 0xFEFC)) {
@@ -1323,12 +1323,12 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
/* to ensure the array index is within the range */
U_ASSERT(dest[i] >= 0x064Bu
&& dest[i]-0x064Bu < UPRV_LENGTHOF(IrrelevantPos));
- dest[i] = 0xFE70 + IrrelevantPos[(dest[i] - 0x064B)] + static_cast<UChar>(Shape);
+ dest[i] = 0xFE70 + IrrelevantPos[(dest[i] - 0x064B)] + static_cast<char16_t>(Shape);
}
}else if ((currLink & APRESENT) > 0) {
- dest[i] = (UChar)(0xFB50 + (currLink >> 8) + Shape);
+ dest[i] = (char16_t)(0xFB50 + (currLink >> 8) + Shape);
}else if ((currLink >> 8) > 0 && (currLink & IRRELEVANT) == 0) {
- dest[i] = (UChar)(0xFE70 + (currLink >> 8) + Shape);
+ dest[i] = (char16_t)(0xFE70 + (currLink >> 8) + Shape);
}
}
}
@@ -1365,7 +1365,7 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
* arabic Unicode buffer in 06xx Range
*/
static int32_t
-deShapeUnicode(UChar *dest, int32_t sourceLength,
+deShapeUnicode(char16_t *dest, int32_t sourceLength,
int32_t destSize,uint32_t options,
UErrorCode *pErrorCode, struct uShapeVariables shapeVars) {
int32_t i = 0;
@@ -1382,9 +1382,9 @@ deShapeUnicode(UChar *dest, int32_t sourceLength,
*/
for(i = 0; i < sourceLength; i++) {
- UChar inputChar = dest[i];
+ char16_t inputChar = dest[i];
if ( (inputChar >= 0xFB50) && (inputChar <= 0xFBFF)) { /* FBxx Arabic range */
- UChar c = convertFBto06 [ (inputChar - 0xFB50) ];
+ char16_t c = convertFBto06 [ (inputChar - 0xFB50) ];
if (c != 0)
dest[i] = c;
} else if( (yehHamzaComposeEnabled == 1) && ((inputChar == HAMZA06_CHAR) || (inputChar == HAMZAFE_CHAR))
@@ -1418,8 +1418,8 @@ deShapeUnicode(UChar *dest, int32_t sourceLength,
*/
U_CAPI int32_t U_EXPORT2
-u_shapeArabic(const UChar *source, int32_t sourceLength,
- UChar *dest, int32_t destCapacity,
+u_shapeArabic(const char16_t *source, int32_t sourceLength,
+ char16_t *dest, int32_t destCapacity,
uint32_t options,
UErrorCode *pErrorCode) {
@@ -1427,12 +1427,12 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
struct uShapeVariables shapeVars = { OLD_TAIL_CHAR,U_SHAPE_LAMALEF_BEGIN,U_SHAPE_LAMALEF_END,U_SHAPE_TASHKEEL_BEGIN,U_SHAPE_TASHKEEL_END,0};
/* usual error checking */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- /* make sure that no reserved options values are used; allow dest==NULL only for preflighting */
- if( source==NULL || sourceLength<-1 || (dest==NULL && destCapacity!=0) || destCapacity<0 ||
+ /* make sure that no reserved options values are used; allow dest==nullptr only for preflighting */
+ if( source==nullptr || sourceLength<-1 || (dest==nullptr && destCapacity!=0) || destCapacity<0 ||
(((options&U_SHAPE_TASHKEEL_MASK) > 0) &&
((options&U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED) == U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED) ) ||
(((options&U_SHAPE_TASHKEEL_MASK) > 0) &&
@@ -1478,7 +1478,7 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
}
/* check that source and destination do not overlap */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((source<=dest && dest<source+sourceLength) ||
(dest<=source && source<dest+destCapacity))) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
@@ -1493,8 +1493,8 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
}
if((options&U_SHAPE_LETTERS_MASK)!=U_SHAPE_LETTERS_NOOP) {
- UChar buffer[300];
- UChar *tempbuffer, *tempsource = NULL;
+ char16_t buffer[300];
+ char16_t *tempbuffer, *tempsource = nullptr;
int32_t outputSize, spacesCountl=0, spacesCountr=0;
if((options&U_SHAPE_AGGREGATE_TASHKEEL_MASK)>0) {
@@ -1507,11 +1507,11 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
int i=logical_order?-1:sourceLength;
int end=logical_order?sourceLength:-1;
int aggregation_possible = 1;
- UChar prev = 0;
- UChar prevLink, currLink = 0;
+ char16_t prev = 0;
+ char16_t prevLink, currLink = 0;
int newSourceLength = 0;
- tempsource = (UChar *)uprv_malloc(2*sourceLength*U_SIZEOF_UCHAR);
- if(tempsource == NULL) {
+ tempsource = (char16_t *)uprv_malloc(2*sourceLength*U_SIZEOF_UCHAR);
+ if(tempsource == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -1545,7 +1545,7 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
if(outputSize>destCapacity) {
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
- if (tempsource != NULL) uprv_free(tempsource);
+ if (tempsource != nullptr) uprv_free(tempsource);
return outputSize;
}
@@ -1562,17 +1562,17 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
outputSize=UPRV_LENGTHOF(buffer);
tempbuffer=buffer;
} else {
- tempbuffer = (UChar *)uprv_malloc(outputSize*U_SIZEOF_UCHAR);
+ tempbuffer = (char16_t *)uprv_malloc(outputSize*U_SIZEOF_UCHAR);
- /*Test for NULL*/
- if(tempbuffer == NULL) {
+ /*Test for nullptr*/
+ if(tempbuffer == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- if (tempsource != NULL) uprv_free(tempsource);
+ if (tempsource != nullptr) uprv_free(tempsource);
return 0;
}
}
u_memcpy(tempbuffer, source, sourceLength);
- if (tempsource != NULL){
+ if (tempsource != nullptr){
uprv_free(tempsource);
}
@@ -1670,7 +1670,7 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
* "shape" the digits in-place.
*/
if((options&U_SHAPE_DIGITS_MASK)!=U_SHAPE_DIGITS_NOOP) {
- UChar digitBase;
+ char16_t digitBase;
int32_t i;
/* select the requested digit group */
@@ -1710,13 +1710,13 @@ u_shapeArabic(const UChar *source, int32_t sourceLength,
_shapeToArabicDigitsWithContext(dest, destLength,
digitBase,
(UBool)((options&U_SHAPE_TEXT_DIRECTION_MASK)==U_SHAPE_TEXT_DIRECTION_LOGICAL),
- FALSE);
+ false);
break;
case U_SHAPE_DIGITS_ALEN2AN_INIT_AL:
_shapeToArabicDigitsWithContext(dest, destLength,
digitBase,
(UBool)((options&U_SHAPE_TEXT_DIRECTION_MASK)==U_SHAPE_TEXT_DIRECTION_LOGICAL),
- TRUE);
+ true);
break;
default:
/* will never occur because of validity checks above */
diff --git a/contrib/libs/icu/common/usprep.cpp b/contrib/libs/icu/common/usprep.cpp
index 41a1f56c773..fc9d0ac208f 100644
--- a/contrib/libs/icu/common/usprep.cpp
+++ b/contrib/libs/icu/common/usprep.cpp
@@ -44,8 +44,8 @@ U_CDECL_BEGIN
/*
Static cache for already opened StringPrep profiles
*/
-static UHashtable *SHARED_DATA_HASHTABLE = NULL;
-static icu::UInitOnce gSharedDataInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable *SHARED_DATA_HASHTABLE = nullptr;
+static icu::UInitOnce gSharedDataInitOnce {};
static UMutex usprepMutex;
/* format version of spp file */
@@ -91,9 +91,9 @@ isSPrepAcceptable(void * /* context */,
) {
//uprv_memcpy(formatVersion, pInfo->formatVersion, 4);
uprv_memcpy(dataVersion, pInfo->dataVersion, 4);
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -137,8 +137,8 @@ usprep_unload(UStringPrepProfile* data){
static int32_t
usprep_internal_flushCache(UBool noRefCount){
- UStringPrepProfile *profile = NULL;
- UStringPrepKey *key = NULL;
+ UStringPrepProfile *profile = nullptr;
+ UStringPrepKey *key = nullptr;
int32_t pos = UHASH_FIRST;
int32_t deletedNum = 0;
const UHashElement *e;
@@ -148,32 +148,32 @@ usprep_internal_flushCache(UBool noRefCount){
* return 0
*/
umtx_lock(&usprepMutex);
- if (SHARED_DATA_HASHTABLE == NULL) {
+ if (SHARED_DATA_HASHTABLE == nullptr) {
umtx_unlock(&usprepMutex);
return 0;
}
/*creates an enumeration to iterate through every element in the table */
- while ((e = uhash_nextElement(SHARED_DATA_HASHTABLE, &pos)) != NULL)
+ while ((e = uhash_nextElement(SHARED_DATA_HASHTABLE, &pos)) != nullptr)
{
profile = (UStringPrepProfile *) e->value.pointer;
key = (UStringPrepKey *) e->key.pointer;
- if ((noRefCount== FALSE && profile->refCount == 0) ||
- noRefCount== TRUE) {
+ if ((noRefCount== false && profile->refCount == 0) ||
+ noRefCount) {
deletedNum++;
uhash_removeElement(SHARED_DATA_HASHTABLE, e);
/* unload the data */
usprep_unload(profile);
- if(key->name != NULL) {
+ if(key->name != nullptr) {
uprv_free(key->name);
- key->name=NULL;
+ key->name=nullptr;
}
- if(key->path != NULL) {
+ if(key->path != nullptr) {
uprv_free(key->path);
- key->path=NULL;
+ key->path=nullptr;
}
uprv_free(profile);
uprv_free(key);
@@ -188,20 +188,20 @@ usprep_internal_flushCache(UBool noRefCount){
/* Works just like ucnv_flushCache()
static int32_t
usprep_flushCache(){
- return usprep_internal_flushCache(FALSE);
+ return usprep_internal_flushCache(false);
}
*/
-static UBool U_CALLCONV usprep_cleanup(void){
- if (SHARED_DATA_HASHTABLE != NULL) {
- usprep_internal_flushCache(TRUE);
- if (SHARED_DATA_HASHTABLE != NULL && uhash_count(SHARED_DATA_HASHTABLE) == 0) {
+static UBool U_CALLCONV usprep_cleanup(){
+ if (SHARED_DATA_HASHTABLE != nullptr) {
+ usprep_internal_flushCache(true);
+ if (SHARED_DATA_HASHTABLE != nullptr && uhash_count(SHARED_DATA_HASHTABLE) == 0) {
uhash_close(SHARED_DATA_HASHTABLE);
- SHARED_DATA_HASHTABLE = NULL;
+ SHARED_DATA_HASHTABLE = nullptr;
}
}
gSharedDataInitOnce.reset();
- return (SHARED_DATA_HASHTABLE == NULL);
+ return (SHARED_DATA_HASHTABLE == nullptr);
}
U_CDECL_END
@@ -209,9 +209,9 @@ U_CDECL_END
/** Initializes the cache for resources */
static void U_CALLCONV
createCache(UErrorCode &status) {
- SHARED_DATA_HASHTABLE = uhash_open(hashEntry, compareEntries, NULL, &status);
+ SHARED_DATA_HASHTABLE = uhash_open(hashEntry, compareEntries, nullptr, &status);
if (U_FAILURE(status)) {
- SHARED_DATA_HASHTABLE = NULL;
+ SHARED_DATA_HASHTABLE = nullptr;
}
ucln_common_registerCleanup(UCLN_COMMON_USPREP, usprep_cleanup);
}
@@ -230,20 +230,20 @@ loadData(UStringPrepProfile* profile,
/* load Unicode SPREP data from file */
UTrie _sprepTrie={ 0,0,0,0,0,0,0 };
UDataMemory *dataMemory;
- const int32_t *p=NULL;
+ const int32_t *p=nullptr;
const uint8_t *pb;
UVersionInfo normUnicodeVersion;
int32_t normUniVer, sprepUniVer, normCorrVer;
- if(errorCode==NULL || U_FAILURE(*errorCode)) {
+ if(errorCode==nullptr || U_FAILURE(*errorCode)) {
return 0;
}
/* open the data outside the mutex block */
//TODO: change the path
- dataMemory=udata_openChoice(path, type, name, isSPrepAcceptable, NULL, errorCode);
+ dataMemory=udata_openChoice(path, type, name, isSPrepAcceptable, nullptr, errorCode);
if(U_FAILURE(*errorCode)) {
- return FALSE;
+ return false;
}
p=(const int32_t *)udata_getMemory(dataMemory);
@@ -254,14 +254,14 @@ loadData(UStringPrepProfile* profile,
if(U_FAILURE(*errorCode)) {
udata_close(dataMemory);
- return FALSE;
+ return false;
}
/* in the mutex block, set the data for this process */
umtx_lock(&usprepMutex);
- if(profile->sprepData==NULL) {
+ if(profile->sprepData==nullptr) {
profile->sprepData=dataMemory;
- dataMemory=NULL;
+ dataMemory=nullptr;
uprv_memcpy(&profile->indexes, p, sizeof(profile->indexes));
uprv_memcpy(&profile->sprepTrie, &_sprepTrie, sizeof(UTrie));
} else {
@@ -280,7 +280,7 @@ loadData(UStringPrepProfile* profile,
if(U_FAILURE(*errorCode)){
udata_close(dataMemory);
- return FALSE;
+ return false;
}
if( normUniVer < sprepUniVer && /* the Unicode version of SPREP file must be less than the Unicode Version of the normalization data */
normUniVer < normCorrVer && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Version of the normalization data */
@@ -288,13 +288,13 @@ loadData(UStringPrepProfile* profile,
){
*errorCode = U_INVALID_FORMAT_ERROR;
udata_close(dataMemory);
- return FALSE;
+ return false;
}
- profile->isDataLoaded = TRUE;
+ profile->isDataLoaded = true;
/* if a different thread set it first, then close the extra data */
- if(dataMemory!=NULL) {
- udata_close(dataMemory); /* NULL if it was set correctly */
+ if(dataMemory!=nullptr) {
+ udata_close(dataMemory); /* nullptr if it was set correctly */
}
@@ -306,12 +306,12 @@ usprep_getProfile(const char* path,
const char* name,
UErrorCode *status){
- UStringPrepProfile* profile = NULL;
+ UStringPrepProfile* profile = nullptr;
initCache(status);
if(U_FAILURE(*status)){
- return NULL;
+ return nullptr;
}
UStringPrepKey stackKey;
@@ -326,22 +326,22 @@ usprep_getProfile(const char* path,
/* fetch the data from the cache */
umtx_lock(&usprepMutex);
profile = (UStringPrepProfile*) (uhash_get(SHARED_DATA_HASHTABLE,&stackKey));
- if(profile != NULL) {
+ if(profile != nullptr) {
profile->refCount++;
}
umtx_unlock(&usprepMutex);
- if(profile == NULL) {
+ if(profile == nullptr) {
/* else load the data and put the data in the cache */
LocalMemory<UStringPrepProfile> newProfile;
- if(newProfile.allocateInsteadAndReset() == NULL) {
+ if(newProfile.allocateInsteadAndReset() == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
/* load the data */
if(!loadData(newProfile.getAlias(), path, name, _SPREP_DATA_TYPE, status) || U_FAILURE(*status) ){
- return NULL;
+ return nullptr;
}
/* get the options */
@@ -351,20 +351,20 @@ usprep_getProfile(const char* path,
LocalMemory<UStringPrepKey> key;
LocalMemory<char> keyName;
LocalMemory<char> keyPath;
- if( key.allocateInsteadAndReset() == NULL ||
- keyName.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(name)+1)) == NULL ||
- (path != NULL &&
- keyPath.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(path)+1)) == NULL)
+ if( key.allocateInsteadAndReset() == nullptr ||
+ keyName.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(name)+1)) == nullptr ||
+ (path != nullptr &&
+ keyPath.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(path)+1)) == nullptr)
) {
*status = U_MEMORY_ALLOCATION_ERROR;
usprep_unload(newProfile.getAlias());
- return NULL;
+ return nullptr;
}
umtx_lock(&usprepMutex);
// If another thread already inserted the same key/value, refcount and cleanup our thread data
profile = (UStringPrepProfile*) (uhash_get(SHARED_DATA_HASHTABLE,&stackKey));
- if(profile != NULL) {
+ if(profile != nullptr) {
profile->refCount++;
usprep_unload(newProfile.getAlias());
}
@@ -372,7 +372,7 @@ usprep_getProfile(const char* path,
/* initialize the key members */
key->name = keyName.orphan();
uprv_strcpy(key->name, name);
- if(path != NULL){
+ if(path != nullptr){
key->path = keyPath.orphan();
uprv_strcpy(key->path, path);
}
@@ -393,8 +393,8 @@ usprep_open(const char* path,
const char* name,
UErrorCode* status){
- if(status == NULL || U_FAILURE(*status)){
- return NULL;
+ if(status == nullptr || U_FAILURE(*status)){
+ return nullptr;
}
/* initialize the profile struct members */
@@ -404,20 +404,20 @@ usprep_open(const char* path,
U_CAPI UStringPrepProfile* U_EXPORT2
usprep_openByType(UStringPrepProfileType type,
UErrorCode* status) {
- if(status == NULL || U_FAILURE(*status)){
- return NULL;
+ if(status == nullptr || U_FAILURE(*status)){
+ return nullptr;
}
int32_t index = (int32_t)type;
if (index < 0 || index >= UPRV_LENGTHOF(PROFILE_NAMES)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- return usprep_open(NULL, PROFILE_NAMES[index], status);
+ return usprep_open(nullptr, PROFILE_NAMES[index], status);
}
U_CAPI void U_EXPORT2
usprep_close(UStringPrepProfile* profile){
- if(profile==NULL){
+ if(profile==nullptr){
return;
}
@@ -431,11 +431,11 @@ usprep_close(UStringPrepProfile* profile){
}
U_CFUNC void
-uprv_syntaxError(const UChar* rules,
+uprv_syntaxError(const char16_t* rules,
int32_t pos,
int32_t rulesLen,
UParseError* parseError){
- if(parseError == NULL){
+ if(parseError == nullptr){
return;
}
parseError->offset = pos;
@@ -474,39 +474,39 @@ getValues(uint16_t trieWord, int16_t& value, UBool& isIndex){
* the source codepoint is copied to the destination
*/
type = USPREP_TYPE_LIMIT;
- isIndex =FALSE;
+ isIndex =false;
value = 0;
}else if(trieWord >= _SPREP_TYPE_THRESHOLD){
type = (UStringPrepType) (trieWord - _SPREP_TYPE_THRESHOLD);
- isIndex =FALSE;
+ isIndex =false;
value = 0;
}else{
/* get the type */
type = USPREP_MAP;
/* ascertain if the value is index or delta */
if(trieWord & 0x02){
- isIndex = TRUE;
+ isIndex = true;
value = trieWord >> 2; //mask off the lower 2 bits and shift
}else{
- isIndex = FALSE;
+ isIndex = false;
value = (int16_t)trieWord;
value = (value >> 2);
}
if((trieWord>>2) == _SPREP_MAX_INDEX_VALUE){
type = USPREP_DELETE;
- isIndex =FALSE;
+ isIndex =false;
value = 0;
}
}
return type;
}
-// TODO: change to writing to UnicodeString not UChar *
+// TODO: change to writing to UnicodeString not char16_t *
static int32_t
usprep_map( const UStringPrepProfile* profile,
- const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+ const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status ){
@@ -535,7 +535,7 @@ usprep_map( const UStringPrepProfile* profile,
type = getValues(result, value, isIndex);
// check if the source codepoint is unassigned
- if(type == USPREP_UNASSIGNED && allowUnassigned == FALSE){
+ if(type == USPREP_UNASSIGNED && allowUnassigned == false){
uprv_syntaxError(src,srcIndex-U16_LENGTH(ch), srcLength,parseError);
*status = U_STRINGPREP_UNASSIGNED_ERROR;
@@ -581,7 +581,7 @@ usprep_map( const UStringPrepProfile* profile,
//copy the code point into destination
if(ch <= 0xFFFF){
if(destIndex < destCapacity ){
- dest[destIndex] = (UChar)ch;
+ dest[destIndex] = (char16_t)ch;
}
destIndex++;
}else{
@@ -637,8 +637,8 @@ usprep_map( const UStringPrepProfile* profile,
*/
U_CAPI int32_t U_EXPORT2
usprep_prepare( const UStringPrepProfile* profile,
- const UChar* src, int32_t srcLength,
- UChar* dest, int32_t destCapacity,
+ const char16_t* src, int32_t srcLength,
+ char16_t* dest, int32_t destCapacity,
int32_t options,
UParseError* parseError,
UErrorCode* status ){
@@ -649,9 +649,9 @@ usprep_prepare( const UStringPrepProfile* profile,
}
//check arguments
- if(profile==NULL ||
- (src==NULL ? srcLength!=0 : srcLength<-1) ||
- (dest==NULL ? destCapacity!=0 : destCapacity<0)) {
+ if(profile==nullptr ||
+ (src==nullptr ? srcLength!=0 : srcLength<-1) ||
+ (dest==nullptr ? destCapacity!=0 : destCapacity<0)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -662,8 +662,8 @@ usprep_prepare( const UStringPrepProfile* profile,
}
// map
UnicodeString s1;
- UChar *b1 = s1.getBuffer(srcLength);
- if(b1==NULL){
+ char16_t *b1 = s1.getBuffer(srcLength);
+ if(b1==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -675,7 +675,7 @@ usprep_prepare( const UStringPrepProfile* profile,
// redo processing of string
/* we do not have enough room so grow the buffer*/
b1 = s1.getBuffer(b1Len);
- if(b1==NULL){
+ if(b1==nullptr){
*status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -706,10 +706,10 @@ usprep_prepare( const UStringPrepProfile* profile,
}
// Prohibit and checkBiDi in one pass
- const UChar *b2 = s2.getBuffer();
+ const char16_t *b2 = s2.getBuffer();
int32_t b2Len = s2.length();
UCharDirection direction=U_CHAR_DIRECTION_COUNT, firstCharDir=U_CHAR_DIRECTION_COUNT;
- UBool leftToRight=FALSE, rightToLeft=FALSE;
+ UBool leftToRight=false, rightToLeft=false;
int32_t rtlPos =-1, ltrPos =-1;
for(int32_t b2Index=0; b2Index<b2Len;){
@@ -737,31 +737,31 @@ usprep_prepare( const UStringPrepProfile* profile,
firstCharDir = direction;
}
if(direction == U_LEFT_TO_RIGHT){
- leftToRight = TRUE;
+ leftToRight = true;
ltrPos = b2Index-1;
}
if(direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC){
- rightToLeft = TRUE;
+ rightToLeft = true;
rtlPos = b2Index-1;
}
}
}
- if(profile->checkBiDi == TRUE){
+ if(profile->checkBiDi){
// satisfy 2
- if( leftToRight == TRUE && rightToLeft == TRUE){
+ if( leftToRight && rightToLeft){
*status = U_STRINGPREP_CHECK_BIDI_ERROR;
uprv_syntaxError(b2,(rtlPos>ltrPos) ? rtlPos : ltrPos, b2Len, parseError);
return 0;
}
//satisfy 3
- if( rightToLeft == TRUE &&
+ if( rightToLeft &&
!((firstCharDir == U_RIGHT_TO_LEFT || firstCharDir == U_RIGHT_TO_LEFT_ARABIC) &&
(direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC))
){
*status = U_STRINGPREP_CHECK_BIDI_ERROR;
uprv_syntaxError(b2, rtlPos, b2Len, parseError);
- return FALSE;
+ return false;
}
}
return s2.extract(dest, destCapacity, *status);
@@ -787,7 +787,7 @@ usprep_swap(const UDataSwapper *ds,
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -809,7 +809,7 @@ usprep_swap(const UDataSwapper *ds,
}
inBytes=(const uint8_t *)inData+headerSize;
- outBytes=(uint8_t *)outData+headerSize;
+ outBytes= (outData == nullptr ) ? nullptr : (uint8_t *)outData+headerSize;
inIndexes=(const int32_t *)inBytes;
diff --git a/contrib/libs/icu/common/ustack.cpp b/contrib/libs/icu/common/ustack.cpp
index 8d9e475374d..5b15efcd7c5 100644
--- a/contrib/libs/icu/common/ustack.cpp
+++ b/contrib/libs/icu/common/ustack.cpp
@@ -35,7 +35,7 @@ UStack::UStack(UObjectDeleter *d, UElementsAreEqual *c, int32_t initialCapacity,
UStack::~UStack() {}
-void* UStack::pop(void) {
+void* UStack::pop() {
int32_t n = size() - 1;
void* result = nullptr;
if (n >= 0) {
@@ -44,7 +44,7 @@ void* UStack::pop(void) {
return result;
}
-int32_t UStack::popi(void) {
+int32_t UStack::popi() {
int32_t n = size() - 1;
int32_t result = 0;
if (n >= 0) {
diff --git a/contrib/libs/icu/common/ustr_cnv.cpp b/contrib/libs/icu/common/ustr_cnv.cpp
index 9a25a9905a2..abcc12f6837 100644
--- a/contrib/libs/icu/common/ustr_cnv.cpp
+++ b/contrib/libs/icu/common/ustr_cnv.cpp
@@ -32,30 +32,30 @@
/* mutexed access to a shared default converter ----------------------------- */
-static UConverter *gDefaultConverter = NULL;
+static UConverter *gDefaultConverter = nullptr;
U_CAPI UConverter* U_EXPORT2
u_getDefaultConverter(UErrorCode *status)
{
- UConverter *converter = NULL;
+ UConverter *converter = nullptr;
- if (gDefaultConverter != NULL) {
- icu::umtx_lock(NULL);
+ if (gDefaultConverter != nullptr) {
+ icu::umtx_lock(nullptr);
/* need to check to make sure it wasn't taken out from under us */
- if (gDefaultConverter != NULL) {
+ if (gDefaultConverter != nullptr) {
converter = gDefaultConverter;
- gDefaultConverter = NULL;
+ gDefaultConverter = nullptr;
}
- icu::umtx_unlock(NULL);
+ icu::umtx_unlock(nullptr);
}
/* if the cache was empty, create a converter */
- if(converter == NULL) {
- converter = ucnv_open(NULL, status);
+ if(converter == nullptr) {
+ converter = ucnv_open(nullptr, status);
if(U_FAILURE(*status)) {
ucnv_close(converter);
- converter = NULL;
+ converter = nullptr;
}
}
@@ -65,20 +65,20 @@ u_getDefaultConverter(UErrorCode *status)
U_CAPI void U_EXPORT2
u_releaseDefaultConverter(UConverter *converter)
{
- if(gDefaultConverter == NULL) {
- if (converter != NULL) {
+ if(gDefaultConverter == nullptr) {
+ if (converter != nullptr) {
ucnv_reset(converter);
}
ucnv_enableCleanup();
- icu::umtx_lock(NULL);
- if(gDefaultConverter == NULL) {
+ icu::umtx_lock(nullptr);
+ if(gDefaultConverter == nullptr) {
gDefaultConverter = converter;
- converter = NULL;
+ converter = nullptr;
}
- icu::umtx_unlock(NULL);
+ icu::umtx_unlock(nullptr);
}
- if(converter != NULL) {
+ if(converter != nullptr) {
ucnv_close(converter);
}
}
@@ -86,27 +86,27 @@ u_releaseDefaultConverter(UConverter *converter)
U_CAPI void U_EXPORT2
u_flushDefaultConverter()
{
- UConverter *converter = NULL;
+ UConverter *converter = nullptr;
- if (gDefaultConverter != NULL) {
- icu::umtx_lock(NULL);
+ if (gDefaultConverter != nullptr) {
+ icu::umtx_lock(nullptr);
/* need to check to make sure it wasn't taken out from under us */
- if (gDefaultConverter != NULL) {
+ if (gDefaultConverter != nullptr) {
converter = gDefaultConverter;
- gDefaultConverter = NULL;
+ gDefaultConverter = nullptr;
}
- icu::umtx_unlock(NULL);
+ icu::umtx_unlock(nullptr);
}
/* if the cache was populated, flush it */
- if(converter != NULL) {
+ if(converter != nullptr) {
ucnv_close(converter);
}
}
-/* conversions between char* and UChar* ------------------------------------- */
+/* conversions between char* and char16_t* ------------------------------------- */
/* maximum string length for u_uastrcpy() and u_austrcpy() implementations */
#define MAX_STRLEN 0x0FFFFFFF
@@ -128,23 +128,23 @@ static int32_t u_astrnlen(const char *s1, int32_t n)
return len;
}
-U_CAPI UChar* U_EXPORT2
-u_uastrncpy(UChar *ucs1,
+U_CAPI char16_t* U_EXPORT2
+u_uastrncpy(char16_t *ucs1,
const char *s2,
int32_t n)
{
- UChar *target = ucs1;
+ char16_t *target = ucs1;
UErrorCode err = U_ZERO_ERROR;
UConverter *cnv = u_getDefaultConverter(&err);
- if(U_SUCCESS(err) && cnv != NULL) {
+ if(U_SUCCESS(err) && cnv != nullptr) {
ucnv_reset(cnv);
ucnv_toUnicode(cnv,
&target,
ucs1+n,
&s2,
s2+u_astrnlen(s2, n),
- NULL,
- TRUE,
+ nullptr,
+ true,
&err);
ucnv_reset(cnv); /* be good citizens */
u_releaseDefaultConverter(cnv);
@@ -160,13 +160,13 @@ u_uastrncpy(UChar *ucs1,
return ucs1;
}
-U_CAPI UChar* U_EXPORT2
-u_uastrcpy(UChar *ucs1,
+U_CAPI char16_t* U_EXPORT2
+u_uastrcpy(char16_t *ucs1,
const char *s2 )
{
UErrorCode err = U_ZERO_ERROR;
UConverter *cnv = u_getDefaultConverter(&err);
- if(U_SUCCESS(err) && cnv != NULL) {
+ if(U_SUCCESS(err) && cnv != nullptr) {
ucnv_toUChars(cnv,
ucs1,
MAX_STRLEN,
@@ -186,7 +186,7 @@ u_uastrcpy(UChar *ucs1,
/*
returns the minimum of (the length of the null-terminated string) and n.
*/
-static int32_t u_ustrnlen(const UChar *ucs1, int32_t n)
+static int32_t u_ustrnlen(const char16_t *ucs1, int32_t n)
{
int32_t len = 0;
@@ -202,21 +202,21 @@ static int32_t u_ustrnlen(const UChar *ucs1, int32_t n)
U_CAPI char* U_EXPORT2
u_austrncpy(char *s1,
- const UChar *ucs2,
+ const char16_t *ucs2,
int32_t n)
{
char *target = s1;
UErrorCode err = U_ZERO_ERROR;
UConverter *cnv = u_getDefaultConverter(&err);
- if(U_SUCCESS(err) && cnv != NULL) {
+ if(U_SUCCESS(err) && cnv != nullptr) {
ucnv_reset(cnv);
ucnv_fromUnicode(cnv,
&target,
s1+n,
&ucs2,
ucs2+u_ustrnlen(ucs2, n),
- NULL,
- TRUE,
+ nullptr,
+ true,
&err);
ucnv_reset(cnv); /* be good citizens */
u_releaseDefaultConverter(cnv);
@@ -234,11 +234,11 @@ u_austrncpy(char *s1,
U_CAPI char* U_EXPORT2
u_austrcpy(char *s1,
- const UChar *ucs2 )
+ const char16_t *ucs2 )
{
UErrorCode err = U_ZERO_ERROR;
UConverter *cnv = u_getDefaultConverter(&err);
- if(U_SUCCESS(err) && cnv != NULL) {
+ if(U_SUCCESS(err) && cnv != nullptr) {
int32_t len = ucnv_fromUChars(cnv,
s1,
MAX_STRLEN,
diff --git a/contrib/libs/icu/common/ustr_titlecase_brkiter.cpp b/contrib/libs/icu/common/ustr_titlecase_brkiter.cpp
index 3002d64e34f..82beaca65b2 100644
--- a/contrib/libs/icu/common/ustr_titlecase_brkiter.cpp
+++ b/contrib/libs/icu/common/ustr_titlecase_brkiter.cpp
@@ -43,28 +43,28 @@ U_NAMESPACE_BEGIN
class WholeStringBreakIterator : public BreakIterator {
public:
WholeStringBreakIterator() : BreakIterator(), length(0) {}
- ~WholeStringBreakIterator() U_OVERRIDE;
- bool operator==(const BreakIterator&) const U_OVERRIDE;
- WholeStringBreakIterator *clone() const U_OVERRIDE;
+ ~WholeStringBreakIterator() override;
+ bool operator==(const BreakIterator&) const override;
+ WholeStringBreakIterator *clone() const override;
static UClassID U_EXPORT2 getStaticClassID();
- UClassID getDynamicClassID() const U_OVERRIDE;
- CharacterIterator &getText() const U_OVERRIDE;
- UText *getUText(UText *fillIn, UErrorCode &errorCode) const U_OVERRIDE;
- void setText(const UnicodeString &text) U_OVERRIDE;
- void setText(UText *text, UErrorCode &errorCode) U_OVERRIDE;
- void adoptText(CharacterIterator* it) U_OVERRIDE;
- int32_t first() U_OVERRIDE;
- int32_t last() U_OVERRIDE;
- int32_t previous() U_OVERRIDE;
- int32_t next() U_OVERRIDE;
- int32_t current() const U_OVERRIDE;
- int32_t following(int32_t offset) U_OVERRIDE;
- int32_t preceding(int32_t offset) U_OVERRIDE;
- UBool isBoundary(int32_t offset) U_OVERRIDE;
- int32_t next(int32_t n) U_OVERRIDE;
+ UClassID getDynamicClassID() const override;
+ CharacterIterator &getText() const override;
+ UText *getUText(UText *fillIn, UErrorCode &errorCode) const override;
+ void setText(const UnicodeString &text) override;
+ void setText(UText *text, UErrorCode &errorCode) override;
+ void adoptText(CharacterIterator* it) override;
+ int32_t first() override;
+ int32_t last() override;
+ int32_t previous() override;
+ int32_t next() override;
+ int32_t current() const override;
+ int32_t following(int32_t offset) override;
+ int32_t preceding(int32_t offset) override;
+ UBool isBoundary(int32_t offset) override;
+ int32_t next(int32_t n) override;
WholeStringBreakIterator *createBufferClone(void *stackBuffer, int32_t &BufferSize,
- UErrorCode &errorCode) U_OVERRIDE;
- WholeStringBreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) U_OVERRIDE;
+ UErrorCode &errorCode) override;
+ WholeStringBreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) override;
private:
int32_t length;
@@ -110,7 +110,7 @@ int32_t WholeStringBreakIterator::next() { return length; }
int32_t WholeStringBreakIterator::current() const { return 0; }
int32_t WholeStringBreakIterator::following(int32_t /*offset*/) { return length; }
int32_t WholeStringBreakIterator::preceding(int32_t /*offset*/) { return 0; }
-UBool WholeStringBreakIterator::isBoundary(int32_t /*offset*/) { return FALSE; }
+UBool WholeStringBreakIterator::isBoundary(int32_t /*offset*/) { return false; }
int32_t WholeStringBreakIterator::next(int32_t /*n*/) { return length; }
WholeStringBreakIterator *WholeStringBreakIterator::createBufferClone(
@@ -165,12 +165,12 @@ BreakIterator *ustrcase_getTitleBreakIterator(
int32_t CaseMap::toTitle(
const char *locale, uint32_t options, BreakIterator *iter,
- const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destCapacity, Edits *edits,
+ const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity, Edits *edits,
UErrorCode &errorCode) {
LocalPointer<BreakIterator> ownedIter;
iter = ustrcase_getTitleBreakIterator(nullptr, locale, options, iter, ownedIter, errorCode);
- if(iter==NULL) {
+ if(iter==nullptr) {
return 0;
}
UnicodeString s(srcLength<0, src, srcLength);
@@ -187,8 +187,8 @@ U_NAMESPACE_END
U_NAMESPACE_USE
U_CAPI int32_t U_EXPORT2
-u_strToTitle(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+u_strToTitle(char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
UBreakIterator *titleIter,
const char *locale,
UErrorCode *pErrorCode) {
@@ -210,13 +210,13 @@ u_strToTitle(UChar *dest, int32_t destCapacity,
U_CAPI int32_t U_EXPORT2
ucasemap_toTitle(UCaseMap *csm,
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode)) {
return 0;
}
- if (csm->iter == NULL) {
+ if (csm->iter == nullptr) {
LocalPointer<BreakIterator> ownedIter;
BreakIterator *iter = ustrcase_getTitleBreakIterator(
nullptr, csm->locale, csm->options, nullptr, ownedIter, *pErrorCode);
@@ -231,7 +231,7 @@ ucasemap_toTitle(UCaseMap *csm,
csm->caseLocale, csm->options, csm->iter,
dest, destCapacity,
src, srcLength,
- ustrcase_internalToTitle, NULL, *pErrorCode);
+ ustrcase_internalToTitle, nullptr, *pErrorCode);
}
#endif // !UCONFIG_NO_BREAK_ITERATION
diff --git a/contrib/libs/icu/common/ustr_wcs.cpp b/contrib/libs/icu/common/ustr_wcs.cpp
index 1a6ea2375d0..efbbbc2f187 100644
--- a/contrib/libs/icu/common/ustr_wcs.cpp
+++ b/contrib/libs/icu/common/ustr_wcs.cpp
@@ -33,7 +33,7 @@
#define _BUFFER_CAPACITY_MULTIPLIER 2
#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
-// TODO: We should use CharString for char buffers and UnicodeString for UChar buffers.
+// TODO: We should use CharString for char buffers and UnicodeString for char16_t buffers.
// Then we could change this to work only with wchar_t buffers.
static inline UBool
u_growAnyBufferFromStatic(void *context,
@@ -42,7 +42,7 @@ u_growAnyBufferFromStatic(void *context,
// Use char* not void* to avoid the compiler's strict-aliasing assumptions
// and related warnings.
char *newBuffer=(char *)uprv_malloc(reqCapacity*size);
- if(newBuffer!=NULL) {
+ if(newBuffer!=nullptr) {
if(length>0) {
uprv_memcpy(newBuffer, *pBuffer, (size_t)length*size);
}
@@ -57,7 +57,7 @@ u_growAnyBufferFromStatic(void *context,
}
*pBuffer=newBuffer;
- return (UBool)(newBuffer!=NULL);
+ return (UBool)(newBuffer!=nullptr);
}
/* helper function */
@@ -65,7 +65,7 @@ static wchar_t*
_strToWCS(wchar_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *src,
+ const char16_t *src,
int32_t srcLength,
UErrorCode *pErrorCode){
@@ -73,19 +73,19 @@ _strToWCS(wchar_t *dest,
char* tempBuf = stackBuffer;
int32_t tempBufCapacity = _STACK_BUFFER_CAPACITY;
char* tempBufLimit = stackBuffer + tempBufCapacity;
- UConverter* conv = NULL;
+ UConverter* conv = nullptr;
char* saveBuf = tempBuf;
- wchar_t* intTarget=NULL;
+ wchar_t* intTarget=nullptr;
int32_t intTargetCapacity=0;
int count=0,retVal=0;
- const UChar *pSrcLimit =NULL;
- const UChar *pSrc = src;
+ const char16_t *pSrcLimit =nullptr;
+ const char16_t *pSrc = src;
conv = u_getDefaultConverter(pErrorCode);
if(U_FAILURE(*pErrorCode)){
- return NULL;
+ return nullptr;
}
if(srcLength == -1){
@@ -99,7 +99,7 @@ _strToWCS(wchar_t *dest,
*pErrorCode = U_ZERO_ERROR;
/* convert to chars using default converter */
- ucnv_fromUnicode(conv,&tempBuf,tempBufLimit,&pSrc,pSrcLimit,NULL,(UBool)(pSrc==pSrcLimit),pErrorCode);
+ ucnv_fromUnicode(conv,&tempBuf,tempBufLimit,&pSrc,pSrcLimit,nullptr,(UBool)(pSrc==pSrcLimit),pErrorCode);
count =(tempBuf - saveBuf);
/* This should rarely occur */
@@ -170,7 +170,7 @@ _strToWCS(wchar_t *dest,
break;
}else if(retVal== remaining){/* should never occur */
int numWritten = (pIntTarget-intTarget);
- u_growAnyBufferFromStatic(NULL,(void**) &intTarget,
+ u_growAnyBufferFromStatic(nullptr,(void**) &intTarget,
&intTargetCapacity,
intTargetCapacity * _BUFFER_CAPACITY_MULTIPLIER,
numWritten,
@@ -232,20 +232,20 @@ U_CAPI wchar_t* U_EXPORT2
u_strToWCS(wchar_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *src,
+ const char16_t *src,
int32_t srcLength,
UErrorCode *pErrorCode){
/* args check */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)){
- return NULL;
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)){
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0)
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
#ifdef U_WCHAR_IS_UTF16
@@ -254,13 +254,13 @@ u_strToWCS(wchar_t *dest,
srcLength = u_strlen(src);
}
if(0 < srcLength && srcLength <= destCapacity){
- u_memcpy((UChar *)dest, src, srcLength);
+ u_memcpy((char16_t *)dest, src, srcLength);
}
if(pDestLength){
*pDestLength = srcLength;
}
- u_terminateUChars((UChar *)dest,destCapacity,srcLength,pErrorCode);
+ u_terminateUChars((char16_t *)dest,destCapacity,srcLength,pErrorCode);
return dest;
@@ -279,8 +279,8 @@ u_strToWCS(wchar_t *dest,
#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
/* helper function */
-static UChar*
-_strFromWCS( UChar *dest,
+static char16_t*
+_strFromWCS( char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const wchar_t *src,
@@ -288,12 +288,12 @@ _strFromWCS( UChar *dest,
UErrorCode *pErrorCode)
{
int32_t retVal =0, count =0 ;
- UConverter* conv = NULL;
- UChar* pTarget = NULL;
- UChar* pTargetLimit = NULL;
- UChar* target = NULL;
+ UConverter* conv = nullptr;
+ char16_t* pTarget = nullptr;
+ char16_t* pTargetLimit = nullptr;
+ char16_t* target = nullptr;
- UChar uStack [_STACK_BUFFER_CAPACITY];
+ char16_t uStack [_STACK_BUFFER_CAPACITY];
wchar_t wStack[_STACK_BUFFER_CAPACITY];
wchar_t* pWStack = wStack;
@@ -303,10 +303,10 @@ _strFromWCS( UChar *dest,
int32_t cStackCap = _STACK_BUFFER_CAPACITY;
char* pCSrc=cStack;
char* pCSave=pCSrc;
- char* pCSrcLimit=NULL;
+ char* pCSrcLimit=nullptr;
const wchar_t* pSrc = src;
- const wchar_t* pSrcLimit = NULL;
+ const wchar_t* pSrcLimit = nullptr;
if(srcLength ==-1){
/* if the wchar_t source is null terminated we can safely
@@ -390,7 +390,7 @@ _strFromWCS( UChar *dest,
/* Should rarely occur */
/* allocate new buffer buffer */
pWStack =(wchar_t*) uprv_malloc(sizeof(wchar_t) * (nulLen + 1));
- if(pWStack==NULL){
+ if(pWStack==nullptr){
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
goto cleanup;
}
@@ -436,7 +436,7 @@ _strFromWCS( UChar *dest,
conv= u_getDefaultConverter(pErrorCode);
- if(U_FAILURE(*pErrorCode)|| conv==NULL){
+ if(U_FAILURE(*pErrorCode)|| conv==nullptr){
goto cleanup;
}
@@ -445,7 +445,7 @@ _strFromWCS( UChar *dest,
*pErrorCode = U_ZERO_ERROR;
/* convert to stack buffer*/
- ucnv_toUnicode(conv,&pTarget,pTargetLimit,(const char**)&pCSrc,pCSrcLimit,NULL,(UBool)(pCSrc==pCSrcLimit),pErrorCode);
+ ucnv_toUnicode(conv,&pTarget,pTargetLimit,(const char**)&pCSrc,pCSrcLimit,nullptr,(UBool)(pCSrc==pCSrcLimit),pErrorCode);
/* increment count to number written to stack */
count+= pTarget - target;
@@ -482,8 +482,8 @@ cleanup:
}
#endif
-U_CAPI UChar* U_EXPORT2
-u_strFromWCS(UChar *dest,
+U_CAPI char16_t* U_EXPORT2
+u_strFromWCS(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const wchar_t *src,
@@ -492,24 +492,24 @@ u_strFromWCS(UChar *dest,
{
/* args check */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)){
- return NULL;
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)){
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0)
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
#ifdef U_WCHAR_IS_UTF16
/* wchar_t is UTF-16 just do a memcpy */
if(srcLength == -1){
- srcLength = u_strlen((const UChar *)src);
+ srcLength = u_strlen((const char16_t *)src);
}
if(0 < srcLength && srcLength <= destCapacity){
- u_memcpy(dest, (const UChar *)src, srcLength);
+ u_memcpy(dest, (const char16_t *)src, srcLength);
}
if(pDestLength){
*pDestLength = srcLength;
diff --git a/contrib/libs/icu/common/ustrcase.cpp b/contrib/libs/icu/common/ustrcase.cpp
index 36b19e75f2d..537b5ba8578 100644
--- a/contrib/libs/icu/common/ustrcase.cpp
+++ b/contrib/libs/icu/common/ustrcase.cpp
@@ -36,6 +36,12 @@
#include "ustr_imp.h"
#include "uassert.h"
+/**
+ * Code point for COMBINING ACUTE ACCENT
+ * @internal
+ */
+#define ACUTE u'\u0301'
+
U_NAMESPACE_BEGIN
namespace {
@@ -45,7 +51,7 @@ int32_t checkOverflowAndEditsError(int32_t destIndex, int32_t destCapacity,
if (U_SUCCESS(errorCode)) {
if (destIndex > destCapacity) {
errorCode = U_BUFFER_OVERFLOW_ERROR;
- } else if (edits != NULL) {
+ } else if (edits != nullptr) {
edits->copyErrorTo(errorCode);
}
}
@@ -54,8 +60,8 @@ int32_t checkOverflowAndEditsError(int32_t destIndex, int32_t destCapacity,
/* Appends a full case mapping result, see UCASE_MAX_STRING_LENGTH. */
inline int32_t
-appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
- int32_t result, const UChar *s,
+appendResult(char16_t *dest, int32_t destIndex, int32_t destCapacity,
+ int32_t result, const char16_t *s,
int32_t cpLength, uint32_t options, icu::Edits *edits) {
UChar32 c;
int32_t length;
@@ -63,7 +69,7 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
/* decode the result */
if(result<0) {
/* (not) original code point */
- if(edits!=NULL) {
+ if(edits!=nullptr) {
edits->addUnchanged(cpLength);
}
if(options & U_OMIT_UNCHANGED_TEXT) {
@@ -71,7 +77,7 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
}
c=~result;
if(destIndex<destCapacity && c<=0xffff) { // BMP slightly-fastpath
- dest[destIndex++]=(UChar)c;
+ dest[destIndex++]=(char16_t)c;
return destIndex;
}
length=cpLength;
@@ -80,8 +86,8 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
c=U_SENTINEL;
length=result;
} else if(destIndex<destCapacity && result<=0xffff) { // BMP slightly-fastpath
- dest[destIndex++]=(UChar)result;
- if(edits!=NULL) {
+ dest[destIndex++]=(char16_t)result;
+ if(edits!=nullptr) {
edits->addReplace(cpLength, 1);
}
return destIndex;
@@ -89,7 +95,7 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
c=result;
length=U16_LENGTH(c);
}
- if(edits!=NULL) {
+ if(edits!=nullptr) {
edits->addReplace(cpLength, length);
}
}
@@ -101,7 +107,7 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
/* append the result */
if(c>=0) {
/* code point */
- UBool isError=FALSE;
+ UBool isError=false;
U16_APPEND(dest, destIndex, destCapacity, c, isError);
if(isError) {
/* overflow, nothing written */
@@ -127,7 +133,7 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity,
}
inline int32_t
-appendUChar(UChar *dest, int32_t destIndex, int32_t destCapacity, UChar c) {
+appendUChar(char16_t *dest, int32_t destIndex, int32_t destCapacity, char16_t c) {
if(destIndex<destCapacity) {
dest[destIndex]=c;
} else if(destIndex==INT32_MAX) {
@@ -137,9 +143,9 @@ appendUChar(UChar *dest, int32_t destIndex, int32_t destCapacity, UChar c) {
}
int32_t
-appendNonEmptyUnchanged(UChar *dest, int32_t destIndex, int32_t destCapacity,
- const UChar *s, int32_t length, uint32_t options, icu::Edits *edits) {
- if(edits!=NULL) {
+appendNonEmptyUnchanged(char16_t *dest, int32_t destIndex, int32_t destCapacity,
+ const char16_t *s, int32_t length, uint32_t options, icu::Edits *edits) {
+ if(edits!=nullptr) {
edits->addUnchanged(length);
}
if(options & U_OMIT_UNCHANGED_TEXT) {
@@ -155,8 +161,8 @@ appendNonEmptyUnchanged(UChar *dest, int32_t destIndex, int32_t destCapacity,
}
inline int32_t
-appendUnchanged(UChar *dest, int32_t destIndex, int32_t destCapacity,
- const UChar *s, int32_t length, uint32_t options, icu::Edits *edits) {
+appendUnchanged(char16_t *dest, int32_t destIndex, int32_t destCapacity,
+ const char16_t *s, int32_t length, uint32_t options, icu::Edits *edits) {
if (length <= 0) {
return destIndex;
}
@@ -183,12 +189,12 @@ utf16_caseContextIterator(void *context, int8_t dir) {
if(dir<0) {
if(csc->start<csc->index) {
- U16_PREV((const UChar *)csc->p, csc->start, csc->index, c);
+ U16_PREV((const char16_t *)csc->p, csc->start, csc->index, c);
return c;
}
} else {
if(csc->index<csc->limit) {
- U16_NEXT((const UChar *)csc->p, csc->index, csc->limit, c);
+ U16_NEXT((const char16_t *)csc->p, csc->index, csc->limit, c);
return c;
}
}
@@ -200,8 +206,8 @@ utf16_caseContextIterator(void *context, int8_t dir) {
* caseLocale < 0: Case-folds [srcStart..srcLimit[.
*/
int32_t toLower(int32_t caseLocale, uint32_t options,
- UChar *dest, int32_t destCapacity,
- const UChar *src, UCaseContext *csc, int32_t srcStart, int32_t srcLimit,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, UCaseContext *csc, int32_t srcStart, int32_t srcLimit,
icu::Edits *edits, UErrorCode &errorCode) {
const int8_t *latinToLower;
if (caseLocale == UCASE_LOC_ROOT ||
@@ -218,7 +224,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
int32_t srcIndex = srcStart;
for (;;) {
// fast path for simple cases
- UChar lead = 0;
+ char16_t lead = 0;
while (srcIndex < srcLimit) {
lead = src[srcIndex];
int32_t delta;
@@ -238,7 +244,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
continue;
}
}
- lead += static_cast<UChar>(delta);
+ lead += static_cast<char16_t>(delta);
destIndex = appendUnchanged(dest, destIndex, destCapacity,
src + prev, srcIndex - 1 - prev, options, edits);
if (destIndex >= 0) {
@@ -258,7 +264,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
}
// slow path
int32_t cpStart = srcIndex++;
- UChar trail;
+ char16_t trail;
UChar32 c;
if (U16_IS_LEAD(lead) && srcIndex < srcLimit && U16_IS_TRAIL(trail = src[srcIndex])) {
c = U16_GET_SUPPLEMENTARY(lead, trail);
@@ -266,7 +272,7 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
} else {
c = lead;
}
- const UChar *s;
+ const char16_t *s;
if (caseLocale >= 0) {
csc->cpStart = cpStart;
csc->cpLimit = srcIndex;
@@ -298,8 +304,8 @@ int32_t toLower(int32_t caseLocale, uint32_t options,
}
int32_t toUpper(int32_t caseLocale, uint32_t options,
- UChar *dest, int32_t destCapacity,
- const UChar *src, UCaseContext *csc, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, UCaseContext *csc, int32_t srcLength,
icu::Edits *edits, UErrorCode &errorCode) {
const int8_t *latinToUpper;
if (caseLocale == UCASE_LOC_TURKISH) {
@@ -313,7 +319,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options,
int32_t srcIndex = 0;
for (;;) {
// fast path for simple cases
- UChar lead = 0;
+ char16_t lead = 0;
while (srcIndex < srcLength) {
lead = src[srcIndex];
int32_t delta;
@@ -333,7 +339,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options,
continue;
}
}
- lead += static_cast<UChar>(delta);
+ lead += static_cast<char16_t>(delta);
destIndex = appendUnchanged(dest, destIndex, destCapacity,
src + prev, srcIndex - 1 - prev, options, edits);
if (destIndex >= 0) {
@@ -354,7 +360,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options,
// slow path
int32_t cpStart;
csc->cpStart = cpStart = srcIndex++;
- UChar trail;
+ char16_t trail;
UChar32 c;
if (U16_IS_LEAD(lead) && srcIndex < srcLength && U16_IS_TRAIL(trail = src[srcIndex])) {
c = U16_GET_SUPPLEMENTARY(lead, trail);
@@ -363,7 +369,7 @@ int32_t toUpper(int32_t caseLocale, uint32_t options,
c = lead;
}
csc->cpLimit = srcIndex;
- const UChar *s;
+ const char16_t *s;
c = ucase_toFullUpper(c, utf16_caseContextIterator, csc, &s, caseLocale);
if (c >= 0) {
destIndex = appendUnchanged(dest, destIndex, destCapacity,
@@ -396,10 +402,98 @@ U_NAMESPACE_USE
#if !UCONFIG_NO_BREAK_ITERATION
+namespace {
+
+/**
+ * Input: c is a letter I with or without acute accent.
+ * start is the index in src after c, and is less than segmentLimit.
+ * If a plain i/I is followed by a plain j/J,
+ * or an i/I with acute (precomposed or decomposed) is followed by a j/J with acute,
+ * then we output accordingly.
+ *
+ * @return the src index after the titlecased sequence, or the start index if no Dutch IJ
+ */
+int32_t maybeTitleDutchIJ(const char16_t *src, UChar32 c, int32_t start, int32_t segmentLimit,
+ char16_t *dest, int32_t &destIndex, int32_t destCapacity, uint32_t options,
+ icu::Edits *edits) {
+ U_ASSERT(start < segmentLimit);
+
+ int32_t index = start;
+ bool withAcute = false;
+
+ // If the conditions are met, then the following variables tell us what to output.
+ int32_t unchanged1 = 0; // code units before the j, or the whole sequence (0..3)
+ bool doTitleJ = false; // true if the j needs to be titlecased
+ int32_t unchanged2 = 0; // after the j (0 or 1)
+
+ // next character after the first letter
+ char16_t c2 = src[index++];
+
+ // Is the first letter an i/I with accent?
+ if (c == u'I') {
+ if (c2 == ACUTE) {
+ withAcute = true;
+ unchanged1 = 1;
+ if (index == segmentLimit) { return start; }
+ c2 = src[index++];
+ }
+ } else { // Í
+ withAcute = true;
+ }
+
+ // Is the next character a j/J?
+ if (c2 == u'j') {
+ doTitleJ = true;
+ } else if (c2 == u'J') {
+ ++unchanged1;
+ } else {
+ return start;
+ }
+
+ // A plain i/I must be followed by a plain j/J.
+ // An i/I with acute must be followed by a j/J with acute.
+ if (withAcute) {
+ if (index == segmentLimit || src[index++] != ACUTE) { return start; }
+ if (doTitleJ) {
+ unchanged2 = 1;
+ } else {
+ ++unchanged1;
+ }
+ }
+
+ // There must not be another combining mark.
+ if (index < segmentLimit) {
+ int32_t cp;
+ int32_t i = index;
+ U16_NEXT(src, i, segmentLimit, cp);
+ uint32_t typeMask = U_GET_GC_MASK(cp);
+ if ((typeMask & U_GC_M_MASK) != 0) {
+ return start;
+ }
+ }
+
+ // Output the rest of the Dutch IJ.
+ destIndex = appendUnchanged(dest, destIndex, destCapacity, src + start, unchanged1, options, edits);
+ start += unchanged1;
+ if (doTitleJ) {
+ destIndex = appendUChar(dest, destIndex, destCapacity, u'J');
+ if (edits != nullptr) {
+ edits->addReplace(1, 1);
+ }
+ ++start;
+ }
+ destIndex = appendUnchanged(dest, destIndex, destCapacity, src + start, unchanged2, options, edits);
+
+ U_ASSERT(start + unchanged2 == index);
+ return index;
+}
+
+} // namespace
+
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *iter,
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) {
if (!ustrcase_checkTitleAdjustmentOptions(options, errorCode)) {
@@ -412,14 +506,14 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
csc.limit=srcLength;
int32_t destIndex=0;
int32_t prev=0;
- UBool isFirstIndex=TRUE;
+ bool isFirstIndex=true;
/* titlecasing loop */
while(prev<srcLength) {
/* find next index where to titlecase */
int32_t index;
if(isFirstIndex) {
- isFirstIndex=FALSE;
+ isFirstIndex=false;
index=iter->first();
} else {
index=iter->next();
@@ -446,7 +540,7 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
// Stop with titleStart<titleLimit<=index
// if there is a character to be titlecased,
// or else stop with titleStart==titleLimit==index.
- UBool toCased = (options&U_TITLECASE_ADJUST_TO_CASED) != 0;
+ bool toCased = (options&U_TITLECASE_ADJUST_TO_CASED) != 0;
while (toCased ? UCASE_NONE==ucase_getType(c) : !ustrcase_isLNS(c)) {
titleStart=titleLimit;
if(titleLimit==index) {
@@ -468,7 +562,7 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
/* titlecase c which is from [titleStart..titleLimit[ */
csc.cpStart=titleStart;
csc.cpLimit=titleLimit;
- const UChar *s;
+ const char16_t *s;
c=ucase_toFullTitle(c, utf16_caseContextIterator, &csc, &s, caseLocale);
destIndex=appendResult(dest, destIndex, destCapacity, c, s,
titleLimit-titleStart, options, edits);
@@ -479,27 +573,15 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
/* Special case Dutch IJ titlecasing */
if (titleStart+1 < index &&
- caseLocale == UCASE_LOC_DUTCH &&
- (src[titleStart] == 0x0049 || src[titleStart] == 0x0069)) {
- if (src[titleStart+1] == 0x006A) {
- destIndex=appendUChar(dest, destIndex, destCapacity, 0x004A);
- if(destIndex<0) {
- errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
- return 0;
- }
- if(edits!=NULL) {
- edits->addReplace(1, 1);
- }
- titleLimit++;
- } else if (src[titleStart+1] == 0x004A) {
- // Keep the capital J from getting lowercased.
- destIndex=appendUnchanged(dest, destIndex, destCapacity,
- src+titleStart+1, 1, options, edits);
- if(destIndex<0) {
- errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
- return 0;
- }
- titleLimit++;
+ caseLocale == UCASE_LOC_DUTCH) {
+ if (c < 0) {
+ c = ~c;
+ }
+
+ if (c == u'I' || c == u'Í') {
+ titleLimit = maybeTitleDutchIJ(src, c, titleStart + 1, index,
+ dest, destIndex, destCapacity, options,
+ edits);
}
}
@@ -510,7 +592,7 @@ ustrcase_internalToTitle(int32_t caseLocale, uint32_t options, BreakIterator *it
destIndex+=
toLower(
caseLocale, options,
- dest+destIndex, destCapacity-destIndex,
+ (dest==nullptr) ? nullptr: dest+destIndex, destCapacity-destIndex,
src, &csc, titleLimit, index,
edits, errorCode);
if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
@@ -997,7 +1079,7 @@ uint32_t getDiacriticData(UChar32 c) {
}
}
-UBool isFollowedByCasedLetter(const UChar *s, int32_t i, int32_t length) {
+UBool isFollowedByCasedLetter(const char16_t *s, int32_t i, int32_t length) {
while (i < length) {
UChar32 c;
U16_NEXT(s, i, length, c);
@@ -1005,12 +1087,12 @@ UBool isFollowedByCasedLetter(const UChar *s, int32_t i, int32_t length) {
if ((type & UCASE_IGNORABLE) != 0) {
// Case-ignorable, continue with the loop.
} else if (type != UCASE_NONE) {
- return TRUE; // Followed by cased letter.
+ return true; // Followed by cased letter.
} else {
- return FALSE; // Uncased and not case-ignorable.
+ return false; // Uncased and not case-ignorable.
}
}
- return FALSE; // Not followed by cased letter.
+ return false; // Not followed by cased letter.
}
/**
@@ -1020,8 +1102,8 @@ UBool isFollowedByCasedLetter(const UChar *s, int32_t i, int32_t length) {
* TODO: Try to re-consolidate one way or another with the non-Greek function.
*/
int32_t toUpper(uint32_t options,
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
Edits *edits,
UErrorCode &errorCode) {
int32_t destIndex=0;
@@ -1073,7 +1155,7 @@ int32_t toUpper(uint32_t options,
nextState |= AFTER_VOWEL_WITH_ACCENT;
}
// Map according to Greek rules.
- UBool addTonos = FALSE;
+ UBool addTonos = false;
if (upper == 0x397 &&
(data & HAS_ACCENT) != 0 &&
numYpogegrammeni == 0 &&
@@ -1084,7 +1166,7 @@ int32_t toUpper(uint32_t options,
if (i == nextIndex) {
upper = 0x389; // Preserve the precomposed form.
} else {
- addTonos = TRUE;
+ addTonos = true;
}
} else if ((data & HAS_DIALYTIKA) != 0) {
// Preserve a vowel with dialytika in precomposed form if it exists.
@@ -1099,7 +1181,7 @@ int32_t toUpper(uint32_t options,
UBool change;
if (edits == nullptr && (options & U_OMIT_UNCHANGED_TEXT) == 0) {
- change = TRUE; // common, simple usage
+ change = true; // common, simple usage
} else {
// Find out first whether we are changing the text.
change = src[i] != upper || numYpogegrammeni > 0;
@@ -1116,11 +1198,11 @@ int32_t toUpper(uint32_t options,
int32_t newLength = (i2 - i) + numYpogegrammeni;
change |= oldLength != newLength;
if (change) {
- if (edits != NULL) {
+ if (edits != nullptr) {
edits->addReplace(oldLength, newLength);
}
} else {
- if (edits != NULL) {
+ if (edits != nullptr) {
edits->addUnchanged(oldLength);
}
// Write unchanged text?
@@ -1129,7 +1211,7 @@ int32_t toUpper(uint32_t options,
}
if (change) {
- destIndex=appendUChar(dest, destIndex, destCapacity, (UChar)upper);
+ destIndex=appendUChar(dest, destIndex, destCapacity, (char16_t)upper);
if (destIndex >= 0 && (data & HAS_EITHER_DIALYTIKA) != 0) {
destIndex=appendUChar(dest, destIndex, destCapacity, 0x308); // restore or add a dialytika
}
@@ -1146,8 +1228,8 @@ int32_t toUpper(uint32_t options,
}
}
} else {
- const UChar *s;
- c=ucase_toFullUpper(c, NULL, NULL, &s, UCASE_LOC_GREEK);
+ const char16_t *s;
+ c=ucase_toFullUpper(c, nullptr, nullptr, &s, UCASE_LOC_GREEK);
destIndex = appendResult(dest, destIndex, destCapacity, c, s,
nextIndex - i, options, edits);
if (destIndex < 0) {
@@ -1169,8 +1251,8 @@ U_NAMESPACE_END
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToLower(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_UNUSED
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) {
UCaseContext csc=UCASECONTEXT_INITIALIZER;
@@ -1186,8 +1268,8 @@ ustrcase_internalToLower(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_IT
U_CFUNC int32_t U_CALLCONV
ustrcase_internalToUpper(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_UNUSED
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) {
int32_t destIndex;
@@ -1209,8 +1291,8 @@ ustrcase_internalToUpper(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_IT
U_CFUNC int32_t U_CALLCONV
ustrcase_internalFold(int32_t /* caseLocale */, uint32_t options, UCASEMAP_BREAK_ITERATOR_UNUSED
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
icu::Edits *edits,
UErrorCode &errorCode) {
int32_t destIndex = toLower(
@@ -1223,8 +1305,8 @@ ustrcase_internalFold(int32_t /* caseLocale */, uint32_t options, UCASEMAP_BREAK
U_CFUNC int32_t
ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
UStringCaseMapper *stringCaseMapper,
icu::Edits *edits,
UErrorCode &errorCode) {
@@ -1235,8 +1317,8 @@ ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
return 0;
}
if( destCapacity<0 ||
- (dest==NULL && destCapacity>0) ||
- src==NULL ||
+ (dest==nullptr && destCapacity>0) ||
+ src==nullptr ||
srcLength<-1
) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
@@ -1249,7 +1331,7 @@ ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
}
/* check for overlapping source and destination */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((src>=dest && src<(dest+destCapacity)) ||
(dest>=src && dest<(src+srcLength)))
) {
@@ -1267,12 +1349,12 @@ ustrcase_map(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
U_CFUNC int32_t
ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_PARAM
- UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
UStringCaseMapper *stringCaseMapper,
UErrorCode &errorCode) {
- UChar buffer[300];
- UChar *temp;
+ char16_t buffer[300];
+ char16_t *temp;
int32_t destLength;
@@ -1281,8 +1363,8 @@ ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITE
return 0;
}
if( destCapacity<0 ||
- (dest==NULL && destCapacity>0) ||
- src==NULL ||
+ (dest==nullptr && destCapacity>0) ||
+ src==nullptr ||
srcLength<-1
) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
@@ -1295,7 +1377,7 @@ ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITE
}
/* check for overlapping source and destination */
- if( dest!=NULL &&
+ if( dest!=nullptr &&
((src>=dest && src<(dest+destCapacity)) ||
(dest>=src && dest<(src+srcLength)))
) {
@@ -1305,8 +1387,8 @@ ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITE
temp=buffer;
} else {
/* allocate a buffer */
- temp=(UChar *)uprv_malloc(destCapacity*U_SIZEOF_UCHAR);
- if(temp==NULL) {
+ temp=(char16_t *)uprv_malloc(destCapacity*U_SIZEOF_UCHAR);
+ if(temp==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -1316,7 +1398,7 @@ ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITE
}
destLength=stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR
- temp, destCapacity, src, srcLength, NULL, errorCode);
+ temp, destCapacity, src, srcLength, nullptr, errorCode);
if(temp!=dest) {
/* copy the result string to the destination buffer */
if (U_SUCCESS(errorCode) && 0 < destLength && destLength <= destCapacity) {
@@ -1333,8 +1415,8 @@ ustrcase_mapWithOverlap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITE
/* public API functions */
U_CAPI int32_t U_EXPORT2
-u_strFoldCase(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+u_strFoldCase(char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
uint32_t options,
UErrorCode *pErrorCode) {
return ustrcase_mapWithOverlap(
@@ -1348,8 +1430,8 @@ U_NAMESPACE_BEGIN
int32_t CaseMap::fold(
uint32_t options,
- const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destCapacity, Edits *edits,
+ const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity, Edits *edits,
UErrorCode &errorCode) {
return ustrcase_map(
UCASE_LOC_ROOT, options, UCASEMAP_BREAK_ITERATOR_NULL
@@ -1373,7 +1455,7 @@ U_NAMESPACE_END
/* stack element for previous-level source/decomposition pointers */
struct CmpEquivLevel {
- const UChar *start, *s, *limit;
+ const char16_t *start, *s, *limit;
};
typedef struct CmpEquivLevel CmpEquivLevel;
@@ -1382,9 +1464,9 @@ typedef struct CmpEquivLevel CmpEquivLevel;
* This function is called from u_strcmpFold() and u_caseInsensitivePrefixMatch().
*
* @param s1 input string 1
- * @param length1 length of string 1, or -1 (NULL terminated)
+ * @param length1 length of string 1, or -1 (NUL terminated)
* @param s2 input string 2
- * @param length2 length of string 2, or -1 (NULL terminated)
+ * @param length2 length of string 2, or -1 (NUL terminated)
* @param options compare options
* @param matchLen1 (output) length of partial prefix match in s1
* @param matchLen2 (output) length of partial prefix match in s2
@@ -1392,31 +1474,31 @@ typedef struct CmpEquivLevel CmpEquivLevel;
* @return The result of comparison
*/
static int32_t _cmpFold(
- const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+ const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
uint32_t options,
int32_t *matchLen1, int32_t *matchLen2,
UErrorCode *pErrorCode) {
int32_t cmpRes = 0;
/* current-level start/limit - s1/s2 as current */
- const UChar *start1, *start2, *limit1, *limit2;
+ const char16_t *start1, *start2, *limit1, *limit2;
/* points to the original start address */
- const UChar *org1, *org2;
+ const char16_t *org1, *org2;
/* points to the end of match + 1 */
- const UChar *m1, *m2;
+ const char16_t *m1, *m2;
/* case folding variables */
- const UChar *p;
+ const char16_t *p;
int32_t length;
/* stacks of previous-level start/current/limit */
CmpEquivLevel stack1[2], stack2[2];
/* case folding buffers, only use current-level start/limit */
- UChar fold1[UCASE_MAX_STRING_LENGTH+1], fold2[UCASE_MAX_STRING_LENGTH+1];
+ char16_t fold1[UCASE_MAX_STRING_LENGTH+1], fold2[UCASE_MAX_STRING_LENGTH+1];
/* track which is the current level per string */
int32_t level1, level2;
@@ -1436,21 +1518,21 @@ static int32_t _cmpFold(
/* initialize */
if(matchLen1) {
- U_ASSERT(matchLen2 !=NULL);
+ U_ASSERT(matchLen2 !=nullptr);
*matchLen1=0;
*matchLen2=0;
}
start1=m1=org1=s1;
if(length1==-1) {
- limit1=NULL;
+ limit1=nullptr;
} else {
limit1=s1+length1;
}
start2=m2=org2=s2;
if(length2==-1) {
- limit2=NULL;
+ limit2=nullptr;
} else {
limit2=s2+length2;
}
@@ -1468,7 +1550,7 @@ static int32_t _cmpFold(
if(c1<0) {
/* get next code unit from string 1, post-increment */
for(;;) {
- if(s1==limit1 || ((c1=*s1)==0 && (limit1==NULL || (options&_STRNCMP_STYLE)))) {
+ if(s1==limit1 || ((c1=*s1)==0 && (limit1==nullptr || (options&_STRNCMP_STYLE)))) {
if(level1==0) {
c1=-1;
break;
@@ -1482,7 +1564,7 @@ static int32_t _cmpFold(
do {
--level1;
start1=stack1[level1].start; /*Not uninitialized*/
- } while(start1==NULL);
+ } while(start1==nullptr);
s1=stack1[level1].s; /*Not uninitialized*/
limit1=stack1[level1].limit; /*Not uninitialized*/
}
@@ -1491,7 +1573,7 @@ static int32_t _cmpFold(
if(c2<0) {
/* get next code unit from string 2, post-increment */
for(;;) {
- if(s2==limit2 || ((c2=*s2)==0 && (limit2==NULL || (options&_STRNCMP_STYLE)))) {
+ if(s2==limit2 || ((c2=*s2)==0 && (limit2==nullptr || (options&_STRNCMP_STYLE)))) {
if(level2==0) {
c2=-1;
break;
@@ -1505,7 +1587,7 @@ static int32_t _cmpFold(
do {
--level2;
start2=stack2[level2].start; /*Not uninitialized*/
- } while(start2==NULL);
+ } while(start2==nullptr);
s2=stack2[level2].s; /*Not uninitialized*/
limit2=stack2[level2].limit; /*Not uninitialized*/
}
@@ -1516,7 +1598,7 @@ static int32_t _cmpFold(
* either variable c1, c2 is -1 only if the corresponding string is finished
*/
if(c1==c2) {
- const UChar *next1, *next2;
+ const char16_t *next1, *next2;
if(c1<0) {
cmpRes=0; /* c1==c2==-1 indicating end of strings */
@@ -1532,7 +1614,7 @@ static int32_t _cmpFold(
* has no matching code point in s1, so this implementation returns
* 2 as the prefix match length ("Fu").
*/
- next1=next2=NULL;
+ next1=next2=nullptr;
if(level1==0) {
next1=s1;
} else if(s1==limit1) {
@@ -1547,7 +1629,7 @@ static int32_t _cmpFold(
next1=stack1[0].s;
}
- if (next1!=NULL) {
+ if (next1!=nullptr) {
if(level2==0) {
next2=s2;
} else if(s2==limit2) {
@@ -1556,7 +1638,7 @@ static int32_t _cmpFold(
/* is s2 at the end of the current stack? */
next2=stack2[0].s;
}
- if(next2!=NULL) {
+ if(next2!=nullptr) {
m1=next1;
m2=next2;
}
@@ -1575,7 +1657,7 @@ static int32_t _cmpFold(
/* get complete code points for c1, c2 for lookups if either is a surrogate */
cp1=c1;
if(U_IS_SURROGATE(c1)) {
- UChar c;
+ char16_t c;
if(U_IS_SURROGATE_LEAD(c1)) {
if(s1!=limit1 && U16_IS_TRAIL(c=*s1)) {
@@ -1591,7 +1673,7 @@ static int32_t _cmpFold(
cp2=c2;
if(U_IS_SURROGATE(c2)) {
- UChar c;
+ char16_t c;
if(U_IS_SURROGATE_LEAD(c2)) {
if(s2!=limit2 && U16_IS_TRAIL(c=*s2)) {
@@ -1755,25 +1837,25 @@ static int32_t _cmpFold(
/* internal function */
U_CFUNC int32_t
-u_strcmpFold(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+u_strcmpFold(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
uint32_t options,
UErrorCode *pErrorCode) {
- return _cmpFold(s1, length1, s2, length2, options, NULL, NULL, pErrorCode);
+ return _cmpFold(s1, length1, s2, length2, options, nullptr, nullptr, pErrorCode);
}
/* public API functions */
U_CAPI int32_t U_EXPORT2
-u_strCaseCompare(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+u_strCaseCompare(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
uint32_t options,
UErrorCode *pErrorCode) {
/* argument checking */
if(pErrorCode==0 || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(s1==NULL || length1<-1 || s2==NULL || length2<-1) {
+ if(s1==nullptr || length1<-1 || s2==nullptr || length2<-1) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1783,7 +1865,7 @@ u_strCaseCompare(const UChar *s1, int32_t length1,
}
U_CAPI int32_t U_EXPORT2
-u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options) {
+u_strcasecmp(const char16_t *s1, const char16_t *s2, uint32_t options) {
UErrorCode errorCode=U_ZERO_ERROR;
return u_strcmpFold(s1, -1, s2, -1,
options|U_COMPARE_IGNORE_CASE,
@@ -1791,7 +1873,7 @@ u_strcasecmp(const UChar *s1, const UChar *s2, uint32_t options) {
}
U_CAPI int32_t U_EXPORT2
-u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options) {
+u_memcasecmp(const char16_t *s1, const char16_t *s2, int32_t length, uint32_t options) {
UErrorCode errorCode=U_ZERO_ERROR;
return u_strcmpFold(s1, length, s2, length,
options|U_COMPARE_IGNORE_CASE,
@@ -1799,7 +1881,7 @@ u_memcasecmp(const UChar *s1, const UChar *s2, int32_t length, uint32_t options)
}
U_CAPI int32_t U_EXPORT2
-u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options) {
+u_strncasecmp(const char16_t *s1, const char16_t *s2, int32_t n, uint32_t options) {
UErrorCode errorCode=U_ZERO_ERROR;
return u_strcmpFold(s1, n, s2, n,
options|(U_COMPARE_IGNORE_CASE|_STRNCMP_STYLE),
@@ -1808,8 +1890,8 @@ u_strncasecmp(const UChar *s1, const UChar *s2, int32_t n, uint32_t options) {
/* internal API - detect length of shared prefix */
U_CAPI void
-u_caseInsensitivePrefixMatch(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+u_caseInsensitivePrefixMatch(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
uint32_t options,
int32_t *matchLen1, int32_t *matchLen2,
UErrorCode *pErrorCode) {
diff --git a/contrib/libs/icu/common/ustrcase_locale.cpp b/contrib/libs/icu/common/ustrcase_locale.cpp
index 2ecd24f03ec..176add9c510 100644
--- a/contrib/libs/icu/common/ustrcase_locale.cpp
+++ b/contrib/libs/icu/common/ustrcase_locale.cpp
@@ -29,7 +29,7 @@
U_CFUNC int32_t
ustrcase_getCaseLocale(const char *locale) {
- if (locale == NULL) {
+ if (locale == nullptr) {
locale = uloc_getDefault();
}
if (*locale == 0) {
@@ -42,8 +42,8 @@ ustrcase_getCaseLocale(const char *locale) {
/* public API functions */
U_CAPI int32_t U_EXPORT2
-u_strToLower(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+u_strToLower(char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
const char *locale,
UErrorCode *pErrorCode) {
return ustrcase_mapWithOverlap(
@@ -54,8 +54,8 @@ u_strToLower(UChar *dest, int32_t destCapacity,
}
U_CAPI int32_t U_EXPORT2
-u_strToUpper(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
+u_strToUpper(char16_t *dest, int32_t destCapacity,
+ const char16_t *src, int32_t srcLength,
const char *locale,
UErrorCode *pErrorCode) {
return ustrcase_mapWithOverlap(
@@ -69,8 +69,8 @@ U_NAMESPACE_BEGIN
int32_t CaseMap::toLower(
const char *locale, uint32_t options,
- const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destCapacity, Edits *edits,
+ const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity, Edits *edits,
UErrorCode &errorCode) {
return ustrcase_map(
ustrcase_getCaseLocale(locale), options, UCASEMAP_BREAK_ITERATOR_NULL
@@ -81,8 +81,8 @@ int32_t CaseMap::toLower(
int32_t CaseMap::toUpper(
const char *locale, uint32_t options,
- const UChar *src, int32_t srcLength,
- UChar *dest, int32_t destCapacity, Edits *edits,
+ const char16_t *src, int32_t srcLength,
+ char16_t *dest, int32_t destCapacity, Edits *edits,
UErrorCode &errorCode) {
return ustrcase_map(
ustrcase_getCaseLocale(locale), options, UCASEMAP_BREAK_ITERATOR_NULL
diff --git a/contrib/libs/icu/common/ustrenum.cpp b/contrib/libs/icu/common/ustrenum.cpp
index 08a1bf29c3a..a60b2208f68 100644
--- a/contrib/libs/icu/common/ustrenum.cpp
+++ b/contrib/libs/icu/common/ustrenum.cpp
@@ -29,7 +29,7 @@ StringEnumeration::StringEnumeration()
}
StringEnumeration::~StringEnumeration() {
- if (chars != NULL && chars != charsBuffer) {
+ if (chars != nullptr && chars != charsBuffer) {
uprv_free(chars);
}
}
@@ -37,17 +37,17 @@ StringEnumeration::~StringEnumeration() {
// StringEnumeration base class clone() default implementation, does not clone
StringEnumeration *
StringEnumeration::clone() const {
- return NULL;
+ return nullptr;
}
const char *
StringEnumeration::next(int32_t *resultLength, UErrorCode &status) {
const UnicodeString *s=snext(status);
- if(U_SUCCESS(status) && s!=NULL) {
+ if(U_SUCCESS(status) && s!=nullptr) {
unistr=*s;
ensureCharsCapacity(unistr.length()+1, status);
if(U_SUCCESS(status)) {
- if(resultLength!=NULL) {
+ if(resultLength!=nullptr) {
*resultLength=unistr.length();
}
unistr.extract(0, INT32_MAX, chars, charsCapacity, US_INV);
@@ -55,21 +55,21 @@ StringEnumeration::next(int32_t *resultLength, UErrorCode &status) {
}
}
- return NULL;
+ return nullptr;
}
-const UChar *
+const char16_t *
StringEnumeration::unext(int32_t *resultLength, UErrorCode &status) {
const UnicodeString *s=snext(status);
- if(U_SUCCESS(status) && s!=NULL) {
+ if(U_SUCCESS(status) && s!=nullptr) {
unistr=*s;
- if(resultLength!=NULL) {
+ if(resultLength!=nullptr) {
*resultLength=unistr.length();
}
return unistr.getTerminatedBuffer();
}
- return NULL;
+ return nullptr;
}
const UnicodeString *
@@ -90,7 +90,7 @@ StringEnumeration::ensureCharsCapacity(int32_t capacity, UErrorCode &status) {
uprv_free(chars);
}
chars=(char *)uprv_malloc(capacity);
- if(chars==NULL) {
+ if(chars==nullptr) {
chars=charsBuffer;
charsCapacity=sizeof(charsBuffer);
status=U_MEMORY_ALLOCATION_ERROR;
@@ -102,13 +102,13 @@ StringEnumeration::ensureCharsCapacity(int32_t capacity, UErrorCode &status) {
UnicodeString *
StringEnumeration::setChars(const char *s, int32_t length, UErrorCode &status) {
- if(U_SUCCESS(status) && s!=NULL) {
+ if(U_SUCCESS(status) && s!=nullptr) {
if(length<0) {
length=(int32_t)uprv_strlen(s);
}
- UChar *buffer=unistr.getBuffer(length+1);
- if(buffer!=NULL) {
+ char16_t *buffer=unistr.getBuffer(length+1);
+ if(buffer!=nullptr) {
u_charsToUChars(s, buffer, length);
buffer[length]=0;
unistr.releaseBuffer(length);
@@ -118,7 +118,7 @@ StringEnumeration::setChars(const char *s, int32_t length, UErrorCode &status) {
}
}
- return NULL;
+ return nullptr;
}
bool
StringEnumeration::operator==(const StringEnumeration& that)const {
@@ -137,13 +137,13 @@ UStringEnumeration::fromUEnumeration(
UEnumeration *uenumToAdopt, UErrorCode &status) {
if (U_FAILURE(status)) {
uenum_close(uenumToAdopt);
- return NULL;
+ return nullptr;
}
UStringEnumeration *result = new UStringEnumeration(uenumToAdopt);
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
uenum_close(uenumToAdopt);
- return NULL;
+ return nullptr;
}
return result;
}
@@ -167,7 +167,7 @@ const char *UStringEnumeration::next(int32_t *resultLength, UErrorCode &status)
const UnicodeString* UStringEnumeration::snext(UErrorCode& status) {
int32_t length;
- const UChar* str = uenum_unext(uenum, &length, &status);
+ const char16_t* str = uenum_unext(uenum, &length, &status);
if (str == 0 || U_FAILURE(status)) {
return 0;
}
@@ -209,7 +209,7 @@ ustrenum_count(UEnumeration* en,
/**
* Wrapper API to make StringEnumeration look like UEnumeration.
*/
-static const UChar* U_CALLCONV
+static const char16_t* U_CALLCONV
ustrenum_unext(UEnumeration* en,
int32_t* resultLength,
UErrorCode* ec)
@@ -243,8 +243,8 @@ ustrenum_reset(UEnumeration* en,
* The StringEnumeration pointer will be stored in 'context'.
*/
static const UEnumeration USTRENUM_VT = {
- NULL,
- NULL, // store StringEnumeration pointer here
+ nullptr,
+ nullptr, // store StringEnumeration pointer here
ustrenum_close,
ustrenum_count,
ustrenum_unext,
@@ -261,17 +261,17 @@ U_CDECL_END
*/
U_CAPI UEnumeration* U_EXPORT2
uenum_openFromStringEnumeration(icu::StringEnumeration* adopted, UErrorCode* ec) {
- UEnumeration* result = NULL;
- if (U_SUCCESS(*ec) && adopted != NULL) {
+ UEnumeration* result = nullptr;
+ if (U_SUCCESS(*ec) && adopted != nullptr) {
result = (UEnumeration*) uprv_malloc(sizeof(UEnumeration));
- if (result == NULL) {
+ if (result == nullptr) {
*ec = U_MEMORY_ALLOCATION_ERROR;
} else {
uprv_memcpy(result, &USTRENUM_VT, sizeof(USTRENUM_VT));
result->context = adopted;
}
}
- if (result == NULL) {
+ if (result == nullptr) {
delete adopted;
}
return result;
@@ -297,15 +297,15 @@ ucharstrenum_count(UEnumeration* en,
return ((UCharStringEnumeration*)en)->count;
}
-static const UChar* U_CALLCONV
+static const char16_t* U_CALLCONV
ucharstrenum_unext(UEnumeration* en,
int32_t* resultLength,
UErrorCode* /*ec*/) {
UCharStringEnumeration *e = (UCharStringEnumeration*) en;
if (e->index >= e->count) {
- return NULL;
+ return nullptr;
}
- const UChar* result = ((const UChar**)e->uenum.context)[e->index++];
+ const char16_t* result = ((const char16_t**)e->uenum.context)[e->index++];
if (resultLength) {
*resultLength = (int32_t)u_strlen(result);
}
@@ -319,7 +319,7 @@ ucharstrenum_next(UEnumeration* en,
UErrorCode* /*ec*/) {
UCharStringEnumeration *e = (UCharStringEnumeration*) en;
if (e->index >= e->count) {
- return NULL;
+ return nullptr;
}
const char* result = ((const char**)e->uenum.context)[e->index++];
if (resultLength) {
@@ -335,8 +335,8 @@ ucharstrenum_reset(UEnumeration* en,
}
static const UEnumeration UCHARSTRENUM_VT = {
- NULL,
- NULL, // store StringEnumeration pointer here
+ nullptr,
+ nullptr, // store StringEnumeration pointer here
ucharstrenum_close,
ucharstrenum_count,
uenum_unextDefault,
@@ -345,8 +345,8 @@ static const UEnumeration UCHARSTRENUM_VT = {
};
static const UEnumeration UCHARSTRENUM_U_VT = {
- NULL,
- NULL, // store StringEnumeration pointer here
+ nullptr,
+ nullptr, // store StringEnumeration pointer here
ucharstrenum_close,
ucharstrenum_count,
ucharstrenum_unext,
@@ -359,10 +359,10 @@ U_CDECL_END
U_CAPI UEnumeration* U_EXPORT2
uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
UErrorCode* ec) {
- UCharStringEnumeration* result = NULL;
+ UCharStringEnumeration* result = nullptr;
if (U_SUCCESS(*ec) && count >= 0 && (count == 0 || strings != 0)) {
result = (UCharStringEnumeration*) uprv_malloc(sizeof(UCharStringEnumeration));
- if (result == NULL) {
+ if (result == nullptr) {
*ec = U_MEMORY_ALLOCATION_ERROR;
} else {
U_ASSERT((char*)result==(char*)(&result->uenum));
@@ -376,12 +376,12 @@ uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
}
U_CAPI UEnumeration* U_EXPORT2
-uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
+uenum_openUCharStringsEnumeration(const char16_t* const strings[], int32_t count,
UErrorCode* ec) {
- UCharStringEnumeration* result = NULL;
+ UCharStringEnumeration* result = nullptr;
if (U_SUCCESS(*ec) && count >= 0 && (count == 0 || strings != 0)) {
result = (UCharStringEnumeration*) uprv_malloc(sizeof(UCharStringEnumeration));
- if (result == NULL) {
+ if (result == nullptr) {
*ec = U_MEMORY_ALLOCATION_ERROR;
} else {
U_ASSERT((char*)result==(char*)(&result->uenum));
diff --git a/contrib/libs/icu/common/ustrenum.h b/contrib/libs/icu/common/ustrenum.h
index 3703dedb97d..ff546ca0a1b 100644
--- a/contrib/libs/icu/common/ustrenum.h
+++ b/contrib/libs/icu/common/ustrenum.h
@@ -53,9 +53,9 @@ public:
/**
* Returns the next element a UnicodeString*. If there are no
- * more elements, returns NULL.
+ * more elements, returns nullptr.
* @param status the error code.
- * @return a pointer to the string, or NULL.
+ * @return a pointer to the string, or nullptr.
*/
virtual const UnicodeString* snext(UErrorCode& status) override;
diff --git a/contrib/libs/icu/common/ustrfmt.cpp b/contrib/libs/icu/common/ustrfmt.cpp
index 1a9b15a59fe..3db9f35821d 100644
--- a/contrib/libs/icu/common/ustrfmt.cpp
+++ b/contrib/libs/icu/common/ustrfmt.cpp
@@ -12,11 +12,11 @@
/***
- * Fills in a UChar* string with the radix-based representation of a
+ * Fills in a char16_t* string with the radix-based representation of a
* uint32_t number padded with zeroes to minwidth. The result
* will be null terminated if there is room.
*
- * @param buffer UChar buffer to receive result
+ * @param buffer char16_t buffer to receive result
* @param capacity capacity of buffer
* @param i the unsigned number to be formatted
* @param radix the radix from 2..36
@@ -27,26 +27,26 @@
* null
*/
U_CAPI int32_t U_EXPORT2
-uprv_itou (UChar * buffer, int32_t capacity,
+uprv_itou (char16_t * buffer, int32_t capacity,
uint32_t i, uint32_t radix, int32_t minwidth)
{
int32_t length = 0;
int digit;
int32_t j;
- UChar temp;
+ char16_t temp;
do{
digit = (int)(i % radix);
- buffer[length++]=(UChar)(digit<=9?(0x0030+digit):(0x0030+digit+7));
+ buffer[length++]=(char16_t)(digit<=9?(0x0030+digit):(0x0030+digit+7));
i=i/radix;
} while(i && length<capacity);
while (length < minwidth){
- buffer[length++] = (UChar) 0x0030;/*zero padding */
+ buffer[length++] = (char16_t) 0x0030;/*zero padding */
}
/* null terminate the buffer */
if(length<capacity){
- buffer[length] = (UChar) 0x0000;
+ buffer[length] = (char16_t) 0x0000;
}
/* Reverses the string */
diff --git a/contrib/libs/icu/common/ustring.cpp b/contrib/libs/icu/common/ustring.cpp
index 84772563891..4f7443cc886 100644
--- a/contrib/libs/icu/common/ustring.cpp
+++ b/contrib/libs/icu/common/ustring.cpp
@@ -29,7 +29,7 @@
/* ANSI string.h - style functions ------------------------------------------ */
-/* U+ffff is the highest BMP code point, the highest one that fits into a 16-bit UChar */
+/* U+ffff is the highest BMP code point, the highest one that fits into a 16-bit char16_t */
#define U_BMP_MAX 0xffff
/* Forward binary string search functions ----------------------------------- */
@@ -37,32 +37,32 @@
/*
* Test if a substring match inside a string is at code point boundaries.
* All pointers refer to the same buffer.
- * The limit pointer may be NULL, all others must be real pointers.
+ * The limit pointer may be nullptr, all others must be real pointers.
*/
static inline UBool
-isMatchAtCPBoundary(const UChar *start, const UChar *match, const UChar *matchLimit, const UChar *limit) {
+isMatchAtCPBoundary(const char16_t *start, const char16_t *match, const char16_t *matchLimit, const char16_t *limit) {
if(U16_IS_TRAIL(*match) && start!=match && U16_IS_LEAD(*(match-1))) {
/* the leading edge of the match is in the middle of a surrogate pair */
- return FALSE;
+ return false;
}
if(U16_IS_LEAD(*(matchLimit-1)) && matchLimit!=limit && U16_IS_TRAIL(*matchLimit)) {
/* the trailing edge of the match is in the middle of a surrogate pair */
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-U_CAPI UChar * U_EXPORT2
-u_strFindFirst(const UChar *s, int32_t length,
- const UChar *sub, int32_t subLength) {
- const UChar *start, *p, *q, *subLimit;
- UChar c, cs, cq;
+U_CAPI char16_t * U_EXPORT2
+u_strFindFirst(const char16_t *s, int32_t length,
+ const char16_t *sub, int32_t subLength) {
+ const char16_t *start, *p, *q, *subLimit;
+ char16_t c, cs, cq;
- if(sub==NULL || subLength<-1) {
- return (UChar *)s;
+ if(sub==nullptr || subLength<-1) {
+ return (char16_t *)s;
}
- if(s==NULL || length<-1) {
- return NULL;
+ if(s==nullptr || length<-1) {
+ return nullptr;
}
start=s;
@@ -70,7 +70,7 @@ u_strFindFirst(const UChar *s, int32_t length,
if(length<0 && subLength<0) {
/* both strings are NUL-terminated */
if((cs=*sub++)==0) {
- return (UChar *)s;
+ return (char16_t *)s;
}
if(*sub==0 && !U16_IS_SURROGATE(cs)) {
/* the substring consists of a single, non-surrogate BMP code point */
@@ -79,19 +79,19 @@ u_strFindFirst(const UChar *s, int32_t length,
while((c=*s++)!=0) {
if(c==cs) {
- /* found first substring UChar, compare rest */
+ /* found first substring char16_t, compare rest */
p=s;
q=sub;
for(;;) {
if((cq=*q)==0) {
- if(isMatchAtCPBoundary(start, s-1, p, NULL)) {
- return (UChar *)(s-1); /* well-formed match */
+ if(isMatchAtCPBoundary(start, s-1, p, nullptr)) {
+ return (char16_t *)(s-1); /* well-formed match */
} else {
break; /* no match because surrogate pair is split */
}
}
if((c=*p)==0) {
- return NULL; /* no match, and none possible after s */
+ return nullptr; /* no match, and none possible after s */
}
if(c!=cq) {
break; /* no match */
@@ -103,14 +103,14 @@ u_strFindFirst(const UChar *s, int32_t length,
}
/* not found */
- return NULL;
+ return nullptr;
}
if(subLength<0) {
subLength=u_strlen(sub);
}
if(subLength==0) {
- return (UChar *)s;
+ return (char16_t *)s;
}
/* get sub[0] to search for it fast */
@@ -127,19 +127,19 @@ u_strFindFirst(const UChar *s, int32_t length,
/* s is NUL-terminated */
while((c=*s++)!=0) {
if(c==cs) {
- /* found first substring UChar, compare rest */
+ /* found first substring char16_t, compare rest */
p=s;
q=sub;
for(;;) {
if(q==subLimit) {
- if(isMatchAtCPBoundary(start, s-1, p, NULL)) {
- return (UChar *)(s-1); /* well-formed match */
+ if(isMatchAtCPBoundary(start, s-1, p, nullptr)) {
+ return (char16_t *)(s-1); /* well-formed match */
} else {
break; /* no match because surrogate pair is split */
}
}
if((c=*p)==0) {
- return NULL; /* no match, and none possible after s */
+ return nullptr; /* no match, and none possible after s */
}
if(c!=*q) {
break; /* no match */
@@ -150,11 +150,11 @@ u_strFindFirst(const UChar *s, int32_t length,
}
}
} else {
- const UChar *limit, *preLimit;
+ const char16_t *limit, *preLimit;
/* subLength was decremented above */
if(length<=subLength) {
- return NULL; /* s is shorter than sub */
+ return nullptr; /* s is shorter than sub */
}
limit=s+length;
@@ -165,13 +165,13 @@ u_strFindFirst(const UChar *s, int32_t length,
while(s!=preLimit) {
c=*s++;
if(c==cs) {
- /* found first substring UChar, compare rest */
+ /* found first substring char16_t, compare rest */
p=s;
q=sub;
for(;;) {
if(q==subLimit) {
if(isMatchAtCPBoundary(start, s-1, p, limit)) {
- return (UChar *)(s-1); /* well-formed match */
+ return (char16_t *)(s-1); /* well-formed match */
} else {
break; /* no match because surrogate pair is split */
}
@@ -187,113 +187,113 @@ u_strFindFirst(const UChar *s, int32_t length,
}
/* not found */
- return NULL;
+ return nullptr;
}
-U_CAPI UChar * U_EXPORT2
-u_strstr(const UChar *s, const UChar *substring) {
+U_CAPI char16_t * U_EXPORT2
+u_strstr(const char16_t *s, const char16_t *substring) {
return u_strFindFirst(s, -1, substring, -1);
}
-U_CAPI UChar * U_EXPORT2
-u_strchr(const UChar *s, UChar c) {
+U_CAPI char16_t * U_EXPORT2
+u_strchr(const char16_t *s, char16_t c) {
if(U16_IS_SURROGATE(c)) {
/* make sure to not find half of a surrogate pair */
return u_strFindFirst(s, -1, &c, 1);
} else {
- UChar cs;
+ char16_t cs;
/* trivial search for a BMP code point */
for(;;) {
if((cs=*s)==c) {
- return (UChar *)s;
+ return (char16_t *)s;
}
if(cs==0) {
- return NULL;
+ return nullptr;
}
++s;
}
}
}
-U_CAPI UChar * U_EXPORT2
-u_strchr32(const UChar *s, UChar32 c) {
+U_CAPI char16_t * U_EXPORT2
+u_strchr32(const char16_t *s, UChar32 c) {
if((uint32_t)c<=U_BMP_MAX) {
/* find BMP code point */
- return u_strchr(s, (UChar)c);
+ return u_strchr(s, (char16_t)c);
} else if((uint32_t)c<=UCHAR_MAX_VALUE) {
/* find supplementary code point as surrogate pair */
- UChar cs, lead=U16_LEAD(c), trail=U16_TRAIL(c);
+ char16_t cs, lead=U16_LEAD(c), trail=U16_TRAIL(c);
while((cs=*s++)!=0) {
if(cs==lead && *s==trail) {
- return (UChar *)(s-1);
+ return (char16_t *)(s-1);
}
}
- return NULL;
+ return nullptr;
} else {
/* not a Unicode code point, not findable */
- return NULL;
+ return nullptr;
}
}
-U_CAPI UChar * U_EXPORT2
-u_memchr(const UChar *s, UChar c, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memchr(const char16_t *s, char16_t c, int32_t count) {
if(count<=0) {
- return NULL; /* no string */
+ return nullptr; /* no string */
} else if(U16_IS_SURROGATE(c)) {
/* make sure to not find half of a surrogate pair */
return u_strFindFirst(s, count, &c, 1);
} else {
/* trivial search for a BMP code point */
- const UChar *limit=s+count;
+ const char16_t *limit=s+count;
do {
if(*s==c) {
- return (UChar *)s;
+ return (char16_t *)s;
}
} while(++s!=limit);
- return NULL;
+ return nullptr;
}
}
-U_CAPI UChar * U_EXPORT2
-u_memchr32(const UChar *s, UChar32 c, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memchr32(const char16_t *s, UChar32 c, int32_t count) {
if((uint32_t)c<=U_BMP_MAX) {
/* find BMP code point */
- return u_memchr(s, (UChar)c, count);
+ return u_memchr(s, (char16_t)c, count);
} else if(count<2) {
/* too short for a surrogate pair */
- return NULL;
+ return nullptr;
} else if((uint32_t)c<=UCHAR_MAX_VALUE) {
/* find supplementary code point as surrogate pair */
- const UChar *limit=s+count-1; /* -1 so that we do not need a separate check for the trail unit */
- UChar lead=U16_LEAD(c), trail=U16_TRAIL(c);
+ const char16_t *limit=s+count-1; /* -1 so that we do not need a separate check for the trail unit */
+ char16_t lead=U16_LEAD(c), trail=U16_TRAIL(c);
do {
if(*s==lead && *(s+1)==trail) {
- return (UChar *)s;
+ return (char16_t *)s;
}
} while(++s!=limit);
- return NULL;
+ return nullptr;
} else {
/* not a Unicode code point, not findable */
- return NULL;
+ return nullptr;
}
}
/* Backward binary string search functions ---------------------------------- */
-U_CAPI UChar * U_EXPORT2
-u_strFindLast(const UChar *s, int32_t length,
- const UChar *sub, int32_t subLength) {
- const UChar *start, *limit, *p, *q, *subLimit;
- UChar c, cs;
+U_CAPI char16_t * U_EXPORT2
+u_strFindLast(const char16_t *s, int32_t length,
+ const char16_t *sub, int32_t subLength) {
+ const char16_t *start, *limit, *p, *q, *subLimit;
+ char16_t c, cs;
- if(sub==NULL || subLength<-1) {
- return (UChar *)s;
+ if(sub==nullptr || subLength<-1) {
+ return (char16_t *)s;
}
- if(s==NULL || length<-1) {
- return NULL;
+ if(s==nullptr || length<-1) {
+ return nullptr;
}
/*
@@ -310,7 +310,7 @@ u_strFindLast(const UChar *s, int32_t length,
subLength=u_strlen(sub);
}
if(subLength==0) {
- return (UChar *)s;
+ return (char16_t *)s;
}
/* get sub[subLength-1] to search for it fast */
@@ -329,7 +329,7 @@ u_strFindLast(const UChar *s, int32_t length,
/* subLength was decremented above */
if(length<=subLength) {
- return NULL; /* s is shorter than sub */
+ return nullptr; /* s is shorter than sub */
}
start=s;
@@ -341,13 +341,13 @@ u_strFindLast(const UChar *s, int32_t length,
while(s!=limit) {
c=*(--limit);
if(c==cs) {
- /* found last substring UChar, compare rest */
+ /* found last substring char16_t, compare rest */
p=limit;
q=subLimit;
for(;;) {
if(q==sub) {
if(isMatchAtCPBoundary(start, p, limit+1, start+length)) {
- return (UChar *)p; /* well-formed match */
+ return (char16_t *)p; /* well-formed match */
} else {
break; /* no match because surrogate pair is split */
}
@@ -360,22 +360,22 @@ u_strFindLast(const UChar *s, int32_t length,
}
/* not found */
- return NULL;
+ return nullptr;
}
-U_CAPI UChar * U_EXPORT2
-u_strrstr(const UChar *s, const UChar *substring) {
+U_CAPI char16_t * U_EXPORT2
+u_strrstr(const char16_t *s, const char16_t *substring) {
return u_strFindLast(s, -1, substring, -1);
}
-U_CAPI UChar * U_EXPORT2
-u_strrchr(const UChar *s, UChar c) {
+U_CAPI char16_t * U_EXPORT2
+u_strrchr(const char16_t *s, char16_t c) {
if(U16_IS_SURROGATE(c)) {
/* make sure to not find half of a surrogate pair */
return u_strFindLast(s, -1, &c, 1);
} else {
- const UChar *result=NULL;
- UChar cs;
+ const char16_t *result=nullptr;
+ char16_t cs;
/* trivial search for a BMP code point */
for(;;) {
@@ -383,76 +383,76 @@ u_strrchr(const UChar *s, UChar c) {
result=s;
}
if(cs==0) {
- return (UChar *)result;
+ return (char16_t *)result;
}
++s;
}
}
}
-U_CAPI UChar * U_EXPORT2
-u_strrchr32(const UChar *s, UChar32 c) {
+U_CAPI char16_t * U_EXPORT2
+u_strrchr32(const char16_t *s, UChar32 c) {
if((uint32_t)c<=U_BMP_MAX) {
/* find BMP code point */
- return u_strrchr(s, (UChar)c);
+ return u_strrchr(s, (char16_t)c);
} else if((uint32_t)c<=UCHAR_MAX_VALUE) {
/* find supplementary code point as surrogate pair */
- const UChar *result=NULL;
- UChar cs, lead=U16_LEAD(c), trail=U16_TRAIL(c);
+ const char16_t *result=nullptr;
+ char16_t cs, lead=U16_LEAD(c), trail=U16_TRAIL(c);
while((cs=*s++)!=0) {
if(cs==lead && *s==trail) {
result=s-1;
}
}
- return (UChar *)result;
+ return (char16_t *)result;
} else {
/* not a Unicode code point, not findable */
- return NULL;
+ return nullptr;
}
}
-U_CAPI UChar * U_EXPORT2
-u_memrchr(const UChar *s, UChar c, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memrchr(const char16_t *s, char16_t c, int32_t count) {
if(count<=0) {
- return NULL; /* no string */
+ return nullptr; /* no string */
} else if(U16_IS_SURROGATE(c)) {
/* make sure to not find half of a surrogate pair */
return u_strFindLast(s, count, &c, 1);
} else {
/* trivial search for a BMP code point */
- const UChar *limit=s+count;
+ const char16_t *limit=s+count;
do {
if(*(--limit)==c) {
- return (UChar *)limit;
+ return (char16_t *)limit;
}
} while(s!=limit);
- return NULL;
+ return nullptr;
}
}
-U_CAPI UChar * U_EXPORT2
-u_memrchr32(const UChar *s, UChar32 c, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memrchr32(const char16_t *s, UChar32 c, int32_t count) {
if((uint32_t)c<=U_BMP_MAX) {
/* find BMP code point */
- return u_memrchr(s, (UChar)c, count);
+ return u_memrchr(s, (char16_t)c, count);
} else if(count<2) {
/* too short for a surrogate pair */
- return NULL;
+ return nullptr;
} else if((uint32_t)c<=UCHAR_MAX_VALUE) {
/* find supplementary code point as surrogate pair */
- const UChar *limit=s+count-1;
- UChar lead=U16_LEAD(c), trail=U16_TRAIL(c);
+ const char16_t *limit=s+count-1;
+ char16_t lead=U16_LEAD(c), trail=U16_TRAIL(c);
do {
if(*limit==trail && *(limit-1)==lead) {
- return (UChar *)(limit-1);
+ return (char16_t *)(limit-1);
}
} while(s!=--limit);
- return NULL;
+ return nullptr;
} else {
/* not a Unicode code point, not findable */
- return NULL;
+ return nullptr;
}
}
@@ -461,14 +461,14 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count) {
/*
* Match each code point in a string against each code point in the matchSet.
* Return the index of the first string code point that
- * is (polarity==TRUE) or is not (FALSE) contained in the matchSet.
+ * is (polarity==true) or is not (false) contained in the matchSet.
* Return -(string length)-1 if there is no such code point.
*/
static int32_t
-_matchFromSet(const UChar *string, const UChar *matchSet, UBool polarity) {
+_matchFromSet(const char16_t *string, const char16_t *matchSet, UBool polarity) {
int32_t matchLen, matchBMPLen, strItr, matchItr;
UChar32 stringCh, matchCh;
- UChar c, c2;
+ char16_t c, c2;
/* first part of matchSet contains only BMP code points */
matchBMPLen = 0;
@@ -537,22 +537,22 @@ endloop:
}
/* Search for a codepoint in a string that matches one of the matchSet codepoints. */
-U_CAPI UChar * U_EXPORT2
-u_strpbrk(const UChar *string, const UChar *matchSet)
+U_CAPI char16_t * U_EXPORT2
+u_strpbrk(const char16_t *string, const char16_t *matchSet)
{
- int32_t idx = _matchFromSet(string, matchSet, TRUE);
+ int32_t idx = _matchFromSet(string, matchSet, true);
if(idx >= 0) {
- return (UChar *)string + idx;
+ return (char16_t *)string + idx;
} else {
- return NULL;
+ return nullptr;
}
}
/* Search for a codepoint in a string that matches one of the matchSet codepoints. */
U_CAPI int32_t U_EXPORT2
-u_strcspn(const UChar *string, const UChar *matchSet)
+u_strcspn(const char16_t *string, const char16_t *matchSet)
{
- int32_t idx = _matchFromSet(string, matchSet, TRUE);
+ int32_t idx = _matchFromSet(string, matchSet, true);
if(idx >= 0) {
return idx;
} else {
@@ -562,9 +562,9 @@ u_strcspn(const UChar *string, const UChar *matchSet)
/* Search for a codepoint in a string that does not match one of the matchSet codepoints. */
U_CAPI int32_t U_EXPORT2
-u_strspn(const UChar *string, const UChar *matchSet)
+u_strspn(const char16_t *string, const char16_t *matchSet)
{
- int32_t idx = _matchFromSet(string, matchSet, FALSE);
+ int32_t idx = _matchFromSet(string, matchSet, false);
if(idx >= 0) {
return idx;
} else {
@@ -574,17 +574,17 @@ u_strspn(const UChar *string, const UChar *matchSet)
/* ----- Text manipulation functions --- */
-U_CAPI UChar* U_EXPORT2
-u_strtok_r(UChar *src,
- const UChar *delim,
- UChar **saveState)
+U_CAPI char16_t* U_EXPORT2
+u_strtok_r(char16_t *src,
+ const char16_t *delim,
+ char16_t **saveState)
{
- UChar *tokSource;
- UChar *nextToken;
+ char16_t *tokSource;
+ char16_t *nextToken;
uint32_t nonDelimIdx;
- /* If saveState is NULL, the user messed up. */
- if (src != NULL) {
+ /* If saveState is nullptr, the user messed up. */
+ if (src != nullptr) {
tokSource = src;
*saveState = src; /* Set to "src" in case there are no delimiters */
}
@@ -592,9 +592,9 @@ u_strtok_r(UChar *src,
tokSource = *saveState;
}
else {
- /* src == NULL && *saveState == NULL */
+ /* src == nullptr && *saveState == nullptr */
/* This shouldn't happen. We already finished tokenizing. */
- return NULL;
+ return nullptr;
}
/* Skip initial delimiters */
@@ -603,7 +603,7 @@ u_strtok_r(UChar *src,
if (*tokSource) {
nextToken = u_strpbrk(tokSource, delim);
- if (nextToken != NULL) {
+ if (nextToken != nullptr) {
/* Create a token */
*(nextToken++) = 0;
*saveState = nextToken;
@@ -611,24 +611,24 @@ u_strtok_r(UChar *src,
}
else if (*saveState) {
/* Return the last token */
- *saveState = NULL;
+ *saveState = nullptr;
return tokSource;
}
}
else {
/* No tokens were found. Only delimiters were left. */
- *saveState = NULL;
+ *saveState = nullptr;
}
- return NULL;
+ return nullptr;
}
/* Miscellaneous functions -------------------------------------------------- */
-U_CAPI UChar* U_EXPORT2
-u_strcat(UChar *dst,
- const UChar *src)
+U_CAPI char16_t* U_EXPORT2
+u_strcat(char16_t *dst,
+ const char16_t *src)
{
- UChar *anchor = dst; /* save a pointer to start of dst */
+ char16_t *anchor = dst; /* save a pointer to start of dst */
while(*dst != 0) { /* To end of first string */
++dst;
@@ -639,13 +639,13 @@ u_strcat(UChar *dst,
return anchor;
}
-U_CAPI UChar* U_EXPORT2
-u_strncat(UChar *dst,
- const UChar *src,
+U_CAPI char16_t* U_EXPORT2
+u_strncat(char16_t *dst,
+ const char16_t *src,
int32_t n )
{
if(n > 0) {
- UChar *anchor = dst; /* save a pointer to start of dst */
+ char16_t *anchor = dst; /* save a pointer to start of dst */
while(*dst != 0) { /* To end of first string */
++dst;
@@ -668,10 +668,10 @@ u_strncat(UChar *dst,
/* ----- Text property functions --- */
U_CAPI int32_t U_EXPORT2
-u_strcmp(const UChar *s1,
- const UChar *s2)
+u_strcmp(const char16_t *s1,
+ const char16_t *s2)
{
- UChar c1, c2;
+ char16_t c1, c2;
for(;;) {
c1=*s1++;
@@ -684,11 +684,11 @@ u_strcmp(const UChar *s1,
}
U_CFUNC int32_t U_EXPORT2
-uprv_strCompare(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+uprv_strCompare(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
UBool strncmpStyle, UBool codePointOrder) {
- const UChar *start1, *start2, *limit1, *limit2;
- UChar c1, c2;
+ const char16_t *start1, *start2, *limit1, *limit2;
+ char16_t c1, c2;
/* setup for fix-up */
start1=s1;
@@ -715,7 +715,7 @@ uprv_strCompare(const UChar *s1, int32_t length1,
}
/* setup for fix-up */
- limit1=limit2=NULL;
+ limit1=limit2=nullptr;
} else if(strncmpStyle) {
/* special handling for strncmp, assume length1==length2>=0 but also check for NUL */
if(s1==s2) {
@@ -830,7 +830,7 @@ u_strCompareIter(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrde
UChar32 c1, c2;
/* argument checking */
- if(iter1==NULL || iter2==NULL) {
+ if(iter1==nullptr || iter2==nullptr) {
return 0; /* bad arguments */
}
if(iter1==iter2) {
@@ -922,25 +922,25 @@ void fragment {
#endif
U_CAPI int32_t U_EXPORT2
-u_strCompare(const UChar *s1, int32_t length1,
- const UChar *s2, int32_t length2,
+u_strCompare(const char16_t *s1, int32_t length1,
+ const char16_t *s2, int32_t length2,
UBool codePointOrder) {
/* argument checking */
- if(s1==NULL || length1<-1 || s2==NULL || length2<-1) {
+ if(s1==nullptr || length1<-1 || s2==nullptr || length2<-1) {
return 0;
}
- return uprv_strCompare(s1, length1, s2, length2, FALSE, codePointOrder);
+ return uprv_strCompare(s1, length1, s2, length2, false, codePointOrder);
}
/* String compare in code point order - u_strcmp() compares in code unit order. */
U_CAPI int32_t U_EXPORT2
-u_strcmpCodePointOrder(const UChar *s1, const UChar *s2) {
- return uprv_strCompare(s1, -1, s2, -1, FALSE, TRUE);
+u_strcmpCodePointOrder(const char16_t *s1, const char16_t *s2) {
+ return uprv_strCompare(s1, -1, s2, -1, false, true);
}
U_CAPI int32_t U_EXPORT2
-u_strncmp(const UChar *s1,
- const UChar *s2,
+u_strncmp(const char16_t *s1,
+ const char16_t *s2,
int32_t n)
{
if(n > 0) {
@@ -959,15 +959,15 @@ u_strncmp(const UChar *s1,
}
U_CAPI int32_t U_EXPORT2
-u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n) {
- return uprv_strCompare(s1, n, s2, n, TRUE, TRUE);
+u_strncmpCodePointOrder(const char16_t *s1, const char16_t *s2, int32_t n) {
+ return uprv_strCompare(s1, n, s2, n, true, true);
}
-U_CAPI UChar* U_EXPORT2
-u_strcpy(UChar *dst,
- const UChar *src)
+U_CAPI char16_t* U_EXPORT2
+u_strcpy(char16_t *dst,
+ const char16_t *src)
{
- UChar *anchor = dst; /* save a pointer to start of dst */
+ char16_t *anchor = dst; /* save a pointer to start of dst */
while((*(dst++) = *(src++)) != 0) { /* copy string 2 over */
}
@@ -975,12 +975,12 @@ u_strcpy(UChar *dst,
return anchor;
}
-U_CAPI UChar* U_EXPORT2
-u_strncpy(UChar *dst,
- const UChar *src,
+U_CAPI char16_t* U_EXPORT2
+u_strncpy(char16_t *dst,
+ const char16_t *src,
int32_t n)
{
- UChar *anchor = dst; /* save a pointer to start of dst */
+ char16_t *anchor = dst; /* save a pointer to start of dst */
/* copy string 2 over */
while(n > 0 && (*(dst++) = *(src++)) != 0) {
@@ -991,12 +991,12 @@ u_strncpy(UChar *dst,
}
U_CAPI int32_t U_EXPORT2
-u_strlen(const UChar *s)
+u_strlen(const char16_t *s)
{
#if U_SIZEOF_WCHAR_T == U_SIZEOF_UCHAR
return (int32_t)uprv_wcslen((const wchar_t *)s);
#else
- const UChar *t = s;
+ const char16_t *t = s;
while(*t != 0) {
++t;
}
@@ -1005,10 +1005,10 @@ u_strlen(const UChar *s)
}
U_CAPI int32_t U_EXPORT2
-u_countChar32(const UChar *s, int32_t length) {
+u_countChar32(const char16_t *s, int32_t length) {
int32_t count;
- if(s==NULL || length<-1) {
+ if(s==nullptr || length<-1) {
return 0;
}
@@ -1025,7 +1025,7 @@ u_countChar32(const UChar *s, int32_t length) {
}
}
} else /* length==-1 */ {
- UChar c;
+ char16_t c;
for(;;) {
if((c=*s++)==0) {
@@ -1046,26 +1046,26 @@ u_countChar32(const UChar *s, int32_t length) {
}
U_CAPI UBool U_EXPORT2
-u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) {
+u_strHasMoreChar32Than(const char16_t *s, int32_t length, int32_t number) {
if(number<0) {
- return TRUE;
+ return true;
}
- if(s==NULL || length<-1) {
- return FALSE;
+ if(s==nullptr || length<-1) {
+ return false;
}
if(length==-1) {
/* s is NUL-terminated */
- UChar c;
+ char16_t c;
/* count code points until they exceed */
for(;;) {
if((c=*s++)==0) {
- return FALSE;
+ return false;
}
if(number==0) {
- return TRUE;
+ return true;
}
if(U16_IS_LEAD(c) && U16_IS_TRAIL(*s)) {
++s;
@@ -1074,38 +1074,38 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) {
}
} else {
/* length>=0 known */
- const UChar *limit;
+ const char16_t *limit;
int32_t maxSupplementary;
/* s contains at least (length+1)/2 code points: <=2 UChars per cp */
if(((length+1)/2)>number) {
- return TRUE;
+ return true;
}
/* check if s does not even contain enough UChars */
maxSupplementary=length-number;
if(maxSupplementary<=0) {
- return FALSE;
+ return false;
}
/* there are maxSupplementary=length-number more UChars than asked-for code points */
/*
* count code points until they exceed and also check that there are
- * no more than maxSupplementary supplementary code points (UChar pairs)
+ * no more than maxSupplementary supplementary code points (char16_t pairs)
*/
limit=s+length;
for(;;) {
if(s==limit) {
- return FALSE;
+ return false;
}
if(number==0) {
- return TRUE;
+ return true;
}
if(U16_IS_LEAD(*s++) && s!=limit && U16_IS_TRAIL(*s)) {
++s;
if(--maxSupplementary<=0) {
/* too many pairs - too few code points */
- return FALSE;
+ return false;
}
}
--number;
@@ -1113,27 +1113,27 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) {
}
}
-U_CAPI UChar * U_EXPORT2
-u_memcpy(UChar *dest, const UChar *src, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memcpy(char16_t *dest, const char16_t *src, int32_t count) {
if(count > 0) {
uprv_memcpy(dest, src, (size_t)count*U_SIZEOF_UCHAR);
}
return dest;
}
-U_CAPI UChar * U_EXPORT2
-u_memmove(UChar *dest, const UChar *src, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memmove(char16_t *dest, const char16_t *src, int32_t count) {
if(count > 0) {
uprv_memmove(dest, src, (size_t)count*U_SIZEOF_UCHAR);
}
return dest;
}
-U_CAPI UChar * U_EXPORT2
-u_memset(UChar *dest, UChar c, int32_t count) {
+U_CAPI char16_t * U_EXPORT2
+u_memset(char16_t *dest, char16_t c, int32_t count) {
if(count > 0) {
- UChar *ptr = dest;
- UChar *limit = dest + count;
+ char16_t *ptr = dest;
+ char16_t *limit = dest + count;
while (ptr < limit) {
*(ptr++) = c;
@@ -1143,9 +1143,9 @@ u_memset(UChar *dest, UChar c, int32_t count) {
}
U_CAPI int32_t U_EXPORT2
-u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count) {
+u_memcmp(const char16_t *buf1, const char16_t *buf2, int32_t count) {
if(count > 0) {
- const UChar *limit = buf1 + count;
+ const char16_t *limit = buf1 + count;
int32_t result;
while (buf1 < limit) {
@@ -1161,14 +1161,14 @@ u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count) {
}
U_CAPI int32_t U_EXPORT2
-u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count) {
- return uprv_strCompare(s1, count, s2, count, FALSE, TRUE);
+u_memcmpCodePointOrder(const char16_t *s1, const char16_t *s2, int32_t count) {
+ return uprv_strCompare(s1, count, s2, count, false, true);
}
/* u_unescape & support fns ------------------------------------------------- */
/* This map must be in ASCENDING ORDER OF THE ESCAPE CODE */
-static const UChar UNESCAPE_MAP[] = {
+static const char16_t UNESCAPE_MAP[] = {
/*" 0x22, 0x22 */
/*' 0x27, 0x27 */
/*? 0x3F, 0x3F */
@@ -1185,7 +1185,7 @@ static const UChar UNESCAPE_MAP[] = {
enum { UNESCAPE_MAP_LENGTH = UPRV_LENGTHOF(UNESCAPE_MAP) };
/* Convert one octal digit to a numeric value 0..7, or -1 on failure */
-static int32_t _digit8(UChar c) {
+static int32_t _digit8(char16_t c) {
if (c >= u'0' && c <= u'7') {
return c - u'0';
}
@@ -1193,7 +1193,7 @@ static int32_t _digit8(UChar c) {
}
/* Convert one hex digit to a numeric value 0..F, or -1 on failure */
-static int32_t _digit16(UChar c) {
+static int32_t _digit16(char16_t c) {
if (c >= u'0' && c <= u'9') {
return c - u'0';
}
@@ -1223,14 +1223,14 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
int8_t maxDig = 0;
int8_t bitsPerDigit = 4;
int32_t dig;
- UBool braces = FALSE;
+ UBool braces = false;
/* Check that offset is in range */
if (*offset < 0 || *offset >= length) {
goto err;
}
- /* Fetch first UChar after '\\' */
+ /* Fetch first char16_t after '\\' */
c = charAt((*offset)++, context);
/* Convert hexadecimal and octal escapes */
@@ -1245,7 +1245,7 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
minDig = 1;
if (*offset < length && charAt(*offset, context) == u'{') {
++(*offset);
- braces = TRUE;
+ braces = true;
maxDig = 8;
} else {
maxDig = 2;
@@ -1323,7 +1323,7 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
if (c == u'c' && *offset < length) {
c = charAt((*offset)++, context);
if (U16_IS_LEAD(c) && *offset < length) {
- UChar c2 = charAt(*offset, context);
+ char16_t c2 = charAt(*offset, context);
if (U16_IS_TRAIL(c2)) {
++(*offset);
c = U16_GET_SUPPLEMENTARY(c, c2);
@@ -1336,7 +1336,7 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
* the backslash to generically escape the next character.
* Deal with surrogate pairs. */
if (U16_IS_LEAD(c) && *offset < length) {
- UChar c2 = charAt(*offset, context);
+ char16_t c2 = charAt(*offset, context);
if (U16_IS_TRAIL(c2)) {
++(*offset);
return U16_GET_SUPPLEMENTARY(c, c2);
@@ -1350,10 +1350,10 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt,
return (UChar32)0xFFFFFFFF;
}
-/* u_unescapeAt() callback to return a UChar from a char* */
-static UChar U_CALLCONV
+/* u_unescapeAt() callback to return a char16_t from a char* */
+static char16_t U_CALLCONV
_charPtr_charAt(int32_t offset, void *context) {
- UChar c16;
+ char16_t c16;
/* It would be more efficient to access the invariant tables
* directly but there is no API for that. */
u_charsToUChars(((char*) context) + offset, &c16, 1);
@@ -1361,7 +1361,7 @@ _charPtr_charAt(int32_t offset, void *context) {
}
/* Append an escape-free segment of the text; used by u_unescape() */
-static void _appendUChars(UChar *dest, int32_t destCapacity,
+static void _appendUChars(char16_t *dest, int32_t destCapacity,
const char *src, int32_t srcLen) {
if (destCapacity < 0) {
destCapacity = 0;
@@ -1372,9 +1372,9 @@ static void _appendUChars(UChar *dest, int32_t destCapacity,
u_charsToUChars(src, dest, srcLen);
}
-/* Do an invariant conversion of char* -> UChar*, with escape parsing */
+/* Do an invariant conversion of char* -> char16_t*, with escape parsing */
U_CAPI int32_t U_EXPORT2
-u_unescape(const char *src, UChar *dest, int32_t destCapacity) {
+u_unescape(const char *src, char16_t *dest, int32_t destCapacity) {
const char *segment = src;
int32_t i = 0;
char c;
@@ -1387,7 +1387,7 @@ u_unescape(const char *src, UChar *dest, int32_t destCapacity) {
int32_t lenParsed = 0;
UChar32 c32;
if (src != segment) {
- if (dest != NULL) {
+ if (dest != nullptr) {
_appendUChars(dest + i, destCapacity - i,
segment, (int32_t)(src - segment));
}
@@ -1399,7 +1399,7 @@ u_unescape(const char *src, UChar *dest, int32_t destCapacity) {
goto err;
}
src += lenParsed; /* advance past escape seq. */
- if (dest != NULL && U16_LENGTH(c32) <= (destCapacity - i)) {
+ if (dest != nullptr && U16_LENGTH(c32) <= (destCapacity - i)) {
U16_APPEND_UNSAFE(dest, i, c32);
} else {
i += U16_LENGTH(c32);
@@ -1410,19 +1410,19 @@ u_unescape(const char *src, UChar *dest, int32_t destCapacity) {
}
}
if (src != segment) {
- if (dest != NULL) {
+ if (dest != nullptr) {
_appendUChars(dest + i, destCapacity - i,
segment, (int32_t)(src - segment));
}
i += (int32_t)(src - segment);
}
- if (dest != NULL && i < destCapacity) {
+ if (dest != nullptr && i < destCapacity) {
dest[i] = 0;
}
return i;
err:
- if (dest != NULL && destCapacity > 0) {
+ if (dest != nullptr && destCapacity > 0) {
*dest = 0;
}
return 0;
@@ -1435,7 +1435,7 @@ u_unescape(const char *src, UChar *dest, int32_t destCapacity) {
* Set warning and error codes accordingly.
*/
#define __TERMINATE_STRING(dest, destCapacity, length, pErrorCode) UPRV_BLOCK_MACRO_BEGIN { \
- if(pErrorCode!=NULL && U_SUCCESS(*pErrorCode)) { \
+ if(pErrorCode!=nullptr && U_SUCCESS(*pErrorCode)) { \
/* not a public function, so no complete argument checking */ \
\
if(length<0) { \
@@ -1457,8 +1457,8 @@ u_unescape(const char *src, UChar *dest, int32_t destCapacity) {
} \
} UPRV_BLOCK_MACRO_END
-U_CAPI UChar U_EXPORT2
-u_asciiToUpper(UChar c) {
+U_CAPI char16_t U_EXPORT2
+u_asciiToUpper(char16_t c) {
if (u'a' <= c && c <= u'z') {
c = c + u'A' - u'a';
}
@@ -1466,7 +1466,7 @@ u_asciiToUpper(UChar c) {
}
U_CAPI int32_t U_EXPORT2
-u_terminateUChars(UChar *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) {
+u_terminateUChars(char16_t *dest, int32_t destCapacity, int32_t length, UErrorCode *pErrorCode) {
__TERMINATE_STRING(dest, destCapacity, length, pErrorCode);
return length;
}
@@ -1506,7 +1506,7 @@ u_terminateWChars(wchar_t *dest, int32_t destCapacity, int32_t length, UErrorCod
#define STRING_HASH(TYPE, STR, STRLEN, DEREF) UPRV_BLOCK_MACRO_BEGIN { \
uint32_t hash = 0; \
const TYPE *p = (const TYPE*) STR; \
- if (p != NULL) { \
+ if (p != nullptr) { \
int32_t len = (int32_t)(STRLEN); \
int32_t inc = ((len - 32) / 32) + 1; \
const TYPE *limit = p + len; \
@@ -1520,8 +1520,8 @@ u_terminateWChars(wchar_t *dest, int32_t destCapacity, int32_t length, UErrorCod
/* Used by UnicodeString to compute its hashcode - Not public API. */
U_CAPI int32_t U_EXPORT2
-ustr_hashUCharsN(const UChar *str, int32_t length) {
- STRING_HASH(UChar, str, length, *p);
+ustr_hashUCharsN(const char16_t *str, int32_t length) {
+ STRING_HASH(char16_t, str, length, *p);
}
U_CAPI int32_t U_EXPORT2
diff --git a/contrib/libs/icu/common/ustrtrns.cpp b/contrib/libs/icu/common/ustrtrns.cpp
index 5dc032c02fb..244c111fc41 100644
--- a/contrib/libs/icu/common/ustrtrns.cpp
+++ b/contrib/libs/icu/common/ustrtrns.cpp
@@ -36,8 +36,8 @@
#include "ustr_imp.h"
#include "uassert.h"
-U_CAPI UChar* U_EXPORT2
-u_strFromUTF32WithSub(UChar *dest,
+U_CAPI char16_t* U_EXPORT2
+u_strFromUTF32WithSub(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const UChar32 *src,
@@ -46,29 +46,29 @@ u_strFromUTF32WithSub(UChar *dest,
UErrorCode *pErrorCode) {
const UChar32 *srcLimit;
UChar32 ch;
- UChar *destLimit;
- UChar *pDest;
+ char16_t *destLimit;
+ char16_t *pDest;
int32_t reqLength;
int32_t numSubstitutions;
/* args check */
if(U_FAILURE(*pErrorCode)){
- return NULL;
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0) ||
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0) ||
subchar > 0x10ffff || U_IS_SURROGATE(subchar)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(pNumSubstitutions != NULL) {
+ if(pNumSubstitutions != nullptr) {
*pNumSubstitutions = 0;
}
pDest = dest;
- destLimit = (dest!=NULL)?(dest + destCapacity):NULL;
+ destLimit = (dest!=nullptr)?(dest + destCapacity):nullptr;
reqLength = 0;
numSubstitutions = 0;
@@ -78,7 +78,7 @@ u_strFromUTF32WithSub(UChar *dest,
((uint32_t)ch < 0xd800 || (0xe000 <= ch && ch <= 0xffff))) {
++src;
if(pDest < destLimit) {
- *pDest++ = (UChar)ch;
+ *pDest++ = (char16_t)ch;
} else {
++reqLength;
}
@@ -89,7 +89,7 @@ u_strFromUTF32WithSub(UChar *dest,
while(*++srcLimit != 0) {}
}
} else {
- srcLimit = (src!=NULL)?(src + srcLength):NULL;
+ srcLimit = (src!=nullptr)?(src + srcLength):nullptr;
}
/* convert with length */
@@ -99,13 +99,13 @@ u_strFromUTF32WithSub(UChar *dest,
/* usually "loops" once; twice only for writing subchar */
if((uint32_t)ch < 0xd800 || (0xe000 <= ch && ch <= 0xffff)) {
if(pDest < destLimit) {
- *pDest++ = (UChar)ch;
+ *pDest++ = (char16_t)ch;
} else {
++reqLength;
}
break;
} else if(0x10000 <= ch && ch <= 0x10ffff) {
- if(pDest!=NULL && ((pDest + 2) <= destLimit)) {
+ if(pDest!=nullptr && ((pDest + 2) <= destLimit)) {
*pDest++ = U16_LEAD(ch);
*pDest++ = U16_TRAIL(ch);
} else {
@@ -115,18 +115,18 @@ u_strFromUTF32WithSub(UChar *dest,
} else if((ch = subchar) < 0) {
/* surrogate code point, or not a Unicode code point at all */
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else {
++numSubstitutions;
}
- } while(TRUE);
+ } while(true);
}
reqLength += (int32_t)(pDest - dest);
if(pDestLength) {
*pDestLength = reqLength;
}
- if(pNumSubstitutions != NULL) {
+ if(pNumSubstitutions != nullptr) {
*pNumSubstitutions = numSubstitutions;
}
@@ -136,8 +136,8 @@ u_strFromUTF32WithSub(UChar *dest,
return dest;
}
-U_CAPI UChar* U_EXPORT2
-u_strFromUTF32(UChar *dest,
+U_CAPI char16_t* U_EXPORT2
+u_strFromUTF32(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const UChar32 *src,
@@ -146,7 +146,7 @@ u_strFromUTF32(UChar *dest,
return u_strFromUTF32WithSub(
dest, destCapacity, pDestLength,
src, srcLength,
- U_SENTINEL, NULL,
+ U_SENTINEL, nullptr,
pErrorCode);
}
@@ -154,13 +154,13 @@ U_CAPI UChar32* U_EXPORT2
u_strToUTF32WithSub(UChar32 *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *src,
+ const char16_t *src,
int32_t srcLength,
UChar32 subchar, int32_t *pNumSubstitutions,
UErrorCode *pErrorCode) {
- const UChar *srcLimit;
+ const char16_t *srcLimit;
UChar32 ch;
- UChar ch2;
+ char16_t ch2;
UChar32 *destLimit;
UChar32 *pDest;
int32_t reqLength;
@@ -168,22 +168,22 @@ u_strToUTF32WithSub(UChar32 *dest,
/* args check */
if(U_FAILURE(*pErrorCode)){
- return NULL;
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0) ||
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0) ||
subchar > 0x10ffff || U_IS_SURROGATE(subchar)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(pNumSubstitutions != NULL) {
+ if(pNumSubstitutions != nullptr) {
*pNumSubstitutions = 0;
}
pDest = dest;
- destLimit = (dest!=NULL)?(dest + destCapacity):NULL;
+ destLimit = (dest!=nullptr)?(dest + destCapacity):nullptr;
reqLength = 0;
numSubstitutions = 0;
@@ -203,7 +203,7 @@ u_strToUTF32WithSub(UChar32 *dest,
while(*++srcLimit != 0) {}
}
} else {
- srcLimit = (src!=NULL)?(src + srcLength):NULL;
+ srcLimit = (src!=nullptr)?(src + srcLength):nullptr;
}
/* convert with length */
@@ -217,7 +217,7 @@ u_strToUTF32WithSub(UChar32 *dest,
} else if((ch = subchar) < 0) {
/* unpaired surrogate */
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else {
++numSubstitutions;
}
@@ -232,7 +232,7 @@ u_strToUTF32WithSub(UChar32 *dest,
if(pDestLength) {
*pDestLength = reqLength;
}
- if(pNumSubstitutions != NULL) {
+ if(pNumSubstitutions != nullptr) {
*pNumSubstitutions = numSubstitutions;
}
@@ -246,18 +246,18 @@ U_CAPI UChar32* U_EXPORT2
u_strToUTF32(UChar32 *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *src,
+ const char16_t *src,
int32_t srcLength,
UErrorCode *pErrorCode) {
return u_strToUTF32WithSub(
dest, destCapacity, pDestLength,
src, srcLength,
- U_SENTINEL, NULL,
+ U_SENTINEL, nullptr,
pErrorCode);
}
-U_CAPI UChar* U_EXPORT2
-u_strFromUTF8WithSub(UChar *dest,
+U_CAPI char16_t* U_EXPORT2
+u_strFromUTF8WithSub(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const char* src,
@@ -266,21 +266,21 @@ u_strFromUTF8WithSub(UChar *dest,
UErrorCode *pErrorCode){
/* args check */
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0) ||
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0) ||
subchar > 0x10ffff || U_IS_SURROGATE(subchar)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(pNumSubstitutions!=NULL) {
+ if(pNumSubstitutions!=nullptr) {
*pNumSubstitutions=0;
}
- UChar *pDest = dest;
- UChar *pDestLimit = dest+destCapacity;
+ char16_t *pDest = dest;
+ char16_t *pDestLimit = dest+destCapacity;
int32_t reqLength = 0;
int32_t numSubstitutions=0;
@@ -309,7 +309,7 @@ u_strFromUTF8WithSub(UChar *dest,
// modified copy of U8_NEXT()
++i;
if(U8_IS_SINGLE(c)) {
- *pDest++=(UChar)c;
+ *pDest++=(char16_t)c;
} else {
uint8_t __t1, __t2;
if( /* handle U+0800..U+FFFF inline */
@@ -328,9 +328,9 @@ u_strFromUTF8WithSub(UChar *dest,
(c)=utf8_nextCharSafeBody((const uint8_t *)src, &(i), -1, c, -1);
if(c<0 && (++numSubstitutions, c = subchar) < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else if(c<=0xFFFF) {
- *(pDest++)=(UChar)c;
+ *(pDest++)=(char16_t)c;
} else {
*(pDest++)=U16_LEAD(c);
if(pDest<pDestLimit) {
@@ -368,7 +368,7 @@ u_strFromUTF8WithSub(UChar *dest,
(c)=utf8_nextCharSafeBody((const uint8_t *)src, &(i), -1, c, -1);
if(c<0 && (++numSubstitutions, c = subchar) < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
reqLength += U16_LENGTH(c);
}
@@ -381,7 +381,7 @@ u_strFromUTF8WithSub(UChar *dest,
for(;;) {
/*
* Each iteration of the inner loop progresses by at most 3 UTF-8
- * bytes and one UChar, for most characters.
+ * bytes and one char16_t, for most characters.
* For supplementary code points (4 & 2), which are rare,
* there is an additional adjustment.
*/
@@ -402,7 +402,7 @@ u_strFromUTF8WithSub(UChar *dest,
// modified copy of U8_NEXT()
c = (uint8_t)src[i++];
if(U8_IS_SINGLE(c)) {
- *pDest++=(UChar)c;
+ *pDest++=(char16_t)c;
} else {
uint8_t __t1, __t2;
if( /* handle U+0800..U+FFFF inline */
@@ -433,9 +433,9 @@ u_strFromUTF8WithSub(UChar *dest,
(c)=utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, c, -1);
if(c<0 && (++numSubstitutions, c = subchar) < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else if(c<=0xFFFF) {
- *(pDest++)=(UChar)c;
+ *(pDest++)=(char16_t)c;
} else {
*(pDest++)=U16_LEAD(c);
*(pDest++)=U16_TRAIL(c);
@@ -449,7 +449,7 @@ u_strFromUTF8WithSub(UChar *dest,
// modified copy of U8_NEXT()
c = (uint8_t)src[i++];
if(U8_IS_SINGLE(c)) {
- *pDest++=(UChar)c;
+ *pDest++=(char16_t)c;
} else {
uint8_t __t1, __t2;
if( /* handle U+0800..U+FFFF inline */
@@ -470,9 +470,9 @@ u_strFromUTF8WithSub(UChar *dest,
(c)=utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, c, -1);
if(c<0 && (++numSubstitutions, c = subchar) < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else if(c<=0xFFFF) {
- *(pDest++)=(UChar)c;
+ *(pDest++)=(char16_t)c;
} else {
*(pDest++)=U16_LEAD(c);
if(pDest<pDestLimit) {
@@ -512,7 +512,7 @@ u_strFromUTF8WithSub(UChar *dest,
(c)=utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, c, -1);
if(c<0 && (++numSubstitutions, c = subchar) < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
reqLength += U16_LENGTH(c);
}
@@ -522,7 +522,7 @@ u_strFromUTF8WithSub(UChar *dest,
reqLength+=(int32_t)(pDest - dest);
- if(pNumSubstitutions!=NULL) {
+ if(pNumSubstitutions!=nullptr) {
*pNumSubstitutions=numSubstitutions;
}
@@ -536,8 +536,8 @@ u_strFromUTF8WithSub(UChar *dest,
return dest;
}
-U_CAPI UChar* U_EXPORT2
-u_strFromUTF8(UChar *dest,
+U_CAPI char16_t* U_EXPORT2
+u_strFromUTF8(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const char* src,
@@ -546,37 +546,37 @@ u_strFromUTF8(UChar *dest,
return u_strFromUTF8WithSub(
dest, destCapacity, pDestLength,
src, srcLength,
- U_SENTINEL, NULL,
+ U_SENTINEL, nullptr,
pErrorCode);
}
-U_CAPI UChar * U_EXPORT2
-u_strFromUTF8Lenient(UChar *dest,
+U_CAPI char16_t * U_EXPORT2
+u_strFromUTF8Lenient(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const char *src,
int32_t srcLength,
UErrorCode *pErrorCode) {
- UChar *pDest = dest;
+ char16_t *pDest = dest;
UChar32 ch;
int32_t reqLength = 0;
uint8_t* pSrc = (uint8_t*) src;
/* args check */
if(U_FAILURE(*pErrorCode)){
- return NULL;
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0)
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if(srcLength < 0) {
/* Transform a NUL-terminated string. */
- UChar *pDestLimit = (dest!=NULL)?(dest+destCapacity):NULL;
+ char16_t *pDestLimit = (dest!=nullptr)?(dest+destCapacity):nullptr;
uint8_t t1, t2, t3; /* trail bytes */
while(((ch = *pSrc) != 0) && (pDest < pDestLimit)) {
@@ -586,21 +586,21 @@ u_strFromUTF8Lenient(UChar *dest,
* a single-byte sequence for better character boundary
* resynchronization after illegal sequences.
*/
- *pDest++=(UChar)ch;
+ *pDest++=(char16_t)ch;
++pSrc;
continue;
} else if(ch < 0xe0) { /* U+0080..U+07FF */
if((t1 = pSrc[1]) != 0) {
/* 0x3080 = (0xc0 << 6) + 0x80 */
- *pDest++ = (UChar)((ch << 6) + t1 - 0x3080);
+ *pDest++ = (char16_t)((ch << 6) + t1 - 0x3080);
pSrc += 2;
continue;
}
} else if(ch < 0xf0) { /* U+0800..U+FFFF */
if((t1 = pSrc[1]) != 0 && (t2 = pSrc[2]) != 0) {
- /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */
+ /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) */
/* 0x2080 = (0x80 << 6) + 0x80 */
- *pDest++ = (UChar)((ch << 12) + (t1 << 6) + t2 - 0x2080);
+ *pDest++ = (char16_t)((ch << 12) + (t1 << 6) + t2 - 0x2080);
pSrc += 3;
continue;
}
@@ -662,7 +662,7 @@ u_strFromUTF8Lenient(UChar *dest,
break;
}
} else /* srcLength >= 0 */ {
- const uint8_t *pSrcLimit = (pSrc!=NULL)?(pSrc + srcLength):NULL;
+ const uint8_t *pSrcLimit = (pSrc!=nullptr)?(pSrc + srcLength):nullptr;
/*
* This function requires that if srcLength is given, then it must be
@@ -670,11 +670,11 @@ u_strFromUTF8Lenient(UChar *dest,
* destination buffer overflow in the loop.
*/
if(destCapacity < srcLength) {
- if(pDestLength != NULL) {
+ if(pDestLength != nullptr) {
*pDestLength = srcLength; /* this likely overestimates the true destLength! */
}
*pErrorCode = U_BUFFER_OVERFLOW_ERROR;
- return NULL;
+ return nullptr;
}
if((pSrcLimit - pSrc) >= 4) {
@@ -689,15 +689,15 @@ u_strFromUTF8Lenient(UChar *dest,
* a single-byte sequence for better character boundary
* resynchronization after illegal sequences.
*/
- *pDest++=(UChar)ch;
+ *pDest++=(char16_t)ch;
} else if(ch < 0xe0) { /* U+0080..U+07FF */
/* 0x3080 = (0xc0 << 6) + 0x80 */
- *pDest++ = (UChar)((ch << 6) + *pSrc++ - 0x3080);
+ *pDest++ = (char16_t)((ch << 6) + *pSrc++ - 0x3080);
} else if(ch < 0xf0) { /* U+0800..U+FFFF */
- /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */
+ /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) */
/* 0x2080 = (0x80 << 6) + 0x80 */
ch = (ch << 12) + (*pSrc++ << 6);
- *pDest++ = (UChar)(ch + *pSrc++ - 0x2080);
+ *pDest++ = (char16_t)(ch + *pSrc++ - 0x2080);
} else /* f0..f4 */ { /* U+10000..U+10FFFF */
/* 0x3c82080 = (0xf0 << 18) + (0x80 << 12) + (0x80 << 6) + 0x80 */
ch = (ch << 18) + (*pSrc++ << 12);
@@ -719,20 +719,20 @@ u_strFromUTF8Lenient(UChar *dest,
* a single-byte sequence for better character boundary
* resynchronization after illegal sequences.
*/
- *pDest++=(UChar)ch;
+ *pDest++=(char16_t)ch;
continue;
} else if(ch < 0xe0) { /* U+0080..U+07FF */
if(pSrc < pSrcLimit) {
/* 0x3080 = (0xc0 << 6) + 0x80 */
- *pDest++ = (UChar)((ch << 6) + *pSrc++ - 0x3080);
+ *pDest++ = (char16_t)((ch << 6) + *pSrc++ - 0x3080);
continue;
}
} else if(ch < 0xf0) { /* U+0800..U+FFFF */
if((pSrcLimit - pSrc) >= 2) {
- /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */
+ /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) */
/* 0x2080 = (0x80 << 6) + 0x80 */
ch = (ch << 12) + (*pSrc++ << 6);
- *pDest++ = (UChar)(ch + *pSrc++ - 0x2080);
+ *pDest++ = (char16_t)(ch + *pSrc++ - 0x2080);
pSrc += 3;
continue;
}
@@ -793,30 +793,30 @@ U_CAPI char* U_EXPORT2
u_strToUTF8WithSub(char *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *pSrc,
+ const char16_t *pSrc,
int32_t srcLength,
UChar32 subchar, int32_t *pNumSubstitutions,
UErrorCode *pErrorCode){
int32_t reqLength=0;
uint32_t ch=0,ch2=0;
uint8_t *pDest = (uint8_t *)dest;
- uint8_t *pDestLimit = (pDest!=NULL)?(pDest + destCapacity):NULL;
+ uint8_t *pDestLimit = (pDest!=nullptr)?(pDest + destCapacity):nullptr;
int32_t numSubstitutions;
/* args check */
if(U_FAILURE(*pErrorCode)){
- return NULL;
+ return nullptr;
}
- if( (pSrc==NULL && srcLength!=0) || srcLength < -1 ||
- (destCapacity<0) || (dest == NULL && destCapacity > 0) ||
+ if( (pSrc==nullptr && srcLength!=0) || srcLength < -1 ||
+ (destCapacity<0) || (dest == nullptr && destCapacity > 0) ||
subchar > 0x10ffff || U_IS_SURROGATE(subchar)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(pNumSubstitutions!=NULL) {
+ if(pNumSubstitutions!=nullptr) {
*pNumSubstitutions=0;
}
numSubstitutions=0;
@@ -861,7 +861,7 @@ u_strToUTF8WithSub(char *dest,
} else {
/* Unicode 3.2 forbids surrogate code points in UTF-8 */
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
length = U8_LENGTH(ch);
@@ -890,18 +890,18 @@ u_strToUTF8WithSub(char *dest,
} else {
/* Unicode 3.2 forbids surrogate code points in UTF-8 */
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
}
} else {
- const UChar *pSrcLimit = (pSrc!=NULL)?(pSrc+srcLength):NULL;
+ const char16_t *pSrcLimit = (pSrc!=nullptr)?(pSrc+srcLength):nullptr;
int32_t count;
/* Faster loop without ongoing checking for pSrcLimit and pDestLimit. */
for(;;) {
/*
* Each iteration of the inner loop progresses by at most 3 UTF-8
- * bytes and one UChar, for most characters.
+ * bytes and one char16_t, for most characters.
* For supplementary code points (4 & 2), which are rare,
* there is an additional adjustment.
*/
@@ -955,7 +955,7 @@ u_strToUTF8WithSub(char *dest,
++numSubstitutions;
} else {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
/* convert and append*/
@@ -1003,7 +1003,7 @@ u_strToUTF8WithSub(char *dest,
} else {
/* Unicode 3.2 forbids surrogate code points in UTF-8 */
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
length = U8_LENGTH(ch);
@@ -1033,14 +1033,14 @@ u_strToUTF8WithSub(char *dest,
} else {
/* Unicode 3.2 forbids surrogate code points in UTF-8 */
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
}
}
}
reqLength+=(int32_t)(pDest - (uint8_t *)dest);
- if(pNumSubstitutions!=NULL) {
+ if(pNumSubstitutions!=nullptr) {
*pNumSubstitutions=numSubstitutions;
}
@@ -1057,19 +1057,19 @@ U_CAPI char* U_EXPORT2
u_strToUTF8(char *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *pSrc,
+ const char16_t *pSrc,
int32_t srcLength,
UErrorCode *pErrorCode){
return u_strToUTF8WithSub(
dest, destCapacity, pDestLength,
pSrc, srcLength,
- U_SENTINEL, NULL,
+ U_SENTINEL, nullptr,
pErrorCode);
}
-U_CAPI UChar* U_EXPORT2
+U_CAPI char16_t* U_EXPORT2
u_strFromJavaModifiedUTF8WithSub(
- UChar *dest,
+ char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const char *src,
@@ -1078,21 +1078,21 @@ u_strFromJavaModifiedUTF8WithSub(
UErrorCode *pErrorCode) {
/* args check */
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (dest==NULL && destCapacity!=0) || destCapacity<0 ||
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (dest==nullptr && destCapacity!=0) || destCapacity<0 ||
subchar > 0x10ffff || U_IS_SURROGATE(subchar)
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(pNumSubstitutions!=NULL) {
+ if(pNumSubstitutions!=nullptr) {
*pNumSubstitutions=0;
}
- UChar *pDest = dest;
- UChar *pDestLimit = dest+destCapacity;
+ char16_t *pDest = dest;
+ char16_t *pDestLimit = dest+destCapacity;
int32_t reqLength = 0;
int32_t numSubstitutions=0;
@@ -1103,7 +1103,7 @@ u_strFromJavaModifiedUTF8WithSub(
*/
UChar32 c;
while(((c = (uint8_t)*src) != 0) && c <= 0x7f && (pDest < pDestLimit)) {
- *pDest++=(UChar)c;
+ *pDest++=(char16_t)c;
++src;
}
if(c == 0) {
@@ -1140,7 +1140,7 @@ u_strFromJavaModifiedUTF8WithSub(
}
/*
* Each iteration of the inner loop progresses by at most 3 UTF-8
- * bytes and one UChar.
+ * bytes and one char16_t.
*/
if(subchar > 0xFFFF) {
break;
@@ -1159,7 +1159,7 @@ u_strFromJavaModifiedUTF8WithSub(
do {
ch = (uint8_t)src[i++];
if(U8_IS_SINGLE(ch)) {
- *pDest++=(UChar)ch;
+ *pDest++=(char16_t)ch;
} else {
if(ch >= 0xe0) {
if( /* handle U+0000..U+FFFF inline */
@@ -1167,8 +1167,8 @@ u_strFromJavaModifiedUTF8WithSub(
(t1 = (uint8_t)(src[i] - 0x80)) <= 0x3f &&
(t2 = (uint8_t)(src[i+1] - 0x80)) <= 0x3f
) {
- /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */
- *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2);
+ /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) */
+ *pDest++ = (char16_t)((ch << 12) | (t1 << 6) | t2);
i += 2;
continue;
}
@@ -1177,7 +1177,7 @@ u_strFromJavaModifiedUTF8WithSub(
ch >= 0xc0 &&
(t1 = (uint8_t)(src[i] - 0x80)) <= 0x3f
) {
- *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1);
+ *pDest++ = (char16_t)(((ch & 0x1f) << 6) | t1);
++i;
continue;
}
@@ -1185,7 +1185,7 @@ u_strFromJavaModifiedUTF8WithSub(
if(subchar < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else if(subchar > 0xffff && --count == 0) {
/*
* We need to write two UChars, adjusted count for that,
@@ -1197,7 +1197,7 @@ u_strFromJavaModifiedUTF8WithSub(
/* function call for error cases */
utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1);
++numSubstitutions;
- *(pDest++)=(UChar)subchar;
+ *(pDest++)=(char16_t)subchar;
}
}
} while(--count > 0);
@@ -1206,7 +1206,7 @@ u_strFromJavaModifiedUTF8WithSub(
while(i < srcLength && (pDest < pDestLimit)) {
ch = (uint8_t)src[i++];
if(U8_IS_SINGLE(ch)){
- *pDest++=(UChar)ch;
+ *pDest++=(char16_t)ch;
} else {
if(ch >= 0xe0) {
if( /* handle U+0000..U+FFFF inline */
@@ -1215,8 +1215,8 @@ u_strFromJavaModifiedUTF8WithSub(
(t1 = (uint8_t)(src[i] - 0x80)) <= 0x3f &&
(t2 = (uint8_t)(src[i+1] - 0x80)) <= 0x3f
) {
- /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */
- *pDest++ = (UChar)((ch << 12) | (t1 << 6) | t2);
+ /* no need for (ch & 0xf) because the upper bits are truncated after <<12 in the cast to (char16_t) */
+ *pDest++ = (char16_t)((ch << 12) | (t1 << 6) | t2);
i += 2;
continue;
}
@@ -1226,7 +1226,7 @@ u_strFromJavaModifiedUTF8WithSub(
i < srcLength &&
(t1 = (uint8_t)(src[i] - 0x80)) <= 0x3f
) {
- *pDest++ = (UChar)(((ch & 0x1f) << 6) | t1);
+ *pDest++ = (char16_t)(((ch & 0x1f) << 6) | t1);
++i;
continue;
}
@@ -1234,13 +1234,13 @@ u_strFromJavaModifiedUTF8WithSub(
if(subchar < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else {
/* function call for error cases */
utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1);
++numSubstitutions;
if(subchar<=0xFFFF) {
- *(pDest++)=(UChar)subchar;
+ *(pDest++)=(char16_t)subchar;
} else {
*(pDest++)=U16_LEAD(subchar);
if(pDest<pDestLimit) {
@@ -1285,7 +1285,7 @@ u_strFromJavaModifiedUTF8WithSub(
if(subchar < 0) {
*pErrorCode = U_INVALID_CHAR_FOUND;
- return NULL;
+ return nullptr;
} else {
/* function call for error cases */
utf8_nextCharSafeBody((const uint8_t *)src, &(i), srcLength, ch, -1);
@@ -1295,7 +1295,7 @@ u_strFromJavaModifiedUTF8WithSub(
}
}
- if(pNumSubstitutions!=NULL) {
+ if(pNumSubstitutions!=nullptr) {
*pNumSubstitutions=numSubstitutions;
}
@@ -1314,26 +1314,26 @@ u_strToJavaModifiedUTF8(
char *dest,
int32_t destCapacity,
int32_t *pDestLength,
- const UChar *src,
+ const char16_t *src,
int32_t srcLength,
UErrorCode *pErrorCode) {
int32_t reqLength=0;
uint32_t ch=0;
- uint8_t *pDest = (uint8_t *)dest;
- uint8_t *pDestLimit = pDest + destCapacity;
- const UChar *pSrcLimit;
+ const char16_t *pSrcLimit;
int32_t count;
/* args check */
if(U_FAILURE(*pErrorCode)){
- return NULL;
+ return nullptr;
}
- if( (src==NULL && srcLength!=0) || srcLength < -1 ||
- (dest==NULL && destCapacity!=0) || destCapacity<0
+ if( (src==nullptr && srcLength!=0) || srcLength < -1 ||
+ (dest==nullptr && destCapacity!=0) || destCapacity<0
) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
+ uint8_t *pDest = (uint8_t *)dest;
+ uint8_t *pDestLimit = pDest + destCapacity;
if(srcLength==-1) {
/* Convert NUL-terminated ASCII, then find the string length. */
@@ -1355,13 +1355,13 @@ u_strToJavaModifiedUTF8(
}
/* Faster loop without ongoing checking for pSrcLimit and pDestLimit. */
- pSrcLimit = (src!=NULL)?(src+srcLength):NULL;
+ pSrcLimit = (src!=nullptr)?(src+srcLength):nullptr;
for(;;) {
count = (int32_t)(pDestLimit - pDest);
srcLength = (int32_t)(pSrcLimit - src);
if(count >= srcLength && srcLength > 0 && *src <= 0x7f) {
/* fast ASCII loop */
- const UChar *prevSrc = src;
+ const char16_t *prevSrc = src;
int32_t delta;
while(src < pSrcLimit && (ch = *src) <= 0x7f && ch != 0) {
*pDest++=(uint8_t)ch;
@@ -1373,7 +1373,7 @@ u_strToJavaModifiedUTF8(
}
/*
* Each iteration of the inner loop progresses by at most 3 UTF-8
- * bytes and one UChar.
+ * bytes and one char16_t.
*/
count /= 3;
if(count > srcLength) {
diff --git a/contrib/libs/icu/common/utext.cpp b/contrib/libs/icu/common/utext.cpp
index ec79700ca81..eb0a6984bd3 100644
--- a/contrib/libs/icu/common/utext.cpp
+++ b/contrib/libs/icu/common/utext.cpp
@@ -49,14 +49,14 @@ utext_moveIndex32(UText *ut, int32_t delta) {
UChar32 c;
if (delta > 0) {
do {
- if(ut->chunkOffset>=ut->chunkLength && !utext_access(ut, ut->chunkNativeLimit, TRUE)) {
- return FALSE;
+ if(ut->chunkOffset>=ut->chunkLength && !utext_access(ut, ut->chunkNativeLimit, true)) {
+ return false;
}
c = ut->chunkContents[ut->chunkOffset];
if (U16_IS_SURROGATE(c)) {
c = utext_next32(ut);
if (c == U_SENTINEL) {
- return FALSE;
+ return false;
}
} else {
ut->chunkOffset++;
@@ -65,14 +65,14 @@ utext_moveIndex32(UText *ut, int32_t delta) {
} else if (delta<0) {
do {
- if(ut->chunkOffset<=0 && !utext_access(ut, ut->chunkNativeStart, FALSE)) {
- return FALSE;
+ if(ut->chunkOffset<=0 && !utext_access(ut, ut->chunkNativeStart, false)) {
+ return false;
}
c = ut->chunkContents[ut->chunkOffset-1];
if (U16_IS_SURROGATE(c)) {
c = utext_previous32(ut);
if (c == U_SENTINEL) {
- return FALSE;
+ return false;
}
} else {
ut->chunkOffset--;
@@ -80,7 +80,7 @@ utext_moveIndex32(UText *ut, int32_t delta) {
} while(++delta<0);
}
- return TRUE;
+ return true;
}
@@ -114,7 +114,7 @@ utext_setNativeIndex(UText *ut, int64_t index) {
// Access the new position. Assume a forward iteration from here,
// which will also be optimimum for a single random access.
// Reverse iterations may suffer slightly.
- ut->pFuncs->access(ut, index, TRUE);
+ ut->pFuncs->access(ut, index, true);
} else if((int32_t)(index - ut->chunkNativeStart) <= ut->nativeIndexingLimit) {
// utf-16 indexing.
ut->chunkOffset=(int32_t)(index-ut->chunkNativeStart);
@@ -124,13 +124,13 @@ utext_setNativeIndex(UText *ut, int64_t index) {
// The convention is that the index must always be on a code point boundary.
// Adjust the index position if it is in the middle of a surrogate pair.
if (ut->chunkOffset<ut->chunkLength) {
- UChar c= ut->chunkContents[ut->chunkOffset];
+ char16_t c= ut->chunkContents[ut->chunkOffset];
if (U16_IS_TRAIL(c)) {
if (ut->chunkOffset==0) {
- ut->pFuncs->access(ut, ut->chunkNativeStart, FALSE);
+ ut->pFuncs->access(ut, ut->chunkNativeStart, false);
}
if (ut->chunkOffset>0) {
- UChar lead = ut->chunkContents[ut->chunkOffset-1];
+ char16_t lead = ut->chunkContents[ut->chunkOffset-1];
if (U16_IS_LEAD(lead)) {
ut->chunkOffset--;
}
@@ -151,8 +151,8 @@ utext_getPreviousNativeIndex(UText *ut) {
int32_t i = ut->chunkOffset - 1;
int64_t result;
if (i >= 0) {
- UChar c = ut->chunkContents[i];
- if (U16_IS_TRAIL(c) == FALSE) {
+ char16_t c = ut->chunkContents[i];
+ if (U16_IS_TRAIL(c) == false) {
if (i <= ut->nativeIndexingLimit) {
result = ut->chunkNativeStart + i;
} else {
@@ -189,14 +189,14 @@ utext_current32(UText *ut) {
UChar32 c;
if (ut->chunkOffset==ut->chunkLength) {
// Current position is just off the end of the chunk.
- if (ut->pFuncs->access(ut, ut->chunkNativeLimit, TRUE) == FALSE) {
+ if (ut->pFuncs->access(ut, ut->chunkNativeLimit, true) == false) {
// Off the end of the text.
return U_SENTINEL;
}
}
c = ut->chunkContents[ut->chunkOffset];
- if (U16_IS_LEAD(c) == FALSE) {
+ if (U16_IS_LEAD(c) == false) {
// Normal, non-supplementary case.
return c;
}
@@ -218,13 +218,16 @@ utext_current32(UText *ut) {
// leading surrogate. The attempt to access the trail will fail, but
// the original position before the unpaired lead still needs to be restored.
int64_t nativePosition = ut->chunkNativeLimit;
- int32_t originalOffset = ut->chunkOffset;
- if (ut->pFuncs->access(ut, nativePosition, TRUE)) {
+ if (ut->pFuncs->access(ut, nativePosition, true)) {
trail = ut->chunkContents[ut->chunkOffset];
}
- UBool r = ut->pFuncs->access(ut, nativePosition, FALSE); // reverse iteration flag loads preceding chunk
- U_ASSERT(r==TRUE);
- ut->chunkOffset = originalOffset;
+ UBool r = ut->pFuncs->access(ut, nativePosition, false); // reverse iteration flag loads preceding chunk
+ U_ASSERT(r);
+ // Here we need to restore chunkOffset since the access functions were called with
+ // chunkNativeLimit but that is not where we were (we were 1 code unit before the
+ // limit). Restoring was originally added in ICU-4669 but did not support access
+ // functions that changed the chunk size, the following does.
+ ut->chunkOffset = ut->chunkLength - 1;
if(!r) {
return U_SENTINEL;
}
@@ -246,7 +249,7 @@ utext_char32At(UText *ut, int64_t nativeIndex) {
if (nativeIndex>=ut->chunkNativeStart && nativeIndex < ut->chunkNativeStart + ut->nativeIndexingLimit) {
ut->chunkOffset = (int32_t)(nativeIndex - ut->chunkNativeStart);
c = ut->chunkContents[ut->chunkOffset];
- if (U16_IS_SURROGATE(c) == FALSE) {
+ if (U16_IS_SURROGATE(c) == false) {
return c;
}
}
@@ -270,13 +273,13 @@ utext_next32(UText *ut) {
UChar32 c;
if (ut->chunkOffset >= ut->chunkLength) {
- if (ut->pFuncs->access(ut, ut->chunkNativeLimit, TRUE) == FALSE) {
+ if (ut->pFuncs->access(ut, ut->chunkNativeLimit, true) == false) {
return U_SENTINEL;
}
}
c = ut->chunkContents[ut->chunkOffset++];
- if (U16_IS_LEAD(c) == FALSE) {
+ if (U16_IS_LEAD(c) == false) {
// Normal case, not supplementary.
// (A trail surrogate seen here is just returned as is, as a surrogate value.
// It cannot be part of a pair.)
@@ -284,14 +287,14 @@ utext_next32(UText *ut) {
}
if (ut->chunkOffset >= ut->chunkLength) {
- if (ut->pFuncs->access(ut, ut->chunkNativeLimit, TRUE) == FALSE) {
+ if (ut->pFuncs->access(ut, ut->chunkNativeLimit, true) == false) {
// c is an unpaired lead surrogate at the end of the text.
// return it as it is.
return c;
}
}
UChar32 trail = ut->chunkContents[ut->chunkOffset];
- if (U16_IS_TRAIL(trail) == FALSE) {
+ if (U16_IS_TRAIL(trail) == false) {
// c was an unpaired lead surrogate, not at the end of the text.
// return it as it is (unpaired). Iteration position is on the
// following character, possibly in the next chunk, where the
@@ -310,13 +313,13 @@ utext_previous32(UText *ut) {
UChar32 c;
if (ut->chunkOffset <= 0) {
- if (ut->pFuncs->access(ut, ut->chunkNativeStart, FALSE) == FALSE) {
+ if (ut->pFuncs->access(ut, ut->chunkNativeStart, false) == false) {
return U_SENTINEL;
}
}
ut->chunkOffset--;
c = ut->chunkContents[ut->chunkOffset];
- if (U16_IS_TRAIL(c) == FALSE) {
+ if (U16_IS_TRAIL(c) == false) {
// Normal case, not supplementary.
// (A lead surrogate seen here is just returned as is, as a surrogate value.
// It cannot be part of a pair.)
@@ -324,7 +327,7 @@ utext_previous32(UText *ut) {
}
if (ut->chunkOffset <= 0) {
- if (ut->pFuncs->access(ut, ut->chunkNativeStart, FALSE) == FALSE) {
+ if (ut->pFuncs->access(ut, ut->chunkNativeStart, false) == false) {
// c is an unpaired trail surrogate at the start of the text.
// return it as it is.
return c;
@@ -332,7 +335,7 @@ utext_previous32(UText *ut) {
}
UChar32 lead = ut->chunkContents[ut->chunkOffset-1];
- if (U16_IS_LEAD(lead) == FALSE) {
+ if (U16_IS_LEAD(lead) == false) {
// c was an unpaired trail surrogate, not at the end of the text.
// return it as it is (unpaired). Iteration position is at c
return c;
@@ -351,7 +354,7 @@ utext_next32From(UText *ut, int64_t index) {
if(index<ut->chunkNativeStart || index>=ut->chunkNativeLimit) {
// Desired position is outside of the current chunk.
- if(!ut->pFuncs->access(ut, index, TRUE)) {
+ if(!ut->pFuncs->access(ut, index, true)) {
// no chunk available here
return U_SENTINEL;
}
@@ -391,7 +394,7 @@ utext_previous32From(UText *ut, int64_t index) {
//
if(index<=ut->chunkNativeStart || index>ut->chunkNativeLimit) {
// Requested native index is outside of the current chunk.
- if(!ut->pFuncs->access(ut, index, FALSE)) {
+ if(!ut->pFuncs->access(ut, index, false)) {
// no chunk available here
return U_SENTINEL;
}
@@ -400,7 +403,7 @@ utext_previous32From(UText *ut, int64_t index) {
ut->chunkOffset = (int32_t)(index - ut->chunkNativeStart);
} else {
ut->chunkOffset=ut->pFuncs->mapNativeIndexToUTF16(ut, index);
- if (ut->chunkOffset==0 && !ut->pFuncs->access(ut, index, FALSE)) {
+ if (ut->chunkOffset==0 && !ut->pFuncs->access(ut, index, false)) {
// no chunk available here
return U_SENTINEL;
}
@@ -425,7 +428,7 @@ utext_previous32From(UText *ut, int64_t index) {
U_CAPI int32_t U_EXPORT2
utext_extract(UText *ut,
int64_t start, int64_t limit,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *status) {
return ut->pFuncs->extract(ut, start, limit, dest, destCapacity, status);
}
@@ -434,28 +437,28 @@ utext_extract(UText *ut,
U_CAPI UBool U_EXPORT2
utext_equals(const UText *a, const UText *b) {
- if (a==NULL || b==NULL ||
+ if (a==nullptr || b==nullptr ||
a->magic != UTEXT_MAGIC ||
b->magic != UTEXT_MAGIC) {
// Null or invalid arguments don't compare equal to anything.
- return FALSE;
+ return false;
}
if (a->pFuncs != b->pFuncs) {
// Different types of text providers.
- return FALSE;
+ return false;
}
if (a->context != b->context) {
// Different sources (different strings)
- return FALSE;
+ return false;
}
if (utext_getNativeIndex(a) != utext_getNativeIndex(b)) {
// Different current position in the string.
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
U_CAPI UBool U_EXPORT2
@@ -485,7 +488,7 @@ utext_hasMetaData(const UText *ut)
U_CAPI int32_t U_EXPORT2
utext_replace(UText *ut,
int64_t nativeStart, int64_t nativeLimit,
- const UChar *replacementText, int32_t replacementLength,
+ const char16_t *replacementText, int32_t replacementLength,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
@@ -527,7 +530,7 @@ utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCod
if (U_FAILURE(*status)) {
return result;
}
- if (result == NULL) {
+ if (result == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return result;
}
@@ -580,16 +583,16 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
return ut;
}
- if (ut == NULL) {
+ if (ut == nullptr) {
// We need to heap-allocate storage for the new UText
int32_t spaceRequired = sizeof(UText);
if (extraSpace > 0) {
spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(std::max_align_t);
}
ut = (UText *)uprv_malloc(spaceRequired);
- if (ut == NULL) {
+ if (ut == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
} else {
*ut = emptyText;
ut->flags |= UTEXT_HEAP_ALLOCATED;
@@ -607,7 +610,7 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
}
// If the ut is already open and there's a provider supplied close
// function, call it.
- if ((ut->flags & UTEXT_OPEN) && ut->pFuncs->close != NULL) {
+ if ((ut->flags & UTEXT_OPEN) && ut->pFuncs->close != nullptr) {
ut->pFuncs->close(ut);
}
ut->flags &= ~UTEXT_OPEN;
@@ -622,7 +625,7 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
ut->extraSize = 0;
}
ut->pExtra = uprv_malloc(extraSpace);
- if (ut->pExtra == NULL) {
+ if (ut->pExtra == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
ut->extraSize = extraSpace;
@@ -635,11 +638,11 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
// Initialize all remaining fields of the UText.
//
- ut->context = NULL;
- ut->chunkContents = NULL;
- ut->p = NULL;
- ut->q = NULL;
- ut->r = NULL;
+ ut->context = nullptr;
+ ut->chunkContents = nullptr;
+ ut->p = nullptr;
+ ut->q = nullptr;
+ ut->r = nullptr;
ut->a = 0;
ut->b = 0;
ut->c = 0;
@@ -652,8 +655,8 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
ut->privA = 0;
ut->privB = 0;
ut->privC = 0;
- ut->privP = NULL;
- if (ut->pExtra!=NULL && ut->extraSize>0)
+ ut->privP = nullptr;
+ if (ut->pExtra!=nullptr && ut->extraSize>0)
uprv_memset(ut->pExtra, 0, ut->extraSize);
}
@@ -663,7 +666,7 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
U_CAPI UText * U_EXPORT2
utext_close(UText *ut) {
- if (ut==NULL ||
+ if (ut==nullptr ||
ut->magic != UTEXT_MAGIC ||
(ut->flags & UTEXT_OPEN) == 0)
{
@@ -674,7 +677,7 @@ utext_close(UText *ut) {
// If the provider gave us a close function, call it now.
// This will clean up anything allocated specifically by the provider.
- if (ut->pFuncs->close != NULL) {
+ if (ut->pFuncs->close != nullptr) {
ut->pFuncs->close(ut);
}
ut->flags &= ~UTEXT_OPEN;
@@ -683,7 +686,7 @@ utext_close(UText *ut) {
// delete it.
if (ut->flags & UTEXT_EXTRA_HEAP_ALLOCATED) {
uprv_free(ut->pExtra);
- ut->pExtra = NULL;
+ ut->pExtra = nullptr;
ut->flags &= ~UTEXT_EXTRA_HEAP_ALLOCATED;
ut->extraSize = 0;
}
@@ -691,7 +694,7 @@ utext_close(UText *ut) {
// Zero out function table of the closed UText. This is a defensive move,
// intended to cause applications that inadvertently use a closed
// utext to crash with null pointer errors.
- ut->pFuncs = NULL;
+ ut->pFuncs = nullptr;
if (ut->flags & UTEXT_HEAP_ALLOCATED) {
// This UText was allocated by UText setup. We need to free it.
@@ -699,7 +702,7 @@ utext_close(UText *ut) {
// tries to reopen another UText using the deleted storage.
ut->magic = 0;
uprv_free(ut);
- ut = NULL;
+ ut = nullptr;
}
return ut;
}
@@ -772,7 +775,7 @@ static void adjustPointer(UText *dest, const void **destPtr, const UText *src) {
static UText * U_CALLCONV
shallowTextClone(UText * dest, const UText * src, UErrorCode * status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
int32_t srcExtraSize = src->extraSize;
@@ -849,8 +852,8 @@ U_CDECL_END
//------------------------------------------------------------------------------
// Chunk size.
-// Must be less than 85 (256/3), because of byte mapping from UChar indexes to native indexes.
-// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes
+// Must be less than 85 (256/3), because of byte mapping from char16_t indexes to native indexes.
+// Worst case is three native bytes to one char16_t. (Supplemenaries are 4 native bytes
// to two UChars.)
// The longest illegal byte sequence treated as a single error (and converted to U+FFFD)
// is a three-byte sequence (truncated four-byte sequence).
@@ -859,7 +862,7 @@ enum { UTF8_TEXT_CHUNK_SIZE=32 };
//
// UTF8Buf Two of these structs will be set up in the UText's extra allocated space.
-// Each contains the UChar chunk buffer, the to and from native maps, and
+// Each contains the char16_t chunk buffer, the to and from native maps, and
// header info.
//
// because backwards iteration fills the buffers starting at the end and
@@ -872,7 +875,7 @@ enum { UTF8_TEXT_CHUNK_SIZE=32 };
//
struct UTF8Buf {
- int32_t bufNativeStart; // Native index of first char in UChar buf
+ int32_t bufNativeStart; // Native index of first char in char16_t buf
int32_t bufNativeLimit; // Native index following last char in buf.
int32_t bufStartIdx; // First filled position in buf.
int32_t bufLimitIdx; // Limit of filled range in buf.
@@ -882,13 +885,13 @@ struct UTF8Buf {
// Set to bufNativeStart when filling forwards.
// Set to computed value when filling backwards.
- UChar buf[UTF8_TEXT_CHUNK_SIZE+4]; // The UChar buffer. Requires one extra position beyond the
+ char16_t buf[UTF8_TEXT_CHUNK_SIZE+4]; // The char16_t buffer. Requires one extra position beyond the
// the chunk size, to allow for surrogate at the end.
// Length must be identical to mapToNative array, below,
// because of the way indexing works when the array is
// filled backwards during a reverse iteration. Thus,
// the additional extra size.
- uint8_t mapToNative[UTF8_TEXT_CHUNK_SIZE+4]; // map UChar index in buf to
+ uint8_t mapToNative[UTF8_TEXT_CHUNK_SIZE+4]; // map char16_t index in buf to
// native offset from bufNativeStart.
// Requires two extra slots,
// one for a supplementary starting in the last normal position,
@@ -941,7 +944,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) {
// return;
//
const uint8_t *s8=(const uint8_t *)ut->context;
- UTF8Buf *u8b = NULL;
+ UTF8Buf *u8b = nullptr;
int32_t length = ut->b; // Length of original utf-8
int32_t ix= (int32_t)index; // Requested index, trimmed to 32 bits.
int32_t mapIndex = 0;
@@ -987,7 +990,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) {
// Don't swap buffers, but do set the
// current buffer position.
ut->chunkOffset = ut->chunkLength;
- return FALSE;
+ return false;
} else {
// End of current buffer.
// check whether other buffer already has what we need.
@@ -1016,7 +1019,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) {
// Current buffer extends up to the end of the string.
// Leave it as the current buffer.
ut->chunkOffset = ut->chunkLength;
- return FALSE;
+ return false;
}
if (ix == u8b->bufNativeLimit) {
// Alternate buffer extends to the end of string.
@@ -1038,7 +1041,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) {
mapIndex = ix - u8b->toUCharsMapStart;
U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- return TRUE;
+ return true;
}
}
@@ -1055,7 +1058,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) {
// Don't swap buffers, but do set the
// current buffer position.
ut->chunkOffset = 0;
- return FALSE;
+ return false;
} else {
// Start of current buffer.
// check whether other buffer already has what we need.
@@ -1108,9 +1111,9 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) {
// one of the trailing bytes. Because there is no preceding ,
// character, this access fails. We can't pick up on the
// situation sooner because the requested index is not zero.
- return FALSE;
+ return false;
} else {
- return TRUE;
+ return true;
}
@@ -1139,7 +1142,7 @@ swapBuffers:
U_ASSERT(mapIndex<(int32_t)sizeof(u8b->mapToUChars));
ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- return TRUE;
+ return true;
}
@@ -1170,7 +1173,7 @@ swapBuffers:
ut->chunkOffset = 0;
U_ASSERT(ix == u8b->bufNativeStart);
}
- return FALSE;
+ return false;
makeStubBuffer:
// The user has done a seek/access past the start or end
@@ -1203,18 +1206,18 @@ fillForward:
ut->p = u8b_swap;
int32_t strLen = ut->b;
- UBool nulTerminated = FALSE;
+ UBool nulTerminated = false;
if (strLen < 0) {
strLen = 0x7fffffff;
- nulTerminated = TRUE;
+ nulTerminated = true;
}
- UChar *buf = u8b_swap->buf;
+ char16_t *buf = u8b_swap->buf;
uint8_t *mapToNative = u8b_swap->mapToNative;
uint8_t *mapToUChars = u8b_swap->mapToUChars;
int32_t destIx = 0;
int32_t srcIx = ix;
- UBool seenNonAscii = FALSE;
+ UBool seenNonAscii = false;
UChar32 c = 0;
// Fill the chunk buffer and mapping arrays.
@@ -1223,15 +1226,15 @@ fillForward:
if (c>0 && c<0x80) {
// Special case ASCII range for speed.
// zero is excluded to simplify bounds checking.
- buf[destIx] = (UChar)c;
+ buf[destIx] = (char16_t)c;
mapToNative[destIx] = (uint8_t)(srcIx - ix);
mapToUChars[srcIx-ix] = (uint8_t)destIx;
srcIx++;
destIx++;
} else {
// General case, handle everything.
- if (seenNonAscii == FALSE) {
- seenNonAscii = TRUE;
+ if (seenNonAscii == false) {
+ seenNonAscii = true;
u8b_swap->bufNILimit = destIx;
}
@@ -1269,7 +1272,7 @@ fillForward:
u8b_swap->bufNativeLimit = srcIx;
u8b_swap->bufStartIdx = 0;
u8b_swap->bufLimitIdx = destIx;
- if (seenNonAscii == FALSE) {
+ if (seenNonAscii == false) {
u8b_swap->bufNILimit = destIx;
}
u8b_swap->toUCharsMapStart = u8b_swap->bufNativeStart;
@@ -1293,7 +1296,7 @@ fillForward:
ut->providerProperties &= ~I32_FLAG(UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE);
}
}
- return TRUE;
+ return true;
}
@@ -1317,7 +1320,7 @@ fillReverse:
ut->q = ut->p;
ut->p = u8b_swap;
- UChar *buf = u8b_swap->buf;
+ char16_t *buf = u8b_swap->buf;
uint8_t *mapToNative = u8b_swap->mapToNative;
uint8_t *mapToUChars = u8b_swap->mapToUChars;
int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
@@ -1349,7 +1352,7 @@ fillReverse:
c = s8[srcIx];
if (c<0x80) {
// Special case ASCII range for speed.
- buf[destIx] = (UChar)c;
+ buf[destIx] = (char16_t)c;
U_ASSERT(toUCharsMapStart <= srcIx);
mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
@@ -1367,7 +1370,7 @@ fillReverse:
// Store the character in UTF-16 buffer.
if (c<0x10000) {
- buf[destIx] = (UChar)c;
+ buf[destIx] = (char16_t)c;
mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
} else {
buf[destIx] = U16_TRAIL(c);
@@ -1402,7 +1405,7 @@ fillReverse:
ut->chunkNativeStart = u8b_swap->bufNativeStart;
ut->chunkNativeLimit = u8b_swap->bufNativeLimit;
ut->nativeIndexingLimit = u8b_swap->bufNILimit;
- return TRUE;
+ return true;
}
}
@@ -1414,8 +1417,8 @@ fillReverse:
// Inserts a Replacement Char rather than failing on invalid UTF-8
// Removes unnecessary features.
//
-static UChar*
-utext_strFromUTF8(UChar *dest,
+static char16_t*
+utext_strFromUTF8(char16_t *dest,
int32_t destCapacity,
int32_t *pDestLength,
const char* src,
@@ -1424,8 +1427,8 @@ utext_strFromUTF8(UChar *dest,
)
{
- UChar *pDest = dest;
- UChar *pDestLimit = (dest!=NULL)?(dest+destCapacity):NULL;
+ char16_t *pDest = dest;
+ char16_t *pDestLimit = (dest!=nullptr)?(dest+destCapacity):nullptr;
UChar32 ch=0;
int32_t index = 0;
int32_t reqLength = 0;
@@ -1435,11 +1438,11 @@ utext_strFromUTF8(UChar *dest,
while((index < srcLength)&&(pDest<pDestLimit)){
ch = pSrc[index++];
if(ch <=0x7f){
- *pDest++=(UChar)ch;
+ *pDest++=(char16_t)ch;
}else{
ch=utf8_nextCharSafeBody(pSrc, &index, srcLength, ch, -3);
if(U_IS_BMP(ch)){
- *(pDest++)=(UChar)ch;
+ *(pDest++)=(char16_t)ch;
}else{
*(pDest++)=U16_LEAD(ch);
if(pDest<pDestLimit){
@@ -1479,12 +1482,12 @@ utext_strFromUTF8(UChar *dest,
static int32_t U_CALLCONV
utf8TextExtract(UText *ut,
int64_t start, int64_t limit,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0)) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1526,7 +1529,7 @@ utf8TextExtract(UText *ut,
utext_strFromUTF8(dest, destCapacity, &destLength,
(const char *)ut->context+start32, limit32-start32,
pErrorCode);
- utf8TextAccess(ut, limit32, TRUE);
+ utf8TextAccess(ut, limit32, true);
return destLength;
}
@@ -1579,7 +1582,7 @@ utf8TextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status)
if (deep && U_SUCCESS(*status)) {
int32_t len = (int32_t)utext_nativeLength((UText *)src);
char *copyStr = (char *)uprv_malloc(len+1);
- if (copyStr == NULL) {
+ if (copyStr == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
uprv_memcpy(copyStr, src->context, len+1);
@@ -1599,7 +1602,7 @@ utf8TextClose(UText *ut) {
if (ut->providerProperties & I32_FLAG(UTEXT_PROVIDER_OWNS_TEXT)) {
char *s = (char *)ut->context;
uprv_free(s);
- ut->context = NULL;
+ ut->context = nullptr;
}
}
@@ -1614,14 +1617,14 @@ static const struct UTextFuncs utf8Funcs =
utf8TextLength,
utf8TextAccess,
utf8TextExtract,
- NULL, /* replace*/
- NULL, /* copy */
+ nullptr, /* replace*/
+ nullptr, /* copy */
utf8TextMapOffsetToNative,
utf8TextMapIndexToUTF16,
utf8TextClose,
- NULL, // spare 1
- NULL, // spare 2
- NULL // spare 3
+ nullptr, // spare 1
+ nullptr, // spare 2
+ nullptr // spare 3
};
@@ -1630,15 +1633,15 @@ static const char gEmptyString[] = {0};
U_CAPI UText * U_EXPORT2
utext_openUTF8(UText *ut, const char *s, int64_t length, UErrorCode *status) {
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if(s==NULL && length==0) {
+ if(s==nullptr && length==0) {
s = gEmptyString;
}
- if(s==NULL || length<-1 || length>INT32_MAX) {
+ if(s==nullptr || length<-1 || length>INT32_MAX) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
ut = utext_setup(ut, sizeof(UTF8Buf) * 2, status);
@@ -1688,7 +1691,7 @@ struct ReplExtra {
* Chunk UChars.
* +1 to simplify filling with surrogate pair at the end.
*/
- UChar s[REP_TEXT_CHUNK_SIZE+1];
+ char16_t s[REP_TEXT_CHUNK_SIZE+1];
};
@@ -1701,7 +1704,7 @@ repTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status) {
// For deep clones, make a copy of the Replaceable.
// The copied Replaceable storage is owned by the newly created UText clone.
- // A non-NULL pointer in UText.p is the signal to the close() function to delete
+ // A non-nullptr pointer in UText.p is the signal to the close() function to delete
// it.
//
if (deep && U_SUCCESS(*status)) {
@@ -1724,7 +1727,7 @@ repTextClose(UText *ut) {
if (ut->providerProperties & I32_FLAG(UTEXT_PROVIDER_OWNS_TEXT)) {
Replaceable *rep = (Replaceable *)ut->context;
delete rep;
- ut->context = NULL;
+ ut->context = nullptr;
}
}
@@ -1751,7 +1754,7 @@ repTextAccess(UText *ut, int64_t index, UBool forward) {
* Compute start/limit boundaries around index, for a segment of text
* to be extracted.
* To allow for the possibility that our user gave an index to the trailing
- * half of a surrogate pair, we must request one extra preceding UChar when
+ * half of a surrogate pair, we must request one extra preceding char16_t when
* going in the forward direction. This will ensure that the buffer has the
* entire code point at the specified index.
*/
@@ -1760,13 +1763,13 @@ repTextAccess(UText *ut, int64_t index, UBool forward) {
if (index32>=ut->chunkNativeStart && index32<ut->chunkNativeLimit) {
// Buffer already contains the requested position.
ut->chunkOffset = (int32_t)(index - ut->chunkNativeStart);
- return TRUE;
+ return true;
}
if (index32>=length && ut->chunkNativeLimit==length) {
// Request for end of string, and buffer already extends up to it.
// Can't get the data, but don't change the buffer.
ut->chunkOffset = length - (int32_t)ut->chunkNativeStart;
- return FALSE;
+ return false;
}
ut->chunkNativeLimit = index + REP_TEXT_CHUNK_SIZE - 1;
@@ -1787,19 +1790,19 @@ repTextAccess(UText *ut, int64_t index, UBool forward) {
if (index32>ut->chunkNativeStart && index32<=ut->chunkNativeLimit) {
// Requested position already in buffer.
ut->chunkOffset = index32 - (int32_t)ut->chunkNativeStart;
- return TRUE;
+ return true;
}
if (index32==0 && ut->chunkNativeStart==0) {
// Request for start, buffer already begins at start.
// No data, but keep the buffer as is.
ut->chunkOffset = 0;
- return FALSE;
+ return false;
}
// Figure out the bounds of the chunk to extract for reverse iteration.
// Need to worry about chunk not splitting surrogate pairs, and while still
// containing the data we need.
- // Fix by requesting a chunk that includes an extra UChar at the end.
+ // Fix by requesting a chunk that includes an extra char16_t at the end.
// If this turns out to be a lead surrogate, we can lop it off and still have
// the data we wanted.
ut->chunkNativeStart = index32 + 1 - REP_TEXT_CHUNK_SIZE;
@@ -1834,7 +1837,7 @@ repTextAccess(UText *ut, int64_t index, UBool forward) {
}
}
- // if the first UChar in the chunk could be the trailing half of a surrogate pair,
+ // if the first char16_t in the chunk could be the trailing half of a surrogate pair,
// trim it off.
if(ut->chunkNativeStart>0 && U16_IS_TRAIL(ex->s[0])) {
++(ut->chunkContents);
@@ -1849,7 +1852,7 @@ repTextAccess(UText *ut, int64_t index, UBool forward) {
// Use fast indexing for get/setNativeIndex()
ut->nativeIndexingLimit = ut->chunkLength;
- return TRUE;
+ return true;
}
@@ -1857,7 +1860,7 @@ repTextAccess(UText *ut, int64_t index, UBool forward) {
static int32_t U_CALLCONV
repTextExtract(UText *ut,
int64_t start, int64_t limit,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *status) {
const Replaceable *rep=(const Replaceable *)ut->context;
int32_t length=rep->length();
@@ -1865,7 +1868,7 @@ repTextExtract(UText *ut,
if(U_FAILURE(*status)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0)) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
}
if(start>limit) {
@@ -1892,7 +1895,7 @@ repTextExtract(UText *ut,
}
UnicodeString buffer(dest, 0, destCapacity); // writable alias
rep->extractBetween(start32, limit32, buffer);
- repTextAccess(ut, limit32, TRUE);
+ repTextAccess(ut, limit32, true);
return u_terminateUChars(dest, destCapacity, length, status);
}
@@ -1900,7 +1903,7 @@ repTextExtract(UText *ut,
static int32_t U_CALLCONV
repTextReplace(UText *ut,
int64_t start, int64_t limit,
- const UChar *src, int32_t length,
+ const char16_t *src, int32_t length,
UErrorCode *status) {
Replaceable *rep=(Replaceable *)ut->context;
int32_t oldLength;
@@ -1908,7 +1911,7 @@ repTextReplace(UText *ut,
if(U_FAILURE(*status)) {
return 0;
}
- if(src==NULL && length!=0) {
+ if(src==nullptr && length!=0) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1948,7 +1951,7 @@ repTextReplace(UText *ut,
// set the iteration position to the end of the newly inserted replacement text.
int32_t newIndexPos = limit32 + lengthDelta;
- repTextAccess(ut, newIndexPos, TRUE);
+ repTextAccess(ut, newIndexPos, true);
return lengthDelta;
}
@@ -2012,7 +2015,7 @@ repTextCopy(UText *ut,
}
// Set position, reload chunk if needed.
- repTextAccess(ut, nativeIterIndex, TRUE);
+ repTextAccess(ut, nativeIterIndex, true);
}
static const struct UTextFuncs repFuncs =
@@ -2025,12 +2028,12 @@ static const struct UTextFuncs repFuncs =
repTextExtract,
repTextReplace,
repTextCopy,
- NULL, // MapOffsetToNative,
- NULL, // MapIndexToUTF16,
+ nullptr, // MapOffsetToNative,
+ nullptr, // MapIndexToUTF16,
repTextClose,
- NULL, // spare 1
- NULL, // spare 2
- NULL // spare 3
+ nullptr, // spare 1
+ nullptr, // spare 2
+ nullptr // spare 3
};
@@ -2038,11 +2041,11 @@ U_CAPI UText * U_EXPORT2
utext_openReplaceable(UText *ut, Replaceable *rep, UErrorCode *status)
{
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if(rep==NULL) {
+ if(rep==nullptr) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
ut = utext_setup(ut, sizeof(ReplExtra), status);
if(U_FAILURE(*status)) {
@@ -2077,7 +2080,7 @@ U_CDECL_END
// Use of UText data members:
// context pointer to UnicodeString
// p pointer to UnicodeString IF this UText owns the string
-// and it must be deleted on close(). NULL otherwise.
+// and it must be deleted on close(). nullptr otherwise.
//
//------------------------------------------------------------------------------
@@ -2091,7 +2094,7 @@ unistrTextClone(UText *dest, const UText *src, UBool deep, UErrorCode *status) {
// For deep clones, make a copy of the UnicodeSring.
// The copied UnicodeString storage is owned by the newly created UText clone.
- // A non-NULL pointer in UText.p is the signal to the close() function to delete
+ // A non-nullptr pointer in UText.p is the signal to the close() function to delete
// the UText.
//
if (deep && U_SUCCESS(*status)) {
@@ -2113,7 +2116,7 @@ unistrTextClose(UText *ut) {
if (ut->providerProperties & I32_FLAG(UTEXT_PROVIDER_OWNS_TEXT)) {
UnicodeString *str = (UnicodeString *)ut->context;
delete str;
- ut->context = NULL;
+ ut->context = nullptr;
}
}
@@ -2139,7 +2142,7 @@ unistrTextAccess(UText *ut, int64_t index, UBool forward) {
static int32_t U_CALLCONV
unistrTextExtract(UText *t,
int64_t start, int64_t limit,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
const UnicodeString *us=(const UnicodeString *)t->context;
int32_t length=us->length();
@@ -2147,7 +2150,7 @@ unistrTextExtract(UText *t,
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0)) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
}
if(start<0 || start>limit) {
@@ -2159,7 +2162,7 @@ unistrTextExtract(UText *t,
int32_t limit32 = limit<length ? us->getChar32Start((int32_t)limit) : length;
length=limit32-start32;
- if (destCapacity>0 && dest!=NULL) {
+ if (destCapacity>0 && dest!=nullptr) {
int32_t trimmedLength = length;
if(trimmedLength>destCapacity) {
trimmedLength=destCapacity;
@@ -2176,7 +2179,7 @@ unistrTextExtract(UText *t,
static int32_t U_CALLCONV
unistrTextReplace(UText *ut,
int64_t start, int64_t limit,
- const UChar *src, int32_t length,
+ const char16_t *src, int32_t length,
UErrorCode *pErrorCode) {
UnicodeString *us=(UnicodeString *)ut->context;
int32_t oldLength;
@@ -2184,7 +2187,7 @@ unistrTextReplace(UText *ut,
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(src==NULL && length!=0) {
+ if(src==nullptr && length!=0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
}
if(start>limit) {
@@ -2254,7 +2257,7 @@ unistrTextCopy(UText *ut,
// update chunk description, set iteration position.
ut->chunkContents = us->getBuffer();
- if (move==FALSE) {
+ if (move==false) {
// copy operation, string length grows
ut->chunkLength += limit32-start32;
ut->chunkNativeLimit = ut->chunkLength;
@@ -2279,12 +2282,12 @@ static const struct UTextFuncs unistrFuncs =
unistrTextExtract,
unistrTextReplace,
unistrTextCopy,
- NULL, // MapOffsetToNative,
- NULL, // MapIndexToUTF16,
+ nullptr, // MapOffsetToNative,
+ nullptr, // MapIndexToUTF16,
unistrTextClose,
- NULL, // spare 1
- NULL, // spare 2
- NULL // spare 3
+ nullptr, // spare 1
+ nullptr, // spare 2
+ nullptr // spare 3
};
@@ -2308,7 +2311,7 @@ utext_openConstUnicodeString(UText *ut, const UnicodeString *s, UErrorCode *stat
if (U_SUCCESS(*status) && s->isBogus()) {
// The UnicodeString is bogus, but we still need to detach the UText
// from whatever it was hooked to before, if anything.
- utext_openUChars(ut, NULL, 0, status);
+ utext_openUChars(ut, nullptr, 0, status);
*status = U_ILLEGAL_ARGUMENT_ERROR;
return ut;
}
@@ -2331,7 +2334,7 @@ utext_openConstUnicodeString(UText *ut, const UnicodeString *s, UErrorCode *stat
//------------------------------------------------------------------------------
//
-// UText implementation for const UChar * strings
+// UText implementation for const char16_t * strings
//
// Use of UText data members:
// context pointer to UnicodeString
@@ -2351,7 +2354,7 @@ ucstrTextClone(UText *dest, const UText * src, UBool deep, UErrorCode * status)
// For deep clones, make a copy of the string.
// The copied storage is owned by the newly created clone.
- // A non-NULL pointer in UText.p is the signal to the close() function to delete
+ // A non-nullptr pointer in UText.p is the signal to the close() function to delete
// it.
//
if (deep && U_SUCCESS(*status)) {
@@ -2359,9 +2362,9 @@ ucstrTextClone(UText *dest, const UText * src, UBool deep, UErrorCode * status)
int32_t len = (int32_t)utext_nativeLength(dest);
// The cloned string IS going to be NUL terminated, whether or not the original was.
- const UChar *srcStr = (const UChar *)src->context;
- UChar *copyStr = (UChar *)uprv_malloc((len+1) * sizeof(UChar));
- if (copyStr == NULL) {
+ const char16_t *srcStr = (const char16_t *)src->context;
+ char16_t *copyStr = (char16_t *)uprv_malloc((len+1) * sizeof(char16_t));
+ if (copyStr == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
int64_t i;
@@ -2383,9 +2386,9 @@ ucstrTextClose(UText *ut) {
// All that needs to be done here is delete the string if the UText
// owns it. This occurs if the UText was created by cloning.
if (ut->providerProperties & I32_FLAG(UTEXT_PROVIDER_OWNS_TEXT)) {
- UChar *s = (UChar *)ut->context;
+ char16_t *s = (char16_t *)ut->context;
uprv_free(s);
- ut->context = NULL;
+ ut->context = nullptr;
}
}
@@ -2397,7 +2400,7 @@ ucstrTextLength(UText *ut) {
// null terminated, we don't yet know the length. Scan for it.
// Access is not convenient for doing this
// because the current iteration position can't be changed.
- const UChar *str = (const UChar *)ut->context;
+ const char16_t *str = (const char16_t *)ut->context;
for (;;) {
if (str[ut->chunkNativeLimit] == 0) {
break;
@@ -2415,7 +2418,7 @@ ucstrTextLength(UText *ut) {
static UBool U_CALLCONV
ucstrTextAccess(UText *ut, int64_t index, UBool forward) {
- const UChar *str = (const UChar *)ut->context;
+ const char16_t *str = (const char16_t *)ut->context;
// pin the requested index to the bounds of the string,
// and set current iteration position.
@@ -2505,18 +2508,18 @@ breakout:
static int32_t U_CALLCONV
ucstrTextExtract(UText *ut,
int64_t start, int64_t limit,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode)
{
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0) || start>limit) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0) || start>limit) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- //const UChar *s=(const UChar *)ut->context;
+ //const char16_t *s=(const char16_t *)ut->context;
int32_t si, di;
int32_t start32;
@@ -2525,8 +2528,8 @@ ucstrTextExtract(UText *ut,
// Access the start. Does two things we need:
// Pins 'start' to the length of the string, if it came in out-of-bounds.
// Snaps 'start' to the beginning of a code point.
- ucstrTextAccess(ut, start, TRUE);
- const UChar *s=ut->chunkContents;
+ ucstrTextAccess(ut, start, true);
+ const char16_t *s=ut->chunkContents;
start32 = ut->chunkOffset;
int32_t strLength=(int32_t)ut->a;
@@ -2579,7 +2582,7 @@ ucstrTextExtract(UText *ut,
if (si <= ut->chunkNativeLimit) {
ut->chunkOffset = si;
} else {
- ucstrTextAccess(ut, si, TRUE);
+ ucstrTextAccess(ut, si, true);
}
// Add a terminating NUL if space in the buffer permits,
@@ -2596,31 +2599,31 @@ static const struct UTextFuncs ucstrFuncs =
ucstrTextLength,
ucstrTextAccess,
ucstrTextExtract,
- NULL, // Replace
- NULL, // Copy
- NULL, // MapOffsetToNative,
- NULL, // MapIndexToUTF16,
+ nullptr, // Replace
+ nullptr, // Copy
+ nullptr, // MapOffsetToNative,
+ nullptr, // MapIndexToUTF16,
ucstrTextClose,
- NULL, // spare 1
- NULL, // spare 2
- NULL, // spare 3
+ nullptr, // spare 1
+ nullptr, // spare 2
+ nullptr, // spare 3
};
U_CDECL_END
-static const UChar gEmptyUString[] = {0};
+static const char16_t gEmptyUString[] = {0};
U_CAPI UText * U_EXPORT2
-utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status) {
+utext_openUChars(UText *ut, const char16_t *s, int64_t length, UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if(s==NULL && length==0) {
+ if(s==nullptr && length==0) {
s = gEmptyUString;
}
- if (s==NULL || length < -1 || length>INT32_MAX) {
+ if (s==nullptr || length < -1 || length>INT32_MAX) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
ut = utext_setup(ut, 0, status);
if (U_SUCCESS(*status)) {
@@ -2667,7 +2670,7 @@ charIterTextClose(UText *ut) {
// owns it. This occurs if the UText was created by cloning.
CharacterIterator *ci = (CharacterIterator *)ut->r;
delete ci;
- ut->r = NULL;
+ ut->r = nullptr;
}
static int64_t U_CALLCONV
@@ -2697,25 +2700,25 @@ charIterTextAccess(UText *ut, int64_t index, UBool forward) {
// Find the native index of the start of the buffer containing what we want.
neededIndex -= neededIndex % CIBufSize;
- UChar *buf = NULL;
- UBool needChunkSetup = TRUE;
+ char16_t *buf = nullptr;
+ UBool needChunkSetup = true;
int i;
if (ut->chunkNativeStart == neededIndex) {
// The buffer we want is already the current chunk.
- needChunkSetup = FALSE;
+ needChunkSetup = false;
} else if (ut->b == neededIndex) {
// The first buffer (buffer p) has what we need.
- buf = (UChar *)ut->p;
+ buf = (char16_t *)ut->p;
} else if (ut->c == neededIndex) {
// The second buffer (buffer q) has what we need.
- buf = (UChar *)ut->q;
+ buf = (char16_t *)ut->q;
} else {
// Neither buffer already has what we need.
// Load new data from the character iterator.
// Use the buf that is not the current buffer.
- buf = (UChar *)ut->p;
+ buf = (char16_t *)ut->p;
if (ut->p == ut->chunkContents) {
- buf = (UChar *)ut->q;
+ buf = (char16_t *)ut->q;
}
ci->setIndex(neededIndex);
for (i=0; i<CIBufSize; i++) {
@@ -2748,13 +2751,13 @@ charIterTextAccess(UText *ut, int64_t index, UBool forward) {
static UText * U_CALLCONV
charIterTextClone(UText *dest, const UText *src, UBool deep, UErrorCode * status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if (deep) {
// There is no CharacterIterator API for cloning the underlying text storage.
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
} else {
CharacterIterator *srcCI =(CharacterIterator *)src->context;
srcCI = srcCI->clone();
@@ -2774,13 +2777,13 @@ charIterTextClone(UText *dest, const UText *src, UBool deep, UErrorCode * status
static int32_t U_CALLCONV
charIterTextExtract(UText *ut,
int64_t start, int64_t limit,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *status)
{
if(U_FAILURE(*status)) {
return 0;
}
- if(destCapacity<0 || (dest==NULL && destCapacity>0) || start>limit) {
+ if(destCapacity<0 || (dest==nullptr && destCapacity>0) || start>limit) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -2809,7 +2812,7 @@ charIterTextExtract(UText *ut,
srci += len;
}
- charIterTextAccess(ut, copyLimit, TRUE);
+ charIterTextAccess(ut, copyLimit, true);
u_terminateUChars(dest, destCapacity, desti, status);
return desti;
@@ -2823,14 +2826,14 @@ static const struct UTextFuncs charIterFuncs =
charIterTextLength,
charIterTextAccess,
charIterTextExtract,
- NULL, // Replace
- NULL, // Copy
- NULL, // MapOffsetToNative,
- NULL, // MapIndexToUTF16,
+ nullptr, // Replace
+ nullptr, // Copy
+ nullptr, // MapOffsetToNative,
+ nullptr, // MapIndexToUTF16,
charIterTextClose,
- NULL, // spare 1
- NULL, // spare 2
- NULL // spare 3
+ nullptr, // spare 1
+ nullptr, // spare 2
+ nullptr // spare 3
};
U_CDECL_END
@@ -2838,17 +2841,17 @@ U_CDECL_END
U_CAPI UText * U_EXPORT2
utext_openCharacterIterator(UText *ut, CharacterIterator *ci, UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if (ci->startIndex() > 0) {
// No support for CharacterIterators that do not start indexing from zero.
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
// Extra space in UText for 2 buffers of CIBufSize UChars each.
- int32_t extraSpace = 2 * CIBufSize * sizeof(UChar);
+ int32_t extraSpace = 2 * CIBufSize * sizeof(char16_t);
ut = utext_setup(ut, extraSpace, status);
if (U_SUCCESS(*status)) {
ut->pFuncs = &charIterFuncs;
@@ -2857,7 +2860,7 @@ utext_openCharacterIterator(UText *ut, CharacterIterator *ci, UErrorCode *status
ut->a = ci->endIndex(); // Length of text
ut->p = ut->pExtra; // First buffer
ut->b = -1; // Native index of first buffer contents
- ut->q = (UChar*)ut->pExtra+CIBufSize; // Second buffer
+ ut->q = (char16_t*)ut->pExtra+CIBufSize; // Second buffer
ut->c = -1; // Native index of second buffer contents
// Initialize current chunk contents to be empty.
@@ -2866,7 +2869,7 @@ utext_openCharacterIterator(UText *ut, CharacterIterator *ci, UErrorCode *status
// so that getNativeIndex() will correctly compute to zero
// if no call to Access() has ever been made. They can't be both
// zero without Access() thinking that the chunk is valid.
- ut->chunkContents = (UChar *)ut->p;
+ ut->chunkContents = (char16_t *)ut->p;
ut->chunkNativeStart = -1;
ut->chunkOffset = 1;
ut->chunkNativeLimit = 0;
diff --git a/contrib/libs/icu/common/utf_impl.cpp b/contrib/libs/icu/common/utf_impl.cpp
index 9dd241a12bf..827a82daf40 100644
--- a/contrib/libs/icu/common/utf_impl.cpp
+++ b/contrib/libs/icu/common/utf_impl.cpp
@@ -55,7 +55,7 @@
* -finish:
* (BSR: Bit Scan Reverse, scans for a 1-bit, starting from the MSB)
*/
-extern "C" U_EXPORT const uint8_t
+U_CAPI const uint8_t
utf8_countTrailBytes[256]={
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,
@@ -117,11 +117,11 @@ errorValue(int32_t count, int8_t strict) {
* Unicode 16-bit strings that are not well-formed UTF-16, that is, they
* contain unpaired surrogates.
* -3: All illegal byte sequences yield U+FFFD.
- * 0 Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., FALSE):
+ * 0 Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., false):
* All illegal byte sequences yield a positive code point such that this
* result code point would be encoded with the same number of bytes as
* the illegal sequence.
- * >0 Obsolete "strict" behavior of UTF8_NEXT_CHAR_SAFE(..., TRUE):
+ * >0 Obsolete "strict" behavior of UTF8_NEXT_CHAR_SAFE(..., true):
* Same as the obsolete "safe" behavior, but non-characters are also treated
* like illegal sequences.
*
@@ -213,8 +213,8 @@ utf8_appendCharSafeBody(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool
}
}
/* c>0x10ffff or not enough space, write an error value */
- if(pIsError!=NULL) {
- *pIsError=TRUE;
+ if(pIsError!=nullptr) {
+ *pIsError=true;
} else {
length-=i;
if(length>0) {
diff --git a/contrib/libs/icu/common/util.cpp b/contrib/libs/icu/common/util.cpp
index f3421722599..f6a13aa445d 100644
--- a/contrib/libs/icu/common/util.cpp
+++ b/contrib/libs/icu/common/util.cpp
@@ -15,16 +15,16 @@
#include "patternprops.h"
#include "util.h"
-// Define UChar constants using hex for EBCDIC compatibility
+// Define char16_t constants using hex for EBCDIC compatibility
-static const UChar BACKSLASH = 0x005C; /*\*/
-static const UChar UPPER_U = 0x0055; /*U*/
-static const UChar LOWER_U = 0x0075; /*u*/
-static const UChar APOSTROPHE = 0x0027; // '\''
-static const UChar SPACE = 0x0020; // ' '
+static const char16_t BACKSLASH = 0x005C; /*\*/
+static const char16_t UPPER_U = 0x0055; /*U*/
+static const char16_t LOWER_U = 0x0075; /*u*/
+static const char16_t APOSTROPHE = 0x0027; // '\''
+static const char16_t SPACE = 0x0020; // ' '
// "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-static const UChar DIGITS[] = {
+static const char16_t DIGITS[] = {
48,49,50,51,52,53,54,55,56,57,
65,66,67,68,69,70,71,72,73,74,
75,76,77,78,79,80,81,82,83,84,
@@ -37,12 +37,12 @@ UnicodeString& ICU_Utility::appendNumber(UnicodeString& result, int32_t n,
int32_t radix, int32_t minDigits) {
if (radix < 2 || radix > 36) {
// Bogus radix
- return result.append((UChar)63/*?*/);
+ return result.append((char16_t)63/*?*/);
}
// Handle negatives
if (n < 0) {
n = -n;
- result.append((UChar)45/*-*/);
+ result.append((char16_t)45/*-*/);
}
// First determine the number of digits
int32_t nn = n;
@@ -122,9 +122,9 @@ UnicodeString &ICU_Utility::escape(UnicodeString& result, UChar32 c) {
/*
int32_t ICU_Utility::quotedIndexOf(const UnicodeString& text,
int32_t start, int32_t limit,
- UChar charToFind) {
+ char16_t charToFind) {
for (int32_t i=start; i<limit; ++i) {
- UChar c = text.charAt(i);
+ char16_t c = text.charAt(i);
if (c == BACKSLASH) {
++i;
} else if (c == APOSTROPHE) {
@@ -149,7 +149,7 @@ int32_t ICU_Utility::quotedIndexOf(const UnicodeString& text,
int32_t ICU_Utility::skipWhitespace(const UnicodeString& str, int32_t& pos,
UBool advance) {
int32_t p = pos;
- const UChar* s = str.getBuffer();
+ const char16_t* s = str.getBuffer();
p = (int32_t)(PatternProps::skipWhiteSpace(s + p, str.length() - p) - s);
if (advance) {
pos = p;
@@ -212,16 +212,16 @@ int32_t ICU_Utility::skipWhitespace(const UnicodeString& str, int32_t& pos,
* @return true if 'ch' is seen preceded by zero or more
* whitespace characters.
*/
-UBool ICU_Utility::parseChar(const UnicodeString& id, int32_t& pos, UChar ch) {
+UBool ICU_Utility::parseChar(const UnicodeString& id, int32_t& pos, char16_t ch) {
int32_t start = pos;
- skipWhitespace(id, pos, TRUE);
+ skipWhitespace(id, pos, true);
if (pos == id.length() ||
id.charAt(pos) != ch) {
pos = start;
- return FALSE;
+ return false;
}
++pos;
- return TRUE;
+ return true;
}
/**
@@ -292,7 +292,7 @@ int32_t ICU_Utility::parsePattern(const UnicodeString& pat,
int32_t ICU_Utility::parseAsciiInteger(const UnicodeString& str, int32_t& pos) {
int32_t result = 0;
- UChar c;
+ char16_t c;
while (pos < str.length() && (c = str.charAt(pos)) >= u'0' && c <= u'9') {
result = result * 10 + (c - u'0');
pos++;
@@ -302,7 +302,7 @@ int32_t ICU_Utility::parseAsciiInteger(const UnicodeString& str, int32_t& pos) {
/**
* Append a character to a rule that is being built up. To flush
- * the quoteBuf to rule, make one final call with isLiteral == TRUE.
+ * the quoteBuf to rule, make one final call with isLiteral == true.
* If there is no final character, pass in (UChar32)-1 as c.
* @param rule the string to append the character to
* @param c the character to append, or (UChar32)-1 if none.
@@ -425,10 +425,10 @@ void ICU_Utility::appendToRule(UnicodeString& rule,
const UnicodeMatcher* matcher,
UBool escapeUnprintable,
UnicodeString& quoteBuf) {
- if (matcher != NULL) {
+ if (matcher != nullptr) {
UnicodeString pat;
appendToRule(rule, matcher->toPattern(pat, escapeUnprintable),
- TRUE, escapeUnprintable, quoteBuf);
+ true, escapeUnprintable, quoteBuf);
}
}
diff --git a/contrib/libs/icu/common/util.h b/contrib/libs/icu/common/util.h
index 7e6d356899f..cf71b9623ea 100644
--- a/contrib/libs/icu/common/util.h
+++ b/contrib/libs/icu/common/util.h
@@ -94,7 +94,7 @@ class U_COMMON_API ICU_Utility /* not : public UObject because all methods are s
//?FOR FUTURE USE. DISABLE FOR NOW for coverage reasons.
// static int32_t quotedIndexOf(const UnicodeString& text,
// int32_t start, int32_t limit,
-// UChar c);
+// char16_t c);
/**
* Skip over a sequence of zero or more white space characters at pos.
@@ -140,7 +140,7 @@ class U_COMMON_API ICU_Utility /* not : public UObject because all methods are s
* @return true if 'ch' is seen preceded by zero or more
* whitespace characters.
*/
- static UBool parseChar(const UnicodeString& id, int32_t& pos, UChar ch);
+ static UBool parseChar(const UnicodeString& id, int32_t& pos, char16_t ch);
/**
* Parse a pattern string starting at offset pos. Keywords are
@@ -258,7 +258,7 @@ class U_COMMON_API ICU_Utility /* not : public UObject because all methods are s
private:
// do not instantiate
- ICU_Utility();
+ ICU_Utility() = delete;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/util_props.cpp b/contrib/libs/icu/common/util_props.cpp
index d6ae052214c..5991769d068 100644
--- a/contrib/libs/icu/common/util_props.cpp
+++ b/contrib/libs/icu/common/util_props.cpp
@@ -91,8 +91,8 @@ int32_t ICU_Utility::parsePattern(const UnicodeString& rule, int32_t pos, int32_
int32_t p;
int32_t intCount = 0; // number of integers parsed
for (int32_t i=0; i<pattern.length(); ++i) {
- UChar cpat = pattern.charAt(i);
- UChar c;
+ char16_t cpat = pattern.charAt(i);
+ char16_t c;
switch (cpat) {
case 32 /*' '*/:
if (pos >= limit) {
@@ -120,7 +120,7 @@ int32_t ICU_Utility::parsePattern(const UnicodeString& rule, int32_t pos, int32_
if (pos >= limit) {
return -1;
}
- c = (UChar) u_tolower(rule.charAt(pos++));
+ c = (char16_t) u_tolower(rule.charAt(pos++));
if (c != cpat) {
return -1;
}
diff --git a/contrib/libs/icu/common/utrace.cpp b/contrib/libs/icu/common/utrace.cpp
index dfd2062f31b..1f536d5643d 100644
--- a/contrib/libs/icu/common/utrace.cpp
+++ b/contrib/libs/icu/common/utrace.cpp
@@ -18,10 +18,10 @@
#include "ucln_cmn.h"
-static UTraceEntry *pTraceEntryFunc = NULL;
-static UTraceExit *pTraceExitFunc = NULL;
-static UTraceData *pTraceDataFunc = NULL;
-static const void *gTraceContext = NULL;
+static UTraceEntry *pTraceEntryFunc = nullptr;
+static UTraceExit *pTraceExitFunc = nullptr;
+static UTraceData *pTraceDataFunc = nullptr;
+static const void *gTraceContext = nullptr;
/**
* \var utrace_level
@@ -32,7 +32,7 @@ utrace_level = UTRACE_ERROR;
U_CAPI void U_EXPORT2
utrace_entry(int32_t fnNumber) {
- if (pTraceEntryFunc != NULL) {
+ if (pTraceEntryFunc != nullptr) {
(*pTraceEntryFunc)(gTraceContext, fnNumber);
}
}
@@ -46,7 +46,7 @@ static const char gExitFmtPtrStatus[] = "Returns %d. Status = %p.";
U_CAPI void U_EXPORT2
utrace_exit(int32_t fnNumber, int32_t returnType, ...) {
- if (pTraceExitFunc != NULL) {
+ if (pTraceExitFunc != nullptr) {
va_list args;
const char *fmt;
@@ -80,7 +80,7 @@ utrace_exit(int32_t fnNumber, int32_t returnType, ...) {
U_CAPI void U_EXPORT2
utrace_data(int32_t fnNumber, int32_t level, const char *fmt, ...) {
- if (pTraceDataFunc != NULL) {
+ if (pTraceDataFunc != nullptr) {
va_list args;
va_start(args, fmt );
(*pTraceDataFunc)(gTraceContext, fnNumber, level, fmt, args);
@@ -117,9 +117,9 @@ static void outputChar(char c, char *outBuf, int32_t *outIx, int32_t capacity, i
outBuf[*outIx] = c;
}
if (c != 0) {
- /* Nulls only appear as end-of-string terminators. Move them to the output
+ /* NULs only appear as end-of-string terminators. Move them to the output
* buffer, but do not update the length of the buffer, so that any
- * following output will overwrite the null. */
+ * following output will overwrite the NUL. */
(*outIx)++;
}
}
@@ -157,7 +157,7 @@ static void outputPtrBytes(void *val, char *outBuf, int32_t *outIx, int32_t capa
static void outputString(const char *s, char *outBuf, int32_t *outIx, int32_t capacity, int32_t indent) {
int32_t i = 0;
char c;
- if (s==NULL) {
+ if (s==nullptr) {
s = "*NULL*";
}
do {
@@ -168,12 +168,12 @@ static void outputString(const char *s, char *outBuf, int32_t *outIx, int32_t ca
-static void outputUString(const UChar *s, int32_t len,
+static void outputUString(const char16_t *s, int32_t len,
char *outBuf, int32_t *outIx, int32_t capacity, int32_t indent) {
int32_t i = 0;
- UChar c;
- if (s==NULL) {
- outputString(NULL, outBuf, outIx, capacity, indent);
+ char16_t c;
+ if (s==nullptr) {
+ outputString(nullptr, outBuf, outIx, capacity, indent);
return;
}
@@ -205,7 +205,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
/* Literal character, not part of a %sequence. Just copy it to the output. */
outputChar(fmtC, outBuf, &outIx, capacity, indent);
if (fmtC == 0) {
- /* We hit the null that terminates the format string.
+ /* We hit the NUL that terminates the format string.
* This is the normal (and only) exit from the loop that
* interprets the format
*/
@@ -225,16 +225,16 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
break;
case 's':
- /* char * string, null terminated. */
+ /* char * string, NUL terminated. */
ptrArg = va_arg(args, char *);
outputString((const char *)ptrArg, outBuf, &outIx, capacity, indent);
break;
case 'S':
- /* UChar * string, with length, len==-1 for null terminated. */
+ /* char16_t * string, with length, len==-1 for NUL terminated. */
ptrArg = va_arg(args, char *); /* Ptr */
intArg =(int32_t)va_arg(args, int32_t); /* Length */
- outputUString((const UChar *)ptrArg, intArg, outBuf, &outIx, capacity, indent);
+ outputUString((const char16_t *)ptrArg, intArg, outBuf, &outIx, capacity, indent);
break;
case 'b':
@@ -269,7 +269,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
case 0:
/* Single '%' at end of fmt string. Output as literal '%'.
- * Back up index into format string so that the terminating null will be
+ * Back up index into format string so that the terminating NUL will be
* re-fetched in the outer loop, causing it to terminate.
*/
outputChar('%', outBuf, &outIx, capacity, indent);
@@ -299,7 +299,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
i64Ptr = (int64_t *)i8Ptr;
ptrPtr = (void **)i8Ptr;
vectorLen =(int32_t)va_arg(args, int32_t);
- if (ptrPtr == NULL) {
+ if (ptrPtr == nullptr) {
outputString("*NULL* ", outBuf, &outIx, capacity, indent);
} else {
for (i=0; i<vectorLen || vectorLen==-1; i++) {
@@ -323,28 +323,28 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
case 'p':
charsToOutput = 0;
outputPtrBytes(*ptrPtr, outBuf, &outIx, capacity);
- longArg = *ptrPtr==NULL? 0: 1; /* test for null terminated array. */
+ longArg = *ptrPtr==nullptr? 0: 1; /* test for nullptr terminated array. */
ptrPtr++;
break;
case 'c':
charsToOutput = 0;
outputChar(*i8Ptr, outBuf, &outIx, capacity, indent);
- longArg = *i8Ptr; /* for test for null terminated array. */
+ longArg = *i8Ptr; /* for test for nullptr terminated array. */
i8Ptr++;
break;
case 's':
charsToOutput = 0;
outputString((const char *)*ptrPtr, outBuf, &outIx, capacity, indent);
outputChar('\n', outBuf, &outIx, capacity, indent);
- longArg = *ptrPtr==NULL? 0: 1; /* for test for null term. array. */
+ longArg = *ptrPtr==nullptr? 0: 1; /* for test for nullptr term. array. */
ptrPtr++;
break;
case 'S':
charsToOutput = 0;
- outputUString((const UChar *)*ptrPtr, -1, outBuf, &outIx, capacity, indent);
+ outputUString((const char16_t *)*ptrPtr, -1, outBuf, &outIx, capacity, indent);
outputChar('\n', outBuf, &outIx, capacity, indent);
- longArg = *ptrPtr==NULL? 0: 1; /* for test for null term. array. */
+ longArg = *ptrPtr==nullptr? 0: 1; /* for test for nullptr term. array. */
ptrPtr++;
break;
@@ -374,8 +374,8 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
outputChar(fmtC, outBuf, &outIx, capacity, indent);
}
}
- outputChar(0, outBuf, &outIx, capacity, indent); /* Make sure that output is null terminated */
- return outIx + 1; /* outIx + 1 because outIx does not increment when outputting final null. */
+ outputChar(0, outBuf, &outIx, capacity, indent); /* Make sure that output is NUL terminated */
+ return outIx + 1; /* outIx + 1 because outIx does not increment when outputting final NUL. */
}
@@ -431,12 +431,12 @@ utrace_getLevel() {
U_CFUNC UBool
utrace_cleanup() {
- pTraceEntryFunc = NULL;
- pTraceExitFunc = NULL;
- pTraceDataFunc = NULL;
+ pTraceEntryFunc = nullptr;
+ pTraceExitFunc = nullptr;
+ pTraceDataFunc = nullptr;
utrace_level = UTRACE_OFF;
- gTraceContext = NULL;
- return TRUE;
+ gTraceContext = nullptr;
+ return true;
}
@@ -444,7 +444,7 @@ static const char * const
trFnName[] = {
"u_init",
"u_cleanup",
- NULL
+ nullptr
};
@@ -458,7 +458,7 @@ trConvNames[] = {
"ucnv_flushCache",
"ucnv_load",
"ucnv_unload",
- NULL
+ nullptr
};
@@ -473,7 +473,7 @@ trCollNames[] = {
"ucol_strcollIter",
"ucol_openFromShortString",
"ucol_strcollUTF8",
- NULL
+ nullptr
};
@@ -483,7 +483,7 @@ trResDataNames[] = {
"bundle-open",
"file-open",
"res-open",
- NULL
+ nullptr
};
diff --git a/contrib/libs/icu/common/utrie.cpp b/contrib/libs/icu/common/utrie.cpp
index ecf9b1cba72..83be0e34071 100644
--- a/contrib/libs/icu/common/utrie.cpp
+++ b/contrib/libs/icu/common/utrie.cpp
@@ -56,30 +56,30 @@ utrie_open(UNewTrie *fillIn,
if( maxDataLength<UTRIE_DATA_BLOCK_LENGTH ||
(latin1Linear && maxDataLength<1024)
) {
- return NULL;
+ return nullptr;
}
- if(fillIn!=NULL) {
+ if(fillIn!=nullptr) {
trie=fillIn;
} else {
trie=(UNewTrie *)uprv_malloc(sizeof(UNewTrie));
- if(trie==NULL) {
- return NULL;
+ if(trie==nullptr) {
+ return nullptr;
}
}
uprv_memset(trie, 0, sizeof(UNewTrie));
- trie->isAllocated= (UBool)(fillIn==NULL);
+ trie->isAllocated= (UBool)(fillIn==nullptr);
- if(aliasData!=NULL) {
+ if(aliasData!=nullptr) {
trie->data=aliasData;
- trie->isDataAllocated=FALSE;
+ trie->isDataAllocated=false;
} else {
trie->data=(uint32_t *)uprv_malloc(maxDataLength*4);
- if(trie->data==NULL) {
+ if(trie->data==nullptr) {
uprv_free(trie);
- return NULL;
+ return nullptr;
}
- trie->isDataAllocated=TRUE;
+ trie->isDataAllocated=true;
}
/* preallocate and reset the first data block (block index 0) */
@@ -108,7 +108,7 @@ utrie_open(UNewTrie *fillIn,
trie->indexLength=UTRIE_MAX_INDEX_LENGTH;
trie->dataCapacity=maxDataLength;
trie->isLatin1Linear=latin1Linear;
- trie->isCompacted=FALSE;
+ trie->isCompacted=false;
return trie;
}
@@ -118,26 +118,26 @@ utrie_clone(UNewTrie *fillIn, const UNewTrie *other, uint32_t *aliasData, int32_
UBool isDataAllocated;
/* do not clone if other is not valid or already compacted */
- if(other==NULL || other->data==NULL || other->isCompacted) {
- return NULL;
+ if(other==nullptr || other->data==nullptr || other->isCompacted) {
+ return nullptr;
}
/* clone data */
- if(aliasData!=NULL && aliasDataCapacity>=other->dataCapacity) {
- isDataAllocated=FALSE;
+ if(aliasData!=nullptr && aliasDataCapacity>=other->dataCapacity) {
+ isDataAllocated=false;
} else {
aliasDataCapacity=other->dataCapacity;
aliasData=(uint32_t *)uprv_malloc(other->dataCapacity*4);
- if(aliasData==NULL) {
- return NULL;
+ if(aliasData==nullptr) {
+ return nullptr;
}
- isDataAllocated=TRUE;
+ isDataAllocated=true;
}
trie=utrie_open(fillIn, aliasData, aliasDataCapacity,
other->data[0], other->leadUnitValue,
other->isLatin1Linear);
- if(trie==NULL) {
+ if(trie==nullptr) {
uprv_free(aliasData);
} else {
uprv_memcpy(trie->index, other->index, sizeof(trie->index));
@@ -151,10 +151,10 @@ utrie_clone(UNewTrie *fillIn, const UNewTrie *other, uint32_t *aliasData, int32_
U_CAPI void U_EXPORT2
utrie_close(UNewTrie *trie) {
- if(trie!=NULL) {
+ if(trie!=nullptr) {
if(trie->isDataAllocated) {
uprv_free(trie->data);
- trie->data=NULL;
+ trie->data=nullptr;
}
if(trie->isAllocated) {
uprv_free(trie);
@@ -164,8 +164,8 @@ utrie_close(UNewTrie *trie) {
U_CAPI uint32_t * U_EXPORT2
utrie_getData(UNewTrie *trie, int32_t *pLength) {
- if(trie==NULL || pLength==NULL) {
- return NULL;
+ if(trie==nullptr || pLength==nullptr) {
+ return nullptr;
}
*pLength=trie->dataLength;
@@ -216,24 +216,24 @@ utrie_getDataBlock(UNewTrie *trie, UChar32 c) {
}
/**
- * @return TRUE if the value was successfully set
+ * @return true if the value was successfully set
*/
U_CAPI UBool U_EXPORT2
utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value) {
int32_t block;
/* valid, uncompacted trie and valid c? */
- if(trie==NULL || trie->isCompacted || (uint32_t)c>0x10ffff) {
- return FALSE;
+ if(trie==nullptr || trie->isCompacted || (uint32_t)c>0x10ffff) {
+ return false;
}
block=utrie_getDataBlock(trie, c);
if(block<0) {
- return FALSE;
+ return false;
}
trie->data[block+(c&UTRIE_MASK)]=value;
- return TRUE;
+ return true;
}
U_CAPI uint32_t U_EXPORT2
@@ -241,15 +241,15 @@ utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero) {
int32_t block;
/* valid, uncompacted trie and valid c? */
- if(trie==NULL || trie->isCompacted || (uint32_t)c>0x10ffff) {
- if(pInBlockZero!=NULL) {
- *pInBlockZero=TRUE;
+ if(trie==nullptr || trie->isCompacted || (uint32_t)c>0x10ffff) {
+ if(pInBlockZero!=nullptr) {
+ *pInBlockZero=true;
}
return 0;
}
block=trie->index[c>>UTRIE_SHIFT];
- if(pInBlockZero!=NULL) {
+ if(pInBlockZero!=nullptr) {
*pInBlockZero= (UBool)(block==0);
}
@@ -291,13 +291,13 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U
int32_t block, rest, repeatBlock;
/* valid, uncompacted trie and valid indexes? */
- if( trie==NULL || trie->isCompacted ||
+ if( trie==nullptr || trie->isCompacted ||
(uint32_t)start>0x10ffff || (uint32_t)limit>0x110000 || start>limit
) {
- return FALSE;
+ return false;
}
if(start==limit) {
- return TRUE; /* nothing to do */
+ return true; /* nothing to do */
}
initialValue=trie->data[0];
@@ -307,7 +307,7 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U
/* set partial block at [start..following block boundary[ */
block=utrie_getDataBlock(trie, start);
if(block<0) {
- return FALSE;
+ return false;
}
nextStart=(start+UTRIE_DATA_BLOCK_LENGTH)&~UTRIE_MASK;
@@ -318,7 +318,7 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U
} else {
utrie_fillBlock(trie->data+block, start&UTRIE_MASK, limit&UTRIE_MASK,
value, initialValue, overwrite);
- return TRUE;
+ return true;
}
}
@@ -348,12 +348,12 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U
/* create and set and fill the repeatBlock */
repeatBlock=utrie_getDataBlock(trie, start);
if(repeatBlock<0) {
- return FALSE;
+ return false;
}
/* set the negative block number to indicate that it is a repeat block */
trie->index[start>>UTRIE_SHIFT]=-repeatBlock;
- utrie_fillBlock(trie->data+repeatBlock, 0, UTRIE_DATA_BLOCK_LENGTH, value, initialValue, TRUE);
+ utrie_fillBlock(trie->data+repeatBlock, 0, UTRIE_DATA_BLOCK_LENGTH, value, initialValue, true);
}
}
@@ -364,13 +364,13 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U
/* set partial block at [last block boundary..limit[ */
block=utrie_getDataBlock(trie, start);
if(block<0) {
- return FALSE;
+ return false;
}
utrie_fillBlock(trie->data+block, 0, rest, value, initialValue, overwrite);
}
- return TRUE;
+ return true;
}
static int32_t
@@ -437,7 +437,7 @@ utrie_fold(UNewTrie *trie, UNewTrieGetFoldedValue *getFoldedValue, UErrorCode *p
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
- utrie_fillBlock(trie->data+block, 0, UTRIE_DATA_BLOCK_LENGTH, trie->leadUnitValue, trie->data[0], TRUE);
+ utrie_fillBlock(trie->data+block, 0, UTRIE_DATA_BLOCK_LENGTH, trie->leadUnitValue, trie->data[0], true);
block=-block; /* negative block number to indicate that it is a repeat block */
}
for(c=(0xd800>>UTRIE_SHIFT); c<(0xdc00>>UTRIE_SHIFT); ++c) {
@@ -473,7 +473,7 @@ utrie_fold(UNewTrie *trie, UNewTrieGetFoldedValue *getFoldedValue, UErrorCode *p
* set it for the lead surrogate code unit
*/
value=getFoldedValue(trie, c, block+UTRIE_SURROGATE_BLOCK_COUNT);
- if(value!=utrie_get32(trie, U16_LEAD(c), NULL)) {
+ if(value!=utrie_get32(trie, U16_LEAD(c), nullptr)) {
if(!utrie_set32(trie, U16_LEAD(c), value)) {
/* data table overflow */
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
@@ -579,7 +579,7 @@ _findSameDataBlock(const uint32_t *data, int32_t dataLength,
*
* The compaction
* - removes blocks that are identical with earlier ones
- * - overlaps adjacent blocks as much as possible (if overlap==TRUE)
+ * - overlaps adjacent blocks as much as possible (if overlap==true)
* - moves blocks in steps of the data granularity
* - moves and overlaps blocks that overlap with multiple values in the overlap region
*
@@ -590,12 +590,12 @@ static void
utrie_compact(UNewTrie *trie, UBool overlap, UErrorCode *pErrorCode) {
int32_t i, start, newStart, overlapStart;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
/* valid, uncompacted trie? */
- if(trie==NULL) {
+ if(trie==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -747,18 +747,18 @@ utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity,
uint32_t *p;
uint16_t *dest16;
int32_t i, length;
- uint8_t* data = NULL;
+ uint8_t* data = nullptr;
/* argument check */
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(trie==NULL || capacity<0 || (capacity>0 && dt==NULL)) {
+ if(trie==nullptr || capacity<0 || (capacity>0 && dt==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- if(getFoldedValue==NULL) {
+ if(getFoldedValue==nullptr) {
getFoldedValue=defaultGetFoldedValue;
}
@@ -766,15 +766,15 @@ utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity,
/* fold and compact if necessary, also checks that indexLength is within limits */
if(!trie->isCompacted) {
/* compact once without overlap to improve folding */
- utrie_compact(trie, FALSE, pErrorCode);
+ utrie_compact(trie, false, pErrorCode);
/* fold the supplementary part of the index array */
utrie_fold(trie, getFoldedValue, pErrorCode);
/* compact again with overlap for minimum data array length */
- utrie_compact(trie, TRUE, pErrorCode);
+ utrie_compact(trie, true, pErrorCode);
- trie->isCompacted=TRUE;
+ trie->isCompacted=true;
if(U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -859,7 +859,7 @@ utrie_unserialize(UTrie *trie, const void *data, int32_t length, UErrorCode *pEr
const uint16_t *p16;
uint32_t options;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return -1;
}
@@ -918,7 +918,7 @@ utrie_unserialize(UTrie *trie, const void *data, int32_t length, UErrorCode *pEr
}
/* the "data16" data is used via the index pointer */
- trie->data32=NULL;
+ trie->data32=nullptr;
trie->initialValue=trie->index[trie->indexLength];
length=(int32_t)sizeof(UTrieHeader)+2*trie->indexLength+2*trie->dataLength;
}
@@ -938,7 +938,7 @@ utrie_unserializeDummy(UTrie *trie,
int32_t actualLength, latin1Length, i, limit;
uint16_t block;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return -1;
}
@@ -966,7 +966,7 @@ utrie_unserializeDummy(UTrie *trie,
return actualLength;
}
- trie->isLatin1Linear=TRUE;
+ trie->isLatin1Linear=true;
trie->initialValue=initialValue;
/* fill the index and data arrays */
@@ -991,7 +991,7 @@ utrie_unserializeDummy(UTrie *trie,
}
}
- trie->data32=NULL;
+ trie->data32=nullptr;
/* Latin-1 data */
p16+=trie->indexLength;
@@ -1066,10 +1066,10 @@ utrie_enum(const UTrie *trie,
int32_t l, i, j, block, prevBlock, nullBlock, offset;
/* check arguments */
- if(trie==NULL || trie->index==NULL || enumRange==NULL) {
+ if(trie==nullptr || trie->index==nullptr || enumRange==nullptr) {
return;
}
- if(enumValue==NULL) {
+ if(enumValue==nullptr) {
enumValue=enumSameValue;
}
@@ -1079,7 +1079,7 @@ utrie_enum(const UTrie *trie,
/* get the enumeration value that corresponds to an initial-value trie data entry */
initialValue=enumValue(context, trie->initialValue);
- if(data32==NULL) {
+ if(data32==nullptr) {
nullBlock=trie->indexLength;
} else {
nullBlock=0;
@@ -1120,7 +1120,7 @@ utrie_enum(const UTrie *trie,
} else {
prevBlock=block;
for(j=0; j<UTRIE_DATA_BLOCK_LENGTH; ++j) {
- value=enumValue(context, data32!=NULL ? data32[block+j] : idx[block+j]);
+ value=enumValue(context, data32!=nullptr ? data32[block+j] : idx[block+j]);
if(value!=prevValue) {
if(prev<c) {
if(!enumRange(context, prev, c, prevValue)) {
@@ -1161,7 +1161,7 @@ utrie_enum(const UTrie *trie,
continue;
}
- value= data32!=NULL ? data32[offset+(l&UTRIE_MASK)] : idx[offset+(l&UTRIE_MASK)];
+ value= data32!=nullptr ? data32[offset+(l&UTRIE_MASK)] : idx[offset+(l&UTRIE_MASK)];
/* enumerate trail surrogates for this lead surrogate */
offset=trie->getFoldingOffset(value);
@@ -1206,7 +1206,7 @@ utrie_enum(const UTrie *trie,
} else {
prevBlock=block;
for(j=0; j<UTRIE_DATA_BLOCK_LENGTH; ++j) {
- value=enumValue(context, data32!=NULL ? data32[block+j] : idx[block+j]);
+ value=enumValue(context, data32!=nullptr ? data32[block+j] : idx[block+j]);
if(value!=prevValue) {
if(prev<c) {
if(!enumRange(context, prev, c, prevValue)) {
diff --git a/contrib/libs/icu/common/utrie2.cpp b/contrib/libs/icu/common/utrie2.cpp
index 24ef5782c90..74f91bc8139 100644
--- a/contrib/libs/icu/common/utrie2.cpp
+++ b/contrib/libs/icu/common/utrie2.cpp
@@ -59,14 +59,14 @@ get32(const UNewTrie2 *trie, UChar32 c, UBool fromLSCP) {
U_CAPI uint32_t U_EXPORT2
utrie2_get32(const UTrie2 *trie, UChar32 c) {
- if(trie->data16!=NULL) {
+ if(trie->data16!=nullptr) {
return UTRIE2_GET16(trie, c);
- } else if(trie->data32!=NULL) {
+ } else if(trie->data32!=nullptr) {
return UTRIE2_GET32(trie, c);
} else if((uint32_t)c>0x10ffff) {
return trie->errorValue;
} else {
- return get32(trie->newTrie, c, TRUE);
+ return get32(trie->newTrie, c, true);
}
}
@@ -75,12 +75,12 @@ utrie2_get32FromLeadSurrogateCodeUnit(const UTrie2 *trie, UChar32 c) {
if(!U_IS_LEAD(c)) {
return trie->errorValue;
}
- if(trie->data16!=NULL) {
+ if(trie->data16!=nullptr) {
return UTRIE2_GET16_FROM_U16_SINGLE_LEAD(trie, c);
- } else if(trie->data32!=NULL) {
+ } else if(trie->data32!=nullptr) {
return UTRIE2_GET32_FROM_U16_SINGLE_LEAD(trie, c);
} else {
- return get32(trie->newTrie, c, FALSE);
+ return get32(trie->newTrie, c, false);
}
}
@@ -89,7 +89,7 @@ u8Index(const UTrie2 *trie, UChar32 c, int32_t i) {
int32_t idx=
_UTRIE2_INDEX_FROM_CP(
trie,
- trie->data32==NULL ? trie->indexLength : 0,
+ trie->data32==nullptr ? trie->indexLength : 0,
c);
return (idx<<3)|i;
}
@@ -193,14 +193,14 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits,
/* allocate the trie */
trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2));
- if(trie==NULL) {
+ if(trie==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return 0;
}
uprv_memcpy(trie, &tempTrie, sizeof(tempTrie));
trie->memory=(uint32_t *)data;
trie->length=actualLength;
- trie->isMemoryOwned=FALSE;
+ trie->isMemoryOwned=false;
#ifdef UTRIE2_DEBUG
trie->name="fromSerialized";
#endif
@@ -214,12 +214,12 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits,
switch(valueBits) {
case UTRIE2_16_VALUE_BITS:
trie->data16=p16;
- trie->data32=NULL;
+ trie->data32=nullptr;
trie->initialValue=trie->index[trie->dataNullOffset];
trie->errorValue=trie->data16[UTRIE2_BAD_UTF8_DATA_OFFSET];
break;
case UTRIE2_32_VALUE_BITS:
- trie->data16=NULL;
+ trie->data16=nullptr;
trie->data32=(const uint32_t *)p16;
trie->initialValue=trie->data32[trie->dataNullOffset];
trie->errorValue=trie->data32[UTRIE2_BAD_UTF8_DATA_OFFSET];
@@ -229,7 +229,7 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits,
return 0;
}
- if(pActualLength!=NULL) {
+ if(pActualLength!=nullptr) {
*pActualLength=actualLength;
}
return trie;
@@ -267,19 +267,19 @@ utrie2_openDummy(UTrie2ValueBits valueBits,
/* allocate the trie */
trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2));
- if(trie==NULL) {
+ if(trie==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return 0;
}
uprv_memset(trie, 0, sizeof(UTrie2));
trie->memory=uprv_malloc(length);
- if(trie->memory==NULL) {
+ if(trie->memory==nullptr) {
uprv_free(trie);
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return 0;
}
trie->length=length;
- trie->isMemoryOwned=TRUE;
+ trie->isMemoryOwned=true;
/* set the UTrie2 fields */
if(valueBits==UTRIE2_16_VALUE_BITS) {
@@ -334,7 +334,7 @@ utrie2_openDummy(UTrie2ValueBits valueBits,
case UTRIE2_16_VALUE_BITS:
/* write 16-bit data values */
trie->data16=dest16;
- trie->data32=NULL;
+ trie->data32=nullptr;
for(i=0; i<0x80; ++i) {
*dest16++=(uint16_t)initialValue;
}
@@ -349,7 +349,7 @@ utrie2_openDummy(UTrie2ValueBits valueBits,
case UTRIE2_32_VALUE_BITS:
/* write 32-bit data values */
p=(uint32_t *)dest16;
- trie->data16=NULL;
+ trie->data16=nullptr;
trie->data32=p;
for(i=0; i<0x80; ++i) {
*p++=initialValue;
@@ -372,11 +372,11 @@ utrie2_openDummy(UTrie2ValueBits valueBits,
U_CAPI void U_EXPORT2
utrie2_close(UTrie2 *trie) {
- if(trie!=NULL) {
+ if(trie!=nullptr) {
if(trie->isMemoryOwned) {
uprv_free(trie->memory);
}
- if(trie->newTrie!=NULL) {
+ if(trie->newTrie!=nullptr) {
uprv_free(trie->newTrie->data);
#ifdef UCPTRIE_DEBUG
umutablecptrie_close(trie->newTrie->t3);
@@ -389,7 +389,7 @@ utrie2_close(UTrie2 *trie) {
U_CAPI UBool U_EXPORT2
utrie2_isFrozen(const UTrie2 *trie) {
- return (UBool)(trie->newTrie==NULL);
+ return (UBool)(trie->newTrie==nullptr);
}
U_CAPI int32_t U_EXPORT2
@@ -401,8 +401,8 @@ utrie2_serialize(const UTrie2 *trie,
return 0;
}
- if( trie==NULL || trie->memory==NULL || trie->newTrie!=NULL ||
- capacity<0 || (capacity>0 && (data==NULL || (U_POINTER_MASK_LSB(data, 3)!=0)))
+ if( trie==nullptr || trie->memory==nullptr || trie->newTrie!=nullptr ||
+ capacity<0 || (capacity>0 && (data==nullptr || (U_POINTER_MASK_LSB(data, 3)!=0)))
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -450,26 +450,26 @@ enumEitherTrie(const UTrie2 *trie,
UChar32 c, prev, highStart;
int32_t j, i2Block, prevI2Block, index2NullOffset, block, prevBlock, nullBlock;
- if(enumRange==NULL) {
+ if(enumRange==nullptr) {
return;
}
- if(enumValue==NULL) {
+ if(enumValue==nullptr) {
enumValue=enumSameValue;
}
- if(trie->newTrie==NULL) {
+ if(trie->newTrie==nullptr) {
/* frozen trie */
idx=trie->index;
- U_ASSERT(idx!=NULL); /* the following code assumes trie->newTrie is not NULL when idx is NULL */
+ U_ASSERT(idx!=nullptr); /* the following code assumes trie->newTrie is not nullptr when idx is nullptr */
data32=trie->data32;
index2NullOffset=trie->index2NullOffset;
nullBlock=trie->dataNullOffset;
} else {
/* unfrozen, mutable trie */
- idx=NULL;
+ idx=nullptr;
data32=trie->newTrie->data;
- U_ASSERT(data32!=NULL); /* the following code assumes idx is not NULL when data32 is NULL */
+ U_ASSERT(data32!=nullptr); /* the following code assumes idx is not nullptr when data32 is nullptr */
index2NullOffset=trie->newTrie->index2NullOffset;
nullBlock=trie->newTrie->dataNullOffset;
@@ -513,7 +513,7 @@ enumEitherTrie(const UTrie2 *trie,
}
} else {
/* supplementary code points */
- if(idx!=NULL) {
+ if(idx!=nullptr) {
i2Block=idx[(UTRIE2_INDEX_1_OFFSET-UTRIE2_OMITTED_BMP_INDEX_1_LENGTH)+
(c>>UTRIE2_SHIFT_1)];
} else {
@@ -551,7 +551,7 @@ enumEitherTrie(const UTrie2 *trie,
i2Limit=UTRIE2_INDEX_2_BLOCK_LENGTH;
}
for(; i2<i2Limit; ++i2) {
- if(idx!=NULL) {
+ if(idx!=nullptr) {
block=(int32_t)idx[i2Block+i2]<<UTRIE2_INDEX_SHIFT;
} else {
block=trie->newTrie->index2[i2Block+i2];
@@ -574,7 +574,7 @@ enumEitherTrie(const UTrie2 *trie,
c+=UTRIE2_DATA_BLOCK_LENGTH;
} else {
for(j=0; j<UTRIE2_DATA_BLOCK_LENGTH; ++j) {
- value=enumValue(context, data32!=NULL ? data32[block+j] : idx[block+j]);
+ value=enumValue(context, data32!=nullptr ? data32[block+j] : idx[block+j]);
if(value!=prevValue) {
if(prev<c && !enumRange(context, prev, c-1, prevValue)) {
return;
@@ -594,9 +594,9 @@ enumEitherTrie(const UTrie2 *trie,
} else if(c<limit) {
/* c==highStart<limit */
uint32_t highValue;
- if(idx!=NULL) {
+ if(idx!=nullptr) {
highValue=
- data32!=NULL ?
+ data32!=nullptr ?
data32[trie->highValueIndex] :
idx[trie->highValueIndex];
} else {
diff --git a/contrib/libs/icu/common/utrie2.h b/contrib/libs/icu/common/utrie2.h
index d1e1e15a6e0..431f11568e1 100644
--- a/contrib/libs/icu/common/utrie2.h
+++ b/contrib/libs/icu/common/utrie2.h
@@ -591,42 +591,42 @@ U_CDECL_END
#ifdef __cplusplus
+#include "unicode/uobject.h"
#include "unicode/utf.h"
-#include "mutex.h"
U_NAMESPACE_BEGIN
// Use the Forward/Backward subclasses below.
class UTrie2StringIterator : public UMemory {
public:
- UTrie2StringIterator(const UTrie2 *t, const UChar *p) :
+ UTrie2StringIterator(const UTrie2 *t, const char16_t *p) :
trie(t), codePointStart(p), codePointLimit(p), codePoint(U_SENTINEL) {}
const UTrie2 *trie;
- const UChar *codePointStart, *codePointLimit;
+ const char16_t *codePointStart, *codePointLimit;
UChar32 codePoint;
};
class BackwardUTrie2StringIterator : public UTrie2StringIterator {
public:
- BackwardUTrie2StringIterator(const UTrie2 *t, const UChar *s, const UChar *p) :
+ BackwardUTrie2StringIterator(const UTrie2 *t, const char16_t *s, const char16_t *p) :
UTrie2StringIterator(t, p), start(s) {}
uint16_t previous16();
- const UChar *start;
+ const char16_t *start;
};
class ForwardUTrie2StringIterator : public UTrie2StringIterator {
public:
- // Iteration limit l can be NULL.
+ // Iteration limit l can be nullptr.
// In that case, the caller must detect c==0 and stop.
- ForwardUTrie2StringIterator(const UTrie2 *t, const UChar *p, const UChar *l) :
+ ForwardUTrie2StringIterator(const UTrie2 *t, const char16_t *p, const char16_t *l) :
UTrie2StringIterator(t, p), limit(l) {}
uint16_t next16();
- const UChar *limit;
+ const char16_t *limit;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/common/utrie2_builder.cpp b/contrib/libs/icu/common/utrie2_builder.cpp
index 8de824cc3d4..1254e8cba68 100644
--- a/contrib/libs/icu/common/utrie2_builder.cpp
+++ b/contrib/libs/icu/common/utrie2_builder.cpp
@@ -120,13 +120,13 @@ utrie2_open(uint32_t initialValue, uint32_t errorValue, UErrorCode *pErrorCode)
int32_t i, j;
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2));
newTrie=(UNewTrie2 *)uprv_malloc(sizeof(UNewTrie2));
data=(uint32_t *)uprv_malloc(UNEWTRIE2_INITIAL_DATA_LENGTH*4);
- if(trie==NULL || newTrie==NULL || data==NULL) {
+ if(trie==nullptr || newTrie==nullptr || data==nullptr) {
uprv_free(trie);
uprv_free(newTrie);
uprv_free(data);
@@ -152,7 +152,7 @@ utrie2_open(uint32_t initialValue, uint32_t errorValue, UErrorCode *pErrorCode)
newTrie->errorValue=errorValue;
newTrie->highStart=0x110000;
newTrie->firstFreeBlock=0; /* no free block in the list */
- newTrie->isCompacted=FALSE;
+ newTrie->isCompacted=false;
/*
* preallocate and reset
@@ -250,14 +250,14 @@ cloneBuilder(const UNewTrie2 *other) {
UNewTrie2 *trie;
trie=(UNewTrie2 *)uprv_malloc(sizeof(UNewTrie2));
- if(trie==NULL) {
- return NULL;
+ if(trie==nullptr) {
+ return nullptr;
}
trie->data=(uint32_t *)uprv_malloc(other->dataCapacity*4);
- if(trie->data==NULL) {
+ if(trie->data==nullptr) {
uprv_free(trie);
- return NULL;
+ return nullptr;
}
#ifdef UCPTRIE_DEBUG
if(other->t3==nullptr) {
@@ -300,43 +300,43 @@ utrie2_clone(const UTrie2 *other, UErrorCode *pErrorCode) {
UTrie2 *trie;
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if(other==NULL || (other->memory==NULL && other->newTrie==NULL)) {
+ if(other==nullptr || (other->memory==nullptr && other->newTrie==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
trie=(UTrie2 *)uprv_malloc(sizeof(UTrie2));
- if(trie==NULL) {
+ if(trie==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(trie, other, sizeof(UTrie2));
- if(other->memory!=NULL) {
+ if(other->memory!=nullptr) {
trie->memory=uprv_malloc(other->length);
- if(trie->memory!=NULL) {
- trie->isMemoryOwned=TRUE;
+ if(trie->memory!=nullptr) {
+ trie->isMemoryOwned=true;
uprv_memcpy(trie->memory, other->memory, other->length);
/* make the clone's pointers point to its own memory */
trie->index=(uint16_t *)trie->memory+(other->index-(uint16_t *)other->memory);
- if(other->data16!=NULL) {
+ if(other->data16!=nullptr) {
trie->data16=(uint16_t *)trie->memory+(other->data16-(uint16_t *)other->memory);
}
- if(other->data32!=NULL) {
+ if(other->data32!=nullptr) {
trie->data32=(uint32_t *)trie->memory+(other->data32-(uint32_t *)other->memory);
}
}
- } else /* other->newTrie!=NULL */ {
+ } else /* other->newTrie!=nullptr */ {
trie->newTrie=cloneBuilder(other->newTrie);
}
- if(trie->memory==NULL && trie->newTrie==NULL) {
+ if(trie->memory==nullptr && trie->newTrie==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
uprv_free(trie);
- trie=NULL;
+ trie=nullptr;
}
return trie;
}
@@ -357,11 +357,11 @@ copyEnumRange(const void *context, UChar32 start, UChar32 end, uint32_t value) {
if(start==end) {
utrie2_set32(nt->trie, start, value, &nt->errorCode);
} else {
- utrie2_setRange32(nt->trie, start, end, value, TRUE, &nt->errorCode);
+ utrie2_setRange32(nt->trie, start, end, value, true, &nt->errorCode);
}
return U_SUCCESS(nt->errorCode);
} else {
- return TRUE;
+ return true;
}
}
@@ -386,7 +386,7 @@ static void
utrie_printLengths(const UTrie *trie) {
long indexLength=trie->indexLength;
long dataLength=(long)trie->dataLength;
- long totalLength=(long)sizeof(UTrieHeader)+indexLength*2+dataLength*(trie->data32!=NULL ? 4 : 2);
+ long totalLength=(long)sizeof(UTrieHeader)+indexLength*2+dataLength*(trie->data32!=nullptr ? 4 : 2);
printf("**UTrieLengths** index:%6ld data:%6ld serialized:%6ld\n",
indexLength, dataLength, totalLength);
}
@@ -395,7 +395,7 @@ static void
utrie2_printLengths(const UTrie2 *trie, const char *which) {
long indexLength=trie->indexLength;
long dataLength=(long)trie->dataLength;
- long totalLength=(long)sizeof(UTrie2Header)+indexLength*2+dataLength*(trie->data32!=NULL ? 4 : 2);
+ long totalLength=(long)sizeof(UTrie2Header)+indexLength*2+dataLength*(trie->data32!=nullptr ? 4 : 2);
printf("**UTrie2Lengths(%s %s)** index:%6ld data:%6ld countInitial:%6ld serialized:%6ld\n",
which, trie->name, indexLength, dataLength, countInitial(trie), totalLength);
}
@@ -404,31 +404,31 @@ utrie2_printLengths(const UTrie2 *trie, const char *which) {
U_CAPI UTrie2 * U_EXPORT2
utrie2_cloneAsThawed(const UTrie2 *other, UErrorCode *pErrorCode) {
NewTrieAndStatus context;
- UChar lead;
+ char16_t lead;
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if(other==NULL || (other->memory==NULL && other->newTrie==NULL)) {
+ if(other==nullptr || (other->memory==nullptr && other->newTrie==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(other->newTrie!=NULL && !other->newTrie->isCompacted) {
+ if(other->newTrie!=nullptr && !other->newTrie->isCompacted) {
return utrie2_clone(other, pErrorCode); /* clone an unfrozen trie */
}
/* Clone the frozen trie by enumerating it and building a new one. */
context.trie=utrie2_open(other->initialValue, other->errorValue, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- context.exclusiveLimit=FALSE;
+ context.exclusiveLimit=false;
context.errorCode=*pErrorCode;
- utrie2_enum(other, NULL, copyEnumRange, &context);
+ utrie2_enum(other, nullptr, copyEnumRange, &context);
*pErrorCode=context.errorCode;
for(lead=0xd800; lead<0xdc00; ++lead) {
uint32_t value;
- if(other->data32==NULL) {
+ if(other->data32==nullptr) {
value=UTRIE2_GET16_FROM_U16_SINGLE_LEAD(other, lead);
} else {
value=UTRIE2_GET32_FROM_U16_SINGLE_LEAD(other, lead);
@@ -439,7 +439,7 @@ utrie2_cloneAsThawed(const UTrie2 *other, UErrorCode *pErrorCode) {
}
if(U_FAILURE(*pErrorCode)) {
utrie2_close(context.trie);
- context.trie=NULL;
+ context.trie=nullptr;
}
return context.trie;
}
@@ -448,26 +448,26 @@ utrie2_cloneAsThawed(const UTrie2 *other, UErrorCode *pErrorCode) {
U_CAPI UTrie2 * U_EXPORT2
utrie2_fromUTrie(const UTrie *trie1, uint32_t errorValue, UErrorCode *pErrorCode) {
NewTrieAndStatus context;
- UChar lead;
+ char16_t lead;
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- if(trie1==NULL) {
+ if(trie1==nullptr) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
context.trie=utrie2_open(trie1->initialValue, errorValue, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
- context.exclusiveLimit=TRUE;
+ context.exclusiveLimit=true;
context.errorCode=*pErrorCode;
- utrie_enum(trie1, NULL, copyEnumRange, &context);
+ utrie_enum(trie1, nullptr, copyEnumRange, &context);
*pErrorCode=context.errorCode;
for(lead=0xd800; lead<0xdc00; ++lead) {
uint32_t value;
- if(trie1->data32==NULL) {
+ if(trie1->data32==nullptr) {
value=UTRIE_GET16_FROM_LEAD(trie1, lead);
} else {
value=UTRIE_GET32_FROM_LEAD(trie1, lead);
@@ -478,7 +478,7 @@ utrie2_fromUTrie(const UTrie *trie1, uint32_t errorValue, UErrorCode *pErrorCode
}
if(U_SUCCESS(*pErrorCode)) {
utrie2_freeze(context.trie,
- trie1->data32!=NULL ? UTRIE2_32_VALUE_BITS : UTRIE2_16_VALUE_BITS,
+ trie1->data32!=nullptr ? UTRIE2_32_VALUE_BITS : UTRIE2_16_VALUE_BITS,
pErrorCode);
}
#ifdef UTRIE2_DEBUG
@@ -489,7 +489,7 @@ utrie2_fromUTrie(const UTrie *trie1, uint32_t errorValue, UErrorCode *pErrorCode
#endif
if(U_FAILURE(*pErrorCode)) {
utrie2_close(context.trie);
- context.trie=NULL;
+ context.trie=nullptr;
}
return context.trie;
}
@@ -578,7 +578,7 @@ allocDataBlock(UNewTrie2 *trie, int32_t copyBlock) {
return -1;
}
data=(uint32_t *)uprv_malloc(capacity*4);
- if(data==NULL) {
+ if(data==nullptr) {
return -1;
}
uprv_memcpy(data, trie->data, (size_t)trie->dataLength*4);
@@ -649,7 +649,7 @@ getDataBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) {
}
/**
- * @return TRUE if the value was successfully set
+ * @return true if the value was successfully set
*/
static void
set32(UNewTrie2 *trie,
@@ -657,7 +657,7 @@ set32(UNewTrie2 *trie,
UErrorCode *pErrorCode) {
int32_t block;
- if(trie==NULL || trie->isCompacted) {
+ if(trie==nullptr || trie->isCompacted) {
*pErrorCode=U_NO_WRITE_PERMISSION;
return;
}
@@ -683,7 +683,7 @@ utrie2_set32(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- set32(trie->newTrie, c, TRUE, value, pErrorCode);
+ set32(trie->newTrie, c, true, value, pErrorCode);
}
U_CAPI void U_EXPORT2
@@ -697,7 +697,7 @@ utrie2_set32ForLeadSurrogateCodeUnit(UTrie2 *trie,
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- set32(trie->newTrie, c, FALSE, value, pErrorCode);
+ set32(trie->newTrie, c, false, value, pErrorCode);
}
static void
@@ -709,7 +709,7 @@ writeBlock(uint32_t *block, uint32_t value) {
}
/**
- * initialValue is ignored if overwrite=TRUE
+ * initialValue is ignored if overwrite=true
* @internal
*/
static void
@@ -755,7 +755,7 @@ utrie2_setRange32(UTrie2 *trie,
return;
}
newTrie=trie->newTrie;
- if(newTrie==NULL || newTrie->isCompacted) {
+ if(newTrie==nullptr || newTrie->isCompacted) {
*pErrorCode=U_NO_WRITE_PERMISSION;
return;
}
@@ -771,7 +771,7 @@ utrie2_setRange32(UTrie2 *trie,
UChar32 nextStart;
/* set partial block at [start..following block boundary[ */
- block=getDataBlock(newTrie, start, TRUE);
+ block=getDataBlock(newTrie, start, true);
if(block<0) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
@@ -804,15 +804,15 @@ utrie2_setRange32(UTrie2 *trie,
while(start<limit) {
int32_t i2;
- UBool setRepeatBlock=FALSE;
+ UBool setRepeatBlock=false;
- if(value==newTrie->initialValue && isInNullBlock(newTrie, start, TRUE)) {
+ if(value==newTrie->initialValue && isInNullBlock(newTrie, start, true)) {
start+=UTRIE2_DATA_BLOCK_LENGTH; /* nothing to do */
continue;
}
/* get index value */
- i2=getIndex2Block(newTrie, start, TRUE);
+ i2=getIndex2Block(newTrie, start, true);
if(i2<0) {
*pErrorCode=U_INTERNAL_PROGRAM_ERROR;
return;
@@ -827,7 +827,7 @@ utrie2_setRange32(UTrie2 *trie,
* protected (ASCII-linear or 2-byte UTF-8) block:
* replace with the repeatBlock.
*/
- setRepeatBlock=TRUE;
+ setRepeatBlock=true;
} else {
/* !overwrite, or protected block: just write the values into this block */
fillBlock(newTrie->data+block,
@@ -851,14 +851,14 @@ utrie2_setRange32(UTrie2 *trie,
* and if we overwrite any data or if the data is all initial values
* (which is the same as the block being the null block, see above).
*/
- setRepeatBlock=TRUE;
+ setRepeatBlock=true;
}
if(setRepeatBlock) {
if(repeatBlock>=0) {
setIndex2Entry(newTrie, i2, repeatBlock);
} else {
/* create and set and fill the repeatBlock */
- repeatBlock=getDataBlock(newTrie, start, TRUE);
+ repeatBlock=getDataBlock(newTrie, start, true);
if(repeatBlock<0) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
@@ -872,7 +872,7 @@ utrie2_setRange32(UTrie2 *trie,
if(rest>0) {
/* set partial block at [last block boundary..limit[ */
- block=getDataBlock(newTrie, start, TRUE);
+ block=getDataBlock(newTrie, start, true);
if(block<0) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
@@ -1019,7 +1019,7 @@ findHighStart(UNewTrie2 *trie, uint32_t highValue) {
*
* The compaction
* - removes blocks that are identical with earlier ones
- * - overlaps adjacent blocks as much as possible (if overlap==TRUE)
+ * - overlaps adjacent blocks as much as possible (if overlap==true)
* - moves blocks in steps of the data granularity
* - moves and overlaps blocks that overlap with multiple values in the overlap region
*
@@ -1255,7 +1255,7 @@ compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) {
if(highStart<0x110000) {
/* Blank out [highStart..10ffff] to release associated data blocks. */
suppHighStart= highStart<=0x10000 ? 0x10000 : highStart;
- utrie2_setRange32(trie, suppHighStart, 0x10ffff, trie->initialValue, TRUE, pErrorCode);
+ utrie2_setRange32(trie, suppHighStart, 0x10ffff, trie->initialValue, true, pErrorCode);
if(U_FAILURE(*pErrorCode)) {
return;
}
@@ -1281,7 +1281,7 @@ compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) {
newTrie->data[newTrie->dataLength++]=trie->initialValue;
}
- newTrie->isCompacted=TRUE;
+ newTrie->isCompacted=true;
}
/* serialization ------------------------------------------------------------ */
@@ -1317,17 +1317,17 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return;
}
- if( trie==NULL ||
+ if( trie==nullptr ||
valueBits<0 || UTRIE2_COUNT_VALUE_BITS<=valueBits
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
newTrie=trie->newTrie;
- if(newTrie==NULL) {
+ if(newTrie==nullptr) {
/* already frozen */
UTrie2ValueBits frozenValueBits=
- trie->data16!=NULL ? UTRIE2_16_VALUE_BITS : UTRIE2_32_VALUE_BITS;
+ trie->data16!=nullptr ? UTRIE2_16_VALUE_BITS : UTRIE2_32_VALUE_BITS;
if(valueBits!=frozenValueBits) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -1377,12 +1377,12 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) {
}
trie->memory=uprv_malloc(length);
- if(trie->memory==NULL) {
+ if(trie->memory==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
return;
}
trie->length=length;
- trie->isMemoryOwned=TRUE;
+ trie->isMemoryOwned=true;
trie->indexLength=allIndexesLength;
trie->dataLength=newTrie->dataLength;
@@ -1449,7 +1449,7 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) {
case UTRIE2_16_VALUE_BITS:
/* write 16-bit data values */
trie->data16=dest16;
- trie->data32=NULL;
+ trie->data32=nullptr;
p=newTrie->data;
for(i=newTrie->dataLength; i>0; --i) {
*dest16++=(uint16_t)*p++;
@@ -1457,7 +1457,7 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) {
break;
case UTRIE2_32_VALUE_BITS:
/* write 32-bit data values */
- trie->data16=NULL;
+ trie->data16=nullptr;
trie->data32=(uint32_t *)dest16;
uprv_memcpy(dest16, newTrie->data, (size_t)newTrie->dataLength*4);
break;
@@ -1479,5 +1479,5 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) {
/* Delete the UNewTrie2. */
uprv_free(newTrie->data);
uprv_free(newTrie);
- trie->newTrie=NULL;
+ trie->newTrie=nullptr;
}
diff --git a/contrib/libs/icu/common/utrie_swap.cpp b/contrib/libs/icu/common/utrie_swap.cpp
index 6e8b1383945..83d183699d1 100644
--- a/contrib/libs/icu/common/utrie_swap.cpp
+++ b/contrib/libs/icu/common/utrie_swap.cpp
@@ -31,10 +31,10 @@ utrie_swap(const UDataSwapper *ds,
int32_t size;
UBool dataIs32;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || (length>=0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || (length>=0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -105,7 +105,7 @@ utrie2_swap(const UDataSwapper *ds,
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(ds==NULL || inData==NULL || (length>=0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || (length>=0 && outData==nullptr)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -294,8 +294,8 @@ namespace {
* @param data a pointer to 32-bit-aligned memory containing the serialized form of a trie
* @param length the number of bytes available at data;
* can be more than necessary (see return value)
- * @param anyEndianOk If FALSE, only platform-endian serialized forms are recognized.
- * If TRUE, opposite-endian serialized forms are recognized as well.
+ * @param anyEndianOk If false, only platform-endian serialized forms are recognized.
+ * If true, opposite-endian serialized forms are recognized as well.
* @return the trie version of the serialized form, or 0 if it is not
* recognized as a serialized trie
*/
@@ -334,7 +334,7 @@ utrie_swapAnyVersion(const UDataSwapper *ds,
const void *inData, int32_t length, void *outData,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) { return 0; }
- switch(getVersion(inData, length, TRUE)) {
+ switch(getVersion(inData, length, true)) {
case 1:
return utrie_swap(ds, inData, length, outData, pErrorCode);
case 2:
diff --git a/contrib/libs/icu/common/uts46.cpp b/contrib/libs/icu/common/uts46.cpp
index 6f930703390..fce2af41306 100644
--- a/contrib/libs/icu/common/uts46.cpp
+++ b/contrib/libs/icu/common/uts46.cpp
@@ -49,18 +49,18 @@ const uint32_t severeErrors=
static inline UBool
isASCIIString(const UnicodeString &dest) {
- const UChar *s=dest.getBuffer();
- const UChar *limit=s+dest.length();
+ const char16_t *s=dest.getBuffer();
+ const char16_t *limit=s+dest.length();
while(s<limit) {
if(*s++>0x7f) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static UBool
-isASCIIOkBiDi(const UChar *s, int32_t length);
+isASCIIOkBiDi(const char16_t *s, int32_t length);
static UBool
isASCIIOkBiDi(const char *s, int32_t length);
@@ -185,13 +185,13 @@ private:
UBool toASCII, IDNAInfo &info, UErrorCode &errorCode) const;
void
- checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) const;
+ checkLabelBiDi(const char16_t *label, int32_t labelLength, IDNAInfo &info) const;
UBool
- isLabelOkContextJ(const UChar *label, int32_t labelLength) const;
+ isLabelOkContextJ(const char16_t *label, int32_t labelLength) const;
void
- checkLabelContextO(const UChar *label, int32_t labelLength, IDNAInfo &info) const;
+ checkLabelContextO(const char16_t *label, int32_t labelLength, IDNAInfo &info) const;
const Normalizer2 &uts46Norm2; // uts46.nrm
uint32_t options;
@@ -201,22 +201,22 @@ IDNA *
IDNA::createUTS46Instance(uint32_t options, UErrorCode &errorCode) {
if(U_SUCCESS(errorCode)) {
IDNA *idna=new UTS46(options, errorCode);
- if(idna==NULL) {
+ if(idna==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
} else if(U_FAILURE(errorCode)) {
delete idna;
- idna=NULL;
+ idna=nullptr;
}
return idna;
} else {
- return NULL;
+ return nullptr;
}
}
// UTS46 implementation ---------------------------------------------------- ***
UTS46::UTS46(uint32_t opt, UErrorCode &errorCode)
- : uts46Norm2(*Normalizer2::getInstance(NULL, "uts46", UNORM2_COMPOSE, errorCode)),
+ : uts46Norm2(*Normalizer2::getInstance(nullptr, "uts46", UNORM2_COMPOSE, errorCode)),
options(opt) {}
UTS46::~UTS46() {}
@@ -224,19 +224,19 @@ UTS46::~UTS46() {}
UnicodeString &
UTS46::labelToASCII(const UnicodeString &label, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- return process(label, TRUE, TRUE, dest, info, errorCode);
+ return process(label, true, true, dest, info, errorCode);
}
UnicodeString &
UTS46::labelToUnicode(const UnicodeString &label, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- return process(label, TRUE, FALSE, dest, info, errorCode);
+ return process(label, true, false, dest, info, errorCode);
}
UnicodeString &
UTS46::nameToASCII(const UnicodeString &name, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- process(name, FALSE, TRUE, dest, info, errorCode);
+ process(name, false, true, dest, info, errorCode);
if( dest.length()>=254 && (info.errors&UIDNA_ERROR_DOMAIN_NAME_TOO_LONG)==0 &&
isASCIIString(dest) &&
(dest.length()>254 || dest[253]!=0x2e)
@@ -249,31 +249,31 @@ UTS46::nameToASCII(const UnicodeString &name, UnicodeString &dest,
UnicodeString &
UTS46::nameToUnicode(const UnicodeString &name, UnicodeString &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- return process(name, FALSE, FALSE, dest, info, errorCode);
+ return process(name, false, false, dest, info, errorCode);
}
void
UTS46::labelToASCII_UTF8(StringPiece label, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- processUTF8(label, TRUE, TRUE, dest, info, errorCode);
+ processUTF8(label, true, true, dest, info, errorCode);
}
void
UTS46::labelToUnicodeUTF8(StringPiece label, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- processUTF8(label, TRUE, FALSE, dest, info, errorCode);
+ processUTF8(label, true, false, dest, info, errorCode);
}
void
UTS46::nameToASCII_UTF8(StringPiece name, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- processUTF8(name, FALSE, TRUE, dest, info, errorCode);
+ processUTF8(name, false, true, dest, info, errorCode);
}
void
UTS46::nameToUnicodeUTF8(StringPiece name, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const {
- processUTF8(name, FALSE, FALSE, dest, info, errorCode);
+ processUTF8(name, false, false, dest, info, errorCode);
}
// UTS #46 data for ASCII characters.
@@ -310,8 +310,8 @@ UTS46::process(const UnicodeString &src,
dest.setToBogus();
return dest;
}
- const UChar *srcArray=src.getBuffer();
- if(&dest==&src || srcArray==NULL) {
+ const char16_t *srcArray=src.getBuffer();
+ if(&dest==&src || srcArray==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
dest.setToBogus();
return dest;
@@ -324,8 +324,8 @@ UTS46::process(const UnicodeString &src,
info.errors|=UIDNA_ERROR_EMPTY_LABEL;
return dest;
}
- UChar *destArray=dest.getBuffer(srcLength);
- if(destArray==NULL) {
+ char16_t *destArray=dest.getBuffer(srcLength);
+ if(destArray==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return dest;
}
@@ -348,7 +348,7 @@ UTS46::process(const UnicodeString &src,
dest.releaseBuffer(i);
return dest;
}
- UChar c=srcArray[i];
+ char16_t c=srcArray[i];
if(c>0x7f) {
break;
}
@@ -412,7 +412,7 @@ UTS46::processUTF8(StringPiece src,
}
const char *srcArray=src.data();
int32_t srcLength=src.length();
- if(srcArray==NULL && srcLength!=0) {
+ if(srcArray==nullptr && srcLength!=0) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -540,11 +540,11 @@ UTS46::processUnicode(const UnicodeString &src,
UBool doMapDevChars=
toASCII ? (options&UIDNA_NONTRANSITIONAL_TO_ASCII)==0 :
(options&UIDNA_NONTRANSITIONAL_TO_UNICODE)==0;
- const UChar *destArray=dest.getBuffer();
+ const char16_t *destArray=dest.getBuffer();
int32_t destLength=dest.length();
int32_t labelLimit=labelStart;
while(labelLimit<destLength) {
- UChar c=destArray[labelLimit];
+ char16_t c=destArray[labelLimit];
if(c==0x2e && !isLabel) {
int32_t labelLength=labelLimit-labelStart;
int32_t newLength=processLabel(dest, labelStart, labelLength,
@@ -561,7 +561,7 @@ UTS46::processUnicode(const UnicodeString &src,
} else if(c<0xdf) {
// pass
} else if(c<=0x200d && (c==0xdf || c==0x3c2 || c>=0x200c)) {
- info.isTransDiff=TRUE;
+ info.isTransDiff=true;
if(doMapDevChars) {
destLength=mapDevChars(dest, labelStart, labelLimit, errorCode);
if(U_FAILURE(errorCode)) {
@@ -569,7 +569,7 @@ UTS46::processUnicode(const UnicodeString &src,
}
destArray=dest.getBuffer();
// All deviation characters have been mapped, no need to check for them again.
- doMapDevChars=FALSE;
+ doMapDevChars=false;
// Do not increment labelLimit in case c was removed.
continue;
}
@@ -604,27 +604,27 @@ UTS46::mapDevChars(UnicodeString &dest, int32_t labelStart, int32_t mappingStart
return 0;
}
int32_t length=dest.length();
- UChar *s=dest.getBuffer(dest[mappingStart]==0xdf ? length+1 : length);
- if(s==NULL) {
+ char16_t *s=dest.getBuffer(dest[mappingStart]==0xdf ? length+1 : length);
+ if(s==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return length;
}
int32_t capacity=dest.getCapacity();
- UBool didMapDevChars=FALSE;
+ UBool didMapDevChars=false;
int32_t readIndex=mappingStart, writeIndex=mappingStart;
do {
- UChar c=s[readIndex++];
+ char16_t c=s[readIndex++];
switch(c) {
case 0xdf:
// Map sharp s to ss.
- didMapDevChars=TRUE;
+ didMapDevChars=true;
s[writeIndex++]=0x73; // Replace sharp s with first s.
// Insert second s and account for possible buffer reallocation.
if(writeIndex==readIndex) {
if(length==capacity) {
dest.releaseBuffer(length);
s=dest.getBuffer(length+1);
- if(s==NULL) {
+ if(s==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return length;
}
@@ -637,12 +637,12 @@ UTS46::mapDevChars(UnicodeString &dest, int32_t labelStart, int32_t mappingStart
++length;
break;
case 0x3c2: // Map final sigma to nonfinal sigma.
- didMapDevChars=TRUE;
+ didMapDevChars=true;
s[writeIndex++]=0x3c3;
break;
case 0x200c: // Ignore/remove ZWNJ.
case 0x200d: // Ignore/remove ZWJ.
- didMapDevChars=TRUE;
+ didMapDevChars=true;
--length;
break;
default:
@@ -708,7 +708,7 @@ UTS46::processLabel(UnicodeString &dest,
}
UnicodeString fromPunycode;
UnicodeString *labelString;
- const UChar *label=dest.getBuffer()+labelStart;
+ const char16_t *label=dest.getBuffer()+labelStart;
int32_t destLabelStart=labelStart;
int32_t destLabelLength=labelLength;
UBool wasPunycode;
@@ -724,9 +724,9 @@ UTS46::processLabel(UnicodeString &dest,
info.labelErrors|=UIDNA_ERROR_INVALID_ACE_LABEL;
return markBadACELabel(dest, labelStart, labelLength, toASCII, info, errorCode);
}
- wasPunycode=TRUE;
- UChar *unicodeBuffer=fromPunycode.getBuffer(-1); // capacity==-1: most labels should fit
- if(unicodeBuffer==NULL) {
+ wasPunycode=true;
+ char16_t *unicodeBuffer=fromPunycode.getBuffer(-1); // capacity==-1: most labels should fit
+ if(unicodeBuffer==nullptr) {
// Should never occur if we used capacity==-1 which uses the internal buffer.
errorCode=U_MEMORY_ALLOCATION_ERROR;
return labelLength;
@@ -734,18 +734,18 @@ UTS46::processLabel(UnicodeString &dest,
UErrorCode punycodeErrorCode=U_ZERO_ERROR;
int32_t unicodeLength=u_strFromPunycode(label+4, labelLength-4,
unicodeBuffer, fromPunycode.getCapacity(),
- NULL, &punycodeErrorCode);
+ nullptr, &punycodeErrorCode);
if(punycodeErrorCode==U_BUFFER_OVERFLOW_ERROR) {
fromPunycode.releaseBuffer(0);
unicodeBuffer=fromPunycode.getBuffer(unicodeLength);
- if(unicodeBuffer==NULL) {
+ if(unicodeBuffer==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return labelLength;
}
punycodeErrorCode=U_ZERO_ERROR;
unicodeLength=u_strFromPunycode(label+4, labelLength-4,
unicodeBuffer, fromPunycode.getCapacity(),
- NULL, &punycodeErrorCode);
+ nullptr, &punycodeErrorCode);
}
fromPunycode.releaseBuffer(unicodeLength);
if(U_FAILURE(punycodeErrorCode)) {
@@ -772,7 +772,7 @@ UTS46::processLabel(UnicodeString &dest,
labelStart=0;
labelLength=fromPunycode.length();
} else {
- wasPunycode=FALSE;
+ wasPunycode=false;
labelString=&dest;
}
// Validity check
@@ -803,13 +803,13 @@ UTS46::processLabel(UnicodeString &dest,
// in a non-Punycode label or U+FFFD itself in a Punycode label.
// We also check for dots which can come from the input to a single-label function.
// Ok to cast away const because we own the UnicodeString.
- UChar *s=(UChar *)label;
- const UChar *limit=label+labelLength;
- UChar oredChars=0;
+ char16_t *s=(char16_t *)label;
+ const char16_t *limit=label+labelLength;
+ char16_t oredChars=0;
// If we enforce STD3 rules, then ASCII characters other than LDH and dot are disallowed.
UBool disallowNonLDHDot=(options&UIDNA_USE_STD3_RULES)!=0;
do {
- UChar c=*s;
+ char16_t c=*s;
if(c<=0x7f) {
if(c==0x2e) {
info.labelErrors|=UIDNA_ERROR_LABEL_HAS_DOT;
@@ -837,7 +837,7 @@ UTS46::processLabel(UnicodeString &dest,
U16_NEXT_UNSAFE(label, cpLength, c);
if((U_GET_GC_MASK(c)&U_GC_M_MASK)!=0) {
info.labelErrors|=UIDNA_ERROR_LEADING_COMBINING_MARK;
- labelString->replace(labelStart, cpLength, (UChar)0xfffd);
+ labelString->replace(labelStart, cpLength, (char16_t)0xfffd);
label=labelString->getBuffer()+labelStart;
labelLength+=1-cpLength;
if(labelString==&dest) {
@@ -868,8 +868,8 @@ UTS46::processLabel(UnicodeString &dest,
} else if(oredChars>=0x80) {
// Contains non-ASCII characters.
UnicodeString punycode;
- UChar *buffer=punycode.getBuffer(63); // 63==maximum DNS label length
- if(buffer==NULL) {
+ char16_t *buffer=punycode.getBuffer(63); // 63==maximum DNS label length
+ if(buffer==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return destLabelLength;
}
@@ -879,18 +879,18 @@ UTS46::processLabel(UnicodeString &dest,
buffer[3]=0x2d;
int32_t punycodeLength=u_strToPunycode(label, labelLength,
buffer+4, punycode.getCapacity()-4,
- NULL, &errorCode);
+ nullptr, &errorCode);
if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
errorCode=U_ZERO_ERROR;
punycode.releaseBuffer(4);
buffer=punycode.getBuffer(4+punycodeLength);
- if(buffer==NULL) {
+ if(buffer==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return destLabelLength;
}
punycodeLength=u_strToPunycode(label, labelLength,
buffer+4, punycode.getCapacity()-4,
- NULL, &errorCode);
+ nullptr, &errorCode);
}
punycodeLength+=4;
punycode.releaseBuffer(punycodeLength);
@@ -932,32 +932,32 @@ UTS46::markBadACELabel(UnicodeString &dest,
return 0;
}
UBool disallowNonLDHDot=(options&UIDNA_USE_STD3_RULES)!=0;
- UBool isASCII=TRUE;
- UBool onlyLDH=TRUE;
- const UChar *label=dest.getBuffer()+labelStart;
- const UChar *limit=label+labelLength;
+ UBool isASCII=true;
+ UBool onlyLDH=true;
+ const char16_t *label=dest.getBuffer()+labelStart;
+ const char16_t *limit=label+labelLength;
// Start after the initial "xn--".
// Ok to cast away const because we own the UnicodeString.
- for(UChar *s=const_cast<UChar *>(label+4); s<limit; ++s) {
- UChar c=*s;
+ for(char16_t *s=const_cast<char16_t *>(label+4); s<limit; ++s) {
+ char16_t c=*s;
if(c<=0x7f) {
if(c==0x2e) {
info.labelErrors|=UIDNA_ERROR_LABEL_HAS_DOT;
*s=0xfffd;
- isASCII=onlyLDH=FALSE;
+ isASCII=onlyLDH=false;
} else if(asciiData[c]<0) {
- onlyLDH=FALSE;
+ onlyLDH=false;
if(disallowNonLDHDot) {
*s=0xfffd;
- isASCII=FALSE;
+ isASCII=false;
}
}
} else {
- isASCII=onlyLDH=FALSE;
+ isASCII=onlyLDH=false;
}
}
if(onlyLDH) {
- dest.insert(labelStart+labelLength, (UChar)0xfffd);
+ dest.insert(labelStart+labelLength, (char16_t)0xfffd);
if(dest.isBogus()) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
return 0;
@@ -997,7 +997,7 @@ const uint32_t R_AL_AN_EN_ES_CS_ET_ON_BN_NSM_MASK=R_AL_MASK|EN_AN_MASK|ES_CS_ET_
// that a domain name is a BiDi domain name (has an RTL label) only after
// processing several earlier labels.
void
-UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) const {
+UTS46::checkLabelBiDi(const char16_t *label, int32_t labelLength, IDNAInfo &info) const {
// IDNA2008 BiDi rule
// Get the directionality of the first character.
UChar32 c;
@@ -1008,7 +1008,7 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c
// or AL. If it has the R or AL property, it is an RTL label; if it
// has the L property, it is an LTR label.
if((firstMask&~L_R_AL_MASK)!=0) {
- info.isOkBiDi=FALSE;
+ info.isOkBiDi=false;
}
// Get the directionality of the last non-NSM character.
uint32_t lastMask;
@@ -1034,7 +1034,7 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c
(lastMask&~L_EN_MASK)!=0 :
(lastMask&~R_AL_EN_AN_MASK)!=0
) {
- info.isOkBiDi=FALSE;
+ info.isOkBiDi=false;
}
// Add the directionalities of the intervening characters.
uint32_t mask=firstMask|lastMask;
@@ -1046,18 +1046,18 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c
// 5. In an LTR label, only characters with the BIDI properties L, EN,
// ES, CS, ET, ON, BN and NSM are allowed.
if((mask&~L_EN_ES_CS_ET_ON_BN_NSM_MASK)!=0) {
- info.isOkBiDi=FALSE;
+ info.isOkBiDi=false;
}
} else {
// 2. In an RTL label, only characters with the BIDI properties R, AL,
// AN, EN, ES, CS, ET, ON, BN and NSM are allowed.
if((mask&~R_AL_AN_EN_ES_CS_ET_ON_BN_NSM_MASK)!=0) {
- info.isOkBiDi=FALSE;
+ info.isOkBiDi=false;
}
// 4. In an RTL label, if an EN is present, no AN may be present, and
// vice versa.
if((mask&EN_AN_MASK)==EN_AN_MASK) {
- info.isOkBiDi=FALSE;
+ info.isOkBiDi=false;
}
}
// An RTL label is a label that contains at least one character of type
@@ -1067,7 +1067,7 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c
// The following rule, consisting of six conditions, applies to labels
// in BIDI domain names.
if((mask&R_AL_AN_MASK)!=0) {
- info.isBiDi=TRUE;
+ info.isBiDi=true;
}
}
@@ -1085,32 +1085,32 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c
// Cannot contain uppercase A-Z.
// s[length-1] must be the trailing dot.
static UBool
-isASCIIOkBiDi(const UChar *s, int32_t length) {
+isASCIIOkBiDi(const char16_t *s, int32_t length) {
int32_t labelStart=0;
for(int32_t i=0; i<length; ++i) {
- UChar c=s[i];
+ char16_t c=s[i];
if(c==0x2e) { // dot
if(i>labelStart) {
c=s[i-1];
if(!(0x61<=c && c<=0x7a) && !(0x30<=c && c<=0x39)) {
// Last character in the label is not an L or EN.
- return FALSE;
+ return false;
}
}
labelStart=i+1;
} else if(i==labelStart) {
if(!(0x61<=c && c<=0x7a)) {
// First character in the label is not an L.
- return FALSE;
+ return false;
}
} else {
if(c<=0x20 && (c>=0x1c || (9<=c && c<=0xd))) {
// Intermediate character in the label is a B, S or WS.
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
// UTF-8 version, called for source ASCII prefix.
@@ -1126,27 +1126,27 @@ isASCIIOkBiDi(const char *s, int32_t length) {
c=s[i-1];
if(!(0x61<=c && c<=0x7a) && !(0x41<=c && c<=0x5a) && !(0x30<=c && c<=0x39)) {
// Last character in the label is not an L or EN.
- return FALSE;
+ return false;
}
}
labelStart=i+1;
} else if(i==labelStart) {
if(!(0x61<=c && c<=0x7a) && !(0x41<=c && c<=0x5a)) {
// First character in the label is not an L.
- return FALSE;
+ return false;
}
} else {
if(c<=0x20 && (c>=0x1c || (9<=c && c<=0xd))) {
// Intermediate character in the label is a B, S or WS.
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
UBool
-UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
+UTS46::isLabelOkContextJ(const char16_t *label, int32_t labelLength) const {
// [IDNA2008-Tables]
// 200C..200D ; CONTEXTJ # ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
for(int32_t i=0; i<labelLength; ++i) {
@@ -1158,7 +1158,7 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
// If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C
// (Joining_Type:T)*(Joining_Type:{R,D})) Then True;
if(i==0) {
- return FALSE;
+ return false;
}
UChar32 c;
int32_t j=i;
@@ -1171,19 +1171,19 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
UJoiningType type=ubidi_getJoiningType(c);
if(type==U_JT_TRANSPARENT) {
if(j==0) {
- return FALSE;
+ return false;
}
U16_PREV_UNSAFE(label, j, c);
} else if(type==U_JT_LEFT_JOINING || type==U_JT_DUAL_JOINING) {
break; // precontext fulfilled
} else {
- return FALSE;
+ return false;
}
}
// check postcontext (Joining_Type:T)*(Joining_Type:{R,D})
for(j=i+1;;) {
if(j==labelLength) {
- return FALSE;
+ return false;
}
U16_NEXT_UNSAFE(label, j, c);
UJoiningType type=ubidi_getJoiningType(c);
@@ -1192,7 +1192,7 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
} else if(type==U_JT_RIGHT_JOINING || type==U_JT_DUAL_JOINING) {
break; // postcontext fulfilled
} else {
- return FALSE;
+ return false;
}
}
} else if(label[i]==0x200d) {
@@ -1201,21 +1201,21 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
// False;
// If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True;
if(i==0) {
- return FALSE;
+ return false;
}
UChar32 c;
int32_t j=i;
U16_PREV_UNSAFE(label, j, c);
if(uts46Norm2.getCombiningClass(c)!=9) {
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
void
-UTS46::checkLabelContextO(const UChar *label, int32_t labelLength, IDNAInfo &info) const {
+UTS46::checkLabelContextO(const char16_t *label, int32_t labelLength, IDNAInfo &info) const {
int32_t labelEnd=labelLength-1; // inclusive
int32_t arabicDigits=0; // -1 for 066x, +1 for 06Fx
for(int32_t i=0; i<=labelEnd; ++i) {
@@ -1338,23 +1338,23 @@ checkArgs(const void *label, int32_t length,
void *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
- return FALSE;
+ return false;
}
// sizeof(UIDNAInfo)=16 in the first API version.
- if(pInfo==NULL || pInfo->size<16) {
+ if(pInfo==nullptr || pInfo->size<16) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
- if( (label==NULL ? length!=0 : length<-1) ||
- (dest==NULL ? capacity!=0 : capacity<0) ||
- (dest==label && label!=NULL)
+ if( (label==nullptr ? length!=0 : length<-1) ||
+ (dest==nullptr ? capacity!=0 : capacity<0) ||
+ (dest==label && label!=nullptr)
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
// Set all *pInfo bytes to 0 except for the size field itself.
uprv_memset(&pInfo->size+1, 0, pInfo->size-sizeof(pInfo->size));
- return TRUE;
+ return true;
}
static void
@@ -1365,8 +1365,8 @@ idnaInfoToStruct(IDNAInfo &info, UIDNAInfo *pInfo) {
U_CAPI int32_t U_EXPORT2
uidna_labelToASCII(const UIDNA *idna,
- const UChar *label, int32_t length,
- UChar *dest, int32_t capacity,
+ const char16_t *label, int32_t length,
+ char16_t *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode) {
if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
return 0;
@@ -1381,8 +1381,8 @@ uidna_labelToASCII(const UIDNA *idna,
U_CAPI int32_t U_EXPORT2
uidna_labelToUnicode(const UIDNA *idna,
- const UChar *label, int32_t length,
- UChar *dest, int32_t capacity,
+ const char16_t *label, int32_t length,
+ char16_t *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode) {
if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
return 0;
@@ -1397,8 +1397,8 @@ uidna_labelToUnicode(const UIDNA *idna,
U_CAPI int32_t U_EXPORT2
uidna_nameToASCII(const UIDNA *idna,
- const UChar *name, int32_t length,
- UChar *dest, int32_t capacity,
+ const char16_t *name, int32_t length,
+ char16_t *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode) {
if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) {
return 0;
@@ -1413,8 +1413,8 @@ uidna_nameToASCII(const UIDNA *idna,
U_CAPI int32_t U_EXPORT2
uidna_nameToUnicode(const UIDNA *idna,
- const UChar *name, int32_t length,
- UChar *dest, int32_t capacity,
+ const char16_t *name, int32_t length,
+ char16_t *dest, int32_t capacity,
UIDNAInfo *pInfo, UErrorCode *pErrorCode) {
if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) {
return 0;
diff --git a/contrib/libs/icu/common/uvector.cpp b/contrib/libs/icu/common/uvector.cpp
index 4da8b864e1b..f93d73a3c69 100644
--- a/contrib/libs/icu/common/uvector.cpp
+++ b/contrib/libs/icu/common/uvector.cpp
@@ -99,14 +99,6 @@ bool UVector::operator==(const UVector& other) const {
return true;
}
-// TODO: delete this function once all call sites have been migrated to the
-// new addElement().
-void UVector::addElementX(void* obj, UErrorCode &status) {
- if (ensureCapacityX(count + 1, status)) {
- elements[count++].pointer = obj;
- }
-}
-
void UVector::addElement(void* obj, UErrorCode &status) {
U_ASSERT(deleter == nullptr);
if (ensureCapacity(count + 1, status)) {
@@ -201,40 +193,40 @@ int32_t UVector::elementAti(int32_t index) const {
UBool UVector::containsAll(const UVector& other) const {
for (int32_t i=0; i<other.size(); ++i) {
if (indexOf(other.elements[i]) < 0) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
UBool UVector::containsNone(const UVector& other) const {
for (int32_t i=0; i<other.size(); ++i) {
if (indexOf(other.elements[i]) >= 0) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
UBool UVector::removeAll(const UVector& other) {
- UBool changed = FALSE;
+ UBool changed = false;
for (int32_t i=0; i<other.size(); ++i) {
int32_t j = indexOf(other.elements[i]);
if (j >= 0) {
removeElementAt(j);
- changed = TRUE;
+ changed = true;
}
}
return changed;
}
UBool UVector::retainAll(const UVector& other) {
- UBool changed = FALSE;
+ UBool changed = false;
for (int32_t j=size()-1; j>=0; --j) {
int32_t i = other.indexOf(elements[j]);
if (i < 0) {
removeElementAt(j);
- changed = TRUE;
+ changed = true;
}
}
return changed;
@@ -251,12 +243,12 @@ UBool UVector::removeElement(void* obj) {
int32_t i = indexOf(obj);
if (i >= 0) {
removeElementAt(i);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-void UVector::removeAllElements(void) {
+void UVector::removeAllElements() {
if (deleter != nullptr) {
for (int32_t i=0; i<count; ++i) {
if (elements[i].pointer != nullptr) {
@@ -271,12 +263,12 @@ UBool UVector::equals(const UVector &other) const {
int i;
if (this->count != other.count) {
- return FALSE;
+ return false;
}
if (comparer == nullptr) {
for (i=0; i<count; i++) {
if (elements[i].pointer != other.elements[i].pointer) {
- return FALSE;
+ return false;
}
}
} else {
@@ -284,11 +276,11 @@ UBool UVector::equals(const UVector &other) const {
for (i=0; i<count; i++) {
key.pointer = &other.elements[i];
if (!(*comparer)(key, elements[i])) {
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
@@ -331,38 +323,6 @@ int32_t UVector::indexOf(UElement key, int32_t startIndex, int8_t hint) const {
return -1;
}
-UBool UVector::ensureCapacityX(int32_t minimumCapacity, UErrorCode &status) {
- if (minimumCapacity < 0) {
- status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
- }
- if (capacity < minimumCapacity) {
- if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check
- status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
- }
- int32_t newCap = capacity * 2;
- if (newCap < minimumCapacity) {
- newCap = minimumCapacity;
- }
- if (newCap > (int32_t)(INT32_MAX / sizeof(UElement))) { // integer overflow check
- // We keep the original memory contents on bad minimumCapacity.
- status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
- }
- UElement* newElems = (UElement *)uprv_realloc(elements, sizeof(UElement)*newCap);
- if (newElems == nullptr) {
- // We keep the original contents on the memory failure on realloc or bad minimumCapacity.
- status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
- }
- elements = newElems;
- capacity = newCap;
- }
- return TRUE;
-}
-
-
UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (U_FAILURE(status)) {
return false;
@@ -370,7 +330,7 @@ UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return false;
- }
+ }
if (capacity < minimumCapacity) {
if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check
status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -396,6 +356,7 @@ UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
}
return true;
}
+
/**
* Change the size of this vector as follows: If newSize is smaller,
* then truncate the array, possibly deleting held elements for i >=
@@ -564,7 +525,7 @@ sortiComparator(const void * /*context */, const void *left, const void *right)
void UVector::sorti(UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
- sortiComparator, nullptr, FALSE, &ec);
+ sortiComparator, nullptr, false, &ec);
}
}
@@ -586,7 +547,7 @@ void UVector::sorti(UErrorCode &ec) {
void UVector::sort(UElementComparator *compare, UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
- sortComparator, &compare, FALSE, &ec);
+ sortComparator, &compare, false, &ec);
}
}
@@ -597,7 +558,7 @@ void UVector::sort(UElementComparator *compare, UErrorCode &ec) {
void UVector::sortWithUComparator(UComparator *compare, const void *context, UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
- compare, context, TRUE, &ec);
+ compare, context, true, &ec);
}
}
diff --git a/contrib/libs/icu/common/uvector.h b/contrib/libs/icu/common/uvector.h
index f61fcc2be60..1b2a58da86d 100644
--- a/contrib/libs/icu/common/uvector.h
+++ b/contrib/libs/icu/common/uvector.h
@@ -123,12 +123,6 @@ public:
// java.util.Vector API
//------------------------------------------------------------
- /*
- * Old version of addElement, with non-standard error handling.
- * Will be removed once all uses have been switched to the new addElement().
- */
- void addElementX(void* obj, UErrorCode &status);
-
/**
* Add an element at the end of the vector.
* For use only with vectors that do not adopt their elements, which is to say,
@@ -167,11 +161,11 @@ public:
UBool equals(const UVector &other) const;
- inline void* firstElement(void) const {return elementAt(0);}
+ inline void* firstElement() const {return elementAt(0);}
- inline void* lastElement(void) const {return elementAt(count-1);}
+ inline void* lastElement() const {return elementAt(count-1);}
- inline int32_t lastElementi(void) const {return elementAti(count-1);}
+ inline int32_t lastElementi() const {return elementAti(count-1);}
int32_t indexOf(void* obj, int32_t startIndex = 0) const;
@@ -193,15 +187,9 @@ public:
void removeAllElements();
- inline int32_t size(void) const {return count;}
+ inline int32_t size() const {return count;}
- inline UBool isEmpty(void) const {return count == 0;}
-
- /*
- * Old version of ensureCapacity, with non-standard error handling.
- * Will be removed once all uses have been switched to the new ensureCapacity().
- */
- UBool ensureCapacityX(int32_t minimumCapacity, UErrorCode &status);
+ inline UBool isEmpty() const {return count == 0;}
UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status);
@@ -209,7 +197,7 @@ public:
* Change the size of this vector as follows: If newSize is
* smaller, then truncate the array, possibly deleting held
* elements for i >= newSize. If newSize is larger, grow the
- * array, filling in new slots with NULL.
+ * array, filling in new slots with nullptr.
*/
void setSize(int32_t newSize, UErrorCode &status);
@@ -340,20 +328,20 @@ public:
// It's okay not to have a virtual destructor (in UVector)
// because UStack has no special cleanup to do.
- inline UBool empty(void) const {return isEmpty();}
+ inline UBool empty() const {return isEmpty();}
- inline void* peek(void) const {return lastElement();}
+ inline void* peek() const {return lastElement();}
- inline int32_t peeki(void) const {return lastElementi();}
+ inline int32_t peeki() const {return lastElementi();}
/**
* Pop and return an element from the stack.
* For stacks with a deleter function, the caller takes ownership
* of the popped element.
*/
- void* pop(void);
+ void* pop();
- int32_t popi(void);
+ int32_t popi();
inline void* push(void* obj, UErrorCode &status) {
if (hasDeleter()) {
diff --git a/contrib/libs/icu/common/uvectr32.cpp b/contrib/libs/icu/common/uvectr32.cpp
index a77ecb689fd..fb554729fe6 100644
--- a/contrib/libs/icu/common/uvectr32.cpp
+++ b/contrib/libs/icu/common/uvectr32.cpp
@@ -30,7 +30,7 @@ UVector32::UVector32(UErrorCode &status) :
count(0),
capacity(0),
maxCapacity(0),
- elements(NULL)
+ elements(nullptr)
{
_init(DEFAULT_CAPACITY, status);
}
@@ -83,7 +83,7 @@ void UVector32::assign(const UVector32& other, UErrorCode &ec) {
}
-bool UVector32::operator==(const UVector32& other) {
+bool UVector32::operator==(const UVector32& other) const {
int32_t i;
if (count != other.count) return false;
for (i=0; i<count; ++i) {
@@ -117,40 +117,40 @@ void UVector32::insertElementAt(int32_t elem, int32_t index, UErrorCode &status)
UBool UVector32::containsAll(const UVector32& other) const {
for (int32_t i=0; i<other.size(); ++i) {
if (indexOf(other.elements[i]) < 0) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
UBool UVector32::containsNone(const UVector32& other) const {
for (int32_t i=0; i<other.size(); ++i) {
if (indexOf(other.elements[i]) >= 0) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
UBool UVector32::removeAll(const UVector32& other) {
- UBool changed = FALSE;
+ UBool changed = false;
for (int32_t i=0; i<other.size(); ++i) {
int32_t j = indexOf(other.elements[i]);
if (j >= 0) {
removeElementAt(j);
- changed = TRUE;
+ changed = true;
}
}
return changed;
}
UBool UVector32::retainAll(const UVector32& other) {
- UBool changed = FALSE;
+ UBool changed = false;
for (int32_t j=size()-1; j>=0; --j) {
int32_t i = other.indexOf(elements[j]);
if (i < 0) {
removeElementAt(j);
- changed = TRUE;
+ changed = true;
}
}
return changed;
@@ -165,7 +165,7 @@ void UVector32::removeElementAt(int32_t index) {
}
}
-void UVector32::removeAllElements(void) {
+void UVector32::removeAllElements() {
count = 0;
}
@@ -173,14 +173,14 @@ UBool UVector32::equals(const UVector32 &other) const {
int i;
if (this->count != other.count) {
- return FALSE;
+ return false;
}
for (i=0; i<count; i++) {
if (elements[i] != other.elements[i]) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
@@ -199,22 +199,22 @@ int32_t UVector32::indexOf(int32_t key, int32_t startIndex) const {
UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
if (capacity >= minimumCapacity) {
- return TRUE;
+ return true;
}
if (maxCapacity>0 && minimumCapacity>maxCapacity) {
status = U_BUFFER_OVERFLOW_ERROR;
- return FALSE;
+ return false;
}
if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
int32_t newCap = capacity * 2;
if (newCap < minimumCapacity) {
@@ -226,17 +226,17 @@ UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (newCap > (int32_t)(INT32_MAX / sizeof(int32_t))) { // integer overflow check
// We keep the original memory contents on bad minimumCapacity/maxCapacity.
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
int32_t* newElems = (int32_t *)uprv_realloc(elements, sizeof(int32_t)*newCap);
- if (newElems == NULL) {
+ if (newElems == nullptr) {
// We keep the original contents on the memory failure on realloc.
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
elements = newElems;
capacity = newCap;
- return TRUE;
+ return true;
}
void UVector32::setMaxCapacity(int32_t limit) {
@@ -257,7 +257,7 @@ void UVector32::setMaxCapacity(int32_t limit) {
// New maximum capacity is smaller than the current size.
// Realloc the storage to the new, smaller size.
int32_t* newElems = (int32_t *)uprv_realloc(elements, sizeof(int32_t)*maxCapacity);
- if (newElems == NULL) {
+ if (newElems == nullptr) {
// Realloc to smaller failed.
// Just keep what we had. No need to call it a failure.
return;
@@ -273,7 +273,7 @@ void UVector32::setMaxCapacity(int32_t limit) {
* Change the size of this vector as follows: If newSize is smaller,
* then truncate the array, possibly deleting held elements for i >=
* newSize. If newSize is larger, grow the array, filling in new
- * slots with NULL.
+ * slots with nullptr.
*/
void UVector32::setSize(int32_t newSize) {
int32_t i;
diff --git a/contrib/libs/icu/common/uvectr32.h b/contrib/libs/icu/common/uvectr32.h
index f08c2ade765..2841391f573 100644
--- a/contrib/libs/icu/common/uvectr32.h
+++ b/contrib/libs/icu/common/uvectr32.h
@@ -86,12 +86,12 @@ public:
* equal if they are of the same size and all elements are equal,
* as compared using this object's comparer.
*/
- bool operator==(const UVector32& other);
+ bool operator==(const UVector32& other) const;
/**
* Equivalent to !operator==()
*/
- inline bool operator!=(const UVector32& other);
+ inline bool operator!=(const UVector32& other) const;
//------------------------------------------------------------
// java.util.Vector API
@@ -107,7 +107,7 @@ public:
UBool equals(const UVector32 &other) const;
- inline int32_t lastElementi(void) const;
+ inline int32_t lastElementi() const;
int32_t indexOf(int32_t elem, int32_t startIndex = 0) const;
@@ -123,9 +123,9 @@ public:
void removeAllElements();
- inline int32_t size(void) const;
+ inline int32_t size() const;
- inline UBool isEmpty(void) const;
+ inline UBool isEmpty() const;
// Inline. Use this one for speedy size check.
inline UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status);
@@ -187,21 +187,21 @@ private:
void _init(int32_t initialCapacity, UErrorCode &status);
// Disallow
- UVector32(const UVector32&);
+ UVector32(const UVector32&) = delete;
// Disallow
- UVector32& operator=(const UVector32&);
+ UVector32& operator=(const UVector32&) = delete;
// API Functions for Stack operations.
// In the original UVector, these were in a separate derived class, UStack.
// Here in UVector32, they are all together.
public:
- inline UBool empty(void) const; // TODO: redundant, same as empty(). Remove it?
+ inline UBool empty() const; // TODO: redundant, same as empty(). Remove it?
- inline int32_t peeki(void) const;
+ inline int32_t peeki() const;
- inline int32_t popi(void);
+ inline int32_t popi();
inline int32_t push(int32_t i, UErrorCode &status);
@@ -234,7 +234,7 @@ inline void UVector32::addElement(int32_t elem, UErrorCode &status) {
inline int32_t *UVector32::reserveBlock(int32_t size, UErrorCode &status) {
if (ensureCapacity(count+size, status) == false) {
- return NULL;
+ return nullptr;
}
int32_t *rp = elements+count;
count += size;
@@ -252,11 +252,11 @@ inline int32_t *UVector32::popFrame(int32_t size) {
-inline int32_t UVector32::size(void) const {
+inline int32_t UVector32::size() const {
return count;
}
-inline UBool UVector32::isEmpty(void) const {
+inline UBool UVector32::isEmpty() const {
return count == 0;
}
@@ -264,11 +264,11 @@ inline UBool UVector32::contains(int32_t obj) const {
return indexOf(obj) >= 0;
}
-inline int32_t UVector32::lastElementi(void) const {
+inline int32_t UVector32::lastElementi() const {
return elementAti(count-1);
}
-inline bool UVector32::operator!=(const UVector32& other) {
+inline bool UVector32::operator!=(const UVector32& other) const {
return !operator==(other);
}
@@ -279,11 +279,11 @@ inline int32_t *UVector32::getBuffer() const {
// UStack inlines
-inline UBool UVector32::empty(void) const {
+inline UBool UVector32::empty() const {
return isEmpty();
}
-inline int32_t UVector32::peeki(void) const {
+inline int32_t UVector32::peeki() const {
return lastElementi();
}
@@ -292,7 +292,7 @@ inline int32_t UVector32::push(int32_t i, UErrorCode &status) {
return i;
}
-inline int32_t UVector32::popi(void) {
+inline int32_t UVector32::popi() {
int32_t result = 0;
if (count > 0) {
count--;
diff --git a/contrib/libs/icu/common/uvectr64.cpp b/contrib/libs/icu/common/uvectr64.cpp
index 57315c00ff5..05559dd8337 100644
--- a/contrib/libs/icu/common/uvectr64.cpp
+++ b/contrib/libs/icu/common/uvectr64.cpp
@@ -27,7 +27,7 @@ UVector64::UVector64(UErrorCode &status) :
count(0),
capacity(0),
maxCapacity(0),
- elements(NULL)
+ elements(nullptr)
{
_init(DEFAULT_CAPACITY, status);
}
@@ -111,28 +111,28 @@ void UVector64::insertElementAt(int64_t elem, int32_t index, UErrorCode &status)
/* else index out of range */
}
-void UVector64::removeAllElements(void) {
+void UVector64::removeAllElements() {
count = 0;
}
UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
if (capacity >= minimumCapacity) {
- return TRUE;
+ return true;
}
if (maxCapacity>0 && minimumCapacity>maxCapacity) {
status = U_BUFFER_OVERFLOW_ERROR;
- return FALSE;
+ return false;
}
if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
int32_t newCap = capacity * 2;
if (newCap < minimumCapacity) {
@@ -144,17 +144,17 @@ UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (newCap > (int32_t)(INT32_MAX / sizeof(int64_t))) { // integer overflow check
// We keep the original memory contents on bad minimumCapacity/maxCapacity.
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*newCap);
- if (newElems == NULL) {
+ if (newElems == nullptr) {
// We keep the original contents on the memory failure on realloc.
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
elements = newElems;
capacity = newCap;
- return TRUE;
+ return true;
}
void UVector64::setMaxCapacity(int32_t limit) {
@@ -175,7 +175,7 @@ void UVector64::setMaxCapacity(int32_t limit) {
// New maximum capacity is smaller than the current size.
// Realloc the storage to the new, smaller size.
int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*maxCapacity);
- if (newElems == NULL) {
+ if (newElems == nullptr) {
// Realloc to smaller failed.
// Just keep what we had. No need to call it a failure.
return;
@@ -191,7 +191,7 @@ void UVector64::setMaxCapacity(int32_t limit) {
* Change the size of this vector as follows: If newSize is smaller,
* then truncate the array, possibly deleting held elements for i >=
* newSize. If newSize is larger, grow the array, filling in new
- * slots with NULL.
+ * slots with nullptr.
*/
void UVector64::setSize(int32_t newSize) {
int32_t i;
diff --git a/contrib/libs/icu/common/uvectr64.h b/contrib/libs/icu/common/uvectr64.h
index ba3eca268df..d719e6d0ff7 100644
--- a/contrib/libs/icu/common/uvectr64.h
+++ b/contrib/libs/icu/common/uvectr64.h
@@ -106,7 +106,7 @@ public:
//UBool equals(const UVector64 &other) const;
- inline int64_t lastElementi(void) const;
+ inline int64_t lastElementi() const;
//int32_t indexOf(int64_t elem, int32_t startIndex = 0) const;
@@ -122,9 +122,9 @@ public:
void removeAllElements();
- inline int32_t size(void) const;
+ inline int32_t size() const;
- inline UBool isEmpty(void) const { return count == 0; }
+ inline UBool isEmpty() const { return count == 0; }
// Inline. Use this one for speedy size check.
inline UBool ensureCapacity(int32_t minimumCapacity, UErrorCode &status);
@@ -176,21 +176,21 @@ private:
void _init(int32_t initialCapacity, UErrorCode &status);
// Disallow
- UVector64(const UVector64&);
+ UVector64(const UVector64&) = delete;
// Disallow
- UVector64& operator=(const UVector64&);
+ UVector64& operator=(const UVector64&) = delete;
// API Functions for Stack operations.
// In the original UVector, these were in a separate derived class, UStack.
// Here in UVector64, they are all together.
public:
- //UBool empty(void) const; // TODO: redundant, same as empty(). Remove it?
+ //UBool empty() const; // TODO: redundant, same as empty(). Remove it?
- //int64_t peeki(void) const;
+ //int64_t peeki() const;
- inline int64_t popi(void);
+ inline int64_t popi();
inline int64_t push(int64_t i, UErrorCode &status);
@@ -223,7 +223,7 @@ inline void UVector64::addElement(int64_t elem, UErrorCode &status) {
inline int64_t *UVector64::reserveBlock(int32_t size, UErrorCode &status) {
if (ensureCapacity(count+size, status) == false) {
- return NULL;
+ return nullptr;
}
int64_t *rp = elements+count;
count += size;
@@ -241,11 +241,11 @@ inline int64_t *UVector64::popFrame(int32_t size) {
-inline int32_t UVector64::size(void) const {
+inline int32_t UVector64::size() const {
return count;
}
-inline int64_t UVector64::lastElementi(void) const {
+inline int64_t UVector64::lastElementi() const {
return elementAti(count-1);
}
@@ -265,7 +265,7 @@ inline int64_t UVector64::push(int64_t i, UErrorCode &status) {
return i;
}
-inline int64_t UVector64::popi(void) {
+inline int64_t UVector64::popi() {
int64_t result = 0;
if (count > 0) {
count--;
diff --git a/contrib/libs/icu/common/wintz.cpp b/contrib/libs/icu/common/wintz.cpp
index 84a29b8d36a..ef9cd68019d 100644
--- a/contrib/libs/icu/common/wintz.cpp
+++ b/contrib/libs/icu/common/wintz.cpp
@@ -69,7 +69,7 @@ typedef struct _REG_TZI_FORMAT {
* as this API returns a non-localized time zone name which can be then mapped to an ICU time zone.
*
* However, in some RDP/terminal services situations, this struct isn't always fully complete, and the TimeZoneKeyName
-* field of the struct might be NULL. This can happen with some 3rd party RDP clients, and also when using older versions
+* field of the struct might be nullptr. This can happen with some 3rd party RDP clients, and also when using older versions
* of the RDP protocol, which don't send the newer TimeZoneKeyNamei information and only send the StandardName and DaylightName.
*
* Since these 3rd party clients and older RDP clients only send the pre-Vista time zone information to the server, this means that we
@@ -143,14 +143,14 @@ uprv_detectWindowsTimeZone()
//
// For example, a time zone that is 3 hours ahead of UTC (UTC+03:00) would have a Bias value of -180, and the
// corresponding time zone ID would be "Etc/GMT-3". (So there is no need to negate utcOffsetMins below.)
- int ret = snprintf(gmtOffsetTz, UPRV_LENGTHOF(gmtOffsetTz), "Etc/GMT%+ld", utcOffsetMins / 60);
+ int ret = snprintf(gmtOffsetTz, sizeof(gmtOffsetTz), "Etc/GMT%+ld", utcOffsetMins / 60);
if (ret > 0 && ret < UPRV_LENGTHOF(gmtOffsetTz)) {
return uprv_strdup(gmtOffsetTz);
}
}
}
- // If DST is NOT disabled, but the TimeZoneKeyName field of the struct is NULL, then we may be dealing with a
+ // If DST is NOT disabled, but the TimeZoneKeyName field of the struct is nullptr, then we may be dealing with a
// RDP/terminal services session where the 'Time Zone Redirection' feature is enabled. However, either the RDP
// client sent the server incomplete info (some 3rd party RDP clients only send the StandardName and DaylightName,
// but do not send the important TimeZoneKeyName), or if the RDP server has not appropriately populated the struct correctly.
@@ -274,7 +274,7 @@ uprv_detectWindowsTimeZone()
CharString winTZ;
UErrorCode status = U_ZERO_ERROR;
- winTZ.appendInvariantChars(UnicodeString(TRUE, windowsTimeZoneName, -1), status);
+ winTZ.appendInvariantChars(UnicodeString(true, windowsTimeZoneName, -1), status);
// Map Windows Timezone name (non-localized) to ICU timezone ID (~ Olson timezone id).
StackUResourceBundle winTZBundle;
@@ -295,7 +295,7 @@ uprv_detectWindowsTimeZone()
int geoId = GetUserGeoID(GEOCLASS_NATION);
int regionCodeLen = GetGeoInfoW(geoId, GEO_ISO2, regionCodeW, UPRV_LENGTHOF(regionCodeW), 0);
- const UChar *icuTZ16 = nullptr;
+ const char16_t *icuTZ16 = nullptr;
int32_t tzListLen = 0;
if (regionCodeLen != 0) {
diff --git a/contrib/libs/icu/i18n/alphaindex.cpp b/contrib/libs/icu/i18n/alphaindex.cpp
index 34407f677a6..1b49d3b5443 100644
--- a/contrib/libs/icu/i18n/alphaindex.cpp
+++ b/contrib/libs/icu/i18n/alphaindex.cpp
@@ -40,7 +40,7 @@ namespace {
* Prefix string for Chinese index buckets.
* See http://unicode.org/repos/cldr/trunk/specs/ldml/tr35-collation.html#Collation_Indexes
*/
-const UChar BASE[1] = { 0xFDD0 };
+const char16_t BASE[1] = { 0xFDD0 };
const int32_t BASE_LENGTH = 1;
UBool isOneLabelBetterThanOther(const Normalizer2 &nfkdNormalizer,
@@ -64,12 +64,12 @@ namespace {
UnicodeString *ownedString(const UnicodeString &s, LocalPointer<UnicodeString> &owned,
UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
if (owned.isValid()) {
return owned.orphan();
}
UnicodeString *p = new UnicodeString(s);
- if (p == NULL) {
+ if (p == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
}
return p;
@@ -158,7 +158,7 @@ public:
}
}
const AlphabeticIndex::Bucket *bucket = getBucket(*bucketList_, start);
- if (bucket->displayBucket_ != NULL) {
+ if (bucket->displayBucket_ != nullptr) {
bucket = bucket->displayBucket_;
}
return bucket->displayIndex_;
@@ -198,29 +198,29 @@ AlphabeticIndex::ImmutableIndex::getBucket(int32_t index) const {
if (0 <= index && index < buckets_->getBucketCount()) {
return icu::getBucket(*buckets_->immutableVisibleList_, index);
} else {
- return NULL;
+ return nullptr;
}
}
AlphabeticIndex::AlphabeticIndex(const Locale &locale, UErrorCode &status)
- : inputList_(NULL),
- labelsIterIndex_(-1), itemsIterIndex_(0), currentBucket_(NULL),
+ : inputList_(nullptr),
+ labelsIterIndex_(-1), itemsIterIndex_(0), currentBucket_(nullptr),
maxLabelCount_(99),
- initialLabels_(NULL), firstCharsInScripts_(NULL),
- collator_(NULL), collatorPrimaryOnly_(NULL),
- buckets_(NULL) {
+ initialLabels_(nullptr), firstCharsInScripts_(nullptr),
+ collator_(nullptr), collatorPrimaryOnly_(nullptr),
+ buckets_(nullptr) {
init(&locale, status);
}
AlphabeticIndex::AlphabeticIndex(RuleBasedCollator *collator, UErrorCode &status)
- : inputList_(NULL),
- labelsIterIndex_(-1), itemsIterIndex_(0), currentBucket_(NULL),
+ : inputList_(nullptr),
+ labelsIterIndex_(-1), itemsIterIndex_(0), currentBucket_(nullptr),
maxLabelCount_(99),
- initialLabels_(NULL), firstCharsInScripts_(NULL),
- collator_(collator), collatorPrimaryOnly_(NULL),
- buckets_(NULL) {
- init(NULL, status);
+ initialLabels_(nullptr), firstCharsInScripts_(nullptr),
+ collator_(collator), collatorPrimaryOnly_(nullptr),
+ buckets_(nullptr) {
+ init(nullptr, status);
}
@@ -253,22 +253,22 @@ AlphabeticIndex &AlphabeticIndex::addLabels(const Locale &locale, UErrorCode &st
AlphabeticIndex::ImmutableIndex *AlphabeticIndex::buildImmutableIndex(UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
// In C++, the ImmutableIndex must own its copy of the BucketList,
// even if it contains no records, for proper memory management.
- // We could clone the buckets_ if they are not NULL,
+ // We could clone the buckets_ if they are not nullptr,
// but that would be worth it only if this method is called multiple times,
// or called after using the old-style bucket iterator API.
LocalPointer<BucketList> immutableBucketList(createBucketList(errorCode));
LocalPointer<RuleBasedCollator> coll(collatorPrimaryOnly_->clone());
if (immutableBucketList.isNull() || coll.isNull()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
ImmutableIndex *immIndex = new ImmutableIndex(immutableBucketList.getAlias(), coll.getAlias());
- if (immIndex == NULL) {
+ if (immIndex == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// The ImmutableIndex adopted its parameter objects.
immutableBucketList.orphan();
@@ -286,7 +286,7 @@ int32_t AlphabeticIndex::getBucketCount(UErrorCode &status) {
int32_t AlphabeticIndex::getRecordCount(UErrorCode &status) {
- if (U_FAILURE(status) || inputList_ == NULL) {
+ if (U_FAILURE(status) || inputList_ == nullptr) {
return 0;
}
return inputList_->size();
@@ -312,20 +312,20 @@ void AlphabeticIndex::initLabels(UVector &indexCharacters, UErrorCode &errorCode
UBool checkDistinct;
int32_t itemLength = item->length();
if (!item->hasMoreChar32Than(0, itemLength, 1)) {
- checkDistinct = FALSE;
+ checkDistinct = false;
} else if(item->charAt(itemLength - 1) == 0x2a && // '*'
item->charAt(itemLength - 2) != 0x2a) {
// Use a label if it is marked with one trailing star,
// even if the label string sorts the same when all contractions are suppressed.
ownedItem.adoptInstead(new UnicodeString(*item, 0, itemLength - 1));
item = ownedItem.getAlias();
- if (item == NULL) {
+ if (item == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
- checkDistinct = FALSE;
+ checkDistinct = false;
} else {
- checkDistinct = TRUE;
+ checkDistinct = true;
}
if (collatorPrimaryOnly_->compare(*item, firstScriptBoundary, errorCode) < 0) {
// Ignore a primary-ignorable or non-alphabetic index character.
@@ -376,19 +376,19 @@ const UnicodeString &fixLabel(const UnicodeString &current, UnicodeString &temp)
if (!current.startsWith(BASE, BASE_LENGTH)) {
return current;
}
- UChar rest = current.charAt(BASE_LENGTH);
+ char16_t rest = current.charAt(BASE_LENGTH);
if (0x2800 < rest && rest <= 0x28FF) { // stroke count
int32_t count = rest-0x2800;
- temp.setTo((UChar)(0x30 + count % 10));
+ temp.setTo((char16_t)(0x30 + count % 10));
if (count >= 10) {
count /= 10;
- temp.insert(0, (UChar)(0x30 + count % 10));
+ temp.insert(0, (char16_t)(0x30 + count % 10));
if (count >= 10) {
count /= 10;
- temp.insert(0, (UChar)(0x30 + count));
+ temp.insert(0, (char16_t)(0x30 + count));
}
}
- return temp.append((UChar)0x5283);
+ return temp.append((char16_t)0x5283);
}
return temp.setTo(current, BASE_LENGTH);
}
@@ -398,20 +398,20 @@ UBool hasMultiplePrimaryWeights(
const UnicodeString &s, UVector64 &ces, UErrorCode &errorCode) {
ces.removeAllElements();
coll.internalGetCEs(s, ces, errorCode);
- if (U_FAILURE(errorCode)) { return FALSE; }
- UBool seenPrimary = FALSE;
+ if (U_FAILURE(errorCode)) { return false; }
+ UBool seenPrimary = false;
for (int32_t i = 0; i < ces.size(); ++i) {
int64_t ce = ces.elementAti(i);
uint32_t p = (uint32_t)(ce >> 32);
if (p > variableTop) {
// not primary ignorable
if (seenPrimary) {
- return TRUE;
+ return true;
}
- seenPrimary = TRUE;
+ seenPrimary = true;
}
}
- return FALSE;
+ return false;
}
} // namespace
@@ -421,7 +421,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
UVector indexCharacters(errorCode);
indexCharacters.setDeleter(uprv_deleteUObject);
initLabels(indexCharacters, errorCode);
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
// Variables for hasMultiplePrimaryWeights().
UVector64 ces(errorCode);
@@ -431,33 +431,32 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
} else {
variableTop = 0;
}
- UBool hasInvisibleBuckets = FALSE;
+ UBool hasInvisibleBuckets = false;
// Helper arrays for Chinese Pinyin collation.
Bucket *asciiBuckets[26] = {
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ 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, nullptr
};
Bucket *pinyinBuckets[26] = {
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ 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, nullptr
};
- UBool hasPinyin = FALSE;
+ UBool hasPinyin = false;
LocalPointer<UVector> bucketList(new UVector(errorCode), errorCode);
if (U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
bucketList->setDeleter(uprv_deleteUObject);
// underflow bucket
- Bucket *bucket = new Bucket(getUnderflowLabel(), emptyString_, U_ALPHAINDEX_UNDERFLOW);
- if (bucket == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ LocalPointer<Bucket> bucket(new Bucket(getUnderflowLabel(), emptyString_, U_ALPHAINDEX_UNDERFLOW), errorCode);
+ if (U_FAILURE(errorCode)) {
+ return nullptr;
}
- bucketList->addElementX(bucket, errorCode);
- if (U_FAILURE(errorCode)) { return NULL; }
+ bucketList->adoptElement(bucket.orphan(), errorCode);
+ if (U_FAILURE(errorCode)) { return nullptr; }
UnicodeString temp;
@@ -470,40 +469,36 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
if (collatorPrimaryOnly_->compare(current, *scriptUpperBoundary, errorCode) >= 0) {
// We crossed the script boundary into a new script.
const UnicodeString &inflowBoundary = *scriptUpperBoundary;
- UBool skippedScript = FALSE;
+ UBool skippedScript = false;
for (;;) {
scriptUpperBoundary = getString(*firstCharsInScripts_, ++scriptIndex);
if (collatorPrimaryOnly_->compare(current, *scriptUpperBoundary, errorCode) < 0) {
break;
}
- skippedScript = TRUE;
+ skippedScript = true;
}
if (skippedScript && bucketList->size() > 1) {
// We are skipping one or more scripts,
// and we are not just getting out of the underflow label.
- bucket = new Bucket(getInflowLabel(), inflowBoundary, U_ALPHAINDEX_INFLOW);
- if (bucket == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
- }
- bucketList->addElementX(bucket, errorCode);
+ bucket.adoptInsteadAndCheckErrorCode(
+ new Bucket(getInflowLabel(), inflowBoundary, U_ALPHAINDEX_INFLOW), errorCode);
+ bucketList->adoptElement(bucket.orphan(), errorCode);
+ if (U_FAILURE(errorCode)) { return nullptr; }
}
}
// Add a bucket with the current label.
- bucket = new Bucket(fixLabel(current, temp), current, U_ALPHAINDEX_NORMAL);
- if (bucket == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
- }
- bucketList->addElementX(bucket, errorCode);
+ bucket.adoptInsteadAndCheckErrorCode(
+ new Bucket(fixLabel(current, temp), current, U_ALPHAINDEX_NORMAL), errorCode);
+ bucketList->adoptElement(bucket.orphan(), errorCode);
+ if (U_FAILURE(errorCode)) { return nullptr; }
// Remember ASCII and Pinyin buckets for Pinyin redirects.
- UChar c;
+ char16_t c;
if (current.length() == 1 && 0x41 <= (c = current.charAt(0)) && c <= 0x5A) { // A-Z
- asciiBuckets[c - 0x41] = bucket;
+ asciiBuckets[c - 0x41] = (Bucket *)bucketList->lastElement();
} else if (current.length() == BASE_LENGTH + 1 && current.startsWith(BASE, BASE_LENGTH) &&
0x41 <= (c = current.charAt(BASE_LENGTH)) && c <= 0x5A) {
- pinyinBuckets[c - 0x41] = bucket;
- hasPinyin = TRUE;
+ pinyinBuckets[c - 0x41] = (Bucket *)bucketList->lastElement();
+ hasPinyin = true;
}
// Check for multiple primary weights.
if (!current.startsWith(BASE, BASE_LENGTH) &&
@@ -518,7 +513,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
// underflow or inflow label.
break;
}
- if (singleBucket->displayBucket_ == NULL &&
+ if (singleBucket->displayBucket_ == nullptr &&
!hasMultiplePrimaryWeights(*collatorPrimaryOnly_, variableTop,
singleBucket->lowerBoundary_,
ces, errorCode)) {
@@ -526,60 +521,59 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
// to the previous single-character bucket.
// For example, after ... Q R S Sch we add Sch\uFFFF->S
// and after ... Q R S Sch Sch\uFFFF St we add St\uFFFF->S.
- bucket = new Bucket(emptyString_,
- UnicodeString(current).append((UChar)0xFFFF),
- U_ALPHAINDEX_NORMAL);
- if (bucket == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ bucket.adoptInsteadAndCheckErrorCode(new Bucket(emptyString_,
+ UnicodeString(current).append((char16_t)0xFFFF),
+ U_ALPHAINDEX_NORMAL),
+ errorCode);
+ if (U_FAILURE(errorCode)) {
+ return nullptr;
}
bucket->displayBucket_ = singleBucket;
- bucketList->addElementX(bucket, errorCode);
- hasInvisibleBuckets = TRUE;
+ bucketList->adoptElement(bucket.orphan(), errorCode);
+ if (U_FAILURE(errorCode)) { return nullptr; }
+ hasInvisibleBuckets = true;
break;
}
}
}
}
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
if (bucketList->size() == 1) {
// No real labels, show only the underflow label.
BucketList *bl = new BucketList(bucketList.getAlias(), bucketList.getAlias());
- if (bl == NULL) {
+ if (bl == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
bucketList.orphan();
return bl;
}
// overflow bucket
- bucket = new Bucket(getOverflowLabel(), *scriptUpperBoundary, U_ALPHAINDEX_OVERFLOW);
- if (bucket == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
- }
- bucketList->addElementX(bucket, errorCode); // final
+ bucket.adoptInsteadAndCheckErrorCode(
+ new Bucket(getOverflowLabel(), *scriptUpperBoundary, U_ALPHAINDEX_OVERFLOW), errorCode);
+ bucketList->adoptElement(bucket.orphan(), errorCode); // final
+ if (U_FAILURE(errorCode)) { return nullptr; }
if (hasPinyin) {
// Redirect Pinyin buckets.
- Bucket *asciiBucket = NULL;
+ Bucket *asciiBucket = nullptr;
for (int32_t i = 0; i < 26; ++i) {
- if (asciiBuckets[i] != NULL) {
+ if (asciiBuckets[i] != nullptr) {
asciiBucket = asciiBuckets[i];
}
- if (pinyinBuckets[i] != NULL && asciiBucket != NULL) {
+ if (pinyinBuckets[i] != nullptr && asciiBucket != nullptr) {
pinyinBuckets[i]->displayBucket_ = asciiBucket;
- hasInvisibleBuckets = TRUE;
+ hasInvisibleBuckets = true;
}
}
}
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
if (!hasInvisibleBuckets) {
BucketList *bl = new BucketList(bucketList.getAlias(), bucketList.getAlias());
- if (bl == NULL) {
+ if (bl == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
bucketList.orphan();
return bl;
@@ -589,8 +583,8 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
int32_t i = bucketList->size() - 1;
Bucket *nextBucket = getBucket(*bucketList, i);
while (--i > 0) {
- bucket = getBucket(*bucketList, i);
- if (bucket->displayBucket_ != NULL) {
+ Bucket *bucket = getBucket(*bucketList, i);
+ if (bucket->displayBucket_ != nullptr) {
continue; // skip invisible buckets
}
if (bucket->labelType_ == U_ALPHAINDEX_INFLOW) {
@@ -604,21 +598,21 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
LocalPointer<UVector> publicBucketList(new UVector(errorCode), errorCode);
if (U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
// Do not call publicBucketList->setDeleter():
// This vector shares its objects with the bucketList.
for (int32_t j = 0; j < bucketList->size(); ++j) {
- bucket = getBucket(*bucketList, j);
- if (bucket->displayBucket_ == NULL) {
- publicBucketList->addElementX(bucket, errorCode);
+ Bucket *bucket = getBucket(*bucketList, j);
+ if (bucket->displayBucket_ == nullptr) {
+ publicBucketList->addElement(bucket, errorCode);
}
}
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
BucketList *bl = new BucketList(bucketList.getAlias(), publicBucketList.getAlias());
- if (bl == NULL) {
+ if (bl == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
bucketList.orphan();
publicBucketList.orphan();
@@ -629,11 +623,11 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
* Creates an index, and buckets and sorts the list of records into the index.
*/
void AlphabeticIndex::initBuckets(UErrorCode &errorCode) {
- if (U_FAILURE(errorCode) || buckets_ != NULL) {
+ if (U_FAILURE(errorCode) || buckets_ != nullptr) {
return;
}
buckets_ = createBucketList(errorCode);
- if (U_FAILURE(errorCode) || inputList_ == NULL || inputList_->isEmpty()) {
+ if (U_FAILURE(errorCode) || inputList_ == nullptr || inputList_->isEmpty()) {
return;
}
@@ -655,14 +649,14 @@ void AlphabeticIndex::initBuckets(UErrorCode &errorCode) {
nextBucket = getBucket(*buckets_->bucketList_, bucketIndex++);
upperBoundary = &nextBucket->lowerBoundary_;
} else {
- nextBucket = NULL;
- upperBoundary = NULL;
+ nextBucket = nullptr;
+ upperBoundary = nullptr;
}
for (int32_t i = 0; i < inputList_->size(); ++i) {
Record *r = getRecord(*inputList_, i);
// if the current bucket isn't the right one, find the one that is
// We have a special flag for the last bucket so that we don't look any further
- while (upperBoundary != NULL &&
+ while (upperBoundary != nullptr &&
collatorPrimaryOnly_->compare(r->name_, *upperBoundary, errorCode) >= 0) {
currentBucket = nextBucket;
// now reset the boundary that we compare against
@@ -670,36 +664,36 @@ void AlphabeticIndex::initBuckets(UErrorCode &errorCode) {
nextBucket = getBucket(*buckets_->bucketList_, bucketIndex++);
upperBoundary = &nextBucket->lowerBoundary_;
} else {
- upperBoundary = NULL;
+ upperBoundary = nullptr;
}
}
// now put the record into the bucket.
Bucket *bucket = currentBucket;
- if (bucket->displayBucket_ != NULL) {
+ if (bucket->displayBucket_ != nullptr) {
bucket = bucket->displayBucket_;
}
- if (bucket->records_ == NULL) {
- bucket->records_ = new UVector(errorCode);
- if (bucket->records_ == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
+ if (bucket->records_ == nullptr) {
+ LocalPointer<UVector> records(new UVector(errorCode), errorCode);
+ if (U_FAILURE(errorCode)) {
return;
}
+ bucket->records_ = records.orphan();
}
- bucket->records_->addElementX(r, errorCode);
+ bucket->records_->addElement(r, errorCode);
}
}
void AlphabeticIndex::clearBuckets() {
- if (buckets_ != NULL) {
+ if (buckets_ != nullptr) {
delete buckets_;
- buckets_ = NULL;
+ buckets_ = nullptr;
internalResetBucketIterator();
}
}
void AlphabeticIndex::internalResetBucketIterator() {
labelsIterIndex_ = -1;
- currentBucket_ = NULL;
+ currentBucket_ = nullptr;
}
@@ -760,27 +754,27 @@ void AlphabeticIndex::addIndexExemplars(const Locale &locale, UErrorCode &status
UBool AlphabeticIndex::addChineseIndexCharacters(UErrorCode &errorCode) {
UnicodeSet contractions;
collatorPrimaryOnly_->internalAddContractions(BASE[0], contractions, errorCode);
- if (U_FAILURE(errorCode) || contractions.isEmpty()) { return FALSE; }
+ if (U_FAILURE(errorCode) || contractions.isEmpty()) { return false; }
initialLabels_->addAll(contractions);
UnicodeSetIterator iter(contractions);
while (iter.next()) {
const UnicodeString &s = iter.getString();
U_ASSERT (s.startsWith(BASE, BASE_LENGTH));
- UChar c = s.charAt(s.length() - 1);
+ char16_t c = s.charAt(s.length() - 1);
if (0x41 <= c && c <= 0x5A) { // A-Z
// There are Pinyin labels, add ASCII A-Z labels as well.
initialLabels_->add(0x41, 0x5A); // A-Z
break;
}
}
- return TRUE;
+ return true;
}
/*
* Return the string with interspersed CGJs. Input must have more than 2 codepoints.
*/
-static const UChar CGJ = 0x034F;
+static const char16_t CGJ = 0x034F;
UnicodeString AlphabeticIndex::separated(const UnicodeString &item) {
UnicodeString result;
if (item.length() == 0) {
@@ -875,40 +869,40 @@ AlphabeticIndex &AlphabeticIndex::setMaxLabelCount(int32_t maxLabelCount, UError
void AlphabeticIndex::init(const Locale *locale, UErrorCode &status) {
if (U_FAILURE(status)) { return; }
- if (locale == NULL && collator_ == NULL) {
+ if (locale == nullptr && collator_ == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
initialLabels_ = new UnicodeSet();
- if (initialLabels_ == NULL) {
+ if (initialLabels_ == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- inflowLabel_.setTo((UChar)0x2026); // Ellipsis
+ inflowLabel_.setTo((char16_t)0x2026); // Ellipsis
overflowLabel_ = inflowLabel_;
underflowLabel_ = inflowLabel_;
- if (collator_ == NULL) {
+ if (collator_ == nullptr) {
Collator *coll = Collator::createInstance(*locale, status);
if (U_FAILURE(status)) {
delete coll;
return;
}
- if (coll == NULL) {
+ if (coll == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
collator_ = dynamic_cast<RuleBasedCollator *>(coll);
- if (collator_ == NULL) {
+ if (collator_ == nullptr) {
delete coll;
status = U_UNSUPPORTED_ERROR;
return;
}
}
collatorPrimaryOnly_ = collator_->clone();
- if (collatorPrimaryOnly_ == NULL) {
+ if (collatorPrimaryOnly_ == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -936,7 +930,7 @@ void AlphabeticIndex::init(const Locale *locale, UErrorCode &status) {
// Chinese index characters, which are specific to each of the several Chinese tailorings,
// take precedence over the single locale data exemplar set per language.
- if (!addChineseIndexCharacters(status) && locale != NULL) {
+ if (!addChineseIndexCharacters(status) && locale != nullptr) {
addIndexExemplars(*locale, status);
}
}
@@ -953,13 +947,13 @@ collatorComparator(const void *context, const void *left, const void *right) {
const UnicodeString *rightString = static_cast<const UnicodeString *>(rightElement->pointer);
if (leftString == rightString) {
- // Catches case where both are NULL
+ // Catches case where both are nullptr
return 0;
}
- if (leftString == NULL) {
+ if (leftString == nullptr) {
return 1;
}
- if (rightString == NULL) {
+ if (rightString == nullptr) {
return -1;
}
const Collator *col = static_cast<const Collator *>(context);
@@ -983,11 +977,11 @@ recordCompareFn(const void *context, const void *left, const void *right) {
UVector *AlphabeticIndex::firstStringsInScript(UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
LocalPointer<UVector> dest(new UVector(status), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
dest->setDeleter(uprv_deleteUObject);
// Fetch the script-first-primary contractions which are defined in the root collator.
@@ -995,11 +989,11 @@ UVector *AlphabeticIndex::firstStringsInScript(UErrorCode &status) {
UnicodeSet set;
collatorPrimaryOnly_->internalAddContractions(0xFDD1, set, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (set.isEmpty()) {
status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
UnicodeSetIterator iter(set);
while (iter.next()) {
@@ -1011,12 +1005,11 @@ UVector *AlphabeticIndex::firstStringsInScript(UErrorCode &status) {
// and the one for unassigned implicit weights (Cn).
continue;
}
- UnicodeString *s = new UnicodeString(boundary);
- if (s == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ LocalPointer<UnicodeString> s(new UnicodeString(boundary), status);
+ dest->adoptElement(s.orphan(), status);
+ if (U_FAILURE(status)) {
+ return nullptr;
}
- dest->addElementX(s, status);
}
return dest.orphan();
}
@@ -1035,7 +1028,7 @@ UBool isOneLabelBetterThanOther(const Normalizer2 &nfkdNormalizer,
UErrorCode status = U_ZERO_ERROR;
UnicodeString n1 = nfkdNormalizer.normalize(one, status);
UnicodeString n2 = nfkdNormalizer.normalize(other, status);
- if (U_FAILURE(status)) { return FALSE; }
+ if (U_FAILURE(status)) { return false; }
int32_t result = n1.countChar32() - n2.countChar32();
if (result != 0) {
return result < 0;
@@ -1066,20 +1059,19 @@ AlphabeticIndex & AlphabeticIndex::addRecord(const UnicodeString &name, const vo
if (U_FAILURE(status)) {
return *this;
}
- if (inputList_ == NULL) {
- inputList_ = new UVector(status);
- if (inputList_ == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
+ if (inputList_ == nullptr) {
+ LocalPointer<UVector> inputList(new UVector(status), status);
+ if (U_FAILURE(status)) {
return *this;
}
+ inputList_ = inputList.orphan();
inputList_->setDeleter(alphaIndex_deleteRecord);
}
- Record *r = new Record(name, data);
- if (r == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
+ LocalPointer<Record> r(new Record(name, data), status);
+ inputList_->adoptElement(r.orphan(), status);
+ if (U_FAILURE(status)) {
return *this;
}
- inputList_->addElementX(r, status);
clearBuckets();
//std::string ss;
//std::string ss2;
@@ -1090,7 +1082,7 @@ AlphabeticIndex & AlphabeticIndex::addRecord(const UnicodeString &name, const vo
AlphabeticIndex &AlphabeticIndex::clearRecords(UErrorCode &status) {
- if (U_SUCCESS(status) && inputList_ != NULL && !inputList_->isEmpty()) {
+ if (U_SUCCESS(status) && inputList_ != nullptr && !inputList_->isEmpty()) {
inputList_->removeAllElements();
clearBuckets();
}
@@ -1113,28 +1105,28 @@ int32_t AlphabeticIndex::getBucketIndex() const {
UBool AlphabeticIndex::nextBucket(UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- if (buckets_ == NULL && currentBucket_ != NULL) {
+ if (buckets_ == nullptr && currentBucket_ != nullptr) {
status = U_ENUM_OUT_OF_SYNC_ERROR;
- return FALSE;
+ return false;
}
initBuckets(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
++labelsIterIndex_;
if (labelsIterIndex_ >= buckets_->getBucketCount()) {
labelsIterIndex_ = buckets_->getBucketCount();
- return FALSE;
+ return false;
}
currentBucket_ = getBucket(*buckets_->immutableVisibleList_, labelsIterIndex_);
resetRecordIterator();
- return TRUE;
+ return true;
}
const UnicodeString &AlphabeticIndex::getBucketLabel() const {
- if (currentBucket_ != NULL) {
+ if (currentBucket_ != nullptr) {
return currentBucket_->label_;
} else {
return emptyString_;
@@ -1143,7 +1135,7 @@ const UnicodeString &AlphabeticIndex::getBucketLabel() const {
UAlphabeticIndexLabelType AlphabeticIndex::getBucketLabelType() const {
- if (currentBucket_ != NULL) {
+ if (currentBucket_ != nullptr) {
return currentBucket_->labelType_;
} else {
return U_ALPHAINDEX_NORMAL;
@@ -1152,7 +1144,7 @@ UAlphabeticIndexLabelType AlphabeticIndex::getBucketLabelType() const {
int32_t AlphabeticIndex::getBucketRecordCount() const {
- if (currentBucket_ != NULL && currentBucket_->records_ != NULL) {
+ if (currentBucket_ != nullptr && currentBucket_->records_ != nullptr) {
return currentBucket_->records_->size();
} else {
return 0;
@@ -1171,33 +1163,33 @@ AlphabeticIndex &AlphabeticIndex::resetBucketIterator(UErrorCode &status) {
UBool AlphabeticIndex::nextRecord(UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- if (currentBucket_ == NULL) {
+ if (currentBucket_ == nullptr) {
// We are trying to iterate over the items in a bucket, but there is no
// current bucket from the enumeration of buckets.
status = U_INVALID_STATE_ERROR;
- return FALSE;
+ return false;
}
- if (buckets_ == NULL) {
+ if (buckets_ == nullptr) {
status = U_ENUM_OUT_OF_SYNC_ERROR;
- return FALSE;
+ return false;
}
- if (currentBucket_->records_ == NULL) {
- return FALSE;
+ if (currentBucket_->records_ == nullptr) {
+ return false;
}
++itemsIterIndex_;
if (itemsIterIndex_ >= currentBucket_->records_->size()) {
itemsIterIndex_ = currentBucket_->records_->size();
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
const UnicodeString &AlphabeticIndex::getRecordName() const {
const UnicodeString *retStr = &emptyString_;
- if (currentBucket_ != NULL && currentBucket_->records_ != NULL &&
+ if (currentBucket_ != nullptr && currentBucket_->records_ != nullptr &&
itemsIterIndex_ >= 0 &&
itemsIterIndex_ < currentBucket_->records_->size()) {
Record *item = static_cast<Record *>(currentBucket_->records_->elementAt(itemsIterIndex_));
@@ -1207,8 +1199,8 @@ const UnicodeString &AlphabeticIndex::getRecordName() const {
}
const void *AlphabeticIndex::getRecordData() const {
- const void *retPtr = NULL;
- if (currentBucket_ != NULL && currentBucket_->records_ != NULL &&
+ const void *retPtr = nullptr;
+ if (currentBucket_ != nullptr && currentBucket_->records_ != nullptr &&
itemsIterIndex_ >= 0 &&
itemsIterIndex_ < currentBucket_->records_->size()) {
Record *item = static_cast<Record *>(currentBucket_->records_->elementAt(itemsIterIndex_));
@@ -1229,8 +1221,8 @@ AlphabeticIndex::Bucket::Bucket(const UnicodeString &label,
const UnicodeString &lowerBoundary,
UAlphabeticIndexLabelType type)
: label_(label), lowerBoundary_(lowerBoundary), labelType_(type),
- displayBucket_(NULL), displayIndex_(-1),
- records_(NULL) {
+ displayBucket_(nullptr), displayIndex_(-1),
+ records_(nullptr) {
}
diff --git a/contrib/libs/icu/i18n/anytrans.cpp b/contrib/libs/icu/i18n/anytrans.cpp
index 167b0185285..4972b687333 100644
--- a/contrib/libs/icu/i18n/anytrans.cpp
+++ b/contrib/libs/icu/i18n/anytrans.cpp
@@ -29,11 +29,11 @@
//------------------------------------------------------------
// Constants
-static const UChar TARGET_SEP = 45; // '-'
-static const UChar VARIANT_SEP = 47; // '/'
-static const UChar ANY[] = {0x41,0x6E,0x79,0}; // "Any"
-static const UChar NULL_ID[] = {78,117,108,108,0}; // "Null"
-static const UChar LATIN_PIVOT[] = {0x2D,0x4C,0x61,0x74,0x6E,0x3B,0x4C,0x61,0x74,0x6E,0x2D,0}; // "-Latn;Latn-"
+static const char16_t TARGET_SEP = 45; // '-'
+static const char16_t VARIANT_SEP = 47; // '/'
+static const char16_t ANY[] = {0x41,0x6E,0x79,0}; // "Any"
+static const char16_t NULL_ID[] = {78,117,108,108,0}; // "Null"
+static const char16_t LATIN_PIVOT[] = {0x2D,0x4C,0x61,0x74,0x6E,0x3B,0x4C,0x61,0x74,0x6E,0x2D,0}; // "-Latn;Latn-"
// initial size for an Any-XXXX transform's cache of script-XXXX transforms
// (will grow as necessary, but we don't expect to have source text with more than 7 scripts)
@@ -101,7 +101,7 @@ public:
ScriptRunIterator(const Replaceable& text, int32_t start, int32_t limit);
/**
- * Returns TRUE if there are any more runs. TRUE is always
+ * Returns true if there are any more runs. true is always
* returned at least once. Upon return, the caller should
* examine scriptCode, start, and limit.
*/
@@ -137,7 +137,7 @@ UBool ScriptRunIterator::next() {
// Are we done?
if (start == textLimit) {
- return FALSE;
+ return false;
}
// Move start back to include adjacent COMMON or INHERITED
@@ -167,9 +167,9 @@ UBool ScriptRunIterator::next() {
++limit;
}
- // Return TRUE even if the entire text is COMMON / INHERITED, in
+ // Return true even if the entire text is COMMON / INHERITED, in
// which case scriptCode will be USCRIPT_INVALID_CODE.
- return TRUE;
+ return true;
}
void ScriptRunIterator::adjustLimit(int32_t delta) {
@@ -187,10 +187,10 @@ AnyTransliterator::AnyTransliterator(const UnicodeString& id,
const UnicodeString& theVariant,
UScriptCode theTargetScript,
UErrorCode& ec) :
- Transliterator(id, NULL),
+ Transliterator(id, nullptr),
targetScript(theTargetScript)
{
- cache = uhash_openSize(uhash_hashLong, uhash_compareLong, NULL, ANY_TRANS_CACHE_INIT_SIZE, &ec);
+ cache = uhash_openSize(uhash_hashLong, uhash_compareLong, nullptr, ANY_TRANS_CACHE_INIT_SIZE, &ec);
if (U_FAILURE(ec)) {
return;
}
@@ -216,7 +216,7 @@ AnyTransliterator::AnyTransliterator(const AnyTransliterator& o) :
{
// Don't copy the cache contents
UErrorCode ec = U_ZERO_ERROR;
- cache = uhash_openSize(uhash_hashLong, uhash_compareLong, NULL, ANY_TRANS_CACHE_INIT_SIZE, &ec);
+ cache = uhash_openSize(uhash_hashLong, uhash_compareLong, nullptr, ANY_TRANS_CACHE_INIT_SIZE, &ec);
if (U_FAILURE(ec)) {
return;
}
@@ -248,7 +248,7 @@ void AnyTransliterator::handleTransliterate(Replaceable& text, UTransPosition& p
// our target or target/variant
Transliterator* t = getTransliterator(it.scriptCode);
- if (t == NULL) {
+ if (t == nullptr) {
// We have no transliterator. Do nothing, but keep
// pos.start up to date.
pos.start = it.limit;
@@ -280,40 +280,40 @@ void AnyTransliterator::handleTransliterate(Replaceable& text, UTransPosition& p
Transliterator* AnyTransliterator::getTransliterator(UScriptCode source) const {
if (source == targetScript || source == USCRIPT_INVALID_CODE) {
- return NULL;
+ return nullptr;
}
- Transliterator* t = NULL;
+ Transliterator* t = nullptr;
{
- Mutex m(NULL);
+ Mutex m(nullptr);
t = (Transliterator*) uhash_iget(cache, (int32_t) source);
}
- if (t == NULL) {
+ if (t == nullptr) {
UErrorCode ec = U_ZERO_ERROR;
UnicodeString sourceName(uscript_getShortName(source), -1, US_INV);
UnicodeString id(sourceName);
id.append(TARGET_SEP).append(target);
t = Transliterator::createInstance(id, UTRANS_FORWARD, ec);
- if (U_FAILURE(ec) || t == NULL) {
+ if (U_FAILURE(ec) || t == nullptr) {
delete t;
// Try to pivot around Latin, our most common script
id = sourceName;
id.append(LATIN_PIVOT, -1).append(target);
t = Transliterator::createInstance(id, UTRANS_FORWARD, ec);
- if (U_FAILURE(ec) || t == NULL) {
+ if (U_FAILURE(ec) || t == nullptr) {
delete t;
- t = NULL;
+ t = nullptr;
}
}
- if (t != NULL) {
- Transliterator *rt = NULL;
+ if (t != nullptr) {
+ Transliterator *rt = nullptr;
{
- Mutex m(NULL);
+ Mutex m(nullptr);
rt = static_cast<Transliterator *> (uhash_iget(cache, (int32_t) source));
- if (rt == NULL) {
+ if (rt == nullptr) {
// Common case, no race to cache this new transliterator.
uhash_iput(cache, (int32_t) source, t, &ec);
} else {
@@ -341,7 +341,7 @@ static UScriptCode scriptNameToCode(const UnicodeString& name) {
if (isInvariant) {
name.extract(0, nameLen, buf, (int32_t)sizeof(buf), US_INV);
- buf[127] = 0; // Make sure that we NULL terminate the string.
+ buf[127] = 0; // Make sure that we nullptr terminate the string.
}
if (!isInvariant || uscript_getCode(buf, &code, 1, &ec) != 1 || U_FAILURE(ec))
{
@@ -358,7 +358,7 @@ static UScriptCode scriptNameToCode(const UnicodeString& name) {
void AnyTransliterator::registerIDs() {
UErrorCode ec = U_ZERO_ERROR;
- Hashtable seen(TRUE, ec);
+ Hashtable seen(true, ec);
int32_t sourceCount = Transliterator::_countAvailableSources();
for (int32_t s=0; s<sourceCount; ++s) {
@@ -389,7 +389,7 @@ void AnyTransliterator::registerIDs() {
Transliterator::_getAvailableVariant(v, source, target, variant);
UnicodeString id;
- TransliteratorIDParser::STVtoID(UnicodeString(TRUE, ANY, 3), target, variant, id);
+ TransliteratorIDParser::STVtoID(UnicodeString(true, ANY, 3), target, variant, id);
ec = U_ZERO_ERROR;
AnyTransliterator* tl = new AnyTransliterator(id, target, variant,
targetScript, ec);
@@ -397,7 +397,7 @@ void AnyTransliterator::registerIDs() {
delete tl;
} else {
Transliterator::_registerInstance(tl);
- Transliterator::_registerSpecialInverse(target, UnicodeString(TRUE, NULL_ID, 4), FALSE);
+ Transliterator::_registerSpecialInverse(target, UnicodeString(true, NULL_ID, 4), false);
}
}
}
diff --git a/contrib/libs/icu/i18n/anytrans.h b/contrib/libs/icu/i18n/anytrans.h
index 67ebb2e7d2f..9aa7eef2ce7 100644
--- a/contrib/libs/icu/i18n/anytrans.h
+++ b/contrib/libs/icu/i18n/anytrans.h
@@ -107,7 +107,7 @@ private:
/**
* Returns a transliterator from the given source to our target or
- * target/variant. Returns NULL if the source is the same as our
+ * target/variant. Returns nullptr if the source is the same as our
* target script, or if the source is USCRIPT_INVALID_CODE.
* Caches the result and returns the same transliterator the next
* time. The caller does NOT own the result and must not delete
diff --git a/contrib/libs/icu/i18n/astro.cpp b/contrib/libs/icu/i18n/astro.cpp
index 6dc463b4ca4..575efeb1758 100644
--- a/contrib/libs/icu/i18n/astro.cpp
+++ b/contrib/libs/icu/i18n/astro.cpp
@@ -44,8 +44,8 @@ static void debug_astro_msg(const char *pat, ...)
#include "unicode/ustring.h"
static const char * debug_astro_date(UDate d) {
static char gStrBuf[1024];
- static DateFormat *df = NULL;
- if(df == NULL) {
+ static DateFormat *df = nullptr;
+ if(df == nullptr) {
df = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::MEDIUM, Locale::getUS());
df->adoptTimeZone(TimeZone::getGMT()->clone());
}
@@ -68,8 +68,8 @@ static inline UBool isINVALID(double d) {
static icu::UMutex ccLock;
U_CDECL_BEGIN
-static UBool calendar_astro_cleanup(void) {
- return TRUE;
+static UBool calendar_astro_cleanup() {
+ return true;
}
U_CDECL_END
@@ -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()), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(false) {
clearCache();
}
@@ -252,7 +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) {
+CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(false) {
clearCache();
}
@@ -272,7 +272,7 @@ CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d), fLongitude(0.0), fLat
* @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) {
+ 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);
@@ -1069,7 +1069,7 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition()
// See page 142 of "Practical Astronomy with your Calculator",
// by Peter Duffet-Smith, for details on the algorithm.
//
- if (moonPositionSet == FALSE) {
+ if (moonPositionSet == false) {
// Calculate the solar longitude. Has the side effect of
// filling in "meanAnomalySun" as well.
getSunLongitude();
@@ -1138,7 +1138,7 @@ const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition()
double moonEclipLat = ::asin(y * ::sin(moonI));
eclipticToEquatorial(moonPosition, moonEclipLong, moonEclipLat);
- moonPositionSet = TRUE;
+ moonPositionSet = true;
}
return moonPosition;
}
@@ -1446,7 +1446,7 @@ void CalendarAstronomer::clearCache() {
eclipObliquity = INVALID;
siderealTime = INVALID;
siderealT0 = INVALID;
- moonPositionSet = FALSE;
+ moonPositionSet = false;
}
//private static void out(String s) {
@@ -1471,7 +1471,7 @@ void CalendarAstronomer::clearCache() {
int32_t rawOffset;
int32_t dstOffset;
UErrorCode status = U_ZERO_ERROR;
- tz->getOffset(localMillis, TRUE, rawOffset, dstOffset, status);
+ tz->getOffset(localMillis, true, rawOffset, dstOffset, status);
delete tz;
return localMillis - rawOffset;
}*/
@@ -1481,7 +1481,7 @@ UnicodeString CalendarAstronomer::Ecliptic::toString() const
{
#ifdef U_DEBUG_ASTRO
char tmp[800];
- sprintf(tmp, "[%.5f,%.5f]", longitude*RAD_DEG, latitude*RAD_DEG);
+ snprintf(tmp, sizeof(tmp), "[%.5f,%.5f]", longitude*RAD_DEG, latitude*RAD_DEG);
return UnicodeString(tmp, "");
#else
return UnicodeString();
@@ -1492,7 +1492,7 @@ UnicodeString CalendarAstronomer::Equatorial::toString() const
{
#ifdef U_DEBUG_ASTRO
char tmp[400];
- sprintf(tmp, "%f,%f",
+ snprintf(tmp, sizeof(tmp), "%f,%f",
(ascension*RAD_DEG), (declination*RAD_DEG));
return UnicodeString(tmp, "");
#else
@@ -1504,7 +1504,7 @@ UnicodeString CalendarAstronomer::Horizon::toString() const
{
#ifdef U_DEBUG_ASTRO
char tmp[800];
- sprintf(tmp, "[%.5f,%.5f]", altitude*RAD_DEG, azimuth*RAD_DEG);
+ snprintf(tmp, sizeof(tmp), "[%.5f,%.5f]", altitude*RAD_DEG, azimuth*RAD_DEG);
return UnicodeString(tmp, "");
#else
return UnicodeString();
@@ -1532,13 +1532,13 @@ UnicodeString CalendarAstronomer::Horizon::toString() const
void CalendarCache::createCache(CalendarCache** cache, UErrorCode& status) {
ucln_i18n_registerCleanup(UCLN_I18N_ASTRO_CALENDAR, calendar_astro_cleanup);
- if(cache == NULL) {
+ if(cache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
*cache = new CalendarCache(32, status);
if(U_FAILURE(status)) {
delete *cache;
- *cache = NULL;
+ *cache = nullptr;
}
}
}
@@ -1551,7 +1551,7 @@ int32_t CalendarCache::get(CalendarCache** cache, int32_t key, UErrorCode &statu
}
umtx_lock(&ccLock);
- if(*cache == NULL) {
+ if(*cache == nullptr) {
createCache(cache, status);
if(U_FAILURE(status)) {
umtx_unlock(&ccLock);
@@ -1572,7 +1572,7 @@ void CalendarCache::put(CalendarCache** cache, int32_t key, int32_t value, UErro
}
umtx_lock(&ccLock);
- if(*cache == NULL) {
+ if(*cache == nullptr) {
createCache(cache, status);
if(U_FAILURE(status)) {
umtx_unlock(&ccLock);
@@ -1587,12 +1587,12 @@ void CalendarCache::put(CalendarCache** cache, int32_t key, int32_t value, UErro
}
CalendarCache::CalendarCache(int32_t size, UErrorCode &status) {
- fTable = uhash_openSize(uhash_hashLong, uhash_compareLong, NULL, size, &status);
+ fTable = uhash_openSize(uhash_hashLong, uhash_compareLong, nullptr, size, &status);
U_DEBUG_ASTRO_MSG(("%p: Opening.\n", fTable));
}
CalendarCache::~CalendarCache() {
- if(fTable != NULL) {
+ if(fTable != nullptr) {
U_DEBUG_ASTRO_MSG(("%p: Closing.\n", fTable));
uhash_close(fTable);
}
diff --git a/contrib/libs/icu/i18n/basictz.cpp b/contrib/libs/icu/i18n/basictz.cpp
index 7b5449f4167..2490fadcc91 100644
--- a/contrib/libs/icu/i18n/basictz.cpp
+++ b/contrib/libs/icu/i18n/basictz.cpp
@@ -39,59 +39,59 @@ UBool
BasicTimeZone::hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UDate end,
UBool ignoreDstAmount, UErrorCode& status) const {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (hasSameRules(tz)) {
- return TRUE;
+ return true;
}
// Check the offsets at the start time
int32_t raw1, raw2, dst1, dst2;
- getOffset(start, FALSE, raw1, dst1, status);
+ getOffset(start, false, raw1, dst1, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- tz.getOffset(start, FALSE, raw2, dst2, status);
+ tz.getOffset(start, false, raw2, dst2, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (ignoreDstAmount) {
if ((raw1 + dst1 != raw2 + dst2)
|| (dst1 != 0 && dst2 == 0)
|| (dst1 == 0 && dst2 != 0)) {
- return FALSE;
+ return false;
}
} else {
if (raw1 != raw2 || dst1 != dst2) {
- return FALSE;
+ return false;
}
}
// Check transitions in the range
UDate time = start;
TimeZoneTransition tr1, tr2;
- while (TRUE) {
- UBool avail1 = getNextTransition(time, FALSE, tr1);
- UBool avail2 = tz.getNextTransition(time, FALSE, tr2);
+ while (true) {
+ UBool avail1 = getNextTransition(time, false, tr1);
+ UBool avail2 = tz.getNextTransition(time, false, tr2);
if (ignoreDstAmount) {
// Skip a transition which only differ the amount of DST savings
- while (TRUE) {
+ while (true) {
if (avail1
&& tr1.getTime() <= end
&& (tr1.getFrom()->getRawOffset() + tr1.getFrom()->getDSTSavings()
== tr1.getTo()->getRawOffset() + tr1.getTo()->getDSTSavings())
&& (tr1.getFrom()->getDSTSavings() != 0 && tr1.getTo()->getDSTSavings() != 0)) {
- getNextTransition(tr1.getTime(), FALSE, tr1);
+ getNextTransition(tr1.getTime(), false, tr1);
} else {
break;
}
}
- while (TRUE) {
+ while (true) {
if (avail2
&& tr2.getTime() <= end
&& (tr2.getFrom()->getRawOffset() + tr2.getFrom()->getDSTSavings()
== tr2.getTo()->getRawOffset() + tr2.getTo()->getDSTSavings())
&& (tr2.getFrom()->getDSTSavings() != 0 && tr2.getTo()->getDSTSavings() != 0)) {
- tz.getNextTransition(tr2.getTime(), FALSE, tr2);
+ tz.getNextTransition(tr2.getTime(), false, tr2);
} else {
break;
}
@@ -105,49 +105,49 @@ BasicTimeZone::hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UD
break;
}
if (!inRange1 || !inRange2) {
- return FALSE;
+ return false;
}
if (tr1.getTime() != tr2.getTime()) {
- return FALSE;
+ return false;
}
if (ignoreDstAmount) {
if (tr1.getTo()->getRawOffset() + tr1.getTo()->getDSTSavings()
!= tr2.getTo()->getRawOffset() + tr2.getTo()->getDSTSavings()
|| (tr1.getTo()->getDSTSavings() != 0 && tr2.getTo()->getDSTSavings() == 0)
|| (tr1.getTo()->getDSTSavings() == 0 && tr2.getTo()->getDSTSavings() != 0)) {
- return FALSE;
+ return false;
}
} else {
if (tr1.getTo()->getRawOffset() != tr2.getTo()->getRawOffset() ||
tr1.getTo()->getDSTSavings() != tr2.getTo()->getDSTSavings()) {
- return FALSE;
+ return false;
}
}
time = tr1.getTime();
}
- return TRUE;
+ return true;
}
void
BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const {
- initial = NULL;
- std = NULL;
- dst = NULL;
+ initial = nullptr;
+ std = nullptr;
+ dst = nullptr;
if (U_FAILURE(status)) {
return;
}
int32_t initialRaw, initialDst;
UnicodeString initialName;
- AnnualTimeZoneRule *ar1 = NULL;
- AnnualTimeZoneRule *ar2 = NULL;
+ AnnualTimeZoneRule *ar1 = nullptr;
+ AnnualTimeZoneRule *ar2 = nullptr;
UnicodeString name;
UBool avail;
TimeZoneTransition tr;
// Get the next transition
- avail = getNextTransition(date, FALSE, tr);
+ avail = getNextTransition(date, false, tr);
if (avail) {
tr.getFrom()->getName(initialName);
initialRaw = tr.getFrom()->getRawOffset();
@@ -182,7 +182,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
if (tr.getTo()->getRawOffset() == initialRaw) {
// Get the next next transition
- avail = getNextTransition(nextTransitionTime, FALSE, tr);
+ avail = getNextTransition(nextTransitionTime, false, tr);
if (avail) {
// Check if the next next transition is either DST->STD or STD->DST
// and within roughly 1 year from the next transition
@@ -201,20 +201,20 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
dtr, year - 1, AnnualTimeZoneRule::MAX_YEAR);
// Make sure this rule can be applied to the specified date
- avail = ar2->getPreviousStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), TRUE, d);
+ avail = ar2->getPreviousStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), true, d);
if (!avail || d > date
|| initialRaw != tr.getTo()->getRawOffset()
|| initialDst != tr.getTo()->getDSTSavings()) {
// We cannot use this rule as the second transition rule
delete ar2;
- ar2 = NULL;
+ ar2 = nullptr;
}
}
}
}
- if (ar2 == NULL) {
+ if (ar2 == nullptr) {
// Try previous transition
- avail = getPreviousTransition(date, TRUE, tr);
+ avail = getPreviousTransition(date, true, tr);
if (avail) {
// Check if the previous transition is either DST->STD or STD->DST.
// The actual transition time does not matter here.
@@ -234,19 +234,19 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
dtr, ar1->getStartYear() - 1, AnnualTimeZoneRule::MAX_YEAR);
// Check if this rule start after the first rule after the specified date
- avail = ar2->getNextStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), FALSE, d);
+ avail = ar2->getNextStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), false, d);
if (!avail || d <= nextTransitionTime) {
// We cannot use this rule as the second transition rule
delete ar2;
- ar2 = NULL;
+ ar2 = nullptr;
}
}
}
}
- if (ar2 == NULL) {
+ if (ar2 == nullptr) {
// Cannot find a good pair of AnnualTimeZoneRule
delete ar1;
- ar1 = NULL;
+ ar1 = nullptr;
} else {
// The initial rule should represent the rule before the previous transition
ar1->getName(initialName);
@@ -257,14 +257,14 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
}
else {
// Try the previous one
- avail = getPreviousTransition(date, TRUE, tr);
+ avail = getPreviousTransition(date, true, tr);
if (avail) {
tr.getTo()->getName(initialName);
initialRaw = tr.getTo()->getRawOffset();
initialDst = tr.getTo()->getDSTSavings();
} else {
// No transitions in the past. Just use the current offsets
- getOffset(date, FALSE, initialRaw, initialDst, status);
+ getOffset(date, false, initialRaw, initialDst, status);
if (U_FAILURE(status)) {
return;
}
@@ -274,7 +274,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
initial = new InitialTimeZoneRule(initialName, initialRaw, initialDst);
// Set the standard and daylight saving rules
- if (ar1 != NULL && ar2 != NULL) {
+ if (ar1 != nullptr && ar2 != nullptr) {
if (ar1->getDSTSavings() != 0) {
dst = ar1;
std = ar2;
@@ -334,7 +334,7 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial,
}
}
- avail = getPreviousTransition(start, TRUE, tzt);
+ avail = getPreviousTransition(start, true, tzt);
if (!avail) {
// No need to filter out rules only applicable to time before the start
initial = orgini->clone();
@@ -368,13 +368,13 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial,
// Mark rules which does not need to be processed
for (i = 0; i < ruleCount; i++) {
r = (TimeZoneRule*)orgRules->elementAt(i);
- avail = r->getNextStart(start, res_initial->getRawOffset(), res_initial->getDSTSavings(), FALSE, time);
+ avail = r->getNextStart(start, res_initial->getRawOffset(), res_initial->getDSTSavings(), false, time);
done[i] = !avail;
}
time = start;
while (!bFinalStd || !bFinalDst) {
- avail = getNextTransition(time, FALSE, tzt);
+ avail = getNextTransition(time, false, tzt);
if (!avail) {
break;
}
@@ -405,12 +405,12 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial,
}
const TimeArrayTimeZoneRule *tar = dynamic_cast<const TimeArrayTimeZoneRule *>(toRule);
const AnnualTimeZoneRule *ar;
- if (tar != NULL) {
+ if (tar != nullptr) {
// Get the previous raw offset and DST savings before the very first start time
TimeZoneTransition tzt0;
t = start;
- while (TRUE) {
- avail = getNextTransition(t, FALSE, tzt0);
+ while (true) {
+ avail = getNextTransition(t, false, tzt0);
if (!avail) {
break;
}
@@ -472,7 +472,7 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial,
}
}
}
- } else if ((ar = dynamic_cast<const AnnualTimeZoneRule *>(toRule)) != NULL) {
+ } else if ((ar = dynamic_cast<const AnnualTimeZoneRule *>(toRule)) != nullptr) {
ar->getFirstStart(tzt.getFrom()->getRawOffset(), tzt.getFrom()->getDSTSavings(), firstStart);
if (firstStart == tzt.getTime()) {
// Just add the rule as is
@@ -499,9 +499,9 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial,
// After bot final standard and dst rules are processed,
// exit this while loop.
if (ar->getDSTSavings() == 0) {
- bFinalStd = TRUE;
+ bFinalStd = true;
} else {
- bFinalDst = TRUE;
+ bFinalDst = true;
}
}
}
diff --git a/contrib/libs/icu/i18n/bocsu.cpp b/contrib/libs/icu/i18n/bocsu.cpp
index 861a76a0427..585415643ba 100644
--- a/contrib/libs/icu/i18n/bocsu.cpp
+++ b/contrib/libs/icu/i18n/bocsu.cpp
@@ -98,7 +98,7 @@ u_writeDiff(int32_t diff, uint8_t *p) {
* NFD text - there are never Hangul characters included.
*/
U_CFUNC UChar32
-u_writeIdenticalLevelRun(UChar32 prev, const UChar *s, int32_t length, icu::ByteSink &sink) {
+u_writeIdenticalLevelRun(UChar32 prev, const char16_t *s, int32_t length, icu::ByteSink &sink) {
char scratch[64];
int32_t capacity;
diff --git a/contrib/libs/icu/i18n/brktrans.cpp b/contrib/libs/icu/i18n/brktrans.cpp
index f0ec8407db2..1ec0b2ad441 100644
--- a/contrib/libs/icu/i18n/brktrans.cpp
+++ b/contrib/libs/icu/i18n/brktrans.cpp
@@ -34,7 +34,7 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(BreakTransliterator)
-static const UChar SPACE = 32; // ' '
+static const char16_t SPACE = 32; // ' '
/**
@@ -43,7 +43,7 @@ static const UChar SPACE = 32; // ' '
*/
BreakTransliterator::BreakTransliterator(UnicodeFilter* adoptedFilter) :
Transliterator(UNICODE_STRING("Any-BreakInternal", 17), adoptedFilter),
- cachedBI(NULL), cachedBoundaries(NULL), fInsertion(SPACE) {
+ cachedBI(nullptr), cachedBoundaries(nullptr), fInsertion(SPACE) {
}
@@ -57,7 +57,7 @@ BreakTransliterator::~BreakTransliterator() {
* Copy constructor.
*/
BreakTransliterator::BreakTransliterator(const BreakTransliterator& o) :
- Transliterator(o), cachedBI(NULL), cachedBoundaries(NULL), fInsertion(o.fInsertion) {
+ Transliterator(o), cachedBI(nullptr), cachedBoundaries(nullptr), fInsertion(o.fInsertion) {
}
@@ -182,7 +182,7 @@ void BreakTransliterator::setInsertion(const UnicodeString &insertion) {
UnicodeString BreakTransliterator::replaceableAsString(Replaceable &r) {
UnicodeString s;
UnicodeString *rs = dynamic_cast<UnicodeString *>(&r);
- if (rs != NULL) {
+ if (rs != nullptr) {
s = *rs;
} else {
r.extractBetween(0, r.length(), s);
diff --git a/contrib/libs/icu/i18n/buddhcal.cpp b/contrib/libs/icu/i18n/buddhcal.cpp
index 6083349ecd6..dc14af00bf9 100644
--- a/contrib/libs/icu/i18n/buddhcal.cpp
+++ b/contrib/libs/icu/i18n/buddhcal.cpp
@@ -78,13 +78,6 @@ int32_t BuddhistCalendar::handleGetExtendedYear()
return year;
}
-int32_t BuddhistCalendar::handleComputeMonthStart(int32_t eyear, int32_t month,
-
- UBool useMonth) const
-{
- return GregorianCalendar::handleComputeMonthStart(eyear, month, useMonth);
-}
-
void BuddhistCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status)
{
GregorianCalendar::handleComputeFields(julianDay, status);
@@ -133,12 +126,12 @@ void BuddhistCalendar::timeToFields(UDate theTime, UBool quick, UErrorCode& stat
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gBCInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gBCInitOnce {};
UBool BuddhistCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
static void U_CALLCONV
diff --git a/contrib/libs/icu/i18n/buddhcal.h b/contrib/libs/icu/i18n/buddhcal.h
index 2ef5c524935..01b59341c12 100644
--- a/contrib/libs/icu/i18n/buddhcal.h
+++ b/contrib/libs/icu/i18n/buddhcal.h
@@ -107,7 +107,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -120,7 +120,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "buddhist".
@@ -157,21 +157,6 @@ private:
* @internal
*/
virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override;
- /**
- * Return the Julian day number of day before the first day of the
- * given month in the given extended year. Subclasses should override
- * this method to implement their calendar system.
- * @param eyear the extended year
- * @param month the zero-based month, or 0 if useMonth is false
- * @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 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;
/**
* Returns true because the Buddhist Calendar does have a default century
diff --git a/contrib/libs/icu/i18n/calendar.cpp b/contrib/libs/icu/i18n/calendar.cpp
index 8405d08d3cf..72d5d10ed5f 100644
--- a/contrib/libs/icu/i18n/calendar.cpp
+++ b/contrib/libs/icu/i18n/calendar.cpp
@@ -22,7 +22,7 @@
* 07/28/98 stephen Sync up with JDK 1.2
* 09/02/98 stephen Sync with JDK 1.2 8/31 build (getActualMin/Max)
* 03/17/99 stephen Changed adoptTimeZone() - now fAreFieldsSet is
-* set to FALSE to force update of time.
+* set to false to force update of time.
*******************************************************************************
*/
@@ -45,6 +45,7 @@
#include "hebrwcal.h"
#include "persncal.h"
#include "indiancal.h"
+#include "iso8601cal.h"
#include "chnsecal.h"
#include "coptccal.h"
#include "dangical.h"
@@ -64,20 +65,20 @@
#include "ulocimp.h"
#if !UCONFIG_NO_SERVICE
-static icu::ICULocaleService* gService = NULL;
-static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+static icu::ICULocaleService* gService = nullptr;
+static icu::UInitOnce gServiceInitOnce {};
// INTERNAL - for cleanup
U_CDECL_BEGIN
-static UBool calendar_cleanup(void) {
+static UBool calendar_cleanup() {
#if !UCONFIG_NO_SERVICE
if (gService) {
delete gService;
- gService = NULL;
+ gService = nullptr;
}
gServiceInitOnce.reset();
#endif
- return TRUE;
+ return true;
}
U_CDECL_END
#endif
@@ -175,7 +176,7 @@ static const char * const gCalTypes[] = {
"islamic-umalqura",
"islamic-tbla",
"islamic-rgsa",
- NULL
+ nullptr
};
// Must be in the order of gCalTypes above
@@ -210,22 +211,25 @@ SharedCalendar::~SharedCalendar() {
template<> U_I18N_API
const SharedCalendar *LocaleCacheKey<SharedCalendar>::createObject(
const void * /*unusedCreationContext*/, UErrorCode &status) const {
+ if (U_FAILURE(status)) {
+ return nullptr;
+ }
Calendar *calendar = Calendar::makeInstance(fLoc, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
SharedCalendar *shared = new SharedCalendar(calendar);
- if (shared == NULL) {
+ if (shared == nullptr) {
delete calendar;
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
shared->addRef();
return shared;
}
static ECalType getCalendarType(const char *s) {
- for (int i = 0; gCalTypes[i] != NULL; i++) {
+ for (int i = 0; gCalTypes[i] != nullptr; i++) {
if (uprv_stricmp(s, gCalTypes[i]) == 0) {
return (ECalType)i;
}
@@ -237,7 +241,7 @@ static ECalType getCalendarType(const char *s) {
// Only used with service registration.
static UBool isStandardSupportedKeyword(const char *keyword, UErrorCode& status) {
if(U_FAILURE(status)) {
- return FALSE;
+ return false;
}
ECalType calType = getCalendarType(keyword);
return (calType != CALTYPE_UNKNOWN);
@@ -249,7 +253,7 @@ static void getCalendarKeyword(const UnicodeString &id, char *targetBuffer, int3
int32_t calKeyLen = calendarKeyword.length();
int32_t keyLen = 0;
- int32_t keywordIdx = id.indexOf((UChar)0x003D); /* '=' */
+ int32_t keywordIdx = id.indexOf((char16_t)0x003D); /* '=' */
if (id[0] == 0x40/*'@'*/
&& id.compareBetween(1, keywordIdx+1, calendarKeyword, 0, calKeyLen) == 0)
{
@@ -292,25 +296,25 @@ 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);
+ (void)ulocimp_getRegionForSupplementalData(canonicalName, true, region, sizeof(region), &status);
if (U_FAILURE(status)) {
return CALTYPE_GREGORIAN;
}
// Read preferred calendar values from supplementalData calendarPreference
- UResourceBundle *rb = ures_openDirect(NULL, "supplementalData", &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", &status);
ures_getByKey(rb, "calendarPreferenceData", rb, &status);
- UResourceBundle *order = ures_getByKey(rb, region, NULL, &status);
- if (status == U_MISSING_RESOURCE_ERROR && rb != NULL) {
+ UResourceBundle *order = ures_getByKey(rb, region, nullptr, &status);
+ if (status == U_MISSING_RESOURCE_ERROR && rb != nullptr) {
status = U_ZERO_ERROR;
- order = ures_getByKey(rb, "001", NULL, &status);
+ order = ures_getByKey(rb, "001", nullptr, &status);
}
calTypeBuf[0] = 0;
- if (U_SUCCESS(status) && order != NULL) {
+ if (U_SUCCESS(status) && order != nullptr) {
// the first calendar type is the default for the region
int32_t len = 0;
- const UChar *uCalType = ures_getStringByIndex(order, 0, &len, &status);
+ 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;
@@ -351,18 +355,19 @@ static Calendar *createStandardCalendar(ECalType calType, const Locale &loc, UEr
cal.adoptInsteadAndCheckErrorCode(new PersianCalendar(loc, status), status);
break;
case CALTYPE_ISLAMIC_TBLA:
- cal.adoptInsteadAndCheckErrorCode(new IslamicCalendar(loc, status, IslamicCalendar::TBLA), status);
+ cal.adoptInsteadAndCheckErrorCode(new IslamicTBLACalendar(loc, status), status);
break;
case CALTYPE_ISLAMIC_CIVIL:
- cal.adoptInsteadAndCheckErrorCode(new IslamicCalendar(loc, status, IslamicCalendar::CIVIL), status);
+ cal.adoptInsteadAndCheckErrorCode(new IslamicCivilCalendar(loc, status), status);
break;
case CALTYPE_ISLAMIC_RGSA:
- // default any region specific not handled individually to islamic
+ cal.adoptInsteadAndCheckErrorCode(new IslamicRGSACalendar(loc, status), status);
+ break;
case CALTYPE_ISLAMIC:
- cal.adoptInsteadAndCheckErrorCode(new IslamicCalendar(loc, status, IslamicCalendar::ASTRONOMICAL), status);
+ cal.adoptInsteadAndCheckErrorCode(new IslamicCalendar(loc, status), status);
break;
case CALTYPE_ISLAMIC_UMALQURA:
- cal.adoptInsteadAndCheckErrorCode(new IslamicCalendar(loc, status, IslamicCalendar::UMALQURA), status);
+ cal.adoptInsteadAndCheckErrorCode(new IslamicUmalquraCalendar(loc, status), status);
break;
case CALTYPE_HEBREW:
cal.adoptInsteadAndCheckErrorCode(new HebrewCalendar(loc, status), status);
@@ -377,17 +382,13 @@ static Calendar *createStandardCalendar(ECalType calType, const Locale &loc, UEr
cal.adoptInsteadAndCheckErrorCode(new CopticCalendar(loc, status), status);
break;
case CALTYPE_ETHIOPIC:
- cal.adoptInsteadAndCheckErrorCode(new EthiopicCalendar(loc, status, EthiopicCalendar::AMETE_MIHRET_ERA), status);
+ cal.adoptInsteadAndCheckErrorCode(new EthiopicCalendar(loc, status), status);
break;
case CALTYPE_ETHIOPIC_AMETE_ALEM:
- cal.adoptInsteadAndCheckErrorCode(new EthiopicCalendar(loc, status, EthiopicCalendar::AMETE_ALEM_ERA), status);
+ cal.adoptInsteadAndCheckErrorCode(new EthiopicAmeteAlemCalendar(loc, status), status);
break;
case CALTYPE_ISO8601:
- cal.adoptInsteadAndCheckErrorCode(new GregorianCalendar(loc, status), status);
- if (cal.isValid()) {
- cal->setFirstDayOfWeek(UCAL_MONDAY);
- cal->setMinimalDaysInFirstWeek(4);
- }
+ cal.adoptInsteadAndCheckErrorCode(new ISO8601Calendar(loc, status), status);
break;
case CALTYPE_DANGI:
cal.adoptInsteadAndCheckErrorCode(new DangiCalendar(loc, status), status);
@@ -420,7 +421,7 @@ public:
protected:
//virtual UBool isSupportedID( const UnicodeString& id, UErrorCode& status) const {
// if(U_FAILURE(status)) {
- // return FALSE;
+ // return false;
// }
// char keyword[ULOC_FULLNAME_CAPACITY];
// getCalendarKeyword(id, keyword, (int32_t)sizeof(keyword));
@@ -430,8 +431,8 @@ protected:
virtual void updateVisibleIDs(Hashtable& result, UErrorCode& status) const override
{
if (U_SUCCESS(status)) {
- for(int32_t i=0;gCalTypes[i] != NULL;i++) {
- UnicodeString id((UChar)0x40); /* '@' a variant character */
+ for(int32_t i=0;gCalTypes[i] != nullptr;i++) {
+ UnicodeString id((char16_t)0x40); /* '@' a variant character */
id.append(UNICODE_STRING_SIMPLE("calendar="));
id.append(UnicodeString(gCalTypes[i], -1, US_INV));
result.put(id, (void*)this, status);
@@ -440,17 +441,21 @@ protected:
}
virtual UObject* create(const ICUServiceKey& key, const ICUService* /*service*/, UErrorCode& status) const override {
+ if (U_FAILURE(status)) {
+ return nullptr;
+ }
#ifdef U_DEBUG_CALSVC
- if(dynamic_cast<const LocaleKey*>(&key) == NULL) {
+ if(dynamic_cast<const LocaleKey*>(&key) == nullptr) {
fprintf(stderr, "::create - not a LocaleKey!\n");
}
#endif
- const LocaleKey& lkey = (LocaleKey&)key;
+ const LocaleKey* lkey = dynamic_cast<const LocaleKey*>(&key);
+ U_ASSERT(lkey != nullptr);
Locale curLoc; // current locale
Locale canLoc; // Canonical locale
- lkey.currentLocale(curLoc);
- lkey.canonicalLocale(canLoc);
+ lkey->currentLocale(curLoc);
+ lkey->canonicalLocale(canLoc);
char keyword[ULOC_FULLNAME_CAPACITY];
UnicodeString str;
@@ -467,7 +472,7 @@ protected:
fprintf(stderr, "BasicCalendarFactory - not handling %s.[%s]\n", (const char*) curLoc.getName(), tmp );
#endif
- return NULL;
+ return nullptr;
}
return createStandardCalendar(getCalendarType(keyword), canLoc, status);
@@ -486,16 +491,20 @@ public:
virtual ~DefaultCalendarFactory();
protected:
virtual UObject* create(const ICUServiceKey& key, const ICUService* /*service*/, UErrorCode& status) const override {
+ if (U_FAILURE(status)) {
+ return nullptr;
+ }
- LocaleKey &lkey = (LocaleKey&)key;
+ const LocaleKey *lkey = dynamic_cast<const LocaleKey*>(&key);
+ U_ASSERT(lkey != nullptr);
Locale loc;
- lkey.currentLocale(loc);
+ lkey->currentLocale(loc);
UnicodeString *ret = new UnicodeString();
- if (ret == NULL) {
+ if (ret == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
- ret->append((UChar)0x40); // '@' is a variant character
+ ret->append((char16_t)0x40); // '@' is a variant character
ret->append(UNICODE_STRING("calendar=", 9));
ret->append(UnicodeString(gCalTypes[getCalendarTypeForLocale(loc.getName())], -1, US_INV));
}
@@ -519,7 +528,7 @@ public:
virtual UObject* cloneInstance(UObject* instance) const override {
UnicodeString *s = dynamic_cast<UnicodeString *>(instance);
- if(s != NULL) {
+ if(s != nullptr) {
return s->clone();
} else {
#ifdef U_DEBUG_CALSVC_F
@@ -531,7 +540,10 @@ public:
}
virtual UObject* handleDefault(const ICUServiceKey& key, UnicodeString* /*actualID*/, UErrorCode& status) const override {
- LocaleKey& lkey = (LocaleKey&)key;
+ if (U_FAILURE(status)) {
+ return nullptr;
+ }
+ LocaleKey& lkey = static_cast<LocaleKey&>(const_cast<ICUServiceKey&>(key));
//int32_t kind = lkey.kind();
Locale loc;
@@ -577,9 +589,12 @@ initCalendarService(UErrorCode &status)
#ifdef U_DEBUG_CALSVC
fprintf(stderr, "Spinning up Calendar Service\n");
#endif
+ if (U_FAILURE(status)) {
+ return;
+ }
ucln_i18n_registerCleanup(UCLN_I18N_CALENDAR, calendar_cleanup);
gService = new CalendarService();
- if (gService == NULL) {
+ if (gService == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -599,7 +614,7 @@ initCalendarService(UErrorCode &status)
fprintf(stderr, "err (%s) registering classes, deleting service.....\n", u_errorName(status));
#endif
delete gService;
- gService = NULL;
+ gService = nullptr;
}
}
@@ -639,14 +654,15 @@ static const int32_t kCalendarLimits[UCAL_FIELD_COUNT][4] = {
{ 0, 0, 59, 59 }, // MINUTE
{ 0, 0, 59, 59 }, // SECOND
{ 0, 0, 999, 999 }, // MILLISECOND
- {-12*kOneHour, -12*kOneHour, 12*kOneHour, 15*kOneHour }, // ZONE_OFFSET
- { 0, 0, 1*kOneHour, 1*kOneHour }, // DST_OFFSET
+ {-16*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
{/*N/A*/-1, /*N/A*/-1, /*N/A*/-1, /*N/A*/-1}, // EXTENDED_YEAR
{ -0x7F000000, -0x7F000000, 0x7F000000, 0x7F000000 }, // JULIAN_DAY
{ 0, 0, 24*kOneHour-1, 24*kOneHour-1 }, // MILLISECONDS_IN_DAY
{ 0, 0, 1, 1 }, // IS_LEAP_MONTH
+ { 0, 0, 11, 11 } // ORDINAL_MONTH
};
// Resource bundle tags read by this class
@@ -708,14 +724,14 @@ static const char gGregorian[] = "gregorian";
Calendar::Calendar(UErrorCode& success)
: UObject(),
-fIsTimeSet(FALSE),
-fAreFieldsSet(FALSE),
-fAreAllFieldsSet(FALSE),
-fAreFieldsVirtuallySet(FALSE),
+fIsTimeSet(false),
+fAreFieldsSet(false),
+fAreAllFieldsSet(false),
+fAreFieldsVirtuallySet(false),
fNextStamp((int32_t)kMinimumUserStamp),
fTime(0),
-fLenient(TRUE),
-fZone(NULL),
+fLenient(true),
+fZone(nullptr),
fRepeatedWallTime(UCAL_WALLTIME_LAST),
fSkippedWallTime(UCAL_WALLTIME_LAST)
{
@@ -726,24 +742,24 @@ fSkippedWallTime(UCAL_WALLTIME_LAST)
return;
}
fZone = TimeZone::createDefault();
- if (fZone == NULL) {
+ if (fZone == nullptr) {
success = U_MEMORY_ALLOCATION_ERROR;
}
- setWeekData(Locale::getDefault(), NULL, success);
+ setWeekData(Locale::getDefault(), nullptr, success);
}
// -------------------------------------
Calendar::Calendar(TimeZone* zone, const Locale& aLocale, UErrorCode& success)
: UObject(),
-fIsTimeSet(FALSE),
-fAreFieldsSet(FALSE),
-fAreAllFieldsSet(FALSE),
-fAreFieldsVirtuallySet(FALSE),
+fIsTimeSet(false),
+fAreFieldsSet(false),
+fAreAllFieldsSet(false),
+fAreFieldsVirtuallySet(false),
fNextStamp((int32_t)kMinimumUserStamp),
fTime(0),
-fLenient(TRUE),
-fZone(NULL),
+fLenient(true),
+fZone(nullptr),
fRepeatedWallTime(UCAL_WALLTIME_LAST),
fSkippedWallTime(UCAL_WALLTIME_LAST)
{
@@ -764,21 +780,21 @@ fSkippedWallTime(UCAL_WALLTIME_LAST)
clear();
fZone = zone;
- setWeekData(aLocale, NULL, success);
+ setWeekData(aLocale, nullptr, success);
}
// -------------------------------------
Calendar::Calendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success)
: UObject(),
-fIsTimeSet(FALSE),
-fAreFieldsSet(FALSE),
-fAreAllFieldsSet(FALSE),
-fAreFieldsVirtuallySet(FALSE),
+fIsTimeSet(false),
+fAreFieldsSet(false),
+fAreAllFieldsSet(false),
+fAreFieldsVirtuallySet(false),
fNextStamp((int32_t)kMinimumUserStamp),
fTime(0),
-fLenient(TRUE),
-fZone(NULL),
+fLenient(true),
+fZone(nullptr),
fRepeatedWallTime(UCAL_WALLTIME_LAST),
fSkippedWallTime(UCAL_WALLTIME_LAST)
{
@@ -789,10 +805,10 @@ fSkippedWallTime(UCAL_WALLTIME_LAST)
}
clear();
fZone = zone.clone();
- if (fZone == NULL) {
+ if (fZone == nullptr) {
success = U_MEMORY_ALLOCATION_ERROR;
}
- setWeekData(aLocale, NULL, success);
+ setWeekData(aLocale, nullptr, success);
}
// -------------------------------------
@@ -807,7 +823,7 @@ Calendar::~Calendar()
Calendar::Calendar(const Calendar &source)
: UObject(source)
{
- fZone = NULL;
+ fZone = nullptr;
*this = source;
}
@@ -829,8 +845,8 @@ Calendar::operator=(const Calendar &right)
fRepeatedWallTime = right.fRepeatedWallTime;
fSkippedWallTime = right.fSkippedWallTime;
delete fZone;
- fZone = NULL;
- if (right.fZone != NULL) {
+ fZone = nullptr;
+ if (right.fZone != nullptr) {
fZone = right.fZone->clone();
}
fFirstDayOfWeek = right.fFirstDayOfWeek;
@@ -880,11 +896,11 @@ Calendar::createInstance(const Locale& aLocale, UErrorCode& success)
Calendar * U_EXPORT2
Calendar::makeInstance(const Locale& aLocale, UErrorCode& success) {
if (U_FAILURE(success)) {
- return NULL;
+ return nullptr;
}
Locale actualLoc;
- UObject* u = NULL;
+ UObject* u = nullptr;
#if !UCONFIG_NO_SERVICE
if (isCalendarServiceUsed()) {
@@ -895,18 +911,18 @@ Calendar::makeInstance(const Locale& aLocale, UErrorCode& success) {
{
u = createStandardCalendar(getCalendarTypeForLocale(aLocale.getName()), aLocale, success);
}
- Calendar* c = NULL;
+ Calendar* c = nullptr;
if(U_FAILURE(success) || !u) {
if(U_SUCCESS(success)) { // Propagate some kind of err
success = U_INTERNAL_PROGRAM_ERROR;
}
- return NULL;
+ return nullptr;
}
#if !UCONFIG_NO_SERVICE
const UnicodeString* str = dynamic_cast<const UnicodeString*>(u);
- if(str != NULL) {
+ if(str != nullptr) {
// It's a unicode string telling us what type of calendar to load ("gregorian", etc)
// Create a Locale over this string
Locale l("");
@@ -918,7 +934,7 @@ Calendar::makeInstance(const Locale& aLocale, UErrorCode& success) {
Locale actualLoc2;
delete u;
- u = NULL;
+ u = nullptr;
// Don't overwrite actualLoc, since the actual loc from this call
// may be something like "@calendar=gregorian" -- TODO investigate
@@ -929,11 +945,11 @@ Calendar::makeInstance(const Locale& aLocale, UErrorCode& success) {
if(U_SUCCESS(success)) {
success = U_INTERNAL_PROGRAM_ERROR; // Propagate some err
}
- return NULL;
+ return nullptr;
}
str = dynamic_cast<const UnicodeString*>(c);
- if(str != NULL) {
+ if(str != nullptr) {
// recursed! Second lookup returned a UnicodeString.
// Perhaps DefaultCalendar{} was set to another locale.
#ifdef U_DEBUG_CALSVC
@@ -951,7 +967,7 @@ Calendar::makeInstance(const Locale& aLocale, UErrorCode& success) {
#endif
success = U_MISSING_RESOURCE_ERROR; // requested a calendar type which could NOT be found.
delete c;
- return NULL;
+ return nullptr;
}
#ifdef U_DEBUG_CALSVC
fprintf(stderr, "%p: setting week count data to locale %s, actual locale %s\n", c, (const char*)aLocale.getName(), (const char *)actualLoc.getName());
@@ -980,16 +996,16 @@ Calendar* U_EXPORT2
Calendar::createInstance(TimeZone* zone, const Locale& aLocale, UErrorCode& success)
{
LocalPointer<TimeZone> zonePtr(zone);
- const SharedCalendar *shared = NULL;
+ const SharedCalendar *shared = nullptr;
UnifiedCache::getByLocale(aLocale, shared, success);
if (U_FAILURE(success)) {
- return NULL;
+ return nullptr;
}
Calendar *c = (*shared)->clone();
shared->removeRef();
- if (c == NULL) {
+ if (c == nullptr) {
success = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// Now, reset calendar to default state:
@@ -1019,7 +1035,7 @@ Calendar::getCalendarTypeFromLocale(
char *typeBuffer,
int32_t typeBufferSize,
UErrorCode &success) {
- const SharedCalendar *shared = NULL;
+ const SharedCalendar *shared = nullptr;
UnifiedCache::getByLocale(aLocale, shared, success);
if (U_FAILURE(success)) {
return;
@@ -1103,7 +1119,7 @@ Calendar::getKeywordValuesForLocale(const char* key,
commonlyUsed, &status);
if (U_FAILURE(status)) {
uenum_close(uenum);
- return NULL;
+ return nullptr;
}
UStringEnumeration* ustringenum = new UStringEnumeration(uenum);
if (ustringenum == nullptr) {
@@ -1173,13 +1189,13 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) {
}
fTime = millis;
- fAreFieldsSet = fAreAllFieldsSet = FALSE;
- fIsTimeSet = fAreFieldsVirtuallySet = TRUE;
+ fAreFieldsSet = fAreAllFieldsSet = false;
+ fIsTimeSet = fAreFieldsVirtuallySet = true;
for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
fFields[i] = 0;
fStamp[i] = kUnset;
- fIsSet[i] = FALSE;
+ fIsSet[i] = false;
}
@@ -1212,8 +1228,8 @@ Calendar::set(UCalendarDateFields field, int32_t value)
recalculateStamp();
}
fStamp[field] = fNextStamp++;
- fIsSet[field] = TRUE; // Remove later
- fIsTimeSet = fAreFieldsSet = fAreFieldsVirtuallySet = FALSE;
+ fIsSet[field] = true; // Remove later
+ fIsTimeSet = fAreFieldsSet = fAreFieldsVirtuallySet = false;
}
// -------------------------------------
@@ -1252,130 +1268,14 @@ Calendar::set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t m
}
// -------------------------------------
-// For now the full getRelatedYear implementation is here;
-// per #10752 move the non-default implementation to subclasses
-// (default implementation will do no year adjustment)
-
-static int32_t gregoYearFromIslamicStart(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)
- int cycle, offset, shift = 0;
- if (year >= 1397) {
- cycle = (year - 1397) / 67;
- offset = (year - 1397) % 67;
- shift = 2*cycle + ((offset >= 33)? 1: 0);
- } else {
- cycle = (year - 1396) / 67 - 1;
- offset = -(year - 1396) % 67;
- shift = 2*cycle + ((offset <= 33)? 1: 0);
- }
- return year + 579 - shift;
-}
-
int32_t Calendar::getRelatedYear(UErrorCode &status) const
{
- if (U_FAILURE(status)) {
- return 0;
- }
- int32_t year = get(UCAL_EXTENDED_YEAR, status);
- if (U_FAILURE(status)) {
- return 0;
- }
- // modify for calendar type
- ECalType type = getCalendarType(getType());
- switch (type) {
- case CALTYPE_PERSIAN:
- year += 622; break;
- case CALTYPE_HEBREW:
- year -= 3760; break;
- case CALTYPE_CHINESE:
- year -= 2637; break;
- case CALTYPE_INDIAN:
- year += 79; break;
- case CALTYPE_COPTIC:
- year += 284; break;
- case CALTYPE_ETHIOPIC:
- year += 8; break;
- case CALTYPE_ETHIOPIC_AMETE_ALEM:
- year -=5492; break;
- case CALTYPE_DANGI:
- year -= 2333; break;
- case CALTYPE_ISLAMIC_CIVIL:
- case CALTYPE_ISLAMIC:
- case CALTYPE_ISLAMIC_UMALQURA:
- case CALTYPE_ISLAMIC_TBLA:
- case CALTYPE_ISLAMIC_RGSA:
- year = gregoYearFromIslamicStart(year); break;
- default:
- // CALTYPE_GREGORIAN
- // CALTYPE_JAPANESE
- // CALTYPE_BUDDHIST
- // CALTYPE_ROC
- // CALTYPE_ISO8601
- // do nothing, EXTENDED_YEAR same as Gregorian
- break;
- }
- return year;
+ return get(UCAL_EXTENDED_YEAR, status);
}
// -------------------------------------
-// For now the full setRelatedYear implementation is here;
-// per #10752 move the non-default implementation to subclasses
-// (default implementation will do no year adjustment)
-
-static int32_t firstIslamicStartYearFromGrego(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)
- int cycle, offset, shift = 0;
- if (year >= 1977) {
- cycle = (year - 1977) / 65;
- offset = (year - 1977) % 65;
- shift = 2*cycle + ((offset >= 32)? 1: 0);
- } else {
- cycle = (year - 1976) / 65 - 1;
- offset = -(year - 1976) % 65;
- shift = 2*cycle + ((offset <= 32)? 1: 0);
- }
- return year - 579 + shift;
-}
void Calendar::setRelatedYear(int32_t year)
{
- // modify for calendar type
- ECalType type = getCalendarType(getType());
- switch (type) {
- case CALTYPE_PERSIAN:
- year -= 622; break;
- case CALTYPE_HEBREW:
- year += 3760; break;
- case CALTYPE_CHINESE:
- year += 2637; break;
- case CALTYPE_INDIAN:
- year -= 79; break;
- case CALTYPE_COPTIC:
- year -= 284; break;
- case CALTYPE_ETHIOPIC:
- year -= 8; break;
- case CALTYPE_ETHIOPIC_AMETE_ALEM:
- year +=5492; break;
- case CALTYPE_DANGI:
- year += 2333; break;
- case CALTYPE_ISLAMIC_CIVIL:
- case CALTYPE_ISLAMIC:
- case CALTYPE_ISLAMIC_UMALQURA:
- case CALTYPE_ISLAMIC_TBLA:
- case CALTYPE_ISLAMIC_RGSA:
- year = firstIslamicStartYearFromGrego(year); break;
- default:
- // CALTYPE_GREGORIAN
- // CALTYPE_JAPANESE
- // CALTYPE_BUDDHIST
- // CALTYPE_ROC
- // CALTYPE_ISO8601
- // do nothing, EXTENDED_YEAR same as Gregorian
- break;
- }
// set extended year
set(UCAL_EXTENDED_YEAR, year);
}
@@ -1388,9 +1288,9 @@ Calendar::clear()
for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
fFields[i] = 0; // Must do this; other code depends on it
fStamp[i] = kUnset;
- fIsSet[i] = FALSE; // Remove later
+ fIsSet[i] = false; // Remove later
}
- fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = FALSE;
+ fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = false;
// fTime is not 'cleared' - may be used if no fields are set.
}
@@ -1405,8 +1305,8 @@ Calendar::clear(UCalendarDateFields field)
}
fFields[field] = 0;
fStamp[field] = kUnset;
- fIsSet[field] = FALSE; // Remove later
- fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = FALSE;
+ fIsSet[field] = false; // Remove later
+ fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = false;
}
// -------------------------------------
@@ -1435,6 +1335,9 @@ int32_t Calendar::newestStamp(UCalendarDateFields first, UCalendarDateFields las
void
Calendar::complete(UErrorCode& status)
{
+ if (U_FAILURE(status)) {
+ return;
+ }
if (!fIsTimeSet) {
updateTime(status);
/* Test for buffer overflows */
@@ -1448,8 +1351,8 @@ Calendar::complete(UErrorCode& status)
if(U_FAILURE(status)) {
return;
}
- fAreFieldsSet = TRUE;
- fAreAllFieldsSet = TRUE;
+ fAreFieldsSet = true;
+ fAreAllFieldsSet = true;
}
}
@@ -1486,6 +1389,9 @@ Calendar::complete(UErrorCode& status)
* @stable ICU 2.0
*/
void Calendar::pinField(UCalendarDateFields field, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
int32_t max = getActualMaximum(field, status);
int32_t min = getActualMinimum(field, status);
@@ -1499,13 +1405,16 @@ void Calendar::pinField(UCalendarDateFields field, UErrorCode& status) {
void Calendar::computeFields(UErrorCode &ec)
{
- if (U_FAILURE(ec)) {
+ if (U_FAILURE(ec)) {
return;
}
// Compute local wall millis
double localMillis = internalGetTime();
int32_t rawOffset, dstOffset;
- getTimeZone().getOffset(localMillis, FALSE, rawOffset, dstOffset, ec);
+ getTimeZone().getOffset(localMillis, false, rawOffset, dstOffset, ec);
+ if (U_FAILURE(ec)) {
+ return;
+ }
localMillis += (rawOffset + dstOffset);
// Mark fields as set. Do this before calling handleComputeFields().
@@ -1515,15 +1424,16 @@ void Calendar::computeFields(UErrorCode &ec)
(1 << UCAL_MONTH) |
(1 << UCAL_DAY_OF_MONTH) | // = UCAL_DATE
(1 << UCAL_DAY_OF_YEAR) |
- (1 << UCAL_EXTENDED_YEAR);
+ (1 << UCAL_EXTENDED_YEAR) |
+ (1 << UCAL_ORDINAL_MONTH);
for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
if ((mask & 1) == 0) {
fStamp[i] = kInternallySet;
- fIsSet[i] = TRUE; // Remove later
+ fIsSet[i] = true; // Remove later
} else {
fStamp[i] = kUnset;
- fIsSet[i] = FALSE; // Remove later
+ fIsSet[i] = false; // Remove later
}
mask >>= 1;
}
@@ -1537,7 +1447,8 @@ void Calendar::computeFields(UErrorCode &ec)
// JULIAN_DAY field and also removes some inelegant code. - Liu
// 11/6/00
- int32_t days = (int32_t)ClockMath::floorDivide(localMillis, (double)kOneDay);
+ int32_t millisInDay;
+ int32_t days = ClockMath::floorDivide(localMillis, kOneDay, &millisInDay);
internalSet(UCAL_JULIAN_DAY,days + kEpochStartAsJulianDay);
@@ -1561,19 +1472,50 @@ void Calendar::computeFields(UErrorCode &ec)
// Compute time-related fields. These are independent of the date and
// of the subclass algorithm. They depend only on the local zone
// wall milliseconds in day.
- int32_t millisInDay = (int32_t) (localMillis - (days * kOneDay));
+ if (U_FAILURE(ec)) {
+ return;
+ }
+
fFields[UCAL_MILLISECONDS_IN_DAY] = millisInDay;
+ U_ASSERT(getMinimum(UCAL_MILLISECONDS_IN_DAY) <=
+ fFields[UCAL_MILLISECONDS_IN_DAY]);
+ U_ASSERT(fFields[UCAL_MILLISECONDS_IN_DAY] <=
+ getMaximum(UCAL_MILLISECONDS_IN_DAY));
+
fFields[UCAL_MILLISECOND] = millisInDay % 1000;
+ U_ASSERT(getMinimum(UCAL_MILLISECOND) <= fFields[UCAL_MILLISECOND]);
+ U_ASSERT(fFields[UCAL_MILLISECOND] <= getMaximum(UCAL_MILLISECOND));
+
millisInDay /= 1000;
fFields[UCAL_SECOND] = millisInDay % 60;
+ U_ASSERT(getMinimum(UCAL_SECOND) <= fFields[UCAL_SECOND]);
+ U_ASSERT(fFields[UCAL_SECOND] <= getMaximum(UCAL_SECOND));
+
millisInDay /= 60;
fFields[UCAL_MINUTE] = millisInDay % 60;
+ U_ASSERT(getMinimum(UCAL_MINUTE) <= fFields[UCAL_MINUTE]);
+ U_ASSERT(fFields[UCAL_MINUTE] <= getMaximum(UCAL_MINUTE));
+
millisInDay /= 60;
fFields[UCAL_HOUR_OF_DAY] = millisInDay;
+ U_ASSERT(getMinimum(UCAL_HOUR_OF_DAY) <= fFields[UCAL_HOUR_OF_DAY]);
+ U_ASSERT(fFields[UCAL_HOUR_OF_DAY] <= getMaximum(UCAL_HOUR_OF_DAY));
+
fFields[UCAL_AM_PM] = millisInDay / 12; // Assume AM == 0
+ U_ASSERT(getMinimum(UCAL_AM_PM) <= fFields[UCAL_AM_PM]);
+ U_ASSERT(fFields[UCAL_AM_PM] <= getMaximum(UCAL_AM_PM));
+
fFields[UCAL_HOUR] = millisInDay % 12;
+ U_ASSERT(getMinimum(UCAL_HOUR) <= fFields[UCAL_HOUR]);
+ U_ASSERT(fFields[UCAL_HOUR] <= getMaximum(UCAL_HOUR));
+
fFields[UCAL_ZONE_OFFSET] = rawOffset;
+ U_ASSERT(getMinimum(UCAL_ZONE_OFFSET) <= fFields[UCAL_ZONE_OFFSET]);
+ U_ASSERT(fFields[UCAL_ZONE_OFFSET] <= getMaximum(UCAL_ZONE_OFFSET));
+
fFields[UCAL_DST_OFFSET] = dstOffset;
+ U_ASSERT(getMinimum(UCAL_DST_OFFSET) <= fFields[UCAL_DST_OFFSET]);
+ U_ASSERT(fFields[UCAL_DST_OFFSET] <= getMaximum(UCAL_DST_OFFSET));
}
uint8_t Calendar::julianDayToDayOfWeek(double julian)
@@ -1595,6 +1537,9 @@ uint8_t Calendar::julianDayToDayOfWeek(double julian)
void Calendar::computeGregorianAndDOWFields(int32_t julianDay, UErrorCode &ec)
{
computeGregorianFields(julianDay, ec);
+ if (U_FAILURE(ec)) {
+ return;
+ }
// Compute day of week: JD 0 = Monday
int32_t dow = julianDayToDayOfWeek(julianDay);
@@ -1616,7 +1561,10 @@ void Calendar::computeGregorianAndDOWFields(int32_t julianDay, UErrorCode &ec)
* subclasses that are Gregorian derivatives. Subclasses may call this
* method to perform a Gregorian calendar millis->fields computation.
*/
-void Calendar::computeGregorianFields(int32_t julianDay, UErrorCode & /* ec */) {
+void Calendar::computeGregorianFields(int32_t julianDay, UErrorCode& ec) {
+ if (U_FAILURE(ec)) {
+ return;
+ }
int32_t gregorianDayOfWeekUnused;
Grego::dayToFields(julianDay - kEpochStartAsJulianDay, fGregorianYear, fGregorianMonth, fGregorianDayOfMonth, gregorianDayOfWeekUnused, fGregorianDayOfYear);
}
@@ -1699,11 +1647,20 @@ void Calendar::computeWeekFields(UErrorCode &ec) {
}
fFields[UCAL_WEEK_OF_YEAR] = woy;
fFields[UCAL_YEAR_WOY] = yearOfWeekOfYear;
+ // min/max of years are not constrains for caller, so not assert here.
// WEEK_OF_YEAR end
int32_t dayOfMonth = fFields[UCAL_DAY_OF_MONTH];
fFields[UCAL_WEEK_OF_MONTH] = weekNumber(dayOfMonth, dayOfWeek);
+ U_ASSERT(getMinimum(UCAL_WEEK_OF_MONTH) <= fFields[UCAL_WEEK_OF_MONTH]);
+ U_ASSERT(fFields[UCAL_WEEK_OF_MONTH] <= getMaximum(UCAL_WEEK_OF_MONTH));
+
fFields[UCAL_DAY_OF_WEEK_IN_MONTH] = (dayOfMonth-1) / 7 + 1;
+ U_ASSERT(getMinimum(UCAL_DAY_OF_WEEK_IN_MONTH) <=
+ fFields[UCAL_DAY_OF_WEEK_IN_MONTH]);
+ U_ASSERT(fFields[UCAL_DAY_OF_WEEK_IN_MONTH] <=
+ getMaximum(UCAL_DAY_OF_WEEK_IN_MONTH));
+
#if defined (U_DEBUG_CAL)
if(fFields[UCAL_DAY_OF_WEEK_IN_MONTH]==0) fprintf(stderr, "%s:%d: DOWIM %d on %g\n",
__FILE__, __LINE__,fFields[UCAL_DAY_OF_WEEK_IN_MONTH], fTime);
@@ -1732,9 +1689,14 @@ int32_t Calendar::weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t da
return weekNo;
}
-void Calendar::handleComputeFields(int32_t /* julianDay */, UErrorCode &/* status */)
+void Calendar::handleComputeFields(int32_t /* julianDay */, UErrorCode& status)
{
- internalSet(UCAL_MONTH, getGregorianMonth());
+ if (U_FAILURE(status)) {
+ return;
+ }
+ int32_t month = getGregorianMonth();
+ internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
internalSet(UCAL_DAY_OF_MONTH, getGregorianDayOfMonth());
internalSet(UCAL_DAY_OF_YEAR, getGregorianDayOfYear());
int32_t eyear = getGregorianYear();
@@ -1755,8 +1717,7 @@ void Calendar::roll(EDateFields field, int32_t amount, UErrorCode& status)
roll((UCalendarDateFields)field, amount, status);
}
-void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status)
-{
+void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) UPRV_NO_SANITIZE_UNDEFINED {
if (amount == 0) {
return; // Nothing to do
}
@@ -1816,6 +1777,7 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu
}
case UCAL_MONTH:
+ case UCAL_ORDINAL_MONTH:
// Rolling the month involves both pinning the final value
// and adjusting the DAY_OF_MONTH if necessary. We only adjust the
// DAY_OF_MONTH if, after updating the MONTH field, it is illegal.
@@ -1842,13 +1804,13 @@ 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;
+ 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;
+ era0WithYearsThatGoBackwards = true;
}
}
int32_t newYear = internalGet(field) + amount;
@@ -1873,6 +1835,7 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu
}
set(field, newYear);
pinField(UCAL_MONTH,status);
+ pinField(UCAL_ORDINAL_MONTH,status);
pinField(UCAL_DAY_OF_MONTH,status);
return;
}
@@ -1881,6 +1844,7 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu
// Rolling the year can involve pinning the DAY_OF_MONTH.
set(field, internalGet(field) + amount);
pinField(UCAL_MONTH,status);
+ pinField(UCAL_ORDINAL_MONTH,status);
pinField(UCAL_DAY_OF_MONTH,status);
return;
@@ -2020,6 +1984,7 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu
// have to be updated as well.
set(UCAL_DAY_OF_YEAR, day_of_year);
clear(UCAL_MONTH);
+ clear(UCAL_ORDINAL_MONTH);
return;
}
case UCAL_DAY_OF_YEAR:
@@ -2103,6 +2068,9 @@ void Calendar::add(EDateFields field, int32_t amount, UErrorCode& status)
// -------------------------------------
void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status)
{
+ if (U_FAILURE(status)) {
+ return;
+ }
if (amount == 0) {
return; // Do nothing!
}
@@ -2114,7 +2082,7 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status
// we don't want the wall time to shift due to changes in DST. If the
// result of the add operation is to move from DST to Standard, or
// vice versa, we need to adjust by an hour forward or back,
- // respectively. For such fields we set keepWallTimeInvariant to TRUE.
+ // respectively. For such fields we set keepWallTimeInvariant to true.
// We only adjust the DST for fields larger than an hour. For
// fields smaller than an hour, we cannot adjust for DST without
@@ -2129,7 +2097,7 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status
// <April 30>, rather than <April 31> => <May 1>.
double delta = amount; // delta in ms
- UBool keepWallTimeInvariant = TRUE;
+ UBool keepWallTimeInvariant = true;
switch (field) {
case UCAL_ERA:
@@ -2159,12 +2127,13 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status
U_FALLTHROUGH;
case UCAL_EXTENDED_YEAR:
case UCAL_MONTH:
+ case UCAL_ORDINAL_MONTH:
{
UBool oldLenient = isLenient();
- setLenient(TRUE);
+ setLenient(true);
set(field, get(field, status) + amount);
pinField(UCAL_DAY_OF_MONTH, status);
- if(oldLenient==FALSE) {
+ if(oldLenient==false) {
complete(status); /* force recalculate */
setLenient(oldLenient);
}
@@ -2192,22 +2161,22 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status
case UCAL_HOUR_OF_DAY:
case UCAL_HOUR:
delta *= kOneHour;
- keepWallTimeInvariant = FALSE;
+ keepWallTimeInvariant = false;
break;
case UCAL_MINUTE:
delta *= kOneMinute;
- keepWallTimeInvariant = FALSE;
+ keepWallTimeInvariant = false;
break;
case UCAL_SECOND:
delta *= kOneSecond;
- keepWallTimeInvariant = FALSE;
+ keepWallTimeInvariant = false;
break;
case UCAL_MILLISECOND:
case UCAL_MILLISECONDS_IN_DAY:
- keepWallTimeInvariant = FALSE;
+ keepWallTimeInvariant = false;
break;
default:
@@ -2350,7 +2319,7 @@ int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UEr
break;
} else {
min = max;
- max <<= 1;
+ max = (int32_t)((uint32_t)(max) << 1);
if (max == 0) {
// Field difference too large to fit into int32_t
#if defined (U_DEBUG_CAL)
@@ -2392,15 +2361,15 @@ int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UEr
void
Calendar::adoptTimeZone(TimeZone* zone)
{
- // Do nothing if passed-in zone is NULL
- if (zone == NULL) return;
+ // Do nothing if passed-in zone is nullptr
+ if (zone == nullptr) return;
// fZone should always be non-null
delete fZone;
fZone = zone;
// if the zone changes, we need to recompute the time fields
- fAreFieldsSet = FALSE;
+ fAreFieldsSet = false;
}
// -------------------------------------
@@ -2415,7 +2384,7 @@ Calendar::setTimeZone(const TimeZone& zone)
const TimeZone&
Calendar::getTimeZone() const
{
- U_ASSERT(fZone != NULL);
+ U_ASSERT(fZone != nullptr);
return *fZone;
}
@@ -2426,9 +2395,9 @@ Calendar::orphanTimeZone()
{
// we let go of the time zone; the new time zone is the system default time zone
TimeZone *defaultZone = TimeZone::createDefault();
- if (defaultZone == NULL) {
- // No error handling available. Must keep fZone non-NULL, there are many unchecked uses.
- return NULL;
+ if (defaultZone == nullptr) {
+ // No error handling available. Must keep fZone non-nullptr, there are many unchecked uses.
+ return nullptr;
}
TimeZone *z = fZone;
fZone = defaultZone;
@@ -2464,7 +2433,7 @@ Calendar::setRepeatedWallTimeOption(UCalendarWallTimeOption option)
// -------------------------------------
UCalendarWallTimeOption
-Calendar::getRepeatedWallTimeOption(void) const
+Calendar::getRepeatedWallTimeOption() const
{
return fRepeatedWallTime;
}
@@ -2480,7 +2449,7 @@ Calendar::setSkippedWallTimeOption(UCalendarWallTimeOption option)
// -------------------------------------
UCalendarWallTimeOption
-Calendar::getSkippedWallTimeOption(void) const
+Calendar::getSkippedWallTimeOption() const
{
return fSkippedWallTime;
}
@@ -2488,12 +2457,11 @@ Calendar::getSkippedWallTimeOption(void) const
// -------------------------------------
void
-Calendar::setFirstDayOfWeek(UCalendarDaysOfWeek value)
-{
+Calendar::setFirstDayOfWeek(UCalendarDaysOfWeek value) UPRV_NO_SANITIZE_UNDEFINED {
if (fFirstDayOfWeek != value &&
value >= UCAL_SUNDAY && value <= UCAL_SATURDAY) {
fFirstDayOfWeek = value;
- fAreFieldsSet = FALSE;
+ fAreFieldsSet = false;
}
}
@@ -2525,7 +2493,7 @@ Calendar::setMinimalDaysInFirstWeek(uint8_t value)
}
if (fMinimalDaysInFirstWeek != value) {
fMinimalDaysInFirstWeek = value;
- fAreFieldsSet = FALSE;
+ fAreFieldsSet = false;
}
}
@@ -2592,15 +2560,15 @@ UBool
Calendar::isWeekend(UDate date, UErrorCode &status) const
{
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
// clone the calendar so we don't mess with the real one.
Calendar *work = this->clone();
- if (work == NULL) {
+ if (work == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
- UBool result = FALSE;
+ UBool result = false;
work->setTime(date, status);
if (U_SUCCESS(status)) {
result = work->isWeekend();
@@ -2610,7 +2578,7 @@ Calendar::isWeekend(UDate date, UErrorCode &status) const
}
UBool
-Calendar::isWeekend(void) const
+Calendar::isWeekend() const
{
UErrorCode status = U_ZERO_ERROR;
UCalendarDaysOfWeek dayOfWeek = (UCalendarDaysOfWeek)get(UCAL_DAY_OF_WEEK, status);
@@ -2618,9 +2586,9 @@ Calendar::isWeekend(void) const
if (U_SUCCESS(status)) {
switch (dayType) {
case UCAL_WEEKDAY:
- return FALSE;
+ return false;
case UCAL_WEEKEND:
- return TRUE;
+ return true;
case UCAL_WEEKEND_ONSET:
case UCAL_WEEKEND_CEASE:
// Use internalGet() because the above call to get() populated all fields.
@@ -2632,14 +2600,14 @@ Calendar::isWeekend(void) const
(millisInDay >= transitionMillis):
(millisInDay < transitionMillis);
}
- // else fall through, return FALSE
+ // else fall through, return false
U_FALLTHROUGH;
}
default:
break;
}
}
- return FALSE;
+ return false;
}
// ------------------------------------- limits
@@ -2741,10 +2709,12 @@ int32_t Calendar::getLimit(UCalendarDateFields field, ELimitType limitType) cons
}
}
-
int32_t
Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const
{
+ if (U_FAILURE(status)) {
+ return 0;
+ }
int32_t fieldValue = getGreatestMinimum(field);
int32_t endValue = getMinimum(field);
@@ -2756,11 +2726,11 @@ Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const
// clone the calendar so we don't mess with the real one, and set it to
// accept anything for the field values
Calendar *work = this->clone();
- if (work == NULL) {
+ if (work == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
- work->setLenient(TRUE);
+ work->setLenient(true);
// now try each value from getLeastMaximum() to getMaximum() one by one until
// we get a value that normalizes to another value. The last value that
@@ -2789,7 +2759,61 @@ Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const
// -------------------------------------
+UBool
+Calendar::inDaylightTime(UErrorCode& status) const
+{
+ if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) {
+ return false;
+ }
+
+ // Force an update of the state of the Calendar.
+ ((Calendar*)this)->complete(status); // cast away const
+
+ return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false);
+}
+
+bool
+Calendar::inTemporalLeapYear(UErrorCode& status) const
+{
+ // Default to Gregorian based leap year rule.
+ return getActualMaximum(UCAL_DAY_OF_YEAR, status) == 366;
+}
+
+// -------------------------------------
+
+static const char * const gTemporalMonthCodes[] = {
+ "M01", "M02", "M03", "M04", "M05", "M06",
+ "M07", "M08", "M09", "M10", "M11", "M12", nullptr
+};
+const char*
+Calendar::getTemporalMonthCode(UErrorCode& status) const
+{
+ int32_t month = get(UCAL_MONTH, status);
+ if (U_FAILURE(status)) return nullptr;
+ U_ASSERT(month < 12);
+ U_ASSERT(internalGet(UCAL_IS_LEAP_MONTH) == 0);
+ return gTemporalMonthCodes[month];
+}
+
+void
+Calendar::setTemporalMonthCode(const char* code, UErrorCode& status )
+{
+ 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++) {
+ if (uprv_strcmp(code, gTemporalMonthCodes[m]) == 0) {
+ set(UCAL_MONTH, m);
+ set(UCAL_IS_LEAP_MONTH, 0);
+ return;
+ }
+ }
+ }
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+}
+
+// -------------------------------------
/**
* Ensure that each field is within its valid range by calling {@link
@@ -2799,6 +2823,9 @@ Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const
* @see #validateField(int)
*/
void Calendar::validateFields(UErrorCode &status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
for (int32_t field = 0; U_SUCCESS(status) && (field < UCAL_FIELD_COUNT); field++) {
if (fStamp[field] >= kMinimumUserStamp) {
validateField((UCalendarDateFields)field, status);
@@ -2814,11 +2841,14 @@ void Calendar::validateFields(UErrorCode &status) {
* @see #validateField(int, int, int)
*/
void Calendar::validateField(UCalendarDateFields field, UErrorCode &status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
int32_t y;
switch (field) {
case UCAL_DAY_OF_MONTH:
y = handleGetExtendedYear();
- validateField(field, 1, handleGetMonthLength(y, internalGet(UCAL_MONTH)), status);
+ validateField(field, 1, handleGetMonthLength(y, internalGetMonth()), status);
break;
case UCAL_DAY_OF_YEAR:
y = handleGetExtendedYear();
@@ -2850,6 +2880,9 @@ void Calendar::validateField(UCalendarDateFields field, UErrorCode &status) {
*/
void Calendar::validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status)
{
+ if (U_FAILURE(status)) {
+ return;
+ }
int32_t value = fFields[field];
if (value < min || value > max) {
#if defined (U_DEBUG_CAL)
@@ -2876,7 +2909,7 @@ UCalendarDateFields Calendar::newerField(UCalendarDateFields defaultField, UCale
return defaultField;
}
-UCalendarDateFields Calendar::resolveFields(const UFieldResolutionTable* precedenceTable) {
+UCalendarDateFields Calendar::resolveFields(const UFieldResolutionTable* precedenceTable) const {
int32_t bestField = UCAL_FIELD_COUNT;
int32_t tempBestField;
for (int32_t g=0; precedenceTable[g][0][0] != -1 && (bestField == UCAL_FIELD_COUNT); ++g) {
@@ -2945,6 +2978,16 @@ const UFieldResolutionTable Calendar::kDatePrecedence[] =
};
+const UFieldResolutionTable Calendar::kMonthPrecedence[] =
+{
+ {
+ { UCAL_MONTH,kResolveSTOP, kResolveSTOP },
+ { UCAL_ORDINAL_MONTH,kResolveSTOP, kResolveSTOP },
+ {kResolveSTOP}
+ },
+ {{kResolveSTOP}}
+};
+
const UFieldResolutionTable Calendar::kDOWPrecedence[] =
{
{
@@ -2972,6 +3015,9 @@ const UFieldResolutionTable Calendar::kYearPrecedence[] =
void Calendar::computeTime(UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
if (!isLenient()) {
validateFields(status);
if (U_FAILURE(status)) {
@@ -3050,7 +3096,7 @@ void Calendar::computeTime(UErrorCode& status) {
UDate tmpTime = millis + millisInDay - zoneOffset;
int32_t raw, dst;
- fZone->getOffset(tmpTime, FALSE, raw, dst, status);
+ fZone->getOffset(tmpTime, false, raw, dst, status);
if (U_SUCCESS(status)) {
// zoneOffset != (raw + dst) only when the given wall time fall into
@@ -3086,13 +3132,16 @@ void Calendar::computeTime(UErrorCode& status) {
* Find the previous zone transition near the given time.
*/
UBool Calendar::getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const {
+ if (U_FAILURE(status)) {
+ return false;
+ }
BasicTimeZone *btz = getBasicTimeZone();
if (btz) {
TimeZoneTransition trans;
- UBool hasTransition = btz->getPreviousTransition(base, TRUE, trans);
+ UBool hasTransition = btz->getPreviousTransition(base, true, trans);
if (hasTransition) {
*transitionTime = trans.getTime();
- return TRUE;
+ return true;
} else {
// Could not find any transitions.
// Note: This should never happen.
@@ -3103,7 +3152,7 @@ UBool Calendar::getImmediatePreviousZoneTransition(UDate base, UDate *transition
// TODO: We may support non-BasicTimeZone in future.
status = U_UNSUPPORTED_ERROR;
}
- return FALSE;
+ return false;
}
/**
@@ -3159,6 +3208,9 @@ double Calendar::computeMillisInDay() {
* @stable ICU 2.0
*/
int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCode &ec) {
+ if (U_FAILURE(ec)) {
+ return 0;
+ }
int32_t rawOffset, dstOffset;
UDate wall = millis + millisInDay;
BasicTimeZone* btz = getBasicTimeZone();
@@ -3169,9 +3221,9 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod
} else {
const TimeZone& tz = getTimeZone();
// By default, TimeZone::getOffset behaves UCAL_WALLTIME_LAST for both.
- tz.getOffset(wall, TRUE, rawOffset, dstOffset, ec);
+ tz.getOffset(wall, true, rawOffset, dstOffset, ec);
- UBool sawRecentNegativeShift = FALSE;
+ UBool sawRecentNegativeShift = false;
if (fRepeatedWallTime == UCAL_WALLTIME_FIRST) {
// Check if the given wall time falls into repeated time range
UDate tgmt = wall - (rawOffset + dstOffset);
@@ -3180,16 +3232,16 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod
// Note: The maximum historic negative zone transition is -3 hours in the tz database.
// 6 hour window would be sufficient for this purpose.
int32_t tmpRaw, tmpDst;
- tz.getOffset(tgmt - 6*60*60*1000, FALSE, tmpRaw, tmpDst, ec);
+ tz.getOffset(tgmt - 6*60*60*1000, false, tmpRaw, tmpDst, ec);
int32_t offsetDelta = (rawOffset + dstOffset) - (tmpRaw + tmpDst);
U_ASSERT(offsetDelta < -6*60*60*1000);
if (offsetDelta < 0) {
- sawRecentNegativeShift = TRUE;
+ sawRecentNegativeShift = true;
// Negative shift within last 6 hours. When UCAL_WALLTIME_FIRST is used and the given wall time falls
// into the repeated time range, use offsets before the transition.
// Note: If it does not fall into the repeated time range, offsets remain unchanged below.
- tz.getOffset(wall + offsetDelta, TRUE, rawOffset, dstOffset, ec);
+ tz.getOffset(wall + offsetDelta, true, rawOffset, dstOffset, ec);
}
}
if (!sawRecentNegativeShift && fSkippedWallTime == UCAL_WALLTIME_FIRST) {
@@ -3199,7 +3251,7 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod
// the offsets will be based on the zone offsets AFTER
// the transition (which means, earliest possible interpretation).
UDate tgmt = wall - (rawOffset + dstOffset);
- tz.getOffset(tgmt, FALSE, rawOffset, dstOffset, ec);
+ tz.getOffset(tgmt, false, rawOffset, dstOffset, ec);
}
}
return rawOffset + dstOffset;
@@ -3218,6 +3270,7 @@ int32_t Calendar::computeJulianDay()
if (fStamp[UCAL_JULIAN_DAY] >= (int32_t)kMinimumUserStamp) {
int32_t bestStamp = newestStamp(UCAL_ERA, UCAL_DAY_OF_WEEK_IN_MONTH, kUnset);
bestStamp = newestStamp(UCAL_YEAR_WOY, UCAL_EXTENDED_YEAR, bestStamp);
+ bestStamp = newestStamp(UCAL_ORDINAL_MONTH, UCAL_ORDINAL_MONTH, bestStamp);
if (bestStamp <= fStamp[UCAL_JULIAN_DAY]) {
return internalGet(UCAL_JULIAN_DAY);
}
@@ -3257,8 +3310,8 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) {
// give calendar subclass a chance to have a default 'first' month
int32_t month;
- if(isSet(UCAL_MONTH)) {
- month = internalGet(UCAL_MONTH);
+ if(isSet(UCAL_MONTH) || isSet(UCAL_ORDINAL_MONTH)) {
+ month = internalGetMonth();
} else {
month = getDefaultMonthInYear(year);
}
@@ -3326,7 +3379,7 @@ 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 = internalGet(UCAL_MONTH, UCAL_JANUARY);
+ int32_t m = internalGetMonth(UCAL_JANUARY);
int32_t monthLength = handleGetMonthLength(year, m);
date += ((monthLength - date) / 7 + dim + 1) * 7;
}
@@ -3343,7 +3396,7 @@ 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); // jd of day before jan 1
int32_t nextFirst = julianDayToDayOfWeek(nextJulianDay + 1) - firstDayOfWeek;
if (nextFirst < 0) { // 0..6 ldow of Jan 1
@@ -3394,7 +3447,7 @@ 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); // jd before Jan 1 of previous year
first = julianDayToDayOfWeek(julianDay + 1) - firstDayOfWeek; // 0 based local dow of first week
if(first < 0) { // 0..6
@@ -3474,8 +3527,8 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w
// Now, a local DOW
int32_t dowLocal = getLocalDOW(); // 0..6
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);
+ int32_t nextJan1Start = handleComputeMonthStart(yearWoy+1, 0, false); // next year's Jan1 start
// 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
@@ -3501,21 +3554,21 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w
//}
int32_t minDays = getMinimalDaysInFirstWeek();
- UBool jan1InPrevYear = FALSE; // January 1st in the year of WOY is the 1st week? (i.e. first week is < minimal )
- //UBool nextJan1InPrevYear = FALSE; // January 1st of Year of WOY + 1 is in the first week?
+ UBool jan1InPrevYear = false; // January 1st in the year of WOY is the 1st week? (i.e. first week is < minimal )
+ //UBool nextJan1InPrevYear = false; // January 1st of Year of WOY + 1 is in the first week?
if((7 - first) < minDays) {
- jan1InPrevYear = TRUE;
+ jan1InPrevYear = true;
}
// if((7 - nextFirst) < minDays) {
- // nextJan1InPrevYear = TRUE;
+ // nextJan1InPrevYear = true;
// }
switch(bestField) {
case UCAL_WEEK_OF_YEAR:
if(woy == 1) {
- if(jan1InPrevYear == TRUE) {
+ if(jan1InPrevYear) {
// the first week of January is in the previous year
// therefore WOY1 is always solidly within yearWoy
return yearWoy;
@@ -3534,7 +3587,7 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w
(7-first) + // days in the first week (Jan 1.. )
(woy-1)*7 + // add the weeks of the year
dowLocal; // the local dow (0..6) of last week
- if(jan1InPrevYear==FALSE) {
+ if(jan1InPrevYear==false) {
jd -= 7; // woy already includes Jan 1's week.
}
@@ -3551,23 +3604,25 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w
}
case UCAL_DATE:
- if((internalGet(UCAL_MONTH)==0) &&
+ {
+ int32_t m = internalGetMonth();
+ if((m == 0) &&
(woy >= getLeastMaximum(UCAL_WEEK_OF_YEAR))) {
return yearWoy+1; // month 0, late woy = in the next year
} else if(woy==1) {
//if(nextJan1InPrevYear) {
- if(internalGet(UCAL_MONTH)==0) {
+ if(m == 0) {
return yearWoy;
} else {
return yearWoy-1;
}
//}
}
-
- //(internalGet(UCAL_DATE) <= (7-first)) /* && in minDow */ ) {
- //within 1st week and in this month..
- //return yearWoy+1;
- return yearWoy;
+ }
+ //(internalGet(UCAL_DATE) <= (7-first)) /* && in minDow */ ) {
+ //within 1st week and in this month..
+ //return yearWoy+1;
+ return yearWoy;
default: // assume the year is appropriate
return yearWoy;
@@ -3576,18 +3631,21 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w
int32_t Calendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const
{
- return handleComputeMonthStart(extendedYear, month+1, TRUE) -
- handleComputeMonthStart(extendedYear, month, TRUE);
+ return handleComputeMonthStart(extendedYear, month+1, true) -
+ handleComputeMonthStart(extendedYear, month, true);
}
int32_t Calendar::handleGetYearLength(int32_t eyear) const {
- return handleComputeMonthStart(eyear+1, 0, FALSE) -
- handleComputeMonthStart(eyear, 0, FALSE);
+ return handleComputeMonthStart(eyear+1, 0, false) -
+ handleComputeMonthStart(eyear, 0, false);
}
int32_t
Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const
{
+ if (U_FAILURE(status)) {
+ return 0;
+ }
int32_t result;
switch (field) {
case UCAL_DATE:
@@ -3595,8 +3653,8 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const
if(U_FAILURE(status)) return 0;
Calendar *cal = clone();
if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; }
- cal->setLenient(TRUE);
- cal->prepareGetActual(field,FALSE,status);
+ cal->setLenient(true);
+ cal->prepareGetActual(field,false,status);
result = handleGetMonthLength(cal->get(UCAL_EXTENDED_YEAR, status), cal->get(UCAL_MONTH, status));
delete cal;
}
@@ -3607,8 +3665,8 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const
if(U_FAILURE(status)) return 0;
Calendar *cal = clone();
if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; }
- cal->setLenient(TRUE);
- cal->prepareGetActual(field,FALSE,status);
+ cal->setLenient(true);
+ cal->prepareGetActual(field,false,status);
result = handleGetYearLength(cal->get(UCAL_EXTENDED_YEAR, status));
delete cal;
}
@@ -3630,6 +3688,10 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const
result = getMaximum(field);
break;
+ case UCAL_ORDINAL_MONTH:
+ result = inTemporalLeapYear(status) ? getMaximum(UCAL_ORDINAL_MONTH) : getLeastMaximum(UCAL_ORDINAL_MONTH);
+ break;
+
default:
// For all other fields, do it the hard way....
result = getActualHelper(field, getLeastMaximum(field), getMaximum(field),status);
@@ -3662,6 +3724,9 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const
*/
void Calendar::prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErrorCode &status)
{
+ if (U_FAILURE(status)) {
+ return;
+ }
set(UCAL_MILLISECONDS_IN_DAY, 0);
switch (field) {
@@ -3717,6 +3782,9 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue,
#if defined (U_DEBUG_CAL)
fprintf(stderr, "getActualHelper(%d,%d .. %d, %s)\n", field, startValue, endValue, u_errorName(status));
#endif
+ if (U_FAILURE(status)) {
+ return 0;
+ }
if (startValue == endValue) {
// if we know that the maximum value is always the same, just return it
return startValue;
@@ -3734,7 +3802,7 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue,
// may cause conflict with fields previously set (but not yet resolved).
work->complete(status);
- work->setLenient(TRUE);
+ work->setLenient(true);
work->prepareGetActual(field, delta < 0, status);
// now try each value from the start to the end one by one until
@@ -3822,12 +3890,12 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode&
// Get the monthNames resource bundle for the calendar 'type'. Fallback to gregorian if the resource is not
// found.
- LocalUResourceBundlePointer calData(ures_open(NULL, useLocale.getBaseName(), &status));
+ LocalUResourceBundlePointer calData(ures_open(nullptr, useLocale.getBaseName(), &status));
ures_getByKey(calData.getAlias(), gCalendar, calData.getAlias(), &status);
LocalUResourceBundlePointer monthNames;
- if (type != NULL && *type != '\0' && uprv_strcmp(type, gGregorian) != 0) {
- monthNames.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), type, NULL, &status));
+ if (type != nullptr && *type != '\0' && uprv_strcmp(type, gGregorian) != 0) {
+ monthNames.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), type, nullptr, &status));
ures_getByKeyWithFallback(monthNames.getAlias(), gMonthNames,
monthNames.getAlias(), &status);
}
@@ -3850,15 +3918,15 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode&
}
char region[ULOC_COUNTRY_CAPACITY];
- (void)ulocimp_getRegionForSupplementalData(desiredLocale.getName(), TRUE, region, sizeof(region), &status);
+ (void)ulocimp_getRegionForSupplementalData(desiredLocale.getName(), true, region, sizeof(region), &status);
// Read week data values from supplementalData week data
- UResourceBundle *rb = ures_openDirect(NULL, "supplementalData", &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", &status);
ures_getByKey(rb, "weekData", rb, &status);
- UResourceBundle *weekData = ures_getByKey(rb, region, NULL, &status);
- if (status == U_MISSING_RESOURCE_ERROR && rb != NULL) {
+ UResourceBundle *weekData = ures_getByKey(rb, region, nullptr, &status);
+ if (status == U_MISSING_RESOURCE_ERROR && rb != nullptr) {
status = U_ZERO_ERROR;
- weekData = ures_getByKey(rb, "001", NULL, &status);
+ weekData = ures_getByKey(rb, "001", nullptr, &status);
}
if (U_FAILURE(status)) {
@@ -3880,6 +3948,29 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode&
} else {
status = U_INVALID_FORMAT_ERROR;
}
+
+ // Check if the locale has a "fw" u extension and we honor it if present.
+ // And we don't change the overal status, as the presence / lack of "fw" is not an error.
+ UErrorCode fwStatus = U_ZERO_ERROR;
+ char fwExt[ULOC_FULLNAME_CAPACITY] = "";
+ desiredLocale.getKeywordValue("fw", fwExt, ULOC_FULLNAME_CAPACITY, fwStatus);
+ if (U_SUCCESS(fwStatus)) {
+ if (uprv_strcmp(fwExt, "sun") == 0) {
+ fFirstDayOfWeek = UCAL_SUNDAY;
+ } else if (uprv_strcmp(fwExt, "mon") == 0) {
+ fFirstDayOfWeek = UCAL_MONDAY;
+ } else if (uprv_strcmp(fwExt, "tue") == 0) {
+ fFirstDayOfWeek = UCAL_TUESDAY;
+ } else if (uprv_strcmp(fwExt, "wed") == 0) {
+ fFirstDayOfWeek = UCAL_WEDNESDAY;
+ } else if (uprv_strcmp(fwExt, "thu") == 0) {
+ fFirstDayOfWeek = UCAL_THURSDAY;
+ } else if (uprv_strcmp(fwExt, "fri") == 0) {
+ fFirstDayOfWeek = UCAL_FRIDAY;
+ } else if (uprv_strcmp(fwExt, "sat") == 0) {
+ fFirstDayOfWeek = UCAL_SATURDAY;
+ }
+ }
}
ures_close(weekData);
ures_close(rb);
@@ -3901,10 +3992,10 @@ Calendar::updateTime(UErrorCode& status)
// the values. Also, if we haven't set all the fields yet (i.e.,
// in a newly-created object), we need to fill in the fields. [LIU]
if (isLenient() || ! fAreAllFieldsSet)
- fAreFieldsSet = FALSE;
+ fAreFieldsSet = false;
- fIsTimeSet = TRUE;
- fAreFieldsVirtuallySet = FALSE;
+ fIsTimeSet = true;
+ fAreFieldsVirtuallySet = false;
}
Locale
@@ -3953,15 +4044,29 @@ Calendar::internalSet(EDateFields field, int32_t value)
internalSet((UCalendarDateFields) field, value);
}
+int32_t Calendar::internalGetMonth() const {
+ if (resolveFields(kMonthPrecedence) == UCAL_MONTH) {
+ return internalGet(UCAL_MONTH);
+ }
+ return internalGet(UCAL_ORDINAL_MONTH);
+}
+
+int32_t Calendar::internalGetMonth(int32_t defaultValue) const {
+ if (resolveFields(kMonthPrecedence) == UCAL_MONTH) {
+ return internalGet(UCAL_MONTH, defaultValue);
+ }
+ return internalGet(UCAL_ORDINAL_MONTH);
+}
+
BasicTimeZone*
-Calendar::getBasicTimeZone(void) const {
- if (dynamic_cast<const OlsonTimeZone *>(fZone) != NULL
- || dynamic_cast<const SimpleTimeZone *>(fZone) != NULL
- || dynamic_cast<const RuleBasedTimeZone *>(fZone) != NULL
- || dynamic_cast<const VTimeZone *>(fZone) != NULL) {
+Calendar::getBasicTimeZone() const {
+ if (dynamic_cast<const OlsonTimeZone *>(fZone) != nullptr
+ || dynamic_cast<const SimpleTimeZone *>(fZone) != nullptr
+ || dynamic_cast<const RuleBasedTimeZone *>(fZone) != nullptr
+ || dynamic_cast<const VTimeZone *>(fZone) != nullptr) {
return (BasicTimeZone*)fZone;
}
- return NULL;
+ return nullptr;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/casetrn.cpp b/contrib/libs/icu/i18n/casetrn.cpp
index bb650f8fa29..2f9699ee9dc 100644
--- a/contrib/libs/icu/i18n/casetrn.cpp
+++ b/contrib/libs/icu/i18n/casetrn.cpp
@@ -71,13 +71,13 @@ utrans_rep_caseContextIterator(void *context, int8_t dir)
c=rep->char32At(csc->index);
if(c<0) {
csc->limit=csc->index;
- csc->b1=TRUE;
+ csc->b1=true;
} else {
csc->index+=U16_LENGTH(c);
return c;
}
} else {
- csc->b1=TRUE;
+ csc->b1=true;
}
}
return U_SENTINEL;
@@ -147,7 +147,7 @@ void CaseMapTransliterator::handleTransliterate(Replaceable& text,
csc.limit = offsets.contextLimit;
UnicodeString tmp;
- const UChar *s;
+ const char16_t *s;
UChar32 c;
int32_t textPos, delta, result;
@@ -170,7 +170,7 @@ void CaseMapTransliterator::handleTransliterate(Replaceable& text,
// see UCASE_MAX_STRING_LENGTH
if(result<=UCASE_MAX_STRING_LENGTH) {
// string s[result]
- tmp.setTo(FALSE, s, result);
+ tmp.setTo(false, s, result);
delta=result-U16_LENGTH(c);
} else {
// single code point
diff --git a/contrib/libs/icu/i18n/cecal.cpp b/contrib/libs/icu/i18n/cecal.cpp
index cb97c40a3c7..456801ee370 100644
--- a/contrib/libs/icu/i18n/cecal.cpp
+++ b/contrib/libs/icu/i18n/cecal.cpp
@@ -13,6 +13,7 @@
#include "cecal.h"
#include "gregoimp.h" //Math
+#include "cstring.h"
U_NAMESPACE_BEGIN
@@ -42,6 +43,7 @@ static const int32_t LIMITS[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH
+ { 0, 0, 12, 12}, // ORDINAL_MONTH
};
//-------------------------------------------------------------------------
@@ -87,22 +89,9 @@ CECalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) cons
}
UBool
-CECalendar::inDaylightTime(UErrorCode& status) const
-{
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) {
- return FALSE;
- }
-
- // Force an update of the state of the Calendar.
- ((CECalendar*)this)->complete(status); // cast away const
-
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
-}
-
-UBool
CECalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
//-------------------------------------------------------------------------
@@ -135,7 +124,7 @@ CECalendar::jdToCE(int32_t julianDay, int32_t jdEpochOffset, int32_t& year, int3
int32_t c4; // number of 4 year cycle (1461 days)
int32_t r4; // remainder of 4 year cycle, always positive
- c4 = ClockMath::floorDivide(julianDay - jdEpochOffset, 1461, r4);
+ c4 = ClockMath::floorDivide(julianDay - jdEpochOffset, 1461, &r4);
year = 4 * c4 + (r4/365 - r4/1460); // 4 * <number of 4year cycle> + <years within the last cycle>
@@ -145,6 +134,24 @@ CECalendar::jdToCE(int32_t julianDay, int32_t jdEpochOffset, int32_t& year, int3
day = (doy % 30) + 1; // 1-based days in a month
}
+static const char* kMonthCode13 = "M13";
+
+const char* CECalendar::getTemporalMonthCode(UErrorCode& status) const {
+ 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 (uprv_strcmp(code, kMonthCode13) == 0) {
+ set(UCAL_MONTH, 12);
+ set(UCAL_IS_LEAP_MONTH, 0);
+ return;
+ }
+ Calendar::setTemporalMonthCode(code, status);
+}
+
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/i18n/cecal.h b/contrib/libs/icu/i18n/cecal.h
index 9ac71f6ba38..16f36a7976c 100644
--- a/contrib/libs/icu/i18n/cecal.h
+++ b/contrib/libs/icu/i18n/cecal.h
@@ -24,6 +24,36 @@ U_NAMESPACE_BEGIN
*/
class U_I18N_API CECalendar : public Calendar {
+public:
+
+ /**
+ * Gets The Temporal monthCode value corresponding to the month for the date.
+ * The value is a string identifier that starts with the literal grapheme
+ * "M" followed by two graphemes representing the zero-padded month number
+ * of the current month in a normal (non-leap) year. For the short thirteen
+ * month in each year in the CECalendar, the value is "M13".
+ *
+ * @param status ICU Error Code
+ * @return One of 13 possible strings in {"M01".. "M12", "M13"}.
+ * @draft ICU 73
+ */
+ virtual const char* getTemporalMonthCode(UErrorCode& status) const override;
+
+ /**
+ * Sets The Temporal monthCode which is a string identifier that starts
+ * with the literal grapheme "M" followed by two graphemes representing
+ * the zero-padded month number of the current month in a normal
+ * (non-leap) year. For CECalendar calendar, the values
+ * are "M01" .. "M13" while the "M13" is represent the short thirteen month
+ * in each year.
+ *
+ * @param temporalMonth The value to be set for temporal monthCode.
+ * @param status ICU Error Code
+ *
+ * @draft ICU 73
+ */
+ virtual void setTemporalMonthCode(const char* code, UErrorCode& status) override;
+
protected:
//-------------------------------------------------------------------------
// Constructors...
@@ -77,17 +107,6 @@ protected:
virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override;
/**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
- *
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
- * @internal
- */
- virtual UBool inDaylightTime(UErrorCode&) const override;
-
- /**
* Returns true because Coptic/Ethiopic Calendar does have a default century
* @internal
*/
diff --git a/contrib/libs/icu/i18n/chnsecal.cpp b/contrib/libs/icu/i18n/chnsecal.cpp
index f8fb4a40f14..58685632e00 100644
--- a/contrib/libs/icu/i18n/chnsecal.cpp
+++ b/contrib/libs/icu/i18n/chnsecal.cpp
@@ -26,6 +26,7 @@
#include "unicode/simpletz.h"
#include "uhash.h"
#include "ucln_in.h"
+#include "cstring.h"
// Debugging
#ifdef U_DEBUG_CHNSECAL
@@ -52,14 +53,14 @@ static void debug_chnsecal_msg(const char *pat, ...)
// --- The cache --
static icu::UMutex astroLock;
-static icu::CalendarAstronomer *gChineseCalendarAstro = NULL;
+static icu::CalendarAstronomer *gChineseCalendarAstro = nullptr;
// Lazy Creation & Access synchronized by class CalendarCache with a mutex.
-static icu::CalendarCache *gChineseCalendarWinterSolsticeCache = NULL;
-static icu::CalendarCache *gChineseCalendarNewYearCache = NULL;
+static icu::CalendarCache *gChineseCalendarWinterSolsticeCache = nullptr;
+static icu::CalendarCache *gChineseCalendarNewYearCache = nullptr;
-static icu::TimeZone *gChineseCalendarZoneAstroCalc = NULL;
-static icu::UInitOnce gChineseCalendarZoneAstroCalcInitOnce = U_INITONCE_INITIALIZER;
+static icu::TimeZone *gChineseCalendarZoneAstroCalc = nullptr;
+static icu::UInitOnce gChineseCalendarZoneAstroCalcInitOnce {};
/**
* The start year of the Chinese calendar, the 61st year of the reign
@@ -85,25 +86,25 @@ static const int32_t SYNODIC_GAP = 25;
U_CDECL_BEGIN
-static UBool calendar_chinese_cleanup(void) {
+static UBool calendar_chinese_cleanup() {
if (gChineseCalendarAstro) {
delete gChineseCalendarAstro;
- gChineseCalendarAstro = NULL;
+ gChineseCalendarAstro = nullptr;
}
if (gChineseCalendarWinterSolsticeCache) {
delete gChineseCalendarWinterSolsticeCache;
- gChineseCalendarWinterSolsticeCache = NULL;
+ gChineseCalendarWinterSolsticeCache = nullptr;
}
if (gChineseCalendarNewYearCache) {
delete gChineseCalendarNewYearCache;
- gChineseCalendarNewYearCache = NULL;
+ gChineseCalendarNewYearCache = nullptr;
}
if (gChineseCalendarZoneAstroCalc) {
delete gChineseCalendarZoneAstroCalc;
- gChineseCalendarZoneAstroCalc = NULL;
+ gChineseCalendarZoneAstroCalc = nullptr;
}
gChineseCalendarZoneAstroCalcInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -124,7 +125,7 @@ ChineseCalendar* ChineseCalendar::clone() const {
ChineseCalendar::ChineseCalendar(const Locale& aLocale, UErrorCode& success)
: Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success),
- isLeapYear(FALSE),
+ hasLeapMonthBetweenWinterSolstices(false),
fEpochYear(CHINESE_EPOCH_YEAR),
fZoneAstroCalc(getChineseCalZoneAstroCalc())
{
@@ -134,7 +135,7 @@ ChineseCalendar::ChineseCalendar(const Locale& aLocale, UErrorCode& success)
ChineseCalendar::ChineseCalendar(const Locale& aLocale, int32_t epochYear,
const TimeZone* zoneAstroCalc, UErrorCode &success)
: Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success),
- isLeapYear(FALSE),
+ hasLeapMonthBetweenWinterSolstices(false),
fEpochYear(epochYear),
fZoneAstroCalc(zoneAstroCalc)
{
@@ -142,7 +143,7 @@ ChineseCalendar::ChineseCalendar(const Locale& aLocale, int32_t epochYear,
}
ChineseCalendar::ChineseCalendar(const ChineseCalendar& other) : Calendar(other) {
- isLeapYear = other.isLeapYear;
+ hasLeapMonthBetweenWinterSolstices = other.hasLeapMonthBetweenWinterSolstices;
fEpochYear = other.fEpochYear;
fZoneAstroCalc = other.fZoneAstroCalc;
}
@@ -160,7 +161,7 @@ static void U_CALLCONV initChineseCalZoneAstroCalc() {
ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup);
}
-const TimeZone* ChineseCalendar::getChineseCalZoneAstroCalc(void) const {
+const TimeZone* ChineseCalendar::getChineseCalZoneAstroCalc() const {
umtx_initOnce(gChineseCalendarZoneAstroCalcInitOnce, &initChineseCalZoneAstroCalc);
return gChineseCalendarZoneAstroCalc;
}
@@ -196,6 +197,7 @@ static const int32_t LIMITS[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{ 0, 0, 1, 1}, // IS_LEAP_MONTH
+ { 0, 0, 11, 12}, // ORDINAL_MONTH
};
@@ -239,9 +241,9 @@ int32_t ChineseCalendar::handleGetExtendedYear() {
* @stable ICU 2.8
*/
int32_t ChineseCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const {
- int32_t thisStart = handleComputeMonthStart(extendedYear, month, TRUE) -
+ int32_t thisStart = handleComputeMonthStart(extendedYear, month, true) -
kEpochStartAsJulianDay + 1; // Julian day -> local days
- int32_t nextStart = newMoonNear(thisStart + SYNODIC_GAP, TRUE);
+ int32_t nextStart = newMoonNear(thisStart + SYNODIC_GAP, true);
return nextStart - thisStart;
}
@@ -267,7 +269,7 @@ void ChineseCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*statu
computeChineseFields(julianDay - kEpochStartAsJulianDay, // local days
getGregorianYear(), getGregorianMonth(),
- TRUE); // set all fields
+ true); // set all fields
}
/**
@@ -321,25 +323,25 @@ const UFieldResolutionTable* ChineseCalendar::getFieldResolutionTable() const {
* @stable ICU 2.8
*/
int32_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const {
-
ChineseCalendar *nonConstThis = (ChineseCalendar*)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) {
double m = month;
- eyear += (int32_t)ClockMath::floorDivide(m, 12.0, m);
+ eyear += (int32_t)ClockMath::floorDivide(m, 12.0, &m);
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 newMoon = newMoonNear(theNewYear + month * 29, true);
int32_t julianDay = newMoon + kEpochStartAsJulianDay;
// 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);
// Ignore IS_LEAP_MONTH field if useMonth is false
@@ -352,17 +354,17 @@ int32_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U
// This will modify the MONTH and IS_LEAP_MONTH fields (only)
nonConstThis->computeChineseFields(newMoon, getGregorianYear(),
- getGregorianMonth(), FALSE);
+ getGregorianMonth(), false);
if (month != internalGet(UCAL_MONTH) ||
isLeapMonth != internalGet(UCAL_IS_LEAP_MONTH)) {
- newMoon = newMoonNear(newMoon + SYNODIC_GAP, TRUE);
+ newMoon = newMoonNear(newMoon + SYNODIC_GAP, true);
julianDay = newMoon + kEpochStartAsJulianDay;
}
nonConstThis->internalSet(UCAL_MONTH, saveMonth);
+ nonConstThis->internalSet(UCAL_ORDINAL_MONTH, saveOrdinalMonth);
nonConstThis->internalSet(UCAL_IS_LEAP_MONTH, saveIsLeapMonth);
-
return julianDay - 1;
}
@@ -374,6 +376,7 @@ int32_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U
void ChineseCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status) {
switch (field) {
case UCAL_MONTH:
+ case UCAL_ORDINAL_MONTH:
if (amount != 0) {
int32_t dom = get(UCAL_DAY_OF_MONTH, status);
if (U_FAILURE(status)) break;
@@ -404,6 +407,7 @@ void ChineseCalendar::add(EDateFields field, int32_t amount, UErrorCode& status)
void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) {
switch (field) {
case UCAL_MONTH:
+ case UCAL_ORDINAL_MONTH:
if (amount != 0) {
int32_t dom = get(UCAL_DAY_OF_MONTH, status);
if (U_FAILURE(status)) break;
@@ -419,7 +423,7 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode
// leap year.
int32_t m = get(UCAL_MONTH, status); // 0-based month
if (U_FAILURE(status)) break;
- if (isLeapYear) { // (member variable)
+ if (hasLeapMonthBetweenWinterSolstices) { // (member variable)
if (get(UCAL_IS_LEAP_MONTH, status) == 1) {
++m;
} else {
@@ -432,7 +436,7 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode
// otherwise it will be the start of month 1.
int moon1 = moon -
(int) (CalendarAstronomer::SYNODIC_MONTH * (m - 0.5));
- moon1 = newMoonNear(moon1, TRUE);
+ moon1 = newMoonNear(moon1, true);
if (isLeapMonthBetween(moon1, moon)) {
++m;
}
@@ -442,7 +446,7 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode
// 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 = isLeapYear ? 13 : 12; // Months in this year
+ int32_t n = hasLeapMonthBetweenWinterSolstices ? 13 : 12; // Months in this year
int32_t newM = (m + amount) % n;
if (newM < 0) {
newM += n;
@@ -482,10 +486,10 @@ void ChineseCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status
*/
double ChineseCalendar::daysToMillis(double days) const {
double millis = days * (double)kOneDay;
- if (fZoneAstroCalc != NULL) {
+ if (fZoneAstroCalc != nullptr) {
int32_t rawOffset, dstOffset;
UErrorCode status = U_ZERO_ERROR;
- fZoneAstroCalc->getOffset(millis, FALSE, rawOffset, dstOffset, status);
+ fZoneAstroCalc->getOffset(millis, false, rawOffset, dstOffset, status);
if (U_SUCCESS(status)) {
return millis - (double)(rawOffset + dstOffset);
}
@@ -499,10 +503,10 @@ double ChineseCalendar::daysToMillis(double days) const {
* @return days after January 1, 1970 0:00 in the astronomical base zone
*/
double ChineseCalendar::millisToDays(double millis) const {
- if (fZoneAstroCalc != NULL) {
+ if (fZoneAstroCalc != nullptr) {
int32_t rawOffset, dstOffset;
UErrorCode status = U_ZERO_ERROR;
- fZoneAstroCalc->getOffset(millis, FALSE, rawOffset, dstOffset, status);
+ fZoneAstroCalc->getOffset(millis, false, rawOffset, dstOffset, status);
if (U_SUCCESS(status)) {
return ClockMath::floorDivide(millis + (double)(rawOffset + dstOffset), kOneDay);
}
@@ -536,12 +540,12 @@ int32_t ChineseCalendar::winterSolstice(int32_t gyear) const {
double ms = daysToMillis(Grego::fieldsToDay(gyear, UCAL_DECEMBER, 1));
umtx_lock(&astroLock);
- if(gChineseCalendarAstro == NULL) {
+ 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);
+ UDate solarLong = gChineseCalendarAstro->getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), true);
umtx_unlock(&astroLock);
// Winter solstice is 270 degrees solar longitude aka Dongzhi
@@ -566,7 +570,7 @@ int32_t ChineseCalendar::winterSolstice(int32_t gyear) const {
int32_t ChineseCalendar::newMoonNear(double days, UBool after) const {
umtx_lock(&astroLock);
- if(gChineseCalendarAstro == NULL) {
+ if(gChineseCalendarAstro == nullptr) {
gChineseCalendarAstro = new CalendarAstronomer();
ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup);
}
@@ -598,7 +602,7 @@ int32_t ChineseCalendar::synodicMonthsBetween(int32_t day1, int32_t day2) const
int32_t ChineseCalendar::majorSolarTerm(int32_t days) const {
umtx_lock(&astroLock);
- if(gChineseCalendarAstro == NULL) {
+ if(gChineseCalendarAstro == nullptr) {
gChineseCalendarAstro = new CalendarAstronomer();
ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup);
}
@@ -621,7 +625,7 @@ int32_t ChineseCalendar::majorSolarTerm(int32_t days) const {
*/
UBool ChineseCalendar::hasNoMajorSolarTerm(int32_t newMoon) const {
return majorSolarTerm(newMoon) ==
- majorSolarTerm(newMoonNear(newMoon + SYNODIC_GAP, TRUE));
+ majorSolarTerm(newMoonNear(newMoon + SYNODIC_GAP, true));
}
@@ -650,7 +654,7 @@ UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) co
#endif
return (newMoon2 >= newMoon1) &&
- (isLeapMonthBetween(newMoon1, newMoonNear(newMoon2 - SYNODIC_GAP, FALSE)) ||
+ (isLeapMonthBetween(newMoon1, newMoonNear(newMoon2 - SYNODIC_GAP, false)) ||
hasNoMajorSolarTerm(newMoon2));
}
@@ -661,7 +665,7 @@ UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) co
* IS_LEAP_MONTH fields, as required by
* <code>handleComputeMonthStart()</code>.
*
- * <p>As a side effect, this method sets {@link #isLeapYear}.
+ * <p>As a side effect, this method sets {@link #hasLeapMonthBetweenWinterSolstices}.
* @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
@@ -672,7 +676,6 @@ UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) co
*/
void ChineseCalendar::computeChineseFields(int32_t days, int32_t gyear, int32_t gmonth,
UBool setAllFields) {
-
// 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.
@@ -689,27 +692,36 @@ void ChineseCalendar::computeChineseFields(int32_t days, int32_t gyear, int32_t
// 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: isLeapYear is a member variable
- isLeapYear = synodicMonthsBetween(firstMoon, lastMoon) == 12;
+ 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);
- if (isLeapYear && isLeapMonthBetween(firstMoon, thisMoon)) {
+ int32_t theNewYear = newYear(gyear);
+ if (days < theNewYear) {
+ theNewYear = newYear(gyear-1);
+ }
+ if (hasLeapMonthBetweenWinterSolstices && isLeapMonthBetween(firstMoon, thisMoon)) {
month--;
}
if (month < 1) {
month += 12;
}
-
- UBool isLeapMonth = isLeapYear &&
+ int32_t ordinalMonth = synodicMonthsBetween(theNewYear, thisMoon);
+ if (ordinalMonth < 0) {
+ ordinalMonth += 12;
+ }
+ UBool isLeapMonth = hasLeapMonthBetweenWinterSolstices &&
hasNoMajorSolarTerm(thisMoon) &&
- !isLeapMonthBetween(firstMoon, newMoonNear(thisMoon - SYNODIC_GAP, FALSE));
+ !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) {
// Extended year and cycle year is based on the epoch year
@@ -727,7 +739,7 @@ void ChineseCalendar::computeChineseFields(int32_t days, int32_t gyear, int32_t
// 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);
+ int32_t cycle = ClockMath::floorDivide(cycle_year - 1, 60, &yearOfCycle);
internalSet(UCAL_ERA, cycle + 1);
internalSet(UCAL_YEAR, yearOfCycle + 1);
@@ -764,13 +776,13 @@ int32_t ChineseCalendar::newYear(int32_t gyear) const {
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 newMoon1 = newMoonNear(solsticeBefore + 1, true);
+ int32_t newMoon2 = newMoonNear(newMoon1 + SYNODIC_GAP, true);
+ int32_t newMoon11 = newMoonNear(solsticeAfter + 1, false);
if (synodicMonthsBetween(newMoon1, newMoon11) == 12 &&
(hasNoMajorSolarTerm(newMoon1) || hasNoMajorSolarTerm(newMoon2))) {
- cacheValue = newMoonNear(newMoon2 + SYNODIC_GAP, TRUE);
+ cacheValue = newMoonNear(newMoon2 + SYNODIC_GAP, true);
} else {
cacheValue = newMoon2;
}
@@ -801,7 +813,7 @@ void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta) {
newMoon += (int32_t) (CalendarAstronomer::SYNODIC_MONTH * (delta - 0.5));
// Search forward to the target month's new moon
- newMoon = newMoonNear(newMoon, TRUE);
+ newMoon = newMoonNear(newMoon, true);
// Find the target dom
int32_t jd = newMoon + kEpochStartAsJulianDay - 1 + dom;
@@ -825,30 +837,33 @@ void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta) {
}
}
+constexpr uint32_t kChineseRelatedYearDiff = -2637;
-UBool
-ChineseCalendar::inDaylightTime(UErrorCode& status) const
+int32_t ChineseCalendar::getRelatedYear(UErrorCode &status) const
{
- // copied from GregorianCalendar
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime())
- return FALSE;
-
- // Force an update of the state of the Calendar.
- ((ChineseCalendar*)this)->complete(status); // cast away const
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return year + kChineseRelatedYearDiff;
+}
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
+void ChineseCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kChineseRelatedYearDiff);
}
// default century
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInitOnce {};
UBool ChineseCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
UDate ChineseCalendar::defaultCenturyStart() const
@@ -894,8 +909,83 @@ ChineseCalendar::internalGetDefaultCenturyStartYear() const
return gSystemDefaultCenturyStartYear;
}
+bool
+ChineseCalendar::inTemporalLeapYear(UErrorCode &status) const
+{
+ int32_t days = getActualMaximum(UCAL_DAY_OF_YEAR, status);
+ if (U_FAILURE(status)) return false;
+ return days > 360;
+}
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ChineseCalendar)
+
+static const char * const gTemporalLeapMonthCodes[] = {
+ "M01L", "M02L", "M03L", "M04L", "M05L", "M06L",
+ "M07L", "M08L", "M09L", "M10L", "M11L", "M12L", nullptr
+};
+
+const char* ChineseCalendar::getTemporalMonthCode(UErrorCode &status) const {
+ // We need to call get, not internalGet, to force the calculation
+ // from UCAL_ORDINAL_MONTH.
+ int32_t is_leap = get(UCAL_IS_LEAP_MONTH, status);
+ if (U_FAILURE(status)) return nullptr;
+ if (is_leap != 0) {
+ int32_t month = get(UCAL_MONTH, status);
+ if (U_FAILURE(status)) return nullptr;
+ return gTemporalLeapMonthCodes[month];
+ }
+ return Calendar::getTemporalMonthCode(status);
+}
+
+void
+ChineseCalendar::setTemporalMonthCode(const char* code, UErrorCode& status )
+{
+ if (U_FAILURE(status)) return;
+ int32_t len = static_cast<int32_t>(uprv_strlen(code));
+ if (len != 4 || code[0] != 'M' || code[3] != 'L') {
+ set(UCAL_IS_LEAP_MONTH, 0);
+ return Calendar::setTemporalMonthCode(code, status);
+ }
+ for (int m = 0; gTemporalLeapMonthCodes[m] != nullptr; m++) {
+ if (uprv_strcmp(code, gTemporalLeapMonthCodes[m]) == 0) {
+ set(UCAL_MONTH, m);
+ set(UCAL_IS_LEAP_MONTH, 1);
+ return;
+ }
+ }
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+}
+
+int32_t ChineseCalendar::internalGetMonth() const {
+ if (resolveFields(kMonthPrecedence) == UCAL_MONTH) {
+ return internalGet(UCAL_MONTH);
+ }
+ LocalPointer<Calendar> temp(this->clone());
+ temp->set(UCAL_MONTH, 0);
+ temp->set(UCAL_IS_LEAP_MONTH, 0);
+ 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);
+
+
+ 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));
+ nonConstThis->internalSet(UCAL_MONTH, month);
+ return month;
+}
+
+int32_t ChineseCalendar::internalGetMonth(int32_t defaultValue) const {
+ if (resolveFields(kMonthPrecedence) == UCAL_MONTH) {
+ return internalGet(UCAL_MONTH, defaultValue);
+ }
+ return internalGetMonth();
+}
+
U_NAMESPACE_END
#endif
diff --git a/contrib/libs/icu/i18n/chnsecal.h b/contrib/libs/icu/i18n/chnsecal.h
index 61ef2d3cad5..9b5a629fad4 100644
--- a/contrib/libs/icu/i18n/chnsecal.h
+++ b/contrib/libs/icu/i18n/chnsecal.h
@@ -113,6 +113,49 @@ class U_I18N_API ChineseCalendar : public Calendar {
*/
ChineseCalendar(const Locale& aLocale, UErrorCode &success);
+ /**
+ * Returns true if the date is in a leap year.
+ *
+ * @param status ICU Error Code
+ * @return True if the date in the fields is in a Temporal proposal
+ * defined leap year. False otherwise.
+ */
+ virtual bool inTemporalLeapYear(UErrorCode &status) const override;
+
+ /**
+ * Gets The Temporal monthCode value corresponding to the month for the date.
+ * The value is a string identifier that starts with the literal grapheme
+ * "M" followed by two graphemes representing the zero-padded month number
+ * of the current month in a normal (non-leap) year and suffixed by an
+ * optional literal grapheme "L" if this is a leap month in a lunisolar
+ * calendar. For Chinese calendars (including Dangi), the values are
+ * "M01" .. "M12" for non-leap year, and "M01" .. "M12" with one of
+ * "M01L" .. "M12L" for leap year.
+ *
+ * @param status ICU Error Code
+ * @return One of 24 possible strings in
+ * {"M01" .. "M12", "M01L" .. "M12L"}.
+ * @draft ICU 73
+ */
+ virtual const char* getTemporalMonthCode(UErrorCode &status) const override;
+
+ /**
+ * Sets The Temporal monthCode which is a string identifier that starts
+ * with the literal grapheme "M" followed by two graphemes representing
+ * the zero-padded month number of the current month in a normal
+ * (non-leap) year and suffixed by an optional literal grapheme "L" if this
+ * is a leap month in a lunisolar calendar. For Chinese calendars, the values
+ * are "M01" .. "M12" for non-leap years, and "M01" .. "M12" plus one in
+ * "M01L" .. "M12L" for leap year.
+ *
+ * @param temporalMonth The value to be set for temporal monthCode. One of
+ * 24 possible strings in {"M01" .. "M12", "M01L" .. "M12L"}.
+ * @param status ICU Error Code
+ *
+ * @draft ICU 73
+ */
+ virtual void setTemporalMonthCode(const char* code, UErrorCode& status) override;
+
protected:
/**
@@ -152,7 +195,12 @@ class U_I18N_API ChineseCalendar : public Calendar {
// Internal data....
//-------------------------------------------------------------------------
- UBool isLeapYear;
+ // There is a leap month between the Winter Solstice before and after the
+ // current date.This is different from leap year because in some year, such as
+ // 1813 and 2033, the leap month is after the Winter Solstice of that year. So
+ // 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.
@@ -175,6 +223,20 @@ class U_I18N_API ChineseCalendar : public Calendar {
virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode &status) override;
virtual void roll(EDateFields field, int32_t amount, UErrorCode &status) override;
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
+
+ /**
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual void setRelatedYear(int32_t year) override;
+
//----------------------------------------------------------------------
// Internal methods & astronomical calculations
//----------------------------------------------------------------------
@@ -195,7 +257,7 @@ class U_I18N_API ChineseCalendar : public Calendar {
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(void) const;
+ const TimeZone* getChineseCalZoneAstroCalc() const;
// UObject stuff
public:
@@ -204,7 +266,7 @@ class U_I18N_API ChineseCalendar : public Calendar {
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -217,7 +279,7 @@ class U_I18N_API ChineseCalendar : public Calendar {
* @return The class ID for all objects of this class.
* @internal
*/
- static UClassID U_EXPORT2 getStaticClassID(void);
+ static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "chinese".
@@ -227,20 +289,12 @@ class U_I18N_API ChineseCalendar : public Calendar {
*/
virtual const char * getType() const override;
-
protected:
- /**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
- *
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
- * @internal
- */
- virtual UBool inDaylightTime(UErrorCode& status) const override;
+ virtual int32_t internalGetMonth(int32_t defaultValue) const override;
+ virtual int32_t internalGetMonth() const override;
+ protected:
/**
* Returns true because the Islamic Calendar does have a default century
* @internal
@@ -266,15 +320,15 @@ class U_I18N_API ChineseCalendar : public Calendar {
* Returns the beginning date of the 100-year window that dates
* with 2-digit years are considered to fall within.
*/
- UDate internalGetDefaultCenturyStart(void) const;
+ 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(void) const;
+ int32_t internalGetDefaultCenturyStartYear() const;
- ChineseCalendar(); // default constructor not implemented
+ ChineseCalendar() = delete; // default constructor not implemented
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/choicfmt.cpp b/contrib/libs/icu/i18n/choicfmt.cpp
index d06eec35fa2..96e73fabcfa 100644
--- a/contrib/libs/icu/i18n/choicfmt.cpp
+++ b/contrib/libs/icu/i18n/choicfmt.cpp
@@ -51,23 +51,23 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ChoiceFormat)
// Special characters used by ChoiceFormat. There are two characters
// used interchangeably to indicate <=. Either is parsed, but only
// LESS_EQUAL is generated by toPattern().
-#define SINGLE_QUOTE ((UChar)0x0027) /*'*/
-#define LESS_THAN ((UChar)0x003C) /*<*/
-#define LESS_EQUAL ((UChar)0x0023) /*#*/
-#define LESS_EQUAL2 ((UChar)0x2264)
-#define VERTICAL_BAR ((UChar)0x007C) /*|*/
-#define MINUS ((UChar)0x002D) /*-*/
+#define SINGLE_QUOTE ((char16_t)0x0027) /*'*/
+#define LESS_THAN ((char16_t)0x003C) /*<*/
+#define LESS_EQUAL ((char16_t)0x0023) /*#*/
+#define LESS_EQUAL2 ((char16_t)0x2264)
+#define VERTICAL_BAR ((char16_t)0x007C) /*|*/
+#define MINUS ((char16_t)0x002D) /*-*/
-static const UChar LEFT_CURLY_BRACE = 0x7B; /*{*/
-static const UChar RIGHT_CURLY_BRACE = 0x7D; /*}*/
+static const char16_t LEFT_CURLY_BRACE = 0x7B; /*{*/
+static const char16_t RIGHT_CURLY_BRACE = 0x7D; /*}*/
#ifdef INFINITY
#undef INFINITY
#endif
-#define INFINITY ((UChar)0x221E)
+#define INFINITY ((char16_t)0x221E)
-//static const UChar gPositiveInfinity[] = {INFINITY, 0};
-//static const UChar gNegativeInfinity[] = {MINUS, INFINITY, 0};
+//static const char16_t gPositiveInfinity[] = {INFINITY, 0};
+//static const char16_t gNegativeInfinity[] = {MINUS, INFINITY, 0};
#define POSITIVE_INF_STRLEN 1
#define NEGATIVE_INF_STRLEN 2
@@ -92,7 +92,7 @@ ChoiceFormat::ChoiceFormat(const double* limits,
: constructorErrorCode(U_ZERO_ERROR),
msgPattern(constructorErrorCode)
{
- setChoices(limits, NULL, formats, cnt, constructorErrorCode);
+ setChoices(limits, nullptr, formats, cnt, constructorErrorCode);
}
// -------------------------------------
@@ -137,7 +137,7 @@ ChoiceFormat::operator==(const Format& that) const
{
if (this == &that) return true;
if (!NumberFormat::operator==(that)) return false;
- ChoiceFormat& thatAlias = (ChoiceFormat&)that;
+ const ChoiceFormat& thatAlias = static_cast<const ChoiceFormat&>(that);
return msgPattern == thatAlias.msgPattern;
}
@@ -175,10 +175,10 @@ ChoiceFormat::dtos(double value,
char *itrPtr = temp;
char *expPtr;
- sprintf(temp, "%.*g", DBL_DIG, value);
+ snprintf(temp, sizeof(temp), "%.*g", DBL_DIG, value);
/* Find and convert the decimal point.
- Using setlocale on some machines will cause sprintf to use a comma for certain locales.
+ Using setlocale on some machines will cause snprintf to use a comma for certain locales.
*/
while (*itrPtr && (*itrPtr == '-' || isdigit(*itrPtr))) {
itrPtr++;
@@ -209,7 +209,7 @@ ChoiceFormat::dtos(double value,
while (*itrPtr) {
*(expPtr++) = *(itrPtr++);
}
- // NULL terminate
+ // NUL terminate
*expPtr = 0;
}
}
@@ -225,7 +225,7 @@ void
ChoiceFormat::applyPattern(const UnicodeString& pattern,
UErrorCode& status)
{
- msgPattern.parseChoiceStyle(pattern, NULL, status);
+ msgPattern.parseChoiceStyle(pattern, nullptr, status);
constructorErrorCode = status;
}
@@ -257,7 +257,7 @@ ChoiceFormat::setChoices( const double* limits,
int32_t cnt )
{
UErrorCode errorCode = U_ZERO_ERROR;
- setChoices(limits, NULL, formats, cnt, errorCode);
+ setChoices(limits, nullptr, formats, cnt, errorCode);
}
// -------------------------------------
@@ -281,7 +281,7 @@ ChoiceFormat::setChoices(const double* limits,
if (U_FAILURE(errorCode)) {
return;
}
- if (limits == NULL || formats == NULL) {
+ if (limits == nullptr || formats == nullptr) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -301,7 +301,7 @@ ChoiceFormat::setChoices(const double* limits,
} else {
result += dtos(limits[i], buf);
}
- if (closures != NULL && closures[i]) {
+ if (closures != nullptr && closures[i]) {
result += LESS_THAN;
} else {
result += LESS_EQUAL;
@@ -313,7 +313,7 @@ ChoiceFormat::setChoices(const double* limits,
int32_t textLength = text.length();
int32_t nestingLevel = 0;
for (int32_t j = 0; j < textLength; ++j) {
- UChar c = text[j];
+ char16_t c = text[j];
if (c == SINGLE_QUOTE && nestingLevel == 0) {
// Double each top-level apostrophe.
result.append(c);
@@ -347,7 +347,7 @@ const double*
ChoiceFormat::getLimits(int32_t& cnt) const
{
cnt = 0;
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -357,7 +357,7 @@ const UBool*
ChoiceFormat::getClosures(int32_t& cnt) const
{
cnt = 0;
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -367,7 +367,7 @@ const UnicodeString*
ChoiceFormat::getFormats(int32_t& cnt) const
{
cnt = 0;
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -450,7 +450,7 @@ ChoiceFormat::findSubMessage(const MessagePattern &pattern, int32_t partIndex, d
double boundary = pattern.getNumericValue(part);
// Fetch the ARG_SELECTOR character.
int32_t selectorIndex = pattern.getPatternIndex(partIndex++);
- UChar boundaryChar = pattern.getPatternString().charAt(selectorIndex);
+ char16_t boundaryChar = pattern.getPatternString().charAt(selectorIndex);
if (boundaryChar == LESS_THAN ? !(number > boundary) : !(number >= boundary)) {
// The number is in the interval between the previous boundary and the current one.
// Return with the sub-message between them.
diff --git a/contrib/libs/icu/i18n/coleitr.cpp b/contrib/libs/icu/i18n/coleitr.cpp
index 48c1da9015a..be0a8e4690f 100644
--- a/contrib/libs/icu/i18n/coleitr.cpp
+++ b/contrib/libs/icu/i18n/coleitr.cpp
@@ -54,7 +54,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CollationElementIterator)
CollationElementIterator::CollationElementIterator(
const CollationElementIterator& other)
- : UObject(other), iter_(NULL), rbc_(NULL), otherHalf_(0), dir_(0), offsets_(NULL) {
+ : UObject(other), iter_(nullptr), rbc_(nullptr), otherHalf_(0), dir_(0), offsets_(nullptr) {
*this = other;
}
@@ -82,7 +82,7 @@ UBool ceNeedsTwoParts(int64_t ce) {
int32_t CollationElementIterator::getOffset() const
{
- if (dir_ < 0 && offsets_ != NULL && !offsets_->isEmpty()) {
+ if (dir_ < 0 && offsets_ != nullptr && !offsets_->isEmpty()) {
// CollationIterator::previousCE() decrements the CEs length
// while it pops CEs from its internal buffer.
int32_t i = iter_->getCEsLength();
@@ -185,9 +185,9 @@ int32_t CollationElementIterator::previous(UErrorCode& status)
status = U_INVALID_STATE_ERROR;
return NULLORDER;
}
- if (offsets_ == NULL) {
+ if (offsets_ == nullptr) {
offsets_ = new UVector32(status);
- if (offsets_ == NULL) {
+ if (offsets_ == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return NULLORDER;
}
@@ -234,7 +234,7 @@ void CollationElementIterator::setOffset(int32_t newOffset,
if (0 < newOffset && newOffset < string_.length()) {
int32_t offset = newOffset;
do {
- UChar c = string_.charAt(offset);
+ char16_t c = string_.charAt(offset);
if (!rbc_->isUnsafe(c) ||
(U16_IS_LEAD(c) && !rbc_->isUnsafe(string_.char32At(offset)))) {
break;
@@ -278,7 +278,7 @@ void CollationElementIterator::setText(const UnicodeString& source,
}
string_ = source;
- const UChar *s = string_.getBuffer();
+ const char16_t *s = string_.getBuffer();
CollationIterator *newIter;
UBool numeric = rbc_->settings->isNumeric();
if (rbc_->settings->dontCheckFCD()) {
@@ -286,7 +286,7 @@ void CollationElementIterator::setText(const UnicodeString& source,
} else {
newIter = new FCDUTF16CollationIterator(rbc_->data, numeric, s, s, s + string_.length());
}
- if (newIter == NULL) {
+ if (newIter == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -331,7 +331,7 @@ CollationElementIterator::CollationElementIterator(
const UnicodeString &source,
const RuleBasedCollator *coll,
UErrorCode &status)
- : iter_(NULL), rbc_(coll), otherHalf_(0), dir_(0), offsets_(NULL) {
+ : iter_(nullptr), rbc_(coll), otherHalf_(0), dir_(0), offsets_(nullptr) {
setText(source, status);
}
@@ -343,7 +343,7 @@ CollationElementIterator::CollationElementIterator(
const CharacterIterator &source,
const RuleBasedCollator *coll,
UErrorCode &status)
- : iter_(NULL), rbc_(coll), otherHalf_(0), dir_(0), offsets_(NULL) {
+ : iter_(nullptr), rbc_(coll), otherHalf_(0), dir_(0), offsets_(nullptr) {
// We only call source.getText() which should be const anyway.
setText(const_cast<CharacterIterator &>(source), status);
}
@@ -360,18 +360,18 @@ const CollationElementIterator& CollationElementIterator::operator=(
CollationIterator *newIter;
const FCDUTF16CollationIterator *otherFCDIter =
dynamic_cast<const FCDUTF16CollationIterator *>(other.iter_);
- if(otherFCDIter != NULL) {
+ if(otherFCDIter != nullptr) {
newIter = new FCDUTF16CollationIterator(*otherFCDIter, string_.getBuffer());
} else {
const UTF16CollationIterator *otherIter =
dynamic_cast<const UTF16CollationIterator *>(other.iter_);
- if(otherIter != NULL) {
+ if(otherIter != nullptr) {
newIter = new UTF16CollationIterator(*otherIter, string_.getBuffer());
} else {
- newIter = NULL;
+ newIter = nullptr;
}
}
- if(newIter != NULL) {
+ if(newIter != nullptr) {
delete iter_;
iter_ = newIter;
rbc_ = other.rbc_;
@@ -380,12 +380,12 @@ const CollationElementIterator& CollationElementIterator::operator=(
string_ = other.string_;
}
- if(other.dir_ < 0 && other.offsets_ != NULL && !other.offsets_->isEmpty()) {
+ if(other.dir_ < 0 && other.offsets_ != nullptr && !other.offsets_->isEmpty()) {
UErrorCode errorCode = U_ZERO_ERROR;
- if(offsets_ == NULL) {
+ if(offsets_ == nullptr) {
offsets_ = new UVector32(other.offsets_->size(), errorCode);
}
- if(offsets_ != NULL) {
+ if(offsets_ != nullptr) {
offsets_->assign(*other.offsets_, errorCode);
}
}
@@ -435,15 +435,15 @@ MaxExpSink::~MaxExpSink() {}
UHashtable *
CollationElementIterator::computeMaxExpansions(const CollationData *data, UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
UHashtable *maxExpansions = uhash_open(uhash_hashLong, uhash_compareLong,
uhash_compareLong, &errorCode);
- if (U_FAILURE(errorCode)) { return NULL; }
+ if (U_FAILURE(errorCode)) { return nullptr; }
MaxExpSink sink(maxExpansions, errorCode);
- ContractionsAndExpansions(NULL, NULL, &sink, TRUE).forData(data, errorCode);
+ ContractionsAndExpansions(nullptr, nullptr, &sink, true).forData(data, errorCode);
if (U_FAILURE(errorCode)) {
uhash_close(maxExpansions);
- return NULL;
+ return nullptr;
}
return maxExpansions;
}
@@ -457,7 +457,7 @@ int32_t
CollationElementIterator::getMaxExpansion(const UHashtable *maxExpansions, int32_t order) {
if (order == 0) { return 1; }
int32_t max;
- if(maxExpansions != NULL && (max = uhash_igeti(maxExpansions, order)) != 0) {
+ if(maxExpansions != nullptr && (max = uhash_igeti(maxExpansions, order)) != 0) {
return max;
}
if ((order & 0xc0) == 0xc0) {
diff --git a/contrib/libs/icu/i18n/coll.cpp b/contrib/libs/icu/i18n/coll.cpp
index fe73118da03..ced55c8dbf0 100644
--- a/contrib/libs/icu/i18n/coll.cpp
+++ b/contrib/libs/icu/i18n/coll.cpp
@@ -61,33 +61,33 @@
#include "uresimp.h"
#include "ucln_in.h"
-static icu::Locale* availableLocaleList = NULL;
+static icu::Locale* availableLocaleList = nullptr;
static int32_t availableLocaleListCount;
#if !UCONFIG_NO_SERVICE
-static icu::ICULocaleService* gService = NULL;
-static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+static icu::ICULocaleService* gService = nullptr;
+static icu::UInitOnce gServiceInitOnce {};
#endif
-static icu::UInitOnce gAvailableLocaleListInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gAvailableLocaleListInitOnce {};
/**
* Release all static memory held by collator.
*/
U_CDECL_BEGIN
-static UBool U_CALLCONV collator_cleanup(void) {
+static UBool U_CALLCONV collator_cleanup() {
#if !UCONFIG_NO_SERVICE
if (gService) {
delete gService;
- gService = NULL;
+ gService = nullptr;
}
gServiceInitOnce.reset();
#endif
if (availableLocaleList) {
delete []availableLocaleList;
- availableLocaleList = NULL;
+ availableLocaleList = nullptr;
}
availableLocaleListCount = 0;
gAvailableLocaleListInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -108,8 +108,8 @@ CollatorFactory::~CollatorFactory() {}
//-------------------------------------------
UBool
-CollatorFactory::visible(void) const {
- return TRUE;
+CollatorFactory::visible() const {
+ return true;
}
//-------------------------------------------
@@ -137,7 +137,7 @@ ICUCollatorFactory::~ICUCollatorFactory() {}
UObject*
ICUCollatorFactory::create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const {
if (handlesKey(key, status)) {
- const LocaleKey& lkey = (const LocaleKey&)key;
+ const LocaleKey& lkey = static_cast<const LocaleKey&>(key);
Locale loc;
// make sure the requested locale is correct
// default LocaleFactory uses currentLocale since that's the one vetted by handlesKey
@@ -146,7 +146,7 @@ ICUCollatorFactory::create(const ICUServiceKey& key, const ICUService* /* servic
return Collator::makeInstance(loc, status);
}
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -167,7 +167,8 @@ public:
}
virtual UObject* handleDefault(const ICUServiceKey& key, UnicodeString* actualID, UErrorCode& status) const override {
- LocaleKey& lkey = (LocaleKey&)key;
+ const LocaleKey* lkey = dynamic_cast<const LocaleKey*>(&key);
+ U_ASSERT(lkey != nullptr);
if (actualID) {
// Ugly Hack Alert! We return an empty actualID to signal
// to callers that this is a default object, not a "real"
@@ -175,13 +176,13 @@ public:
actualID->truncate(0);
}
Locale loc("");
- lkey.canonicalLocale(loc);
+ lkey->canonicalLocale(loc);
return Collator::makeInstance(loc, status);
}
virtual UObject* getKey(ICUServiceKey& key, UnicodeString* actualReturn, UErrorCode& status) const override {
UnicodeString ar;
- if (actualReturn == NULL) {
+ if (actualReturn == nullptr) {
actualReturn = &ar;
}
return (Collator*)ICULocaleService::getKey(key, actualReturn, status);
@@ -203,7 +204,7 @@ static void U_CALLCONV initService() {
static ICULocaleService*
-getService(void)
+getService()
{
umtx_initOnce(gServiceInitOnce, &initService);
return gService;
@@ -212,9 +213,9 @@ getService(void)
// -------------------------------------
static inline UBool
-hasService(void)
+hasService()
{
- UBool retVal = !gServiceInitOnce.isReset() && (getService() != NULL);
+ UBool retVal = !gServiceInitOnce.isReset() && (getService() != nullptr);
return retVal;
}
@@ -223,9 +224,9 @@ hasService(void)
static void U_CALLCONV
initAvailableLocaleList(UErrorCode &status) {
U_ASSERT(availableLocaleListCount == 0);
- U_ASSERT(availableLocaleList == NULL);
+ U_ASSERT(availableLocaleList == nullptr);
// for now, there is a hardcoded list, so just walk through that list and set it up.
- UResourceBundle *index = NULL;
+ UResourceBundle *index = nullptr;
StackUResourceBundle installed;
int32_t i = 0;
@@ -236,11 +237,11 @@ initAvailableLocaleList(UErrorCode &status) {
availableLocaleListCount = ures_getSize(installed.getAlias());
availableLocaleList = new Locale[availableLocaleListCount];
- if (availableLocaleList != NULL) {
+ if (availableLocaleList != nullptr) {
ures_resetIterator(installed.getAlias());
while(ures_hasNext(installed.getAlias())) {
- const char *tempKey = NULL;
- ures_getNextString(installed.getAlias(), NULL, &tempKey, &status);
+ const char *tempKey = nullptr;
+ ures_getNextString(installed.getAlias(), nullptr, &tempKey, &status);
availableLocaleList[i++] = Locale(tempKey);
}
}
@@ -372,7 +373,7 @@ void setAttributesFromKeywords(const Locale &loc, Collator &coll, UErrorCode &er
return;
}
if (length != 0) {
- int32_t codes[USCRIPT_CODE_LIMIT + UCOL_REORDER_CODE_LIMIT - UCOL_REORDER_CODE_FIRST];
+ int32_t codes[USCRIPT_CODE_LIMIT + (UCOL_REORDER_CODE_LIMIT - UCOL_REORDER_CODE_FIRST)];
int32_t codesLength = 0;
char *scriptName = value;
for (;;) {
@@ -434,7 +435,7 @@ Collator* U_EXPORT2 Collator::createInstance(const Locale& desiredLocale,
if (desiredLocale.isBogus()) {
// Locale constructed from malformed locale ID or language tag.
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
Collator* coll;
@@ -446,18 +447,18 @@ Collator* U_EXPORT2 Collator::createInstance(const Locale& desiredLocale,
#endif
{
coll = makeInstance(desiredLocale, status);
- // Either returns NULL with U_FAILURE(status), or non-NULL with U_SUCCESS(status)
+ // Either returns nullptr with U_FAILURE(status), or non-nullptr with U_SUCCESS(status)
}
- // The use of *coll in setAttributesFromKeywords can cause the NULL check to be
+ // The use of *coll in setAttributesFromKeywords can cause the nullptr check to be
// optimized out of the delete even though setAttributesFromKeywords returns
// immediately if U_FAILURE(status), so we add a check here.
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
setAttributesFromKeywords(desiredLocale, *coll, status);
if (U_FAILURE(status)) {
delete coll;
- return NULL;
+ return nullptr;
}
return coll;
}
@@ -467,7 +468,7 @@ Collator* Collator::makeInstance(const Locale& desiredLocale, UErrorCode& statu
const CollationCacheEntry *entry = CollationLoader::loadTailoring(desiredLocale, status);
if (U_SUCCESS(status)) {
Collator *result = new RuleBasedCollator(entry);
- if (result != NULL) {
+ if (result != nullptr) {
// Both the unified cache's get() and the RBC constructor
// did addRef(). Undo one of them.
entry->removeRef();
@@ -475,11 +476,11 @@ Collator* Collator::makeInstance(const Locale& desiredLocale, UErrorCode& statu
}
status = U_MEMORY_ALLOCATION_ERROR;
}
- if (entry != NULL) {
+ if (entry != nullptr) {
// Undo the addRef() from the cache.get().
entry->removeRef();
}
- return NULL;
+ return nullptr;
}
Collator *
@@ -505,8 +506,8 @@ Collator::EComparisonResult Collator::compare(const UnicodeString& source,
}
// implement deprecated, previously abstract method
-Collator::EComparisonResult Collator::compare(const UChar* source, int32_t sourceLength,
- const UChar* target, int32_t targetLength)
+Collator::EComparisonResult Collator::compare(const char16_t* source, int32_t sourceLength,
+ const char16_t* target, int32_t targetLength)
const
{
UErrorCode ec = U_ZERO_ERROR;
@@ -561,7 +562,7 @@ UBool Collator::greater(const UnicodeString& source,
const Locale* U_EXPORT2 Collator::getAvailableLocales(int32_t& count)
{
UErrorCode status = U_ZERO_ERROR;
- Locale *result = NULL;
+ Locale *result = nullptr;
count = 0;
if (isAvailableLocaleListInitialized(status))
{
@@ -594,7 +595,7 @@ UnicodeString& U_EXPORT2 Collator::getDisplayName(const Locale& objectLocale,
/* This is useless information */
/*void Collator::getVersion(UVersionInfo versionInfo) const
{
- if (versionInfo!=NULL)
+ if (versionInfo!=nullptr)
uprv_memcpy(versionInfo, fVersion, U_MAX_VERSION_LENGTH);
}
*/
@@ -665,7 +666,7 @@ Collator::setLocales(const Locale& /* requestedLocale */, const Locale& /* valid
UnicodeSet *Collator::getTailoredSet(UErrorCode &status) const
{
if(U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// everything can be changed
return new UnicodeSet(0, 0x10FFFF);
@@ -684,7 +685,7 @@ Collator::registerInstance(Collator* toAdopt, const Locale& locale, UErrorCode&
toAdopt->setLocales(locale, locale, locale);
return getService()->registerInstance(toAdopt, locale, status);
}
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -698,7 +699,7 @@ public:
CFactory(CollatorFactory* delegate, UErrorCode& status)
: LocaleKeyFactory(delegate->visible() ? VISIBLE : INVISIBLE)
, _delegate(delegate)
- , _ids(NULL)
+ , _ids(nullptr)
{
if (U_SUCCESS(status)) {
int32_t count = 0;
@@ -709,7 +710,7 @@ public:
_ids->put(idlist[i], (void*)this, status);
if (U_FAILURE(status)) {
delete _ids;
- _ids = NULL;
+ _ids = nullptr;
return;
}
}
@@ -729,7 +730,7 @@ protected:
if (U_SUCCESS(status)) {
return _ids;
}
- return NULL;
+ return nullptr;
}
virtual UnicodeString&
@@ -746,12 +747,13 @@ UObject*
CFactory::create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const
{
if (handlesKey(key, status)) {
- const LocaleKey& lkey = (const LocaleKey&)key;
+ const LocaleKey* lkey = dynamic_cast<const LocaleKey*>(&key);
+ U_ASSERT(lkey != nullptr);
Locale validLoc;
- lkey.currentLocale(validLoc);
+ lkey->currentLocale(validLoc);
return _delegate->createCollator(validLoc);
}
- return NULL;
+ return nullptr;
}
UnicodeString&
@@ -760,7 +762,7 @@ CFactory::getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeS
if ((_coverage & 0x1) == 0) {
UErrorCode status = U_ZERO_ERROR;
const Hashtable* ids = getSupportedIDs(status);
- if (ids && (ids->get(id) != NULL)) {
+ if (ids && (ids->get(id) != nullptr)) {
Locale loc;
LocaleUtility::initLocaleFromName(id, loc);
return _delegate->getDisplayName(loc, locale, result);
@@ -780,7 +782,7 @@ Collator::registerFactory(CollatorFactory* toAdopt, UErrorCode& status)
}
status = U_MEMORY_ALLOCATION_ERROR;
}
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -794,7 +796,7 @@ Collator::unregister(URegistryKey key, UErrorCode& status)
}
status = U_ILLEGAL_ARGUMENT_ERROR;
}
- return FALSE;
+ return false;
}
#endif /* UCONFIG_NO_SERVICE */
@@ -802,8 +804,8 @@ class CollationLocaleListEnumeration : public StringEnumeration {
private:
int32_t index;
public:
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
public:
CollationLocaleListEnumeration()
: index(0)
@@ -831,14 +833,14 @@ public:
const char* result;
if(index < availableLocaleListCount) {
result = availableLocaleList[index++].getName();
- if(resultLength != NULL) {
+ if(resultLength != nullptr) {
*resultLength = (int32_t)uprv_strlen(result);
}
} else {
- if(resultLength != NULL) {
+ if(resultLength != nullptr) {
*resultLength = 0;
}
- result = NULL;
+ result = nullptr;
}
return result;
}
@@ -862,7 +864,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CollationLocaleListEnumeration)
// -------------------------------------
StringEnumeration* U_EXPORT2
-Collator::getAvailableLocales(void)
+Collator::getAvailableLocales()
{
#if !UCONFIG_NO_SERVICE
if (hasService()) {
@@ -873,7 +875,7 @@ Collator::getAvailableLocales(void)
if (isAvailableLocaleListInitialized(status)) {
return new CollationLocaleListEnumeration();
}
- return NULL;
+ return nullptr;
}
StringEnumeration* U_EXPORT2
@@ -911,7 +913,7 @@ Collator::getFunctionalEquivalent(const char* keyword, const Locale& locale,
}
Collator::ECollationStrength
-Collator::getStrength(void) const {
+Collator::getStrength() const {
UErrorCode intStatus = U_ZERO_ERROR;
return (ECollationStrength)getAttribute(UCOL_STRENGTH, intStatus);
}
@@ -961,7 +963,7 @@ Collator::getEquivalentReorderCodes(int32_t reorderCode,
int32_t *dest, int32_t capacity,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return 0; }
- if(capacity < 0 || (dest == NULL && capacity > 0)) {
+ if(capacity < 0 || (dest == nullptr && capacity > 0)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -986,7 +988,7 @@ Collator::internalCompareUTF8(const char *left, int32_t leftLength,
const char *right, int32_t rightLength,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
- if((left == NULL && leftLength != 0) || (right == NULL && rightLength != 0)) {
+ if((left == nullptr && leftLength != 0) || (right == nullptr && rightLength != 0)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return UCOL_EQUAL;
}
diff --git a/contrib/libs/icu/i18n/collation.cpp b/contrib/libs/icu/i18n/collation.cpp
index 14cb86576b8..705ee12e23c 100644
--- a/contrib/libs/icu/i18n/collation.cpp
+++ b/contrib/libs/icu/i18n/collation.cpp
@@ -20,15 +20,6 @@
U_NAMESPACE_BEGIN
-// Some compilers don't care if constants are defined in the .cpp file.
-// MS Visual C++ does not like it, but gcc requires it. clang does not care.
-#ifndef _MSC_VER
-const uint8_t Collation::LEVEL_SEPARATOR_BYTE;
-const uint8_t Collation::MERGE_SEPARATOR_BYTE;
-const uint32_t Collation::ONLY_TERTIARY_MASK;
-const uint32_t Collation::CASE_AND_TERTIARY_MASK;
-#endif
-
uint32_t
Collation::incTwoBytePrimaryByOffset(uint32_t basePrimary, UBool isCompressible, int32_t offset) {
// Extract the second byte, minus the minimum byte value,
diff --git a/contrib/libs/icu/i18n/collation.h b/contrib/libs/icu/i18n/collation.h
index 6a449a3eb69..2062ef29467 100644
--- a/contrib/libs/icu/i18n/collation.h
+++ b/contrib/libs/icu/i18n/collation.h
@@ -221,7 +221,8 @@ public:
/**
* Points to contraction data.
* Bits 31..13: Index into prefix/contraction data.
- * Bits 12..11: Unused, 0.
+ * Bit 12: Unused, 0.
+ * Bit 11: CONTRACT_HAS_STARTER flag. (Used by ICU4X only.)
* Bit 10: CONTRACT_TRAILING_CCC flag.
* Bit 9: CONTRACT_NEXT_CCC flag.
* Bit 8: CONTRACT_SINGLE_CP_NO_MATCH flag.
@@ -298,6 +299,8 @@ public:
static const uint32_t CONTRACT_NEXT_CCC = 0x200;
/** Set if any contraction suffix ends with lccc!=0. */
static const uint32_t CONTRACT_TRAILING_CCC = 0x400;
+ /** Set if any contraction suffix contains a starter. (Used by ICU4X only.) */
+ static const uint32_t CONTRACT_HAS_STARTER = 0x800;
/** For HANGUL_TAG: None of its Jamo CE32s isSpecialCE32(). */
static const uint32_t HANGUL_NO_SPECIAL_JAMO = 0x100;
@@ -491,7 +494,7 @@ public:
}
private:
- Collation(); // No instantiation.
+ Collation() = delete; // No instantiation.
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/collationbuilder.cpp b/contrib/libs/icu/i18n/collationbuilder.cpp
index 5d4611b851d..d8fb89738c6 100644
--- a/contrib/libs/icu/i18n/collationbuilder.cpp
+++ b/contrib/libs/icu/i18n/collationbuilder.cpp
@@ -83,75 +83,75 @@ BundleImporter::getRules(
// most code will not have a static dependency on the builder code.
RuleBasedCollator::RuleBasedCollator()
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
+ actualLocaleIsSameAsValid(false) {
}
RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, UErrorCode &errorCode)
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
- internalBuildTailoring(rules, UCOL_DEFAULT, UCOL_DEFAULT, NULL, NULL, errorCode);
+ actualLocaleIsSameAsValid(false) {
+ internalBuildTailoring(rules, UCOL_DEFAULT, UCOL_DEFAULT, nullptr, nullptr, errorCode);
}
RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, ECollationStrength strength,
UErrorCode &errorCode)
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
- internalBuildTailoring(rules, strength, UCOL_DEFAULT, NULL, NULL, errorCode);
+ actualLocaleIsSameAsValid(false) {
+ internalBuildTailoring(rules, strength, UCOL_DEFAULT, nullptr, nullptr, errorCode);
}
RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules,
UColAttributeValue decompositionMode,
UErrorCode &errorCode)
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
- internalBuildTailoring(rules, UCOL_DEFAULT, decompositionMode, NULL, NULL, errorCode);
+ actualLocaleIsSameAsValid(false) {
+ internalBuildTailoring(rules, UCOL_DEFAULT, decompositionMode, nullptr, nullptr, errorCode);
}
RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules,
ECollationStrength strength,
UColAttributeValue decompositionMode,
UErrorCode &errorCode)
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
- internalBuildTailoring(rules, strength, decompositionMode, NULL, NULL, errorCode);
+ actualLocaleIsSameAsValid(false) {
+ internalBuildTailoring(rules, strength, decompositionMode, nullptr, nullptr, errorCode);
}
RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules,
UParseError &parseError, UnicodeString &reason,
UErrorCode &errorCode)
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
+ actualLocaleIsSameAsValid(false) {
internalBuildTailoring(rules, UCOL_DEFAULT, UCOL_DEFAULT, &parseError, &reason, errorCode);
}
@@ -163,7 +163,7 @@ RuleBasedCollator::internalBuildTailoring(const UnicodeString &rules,
UErrorCode &errorCode) {
const CollationTailoring *base = CollationRoot::getRoot(errorCode);
if(U_FAILURE(errorCode)) { return; }
- if(outReason != NULL) { outReason->remove(); }
+ if(outReason != nullptr) { outReason->remove(); }
CollationBuilder builder(base, errorCode);
UVersionInfo noVersion = { 0, 0, 0, 0 };
BundleImporter importer;
@@ -172,7 +172,7 @@ RuleBasedCollator::internalBuildTailoring(const UnicodeString &rules,
outParseError, errorCode));
if(U_FAILURE(errorCode)) {
const char *reason = builder.getErrorReason();
- if(reason != NULL && outReason != NULL) {
+ if(reason != nullptr && outReason != nullptr) {
*outReason = UnicodeString(reason, -1, US_INV);
}
return;
@@ -191,14 +191,7 @@ RuleBasedCollator::internalBuildTailoring(const UnicodeString &rules,
// CollationBuilder implementation ----------------------------------------- ***
-// Some compilers don't care if constants are defined in the .cpp file.
-// MS Visual C++ does not like it, but gcc requires it. clang does not care.
-#ifndef _MSC_VER
-const int32_t CollationBuilder::HAS_BEFORE2;
-const int32_t CollationBuilder::HAS_BEFORE3;
-#endif
-
-CollationBuilder::CollationBuilder(const CollationTailoring *b, UErrorCode &errorCode)
+CollationBuilder::CollationBuilder(const CollationTailoring *b, UBool icu4xMode, UErrorCode &errorCode)
: nfd(*Normalizer2::getNFDInstance(errorCode)),
fcd(*Normalizer2Factory::getFCDInstance(errorCode)),
nfcImpl(*Normalizer2Factory::getNFCImpl(errorCode)),
@@ -206,8 +199,9 @@ CollationBuilder::CollationBuilder(const CollationTailoring *b, UErrorCode &erro
baseData(b->data),
rootElements(b->data->rootElements, b->data->rootElementsLength),
variableTop(0),
- dataBuilder(new CollationDataBuilder(errorCode)), fastLatinEnabled(TRUE),
- errorReason(NULL),
+ dataBuilder(new CollationDataBuilder(icu4xMode, errorCode)), fastLatinEnabled(true),
+ icu4xMode(icu4xMode),
+ errorReason(nullptr),
cesLength(0),
rootPrimaryIndexes(errorCode), nodes(errorCode) {
nfcImpl.ensureCanonIterData(errorCode);
@@ -215,7 +209,7 @@ CollationBuilder::CollationBuilder(const CollationTailoring *b, UErrorCode &erro
errorReason = "CollationBuilder fields initialization failed";
return;
}
- if(dataBuilder == NULL) {
+ if(dataBuilder == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -225,6 +219,10 @@ CollationBuilder::CollationBuilder(const CollationTailoring *b, UErrorCode &erro
}
}
+CollationBuilder::CollationBuilder(const CollationTailoring *b, UErrorCode &errorCode)
+ : CollationBuilder(b, false, errorCode)
+{}
+
CollationBuilder::~CollationBuilder() {
delete dataBuilder;
}
@@ -235,19 +233,19 @@ CollationBuilder::parseAndBuild(const UnicodeString &ruleString,
CollationRuleParser::Importer *importer,
UParseError *outParseError,
UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
- if(baseData->rootElements == NULL) {
+ if(U_FAILURE(errorCode)) { return nullptr; }
+ if(baseData->rootElements == nullptr) {
errorCode = U_MISSING_RESOURCE_ERROR;
errorReason = "missing root elements data, tailoring not supported";
- return NULL;
+ return nullptr;
}
LocalPointer<CollationTailoring> tailoring(new CollationTailoring(base->settings));
if(tailoring.isNull() || tailoring->isBogus()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
CollationRuleParser parser(baseData, errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
// Note: This always bases &[last variable] and &[first regular]
// on the root collator's maxVariable/variableTop.
// If we wanted this to change after [maxVariable x], then we would keep
@@ -259,28 +257,32 @@ CollationBuilder::parseAndBuild(const UnicodeString &ruleString,
CollationSettings &ownedSettings = *SharedObject::copyOnWrite(tailoring->settings);
parser.parse(ruleString, ownedSettings, outParseError, errorCode);
errorReason = parser.getErrorReason();
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
if(dataBuilder->hasMappings()) {
makeTailoredCEs(errorCode);
- closeOverComposites(errorCode);
+ if (!icu4xMode) {
+ closeOverComposites(errorCode);
+ }
finalizeCEs(errorCode);
- // Copy all of ASCII, and Latin-1 letters, into each tailoring.
- optimizeSet.add(0, 0x7f);
- optimizeSet.add(0xc0, 0xff);
- // Hangul is decomposed on the fly during collation,
- // and the tailoring data is always built with HANGUL_TAG specials.
- optimizeSet.remove(Hangul::HANGUL_BASE, Hangul::HANGUL_END);
- dataBuilder->optimize(optimizeSet, errorCode);
+ if (!icu4xMode) {
+ // Copy all of ASCII, and Latin-1 letters, into each tailoring.
+ optimizeSet.add(0, 0x7f);
+ optimizeSet.add(0xc0, 0xff);
+ // Hangul is decomposed on the fly during collation,
+ // and the tailoring data is always built with HANGUL_TAG specials.
+ optimizeSet.remove(Hangul::HANGUL_BASE, Hangul::HANGUL_END);
+ dataBuilder->optimize(optimizeSet, errorCode);
+ }
tailoring->ensureOwnedData(errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
if(fastLatinEnabled) { dataBuilder->enableFastLatin(); }
dataBuilder->build(*tailoring->ownedData, errorCode);
tailoring->builder = dataBuilder;
- dataBuilder = NULL;
+ dataBuilder = nullptr;
} else {
tailoring->data = baseData;
}
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
ownedSettings.fastLatinOptions = CollationFastLatin::getOptions(
tailoring->data, ownedSettings,
ownedSettings.fastLatinPrimaries, UPRV_LENGTHOF(ownedSettings.fastLatinPrimaries));
@@ -484,7 +486,7 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str,
U_ASSERT(str.length() == 2);
int64_t ce;
int32_t strength = UCOL_PRIMARY;
- UBool isBoundary = FALSE;
+ UBool isBoundary = false;
UChar32 pos = str.charAt(1) - CollationRuleParser::POS_BASE;
U_ASSERT(0 <= pos && pos <= CollationRuleParser::LAST_TRAILING);
switch(pos) {
@@ -544,14 +546,14 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str,
break;
case CollationRuleParser::FIRST_VARIABLE:
ce = rootElements.getFirstPrimaryCE();
- isBoundary = TRUE; // FractionalUCA.txt: FDD1 00A0, SPACE first primary
+ isBoundary = true; // FractionalUCA.txt: FDD1 00A0, SPACE first primary
break;
case CollationRuleParser::LAST_VARIABLE:
ce = rootElements.lastCEWithPrimaryBefore(variableTop + 1);
break;
case CollationRuleParser::FIRST_REGULAR:
ce = rootElements.firstCEWithPrimaryAtLeast(variableTop + 1);
- isBoundary = TRUE; // FractionalUCA.txt: FDD1 263A, SYMBOL first primary
+ isBoundary = true; // FractionalUCA.txt: FDD1 263A, SYMBOL first primary
break;
case CollationRuleParser::LAST_REGULAR:
// Use the Hani-first-primary rather than the actual last "regular" CE before it,
@@ -570,7 +572,7 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str,
return 0;
case CollationRuleParser::FIRST_TRAILING:
ce = Collation::makeCE(Collation::FIRST_TRAILING_PRIMARY);
- isBoundary = TRUE; // trailing first primary (there is no mapping for it)
+ isBoundary = true; // trailing first primary (there is no mapping for it)
break;
case CollationRuleParser::LAST_TRAILING:
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
@@ -667,7 +669,7 @@ CollationBuilder::addRelation(int32_t strength, const UnicodeString &prefix,
// It does not work with certain types of contextual mappings.
int32_t nfdLength = nfdString.length();
if(nfdLength >= 2) {
- UChar c = nfdString.charAt(0);
+ char16_t c = nfdString.charAt(0);
if(Hangul::isJamoL(c) || Hangul::isJamoV(c)) {
// While handling a Hangul syllable, contractions starting with Jamo L or V
// would not see the following Jamo of that syllable.
@@ -743,14 +745,18 @@ CollationBuilder::addRelation(int32_t strength, const UnicodeString &prefix,
}
}
uint32_t ce32 = Collation::UNASSIGNED_CE32;
- if((prefix != nfdPrefix || str != nfdString) &&
+ if(!icu4xMode && (prefix != nfdPrefix || str != nfdString) &&
!ignorePrefix(prefix, errorCode) && !ignoreString(str, errorCode)) {
// Map from the original input to the CEs.
// We do this in case the canonical closure is incomplete,
// so that it is possible to explicitly provide the missing mappings.
ce32 = addIfDifferent(prefix, str, ces, cesLength, ce32, errorCode);
}
- addWithClosure(nfdPrefix, nfdString, ces, cesLength, ce32, errorCode);
+ if (!icu4xMode) {
+ addWithClosure(nfdPrefix, nfdString, ces, cesLength, ce32, errorCode);
+ } else {
+ addIfDifferent(nfdPrefix, nfdString, ces, cesLength, ce32, errorCode);
+ }
if(U_FAILURE(errorCode)) {
parserErrorReason = "writing collation elements";
return;
@@ -1024,8 +1030,8 @@ CollationBuilder::setCaseBits(const UnicodeString &nfdString,
int64_t cases = 0;
if(numTailoredPrimaries > 0) {
- const UChar *s = nfdString.getBuffer();
- UTF16CollationIterator baseCEs(baseData, FALSE, s, s, s + nfdString.length());
+ const char16_t *s = nfdString.getBuffer();
+ UTF16CollationIterator baseCEs(baseData, false, s, s, s + nfdString.length());
int32_t baseCEsLength = baseCEs.fetchCEs(errorCode) - 1;
if(U_FAILURE(errorCode)) {
parserErrorReason = "fetching root CEs for tailored string";
@@ -1217,18 +1223,18 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString,
UChar32 composite, const UnicodeString &decomp,
UnicodeString &newNFDString, UnicodeString &newString,
UErrorCode &errorCode) const {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(nfdString.char32At(indexAfterLastStarter - 1) == decomp.char32At(0));
int32_t lastStarterLength = decomp.moveIndex32(0, 1);
if(lastStarterLength == decomp.length()) {
// Singleton decompositions should be found by addWithClosure()
// and the CanonicalIterator, so we can ignore them here.
- return FALSE;
+ return false;
}
if(nfdString.compare(indexAfterLastStarter, 0x7fffffff,
decomp, lastStarterLength, 0x7fffffff) == 0) {
// same strings, nothing new to be found here
- return FALSE;
+ return false;
}
// Make new FCD strings that combine a composite, or its decomposition,
@@ -1238,7 +1244,7 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString,
newString.setTo(nfdString, 0, indexAfterLastStarter - lastStarterLength).append(composite);
// The following is related to discontiguous contraction matching,
- // but builds only FCD strings (or else returns FALSE).
+ // but builds only FCD strings (or else returns false).
int32_t sourceIndex = indexAfterLastStarter;
int32_t decompIndex = lastStarterLength;
// Small optimization: We keep the source character across loop iterations
@@ -1265,16 +1271,16 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString,
// Unable to merge because the source contains a non-zero combining mark
// but the composite's decomposition contains another starter.
// The strings would not be equivalent.
- return FALSE;
+ return false;
} else if(sourceCC < decompCC) {
// Composite + sourceChar would not be FCD.
- return FALSE;
+ return false;
} else if(decompCC < sourceCC) {
newNFDString.append(decompChar);
decompIndex += U16_LENGTH(decompChar);
} else if(decompChar != sourceChar) {
// Blocked because same combining class.
- return FALSE;
+ return false;
} else { // match: decompChar == sourceChar
newNFDString.append(decompChar);
decompIndex += U16_LENGTH(decompChar);
@@ -1286,7 +1292,7 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString,
if(sourceChar >= 0) { // more characters from nfdString but not from decomp
if(sourceCC < decompCC) {
// Appending the next source character to the composite would not be FCD.
- return FALSE;
+ return false;
}
newNFDString.append(nfdString, sourceIndex, 0x7fffffff);
newString.append(nfdString, sourceIndex, 0x7fffffff);
@@ -1296,7 +1302,7 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString,
U_ASSERT(nfd.isNormalized(newNFDString, errorCode));
U_ASSERT(fcd.isNormalized(newString, errorCode));
U_ASSERT(nfd.normalize(newString, errorCode) == newNFDString); // canonically equivalent
- return TRUE;
+ return true;
}
UBool
@@ -1361,13 +1367,13 @@ UBool
CollationBuilder::sameCEs(const int64_t ces1[], int32_t ces1Length,
const int64_t ces2[], int32_t ces2Length) {
if(ces1Length != ces2Length) {
- return FALSE;
+ return false;
}
U_ASSERT(ces1Length <= Collation::MAX_EXPANSION_LENGTH);
for(int32_t i = 0; i < ces1Length; ++i) {
- if(ces1[i] != ces2[i]) { return FALSE; }
+ if(ces1[i] != ces2[i]) { return false; }
}
- return TRUE;
+ return true;
}
#ifdef DEBUG_COLLATION_BUILDER
@@ -1399,9 +1405,9 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) {
uint32_t s = p == 0 ? 0 : Collation::COMMON_WEIGHT16;
uint32_t t = s;
uint32_t q = 0;
- UBool pIsTailored = FALSE;
- UBool sIsTailored = FALSE;
- UBool tIsTailored = FALSE;
+ UBool pIsTailored = false;
+ UBool sIsTailored = false;
+ UBool tIsTailored = false;
#ifdef DEBUG_COLLATION_BUILDER
printf("\nprimary %lx\n", (long)alignWeightRight(p));
#endif
@@ -1455,13 +1461,13 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) {
errorReason = "tertiary tailoring gap too small";
return;
}
- tIsTailored = TRUE;
+ tIsTailored = true;
}
t = tertiaries.nextWeight();
U_ASSERT(t != 0xffffffff);
} else {
t = weight16FromNode(node);
- tIsTailored = FALSE;
+ tIsTailored = false;
#ifdef DEBUG_COLLATION_BUILDER
printf(" ter %lx\n", (long)alignWeightRight(t));
#endif
@@ -1507,13 +1513,13 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) {
#endif
return;
}
- sIsTailored = TRUE;
+ sIsTailored = true;
}
s = secondaries.nextWeight();
U_ASSERT(s != 0xffffffff);
} else {
s = weight16FromNode(node);
- sIsTailored = FALSE;
+ sIsTailored = false;
#ifdef DEBUG_COLLATION_BUILDER
printf(" sec %lx\n", (long)alignWeightRight(s));
#endif
@@ -1536,15 +1542,15 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) {
errorReason = "primary tailoring gap too small";
return;
}
- pIsTailored = TRUE;
+ pIsTailored = true;
}
p = primaries.nextWeight();
U_ASSERT(p != 0xffffffff);
s = Collation::COMMON_WEIGHT16;
- sIsTailored = FALSE;
+ sIsTailored = false;
}
t = s == 0 ? 0 : Collation::COMMON_WEIGHT16;
- tIsTailored = FALSE;
+ tIsTailored = false;
}
q = 0;
}
@@ -1608,7 +1614,7 @@ CEFinalizer::~CEFinalizer() {}
void
CollationBuilder::finalizeCEs(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- LocalPointer<CollationDataBuilder> newBuilder(new CollationDataBuilder(errorCode), errorCode);
+ LocalPointer<CollationDataBuilder> newBuilder(new CollationDataBuilder(icu4xMode, errorCode), errorCode);
if(U_FAILURE(errorCode)) {
return;
}
@@ -1635,24 +1641,24 @@ U_NAMESPACE_END
U_NAMESPACE_USE
U_CAPI UCollator * U_EXPORT2
-ucol_openRules(const UChar *rules, int32_t rulesLength,
+ucol_openRules(const char16_t *rules, int32_t rulesLength,
UColAttributeValue normalizationMode, UCollationStrength strength,
UParseError *parseError, UErrorCode *pErrorCode) {
- if(U_FAILURE(*pErrorCode)) { return NULL; }
- if(rules == NULL && rulesLength != 0) {
+ if(U_FAILURE(*pErrorCode)) { return nullptr; }
+ if(rules == nullptr && rulesLength != 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
RuleBasedCollator *coll = new RuleBasedCollator();
- if(coll == NULL) {
+ if(coll == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
UnicodeString r((UBool)(rulesLength < 0), rules, rulesLength);
- coll->internalBuildTailoring(r, strength, normalizationMode, parseError, NULL, *pErrorCode);
+ coll->internalBuildTailoring(r, strength, normalizationMode, parseError, nullptr, *pErrorCode);
if(U_FAILURE(*pErrorCode)) {
delete coll;
- return NULL;
+ return nullptr;
}
return coll->toUCollator();
}
@@ -1670,13 +1676,13 @@ ucol_getUnsafeSet( const UCollator *coll,
USet *unsafe,
UErrorCode *status)
{
- UChar buffer[internalBufferSize];
+ char16_t buffer[internalBufferSize];
int32_t len = 0;
uset_clear(unsafe);
// cccpattern = "[[:^tccc=0:][:^lccc=0:]]", unfortunately variant
- static const UChar cccpattern[25] = { 0x5b, 0x5b, 0x3a, 0x5e, 0x74, 0x63, 0x63, 0x63, 0x3d, 0x30, 0x3a, 0x5d,
+ static const char16_t cccpattern[25] = { 0x5b, 0x5b, 0x3a, 0x5e, 0x74, 0x63, 0x63, 0x63, 0x3d, 0x30, 0x3a, 0x5d,
0x5b, 0x3a, 0x5e, 0x6c, 0x63, 0x63, 0x63, 0x3d, 0x30, 0x3a, 0x5d, 0x5d, 0x00 };
// add chars that fail the fcd check
@@ -1690,14 +1696,14 @@ ucol_getUnsafeSet( const UCollator *coll,
USet *contractions = uset_open(0,0);
int32_t i = 0, j = 0;
- ucol_getContractionsAndExpansions(coll, contractions, NULL, FALSE, status);
+ ucol_getContractionsAndExpansions(coll, contractions, nullptr, false, status);
int32_t contsSize = uset_size(contractions);
UChar32 c = 0;
// Contraction set consists only of strings
// to get unsafe code points, we need to
// break the strings apart and add them to the unsafe set
for(i = 0; i < contsSize; i++) {
- len = uset_getItem(contractions, i, NULL, NULL, buffer, internalBufferSize, status);
+ len = uset_getItem(contractions, i, nullptr, nullptr, buffer, internalBufferSize, status);
if(len > 0) {
j = 0;
while(j < len) {
diff --git a/contrib/libs/icu/i18n/collationbuilder.h b/contrib/libs/icu/i18n/collationbuilder.h
index 59d3c5d24b0..22e24ddb813 100644
--- a/contrib/libs/icu/i18n/collationbuilder.h
+++ b/contrib/libs/icu/i18n/collationbuilder.h
@@ -39,6 +39,7 @@ class Normalizer2Impl;
class U_I18N_API CollationBuilder : public CollationRuleParser::Sink {
public:
+ CollationBuilder(const CollationTailoring *b, UBool icu4xMode, UErrorCode &errorCode);
CollationBuilder(const CollationTailoring *base, UErrorCode &errorCode);
virtual ~CollationBuilder();
@@ -302,6 +303,7 @@ private:
CollationDataBuilder *dataBuilder;
UBool fastLatinEnabled;
+ UBool icu4xMode;
UnicodeSet optimizeSet;
const char *errorReason;
diff --git a/contrib/libs/icu/i18n/collationcompare.cpp b/contrib/libs/icu/i18n/collationcompare.cpp
index cbf32c9fe68..d9048afc279 100644
--- a/contrib/libs/icu/i18n/collationcompare.cpp
+++ b/contrib/libs/icu/i18n/collationcompare.cpp
@@ -39,7 +39,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat
// +1 so that we can use "<" and primary ignorables test out early.
variableTop = settings.variableTop + 1;
}
- UBool anyVariable = FALSE;
+ UBool anyVariable = false;
// Fetch CEs, compare primaries, store secondary & tertiary weights.
for(;;) {
@@ -51,7 +51,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat
if(leftPrimary < variableTop && leftPrimary > Collation::MERGE_SEPARATOR_PRIMARY) {
// Variable CE, shift it to quaternary level.
// Ignore all following primary ignorables, and shift further variable CEs.
- anyVariable = TRUE;
+ anyVariable = true;
do {
// Store only the primary of the variable CE.
left.setCurrentCE(ce & INT64_C(0xffffffff00000000));
@@ -76,7 +76,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat
if(rightPrimary < variableTop && rightPrimary > Collation::MERGE_SEPARATOR_PRIMARY) {
// Variable CE, shift it to quaternary level.
// Ignore all following primary ignorables, and shift further variable CEs.
- anyVariable = TRUE;
+ anyVariable = true;
do {
// Store only the primary of the variable CE.
right.setCurrentCE(ce & INT64_C(0xffffffff00000000));
diff --git a/contrib/libs/icu/i18n/collationdata.cpp b/contrib/libs/icu/i18n/collationdata.cpp
index 688770f8f62..1b8b6a76de3 100644
--- a/contrib/libs/icu/i18n/collationdata.cpp
+++ b/contrib/libs/icu/i18n/collationdata.cpp
@@ -205,7 +205,7 @@ CollationData::getEquivalentScripts(int32_t script,
void
CollationData::makeReorderRanges(const int32_t *reorder, int32_t length,
UVector32 &ranges, UErrorCode &errorCode) const {
- makeReorderRanges(reorder, length, FALSE, ranges, errorCode);
+ makeReorderRanges(reorder, length, false, ranges, errorCode);
}
void
@@ -277,12 +277,12 @@ CollationData::makeReorderRanges(const int32_t *reorder, int32_t length,
// Reorder according to the input scripts, continuing from the bottom of the primary range.
int32_t originalLength = length; // length will be decremented if "others" is in the list.
- UBool hasReorderToEnd = FALSE;
+ UBool hasReorderToEnd = false;
for(int32_t i = 0; i < length;) {
int32_t script = reorder[i++];
if(script == USCRIPT_UNKNOWN) {
// Put the remaining scripts at the top.
- hasReorderToEnd = TRUE;
+ hasReorderToEnd = true;
while(i < length) {
script = reorder[--length];
if(script == USCRIPT_UNKNOWN || // Must occur at most once.
@@ -329,7 +329,7 @@ CollationData::makeReorderRanges(const int32_t *reorder, int32_t length,
if(lowStart > highLimit) {
if((lowStart - (skippedReserved & 0xff00)) <= highLimit) {
// Try not skipping the before-Latin reserved range.
- makeReorderRanges(reorder, originalLength, TRUE, ranges, errorCode);
+ makeReorderRanges(reorder, originalLength, true, ranges, errorCode);
return;
}
// We need more primary lead bytes than available, despite the reserved ranges.
diff --git a/contrib/libs/icu/i18n/collationdata.h b/contrib/libs/icu/i18n/collationdata.h
index ab9b4c47ec9..d4f66828fbc 100644
--- a/contrib/libs/icu/i18n/collationdata.h
+++ b/contrib/libs/icu/i18n/collationdata.h
@@ -41,29 +41,25 @@ struct U_I18N_API CollationData : public UMemory {
// Note: The ucadata.icu loader could discover the reserved ranges by setting an array
// parallel with the ranges, and resetting ranges that are indexed.
// The reordering builder code could clone the resulting template array.
- enum {
- REORDER_RESERVED_BEFORE_LATIN = UCOL_REORDER_CODE_FIRST + 14,
- REORDER_RESERVED_AFTER_LATIN
- };
+ static constexpr int32_t REORDER_RESERVED_BEFORE_LATIN = UCOL_REORDER_CODE_FIRST + 14;
+ static constexpr int32_t REORDER_RESERVED_AFTER_LATIN = REORDER_RESERVED_BEFORE_LATIN + 1;
- enum {
- MAX_NUM_SPECIAL_REORDER_CODES = 8,
- /** C++ only, data reader check scriptStartsLength. */
- MAX_NUM_SCRIPT_RANGES = 256
- };
+ static constexpr int32_t MAX_NUM_SPECIAL_REORDER_CODES = 8;
+ /** C++ only, data reader check scriptStartsLength. */
+ static constexpr int32_t MAX_NUM_SCRIPT_RANGES = 256;
CollationData(const Normalizer2Impl &nfc)
- : trie(NULL),
- ce32s(NULL), ces(NULL), contexts(NULL), base(NULL),
- jamoCE32s(NULL),
+ : trie(nullptr),
+ ce32s(nullptr), ces(nullptr), contexts(nullptr), base(nullptr),
+ jamoCE32s(nullptr),
nfcImpl(nfc),
numericPrimary(0x12000000),
ce32sLength(0), cesLength(0), contextsLength(0),
- compressibleBytes(NULL),
- unsafeBackwardSet(NULL),
- fastLatinTable(NULL), fastLatinTableLength(0),
- numScripts(0), scriptsIndex(NULL), scriptStarts(NULL), scriptStartsLength(0),
- rootElements(NULL), rootElementsLength(0) {}
+ compressibleBytes(nullptr),
+ unsafeBackwardSet(nullptr),
+ fastLatinTable(nullptr), fastLatinTableLength(0),
+ numScripts(0), scriptsIndex(nullptr), scriptStarts(nullptr), scriptStartsLength(0),
+ rootElements(nullptr), rootElementsLength(0) {}
uint32_t getCE32(UChar32 c) const {
return UTRIE2_GET32(trie, c);
@@ -94,7 +90,7 @@ struct U_I18N_API CollationData : public UMemory {
* Returns the CE32 from two contexts words.
* Access to the defaultCE32 for contraction and prefix matching.
*/
- static uint32_t readCE32(const UChar *p) {
+ static uint32_t readCE32(const char16_t *p) {
return ((uint32_t)p[0] << 16) | p[1];
}
@@ -182,8 +178,8 @@ struct U_I18N_API CollationData : public UMemory {
/** Array of CE values for expansions and OFFSET_TAG. */
const int64_t *ces;
/** Array of prefix and contraction-suffix matching data. */
- const UChar *contexts;
- /** Base collation data, or NULL if this data itself is a base. */
+ const char16_t *contexts;
+ /** Base collation data, or nullptr if this data itself is a base. */
const CollationData *base;
/**
* Simple array of JAMO_CE32S_LENGTH=19+21+27 CE32s, one per canonical Jamo L/V/T.
@@ -242,7 +238,7 @@ struct U_I18N_API CollationData : public UMemory {
/**
* Collation elements in the root collator.
* Used by the CollationRootElements class. The data structure is described there.
- * NULL in a tailoring.
+ * nullptr in a tailoring.
*/
const uint32_t *rootElements;
int32_t rootElementsLength;
diff --git a/contrib/libs/icu/i18n/collationdatabuilder.cpp b/contrib/libs/icu/i18n/collationdatabuilder.cpp
index 25050aa777e..7c6f1b881e6 100644
--- a/contrib/libs/icu/i18n/collationdatabuilder.cpp
+++ b/contrib/libs/icu/i18n/collationdatabuilder.cpp
@@ -86,18 +86,30 @@ struct ConditionalCE32 : public UMemory {
* When fetching CEs from the builder, the contexts are built into their runtime form
* so that the normal collation implementation can process them.
* The result is cached in the list head. It is reset when the contexts are modified.
+ * All of these builtCE32 are invalidated by clearContexts(),
+ * via incrementing the contextsEra.
*/
uint32_t builtCE32;
/**
+ * The "era" of building intermediate contexts when the above builtCE32 was set.
+ * When the array of cached, temporary contexts overflows, then clearContexts()
+ * removes them all and invalidates the builtCE32 that used to point to built tries.
+ */
+ int32_t era = -1;
+ /**
* Index of the next ConditionalCE32.
* Negative for the end of the list.
*/
int32_t next;
+ // Note: We could create a separate class for all of the contextual mappings for
+ // a code point, with the builtCE32, the era, and a list of the actual mappings.
+ // The class that represents one mapping would then not need to
+ // store those fields in each element.
};
U_CDECL_BEGIN
-U_CAPI void U_CALLCONV
+void U_CALLCONV
uprv_deleteConditionalCE32(void *obj) {
delete static_cast<ConditionalCE32 *>(obj);
}
@@ -152,9 +164,9 @@ protected:
};
DataBuilderCollationIterator::DataBuilderCollationIterator(CollationDataBuilder &b)
- : CollationIterator(&builderData, /*numeric=*/ FALSE),
+ : CollationIterator(&builderData, /*numeric=*/ false),
builder(b), builderData(b.nfcImpl),
- s(NULL), pos(0) {
+ s(nullptr), pos(0) {
builderData.base = builder.base;
// Set all of the jamoCE32s[] to indirection CE32s.
for(int32_t j = 0; j < CollationData::JAMO_CE32S_LENGTH; ++j) { // Count across Jamo types.
@@ -192,7 +204,7 @@ DataBuilderCollationIterator::fetchCEs(const UnicodeString &str, int32_t start,
} else {
d = &builderData;
}
- appendCEsFromCE32(d, c, ce32, /*forward=*/ TRUE, errorCode);
+ appendCEsFromCE32(d, c, ce32, /*forward=*/ true, errorCode);
U_ASSERT(U_SUCCESS(errorCode));
for(int32_t i = 0; i < getCEsLength(); ++i) {
int64_t ce = getCE(i);
@@ -267,7 +279,7 @@ DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &
// TODO: ICU-21531 figure out why this happens.
return 0;
}
- if(cond->builtCE32 == Collation::NO_CE32) {
+ if(cond->builtCE32 == Collation::NO_CE32 || cond->era != builder.contextsEra) {
// Build the context-sensitive mappings into their runtime form and cache the result.
cond->builtCE32 = builder.buildContext(cond, errorCode);
if(errorCode == U_BUFFER_OVERFLOW_ERROR) {
@@ -275,6 +287,7 @@ DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &
builder.clearContexts();
cond->builtCE32 = builder.buildContext(cond, errorCode);
}
+ cond->era = builder.contextsEra;
builderData.contexts = builder.contexts.getBuffer();
}
return cond->builtCE32;
@@ -283,16 +296,19 @@ DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &
// ------------------------------------------------------------------------- ***
-CollationDataBuilder::CollationDataBuilder(UErrorCode &errorCode)
+CollationDataBuilder::CollationDataBuilder(UBool icu4xMode, UErrorCode &errorCode)
: nfcImpl(*Normalizer2Factory::getNFCImpl(errorCode)),
- base(NULL), baseSettings(NULL),
- trie(NULL),
+ base(nullptr), baseSettings(nullptr),
+ trie(nullptr),
ce32s(errorCode), ce64s(errorCode), conditionalCE32s(errorCode),
- modified(FALSE),
- fastLatinEnabled(FALSE), fastLatinBuilder(NULL),
- collIter(NULL) {
+ modified(false),
+ icu4xMode(icu4xMode),
+ fastLatinEnabled(false), fastLatinBuilder(nullptr),
+ collIter(nullptr) {
// Reserve the first CE32 for U+0000.
- ce32s.addElement(0, errorCode);
+ if (!icu4xMode) {
+ ce32s.addElement(0, errorCode);
+ }
conditionalCE32s.setDeleter(uprv_deleteConditionalCE32);
}
@@ -305,38 +321,42 @@ CollationDataBuilder::~CollationDataBuilder() {
void
CollationDataBuilder::initForTailoring(const CollationData *b, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- if(trie != NULL) {
+ if(trie != nullptr) {
errorCode = U_INVALID_STATE_ERROR;
return;
}
- if(b == NULL) {
+ if(b == nullptr) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
base = b;
// For a tailoring, the default is to fall back to the base.
- trie = utrie2_open(Collation::FALLBACK_CE32, Collation::FFFD_CE32, &errorCode);
-
- // Set the Latin-1 letters block so that it is allocated first in the data array,
- // to try to improve locality of reference when sorting Latin-1 text.
- // Do not use utrie2_setRange32() since that will not actually allocate blocks
- // that are filled with the default value.
- // ASCII (0..7F) is already preallocated anyway.
- for(UChar32 c = 0xc0; c <= 0xff; ++c) {
- utrie2_set32(trie, c, Collation::FALLBACK_CE32, &errorCode);
- }
+ // For ICU4X, use the same value for fallback as for the default
+ // to avoid having to have different blocks for the two.
+ trie = utrie2_open(Collation::FALLBACK_CE32, icu4xMode ? Collation::FALLBACK_CE32 : Collation::FFFD_CE32, &errorCode);
+
+ if (!icu4xMode) {
+ // Set the Latin-1 letters block so that it is allocated first in the data array,
+ // to try to improve locality of reference when sorting Latin-1 text.
+ // Do not use utrie2_setRange32() since that will not actually allocate blocks
+ // that are filled with the default value.
+ // ASCII (0..7F) is already preallocated anyway.
+ for(UChar32 c = 0xc0; c <= 0xff; ++c) {
+ utrie2_set32(trie, c, Collation::FALLBACK_CE32, &errorCode);
+ }
- // Hangul syllables are not tailorable (except via tailoring Jamos).
- // Always set the Hangul tag to help performance.
- // Do this here, rather than in buildMappings(),
- // so that we see the HANGUL_TAG in various assertions.
- uint32_t hangulCE32 = Collation::makeCE32FromTagAndIndex(Collation::HANGUL_TAG, 0);
- utrie2_setRange32(trie, Hangul::HANGUL_BASE, Hangul::HANGUL_END, hangulCE32, TRUE, &errorCode);
+ // Hangul syllables are not tailorable (except via tailoring Jamos).
+ // Always set the Hangul tag to help performance.
+ // Do this here, rather than in buildMappings(),
+ // so that we see the HANGUL_TAG in various assertions.
+ uint32_t hangulCE32 = Collation::makeCE32FromTagAndIndex(Collation::HANGUL_TAG, 0);
+ utrie2_setRange32(trie, Hangul::HANGUL_BASE, Hangul::HANGUL_END, hangulCE32, true, &errorCode);
- // Copy the set contents but don't copy/clone the set as a whole because
- // that would copy the isFrozen state too.
- unsafeBackwardSet.addAll(*b->unsafeBackwardSet);
+ // Copy the set contents but don't copy/clone the set as a whole because
+ // that would copy the isFrozen state too.
+ unsafeBackwardSet.addAll(*b->unsafeBackwardSet);
+ }
if(U_FAILURE(errorCode)) { return; }
}
@@ -345,7 +365,7 @@ UBool
CollationDataBuilder::maybeSetPrimaryRange(UChar32 start, UChar32 end,
uint32_t primary, int32_t step,
UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(start <= end);
// TODO: Do we need to check what values are currently set for start..end?
// An offset range is worth it only if we can achieve an overlap between
@@ -370,11 +390,11 @@ CollationDataBuilder::maybeSetPrimaryRange(UChar32 start, UChar32 end,
return 0;
}
uint32_t offsetCE32 = Collation::makeCE32FromTagAndIndex(Collation::OFFSET_TAG, index);
- utrie2_setRange32(trie, start, end, offsetCE32, TRUE, &errorCode);
- modified = TRUE;
- return TRUE;
+ utrie2_setRange32(trie, start, end, offsetCE32, true, &errorCode);
+ modified = true;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -395,7 +415,7 @@ CollationDataBuilder::setPrimaryRangeAndReturnNext(UChar32 start, UChar32 end,
primary = Collation::incThreeBytePrimaryByOffset(primary, isCompressible, step);
if(start > end) { return primary; }
}
- modified = TRUE;
+ modified = true;
}
}
@@ -431,10 +451,10 @@ int64_t
CollationDataBuilder::getSingleCE(UChar32 c, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return 0; }
// Keep parallel with CollationData::getSingleCE().
- UBool fromBase = FALSE;
+ UBool fromBase = false;
uint32_t ce32 = utrie2_get32(trie, c);
if(ce32 == Collation::FALLBACK_CE32) {
- fromBase = TRUE;
+ fromBase = true;
ce32 = base->getCE32(c);
}
while(Collation::isSpecialCE32(ce32)) {
@@ -522,12 +542,11 @@ CollationDataBuilder::addConditionalCE32(const UnicodeString &context, uint32_t
errorCode = U_BUFFER_OVERFLOW_ERROR;
return -1;
}
- ConditionalCE32 *cond = new ConditionalCE32(context, ce32);
- if(cond == NULL) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
+ LocalPointer<ConditionalCE32> cond(new ConditionalCE32(context, ce32), errorCode);
+ conditionalCE32s.adoptElement(cond.orphan(), errorCode);
+ if(U_FAILURE(errorCode)) {
return -1;
}
- conditionalCE32s.addElementX(cond, errorCode);
return index;
}
@@ -547,7 +566,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString &
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- if(trie == NULL || utrie2_isFrozen(trie)) {
+ if(trie == nullptr || utrie2_isFrozen(trie)) {
errorCode = U_INVALID_STATE_ERROR;
return;
}
@@ -555,6 +574,98 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString &
int32_t cLength = U16_LENGTH(c);
uint32_t oldCE32 = utrie2_get32(trie, c);
UBool hasContext = !prefix.isEmpty() || s.length() > cLength;
+
+ if (icu4xMode) {
+ if (base && c >= 0x1100 && c < 0x1200) {
+ // Omit jamo tailorings.
+ // TODO(https://github.com/unicode-org/icu4x/issues/1941).
+ }
+ const Normalizer2* nfdNormalizer = Normalizer2::getNFDInstance(errorCode);
+ UnicodeString sInNfd;
+ nfdNormalizer->normalize(s, sInNfd, errorCode);
+ if (s != sInNfd) {
+ // s is not in NFD, so it cannot match in ICU4X, since ICU4X only
+ // does NFD lookups.
+ // Now check that we're only rejecting known cases.
+ if (s.length() == 2) {
+ char16_t second = s.charAt(1);
+ if (second == 0x0F73 || second == 0x0F75 || second == 0x0F81) {
+ // Second is a special decomposing Tibetan vowel sign.
+ // These also get added in the decomposed form, so ignoring
+ // this instance is OK.
+ return;
+ }
+ if (c == 0xFDD1 && second == 0xAC00) {
+ // This strange contraction exists in the root and
+ // doesn't have a decomposed counterpart there.
+ // This won't match in ICU4X anyway and is very strange:
+ // Unassigned Arabic presentation form contracting with
+ // the very first Hangul syllable. Let's ignore this
+ // explicitly.
+ return;
+ }
+ }
+ // Unknown case worth investigating if ever found.
+ errorCode = U_UNSUPPORTED_ERROR;
+ return;
+ }
+
+ if (!prefix.isEmpty()) {
+ UnicodeString prefixInNfd;
+ nfdNormalizer->normalize(prefix, prefixInNfd, errorCode);
+ if (prefix != prefixInNfd) {
+ errorCode = U_UNSUPPORTED_ERROR;
+ return;
+ }
+
+ int32_t count = prefix.countChar32();
+ if (count > 2) {
+ // Prefix too long for ICU4X.
+ errorCode = U_UNSUPPORTED_ERROR;
+ return;
+ }
+ UChar32 utf32[4];
+ int32_t len = prefix.toUTF32(utf32, 4, errorCode);
+ if (len != count) {
+ errorCode = U_INVALID_STATE_ERROR;
+ return;
+ }
+ UChar32 c = utf32[0];
+ if (u_getCombiningClass(c)) {
+ // Prefix must start with as starter for ICU4X.
+ errorCode = U_UNSUPPORTED_ERROR;
+ return;
+ }
+ // XXX: Korean searchjl has jamo in prefix, so commenting out this
+ // check for now. ICU4X currently ignores non-root jamo tables anyway.
+ // searchjl was added in
+ // https://unicode-org.atlassian.net/browse/CLDR-3560
+ // Contractions were changed to prefixes in
+ // https://unicode-org.atlassian.net/browse/CLDR-6546
+ //
+ // if ((c >= 0x1100 && c < 0x1200) || (c >= 0xAC00 && c < 0xD7A4)) {
+ // errorCode = U_UNSUPPORTED_ERROR;
+ // return;
+ // }
+ if ((len > 1) && !(utf32[1] == 0x3099 || utf32[1] == 0x309A)) {
+ // Second character in prefix, if present, must be a kana voicing mark for ICU4X.
+ errorCode = U_UNSUPPORTED_ERROR;
+ return;
+ }
+ }
+
+ if (s.length() > cLength) {
+ // Check that there's no modern Hangul in contractions.
+ for (int32_t i = 0; i < s.length(); ++i) {
+ char16_t c = s.charAt(i);
+ if ((c >= 0x1100 && c < 0x1100 + 19) || (c >= 0x1161 && c < 0x1161 + 21) || (c >= 0x11A7 && c < 0x11A7 + 28) || (c >= 0xAC00 && c < 0xD7A4)) {
+ errorCode = U_UNSUPPORTED_ERROR;
+ return;
+ }
+ }
+ }
+ }
+
if(oldCE32 == Collation::FALLBACK_CE32) {
// First tailoring for c.
// If c has contextual base mappings or if we add a contextual mapping,
@@ -562,7 +673,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString &
// Otherwise we just override the base mapping.
uint32_t baseCE32 = base->getFinalCE32(base->getCE32(c));
if(hasContext || Collation::ce32HasContext(baseCE32)) {
- oldCE32 = copyFromBaseCE32(c, baseCE32, TRUE, errorCode);
+ oldCE32 = copyFromBaseCE32(c, baseCE32, true, errorCode);
utrie2_set32(trie, c, oldCE32, &errorCode);
if(U_FAILURE(errorCode)) { return; }
}
@@ -581,7 +692,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString &
if(!isBuilderContextCE32(oldCE32)) {
// Replace the simple oldCE32 with a builder context CE32
// pointing to a new ConditionalCE32 list head.
- int32_t index = addConditionalCE32(UnicodeString((UChar)0), oldCE32, errorCode);
+ int32_t index = addConditionalCE32(UnicodeString((char16_t)0), oldCE32, errorCode);
if(U_FAILURE(errorCode)) { return; }
uint32_t contextCE32 = makeBuilderContextCE32(index);
utrie2_set32(trie, c, contextCE32, &errorCode);
@@ -592,7 +703,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString &
cond->builtCE32 = Collation::NO_CE32;
}
UnicodeString suffix(s, cLength);
- UnicodeString context((UChar)prefix.length());
+ UnicodeString context((char16_t)prefix.length());
context.append(prefix).append(suffix);
unsafeBackwardSet.addAll(suffix);
for(;;) {
@@ -622,7 +733,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString &
cond = nextCond;
}
}
- modified = TRUE;
+ modified = true;
}
uint32_t
@@ -666,7 +777,7 @@ CollationDataBuilder::encodeCEs(const int64_t ces[], int32_t cesLength,
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- if(trie == NULL || utrie2_isFrozen(trie)) {
+ if(trie == nullptr || utrie2_isFrozen(trie)) {
errorCode = U_INVALID_STATE_ERROR;
return 0;
}
@@ -676,8 +787,11 @@ CollationDataBuilder::encodeCEs(const int64_t ces[], int32_t cesLength,
return encodeOneCEAsCE32(0);
} else if(cesLength == 1) {
return encodeOneCE(ces[0], errorCode);
- } else if(cesLength == 2) {
+ } else if(cesLength == 2 && !icu4xMode) {
// Try to encode two CEs as one CE32.
+ // Turn this off for ICU4X, because without the canonical closure
+ // these are so rare that it doesn't make sense to spend a branch
+ // on checking this tag when using the data.
int64_t ce0 = ces[0];
int64_t ce1 = ces[1];
uint32_t p0 = (uint32_t)(ce0 >> 32);
@@ -800,18 +914,18 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte
case Collation::PREFIX_TAG: {
// Flatten prefixes and nested suffixes (contractions)
// into a linear list of ConditionalCE32.
- const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = base->contexts + Collation::indexFromCE32(ce32);
ce32 = CollationData::readCE32(p); // Default if no prefix match.
if(!withContext) {
- return copyFromBaseCE32(c, ce32, FALSE, errorCode);
+ return copyFromBaseCE32(c, ce32, false, errorCode);
}
ConditionalCE32 head;
- UnicodeString context((UChar)0);
+ UnicodeString context((char16_t)0);
int32_t index;
if(Collation::isContractionCE32(ce32)) {
index = copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
} else {
- ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
+ ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
head.next = index = addConditionalCE32(context, ce32, errorCode);
}
if(U_FAILURE(errorCode)) { return 0; }
@@ -820,12 +934,12 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte
while(prefixes.next(errorCode)) {
context = prefixes.getString();
context.reverse();
- context.insert(0, (UChar)context.length());
+ context.insert(0, (char16_t)context.length());
ce32 = (uint32_t)prefixes.getValue();
if(Collation::isContractionCE32(ce32)) {
index = copyContractionsFromBaseCE32(context, c, ce32, cond, errorCode);
} else {
- ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
+ ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
cond->next = index = addConditionalCE32(context, ce32, errorCode);
}
if(U_FAILURE(errorCode)) { return 0; }
@@ -837,12 +951,12 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte
}
case Collation::CONTRACTION_TAG: {
if(!withContext) {
- const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = base->contexts + Collation::indexFromCE32(ce32);
ce32 = CollationData::readCE32(p); // Default if no suffix match.
- return copyFromBaseCE32(c, ce32, FALSE, errorCode);
+ return copyFromBaseCE32(c, ce32, false, errorCode);
}
ConditionalCE32 head;
- UnicodeString context((UChar)0);
+ UnicodeString context((char16_t)0);
copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
ce32 = makeBuilderContextCE32(head.next);
contextChars.add(c);
@@ -852,7 +966,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte
errorCode = U_UNSUPPORTED_ERROR; // We forbid tailoring of Hangul syllables.
break;
case Collation::OFFSET_TAG:
- ce32 = getCE32FromOffsetCE32(TRUE, c, ce32);
+ ce32 = getCE32FromOffsetCE32(true, c, ce32);
break;
case Collation::IMPLICIT_TAG:
ce32 = encodeOneCE(Collation::unassignedCEFromCodePoint(c), errorCode);
@@ -867,7 +981,7 @@ int32_t
CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar32 c, uint32_t ce32,
ConditionalCE32 *cond, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return 0; }
- const UChar *p = base->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = base->contexts + Collation::indexFromCE32(ce32);
int32_t index;
if((ce32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
// No match on the single code point.
@@ -878,7 +992,7 @@ CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar
} else {
ce32 = CollationData::readCE32(p); // Default if no suffix match.
U_ASSERT(!Collation::isContractionCE32(ce32));
- ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
+ ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
cond->next = index = addConditionalCE32(context, ce32, errorCode);
if(U_FAILURE(errorCode)) { return 0; }
cond = getConditionalCE32(index);
@@ -888,7 +1002,7 @@ CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar
UCharsTrie::Iterator suffixes(p + 2, 0, errorCode);
while(suffixes.next(errorCode)) {
context.append(suffixes.getString());
- ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), TRUE, errorCode);
+ ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), true, errorCode);
cond->next = index = addConditionalCE32(context, ce32, errorCode);
if(U_FAILURE(errorCode)) { return 0; }
// No need to update the unsafeBackwardSet because the tailoring set
@@ -909,7 +1023,7 @@ public:
UBool copyRangeCE32(UChar32 start, UChar32 end, uint32_t ce32) {
ce32 = copyCE32(ce32);
- utrie2_setRange32(dest.trie, start, end, ce32, TRUE, &errorCode);
+ utrie2_setRange32(dest.trie, start, end, ce32, true, &errorCode);
if(CollationDataBuilder::isBuilderContextCE32(ce32)) {
dest.contextChars.add(start, end);
}
@@ -930,7 +1044,7 @@ public:
int32_t length = Collation::lengthFromCE32(ce32);
// Inspect the source CE32s. Just copy them if none are modified.
// Otherwise copy to modifiedCEs, with modifications.
- UBool isModified = FALSE;
+ UBool isModified = false;
for(int32_t i = 0; i < length; ++i) {
ce32 = srcCE32s[i];
int64_t ce;
@@ -944,7 +1058,7 @@ public:
for(int32_t j = 0; j < i; ++j) {
modifiedCEs[j] = Collation::ceFromCE32(srcCE32s[j]);
}
- isModified = TRUE;
+ isModified = true;
}
modifiedCEs[i] = ce;
}
@@ -961,7 +1075,7 @@ public:
int32_t length = Collation::lengthFromCE32(ce32);
// Inspect the source CEs. Just copy them if none are modified.
// Otherwise copy to modifiedCEs, with modifications.
- UBool isModified = FALSE;
+ UBool isModified = false;
for(int32_t i = 0; i < length; ++i) {
int64_t srcCE = srcCEs[i];
int64_t ce = modifier.modifyCE(srcCE);
@@ -974,7 +1088,7 @@ public:
for(int32_t j = 0; j < i; ++j) {
modifiedCEs[j] = srcCEs[j];
}
- isModified = TRUE;
+ isModified = true;
}
modifiedCEs[i] = ce;
}
@@ -1034,12 +1148,12 @@ void
CollationDataBuilder::copyFrom(const CollationDataBuilder &src, const CEModifier &modifier,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- if(trie == NULL || utrie2_isFrozen(trie)) {
+ if(trie == nullptr || utrie2_isFrozen(trie)) {
errorCode = U_INVALID_STATE_ERROR;
return;
}
CopyHelper helper(src, *this, modifier, errorCode);
- utrie2_enum(src.trie, NULL, enumRangeForCopy, &helper);
+ utrie2_enum(src.trie, nullptr, enumRangeForCopy, &helper);
errorCode = helper.errorCode;
// Update the contextChars and the unsafeBackwardSet while copying,
// in case a character had conditional mappings in the source builder
@@ -1056,11 +1170,11 @@ CollationDataBuilder::optimize(const UnicodeSet &set, UErrorCode &errorCode) {
uint32_t ce32 = utrie2_get32(trie, c);
if(ce32 == Collation::FALLBACK_CE32) {
ce32 = base->getFinalCE32(base->getCE32(c));
- ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode);
+ ce32 = copyFromBaseCE32(c, ce32, true, errorCode);
utrie2_set32(trie, c, ce32, &errorCode);
}
}
- modified = TRUE;
+ modified = true;
}
void
@@ -1073,7 +1187,7 @@ CollationDataBuilder::suppressContractions(const UnicodeSet &set, UErrorCode &er
if(ce32 == Collation::FALLBACK_CE32) {
ce32 = base->getFinalCE32(base->getCE32(c));
if(Collation::ce32HasContext(ce32)) {
- ce32 = copyFromBaseCE32(c, ce32, FALSE /* without context */, errorCode);
+ ce32 = copyFromBaseCE32(c, ce32, false /* without context */, errorCode);
utrie2_set32(trie, c, ce32, &errorCode);
}
} else if(isBuilderContextCE32(ce32)) {
@@ -1085,23 +1199,23 @@ CollationDataBuilder::suppressContractions(const UnicodeSet &set, UErrorCode &er
contextChars.remove(c);
}
}
- modified = TRUE;
+ modified = true;
}
UBool
CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
- UBool anyJamoAssigned = base == NULL; // always set jamoCE32s in the base data
- UBool needToCopyFromBase = FALSE;
+ if(U_FAILURE(errorCode)) { return false; }
+ UBool anyJamoAssigned = base == nullptr; // always set jamoCE32s in the base data
+ UBool needToCopyFromBase = false;
for(int32_t j = 0; j < CollationData::JAMO_CE32S_LENGTH; ++j) { // Count across Jamo types.
UChar32 jamo = jamoCpFromIndex(j);
- UBool fromBase = FALSE;
+ UBool fromBase = false;
uint32_t ce32 = utrie2_get32(trie, jamo);
anyJamoAssigned |= Collation::isAssignedCE32(ce32);
// TODO: Try to prevent [optimize [Jamo]] from counting as anyJamoAssigned.
// (As of CLDR 24 [2013] the Korean tailoring does not optimize conjoining Jamo.)
if(ce32 == Collation::FALLBACK_CE32) {
- fromBase = TRUE;
+ fromBase = true;
ce32 = base->getCE32(jamo);
}
if(Collation::isSpecialCE32(ce32)) {
@@ -1118,14 +1232,14 @@ CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode)
if(fromBase) {
// Defer copying until we know if anyJamoAssigned.
ce32 = Collation::FALLBACK_CE32;
- needToCopyFromBase = TRUE;
+ needToCopyFromBase = true;
}
break;
case Collation::IMPLICIT_TAG:
// An unassigned Jamo should only occur in tests with incomplete bases.
U_ASSERT(fromBase);
ce32 = Collation::FALLBACK_CE32;
- needToCopyFromBase = TRUE;
+ needToCopyFromBase = true;
break;
case Collation::OFFSET_TAG:
ce32 = getCE32FromOffsetCE32(fromBase, jamo, ce32);
@@ -1138,7 +1252,7 @@ CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode)
case Collation::HANGUL_TAG:
case Collation::LEAD_SURROGATE_TAG:
errorCode = U_INTERNAL_PROGRAM_ERROR;
- return FALSE;
+ return false;
}
}
jamoCE32s[j] = ce32;
@@ -1148,7 +1262,7 @@ CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode)
if(jamoCE32s[j] == Collation::FALLBACK_CE32) {
UChar32 jamo = jamoCpFromIndex(j);
jamoCE32s[j] = copyFromBaseCE32(jamo, base->getCE32(jamo),
- /*withContext=*/ TRUE, errorCode);
+ /*withContext=*/ true, errorCode);
}
}
}
@@ -1189,24 +1303,24 @@ enumRangeLeadValue(const void *context, UChar32 /*start*/, UChar32 /*end*/, uint
value = Collation::LEAD_ALL_FALLBACK;
} else {
*pValue = Collation::LEAD_MIXED;
- return FALSE;
+ return false;
}
if(*pValue < 0) {
*pValue = (int32_t)value;
} else if(*pValue != (int32_t)value) {
*pValue = Collation::LEAD_MIXED;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
U_CDECL_END
void
CollationDataBuilder::setLeadSurrogates(UErrorCode &errorCode) {
- for(UChar lead = 0xd800; lead < 0xdc00; ++lead) {
+ for(char16_t lead = 0xd800; lead < 0xdc00; ++lead) {
int32_t value = -1;
- utrie2_enumForLeadSurrogate(trie, lead, NULL, enumRangeLeadValue, &value);
+ utrie2_enumForLeadSurrogate(trie, lead, nullptr, enumRangeLeadValue, &value);
utrie2_set32ForLeadSurrogateCodeUnit(
trie, lead,
Collation::makeCE32FromTagAndIndex(Collation::LEAD_SURROGATE_TAG, 0) | (uint32_t)value,
@@ -1217,7 +1331,7 @@ CollationDataBuilder::setLeadSurrogates(UErrorCode &errorCode) {
void
CollationDataBuilder::build(CollationData &data, UErrorCode &errorCode) {
buildMappings(data, errorCode);
- if(base != NULL) {
+ if(base != nullptr) {
data.numericPrimary = base->numericPrimary;
data.compressibleBytes = base->compressibleBytes;
data.numScripts = base->numScripts;
@@ -1231,7 +1345,7 @@ CollationDataBuilder::build(CollationData &data, UErrorCode &errorCode) {
void
CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- if(trie == NULL || utrie2_isFrozen(trie)) {
+ if(trie == nullptr || utrie2_isFrozen(trie)) {
errorCode = U_INVALID_STATE_ERROR;
return;
}
@@ -1252,10 +1366,10 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode)
// In order to still have good trie compression and keep this code simple,
// we only set this flag if a whole block of 588 Hangul syllables starting with
// a common leading consonant (Jamo L) has this property.
- UBool isAnyJamoVTSpecial = FALSE;
+ UBool isAnyJamoVTSpecial = false;
for(int32_t i = Hangul::JAMO_L_COUNT; i < CollationData::JAMO_CE32S_LENGTH; ++i) {
if(Collation::isSpecialCE32(jamoCE32s[i])) {
- isAnyJamoVTSpecial = TRUE;
+ isAnyJamoVTSpecial = true;
break;
}
}
@@ -1267,7 +1381,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode)
ce32 |= Collation::HANGUL_NO_SPECIAL_JAMO;
}
UChar32 limit = c + Hangul::JAMO_VT_COUNT;
- utrie2_setRange32(trie, c, limit - 1, ce32, TRUE, &errorCode);
+ utrie2_setRange32(trie, c, limit - 1, ce32, true, &errorCode);
c = limit;
}
} else {
@@ -1277,7 +1391,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode)
uint32_t ce32 = base->getCE32(c);
U_ASSERT(Collation::hasCE32Tag(ce32, Collation::HANGUL_TAG));
UChar32 limit = c + Hangul::JAMO_VT_COUNT;
- utrie2_setRange32(trie, c, limit - 1, ce32, TRUE, &errorCode);
+ utrie2_setRange32(trie, c, limit - 1, ce32, true, &errorCode);
c = limit;
}
}
@@ -1285,9 +1399,11 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode)
setDigitTags(errorCode);
setLeadSurrogates(errorCode);
- // For U+0000, move its normal ce32 into CE32s[0] and set U0000_TAG.
- ce32s.setElementAt((int32_t)utrie2_get32(trie, 0), 0);
- utrie2_set32(trie, 0, Collation::makeCE32FromTagAndIndex(Collation::U0000_TAG, 0), &errorCode);
+ if (!icu4xMode) {
+ // For U+0000, move its normal ce32 into CE32s[0] and set U0000_TAG.
+ ce32s.setElementAt((int32_t)utrie2_get32(trie, 0), 0);
+ utrie2_set32(trie, 0, Collation::makeCE32FromTagAndIndex(Collation::U0000_TAG, 0), &errorCode);
+ }
utrie2_freeze(trie, UTRIE2_32_VALUE_BITS, &errorCode);
if(U_FAILURE(errorCode)) { return; }
@@ -1295,7 +1411,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode)
// Mark each lead surrogate as "unsafe"
// if any of its 1024 associated supplementary code points is "unsafe".
UChar32 c = 0x10000;
- for(UChar lead = 0xd800; lead < 0xdc00; ++lead, c += 0x400) {
+ for(char16_t lead = 0xd800; lead < 0xdc00; ++lead, c += 0x400) {
if(unsafeBackwardSet.containsSome(c, c + 0x3ff)) {
unsafeBackwardSet.add(lead);
}
@@ -1323,13 +1439,10 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode)
void
CollationDataBuilder::clearContexts() {
contexts.remove();
- UnicodeSetIterator iter(contextChars);
- while(iter.next()) {
- U_ASSERT(!iter.isString());
- uint32_t ce32 = utrie2_get32(trie, iter.getCodepoint());
- U_ASSERT(isBuilderContextCE32(ce32));
- getConditionalCE32ForCE32(ce32)->builtCE32 = Collation::NO_CE32;
- }
+ // Incrementing the contexts build "era" invalidates all of the builtCE32
+ // from before this clearContexts() call.
+ // Simpler than finding and resetting all of those fields.
+ ++contextsEra;
}
void
@@ -1337,7 +1450,7 @@ CollationDataBuilder::buildContexts(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
// Ignore abandoned lists and the cached builtCE32,
// and build all contexts from scratch.
- contexts.remove();
+ clearContexts();
UnicodeSetIterator iter(contextChars);
while(U_SUCCESS(errorCode) && iter.next()) {
U_ASSERT(!iter.isString());
@@ -1363,18 +1476,34 @@ CollationDataBuilder::buildContext(ConditionalCE32 *head, UErrorCode &errorCode)
U_ASSERT(head->next >= 0);
UCharsTrieBuilder prefixBuilder(errorCode);
UCharsTrieBuilder contractionBuilder(errorCode);
+ // This outer loop goes from each prefix to the next.
+ // For each prefix it finds the one or more same-prefix entries (firstCond..lastCond).
+ // If there are multiple suffixes for the same prefix,
+ // then an inner loop builds a contraction trie for them.
for(ConditionalCE32 *cond = head;; cond = getConditionalCE32(cond->next)) {
+ if(U_FAILURE(errorCode)) { return 0; } // early out for memory allocation errors
// After the list head, the prefix or suffix can be empty, but not both.
U_ASSERT(cond == head || cond->hasContext());
int32_t prefixLength = cond->prefixLength();
UnicodeString prefix(cond->context, 0, prefixLength + 1);
// Collect all contraction suffixes for one prefix.
ConditionalCE32 *firstCond = cond;
- ConditionalCE32 *lastCond = cond;
- while(cond->next >= 0 &&
- (cond = getConditionalCE32(cond->next))->context.startsWith(prefix)) {
+ ConditionalCE32 *lastCond;
+ do {
lastCond = cond;
- }
+ // Clear the defaultCE32 fields as we go.
+ // They are left over from building a previous version of this list of contexts.
+ //
+ // One of the code paths below may copy a preceding defaultCE32
+ // into its emptySuffixCE32.
+ // If a new suffix has been inserted before what used to be
+ // the firstCond for its prefix, then that previous firstCond could still
+ // contain an outdated defaultCE32 from an earlier buildContext() and
+ // result in an incorrect emptySuffixCE32.
+ // So we reset all defaultCE32 before reading and setting new values.
+ cond->defaultCE32 = Collation::NO_CE32;
+ } while(cond->next >= 0 &&
+ (cond = getConditionalCE32(cond->next))->context.startsWith(prefix));
uint32_t ce32;
int32_t suffixStart = prefixLength + 1; // == prefix.length()
if(lastCond->context.length() == suffixStart) {
@@ -1429,6 +1558,20 @@ CollationDataBuilder::buildContext(ConditionalCE32 *head, UErrorCode &errorCode)
// The last suffix character has lccc!=0, allowing for discontiguous contractions.
flags |= Collation::CONTRACT_TRAILING_CCC;
}
+ if (icu4xMode && (flags & Collation::CONTRACT_HAS_STARTER) == 0) {
+ for (int32_t i = 0; i < suffix.length();) {
+ UChar32 c = suffix.char32At(i);
+ if (!u_getCombiningClass(c)) {
+ flags |= Collation::CONTRACT_HAS_STARTER;
+ break;
+ }
+ if (c > 0xFFFF) {
+ i += 2;
+ } else {
+ ++i;
+ }
+ }
+ }
contractionBuilder.add(suffix, (int32_t)cond->ce32, errorCode);
if(cond == lastCond) { break; }
cond = getConditionalCE32(cond->next);
@@ -1469,7 +1612,7 @@ int32_t
CollationDataBuilder::addContextTrie(uint32_t defaultCE32, UCharsTrieBuilder &trieBuilder,
UErrorCode &errorCode) {
UnicodeString context;
- context.append((UChar)(defaultCE32 >> 16)).append((UChar)defaultCE32);
+ context.append((char16_t)(defaultCE32 >> 16)).append((char16_t)defaultCE32);
UnicodeString trieString;
context.append(trieBuilder.buildUnicodeString(USTRINGTRIE_BUILD_SMALL, trieString, errorCode));
if(U_FAILURE(errorCode)) { return -1; }
@@ -1487,25 +1630,25 @@ CollationDataBuilder::buildFastLatinTable(CollationData &data, UErrorCode &error
delete fastLatinBuilder;
fastLatinBuilder = new CollationFastLatinBuilder(errorCode);
- if(fastLatinBuilder == NULL) {
+ if(fastLatinBuilder == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
if(fastLatinBuilder->forData(data, errorCode)) {
const uint16_t *table = fastLatinBuilder->getTable();
int32_t length = fastLatinBuilder->lengthOfTable();
- if(base != NULL && length == base->fastLatinTableLength &&
+ if(base != nullptr && length == base->fastLatinTableLength &&
uprv_memcmp(table, base->fastLatinTable, length * 2) == 0) {
// Same fast Latin table as in the base, use that one instead.
delete fastLatinBuilder;
- fastLatinBuilder = NULL;
+ fastLatinBuilder = nullptr;
table = base->fastLatinTable;
}
data.fastLatinTable = table;
data.fastLatinTableLength = length;
} else {
delete fastLatinBuilder;
- fastLatinBuilder = NULL;
+ fastLatinBuilder = nullptr;
}
}
@@ -1528,9 +1671,9 @@ CollationDataBuilder::getCEs(const UnicodeString &prefix, const UnicodeString &s
int32_t
CollationDataBuilder::getCEs(const UnicodeString &s, int32_t start,
int64_t ces[], int32_t cesLength) {
- if(collIter == NULL) {
+ if(collIter == nullptr) {
collIter = new DataBuilderCollationIterator(*this);
- if(collIter == NULL) { return 0; }
+ if(collIter == nullptr) { return 0; }
}
return collIter->fetchCEs(s, start, ces, cesLength);
}
diff --git a/contrib/libs/icu/i18n/collationdatabuilder.h b/contrib/libs/icu/i18n/collationdatabuilder.h
index 6ae77772fd5..cbbd8f264b5 100644
--- a/contrib/libs/icu/i18n/collationdatabuilder.h
+++ b/contrib/libs/icu/i18n/collationdatabuilder.h
@@ -60,7 +60,7 @@ public:
virtual int64_t modifyCE(int64_t ce) const = 0;
};
- CollationDataBuilder(UErrorCode &errorCode);
+ CollationDataBuilder(UBool icu4xMode, UErrorCode &errorCode);
virtual ~CollationDataBuilder();
@@ -244,8 +244,18 @@ protected:
UnicodeSet contextChars;
// Serialized UCharsTrie structures for finalized contexts.
UnicodeString contexts;
+private:
+ /**
+ * The "era" of building intermediate contexts.
+ * When the array of cached, temporary contexts overflows, then clearContexts()
+ * removes them all and invalidates the builtCE32 that used to point to built tries.
+ * See ConditionalCE32::era.
+ */
+ int32_t contextsEra = 0;
+protected:
UnicodeSet unsafeBackwardSet;
UBool modified;
+ UBool icu4xMode;
UBool fastLatinEnabled;
CollationFastLatinBuilder *fastLatinBuilder;
diff --git a/contrib/libs/icu/i18n/collationdatareader.cpp b/contrib/libs/icu/i18n/collationdatareader.cpp
index 0eb1861343c..1884208eaa4 100644
--- a/contrib/libs/icu/i18n/collationdatareader.cpp
+++ b/contrib/libs/icu/i18n/collationdatareader.cpp
@@ -47,14 +47,14 @@ void
CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes, int32_t inLength,
CollationTailoring &tailoring, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- if(base != NULL) {
- if(inBytes == NULL || (0 <= inLength && inLength < 24)) {
+ if(base != nullptr) {
+ if(inBytes == nullptr || (0 <= inLength && inLength < 24)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
const DataHeader *header = reinterpret_cast<const DataHeader *>(inBytes);
if(!(header->dataHeader.magic1 == 0xda && header->dataHeader.magic2 == 0x27 &&
- isAcceptable(tailoring.version, NULL, NULL, &header->info))) {
+ isAcceptable(tailoring.version, nullptr, nullptr, &header->info))) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
@@ -69,7 +69,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
}
}
- if(inBytes == NULL || (0 <= inLength && inLength < 8)) {
+ if(inBytes == nullptr || (0 <= inLength && inLength < 8)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -81,7 +81,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
}
// Assume that the tailoring data is in initial state,
- // with NULL pointers and 0 lengths.
+ // with nullptr pointers and 0 lengths.
// Set pointers to non-empty data parts.
// Do this in order of their byte offsets. (Should help porting to Java.)
@@ -102,16 +102,16 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
return;
}
- const CollationData *baseData = base == NULL ? NULL : base->data;
- const int32_t *reorderCodes = NULL;
+ const CollationData *baseData = base == nullptr ? nullptr : base->data;
+ const int32_t *reorderCodes = nullptr;
int32_t reorderCodesLength = 0;
- const uint32_t *reorderRanges = NULL;
+ const uint32_t *reorderRanges = nullptr;
int32_t reorderRangesLength = 0;
index = IX_REORDER_CODES_OFFSET;
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 4) {
- if(baseData == NULL) {
+ if(baseData == nullptr) {
// We assume for collation settings that
// the base data does not have a reordering.
errorCode = U_INVALID_FORMAT_ERROR;
@@ -138,7 +138,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
// There should be a reorder table only if there are reorder codes.
// However, when there are reorder codes the reorder table may be omitted to reduce
// the data size.
- const uint8_t *reorderTable = NULL;
+ const uint8_t *reorderTable = nullptr;
index = IX_REORDER_TABLE_OFFSET;
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
@@ -153,11 +153,11 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
// when the CollationData is otherwise complete.
}
- if(baseData != NULL && baseData->numericPrimary != (inIndexes[IX_OPTIONS] & 0xff000000)) {
+ if(baseData != nullptr && baseData->numericPrimary != (inIndexes[IX_OPTIONS] & 0xff000000)) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
- CollationData *data = NULL; // Remains NULL if there are no mappings.
+ CollationData *data = nullptr; // Remains nullptr if there are no mappings.
index = IX_TRIE_OFFSET;
offset = getIndex(inIndexes, indexesLength, index);
@@ -168,10 +168,10 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
data->base = baseData;
data->numericPrimary = inIndexes[IX_OPTIONS] & 0xff000000;
data->trie = tailoring.trie = utrie2_openFromSerialized(
- UTRIE2_32_VALUE_BITS, inBytes + offset, length, NULL,
+ UTRIE2_32_VALUE_BITS, inBytes + offset, length, nullptr,
&errorCode);
if(U_FAILURE(errorCode)) { return; }
- } else if(baseData != NULL) {
+ } else if(baseData != nullptr) {
// Use the base data. Only the settings are tailored.
tailoring.data = baseData;
} else {
@@ -183,7 +183,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 8) {
- if(data == NULL) {
+ if(data == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR; // Tailored ces without tailored trie.
return;
}
@@ -195,7 +195,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 4) {
- if(data == NULL) {
+ if(data == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR; // Tailored ce32s without tailored trie.
return;
}
@@ -205,14 +205,14 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
int32_t jamoCE32sStart = getIndex(inIndexes, indexesLength, IX_JAMO_CE32S_START);
if(jamoCE32sStart >= 0) {
- if(data == NULL || data->ce32s == NULL) {
+ if(data == nullptr || data->ce32s == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR; // Index into non-existent ce32s[].
return;
}
data->jamoCE32s = data->ce32s + jamoCE32sStart;
- } else if(data == NULL) {
+ } else if(data == nullptr) {
// Nothing to do.
- } else if(baseData != NULL) {
+ } else if(baseData != nullptr) {
data->jamoCE32s = baseData->jamoCE32s;
} else {
errorCode = U_INVALID_FORMAT_ERROR; // No Jamo CE32s for Hangul processing.
@@ -224,7 +224,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 4) {
length /= 4;
- if(data == NULL || length <= CollationRootElements::IX_SEC_TER_BOUNDARIES) {
+ if(data == nullptr || length <= CollationRootElements::IX_SEC_TER_BOUNDARIES) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
@@ -248,11 +248,11 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 2) {
- if(data == NULL) {
+ if(data == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR; // Tailored contexts without tailored trie.
return;
}
- data->contexts = reinterpret_cast<const UChar *>(inBytes + offset);
+ data->contexts = reinterpret_cast<const char16_t *>(inBytes + offset);
data->contextsLength = length / 2;
}
@@ -260,14 +260,14 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 2) {
- if(data == NULL) {
+ if(data == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
- if(baseData == NULL) {
+ if(baseData == nullptr) {
#if defined(COLLUNSAFE_COLL_VERSION) && defined (COLLUNSAFE_SERIALIZE)
tailoring.unsafeBackwardSet = new UnicodeSet(unsafe_serializedData, unsafe_serializedCount, UnicodeSet::kSerialized, errorCode);
- if(tailoring.unsafeBackwardSet == NULL) {
+ if(tailoring.unsafeBackwardSet == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
} else if (U_FAILURE(errorCode)) {
@@ -286,7 +286,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
// new UnicodeSet("[[:^lccc=0:][\\udc00-\\udfff]]").
// It is faster and requires fewer code dependencies.
tailoring.unsafeBackwardSet = new UnicodeSet(0xdc00, 0xdfff); // trail surrogates
- if(tailoring.unsafeBackwardSet == NULL) {
+ if(tailoring.unsafeBackwardSet == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -296,7 +296,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
// Clone the root collator's set contents.
tailoring.unsafeBackwardSet = static_cast<UnicodeSet *>(
baseData->unsafeBackwardSet->cloneAsThawed());
- if(tailoring.unsafeBackwardSet == NULL) {
+ if(tailoring.unsafeBackwardSet == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -317,16 +317,16 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
// Mark each lead surrogate as "unsafe"
// if any of its 1024 associated supplementary code points is "unsafe".
UChar32 c = 0x10000;
- for(UChar lead = 0xd800; lead < 0xdc00; ++lead, c += 0x400) {
+ for(char16_t lead = 0xd800; lead < 0xdc00; ++lead, c += 0x400) {
if(!tailoring.unsafeBackwardSet->containsNone(c, c + 0x3ff)) {
tailoring.unsafeBackwardSet->add(lead);
}
}
tailoring.unsafeBackwardSet->freeze();
data->unsafeBackwardSet = tailoring.unsafeBackwardSet;
- } else if(data == NULL) {
+ } else if(data == nullptr) {
// Nothing to do.
- } else if(baseData != NULL) {
+ } else if(baseData != nullptr) {
// No tailoring-specific data: Alias the root collator's set.
data->unsafeBackwardSet = baseData->unsafeBackwardSet;
} else {
@@ -337,8 +337,8 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
// If the fast Latin format version is different,
// or the version is set to 0 for "no fast Latin table",
// then just always use the normal string comparison path.
- if(data != NULL) {
- data->fastLatinTable = NULL;
+ if(data != nullptr) {
+ data->fastLatinTable = nullptr;
data->fastLatinTableLength = 0;
if(((inIndexes[IX_OPTIONS] >> 16) & 0xff) == CollationFastLatin::VERSION) {
index = IX_FAST_LATIN_TABLE_OFFSET;
@@ -351,7 +351,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
errorCode = U_INVALID_FORMAT_ERROR; // header vs. table version mismatch
return;
}
- } else if(baseData != NULL) {
+ } else if(baseData != nullptr) {
data->fastLatinTable = baseData->fastLatinTable;
data->fastLatinTableLength = baseData->fastLatinTableLength;
}
@@ -362,7 +362,7 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 2) {
- if(data == NULL) {
+ if(data == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
@@ -385,9 +385,9 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
- } else if(data == NULL) {
+ } else if(data == nullptr) {
// Nothing to do.
- } else if(baseData != NULL) {
+ } else if(baseData != nullptr) {
data->numScripts = baseData->numScripts;
data->scriptsIndex = baseData->scriptsIndex;
data->scriptStarts = baseData->scriptStarts;
@@ -398,14 +398,14 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
offset = getIndex(inIndexes, indexesLength, index);
length = getIndex(inIndexes, indexesLength, index + 1) - offset;
if(length >= 256) {
- if(data == NULL) {
+ if(data == nullptr) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
}
data->compressibleBytes = reinterpret_cast<const UBool *>(inBytes + offset);
- } else if(data == NULL) {
+ } else if(data == nullptr) {
// Nothing to do.
- } else if(baseData != NULL) {
+ } else if(baseData != nullptr) {
data->compressibleBytes = baseData->compressibleBytes;
} else {
errorCode = U_INVALID_FORMAT_ERROR; // No compressibleBytes[].
@@ -429,14 +429,14 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
}
CollationSettings *settings = SharedObject::copyOnWrite(tailoring.settings);
- if(settings == NULL) {
+ if(settings == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
settings->options = options;
// Set variableTop from options and scripts data.
settings->variableTop = tailoring.data->getLastPrimaryForGroup(
- UCOL_REORDER_CODE_FIRST + settings->getMaxVariable());
+ UCOL_REORDER_CODE_FIRST + int32_t{settings->getMaxVariable()});
if(settings->variableTop == 0) {
errorCode = U_INVALID_FORMAT_ERROR;
return;
@@ -468,12 +468,12 @@ CollationDataReader::isAcceptable(void *context,
pInfo->formatVersion[0] == 5
) {
UVersionInfo *version = static_cast<UVersionInfo *>(context);
- if(version != NULL) {
+ if(version != nullptr) {
uprv_memcpy(version, pInfo->dataVersion, 4);
}
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
diff --git a/contrib/libs/icu/i18n/collationdatareader.h b/contrib/libs/icu/i18n/collationdatareader.h
index 44e69399e39..5030f6c8523 100644
--- a/contrib/libs/icu/i18n/collationdatareader.h
+++ b/contrib/libs/icu/i18n/collationdatareader.h
@@ -80,7 +80,7 @@ struct U_I18N_API CollationDataReader /* all static */ {
/** Byte offset to uint32_t rootElements[]. */
IX_ROOT_ELEMENTS_OFFSET, // 12
- /** Byte offset to UChar *contexts[]. */
+ /** Byte offset to char16_t *contexts[]. */
IX_CONTEXTS_OFFSET,
/** Byte offset to uint16_t [] with serialized unsafeBackwardSet. */
IX_UNSAFE_BWD_OFFSET,
@@ -106,7 +106,7 @@ struct U_I18N_API CollationDataReader /* all static */ {
isAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo);
private:
- CollationDataReader(); // no constructor
+ CollationDataReader() = delete; // no constructor
};
/*
@@ -198,7 +198,7 @@ private:
* Compact storage for all of the CEs that occur in the root collation.
* See the CollationRootElements class.
*
- * UChar *contexts[];
+ * char16_t *contexts[];
* Serialized UCharsTrie structures with prefix (pre-context) and contraction mappings.
*
* uint16_t unsafeBackwardSet[]; -- see UnicodeSet::serialize()
diff --git a/contrib/libs/icu/i18n/collationdatawriter.cpp b/contrib/libs/icu/i18n/collationdatawriter.cpp
index 823c8eb0111..ce78a0526a3 100644
--- a/contrib/libs/icu/i18n/collationdatawriter.cpp
+++ b/contrib/libs/icu/i18n/collationdatawriter.cpp
@@ -33,22 +33,22 @@ U_NAMESPACE_BEGIN
uint8_t *
RuleBasedCollator::cloneRuleData(int32_t &length, UErrorCode &errorCode) const {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
LocalMemory<uint8_t> buffer((uint8_t *)uprv_malloc(20000));
if(buffer.isNull()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
length = cloneBinary(buffer.getAlias(), 20000, errorCode);
if(errorCode == U_BUFFER_OVERFLOW_ERROR) {
- if(buffer.allocateInsteadAndCopy(length, 0) == NULL) {
+ if(buffer.allocateInsteadAndCopy(length, 0) == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
errorCode = U_ZERO_ERROR;
length = cloneBinary(buffer.getAlias(), length, errorCode);
}
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
return buffer.orphan();
}
@@ -79,7 +79,7 @@ CollationDataWriter::writeBase(const CollationData &data, const CollationSetting
const void *rootElements, int32_t rootElementsLength,
int32_t indexes[], uint8_t *dest, int32_t capacity,
UErrorCode &errorCode) {
- return write(TRUE, NULL,
+ return write(true, nullptr,
data, settings,
rootElements, rootElementsLength,
indexes, dest, capacity, errorCode);
@@ -89,9 +89,9 @@ int32_t
CollationDataWriter::writeTailoring(const CollationTailoring &t, const CollationSettings &settings,
int32_t indexes[], uint8_t *dest, int32_t capacity,
UErrorCode &errorCode) {
- return write(FALSE, t.version,
+ return write(false, t.version,
*t.data, settings,
- NULL, 0,
+ nullptr, 0,
indexes, dest, capacity, errorCode);
}
@@ -102,7 +102,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
int32_t indexes[], uint8_t *dest, int32_t capacity,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return 0; }
- if(capacity < 0 || (capacity > 0 && dest == NULL)) {
+ if(capacity < 0 || (capacity > 0 && dest == nullptr)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -117,7 +117,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
const CollationData *baseData = data.base;
int32_t fastLatinVersion;
- if(data.fastLatinTable != NULL) {
+ if(data.fastLatinTable != nullptr) {
fastLatinVersion = (int32_t)CollationFastLatin::VERSION << 16;
} else {
fastLatinVersion = 0;
@@ -129,11 +129,11 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
// so that we start with an 8-aligned offset.
indexesLength = CollationDataReader::IX_TOTAL_SIZE + 1;
U_ASSERT(settings.reorderCodesLength == 0);
- hasMappings = TRUE;
+ hasMappings = true;
unsafeBackwardSet = *data.unsafeBackwardSet;
fastLatinTableLength = data.fastLatinTableLength;
- } else if(baseData == NULL) {
- hasMappings = FALSE;
+ } else if(baseData == nullptr) {
+ hasMappings = false;
if(settings.reorderCodesLength == 0) {
// only options
indexesLength = CollationDataReader::IX_OPTIONS + 1; // no limit offset here
@@ -142,7 +142,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
indexesLength = CollationDataReader::IX_REORDER_TABLE_OFFSET + 2;
}
} else {
- hasMappings = TRUE;
+ hasMappings = true;
// Tailored mappings, and what else?
// Check in ascending order of optional tailoring data items.
indexesLength = CollationDataReader::IX_CE32S_OFFSET + 2;
@@ -207,7 +207,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
dest += headerSize;
capacity -= headerSize;
} else {
- dest = NULL;
+ dest = nullptr;
capacity = 0;
}
}
@@ -233,7 +233,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
totalSize += reorderCodesLength * 4;
indexes[CollationDataReader::IX_REORDER_TABLE_OFFSET] = totalSize;
- if(settings.reorderTable != NULL) {
+ if(settings.reorderTable != nullptr) {
totalSize += 256;
}
@@ -245,7 +245,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
length = utrie2_serialize(data.trie, dest + totalSize,
capacity - totalSize, &errorCode2);
} else {
- length = utrie2_serialize(data.trie, NULL, 0, &errorCode2);
+ length = utrie2_serialize(data.trie, nullptr, 0, &errorCode2);
}
if(U_FAILURE(errorCode2) && errorCode2 != U_BUFFER_OVERFLOW_ERROR) {
errorCode = errorCode2;
@@ -287,7 +287,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
length = unsafeBackwardSet.serialize(
p, (capacity - totalSize) / 2, errorCode2);
} else {
- length = unsafeBackwardSet.serialize(NULL, 0, errorCode2);
+ length = unsafeBackwardSet.serialize(nullptr, 0, errorCode2);
}
if(U_FAILURE(errorCode2) && errorCode2 != U_BUFFER_OVERFLOW_ERROR) {
errorCode = errorCode2;
@@ -302,9 +302,9 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion,
UnicodeString scripts;
indexes[CollationDataReader::IX_SCRIPTS_OFFSET] = totalSize;
if(isBase) {
- scripts.append((UChar)data.numScripts);
- scripts.append(reinterpret_cast<const UChar *>(data.scriptsIndex), data.numScripts + 16);
- scripts.append(reinterpret_cast<const UChar *>(data.scriptStarts), data.scriptStartsLength);
+ scripts.append((char16_t)data.numScripts);
+ scripts.append(reinterpret_cast<const char16_t *>(data.scriptsIndex), data.numScripts + 16);
+ scripts.append(reinterpret_cast<const char16_t *>(data.scriptStarts), data.scriptStartsLength);
totalSize += scripts.length() * 2;
}
diff --git a/contrib/libs/icu/i18n/collationdatawriter.h b/contrib/libs/icu/i18n/collationdatawriter.h
index 197cd5309f2..6ba9a9c2c76 100644
--- a/contrib/libs/icu/i18n/collationdatawriter.h
+++ b/contrib/libs/icu/i18n/collationdatawriter.h
@@ -39,7 +39,7 @@ public:
UErrorCode &errorCode);
private:
- CollationDataWriter(); // no constructor
+ CollationDataWriter() = delete; // no constructor
static int32_t write(UBool isBase, const UVersionInfo dataVersion,
const CollationData &data, const CollationSettings &settings,
diff --git a/contrib/libs/icu/i18n/collationfastlatin.cpp b/contrib/libs/icu/i18n/collationfastlatin.cpp
index b98b8457f45..f40781a1178 100644
--- a/contrib/libs/icu/i18n/collationfastlatin.cpp
+++ b/contrib/libs/icu/i18n/collationfastlatin.cpp
@@ -27,7 +27,7 @@ int32_t
CollationFastLatin::getOptions(const CollationData *data, const CollationSettings &settings,
uint16_t *primaries, int32_t capacity) {
const uint16_t *table = data->fastLatinTable;
- if(table == NULL) { return -1; }
+ if(table == nullptr) { return -1; }
U_ASSERT(capacity == LATIN_LIMIT);
if(capacity != LATIN_LIMIT) { return -1; }
@@ -45,7 +45,7 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting
miniVarTop = table[i];
}
- UBool digitsAreReordered = FALSE;
+ UBool digitsAreReordered = false;
if(settings.hasReordering()) {
uint32_t prevStart = 0;
uint32_t beforeDigitStart = 0;
@@ -80,7 +80,7 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting
afterDigitStart = latinStart;
}
if(!(beforeDigitStart < digitStart && digitStart < afterDigitStart)) {
- digitsAreReordered = TRUE;
+ digitsAreReordered = true;
}
}
@@ -107,8 +107,8 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting
int32_t
CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primaries, int32_t options,
- const UChar *left, int32_t leftLength,
- const UChar *right, int32_t rightLength) {
+ const char16_t *left, int32_t leftLength,
+ const char16_t *right, int32_t rightLength) {
// This is a modified copy of CollationCompare::compareUpToQuaternary(),
// optimized for common Latin text.
// Keep them in sync!
@@ -154,7 +154,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
leftPair &= LONG_PRIMARY_MASK;
break;
} else {
- leftPair = nextPair(table, c, leftPair, left, NULL, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, left, nullptr, leftIndex, leftLength);
if(leftPair == BAIL_OUT) { return BAIL_OUT_RESULT; }
leftPair = getPrimaries(variableTop, leftPair);
}
@@ -185,7 +185,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
rightPair &= LONG_PRIMARY_MASK;
break;
} else {
- rightPair = nextPair(table, c, rightPair, right, NULL, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, right, nullptr, rightIndex, rightLength);
if(rightPair == BAIL_OUT) { return BAIL_OUT_RESULT; }
rightPair = getPrimaries(variableTop, rightPair);
}
@@ -236,7 +236,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
leftPair = COMMON_SEC_PLUS_OFFSET;
break;
} else {
- leftPair = nextPair(table, c, leftPair, left, NULL, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, left, nullptr, leftIndex, leftLength);
leftPair = getSecondaries(variableTop, leftPair);
}
}
@@ -261,7 +261,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
rightPair = COMMON_SEC_PLUS_OFFSET;
break;
} else {
- rightPair = nextPair(table, c, rightPair, right, NULL, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, right, nullptr, rightIndex, rightLength);
rightPair = getSecondaries(variableTop, rightPair);
}
}
@@ -300,7 +300,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
UChar32 c = left[leftIndex++];
leftPair = (c <= LATIN_MAX) ? table[c] : lookup(table, c);
if(leftPair < MIN_LONG) {
- leftPair = nextPair(table, c, leftPair, left, NULL, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, left, nullptr, leftIndex, leftLength);
}
leftPair = getCases(variableTop, strengthIsPrimary, leftPair);
}
@@ -313,7 +313,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
UChar32 c = right[rightIndex++];
rightPair = (c <= LATIN_MAX) ? table[c] : lookup(table, c);
if(rightPair < MIN_LONG) {
- rightPair = nextPair(table, c, rightPair, right, NULL, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, right, nullptr, rightIndex, rightLength);
}
rightPair = getCases(variableTop, strengthIsPrimary, rightPair);
}
@@ -353,7 +353,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
UChar32 c = left[leftIndex++];
leftPair = (c <= LATIN_MAX) ? table[c] : lookup(table, c);
if(leftPair < MIN_LONG) {
- leftPair = nextPair(table, c, leftPair, left, NULL, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, left, nullptr, leftIndex, leftLength);
}
leftPair = getTertiaries(variableTop, withCaseBits, leftPair);
}
@@ -366,7 +366,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
UChar32 c = right[rightIndex++];
rightPair = (c <= LATIN_MAX) ? table[c] : lookup(table, c);
if(rightPair < MIN_LONG) {
- rightPair = nextPair(table, c, rightPair, right, NULL, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, right, nullptr, rightIndex, rightLength);
}
rightPair = getTertiaries(variableTop, withCaseBits, rightPair);
}
@@ -409,7 +409,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
UChar32 c = left[leftIndex++];
leftPair = (c <= LATIN_MAX) ? table[c] : lookup(table, c);
if(leftPair < MIN_LONG) {
- leftPair = nextPair(table, c, leftPair, left, NULL, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, left, nullptr, leftIndex, leftLength);
}
leftPair = getQuaternaries(variableTop, leftPair);
}
@@ -422,7 +422,7 @@ CollationFastLatin::compareUTF16(const uint16_t *table, const uint16_t *primarie
UChar32 c = right[rightIndex++];
rightPair = (c <= LATIN_MAX) ? table[c] : lookup(table, c);
if(rightPair < MIN_LONG) {
- rightPair = nextPair(table, c, rightPair, right, NULL, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, right, nullptr, rightIndex, rightLength);
}
rightPair = getQuaternaries(variableTop, rightPair);
}
@@ -499,7 +499,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
leftPair &= LONG_PRIMARY_MASK;
break;
} else {
- leftPair = nextPair(table, c, leftPair, NULL, left, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, nullptr, left, leftIndex, leftLength);
if(leftPair == BAIL_OUT) { return BAIL_OUT_RESULT; }
leftPair = getPrimaries(variableTop, leftPair);
}
@@ -536,7 +536,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
rightPair &= LONG_PRIMARY_MASK;
break;
} else {
- rightPair = nextPair(table, c, rightPair, NULL, right, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, nullptr, right, rightIndex, rightLength);
if(rightPair == BAIL_OUT) { return BAIL_OUT_RESULT; }
rightPair = getPrimaries(variableTop, rightPair);
}
@@ -587,7 +587,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
leftPair = COMMON_SEC_PLUS_OFFSET;
break;
} else {
- leftPair = nextPair(table, c, leftPair, NULL, left, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, nullptr, left, leftIndex, leftLength);
leftPair = getSecondaries(variableTop, leftPair);
}
}
@@ -612,7 +612,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
rightPair = COMMON_SEC_PLUS_OFFSET;
break;
} else {
- rightPair = nextPair(table, c, rightPair, NULL, right, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, nullptr, right, rightIndex, rightLength);
rightPair = getSecondaries(variableTop, rightPair);
}
}
@@ -651,7 +651,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
UChar32 c = left[leftIndex++];
leftPair = (c <= 0x7f) ? table[c] : lookupUTF8Unsafe(table, c, left, leftIndex);
if(leftPair < MIN_LONG) {
- leftPair = nextPair(table, c, leftPair, NULL, left, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, nullptr, left, leftIndex, leftLength);
}
leftPair = getCases(variableTop, strengthIsPrimary, leftPair);
}
@@ -664,7 +664,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
UChar32 c = right[rightIndex++];
rightPair = (c <= 0x7f) ? table[c] : lookupUTF8Unsafe(table, c, right, rightIndex);
if(rightPair < MIN_LONG) {
- rightPair = nextPair(table, c, rightPair, NULL, right, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, nullptr, right, rightIndex, rightLength);
}
rightPair = getCases(variableTop, strengthIsPrimary, rightPair);
}
@@ -704,7 +704,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
UChar32 c = left[leftIndex++];
leftPair = (c <= 0x7f) ? table[c] : lookupUTF8Unsafe(table, c, left, leftIndex);
if(leftPair < MIN_LONG) {
- leftPair = nextPair(table, c, leftPair, NULL, left, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, nullptr, left, leftIndex, leftLength);
}
leftPair = getTertiaries(variableTop, withCaseBits, leftPair);
}
@@ -717,7 +717,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
UChar32 c = right[rightIndex++];
rightPair = (c <= 0x7f) ? table[c] : lookupUTF8Unsafe(table, c, right, rightIndex);
if(rightPair < MIN_LONG) {
- rightPair = nextPair(table, c, rightPair, NULL, right, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, nullptr, right, rightIndex, rightLength);
}
rightPair = getTertiaries(variableTop, withCaseBits, rightPair);
}
@@ -760,7 +760,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
UChar32 c = left[leftIndex++];
leftPair = (c <= 0x7f) ? table[c] : lookupUTF8Unsafe(table, c, left, leftIndex);
if(leftPair < MIN_LONG) {
- leftPair = nextPair(table, c, leftPair, NULL, left, leftIndex, leftLength);
+ leftPair = nextPair(table, c, leftPair, nullptr, left, leftIndex, leftLength);
}
leftPair = getQuaternaries(variableTop, leftPair);
}
@@ -773,7 +773,7 @@ CollationFastLatin::compareUTF8(const uint16_t *table, const uint16_t *primaries
UChar32 c = right[rightIndex++];
rightPair = (c <= 0x7f) ? table[c] : lookupUTF8Unsafe(table, c, right, rightIndex);
if(rightPair < MIN_LONG) {
- rightPair = nextPair(table, c, rightPair, NULL, right, rightIndex, rightLength);
+ rightPair = nextPair(table, c, rightPair, nullptr, right, rightIndex, rightLength);
}
rightPair = getQuaternaries(variableTop, rightPair);
}
@@ -854,7 +854,7 @@ CollationFastLatin::lookupUTF8Unsafe(const uint16_t *table, UChar32 c,
uint32_t
CollationFastLatin::nextPair(const uint16_t *table, UChar32 c, uint32_t ce,
- const UChar *s16, const uint8_t *s8, int32_t &sIndex, int32_t &sLength) {
+ const char16_t *s16, const uint8_t *s8, int32_t &sIndex, int32_t &sLength) {
if(ce >= MIN_LONG || ce < CONTRACTION) {
return ce; // simple or special mini CE
} else if(ce >= EXPANSION) {
@@ -872,7 +872,7 @@ CollationFastLatin::nextPair(const uint16_t *table, UChar32 c, uint32_t ce,
// Read the next character.
int32_t c2;
int32_t nextIndex = sIndex;
- if(s16 != NULL) {
+ if(s16 != nullptr) {
c2 = s16[nextIndex++];
if(c2 > LATIN_MAX) {
if(PUNCT_START <= c2 && c2 < PUNCT_LIMIT) {
diff --git a/contrib/libs/icu/i18n/collationfastlatin.h b/contrib/libs/icu/i18n/collationfastlatin.h
index 4bac797409d..d4caddcb63e 100644
--- a/contrib/libs/icu/i18n/collationfastlatin.h
+++ b/contrib/libs/icu/i18n/collationfastlatin.h
@@ -188,7 +188,7 @@ public:
*/
static const int32_t BAIL_OUT_RESULT = -2;
- static inline int32_t getCharIndex(UChar c) {
+ static inline int32_t getCharIndex(char16_t c) {
if(c <= LATIN_MAX) {
return c;
} else if(PUNCT_START <= c && c < PUNCT_LIMIT) {
@@ -211,8 +211,8 @@ public:
uint16_t *primaries, int32_t capacity);
static int32_t compareUTF16(const uint16_t *table, const uint16_t *primaries, int32_t options,
- const UChar *left, int32_t leftLength,
- const UChar *right, int32_t rightLength);
+ const char16_t *left, int32_t leftLength,
+ const char16_t *right, int32_t rightLength);
static int32_t compareUTF8(const uint16_t *table, const uint16_t *primaries, int32_t options,
const uint8_t *left, int32_t leftLength,
@@ -226,7 +226,7 @@ private:
const uint8_t *s8, int32_t &sIndex);
static uint32_t nextPair(const uint16_t *table, UChar32 c, uint32_t ce,
- const UChar *s16, const uint8_t *s8, int32_t &sIndex, int32_t &sLength);
+ const char16_t *s16, const uint8_t *s8, int32_t &sIndex, int32_t &sLength);
static inline uint32_t getPrimaries(uint32_t variableTop, uint32_t pair) {
uint32_t ce = pair & 0xffff;
@@ -249,7 +249,7 @@ private:
static uint32_t getQuaternaries(uint32_t variableTop, uint32_t pair);
private:
- CollationFastLatin(); // no constructor
+ CollationFastLatin() = delete; // no constructor
};
/*
diff --git a/contrib/libs/icu/i18n/collationfastlatinbuilder.cpp b/contrib/libs/icu/i18n/collationfastlatinbuilder.cpp
index e5ba2f0e21d..b1fd3af70aa 100644
--- a/contrib/libs/icu/i18n/collationfastlatinbuilder.cpp
+++ b/contrib/libs/icu/i18n/collationfastlatinbuilder.cpp
@@ -89,9 +89,9 @@ binarySearch(const int64_t list[], int32_t limit, int64_t ce) {
CollationFastLatinBuilder::CollationFastLatinBuilder(UErrorCode &errorCode)
: ce0(0), ce1(0),
contractionCEs(errorCode), uniqueCEs(errorCode),
- miniCEs(NULL),
+ miniCEs(nullptr),
firstDigitPrimary(0), firstLatinPrimary(0), lastLatinPrimary(0),
- firstShortPrimary(0), shortPrimaryOverflow(FALSE),
+ firstShortPrimary(0), shortPrimaryOverflow(false),
headerLength(0) {
}
@@ -101,24 +101,24 @@ CollationFastLatinBuilder::~CollationFastLatinBuilder() {
UBool
CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
if(!result.isEmpty()) { // This builder is not reusable.
errorCode = U_INVALID_STATE_ERROR;
- return FALSE;
+ return false;
}
- if(!loadGroups(data, errorCode)) { return FALSE; }
+ if(!loadGroups(data, errorCode)) { return false; }
// Fast handling of digits.
firstShortPrimary = firstDigitPrimary;
getCEs(data, errorCode);
- if(!encodeUniqueCEs(errorCode)) { return FALSE; }
+ if(!encodeUniqueCEs(errorCode)) { return false; }
if(shortPrimaryOverflow) {
// Give digits long mini primaries,
// so that there are more short primaries for letters.
firstShortPrimary = firstLatinPrimary;
resetCEs();
getCEs(data, errorCode);
- if(!encodeUniqueCEs(errorCode)) { return FALSE; }
+ if(!encodeUniqueCEs(errorCode)) { return false; }
}
// Note: If we still have a short-primary overflow but not a long-primary overflow,
// then we could calculate how many more long primaries would fit,
@@ -126,7 +126,7 @@ CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorC
// and try again.
// However, this might only benefit the en_US_POSIX tailoring,
// and it is simpler to suppress building fast Latin data for it in genrb,
- // or by returning FALSE here if shortPrimaryOverflow.
+ // or by returning false here if shortPrimaryOverflow.
UBool ok = !shortPrimaryOverflow &&
encodeCharCEs(errorCode) && encodeContractions(errorCode);
@@ -137,19 +137,19 @@ CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorC
UBool
CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
headerLength = 1 + NUM_SPECIAL_GROUPS;
uint32_t r0 = (CollationFastLatin::VERSION << 8) | headerLength;
- result.append((UChar)r0);
+ result.append((char16_t)r0);
// The first few reordering groups should be special groups
// (space, punct, ..., digit) followed by Latn, then Grek and other scripts.
for(int32_t i = 0; i < NUM_SPECIAL_GROUPS; ++i) {
lastSpecialPrimaries[i] = data.getLastPrimaryForGroup(UCOL_REORDER_CODE_FIRST + i);
if(lastSpecialPrimaries[i] == 0) {
// missing data
- return FALSE;
+ return false;
}
- result.append((UChar)0); // reserve a slot for this group
+ result.append((char16_t)0); // reserve a slot for this group
}
firstDigitPrimary = data.getFirstPrimaryForGroup(UCOL_REORDER_CODE_DIGIT);
@@ -157,9 +157,9 @@ CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &err
lastLatinPrimary = data.getLastPrimaryForGroup(USCRIPT_LATIN);
if(firstDigitPrimary == 0 || firstLatinPrimary == 0) {
// missing data
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
UBool
@@ -169,7 +169,7 @@ CollationFastLatinBuilder::inSameGroup(uint32_t p, uint32_t q) const {
if(p >= firstShortPrimary) {
return q >= firstShortPrimary;
} else if(q >= firstShortPrimary) {
- return FALSE;
+ return false;
}
// Both or neither must be potentially-variable,
// so that we can test only one and determine if both are variable.
@@ -177,7 +177,7 @@ CollationFastLatinBuilder::inSameGroup(uint32_t p, uint32_t q) const {
if(p > lastVariablePrimary) {
return q > lastVariablePrimary;
} else if(q > lastVariablePrimary) {
- return FALSE;
+ return false;
}
// Both will be encoded with long mini primaries.
// They must be in the same special reordering group,
@@ -188,7 +188,7 @@ CollationFastLatinBuilder::inSameGroup(uint32_t p, uint32_t q) const {
if(p <= lastPrimary) {
return q <= lastPrimary;
} else if(q <= lastPrimary) {
- return FALSE;
+ return false;
}
}
}
@@ -197,7 +197,7 @@ void
CollationFastLatinBuilder::resetCEs() {
contractionCEs.removeAllElements();
uniqueCEs.removeAllElements();
- shortPrimaryOverflow = FALSE;
+ shortPrimaryOverflow = false;
result.truncate(headerLength);
}
@@ -205,7 +205,7 @@ void
CollationFastLatinBuilder::getCEs(const CollationData &data, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
int32_t i = 0;
- for(UChar c = 0;; ++i, ++c) {
+ for(char16_t c = 0;; ++i, ++c) {
if(c == CollationFastLatin::LATIN_LIMIT) {
c = CollationFastLatin::PUNCT_START;
} else if(c == CollationFastLatin::PUNCT_LIMIT) {
@@ -245,7 +245,7 @@ CollationFastLatinBuilder::getCEs(const CollationData &data, UErrorCode &errorCo
UBool
CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, uint32_t ce32,
UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
ce32 = data.getFinalCE32(ce32);
ce1 = 0;
if(Collation::isSimpleOrLongCE32(ce32)) {
@@ -266,7 +266,7 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c,
}
break;
} else {
- return FALSE;
+ return false;
}
}
case Collation::EXPANSION_TAG: {
@@ -279,7 +279,7 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c,
}
break;
} else {
- return FALSE;
+ return false;
}
}
// Note: We could support PREFIX_TAG (assert c>=0)
@@ -295,24 +295,24 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c,
ce0 = data.getCEFromOffsetCE32(c, ce32);
break;
default:
- return FALSE;
+ return false;
}
}
// A mapping can be completely ignorable.
if(ce0 == 0) { return ce1 == 0; }
// We do not support an ignorable ce0 unless it is completely ignorable.
uint32_t p0 = (uint32_t)(ce0 >> 32);
- if(p0 == 0) { return FALSE; }
+ if(p0 == 0) { return false; }
// We only support primaries up to the Latin script.
- if(p0 > lastLatinPrimary) { return FALSE; }
+ if(p0 > lastLatinPrimary) { return false; }
// We support non-common secondary and case weights only together with short primaries.
uint32_t lower32_0 = (uint32_t)ce0;
if(p0 < firstShortPrimary) {
uint32_t sc0 = lower32_0 & Collation::SECONDARY_AND_CASE_MASK;
- if(sc0 != Collation::COMMON_SECONDARY_CE) { return FALSE; }
+ if(sc0 != Collation::COMMON_SECONDARY_CE) { return false; }
}
// No below-common tertiary weights.
- if((lower32_0 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return FALSE; }
+ if((lower32_0 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return false; }
if(ce1 != 0) {
// Both primaries must be in the same group,
// or both must get short mini primaries,
@@ -320,29 +320,29 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c,
// This is so that we can test the first primary and use the same mask for both,
// and determine for both whether they are variable.
uint32_t p1 = (uint32_t)(ce1 >> 32);
- if(p1 == 0 ? p0 < firstShortPrimary : !inSameGroup(p0, p1)) { return FALSE; }
+ if(p1 == 0 ? p0 < firstShortPrimary : !inSameGroup(p0, p1)) { return false; }
uint32_t lower32_1 = (uint32_t)ce1;
// No tertiary CEs.
- if((lower32_1 >> 16) == 0) { return FALSE; }
+ if((lower32_1 >> 16) == 0) { return false; }
// We support non-common secondary and case weights
// only for secondary CEs or together with short primaries.
if(p1 != 0 && p1 < firstShortPrimary) {
uint32_t sc1 = lower32_1 & Collation::SECONDARY_AND_CASE_MASK;
- if(sc1 != Collation::COMMON_SECONDARY_CE) { return FALSE; }
+ if(sc1 != Collation::COMMON_SECONDARY_CE) { return false; }
}
// No below-common tertiary weights.
- if((lower32_1 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return FALSE; }
+ if((lower32_1 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return false; }
}
// No quaternary weights.
- if(((ce0 | ce1) & Collation::QUATERNARY_MASK) != 0) { return FALSE; }
- return TRUE;
+ if(((ce0 | ce1) & Collation::QUATERNARY_MASK) != 0) { return false; }
+ return true;
}
UBool
CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, uint32_t ce32,
UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
- const UChar *p = data.contexts + Collation::indexFromCE32(ce32);
+ if(U_FAILURE(errorCode)) { return false; }
+ const char16_t *p = data.contexts + Collation::indexFromCE32(ce32);
ce32 = CollationData::readCE32(p); // Default if no suffix match.
// Since the original ce32 is not a prefix mapping,
// the default ce32 must not be another contraction.
@@ -357,7 +357,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data,
// Handle an encodable contraction unless the next contraction is too long
// and starts with the same character.
int32_t prevX = -1;
- UBool addContraction = FALSE;
+ UBool addContraction = false;
UCharsTrie::Iterator suffixes(p + 2, 0, errorCode);
while(suffixes.next(errorCode)) {
const UnicodeString &suffix = suffixes.getString();
@@ -367,7 +367,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data,
if(addContraction) {
// Bail out for all contractions starting with this character.
addContractionEntry(x, Collation::NO_CE, 0, errorCode);
- addContraction = FALSE;
+ addContraction = false;
}
continue;
}
@@ -376,17 +376,17 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data,
}
ce32 = (uint32_t)suffixes.getValue();
if(suffix.length() == 1 && getCEsFromCE32(data, U_SENTINEL, ce32, errorCode)) {
- addContraction = TRUE;
+ addContraction = true;
} else {
addContractionEntry(x, Collation::NO_CE, 0, errorCode);
- addContraction = FALSE;
+ addContraction = false;
}
prevX = x;
}
if(addContraction) {
addContractionEntry(prevX, ce0, ce1, errorCode);
}
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
// Note: There might not be any fast Latin contractions, but
// we need to enter contraction handling anyway so that we can bail out
// when there is a non-fast-Latin character following.
@@ -394,7 +394,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data,
// following umlaut and bail out, rather than return the difference of Y vs. u.
ce0 = ((int64_t)Collation::NO_CE_PRIMARY << 32) | CONTRACTION_FLAG | contractionIndex;
ce1 = 0;
- return TRUE;
+ return true;
}
void
@@ -428,12 +428,12 @@ CollationFastLatinBuilder::getMiniCE(int64_t ce) const {
UBool
CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
uprv_free(miniCEs);
miniCEs = (uint16_t *)uprv_malloc(uniqueCEs.size() * 2);
- if(miniCEs == NULL) {
+ if(miniCEs == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
int32_t group = 0;
uint32_t lastGroupPrimary = lastSpecialPrimaries[group];
@@ -454,7 +454,7 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) {
U_ASSERT(pri <= CollationFastLatin::MAX_LONG);
// Set the group's header entry to the
// last "long primary" in or before the group.
- result.setCharAt(1 + group, (UChar)pri);
+ result.setCharAt(1 + group, (char16_t)pri);
if(++group < NUM_SPECIAL_GROUPS) {
lastGroupPrimary = lastSpecialPrimaries[group];
} else {
@@ -484,7 +484,7 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) {
#if DEBUG_COLLATION_FAST_LATIN_BUILDER
printf("short-primary overflow for %08x\n", p);
#endif
- shortPrimaryOverflow = TRUE;
+ shortPrimaryOverflow = true;
miniCEs[i] = CollationFastLatin::BAIL_OUT;
continue;
}
@@ -563,10 +563,10 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) {
UBool
CollationFastLatinBuilder::encodeCharCEs(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
int32_t miniCEsStart = result.length();
for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) {
- result.append((UChar)0); // initialize to completely ignorable
+ result.append((char16_t)0); // initialize to completely ignorable
}
int32_t indexBase = result.length();
for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) {
@@ -581,11 +581,11 @@ CollationFastLatinBuilder::encodeCharCEs(UErrorCode &errorCode) {
if(expansionIndex > (int32_t)CollationFastLatin::INDEX_MASK) {
miniCE = CollationFastLatin::BAIL_OUT;
} else {
- result.append((UChar)(miniCE >> 16)).append((UChar)miniCE);
+ result.append((char16_t)(miniCE >> 16)).append((char16_t)miniCE);
miniCE = CollationFastLatin::EXPANSION | expansionIndex;
}
}
- result.setCharAt(miniCEsStart + i, (UChar)miniCE);
+ result.setCharAt(miniCEsStart + i, (char16_t)miniCE);
}
return U_SUCCESS(errorCode);
}
@@ -594,7 +594,7 @@ UBool
CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) {
// We encode all contraction lists so that the first word of a list
// terminates the previous list, and we only need one additional terminator at the end.
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
int32_t indexBase = headerLength + CollationFastLatin::NUM_FAST_CHARS;
int32_t firstContractionIndex = result.length();
for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) {
@@ -605,7 +605,7 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) {
result.setCharAt(headerLength + i, CollationFastLatin::BAIL_OUT);
continue;
}
- UBool firstTriple = TRUE;
+ UBool firstTriple = true;
for(int32_t index = (int32_t)ce & 0x7fffffff;; index += 3) {
int32_t x = static_cast<int32_t>(contractionCEs.elementAti(index));
if((uint32_t)x == CollationFastLatin::CONTR_CHAR_MASK && !firstTriple) { break; }
@@ -613,29 +613,29 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) {
int64_t cce1 = contractionCEs.elementAti(index + 2);
uint32_t miniCE = encodeTwoCEs(cce0, cce1);
if(miniCE == CollationFastLatin::BAIL_OUT) {
- result.append((UChar)(x | (1 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
+ result.append((char16_t)(x | (1 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
} else if(miniCE <= 0xffff) {
- result.append((UChar)(x | (2 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
- result.append((UChar)miniCE);
+ result.append((char16_t)(x | (2 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
+ result.append((char16_t)miniCE);
} else {
- result.append((UChar)(x | (3 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
- result.append((UChar)(miniCE >> 16)).append((UChar)miniCE);
+ result.append((char16_t)(x | (3 << CollationFastLatin::CONTR_LENGTH_SHIFT)));
+ result.append((char16_t)(miniCE >> 16)).append((char16_t)miniCE);
}
- firstTriple = FALSE;
+ firstTriple = false;
}
// Note: There is a chance that this new contraction list is the same as a previous one,
// and if so, then we could truncate the result and reuse the other list.
// However, that seems unlikely.
result.setCharAt(headerLength + i,
- (UChar)(CollationFastLatin::CONTRACTION | contractionIndex));
+ (char16_t)(CollationFastLatin::CONTRACTION | contractionIndex));
}
if(result.length() > firstContractionIndex) {
// Terminate the last contraction list.
- result.append((UChar)CollationFastLatin::CONTR_CHAR_MASK);
+ result.append((char16_t)CollationFastLatin::CONTR_CHAR_MASK);
}
if(result.isBogus()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
#if DEBUG_COLLATION_FAST_LATIN_BUILDER
printf("** fast Latin %d * 2 = %d bytes\n", result.length(), result.length() * 2);
@@ -663,7 +663,7 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) {
}
puts("");
#endif
- return TRUE;
+ return true;
}
uint32_t
diff --git a/contrib/libs/icu/i18n/collationfcd.cpp b/contrib/libs/icu/i18n/collationfcd.cpp
index 0be4150b09b..e1f1d0330c4 100644
--- a/contrib/libs/icu/i18n/collationfcd.cpp
+++ b/contrib/libs/icu/i18n/collationfcd.cpp
@@ -151,7 +151,7 @@ const uint32_t CollationFCD::lcccBits[73]={
0x200ff800,0xfbc00000,0x3eef,0xe000000,0xff000000,0xfffffc00,0xfffffffb,0x10000000,0x1e2000,0x2000,0x40000000,0x602000,0x18000000,0x400,0x7000000,0xf00,
0x3000000,0x2a00000,0x3c3e0000,0xdf,0x40,0x6800000,0xe0000000,0x300000,0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0xbfff0000,0x7fff,0x10,
0xff800,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd,0x1fff0000,0x1ffe2,0x38000,0x80000000,0xfc00,0x6000000,0x3ff08000,0xc0000000,0x30000,0x1000,
-0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xc0000fd,0x5108000
+0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xc0000fd,0x7108000
};
const uint8_t CollationFCD::tcccIndex[2048]={
@@ -293,7 +293,7 @@ const uint32_t CollationFCD::tcccBits[123]={
0xe0000000,0x300000,0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0xbfff0000,0x7fff,0x10,0xff800,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd,
0xbffffff,0x3ffffff,0x3f3fffff,0xaaff3f3f,0x3fffffff,0x1fdfffff,0xefcfffde,0x1fdc7fff,0x1fff0000,0x1ffe2,0x800,0xc000000,0x4000,0xe000,0x1210,0x50,
0x292,0x333e005,0x333,0xf000,0x3c0f,0x38000,0x80000000,0xfc00,0x55555000,0x36db02a5,0x46100000,0x47900000,0x3ff08000,0xc0000000,0x30000,0x1000,
-0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xc0000fd,0x5108000,0x5f7ffc00,0x7fdb
+0x3ffff,0x3800,0x80000,1,0xc19d0000,2,0x400000,0xc0000fd,0x7108000,0x5f7ffc00,0x7fdb
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/collationfcd.h b/contrib/libs/icu/i18n/collationfcd.h
index 3a5738efb24..9620452b97f 100644
--- a/contrib/libs/icu/i18n/collationfcd.h
+++ b/contrib/libs/icu/i18n/collationfcd.h
@@ -123,7 +123,7 @@ public:
}
private:
- CollationFCD(); // No instantiation.
+ CollationFCD() = delete; // No instantiation.
static const uint8_t lcccIndex[2048];
static const uint8_t tcccIndex[2048];
diff --git a/contrib/libs/icu/i18n/collationiterator.cpp b/contrib/libs/icu/i18n/collationiterator.cpp
index 6bfdfbe7c70..f8c6da22b2b 100644
--- a/contrib/libs/icu/i18n/collationiterator.cpp
+++ b/contrib/libs/icu/i18n/collationiterator.cpp
@@ -36,8 +36,8 @@ CollationIterator::CEBuffer::~CEBuffer() {}
UBool
CollationIterator::CEBuffer::ensureAppendCapacity(int32_t appCap, UErrorCode &errorCode) {
int32_t capacity = buffer.getCapacity();
- if((length + appCap) <= capacity) { return TRUE; }
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if((length + appCap) <= capacity) { return true; }
+ if(U_FAILURE(errorCode)) { return false; }
do {
if(capacity < 1000) {
capacity *= 4;
@@ -46,11 +46,11 @@ CollationIterator::CEBuffer::ensureAppendCapacity(int32_t appCap, UErrorCode &er
}
} while(capacity < (length + appCap));
int64_t *p = buffer.resize(capacity, length);
- if(p == NULL) {
+ if(p == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// State of combining marks skipped in discontiguous contraction.
@@ -149,7 +149,7 @@ CollationIterator::CollationIterator(const CollationIterator &other)
trie(other.trie),
data(other.data),
cesIndex(other.cesIndex),
- skipped(NULL),
+ skipped(nullptr),
numCpFwd(other.numCpFwd),
isNumeric(other.isNumeric) {
UErrorCode errorCode = U_ZERO_ERROR;
@@ -191,7 +191,7 @@ CollationIterator::operator==(const CollationIterator &other) const {
void
CollationIterator::reset() {
cesIndex = ceBuffer.length = 0;
- if(skipped != NULL) { skipped->clear(); }
+ if(skipped != nullptr) { skipped->clear(); }
}
int32_t
@@ -209,19 +209,19 @@ CollationIterator::handleNextCE32(UChar32 &c, UErrorCode &errorCode) {
return (c < 0) ? Collation::FALLBACK_CE32 : data->getCE32(c);
}
-UChar
+char16_t
CollationIterator::handleGetTrailSurrogate() {
return 0;
}
UBool
CollationIterator::foundNULTerminator() {
- return FALSE;
+ return false;
}
UBool
CollationIterator::forbidSurrogateCodePoints() const {
- return FALSE;
+ return false;
}
uint32_t
@@ -239,7 +239,7 @@ int64_t
CollationIterator::nextCEFromCE32(const CollationData *d, UChar32 c, uint32_t ce32,
UErrorCode &errorCode) {
--ceBuffer.length; // Undo ceBuffer.incLength().
- appendCEsFromCE32(d, c, ce32, TRUE, errorCode);
+ appendCEsFromCE32(d, c, ce32, true, errorCode);
if(U_SUCCESS(errorCode)) {
return ceBuffer.get(cesIndex++);
} else {
@@ -303,7 +303,7 @@ CollationIterator::appendCEsFromCE32(const CollationData *d, UChar32 c, uint32_t
if(forward) { forwardNumCodePoints(1, errorCode); }
break;
case Collation::CONTRACTION_TAG: {
- const UChar *p = d->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = d->contexts + Collation::indexFromCE32(ce32);
uint32_t defaultCE32 = CollationData::readCE32(p); // Default if no suffix match.
if(!forward) {
// Backward contractions are handled by previousCEUnsafe().
@@ -312,7 +312,7 @@ CollationIterator::appendCEsFromCE32(const CollationData *d, UChar32 c, uint32_t
break;
}
UChar32 nextCp;
- if(skipped == NULL && numCpFwd < 0) {
+ if(skipped == nullptr && numCpFwd < 0) {
// Some portion of nextCE32FromContraction() pulled out here as an ASCII fast path,
// avoiding the function call and the nextSkippedCodePoint() overhead.
nextCp = nextCodePoint(errorCode);
@@ -408,7 +408,7 @@ CollationIterator::appendCEsFromCE32(const CollationData *d, UChar32 c, uint32_t
case Collation::LEAD_SURROGATE_TAG: {
U_ASSERT(forward); // Backward iteration should never see lead surrogate code _unit_ data.
U_ASSERT(U16_IS_LEAD(c));
- UChar trail;
+ char16_t trail;
if(U16_IS_TRAIL(trail = handleGetTrailSurrogate())) {
c = U16_GET_SUPPLEMENTARY(c, trail);
ce32 &= Collation::LEAD_TYPE_MASK;
@@ -447,7 +447,7 @@ CollationIterator::appendCEsFromCE32(const CollationData *d, UChar32 c, uint32_t
uint32_t
CollationIterator::getCE32FromPrefix(const CollationData *d, uint32_t ce32,
UErrorCode &errorCode) {
- const UChar *p = d->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = d->contexts + Collation::indexFromCE32(ce32);
ce32 = CollationData::readCE32(p); // Default if no prefix match.
p += 2;
// Number of code points read before the original code point.
@@ -469,17 +469,17 @@ CollationIterator::getCE32FromPrefix(const CollationData *d, uint32_t ce32,
UChar32
CollationIterator::nextSkippedCodePoint(UErrorCode &errorCode) {
- if(skipped != NULL && skipped->hasNext()) { return skipped->next(); }
+ if(skipped != nullptr && skipped->hasNext()) { return skipped->next(); }
if(numCpFwd == 0) { return U_SENTINEL; }
UChar32 c = nextCodePoint(errorCode);
- if(skipped != NULL && !skipped->isEmpty() && c >= 0) { skipped->incBeyond(); }
+ if(skipped != nullptr && !skipped->isEmpty() && c >= 0) { skipped->incBeyond(); }
if(numCpFwd > 0 && c >= 0) { --numCpFwd; }
return c;
}
void
CollationIterator::backwardNumSkipped(int32_t n, UErrorCode &errorCode) {
- if(skipped != NULL && !skipped->isEmpty()) {
+ if(skipped != nullptr && !skipped->isEmpty()) {
n = skipped->backwardNumCodePoints(n);
}
backwardNumCodePoints(n, errorCode);
@@ -488,7 +488,7 @@ CollationIterator::backwardNumSkipped(int32_t n, UErrorCode &errorCode) {
uint32_t
CollationIterator::nextCE32FromContraction(const CollationData *d, uint32_t contractionCE32,
- const UChar *p, uint32_t ce32, UChar32 c,
+ const char16_t *p, uint32_t ce32, UChar32 c,
UErrorCode &errorCode) {
// c: next code point after the original one
@@ -501,7 +501,7 @@ CollationIterator::nextCE32FromContraction(const CollationData *d, uint32_t cont
// and therefore need not remember the suffixes state from before a mismatch for retrying.
// If we are already processing skipped combining marks, then we do track the state.
UCharsTrie suffixes(p);
- if(skipped != NULL && !skipped->isEmpty()) { skipped->saveTrieState(suffixes); }
+ if(skipped != nullptr && !skipped->isEmpty()) { skipped->saveTrieState(suffixes); }
UStringTrieResult match = suffixes.firstForCodePoint(c);
for(;;) {
UChar32 nextCp;
@@ -510,7 +510,7 @@ CollationIterator::nextCE32FromContraction(const CollationData *d, uint32_t cont
if(!USTRINGTRIE_HAS_NEXT(match) || (c = nextSkippedCodePoint(errorCode)) < 0) {
return ce32;
}
- if(skipped != NULL && !skipped->isEmpty()) { skipped->saveTrieState(suffixes); }
+ if(skipped != nullptr && !skipped->isEmpty()) { skipped->saveTrieState(suffixes); }
sinceMatch = 1;
} else if(match == USTRINGTRIE_NO_MATCH || (nextCp = nextSkippedCodePoint(errorCode)) < 0) {
// No match for c, or partial match (USTRINGTRIE_NO_VALUE) and no further text.
@@ -597,10 +597,10 @@ CollationIterator::nextCE32FromDiscontiguousContraction(
// We have read and matched (lookAhead-2) code points,
// read non-matching c and peeked ahead at nextCp.
// Return to the state before the mismatch and continue matching with nextCp.
- if(skipped == NULL || skipped->isEmpty()) {
- if(skipped == NULL) {
+ if(skipped == nullptr || skipped->isEmpty()) {
+ if(skipped == nullptr) {
skipped = new SkippedState();
- if(skipped == NULL) {
+ if(skipped == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -661,7 +661,7 @@ CollationIterator::nextCE32FromDiscontiguousContraction(
// and then from the combining marks that we skipped before the match.
c = U_SENTINEL;
for(;;) {
- appendCEsFromCE32(d, c, ce32, TRUE, errorCode);
+ appendCEsFromCE32(d, c, ce32, true, errorCode);
// Fetch CE32s for skipped combining marks from the normal data, with fallback,
// rather than from the CollationData where we found the contraction.
if(!skipped->hasNext()) { break; }
@@ -864,7 +864,7 @@ CollationIterator::previousCE(UVector32 &offsets, UErrorCode &errorCode) {
if(Collation::isSimpleOrLongCE32(ce32)) {
return Collation::ceFromCE32(ce32);
}
- appendCEsFromCE32(d, c, ce32, FALSE, errorCode);
+ appendCEsFromCE32(d, c, ce32, false, errorCode);
if(U_SUCCESS(errorCode)) {
if(ceBuffer.length > 1) {
offsets.addElement(getOffset(), errorCode);
diff --git a/contrib/libs/icu/i18n/collationiterator.h b/contrib/libs/icu/i18n/collationiterator.h
index 73cb93b934a..07bdf61985a 100644
--- a/contrib/libs/icu/i18n/collationiterator.h
+++ b/contrib/libs/icu/i18n/collationiterator.h
@@ -92,8 +92,8 @@ private:
int32_t length;
private:
- CEBuffer(const CEBuffer &);
- void operator=(const CEBuffer &);
+ CEBuffer(const CEBuffer &) = delete;
+ void operator=(const CEBuffer &) = delete;
MaybeStackArray<int64_t, INITIAL_CAPACITY> buffer;
};
@@ -103,7 +103,7 @@ public:
: trie(d->trie),
data(d),
cesIndex(0),
- skipped(NULL),
+ skipped(nullptr),
numCpFwd(-1),
isNumeric(numeric) {}
@@ -242,7 +242,7 @@ protected:
* if a trail surrogate follows the lead surrogate.
* Otherwise returns any other code unit and does not advance.
*/
- virtual UChar handleGetTrailSurrogate();
+ virtual char16_t handleGetTrailSurrogate();
/**
* Called when handleNextCE32() returns with c==0, to see whether it is a NUL terminator.
@@ -290,7 +290,7 @@ private:
uint32_t nextCE32FromContraction(
const CollationData *d, uint32_t contractionCE32,
- const UChar *p, uint32_t ce32, UChar32 c,
+ const char16_t *p, uint32_t ce32, UChar32 c,
UErrorCode &errorCode);
uint32_t nextCE32FromDiscontiguousContraction(
diff --git a/contrib/libs/icu/i18n/collationkeys.cpp b/contrib/libs/icu/i18n/collationkeys.cpp
index b5c322fb446..c429ac3f8f7 100644
--- a/contrib/libs/icu/i18n/collationkeys.cpp
+++ b/contrib/libs/icu/i18n/collationkeys.cpp
@@ -28,7 +28,7 @@ SortKeyByteSink::~SortKeyByteSink() {}
void
SortKeyByteSink::Append(const char *bytes, int32_t n) {
- if (n <= 0 || bytes == NULL) {
+ if (n <= 0 || bytes == nullptr) {
return;
}
if (ignore_ > 0) {
@@ -63,7 +63,7 @@ SortKeyByteSink::GetAppendBuffer(int32_t min_capacity,
int32_t *result_capacity) {
if (min_capacity < 1 || scratch_capacity < min_capacity) {
*result_capacity = 0;
- return NULL;
+ return nullptr;
}
if (ignore_ > 0) {
// Do not write ignored bytes right at the end of the buffer.
@@ -90,10 +90,10 @@ namespace {
*/
class SortKeyLevel : public UMemory {
public:
- SortKeyLevel() : len(0), ok(TRUE) {}
+ SortKeyLevel() : len(0), ok(true) {}
~SortKeyLevel() {}
- /** @return FALSE if memory allocation failed */
+ /** @return false if memory allocation failed */
UBool isOk() const { return ok; }
UBool isEmpty() const { return len == 0; }
int32_t length() const { return len; }
@@ -182,7 +182,7 @@ SortKeyLevel::appendReverseWeight16(uint32_t w) {
UBool SortKeyLevel::ensureCapacity(int32_t appendCapacity) {
if(!ok) {
- return FALSE;
+ return false;
}
int32_t newCapacity = 2 * buffer.getCapacity();
int32_t altCapacity = len + 2 * appendCapacity;
@@ -192,10 +192,10 @@ UBool SortKeyLevel::ensureCapacity(int32_t appendCapacity) {
if (newCapacity < 200) {
newCapacity = 200;
}
- if(buffer.resize(newCapacity, len)==NULL) {
- return ok = FALSE;
+ if(buffer.resize(newCapacity, len)==nullptr) {
+ return ok = false;
}
- return TRUE;
+ return true;
}
} // namespace
@@ -203,7 +203,7 @@ UBool SortKeyLevel::ensureCapacity(int32_t appendCapacity) {
CollationKeys::LevelCallback::~LevelCallback() {}
UBool
-CollationKeys::LevelCallback::needToWrite(Collation::Level /*level*/) { return TRUE; }
+CollationKeys::LevelCallback::needToWrite(Collation::Level /*level*/) { return true; }
/**
* Map from collation strength (UColAttributeValue)
@@ -619,7 +619,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter,
if(U_FAILURE(errorCode)) { return; }
// Append the beyond-primary levels.
- UBool ok = TRUE;
+ UBool ok = true;
if((levels & Collation::SECONDARY_LEVEL_FLAG) != 0) {
if(!callback.needToWrite(Collation::SECONDARY_LEVEL)) { return; }
ok &= secondaries.isOk();
diff --git a/contrib/libs/icu/i18n/collationkeys.h b/contrib/libs/icu/i18n/collationkeys.h
index 5b41d14c0b6..d1331566128 100644
--- a/contrib/libs/icu/i18n/collationkeys.h
+++ b/contrib/libs/icu/i18n/collationkeys.h
@@ -66,14 +66,14 @@ public:
UBool Overflowed() const { return appended_ > capacity_; }
/** @return false if memory allocation failed */
- UBool IsOk() const { return buffer_ != NULL; }
+ UBool IsOk() const { return buffer_ != nullptr; }
protected:
virtual void AppendBeyondCapacity(const char *bytes, int32_t n, int32_t length) = 0;
virtual UBool Resize(int32_t appendCapacity, int32_t length) = 0;
void SetNotOk() {
- buffer_ = NULL;
+ buffer_ = nullptr;
capacity_ = 0;
}
@@ -116,7 +116,7 @@ public:
private:
friend struct CollationDataReader;
- CollationKeys(); // no instantiation
+ CollationKeys() = delete; // no instantiation
// Secondary level: Compress up to 33 common weights as 05..25 or 25..45.
static const uint32_t SEC_COMMON_LOW = Collation::COMMON_BYTE;
diff --git a/contrib/libs/icu/i18n/collationroot.cpp b/contrib/libs/icu/i18n/collationroot.cpp
index 71753bd6f4b..99686345f9b 100644
--- a/contrib/libs/icu/i18n/collationroot.cpp
+++ b/contrib/libs/icu/i18n/collationroot.cpp
@@ -27,13 +27,14 @@
#include "ucln_in.h"
#include "udatamem.h"
#include "umutex.h"
+#include "umapfile.h"
U_NAMESPACE_BEGIN
namespace {
-static const CollationCacheEntry *rootSingleton = NULL;
-static UInitOnce initOnce = U_INITONCE_INITIALIZER;
+static const CollationCacheEntry *rootSingleton = nullptr;
+static UInitOnce initOnce {};
} // namespace
@@ -42,29 +43,58 @@ U_CDECL_BEGIN
static UBool U_CALLCONV uprv_collation_root_cleanup() {
SharedObject::clearPtr(rootSingleton);
initOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
+UDataMemory*
+CollationRoot::loadFromFile(const char* ucadataPath, UErrorCode &errorCode) {
+ UDataMemory dataMemory;
+ UDataMemory *rDataMem = nullptr;
+ if (U_FAILURE(errorCode)) {
+ return nullptr;
+ }
+ if (uprv_mapFile(&dataMemory, ucadataPath, &errorCode)) {
+ if (dataMemory.pHeader->dataHeader.magic1 == 0xda &&
+ dataMemory.pHeader->dataHeader.magic2 == 0x27 &&
+ CollationDataReader::isAcceptable(nullptr, "icu", "ucadata", &dataMemory.pHeader->info)) {
+ rDataMem = UDataMemory_createNewInstance(&errorCode);
+ if (U_FAILURE(errorCode)) {
+ return nullptr;
+ }
+ rDataMem->pHeader = dataMemory.pHeader;
+ rDataMem->mapAddr = dataMemory.mapAddr;
+ rDataMem->map = dataMemory.map;
+ return rDataMem;
+ }
+ errorCode = U_INVALID_FORMAT_ERROR;
+ return nullptr;
+ }
+ errorCode = U_MISSING_RESOURCE_ERROR;
+ return nullptr;
+}
+
void U_CALLCONV
-CollationRoot::load(UErrorCode &errorCode) {
+CollationRoot::load(const char* ucadataPath, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- LocalPointer<CollationTailoring> t(new CollationTailoring(NULL));
+ LocalPointer<CollationTailoring> t(new CollationTailoring(nullptr));
if(t.isNull() || t->isBogus()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
- t->memory = udata_openChoice(U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "coll",
- "icu", "ucadata",
- CollationDataReader::isAcceptable, t->version, &errorCode);
+ t->memory = ucadataPath ? CollationRoot::loadFromFile(ucadataPath, errorCode) :
+ udata_openChoice(U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "coll",
+ "icu", "ucadata",
+ CollationDataReader::isAcceptable,
+ t->version, &errorCode);
if(U_FAILURE(errorCode)) { return; }
const uint8_t *inBytes = static_cast<const uint8_t *>(udata_getMemory(t->memory));
- CollationDataReader::read(NULL, inBytes, udata_getLength(t->memory), *t, errorCode);
+ CollationDataReader::read(nullptr, inBytes, udata_getLength(t->memory), *t, errorCode);
if(U_FAILURE(errorCode)) { return; }
ucln_i18n_registerCleanup(UCLN_I18N_COLLATION_ROOT, uprv_collation_root_cleanup);
CollationCacheEntry *entry = new CollationCacheEntry(Locale::getRoot(), t.getAlias());
- if(entry != NULL) {
+ if(entry != nullptr) {
t.orphan(); // The rootSingleton took ownership of the tailoring.
entry->addRef();
rootSingleton = entry;
@@ -73,32 +103,38 @@ CollationRoot::load(UErrorCode &errorCode) {
const CollationCacheEntry *
CollationRoot::getRootCacheEntry(UErrorCode &errorCode) {
- umtx_initOnce(initOnce, CollationRoot::load, errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ umtx_initOnce(initOnce, CollationRoot::load, static_cast<const char*>(nullptr), errorCode);
+ if(U_FAILURE(errorCode)) { return nullptr; }
return rootSingleton;
}
const CollationTailoring *
CollationRoot::getRoot(UErrorCode &errorCode) {
- umtx_initOnce(initOnce, CollationRoot::load, errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ umtx_initOnce(initOnce, CollationRoot::load, static_cast<const char*>(nullptr), errorCode);
+ if(U_FAILURE(errorCode)) { return nullptr; }
return rootSingleton->tailoring;
}
const CollationData *
CollationRoot::getData(UErrorCode &errorCode) {
const CollationTailoring *root = getRoot(errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
return root->data;
}
const CollationSettings *
CollationRoot::getSettings(UErrorCode &errorCode) {
const CollationTailoring *root = getRoot(errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
return root->settings;
}
+void
+CollationRoot::forceLoadFromFile(const char* ucadataPath, UErrorCode &errorCode) {
+ umtx_initOnce(initOnce, CollationRoot::load, ucadataPath, errorCode);
+}
+
+
U_NAMESPACE_END
#endif // !UCONFIG_NO_COLLATION
diff --git a/contrib/libs/icu/i18n/collationroot.h b/contrib/libs/icu/i18n/collationroot.h
index 8cd3046cdf1..b203f612b35 100644
--- a/contrib/libs/icu/i18n/collationroot.h
+++ b/contrib/libs/icu/i18n/collationroot.h
@@ -15,6 +15,7 @@
#define __COLLATIONROOT_H__
#include "unicode/utypes.h"
+#include "unicode/udata.h"
#if !UCONFIG_NO_COLLATION
@@ -34,9 +35,11 @@ public:
static const CollationTailoring *getRoot(UErrorCode &errorCode);
static const CollationData *getData(UErrorCode &errorCode);
static const CollationSettings *getSettings(UErrorCode &errorCode);
+ static void U_EXPORT2 forceLoadFromFile(const char* ucadataPath, UErrorCode &errorCode);
private:
- static void U_CALLCONV load(UErrorCode &errorCode);
+ static void U_CALLCONV load(const char* ucadataPath, UErrorCode &errorCode);
+ static UDataMemory* loadFromFile(const char* ucadataPath, UErrorCode &errorCode);
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/collationruleparser.cpp b/contrib/libs/icu/i18n/collationruleparser.cpp
index ade6ecb552a..4cc25a1f5ce 100644
--- a/contrib/libs/icu/i18n/collationruleparser.cpp
+++ b/contrib/libs/icu/i18n/collationruleparser.cpp
@@ -40,7 +40,7 @@ U_NAMESPACE_BEGIN
namespace {
-static const UChar BEFORE[] = { 0x5b, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0 }; // "[before"
+static const char16_t BEFORE[] = { 0x5b, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0 }; // "[before"
const int32_t BEFORE_LENGTH = 7;
} // namespace
@@ -58,9 +58,9 @@ CollationRuleParser::Importer::~Importer() {}
CollationRuleParser::CollationRuleParser(const CollationData *base, UErrorCode &errorCode)
: nfd(*Normalizer2::getNFDInstance(errorCode)),
nfc(*Normalizer2::getNFCInstance(errorCode)),
- rules(NULL), baseData(base), settings(NULL),
- parseError(NULL), errorReason(NULL),
- sink(NULL), importer(NULL),
+ rules(nullptr), baseData(base), settings(nullptr),
+ parseError(nullptr), errorReason(nullptr),
+ sink(nullptr), importer(nullptr),
ruleIndex(0) {
}
@@ -75,13 +75,13 @@ CollationRuleParser::parse(const UnicodeString &ruleString,
if(U_FAILURE(errorCode)) { return; }
settings = &outSettings;
parseError = outParseError;
- if(parseError != NULL) {
+ if(parseError != nullptr) {
parseError->line = 0;
parseError->offset = -1;
parseError->preContext[0] = 0;
parseError->postContext[0] = 0;
}
- errorReason = NULL;
+ errorReason = nullptr;
parse(ruleString, errorCode);
}
@@ -92,7 +92,7 @@ CollationRuleParser::parse(const UnicodeString &ruleString, UErrorCode &errorCod
ruleIndex = 0;
while(ruleIndex < rules->length()) {
- UChar c = rules->charAt(ruleIndex);
+ char16_t c = rules->charAt(ruleIndex);
if(PatternProps::isWhiteSpace(c)) {
++ruleIndex;
continue;
@@ -128,7 +128,7 @@ CollationRuleParser::parse(const UnicodeString &ruleString, UErrorCode &errorCod
void
CollationRuleParser::parseRuleChain(UErrorCode &errorCode) {
int32_t resetStrength = parseResetAndPosition(errorCode);
- UBool isFirstRelation = TRUE;
+ UBool isFirstRelation = true;
for(;;) {
int32_t result = parseRelationOperator(errorCode);
if(U_FAILURE(errorCode)) { return; }
@@ -165,7 +165,7 @@ CollationRuleParser::parseRuleChain(UErrorCode &errorCode) {
parseStarredCharacters(strength, i, errorCode);
}
if(U_FAILURE(errorCode)) { return; }
- isFirstRelation = FALSE;
+ isFirstRelation = false;
}
}
@@ -174,7 +174,7 @@ CollationRuleParser::parseResetAndPosition(UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return UCOL_DEFAULT; }
int32_t i = skipWhiteSpace(ruleIndex + 1);
int32_t j;
- UChar c;
+ char16_t c;
int32_t resetStrength;
if(rules->compare(i, BEFORE_LENGTH, BEFORE, 0, BEFORE_LENGTH) == 0 &&
(j = i + BEFORE_LENGTH) < rules->length() &&
@@ -211,7 +211,7 @@ CollationRuleParser::parseRelationOperator(UErrorCode &errorCode) {
if(ruleIndex >= rules->length()) { return UCOL_DEFAULT; }
int32_t strength;
int32_t i = ruleIndex;
- UChar c = rules->charAt(i++);
+ char16_t c = rules->charAt(i++);
switch(c) {
case 0x3c: // '<'
if(i < rules->length() && rules->charAt(i) == 0x3c) { // <<
@@ -262,7 +262,7 @@ CollationRuleParser::parseRelationStrings(int32_t strength, int32_t i, UErrorCod
UnicodeString prefix, str, extension;
i = parseTailoringString(i, str, errorCode);
if(U_FAILURE(errorCode)) { return; }
- UChar next = (i < rules->length()) ? rules->charAt(i) : 0;
+ char16_t next = (i < rules->length()) ? rules->charAt(i) : 0;
if(next == 0x7c) { // '|' separates the context prefix from the string.
prefix = str;
i = parseTailoringString(i + 1, str, errorCode);
@@ -377,7 +377,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro
if(c == 0x27) { // apostrophe
if(i < rules->length() && rules->charAt(i) == 0x27) {
// Double apostrophe, encodes a single one.
- raw.append((UChar)0x27);
+ raw.append((char16_t)0x27);
++i;
continue;
}
@@ -397,7 +397,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro
break;
}
}
- raw.append((UChar)c);
+ raw.append((char16_t)c);
}
} else if(c == 0x5c) { // backslash
if(i == rules->length()) {
@@ -417,7 +417,7 @@ CollationRuleParser::parseString(int32_t i, UnicodeString &raw, UErrorCode &erro
--i;
break;
} else {
- raw.append((UChar)c);
+ raw.append((char16_t)c);
}
}
for(int32_t j = 0; j < raw.length();) {
@@ -465,16 +465,16 @@ CollationRuleParser::parseSpecialPosition(int32_t i, UnicodeString &str, UErrorC
++j;
for(int32_t pos = 0; pos < UPRV_LENGTHOF(positions); ++pos) {
if(raw == UnicodeString(positions[pos], -1, US_INV)) {
- str.setTo((UChar)POS_LEAD).append((UChar)(POS_BASE + pos));
+ str.setTo((char16_t)POS_LEAD).append((char16_t)(POS_BASE + pos));
return j;
}
}
if(raw == UNICODE_STRING_SIMPLE("top")) {
- str.setTo((UChar)POS_LEAD).append((UChar)(POS_BASE + LAST_REGULAR));
+ str.setTo((char16_t)POS_LEAD).append((char16_t)(POS_BASE + LAST_REGULAR));
return j;
}
if(raw == UNICODE_STRING_SIMPLE("variable top")) {
- str.setTo((UChar)POS_LEAD).append((UChar)(POS_BASE + LAST_VARIABLE));
+ str.setTo((char16_t)POS_LEAD).append((char16_t)(POS_BASE + LAST_VARIABLE));
return j;
}
}
@@ -506,14 +506,14 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) {
return;
}
UnicodeString v;
- int32_t valueIndex = raw.lastIndexOf((UChar)0x20);
+ int32_t valueIndex = raw.lastIndexOf((char16_t)0x20);
if(valueIndex >= 0) {
v.setTo(raw, valueIndex + 1);
raw.truncate(valueIndex);
}
if(raw == UNICODE_STRING_SIMPLE("strength") && v.length() == 1) {
int32_t value = UCOL_DEFAULT;
- UChar c = v.charAt(0);
+ char16_t c = v.charAt(0);
if(0x31 <= c && c <= 0x34) { // 1..4
value = UCOL_PRIMARY + (c - 0x31);
} else if(c == 0x49) { // 'I'
@@ -638,14 +638,14 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) {
setParseError("expected language tag in [import langTag]", errorCode);
return;
}
- if(importer == NULL) {
+ if(importer == nullptr) {
setParseError("[import langTag] is not supported", errorCode);
} else {
UnicodeString importedRules;
importer->getRules(baseID, length > 0 ? collationType : "standard",
importedRules, errorReason, errorCode);
if(U_FAILURE(errorCode)) {
- if(errorReason == NULL) {
+ if(errorReason == nullptr) {
errorReason = "[import langTag] failed";
}
setErrorContext();
@@ -655,7 +655,7 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) {
int32_t outerRuleIndex = ruleIndex;
parse(importedRules, errorCode);
if(U_FAILURE(errorCode)) {
- if(parseError != NULL) {
+ if(parseError != nullptr) {
parseError->offset = outerRuleIndex;
}
}
@@ -698,7 +698,7 @@ CollationRuleParser::parseReordering(const UnicodeString &raw, UErrorCode &error
CharString word;
while(i < raw.length()) {
++i; // skip the word-separating space
- int32_t limit = raw.indexOf((UChar)0x20, i);
+ int32_t limit = raw.indexOf((char16_t)0x20, i);
if(limit < 0) { limit = raw.length(); }
word.clear().appendInvariantChars(raw.tempSubStringBetween(i, limit), errorCode);
if(U_FAILURE(errorCode)) { return; }
@@ -756,7 +756,7 @@ CollationRuleParser::parseUnicodeSet(int32_t i, UnicodeSet &set, UErrorCode &err
setParseError("unbalanced UnicodeSet pattern brackets", errorCode);
return j;
}
- UChar c = rules->charAt(j++);
+ char16_t c = rules->charAt(j++);
if(c == 0x5b) { // '['
++level;
} else if(c == 0x5d) { // ']'
@@ -779,12 +779,12 @@ CollationRuleParser::parseUnicodeSet(int32_t i, UnicodeSet &set, UErrorCode &err
int32_t
CollationRuleParser::readWords(int32_t i, UnicodeString &raw) const {
- static const UChar sp = 0x20;
+ static const char16_t sp = 0x20;
raw.remove();
i = skipWhiteSpace(i);
for(;;) {
if(i >= rules->length()) { return 0; }
- UChar c = rules->charAt(i);
+ char16_t c = rules->charAt(i);
if(isSyntaxChar(c) && c != 0x2d && c != 0x5f) { // syntax except -_
if(raw.isEmpty()) { return i; }
if(raw.endsWith(&sp, 1)) { // remove trailing space
@@ -806,7 +806,7 @@ int32_t
CollationRuleParser::skipComment(int32_t i) const {
// skip to past the newline
while(i < rules->length()) {
- UChar c = rules->charAt(i++);
+ char16_t c = rules->charAt(i++);
// LF or FF or CR or NEL or LS or PS
if(c == 0xa || c == 0xc || c == 0xd || c == 0x85 || c == 0x2028 || c == 0x2029) {
// Unicode Newline Guidelines: "A readline function should stop at NLF, LS, FF, or PS."
@@ -825,12 +825,12 @@ CollationRuleParser::setParseError(const char *reason, UErrorCode &errorCode) {
// rather than U_PARSE_ERROR;
errorCode = U_INVALID_FORMAT_ERROR;
errorReason = reason;
- if(parseError != NULL) { setErrorContext(); }
+ if(parseError != nullptr) { setErrorContext(); }
}
void
CollationRuleParser::setErrorContext() {
- if(parseError == NULL) { return; }
+ if(parseError == nullptr) { return; }
// Note: This relies on the calling code maintaining the ruleIndex
// at a position that is useful for debugging.
diff --git a/contrib/libs/icu/i18n/collationruleparser.h b/contrib/libs/icu/i18n/collationruleparser.h
index e124881fcf0..aabdf03f57b 100644
--- a/contrib/libs/icu/i18n/collationruleparser.h
+++ b/contrib/libs/icu/i18n/collationruleparser.h
@@ -60,13 +60,13 @@ public:
*
* The second contraction character is POS_BASE + Position.
*/
- static const UChar POS_LEAD = 0xfffe;
+ static const char16_t POS_LEAD = 0xfffe;
/**
* Base for the second character of contractions that encode special reset positions.
* Braille characters U+28xx are printable and normalization-inert.
* @see POS_LEAD
*/
- static const UChar POS_BASE = 0x2800;
+ static const char16_t POS_BASE = 0x2800;
class U_I18N_API Sink : public UObject {
public:
diff --git a/contrib/libs/icu/i18n/collationsets.cpp b/contrib/libs/icu/i18n/collationsets.cpp
index 09581416a85..62e6a5d1806 100644
--- a/contrib/libs/icu/i18n/collationsets.cpp
+++ b/contrib/libs/icu/i18n/collationsets.cpp
@@ -34,7 +34,7 @@ U_CDECL_BEGIN
static UBool U_CALLCONV
enumTailoredRange(const void *context, UChar32 start, UChar32 end, uint32_t ce32) {
if(ce32 == Collation::FALLBACK_CE32) {
- return TRUE; // fallback to base, not tailored
+ return true; // fallback to base, not tailored
}
TailoredSet *ts = (TailoredSet *)context;
return ts->handleCE32(start, end, ce32);
@@ -48,8 +48,8 @@ TailoredSet::forData(const CollationData *d, UErrorCode &ec) {
errorCode = ec; // Preserve info & warning codes.
data = d;
baseData = d->base;
- U_ASSERT(baseData != NULL);
- utrie2_enum(data->trie, NULL, enumTailoredRange, this);
+ U_ASSERT(baseData != nullptr);
+ utrie2_enum(data->trie, nullptr, enumTailoredRange, this);
ec = errorCode;
}
@@ -82,30 +82,30 @@ TailoredSet::handleCE32(UChar32 start, UChar32 end, uint32_t ce32) {
void
TailoredSet::compare(UChar32 c, uint32_t ce32, uint32_t baseCE32) {
if(Collation::isPrefixCE32(ce32)) {
- const UChar *p = data->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = data->contexts + Collation::indexFromCE32(ce32);
ce32 = data->getFinalCE32(CollationData::readCE32(p));
if(Collation::isPrefixCE32(baseCE32)) {
- const UChar *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
+ const char16_t *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
baseCE32 = baseData->getFinalCE32(CollationData::readCE32(q));
comparePrefixes(c, p + 2, q + 2);
} else {
addPrefixes(data, c, p + 2);
}
} else if(Collation::isPrefixCE32(baseCE32)) {
- const UChar *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
+ const char16_t *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
baseCE32 = baseData->getFinalCE32(CollationData::readCE32(q));
addPrefixes(baseData, c, q + 2);
}
if(Collation::isContractionCE32(ce32)) {
- const UChar *p = data->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = data->contexts + Collation::indexFromCE32(ce32);
if((ce32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
ce32 = Collation::NO_CE32;
} else {
ce32 = data->getFinalCE32(CollationData::readCE32(p));
}
if(Collation::isContractionCE32(baseCE32)) {
- const UChar *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
+ const char16_t *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
if((baseCE32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
baseCE32 = Collation::NO_CE32;
} else {
@@ -116,7 +116,7 @@ TailoredSet::compare(UChar32 c, uint32_t ce32, uint32_t baseCE32) {
addContractions(c, p + 2);
}
} else if(Collation::isContractionCE32(baseCE32)) {
- const UChar *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
+ const char16_t *q = baseData->contexts + Collation::indexFromCE32(baseCE32);
baseCE32 = baseData->getFinalCE32(CollationData::readCE32(q));
addContractions(c, q + 2);
}
@@ -202,7 +202,7 @@ TailoredSet::compare(UChar32 c, uint32_t ce32, uint32_t baseCE32) {
}
}
} else if(tag == Collation::HANGUL_TAG) {
- UChar jamos[3];
+ char16_t jamos[3];
int32_t length = Hangul::decompose(c, jamos);
if(tailored->contains(jamos[0]) || tailored->contains(jamos[1]) ||
(length == 3 && tailored->contains(jamos[2]))) {
@@ -214,24 +214,24 @@ TailoredSet::compare(UChar32 c, uint32_t ce32, uint32_t baseCE32) {
}
void
-TailoredSet::comparePrefixes(UChar32 c, const UChar *p, const UChar *q) {
+TailoredSet::comparePrefixes(UChar32 c, const char16_t *p, const char16_t *q) {
// Parallel iteration over prefixes of both tables.
UCharsTrie::Iterator prefixes(p, 0, errorCode);
UCharsTrie::Iterator basePrefixes(q, 0, errorCode);
- const UnicodeString *tp = NULL; // Tailoring prefix.
- const UnicodeString *bp = NULL; // Base prefix.
+ const UnicodeString *tp = nullptr; // Tailoring prefix.
+ const UnicodeString *bp = nullptr; // Base prefix.
// Use a string with a U+FFFF as the limit sentinel.
// U+FFFF is untailorable and will not occur in prefixes.
- UnicodeString none((UChar)0xffff);
+ UnicodeString none((char16_t)0xffff);
for(;;) {
- if(tp == NULL) {
+ if(tp == nullptr) {
if(prefixes.next(errorCode)) {
tp = &prefixes.getString();
} else {
tp = &none;
}
}
- if(bp == NULL) {
+ if(bp == nullptr) {
if(basePrefixes.next(errorCode)) {
bp = &basePrefixes.getString();
} else {
@@ -243,42 +243,42 @@ TailoredSet::comparePrefixes(UChar32 c, const UChar *p, const UChar *q) {
if(cmp < 0) {
// tp occurs in the tailoring but not in the base.
addPrefix(data, *tp, c, (uint32_t)prefixes.getValue());
- tp = NULL;
+ tp = nullptr;
} else if(cmp > 0) {
// bp occurs in the base but not in the tailoring.
addPrefix(baseData, *bp, c, (uint32_t)basePrefixes.getValue());
- bp = NULL;
+ bp = nullptr;
} else {
setPrefix(*tp);
compare(c, (uint32_t)prefixes.getValue(), (uint32_t)basePrefixes.getValue());
resetPrefix();
- tp = NULL;
- bp = NULL;
+ tp = nullptr;
+ bp = nullptr;
}
}
}
void
-TailoredSet::compareContractions(UChar32 c, const UChar *p, const UChar *q) {
+TailoredSet::compareContractions(UChar32 c, const char16_t *p, const char16_t *q) {
// Parallel iteration over suffixes of both tables.
UCharsTrie::Iterator suffixes(p, 0, errorCode);
UCharsTrie::Iterator baseSuffixes(q, 0, errorCode);
- const UnicodeString *ts = NULL; // Tailoring suffix.
- const UnicodeString *bs = NULL; // Base suffix.
+ const UnicodeString *ts = nullptr; // Tailoring suffix.
+ const UnicodeString *bs = nullptr; // Base suffix.
// Use a string with two U+FFFF as the limit sentinel.
// U+FFFF is untailorable and will not occur in contractions except maybe
// as a single suffix character for a root-collator boundary contraction.
- UnicodeString none((UChar)0xffff);
- none.append((UChar)0xffff);
+ UnicodeString none((char16_t)0xffff);
+ none.append((char16_t)0xffff);
for(;;) {
- if(ts == NULL) {
+ if(ts == nullptr) {
if(suffixes.next(errorCode)) {
ts = &suffixes.getString();
} else {
ts = &none;
}
}
- if(bs == NULL) {
+ if(bs == nullptr) {
if(baseSuffixes.next(errorCode)) {
bs = &baseSuffixes.getString();
} else {
@@ -290,23 +290,23 @@ TailoredSet::compareContractions(UChar32 c, const UChar *p, const UChar *q) {
if(cmp < 0) {
// ts occurs in the tailoring but not in the base.
addSuffix(c, *ts);
- ts = NULL;
+ ts = nullptr;
} else if(cmp > 0) {
// bs occurs in the base but not in the tailoring.
addSuffix(c, *bs);
- bs = NULL;
+ bs = nullptr;
} else {
suffix = ts;
compare(c, (uint32_t)suffixes.getValue(), (uint32_t)baseSuffixes.getValue());
- suffix = NULL;
- ts = NULL;
- bs = NULL;
+ suffix = nullptr;
+ ts = nullptr;
+ bs = nullptr;
}
}
}
void
-TailoredSet::addPrefixes(const CollationData *d, UChar32 c, const UChar *p) {
+TailoredSet::addPrefixes(const CollationData *d, UChar32 c, const char16_t *p) {
UCharsTrie::Iterator prefixes(p, 0, errorCode);
while(prefixes.next(errorCode)) {
addPrefix(d, prefixes.getString(), c, (uint32_t)prefixes.getValue());
@@ -318,7 +318,7 @@ TailoredSet::addPrefix(const CollationData *d, const UnicodeString &pfx, UChar32
setPrefix(pfx);
ce32 = d->getFinalCE32(ce32);
if(Collation::isContractionCE32(ce32)) {
- const UChar *p = d->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = d->contexts + Collation::indexFromCE32(ce32);
addContractions(c, p + 2);
}
tailored->add(UnicodeString(unreversedPrefix).append(c));
@@ -326,7 +326,7 @@ TailoredSet::addPrefix(const CollationData *d, const UnicodeString &pfx, UChar32
}
void
-TailoredSet::addContractions(UChar32 c, const UChar *p) {
+TailoredSet::addContractions(UChar32 c, const char16_t *p) {
UCharsTrie::Iterator suffixes(p, 0, errorCode);
while(suffixes.next(errorCode)) {
addSuffix(c, suffixes.getString());
@@ -340,12 +340,12 @@ TailoredSet::addSuffix(UChar32 c, const UnicodeString &sfx) {
void
TailoredSet::add(UChar32 c) {
- if(unreversedPrefix.isEmpty() && suffix == NULL) {
+ if(unreversedPrefix.isEmpty() && suffix == nullptr) {
tailored->add(c);
} else {
UnicodeString s(unreversedPrefix);
s.append(c);
- if(suffix != NULL) {
+ if(suffix != nullptr) {
s.append(*suffix);
}
tailored->add(s);
@@ -365,14 +365,14 @@ enumCnERange(const void *context, UChar32 start, UChar32 end, uint32_t ce32) {
} else if(cne->checkTailored < 0) {
// Collect the set of code points with mappings in the tailoring data.
if(ce32 == Collation::FALLBACK_CE32) {
- return TRUE; // fallback to base, not tailored
+ return true; // fallback to base, not tailored
} else {
cne->tailored.add(start, end);
}
// checkTailored > 0: Exclude tailored ranges from the base data enumeration.
} else if(start == end) {
if(cne->tailored.contains(start)) {
- return TRUE;
+ return true;
}
} else if(cne->tailored.containsSome(start, end)) {
cne->ranges.set(start, end).removeAll(cne->tailored);
@@ -393,12 +393,12 @@ ContractionsAndExpansions::forData(const CollationData *d, UErrorCode &ec) {
if(U_FAILURE(ec)) { return; }
errorCode = ec; // Preserve info & warning codes.
// Add all from the data, can be tailoring or base.
- if(d->base != NULL) {
+ if(d->base != nullptr) {
checkTailored = -1;
}
data = d;
- utrie2_enum(data->trie, NULL, enumCnERange, this);
- if(d->base == NULL || U_FAILURE(errorCode)) {
+ utrie2_enum(data->trie, nullptr, enumCnERange, this);
+ if(d->base == nullptr || U_FAILURE(errorCode)) {
ec = errorCode;
return;
}
@@ -406,7 +406,7 @@ ContractionsAndExpansions::forData(const CollationData *d, UErrorCode &ec) {
tailored.freeze();
checkTailored = 1;
data = d->base;
- utrie2_enum(data->trie, NULL, enumCnERange, this);
+ utrie2_enum(data->trie, nullptr, enumCnERange, this);
ec = errorCode;
}
@@ -429,7 +429,7 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32)
for(;;) {
if((ce32 & 0xff) < Collation::SPECIAL_CE32_LOW_BYTE) {
// !isSpecialCE32()
- if(sink != NULL) {
+ if(sink != nullptr) {
sink->handleCE(Collation::ceFromSimpleCE32(ce32));
}
return;
@@ -443,17 +443,17 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32)
if(U_SUCCESS(errorCode)) { errorCode = U_INTERNAL_PROGRAM_ERROR; }
return;
case Collation::LONG_PRIMARY_TAG:
- if(sink != NULL) {
+ if(sink != nullptr) {
sink->handleCE(Collation::ceFromLongPrimaryCE32(ce32));
}
return;
case Collation::LONG_SECONDARY_TAG:
- if(sink != NULL) {
+ if(sink != nullptr) {
sink->handleCE(Collation::ceFromLongSecondaryCE32(ce32));
}
return;
case Collation::LATIN_EXPANSION_TAG:
- if(sink != NULL) {
+ if(sink != nullptr) {
ces[0] = Collation::latinCE0FromCE32(ce32);
ces[1] = Collation::latinCE1FromCE32(ce32);
sink->handleExpansion(ces, 2);
@@ -465,7 +465,7 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32)
}
return;
case Collation::EXPANSION32_TAG:
- if(sink != NULL) {
+ if(sink != nullptr) {
const uint32_t *ce32s = data->ce32s + Collation::indexFromCE32(ce32);
int32_t length = Collation::lengthFromCE32(ce32);
for(int32_t i = 0; i < length; ++i) {
@@ -480,7 +480,7 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32)
}
return;
case Collation::EXPANSION_TAG:
- if(sink != NULL) {
+ if(sink != nullptr) {
int32_t length = Collation::lengthFromCE32(ce32);
sink->handleExpansion(data->ces + Collation::indexFromCE32(ce32), length);
}
@@ -506,13 +506,13 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32)
ce32 = data->ce32s[0];
break;
case Collation::HANGUL_TAG:
- if(sink != NULL) {
+ if(sink != nullptr) {
// TODO: This should be optimized,
// especially if [start..end] is the complete Hangul range. (assert that)
- UTF16CollationIterator iter(data, FALSE, NULL, NULL, NULL);
- UChar hangul[1] = { 0 };
+ UTF16CollationIterator iter(data, false, nullptr, nullptr, nullptr);
+ char16_t hangul[1] = { 0 };
for(UChar32 c = start; c <= end; ++c) {
- hangul[0] = (UChar)c;
+ hangul[0] = (char16_t)c;
iter.setText(hangul, hangul + 1);
int32_t length = iter.fetchCEs(errorCode);
if(U_FAILURE(errorCode)) { return; }
@@ -540,7 +540,7 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32)
void
ContractionsAndExpansions::handlePrefixes(
UChar32 start, UChar32 end, uint32_t ce32) {
- const UChar *p = data->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = data->contexts + Collation::indexFromCE32(ce32);
ce32 = CollationData::readCE32(p); // Default if no prefix match.
handleCE32(start, end, ce32);
if(!addPrefixes) { return; }
@@ -559,7 +559,7 @@ ContractionsAndExpansions::handlePrefixes(
void
ContractionsAndExpansions::handleContractions(
UChar32 start, UChar32 end, uint32_t ce32) {
- const UChar *p = data->contexts + Collation::indexFromCE32(ce32);
+ const char16_t *p = data->contexts + Collation::indexFromCE32(ce32);
if((ce32 & Collation::CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
// No match on the single code point.
// We are underneath a prefix, and the default mapping is just
@@ -579,13 +579,13 @@ ContractionsAndExpansions::handleContractions(
}
handleCE32(start, end, (uint32_t)suffixes.getValue());
}
- suffix = NULL;
+ suffix = nullptr;
}
void
ContractionsAndExpansions::addExpansions(UChar32 start, UChar32 end) {
- if(unreversedPrefix.isEmpty() && suffix == NULL) {
- if(expansions != NULL) {
+ if(unreversedPrefix.isEmpty() && suffix == nullptr) {
+ if(expansions != nullptr) {
expansions->add(start, end);
}
} else {
@@ -595,11 +595,11 @@ ContractionsAndExpansions::addExpansions(UChar32 start, UChar32 end) {
void
ContractionsAndExpansions::addStrings(UChar32 start, UChar32 end, UnicodeSet *set) {
- if(set == NULL) { return; }
+ if(set == nullptr) { return; }
UnicodeString s(unreversedPrefix);
do {
s.append(start);
- if(suffix != NULL) {
+ if(suffix != nullptr) {
s.append(*suffix);
}
set->add(s);
diff --git a/contrib/libs/icu/i18n/collationsets.h b/contrib/libs/icu/i18n/collationsets.h
index aed41f7ac8d..99aa194e762 100644
--- a/contrib/libs/icu/i18n/collationsets.h
+++ b/contrib/libs/icu/i18n/collationsets.h
@@ -43,9 +43,9 @@ struct CollationData;
class TailoredSet : public UMemory {
public:
TailoredSet(UnicodeSet *t)
- : data(NULL), baseData(NULL),
+ : data(nullptr), baseData(nullptr),
tailored(t),
- suffix(NULL),
+ suffix(nullptr),
errorCode(U_ZERO_ERROR) {}
void forData(const CollationData *d, UErrorCode &errorCode);
@@ -58,12 +58,12 @@ public:
private:
void compare(UChar32 c, uint32_t ce32, uint32_t baseCE32);
- void comparePrefixes(UChar32 c, const UChar *p, const UChar *q);
- void compareContractions(UChar32 c, const UChar *p, const UChar *q);
+ void comparePrefixes(UChar32 c, const char16_t *p, const char16_t *q);
+ void compareContractions(UChar32 c, const char16_t *p, const char16_t *q);
- void addPrefixes(const CollationData *d, UChar32 c, const UChar *p);
+ void addPrefixes(const CollationData *d, UChar32 c, const char16_t *p);
void addPrefix(const CollationData *d, const UnicodeString &pfx, UChar32 c, uint32_t ce32);
- void addContractions(UChar32 c, const UChar *p);
+ void addContractions(UChar32 c, const char16_t *p);
void addSuffix(UChar32 c, const UnicodeString &sfx);
void add(UChar32 c);
@@ -94,12 +94,12 @@ public:
};
ContractionsAndExpansions(UnicodeSet *con, UnicodeSet *exp, CESink *s, UBool prefixes)
- : data(NULL),
+ : data(nullptr),
contractions(con), expansions(exp),
sink(s),
addPrefixes(prefixes),
checkTailored(0),
- suffix(NULL),
+ suffix(nullptr),
errorCode(U_ZERO_ERROR) {}
void forData(const CollationData *d, UErrorCode &errorCode);
diff --git a/contrib/libs/icu/i18n/collationsettings.cpp b/contrib/libs/icu/i18n/collationsettings.cpp
index 9eeab483310..1533daf38c7 100644
--- a/contrib/libs/icu/i18n/collationsettings.cpp
+++ b/contrib/libs/icu/i18n/collationsettings.cpp
@@ -30,10 +30,10 @@ U_NAMESPACE_BEGIN
CollationSettings::CollationSettings(const CollationSettings &other)
: SharedObject(other),
options(other.options), variableTop(other.variableTop),
- reorderTable(NULL),
+ reorderTable(nullptr),
minHighNoReorder(other.minHighNoReorder),
- reorderRanges(NULL), reorderRangesLength(0),
- reorderCodes(NULL), reorderCodesLength(0), reorderCodesCapacity(0),
+ reorderRanges(nullptr), reorderRangesLength(0),
+ reorderCodes(nullptr), reorderCodesLength(0), reorderCodesCapacity(0),
fastLatinOptions(other.fastLatinOptions) {
UErrorCode errorCode = U_ZERO_ERROR;
copyReorderingFrom(other, errorCode);
@@ -72,10 +72,10 @@ CollationSettings::hashCode() const {
void
CollationSettings::resetReordering() {
- // When we turn off reordering, we want to set a NULL permutation
+ // When we turn off reordering, we want to set a nullptr permutation
// rather than a no-op permutation.
// Keep the memory via reorderCodes and its capacity.
- reorderTable = NULL;
+ reorderTable = nullptr;
minHighNoReorder = 0;
reorderRangesLength = 0;
reorderCodesLength = 0;
@@ -86,7 +86,7 @@ CollationSettings::aliasReordering(const CollationData &data, const int32_t *cod
const uint32_t *ranges, int32_t rangesLength,
const uint8_t *table, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- if(table != NULL &&
+ if(table != nullptr &&
(rangesLength == 0 ?
!reorderTableHasSplitBytes(table) :
rangesLength >= 2 &&
@@ -111,7 +111,7 @@ CollationSettings::aliasReordering(const CollationData &data, const int32_t *cod
if(firstSplitByteRangeIndex == rangesLength) {
U_ASSERT(!reorderTableHasSplitBytes(table));
minHighNoReorder = 0;
- reorderRanges = NULL;
+ reorderRanges = nullptr;
reorderRangesLength = 0;
} else {
U_ASSERT(table[ranges[firstSplitByteRangeIndex] >> 24] == 0);
@@ -201,7 +201,7 @@ CollationSettings::setReorderArrays(const int32_t *codes, int32_t codesLength,
// Allocate one memory block for the codes, the ranges, and the 16-aligned table.
int32_t capacity = (totalLength + 3) & ~3; // round up to a multiple of 4 ints
ownedCodes = (int32_t *)uprv_malloc(capacity * 4 + 256);
- if(ownedCodes == NULL) {
+ if(ownedCodes == nullptr) {
resetReordering();
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -248,10 +248,10 @@ CollationSettings::reorderTableHasSplitBytes(const uint8_t table[256]) {
U_ASSERT(table[0] == 0);
for(int32_t i = 1; i < 256; ++i) {
if(table[i] == 0) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
uint32_t
diff --git a/contrib/libs/icu/i18n/collationsettings.h b/contrib/libs/icu/i18n/collationsettings.h
index 3da8f6214f6..43a181211c0 100644
--- a/contrib/libs/icu/i18n/collationsettings.h
+++ b/contrib/libs/icu/i18n/collationsettings.h
@@ -106,10 +106,10 @@ struct U_I18N_API CollationSettings : public SharedObject {
: options((UCOL_DEFAULT_STRENGTH << STRENGTH_SHIFT) |
(MAX_VAR_PUNCT << MAX_VARIABLE_SHIFT)),
variableTop(0),
- reorderTable(NULL),
+ reorderTable(nullptr),
minHighNoReorder(0),
- reorderRanges(NULL), reorderRangesLength(0),
- reorderCodes(NULL), reorderCodesLength(0), reorderCodesCapacity(0),
+ reorderRanges(nullptr), reorderRangesLength(0),
+ reorderCodes(nullptr), reorderCodesLength(0), reorderCodesCapacity(0),
fastLatinOptions(-1) {}
CollationSettings(const CollationSettings &other);
@@ -131,7 +131,7 @@ struct U_I18N_API CollationSettings : public SharedObject {
UErrorCode &errorCode);
void copyReorderingFrom(const CollationSettings &other, UErrorCode &errorCode);
- inline UBool hasReordering() const { return reorderTable != NULL; }
+ inline UBool hasReordering() const { return reorderTable != nullptr; }
static UBool reorderTableHasSplitBytes(const uint8_t table[256]);
inline uint32_t reorder(uint32_t p) const {
uint8_t b = reorderTable[p >> 24];
@@ -216,7 +216,7 @@ struct U_I18N_API CollationSettings : public SharedObject {
/** Variable-top primary weight. */
uint32_t variableTop;
/**
- * 256-byte table for reordering permutation of primary lead bytes; NULL if no reordering.
+ * 256-byte table for reordering permutation of primary lead bytes; nullptr if no reordering.
* A 0 entry at a non-zero index means that the primary lead byte is "split"
* (there are different offsets for primaries that share that lead byte)
* and the reordering offset must be determined via the reorderRanges.
diff --git a/contrib/libs/icu/i18n/collationtailoring.cpp b/contrib/libs/icu/i18n/collationtailoring.cpp
index 78a11fbb26b..8d22cf25166 100644
--- a/contrib/libs/icu/i18n/collationtailoring.cpp
+++ b/contrib/libs/icu/i18n/collationtailoring.cpp
@@ -33,20 +33,20 @@
U_NAMESPACE_BEGIN
CollationTailoring::CollationTailoring(const CollationSettings *baseSettings)
- : data(NULL), settings(baseSettings),
+ : data(nullptr), settings(baseSettings),
actualLocale(""),
- ownedData(NULL),
- builder(NULL), memory(NULL), bundle(NULL),
- trie(NULL), unsafeBackwardSet(NULL),
- maxExpansions(NULL) {
- if(baseSettings != NULL) {
+ ownedData(nullptr),
+ builder(nullptr), memory(nullptr), bundle(nullptr),
+ trie(nullptr), unsafeBackwardSet(nullptr),
+ maxExpansions(nullptr) {
+ if(baseSettings != nullptr) {
U_ASSERT(baseSettings->reorderCodesLength == 0);
- U_ASSERT(baseSettings->reorderTable == NULL);
+ U_ASSERT(baseSettings->reorderTable == nullptr);
U_ASSERT(baseSettings->minHighNoReorder == 0);
} else {
settings = new CollationSettings();
}
- if(settings != NULL) {
+ if(settings != nullptr) {
settings->addRef();
}
rules.getTerminatedBuffer(); // ensure NUL-termination
@@ -68,18 +68,18 @@ CollationTailoring::~CollationTailoring() {
UBool
CollationTailoring::ensureOwnedData(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
- if(ownedData == NULL) {
+ if(U_FAILURE(errorCode)) { return false; }
+ if(ownedData == nullptr) {
const Normalizer2Impl *nfcImpl = Normalizer2Factory::getNFCImpl(errorCode);
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
ownedData = new CollationData(*nfcImpl);
- if(ownedData == NULL) {
+ if(ownedData == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
}
data = ownedData;
- return TRUE;
+ return true;
}
void
diff --git a/contrib/libs/icu/i18n/collationtailoring.h b/contrib/libs/icu/i18n/collationtailoring.h
index 5fc2bac2d30..ed7e46e3b9c 100644
--- a/contrib/libs/icu/i18n/collationtailoring.h
+++ b/contrib/libs/icu/i18n/collationtailoring.h
@@ -24,6 +24,8 @@
#include "collationsettings.h"
#include "uhash.h"
#include "umutex.h"
+#include "unifiedcache.h"
+
struct UDataMemory;
struct UResourceBundle;
@@ -52,7 +54,7 @@ struct U_I18N_API CollationTailoring : public SharedObject {
/**
* Returns true if the constructor could not initialize properly.
*/
- UBool isBogus() { return settings == NULL; }
+ UBool isBogus() { return settings == nullptr; }
UBool ensureOwnedData(UErrorCode &errorCode);
@@ -89,13 +91,13 @@ private:
* No copy constructor: A CollationTailoring cannot be copied.
* It is immutable, and the data trie cannot be copied either.
*/
- CollationTailoring(const CollationTailoring &other);
+ CollationTailoring(const CollationTailoring &other) = delete;
};
struct U_I18N_API CollationCacheEntry : public SharedObject {
CollationCacheEntry(const Locale &loc, const CollationTailoring *t)
: validLocale(loc), tailoring(t) {
- if(t != NULL) {
+ if(t != nullptr) {
t->addRef();
}
}
@@ -105,6 +107,10 @@ struct U_I18N_API CollationCacheEntry : public SharedObject {
const CollationTailoring *tailoring;
};
+template<> U_I18N_API
+const CollationCacheEntry *
+LocaleCacheKey<CollationCacheEntry>::createObject(const void *creationContext,
+ UErrorCode &errorCode) const;
U_NAMESPACE_END
#endif // !UCONFIG_NO_COLLATION
diff --git a/contrib/libs/icu/i18n/collationweights.cpp b/contrib/libs/icu/i18n/collationweights.cpp
index 05458962c6d..2351484590c 100644
--- a/contrib/libs/icu/i18n/collationweights.cpp
+++ b/contrib/libs/icu/i18n/collationweights.cpp
@@ -227,7 +227,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) {
#ifdef UCOL_DEBUG
printf("error: no space between lower & upper limits\n");
#endif
- return FALSE;
+ return false;
}
/* check that neither is a prefix of the other */
@@ -236,7 +236,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) {
#ifdef UCOL_DEBUG
printf("error: lower limit 0x%08lx is a prefix of upper limit 0x%08lx\n", lowerLimit, upperLimit);
#endif
- return FALSE;
+ return false;
}
}
/* if the upper limit is a prefix of the lower limit then the earlier test lowerLimit>=upperLimit has caught it */
@@ -307,7 +307,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) {
// maxByte (for lowerEnd) or minByte (for upperStart).
const uint32_t lowerEnd=lower[length].end;
const uint32_t upperStart=upper[length].start;
- UBool merged=FALSE;
+ UBool merged=false;
if(lowerEnd>upperStart) {
// These two lower and upper ranges collide.
@@ -326,7 +326,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) {
(int32_t)getWeightTrail(lower[length].start, length)+1;
// count might be <=0 in which case there is no room,
// and the range-collecting code below will ignore this range.
- merged=TRUE;
+ merged=true;
} else if(lowerEnd==upperStart) {
// Not possible, unless minByte==maxByte which is not allowed.
U_ASSERT(minBytes[length]<maxBytes[length]);
@@ -335,7 +335,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) {
// Merge adjacent ranges.
lower[length].end=upper[length].end;
lower[length].count+=upper[length].count; // might be >countBytes
- merged=TRUE;
+ merged=true;
}
}
if(merged) {
@@ -409,14 +409,14 @@ CollationWeights::allocWeightsInShortRanges(int32_t n, int32_t minLength) {
/* sort the ranges by weight values */
UErrorCode errorCode=U_ZERO_ERROR;
uprv_sortArray(ranges, rangeCount, sizeof(WeightRange),
- compareRanges, NULL, FALSE, &errorCode);
+ compareRanges, nullptr, false, &errorCode);
/* ignore error code: we know that the internal sort function will not fail here */
}
- return TRUE;
+ return true;
}
n -= ranges[i].count; // still >0
}
- return FALSE;
+ return false;
}
UBool
@@ -433,7 +433,7 @@ CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) {
}
int32_t nextCountBytes = countBytes(minLength + 1);
- if(n > count * nextCountBytes) { return FALSE; }
+ if(n > count * nextCountBytes) { return false; }
// Use the minLength ranges. Merge them, and then split again as necessary.
uint32_t start = ranges[0].start;
@@ -485,7 +485,7 @@ CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) {
lengthenRange(ranges[1]);
rangeCount = 2;
}
- return TRUE;
+ return true;
}
/*
@@ -503,7 +503,7 @@ CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t
#ifdef UCOL_DEBUG
printf("error: unable to get Weight ranges\n");
#endif
- return FALSE;
+ return false;
}
/* try until we find suitably large ranges */
@@ -518,7 +518,7 @@ CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t
printf("error: the maximum number of %ld weights is insufficient for n=%ld\n",
minLengthCount, n);
#endif
- return FALSE;
+ return false;
}
if(allocWeightsInMinLengthRanges(n, minLength)) { break; }
@@ -541,7 +541,7 @@ CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t
#endif
rangeIndex = 0;
- return TRUE;
+ return true;
}
uint32_t
diff --git a/contrib/libs/icu/i18n/coptccal.cpp b/contrib/libs/icu/i18n/coptccal.cpp
index 9c2b1ebbb7f..a957f8f2c56 100644
--- a/contrib/libs/icu/i18n/coptccal.cpp
+++ b/contrib/libs/icu/i18n/coptccal.cpp
@@ -92,10 +92,28 @@ CopticCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/)
internalSet(UCAL_ERA, era);
internalSet(UCAL_YEAR, year);
internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
internalSet(UCAL_DATE, day);
internalSet(UCAL_DAY_OF_YEAR, (30 * month) + day);
}
+constexpr uint32_t kCopticRelatedYearDiff = 284;
+
+int32_t CopticCalendar::getRelatedYear(UErrorCode &status) const
+{
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return year + kCopticRelatedYearDiff;
+}
+
+void CopticCalendar::setRelatedYear(int32_t year)
+{
+ // set extended 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
@@ -103,7 +121,7 @@ CopticCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/)
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
static void U_CALLCONV initializeSystemDefaultCentury() {
diff --git a/contrib/libs/icu/i18n/coptccal.h b/contrib/libs/icu/i18n/coptccal.h
index 5c51af04ca0..396127e8adb 100644
--- a/contrib/libs/icu/i18n/coptccal.h
+++ b/contrib/libs/icu/i18n/coptccal.h
@@ -154,6 +154,20 @@ public:
*/
const char * getType() const override;
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
+
+ /**
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual void setRelatedYear(int32_t year) override;
+
protected:
//-------------------------------------------------------------------------
// Calendar framework
@@ -202,7 +216,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -215,7 +229,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
#if 0
// We do not want to introduce this API in ICU4C.
diff --git a/contrib/libs/icu/i18n/cpdtrans.cpp b/contrib/libs/icu/i18n/cpdtrans.cpp
index dc0217ba612..9b103646891 100644
--- a/contrib/libs/icu/i18n/cpdtrans.cpp
+++ b/contrib/libs/icu/i18n/cpdtrans.cpp
@@ -22,15 +22,15 @@
#include "cmemory.h"
// keep in sync with Transliterator
-//static const UChar ID_SEP = 0x002D; /*-*/
-static const UChar ID_DELIM = 0x003B; /*;*/
-static const UChar NEWLINE = 10;
+//static const char16_t ID_SEP = 0x002D; /*-*/
+static const char16_t ID_DELIM = 0x003B; /*;*/
+static const char16_t NEWLINE = 10;
-static const UChar COLON_COLON[] = {0x3A, 0x3A, 0}; //"::"
+static const char16_t COLON_COLON[] = {0x3A, 0x3A, 0}; //"::"
U_NAMESPACE_BEGIN
-const UChar CompoundTransliterator::PASS_STRING[] = { 0x0025, 0x0050, 0x0061, 0x0073, 0x0073, 0 }; // "%Pass"
+const char16_t CompoundTransliterator::PASS_STRING[] = { 0x0025, 0x0050, 0x0061, 0x0073, 0x0073, 0 }; // "%Pass"
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CompoundTransliterator)
@@ -73,7 +73,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& id,
trans(0), numAnonymousRBTs(0) {
// TODO add code for parseError...currently unused, but
// later may be used by parsing code...
- init(id, direction, TRUE, status);
+ init(id, direction, true, status);
}
CompoundTransliterator::CompoundTransliterator(const UnicodeString& id,
@@ -83,7 +83,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& id,
trans(0), numAnonymousRBTs(0) {
// TODO add code for parseError...currently unused, but
// later may be used by parsing code...
- init(id, UTRANS_FORWARD, TRUE, status);
+ init(id, UTRANS_FORWARD, true, status);
}
@@ -99,7 +99,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& newID,
Transliterator(newID, adoptedFilter),
trans(0), numAnonymousRBTs(anonymousRBTs)
{
- init(list, UTRANS_FORWARD, FALSE, status);
+ init(list, UTRANS_FORWARD, false, status);
}
/**
@@ -110,12 +110,12 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& newID,
CompoundTransliterator::CompoundTransliterator(UVector& list,
UParseError& /*parseError*/,
UErrorCode& status) :
- Transliterator(UnicodeString(), NULL),
+ Transliterator(UnicodeString(), nullptr),
trans(0), numAnonymousRBTs(0)
{
// TODO add code for parseError...currently unused, but
// later may be used by parsing code...
- init(list, UTRANS_FORWARD, FALSE, status);
+ init(list, UTRANS_FORWARD, false, status);
// assume caller will fixup ID
}
@@ -123,15 +123,15 @@ CompoundTransliterator::CompoundTransliterator(UVector& list,
int32_t anonymousRBTs,
UParseError& /*parseError*/,
UErrorCode& status) :
- Transliterator(UnicodeString(), NULL),
+ Transliterator(UnicodeString(), nullptr),
trans(0), numAnonymousRBTs(anonymousRBTs)
{
- init(list, UTRANS_FORWARD, FALSE, status);
+ init(list, UTRANS_FORWARD, false, status);
}
/**
* Finish constructing a transliterator: only to be called by
- * constructors. Before calling init(), set trans and filter to NULL.
+ * constructors. Before calling init(), set trans and filter to nullptr.
* @param id the id containing ';'-separated entries
* @param direction either FORWARD or REVERSE
* @param idSplitPoint the index into id at which the
@@ -139,8 +139,8 @@ CompoundTransliterator::CompoundTransliterator(UVector& list,
* -1 if there is none.
* @param adoptedSplitTransliterator a transliterator to be inserted
* before the entry at offset idSplitPoint in the id string. May be
- * NULL to insert no entry.
- * @param fixReverseID if TRUE, then reconstruct the ID of reverse
+ * nullptr to insert no entry.
+ * @param fixReverseID if true, then reconstruct the ID of reverse
* entries by calling getID() of component entries. Some constructors
* do not require this because they apply a facade ID anyway.
* @param status the error code indicating success or failure
@@ -156,7 +156,7 @@ void CompoundTransliterator::init(const UnicodeString& id,
}
UVector list(status);
- UnicodeSet* compoundFilter = NULL;
+ UnicodeSet* compoundFilter = nullptr;
UnicodeString regenID;
if (!TransliteratorIDParser::parseCompoundID(id, direction,
regenID, list, compoundFilter)) {
@@ -169,20 +169,20 @@ void CompoundTransliterator::init(const UnicodeString& id,
init(list, direction, fixReverseID, status);
- if (compoundFilter != NULL) {
+ if (compoundFilter != nullptr) {
adoptFilter(compoundFilter);
}
}
/**
* Finish constructing a transliterator: only to be called by
- * constructors. Before calling init(), set trans and filter to NULL.
+ * constructors. Before calling init(), set trans and filter to nullptr.
* @param list a vector of transliterator objects to be adopted. It
* should NOT be empty. The list should be in declared order. That
* is, it should be in the FORWARD order; if direction is REVERSE then
* the list order will be reversed.
* @param direction either FORWARD or REVERSE
- * @param fixReverseID if TRUE, then reconstruct the ID of reverse
+ * @param fixReverseID if true, then reconstruct the ID of reverse
* entries by calling getID() of component entries. Some constructors
* do not require this because they apply a facade ID anyway.
* @param status the error code indicating success or failure
@@ -197,7 +197,7 @@ void CompoundTransliterator::init(UVector& list,
if (U_SUCCESS(status)) {
count = list.size();
trans = (Transliterator **)uprv_malloc(count * sizeof(Transliterator *));
- /* test for NULL */
+ /* test for nullptr */
if (trans == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -265,7 +265,7 @@ CompoundTransliterator::~CompoundTransliterator() {
freeTransliterators();
}
-void CompoundTransliterator::freeTransliterators(void) {
+void CompoundTransliterator::freeTransliterators() {
if (trans != 0) {
for (int32_t i=0; i<count; ++i) {
delete trans[i];
@@ -285,25 +285,25 @@ CompoundTransliterator& CompoundTransliterator::operator=(
if (this == &t) { return *this; } // self-assignment: no-op
Transliterator::operator=(t);
int32_t i = 0;
- UBool failed = FALSE;
- if (trans != NULL) {
+ UBool failed = false;
+ if (trans != nullptr) {
for (i=0; i<count; ++i) {
delete trans[i];
trans[i] = 0;
}
}
if (t.count > count) {
- if (trans != NULL) {
+ if (trans != nullptr) {
uprv_free(trans);
}
trans = (Transliterator **)uprv_malloc(t.count * sizeof(Transliterator *));
}
count = t.count;
- if (trans != NULL) {
+ if (trans != nullptr) {
for (i=0; i<count; ++i) {
trans[i] = t.trans[i]->clone();
- if (trans[i] == NULL) {
- failed = TRUE;
+ if (trans[i] == nullptr) {
+ failed = true;
break;
}
}
@@ -314,7 +314,7 @@ CompoundTransliterator& CompoundTransliterator::operator=(
int32_t n;
for (n = i-1; n >= 0; n--) {
uprv_free(trans[n]);
- trans[n] = NULL;
+ trans[n] = nullptr;
}
}
numAnonymousRBTs = t.numAnonymousRBTs;
@@ -332,7 +332,7 @@ CompoundTransliterator* CompoundTransliterator::clone() const {
* Returns the number of transliterators in this chain.
* @return number of transliterators in this chain.
*/
-int32_t CompoundTransliterator::getCount(void) const {
+int32_t CompoundTransliterator::getCount() const {
return count;
}
@@ -348,15 +348,15 @@ const Transliterator& CompoundTransliterator::getTransliterator(int32_t index) c
void CompoundTransliterator::setTransliterators(Transliterator* const transliterators[],
int32_t transCount) {
Transliterator** a = (Transliterator **)uprv_malloc(transCount * sizeof(Transliterator *));
- if (a == NULL) {
+ if (a == nullptr) {
return;
}
int32_t i = 0;
- UBool failed = FALSE;
+ UBool failed = false;
for (i=0; i<transCount; ++i) {
a[i] = transliterators[i]->clone();
- if (a[i] == NULL) {
- failed = TRUE;
+ if (a[i] == nullptr) {
+ failed = true;
break;
}
}
@@ -364,7 +364,7 @@ void CompoundTransliterator::setTransliterators(Transliterator* const transliter
int32_t n;
for (n = i-1; n >= 0; n--) {
uprv_free(a[n]);
- a[n] = NULL;
+ a[n] = nullptr;
}
return;
}
@@ -385,7 +385,7 @@ void CompoundTransliterator::adoptTransliterators(Transliterator* adoptedTransli
/**
* Append c to buf, unless buf is empty or buf already ends in c.
*/
-static void _smartAppend(UnicodeString& buf, UChar c) {
+static void _smartAppend(UnicodeString& buf, char16_t c) {
if (buf.length() != 0 &&
buf.charAt(buf.length() - 1) != c) {
buf.append(c);
@@ -401,7 +401,7 @@ UnicodeString& CompoundTransliterator::toRules(UnicodeString& rulesSource,
// compoundRBTIndex >= 0. For the transliterator at compoundRBTIndex,
// we do call toRules() recursively.
rulesSource.truncate(0);
- if (numAnonymousRBTs >= 1 && getFilter() != NULL) {
+ if (numAnonymousRBTs >= 1 && getFilter() != nullptr) {
// If we are a compound RBT and if we have a global
// filter, then emit it at the top.
UnicodeString pat;
@@ -599,7 +599,7 @@ void CompoundTransliterator::handleTransliterate(Replaceable& text, UTransPositi
* Sets the length of the longest context required by this transliterator.
* This is <em>preceding</em> context.
*/
-void CompoundTransliterator::computeMaximumContextLength(void) {
+void CompoundTransliterator::computeMaximumContextLength() {
int32_t max = 0;
for (int32_t i=0; i<count; ++i) {
int32_t len = trans[i]->getMaximumContextLength();
diff --git a/contrib/libs/icu/i18n/cpdtrans.h b/contrib/libs/icu/i18n/cpdtrans.h
index af60cb827e3..a27c617c95b 100644
--- a/contrib/libs/icu/i18n/cpdtrans.h
+++ b/contrib/libs/icu/i18n/cpdtrans.h
@@ -70,7 +70,7 @@ public:
* @param id compound ID
* @param dir either UTRANS_FORWARD or UTRANS_REVERSE
* @param adoptedFilter a global filter for this compound transliterator
- * or NULL
+ * or nullptr
*/
CompoundTransliterator(const UnicodeString& id,
UTransDirection dir,
@@ -80,7 +80,7 @@ public:
/**
* Constructs a new compound transliterator in the FORWARD
- * direction with a NULL filter.
+ * direction with a nullptr filter.
*/
CompoundTransliterator(const UnicodeString& id,
UParseError& parseError,
@@ -104,7 +104,7 @@ public:
* Returns the number of transliterators in this chain.
* @return number of transliterators in this chain.
*/
- virtual int32_t getCount(void) const;
+ virtual int32_t getCount() const;
/**
* Returns the transliterator at the given index in this chain.
@@ -171,7 +171,7 @@ public:
static UClassID U_EXPORT2 getStaticClassID();
/* @internal */
- static const UChar PASS_STRING[];
+ static const char16_t PASS_STRING[];
private:
@@ -220,9 +220,9 @@ private:
UnicodeString joinIDs(Transliterator* const transliterators[],
int32_t transCount);
- void freeTransliterators(void);
+ void freeTransliterators();
- void computeMaximumContextLength(void);
+ void computeMaximumContextLength();
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/csdetect.cpp b/contrib/libs/icu/i18n/csdetect.cpp
index 84f0776542d..16004f9f5d5 100644
--- a/contrib/libs/icu/i18n/csdetect.cpp
+++ b/contrib/libs/icu/i18n/csdetect.cpp
@@ -46,27 +46,27 @@ struct CSRecognizerInfo : public UMemory {
U_NAMESPACE_END
-static icu::CSRecognizerInfo **fCSRecognizers = NULL;
-static icu::UInitOnce gCSRecognizersInitOnce = U_INITONCE_INITIALIZER;
+static icu::CSRecognizerInfo **fCSRecognizers = nullptr;
+static icu::UInitOnce gCSRecognizersInitOnce {};
static int32_t fCSRecognizers_size = 0;
U_CDECL_BEGIN
-static UBool U_CALLCONV csdet_cleanup(void)
+static UBool U_CALLCONV csdet_cleanup()
{
U_NAMESPACE_USE
- if (fCSRecognizers != NULL) {
+ if (fCSRecognizers != nullptr) {
for(int32_t r = 0; r < fCSRecognizers_size; r += 1) {
delete fCSRecognizers[r];
- fCSRecognizers[r] = NULL;
+ fCSRecognizers[r] = nullptr;
}
DELETE_ARRAY(fCSRecognizers);
- fCSRecognizers = NULL;
+ fCSRecognizers = nullptr;
fCSRecognizers_size = 0;
}
gCSRecognizersInitOnce.reset();
- return TRUE;
+ return true;
}
static int32_t U_CALLCONV
@@ -85,53 +85,53 @@ static void U_CALLCONV initRecognizers(UErrorCode &status) {
U_NAMESPACE_USE
ucln_i18n_registerCleanup(UCLN_I18N_CSDET, csdet_cleanup);
CSRecognizerInfo *tempArray[] = {
- new CSRecognizerInfo(new CharsetRecog_UTF8(), TRUE),
-
- new CSRecognizerInfo(new CharsetRecog_UTF_16_BE(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_UTF_16_LE(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_UTF_32_BE(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_UTF_32_LE(), TRUE),
-
- new CSRecognizerInfo(new CharsetRecog_8859_1(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_2(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_5_ru(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_6_ar(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_7_el(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_8_I_he(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_8_he(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_windows_1251(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_windows_1256(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_KOI8_R(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_8859_9_tr(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_sjis(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_gb_18030(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_euc_jp(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_euc_kr(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_big5(), TRUE),
-
- new CSRecognizerInfo(new CharsetRecog_2022JP(), TRUE),
+ new CSRecognizerInfo(new CharsetRecog_UTF8(), true),
+
+ new CSRecognizerInfo(new CharsetRecog_UTF_16_BE(), true),
+ new CSRecognizerInfo(new CharsetRecog_UTF_16_LE(), true),
+ new CSRecognizerInfo(new CharsetRecog_UTF_32_BE(), true),
+ new CSRecognizerInfo(new CharsetRecog_UTF_32_LE(), true),
+
+ new CSRecognizerInfo(new CharsetRecog_8859_1(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_2(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_5_ru(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_6_ar(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_7_el(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_8_I_he(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_8_he(), true),
+ new CSRecognizerInfo(new CharsetRecog_windows_1251(), true),
+ new CSRecognizerInfo(new CharsetRecog_windows_1256(), true),
+ new CSRecognizerInfo(new CharsetRecog_KOI8_R(), true),
+ new CSRecognizerInfo(new CharsetRecog_8859_9_tr(), true),
+ new CSRecognizerInfo(new CharsetRecog_sjis(), true),
+ new CSRecognizerInfo(new CharsetRecog_gb_18030(), true),
+ new CSRecognizerInfo(new CharsetRecog_euc_jp(), true),
+ new CSRecognizerInfo(new CharsetRecog_euc_kr(), true),
+ new CSRecognizerInfo(new CharsetRecog_big5(), true),
+
+ new CSRecognizerInfo(new CharsetRecog_2022JP(), true),
#if !UCONFIG_ONLY_HTML_CONVERSION
- new CSRecognizerInfo(new CharsetRecog_2022KR(), TRUE),
- new CSRecognizerInfo(new CharsetRecog_2022CN(), TRUE),
+ new CSRecognizerInfo(new CharsetRecog_2022KR(), true),
+ new CSRecognizerInfo(new CharsetRecog_2022CN(), true),
- new CSRecognizerInfo(new CharsetRecog_IBM424_he_rtl(), FALSE),
- new CSRecognizerInfo(new CharsetRecog_IBM424_he_ltr(), FALSE),
- new CSRecognizerInfo(new CharsetRecog_IBM420_ar_rtl(), FALSE),
- new CSRecognizerInfo(new CharsetRecog_IBM420_ar_ltr(), FALSE)
+ new CSRecognizerInfo(new CharsetRecog_IBM424_he_rtl(), false),
+ new CSRecognizerInfo(new CharsetRecog_IBM424_he_ltr(), false),
+ new CSRecognizerInfo(new CharsetRecog_IBM420_ar_rtl(), false),
+ new CSRecognizerInfo(new CharsetRecog_IBM420_ar_ltr(), false)
#endif
};
int32_t rCount = UPRV_LENGTHOF(tempArray);
fCSRecognizers = NEW_ARRAY(CSRecognizerInfo *, rCount);
- if (fCSRecognizers == NULL) {
+ if (fCSRecognizers == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
else {
fCSRecognizers_size = rCount;
for (int32_t r = 0; r < rCount; r += 1) {
fCSRecognizers[r] = tempArray[r];
- if (fCSRecognizers[r] == NULL) {
+ if (fCSRecognizers[r] == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -148,9 +148,9 @@ void CharsetDetector::setRecognizers(UErrorCode &status)
}
CharsetDetector::CharsetDetector(UErrorCode &status)
- : textIn(new InputText(status)), resultArray(NULL),
- resultCount(0), fStripTags(FALSE), fFreshTextSet(FALSE),
- fEnabledRecognizers(NULL)
+ : textIn(new InputText(status)), resultArray(nullptr),
+ resultCount(0), fStripTags(false), fFreshTextSet(false),
+ fEnabledRecognizers(nullptr)
{
if (U_FAILURE(status)) {
return;
@@ -164,7 +164,7 @@ CharsetDetector::CharsetDetector(UErrorCode &status)
resultArray = (CharsetMatch **)uprv_malloc(sizeof(CharsetMatch *)*fCSRecognizers_size);
- if (resultArray == NULL) {
+ if (resultArray == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -172,7 +172,7 @@ CharsetDetector::CharsetDetector(UErrorCode &status)
for(int32_t i = 0; i < fCSRecognizers_size; i += 1) {
resultArray[i] = new CharsetMatch();
- if (resultArray[i] == NULL) {
+ if (resultArray[i] == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -197,14 +197,14 @@ CharsetDetector::~CharsetDetector()
void CharsetDetector::setText(const char *in, int32_t len)
{
textIn->setText(in, len);
- fFreshTextSet = TRUE;
+ fFreshTextSet = true;
}
UBool CharsetDetector::setStripTagsFlag(UBool flag)
{
UBool temp = fStripTags;
fStripTags = flag;
- fFreshTextSet = TRUE;
+ fFreshTextSet = true;
return temp;
}
@@ -236,7 +236,7 @@ const CharsetMatch *CharsetDetector::detect(UErrorCode &status)
if(maxMatchesFound > 0) {
return resultArray[0];
} else {
- return NULL;
+ return nullptr;
}
}
@@ -245,7 +245,7 @@ const CharsetMatch * const *CharsetDetector::detectAll(int32_t &maxMatchesFound,
if(!textIn->isSet()) {
status = U_MISSING_RESOURCE_ERROR;// TODO: Need to set proper status code for input text not set
- return NULL;
+ return nullptr;
} else if (fFreshTextSet) {
CharsetRecognizer *csr;
int32_t i;
@@ -263,13 +263,18 @@ const CharsetMatch * const *CharsetDetector::detectAll(int32_t &maxMatchesFound,
}
if (resultCount > 1) {
- uprv_sortArray(resultArray, resultCount, sizeof resultArray[0], charsetMatchComparator, NULL, TRUE, &status);
+ uprv_sortArray(resultArray, resultCount, sizeof resultArray[0], charsetMatchComparator, nullptr, true, &status);
}
- fFreshTextSet = FALSE;
+ fFreshTextSet = false;
}
maxMatchesFound = resultCount;
+ if (maxMatchesFound == 0) {
+ status = U_INVALID_CHAR_FOUND;
+ return nullptr;
+ }
+
return resultArray;
}
@@ -280,7 +285,7 @@ void CharsetDetector::setDetectableCharset(const char *encoding, UBool enabled,
}
int32_t modIdx = -1;
- UBool isDefaultVal = FALSE;
+ UBool isDefaultVal = false;
for (int32_t i = 0; i < fCSRecognizers_size; i++) {
CSRecognizerInfo *csrinfo = fCSRecognizers[i];
if (uprv_strcmp(csrinfo->recognizer->getName(), encoding) == 0) {
@@ -295,10 +300,10 @@ void CharsetDetector::setDetectableCharset(const char *encoding, UBool enabled,
return;
}
- if (fEnabledRecognizers == NULL && !isDefaultVal) {
+ if (fEnabledRecognizers == nullptr && !isDefaultVal) {
// Create an array storing the non default setting
fEnabledRecognizers = NEW_ARRAY(UBool, fCSRecognizers_size);
- if (fEnabledRecognizers == NULL) {
+ if (fEnabledRecognizers == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -308,7 +313,7 @@ void CharsetDetector::setDetectableCharset(const char *encoding, UBool enabled,
}
}
- if (fEnabledRecognizers != NULL) {
+ if (fEnabledRecognizers != nullptr) {
fEnabledRecognizers[modIdx] = enabled;
}
}
@@ -337,7 +342,7 @@ typedef struct {
static void U_CALLCONV
enumClose(UEnumeration *en) {
- if(en->context != NULL) {
+ if(en->context != nullptr) {
DELETE_ARRAY(en->context);
}
@@ -354,7 +359,7 @@ enumCount(UEnumeration *en, UErrorCode *) {
// Otherwise, ucsdet_getDetectableCharsets - only enabled ones
int32_t count = 0;
UBool *enabledArray = ((Context *)en->context)->enabledRecognizers;
- if (enabledArray != NULL) {
+ if (enabledArray != nullptr) {
// custom set
for (int32_t i = 0; i < fCSRecognizers_size; i++) {
if (enabledArray[i]) {
@@ -374,7 +379,7 @@ enumCount(UEnumeration *en, UErrorCode *) {
static const char* U_CALLCONV
enumNext(UEnumeration *en, int32_t *resultLength, UErrorCode * /*status*/) {
- const char *currName = NULL;
+ const char *currName = nullptr;
if (((Context *)en->context)->currIndex < fCSRecognizers_size) {
if (((Context *)en->context)->all) {
@@ -384,9 +389,9 @@ enumNext(UEnumeration *en, int32_t *resultLength, UErrorCode * /*status*/) {
} else {
// ucsdet_getDetectableCharsets
UBool *enabledArray = ((Context *)en->context)->enabledRecognizers;
- if (enabledArray != NULL) {
+ if (enabledArray != nullptr) {
// custom set
- while (currName == NULL && ((Context *)en->context)->currIndex < fCSRecognizers_size) {
+ while (currName == nullptr && ((Context *)en->context)->currIndex < fCSRecognizers_size) {
if (enabledArray[((Context *)en->context)->currIndex]) {
currName = fCSRecognizers[((Context *)en->context)->currIndex]->recognizer->getName();
}
@@ -394,7 +399,7 @@ enumNext(UEnumeration *en, int32_t *resultLength, UErrorCode * /*status*/) {
}
} else {
// default set
- while (currName == NULL && ((Context *)en->context)->currIndex < fCSRecognizers_size) {
+ while (currName == nullptr && ((Context *)en->context)->currIndex < fCSRecognizers_size) {
if (fCSRecognizers[((Context *)en->context)->currIndex]->isDefaultEnabled) {
currName = fCSRecognizers[((Context *)en->context)->currIndex]->recognizer->getName();
}
@@ -404,8 +409,8 @@ enumNext(UEnumeration *en, int32_t *resultLength, UErrorCode * /*status*/) {
}
}
- if(resultLength != NULL) {
- *resultLength = currName == NULL ? 0 : (int32_t)uprv_strlen(currName);
+ if(resultLength != nullptr) {
+ *resultLength = currName == nullptr ? 0 : (int32_t)uprv_strlen(currName);
}
return currName;
@@ -418,8 +423,8 @@ enumReset(UEnumeration *en, UErrorCode *) {
}
static const UEnumeration gCSDetEnumeration = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
enumClose,
enumCount,
uenum_unextDefault,
@@ -442,19 +447,19 @@ UEnumeration * CharsetDetector::getAllDetectableCharsets(UErrorCode &status)
}
UEnumeration *en = NEW_ARRAY(UEnumeration, 1);
- if (en == NULL) {
+ if (en == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
memcpy(en, &gCSDetEnumeration, sizeof(UEnumeration));
en->context = (void*)NEW_ARRAY(Context, 1);
- if (en->context == NULL) {
+ if (en->context == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
DELETE_ARRAY(en);
return 0;
}
uprv_memset(en->context, 0, sizeof(Context));
- ((Context*)en->context)->all = TRUE;
+ ((Context*)en->context)->all = true;
return en;
}
@@ -465,19 +470,19 @@ UEnumeration * CharsetDetector::getDetectableCharsets(UErrorCode &status) const
}
UEnumeration *en = NEW_ARRAY(UEnumeration, 1);
- if (en == NULL) {
+ if (en == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
memcpy(en, &gCSDetEnumeration, sizeof(UEnumeration));
en->context = (void*)NEW_ARRAY(Context, 1);
- if (en->context == NULL) {
+ if (en->context == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
DELETE_ARRAY(en);
return 0;
}
uprv_memset(en->context, 0, sizeof(Context));
- ((Context*)en->context)->all = FALSE;
+ ((Context*)en->context)->all = false;
((Context*)en->context)->enabledRecognizers = fEnabledRecognizers;
return en;
}
diff --git a/contrib/libs/icu/i18n/csmatch.cpp b/contrib/libs/icu/i18n/csmatch.cpp
index 83bf5316656..4c5f73b31b0 100644
--- a/contrib/libs/icu/i18n/csmatch.cpp
+++ b/contrib/libs/icu/i18n/csmatch.cpp
@@ -21,7 +21,7 @@
U_NAMESPACE_BEGIN
CharsetMatch::CharsetMatch()
- : textIn(NULL), confidence(0), fCharsetName(NULL), fLang(NULL)
+ : textIn(nullptr), confidence(0), fCharsetName(nullptr), fLang(nullptr)
{
// nothing else to do.
}
@@ -33,11 +33,11 @@ void CharsetMatch::set(InputText *input, const CharsetRecognizer *cr, int32_t co
confidence = conf;
fCharsetName = csName;
fLang = lang;
- if (cr != NULL) {
- if (fCharsetName == NULL) {
+ if (cr != nullptr) {
+ if (fCharsetName == nullptr) {
fCharsetName = cr->getName();
}
- if (fLang == NULL) {
+ if (fLang == nullptr) {
fLang = cr->getLanguage();
}
}
@@ -58,7 +58,7 @@ int32_t CharsetMatch::getConfidence()const
return confidence;
}
-int32_t CharsetMatch::getUChars(UChar *buf, int32_t cap, UErrorCode *status) const
+int32_t CharsetMatch::getUChars(char16_t *buf, int32_t cap, UErrorCode *status) const
{
UConverter *conv = ucnv_open(getName(), status);
int32_t result = ucnv_toUChars(conv, buf, cap, (const char *) textIn->fRawInput, textIn->fRawLength, status);
diff --git a/contrib/libs/icu/i18n/csmatch.h b/contrib/libs/icu/i18n/csmatch.h
index fe379ceea7e..c31da818637 100644
--- a/contrib/libs/icu/i18n/csmatch.h
+++ b/contrib/libs/icu/i18n/csmatch.h
@@ -44,14 +44,14 @@ class CharsetMatch : public UMemory
/**
* fully set the state of this CharsetMatch.
* Called by the CharsetRecognizers to record match results.
- * Default (NULL) parameters for names will be filled by calling the
+ * Default (nullptr) parameters for names will be filled by calling the
* corresponding getters on the recognizer.
*/
void set(InputText *input,
const CharsetRecognizer *cr,
int32_t conf,
- const char *csName=NULL,
- const char *lang=NULL);
+ const char *csName=nullptr,
+ const char *lang=nullptr);
/**
* Return the name of the charset for this Match
@@ -62,7 +62,7 @@ class CharsetMatch : public UMemory
int32_t getConfidence()const;
- int32_t getUChars(UChar *buf, int32_t cap, UErrorCode *status) const;
+ int32_t getUChars(char16_t *buf, int32_t cap, UErrorCode *status) const;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/csrmbcs.cpp b/contrib/libs/icu/i18n/csrmbcs.cpp
index 4c5bdfa560b..ec346b5fb3f 100644
--- a/contrib/libs/icu/i18n/csrmbcs.cpp
+++ b/contrib/libs/icu/i18n/csrmbcs.cpp
@@ -115,7 +115,7 @@ static int32_t binarySearch(const uint16_t *array, int32_t len, uint16_t value)
}
IteratedChar::IteratedChar() :
-charValue(0), index(-1), nextIndex(0), error(FALSE), done(FALSE)
+charValue(0), index(-1), nextIndex(0), error(false), done(false)
{
// nothing else to do.
}
@@ -125,14 +125,14 @@ charValue(0), index(-1), nextIndex(0), error(FALSE), done(FALSE)
charValue = 0;
index = -1;
nextIndex = 0;
- error = FALSE;
- done = FALSE;
+ error = false;
+ done = false;
}*/
int32_t IteratedChar::nextByte(InputText *det)
{
if (nextIndex >= det->fRawLength) {
- done = TRUE;
+ done = true;
return -1;
}
@@ -146,7 +146,6 @@ CharsetRecog_mbcs::~CharsetRecog_mbcs()
}
int32_t CharsetRecog_mbcs::match_mbcs(InputText *det, const uint16_t commonChars[], int32_t commonCharsLen) const {
- int32_t singleByteCharCount = 0;
int32_t doubleByteCharCount = 0;
int32_t commonCharCount = 0;
int32_t badCharCount = 0;
@@ -160,9 +159,7 @@ int32_t CharsetRecog_mbcs::match_mbcs(InputText *det, const uint16_t commonChars
if (iter.error) {
badCharCount++;
} else {
- if (iter.charValue <= 0xFF) {
- singleByteCharCount++;
- } else {
+ if (iter.charValue > 0xFF) {
doubleByteCharCount++;
if (commonChars != 0) {
@@ -243,16 +240,16 @@ CharsetRecog_sjis::~CharsetRecog_sjis()
UBool CharsetRecog_sjis::nextChar(IteratedChar* it, InputText* det) const {
it->index = it->nextIndex;
- it->error = FALSE;
+ it->error = false;
int32_t firstByte = it->charValue = it->nextByte(det);
if (firstByte < 0) {
- return FALSE;
+ return false;
}
if (firstByte <= 0x7F || (firstByte > 0xA0 && firstByte <= 0xDF)) {
- return TRUE;
+ return true;
}
int32_t secondByte = it->nextByte(det);
@@ -263,10 +260,10 @@ UBool CharsetRecog_sjis::nextChar(IteratedChar* it, InputText* det) const {
if (! ((secondByte >= 0x40 && secondByte <= 0x7F) || (secondByte >= 0x80 && secondByte <= 0xFE))) {
// Illegal second byte value.
- it->error = TRUE;
+ it->error = true;
}
- return TRUE;
+ return true;
}
UBool CharsetRecog_sjis::match(InputText* det, CharsetMatch *results) const {
@@ -296,17 +293,17 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const {
int32_t thirdByte = 0;
it->index = it->nextIndex;
- it->error = FALSE;
+ it->error = false;
firstByte = it->charValue = it->nextByte(det);
if (firstByte < 0) {
// Ran off the end of the input data
- return FALSE;
+ return false;
}
if (firstByte <= 0x8D) {
// single byte char
- return TRUE;
+ return true;
}
secondByte = it->nextByte(det);
@@ -318,10 +315,10 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const {
if (firstByte >= 0xA1 && firstByte <= 0xFE) {
// Two byte Char
if (secondByte < 0xA1) {
- it->error = TRUE;
+ it->error = true;
}
- return TRUE;
+ return true;
}
if (firstByte == 0x8E) {
@@ -332,10 +329,10 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const {
// Treat it like EUC-JP. If the data really was EUC-TW, the following two
// bytes will look like a well formed 2 byte char.
if (secondByte < 0xA1) {
- it->error = TRUE;
+ it->error = true;
}
- return TRUE;
+ return true;
}
if (firstByte == 0x8F) {
@@ -346,11 +343,11 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const {
if (thirdByte < 0xa1) {
// Bad second byte or ran off the end of the input data with a non-ASCII first byte.
- it->error = TRUE;
+ it->error = true;
}
}
- return TRUE;
+ return true;
}
@@ -408,16 +405,16 @@ UBool CharsetRecog_big5::nextChar(IteratedChar* it, InputText* det) const
int32_t firstByte;
it->index = it->nextIndex;
- it->error = FALSE;
+ it->error = false;
firstByte = it->charValue = it->nextByte(det);
if (firstByte < 0) {
- return FALSE;
+ return false;
}
if (firstByte <= 0x7F || firstByte == 0xFF) {
// single byte character.
- return TRUE;
+ return true;
}
int32_t secondByte = it->nextByte(det);
@@ -427,10 +424,10 @@ UBool CharsetRecog_big5::nextChar(IteratedChar* it, InputText* det) const
// else we'll handle the error later.
if (secondByte < 0x40 || secondByte == 0x7F || secondByte == 0xFF) {
- it->error = TRUE;
+ it->error = true;
}
- return TRUE;
+ return true;
}
const char *CharsetRecog_big5::getName() const
@@ -462,17 +459,17 @@ UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) const {
int32_t fourthByte = 0;
it->index = it->nextIndex;
- it->error = FALSE;
+ it->error = false;
firstByte = it->charValue = it->nextByte(det);
if (firstByte < 0) {
// Ran off the end of the input data
- return FALSE;
+ return false;
}
if (firstByte <= 0x80) {
// single byte char
- return TRUE;
+ return true;
}
secondByte = it->nextByte(det);
@@ -484,7 +481,7 @@ UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) const {
if (firstByte >= 0x81 && firstByte <= 0xFE) {
// Two byte Char
if ((secondByte >= 0x40 && secondByte <= 0x7E) || (secondByte >=80 && secondByte <= 0xFE)) {
- return TRUE;
+ return true;
}
// Four byte char
@@ -497,16 +494,16 @@ UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) const {
if (fourthByte >= 0x30 && fourthByte <= 0x39) {
it->charValue = (it->charValue << 16) | (thirdByte << 8) | fourthByte;
- return TRUE;
+ return true;
}
}
}
// Something wasn't valid, or we ran out of data (-1).
- it->error = TRUE;
+ it->error = true;
}
- return TRUE;
+ return true;
}
const char *CharsetRecog_gb_18030::getName() const
diff --git a/contrib/libs/icu/i18n/csrsbcs.cpp b/contrib/libs/icu/i18n/csrsbcs.cpp
index 0b0d8967e7d..92af9b5291b 100644
--- a/contrib/libs/icu/i18n/csrsbcs.cpp
+++ b/contrib/libs/icu/i18n/csrsbcs.cpp
@@ -104,7 +104,7 @@ int32_t NGramParser::nextByte(InputText *det)
void NGramParser::parseCharacters(InputText *det)
{
int32_t b;
- bool ignoreSpace = FALSE;
+ bool ignoreSpace = false;
while ((b = nextByte(det)) >= 0) {
uint8_t mb = charMap[b];
@@ -211,7 +211,7 @@ int32_t NGramParser_IBM420::nextByte(InputText *det)
void NGramParser_IBM420::parseCharacters(InputText *det)
{
int32_t b;
- bool ignoreSpace = FALSE;
+ bool ignoreSpace = false;
while ((b = nextByte(det)) >= 0) {
uint8_t mb = charMap[b];
diff --git a/contrib/libs/icu/i18n/csrucode.cpp b/contrib/libs/icu/i18n/csrucode.cpp
index 480dae1400c..a6e6f83f0f3 100644
--- a/contrib/libs/icu/i18n/csrucode.cpp
+++ b/contrib/libs/icu/i18n/csrucode.cpp
@@ -37,7 +37,7 @@ const char *CharsetRecog_UTF_16_BE::getName() const
// NULs are a contra-indication, they will appear commonly if the actual encoding is UTF-32.
// NULs should be rare in actual text.
-static int32_t adjustConfidence(UChar codeUnit, int32_t confidence) {
+static int32_t adjustConfidence(char16_t codeUnit, int32_t confidence) {
if (codeUnit == 0) {
confidence -= 10;
} else if ((codeUnit >= 0x20 && codeUnit <= 0xff) || codeUnit == 0x0a) {
@@ -60,7 +60,7 @@ UBool CharsetRecog_UTF_16_BE::match(InputText* textIn, CharsetMatch *results) co
int32_t bytesToCheck = (length > 30) ? 30 : length;
for (int32_t charIndex=0; charIndex<bytesToCheck-1; charIndex+=2) {
- UChar codeUnit = (input[charIndex] << 8) | input[charIndex + 1];
+ char16_t codeUnit = (input[charIndex] << 8) | input[charIndex + 1];
if (charIndex == 0 && codeUnit == 0xFEFF) {
confidence = 100;
break;
@@ -95,7 +95,7 @@ UBool CharsetRecog_UTF_16_LE::match(InputText* textIn, CharsetMatch *results) co
int32_t bytesToCheck = (length > 30) ? 30 : length;
for (int32_t charIndex=0; charIndex<bytesToCheck-1; charIndex+=2) {
- UChar codeUnit = input[charIndex] | (input[charIndex + 1] << 8);
+ char16_t codeUnit = input[charIndex] | (input[charIndex + 1] << 8);
if (charIndex == 0 && codeUnit == 0xFEFF) {
confidence = 100; // UTF-16 BOM
if (length >= 4 && input[2] == 0 && input[3] == 0) {
@@ -126,11 +126,11 @@ UBool CharsetRecog_UTF_32::match(InputText* textIn, CharsetMatch *results) const
int32_t limit = (textIn->fRawLength / 4) * 4;
int32_t numValid = 0;
int32_t numInvalid = 0;
- bool hasBOM = FALSE;
+ bool hasBOM = false;
int32_t confidence = 0;
if (limit > 0 && getChar(input, 0) == 0x0000FEFFUL) {
- hasBOM = TRUE;
+ hasBOM = true;
}
for(int32_t i = 0; i < limit; i += 4) {
diff --git a/contrib/libs/icu/i18n/csrutf8.cpp b/contrib/libs/icu/i18n/csrutf8.cpp
index 3f16224ea6e..f114f097224 100644
--- a/contrib/libs/icu/i18n/csrutf8.cpp
+++ b/contrib/libs/icu/i18n/csrutf8.cpp
@@ -27,7 +27,7 @@ const char *CharsetRecog_UTF8::getName() const
}
UBool CharsetRecog_UTF8::match(InputText* input, CharsetMatch *results) const {
- bool hasBOM = FALSE;
+ bool hasBOM = false;
int32_t numValid = 0;
int32_t numInvalid = 0;
const uint8_t *inputBytes = input->fRawInput;
@@ -37,7 +37,7 @@ UBool CharsetRecog_UTF8::match(InputText* input, CharsetMatch *results) const {
if (input->fRawLength >= 3 &&
inputBytes[0] == 0xEF && inputBytes[1] == 0xBB && inputBytes[2] == 0xBF) {
- hasBOM = TRUE;
+ hasBOM = true;
}
// Scan for multi-byte sequences
diff --git a/contrib/libs/icu/i18n/curramt.cpp b/contrib/libs/icu/i18n/curramt.cpp
index 6fd2ea2fda5..43c3e9c151a 100644
--- a/contrib/libs/icu/i18n/curramt.cpp
+++ b/contrib/libs/icu/i18n/curramt.cpp
@@ -44,7 +44,11 @@ CurrencyAmount* CurrencyAmount::clone() const {
CurrencyAmount::~CurrencyAmount() {
}
-
+
+const CurrencyUnit& CurrencyAmount::getCurrency() const {
+ return static_cast<const CurrencyUnit&>(getUnit());
+}
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyAmount)
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/currfmt.cpp b/contrib/libs/icu/i18n/currfmt.cpp
index 0ad0492ee7a..b7dfc09c545 100644
--- a/contrib/libs/icu/i18n/currfmt.cpp
+++ b/contrib/libs/icu/i18n/currfmt.cpp
@@ -50,7 +50,7 @@ void CurrencyFormat::parseObject(const UnicodeString& source,
ParsePosition& pos) const
{
CurrencyAmount* currAmt = getCurrencyFormatInternal().parseCurrency(source, pos);
- if (currAmt != NULL) {
+ if (currAmt != nullptr) {
result.adoptObject(currAmt);
}
}
diff --git a/contrib/libs/icu/i18n/currpinf.cpp b/contrib/libs/icu/i18n/currpinf.cpp
index a2676ab5a1e..7c5adaaf7c3 100644
--- a/contrib/libs/icu/i18n/currpinf.cpp
+++ b/contrib/libs/icu/i18n/currpinf.cpp
@@ -29,7 +29,7 @@
U_NAMESPACE_BEGIN
-static const UChar gNumberPatternSeparator = 0x3B; // ;
+static const char16_t gNumberPatternSeparator = 0x3B; // ;
U_CDECL_BEGIN
@@ -50,11 +50,11 @@ U_CDECL_END
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyPluralInfo)
-static const UChar gDefaultCurrencyPluralPattern[] = {'0', '.', '#', '#', ' ', 0xA4, 0xA4, 0xA4, 0};
-static const UChar gTripleCurrencySign[] = {0xA4, 0xA4, 0xA4, 0};
-static const UChar gPluralCountOther[] = {0x6F, 0x74, 0x68, 0x65, 0x72, 0};
-static const UChar gPart0[] = {0x7B, 0x30, 0x7D, 0};
-static const UChar gPart1[] = {0x7B, 0x31, 0x7D, 0};
+static const char16_t gDefaultCurrencyPluralPattern[] = {'0', '.', '#', '#', ' ', 0xA4, 0xA4, 0xA4, 0};
+static const char16_t gTripleCurrencySign[] = {0xA4, 0xA4, 0xA4, 0};
+static const char16_t gPluralCountOther[] = {0x6F, 0x74, 0x68, 0x65, 0x72, 0};
+static const char16_t gPart0[] = {0x7B, 0x30, 0x7D, 0};
+static const char16_t gPart1[] = {0x7B, 0x31, 0x7D, 0};
static const char gNumberElementsTag[]="NumberElements";
static const char gLatnTag[]="latn";
@@ -190,7 +190,7 @@ CurrencyPluralInfo::getCurrencyPluralPattern(const UnicodeString& pluralCount,
// fall back to "other"
if (pluralCount.compare(gPluralCountOther, 5)) {
currencyPluralPattern =
- (UnicodeString*)fPluralCountToCurrencyUnitPattern->get(UnicodeString(TRUE, gPluralCountOther, 5));
+ (UnicodeString*)fPluralCountToCurrencyUnitPattern->get(UnicodeString(true, gPluralCountOther, 5));
}
if (currencyPluralPattern == nullptr) {
// no currencyUnitPatterns defined,
@@ -289,7 +289,7 @@ CurrencyPluralInfo::setupCurrencyPluralPattern(const Locale& loc, UErrorCode& st
ures_getByKeyWithFallback(numElements.getAlias(), ns->getName(), rb.getAlias(), &ec);
ures_getByKeyWithFallback(rb.getAlias(), gPatternsTag, rb.getAlias(), &ec);
int32_t ptnLen;
- const UChar* numberStylePattern = ures_getStringByKeyWithFallback(rb.getAlias(), gDecimalFormatTag, &ptnLen, &ec);
+ const char16_t* numberStylePattern = ures_getStringByKeyWithFallback(rb.getAlias(), gDecimalFormatTag, &ptnLen, &ec);
// Fall back to "latn" if num sys specific pattern isn't there.
if ( ec == U_MISSING_RESOURCE_ERROR && (uprv_strcmp(ns->getName(), gLatnTag) != 0)) {
ec = U_ZERO_ERROR;
@@ -298,7 +298,7 @@ CurrencyPluralInfo::setupCurrencyPluralPattern(const Locale& loc, UErrorCode& st
numberStylePattern = ures_getStringByKeyWithFallback(rb.getAlias(), gDecimalFormatTag, &ptnLen, &ec);
}
int32_t numberStylePatternLen = ptnLen;
- const UChar* negNumberStylePattern = nullptr;
+ const char16_t* negNumberStylePattern = nullptr;
int32_t negNumberStylePatternLen = 0;
// TODO: Java
// parse to check whether there is ";" separator in the numberStylePattern
@@ -335,7 +335,7 @@ CurrencyPluralInfo::setupCurrencyPluralPattern(const Locale& loc, UErrorCode& st
while (((pluralCount = keywords->next(nullptr, ec)) != nullptr) && U_SUCCESS(ec)) {
int32_t ptnLength;
UErrorCode err = U_ZERO_ERROR;
- const UChar* patternChars = ures_getStringByKeyWithFallback(currencyRes.getAlias(), pluralCount, &ptnLength, &err);
+ const char16_t* patternChars = ures_getStringByKeyWithFallback(currencyRes.getAlias(), pluralCount, &ptnLength, &err);
if (err == U_MEMORY_ALLOCATION_ERROR || patternChars == nullptr) {
ec = err;
break;
@@ -351,15 +351,15 @@ CurrencyPluralInfo::setupCurrencyPluralPattern(const Locale& loc, UErrorCode& st
pattern->extract(0, pattern->length(), result_1, "UTF-8");
std::cout << "pluralCount: " << pluralCount << "; pattern: " << result_1 << "\n";
#endif
- pattern->findAndReplace(UnicodeString(TRUE, gPart0, 3),
+ pattern->findAndReplace(UnicodeString(true, gPart0, 3),
UnicodeString(numberStylePattern, numberStylePatternLen));
- pattern->findAndReplace(UnicodeString(TRUE, gPart1, 3), UnicodeString(TRUE, gTripleCurrencySign, 3));
+ pattern->findAndReplace(UnicodeString(true, gPart1, 3), UnicodeString(true, gTripleCurrencySign, 3));
if (hasSeparator) {
UnicodeString negPattern(patternChars, ptnLength);
- negPattern.findAndReplace(UnicodeString(TRUE, gPart0, 3),
+ negPattern.findAndReplace(UnicodeString(true, gPart0, 3),
UnicodeString(negNumberStylePattern, negNumberStylePatternLen));
- negPattern.findAndReplace(UnicodeString(TRUE, gPart1, 3), UnicodeString(TRUE, gTripleCurrencySign, 3));
+ negPattern.findAndReplace(UnicodeString(true, gPart1, 3), UnicodeString(true, gTripleCurrencySign, 3));
pattern->append(gNumberPatternSeparator);
pattern->append(negPattern);
}
@@ -400,7 +400,7 @@ CurrencyPluralInfo::initHash(UErrorCode& status) {
if (U_FAILURE(status)) {
return nullptr;
}
- LocalPointer<Hashtable> hTable(new Hashtable(TRUE, status), status);
+ LocalPointer<Hashtable> hTable(new Hashtable(true, status), status);
if (U_FAILURE(status)) {
return nullptr;
}
diff --git a/contrib/libs/icu/i18n/currunit.cpp b/contrib/libs/icu/i18n/currunit.cpp
index 92bcf1268ac..98f28365cfc 100644
--- a/contrib/libs/icu/i18n/currunit.cpp
+++ b/contrib/libs/icu/i18n/currunit.cpp
@@ -48,7 +48,7 @@ CurrencyUnit::CurrencyUnit(ConstChar16Ptr _isoCode, UErrorCode& ec) {
isoCode[3] = 0;
}
if (useDefault) {
- uprv_memcpy(isoCode, kDefaultCurrency, sizeof(UChar) * 4);
+ uprv_memcpy(isoCode, kDefaultCurrency, sizeof(char16_t) * 4);
}
char simpleIsoCode[4];
u_UCharsToChars(isoCode, simpleIsoCode, 4);
diff --git a/contrib/libs/icu/i18n/dangical.cpp b/contrib/libs/icu/i18n/dangical.cpp
index 57fe80220b9..2b340ee4b45 100644
--- a/contrib/libs/icu/i18n/dangical.cpp
+++ b/contrib/libs/icu/i18n/dangical.cpp
@@ -23,8 +23,8 @@
#include "unicode/tzrule.h"
// --- The cache --
-static icu::TimeZone *gDangiCalendarZoneAstroCalc = NULL;
-static icu::UInitOnce gDangiCalendarInitOnce = U_INITONCE_INITIALIZER;
+static icu::TimeZone *gDangiCalendarZoneAstroCalc = nullptr;
+static icu::UInitOnce gDangiCalendarInitOnce {};
/**
* The start year of the Korean traditional calendar (Dan-gi) is the inaugural
@@ -33,13 +33,13 @@ static icu::UInitOnce gDangiCalendarInitOnce = U_INITONCE_INITIALIZER;
static const int32_t DANGI_EPOCH_YEAR = -2332; // Gregorian year
U_CDECL_BEGIN
-static UBool calendar_dangi_cleanup(void) {
+static UBool calendar_dangi_cleanup() {
if (gDangiCalendarZoneAstroCalc) {
delete gDangiCalendarZoneAstroCalc;
- gDangiCalendarZoneAstroCalc = NULL;
+ gDangiCalendarZoneAstroCalc = nullptr;
}
gDangiCalendarInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -141,6 +141,23 @@ const TimeZone* DangiCalendar::getDangiCalZoneAstroCalc(UErrorCode &status) cons
return gDangiCalendarZoneAstroCalc;
}
+constexpr uint32_t kDangiRelatedYearDiff = -2333;
+
+int32_t DangiCalendar::getRelatedYear(UErrorCode &status) const
+{
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return year + kDangiRelatedYearDiff;
+}
+
+void DangiCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kDangiRelatedYearDiff);
+}
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DangiCalendar)
diff --git a/contrib/libs/icu/i18n/dangical.h b/contrib/libs/icu/i18n/dangical.h
index 9d0437264ef..3e5b0bb859b 100644
--- a/contrib/libs/icu/i18n/dangical.h
+++ b/contrib/libs/icu/i18n/dangical.h
@@ -72,6 +72,20 @@ class DangiCalendar : public ChineseCalendar {
// Internal methods & astronomical calculations
//----------------------------------------------------------------------
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
+
+ /**
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual void setRelatedYear(int32_t year) override;
+
private:
const TimeZone* getDangiCalZoneAstroCalc(UErrorCode &status) const;
@@ -83,7 +97,7 @@ class DangiCalendar : public ChineseCalendar {
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -96,7 +110,7 @@ class DangiCalendar : public ChineseCalendar {
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "dangi".
diff --git a/contrib/libs/icu/i18n/datefmt.cpp b/contrib/libs/icu/i18n/datefmt.cpp
index fed8f79aa0f..029634e3dcb 100644
--- a/contrib/libs/icu/i18n/datefmt.cpp
+++ b/contrib/libs/icu/i18n/datefmt.cpp
@@ -46,7 +46,7 @@
U_NAMESPACE_BEGIN
-class U_I18N_API DateFmtBestPattern : public SharedObject {
+class DateFmtBestPattern : public SharedObject {
public:
UnicodeString fPattern;
@@ -58,14 +58,14 @@ public:
DateFmtBestPattern::~DateFmtBestPattern() {
}
-template<> U_I18N_API
+template<>
const DateFmtBestPattern *LocaleCacheKey<DateFmtBestPattern>::createObject(
const void * /*creationContext*/, UErrorCode &status) const {
status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
-class U_I18N_API DateFmtBestPatternKey : public LocaleCacheKey<DateFmtBestPattern> {
+class DateFmtBestPatternKey : public LocaleCacheKey<DateFmtBestPattern> {
private:
UnicodeString fSkeleton;
protected:
@@ -101,7 +101,7 @@ public:
LocalPointer<DateTimePatternGenerator> dtpg(
DateTimePatternGenerator::createInstance(fLoc, status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
LocalPointer<DateFmtBestPattern> pattern(
@@ -109,7 +109,7 @@ public:
dtpg->getBestPattern(fSkeleton, status)),
status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
DateFmtBestPattern *result = pattern.orphan();
result->addRef();
@@ -149,12 +149,12 @@ DateFormat& DateFormat::operator=(const DateFormat& other)
if(other.fCalendar) {
fCalendar = other.fCalendar->clone();
} else {
- fCalendar = NULL;
+ fCalendar = nullptr;
}
if(other.fNumberFormat) {
fNumberFormat = other.fNumberFormat->clone();
} else {
- fNumberFormat = NULL;
+ fNumberFormat = nullptr;
}
fBoolFlags = other.fBoolFlags;
fCapitalizationContext = other.fCapitalizationContext;
@@ -175,18 +175,17 @@ DateFormat::~DateFormat()
bool
DateFormat::operator==(const Format& other) const
{
- // This protected comparison operator should only be called by subclasses
- // which have confirmed that the other object being compared against is
- // an instance of a sublcass of DateFormat. THIS IS IMPORTANT.
-
+ if (this == &other) {
+ return true;
+ }
+ if (!(Format::operator==(other))) {
+ return false;
+ }
// Format::operator== guarantees that this cast is safe
DateFormat* fmt = (DateFormat*)&other;
-
- return (this == fmt) ||
- (Format::operator==(other) &&
- fCalendar&&(fCalendar->isEquivalentTo(*fmt->fCalendar)) &&
+ return fCalendar&&(fCalendar->isEquivalentTo(*fmt->fCalendar)) &&
(fNumberFormat && *fNumberFormat == *fmt->fNumberFormat) &&
- (fCapitalizationContext == fmt->fCapitalizationContext) );
+ (fCapitalizationContext == fmt->fCapitalizationContext);
}
//----------------------------------------------------------------------
@@ -277,10 +276,10 @@ DateFormat::format(Calendar& /* unused cal */,
UnicodeString&
DateFormat::format(UDate date, UnicodeString& appendTo, FieldPosition& fieldPosition) const {
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
// Use a clone of our calendar instance
Calendar* calClone = fCalendar->clone();
- if (calClone != NULL) {
+ if (calClone != nullptr) {
UErrorCode ec = U_ZERO_ERROR;
calClone->setTime(date, ec);
if (U_SUCCESS(ec)) {
@@ -297,9 +296,9 @@ DateFormat::format(UDate date, UnicodeString& appendTo, FieldPosition& fieldPosi
UnicodeString&
DateFormat::format(UDate date, UnicodeString& appendTo, FieldPositionIterator* posIter,
UErrorCode& status) const {
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
Calendar* calClone = fCalendar->clone();
- if (calClone != NULL) {
+ if (calClone != nullptr) {
calClone->setTime(date, status);
if (U_SUCCESS(status)) {
format(*calClone, appendTo, posIter, status);
@@ -328,9 +327,9 @@ DateFormat::parse(const UnicodeString& text,
ParsePosition& pos) const
{
UDate d = 0; // Error return UDate is 0 (the epoch)
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
Calendar* calClone = fCalendar->clone();
- if (calClone != NULL) {
+ if (calClone != nullptr) {
int32_t start = pos.getIndex();
calClone->clear();
parse(text, *calClone, pos);
@@ -434,7 +433,7 @@ DateFormat::getBestPattern(
return UnicodeString();
}
DateFmtBestPatternKey key(locale, skeleton, status);
- const DateFmtBestPattern *patternPtr = NULL;
+ const DateFmtBestPattern *patternPtr = nullptr;
cache->get(key, patternPtr, status);
if (U_FAILURE(status)) {
return UnicodeString();
@@ -452,20 +451,20 @@ DateFormat::createInstanceForSkeleton(
UErrorCode &status) {
LocalPointer<Calendar> calendar(calendarToAdopt);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (calendar.isNull()) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
Locale localeWithCalendar = locale;
localeWithCalendar.setKeywordValue("calendar", calendar->getType(), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
DateFormat *result = createInstanceForSkeleton(skeleton, localeWithCalendar, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
result->adoptCalendar(calendar.orphan());
return result;
@@ -477,14 +476,14 @@ DateFormat::createInstanceForSkeleton(
const Locale &locale,
UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
LocalPointer<DateFormat> df(
new SimpleDateFormat(
getBestPattern(locale, skeleton, status),
locale, status),
status);
- return U_SUCCESS(status) ? df.orphan() : NULL;
+ return U_SUCCESS(status) ? df.orphan() : nullptr;
}
DateFormat* U_EXPORT2
@@ -568,7 +567,7 @@ void
DateFormat::setCalendar(const Calendar& newCalendar)
{
Calendar* newCalClone = newCalendar.clone();
- if (newCalClone != NULL) {
+ if (newCalClone != nullptr) {
adoptCalendar(newCalClone);
}
}
@@ -588,8 +587,8 @@ DateFormat::adoptNumberFormat(NumberFormat* newNumberFormat)
{
delete fNumberFormat;
fNumberFormat = newNumberFormat;
- newNumberFormat->setParseIntegerOnly(TRUE);
- newNumberFormat->setGroupingUsed(FALSE);
+ newNumberFormat->setParseIntegerOnly(true);
+ newNumberFormat->setGroupingUsed(false);
}
//----------------------------------------------------------------------
@@ -597,7 +596,7 @@ void
DateFormat::setNumberFormat(const NumberFormat& newNumberFormat)
{
NumberFormat* newNumFmtClone = newNumberFormat.clone();
- if (newNumFmtClone != NULL) {
+ if (newNumFmtClone != nullptr) {
adoptNumberFormat(newNumFmtClone);
}
}
@@ -615,7 +614,7 @@ DateFormat::getNumberFormat() const
void
DateFormat::adoptTimeZone(TimeZone* zone)
{
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
fCalendar->adoptTimeZone(zone);
}
}
@@ -624,7 +623,7 @@ DateFormat::adoptTimeZone(TimeZone* zone)
void
DateFormat::setTimeZone(const TimeZone& zone)
{
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
fCalendar->setTimeZone(zone);
}
}
@@ -634,7 +633,7 @@ DateFormat::setTimeZone(const TimeZone& zone)
const TimeZone&
DateFormat::getTimeZone() const
{
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
return fCalendar->getTimeZone();
}
// If calendar doesn't exists, create default timezone.
@@ -647,7 +646,7 @@ DateFormat::getTimeZone() const
void
DateFormat::setLenient(UBool lenient)
{
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
fCalendar->setLenient(lenient);
}
UErrorCode status = U_ZERO_ERROR;
@@ -660,8 +659,8 @@ DateFormat::setLenient(UBool lenient)
UBool
DateFormat::isLenient() const
{
- UBool lenient = TRUE;
- if (fCalendar != NULL) {
+ UBool lenient = true;
+ if (fCalendar != nullptr) {
lenient = fCalendar->isLenient();
}
UErrorCode status = U_ZERO_ERROR;
@@ -673,7 +672,7 @@ DateFormat::isLenient() const
void
DateFormat::setCalendarLenient(UBool lenient)
{
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
fCalendar->setLenient(lenient);
}
}
@@ -683,11 +682,11 @@ DateFormat::setCalendarLenient(UBool lenient)
UBool
DateFormat::isCalendarLenient() const
{
- if (fCalendar != NULL) {
+ if (fCalendar != nullptr) {
return fCalendar->isLenient();
}
// fCalendar is rarely null
- return FALSE;
+ return false;
}
diff --git a/contrib/libs/icu/i18n/dayperiodrules.cpp b/contrib/libs/icu/i18n/dayperiodrules.cpp
index efe92dd794b..3d9ab5bfac5 100644
--- a/contrib/libs/icu/i18n/dayperiodrules.cpp
+++ b/contrib/libs/icu/i18n/dayperiodrules.cpp
@@ -27,12 +27,12 @@ U_NAMESPACE_BEGIN
namespace {
struct DayPeriodRulesData : public UMemory {
- DayPeriodRulesData() : localeToRuleSetNumMap(NULL), rules(NULL), maxRuleSetNum(0) {}
+ DayPeriodRulesData() : localeToRuleSetNumMap(nullptr), rules(nullptr), maxRuleSetNum(0) {}
UHashtable *localeToRuleSetNumMap;
DayPeriodRules *rules;
int32_t maxRuleSetNum;
-} *data = NULL;
+} *data = nullptr;
enum CutoffType {
CUTOFF_TYPE_UNKNOWN = -1,
@@ -67,7 +67,7 @@ struct DayPeriodRulesDataSink : public ResourceSink {
} else if (uprv_strcmp(key, "rules") == 0) {
// Allocate one more than needed to skip [0]. See comment in parseSetNum().
data->rules = new DayPeriodRules[data->maxRuleSetNum + 1];
- if (data->rules == NULL) {
+ if (data->rules == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -196,9 +196,9 @@ struct DayPeriodRulesDataSink : public ResourceSink {
// AT cutoffs must be either midnight or noon.
if (cutoffs[startHour] & (1 << CUTOFF_TYPE_AT)) {
if (startHour == 0 && period == DayPeriodRules::DAYPERIOD_MIDNIGHT) {
- rule.fHasMidnight = TRUE;
+ rule.fHasMidnight = true;
} else if (startHour == 12 && period == DayPeriodRules::DAYPERIOD_NOON) {
- rule.fHasNoon = TRUE;
+ rule.fHasNoon = true;
} else {
errorCode = U_INVALID_FORMAT_ERROR; // Bad data.
return;
@@ -301,14 +301,14 @@ DayPeriodRulesCountSink::~DayPeriodRulesCountSink() {}
namespace {
-UInitOnce initOnce = U_INITONCE_INITIALIZER;
+UInitOnce initOnce {};
U_CFUNC UBool U_CALLCONV dayPeriodRulesCleanup() {
delete[] data->rules;
uhash_close(data->localeToRuleSetNumMap);
delete data;
- data = NULL;
- return TRUE;
+ data = nullptr;
+ return true;
}
} // namespace
@@ -319,8 +319,8 @@ void U_CALLCONV DayPeriodRules::load(UErrorCode &errorCode) {
}
data = new DayPeriodRulesData();
- data->localeToRuleSetNumMap = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &errorCode);
- LocalUResourceBundlePointer rb_dayPeriods(ures_openDirect(NULL, "dayPeriods", &errorCode));
+ data->localeToRuleSetNumMap = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &errorCode);
+ LocalUResourceBundlePointer rb_dayPeriods(ures_openDirect(nullptr, "dayPeriods", &errorCode));
// Get the largest rule set number (so we allocate enough objects).
DayPeriodRulesCountSink countSink;
@@ -337,8 +337,8 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo
umtx_initOnce(initOnce, DayPeriodRules::load, errorCode);
// If the entire day period rules data doesn't conform to spec (even if the part we want
- // does), return NULL.
- if(U_FAILURE(errorCode)) { return NULL; }
+ // does), return nullptr.
+ if(U_FAILURE(errorCode)) { return nullptr; }
const char *localeCode = locale.getBaseName();
char name[ULOC_FULLNAME_CAPACITY];
@@ -353,7 +353,7 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo
}
} else {
errorCode = U_BUFFER_OVERFLOW_ERROR;
- return NULL;
+ return nullptr;
}
int32_t ruleSetNum = 0; // NB there is no rule set 0 and 0 is returned upon lookup failure.
@@ -375,13 +375,13 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo
if (ruleSetNum <= 0 || data->rules[ruleSetNum].getDayPeriodForHour(0) == DAYPERIOD_UNKNOWN) {
// If day period for hour 0 is UNKNOWN then day period for all hours are UNKNOWN.
// Data doesn't exist even with fallback.
- return NULL;
+ return nullptr;
} else {
return &data->rules[ruleSetNum];
}
}
-DayPeriodRules::DayPeriodRules() : fHasMidnight(FALSE), fHasNoon(FALSE) {
+DayPeriodRules::DayPeriodRules() : fHasMidnight(false), fHasNoon(false) {
for (int32_t i = 0; i < 24; ++i) {
fDayPeriodForHour[i] = DayPeriodRules::DAYPERIOD_UNKNOWN;
}
@@ -504,10 +504,10 @@ void DayPeriodRules::add(int32_t startHour, int32_t limitHour, DayPeriod period)
UBool DayPeriodRules::allHoursAreSet() {
for (int32_t i = 0; i < 24; ++i) {
- if (fDayPeriodForHour[i] == DAYPERIOD_UNKNOWN) { return FALSE; }
+ if (fDayPeriodForHour[i] == DAYPERIOD_UNKNOWN) { return false; }
}
- return TRUE;
+ return true;
}
diff --git a/contrib/libs/icu/i18n/dcfmtsym.cpp b/contrib/libs/icu/i18n/dcfmtsym.cpp
index 4f5bae4e11e..ac1f777399a 100644
--- a/contrib/libs/icu/i18n/dcfmtsym.cpp
+++ b/contrib/libs/icu/i18n/dcfmtsym.cpp
@@ -59,38 +59,38 @@ static const char gLatn[] = "latn";
static const char gSymbols[] = "symbols";
static const char gNumberElementsLatnSymbols[] = "NumberElements/latn/symbols";
-static const UChar INTL_CURRENCY_SYMBOL_STR[] = {0xa4, 0xa4, 0};
+static const char16_t INTL_CURRENCY_SYMBOL_STR[] = {0xa4, 0xa4, 0};
// List of field names to be loaded from the data files.
// These are parallel with the enum ENumberFormatSymbol in unicode/dcfmtsym.h.
static const char *gNumberElementKeys[DecimalFormatSymbols::kFormatSymbolCount] = {
"decimal",
"group",
- NULL, /* #11897: the <list> symbol is NOT the pattern separator symbol */
+ nullptr, /* #11897: the <list> symbol is NOT the pattern separator symbol */
"percentSign",
- NULL, /* Native zero digit is deprecated from CLDR - get it from the numbering system */
- NULL, /* Pattern digit character is deprecated from CLDR - use # by default always */
+ nullptr, /* Native zero digit is deprecated from CLDR - get it from the numbering system */
+ nullptr, /* Pattern digit character is deprecated from CLDR - use # by default always */
"minusSign",
"plusSign",
- NULL, /* currency symbol - Wait until we know the currency before loading from CLDR */
- NULL, /* intl currency symbol - Wait until we know the currency before loading from CLDR */
+ nullptr, /* currency symbol - Wait until we know the currency before loading from CLDR */
+ nullptr, /* intl currency symbol - Wait until we know the currency before loading from CLDR */
"currencyDecimal",
"exponential",
"perMille",
- NULL, /* Escape padding character - not in CLDR */
+ nullptr, /* Escape padding character - not in CLDR */
"infinity",
"nan",
- NULL, /* Significant digit symbol - not in CLDR */
+ nullptr, /* Significant digit symbol - not in CLDR */
"currencyGroup",
- NULL, /* one digit - get it from the numbering system */
- NULL, /* two digit - get it from the numbering system */
- NULL, /* three digit - get it from the numbering system */
- NULL, /* four digit - get it from the numbering system */
- NULL, /* five digit - get it from the numbering system */
- NULL, /* six digit - get it from the numbering system */
- NULL, /* seven digit - get it from the numbering system */
- NULL, /* eight digit - get it from the numbering system */
- NULL, /* nine digit - get it from the numbering system */
+ nullptr, /* one digit - get it from the numbering system */
+ nullptr, /* two digit - get it from the numbering system */
+ nullptr, /* three digit - get it from the numbering system */
+ nullptr, /* four digit - get it from the numbering system */
+ nullptr, /* five digit - get it from the numbering system */
+ nullptr, /* six digit - get it from the numbering system */
+ nullptr, /* seven digit - get it from the numbering system */
+ nullptr, /* eight digit - get it from the numbering system */
+ nullptr, /* nine digit - get it from the numbering system */
"superscriptingExponent", /* Multiplication (x) symbol for exponents */
"approximatelySign" /* Approximately sign symbol */
};
@@ -99,34 +99,34 @@ static const char *gNumberElementKeys[DecimalFormatSymbols::kFormatSymbolCount]
// Initializes this with the decimal format symbols in the default locale.
DecimalFormatSymbols::DecimalFormatSymbols(UErrorCode& status)
- : UObject(), locale(), currPattern(NULL) {
- initialize(locale, status, TRUE);
+ : UObject(), locale() {
+ initialize(locale, status, true);
}
// -------------------------------------
// Initializes this with the decimal format symbols in the desired locale.
DecimalFormatSymbols::DecimalFormatSymbols(const Locale& loc, UErrorCode& status)
- : UObject(), locale(loc), currPattern(NULL) {
+ : UObject(), locale(loc) {
initialize(locale, status);
}
DecimalFormatSymbols::DecimalFormatSymbols(const Locale& loc, const NumberingSystem& ns, UErrorCode& status)
- : UObject(), locale(loc), currPattern(NULL) {
- initialize(locale, status, FALSE, &ns);
+ : UObject(), locale(loc) {
+ initialize(locale, status, false, &ns);
}
DecimalFormatSymbols::DecimalFormatSymbols()
- : UObject(), locale(Locale::getRoot()), currPattern(NULL) {
+ : UObject(), locale(Locale::getRoot()) {
*validLocale = *actualLocale = 0;
initialize();
}
DecimalFormatSymbols*
DecimalFormatSymbols::createWithLastResortData(UErrorCode& status) {
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
DecimalFormatSymbols* sym = new DecimalFormatSymbols();
- if (sym == NULL) {
+ if (sym == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
return sym;
@@ -169,6 +169,7 @@ DecimalFormatSymbols::operator=(const DecimalFormatSymbols& rhs)
fIsCustomIntlCurrencySymbol = rhs.fIsCustomIntlCurrencySymbol;
fCodePointZero = rhs.fCodePointZero;
currPattern = rhs.currPattern;
+ uprv_strcpy(nsName, rhs.nsName);
}
return *this;
}
@@ -227,7 +228,7 @@ struct DecFmtSymDataSink : public ResourceSink {
// Constructor/Destructor
DecFmtSymDataSink(DecimalFormatSymbols& _dfs) : dfs(_dfs) {
- uprv_memset(seenSymbol, FALSE, sizeof(seenSymbol));
+ uprv_memset(seenSymbol, false, sizeof(seenSymbol));
}
virtual ~DecFmtSymDataSink();
@@ -237,9 +238,9 @@ struct DecFmtSymDataSink : public ResourceSink {
if (U_FAILURE(errorCode)) { return; }
for (int32_t j = 0; symbolsTable.getKeyAndValue(j, key, value); ++j) {
for (int32_t i=0; i<DecimalFormatSymbols::kFormatSymbolCount; i++) {
- if (gNumberElementKeys[i] != NULL && uprv_strcmp(key, gNumberElementKeys[i]) == 0) {
+ if (gNumberElementKeys[i] != nullptr && uprv_strcmp(key, gNumberElementKeys[i]) == 0) {
if (!seenSymbol[i]) {
- seenSymbol[i] = TRUE;
+ seenSymbol[i] = true;
dfs.setSymbol(
(DecimalFormatSymbols::ENumberFormatSymbol) i,
value.getUnicodeString(errorCode));
@@ -255,10 +256,10 @@ struct DecFmtSymDataSink : public ResourceSink {
UBool seenAll() {
for (int32_t i=0; i<DecimalFormatSymbols::kFormatSymbolCount; i++) {
if (!seenSymbol[i]) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
// If monetary decimal or grouping were not explicitly set, then set them to be the
@@ -283,7 +284,7 @@ struct CurrencySpacingSink : public ResourceSink {
UBool hasAfterCurrency;
CurrencySpacingSink(DecimalFormatSymbols& _dfs)
- : dfs(_dfs), hasBeforeCurrency(FALSE), hasAfterCurrency(FALSE) {}
+ : dfs(_dfs), hasBeforeCurrency(false), hasAfterCurrency(false) {}
virtual ~CurrencySpacingSink();
virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
@@ -292,11 +293,11 @@ struct CurrencySpacingSink : public ResourceSink {
for (int32_t i = 0; spacingTypesTable.getKeyAndValue(i, key, value); ++i) {
UBool beforeCurrency;
if (uprv_strcmp(key, gBeforeCurrencyTag) == 0) {
- beforeCurrency = TRUE;
- hasBeforeCurrency = TRUE;
+ beforeCurrency = true;
+ hasBeforeCurrency = true;
} else if (uprv_strcmp(key, gAfterCurrencyTag) == 0) {
- beforeCurrency = FALSE;
- hasAfterCurrency = TRUE;
+ beforeCurrency = false;
+ hasAfterCurrency = true;
} else {
continue;
}
@@ -329,11 +330,13 @@ struct CurrencySpacingSink : public ResourceSink {
// both beforeCurrency and afterCurrency were found in CLDR.
static const char* defaults[] = { "[:letter:]", "[:digit:]", " " };
if (!hasBeforeCurrency || !hasAfterCurrency) {
- for (UBool beforeCurrency = 0; beforeCurrency <= TRUE; beforeCurrency++) {
- for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) {
- dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern,
- beforeCurrency, UnicodeString(defaults[pattern], -1, US_INV));
- }
+ for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) {
+ dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern,
+ false, UnicodeString(defaults[pattern], -1, US_INV));
+ }
+ for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) {
+ dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern,
+ true, UnicodeString(defaults[pattern], -1, US_INV));
}
}
}
@@ -381,12 +384,13 @@ DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status,
} else {
nsName = gLatn;
}
+ uprv_strcpy(this->nsName, nsName);
// Open resource bundles
const char* locStr = loc.getName();
- LocalUResourceBundlePointer resource(ures_open(NULL, locStr, &status));
+ LocalUResourceBundlePointer resource(ures_open(nullptr, locStr, &status));
LocalUResourceBundlePointer numberElementsRes(
- ures_getByKeyWithFallback(resource.getAlias(), gNumberElements, NULL, &status));
+ ures_getByKeyWithFallback(resource.getAlias(), gNumberElements, nullptr, &status));
if (U_FAILURE(status)) {
if ( useLastResortData ) {
@@ -457,7 +461,7 @@ DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status,
// Get the default currency from the currency API.
UErrorCode internalStatus = U_ZERO_ERROR; // don't propagate failures out
- UChar curriso[4];
+ char16_t curriso[4];
UnicodeString tempStr;
int32_t currisoLength = ucurr_forLocale(locStr, curriso, UPRV_LENGTHOF(curriso), &internalStatus);
if (U_SUCCESS(internalStatus) && currisoLength == 3) {
@@ -481,44 +485,44 @@ DecimalFormatSymbols::initialize() {
* cannot initialize a static array with class constructors.
* markus 2000may25
*/
- fSymbols[kDecimalSeparatorSymbol] = (UChar)0x2e; // '.' decimal separator
+ fSymbols[kDecimalSeparatorSymbol] = (char16_t)0x2e; // '.' decimal separator
fSymbols[kGroupingSeparatorSymbol].remove(); // group (thousands) separator
- fSymbols[kPatternSeparatorSymbol] = (UChar)0x3b; // ';' pattern separator
- fSymbols[kPercentSymbol] = (UChar)0x25; // '%' percent sign
- fSymbols[kZeroDigitSymbol] = (UChar)0x30; // '0' native 0 digit
- fSymbols[kOneDigitSymbol] = (UChar)0x31; // '1' native 1 digit
- fSymbols[kTwoDigitSymbol] = (UChar)0x32; // '2' native 2 digit
- fSymbols[kThreeDigitSymbol] = (UChar)0x33; // '3' native 3 digit
- fSymbols[kFourDigitSymbol] = (UChar)0x34; // '4' native 4 digit
- fSymbols[kFiveDigitSymbol] = (UChar)0x35; // '5' native 5 digit
- fSymbols[kSixDigitSymbol] = (UChar)0x36; // '6' native 6 digit
- fSymbols[kSevenDigitSymbol] = (UChar)0x37; // '7' native 7 digit
- fSymbols[kEightDigitSymbol] = (UChar)0x38; // '8' native 8 digit
- fSymbols[kNineDigitSymbol] = (UChar)0x39; // '9' native 9 digit
- fSymbols[kDigitSymbol] = (UChar)0x23; // '#' pattern digit
- fSymbols[kPlusSignSymbol] = (UChar)0x002b; // '+' plus sign
- fSymbols[kMinusSignSymbol] = (UChar)0x2d; // '-' minus sign
- fSymbols[kCurrencySymbol] = (UChar)0xa4; // 'OX' currency symbol
- fSymbols[kIntlCurrencySymbol].setTo(TRUE, INTL_CURRENCY_SYMBOL_STR, 2);
- fSymbols[kMonetarySeparatorSymbol] = (UChar)0x2e; // '.' monetary decimal separator
- fSymbols[kExponentialSymbol] = (UChar)0x45; // 'E' exponential
- fSymbols[kPerMillSymbol] = (UChar)0x2030; // '%o' per mill
- fSymbols[kPadEscapeSymbol] = (UChar)0x2a; // '*' pad escape symbol
- fSymbols[kInfinitySymbol] = (UChar)0x221e; // 'oo' infinite
- fSymbols[kNaNSymbol] = (UChar)0xfffd; // SUB NaN
- fSymbols[kSignificantDigitSymbol] = (UChar)0x0040; // '@' significant digit
+ fSymbols[kPatternSeparatorSymbol] = (char16_t)0x3b; // ';' pattern separator
+ fSymbols[kPercentSymbol] = (char16_t)0x25; // '%' percent sign
+ fSymbols[kZeroDigitSymbol] = (char16_t)0x30; // '0' native 0 digit
+ fSymbols[kOneDigitSymbol] = (char16_t)0x31; // '1' native 1 digit
+ fSymbols[kTwoDigitSymbol] = (char16_t)0x32; // '2' native 2 digit
+ fSymbols[kThreeDigitSymbol] = (char16_t)0x33; // '3' native 3 digit
+ fSymbols[kFourDigitSymbol] = (char16_t)0x34; // '4' native 4 digit
+ fSymbols[kFiveDigitSymbol] = (char16_t)0x35; // '5' native 5 digit
+ fSymbols[kSixDigitSymbol] = (char16_t)0x36; // '6' native 6 digit
+ fSymbols[kSevenDigitSymbol] = (char16_t)0x37; // '7' native 7 digit
+ fSymbols[kEightDigitSymbol] = (char16_t)0x38; // '8' native 8 digit
+ fSymbols[kNineDigitSymbol] = (char16_t)0x39; // '9' native 9 digit
+ fSymbols[kDigitSymbol] = (char16_t)0x23; // '#' pattern digit
+ fSymbols[kPlusSignSymbol] = (char16_t)0x002b; // '+' plus sign
+ fSymbols[kMinusSignSymbol] = (char16_t)0x2d; // '-' minus sign
+ fSymbols[kCurrencySymbol] = (char16_t)0xa4; // 'OX' currency symbol
+ fSymbols[kIntlCurrencySymbol].setTo(true, INTL_CURRENCY_SYMBOL_STR, 2);
+ fSymbols[kMonetarySeparatorSymbol] = (char16_t)0x2e; // '.' monetary decimal separator
+ fSymbols[kExponentialSymbol] = (char16_t)0x45; // 'E' exponential
+ fSymbols[kPerMillSymbol] = (char16_t)0x2030; // '%o' per mill
+ fSymbols[kPadEscapeSymbol] = (char16_t)0x2a; // '*' pad escape symbol
+ fSymbols[kInfinitySymbol] = (char16_t)0x221e; // 'oo' infinite
+ fSymbols[kNaNSymbol] = (char16_t)0xfffd; // SUB NaN
+ fSymbols[kSignificantDigitSymbol] = (char16_t)0x0040; // '@' significant digit
fSymbols[kMonetaryGroupingSeparatorSymbol].remove(); //
- fSymbols[kExponentMultiplicationSymbol] = (UChar)0xd7; // 'x' multiplication symbol for exponents
+ fSymbols[kExponentMultiplicationSymbol] = (char16_t)0xd7; // 'x' multiplication symbol for exponents
fSymbols[kApproximatelySignSymbol] = u'~'; // '~' approximately sign
- fIsCustomCurrencySymbol = FALSE;
- fIsCustomIntlCurrencySymbol = FALSE;
+ fIsCustomCurrencySymbol = false;
+ fIsCustomIntlCurrencySymbol = false;
fCodePointZero = 0x30;
U_ASSERT(fCodePointZero == fSymbols[kZeroDigitSymbol].char32At(0));
currPattern = nullptr;
-
+ nsName[0] = 0;
}
-void DecimalFormatSymbols::setCurrency(const UChar* currency, UErrorCode& status) {
+void DecimalFormatSymbols::setCurrency(const char16_t* currency, UErrorCode& status) {
// TODO: If this method is made public:
// - Adopt ICU4J behavior of not allowing currency to be null.
// - Also verify that the length of currency is 3.
@@ -541,7 +545,7 @@ void DecimalFormatSymbols::setCurrency(const UChar* currency, UErrorCode& status
UErrorCode localStatus = U_ZERO_ERROR;
LocalUResourceBundlePointer rbTop(ures_open(U_ICUDATA_CURR, locale.getName(), &localStatus));
LocalUResourceBundlePointer rb(
- ures_getByKeyWithFallback(rbTop.getAlias(), "Currencies", NULL, &localStatus));
+ ures_getByKeyWithFallback(rbTop.getAlias(), "Currencies", nullptr, &localStatus));
ures_getByKeyWithFallback(rb.getAlias(), cc, rb.getAlias(), &localStatus);
if(U_SUCCESS(localStatus) && ures_getSize(rb.getAlias())>2) { // the length is 3 if more data is present
ures_getByIndex(rb.getAlias(), 2, rb.getAlias(), &localStatus);
@@ -555,7 +559,7 @@ void DecimalFormatSymbols::setCurrency(const UChar* currency, UErrorCode& status
if(U_SUCCESS(localStatus)){
fSymbols[kMonetaryGroupingSeparatorSymbol] = groupingSep;
fSymbols[kMonetarySeparatorSymbol] = decimalSep;
- //pattern.setTo(TRUE, currPattern, currPatternLen);
+ //pattern.setTo(true, currPattern, currPatternLen);
}
}
/* else An explicit currency was requested and is unknown or locale data is malformed. */
diff --git a/contrib/libs/icu/i18n/decContext.cpp b/contrib/libs/icu/i18n/decContext.cpp
index 421d65b43f9..bdc5f22fe5f 100644
--- a/contrib/libs/icu/i18n/decContext.cpp
+++ b/contrib/libs/icu/i18n/decContext.cpp
@@ -219,7 +219,7 @@ U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatus(decContext *context, uIn
/* is raised if appropriate. */
/* */
/* returns the context structure, unless the string is equal to */
-/* DEC_Condition_MU or is not recognized. In these cases NULL is */
+/* DEC_Condition_MU or is not recognized. In these cases nullptr is */
/* returned. */
/* ------------------------------------------------------------------ */
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromString(decContext *context,
@@ -256,7 +256,7 @@ U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromString(decContext *co
return uprv_decContextSetStatus(context, DEC_Underflow);
if (strcmp(string, DEC_Condition_ZE)==0)
return context;
- return NULL; /* Multiple status, or unknown */
+ return nullptr; /* Multiple status, or unknown */
} /* decContextSetStatusFromString */
/* ------------------------------------------------------------------ */
@@ -270,7 +270,7 @@ U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromString(decContext *co
/* raised. */
/* */
/* returns the context structure, unless the string is equal to */
-/* DEC_Condition_MU or is not recognized. In these cases NULL is */
+/* DEC_Condition_MU or is not recognized. In these cases nullptr is */
/* returned. */
/* ------------------------------------------------------------------ */
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromStringQuiet(decContext *context,
@@ -307,7 +307,7 @@ U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromStringQuiet(decContex
return uprv_decContextSetStatusQuiet(context, DEC_Underflow);
if (strcmp(string, DEC_Condition_ZE)==0)
return context;
- return NULL; /* Multiple status, or unknown */
+ return nullptr; /* Multiple status, or unknown */
} /* decContextSetStatusFromStringQuiet */
/* ------------------------------------------------------------------ */
diff --git a/contrib/libs/icu/i18n/decContext.h b/contrib/libs/icu/i18n/decContext.h
index 59ab65e5927..91c6739739d 100644
--- a/contrib/libs/icu/i18n/decContext.h
+++ b/contrib/libs/icu/i18n/decContext.h
@@ -262,7 +262,6 @@
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromStringQuiet(decContext *, const char *);
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusQuiet(decContext *, uint32_t);
U_CAPI const char * U_EXPORT2 uprv_decContextStatusToString(const decContext *);
- U_CAPI int32_t U_EXPORT2 uprv_decContextTestEndian(uint8_t);
U_CAPI uint32_t U_EXPORT2 uprv_decContextTestSavedStatus(uint32_t, uint32_t);
U_CAPI uint32_t U_EXPORT2 uprv_decContextTestStatus(decContext *, uint32_t);
U_CAPI decContext * U_EXPORT2 uprv_decContextZeroStatus(decContext *);
diff --git a/contrib/libs/icu/i18n/decNumber.cpp b/contrib/libs/icu/i18n/decNumber.cpp
index 71477d8202c..42da36dc4be 100644
--- a/contrib/libs/icu/i18n/decNumber.cpp
+++ b/contrib/libs/icu/i18n/decNumber.cpp
@@ -95,11 +95,11 @@
/* conversions are available in separate modules. */
/* */
/* 7. Normally, input operands are assumed to be valid. Set DECCHECK */
-/* to 1 for extended operand checking (including NULL operands). */
-/* Results are undefined if a badly-formed structure (or a NULL */
+/* to 1 for extended operand checking (including nullptr operands). */
+/* Results are undefined if a badly-formed structure (or a nullptr */
/* pointer to a structure) is provided, though with DECCHECK */
/* enabled the operator routines are protected against exceptions. */
-/* (Except if the result pointer is NULL, which is unrecoverable.) */
+/* (Except if the result pointer is nullptr, which is unrecoverable.) */
/* */
/* However, the routines will never cause exceptions if they are */
/* given well-formed operands, even if the value of the operands */
@@ -516,11 +516,11 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
Unit *res; /* where result will be built */
Unit resbuff[SD2U(DECBUFFER+9)];/* local buffer in case need temporary */
/* [+9 allows for ln() constants] */
- Unit *allocres=NULL; /* -> allocated result, iff allocated */
+ Unit *allocres=nullptr; /* -> allocated result, iff allocated */
Int d=0; /* count of digits found in decimal part */
- const char *dotchar=NULL; /* where dot was found */
+ const char *dotchar=nullptr; /* where dot was found */
const char *cfirst=chars; /* -> first character of decimal part */
- const char *last=NULL; /* -> last digit of decimal part */
+ const char *last=nullptr; /* -> last digit of decimal part */
const char *c; /* work */
Unit *up; /* .. */
#if DECDPUN>1
@@ -541,7 +541,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
d++; /* count of real digits */
continue; /* still in decimal part */
}
- if (*c=='.' && dotchar==NULL) { /* first '.' */
+ if (*c=='.' && dotchar==nullptr) { /* first '.' */
dotchar=c; /* record offset into decimal part */
if (c==cfirst) cfirst++; /* first digit must follow */
continue;}
@@ -558,7 +558,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
break;
} /* c */
- if (last==NULL) { /* no digits yet */
+ if (last==nullptr) { /* no digits yet */
status=DEC_Conversion_syntax;/* assume the worst */
if (*c=='\0') break; /* and no more to come... */
#if DECSUBSET
@@ -566,7 +566,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
if (!set->extended) break; /* hopeless */
#endif
/* Infinities and NaNs are possible, here */
- if (dotchar!=NULL) break; /* .. unless had a dot */
+ if (dotchar!=nullptr) break; /* .. unless had a dot */
uprv_decNumberZero(dn); /* be optimistic */
if (decBiStr(c, "infinity", "INFINITY")
|| decBiStr(c, "inf", "INF")) {
@@ -609,7 +609,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
/* good; drop through to convert the integer to coefficient */
status=0; /* syntax is OK */
bits=dn->bits; /* for copy-back */
- } /* last==NULL */
+ } /* last==nullptr */
else if (*c!='\0') { /* more to process... */
/* had some digits; exponent is only valid sequence now */
@@ -667,7 +667,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
} /* at least one leading 0 */
/* Handle decimal point... */
- if (dotchar!=NULL && dotchar<last) /* non-trailing '.' found? */
+ if (dotchar!=nullptr && dotchar<last) /* non-trailing '.' found? */
exponent -= static_cast<int32_t>(last-dotchar); /* adjust exponent */
/* [we can now ignore the .] */
@@ -679,7 +679,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
res=resbuff; /* assume use local buffer */
if (needbytes>(Int)sizeof(resbuff)) { /* too big for local */
allocres=(Unit *)malloc(needbytes);
- if (allocres==NULL) {status|=DEC_Insufficient_storage; break;}
+ if (allocres==nullptr) {status|=DEC_Insufficient_storage; break;}
res=allocres;
}
}
@@ -736,7 +736,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFromString(decNumber *dn, const char
/* decNumberShow(dn); */
} while(0); /* [for break] */
- if (allocres!=NULL) free(allocres); /* drop any storage used */
+ if (allocres!=nullptr) free(allocres); /* drop any storage used */
if (status!=0) decStatus(dn, status, set);
return dn;
} /* decNumberFromString */
@@ -953,9 +953,9 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareTotalMag(decNumber *res, const
uInt status=0; /* accumulator */
uInt needbytes; /* for space calculations */
decNumber bufa[D2N(DECBUFFER+1)];/* +1 in case DECBUFFER=0 */
- decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufa=nullptr; /* -> allocated bufa, iff allocated */
decNumber bufb[D2N(DECBUFFER+1)];
- decNumber *allocbufb=NULL; /* -> allocated bufb, iff allocated */
+ decNumber *allocbufb=nullptr; /* -> allocated bufb, iff allocated */
decNumber *a, *b; /* temporary pointers */
#if DECCHECK
@@ -969,7 +969,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareTotalMag(decNumber *res, const
needbytes=sizeof(decNumber)+(D2U(lhs->digits)-1)*sizeof(Unit);
if (needbytes>sizeof(bufa)) { /* need malloc space */
allocbufa=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL) { /* hopeless -- abandon */
+ if (allocbufa==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
a=allocbufa; /* use the allocated space */
@@ -983,7 +983,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareTotalMag(decNumber *res, const
needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit);
if (needbytes>sizeof(bufb)) { /* need malloc space */
allocbufb=(decNumber *)malloc(needbytes);
- if (allocbufb==NULL) { /* hopeless -- abandon */
+ if (allocbufb==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
b=allocbufb; /* use the allocated space */
@@ -995,8 +995,8 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberCompareTotalMag(decNumber *res, const
decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status);
} while(0); /* end protected */
- if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
- if (allocbufb!=NULL) free(allocbufb); /* .. */
+ if (allocbufa!=nullptr) free(allocbufa); /* drop any storage used */
+ if (allocbufb!=nullptr) free(allocbufb); /* .. */
if (status!=0) decStatus(res, status, set);
return res;
} /* decNumberCompareTotalMag */
@@ -1073,7 +1073,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberExp(decNumber *res, const decNumber *
decContext *set) {
uInt status=0; /* accumulator */
#if DECSUBSET
- decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */
+ decNumber *allocrhs=nullptr; /* non-nullptr if rounded rhs allocated */
#endif
#if DECCHECK
@@ -1090,7 +1090,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberExp(decNumber *res, const decNumber *
/* reduce operand and set lostDigits status, as needed */
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, &status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -1099,7 +1099,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberExp(decNumber *res, const decNumber *
} while(0); /* end protected */
#if DECSUBSET
- if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */
+ if (allocrhs !=nullptr) free(allocrhs); /* drop any storage used */
#endif
/* apply significant status */
if (status!=0) decStatus(res, status, set);
@@ -1132,7 +1132,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFMA(decNumber *res, const decNumber *
decContext dcmul; /* context for the multiplication */
uInt needbytes; /* for space calculations */
decNumber bufa[D2N(DECBUFFER*2+1)];
- decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufa=nullptr; /* -> allocated bufa, iff allocated */
decNumber *acc; /* accumulator pointer */
decNumber dzero; /* work */
@@ -1162,7 +1162,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFMA(decNumber *res, const decNumber *
needbytes=sizeof(decNumber)+(D2U(dcmul.digits)-1)*sizeof(Unit);
if (needbytes>sizeof(bufa)) { /* need malloc space */
allocbufa=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL) { /* hopeless -- abandon */
+ if (allocbufa==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
acc=allocbufa; /* use the allocated space */
@@ -1194,7 +1194,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberFMA(decNumber *res, const decNumber *
decAddOp(res, acc, fhs, set, 0, &status);
} while(0); /* end protected */
- if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
+ if (allocbufa!=nullptr) free(allocbufa); /* drop any storage used */
if (status!=0) decStatus(res, status, set);
#if DECCHECK
decCheckInexact(res, set);
@@ -1293,7 +1293,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLn(decNumber *res, const decNumber *r
decContext *set) {
uInt status=0; /* accumulator */
#if DECSUBSET
- decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */
+ decNumber *allocrhs=nullptr; /* non-nullptr if rounded rhs allocated */
#endif
#if DECCHECK
@@ -1308,7 +1308,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLn(decNumber *res, const decNumber *r
/* reduce operand and set lostDigits status, as needed */
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, &status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
/* special check in subset for rhs=0 */
@@ -1321,7 +1321,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLn(decNumber *res, const decNumber *r
} while(0); /* end protected */
#if DECSUBSET
- if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */
+ if (allocrhs !=nullptr) free(allocrhs); /* drop any storage used */
#endif
/* apply significant status */
if (status!=0) decStatus(res, status, set);
@@ -1364,7 +1364,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLogB(decNumber *res, const decNumber
#endif
/* NaNs as usual; Infinities return +Infinity; 0->oops */
- if (decNumberIsNaN(rhs)) decNaNs(res, rhs, NULL, set, &status);
+ if (decNumberIsNaN(rhs)) decNaNs(res, rhs, nullptr, set, &status);
else if (decNumberIsInfinite(rhs)) uprv_decNumberCopyAbs(res, rhs);
else if (decNumberIsZero(rhs)) {
uprv_decNumberZero(res); /* prepare for Infinity */
@@ -1425,15 +1425,15 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLog10(decNumber *res, const decNumber
/* buffers for a and b working decimals */
/* (adjustment calculator, same size) */
decNumber bufa[D2N(DECBUFFER+2)];
- decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufa=nullptr; /* -> allocated bufa, iff allocated */
decNumber *a=bufa; /* temporary a */
decNumber bufb[D2N(DECBUFFER+2)];
- decNumber *allocbufb=NULL; /* -> allocated bufb, iff allocated */
+ decNumber *allocbufb=nullptr; /* -> allocated bufb, iff allocated */
decNumber *b=bufb; /* temporary b */
decNumber bufw[D2N(10)]; /* working 2-10 digit number */
decNumber *w=bufw; /* .. */
#if DECSUBSET
- decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */
+ decNumber *allocrhs=nullptr; /* non-nullptr if rounded rhs allocated */
#endif
decContext aset; /* working context */
@@ -1450,7 +1450,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLog10(decNumber *res, const decNumber
/* reduce operand and set lostDigits status, as needed */
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, &status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
/* special check in subset for rhs=0 */
@@ -1495,7 +1495,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLog10(decNumber *res, const decNumber
needbytes=sizeof(decNumber)+(D2U(p)-1)*sizeof(Unit);
if (needbytes>sizeof(bufa)) { /* need malloc space */
allocbufa=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL) { /* hopeless -- abandon */
+ if (allocbufa==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
a=allocbufa; /* use the allocated space */
@@ -1518,7 +1518,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLog10(decNumber *res, const decNumber
needbytes=sizeof(decNumber)+(D2U(p)-1)*sizeof(Unit);
if (needbytes>sizeof(bufb)) { /* need malloc space */
allocbufb=(decNumber *)malloc(needbytes);
- if (allocbufb==NULL) { /* hopeless -- abandon */
+ if (allocbufb==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
b=allocbufb; /* use the allocated space */
@@ -1538,10 +1538,10 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberLog10(decNumber *res, const decNumber
decDivideOp(res, a, b, &aset, DIVIDE, &status); /* into result */
} while(0); /* [for break] */
- if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
- if (allocbufb!=NULL) free(allocbufb); /* .. */
+ if (allocbufa!=nullptr) free(allocbufa); /* drop any storage used */
+ if (allocbufb!=nullptr) free(allocbufb); /* .. */
#if DECSUBSET
- if (allocrhs !=NULL) free(allocrhs); /* .. */
+ if (allocrhs !=nullptr) free(allocrhs); /* .. */
#endif
/* apply significant status */
if (status!=0) decStatus(res, status, set);
@@ -1974,11 +1974,11 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberMultiply(decNumber *res, const decNum
U_CAPI decNumber * U_EXPORT2 uprv_decNumberPower(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
#if DECSUBSET
- decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
- decNumber *allocrhs=NULL; /* .., rhs */
+ decNumber *alloclhs=nullptr; /* non-nullptr if rounded lhs allocated */
+ decNumber *allocrhs=nullptr; /* .., rhs */
#endif
- decNumber *allocdac=NULL; /* -> allocated acc buffer, iff used */
- decNumber *allocinv=NULL; /* -> allocated 1/x buffer, iff used */
+ decNumber *allocdac=nullptr; /* -> allocated acc buffer, iff used */
+ decNumber *allocinv=nullptr; /* -> allocated 1/x buffer, iff used */
Int reqdigits=set->digits; /* requested DIGITS */
Int n; /* rhs in binary */
Flag rhsint=0; /* 1 if rhs is an integer */
@@ -2010,12 +2010,12 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberPower(decNumber *res, const decNumber
if (!set->extended) { /* reduce operands and set status, as needed */
if (lhs->digits>reqdigits) {
alloclhs=decRoundOperand(lhs, set, &status);
- if (alloclhs==NULL) break;
+ if (alloclhs==nullptr) break;
lhs=alloclhs;
}
if (rhs->digits>reqdigits) {
allocrhs=decRoundOperand(rhs, set, &status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -2166,7 +2166,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberPower(decNumber *res, const decNumber
/* [needbytes also used below if 1/lhs needed] */
if (needbytes>sizeof(dacbuff)) {
allocdac=(decNumber *)malloc(needbytes);
- if (allocdac==NULL) { /* hopeless -- abandon */
+ if (allocdac==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
dac=allocdac; /* use the allocated space */
@@ -2213,7 +2213,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberPower(decNumber *res, const decNumber
/* now locate or allocate space for the inverted lhs */
if (needbytes>sizeof(invbuff)) {
allocinv=(decNumber *)malloc(needbytes);
- if (allocinv==NULL) { /* hopeless -- abandon */
+ if (allocinv==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
inv=allocinv; /* use the allocated space */
@@ -2285,11 +2285,11 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberPower(decNumber *res, const decNumber
#endif
} while(0); /* end protected */
- if (allocdac!=NULL) free(allocdac); /* drop any storage used */
- if (allocinv!=NULL) free(allocinv); /* .. */
+ if (allocdac!=nullptr) free(allocdac); /* drop any storage used */
+ if (allocinv!=nullptr) free(allocinv); /* .. */
#if DECSUBSET
- if (alloclhs!=NULL) free(alloclhs); /* .. */
- if (allocrhs!=NULL) free(allocrhs); /* .. */
+ if (alloclhs!=nullptr) free(alloclhs); /* .. */
+ if (allocrhs!=nullptr) free(allocrhs); /* .. */
#endif
if (status!=0) decStatus(res, status, set);
#if DECCHECK
@@ -2344,7 +2344,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberNormalize(decNumber *res, const decNu
U_CAPI decNumber * U_EXPORT2 uprv_decNumberReduce(decNumber *res, const decNumber *rhs,
decContext *set) {
#if DECSUBSET
- decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */
+ decNumber *allocrhs=nullptr; /* non-nullptr if rounded rhs allocated */
#endif
uInt status=0; /* as usual */
Int residue=0; /* as usual */
@@ -2360,7 +2360,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberReduce(decNumber *res, const decNumbe
/* reduce operand and set lostDigits status, as needed */
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, &status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -2369,7 +2369,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberReduce(decNumber *res, const decNumbe
/* Infinities copy through; NaNs need usual treatment */
if (decNumberIsNaN(rhs)) {
- decNaNs(res, rhs, NULL, set, &status);
+ decNaNs(res, rhs, nullptr, set, &status);
break;
}
@@ -2381,7 +2381,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberReduce(decNumber *res, const decNumbe
} while(0); /* end protected */
#if DECSUBSET
- if (allocrhs !=NULL) free(allocrhs); /* .. */
+ if (allocrhs !=nullptr) free(allocrhs); /* .. */
#endif
if (status!=0) decStatus(res, status, set);/* then report status */
return res;
@@ -2845,7 +2845,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
Int dropped; /* .. */
#if DECSUBSET
- decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */
+ decNumber *allocrhs=nullptr; /* non-nullptr if rounded rhs allocated */
#endif
/* buffer for f [needs +1 in case DECBUFFER 0] */
decNumber buff[D2N(DECBUFFER+1)];
@@ -2853,9 +2853,9 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
decNumber bufa[D2N(DECBUFFER+2)];
/* buffer for temporary, b [must be same size as a] */
decNumber bufb[D2N(DECBUFFER+2)];
- decNumber *allocbuff=NULL; /* -> allocated buff, iff allocated */
- decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
- decNumber *allocbufb=NULL; /* -> allocated bufb, iff allocated */
+ decNumber *allocbuff=nullptr; /* -> allocated buff, iff allocated */
+ decNumber *allocbufa=nullptr; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufb=nullptr; /* -> allocated bufb, iff allocated */
decNumber *f=buff; /* reduced fraction */
decNumber *a=bufa; /* approximation to result */
decNumber *b=bufb; /* intermediate result */
@@ -2873,7 +2873,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
/* reduce operand and set lostDigits status, as needed */
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, &status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
/* [Note: 'f' allocation below could reuse this buffer if */
/* used, but as this is rare they are kept separate for clarity.] */
rhs=allocrhs;
@@ -2888,7 +2888,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
if (decNumberIsNegative(rhs)) status|=DEC_Invalid_operation;
else uprv_decNumberCopy(res, rhs); /* +Infinity */
}
- else decNaNs(res, rhs, NULL, set, &status); /* a NaN */
+ else decNaNs(res, rhs, nullptr, set, &status); /* a NaN */
break;
}
@@ -2926,7 +2926,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit);
if (needbytes>(Int)sizeof(buff)) {
allocbuff=(decNumber *)malloc(needbytes);
- if (allocbuff==NULL) { /* hopeless -- abandon */
+ if (allocbuff==nullptr) { /* hopeless -- abandon */
status|=DEC_Insufficient_storage;
break;}
f=allocbuff; /* use the allocated space */
@@ -2936,7 +2936,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
if (needbytes>(Int)sizeof(bufa)) { /* [same applies to b] */
allocbufa=(decNumber *)malloc(needbytes);
allocbufb=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL || allocbufb==NULL) { /* hopeless */
+ if (allocbufa==nullptr || allocbufb==nullptr) { /* hopeless */
status|=DEC_Insufficient_storage;
break;}
a=allocbufa; /* use the allocated spaces */
@@ -3147,11 +3147,11 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberSquareRoot(decNumber *res, const decN
uprv_decNumberCopy(res, a); /* a is now the result */
} while(0); /* end protected */
- if (allocbuff!=NULL) free(allocbuff); /* drop any storage used */
- if (allocbufa!=NULL) free(allocbufa); /* .. */
- if (allocbufb!=NULL) free(allocbufb); /* .. */
+ if (allocbuff!=nullptr) free(allocbuff); /* drop any storage used */
+ if (allocbufa!=nullptr) free(allocbufa); /* .. */
+ if (allocbufb!=nullptr) free(allocbufb); /* .. */
#if DECSUBSET
- if (allocrhs !=NULL) free(allocrhs); /* .. */
+ if (allocrhs !=nullptr) free(allocrhs); /* .. */
#endif
if (status!=0) decStatus(res, status, set);/* then report status */
#if DECCHECK
@@ -3221,7 +3221,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberToIntegralExact(decNumber *res, const
/* handle infinities and NaNs */
if (SPECIALARG) {
if (decNumberIsInfinite(rhs)) uprv_decNumberCopy(res, rhs); /* an Infinity */
- else decNaNs(res, rhs, NULL, set, &status); /* a NaN */
+ else decNaNs(res, rhs, nullptr, set, &status); /* a NaN */
}
else { /* finite */
/* have a finite number; no error possible (res must be big enough) */
@@ -3385,7 +3385,7 @@ const char *uprv_decNumberClassToString(enum decClass eclass) {
U_CAPI decNumber * U_EXPORT2 uprv_decNumberCopy(decNumber *dest, const decNumber *src) {
#if DECCHECK
- if (src==NULL) return uprv_decNumberZero(dest);
+ if (src==nullptr) return uprv_decNumberZero(dest);
#endif
if (dest==src) return dest; /* no copy required */
@@ -3605,7 +3605,7 @@ U_CAPI decNumber * U_EXPORT2 uprv_decNumberTrim(decNumber *dn) {
/* */
/* No error is possible. */
/* ------------------------------------------------------------------ */
-const char * uprv_decNumberVersion(void) {
+const char * uprv_decNumberVersion() {
return DECVERSION;
} /* decNumberVersion */
@@ -3837,8 +3837,8 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set,
uByte negate, uInt *status) {
#if DECSUBSET
- decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
- decNumber *allocrhs=NULL; /* .., rhs */
+ decNumber *alloclhs=nullptr; /* non-nullptr if rounded lhs allocated */
+ decNumber *allocrhs=nullptr; /* .., rhs */
#endif
Int rhsshift; /* working shift (in Units) */
Int maxdigits; /* longest logical length */
@@ -3850,7 +3850,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
Unit accbuff[SD2U(DECBUFFER*2+20)]; /* local buffer [*2+20 reduces many */
/* allocations when called from */
/* other operations, notable exp] */
- Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */
+ Unit *allocacc=nullptr; /* -> allocated acc buffer, iff allocated */
Int reqdigits=set->digits; /* local copy; requested DIGITS */
Int padding; /* work */
@@ -3864,12 +3864,12 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* reduce operands and set lostDigits status, as needed */
if (lhs->digits>reqdigits) {
alloclhs=decRoundOperand(lhs, set, status);
- if (alloclhs==NULL) break;
+ if (alloclhs==nullptr) break;
lhs=alloclhs;
}
if (rhs->digits>reqdigits) {
allocrhs=decRoundOperand(rhs, set, status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -4075,7 +4075,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
if (need*sizeof(Unit)>sizeof(accbuff)) {
/* printf("malloc add %ld %ld\n", need, sizeof(accbuff)); */
allocacc=(Unit *)malloc(need*sizeof(Unit));
- if (allocacc==NULL) { /* hopeless -- abandon */
+ if (allocacc==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
acc=allocacc;
@@ -4171,10 +4171,10 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
}
} while(0); /* end protected */
- if (allocacc!=NULL) free(allocacc); /* drop any storage used */
+ if (allocacc!=nullptr) free(allocacc); /* drop any storage used */
#if DECSUBSET
- if (allocrhs!=NULL) free(allocrhs); /* .. */
- if (alloclhs!=NULL) free(alloclhs); /* .. */
+ if (allocrhs!=nullptr) free(allocrhs); /* .. */
+ if (alloclhs!=nullptr) free(alloclhs); /* .. */
#endif
return res;
} /* decAddOp */
@@ -4253,12 +4253,12 @@ static decNumber * decDivideOp(decNumber *res,
const decNumber *lhs, const decNumber *rhs,
decContext *set, Flag op, uInt *status) {
#if DECSUBSET
- decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
- decNumber *allocrhs=NULL; /* .., rhs */
+ decNumber *alloclhs=nullptr; /* non-nullptr if rounded lhs allocated */
+ decNumber *allocrhs=nullptr; /* .., rhs */
#endif
Unit accbuff[SD2U(DECBUFFER+DECDPUN+10)]; /* local buffer */
Unit *acc=accbuff; /* -> accumulator array for result */
- Unit *allocacc=NULL; /* -> allocated buffer, iff allocated */
+ Unit *allocacc=nullptr; /* -> allocated buffer, iff allocated */
Unit *accnext; /* -> where next digit will go */
Int acclength; /* length of acc needed [Units] */
Int accunits; /* count of units accumulated */
@@ -4266,7 +4266,7 @@ static decNumber * decDivideOp(decNumber *res,
Unit varbuff[SD2U(DECBUFFER*2+DECDPUN)]; /* buffer for var1 */
Unit *var1=varbuff; /* -> var1 array for long subtraction */
- Unit *varalloc=NULL; /* -> allocated buffer, iff used */
+ Unit *varalloc=nullptr; /* -> allocated buffer, iff used */
Unit *msu1; /* -> msu of var1 */
const Unit *var2; /* -> var2 array */
@@ -4303,12 +4303,12 @@ static decNumber * decDivideOp(decNumber *res,
/* reduce operands and set lostDigits status, as needed */
if (lhs->digits>reqdigits) {
alloclhs=decRoundOperand(lhs, set, status);
- if (alloclhs==NULL) break;
+ if (alloclhs==nullptr) break;
lhs=alloclhs;
}
if (rhs->digits>reqdigits) {
allocrhs=decRoundOperand(rhs, set, status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -4440,7 +4440,7 @@ static decNumber * decDivideOp(decNumber *res,
if (acclength*sizeof(Unit)>sizeof(accbuff)) {
/* printf("malloc dvacc %ld units\n", acclength); */
allocacc=(Unit *)malloc(acclength*sizeof(Unit));
- if (allocacc==NULL) { /* hopeless -- abandon */
+ if (allocacc==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
acc=allocacc; /* use the allocated space */
@@ -4465,7 +4465,7 @@ static decNumber * decDivideOp(decNumber *res,
if ((var1units+1)*sizeof(Unit)>sizeof(varbuff)) {
/* printf("malloc dvvar %ld units\n", var1units+1); */
varalloc=(Unit *)malloc((var1units+1)*sizeof(Unit));
- if (varalloc==NULL) { /* hopeless -- abandon */
+ if (varalloc==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
var1=varalloc; /* use the allocated space */
@@ -4823,11 +4823,11 @@ static decNumber * decDivideOp(decNumber *res,
#endif
} while(0); /* end protected */
- if (varalloc!=NULL) free(varalloc); /* drop any storage used */
- if (allocacc!=NULL) free(allocacc); /* .. */
+ if (varalloc!=nullptr) free(varalloc); /* drop any storage used */
+ if (allocacc!=nullptr) free(allocacc); /* .. */
#if DECSUBSET
- if (allocrhs!=NULL) free(allocrhs); /* .. */
- if (alloclhs!=NULL) free(alloclhs); /* .. */
+ if (allocrhs!=nullptr) free(allocrhs); /* .. */
+ if (alloclhs!=nullptr) free(alloclhs); /* .. */
#endif
return res;
} /* decDivideOp */
@@ -4878,7 +4878,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
uByte bits; /* result sign */
Unit *acc; /* -> accumulator Unit array */
Int needbytes; /* size calculator */
- void *allocacc=NULL; /* -> allocated accumulator, iff allocated */
+ void *allocacc=nullptr; /* -> allocated accumulator, iff allocated */
Unit accbuff[SD2U(DECBUFFER*4+1)]; /* buffer (+1 for DECBUFFER==0, */
/* *4 for calls from other operations) */
const Unit *mer, *mermsup; /* work */
@@ -4902,10 +4902,10 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* lazy carry evaluation */
uInt zlhibuff[(DECBUFFER*2+1)/8+1]; /* buffer (+1 for DECBUFFER==0) */
uInt *zlhi=zlhibuff; /* -> lhs array */
- uInt *alloclhi=NULL; /* -> allocated buffer, iff allocated */
+ uInt *alloclhi=nullptr; /* -> allocated buffer, iff allocated */
uInt zrhibuff[(DECBUFFER*2+1)/8+1]; /* buffer (+1 for DECBUFFER==0) */
uInt *zrhi=zrhibuff; /* -> rhs array */
- uInt *allocrhi=NULL; /* -> allocated buffer, iff allocated */
+ uInt *allocrhi=nullptr; /* -> allocated buffer, iff allocated */
uLong zaccbuff[(DECBUFFER*2+1)/4+2]; /* buffer (+1 for DECBUFFER==0) */
/* [allocacc is shared for both paths, as only one will run] */
uLong *zacc=zaccbuff; /* -> accumulator array for exact result */
@@ -4926,8 +4926,8 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
#endif
#if DECSUBSET
- decNumber *alloclhs=NULL; /* -> allocated buffer, iff allocated */
- decNumber *allocrhs=NULL; /* -> allocated buffer, iff allocated */
+ decNumber *alloclhs=nullptr; /* -> allocated buffer, iff allocated */
+ decNumber *allocrhs=nullptr; /* -> allocated buffer, iff allocated */
#endif
#if DECCHECK
@@ -4967,12 +4967,12 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* reduce operands and set lostDigits status, as needed */
if (lhs->digits>set->digits) {
alloclhs=decRoundOperand(lhs, set, status);
- if (alloclhs==NULL) break;
+ if (alloclhs==nullptr) break;
lhs=alloclhs;
}
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -5018,7 +5018,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
if (needbytes>(Int)sizeof(zaccbuff)) {
allocacc=(uLong *)malloc(needbytes);
zacc=(uLong *)allocacc;}
- if (zlhi==NULL||zrhi==NULL||zacc==NULL) {
+ if (zlhi==nullptr||zrhi==nullptr||zacc==nullptr) {
*status|=DEC_Insufficient_storage;
break;}
@@ -5113,7 +5113,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
needbytes=(D2U(lhs->digits)+D2U(rhs->digits))*sizeof(Unit);
if (needbytes>(Int)sizeof(accbuff)) {
allocacc=(Unit *)malloc(needbytes);
- if (allocacc==NULL) {*status|=DEC_Insufficient_storage; break;}
+ if (allocacc==nullptr) {*status|=DEC_Insufficient_storage; break;}
acc=(Unit *)allocacc; /* use the allocated space */
}
@@ -5172,14 +5172,14 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
decFinish(res, set, &residue, status); /* final cleanup */
} while(0); /* end protected */
- if (allocacc!=NULL) free(allocacc); /* drop any storage used */
+ if (allocacc!=nullptr) free(allocacc); /* drop any storage used */
#if DECSUBSET
- if (allocrhs!=NULL) free(allocrhs); /* .. */
- if (alloclhs!=NULL) free(alloclhs); /* .. */
+ if (allocrhs!=nullptr) free(allocrhs); /* .. */
+ if (alloclhs!=nullptr) free(alloclhs); /* .. */
#endif
#if FASTMUL
- if (allocrhi!=NULL) free(allocrhi); /* .. */
- if (alloclhi!=NULL) free(alloclhi); /* .. */
+ if (allocrhi!=nullptr) free(allocrhi); /* .. */
+ if (alloclhi!=nullptr) free(alloclhi); /* .. */
#endif
return res;
} /* decMultiplyOp */
@@ -5278,7 +5278,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* is treated like other buffers, using DECBUFFER, +1 in case */
/* DECBUFFER is 0 */
decNumber bufr[D2N(DECBUFFER*2+1)];
- decNumber *allocrhs=NULL; /* non-NULL if rhs buffer allocated */
+ decNumber *allocrhs=nullptr; /* non-nullptr if rhs buffer allocated */
/* the working precision will be no more than set->digits+8+1 */
/* so for on-stack buffers DECBUFFER+9 is used, +1 in case DECBUFFER */
@@ -5286,11 +5286,11 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* buffer for t, term (working precision plus) */
decNumber buft[D2N(DECBUFFER*2+9+1)];
- decNumber *allocbuft=NULL; /* -> allocated buft, iff allocated */
+ decNumber *allocbuft=nullptr; /* -> allocated buft, iff allocated */
decNumber *t=buft; /* term */
/* buffer for a, accumulator (working precision * 2), at least 9 */
decNumber bufa[D2N(DECBUFFER*4+18+1)];
- decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufa=nullptr; /* -> allocated bufa, iff allocated */
decNumber *a=bufa; /* accumulator */
/* decNumber for the divisor term; this needs at most 9 digits */
/* and so can be fixed size [16 so can use standard context] */
@@ -5310,7 +5310,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
uprv_decNumberZero(res);
else uprv_decNumberCopy(res, rhs); /* +Infinity -> self */
}
- else decNaNs(res, rhs, NULL, set, status); /* a NaN */
+ else decNaNs(res, rhs, nullptr, set, status); /* a NaN */
break;}
if (ISZERO(rhs)) { /* zeros -> exact 1 */
@@ -5400,7 +5400,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit);
if (needbytes>sizeof(bufr)) { /* need malloc space */
allocrhs=(decNumber *)malloc(needbytes);
- if (allocrhs==NULL) { /* hopeless -- abandon */
+ if (allocrhs==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
newrhs=allocrhs; /* use the allocated space */
@@ -5432,7 +5432,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
needbytes=sizeof(decNumber)+(D2U(p*2)-1)*sizeof(Unit);
if (needbytes>sizeof(bufa)) { /* need malloc space */
allocbufa=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL) { /* hopeless -- abandon */
+ if (allocbufa==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
a=allocbufa; /* use the allocated space */
@@ -5444,7 +5444,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
needbytes=sizeof(decNumber)+(D2U(p+2)-1)*sizeof(Unit);
if (needbytes>sizeof(buft)) { /* need malloc space */
allocbuft=(decNumber *)malloc(needbytes);
- if (allocbuft==NULL) { /* hopeless -- abandon */
+ if (allocbuft==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
t=allocbuft; /* use the allocated space */
@@ -5528,9 +5528,9 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
decFinish(res, set, &residue, status); /* cleanup/set flags */
} while(0); /* end protected */
- if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */
- if (allocbufa!=NULL) free(allocbufa); /* .. */
- if (allocbuft!=NULL) free(allocbuft); /* .. */
+ if (allocrhs !=nullptr) free(allocrhs); /* drop any storage used */
+ if (allocbufa!=nullptr) free(allocbufa); /* .. */
+ if (allocbuft!=nullptr) free(allocbuft); /* .. */
/* [status is handled by caller] */
return res;
} /* decExpOp */
@@ -5640,10 +5640,10 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
/* buffers for a (accumulator, typically precision+2) and b */
/* (adjustment calculator, same size) */
decNumber bufa[D2N(DECBUFFER+12)];
- decNumber *allocbufa=NULL; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufa=nullptr; /* -> allocated bufa, iff allocated */
decNumber *a=bufa; /* accumulator/work */
decNumber bufb[D2N(DECBUFFER*2+2)];
- decNumber *allocbufb=NULL; /* -> allocated bufa, iff allocated */
+ decNumber *allocbufb=nullptr; /* -> allocated bufa, iff allocated */
decNumber *b=bufb; /* adjustment/work */
decNumber numone; /* constant 1 */
@@ -5662,7 +5662,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
*status|=DEC_Invalid_operation;
else uprv_decNumberCopy(res, rhs); /* +Infinity -> self */
}
- else decNaNs(res, rhs, NULL, set, status); /* a NaN */
+ else decNaNs(res, rhs, nullptr, set, status); /* a NaN */
break;}
if (ISZERO(rhs)) { /* +/- zeros -> -Infinity */
@@ -5713,7 +5713,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
needbytes=sizeof(decNumber)+(D2U(MAXI(p,16))-1)*sizeof(Unit);
if (needbytes>sizeof(bufa)) { /* need malloc space */
allocbufa=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL) { /* hopeless -- abandon */
+ if (allocbufa==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
a=allocbufa; /* use the allocated space */
@@ -5722,7 +5722,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
needbytes=sizeof(decNumber)+(D2U(MAXI(pp,16))-1)*sizeof(Unit);
if (needbytes>sizeof(bufb)) { /* need malloc space */
allocbufb=(decNumber *)malloc(needbytes);
- if (allocbufb==NULL) { /* hopeless -- abandon */
+ if (allocbufb==nullptr) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
b=allocbufb; /* use the allocated space */
@@ -5843,8 +5843,8 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
decFinish(res, set, &residue, status); /* cleanup/set flags */
} while(0); /* end protected */
- if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
- if (allocbufb!=NULL) free(allocbufb); /* .. */
+ if (allocbufa!=nullptr) free(allocbufa); /* drop any storage used */
+ if (allocbufb!=nullptr) free(allocbufb); /* .. */
/* [status is handled by caller] */
return res;
} /* decLnOp */
@@ -5878,8 +5878,8 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set,
Flag quant, uInt *status) {
#if DECSUBSET
- decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
- decNumber *allocrhs=NULL; /* .., rhs */
+ decNumber *alloclhs=nullptr; /* non-nullptr if rounded lhs allocated */
+ decNumber *allocrhs=nullptr; /* .., rhs */
#endif
const decNumber *inrhs=rhs; /* save original rhs */
Int reqdigits=set->digits; /* requested DIGITS */
@@ -5897,12 +5897,12 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
/* reduce operands and set lostDigits status, as needed */
if (lhs->digits>reqdigits) {
alloclhs=decRoundOperand(lhs, set, status);
- if (alloclhs==NULL) break;
+ if (alloclhs==nullptr) break;
lhs=alloclhs;
}
if (rhs->digits>reqdigits) { /* [this only checks lostDigits] */
allocrhs=decRoundOperand(rhs, set, status);
- if (allocrhs==NULL) break;
+ if (allocrhs==nullptr) break;
rhs=allocrhs;
}
}
@@ -6011,8 +6011,8 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
} while(0); /* end protected */
#if DECSUBSET
- if (allocrhs!=NULL) free(allocrhs); /* drop any storage used */
- if (alloclhs!=NULL) free(alloclhs); /* .. */
+ if (allocrhs!=nullptr) free(allocrhs); /* drop any storage used */
+ if (alloclhs!=nullptr) free(alloclhs); /* .. */
#endif
return res;
} /* decQuantizeOp */
@@ -6051,8 +6051,8 @@ static decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set,
Flag op, uInt *status) {
#if DECSUBSET
- decNumber *alloclhs=NULL; /* non-NULL if rounded lhs allocated */
- decNumber *allocrhs=NULL; /* .., rhs */
+ decNumber *alloclhs=nullptr; /* non-nullptr if rounded lhs allocated */
+ decNumber *allocrhs=nullptr; /* .., rhs */
#endif
Int result=0; /* default result value */
uByte merged; /* work */
@@ -6067,12 +6067,12 @@ static decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
/* reduce operands and set lostDigits status, as needed */
if (lhs->digits>set->digits) {
alloclhs=decRoundOperand(lhs, set, status);
- if (alloclhs==NULL) {result=BADINT; break;}
+ if (alloclhs==nullptr) {result=BADINT; break;}
lhs=alloclhs;
}
if (rhs->digits>set->digits) {
allocrhs=decRoundOperand(rhs, set, status);
- if (allocrhs==NULL) {result=BADINT; break;}
+ if (allocrhs==nullptr) {result=BADINT; break;}
rhs=allocrhs;
}
}
@@ -6194,8 +6194,8 @@ static decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
}
}
#if DECSUBSET
- if (allocrhs!=NULL) free(allocrhs); /* free any storage used */
- if (alloclhs!=NULL) free(alloclhs); /* .. */
+ if (allocrhs!=nullptr) free(allocrhs); /* free any storage used */
+ if (alloclhs!=nullptr) free(alloclhs); /* .. */
#endif
return res;
} /* decCompareOp */
@@ -6280,7 +6280,7 @@ static Int decUnitCompare(const Unit *a, Int alength,
const Unit *b, Int blength, Int exp) {
Unit *acc; /* accumulator for result */
Unit accbuff[SD2U(DECBUFFER*2+1)]; /* local buffer */
- Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */
+ Unit *allocacc=nullptr; /* -> allocated acc buffer, iff allocated */
Int accunits, need; /* units in use or needed for acc */
const Unit *l, *r, *u; /* work */
Int expunits, exprem, result; /* .. */
@@ -6312,7 +6312,7 @@ static Int decUnitCompare(const Unit *a, Int alength,
acc=accbuff; /* assume use local buffer */
if (need*sizeof(Unit)>sizeof(accbuff)) {
allocacc=(Unit *)malloc(need*sizeof(Unit));
- if (allocacc==NULL) return BADINT; /* hopeless -- abandon */
+ if (allocacc==nullptr) return BADINT; /* hopeless -- abandon */
acc=allocacc;
}
/* Calculate units and remainder from exponent. */
@@ -6329,7 +6329,7 @@ static Int decUnitCompare(const Unit *a, Int alength,
result=(*u==0 ? 0 : +1);
}
/* clean up and return the result */
- if (allocacc!=NULL) free(allocacc); /* drop any storage used */
+ if (allocacc!=nullptr) free(allocacc); /* drop any storage used */
return result;
} /* decUnitCompare */
@@ -6847,7 +6847,7 @@ static Int decShiftToLeast(Unit *uar, Int units, Int shift) {
/* Instead, return an allocated decNumber, rounded as required. */
/* It is the caller's responsibility to free the allocated storage. */
/* */
-/* If no storage is available then the result cannot be used, so NULL */
+/* If no storage is available then the result cannot be used, so nullptr */
/* is returned. */
/* ------------------------------------------------------------------ */
static decNumber *decRoundOperand(const decNumber *dn, decContext *set,
@@ -6860,9 +6860,9 @@ static decNumber *decRoundOperand(const decNumber *dn, decContext *set,
/* length specified by the context */
res=(decNumber *)malloc(sizeof(decNumber)
+(D2U(set->digits)-1)*sizeof(Unit));
- if (res==NULL) {
+ if (res==nullptr) {
*status|=DEC_Insufficient_storage;
- return NULL;
+ return nullptr;
}
decCopyFit(res, dn, set, &residue, &newstatus);
decApplyRound(res, set, residue, &newstatus);
@@ -7725,7 +7725,7 @@ static Flag decBiStr(const char *targ, const char *str1, const char *str2) {
/* */
/* res is the result number */
/* lhs is the first operand */
-/* rhs is the second operand, or NULL if none */
+/* rhs is the second operand, or nullptr if none */
/* context is used to limit payload length */
/* status contains the current status */
/* returns res in case convenient */
@@ -7741,7 +7741,7 @@ static decNumber * decNaNs(decNumber *res, const decNumber *lhs,
/* and status updated if need be */
if (lhs->bits & DECSNAN)
*status|=DEC_Invalid_operation | DEC_sNaN;
- else if (rhs==NULL);
+ else if (rhs==nullptr);
else if (rhs->bits & DECSNAN) {
lhs=rhs;
*status|=DEC_Invalid_operation | DEC_sNaN;
@@ -7862,8 +7862,8 @@ void uprv_decNumberShow(const decNumber *dn) {
uInt u, d; /* .. */
Int cut; /* .. */
char isign='+'; /* main sign */
- if (dn==NULL) {
- printf("NULL\n");
+ if (dn==nullptr) {
+ printf("nullptr\n");
return;}
if (decNumberIsNegative(dn)) isign='-';
printf(" >> %c ", isign);
@@ -7944,22 +7944,22 @@ static void decDumpAr(char name, const Unit *ar, Int len) {
/* ------------------------------------------------------------------ */
/* decCheckOperands -- check operand(s) to a routine */
/* res is the result structure (not checked; it will be set to */
-/* quiet NaN if error found (and it is not NULL)) */
+/* quiet NaN if error found (and it is not nullptr)) */
/* lhs is the first operand (may be DECUNRESU) */
/* rhs is the second (may be DECUNUSED) */
/* set is the context (may be DECUNCONT) */
/* returns 0 if both operands, and the context are clean, or 1 */
/* otherwise (in which case the context will show an error, */
-/* unless NULL). Note that res is not cleaned; caller should */
-/* handle this so res=NULL case is safe. */
+/* unless nullptr). Note that res is not cleaned; caller should */
+/* handle this so res=nullptr case is safe. */
/* The caller is expected to abandon immediately if 1 is returned. */
/* ------------------------------------------------------------------ */
static Flag decCheckOperands(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
Flag bad=0;
- if (set==NULL) { /* oops; hopeless */
+ if (set==nullptr) { /* oops; hopeless */
#if DECTRACE || DECVERB
- printf("Reference to context is NULL.\n");
+ printf("Reference to context is nullptr.\n");
#endif
bad=1;
return 1;}
@@ -7972,11 +7972,11 @@ static Flag decCheckOperands(decNumber *res, const decNumber *lhs,
#endif
}
else {
- if (res==NULL) {
+ if (res==nullptr) {
bad=1;
#if DECTRACE
- /* this one not DECVERB as standard tests include NULL */
- printf("Reference to result is NULL.\n");
+ /* this one not DECVERB as standard tests include nullptr */
+ printf("Reference to result is nullptr.\n");
#endif
}
if (!bad && lhs!=DECUNUSED) bad=(decCheckNumber(lhs));
@@ -7984,7 +7984,7 @@ static Flag decCheckOperands(decNumber *res, const decNumber *lhs,
}
if (bad) {
if (set!=DECUNCONT) uprv_decContextSetStatus(set, DEC_Invalid_operation);
- if (res!=DECUNRESU && res!=NULL) {
+ if (res!=DECUNRESU && res!=nullptr) {
uprv_decNumberZero(res);
res->bits=DECNAN; /* qNaN */
}
@@ -8006,10 +8006,10 @@ static Flag decCheckNumber(const decNumber *dn) {
Int ae, d, digits; /* .. */
Int emin, emax; /* .. */
- if (dn==NULL) { /* hopeless */
+ if (dn==nullptr) { /* hopeless */
#if DECTRACE
- /* this one not DECVERB as standard tests include NULL */
- printf("Reference to decNumber is NULL.\n");
+ /* this one not DECVERB as standard tests include nullptr */
+ printf("Reference to decNumber is nullptr.\n");
#endif
return 1;}
@@ -8114,7 +8114,7 @@ static void decCheckInexact(const decNumber *dn, decContext *set) {
}
#else
/* next is a noop for quiet compiler */
- if (dn!=NULL && dn->digits==0) set->status|=DEC_Invalid_operation;
+ if (dn!=nullptr && dn->digits==0) set->status|=DEC_Invalid_operation;
#endif
return;
} /* decCheckInexact */
@@ -8144,7 +8144,7 @@ static void *decMalloc(size_t n) {
uInt uiwork; /* for macros */
alloc=malloc(size); /* -> allocated storage */
- if (alloc==NULL) return NULL; /* out of strorage */
+ if (alloc==nullptr) return nullptr; /* out of strorage */
b0=(uByte *)alloc; /* as bytes */
decAllocBytes+=n; /* account for storage */
UBFROMUI(alloc, n); /* save n */
@@ -8171,7 +8171,7 @@ static void decFree(void *alloc) {
uByte *b, *b0; /* work */
uInt uiwork; /* for macros */
- if (alloc==NULL) return; /* allowed; it's a nop */
+ if (alloc==nullptr) return; /* allowed; it's a nop */
b0=(uByte *)alloc; /* as bytes */
b0-=8; /* -> true start of storage */
n=UBTOUI(b0); /* lift length */
diff --git a/contrib/libs/icu/i18n/decNumber.h b/contrib/libs/icu/i18n/decNumber.h
index ddcc50e2efe..4a1eb364e19 100644
--- a/contrib/libs/icu/i18n/decNumber.h
+++ b/contrib/libs/icu/i18n/decNumber.h
@@ -174,7 +174,7 @@
U_CAPI decNumber * U_EXPORT2 uprv_decNumberNextPlus(decNumber *, const decNumber *, decContext *);
U_CAPI decNumber * U_EXPORT2 uprv_decNumberNextToward(decNumber *, const decNumber *, const decNumber *, decContext *);
U_CAPI decNumber * U_EXPORT2 uprv_decNumberTrim(decNumber *);
- U_CAPI const char * U_EXPORT2 uprv_decNumberVersion(void);
+ U_CAPI const char * U_EXPORT2 uprv_decNumberVersion();
U_CAPI decNumber * U_EXPORT2 uprv_decNumberZero(decNumber *);
/* Functions for testing decNumbers (normality depends on context) */
diff --git a/contrib/libs/icu/i18n/decimfmt.cpp b/contrib/libs/icu/i18n/decimfmt.cpp
index bca33366792..75906991d72 100644
--- a/contrib/libs/icu/i18n/decimfmt.cpp
+++ b/contrib/libs/icu/i18n/decimfmt.cpp
@@ -790,7 +790,7 @@ CurrencyAmount* DecimalFormat::parseCurrency(const UnicodeString& text, ParsePos
}
}
-const DecimalFormatSymbols* DecimalFormat::getDecimalFormatSymbols(void) const {
+const DecimalFormatSymbols* DecimalFormat::getDecimalFormatSymbols() const {
if (fields == nullptr) {
return nullptr;
}
@@ -803,7 +803,7 @@ const DecimalFormatSymbols* DecimalFormat::getDecimalFormatSymbols(void) const {
void DecimalFormat::adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToAdopt) {
if (symbolsToAdopt == nullptr) {
- return; // do not allow caller to set fields->symbols to NULL
+ return; // do not allow caller to set fields->symbols to nullptr
}
// we must take ownership of symbolsToAdopt, even in a failure case.
LocalPointer<DecimalFormatSymbols> dfs(symbolsToAdopt);
@@ -831,7 +831,7 @@ void DecimalFormat::setDecimalFormatSymbols(const DecimalFormatSymbols& symbols)
touchNoError();
}
-const CurrencyPluralInfo* DecimalFormat::getCurrencyPluralInfo(void) const {
+const CurrencyPluralInfo* DecimalFormat::getCurrencyPluralInfo() const {
if (fields == nullptr) {
return nullptr;
}
@@ -957,7 +957,7 @@ void DecimalFormat::setSignAlwaysShown(UBool value) {
touchNoError();
}
-int32_t DecimalFormat::getMultiplier(void) const {
+int32_t DecimalFormat::getMultiplier() const {
const DecimalFormatProperties *dfp;
// Not much we can do to report an error.
if (fields == nullptr) {
@@ -1021,7 +1021,7 @@ void DecimalFormat::setMultiplierScale(int32_t newValue) {
touchNoError();
}
-double DecimalFormat::getRoundingIncrement(void) const {
+double DecimalFormat::getRoundingIncrement() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1037,7 +1037,7 @@ void DecimalFormat::setRoundingIncrement(double newValue) {
touchNoError();
}
-ERoundingMode DecimalFormat::getRoundingMode(void) const {
+ERoundingMode DecimalFormat::getRoundingMode() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1047,7 +1047,7 @@ ERoundingMode DecimalFormat::getRoundingMode(void) const {
return static_cast<ERoundingMode>(fields->exportedProperties.roundingMode.getNoError());
}
-void DecimalFormat::setRoundingMode(ERoundingMode roundingMode) {
+void DecimalFormat::setRoundingMode(ERoundingMode roundingMode) UPRV_NO_SANITIZE_UNDEFINED {
if (fields == nullptr) { return; }
auto uRoundingMode = static_cast<UNumberFormatRoundingMode>(roundingMode);
if (!fields->properties.roundingMode.isNull() && uRoundingMode == fields->properties.roundingMode.getNoError()) {
@@ -1058,7 +1058,7 @@ void DecimalFormat::setRoundingMode(ERoundingMode roundingMode) {
touchNoError();
}
-int32_t DecimalFormat::getFormatWidth(void) const {
+int32_t DecimalFormat::getFormatWidth() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1094,7 +1094,7 @@ void DecimalFormat::setPadCharacter(const UnicodeString& padChar) {
touchNoError();
}
-EPadPosition DecimalFormat::getPadPosition(void) const {
+EPadPosition DecimalFormat::getPadPosition() const {
if (fields == nullptr || fields->properties.padPosition.isNull()) {
return EPadPosition::kPadBeforePrefix;
} else {
@@ -1113,7 +1113,7 @@ void DecimalFormat::setPadPosition(EPadPosition padPos) {
touchNoError();
}
-UBool DecimalFormat::isScientificNotation(void) const {
+UBool DecimalFormat::isScientificNotation() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1134,7 +1134,7 @@ void DecimalFormat::setScientificNotation(UBool useScientific) {
touchNoError();
}
-int8_t DecimalFormat::getMinimumExponentDigits(void) const {
+int8_t DecimalFormat::getMinimumExponentDigits() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1150,7 +1150,7 @@ void DecimalFormat::setMinimumExponentDigits(int8_t minExpDig) {
touchNoError();
}
-UBool DecimalFormat::isExponentSignAlwaysShown(void) const {
+UBool DecimalFormat::isExponentSignAlwaysShown() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1166,7 +1166,7 @@ void DecimalFormat::setExponentSignAlwaysShown(UBool expSignAlways) {
touchNoError();
}
-int32_t DecimalFormat::getGroupingSize(void) const {
+int32_t DecimalFormat::getGroupingSize() const {
int32_t groupingSize;
// Not much we can do to report an error.
if (fields == nullptr) {
@@ -1188,7 +1188,7 @@ void DecimalFormat::setGroupingSize(int32_t newValue) {
touchNoError();
}
-int32_t DecimalFormat::getSecondaryGroupingSize(void) const {
+int32_t DecimalFormat::getSecondaryGroupingSize() const {
int32_t grouping2;
// Not much we can do to report an error.
if (fields == nullptr) {
@@ -1226,7 +1226,7 @@ void DecimalFormat::setMinimumGroupingDigits(int32_t newValue) {
touchNoError();
}
-UBool DecimalFormat::isDecimalSeparatorAlwaysShown(void) const {
+UBool DecimalFormat::isDecimalSeparatorAlwaysShown() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
@@ -1242,7 +1242,7 @@ void DecimalFormat::setDecimalSeparatorAlwaysShown(UBool newValue) {
touchNoError();
}
-UBool DecimalFormat::isDecimalPatternMatchRequired(void) const {
+UBool DecimalFormat::isDecimalPatternMatchRequired() const {
// Not much we can do to report an error.
if (fields == nullptr) {
// Fallback to using the default instance of DecimalFormatProperties.
diff --git a/contrib/libs/icu/i18n/displayoptions.cpp b/contrib/libs/icu/i18n/displayoptions.cpp
new file mode 100644
index 00000000000..bb49e6033f3
--- /dev/null
+++ b/contrib/libs/icu/i18n/displayoptions.cpp
@@ -0,0 +1,167 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/displayoptions.h"
+#include "unicode/udisplayoptions.h"
+#include "cstring.h"
+
+U_NAMESPACE_BEGIN
+
+DisplayOptions::Builder DisplayOptions::builder() { return DisplayOptions::Builder(); }
+
+DisplayOptions::Builder DisplayOptions::copyToBuilder() const { return Builder(*this); }
+
+DisplayOptions::DisplayOptions(const Builder &builder) {
+ grammaticalCase = builder.grammaticalCase;
+ nounClass = builder.nounClass;
+ pluralCategory = builder.pluralCategory;
+ capitalization = builder.capitalization;
+ nameStyle = builder.nameStyle;
+ displayLength = builder.displayLength;
+ substituteHandling = builder.substituteHandling;
+}
+
+DisplayOptions::Builder::Builder() {
+ // Sets default values.
+ grammaticalCase = UDISPOPT_GRAMMATICAL_CASE_UNDEFINED;
+ nounClass = UDISPOPT_NOUN_CLASS_UNDEFINED;
+ pluralCategory = UDISPOPT_PLURAL_CATEGORY_UNDEFINED;
+ capitalization = UDISPOPT_CAPITALIZATION_UNDEFINED;
+ nameStyle = UDISPOPT_NAME_STYLE_UNDEFINED;
+ displayLength = UDISPOPT_DISPLAY_LENGTH_UNDEFINED;
+ substituteHandling = UDISPOPT_SUBSTITUTE_HANDLING_UNDEFINED;
+}
+
+DisplayOptions::Builder::Builder(const DisplayOptions &displayOptions) {
+ grammaticalCase = displayOptions.grammaticalCase;
+ nounClass = displayOptions.nounClass;
+ pluralCategory = displayOptions.pluralCategory;
+ capitalization = displayOptions.capitalization;
+ nameStyle = displayOptions.nameStyle;
+ displayLength = displayOptions.displayLength;
+ substituteHandling = displayOptions.substituteHandling;
+}
+
+U_NAMESPACE_END
+
+// C API ------------------------------------------------------------------- ***
+
+U_NAMESPACE_USE
+
+namespace {
+
+const char *grammaticalCaseIds[] = {
+ "undefined", // 0
+ "ablative", // 1
+ "accusative", // 2
+ "comitative", // 3
+ "dative", // 4
+ "ergative", // 5
+ "genitive", // 6
+ "instrumental", // 7
+ "locative", // 8
+ "locative_copulative", // 9
+ "nominative", // 10
+ "oblique", // 11
+ "prepositional", // 12
+ "sociative", // 13
+ "vocative", // 14
+};
+
+} // namespace
+
+U_CAPI const char * U_EXPORT2
+udispopt_getGrammaticalCaseIdentifier(UDisplayOptionsGrammaticalCase grammaticalCase) {
+ if (grammaticalCase >= 0 && grammaticalCase < UPRV_LENGTHOF(grammaticalCaseIds)) {
+ return grammaticalCaseIds[grammaticalCase];
+ }
+
+ return grammaticalCaseIds[0];
+}
+
+U_CAPI UDisplayOptionsGrammaticalCase U_EXPORT2
+udispopt_fromGrammaticalCaseIdentifier(const char *identifier) {
+ for (int32_t i = 0; i < UPRV_LENGTHOF(grammaticalCaseIds); i++) {
+ if (uprv_strcmp(identifier, grammaticalCaseIds[i]) == 0) {
+ return static_cast<UDisplayOptionsGrammaticalCase>(i);
+ }
+ }
+
+ return UDISPOPT_GRAMMATICAL_CASE_UNDEFINED;
+}
+
+namespace {
+
+const char *pluralCategoryIds[] = {
+ "undefined", // 0
+ "zero", // 1
+ "one", // 2
+ "two", // 3
+ "few", // 4
+ "many", // 5
+ "other", // 6
+};
+
+} // namespace
+
+U_CAPI const char * U_EXPORT2
+udispopt_getPluralCategoryIdentifier(UDisplayOptionsPluralCategory pluralCategory) {
+ if (pluralCategory >= 0 && pluralCategory < UPRV_LENGTHOF(pluralCategoryIds)) {
+ return pluralCategoryIds[pluralCategory];
+ }
+
+ return pluralCategoryIds[0];
+}
+
+U_CAPI UDisplayOptionsPluralCategory U_EXPORT2
+udispopt_fromPluralCategoryIdentifier(const char *identifier) {
+ for (int32_t i = 0; i < UPRV_LENGTHOF(pluralCategoryIds); i++) {
+ if (uprv_strcmp(identifier, pluralCategoryIds[i]) == 0) {
+ return static_cast<UDisplayOptionsPluralCategory>(i);
+ }
+ }
+
+ return UDISPOPT_PLURAL_CATEGORY_UNDEFINED;
+}
+
+namespace {
+
+const char *nounClassIds[] = {
+ "undefined", // 0
+ "other", // 1
+ "neuter", // 2
+ "feminine", // 3
+ "masculine", // 4
+ "animate", // 5
+ "inanimate", // 6
+ "personal", // 7
+ "common", // 8
+};
+
+} // namespace
+
+U_CAPI const char * U_EXPORT2
+udispopt_getNounClassIdentifier(UDisplayOptionsNounClass nounClass) {
+ if (nounClass >= 0 && nounClass < UPRV_LENGTHOF(nounClassIds)) {
+ return nounClassIds[nounClass];
+ }
+
+ return nounClassIds[0];
+}
+
+U_CAPI UDisplayOptionsNounClass U_EXPORT2
+udispopt_fromNounClassIdentifier(const char *identifier) {
+ for (int32_t i = 0; i < UPRV_LENGTHOF(nounClassIds); i++) {
+ if (uprv_strcmp(identifier, nounClassIds[i]) == 0) {
+ return static_cast<UDisplayOptionsNounClass>(i);
+ }
+ }
+
+ return UDISPOPT_NOUN_CLASS_UNDEFINED;
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/i18n/double-conversion-bignum.cpp b/contrib/libs/icu/i18n/double-conversion-bignum.cpp
index 996d75c9f60..d2b701a21d8 100644
--- a/contrib/libs/icu/i18n/double-conversion-bignum.cpp
+++ b/contrib/libs/icu/i18n/double-conversion-bignum.cpp
@@ -150,7 +150,7 @@ void Bignum::AssignHexString(Vector<const char> value) {
DOUBLE_CONVERSION_ASSERT(sizeof(uint64_t) * 8 >= kBigitSize + 4); // TODO: static_assert
// Accumulates converted hex digits until at least kBigitSize bits.
// Works with non-factor-of-four kBigitSizes.
- uint64_t tmp = 0; // Accumulates converted hex digits until at least
+ uint64_t tmp = 0;
for (int cnt = 0; !value.is_empty(); value.pop_back()) {
tmp |= (HexCharValue(value.last()) << cnt);
if ((cnt += 4) >= kBigitSize) {
@@ -160,7 +160,8 @@ void Bignum::AssignHexString(Vector<const char> value) {
}
}
if (tmp > 0) {
- RawBigit(used_bigits_++) = tmp;
+ DOUBLE_CONVERSION_ASSERT(tmp <= kBigitMask);
+ RawBigit(used_bigits_++) = static_cast<Bignum::Chunk>(tmp & kBigitMask);
}
Clamp();
}
@@ -217,7 +218,7 @@ void Bignum::AddBignum(const Bignum& other) {
carry = sum >> kBigitSize;
++bigit_pos;
}
- used_bigits_ = (std::max)(bigit_pos, static_cast<int>(used_bigits_));
+ used_bigits_ = static_cast<int16_t>(std::max(bigit_pos, static_cast<int>(used_bigits_)));
DOUBLE_CONVERSION_ASSERT(IsClamped());
}
@@ -253,7 +254,7 @@ void Bignum::ShiftLeft(const int shift_amount) {
if (used_bigits_ == 0) {
return;
}
- exponent_ += (shift_amount / kBigitSize);
+ exponent_ += static_cast<int16_t>(shift_amount / kBigitSize);
const int local_shift = shift_amount % kBigitSize;
EnsureCapacity(used_bigits_ + 1);
BigitsShiftLeft(local_shift);
@@ -431,7 +432,7 @@ void Bignum::Square() {
DOUBLE_CONVERSION_ASSERT(accumulator == 0);
// Don't forget to update the used_digits and the exponent.
- used_bigits_ = product_length;
+ used_bigits_ = static_cast<int16_t>(product_length);
exponent_ *= 2;
Clamp();
}
@@ -752,8 +753,8 @@ void Bignum::Align(const Bignum& other) {
for (int i = 0; i < zero_bigits; ++i) {
RawBigit(i) = 0;
}
- used_bigits_ += zero_bigits;
- exponent_ -= zero_bigits;
+ used_bigits_ += static_cast<int16_t>(zero_bigits);
+ exponent_ -= static_cast<int16_t>(zero_bigits);
DOUBLE_CONVERSION_ASSERT(used_bigits_ >= 0);
DOUBLE_CONVERSION_ASSERT(exponent_ >= 0);
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 90ba4360600..5ee6d2b8e87 100644
--- a/contrib/libs/icu/i18n/double-conversion-double-to-string.cpp
+++ b/contrib/libs/icu/i18n/double-conversion-double-to-string.cpp
@@ -71,7 +71,7 @@ bool DoubleToStringConverter::HandleSpecialValues(
StringBuilder* result_builder) const {
Double double_inspect(value);
if (double_inspect.IsInfinite()) {
- if (infinity_symbol_ == NULL) return false;
+ if (infinity_symbol_ == DOUBLE_CONVERSION_NULLPTR) return false;
if (value < 0) {
result_builder->AddCharacter('-');
}
@@ -79,7 +79,7 @@ bool DoubleToStringConverter::HandleSpecialValues(
return true;
}
if (double_inspect.IsNan()) {
- if (nan_symbol_ == NULL) return false;
+ if (nan_symbol_ == DOUBLE_CONVERSION_NULLPTR) return false;
result_builder->AddString(nan_symbol_);
return true;
}
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 1fae2e87715..9940052c64b 100644
--- a/contrib/libs/icu/i18n/double-conversion-double-to-string.h
+++ b/contrib/libs/icu/i18n/double-conversion-double-to-string.h
@@ -114,7 +114,7 @@ class DoubleToStringConverter {
// preserved.
//
// Infinity symbol and nan_symbol provide the string representation for these
- // special values. If the string is NULL and the special value is encountered
+ // special values. If the string is nullptr and the special value is encountered
// then the conversion functions return false.
//
// The exponent_character is used in exponential representations. It is
@@ -429,7 +429,7 @@ class DoubleToStringConverter {
// If the value is a special value (NaN or Infinity) constructs the
// corresponding string using the configured infinity/nan-symbol.
- // If either of them is NULL or the value is not special then the
+ // If either of them is nullptr or the value is not special then the
// function returns false.
bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
// Constructs an exponential representation (i.e. 1.234e56).
diff --git a/contrib/libs/icu/i18n/double-conversion-ieee.h b/contrib/libs/icu/i18n/double-conversion-ieee.h
index 31c35867de5..2940acb1698 100644
--- a/contrib/libs/icu/i18n/double-conversion-ieee.h
+++ b/contrib/libs/icu/i18n/double-conversion-ieee.h
@@ -164,11 +164,19 @@ class Double {
}
bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#else
return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#endif
}
bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#else
return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#endif
}
@@ -250,7 +258,12 @@ class Double {
private:
static const int kDenormalExponent = -kExponentBias + 1;
static const uint64_t kInfinity = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF00000, 00000000);
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF7FFFF, FFFFFFFF);
+#else
static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF80000, 00000000);
+#endif
+
const uint64_t d64_;
@@ -350,11 +363,19 @@ class Single {
}
bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#else
return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#endif
}
bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#else
return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#endif
}
@@ -424,7 +445,11 @@ class Single {
static const int kDenormalExponent = -kExponentBias + 1;
static const int kMaxExponent = 0xFF - kExponentBias;
static const uint32_t kInfinity = 0x7F800000;
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+ static const uint32_t kNaN = 0x7FBFFFFF;
+#else
static const uint32_t kNaN = 0x7FC00000;
+#endif
const uint32_t d32_;
diff --git a/contrib/libs/icu/i18n/double-conversion-string-to-double.cpp b/contrib/libs/icu/i18n/double-conversion-string-to-double.cpp
index c72bb262774..727fff24e17 100644
--- a/contrib/libs/icu/i18n/double-conversion-string-to-double.cpp
+++ b/contrib/libs/icu/i18n/double-conversion-string-to-double.cpp
@@ -495,7 +495,7 @@ double StringToDoubleConverter::StringToIeee(
current = next_non_space;
}
- if (infinity_symbol_ != NULL) {
+ if (infinity_symbol_ != DOUBLE_CONVERSION_NULLPTR) {
if (ConsumeFirstCharacter(*current, infinity_symbol_, allow_case_insensitivity)) {
if (!ConsumeSubString(&current, end, infinity_symbol_, allow_case_insensitivity)) {
return junk_string_value_;
@@ -513,7 +513,7 @@ double StringToDoubleConverter::StringToIeee(
}
}
- if (nan_symbol_ != NULL) {
+ if (nan_symbol_ != DOUBLE_CONVERSION_NULLPTR) {
if (ConsumeFirstCharacter(*current, nan_symbol_, allow_case_insensitivity)) {
if (!ConsumeSubString(&current, end, nan_symbol_, allow_case_insensitivity)) {
return junk_string_value_;
diff --git a/contrib/libs/icu/i18n/double-conversion-string-to-double.h b/contrib/libs/icu/i18n/double-conversion-string-to-double.h
index 9f6f5307111..1d4e3dddde9 100644
--- a/contrib/libs/icu/i18n/double-conversion-string-to-double.h
+++ b/contrib/libs/icu/i18n/double-conversion-string-to-double.h
@@ -158,8 +158,8 @@ class StringToDoubleConverter {
// flags = ALLOW_OCTAL | ALLOW_LEADING_SPACES,
// empty_string_value = 0.0,
// junk_string_value = NaN,
- // infinity_symbol = NULL,
- // nan_symbol = NULL:
+ // infinity_symbol = nullptr,
+ // nan_symbol = nullptr:
// StringToDouble("0x1234") -> NaN // junk_string_value.
// StringToDouble("01234") -> 668.0.
// StringToDouble("") -> 0.0 // empty_string_value.
diff --git a/contrib/libs/icu/i18n/double-conversion-utils.h b/contrib/libs/icu/i18n/double-conversion-utils.h
index 7f23e0a8250..303668f9317 100644
--- a/contrib/libs/icu/i18n/double-conversion-utils.h
+++ b/contrib/libs/icu/i18n/double-conversion-utils.h
@@ -37,18 +37,36 @@
#ifndef DOUBLE_CONVERSION_UTILS_H_
#define DOUBLE_CONVERSION_UTILS_H_
+// Use DOUBLE_CONVERSION_NON_PREFIXED_MACROS to get unprefixed macros as was
+// the case in double-conversion releases prior to 3.1.6
+
#include <cstdlib>
#include <cstring>
+// For pre-C++11 compatibility
+#if __cplusplus >= 201103L
+#define DOUBLE_CONVERSION_NULLPTR nullptr
+#else
+#define DOUBLE_CONVERSION_NULLPTR NULL
+#endif
+
// ICU PATCH: Use U_ASSERT instead of <assert.h>
#include "uassert.h"
#ifndef DOUBLE_CONVERSION_ASSERT
#define DOUBLE_CONVERSION_ASSERT(condition) \
U_ASSERT(condition)
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ASSERT)
+#define ASSERT DOUBLE_CONVERSION_ASSERT
+#endif
+
#ifndef DOUBLE_CONVERSION_UNIMPLEMENTED
#define DOUBLE_CONVERSION_UNIMPLEMENTED() (abort())
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNIMPLEMENTED)
+#define UNIMPLEMENTED DOUBLE_CONVERSION_UNIMPLEMENTED
+#endif
+
#ifndef DOUBLE_CONVERSION_NO_RETURN
#ifdef _MSC_VER
#define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn)
@@ -56,6 +74,10 @@
#define DOUBLE_CONVERSION_NO_RETURN __attribute__((noreturn))
#endif
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(NO_RETURN)
+#define NO_RETURN DOUBLE_CONVERSION_NO_RETURN
+#endif
+
#ifndef DOUBLE_CONVERSION_UNREACHABLE
#ifdef _MSC_VER
void DOUBLE_CONVERSION_NO_RETURN abort_noreturn();
@@ -65,6 +87,9 @@ inline void abort_noreturn() { abort(); }
#define DOUBLE_CONVERSION_UNREACHABLE() (abort())
#endif
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNREACHABLE)
+#define UNREACHABLE DOUBLE_CONVERSION_UNREACHABLE
+#endif
// Not all compilers support __has_attribute and combining a check for both
// ifdef and __has_attribute on the same preprocessor line isn't portable.
@@ -81,12 +106,18 @@ inline void abort_noreturn() { abort(); }
#define DOUBLE_CONVERSION_UNUSED
#endif
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNUSED)
+#define UNUSED DOUBLE_CONVERSION_UNUSED
+#endif
#if DOUBLE_CONVERSION_HAS_ATTRIBUTE(uninitialized)
#define DOUBLE_CONVERSION_STACK_UNINITIALIZED __attribute__((uninitialized))
#else
#define DOUBLE_CONVERSION_STACK_UNINITIALIZED
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(STACK_UNINITIALIZED)
+#define STACK_UNINITIALIZED DOUBLE_CONVERSION_STACK_UNINITIALIZED
+#endif
// Double operations detection based on target architecture.
// Linux uses a 80bit wide floating point stack on x86. This induces double
@@ -127,7 +158,7 @@ int main(int argc, char** argv) {
defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
defined(__riscv) || defined(__e2k__) || \
- defined(__or1k__) || defined(__arc__) || \
+ defined(__or1k__) || defined(__arc__) || defined(__ARC64__) || \
defined(__microblaze__) || defined(__XTENSA__) || \
defined(__EMSCRIPTEN__) || defined(__wasm32__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
@@ -144,6 +175,9 @@ int main(int argc, char** argv) {
#else
#error Target architecture was not detected as supported by Double-Conversion.
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(CORRECT_DOUBLE_OPERATIONS)
+#define CORRECT_DOUBLE_OPERATIONS DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
+#endif
#if defined(_WIN32) && !defined(__MINGW32__)
@@ -169,7 +203,9 @@ typedef uint16_t uc16;
// Usage: instead of writing 0x1234567890123456
// write DOUBLE_CONVERSION_UINT64_2PART_C(0x12345678,90123456);
#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
-
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UINT64_2PART_C)
+#define UINT64_2PART_C DOUBLE_CONVERSION_UINT64_2PART_C
+#endif
// The expression DOUBLE_CONVERSION_ARRAY_SIZE(a) is a compile-time constant of type
// size_t which represents the number of elements of the given
@@ -180,6 +216,9 @@ typedef uint16_t uc16;
((sizeof(a) / sizeof(*(a))) / \
static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ARRAY_SIZE)
+#define ARRAY_SIZE DOUBLE_CONVERSION_ARRAY_SIZE
+#endif
// A macro to disallow the evil copy constructor and operator= functions
// This should be used in the private: declarations for a class
@@ -188,6 +227,9 @@ typedef uint16_t uc16;
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_COPY_AND_ASSIGN)
+#define DC_DISALLOW_COPY_AND_ASSIGN DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN
+#endif
// A macro to disallow all the implicit constructors, namely the
// default constructor, copy constructor and operator= functions.
@@ -200,6 +242,9 @@ typedef uint16_t uc16;
TypeName(); \
DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN(TypeName)
#endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_IMPLICIT_CONSTRUCTORS)
+#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS
+#endif
// ICU PATCH: Wrap in ICU namespace
U_NAMESPACE_BEGIN
@@ -216,9 +261,9 @@ inline int StrLength(const char* string) {
template <typename T>
class Vector {
public:
- Vector() : start_(NULL), length_(0) {}
+ Vector() : start_(DOUBLE_CONVERSION_NULLPTR), length_(0) {}
Vector(T* data, int len) : start_(data), length_(len) {
- DOUBLE_CONVERSION_ASSERT(len == 0 || (len > 0 && data != NULL));
+ DOUBLE_CONVERSION_ASSERT(len == 0 || (len > 0 && data != DOUBLE_CONVERSION_NULLPTR));
}
// Returns a vector using the same backing storage as this one,
@@ -301,7 +346,7 @@ class StringBuilder {
void AddSubstring(const char* s, int n) {
DOUBLE_CONVERSION_ASSERT(!is_finalized() && position_ + n < buffer_.length());
DOUBLE_CONVERSION_ASSERT(static_cast<size_t>(n) <= strlen(s));
- memmove(&buffer_[position_], s, n);
+ memmove(&buffer_[position_], s, static_cast<size_t>(n));
position_ += n;
}
diff --git a/contrib/libs/icu/i18n/dt_impl.h b/contrib/libs/icu/i18n/dt_impl.h
index a4058c69244..a21b68ce1e2 100644
--- a/contrib/libs/icu/i18n/dt_impl.h
+++ b/contrib/libs/icu/i18n/dt_impl.h
@@ -25,66 +25,66 @@
#include "unicode/unistr.h"
-#define QUOTE ((UChar)0x0027)
-#define LOW_LINE ((UChar)0x005F)
-#define COLON ((UChar)0x003A)
-#define LEFT_CURLY_BRACKET ((UChar)0x007B)
-#define RIGHT_CURLY_BRACKET ((UChar)0x007D)
-#define SPACE ((UChar)0x0020)
-#define EN_DASH ((UChar)0x2013)
-#define SOLIDUS ((UChar)0x002F)
-#define PERCENT ((UChar)0x0025)
+#define QUOTE ((char16_t)0x0027)
+#define LOW_LINE ((char16_t)0x005F)
+#define COLON ((char16_t)0x003A)
+#define LEFT_CURLY_BRACKET ((char16_t)0x007B)
+#define RIGHT_CURLY_BRACKET ((char16_t)0x007D)
+#define SPACE ((char16_t)0x0020)
+#define EN_DASH ((char16_t)0x2013)
+#define SOLIDUS ((char16_t)0x002F)
+#define PERCENT ((char16_t)0x0025)
-#define DIGIT_ZERO ((UChar)0x0030)
-#define DIGIT_ONE ((UChar)0x0031)
+#define DIGIT_ZERO ((char16_t)0x0030)
+#define DIGIT_ONE ((char16_t)0x0031)
-#define LOW_A ((UChar)0x0061)
-#define LOW_B ((UChar)0x0062)
-#define LOW_C ((UChar)0x0063)
-#define LOW_D ((UChar)0x0064)
-#define LOW_E ((UChar)0x0065)
-#define LOW_F ((UChar)0x0066)
-#define LOW_G ((UChar)0x0067)
-#define LOW_H ((UChar)0x0068)
-#define LOW_I ((UChar)0x0069)
-#define LOW_J ((UChar)0x006a)
-#define LOW_K ((UChar)0x006B)
-#define LOW_L ((UChar)0x006C)
-#define LOW_M ((UChar)0x006D)
-#define LOW_N ((UChar)0x006E)
-#define LOW_O ((UChar)0x006F)
-#define LOW_P ((UChar)0x0070)
-#define LOW_Q ((UChar)0x0071)
-#define LOW_R ((UChar)0x0072)
-#define LOW_S ((UChar)0x0073)
-#define LOW_T ((UChar)0x0074)
-#define LOW_U ((UChar)0x0075)
-#define LOW_V ((UChar)0x0076)
-#define LOW_W ((UChar)0x0077)
-#define LOW_Y ((UChar)0x0079)
-#define LOW_Z ((UChar)0x007A)
+#define LOW_A ((char16_t)0x0061)
+#define LOW_B ((char16_t)0x0062)
+#define LOW_C ((char16_t)0x0063)
+#define LOW_D ((char16_t)0x0064)
+#define LOW_E ((char16_t)0x0065)
+#define LOW_F ((char16_t)0x0066)
+#define LOW_G ((char16_t)0x0067)
+#define LOW_H ((char16_t)0x0068)
+#define LOW_I ((char16_t)0x0069)
+#define LOW_J ((char16_t)0x006a)
+#define LOW_K ((char16_t)0x006B)
+#define LOW_L ((char16_t)0x006C)
+#define LOW_M ((char16_t)0x006D)
+#define LOW_N ((char16_t)0x006E)
+#define LOW_O ((char16_t)0x006F)
+#define LOW_P ((char16_t)0x0070)
+#define LOW_Q ((char16_t)0x0071)
+#define LOW_R ((char16_t)0x0072)
+#define LOW_S ((char16_t)0x0073)
+#define LOW_T ((char16_t)0x0074)
+#define LOW_U ((char16_t)0x0075)
+#define LOW_V ((char16_t)0x0076)
+#define LOW_W ((char16_t)0x0077)
+#define LOW_Y ((char16_t)0x0079)
+#define LOW_Z ((char16_t)0x007A)
-#define CAP_A ((UChar)0x0041)
-#define CAP_C ((UChar)0x0043)
-#define CAP_D ((UChar)0x0044)
-#define CAP_E ((UChar)0x0045)
-#define CAP_F ((UChar)0x0046)
-#define CAP_G ((UChar)0x0047)
-#define CAP_H ((UChar)0x0048)
-#define CAP_K ((UChar)0x004B)
-#define CAP_L ((UChar)0x004C)
-#define CAP_M ((UChar)0x004D)
-#define CAP_N ((UChar)0x004E)
-#define CAP_O ((UChar)0x004F)
-#define CAP_P ((UChar)0x0050)
-#define CAP_Q ((UChar)0x0051)
-#define CAP_S ((UChar)0x0053)
-#define CAP_T ((UChar)0x0054)
-#define CAP_U ((UChar)0x0055)
-#define CAP_V ((UChar)0x0056)
-#define CAP_W ((UChar)0x0057)
-#define CAP_Y ((UChar)0x0059)
-#define CAP_Z ((UChar)0x005A)
+#define CAP_A ((char16_t)0x0041)
+#define CAP_C ((char16_t)0x0043)
+#define CAP_D ((char16_t)0x0044)
+#define CAP_E ((char16_t)0x0045)
+#define CAP_F ((char16_t)0x0046)
+#define CAP_G ((char16_t)0x0047)
+#define CAP_H ((char16_t)0x0048)
+#define CAP_K ((char16_t)0x004B)
+#define CAP_L ((char16_t)0x004C)
+#define CAP_M ((char16_t)0x004D)
+#define CAP_N ((char16_t)0x004E)
+#define CAP_O ((char16_t)0x004F)
+#define CAP_P ((char16_t)0x0050)
+#define CAP_Q ((char16_t)0x0051)
+#define CAP_S ((char16_t)0x0053)
+#define CAP_T ((char16_t)0x0054)
+#define CAP_U ((char16_t)0x0055)
+#define CAP_V ((char16_t)0x0056)
+#define CAP_W ((char16_t)0x0057)
+#define CAP_Y ((char16_t)0x0059)
+#define CAP_Z ((char16_t)0x005A)
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/i18n/dtfmtsym.cpp b/contrib/libs/icu/i18n/dtfmtsym.cpp
index ab5f2b612c1..943f6e21d2e 100644
--- a/contrib/libs/icu/i18n/dtfmtsym.cpp
+++ b/contrib/libs/icu/i18n/dtfmtsym.cpp
@@ -70,7 +70,7 @@
* Unlocalized date-time pattern characters. For example: 'y', 'd', etc. All
* locales use the same these unlocalized pattern characters.
*/
-static const UChar gPatternChars[] = {
+static const char16_t gPatternChars[] = {
// if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR:
// GyMdkHmsSEDFwWahKzYeugAZvcLQqVUOXxrbB:
// else:
@@ -91,7 +91,7 @@ static const UChar gPatternChars[] = {
// files. They aren't designed for actual use, just for backup.
// These are the month names and abbreviations of last resort.
-static const UChar gLastResortMonthNames[13][3] =
+static const char16_t gLastResortMonthNames[13][3] =
{
{0x0030, 0x0031, 0x0000}, /* "01" */
{0x0030, 0x0032, 0x0000}, /* "02" */
@@ -109,7 +109,7 @@ static const UChar gLastResortMonthNames[13][3] =
};
// These are the weekday names and abbreviations of last resort.
-static const UChar gLastResortDayNames[8][2] =
+static const char16_t gLastResortDayNames[8][2] =
{
{0x0030, 0x0000}, /* "0" */
{0x0031, 0x0000}, /* "1" */
@@ -122,7 +122,7 @@ static const UChar gLastResortDayNames[8][2] =
};
// These are the quarter names and abbreviations of last resort.
-static const UChar gLastResortQuarters[4][2] =
+static const char16_t gLastResortQuarters[4][2] =
{
{0x0031, 0x0000}, /* "1" */
{0x0032, 0x0000}, /* "2" */
@@ -131,13 +131,13 @@ static const UChar gLastResortQuarters[4][2] =
};
// These are the am/pm and BC/AD markers of last resort.
-static const UChar gLastResortAmPmMarkers[2][3] =
+static const char16_t gLastResortAmPmMarkers[2][3] =
{
{0x0041, 0x004D, 0x0000}, /* "AM" */
{0x0050, 0x004D, 0x0000} /* "PM" */
};
-static const UChar gLastResortEras[2][3] =
+static const char16_t gLastResortEras[2][3] =
{
{0x0042, 0x0043, 0x0000}, /* "BC" */
{0x0041, 0x0044, 0x0000} /* "AD" */
@@ -179,17 +179,17 @@ const SharedDateFormatSymbols *
char type[256];
Calendar::getCalendarTypeFromLocale(fLoc, type, UPRV_LENGTHOF(type), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
SharedDateFormatSymbols *shared
= new SharedDateFormatSymbols(fLoc, type, status);
- if (shared == NULL) {
+ if (shared == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(status)) {
delete shared;
- return NULL;
+ return nullptr;
}
shared->addRef();
return shared;
@@ -248,16 +248,16 @@ static inline UnicodeString* newUnicodeStringArray(size_t count) {
DateFormatSymbols * U_EXPORT2
DateFormatSymbols::createForLocale(
const Locale& locale, UErrorCode &status) {
- const SharedDateFormatSymbols *shared = NULL;
+ const SharedDateFormatSymbols *shared = nullptr;
UnifiedCache::getByLocale(locale, shared, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
DateFormatSymbols *result = new DateFormatSymbols(shared->get());
shared->removeRef();
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return result;
}
@@ -266,13 +266,13 @@ DateFormatSymbols::DateFormatSymbols(const Locale& locale,
UErrorCode& status)
: UObject()
{
- initializeData(locale, NULL, status);
+ initializeData(locale, nullptr, status);
}
DateFormatSymbols::DateFormatSymbols(UErrorCode& status)
: UObject()
{
- initializeData(Locale::getDefault(), NULL, status, TRUE);
+ initializeData(Locale::getDefault(), nullptr, status, true);
}
@@ -287,7 +287,7 @@ DateFormatSymbols::DateFormatSymbols(const Locale& locale,
DateFormatSymbols::DateFormatSymbols(const char *type, UErrorCode& status)
: UObject()
{
- initializeData(Locale::getDefault(), type, status, TRUE);
+ initializeData(Locale::getDefault(), type, status, true);
}
DateFormatSymbols::DateFormatSymbols(const DateFormatSymbols& other)
@@ -314,9 +314,17 @@ DateFormatSymbols::assignArray(UnicodeString*& dstArray,
// only from a locale bundle or set via the cloning API,
// *and* for as long as all the strings are in *private* fields, preventing
// a subclass from creating these strings in an "unsafe" way (with respect to fastCopyFrom()).
+ if(srcArray == nullptr) {
+ // Do not attempt to copy bogus input (which will crash).
+ // Note that this assignArray method already had the potential to return a null dstArray;
+ // see handling below for "if(dstArray != nullptr)".
+ dstCount = 0;
+ dstArray = nullptr;
+ return;
+ }
dstCount = srcCount;
dstArray = newUnicodeStringArray(srcCount);
- if(dstArray != NULL) {
+ if(dstArray != nullptr) {
int32_t i;
for(i=0; i<srcCount; ++i) {
dstArray[i].fastCopyFrom(srcArray[i]);
@@ -333,15 +341,15 @@ void
DateFormatSymbols::createZoneStrings(const UnicodeString *const * otherStrings)
{
int32_t row, col;
- UBool failed = FALSE;
+ UBool failed = false;
fZoneStrings = (UnicodeString **)uprv_malloc(fZoneStringsRowCount * sizeof(UnicodeString *));
- if (fZoneStrings != NULL) {
+ if (fZoneStrings != nullptr) {
for (row=0; row<fZoneStringsRowCount; ++row)
{
fZoneStrings[row] = newUnicodeStringArray(fZoneStringsColCount);
- if (fZoneStrings[row] == NULL) {
- failed = TRUE;
+ if (fZoneStrings[row] == nullptr) {
+ failed = true;
break;
}
for (col=0; col<fZoneStringsColCount; ++col) {
@@ -356,7 +364,7 @@ DateFormatSymbols::createZoneStrings(const UnicodeString *const * otherStrings)
delete[] fZoneStrings[i];
}
uprv_free(fZoneStrings);
- fZoneStrings = NULL;
+ fZoneStrings = nullptr;
}
}
@@ -408,38 +416,38 @@ DateFormatSymbols::copyData(const DateFormatSymbols& other) {
other.fStandaloneNarrowDayPeriods, other.fStandaloneNarrowDayPeriodsCount);
assignArray(fStandaloneAbbreviatedDayPeriods, fStandaloneAbbreviatedDayPeriodsCount,
other.fStandaloneAbbreviatedDayPeriods, other.fStandaloneAbbreviatedDayPeriodsCount);
- if (other.fLeapMonthPatterns != NULL) {
+ if (other.fLeapMonthPatterns != nullptr) {
assignArray(fLeapMonthPatterns, fLeapMonthPatternsCount, other.fLeapMonthPatterns, other.fLeapMonthPatternsCount);
} else {
- fLeapMonthPatterns = NULL;
+ fLeapMonthPatterns = nullptr;
fLeapMonthPatternsCount = 0;
}
- if (other.fShortYearNames != NULL) {
+ if (other.fShortYearNames != nullptr) {
assignArray(fShortYearNames, fShortYearNamesCount, other.fShortYearNames, other.fShortYearNamesCount);
} else {
- fShortYearNames = NULL;
+ fShortYearNames = nullptr;
fShortYearNamesCount = 0;
}
- if (other.fShortZodiacNames != NULL) {
+ if (other.fShortZodiacNames != nullptr) {
assignArray(fShortZodiacNames, fShortZodiacNamesCount, other.fShortZodiacNames, other.fShortZodiacNamesCount);
} else {
- fShortZodiacNames = NULL;
+ fShortZodiacNames = nullptr;
fShortZodiacNamesCount = 0;
}
- if (other.fZoneStrings != NULL) {
+ if (other.fZoneStrings != nullptr) {
fZoneStringsColCount = other.fZoneStringsColCount;
fZoneStringsRowCount = other.fZoneStringsRowCount;
createZoneStrings((const UnicodeString**)other.fZoneStrings);
} else {
- fZoneStrings = NULL;
+ fZoneStrings = nullptr;
fZoneStringsColCount = 0;
fZoneStringsRowCount = 0;
}
fZSFLocale = other.fZSFLocale;
// Other zone strings data is created on demand
- fLocaleZoneStrings = NULL;
+ fLocaleZoneStrings = nullptr;
// fastCopyFrom() - see assignArray comments
fLocalPatternChars.fastCopyFrom(other.fLocalPatternChars);
@@ -519,8 +527,8 @@ void DateFormatSymbols::disposeZoneStrings()
uprv_free(fLocaleZoneStrings);
}
- fZoneStrings = NULL;
- fLocaleZoneStrings = NULL;
+ fZoneStrings = nullptr;
+ fLocaleZoneStrings = nullptr;
fZoneStringsRowCount = 0;
fZoneStringsColCount = 0;
}
@@ -530,13 +538,13 @@ DateFormatSymbols::arrayCompare(const UnicodeString* array1,
const UnicodeString* array2,
int32_t count)
{
- if (array1 == array2) return TRUE;
+ if (array1 == array2) return true;
while (count>0)
{
--count;
- if (array1[count] != array2[count]) return FALSE;
+ if (array1[count] != array2[count]) return false;
}
- return TRUE;
+ return true;
}
bool
@@ -623,11 +631,11 @@ DateFormatSymbols::operator==(const DateFormatSymbols& other) const
fStandaloneWideDayPeriodsCount))
{
// Compare the contents of fZoneStrings
- if (fZoneStrings == NULL && other.fZoneStrings == NULL) {
+ if (fZoneStrings == nullptr && other.fZoneStrings == nullptr) {
if (fZSFLocale == other.fZSFLocale) {
return true;
}
- } else if (fZoneStrings != NULL && other.fZoneStrings != NULL) {
+ } else if (fZoneStrings != nullptr && other.fZoneStrings != nullptr) {
if (fZoneStringsRowCount == other.fZoneStringsRowCount
&& fZoneStringsColCount == other.fZoneStringsColCount) {
bool cmpres = true;
@@ -683,7 +691,7 @@ DateFormatSymbols::getShortMonths(int32_t &count) const
const UnicodeString*
DateFormatSymbols::getMonths(int32_t &count, DtContextType context, DtWidthType width ) const
{
- UnicodeString *returnValue = NULL;
+ UnicodeString *returnValue = nullptr;
switch (context) {
case FORMAT :
@@ -747,7 +755,7 @@ DateFormatSymbols::getShortWeekdays(int32_t &count) const
const UnicodeString*
DateFormatSymbols::getWeekdays(int32_t &count, DtContextType context, DtWidthType width) const
{
- UnicodeString *returnValue = NULL;
+ UnicodeString *returnValue = nullptr;
switch (context) {
case FORMAT :
switch(width) {
@@ -802,7 +810,7 @@ DateFormatSymbols::getWeekdays(int32_t &count, DtContextType context, DtWidthTyp
const UnicodeString*
DateFormatSymbols::getQuarters(int32_t &count, DtContextType context, DtWidthType width ) const
{
- UnicodeString *returnValue = NULL;
+ UnicodeString *returnValue = nullptr;
switch (context) {
case FORMAT :
@@ -1250,12 +1258,12 @@ DateFormatSymbols::setTimeSeparatorString(const UnicodeString& newTimeSeparator)
const UnicodeString**
DateFormatSymbols::getZoneStrings(int32_t& rowCount, int32_t& columnCount) const
{
- const UnicodeString **result = NULL;
+ const UnicodeString **result = nullptr;
static UMutex LOCK;
umtx_lock(&LOCK);
- if (fZoneStrings == NULL) {
- if (fLocaleZoneStrings == NULL) {
+ if (fZoneStrings == nullptr) {
+ if (fLocaleZoneStrings == nullptr) {
((DateFormatSymbols*)this)->initZoneStringsArray();
}
result = (const UnicodeString**)fLocaleZoneStrings;
@@ -1274,16 +1282,16 @@ DateFormatSymbols::getZoneStrings(int32_t& rowCount, int32_t& columnCount) const
// This code must be called within a synchronized block
void
-DateFormatSymbols::initZoneStringsArray(void) {
- if (fZoneStrings != NULL || fLocaleZoneStrings != NULL) {
+DateFormatSymbols::initZoneStringsArray() {
+ if (fZoneStrings != nullptr || fLocaleZoneStrings != nullptr) {
return;
}
UErrorCode status = U_ZERO_ERROR;
- StringEnumeration *tzids = NULL;
- UnicodeString ** zarray = NULL;
- TimeZoneNames *tzNames = NULL;
+ StringEnumeration *tzids = nullptr;
+ UnicodeString ** zarray = nullptr;
+ TimeZoneNames *tzNames = nullptr;
int32_t rows = 0;
static const UTimeZoneNameType TYPES[] = {
@@ -1294,7 +1302,7 @@ DateFormatSymbols::initZoneStringsArray(void) {
do { // dummy do-while
- tzids = TimeZone::createTimeZoneIDEnumeration(ZONE_SET, NULL, NULL, status);
+ tzids = TimeZone::createTimeZoneIDEnumeration(ZONE_SET, nullptr, nullptr, status);
rows = tzids->count(status);
if (U_FAILURE(status)) {
break;
@@ -1303,7 +1311,7 @@ DateFormatSymbols::initZoneStringsArray(void) {
// Allocate array
int32_t size = rows * sizeof(UnicodeString*);
zarray = (UnicodeString**)uprv_malloc(size);
- if (zarray == NULL) {
+ if (zarray == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -1324,7 +1332,7 @@ DateFormatSymbols::initZoneStringsArray(void) {
}
zarray[i] = new UnicodeString[5];
- if (zarray[i] == NULL) {
+ if (zarray[i] == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -1334,7 +1342,7 @@ DateFormatSymbols::initZoneStringsArray(void) {
i++;
}
- } while (FALSE);
+ } while (false);
if (U_FAILURE(status)) {
if (zarray) {
@@ -1344,7 +1352,7 @@ DateFormatSymbols::initZoneStringsArray(void) {
}
}
uprv_free(zarray);
- zarray = NULL;
+ zarray = nullptr;
}
}
@@ -1376,15 +1384,15 @@ DateFormatSymbols::setZoneStrings(const UnicodeString* const *strings, int32_t r
//------------------------------------------------------
const char16_t * U_EXPORT2
-DateFormatSymbols::getPatternUChars(void)
+DateFormatSymbols::getPatternUChars()
{
return gPatternChars;
}
UDateFormatField U_EXPORT2
-DateFormatSymbols::getPatternCharIndex(UChar c) {
- const UChar *p = u_strchr(gPatternChars, c);
- if (p == NULL) {
+DateFormatSymbols::getPatternCharIndex(char16_t c) {
+ const char16_t *p = u_strchr(gPatternChars, c);
+ if (p == nullptr) {
return UDAT_FIELD_COUNT;
} else {
return static_cast<UDateFormatField>(p - gPatternChars);
@@ -1422,14 +1430,14 @@ static const uint64_t kNumericFieldsForCount12 =
UBool U_EXPORT2
DateFormatSymbols::isNumericField(UDateFormatField f, int32_t count) {
if (f == UDAT_FIELD_COUNT) {
- return FALSE;
+ return false;
}
uint64_t flag = ((uint64_t)1 << f);
return ((kNumericFieldsAlways & flag) != 0 || ((kNumericFieldsForCount12 & flag) != 0 && count < 3));
}
UBool U_EXPORT2
-DateFormatSymbols::isNumericPatternChar(UChar c, int32_t count) {
+DateFormatSymbols::isNumericPatternChar(char16_t c, int32_t count) {
return isNumericField(getPatternCharIndex(c), count);
}
@@ -1455,35 +1463,35 @@ DateFormatSymbols::setLocalPatternChars(const UnicodeString& newLocalPatternChar
namespace {
// Constants declarations
-static const UChar kCalendarAliasPrefixUChar[] = {
+static 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 UChar kGregorianTagUChar[] = {
+static const char16_t kGregorianTagUChar[] = {
LOW_G, LOW_R, LOW_E, LOW_G, LOW_O, LOW_R, LOW_I, LOW_A, LOW_N
};
-static const UChar kVariantTagUChar[] = {
+static const char16_t kVariantTagUChar[] = {
PERCENT, LOW_V, LOW_A, LOW_R, LOW_I, LOW_A, LOW_N, LOW_T
};
-static const UChar kLeapTagUChar[] = {
+static const char16_t kLeapTagUChar[] = {
LOW_L, LOW_E, LOW_A, LOW_P
};
-static const UChar kCyclicNameSetsTagUChar[] = {
+static 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 UChar kYearsTagUChar[] = {
+static const char16_t kYearsTagUChar[] = {
SOLIDUS, LOW_Y, LOW_E, LOW_A, LOW_R, LOW_S
};
-static const UChar kZodiacsUChar[] = {
+static const char16_t kZodiacsUChar[] = {
SOLIDUS, LOW_Z, LOW_O, LOW_D, LOW_I, LOW_A, LOW_C, LOW_S
};
-static const UChar kDayPartsTagUChar[] = {
+static const char16_t kDayPartsTagUChar[] = {
SOLIDUS, LOW_D, LOW_A, LOW_Y, CAP_P, LOW_A, LOW_R, LOW_T, LOW_S
};
-static const UChar kFormatTagUChar[] = {
+static const char16_t kFormatTagUChar[] = {
SOLIDUS, LOW_F, LOW_O, LOW_R, LOW_M, LOW_A, LOW_T
};
-static const UChar kAbbrTagUChar[] = {
+static 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
};
@@ -1524,18 +1532,18 @@ struct CalendarDataSink : public ResourceSink {
// Initializes CalendarDataSink with default values
CalendarDataSink(UErrorCode& status)
- : arrays(FALSE, status), arraySizes(FALSE, status), maps(FALSE, status),
+ : arrays(false, status), arraySizes(false, status), maps(false, status),
mapRefs(),
aliasPathPairs(uprv_deleteUObject, uhash_compareUnicodeString, status),
currentCalendarType(), nextCalendarType(),
- resourcesToVisit(NULL), aliasRelativePath() {
+ resourcesToVisit(nullptr), aliasRelativePath() {
if (U_FAILURE(status)) { return; }
}
virtual ~CalendarDataSink();
// Configure the CalendarSink to visit all the resources
void visitAllResources() {
- resourcesToVisit.adoptInstead(NULL);
+ resourcesToVisit.adoptInstead(nullptr);
}
// Actions to be done before enumerating
@@ -1550,7 +1558,7 @@ struct CalendarDataSink : public ResourceSink {
U_ASSERT(!currentCalendarType.isEmpty());
// Stores the resources to visit on the next calendar.
- LocalPointer<UVector> resourcesToVisitNext(NULL);
+ LocalPointer<UVector> resourcesToVisitNext(nullptr);
ResourceTable calendarData = value.getTable(errorCode);
if (U_FAILURE(errorCode)) { return; }
@@ -1574,26 +1582,20 @@ struct CalendarDataSink : public ResourceSink {
errorCode);
if (U_FAILURE(errorCode)) { return; }
}
- LocalPointer<UnicodeString> aliasRelativePathCopy(new UnicodeString(aliasRelativePath), errorCode);
- resourcesToVisitNext->addElementX(aliasRelativePathCopy.getAlias(), errorCode);
+ LocalPointer<UnicodeString> aliasRelativePathCopy(aliasRelativePath.clone(), errorCode);
+ resourcesToVisitNext->adoptElement(aliasRelativePathCopy.orphan(), errorCode);
if (U_FAILURE(errorCode)) { return; }
- // Only release ownership after resourcesToVisitNext takes it (no error happened):
- aliasRelativePathCopy.orphan();
continue;
} else if (aliasType == SAME_CALENDAR) {
// Register same-calendar alias
- if (arrays.get(aliasRelativePath) == NULL && maps.get(aliasRelativePath) == NULL) {
- LocalPointer<UnicodeString> aliasRelativePathCopy(new UnicodeString(aliasRelativePath), errorCode);
- aliasPathPairs.addElementX(aliasRelativePathCopy.getAlias(), errorCode);
+ if (arrays.get(aliasRelativePath) == nullptr && maps.get(aliasRelativePath) == nullptr) {
+ LocalPointer<UnicodeString> aliasRelativePathCopy(aliasRelativePath.clone(), errorCode);
+ aliasPathPairs.adoptElement(aliasRelativePathCopy.orphan(), errorCode);
if (U_FAILURE(errorCode)) { return; }
- // Only release ownership after aliasPathPairs takes it (no error happened):
- aliasRelativePathCopy.orphan();
- LocalPointer<UnicodeString> keyUStringCopy(new UnicodeString(keyUString), errorCode);
- aliasPathPairs.addElementX(keyUStringCopy.getAlias(), errorCode);
+ LocalPointer<UnicodeString> keyUStringCopy(keyUString.clone(), errorCode);
+ aliasPathPairs.adoptElement(keyUStringCopy.orphan(), errorCode);
if (U_FAILURE(errorCode)) { return; }
- // Only release ownership after aliasPathPairs takes it (no error happened):
- keyUStringCopy.orphan();
}
continue;
}
@@ -1607,7 +1609,7 @@ struct CalendarDataSink : public ResourceSink {
if (uprv_strcmp(key, gAmPmMarkersTag) == 0
|| uprv_strcmp(key, gAmPmMarkersAbbrTag) == 0
|| uprv_strcmp(key, gAmPmMarkersNarrowTag) == 0) {
- if (arrays.get(keyUString) == NULL) {
+ if (arrays.get(keyUString) == nullptr) {
ResourceArray resourceArray = value.getArray(errorCode);
int32_t arraySize = resourceArray.getSize();
LocalArray<UnicodeString> stringArray(new UnicodeString[arraySize], errorCode);
@@ -1636,9 +1638,9 @@ struct CalendarDataSink : public ResourceSink {
UnicodeString *alias = (UnicodeString*)aliasPathPairs[i];
UnicodeString *aliasArray;
Hashtable *aliasMap;
- if ((aliasArray = (UnicodeString*)arrays.get(*alias)) != NULL) {
+ if ((aliasArray = (UnicodeString*)arrays.get(*alias)) != nullptr) {
UnicodeString *path = (UnicodeString*)aliasPathPairs[i + 1];
- if (arrays.get(*path) == NULL) {
+ if (arrays.get(*path) == nullptr) {
// Clone the array
int32_t aliasArraySize = arraySizes.geti(*alias);
LocalArray<UnicodeString> aliasArrayCopy(new UnicodeString[aliasArraySize], errorCode);
@@ -1650,9 +1652,9 @@ struct CalendarDataSink : public ResourceSink {
}
if (U_FAILURE(errorCode)) { return; }
mod = true;
- } else if ((aliasMap = (Hashtable*)maps.get(*alias)) != NULL) {
+ } else if ((aliasMap = (Hashtable*)maps.get(*alias)) != nullptr) {
UnicodeString *path = (UnicodeString*)aliasPathPairs[i + 1];
- if (maps.get(*path) == NULL) {
+ if (maps.get(*path) == nullptr) {
maps.put(*path, aliasMap, errorCode);
}
if (U_FAILURE(errorCode)) { return; }
@@ -1680,7 +1682,7 @@ struct CalendarDataSink : public ResourceSink {
ResourceTable table = value.getTable(errorCode);
if (U_FAILURE(errorCode)) return;
- Hashtable* stringMap = NULL;
+ Hashtable* stringMap = nullptr;
// Iterate over all the elements of the table and add them to the map
for (int i = 0; table.getKeyAndValue(i, key, value); i++) {
@@ -1696,8 +1698,8 @@ struct CalendarDataSink : public ResourceSink {
// We are on a leaf, store the map elements into the stringMap
if (i == 0) {
// mapRefs will keep ownership of 'stringMap':
- stringMap = mapRefs.create(FALSE, errorCode);
- if (stringMap == NULL) {
+ stringMap = mapRefs.create(false, errorCode);
+ if (stringMap == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1705,16 +1707,16 @@ struct CalendarDataSink : public ResourceSink {
if (U_FAILURE(errorCode)) { return; }
stringMap->setValueDeleter(uprv_deleteUObject);
}
- U_ASSERT(stringMap != NULL);
+ U_ASSERT(stringMap != nullptr);
int32_t valueStringSize;
- const UChar *valueString = value.getString(valueStringSize, errorCode);
+ const char16_t *valueString = value.getString(valueStringSize, errorCode);
if (U_FAILURE(errorCode)) { return; }
- LocalPointer<UnicodeString> valueUString(new UnicodeString(TRUE, valueString, valueStringSize), errorCode);
+ LocalPointer<UnicodeString> valueUString(new UnicodeString(true, valueString, valueStringSize), errorCode);
stringMap->put(keyUString, valueUString.orphan(), errorCode);
if (U_FAILURE(errorCode)) { return; }
continue;
}
- U_ASSERT(stringMap == NULL);
+ U_ASSERT(stringMap == nullptr);
// Store the current path's length and append the current key to the path.
int32_t pathLength = path.length();
@@ -1723,7 +1725,7 @@ struct CalendarDataSink : public ResourceSink {
// In cyclicNameSets ignore everything but years/format/abbreviated
// and zodiacs/format/abbreviated
if (path.startsWith(kCyclicNameSetsTagUChar, UPRV_LENGTHOF(kCyclicNameSetsTagUChar))) {
- UBool skip = TRUE;
+ UBool skip = true;
int32_t startIndex = UPRV_LENGTHOF(kCyclicNameSetsTagUChar);
int32_t length = 0;
if (startIndex == path.length()
@@ -1738,7 +1740,7 @@ struct CalendarDataSink : public ResourceSink {
length = 0;
if (startIndex == path.length()
|| path.compare(startIndex, (length = UPRV_LENGTHOF(kAbbrTagUChar)), kAbbrTagUChar, 0, UPRV_LENGTHOF(kAbbrTagUChar)) == 0) {
- skip = FALSE;
+ skip = false;
}
}
}
@@ -1750,7 +1752,7 @@ struct CalendarDataSink : public ResourceSink {
}
// == Handle aliases ==
- if (arrays.get(path) != NULL || maps.get(path) != NULL) {
+ if (arrays.get(path) != nullptr || maps.get(path) != nullptr) {
// Drop the latest key on the path and continue
path.retainBetween(0, pathLength);
continue;
@@ -1760,16 +1762,12 @@ struct CalendarDataSink : public ResourceSink {
if (U_FAILURE(errorCode)) { return; }
if (aliasType == SAME_CALENDAR) {
// Store the alias path and the current path on aliasPathPairs
- LocalPointer<UnicodeString> aliasRelativePathCopy(new UnicodeString(aliasRelativePath), errorCode);
- aliasPathPairs.addElementX(aliasRelativePathCopy.getAlias(), errorCode);
+ LocalPointer<UnicodeString> aliasRelativePathCopy(aliasRelativePath.clone(), errorCode);
+ aliasPathPairs.adoptElement(aliasRelativePathCopy.orphan(), errorCode);
if (U_FAILURE(errorCode)) { return; }
- // Only release ownership after aliasPathPairs takes it (no error happened):
- aliasRelativePathCopy.orphan();
- LocalPointer<UnicodeString> pathCopy(new UnicodeString(path), errorCode);
- aliasPathPairs.addElementX(pathCopy.getAlias(), errorCode);
+ LocalPointer<UnicodeString> pathCopy(path.clone(), errorCode);
+ aliasPathPairs.adoptElement(pathCopy.orphan(), errorCode);
if (U_FAILURE(errorCode)) { return; }
- // Only release ownership after aliasPathPairs takes it (no error happened):
- pathCopy.orphan();
// Drop the latest key on the path and continue
path.retainBetween(0, pathLength);
@@ -1805,7 +1803,7 @@ struct CalendarDataSink : public ResourceSink {
if (value.getType() == URES_ALIAS) {
int32_t aliasPathSize;
- const UChar* aliasPathUChar = value.getAliasString(aliasPathSize, errorCode);
+ const char16_t* aliasPathUChar = value.getAliasString(aliasPathSize, errorCode);
if (U_FAILURE(errorCode)) { return NONE; }
UnicodeString aliasPath(aliasPathUChar, aliasPathSize);
const int32_t aliasPrefixLength = UPRV_LENGTHOF(kCalendarAliasPrefixUChar);
@@ -1856,7 +1854,7 @@ CalendarDataSink::~CalendarDataSink() {
//------------------------------------------------------
static void
-initField(UnicodeString **field, int32_t& length, const UChar *data, LastResortSize numStr, LastResortSize strLen, UErrorCode &status) {
+initField(UnicodeString **field, int32_t& length, const char16_t *data, LastResortSize numStr, LastResortSize strLen, UErrorCode &status) {
if (U_SUCCESS(status)) {
length = numStr;
*field = newUnicodeStringArray((size_t)numStr);
@@ -1864,7 +1862,7 @@ initField(UnicodeString **field, int32_t& length, const UChar *data, LastResortS
for(int32_t i = 0; i<length; i++) {
// readonly aliases - all "data" strings are constant
// -1 as length for variable-length strings (gLastResortDayNames[0] is empty)
- (*(field)+i)->setTo(TRUE, data+(i*((int32_t)strLen)), -1);
+ (*(field)+i)->setTo(true, data+(i*((int32_t)strLen)), -1);
}
}
else {
@@ -1880,7 +1878,7 @@ initField(UnicodeString **field, int32_t& length, CalendarDataSink &sink, CharSt
UnicodeString keyUString(key.data(), -1, US_INV);
UnicodeString* array = static_cast<UnicodeString*>(sink.arrays.get(keyUString));
- if (array != NULL) {
+ if (array != nullptr) {
length = sink.arraySizes.geti(keyUString);
*field = array;
// DateFormatSymbols takes ownership of the array:
@@ -1898,11 +1896,11 @@ initField(UnicodeString **field, int32_t& length, CalendarDataSink &sink, CharSt
UnicodeString keyUString(key.data(), -1, US_INV);
UnicodeString* array = static_cast<UnicodeString*>(sink.arrays.get(keyUString));
- if (array != NULL) {
+ if (array != nullptr) {
int32_t arrayLength = sink.arraySizes.geti(keyUString);
length = arrayLength + arrayOffset;
*field = new UnicodeString[length];
- if (*field == NULL) {
+ if (*field == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1920,10 +1918,10 @@ initLeapMonthPattern(UnicodeString *field, int32_t index, CalendarDataSink &sink
if (U_SUCCESS(status)) {
UnicodeString pathUString(path.data(), -1, US_INV);
Hashtable *leapMonthTable = static_cast<Hashtable*>(sink.maps.get(pathUString));
- if (leapMonthTable != NULL) {
- UnicodeString leapLabel(FALSE, kLeapTagUChar, UPRV_LENGTHOF(kLeapTagUChar));
+ if (leapMonthTable != nullptr) {
+ UnicodeString leapLabel(false, kLeapTagUChar, UPRV_LENGTHOF(kLeapTagUChar));
UnicodeString *leapMonthPattern = static_cast<UnicodeString*>(leapMonthTable->get(leapLabel));
- if (leapMonthPattern != NULL) {
+ if (leapMonthPattern != nullptr) {
field[index].fastCopyFrom(*leapMonthPattern);
} else {
field[index].setToBogus();
@@ -1966,7 +1964,7 @@ typedef struct {
} ContextUsageTypeNameToEnumValue;
static const ContextUsageTypeNameToEnumValue contextUsageTypeMap[] = {
- // Entries must be sorted by usageTypeName; entry with NULL name terminates list.
+ // Entries must be sorted by usageTypeName; entry with nullptr name terminates list.
{ "day-format-except-narrow", DateFormatSymbols::kCapContextUsageDayFormat },
{ "day-narrow", DateFormatSymbols::kCapContextUsageDayNarrow },
{ "day-standalone-except-narrow", DateFormatSymbols::kCapContextUsageDayStandalone },
@@ -1980,7 +1978,7 @@ static const ContextUsageTypeNameToEnumValue contextUsageTypeMap[] = {
{ "month-standalone-except-narrow", DateFormatSymbols::kCapContextUsageMonthStandalone },
{ "zone-long", DateFormatSymbols::kCapContextUsageZoneLong },
{ "zone-short", DateFormatSymbols::kCapContextUsageZoneShort },
- { NULL, (DateFormatSymbols::ECapitalizationContextUsageType)0 },
+ { nullptr, (DateFormatSymbols::ECapitalizationContextUsageType)0 },
};
// Resource keys to look up localized strings for day periods.
@@ -1992,23 +1990,23 @@ static const char *dayPeriodKeys[] = {"midnight", "noon",
UnicodeString* loadDayPeriodStrings(CalendarDataSink &sink, CharString &path,
int32_t &stringCount, UErrorCode &status) {
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
UnicodeString pathUString(path.data(), -1, US_INV);
Hashtable* map = static_cast<Hashtable*>(sink.maps.get(pathUString));
stringCount = UPRV_LENGTHOF(dayPeriodKeys);
UnicodeString *strings = new UnicodeString[stringCount];
- if (strings == NULL) {
+ if (strings == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- if (map != NULL) {
+ if (map != nullptr) {
for (int32_t i = 0; i < stringCount; ++i) {
UnicodeString dayPeriodKey(dayPeriodKeys[i], -1, US_INV);
UnicodeString *dayPeriod = static_cast<UnicodeString*>(map->get(dayPeriodKey));
- if (dayPeriod != NULL) {
+ if (dayPeriod != nullptr) {
strings[i].fastCopyFrom(*dayPeriod);
} else {
strings[i].setToBogus();
@@ -2027,79 +2025,79 @@ void
DateFormatSymbols::initializeData(const Locale& locale, const char *type, UErrorCode& status, UBool useLastResortData)
{
int32_t len = 0;
- /* In case something goes wrong, initialize all of the data to NULL. */
- fEras = NULL;
+ /* In case something goes wrong, initialize all of the data to nullptr. */
+ fEras = nullptr;
fErasCount = 0;
- fEraNames = NULL;
+ fEraNames = nullptr;
fEraNamesCount = 0;
- fNarrowEras = NULL;
+ fNarrowEras = nullptr;
fNarrowErasCount = 0;
- fMonths = NULL;
+ fMonths = nullptr;
fMonthsCount=0;
- fShortMonths = NULL;
+ fShortMonths = nullptr;
fShortMonthsCount=0;
- fNarrowMonths = NULL;
+ fNarrowMonths = nullptr;
fNarrowMonthsCount=0;
- fStandaloneMonths = NULL;
+ fStandaloneMonths = nullptr;
fStandaloneMonthsCount=0;
- fStandaloneShortMonths = NULL;
+ fStandaloneShortMonths = nullptr;
fStandaloneShortMonthsCount=0;
- fStandaloneNarrowMonths = NULL;
+ fStandaloneNarrowMonths = nullptr;
fStandaloneNarrowMonthsCount=0;
- fWeekdays = NULL;
+ fWeekdays = nullptr;
fWeekdaysCount=0;
- fShortWeekdays = NULL;
+ fShortWeekdays = nullptr;
fShortWeekdaysCount=0;
- fShorterWeekdays = NULL;
+ fShorterWeekdays = nullptr;
fShorterWeekdaysCount=0;
- fNarrowWeekdays = NULL;
+ fNarrowWeekdays = nullptr;
fNarrowWeekdaysCount=0;
- fStandaloneWeekdays = NULL;
+ fStandaloneWeekdays = nullptr;
fStandaloneWeekdaysCount=0;
- fStandaloneShortWeekdays = NULL;
+ fStandaloneShortWeekdays = nullptr;
fStandaloneShortWeekdaysCount=0;
- fStandaloneShorterWeekdays = NULL;
+ fStandaloneShorterWeekdays = nullptr;
fStandaloneShorterWeekdaysCount=0;
- fStandaloneNarrowWeekdays = NULL;
+ fStandaloneNarrowWeekdays = nullptr;
fStandaloneNarrowWeekdaysCount=0;
- fAmPms = NULL;
+ fAmPms = nullptr;
fAmPmsCount=0;
- fNarrowAmPms = NULL;
+ fNarrowAmPms = nullptr;
fNarrowAmPmsCount=0;
fTimeSeparator.setToBogus();
- fQuarters = NULL;
+ fQuarters = nullptr;
fQuartersCount = 0;
- fShortQuarters = NULL;
+ fShortQuarters = nullptr;
fShortQuartersCount = 0;
- fNarrowQuarters = NULL;
+ fNarrowQuarters = nullptr;
fNarrowQuartersCount = 0;
- fStandaloneQuarters = NULL;
+ fStandaloneQuarters = nullptr;
fStandaloneQuartersCount = 0;
- fStandaloneShortQuarters = NULL;
+ fStandaloneShortQuarters = nullptr;
fStandaloneShortQuartersCount = 0;
- fStandaloneNarrowQuarters = NULL;
+ fStandaloneNarrowQuarters = nullptr;
fStandaloneNarrowQuartersCount = 0;
- fLeapMonthPatterns = NULL;
+ fLeapMonthPatterns = nullptr;
fLeapMonthPatternsCount = 0;
- fShortYearNames = NULL;
+ fShortYearNames = nullptr;
fShortYearNamesCount = 0;
- fShortZodiacNames = NULL;
+ fShortZodiacNames = nullptr;
fShortZodiacNamesCount = 0;
fZoneStringsRowCount = 0;
fZoneStringsColCount = 0;
- fZoneStrings = NULL;
- fLocaleZoneStrings = NULL;
- fAbbreviatedDayPeriods = NULL;
+ fZoneStrings = nullptr;
+ fLocaleZoneStrings = nullptr;
+ fAbbreviatedDayPeriods = nullptr;
fAbbreviatedDayPeriodsCount = 0;
- fWideDayPeriods = NULL;
+ fWideDayPeriods = nullptr;
fWideDayPeriodsCount = 0;
- fNarrowDayPeriods = NULL;
+ fNarrowDayPeriods = nullptr;
fNarrowDayPeriodsCount = 0;
- fStandaloneAbbreviatedDayPeriods = NULL;
+ fStandaloneAbbreviatedDayPeriods = nullptr;
fStandaloneAbbreviatedDayPeriodsCount = 0;
- fStandaloneWideDayPeriods = NULL;
+ fStandaloneWideDayPeriods = nullptr;
fStandaloneWideDayPeriodsCount = 0;
- fStandaloneNarrowDayPeriods = NULL;
+ fStandaloneNarrowDayPeriods = nullptr;
fStandaloneNarrowDayPeriodsCount = 0;
uprv_memset(fCapitalization, 0, sizeof(fCapitalization));
@@ -2113,13 +2111,13 @@ 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(NULL, locale.getBaseName(), &status);
- UResourceBundle *cb = ures_getByKey(rb, gCalendarTag, NULL, &status);
+ UResourceBundle *rb = ures_open(nullptr, locale.getBaseName(), &status);
+ UResourceBundle *cb = ures_getByKey(rb, gCalendarTag, nullptr, &status);
if (U_FAILURE(status)) return;
// Iterate over the resource bundle data following the fallbacks through different calendar types
- UnicodeString calendarType((type != NULL && *type != '\0')? type : gGregorianTag, -1, US_INV);
+ UnicodeString calendarType((type != nullptr && *type != '\0')? type : gGregorianTag, -1, US_INV);
while (!calendarType.isBogus()) {
CharString calendarTypeBuffer;
calendarTypeBuffer.appendInvariantChars(calendarType, status);
@@ -2128,11 +2126,11 @@ 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, NULL, &status);
+ UResourceBundle *ctb = ures_getByKeyWithFallback(cb, 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));
+ calendarType.setTo(false, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar));
calendarSink.visitAllResources();
status = oldStatus;
continue;
@@ -2155,7 +2153,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
// Gregorian is always the last fallback
if (calendarType.isBogus()) {
- calendarType.setTo(FALSE, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar));
+ calendarType.setTo(false, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar));
calendarSink.visitAllResources();
}
}
@@ -2200,7 +2198,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
fLeapMonthPatternsCount = kMonthPatternsCount;
} else {
delete[] fLeapMonthPatterns;
- fLeapMonthPatterns = NULL;
+ fLeapMonthPatterns = nullptr;
}
}
@@ -2213,23 +2211,23 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
// Load context transforms and capitalization
tempStatus = U_ZERO_ERROR;
- UResourceBundle *localeBundle = ures_open(NULL, locale.getName(), &tempStatus);
+ UResourceBundle *localeBundle = ures_open(nullptr, locale.getName(), &tempStatus);
if (U_SUCCESS(tempStatus)) {
- UResourceBundle *contextTransforms = ures_getByKeyWithFallback(localeBundle, gContextTransformsTag, NULL, &tempStatus);
+ UResourceBundle *contextTransforms = ures_getByKeyWithFallback(localeBundle, gContextTransformsTag, nullptr, &tempStatus);
if (U_SUCCESS(tempStatus)) {
UResourceBundle *contextTransformUsage;
- while ( (contextTransformUsage = ures_getNextResource(contextTransforms, NULL, &tempStatus)) != NULL ) {
+ while ( (contextTransformUsage = ures_getNextResource(contextTransforms, nullptr, &tempStatus)) != nullptr ) {
const int32_t * intVector = ures_getIntVector(contextTransformUsage, &len, &status);
- if (U_SUCCESS(tempStatus) && intVector != NULL && len >= 2) {
+ if (U_SUCCESS(tempStatus) && intVector != nullptr && len >= 2) {
const char* usageType = ures_getKey(contextTransformUsage);
- if (usageType != NULL) {
+ if (usageType != nullptr) {
const ContextUsageTypeNameToEnumValue * typeMapPtr = contextUsageTypeMap;
int32_t compResult = 0;
// linear search; list is short and we cannot be sure that bsearch is available
- while ( typeMapPtr->usageTypeName != NULL && (compResult = uprv_strcmp(usageType, typeMapPtr->usageTypeName)) > 0 ) {
+ while ( typeMapPtr->usageTypeName != nullptr && (compResult = uprv_strcmp(usageType, typeMapPtr->usageTypeName)) > 0 ) {
++typeMapPtr;
}
- if (typeMapPtr->usageTypeName != NULL && compResult == 0) {
+ if (typeMapPtr->usageTypeName != nullptr && compResult == 0) {
fCapitalization[typeMapPtr->usageTypeEnumValue][0] = static_cast<UBool>(intVector[0]);
fCapitalization[typeMapPtr->usageTypeEnumValue][1] = static_cast<UBool>(intVector[1]);
}
@@ -2245,15 +2243,15 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
const LocalPointer<NumberingSystem> numberingSystem(
NumberingSystem::createInstance(locale, tempStatus), tempStatus);
if (U_SUCCESS(tempStatus)) {
- // These functions all fail gracefully if passed NULL pointers and
+ // These functions all fail gracefully if passed nullptr pointers and
// 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, NULL, &tempStatus));
+ localeBundle, gNumberElementsTag, nullptr, &tempStatus));
const LocalUResourceBundlePointer nsNameData(ures_getByKeyWithFallback(
- numberElementsData.getAlias(), numberingSystem->getName(), NULL, &tempStatus));
+ numberElementsData.getAlias(), numberingSystem->getName(), nullptr, &tempStatus));
const LocalUResourceBundlePointer symbolsData(ures_getByKeyWithFallback(
- nsNameData.getAlias(), gSymbolsTag, NULL, &tempStatus));
+ nsNameData.getAlias(), gSymbolsTag, nullptr, &tempStatus));
fTimeSeparator = ures_getUnicodeStringByKey(
symbolsData.getAlias(), gTimeSeparatorTag, &tempStatus);
if (U_FAILURE(tempStatus)) {
@@ -2269,24 +2267,48 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
}
// Load day periods
+ fAbbreviatedDayPeriods = loadDayPeriodStrings(calendarSink,
+ buildResourcePath(path, gDayPeriodTag, gNamesFormatTag, gNamesAbbrTag, status),
+ fAbbreviatedDayPeriodsCount, status);
+
fWideDayPeriods = loadDayPeriodStrings(calendarSink,
buildResourcePath(path, gDayPeriodTag, gNamesFormatTag, gNamesWideTag, status),
fWideDayPeriodsCount, status);
fNarrowDayPeriods = loadDayPeriodStrings(calendarSink,
buildResourcePath(path, gDayPeriodTag, gNamesFormatTag, gNamesNarrowTag, status),
fNarrowDayPeriodsCount, status);
- fAbbreviatedDayPeriods = loadDayPeriodStrings(calendarSink,
- buildResourcePath(path, gDayPeriodTag, gNamesFormatTag, gNamesAbbrTag, status),
- fAbbreviatedDayPeriodsCount, status);
+
+ fStandaloneAbbreviatedDayPeriods = loadDayPeriodStrings(calendarSink,
+ buildResourcePath(path, gDayPeriodTag, gNamesStandaloneTag, gNamesAbbrTag, status),
+ fStandaloneAbbreviatedDayPeriodsCount, status);
+
fStandaloneWideDayPeriods = loadDayPeriodStrings(calendarSink,
buildResourcePath(path, gDayPeriodTag, gNamesStandaloneTag, gNamesWideTag, status),
fStandaloneWideDayPeriodsCount, status);
fStandaloneNarrowDayPeriods = loadDayPeriodStrings(calendarSink,
buildResourcePath(path, gDayPeriodTag, gNamesStandaloneTag, gNamesNarrowTag, status),
fStandaloneNarrowDayPeriodsCount, status);
- fStandaloneAbbreviatedDayPeriods = loadDayPeriodStrings(calendarSink,
- buildResourcePath(path, gDayPeriodTag, gNamesStandaloneTag, gNamesAbbrTag, status),
- fStandaloneAbbreviatedDayPeriodsCount, status);
+
+ // Fill in for missing/bogus items (dayPeriods are a map so single items might be missing)
+ if (U_SUCCESS(status)) {
+ for (int32_t dpidx = 0; dpidx < fAbbreviatedDayPeriodsCount; ++dpidx) {
+ if (dpidx < fWideDayPeriodsCount && fWideDayPeriods != nullptr && fWideDayPeriods[dpidx].isBogus()) {
+ fWideDayPeriods[dpidx].fastCopyFrom(fAbbreviatedDayPeriods[dpidx]);
+ }
+ if (dpidx < fNarrowDayPeriodsCount && fNarrowDayPeriods != nullptr && fNarrowDayPeriods[dpidx].isBogus()) {
+ fNarrowDayPeriods[dpidx].fastCopyFrom(fAbbreviatedDayPeriods[dpidx]);
+ }
+ if (dpidx < fStandaloneAbbreviatedDayPeriodsCount && fStandaloneAbbreviatedDayPeriods != nullptr && fStandaloneAbbreviatedDayPeriods[dpidx].isBogus()) {
+ fStandaloneAbbreviatedDayPeriods[dpidx].fastCopyFrom(fAbbreviatedDayPeriods[dpidx]);
+ }
+ if (dpidx < fStandaloneWideDayPeriodsCount && fStandaloneWideDayPeriods != nullptr && fStandaloneWideDayPeriods[dpidx].isBogus()) {
+ fStandaloneWideDayPeriods[dpidx].fastCopyFrom(fStandaloneAbbreviatedDayPeriods[dpidx]);
+ }
+ if (dpidx < fStandaloneNarrowDayPeriodsCount && fStandaloneNarrowDayPeriods != nullptr && fStandaloneNarrowDayPeriods[dpidx].isBogus()) {
+ fStandaloneNarrowDayPeriods[dpidx].fastCopyFrom(fStandaloneAbbreviatedDayPeriods[dpidx]);
+ }
+ }
+ }
U_LOCALE_BASED(locBased, *this);
// if we make it to here, the resource data is cool, and we can get everything out
@@ -2362,12 +2384,20 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
initField(&fNarrowAmPms, fNarrowAmPmsCount, calendarSink,
buildResourcePath(path, gAmPmMarkersAbbrTag, status), status);
}
+ if(status == U_MISSING_RESOURCE_ERROR) {
+ status = U_ZERO_ERROR;
+ assignArray(fNarrowAmPms, fNarrowAmPmsCount, fAmPms, fAmPmsCount);
+ }
// Load quarters
initField(&fQuarters, fQuartersCount, calendarSink,
buildResourcePath(path, gQuartersTag, gNamesFormatTag, gNamesWideTag, status), status);
initField(&fShortQuarters, fShortQuartersCount, calendarSink,
buildResourcePath(path, gQuartersTag, gNamesFormatTag, gNamesAbbrTag, status), status);
+ if(status == U_MISSING_RESOURCE_ERROR) {
+ status = U_ZERO_ERROR;
+ assignArray(fShortQuarters, fShortQuartersCount, fQuarters, fQuartersCount);
+ }
initField(&fStandaloneQuarters, fStandaloneQuartersCount, calendarSink,
buildResourcePath(path, gQuartersTag, gNamesStandaloneTag, gNamesWideTag, status), status);
@@ -2396,14 +2426,14 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
/*
// fastCopyFrom()/setTo() - see assignArray comments
resStr = ures_getStringByKey(fResourceBundle, gLocalPatternCharsTag, &len, &status);
- fLocalPatternChars.setTo(TRUE, resStr, len);
+ fLocalPatternChars.setTo(true, resStr, len);
// If the locale data does not include new pattern chars, use the defaults
// TODO: Consider making this an error, since this may add conflicting characters.
if (len < PATTERN_CHARS_LEN) {
- fLocalPatternChars.append(UnicodeString(TRUE, &gPatternChars[len], PATTERN_CHARS_LEN-len));
+ fLocalPatternChars.append(UnicodeString(true, &gPatternChars[len], PATTERN_CHARS_LEN-len));
}
*/
- fLocalPatternChars.setTo(TRUE, gPatternChars, PATTERN_CHARS_LEN);
+ fLocalPatternChars.setTo(true, gPatternChars, PATTERN_CHARS_LEN);
// Format wide weekdays -> fWeekdays
// {sfb} fixed to handle 1-based weekdays
@@ -2479,32 +2509,32 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError
status = U_USING_FALLBACK_WARNING;
//TODO(fabalbon): make sure we are storing las resort data for all fields in here.
- initField(&fEras, fErasCount, (const UChar *)gLastResortEras, kEraNum, kEraLen, status);
- initField(&fEraNames, fEraNamesCount, (const UChar *)gLastResortEras, kEraNum, kEraLen, status);
- initField(&fNarrowEras, fNarrowErasCount, (const UChar *)gLastResortEras, kEraNum, kEraLen, status);
- initField(&fMonths, fMonthsCount, (const UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
- initField(&fShortMonths, fShortMonthsCount, (const UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
- initField(&fNarrowMonths, fNarrowMonthsCount, (const UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
- initField(&fStandaloneMonths, fStandaloneMonthsCount, (const UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
- initField(&fStandaloneShortMonths, fStandaloneShortMonthsCount, (const UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
- initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, (const UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
- initField(&fWeekdays, fWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fShortWeekdays, fShortWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fShorterWeekdays, fShorterWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fNarrowWeekdays, fNarrowWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fStandaloneWeekdays, fStandaloneWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
- initField(&fAmPms, fAmPmsCount, (const UChar *)gLastResortAmPmMarkers, kAmPmNum, kAmPmLen, status);
- initField(&fNarrowAmPms, fNarrowAmPmsCount, (const UChar *)gLastResortAmPmMarkers, kAmPmNum, kAmPmLen, status);
- initField(&fQuarters, fQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
- initField(&fShortQuarters, fShortQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
- initField(&fNarrowQuarters, fNarrowQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
- initField(&fStandaloneQuarters, fStandaloneQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
- initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
- initField(&fStandaloneNarrowQuarters, fStandaloneNarrowQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
- fLocalPatternChars.setTo(TRUE, gPatternChars, PATTERN_CHARS_LEN);
+ initField(&fEras, fErasCount, (const char16_t *)gLastResortEras, kEraNum, kEraLen, status);
+ initField(&fEraNames, fEraNamesCount, (const char16_t *)gLastResortEras, kEraNum, kEraLen, status);
+ initField(&fNarrowEras, fNarrowErasCount, (const char16_t *)gLastResortEras, kEraNum, kEraLen, status);
+ initField(&fMonths, fMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
+ initField(&fShortMonths, fShortMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
+ initField(&fNarrowMonths, fNarrowMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
+ initField(&fStandaloneMonths, fStandaloneMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
+ initField(&fStandaloneShortMonths, fStandaloneShortMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
+ initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, (const char16_t *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
+ initField(&fWeekdays, fWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fShortWeekdays, fShortWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fShorterWeekdays, fShorterWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fNarrowWeekdays, fNarrowWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fStandaloneWeekdays, fStandaloneWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount, (const char16_t *)gLastResortDayNames, kDayNum, kDayLen, status);
+ initField(&fAmPms, fAmPmsCount, (const char16_t *)gLastResortAmPmMarkers, kAmPmNum, kAmPmLen, status);
+ initField(&fNarrowAmPms, fNarrowAmPmsCount, (const char16_t *)gLastResortAmPmMarkers, kAmPmNum, kAmPmLen, status);
+ initField(&fQuarters, fQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
+ initField(&fShortQuarters, fShortQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
+ initField(&fNarrowQuarters, fNarrowQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
+ initField(&fStandaloneQuarters, fStandaloneQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
+ initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
+ initField(&fStandaloneNarrowQuarters, fStandaloneNarrowQuartersCount, (const char16_t *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
+ fLocalPatternChars.setTo(true, gPatternChars, PATTERN_CHARS_LEN);
}
}
diff --git a/contrib/libs/icu/i18n/dtitv_impl.h b/contrib/libs/icu/i18n/dtitv_impl.h
index 6fc16bb3e08..2cc77648179 100644
--- a/contrib/libs/icu/i18n/dtitv_impl.h
+++ b/contrib/libs/icu/i18n/dtitv_impl.h
@@ -25,65 +25,65 @@
#include "unicode/unistr.h"
-#define QUOTE ((UChar)0x0027)
-#define LOW_LINE ((UChar)0x005F)
-#define COLON ((UChar)0x003A)
-#define LEFT_CURLY_BRACKET ((UChar)0x007B)
-#define RIGHT_CURLY_BRACKET ((UChar)0x007D)
-#define SPACE ((UChar)0x0020)
-#define EN_DASH ((UChar)0x2013)
-#define SOLIDUS ((UChar)0x002F)
+#define QUOTE ((char16_t)0x0027)
+#define LOW_LINE ((char16_t)0x005F)
+#define COLON ((char16_t)0x003A)
+#define LEFT_CURLY_BRACKET ((char16_t)0x007B)
+#define RIGHT_CURLY_BRACKET ((char16_t)0x007D)
+#define SPACE ((char16_t)0x0020)
+#define EN_DASH ((char16_t)0x2013)
+#define SOLIDUS ((char16_t)0x002F)
-#define DIGIT_ZERO ((UChar)0x0030)
-#define DIGIT_ONE ((UChar)0x0031)
+#define DIGIT_ZERO ((char16_t)0x0030)
+#define DIGIT_ONE ((char16_t)0x0031)
-#define LOW_A ((UChar)0x0061)
-#define LOW_B ((UChar)0x0062)
-#define LOW_C ((UChar)0x0063)
-#define LOW_D ((UChar)0x0064)
-#define LOW_E ((UChar)0x0065)
-#define LOW_F ((UChar)0x0066)
-#define LOW_G ((UChar)0x0067)
-#define LOW_H ((UChar)0x0068)
-#define LOW_I ((UChar)0x0069)
-#define LOW_J ((UChar)0x006a)
-#define LOW_K ((UChar)0x006B)
-#define LOW_L ((UChar)0x006C)
-#define LOW_M ((UChar)0x006D)
-#define LOW_N ((UChar)0x006E)
-#define LOW_O ((UChar)0x006F)
-#define LOW_P ((UChar)0x0070)
-#define LOW_Q ((UChar)0x0071)
-#define LOW_R ((UChar)0x0072)
-#define LOW_S ((UChar)0x0073)
-#define LOW_T ((UChar)0x0074)
-#define LOW_U ((UChar)0x0075)
-#define LOW_V ((UChar)0x0076)
-#define LOW_W ((UChar)0x0077)
-#define LOW_Y ((UChar)0x0079)
-#define LOW_Z ((UChar)0x007A)
+#define LOW_A ((char16_t)0x0061)
+#define LOW_B ((char16_t)0x0062)
+#define LOW_C ((char16_t)0x0063)
+#define LOW_D ((char16_t)0x0064)
+#define LOW_E ((char16_t)0x0065)
+#define LOW_F ((char16_t)0x0066)
+#define LOW_G ((char16_t)0x0067)
+#define LOW_H ((char16_t)0x0068)
+#define LOW_I ((char16_t)0x0069)
+#define LOW_J ((char16_t)0x006a)
+#define LOW_K ((char16_t)0x006B)
+#define LOW_L ((char16_t)0x006C)
+#define LOW_M ((char16_t)0x006D)
+#define LOW_N ((char16_t)0x006E)
+#define LOW_O ((char16_t)0x006F)
+#define LOW_P ((char16_t)0x0070)
+#define LOW_Q ((char16_t)0x0071)
+#define LOW_R ((char16_t)0x0072)
+#define LOW_S ((char16_t)0x0073)
+#define LOW_T ((char16_t)0x0074)
+#define LOW_U ((char16_t)0x0075)
+#define LOW_V ((char16_t)0x0076)
+#define LOW_W ((char16_t)0x0077)
+#define LOW_Y ((char16_t)0x0079)
+#define LOW_Z ((char16_t)0x007A)
-#define CAP_A ((UChar)0x0041)
-#define CAP_B ((UChar)0x0042)
-#define CAP_C ((UChar)0x0043)
-#define CAP_D ((UChar)0x0044)
-#define CAP_E ((UChar)0x0045)
-#define CAP_F ((UChar)0x0046)
-#define CAP_G ((UChar)0x0047)
-#define CAP_J ((UChar)0x004A)
-#define CAP_H ((UChar)0x0048)
-#define CAP_K ((UChar)0x004B)
-#define CAP_L ((UChar)0x004C)
-#define CAP_M ((UChar)0x004D)
-#define CAP_O ((UChar)0x004F)
-#define CAP_Q ((UChar)0x0051)
-#define CAP_S ((UChar)0x0053)
-#define CAP_T ((UChar)0x0054)
-#define CAP_U ((UChar)0x0055)
-#define CAP_V ((UChar)0x0056)
-#define CAP_W ((UChar)0x0057)
-#define CAP_Y ((UChar)0x0059)
-#define CAP_Z ((UChar)0x005A)
+#define CAP_A ((char16_t)0x0041)
+#define CAP_B ((char16_t)0x0042)
+#define CAP_C ((char16_t)0x0043)
+#define CAP_D ((char16_t)0x0044)
+#define CAP_E ((char16_t)0x0045)
+#define CAP_F ((char16_t)0x0046)
+#define CAP_G ((char16_t)0x0047)
+#define CAP_J ((char16_t)0x004A)
+#define CAP_H ((char16_t)0x0048)
+#define CAP_K ((char16_t)0x004B)
+#define CAP_L ((char16_t)0x004C)
+#define CAP_M ((char16_t)0x004D)
+#define CAP_O ((char16_t)0x004F)
+#define CAP_Q ((char16_t)0x0051)
+#define CAP_S ((char16_t)0x0053)
+#define CAP_T ((char16_t)0x0054)
+#define CAP_U ((char16_t)0x0055)
+#define CAP_V ((char16_t)0x0056)
+#define CAP_W ((char16_t)0x0057)
+#define CAP_Y ((char16_t)0x0059)
+#define CAP_Z ((char16_t)0x005A)
//#define MINIMUM_SUPPORTED_CALENDAR_FIELD UCAL_MINUTE
diff --git a/contrib/libs/icu/i18n/dtitvfmt.cpp b/contrib/libs/icu/i18n/dtitvfmt.cpp
index 298fb62be0c..60870146681 100644
--- a/contrib/libs/icu/i18n/dtitvfmt.cpp
+++ b/contrib/libs/icu/i18n/dtitvfmt.cpp
@@ -44,7 +44,7 @@ U_NAMESPACE_BEGIN
#endif
-static const UChar gDateFormatSkeleton[][11] = {
+static const char16_t gDateFormatSkeleton[][11] = {
//yMMMMEEEEd
{LOW_Y, CAP_M, CAP_M, CAP_M, CAP_M, CAP_E, CAP_E, CAP_E, CAP_E, LOW_D, 0},
//yMMMMd
@@ -61,10 +61,10 @@ static const char gDateTimePatternsTag[] = "DateTimePatterns";
// latestFirst:
-static const UChar gLaterFirstPrefix[] = {LOW_L, LOW_A, LOW_T, LOW_E, LOW_S,LOW_T, CAP_F, LOW_I, LOW_R, LOW_S, LOW_T, COLON};
+static const char16_t gLaterFirstPrefix[] = {LOW_L, LOW_A, LOW_T, LOW_E, LOW_S,LOW_T, CAP_F, LOW_I, LOW_R, LOW_S, LOW_T, COLON};
// earliestFirst:
-static const UChar gEarlierFirstPrefix[] = {LOW_E, LOW_A, LOW_R, LOW_L, LOW_I, LOW_E, LOW_S, LOW_T, CAP_F, LOW_I, LOW_R, LOW_S, LOW_T, COLON};
+static const char16_t gEarlierFirstPrefix[] = {LOW_E, LOW_A, LOW_R, LOW_L, LOW_I, LOW_E, LOW_S, LOW_T, CAP_F, LOW_I, LOW_R, LOW_S, LOW_T, COLON};
class FormattedDateIntervalData : public FormattedValueFieldPositionIteratorImpl {
@@ -104,7 +104,7 @@ DateIntervalFormat::createInstance(const UnicodeString& skeleton,
UnicodeString pat;
((SimpleDateFormat*)dtfmt)->toPattern(pat);
pat.extract(0, pat.length(), result_1, "UTF-8");
- sprintf(mesg, "skeleton: %s; pattern: %s\n", result, result_1);
+ snprintf(mesg, sizeof(mesg), "skeleton: %s; pattern: %s\n", result, result_1);
PRINTMESG(mesg)
#endif
@@ -298,7 +298,7 @@ DateIntervalFormat::format(const DateInterval* dtInterval,
}
FieldPositionOnlyHandler handler(fieldPosition);
- handler.setAcceptFirstOnly(TRUE);
+ handler.setAcceptFirstOnly(true);
int8_t ignore;
Mutex lock(&gFormatterMutex);
@@ -351,7 +351,7 @@ DateIntervalFormat::format(Calendar& fromCalendar,
FieldPosition& pos,
UErrorCode& status) const {
FieldPositionOnlyHandler handler(pos);
- handler.setAcceptFirstOnly(TRUE);
+ handler.setAcceptFirstOnly(true);
int8_t ignore;
Mutex lock(&gFormatterMutex);
@@ -761,7 +761,7 @@ DateIntervalFormat::initializePattern(UErrorCode& status) {
char result_1[1000];
char mesg[2000];
fSkeleton.extract(0, fSkeleton.length(), result, "UTF-8");
- sprintf(mesg, "in getBestSkeleton: fSkeleton: %s; \n", result);
+ snprintf(mesg, sizeof(mesg), "in getBestSkeleton: fSkeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
// fSkeleton is already set by createDateIntervalInstance()
@@ -808,7 +808,7 @@ DateIntervalFormat::initializePattern(UErrorCode& status) {
char result_1[1000];
char mesg[2000];
fSkeleton.extract(0, fSkeleton.length(), result, "UTF-8");
- sprintf(mesg, "in getBestSkeleton: fSkeleton: %s; \n", result);
+ snprintf(mesg, sizeof(mesg), "in getBestSkeleton: fSkeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
@@ -827,7 +827,7 @@ DateIntervalFormat::initializePattern(UErrorCode& status) {
dateTimePatternsRes.getAlias(), &status);
int32_t dateTimeFormatLength;
- const UChar* dateTimeFormat = ures_getStringByIndex(
+ const char16_t* dateTimeFormat = ures_getStringByIndex(
dateTimePatternsRes.getAlias(),
(int32_t)DateFormat::kDateTime,
&dateTimeFormatLength, &status);
@@ -964,19 +964,28 @@ UnicodeString
DateIntervalFormat::normalizeHourMetacharacters(const UnicodeString& skeleton) const {
UnicodeString result = skeleton;
- UChar hourMetachar = u'\0';
- int32_t metacharStart = 0;
- int32_t metacharCount = 0;
+ char16_t hourMetachar = u'\0';
+ char16_t dayPeriodChar = u'\0';
+ int32_t hourFieldStart = 0;
+ int32_t hourFieldLength = 0;
+ int32_t dayPeriodStart = 0;
+ int32_t dayPeriodLength = 0;
for (int32_t i = 0; i < result.length(); i++) {
- UChar c = result[i];
- if (c == LOW_J || c == CAP_J || c == CAP_C) {
+ char16_t c = result[i];
+ if (c == LOW_J || c == CAP_J || c == CAP_C || c == LOW_H || c == CAP_H || c == LOW_K || c == CAP_K) {
if (hourMetachar == u'\0') {
hourMetachar = c;
- metacharStart = i;
+ hourFieldStart = i;
}
- ++metacharCount;
+ ++hourFieldLength;
+ } else if (c == LOW_A || c == LOW_B || c == CAP_B) {
+ if (dayPeriodChar == u'\0') {
+ dayPeriodChar = c;
+ dayPeriodStart = i;
+ }
+ ++dayPeriodLength;
} else {
- if (hourMetachar != u'\0') {
+ if (hourMetachar != u'\0' && dayPeriodChar != u'\0') {
break;
}
}
@@ -984,8 +993,7 @@ DateIntervalFormat::normalizeHourMetacharacters(const UnicodeString& skeleton) c
if (hourMetachar != u'\0') {
UErrorCode err = U_ZERO_ERROR;
- UChar hourChar = CAP_H;
- UChar dayPeriodChar = LOW_A;
+ char16_t hourChar = CAP_H;
UnicodeString convertedPattern = DateFormat::getBestPattern(fLocale, UnicodeString(hourMetachar), err);
if (U_SUCCESS(err)) {
@@ -1012,34 +1020,32 @@ DateIntervalFormat::normalizeHourMetacharacters(const UnicodeString& skeleton) c
dayPeriodChar = LOW_B;
} else if (convertedPattern.indexOf(CAP_B) != -1) {
dayPeriodChar = CAP_B;
+ } else if (dayPeriodChar == u'\0') {
+ dayPeriodChar = LOW_A;
}
}
- if (hourChar == CAP_H || hourChar == LOW_K) {
- result.replace(metacharStart, metacharCount, hourChar);
- } else {
- UnicodeString hourAndDayPeriod(hourChar);
- switch (metacharCount) {
- case 1:
- case 2:
- default:
- hourAndDayPeriod.append(UnicodeString(dayPeriodChar));
- break;
- case 3:
- case 4:
- for (int32_t i = 0; i < 4; i++) {
- hourAndDayPeriod.append(dayPeriodChar);
- }
- break;
- case 5:
- case 6:
- for (int32_t i = 0; i < 5; i++) {
- hourAndDayPeriod.append(dayPeriodChar);
- }
- break;
+ UnicodeString hourAndDayPeriod(hourChar);
+ if (hourChar != CAP_H && hourChar != LOW_K) {
+ int32_t newDayPeriodLength = 0;
+ if (dayPeriodLength >= 5 || hourFieldLength >= 5) {
+ newDayPeriodLength = 5;
+ } else if (dayPeriodLength >= 3 || hourFieldLength >= 3) {
+ newDayPeriodLength = 3;
+ } else {
+ newDayPeriodLength = 1;
}
- result.replace(metacharStart, metacharCount, hourAndDayPeriod);
+ for (int32_t i = 0; i < newDayPeriodLength; i++) {
+ hourAndDayPeriod.append(dayPeriodChar);
+ }
+ }
+ result.replace(hourFieldStart, hourFieldLength, hourAndDayPeriod);
+ if (dayPeriodStart > hourFieldStart) {
+ // before deleting the original day period field, adjust its position in case
+ // we just changed the size of the hour field (and new day period field)
+ dayPeriodStart += hourAndDayPeriod.length() - hourFieldLength;
}
+ result.remove(dayPeriodStart, dayPeriodLength);
}
return result;
}
@@ -1060,11 +1066,11 @@ DateIntervalFormat::getDateTimeSkeleton(const UnicodeString& skeleton,
int32_t mCount = 0;
int32_t vCount = 0;
int32_t zCount = 0;
- UChar hourChar = u'\0';
+ char16_t hourChar = u'\0';
int32_t i;
for (i = 0; i < skeleton.length(); ++i) {
- UChar ch = skeleton[i];
+ char16_t ch = skeleton[i];
switch ( ch ) {
case CAP_E:
dateSkeleton.append(ch);
@@ -1201,8 +1207,8 @@ DateIntervalFormat::getDateTimeSkeleton(const UnicodeString& skeleton,
* @param dateSkeleton normalized date skeleton
* @param timeSkeleton normalized time skeleton
* @return whether the resource is found for the skeleton.
- * TRUE if interval pattern found for the skeleton,
- * FALSE otherwise.
+ * true if interval pattern found for the skeleton,
+ * false otherwise.
* @stable ICU 4.0
*/
UBool
@@ -1414,8 +1420,8 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field,
* @param extendedBestSkeleton extended best match skeleton
* @return whether the interval pattern is found
* through extending skeleton or not.
- * TRUE if interval pattern is found by
- * extending skeleton, FALSE otherwise.
+ * true if interval pattern is found by
+ * extending skeleton, false otherwise.
* @stable ICU 4.0
*/
UBool
@@ -1457,7 +1463,7 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field,
// need to look for it from skeleton 'yMMMd',
// if found, adjust field width in interval pattern from
// "MMM" to "MMMM".
- UChar fieldLetter = fgCalendarFieldToPatternLetter[field];
+ char16_t fieldLetter = fgCalendarFieldToPatternLetter[field];
if ( extendedSkeleton ) {
*extendedSkeleton = *skeleton;
*extendedBestSkeleton = *bestSkeleton;
@@ -1489,10 +1495,10 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field,
setIntervalPattern(field, pattern);
}
if ( extendedSkeleton && !extendedSkeleton->isEmpty() ) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -1500,7 +1506,7 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field,
int32_t U_EXPORT2
DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern) {
UBool inQuote = false;
- UChar prevCh = 0;
+ char16_t prevCh = 0;
int32_t count = 0;
/* repeatedPattern used to record whether a pattern has already seen.
@@ -1528,13 +1534,13 @@ DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern)
int32_t i;
UBool foundRepetition = false;
for (i = 0; i < intervalPattern.length(); ++i) {
- UChar ch = intervalPattern.charAt(i);
+ char16_t ch = intervalPattern.charAt(i);
if (ch != prevCh && count > 0) {
// check the repeativeness of pattern letter
UBool repeated = patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)];
- if ( repeated == FALSE ) {
- patternRepeated[prevCh - PATTERN_CHAR_BASE] = TRUE;
+ if ( repeated == false ) {
+ patternRepeated[prevCh - PATTERN_CHAR_BASE] = true;
} else {
foundRepetition = true;
break;
@@ -1562,8 +1568,8 @@ DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern)
// "dd MM" ( no repetition ),
// "d-d"(last char repeated ), and
// "d-d MM" ( repetition found )
- if ( count > 0 && foundRepetition == FALSE ) {
- if ( patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)] == FALSE ) {
+ if ( count > 0 && foundRepetition == false ) {
+ if ( patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)] == false ) {
count = 0;
}
}
@@ -1676,8 +1682,8 @@ UBool U_EXPORT2
DateIntervalFormat::fieldExistsInSkeleton(UCalendarDateFields field,
const UnicodeString& skeleton)
{
- const UChar fieldChar = fgCalendarFieldToPatternLetter[field];
- return ( (skeleton.indexOf(fieldChar) == -1)?FALSE:TRUE ) ;
+ const char16_t fieldChar = fgCalendarFieldToPatternLetter[field];
+ return ( (skeleton.indexOf(fieldChar) == -1)?false:true ) ;
}
@@ -1719,7 +1725,13 @@ DateIntervalFormat::adjustFieldWidth(const UnicodeString& inputSkeleton,
DateIntervalInfo::parseSkeleton(inputSkeleton, inputSkeletonFieldWidth);
DateIntervalInfo::parseSkeleton(bestMatchSkeleton, bestMatchSkeletonFieldWidth);
if (suppressDayPeriodField) {
+ // remove the 'a' and any NBSP/NNBSP on one side of it
+ findReplaceInPattern(adjustedPtn, UnicodeString(u"\u00A0a",-1), UnicodeString());
+ findReplaceInPattern(adjustedPtn, UnicodeString(u"\u202Fa",-1), UnicodeString());
+ findReplaceInPattern(adjustedPtn, UnicodeString(u"a\u00A0",-1), UnicodeString());
+ findReplaceInPattern(adjustedPtn, UnicodeString(u"a\u202F",-1), UnicodeString());
findReplaceInPattern(adjustedPtn, UnicodeString(LOW_A), UnicodeString());
+ // adjust interior double spaces, remove exterior whitespace
findReplaceInPattern(adjustedPtn, UnicodeString(" "), UnicodeString(" "));
adjustedPtn.trim();
}
@@ -1745,17 +1757,17 @@ DateIntervalFormat::adjustFieldWidth(const UnicodeString& inputSkeleton,
}
UBool inQuote = false;
- UChar prevCh = 0;
+ char16_t prevCh = 0;
int32_t count = 0;
// loop through the pattern string character by character
int32_t adjustedPtnLength = adjustedPtn.length();
int32_t i;
for (i = 0; i < adjustedPtnLength; ++i) {
- UChar ch = adjustedPtn.charAt(i);
+ char16_t ch = adjustedPtn.charAt(i);
if (ch != prevCh && count > 0) {
// check the repeativeness of pattern letter
- UChar skeletonChar = prevCh;
+ char16_t skeletonChar = prevCh;
if ( skeletonChar == CAP_L ) {
// there is no "L" (always be "M") in skeleton,
// but there is "L" in pattern.
@@ -1794,7 +1806,7 @@ DateIntervalFormat::adjustFieldWidth(const UnicodeString& inputSkeleton,
if ( count > 0 ) {
// last item
// check the repeativeness of pattern letter
- UChar skeletonChar = prevCh;
+ char16_t skeletonChar = prevCh;
if ( skeletonChar == CAP_L ) {
// there is no "L" (always be "M") in skeleton,
// but there is "L" in pattern.
@@ -1877,7 +1889,7 @@ DateIntervalFormat::concatSingleDate2TimeInterval(UnicodeString& format,
-const UChar
+const char16_t
DateIntervalFormat::fgCalendarFieldToPatternLetter[] =
{
/*GyM*/ CAP_G, LOW_Y, CAP_M,
diff --git a/contrib/libs/icu/i18n/dtitvinf.cpp b/contrib/libs/icu/i18n/dtitvinf.cpp
index 6052894b586..3733d04518d 100644
--- a/contrib/libs/icu/i18n/dtitvinf.cpp
+++ b/contrib/libs/icu/i18n/dtitvinf.cpp
@@ -55,12 +55,12 @@ static const char gIntervalDateTimePatternTag[]="intervalFormats";
static const char gFallbackPatternTag[]="fallback";
// {0}
-static const UChar gFirstPattern[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET};
+static const char16_t gFirstPattern[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET};
// {1}
-static const UChar gSecondPattern[] = {LEFT_CURLY_BRACKET, DIGIT_ONE, RIGHT_CURLY_BRACKET};
+static const char16_t gSecondPattern[] = {LEFT_CURLY_BRACKET, DIGIT_ONE, RIGHT_CURLY_BRACKET};
// default fall-back
-static const UChar gDefaultFallbackPattern[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, EN_DASH, SPACE, LEFT_CURLY_BRACKET, DIGIT_ONE, RIGHT_CURLY_BRACKET, 0};
+static const char16_t gDefaultFallbackPattern[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, EN_DASH, SPACE, LEFT_CURLY_BRACKET, DIGIT_ONE, RIGHT_CURLY_BRACKET, 0};
DateIntervalInfo::DateIntervalInfo(UErrorCode& status)
: fFallbackIntervalPattern(gDefaultFallbackPattern),
@@ -218,10 +218,10 @@ DateIntervalInfo::getFallbackIntervalPattern(UnicodeString& result) const {
static const int32_t PATH_PREFIX_LENGTH = 17;
-static const UChar PATH_PREFIX[] = {SOLIDUS, CAP_L, CAP_O, CAP_C, CAP_A, CAP_L, CAP_E, SOLIDUS,
+static const char16_t PATH_PREFIX[] = {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 int32_t PATH_SUFFIX_LENGTH = 16;
-static const UChar PATH_SUFFIX[] = {SOLIDUS, LOW_I, LOW_N, LOW_T, LOW_E, LOW_R, LOW_V, LOW_A,
+static const char16_t PATH_SUFFIX[] = {SOLIDUS, LOW_I, LOW_N, LOW_T, LOW_E, LOW_R, LOW_V, LOW_A,
LOW_L, CAP_F, LOW_O, LOW_R, LOW_M, LOW_A, LOW_T, LOW_S};
/**
@@ -401,7 +401,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status)
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);
+ "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,
@@ -424,7 +424,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status)
UResourceBundle *calTypeBundle, *itvDtPtnResource;
// Get the fallback pattern
- const UChar* resStr = nullptr;
+ const char16_t* resStr = nullptr;
int32_t resStrLen = 0;
calTypeBundle = ures_getByKeyWithFallback(calBundle, calendarTypeToUse, nullptr, &status);
itvDtPtnResource = ures_getByKeyWithFallback(calTypeBundle,
@@ -437,7 +437,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status)
}
if ( U_SUCCESS(status) && (resStr != nullptr)) {
- UnicodeString pattern = UnicodeString(TRUE, resStr, resStrLen);
+ UnicodeString pattern = UnicodeString(true, resStr, resStrLen);
setFallbackIntervalPattern(pattern, status);
}
ures_close(itvDtPtnResource);
@@ -449,7 +449,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status)
const UnicodeString &calendarTypeToUseUString = sink.getNextCalendarType();
// Already loaded calendar types
- Hashtable loadedCalendarTypes(FALSE, status);
+ Hashtable loadedCalendarTypes(false, status);
if (U_SUCCESS(status)) {
while (!calendarTypeToUseUString.isBogus()) {
@@ -504,7 +504,7 @@ DateIntervalInfo::setIntervalPatternInternally(const UnicodeString& skeleton,
}
patternsOfOneSkeleton[index] = intervalPattern;
- if ( emptyHash == TRUE ) {
+ if ( emptyHash ) {
fIntervalPatterns->put(skeleton, patternsOfOneSkeleton, status);
}
}
@@ -547,7 +547,7 @@ DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton,
char result_1[1000];
char mesg[2000];
skeleton.extract(0, skeleton.length(), result, "UTF-8");
- sprintf(mesg, "in getBestSkeleton: skeleton: %s; \n", result);
+ snprintf(mesg, sizeof(mesg), "in getBestSkeleton: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
@@ -616,7 +616,7 @@ DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton,
UnicodeString* newSkeleton = (UnicodeString*)keyTok.pointer;
#ifdef DTITVINF_DEBUG
skeleton->extract(0, skeleton->length(), result, "UTF-8");
- sprintf(mesg, "available skeletons: skeleton: %s; \n", result);
+ snprintf(mesg, sizeof(mesg), "available skeletons: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
@@ -738,7 +738,7 @@ U_CDECL_BEGIN
*
* @param val1 one value in comparison
* @param val2 the other value in comparison
- * @return TRUE if 2 values are the same, FALSE otherwise
+ * @return true if 2 values are the same, false otherwise
*/
static UBool U_CALLCONV dtitvinfHashTableValueComparator(UHashTok val1, UHashTok val2);
@@ -746,9 +746,9 @@ static UBool
U_CALLCONV dtitvinfHashTableValueComparator(UHashTok val1, UHashTok val2) {
const UnicodeString* pattern1 = (UnicodeString*)val1.pointer;
const UnicodeString* pattern2 = (UnicodeString*)val2.pointer;
- UBool ret = TRUE;
+ UBool ret = true;
int8_t i;
- for ( i = 0; i < DateIntervalInfo::kMaxIntervalPatternIndex && ret == TRUE; ++i ) {
+ for ( i = 0; i < DateIntervalInfo::kMaxIntervalPatternIndex && ret ; ++i ) {
ret = (pattern1[i] == pattern2[i]);
}
return ret;
@@ -763,7 +763,7 @@ DateIntervalInfo::initHash(UErrorCode& status) {
return nullptr;
}
Hashtable* hTable;
- if ( (hTable = new Hashtable(FALSE, status)) == nullptr ) {
+ if ( (hTable = new Hashtable(false, status)) == nullptr ) {
status = U_MEMORY_ALLOCATION_ERROR;
return nullptr;
}
diff --git a/contrib/libs/icu/i18n/dtptngen.cpp b/contrib/libs/icu/i18n/dtptngen.cpp
index 6aee1750f90..1f74540fbd0 100644
--- a/contrib/libs/icu/i18n/dtptngen.cpp
+++ b/contrib/libs/icu/i18n/dtptngen.cpp
@@ -58,7 +58,7 @@
#include "uarrsort.h"
struct UResAEntry {
- UChar *key;
+ char16_t *key;
UResourceBundle *item;
};
@@ -97,10 +97,10 @@ static void ures_a_open(UResourceBundleAIterator *aiter, UResourceBundle *bund,
aiter->entries[i].item = ures_getByIndex(aiter->bund, i, nullptr, status);
const char *akey = ures_getKey(aiter->entries[i].item);
int32_t len = uprv_strlen(akey)+1;
- aiter->entries[i].key = (UChar*)uprv_malloc(len*sizeof(UChar));
+ aiter->entries[i].key = (char16_t*)uprv_malloc(len*sizeof(char16_t));
u_charsToUChars(akey, aiter->entries[i].key, len);
}
- uprv_sortArray(aiter->entries, aiter->num, sizeof(UResAEntry), ures_a_codepointSort, nullptr, TRUE, status);
+ uprv_sortArray(aiter->entries, aiter->num, sizeof(UResAEntry), ures_a_codepointSort, nullptr, true, status);
#endif
}
@@ -113,13 +113,13 @@ static void ures_a_close(UResourceBundleAIterator *aiter) {
#endif
}
-static const UChar *ures_a_getNextString(UResourceBundleAIterator *aiter, int32_t *len, const char **key, UErrorCode *err) {
+static const char16_t *ures_a_getNextString(UResourceBundleAIterator *aiter, int32_t *len, const char **key, UErrorCode *err) {
#if !defined(U_SORT_ASCII_BUNDLE_ITERATOR)
return ures_getNextString(aiter->bund, len, key, err);
#else
if(U_FAILURE(*err)) return nullptr;
UResourceBundle *item = aiter->entries[aiter->cursor].item;
- const UChar* ret = ures_getString(item, len, err);
+ const char16_t* ret = ures_getString(item, len, err);
*key = ures_getKey(item);
aiter->cursor++;
return ret;
@@ -135,7 +135,7 @@ U_NAMESPACE_BEGIN
// *****************************************************************************
// class DateTimePatternGenerator
// *****************************************************************************
-static const UChar Canonical_Items[] = {
+static const char16_t Canonical_Items[] = {
// GyQMwWEDFdaHmsSv
CAP_G, LOW_Y, CAP_Q, CAP_M, LOW_W, CAP_W, CAP_E,
CAP_D, CAP_F, LOW_D, LOW_A, // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J
@@ -273,18 +273,17 @@ static const char* const CLDR_FIELD_WIDTH[] = { // [UDATPG_WIDTH_COUNT]
"", "-short", "-narrow"
};
-// TODO(ticket:13619): remove when definition uncommented in dtptngen.h.
-static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1;
static constexpr UDateTimePGDisplayWidth UDATPG_WIDTH_APPENDITEM = UDATPG_WIDE;
static constexpr int32_t UDATPG_FIELD_KEY_MAX = 24; // max length of CLDR field tag (type + width)
// For appendItems
-static const UChar UDATPG_ItemFormat[]= {0x7B, 0x30, 0x7D, 0x20, 0x251C, 0x7B, 0x32, 0x7D, 0x3A,
+static const char16_t UDATPG_ItemFormat[]= {0x7B, 0x30, 0x7D, 0x20, 0x251C, 0x7B, 0x32, 0x7D, 0x3A,
0x20, 0x7B, 0x31, 0x7D, 0x2524, 0}; // {0} \u251C{2}: {1}\u2524
-//static const UChar repeatedPatterns[6]={CAP_G, CAP_E, LOW_Z, LOW_V, CAP_Q, 0}; // "GEzvQ"
+//static const char16_t repeatedPatterns[6]={CAP_G, CAP_E, LOW_Z, LOW_V, CAP_Q, 0}; // "GEzvQ"
static const char DT_DateTimePatternsTag[]="DateTimePatterns";
+static const char DT_DateAtTimePatternsTag[]="DateTimePatterns%atTime";
static const char DT_DateTimeCalendarTag[]="calendar";
static const char DT_DateTimeGregorianTag[]="gregorian";
static const char DT_DateTimeAppendItemsTag[]="appendItems";
@@ -393,10 +392,13 @@ DateTimePatternGenerator::operator=(const DateTimePatternGenerator& other) {
*fp = *(other.fp);
dtMatcher->copyFrom(other.dtMatcher->skeleton);
*distanceInfo = *(other.distanceInfo);
- dateTimeFormat = other.dateTimeFormat;
+ for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) {
+ dateTimeFormat[style] = other.dateTimeFormat[style];
+ }
decimal = other.decimal;
- // NUL-terminate for the C API.
- dateTimeFormat.getTerminatedBuffer();
+ for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) {
+ dateTimeFormat[style].getTerminatedBuffer(); // NUL-terminate for the C API.
+ }
decimal.getTerminatedBuffer();
delete skipMatcher;
if ( other.skipMatcher == nullptr ) {
@@ -430,7 +432,12 @@ DateTimePatternGenerator::operator==(const DateTimePatternGenerator& other) cons
return true;
}
if ((pLocale==other.pLocale) && (patternMap->equals(*other.patternMap)) &&
- (dateTimeFormat==other.dateTimeFormat) && (decimal==other.decimal)) {
+ (decimal==other.decimal)) {
+ for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) {
+ if (dateTimeFormat[style] != other.dateTimeFormat[style]) {
+ return false;
+ }
+ }
for ( int32_t i=0 ; i<UDATPG_FIELD_COUNT; ++i ) {
if (appendItemFormats[i] != other.appendItemFormats[i]) {
return false;
@@ -467,7 +474,7 @@ DateTimePatternGenerator::~DateTimePatternGenerator() {
namespace {
-UInitOnce initOnce = U_INITONCE_INITIALIZER;
+UInitOnce initOnce {};
UHashtable *localeToAllowedHourFormatsMap = nullptr;
// Value deleter for hashmap.
@@ -478,7 +485,7 @@ U_CFUNC void U_CALLCONV deleteAllowedHourFormats(void *ptr) {
// Close hashmap at cleanup.
U_CFUNC UBool U_CALLCONV allowedHourFormatsCleanup() {
uhash_close(localeToAllowedHourFormatsMap);
- return TRUE;
+ return true;
}
enum AllowedHourFormat{
@@ -649,6 +656,17 @@ void DateTimePatternGenerator::getAllowedHourFormats(const Locale &locale, UErro
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';
+ }
+ }
+
Locale maxLocale; // must be here for correct lifetime
if (*language == '\0' || *country == '\0') {
maxLocale = locale;
@@ -802,7 +820,7 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu
SimpleDateFormat* sdf;
if (df != nullptr && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != nullptr) {
sdf->toPattern(dfPattern);
- addPattern(dfPattern, FALSE, conflictingString, status);
+ addPattern(dfPattern, false, conflictingString, status);
}
// TODO Maybe we should return an error when the date format isn't simple.
delete df;
@@ -811,7 +829,7 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu
df = DateFormat::createTimeInstance(style, locale);
if (df != nullptr && (sdf = dynamic_cast<SimpleDateFormat*>(df)) != nullptr) {
sdf->toPattern(dfPattern);
- addPattern(dfPattern, FALSE, conflictingString, status);
+ addPattern(dfPattern, false, conflictingString, status);
// TODO: C++ and Java are inconsistent (see #12568).
// C++ uses MEDIUM, but Java uses SHORT.
@@ -831,7 +849,7 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode
fp->set(hackPattern);
UnicodeString mmss;
- UBool gotMm=FALSE;
+ UBool gotMm=false;
for (int32_t i=0; i<fp->itemNumber; ++i) {
UnicodeString field = fp->items[i];
if ( fp->isQuoteLiteral(field) ) {
@@ -846,9 +864,9 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode
mmss+=field;
}
else {
- UChar ch=field.charAt(0);
+ char16_t ch=field.charAt(0);
if (ch==LOW_M) {
- gotMm=TRUE;
+ gotMm=true;
mmss+=field;
}
else {
@@ -857,7 +875,7 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode
break;
}
mmss+= field;
- addPattern(mmss, FALSE, conflictingString, status);
+ addPattern(mmss, false, conflictingString, status);
break;
}
else {
@@ -888,7 +906,7 @@ DateTimePatternGenerator::getCalendarTypeToUse(const Locale& locale, CharString&
"calendar",
locale.getName(),
nullptr,
- FALSE,
+ false,
&localStatus);
localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination
// now get the calendar key value from that locale
@@ -943,7 +961,7 @@ struct DateTimePatternGenerator::AppendItemFormatsSink : public ResourceSink {
}
void fillInMissing() {
- UnicodeString defaultItemFormat(TRUE, UDATPG_ItemFormat, UPRV_LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias.
+ UnicodeString defaultItemFormat(true, UDATPG_ItemFormat, UPRV_LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias.
for (int32_t i = 0; i < UDATPG_FIELD_COUNT; i++) {
UDateTimePatternField field = (UDateTimePatternField)i;
if (dtpg.getAppendItemFormat(field).isEmpty()) {
@@ -983,11 +1001,11 @@ struct DateTimePatternGenerator::AppendItemNamesSink : public ResourceSink {
U_ASSERT(i < 20);
if (i < 10) {
// F0, F1, ..., F9
- valueStr += (UChar)(i+0x30);
+ valueStr += (char16_t)(i+0x30);
} else {
// F10, F11, ...
- valueStr += (UChar)0x31;
- valueStr += (UChar)(i-10 + 0x30);
+ valueStr += (char16_t)0x31;
+ valueStr += (char16_t)(i-10 + 0x30);
}
// NUL-terminate for the C API.
valueStr.getTerminatedBuffer();
@@ -1087,7 +1105,7 @@ DateTimePatternGenerator::initHashtable(UErrorCode& err) {
if (fAvailableFormatKeyHash!=nullptr) {
return;
}
- LocalPointer<Hashtable> hash(new Hashtable(FALSE, err), err);
+ LocalPointer<Hashtable> hash(new Hashtable(false, err), err);
if (U_SUCCESS(err)) {
fAvailableFormatKeyHash = hash.orphan();
}
@@ -1199,7 +1217,21 @@ DateTimePatternGenerator::getBestPattern(const UnicodeString& patternForm, UDate
}
resultPattern.remove();
status = U_ZERO_ERROR;
- dtFormat=getDateTimeFormat();
+ // determine which dateTimeFormat to use
+ PtnSkeleton* reqSkeleton = dtMatcher->getSkeletonPtr();
+ UDateFormatStyle style = UDAT_SHORT;
+ int32_t monthFieldLen = reqSkeleton->baseOriginal.getFieldLength(UDATPG_MONTH_FIELD);
+ if (monthFieldLen == 4) {
+ if (reqSkeleton->baseOriginal.getFieldLength(UDATPG_WEEKDAY_FIELD) > 0) {
+ style = UDAT_FULL;
+ } else {
+ style = UDAT_LONG;
+ }
+ } else if (monthFieldLen == 3) {
+ style = UDAT_MEDIUM;
+ }
+ // and now use it to compose date and time
+ dtFormat=getDateTimeFormat(style, status);
SimpleFormatter(dtFormat, 2, 2, status).format(timePattern, datePattern, resultPattern, status);
return resultPattern;
}
@@ -1215,10 +1247,10 @@ UnicodeString
DateTimePatternGenerator::mapSkeletonMetacharacters(const UnicodeString& patternForm, int32_t* flags, UErrorCode& status) {
UnicodeString patternFormMapped;
patternFormMapped.remove();
- UBool inQuoted = FALSE;
+ UBool inQuoted = false;
int32_t patPos, patLen = patternForm.length();
for (patPos = 0; patPos < patLen; patPos++) {
- UChar patChr = patternForm.charAt(patPos);
+ char16_t patChr = patternForm.charAt(patPos);
if (patChr == SINGLE_QUOTE) {
inQuoted = !inQuoted;
} else if (!inQuoted) {
@@ -1236,8 +1268,8 @@ DateTimePatternGenerator::mapSkeletonMetacharacters(const UnicodeString& pattern
}
int32_t hourLen = 1 + (extraLen & 1);
int32_t dayPeriodLen = (extraLen < 2)? 1: 3 + (extraLen >> 1);
- UChar hourChar = LOW_H;
- UChar dayPeriodChar = LOW_A;
+ char16_t hourChar = LOW_H;
+ char16_t dayPeriodChar = LOW_A;
if (patChr == LOW_J) {
hourChar = fDefaultHourFormatChar;
} else {
@@ -1327,7 +1359,7 @@ DateTimePatternGenerator::addCanonicalItems(UErrorCode& status) {
for (int32_t i=0; i<UDATPG_FIELD_COUNT; i++) {
if (Canonical_Items[i] > 0) {
- addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status);
+ addPattern(UnicodeString(Canonical_Items[i]), false, conflictingPattern, status);
}
if (U_FAILURE(status)) { return; }
}
@@ -1335,56 +1367,119 @@ DateTimePatternGenerator::addCanonicalItems(UErrorCode& status) {
void
DateTimePatternGenerator::setDateTimeFormat(const UnicodeString& dtFormat) {
- dateTimeFormat = dtFormat;
- // NUL-terminate for the C API.
- dateTimeFormat.getTerminatedBuffer();
+ UErrorCode status = U_ZERO_ERROR;
+ for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) {
+ setDateTimeFormat((UDateFormatStyle)style, dtFormat, status);
+ }
}
const UnicodeString&
DateTimePatternGenerator::getDateTimeFormat() const {
- return dateTimeFormat;
+ UErrorCode status = U_ZERO_ERROR;
+ return getDateTimeFormat(UDAT_MEDIUM, status);
+}
+
+void
+DateTimePatternGenerator::setDateTimeFormat(UDateFormatStyle style, const UnicodeString& dtFormat, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (style < UDAT_FULL || style > UDAT_SHORT) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ dateTimeFormat[style] = dtFormat;
+ // Note for the following: getTerminatedBuffer() can re-allocate the UnicodeString
+ // buffer so we do this here before clients request a const ref to the UnicodeString
+ // or its buffer.
+ dateTimeFormat[style].getTerminatedBuffer(); // NUL-terminate for the C API.
+}
+
+const UnicodeString&
+DateTimePatternGenerator::getDateTimeFormat(UDateFormatStyle style, UErrorCode& status) const {
+ static const UnicodeString emptyString = UNICODE_STRING_SIMPLE("");
+ if (U_FAILURE(status)) {
+ return emptyString;
+ }
+ if (style < UDAT_FULL || style > UDAT_SHORT) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return emptyString;
+ }
+ return dateTimeFormat[style];
}
+static const int32_t cTypeBufMax = 32;
+
void
DateTimePatternGenerator::setDateTimeFromCalendar(const Locale& locale, UErrorCode& status) {
if (U_FAILURE(status)) { return; }
- const UChar *resStr;
+ const char16_t *resStr;
int32_t resStrLen = 0;
- LocalPointer<Calendar> fCalendar(Calendar::createInstance(locale, status), status);
- if (U_FAILURE(status)) { return; }
-
LocalUResourceBundlePointer calData(ures_open(nullptr, locale.getBaseName(), &status));
if (U_FAILURE(status)) { return; }
ures_getByKey(calData.getAlias(), DT_DateTimeCalendarTag, calData.getAlias(), &status);
if (U_FAILURE(status)) { return; }
- LocalUResourceBundlePointer dateTimePatterns;
- if (fCalendar->getType() != nullptr && *fCalendar->getType() != '\0'
- && uprv_strcmp(fCalendar->getType(), DT_DateTimeGregorianTag) != 0) {
- dateTimePatterns.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), fCalendar->getType(),
- nullptr, &status));
- ures_getByKeyWithFallback(dateTimePatterns.getAlias(), DT_DateTimePatternsTag,
- dateTimePatterns.getAlias(), &status);
+ char cType[cTypeBufMax + 1];
+ Calendar::getCalendarTypeFromLocale(locale, cType, cTypeBufMax, status);
+ cType[cTypeBufMax] = 0;
+ if (U_FAILURE(status) || cType[0] == 0) {
+ status = U_ZERO_ERROR;
+ uprv_strcpy(cType, DT_DateTimeGregorianTag);
}
+ UBool cTypeIsGregorian = (uprv_strcmp(cType, DT_DateTimeGregorianTag) == 0);
+ // Currently, for compatibility with pre-CLDR-42 data, we default to the "atTime"
+ // combining patterns. Depending on guidance in CLDR 42 spec and on DisplayOptions,
+ // we may change this.
+ LocalUResourceBundlePointer specificCalBundle;
+ LocalUResourceBundlePointer dateTimePatterns;
+ int32_t dateTimeOffset = 0; // initially for DateTimePatterns%atTime
+ if (!cTypeIsGregorian) {
+ specificCalBundle.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), cType,
+ nullptr, &status));
+ dateTimePatterns.adoptInstead(ures_getByKeyWithFallback(specificCalBundle.getAlias(), DT_DateAtTimePatternsTag, // the %atTime variant, 4 entries
+ nullptr, &status));
+ }
if (dateTimePatterns.isNull() || status == U_MISSING_RESOURCE_ERROR) {
status = U_ZERO_ERROR;
- dateTimePatterns.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), DT_DateTimeGregorianTag,
- dateTimePatterns.orphan(), &status));
- ures_getByKeyWithFallback(dateTimePatterns.getAlias(), DT_DateTimePatternsTag,
- dateTimePatterns.getAlias(), &status);
+ specificCalBundle.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), DT_DateTimeGregorianTag,
+ nullptr, &status));
+ dateTimePatterns.adoptInstead(ures_getByKeyWithFallback(specificCalBundle.getAlias(), DT_DateAtTimePatternsTag, // the %atTime variant, 4 entries
+ nullptr, &status));
}
- if (U_FAILURE(status)) { return; }
-
- if (ures_getSize(dateTimePatterns.getAlias()) <= DateFormat::kDateTime)
- {
+ if (U_SUCCESS(status) && (ures_getSize(dateTimePatterns.getAlias()) < 4)) {
status = U_INVALID_FORMAT_ERROR;
- return;
}
- resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), (int32_t)DateFormat::kDateTime, &resStrLen, &status);
- setDateTimeFormat(UnicodeString(TRUE, resStr, resStrLen));
+ if (status == U_MISSING_RESOURCE_ERROR) {
+ // Try again with standard variant
+ status = U_ZERO_ERROR;
+ dateTimePatterns.orphan();
+ dateTimeOffset = (int32_t)DateFormat::kDateTimeOffset;
+ if (!cTypeIsGregorian) {
+ specificCalBundle.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), cType,
+ nullptr, &status));
+ dateTimePatterns.adoptInstead(ures_getByKeyWithFallback(specificCalBundle.getAlias(), DT_DateTimePatternsTag, // the standard variant, 13 entries
+ nullptr, &status));
+ }
+ if (dateTimePatterns.isNull() || status == U_MISSING_RESOURCE_ERROR) {
+ status = U_ZERO_ERROR;
+ specificCalBundle.adoptInstead(ures_getByKeyWithFallback(calData.getAlias(), DT_DateTimeGregorianTag,
+ nullptr, &status));
+ dateTimePatterns.adoptInstead(ures_getByKeyWithFallback(specificCalBundle.getAlias(), DT_DateTimePatternsTag, // the standard variant, 13 entries
+ nullptr, &status));
+ }
+ if (U_SUCCESS(status) && (ures_getSize(dateTimePatterns.getAlias()) <= DateFormat::kDateTimeOffset + DateFormat::kShort)) {
+ status = U_INVALID_FORMAT_ERROR;
+ }
+ }
+ if (U_FAILURE(status)) { return; }
+ for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) {
+ resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), dateTimeOffset + style, &resStrLen, &status);
+ setDateTimeFormat((UDateFormatStyle)style, UnicodeString(true, resStr, resStrLen), status);
+ }
}
void
@@ -1624,7 +1719,7 @@ DateTimePatternGenerator::adjustFieldTypes(const UnicodeString& pattern,
// a) The length of the field in the skeleton (skelFieldLen) is equal to reqFieldLen.
// b) The pattern field is numeric and the skeleton field is not, or vice versa.
- UChar reqFieldChar = dtMatcher->skeleton.original.getFieldChar(typeValue);
+ char16_t reqFieldChar = dtMatcher->skeleton.original.getFieldChar(typeValue);
int32_t reqFieldLen = dtMatcher->skeleton.original.getFieldLength(typeValue);
if (reqFieldChar == CAP_E && reqFieldLen < 3)
reqFieldLen = 3; // 1-3 for E are equivalent to 3 for c,e
@@ -1646,7 +1741,7 @@ DateTimePatternGenerator::adjustFieldTypes(const UnicodeString& pattern,
adjFieldLen = field.length();
}
}
- UChar c = (typeValue!= UDATPG_HOUR_FIELD
+ char16_t c = (typeValue!= UDATPG_HOUR_FIELD
&& typeValue!= UDATPG_MONTH_FIELD
&& typeValue!= UDATPG_WEEKDAY_FIELD
&& (typeValue!= UDATPG_YEAR_FIELD || reqFieldChar==CAP_Y))
@@ -1891,14 +1986,14 @@ DateTimePatternGenerator::getRedundants(UErrorCode& status) {
UBool
DateTimePatternGenerator::isCanonicalItem(const UnicodeString& item) const {
if ( item.length() != 1 ) {
- return FALSE;
+ return false;
}
for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i) {
if (item.charAt(0)==Canonical_Items[i]) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -1911,7 +2006,7 @@ PatternMap::PatternMap() {
for (int32_t i=0; i < MAX_PATTERN_ENTRIES; ++i ) {
boot[i] = nullptr;
}
- isDupAllowed = TRUE;
+ isDupAllowed = true;
}
void
@@ -1956,7 +2051,7 @@ PatternMap::copyFrom(const PatternMap& other, UErrorCode& status) {
}
PtnElem*
-PatternMap::getHeader(UChar baseChar) const {
+PatternMap::getHeader(char16_t baseChar) const {
PtnElem* curElem;
if ( (baseChar >= CAP_A) && (baseChar <= CAP_Z) ) {
@@ -1988,7 +2083,7 @@ PatternMap::add(const UnicodeString& basePattern,
const UnicodeString& value,// mapped pattern value
UBool skeletonWasSpecified,
UErrorCode &status) {
- UChar baseChar = basePattern.charAt(0);
+ char16_t baseChar = basePattern.charAt(0);
PtnElem *curElem, *baseElem;
status = U_ZERO_ERROR;
@@ -2082,10 +2177,10 @@ PatternMap::getPatternFromBasePattern(const UnicodeString& basePattern, UBool& s
// Find the pattern from the given skeleton.
-// At least when this is called from getBestRaw & addPattern (in which case specifiedSkeletonPtr is non-NULL),
+// At least when this is called from getBestRaw & addPattern (in which case specifiedSkeletonPtr is non-nullptr),
// the comparison should be based on skeleton.original (which is unique and tied to the distance measurement in bestRaw)
// and not skeleton.baseOriginal (which is not unique); otherwise we may pick a different skeleton than the one with the
-// optimum distance value in getBestRaw. When this is called from public getRedundants (specifiedSkeletonPtr is NULL),
+// optimum distance value in getBestRaw. When this is called from public getRedundants (specifiedSkeletonPtr is nullptr),
// for now it will continue to compare based on baseOriginal so as not to change the behavior unnecessarily.
const UnicodeString *
PatternMap::getPatternFromSkeleton(const PtnSkeleton& skeleton, const PtnSkeleton** specifiedSkeletonPtr) const { // key to search for
@@ -2096,7 +2191,7 @@ PatternMap::getPatternFromSkeleton(const PtnSkeleton& skeleton, const PtnSkeleto
}
// find boot entry
- UChar baseChar = skeleton.getFirstChar();
+ char16_t baseChar = skeleton.getFirstChar();
if ((curElem=getHeader(baseChar))==nullptr) {
return nullptr; // no match
}
@@ -2123,14 +2218,14 @@ PatternMap::getPatternFromSkeleton(const PtnSkeleton& skeleton, const PtnSkeleto
UBool
PatternMap::equals(const PatternMap& other) const {
if ( this==&other ) {
- return TRUE;
+ return true;
}
for (int32_t bootIndex = 0; bootIndex < MAX_PATTERN_ENTRIES; ++bootIndex) {
if (boot[bootIndex] == other.boot[bootIndex]) {
continue;
}
if ((boot[bootIndex] == nullptr) || (other.boot[bootIndex] == nullptr)) {
- return FALSE;
+ return false;
}
PtnElem *otherElem = other.boot[bootIndex];
PtnElem *myElem = boot[bootIndex];
@@ -2139,25 +2234,25 @@ PatternMap::equals(const PatternMap& other) const {
break;
}
if ((otherElem == nullptr) || (myElem == nullptr)) {
- return FALSE;
+ return false;
}
if ( (myElem->basePattern != otherElem->basePattern) ||
(myElem->pattern != otherElem->pattern) ) {
- return FALSE;
+ return false;
}
if ((myElem->skeleton.getAlias() != otherElem->skeleton.getAlias()) &&
!myElem->skeleton->equals(*(otherElem->skeleton))) {
- return FALSE;
+ return false;
}
myElem = myElem->next.getAlias();
otherElem = otherElem->next.getAlias();
}
}
- return TRUE;
+ return true;
}
// find any key existing in the mapping table already.
-// return TRUE if there is an existing key, otherwise return FALSE.
+// return true if there is an existing key, otherwise return false.
PtnElem*
PatternMap::getDuplicateElem(
const UnicodeString &basePattern,
@@ -2173,10 +2268,10 @@ PatternMap::getDuplicateElem(
}
do {
if ( basePattern.compare(curElem->basePattern)==0 ) {
- UBool isEqual = TRUE;
+ UBool isEqual = true;
for (int32_t i = 0; i < UDATPG_FIELD_COUNT; ++i) {
if (curElem->skeleton->type[i] != skeleton.type[i] ) {
- isEqual = FALSE;
+ isEqual = false;
break;
}
}
@@ -2192,7 +2287,7 @@ PatternMap::getDuplicateElem(
} // PatternMap::getDuplicateElem
-DateTimeMatcher::DateTimeMatcher(void) {
+DateTimeMatcher::DateTimeMatcher() {
}
DateTimeMatcher::~DateTimeMatcher() {}
@@ -2221,7 +2316,7 @@ DateTimeMatcher::set(const UnicodeString& pattern, FormatParser* fp, PtnSkeleton
}
skeletonResult.original.clear();
skeletonResult.baseOriginal.clear();
- skeletonResult.addedDefaultDayPeriod = FALSE;
+ skeletonResult.addedDefaultDayPeriod = false;
fp->set(pattern);
for (i=0; i < fp->itemNumber; i++) {
@@ -2240,7 +2335,7 @@ DateTimeMatcher::set(const UnicodeString& pattern, FormatParser* fp, PtnSkeleton
const dtTypeElem *row = &dtTypes[canonicalIndex];
int32_t field = row->field;
skeletonResult.original.populate(field, value);
- UChar repeatChar = row->patternChar;
+ char16_t repeatChar = row->patternChar;
int32_t repeatCount = row->minLen;
skeletonResult.baseOriginal.populate(field, repeatChar, repeatCount);
int16_t subField = row->type;
@@ -2289,7 +2384,7 @@ DateTimeMatcher::set(const UnicodeString& pattern, FormatParser* fp, PtnSkeleton
skeletonResult.original.populate(UDATPG_DAYPERIOD_FIELD, dtTypes[i].patternChar, dtTypes[i].minLen);
skeletonResult.baseOriginal.populate(UDATPG_DAYPERIOD_FIELD, dtTypes[i].patternChar, dtTypes[i].minLen);
skeletonResult.type[UDATPG_DAYPERIOD_FIELD] = dtTypes[i].type;
- skeletonResult.addedDefaultDayPeriod = TRUE;
+ skeletonResult.addedDefaultDayPeriod = true;
break;
}
}
@@ -2357,7 +2452,7 @@ DateTimeMatcher::copyFrom() {
UBool
DateTimeMatcher::equals(const DateTimeMatcher* other) const {
- if (other==nullptr) { return FALSE; }
+ if (other==nullptr) { return false; }
return skeleton.original == other->skeleton.original;
}
@@ -2398,7 +2493,7 @@ FormatParser::setTokens(const UnicodeString& pattern, int32_t startPos, int32_t
}
// check the current char is between A-Z or a-z
do {
- UChar c=pattern.charAt(curLoc);
+ char16_t c=pattern.charAt(curLoc);
if ( (c>=CAP_A && c<=CAP_Z) || (c>=LOW_A && c<=LOW_Z) ) {
curLoc++;
}
@@ -2442,7 +2537,7 @@ FormatParser::getCanonicalIndex(const UnicodeString& s, UBool strict) {
if (len == 0) {
return -1;
}
- UChar ch = s.charAt(0);
+ char16_t ch = s.charAt(0);
// Verify that all are the same character.
for (int32_t l = 1; l < len; l++) {
@@ -2510,16 +2605,16 @@ FormatParser::getQuoteLiteral(UnicodeString& quote, int32_t *itemIndex) {
UBool
FormatParser::isPatternSeparator(const UnicodeString& field) const {
for (int32_t i=0; i<field.length(); ++i ) {
- UChar c= field.charAt(i);
+ char16_t c= field.charAt(i);
if ( (c==SINGLE_QUOTE) || (c==BACKSLASH) || (c==SPACE) || (c==COLON) ||
(c==QUOTATION_MARK) || (c==COMMA) || (c==HYPHEN) ||(items[i].charAt(0)==DOT) ) {
continue;
}
else {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
DistanceInfo::~DistanceInfo() {}
@@ -2561,12 +2656,12 @@ PatternMapIterator::hasNext() const {
PtnElem *curPtr = nodePtr;
if (patternMap==nullptr) {
- return FALSE;
+ return false;
}
while ( headIndex < MAX_PATTERN_ENTRIES ) {
if ( curPtr != nullptr ) {
if ( curPtr->next != nullptr ) {
- return TRUE;
+ return true;
}
else {
headIndex++;
@@ -2576,7 +2671,7 @@ PatternMapIterator::hasNext() const {
}
else {
if ( patternMap->boot[headIndex] != nullptr ) {
- return TRUE;
+ return true;
}
else {
headIndex++;
@@ -2584,7 +2679,7 @@ PatternMapIterator::hasNext() const {
}
}
}
- return FALSE;
+ return false;
}
DateTimeMatcher&
@@ -2642,7 +2737,7 @@ void SkeletonFields::clearField(int32_t field) {
lengths[field] = 0;
}
-UChar SkeletonFields::getFieldChar(int32_t field) const {
+char16_t SkeletonFields::getFieldChar(int32_t field) const {
return chars[field];
}
@@ -2654,7 +2749,7 @@ void SkeletonFields::populate(int32_t field, const UnicodeString& value) {
populate(field, value.charAt(0), value.length());
}
-void SkeletonFields::populate(int32_t field, UChar ch, int32_t length) {
+void SkeletonFields::populate(int32_t field, char16_t ch, int32_t length) {
chars[field] = (int8_t) ch;
lengths[field] = (int8_t) length;
}
@@ -2671,7 +2766,7 @@ UnicodeString& SkeletonFields::appendTo(UnicodeString& string) const {
}
UnicodeString& SkeletonFields::appendFieldTo(int32_t field, UnicodeString& string) const {
- UChar ch(chars[field]);
+ char16_t ch(chars[field]);
int32_t length = (int32_t) lengths[field];
for (int32_t i=0; i<length; i++) {
@@ -2680,7 +2775,7 @@ UnicodeString& SkeletonFields::appendFieldTo(int32_t field, UnicodeString& strin
return string;
}
-UChar SkeletonFields::getFirstChar() const {
+char16_t SkeletonFields::getFirstChar() const {
for (int32_t i = 0; i < UDATPG_FIELD_COUNT; ++i) {
if (lengths[i] != 0) {
return chars[i];
@@ -2691,7 +2786,7 @@ UChar SkeletonFields::getFirstChar() const {
PtnSkeleton::PtnSkeleton()
- : addedDefaultDayPeriod(FALSE) {
+ : addedDefaultDayPeriod(false) {
}
PtnSkeleton::PtnSkeleton(const PtnSkeleton& other) {
@@ -2744,7 +2839,7 @@ PtnSkeleton::getBaseSkeleton() const {
return result;
}
-UChar
+char16_t
PtnSkeleton::getFirstChar() const {
return baseOriginal.getFirstChar();
}
@@ -2788,16 +2883,17 @@ DTSkeletonEnumeration::DTSkeletonEnumeration(PatternMap& patternMap, dtStrEnum t
break;
}
if ( !isCanonicalItem(s) ) {
- LocalPointer<UnicodeString> newElem(new UnicodeString(s), status);
+ LocalPointer<UnicodeString> newElem(s.clone(), status);
if (U_FAILURE(status)) {
return;
}
- fSkeletons->addElementX(newElem.getAlias(), status);
+ fSkeletons->addElement(newElem.getAlias(), status);
if (U_FAILURE(status)) {
fSkeletons.adoptInstead(nullptr);
return;
}
- newElem.orphan(); // fSkeletons vector now owns the UnicodeString.
+ newElem.orphan(); // fSkeletons vector now owns the UnicodeString (although it
+ // does not use a deleter function to manage the ownership).
}
curElem = curElem->next.getAlias();
}
@@ -2828,14 +2924,14 @@ DTSkeletonEnumeration::count(UErrorCode& /*status*/) const {
UBool
DTSkeletonEnumeration::isCanonicalItem(const UnicodeString& item) {
if ( item.length() != 1 ) {
- return FALSE;
+ return false;
}
for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i) {
if (item.charAt(0)==Canonical_Items[i]) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
DTSkeletonEnumeration::~DTSkeletonEnumeration() {
@@ -2865,12 +2961,13 @@ DTRedundantEnumeration::add(const UnicodeString& pattern, UErrorCode& status) {
if (U_FAILURE(status)) {
return;
}
- fPatterns->addElementX(newElem.getAlias(), status);
+ fPatterns->addElement(newElem.getAlias(), status);
if (U_FAILURE(status)) {
fPatterns.adoptInstead(nullptr);
return;
}
- newElem.orphan(); // fPatterns now owns the string.
+ newElem.orphan(); // fPatterns now owns the string, although a UVector
+ // deleter function is not used to manage that ownership.
}
const UnicodeString*
@@ -2894,14 +2991,14 @@ DTRedundantEnumeration::count(UErrorCode& /*status*/) const {
UBool
DTRedundantEnumeration::isCanonicalItem(const UnicodeString& item) const {
if ( item.length() != 1 ) {
- return FALSE;
+ return false;
}
for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i) {
if (item.charAt(0)==Canonical_Items[i]) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
DTRedundantEnumeration::~DTRedundantEnumeration() {
diff --git a/contrib/libs/icu/i18n/dtptngen_impl.h b/contrib/libs/icu/i18n/dtptngen_impl.h
index 5caae11654b..74fe925b2f6 100644
--- a/contrib/libs/icu/i18n/dtptngen_impl.h
+++ b/contrib/libs/icu/i18n/dtptngen_impl.h
@@ -32,66 +32,66 @@
#define EXTRA_FIELD 0x10000
#define MISSING_FIELD 0x1000
#define MAX_STRING_ENUMERATION 200
-#define SINGLE_QUOTE ((UChar)0x0027)
-#define FORWARDSLASH ((UChar)0x002F)
-#define BACKSLASH ((UChar)0x005C)
-#define SPACE ((UChar)0x0020)
-#define QUOTATION_MARK ((UChar)0x0022)
-#define ASTERISK ((UChar)0x002A)
-#define PLUSSITN ((UChar)0x002B)
-#define COMMA ((UChar)0x002C)
-#define HYPHEN ((UChar)0x002D)
-#define DOT ((UChar)0x002E)
-#define COLON ((UChar)0x003A)
-#define CAP_A ((UChar)0x0041)
-#define CAP_B ((UChar)0x0042)
-#define CAP_C ((UChar)0x0043)
-#define CAP_D ((UChar)0x0044)
-#define CAP_E ((UChar)0x0045)
-#define CAP_F ((UChar)0x0046)
-#define CAP_G ((UChar)0x0047)
-#define CAP_H ((UChar)0x0048)
-#define CAP_J ((UChar)0x004A)
-#define CAP_K ((UChar)0x004B)
-#define CAP_L ((UChar)0x004C)
-#define CAP_M ((UChar)0x004D)
-#define CAP_O ((UChar)0x004F)
-#define CAP_Q ((UChar)0x0051)
-#define CAP_S ((UChar)0x0053)
-#define CAP_T ((UChar)0x0054)
-#define CAP_U ((UChar)0x0055)
-#define CAP_V ((UChar)0x0056)
-#define CAP_W ((UChar)0x0057)
-#define CAP_X ((UChar)0x0058)
-#define CAP_Y ((UChar)0x0059)
-#define CAP_Z ((UChar)0x005A)
-#define LOWLINE ((UChar)0x005F)
-#define LOW_A ((UChar)0x0061)
-#define LOW_B ((UChar)0x0062)
-#define LOW_C ((UChar)0x0063)
-#define LOW_D ((UChar)0x0064)
-#define LOW_E ((UChar)0x0065)
-#define LOW_F ((UChar)0x0066)
-#define LOW_G ((UChar)0x0067)
-#define LOW_H ((UChar)0x0068)
-#define LOW_I ((UChar)0x0069)
-#define LOW_J ((UChar)0x006A)
-#define LOW_K ((UChar)0x006B)
-#define LOW_L ((UChar)0x006C)
-#define LOW_M ((UChar)0x006D)
-#define LOW_N ((UChar)0x006E)
-#define LOW_O ((UChar)0x006F)
-#define LOW_P ((UChar)0x0070)
-#define LOW_Q ((UChar)0x0071)
-#define LOW_R ((UChar)0x0072)
-#define LOW_S ((UChar)0x0073)
-#define LOW_T ((UChar)0x0074)
-#define LOW_U ((UChar)0x0075)
-#define LOW_V ((UChar)0x0076)
-#define LOW_W ((UChar)0x0077)
-#define LOW_X ((UChar)0x0078)
-#define LOW_Y ((UChar)0x0079)
-#define LOW_Z ((UChar)0x007A)
+#define SINGLE_QUOTE ((char16_t)0x0027)
+#define FORWARDSLASH ((char16_t)0x002F)
+#define BACKSLASH ((char16_t)0x005C)
+#define SPACE ((char16_t)0x0020)
+#define QUOTATION_MARK ((char16_t)0x0022)
+#define ASTERISK ((char16_t)0x002A)
+#define PLUSSITN ((char16_t)0x002B)
+#define COMMA ((char16_t)0x002C)
+#define HYPHEN ((char16_t)0x002D)
+#define DOT ((char16_t)0x002E)
+#define COLON ((char16_t)0x003A)
+#define CAP_A ((char16_t)0x0041)
+#define CAP_B ((char16_t)0x0042)
+#define CAP_C ((char16_t)0x0043)
+#define CAP_D ((char16_t)0x0044)
+#define CAP_E ((char16_t)0x0045)
+#define CAP_F ((char16_t)0x0046)
+#define CAP_G ((char16_t)0x0047)
+#define CAP_H ((char16_t)0x0048)
+#define CAP_J ((char16_t)0x004A)
+#define CAP_K ((char16_t)0x004B)
+#define CAP_L ((char16_t)0x004C)
+#define CAP_M ((char16_t)0x004D)
+#define CAP_O ((char16_t)0x004F)
+#define CAP_Q ((char16_t)0x0051)
+#define CAP_S ((char16_t)0x0053)
+#define CAP_T ((char16_t)0x0054)
+#define CAP_U ((char16_t)0x0055)
+#define CAP_V ((char16_t)0x0056)
+#define CAP_W ((char16_t)0x0057)
+#define CAP_X ((char16_t)0x0058)
+#define CAP_Y ((char16_t)0x0059)
+#define CAP_Z ((char16_t)0x005A)
+#define LOWLINE ((char16_t)0x005F)
+#define LOW_A ((char16_t)0x0061)
+#define LOW_B ((char16_t)0x0062)
+#define LOW_C ((char16_t)0x0063)
+#define LOW_D ((char16_t)0x0064)
+#define LOW_E ((char16_t)0x0065)
+#define LOW_F ((char16_t)0x0066)
+#define LOW_G ((char16_t)0x0067)
+#define LOW_H ((char16_t)0x0068)
+#define LOW_I ((char16_t)0x0069)
+#define LOW_J ((char16_t)0x006A)
+#define LOW_K ((char16_t)0x006B)
+#define LOW_L ((char16_t)0x006C)
+#define LOW_M ((char16_t)0x006D)
+#define LOW_N ((char16_t)0x006E)
+#define LOW_O ((char16_t)0x006F)
+#define LOW_P ((char16_t)0x0070)
+#define LOW_Q ((char16_t)0x0071)
+#define LOW_R ((char16_t)0x0072)
+#define LOW_S ((char16_t)0x0073)
+#define LOW_T ((char16_t)0x0074)
+#define LOW_U ((char16_t)0x0075)
+#define LOW_V ((char16_t)0x0076)
+#define LOW_W ((char16_t)0x0077)
+#define LOW_X ((char16_t)0x0078)
+#define LOW_Y ((char16_t)0x0079)
+#define LOW_Z ((char16_t)0x007A)
#define DT_NARROW -0x101
#define DT_SHORTER -0x102
#define DT_SHORT -0x103
@@ -111,7 +111,7 @@ typedef enum dtStrEnum {
}dtStrEnum;
typedef struct dtTypeElem {
- UChar patternChar;
+ char16_t patternChar;
UDateTimePatternField field;
int16_t type;
int16_t minLen;
@@ -126,14 +126,14 @@ public:
void clear();
void copyFrom(const SkeletonFields& other);
void clearField(int32_t field);
- UChar getFieldChar(int32_t field) const;
+ char16_t getFieldChar(int32_t field) const;
int32_t getFieldLength(int32_t field) const;
void populate(int32_t field, const UnicodeString& value);
- void populate(int32_t field, UChar repeatChar, int32_t repeatCount);
+ void populate(int32_t field, char16_t repeatChar, int32_t repeatCount);
UBool isFieldEmpty(int32_t field) const;
UnicodeString& appendTo(UnicodeString& string) const;
UnicodeString& appendFieldTo(int32_t field, UnicodeString& string) const;
- UChar getFirstChar() const;
+ char16_t getFirstChar() const;
inline bool operator==(const SkeletonFields& other) const;
inline bool operator!=(const SkeletonFields& other) const;
@@ -165,7 +165,7 @@ public:
UBool equals(const PtnSkeleton& other) const;
UnicodeString getSkeleton() const;
UnicodeString getBaseSkeleton() const;
- UChar getFirstChar() const;
+ char16_t getFirstChar() const;
// TODO: Why is this virtual, as well as the other destructors in this file? We don't want
// vtables when we don't use class objects polymorphically.
@@ -252,7 +252,7 @@ public:
const UnicodeString* getPatternFromBasePattern(const UnicodeString& basePattern, UBool& skeletonWasSpecified) const;
const UnicodeString* getPatternFromSkeleton(const PtnSkeleton& skeleton, const PtnSkeleton** specifiedSkeletonPtr = 0) const;
void copyFrom(const PatternMap& other, UErrorCode& status);
- PtnElem* getHeader(UChar baseChar) const;
+ PtnElem* getHeader(char16_t baseChar) const;
UBool equals(const PatternMap& other) const;
private:
UBool isDupAllowed;
@@ -278,8 +278,8 @@ class DTSkeletonEnumeration : public StringEnumeration {
public:
DTSkeletonEnumeration(PatternMap& patternMap, dtStrEnum type, UErrorCode& status);
virtual ~DTSkeletonEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
@@ -293,8 +293,8 @@ class DTRedundantEnumeration : public StringEnumeration {
public:
DTRedundantEnumeration();
virtual ~DTRedundantEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
diff --git a/contrib/libs/icu/i18n/dtrule.cpp b/contrib/libs/icu/i18n/dtrule.cpp
index 63949b63aa9..7322cbfdad4 100644
--- a/contrib/libs/icu/i18n/dtrule.cpp
+++ b/contrib/libs/icu/i18n/dtrule.cpp
@@ -100,37 +100,37 @@ DateTimeRule::operator!=(const DateTimeRule& that) const {
}
DateTimeRule::DateRuleType
-DateTimeRule::getDateRuleType(void) const {
+DateTimeRule::getDateRuleType() const {
return fDateRuleType;
}
DateTimeRule::TimeRuleType
-DateTimeRule::getTimeRuleType(void) const {
+DateTimeRule::getTimeRuleType() const {
return fTimeRuleType;
}
int32_t
-DateTimeRule::getRuleMonth(void) const {
+DateTimeRule::getRuleMonth() const {
return fMonth;
}
int32_t
-DateTimeRule::getRuleDayOfMonth(void) const {
+DateTimeRule::getRuleDayOfMonth() const {
return fDayOfMonth;
}
int32_t
-DateTimeRule::getRuleDayOfWeek(void) const {
+DateTimeRule::getRuleDayOfWeek() const {
return fDayOfWeek;
}
int32_t
-DateTimeRule::getRuleWeekInMonth(void) const {
+DateTimeRule::getRuleWeekInMonth() const {
return fWeekInMonth;
}
int32_t
-DateTimeRule::getRuleMillisInDay(void) const {
+DateTimeRule::getRuleMillisInDay() const {
return fMillisInDay;
}
diff --git a/contrib/libs/icu/i18n/erarules.cpp b/contrib/libs/icu/i18n/erarules.cpp
index e375740bd6b..65405bb84aa 100644
--- a/contrib/libs/icu/i18n/erarules.cpp
+++ b/contrib/libs/icu/i18n/erarules.cpp
@@ -31,8 +31,8 @@ static const int32_t DAY_MASK = 0x000000FF;
static const int32_t MAX_INT32 = 0x7FFFFFFF;
static const int32_t MIN_INT32 = 0xFFFFFFFF;
-static const UChar VAL_FALSE[] = {0x66, 0x61, 0x6c, 0x73, 0x65}; // "false"
-static const UChar VAL_FALSE_LEN = 5;
+static const char16_t VAL_FALSE[] = {0x66, 0x61, 0x6c, 0x73, 0x65}; // "false"
+static const char16_t VAL_FALSE_LEN = 5;
static UBool isSet(int startDate) {
return startDate != 0;
@@ -54,7 +54,7 @@ static UBool isValidRuleStartDate(int32_t year, int32_t month, int32_t day) {
* @return an encoded date.
*/
static int32_t encodeDate(int32_t year, int32_t month, int32_t day) {
- return year << 16 | month << 8 | day;
+ return (int32_t)((uint32_t)year << 16) | month << 8 | day;
}
static void decodeDate(int32_t encodedDate, int32_t (&fields)[3]) {
@@ -156,8 +156,8 @@ EraRules* EraRules::createInstance(const char *calType, UBool includeTentativeEr
return nullptr;
}
- UBool hasName = TRUE;
- UBool hasEnd = TRUE;
+ UBool hasName = true;
+ UBool hasEnd = true;
int32_t len;
while (ures_hasNext(eraRuleRes.getAlias())) {
LocalUResourceBundlePointer res(ures_getNextResource(eraRuleRes.getAlias(), nullptr, &status));
@@ -176,12 +176,12 @@ EraRules* EraRules::createInstance(const char *calType, UBool includeTentativeEr
}
startDates[eraIdx] = encodeDate(fields[0], fields[1], fields[2]);
} else if (uprv_strcmp(key, "named") == 0) {
- const UChar *val = ures_getString(res.getAlias(), &len, &status);
+ const char16_t *val = ures_getString(res.getAlias(), &len, &status);
if (u_strncmp(val, VAL_FALSE, VAL_FALSE_LEN) == 0) {
- hasName = FALSE;
+ hasName = false;
}
} else if (uprv_strcmp(key, "end") == 0) {
- hasEnd = TRUE;
+ hasEnd = true;
}
}
@@ -300,7 +300,7 @@ void EraRules::initCurrentEra() {
// If we failed to create the default time zone, we are in a bad state and don't
// really have many options. Carry on using UTC millis as a fallback.
if (zone != nullptr) {
- zone->getOffset(localMillis, FALSE, rawOffset, dstOffset, ec);
+ zone->getOffset(localMillis, false, rawOffset, dstOffset, ec);
delete zone;
localMillis += (rawOffset + dstOffset);
}
diff --git a/contrib/libs/icu/i18n/esctrn.cpp b/contrib/libs/icu/i18n/esctrn.cpp
index ba0e4c2c7bb..24fa6f58e45 100644
--- a/contrib/libs/icu/i18n/esctrn.cpp
+++ b/contrib/libs/icu/i18n/esctrn.cpp
@@ -20,14 +20,14 @@
U_NAMESPACE_BEGIN
-static const UChar UNIPRE[] = {85,43,0}; // "U+"
-static const UChar BS_u[] = {92,117,0}; // "\\u"
-static const UChar BS_U[] = {92,85,0}; // "\\U"
-static const UChar XMLPRE[] = {38,35,120,0}; // "&#x"
-static const UChar XML10PRE[] = {38,35,0}; // "&#"
-static const UChar PERLPRE[] = {92,120,123,0}; // "\\x{"
-static const UChar SEMI[] = {59,0}; // ";"
-static const UChar RBRACE[] = {125,0}; // "}"
+static const char16_t UNIPRE[] = {85,43,0}; // "U+"
+static const char16_t BS_u[] = {92,117,0}; // "\\u"
+static const char16_t BS_U[] = {92,85,0}; // "\\U"
+static const char16_t XMLPRE[] = {38,35,120,0}; // "&#x"
+static const char16_t XML10PRE[] = {38,35,0}; // "&#"
+static const char16_t PERLPRE[] = {92,120,123,0}; // "\\x{"
+static const char16_t SEMI[] = {59,0}; // ";"
+static const char16_t RBRACE[] = {125,0}; // "}"
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EscapeTransliterator)
@@ -36,28 +36,28 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EscapeTransliterator)
*/
static Transliterator* _createEscUnicode(const UnicodeString& ID, Transliterator::Token /*context*/) {
// Unicode: "U+10FFFF" hex, min=4, max=6
- return new EscapeTransliterator(ID, UnicodeString(TRUE, UNIPRE, 2), UnicodeString(), 16, 4, TRUE, NULL);
+ return new EscapeTransliterator(ID, UnicodeString(true, UNIPRE, 2), UnicodeString(), 16, 4, true, nullptr);
}
static Transliterator* _createEscJava(const UnicodeString& ID, Transliterator::Token /*context*/) {
// Java: "\\uFFFF" hex, min=4, max=4
- return new EscapeTransliterator(ID, UnicodeString(TRUE, BS_u, 2), UnicodeString(), 16, 4, FALSE, NULL);
+ return new EscapeTransliterator(ID, UnicodeString(true, BS_u, 2), UnicodeString(), 16, 4, false, nullptr);
}
static Transliterator* _createEscC(const UnicodeString& ID, Transliterator::Token /*context*/) {
// C: "\\uFFFF" hex, min=4, max=4; \\U0010FFFF hex, min=8, max=8
- return new EscapeTransliterator(ID, UnicodeString(TRUE, BS_u, 2), UnicodeString(), 16, 4, TRUE,
- new EscapeTransliterator(UnicodeString(), UnicodeString(TRUE, BS_U, 2), UnicodeString(), 16, 8, TRUE, NULL));
+ return new EscapeTransliterator(ID, UnicodeString(true, BS_u, 2), UnicodeString(), 16, 4, true,
+ new EscapeTransliterator(UnicodeString(), UnicodeString(true, BS_U, 2), UnicodeString(), 16, 8, true, nullptr));
}
static Transliterator* _createEscXML(const UnicodeString& ID, Transliterator::Token /*context*/) {
// XML: "&#x10FFFF;" hex, min=1, max=6
- return new EscapeTransliterator(ID, UnicodeString(TRUE, XMLPRE, 3), UnicodeString(SEMI[0]), 16, 1, TRUE, NULL);
+ return new EscapeTransliterator(ID, UnicodeString(true, XMLPRE, 3), UnicodeString(SEMI[0]), 16, 1, true, nullptr);
}
static Transliterator* _createEscXML10(const UnicodeString& ID, Transliterator::Token /*context*/) {
// XML10: "&1114111;" dec, min=1, max=7 (not really "Any-Hex")
- return new EscapeTransliterator(ID, UnicodeString(TRUE, XML10PRE, 2), UnicodeString(SEMI[0]), 10, 1, TRUE, NULL);
+ return new EscapeTransliterator(ID, UnicodeString(true, XML10PRE, 2), UnicodeString(SEMI[0]), 10, 1, true, nullptr);
}
static Transliterator* _createEscPerl(const UnicodeString& ID, Transliterator::Token /*context*/) {
// Perl: "\\x{263A}" hex, min=1, max=6
- return new EscapeTransliterator(ID, UnicodeString(TRUE, PERLPRE, 3), UnicodeString(RBRACE[0]), 16, 1, TRUE, NULL);
+ return new EscapeTransliterator(ID, UnicodeString(true, PERLPRE, 3), UnicodeString(RBRACE[0]), 16, 1, true, nullptr);
}
/**
@@ -91,7 +91,7 @@ EscapeTransliterator::EscapeTransliterator(const UnicodeString& newID,
int32_t _radix, int32_t _minDigits,
UBool _grokSupplementals,
EscapeTransliterator* adoptedSupplementalHandler) :
- Transliterator(newID, NULL)
+ Transliterator(newID, nullptr)
{
this->prefix = _prefix;
this->suffix = _suffix;
@@ -112,7 +112,7 @@ EscapeTransliterator::EscapeTransliterator(const EscapeTransliterator& o) :
minDigits(o.minDigits),
grokSupplementals(o.grokSupplementals) {
supplementalHandler = (o.supplementalHandler != 0) ?
- new EscapeTransliterator(*o.supplementalHandler) : NULL;
+ new EscapeTransliterator(*o.supplementalHandler) : nullptr;
}
EscapeTransliterator::~EscapeTransliterator() {
@@ -139,24 +139,24 @@ void EscapeTransliterator::handleTransliterate(Replaceable& text,
UnicodeString buf(prefix);
int32_t prefixLen = prefix.length();
- UBool redoPrefix = FALSE;
+ UBool redoPrefix = false;
while (start < limit) {
int32_t c = grokSupplementals ? text.char32At(start) : text.charAt(start);
int32_t charLen = grokSupplementals ? U16_LENGTH(c) : 1;
- if ((c & 0xFFFF0000) != 0 && supplementalHandler != NULL) {
+ if ((c & 0xFFFF0000) != 0 && supplementalHandler != nullptr) {
buf.truncate(0);
buf.append(supplementalHandler->prefix);
ICU_Utility::appendNumber(buf, c, supplementalHandler->radix,
supplementalHandler->minDigits);
buf.append(supplementalHandler->suffix);
- redoPrefix = TRUE;
+ redoPrefix = true;
} else {
if (redoPrefix) {
buf.truncate(0);
buf.append(prefix);
- redoPrefix = FALSE;
+ redoPrefix = false;
} else {
buf.truncate(prefixLen);
}
diff --git a/contrib/libs/icu/i18n/ethpccal.cpp b/contrib/libs/icu/i18n/ethpccal.cpp
index 7c7c0ba37b7..be4010843a5 100644
--- a/contrib/libs/icu/i18n/ethpccal.cpp
+++ b/contrib/libs/icu/i18n/ethpccal.cpp
@@ -19,6 +19,7 @@
U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EthiopicCalendar)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EthiopicAmeteAlemCalendar)
//static const int32_t JD_EPOCH_OFFSET_AMETE_ALEM = -285019;
static const int32_t JD_EPOCH_OFFSET_AMETE_MIHRET = 1723856;
@@ -29,16 +30,8 @@ static const int32_t AMETE_MIHRET_DELTA = 5500; // 5501 - 1 (Amete Alem 5501 = A
//-------------------------------------------------------------------------
EthiopicCalendar::EthiopicCalendar(const Locale& aLocale,
- UErrorCode& success,
- EEraType type /*= AMETE_MIHRET_ERA*/)
-: CECalendar(aLocale, success),
- eraType(type)
-{
-}
-
-EthiopicCalendar::EthiopicCalendar(const EthiopicCalendar& other)
-: CECalendar(other),
- eraType(other.eraType)
+ UErrorCode& success)
+: CECalendar(aLocale, success)
{
}
@@ -55,24 +48,9 @@ EthiopicCalendar::clone() const
const char *
EthiopicCalendar::getType() const
{
- if (isAmeteAlemEra()) {
- return "ethiopic-amete-alem";
- }
return "ethiopic";
}
-void
-EthiopicCalendar::setAmeteAlemEra(UBool onOff)
-{
- eraType = onOff ? AMETE_ALEM_ERA : AMETE_MIHRET_ERA;
-}
-
-UBool
-EthiopicCalendar::isAmeteAlemEra() const
-{
- return (eraType == AMETE_ALEM_ERA);
-}
-
//-------------------------------------------------------------------------
// Calendar framework
//-------------------------------------------------------------------------
@@ -82,58 +60,46 @@ EthiopicCalendar::handleGetExtendedYear()
{
// Ethiopic calendar uses EXTENDED_YEAR aligned to
// Amelete Hihret year always.
- int32_t eyear;
if (newerField(UCAL_EXTENDED_YEAR, UCAL_YEAR) == UCAL_EXTENDED_YEAR) {
- eyear = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1
- } else if (isAmeteAlemEra()) {
- eyear = internalGet(UCAL_YEAR, 1 + AMETE_MIHRET_DELTA)
- - AMETE_MIHRET_DELTA; // Default to year 1 of Amelete Mihret
- } else {
- // The year defaults to the epoch start, the era to AMETE_MIHRET
- int32_t era = internalGet(UCAL_ERA, AMETE_MIHRET);
- if (era == AMETE_MIHRET) {
- eyear = internalGet(UCAL_YEAR, 1); // Default to year 1
- } else {
- eyear = internalGet(UCAL_YEAR, 1) - AMETE_MIHRET_DELTA;
- }
+ return internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1
+ }
+ // The year defaults to the epoch start, the era to AMETE_MIHRET
+ if (internalGet(UCAL_ERA, AMETE_MIHRET) == AMETE_MIHRET) {
+ return internalGet(UCAL_YEAR, 1); // Default to year 1
}
- return eyear;
+ return internalGet(UCAL_YEAR, 1) - AMETE_MIHRET_DELTA;
}
void
EthiopicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/)
{
- int32_t eyear, month, day, era, year;
+ int32_t eyear, month, day;
jdToCE(julianDay, getJDEpochOffset(), eyear, month, day);
- if (isAmeteAlemEra()) {
- era = AMETE_ALEM;
- year = eyear + AMETE_MIHRET_DELTA;
- } else {
- if (eyear > 0) {
- era = AMETE_MIHRET;
- year = eyear;
- } else {
- era = AMETE_ALEM;
- year = eyear + AMETE_MIHRET_DELTA;
- }
- }
-
internalSet(UCAL_EXTENDED_YEAR, eyear);
- internalSet(UCAL_ERA, era);
- internalSet(UCAL_YEAR, year);
+ internalSet(UCAL_ERA, (eyear > 0) ? AMETE_MIHRET : AMETE_ALEM);
+ internalSet(UCAL_YEAR, (eyear > 0) ? eyear : (eyear + AMETE_MIHRET_DELTA));
internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
internalSet(UCAL_DATE, day);
internalSet(UCAL_DAY_OF_YEAR, (30 * month) + day);
}
-int32_t
-EthiopicCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) const
+constexpr uint32_t kEthiopicRelatedYearDiff = 8;
+
+int32_t EthiopicCalendar::getRelatedYear(UErrorCode &status) const
{
- if (isAmeteAlemEra() && field == UCAL_ERA) {
- return 0; // Only one era in this mode, era is always 0
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
}
- return CECalendar::handleGetLimit(field, limitType);
+ return year + kEthiopicRelatedYearDiff;
+}
+
+void EthiopicCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kEthiopicRelatedYearDiff);
}
/**
@@ -143,7 +109,7 @@ EthiopicCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
static void U_CALLCONV initializeSystemDefaultCentury()
{
@@ -173,9 +139,6 @@ EthiopicCalendar::defaultCenturyStartYear() const
{
// lazy-evaluate systemDefaultCenturyStartYear
umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
- if (isAmeteAlemEra()) {
- return gSystemDefaultCenturyStartYear + AMETE_MIHRET_DELTA;
- }
return gSystemDefaultCenturyStartYear;
}
@@ -202,6 +165,95 @@ EthiopicCalendar::ethiopicToJD(int32_t year, int32_t month, int32_t date)
}
#endif
+//-------------------------------------------------------------------------
+// Constructors...
+//-------------------------------------------------------------------------
+
+EthiopicAmeteAlemCalendar::EthiopicAmeteAlemCalendar(const Locale& aLocale,
+ UErrorCode& success)
+: EthiopicCalendar(aLocale, success)
+{
+}
+
+EthiopicAmeteAlemCalendar::~EthiopicAmeteAlemCalendar()
+{
+}
+
+EthiopicAmeteAlemCalendar*
+EthiopicAmeteAlemCalendar::clone() const
+{
+ return new EthiopicAmeteAlemCalendar(*this);
+}
+
+//-------------------------------------------------------------------------
+// Calendar framework
+//-------------------------------------------------------------------------
+
+const char *
+EthiopicAmeteAlemCalendar::getType() const
+{
+ return "ethiopic-amete-alem";
+}
+
+int32_t
+EthiopicAmeteAlemCalendar::handleGetExtendedYear()
+{
+ // 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
+}
+
+void
+EthiopicAmeteAlemCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*status*/)
+{
+ int32_t eyear, month, day;
+ jdToCE(julianDay, getJDEpochOffset(), eyear, month, day);
+
+ internalSet(UCAL_EXTENDED_YEAR, eyear);
+ internalSet(UCAL_ERA, AMETE_ALEM);
+ internalSet(UCAL_YEAR, eyear + AMETE_MIHRET_DELTA);
+ internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
+ internalSet(UCAL_DATE, day);
+ internalSet(UCAL_DAY_OF_YEAR, (30 * month) + day);
+}
+
+int32_t
+EthiopicAmeteAlemCalendar::handleGetLimit(UCalendarDateFields field, ELimitType limitType) const
+{
+ if (field == UCAL_ERA) {
+ return 0; // Only one era in this mode, era is always 0
+ }
+ return EthiopicCalendar::handleGetLimit(field, limitType);
+}
+
+constexpr uint32_t kEthiopicAmeteAlemRelatedYearDiff = -5492;
+
+int32_t EthiopicAmeteAlemCalendar::getRelatedYear(UErrorCode &status) const
+{
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return year + kEthiopicAmeteAlemRelatedYearDiff;
+}
+
+void EthiopicAmeteAlemCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kEthiopicAmeteAlemRelatedYearDiff);
+}
+
+int32_t
+EthiopicAmeteAlemCalendar::defaultCenturyStartYear() const
+{
+ return EthiopicCalendar::defaultCenturyStartYear() + AMETE_MIHRET_DELTA;
+}
+
U_NAMESPACE_END
#endif
diff --git a/contrib/libs/icu/i18n/ethpccal.h b/contrib/libs/icu/i18n/ethpccal.h
index 0cc5b6c535e..1a5cd4f41aa 100644
--- a/contrib/libs/icu/i18n/ethpccal.h
+++ b/contrib/libs/icu/i18n/ethpccal.h
@@ -27,15 +27,6 @@ class EthiopicCalendar : public CECalendar {
public:
/**
- * Calendar type - use Amete Alem era for all the time or not
- * @internal
- */
- enum EEraType {
- AMETE_MIHRET_ERA,
- AMETE_ALEM_ERA
- };
-
- /**
* Useful constants for EthiopicCalendar.
* @internal
*/
@@ -122,13 +113,13 @@ public:
* only use Amete Alem for all the time.
* @internal
*/
- EthiopicCalendar(const Locale& aLocale, UErrorCode& success, EEraType type = AMETE_MIHRET_ERA);
+ EthiopicCalendar(const Locale& aLocale, UErrorCode& success);
/**
* Copy Constructor
* @internal
*/
- EthiopicCalendar(const EthiopicCalendar& other);
+ EthiopicCalendar(const EthiopicCalendar& other) = default;
/**
* Destructor.
@@ -144,25 +135,25 @@ public:
virtual EthiopicCalendar* clone() const override;
/**
- * return the calendar type, "ethiopic"
+ * Return the calendar type, "ethiopic"
* @return calendar type
* @internal
*/
virtual const char * getType() const override;
/**
- * Set Alem or Mihret era.
- * @param onOff Set Amete Alem era if true, otherwise set Amete Mihret era.
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
* @internal
*/
- void setAmeteAlemEra (UBool onOff);
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
- * Return true if this calendar is set to the Amete Alem era.
- * @return true if set to the Amete Alem era.
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
* @internal
*/
- UBool isAmeteAlemEra() const;
+ virtual void setRelatedYear(int32_t year) override;
protected:
//-------------------------------------------------------------------------
@@ -171,6 +162,11 @@ protected:
/**
* Return the extended year defined by the current fields.
+ * This calendar uses both AMETE_ALEM and AMETE_MIHRET.
+ *
+ * EXTENDED_YEAR ERA YEAR
+ * 0 AMETE_ALEM 5500
+ * 1 AMETE_MIHRET 1
* @internal
*/
virtual int32_t handleGetExtendedYear() override;
@@ -182,12 +178,6 @@ protected:
virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override;
/**
- * Calculate the limit for a specified type of limit and field
- * @internal
- */
- virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override;
-
- /**
* Returns the date of the start of the default century
* @return start of century - in milliseconds since epoch, 1970
* @internal
@@ -206,18 +196,6 @@ protected:
*/
virtual int32_t getJDEpochOffset() const override;
-private:
- /**
- * When eraType is AMETE_ALEM_ERA, then this calendar use only AMETE_ALEM
- * for the era. Otherwise (default), this calendar uses both AMETE_ALEM
- * and AMETE_MIHRET.
- *
- * EXTENDED_YEAR AMETE_ALEM_ERA AMETE_MIHRET_ERA
- * 0 Amete Alem 5500 Amete Alem 5500
- * 1 Amete Mihret 1 Amete Alem 5501
- */
- EEraType eraType;
-
public:
/**
* Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual
@@ -229,7 +207,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -242,7 +220,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
#if 0
// We do not want to introduce this API in ICU4C.
@@ -266,6 +244,123 @@ public:
#endif
};
+/**
+ * Implement the Ethiopic Amete Alem calendar system.
+ * @internal
+ */
+class EthiopicAmeteAlemCalendar : public EthiopicCalendar {
+
+public:
+ /**
+ * Constructs a EthiopicAmeteAlemCalendar based on the current time in the default time zone
+ * with the given locale.
+ *
+ * @param aLocale The given locale.
+ * @param success Indicates the status of EthiopicCalendar object construction.
+ * Returns U_ZERO_ERROR if constructed successfully.
+ * @internal
+ */
+ EthiopicAmeteAlemCalendar(const Locale& aLocale, UErrorCode& success);
+
+ /**
+ * Copy Constructor
+ * @internal
+ */
+ EthiopicAmeteAlemCalendar(const EthiopicAmeteAlemCalendar& other) = default;
+
+ /**
+ * Destructor.
+ * @internal
+ */
+ virtual ~EthiopicAmeteAlemCalendar();
+
+ /**
+ * Create and return a polymorphic copy of this calendar.
+ * @return return a polymorphic copy of this calendar.
+ * @internal
+ */
+ virtual EthiopicAmeteAlemCalendar* clone() const override;
+
+ /**
+ * Return the calendar type, "ethiopic-amete-alem"
+ * @return calendar type
+ * @internal
+ */
+ virtual const char * getType() const override;
+
+ /**
+ * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual
+ * override. This method is to implement a simple version of RTTI, since not all C++
+ * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call
+ * this method.
+ *
+ * @return The class ID for this object. All objects of a given class have the
+ * same class ID. Objects of other classes have different class IDs.
+ * @internal
+ */
+ virtual UClassID getDynamicClassID() const override;
+
+ /**
+ * Return the class ID for this class. This is useful only for comparing to a return
+ * value from getDynamicClassID(). For example:
+ *
+ * Base* polymorphic_pointer = createPolymorphicObject();
+ * if (polymorphic_pointer->getDynamicClassID() ==
+ * Derived::getStaticClassID()) ...
+ *
+ * @return The class ID for all objects of this class.
+ * @internal
+ */
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
+
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
+
+ /**
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual void setRelatedYear(int32_t year) override;
+
+protected:
+ //-------------------------------------------------------------------------
+ // Calendar framework
+ //-------------------------------------------------------------------------
+
+ /**
+ * Return the extended year defined by the current fields.
+ * This calendar use only AMETE_ALEM for the era.
+ *
+ * EXTENDED_YEAR ERA YEAR
+ * 0 AMETE_ALEM 5500
+ * 1 AMETE_ALEM 5501
+ * @internal
+ */
+ virtual int32_t handleGetExtendedYear() override;
+
+ /**
+ * Compute fields from the JD
+ * @internal
+ */
+ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override;
+
+ /**
+ * Calculate the limit for a specified type of limit and field
+ * @internal
+ */
+ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override;
+ /**
+ * Returns the year in which the default century begins
+ * @internal
+ */
+ virtual int32_t defaultCenturyStartYear() const override;
+};
+
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif /* ETHPCCAL_H */
diff --git a/contrib/libs/icu/i18n/fmtable.cpp b/contrib/libs/icu/i18n/fmtable.cpp
index 7a9a81ded5d..618868c0a2f 100644
--- a/contrib/libs/icu/i18n/fmtable.cpp
+++ b/contrib/libs/icu/i18n/fmtable.cpp
@@ -53,7 +53,7 @@ using number::impl::DecimalQuantity;
// NOTE: These inlines assume that all fObjects are in fact instances
// of the Measure class, which is true as of 3.0. [alan]
-// Return TRUE if *a == *b.
+// 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);
@@ -65,9 +65,9 @@ static inline UObject* objectClone(const UObject* a) {
return ((const Measure*) a)->clone();
}
-// Return TRUE if *a is an instance of Measure.
+// Return true if *a is an instance of Measure.
static inline UBool instanceOfMeasure(const UObject* a) {
- return dynamic_cast<const Measure*>(a) != NULL;
+ return dynamic_cast<const Measure*>(a) != nullptr;
}
/**
@@ -79,7 +79,7 @@ static inline UBool instanceOfMeasure(const UObject* a) {
*/
static Formattable* createArrayCopy(const Formattable* array, int32_t count) {
Formattable *result = new Formattable[count];
- if (result != NULL) {
+ if (result != nullptr) {
for (int32_t i=0; i<count; ++i)
result[i] = array[i]; // Don't memcpy!
}
@@ -104,8 +104,8 @@ static void setError(UErrorCode& ec, UErrorCode err) {
void Formattable::init() {
fValue.fInt64 = 0;
fType = kLong;
- fDecimalStr = NULL;
- fDecimalQuantity = NULL;
+ fDecimalStr = nullptr;
+ fDecimalQuantity = nullptr;
fBogus.setToBogus();
}
@@ -259,14 +259,14 @@ Formattable::operator=(const Formattable& source)
}
UErrorCode status = U_ZERO_ERROR;
- if (source.fDecimalQuantity != NULL) {
+ if (source.fDecimalQuantity != nullptr) {
fDecimalQuantity = new DecimalQuantity(*source.fDecimalQuantity);
}
- if (source.fDecimalStr != NULL) {
+ if (source.fDecimalStr != nullptr) {
fDecimalStr = new CharString(*source.fDecimalStr, status);
if (U_FAILURE(status)) {
delete fDecimalStr;
- fDecimalStr = NULL;
+ fDecimalStr = nullptr;
}
}
}
@@ -315,7 +315,7 @@ Formattable::operator==(const Formattable& that) const
}
break;
case kObject:
- if (fValue.fObject == NULL || that.fValue.fObject == NULL) {
+ if (fValue.fObject == nullptr || that.fValue.fObject == nullptr) {
equal = false;
} else {
equal = objectEquals(fValue.fObject, that.fValue.fObject);
@@ -357,10 +357,10 @@ void Formattable::dispose()
fValue.fInt64 = 0;
delete fDecimalStr;
- fDecimalStr = NULL;
+ fDecimalStr = nullptr;
delete fDecimalQuantity;
- fDecimalQuantity = NULL;
+ fDecimalQuantity = nullptr;
}
Formattable *
@@ -382,9 +382,9 @@ Formattable::isNumeric() const {
case kDouble:
case kLong:
case kInt64:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -421,7 +421,7 @@ Formattable::getLong(UErrorCode& status) const
return (int32_t)fValue.fDouble; // loses fraction
}
case Formattable::kObject:
- if (fValue.fObject == NULL) {
+ if (fValue.fObject == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -462,7 +462,7 @@ Formattable::getInt64(UErrorCode& status) const
} else if (fValue.fDouble < (double)U_INT64_MIN) {
status = U_INVALID_FORMAT_ERROR;
return U_INT64_MIN;
- } else if (fabs(fValue.fDouble) > U_DOUBLE_MAX_EXACT_INT && fDecimalQuantity != NULL) {
+ } else if (fabs(fValue.fDouble) > U_DOUBLE_MAX_EXACT_INT && fDecimalQuantity != nullptr) {
if (fDecimalQuantity->fitsInLong(true)) {
return fDecimalQuantity->toLong();
} else {
@@ -474,7 +474,7 @@ Formattable::getInt64(UErrorCode& status) const
return (int64_t)fValue.fDouble;
}
case Formattable::kObject:
- if (fValue.fObject == NULL) {
+ if (fValue.fObject == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -504,7 +504,7 @@ Formattable::getDouble(UErrorCode& status) const
case Formattable::kDouble:
return fValue.fDouble;
case Formattable::kObject:
- if (fValue.fObject == NULL) {
+ if (fValue.fObject == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -522,7 +522,7 @@ Formattable::getDouble(UErrorCode& status) const
const UObject*
Formattable::getObject() const {
- return (fType == kObject) ? fValue.fObject : NULL;
+ return (fType == kObject) ? fValue.fObject : nullptr;
}
// -------------------------------------
@@ -630,7 +630,7 @@ Formattable::getString(UnicodeString& result, UErrorCode& status) const
setError(status, U_INVALID_FORMAT_ERROR);
result.setToBogus();
} else {
- if (fValue.fString == NULL) {
+ if (fValue.fString == nullptr) {
setError(status, U_MEMORY_ALLOCATION_ERROR);
} else {
result = *fValue.fString;
@@ -647,7 +647,7 @@ Formattable::getString(UErrorCode& status) const
setError(status, U_INVALID_FORMAT_ERROR);
return *getBogus();
}
- if (fValue.fString == NULL) {
+ if (fValue.fString == nullptr) {
setError(status, U_MEMORY_ALLOCATION_ERROR);
return *getBogus();
}
@@ -662,7 +662,7 @@ Formattable::getString(UErrorCode& status)
setError(status, U_INVALID_FORMAT_ERROR);
return *getBogus();
}
- if (fValue.fString == NULL) {
+ if (fValue.fString == nullptr) {
setError(status, U_MEMORY_ALLOCATION_ERROR);
return *getBogus();
}
@@ -676,7 +676,7 @@ Formattable::getArray(int32_t& count, UErrorCode& status) const
if (fType != kArray) {
setError(status, U_INVALID_FORMAT_ERROR);
count = 0;
- return NULL;
+ return nullptr;
}
count = fValue.fArrayAndCount.fCount;
return fValue.fArrayAndCount.fArray;
@@ -697,12 +697,12 @@ StringPiece Formattable::getDecimalNumber(UErrorCode &status) {
if (U_FAILURE(status)) {
return "";
}
- if (fDecimalStr != NULL) {
+ if (fDecimalStr != nullptr) {
return fDecimalStr->toStringPiece();
}
CharString *decimalStr = internalGetCharString(status);
- if(decimalStr == NULL) {
+ if(decimalStr == nullptr) {
return ""; // getDecimalNumber returns "" for error cases
} else {
return decimalStr->toStringPiece();
@@ -710,8 +710,8 @@ StringPiece Formattable::getDecimalNumber(UErrorCode &status) {
}
CharString *Formattable::internalGetCharString(UErrorCode &status) {
- if(fDecimalStr == NULL) {
- if (fDecimalQuantity == NULL) {
+ if(fDecimalStr == nullptr) {
+ if (fDecimalQuantity == nullptr) {
// No decimal number for the formattable yet. Which means the value was
// set directly by the user as an int, int64 or double. If the value came
// from parsing, or from the user setting a decimal number, fDecimalNum
@@ -725,9 +725,9 @@ CharString *Formattable::internalGetCharString(UErrorCode &status) {
}
fDecimalStr = new CharString();
- if (fDecimalStr == NULL) {
+ if (fDecimalStr == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// Older ICUs called uprv_decNumberToString here, which is not exactly the same as
// DecimalQuantity::toScientificString(). The biggest difference is that uprv_decNumberToString does
@@ -775,11 +775,11 @@ Formattable::populateDecimalQuantity(number::impl::DecimalQuantity& output, UErr
// ---------------------------------------
void
Formattable::adoptDecimalQuantity(DecimalQuantity *dq) {
- if (fDecimalQuantity != NULL) {
+ if (fDecimalQuantity != nullptr) {
delete fDecimalQuantity;
}
fDecimalQuantity = dq;
- if (dq == NULL) { // allow adoptDigitList(NULL) to clear
+ if (dq == nullptr) { // allow adoptDigitList(nullptr) to clear
return;
}
@@ -898,11 +898,11 @@ U_NAMESPACE_USE
U_CAPI UFormattable* U_EXPORT2
ufmt_open(UErrorCode *status) {
if( U_FAILURE(*status) ) {
- return NULL;
+ return nullptr;
}
UFormattable *fmt = (new Formattable())->toUFormattable();
- if( fmt == NULL ) {
+ if( fmt == nullptr ) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
return fmt;
@@ -958,7 +958,7 @@ ufmt_getObject(const UFormattable *fmt, UErrorCode *status) {
const Formattable *obj = Formattable::fromUFormattable(fmt);
const void *ret = obj->getObject();
- if( ret==NULL &&
+ if( ret==nullptr &&
(obj->getType() != Formattable::kObject) &&
U_SUCCESS( *status )) {
*status = U_INVALID_FORMAT_ERROR;
@@ -966,7 +966,7 @@ ufmt_getObject(const UFormattable *fmt, UErrorCode *status) {
return ret;
}
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
ufmt_getUChars(UFormattable *fmt, int32_t *len, UErrorCode *status) {
Formattable *obj = Formattable::fromUFormattable(fmt);
@@ -975,12 +975,12 @@ ufmt_getUChars(UFormattable *fmt, int32_t *len, UErrorCode *status) {
if( U_SUCCESS(*status) ){
*status = U_INVALID_FORMAT_ERROR;
}
- return NULL;
+ return nullptr;
}
// This should return a valid string
UnicodeString &str = obj->getString(*status);
- if( U_SUCCESS(*status) && len != NULL ) {
+ if( U_SUCCESS(*status) && len != nullptr ) {
*len = str.length();
}
return str.getTerminatedBuffer();
@@ -1001,10 +1001,10 @@ ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status) {
int32_t count;
(void)obj->getArray(count, *status);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
} else if(n<0 || n>=count) {
setError(*status, U_INDEX_OUTOFBOUNDS_ERROR);
- return NULL;
+ return nullptr;
} else {
return (*obj)[n].toUFormattable(); // returns non-const Formattable
}
@@ -1020,11 +1020,11 @@ ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status) {
if(U_FAILURE(*status)) {
return "";
}
- if(charString == NULL) {
+ if(charString == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return "";
} else {
- if(len!=NULL) {
+ if(len!=nullptr) {
*len = charString->length();
}
return charString->data();
diff --git a/contrib/libs/icu/i18n/formatted_string_builder.cpp b/contrib/libs/icu/i18n/formatted_string_builder.cpp
index 734078644b8..8dbf954af9f 100644
--- a/contrib/libs/icu/i18n/formatted_string_builder.cpp
+++ b/contrib/libs/icu/i18n/formatted_string_builder.cpp
@@ -6,6 +6,7 @@
#if !UCONFIG_NO_FORMATTING
#include "formatted_string_builder.h"
+#include "putilimp.h"
#include "unicode/ustring.h"
#include "unicode/utf16.h"
#include "unicode/unum.h" // for UNumberFormatFields literals
@@ -197,6 +198,9 @@ FormattedStringBuilder::splice(int32_t startThis, int32_t endThis, const Unicod
int32_t thisLength = endThis - startThis;
int32_t otherLength = endOther - startOther;
int32_t count = otherLength - thisLength;
+ if (U_FAILURE(status)) {
+ return count;
+ }
int32_t position;
if (count > 0) {
// Overall, chars need to be added.
@@ -221,6 +225,9 @@ int32_t FormattedStringBuilder::append(const FormattedStringBuilder &other, UErr
int32_t
FormattedStringBuilder::insert(int32_t index, const FormattedStringBuilder &other, UErrorCode &status) {
+ if (U_FAILURE(status)) {
+ return 0;
+ }
if (this == &other) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -255,12 +262,18 @@ int32_t FormattedStringBuilder::prepareForInsert(int32_t index, int32_t count, U
U_ASSERT(index >= 0);
U_ASSERT(index <= fLength);
U_ASSERT(count >= 0);
+ U_ASSERT(fZero >= 0);
+ U_ASSERT(fLength >= 0);
+ U_ASSERT(getCapacity() - fZero >= fLength);
+ if (U_FAILURE(status)) {
+ return count;
+ }
if (index == 0 && fZero - count >= 0) {
// Append to start
fZero -= count;
fLength += count;
return fZero;
- } else if (index == fLength && fZero + fLength + count < getCapacity()) {
+ } else if (index == fLength && count <= getCapacity() - fZero - fLength) {
// Append to end
fLength += count;
return fZero + fLength - count;
@@ -275,18 +288,26 @@ int32_t FormattedStringBuilder::prepareForInsertHelper(int32_t index, int32_t co
int32_t oldZero = fZero;
char16_t *oldChars = getCharPtr();
Field *oldFields = getFieldPtr();
- if (fLength + count > oldCapacity) {
- if ((fLength + count) > INT32_MAX / 2) {
- // If we continue, then newCapacity will overflow int32_t in the next line.
+ int32_t newLength;
+ if (uprv_add32_overflow(fLength, count, &newLength)) {
+ status = U_INPUT_TOO_LONG_ERROR;
+ return -1;
+ }
+ int32_t newZero;
+ if (newLength > oldCapacity) {
+ if (newLength > INT32_MAX / 2) {
+ // We do not support more than 1G char16_t in this code because
+ // dealing with >2G *bytes* can cause subtle bugs.
status = U_INPUT_TOO_LONG_ERROR;
return -1;
}
- int32_t newCapacity = (fLength + count) * 2;
- int32_t newZero = newCapacity / 2 - (fLength + count) / 2;
+ // Keep newCapacity also to at most 1G char16_t.
+ int32_t newCapacity = newLength * 2;
+ 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) * newCapacity));
- auto newFields = static_cast<Field *>(uprv_malloc(sizeof(Field) * 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);
@@ -315,10 +336,8 @@ int32_t FormattedStringBuilder::prepareForInsertHelper(int32_t index, int32_t co
fChars.heap.capacity = newCapacity;
fFields.heap.ptr = newFields;
fFields.heap.capacity = newCapacity;
- fZero = newZero;
- fLength += count;
} else {
- int32_t newZero = oldCapacity / 2 - (fLength + count) / 2;
+ newZero = (oldCapacity - newLength) / 2;
// C++ note: memmove is required because src and dest may overlap.
// First copy the entire string to the location of the prefix, and then move the suffix
@@ -331,18 +350,20 @@ int32_t FormattedStringBuilder::prepareForInsertHelper(int32_t index, int32_t co
uprv_memmove2(oldFields + newZero + index + count,
oldFields + newZero + index,
sizeof(Field) * (fLength - index));
-
- fZero = newZero;
- fLength += count;
}
- U_ASSERT((fZero + index) >= 0);
+ fZero = newZero;
+ fLength = newLength;
return fZero + index;
}
int32_t FormattedStringBuilder::remove(int32_t index, int32_t count) {
- // TODO: Reset the heap here? (If the string after removal can fit on stack?)
+ U_ASSERT(0 <= index);
+ U_ASSERT(index <= fLength);
+ U_ASSERT(count <= (fLength - index));
+ U_ASSERT(index <= getCapacity() - fZero);
+
int32_t position = index + fZero;
- U_ASSERT(position >= 0);
+ // TODO: Reset the heap here? (If the string after removal can fit on stack?)
uprv_memmove2(getCharPtr() + position,
getCharPtr() + position + count,
sizeof(char16_t) * (fLength - index - count));
@@ -359,7 +380,7 @@ UnicodeString FormattedStringBuilder::toUnicodeString() const {
const UnicodeString FormattedStringBuilder::toTempUnicodeString() const {
// Readonly-alias constructor:
- return UnicodeString(FALSE, getCharPtr() + fZero, fLength);
+ return UnicodeString(false, getCharPtr() + fZero, fLength);
}
UnicodeString FormattedStringBuilder::toDebugString() const {
diff --git a/contrib/libs/icu/i18n/formatted_string_builder.h b/contrib/libs/icu/i18n/formatted_string_builder.h
index 92bcf07d782..32e0900ae23 100644
--- a/contrib/libs/icu/i18n/formatted_string_builder.h
+++ b/contrib/libs/icu/i18n/formatted_string_builder.h
@@ -218,7 +218,9 @@ class U_I18N_API FormattedStringBuilder : public UMemory {
};
static_assert(
- std::is_pod<FormattedStringBuilder::Field>::value,
+ // std::is_pod<> is deprecated.
+ std::is_standard_layout<FormattedStringBuilder::Field>::value &&
+ std::is_trivial<FormattedStringBuilder::Field>::value,
"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/formattedval_impl.h b/contrib/libs/icu/i18n/formattedval_impl.h
index 2b9a3970d2e..e19392c5b9d 100644
--- a/contrib/libs/icu/i18n/formattedval_impl.h
+++ b/contrib/libs/icu/i18n/formattedval_impl.h
@@ -83,10 +83,10 @@ public:
// Implementation of FormattedValue (const):
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
- Appendable& appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toString(UErrorCode& status) const override;
+ UnicodeString toTempString(UErrorCode& status) const override;
+ Appendable& appendTo(Appendable& appendable, UErrorCode& status) const override;
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
// Additional methods used during construction phase only (non-const):
@@ -153,12 +153,15 @@ public:
virtual ~FormattedValueStringBuilderImpl();
+ FormattedValueStringBuilderImpl(FormattedValueStringBuilderImpl&&) = default;
+ FormattedValueStringBuilderImpl& operator=(FormattedValueStringBuilderImpl&&) = default;
+
// Implementation of FormattedValue (const):
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
- Appendable& appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toString(UErrorCode& status) const override;
+ UnicodeString toTempString(UErrorCode& status) const override;
+ Appendable& appendTo(Appendable& appendable, UErrorCode& status) const override;
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
// Additional helper functions:
UBool nextFieldPosition(FieldPosition& fp, UErrorCode& status) const;
@@ -219,7 +222,7 @@ struct UFormattedValueImpl : public UMemory, public UFormattedValueApiHelper {
/** Implementation of the methods from U_FORMATTED_VALUE_SUBCLASS_AUTO. */
#define UPRV_FORMATTED_VALUE_SUBCLASS_AUTO_IMPL(Name) \
- Name::Name(Name&& src) U_NOEXCEPT \
+ Name::Name(Name&& src) noexcept \
: fData(src.fData), fErrorCode(src.fErrorCode) { \
src.fData = nullptr; \
src.fErrorCode = U_INVALID_STATE_ERROR; \
@@ -228,7 +231,7 @@ struct UFormattedValueImpl : public UMemory, public UFormattedValueApiHelper {
delete fData; \
fData = nullptr; \
} \
- Name& Name::operator=(Name&& src) U_NOEXCEPT { \
+ Name& Name::operator=(Name&& src) noexcept { \
delete fData; \
fData = src.fData; \
src.fData = nullptr; \
diff --git a/contrib/libs/icu/i18n/formattedval_iterimpl.cpp b/contrib/libs/icu/i18n/formattedval_iterimpl.cpp
index 75328fae883..ec770e2191d 100644
--- a/contrib/libs/icu/i18n/formattedval_iterimpl.cpp
+++ b/contrib/libs/icu/i18n/formattedval_iterimpl.cpp
@@ -32,7 +32,7 @@ UnicodeString FormattedValueFieldPositionIteratorImpl::toTempString(
UErrorCode&) const {
// The alias must point to memory owned by this object;
// fastCopyFrom doesn't do this when using a stack buffer.
- return UnicodeString(TRUE, fString.getBuffer(), fString.length());
+ return UnicodeString(true, fString.getBuffer(), fString.length());
}
Appendable& FormattedValueFieldPositionIteratorImpl::appendTo(
diff --git a/contrib/libs/icu/i18n/formattedval_sbimpl.cpp b/contrib/libs/icu/i18n/formattedval_sbimpl.cpp
index 70ffacac4b7..72197cdd8c7 100644
--- a/contrib/libs/icu/i18n/formattedval_sbimpl.cpp
+++ b/contrib/libs/icu/i18n/formattedval_sbimpl.cpp
@@ -230,6 +230,11 @@ bool FormattedValueStringBuilderImpl::nextPositionImpl(ConstrainedFieldPosition&
if (si + 1 < spanIndicesCount) {
nextSpanStart = spanIndices[si + 1].start;
}
+ if (length == 0) {
+ // ICU-21871: Don't return fields on empty spans
+ i--;
+ continue;
+ }
if (cfpos.matchesField(spanCategory, spanValue)) {
fieldStart = i - fString.fZero;
int32_t end = fieldStart + length;
diff --git a/contrib/libs/icu/i18n/formattedvalue.cpp b/contrib/libs/icu/i18n/formattedvalue.cpp
index 1030661f220..aacd6ac70e0 100644
--- a/contrib/libs/icu/i18n/formattedvalue.cpp
+++ b/contrib/libs/icu/i18n/formattedvalue.cpp
@@ -43,7 +43,7 @@ void ConstrainedFieldPosition::setInt64IterationContext(int64_t context) {
UBool ConstrainedFieldPosition::matchesField(int32_t category, int32_t field) const {
switch (fConstraint) {
case UCFPOS_CONSTRAINT_NONE:
- return TRUE;
+ return true;
case UCFPOS_CONSTRAINT_CATEGORY:
return fCategory == category;
case UCFPOS_CONSTRAINT_FIELD:
@@ -193,7 +193,7 @@ ucfpos_close(UConstrainedFieldPosition* ptr) {
}
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
ufmtval_getString(
const UFormattedValue* ufmtval,
int32_t* pLength,
@@ -223,7 +223,7 @@ ufmtval_nextPosition(
const auto* fmtval = UFormattedValueApiHelper::validate(ufmtval, *ec);
auto* cfpos = UConstrainedFieldPositionImpl::validate(ucfpos, *ec);
if (U_FAILURE(*ec)) {
- return FALSE;
+ return false;
}
return fmtval->fFormattedValue->nextPosition(cfpos->fImpl, *ec);
}
diff --git a/contrib/libs/icu/i18n/fphdlimp.cpp b/contrib/libs/icu/i18n/fphdlimp.cpp
index f51bf4bae78..e170dc4b992 100644
--- a/contrib/libs/icu/i18n/fphdlimp.cpp
+++ b/contrib/libs/icu/i18n/fphdlimp.cpp
@@ -39,7 +39,7 @@ FieldPositionOnlyHandler::~FieldPositionOnlyHandler() {
void
FieldPositionOnlyHandler::addAttribute(int32_t id, int32_t start, int32_t limit) {
if (pos.getField() == id && (!acceptFirstOnly || !seenFirst)) {
- seenFirst = TRUE;
+ seenFirst = true;
pos.setBeginIndex(start + fShift);
pos.setEndIndex(limit + fShift);
}
@@ -54,7 +54,7 @@ FieldPositionOnlyHandler::shiftLast(int32_t delta) {
}
UBool
-FieldPositionOnlyHandler::isRecording(void) const {
+FieldPositionOnlyHandler::isRecording() const {
return pos.getField() != FieldPosition::DONT_CARE;
}
@@ -67,7 +67,7 @@ void FieldPositionOnlyHandler::setAcceptFirstOnly(UBool acceptFirstOnly) {
FieldPositionIteratorHandler::FieldPositionIteratorHandler(FieldPositionIterator* posIter,
UErrorCode& _status)
- : iter(posIter), vec(NULL), status(_status), fCategory(UFIELD_CATEGORY_UNDEFINED) {
+ : iter(posIter), vec(nullptr), status(_status), fCategory(UFIELD_CATEGORY_UNDEFINED) {
if (iter && U_SUCCESS(status)) {
vec = new UVector32(status);
}
@@ -85,7 +85,7 @@ FieldPositionIteratorHandler::~FieldPositionIteratorHandler() {
iter->setData(vec, status);
}
// if iter is null, we never allocated vec, so no need to free it
- vec = NULL;
+ vec = nullptr;
}
void
@@ -116,7 +116,7 @@ FieldPositionIteratorHandler::shiftLast(int32_t delta) {
}
UBool
-FieldPositionIteratorHandler::isRecording(void) const {
+FieldPositionIteratorHandler::isRecording() const {
return U_SUCCESS(status);
}
diff --git a/contrib/libs/icu/i18n/fphdlimp.h b/contrib/libs/icu/i18n/fphdlimp.h
index 4fb0c7b6fe6..ad09c6c9036 100644
--- a/contrib/libs/icu/i18n/fphdlimp.h
+++ b/contrib/libs/icu/i18n/fphdlimp.h
@@ -31,7 +31,7 @@ class U_I18N_API FieldPositionHandler: public UMemory {
virtual ~FieldPositionHandler();
virtual void addAttribute(int32_t id, int32_t start, int32_t limit) = 0;
virtual void shiftLast(int32_t delta) = 0;
- virtual UBool isRecording(void) const = 0;
+ virtual UBool isRecording() const = 0;
void setShift(int32_t delta);
};
@@ -48,9 +48,9 @@ class FieldPositionOnlyHandler : public FieldPositionHandler {
FieldPositionOnlyHandler(FieldPosition& pos);
virtual ~FieldPositionOnlyHandler();
- void addAttribute(int32_t id, int32_t start, int32_t limit) U_OVERRIDE;
- void shiftLast(int32_t delta) U_OVERRIDE;
- UBool isRecording(void) const U_OVERRIDE;
+ void addAttribute(int32_t id, int32_t start, int32_t limit) override;
+ void shiftLast(int32_t delta) override;
+ UBool isRecording() const override;
/**
* Enable this option to lock in the FieldPosition value after seeing the
@@ -65,7 +65,7 @@ class FieldPositionOnlyHandler : public FieldPositionHandler {
// exported as U_I18N_API for tests
class U_I18N_API FieldPositionIteratorHandler : public FieldPositionHandler {
- FieldPositionIterator* iter; // can be NULL
+ FieldPositionIterator* iter; // can be nullptr
UVector32* vec;
UErrorCode status;
UFieldCategory fCategory;
@@ -74,10 +74,10 @@ class U_I18N_API FieldPositionIteratorHandler : public FieldPositionHandler {
// to be destroyed before status goes out of scope. Easiest thing is to
// allocate us on the stack in the same (or narrower) scope as status has.
// This attempts to encourage that by blocking heap allocation.
- static void* U_EXPORT2 operator new(size_t) U_NOEXCEPT = delete;
- static void* U_EXPORT2 operator new[](size_t) U_NOEXCEPT = delete;
+ 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*) U_NOEXCEPT = delete;
+ static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete;
#endif
public:
@@ -86,9 +86,9 @@ class U_I18N_API FieldPositionIteratorHandler : public FieldPositionHandler {
FieldPositionIteratorHandler(UVector32* vec, UErrorCode& status);
~FieldPositionIteratorHandler();
- void addAttribute(int32_t id, int32_t start, int32_t limit) U_OVERRIDE;
- void shiftLast(int32_t delta) U_OVERRIDE;
- UBool isRecording(void) const U_OVERRIDE;
+ void addAttribute(int32_t id, int32_t start, int32_t limit) override;
+ void shiftLast(int32_t delta) override;
+ UBool isRecording() const override;
/** Copies a failed error code into _status. */
inline void getError(UErrorCode& _status) {
diff --git a/contrib/libs/icu/i18n/fpositer.cpp b/contrib/libs/icu/i18n/fpositer.cpp
index 096896d7b38..68f1edcc174 100644
--- a/contrib/libs/icu/i18n/fpositer.cpp
+++ b/contrib/libs/icu/i18n/fpositer.cpp
@@ -22,16 +22,16 @@ U_NAMESPACE_BEGIN
FieldPositionIterator::~FieldPositionIterator() {
delete data;
- data = NULL;
+ data = nullptr;
pos = -1;
}
FieldPositionIterator::FieldPositionIterator()
- : data(NULL), pos(-1) {
+ : data(nullptr), pos(-1) {
}
FieldPositionIterator::FieldPositionIterator(const FieldPositionIterator &rhs)
- : UObject(rhs), data(NULL), pos(rhs.pos) {
+ : UObject(rhs), data(nullptr), pos(rhs.pos) {
if (rhs.data) {
UErrorCode status = U_ZERO_ERROR;
@@ -39,7 +39,7 @@ FieldPositionIterator::FieldPositionIterator(const FieldPositionIterator &rhs)
data->assign(*rhs.data, status);
if (status != U_ZERO_ERROR) {
delete data;
- data = NULL;
+ data = nullptr;
pos = -1;
}
}
@@ -53,7 +53,7 @@ bool FieldPositionIterator::operator==(const FieldPositionIterator &rhs) const {
return false;
}
if (!data) {
- return rhs.data == NULL;
+ return rhs.data == nullptr;
}
return rhs.data ? data->operator==(*rhs.data) : false;
}
@@ -64,7 +64,7 @@ void FieldPositionIterator::setData(UVector32 *adopt, UErrorCode& status) {
if (adopt) {
if (adopt->size() == 0) {
delete adopt;
- adopt = NULL;
+ adopt = nullptr;
} else if ((adopt->size() % 4) != 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
} else {
@@ -87,12 +87,12 @@ void FieldPositionIterator::setData(UVector32 *adopt, UErrorCode& status) {
delete data;
data = adopt;
- pos = adopt == NULL ? -1 : 0;
+ pos = adopt == nullptr ? -1 : 0;
}
UBool FieldPositionIterator::next(FieldPosition& fp) {
if (pos == -1) {
- return FALSE;
+ return false;
}
// Ignore the first element of the tetrad: used for field category
@@ -105,7 +105,7 @@ UBool FieldPositionIterator::next(FieldPosition& fp) {
pos = -1;
}
- return TRUE;
+ return true;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/funcrepl.cpp b/contrib/libs/icu/i18n/funcrepl.cpp
index 7dd54ed8d2b..f093a1e4379 100644
--- a/contrib/libs/icu/i18n/funcrepl.cpp
+++ b/contrib/libs/icu/i18n/funcrepl.cpp
@@ -18,9 +18,9 @@
#include "unicode/uniset.h"
#include "funcrepl.h"
-static const UChar AMPERSAND = 38; // '&'
-static const UChar OPEN[] = {40,32,0}; // "( "
-static const UChar CLOSE[] = {32,41,0}; // " )"
+static const char16_t AMPERSAND = 38; // '&'
+static const char16_t OPEN[] = {40,32,0}; // "( "
+static const char16_t CLOSE[] = {32,41,0}; // " )"
U_NAMESPACE_BEGIN
diff --git a/contrib/libs/icu/i18n/gender.cpp b/contrib/libs/icu/i18n/gender.cpp
index dc5def6ad35..97d161de321 100644
--- a/contrib/libs/icu/i18n/gender.cpp
+++ b/contrib/libs/icu/i18n/gender.cpp
@@ -31,13 +31,13 @@
#include "umutex.h"
#include "uhash.h"
-static UHashtable* gGenderInfoCache = NULL;
+static UHashtable* gGenderInfoCache = nullptr;
static const char* gNeutralStr = "neutral";
static const char* gMailTaintsStr = "maleTaints";
static const char* gMixedNeutralStr = "mixedNeutral";
-static icu::GenderInfo* gObjs = NULL;
-static icu::UInitOnce gGenderInitOnce = U_INITONCE_INITIALIZER;
+static icu::GenderInfo* gObjs = nullptr;
+static icu::UInitOnce gGenderInitOnce {};
enum GenderStyle {
NEUTRAL,
@@ -48,14 +48,14 @@ enum GenderStyle {
U_CDECL_BEGIN
-static UBool U_CALLCONV gender_cleanup(void) {
- if (gGenderInfoCache != NULL) {
+static UBool U_CALLCONV gender_cleanup() {
+ if (gGenderInfoCache != nullptr) {
uhash_close(gGenderInfoCache);
- gGenderInfoCache = NULL;
+ gGenderInfoCache = nullptr;
delete [] gObjs;
}
gGenderInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -64,19 +64,19 @@ U_NAMESPACE_BEGIN
void U_CALLCONV GenderInfo_initCache(UErrorCode &status) {
ucln_i18n_registerCleanup(UCLN_I18N_GENDERINFO, gender_cleanup);
- U_ASSERT(gGenderInfoCache == NULL);
+ U_ASSERT(gGenderInfoCache == nullptr);
if (U_FAILURE(status)) {
return;
}
gObjs = new GenderInfo[GENDER_STYLE_LENGTH];
- if (gObjs == NULL) {
+ if (gObjs == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
for (int i = 0; i < GENDER_STYLE_LENGTH; i++) {
gObjs[i]._style = i;
}
- gGenderInfoCache = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
+ gGenderInfoCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &status);
if (U_FAILURE(status)) {
delete [] gObjs;
return;
@@ -95,11 +95,11 @@ const GenderInfo* GenderInfo::getInstance(const Locale& locale, UErrorCode& stat
// Make sure our cache exists.
umtx_initOnce(gGenderInitOnce, &GenderInfo_initCache, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
static UMutex gGenderMetaLock;
- const GenderInfo* result = NULL;
+ const GenderInfo* result = nullptr;
const char* key = locale.getName();
{
Mutex lock(&gGenderMetaLock);
@@ -112,7 +112,7 @@ const GenderInfo* GenderInfo::getInstance(const Locale& locale, UErrorCode& stat
// On cache miss, try to create GenderInfo from CLDR data
result = loadInstance(locale, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// Try to put our GenderInfo object in cache. If there is a race condition,
@@ -125,7 +125,7 @@ const GenderInfo* GenderInfo::getInstance(const Locale& locale, UErrorCode& stat
} else {
uhash_put(gGenderInfoCache, uprv_strdup(key), (void*) result, &status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
}
}
@@ -134,30 +134,30 @@ const GenderInfo* GenderInfo::getInstance(const Locale& locale, UErrorCode& stat
const GenderInfo* GenderInfo::loadInstance(const Locale& locale, UErrorCode& status) {
LocalUResourceBundlePointer rb(
- ures_openDirect(NULL, "genderList", &status));
+ ures_openDirect(nullptr, "genderList", &status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- LocalUResourceBundlePointer locRes(ures_getByKey(rb.getAlias(), "genderList", NULL, &status));
+ LocalUResourceBundlePointer locRes(ures_getByKey(rb.getAlias(), "genderList", nullptr, &status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
int32_t resLen = 0;
const char* curLocaleName = locale.getName();
UErrorCode key_status = U_ZERO_ERROR;
- const UChar* s = ures_getStringByKey(locRes.getAlias(), curLocaleName, &resLen, &key_status);
- if (s == NULL) {
+ 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 == NULL && uloc_getParent(parentLocaleName, parentLocaleName, ULOC_FULLNAME_CAPACITY, &key_status) > 0) {
+ while (s == nullptr && uloc_getParent(parentLocaleName, parentLocaleName, ULOC_FULLNAME_CAPACITY, &key_status) > 0) {
key_status = U_ZERO_ERROR;
resLen = 0;
s = ures_getStringByKey(locRes.getAlias(), parentLocaleName, &resLen, &key_status);
key_status = U_ZERO_ERROR;
}
}
- if (s == NULL) {
+ if (s == nullptr) {
return &gObjs[NEUTRAL];
}
char type_str[256] = "";
@@ -184,8 +184,8 @@ UGender GenderInfo::getListGender(const UGender* genders, int32_t length, UError
if (length == 1) {
return genders[0];
}
- UBool has_female = FALSE;
- UBool has_male = FALSE;
+ UBool has_female = false;
+ UBool has_male = false;
switch (_style) {
case NEUTRAL:
return UGENDER_OTHER;
@@ -199,13 +199,13 @@ UGender GenderInfo::getListGender(const UGender* genders, int32_t length, UError
if (has_male) {
return UGENDER_OTHER;
}
- has_female = TRUE;
+ has_female = true;
break;
case UGENDER_MALE:
if (has_female) {
return UGENDER_OTHER;
}
- has_male = TRUE;
+ has_male = true;
break;
default:
break;
diff --git a/contrib/libs/icu/i18n/gregocal.cpp b/contrib/libs/icu/i18n/gregocal.cpp
index 31d36300aeb..5fd71d496c8 100644
--- a/contrib/libs/icu/i18n/gregocal.cpp
+++ b/contrib/libs/icu/i18n/gregocal.cpp
@@ -101,6 +101,7 @@ static const int32_t kGregorianCalendarLimits[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH
+ { 0, 0, 11, 11}, // ORDINAL_MONTH
};
/*
@@ -155,7 +156,7 @@ GregorianCalendar::GregorianCalendar(UErrorCode& status)
: Calendar(status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
-fIsGregorian(TRUE), fInvertGregorian(FALSE)
+fIsGregorian(true), fInvertGregorian(false)
{
setTimeInMillis(getNow(), status);
}
@@ -166,7 +167,7 @@ GregorianCalendar::GregorianCalendar(TimeZone* zone, UErrorCode& status)
: Calendar(zone, Locale::getDefault(), status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
-fIsGregorian(TRUE), fInvertGregorian(FALSE)
+fIsGregorian(true), fInvertGregorian(false)
{
setTimeInMillis(getNow(), status);
}
@@ -177,7 +178,7 @@ GregorianCalendar::GregorianCalendar(const TimeZone& zone, UErrorCode& status)
: Calendar(zone, Locale::getDefault(), status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
-fIsGregorian(TRUE), fInvertGregorian(FALSE)
+fIsGregorian(true), fInvertGregorian(false)
{
setTimeInMillis(getNow(), status);
}
@@ -188,7 +189,7 @@ GregorianCalendar::GregorianCalendar(const Locale& aLocale, UErrorCode& status)
: Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
-fIsGregorian(TRUE), fInvertGregorian(FALSE)
+fIsGregorian(true), fInvertGregorian(false)
{
setTimeInMillis(getNow(), status);
}
@@ -200,7 +201,7 @@ GregorianCalendar::GregorianCalendar(TimeZone* zone, const Locale& aLocale,
: Calendar(zone, aLocale, status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
- fIsGregorian(TRUE), fInvertGregorian(FALSE)
+ fIsGregorian(true), fInvertGregorian(false)
{
setTimeInMillis(getNow(), status);
}
@@ -212,7 +213,7 @@ GregorianCalendar::GregorianCalendar(const TimeZone& zone, const Locale& aLocale
: Calendar(zone, aLocale, status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
- fIsGregorian(TRUE), fInvertGregorian(FALSE)
+ fIsGregorian(true), fInvertGregorian(false)
{
setTimeInMillis(getNow(), status);
}
@@ -224,7 +225,7 @@ GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date,
: Calendar(TimeZone::createDefault(), Locale::getDefault(), status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
- fIsGregorian(TRUE), fInvertGregorian(FALSE)
+ fIsGregorian(true), fInvertGregorian(false)
{
set(UCAL_ERA, AD);
set(UCAL_YEAR, year);
@@ -239,7 +240,7 @@ GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date,
: Calendar(TimeZone::createDefault(), Locale::getDefault(), status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
- fIsGregorian(TRUE), fInvertGregorian(FALSE)
+ fIsGregorian(true), fInvertGregorian(false)
{
set(UCAL_ERA, AD);
set(UCAL_YEAR, year);
@@ -257,7 +258,7 @@ GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date,
: Calendar(TimeZone::createDefault(), Locale::getDefault(), status),
fGregorianCutover(kPapalCutover),
fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582),
- fIsGregorian(TRUE), fInvertGregorian(FALSE)
+ fIsGregorian(true), fInvertGregorian(false)
{
set(UCAL_ERA, AD);
set(UCAL_YEAR, year);
@@ -349,7 +350,7 @@ GregorianCalendar::setGregorianChange(UDate date, UErrorCode& status)
// Normalize the year so BC values are represented as 0 and negative
// values.
GregorianCalendar *cal = new GregorianCalendar(getTimeZone(), status);
- /* test for NULL */
+ /* test for nullptr */
if (cal == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -388,7 +389,7 @@ void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& statu
// The Julian epoch day (not the same as Julian Day)
// is zero on Saturday December 30, 0 (Gregorian).
int32_t julianEpochDay = julianDay - (kJan1_1JulianDay - 2);
- eyear = (int32_t) ClockMath::floorDivide((4.0*julianEpochDay) + 1464.0, (int32_t) 1461, unusedRemainder);
+ eyear = (int32_t) ClockMath::floorDivide((4.0*julianEpochDay) + 1464.0, (int32_t) 1461, &unusedRemainder);
// Compute the Julian calendar day number for January 1, eyear
int32_t january1 = 365*(eyear-1) + ClockMath::floorDivide(eyear-1, (int32_t)4);
@@ -435,6 +436,7 @@ void GregorianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& statu
}
internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
internalSet(UCAL_DAY_OF_MONTH, dayOfMonth);
internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
internalSet(UCAL_EXTENDED_YEAR, eyear);
@@ -472,27 +474,27 @@ GregorianCalendar::isLeapYear(int32_t year) const
int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField)
{
- fInvertGregorian = FALSE;
+ fInvertGregorian = false;
int32_t jd = Calendar::handleComputeJulianDay(bestField);
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
+ fInvertGregorian = true; // So that the Julian Jan 1 will be used in handleComputeMonthStart
return Calendar::handleComputeJulianDay(bestField);
}
// The following check handles portions of the cutover year BEFORE the
// cutover itself happens.
- //if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
- if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
+ //if ((fIsGregorian==true) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
+ if ((fIsGregorian) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
#if defined (U_DEBUG_CAL)
fprintf(stderr, "%s:%d: jd [invert] %d\n",
__FILE__, __LINE__, jd);
#endif
- fInvertGregorian = TRUE;
+ fInvertGregorian = true;
jd = Calendar::handleComputeJulianDay(bestField);
#if defined (U_DEBUG_CAL)
fprintf(stderr, "%s:%d: fIsGregorian %s, fInvertGregorian %s - ",
@@ -537,7 +539,7 @@ int32_t GregorianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month,
// 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);
+ eyear += ClockMath::floorDivide(month, 12, &month);
}
UBool isLeap = eyear%4 == 0;
@@ -580,7 +582,7 @@ int32_t GregorianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t mo
// If the month is out of range, adjust it into range, and
// modify the extended year value accordingly.
if (month < 0 || month > 11) {
- extendedYear += ClockMath::floorDivide(month, 12, month);
+ extendedYear += ClockMath::floorDivide(month, 12, &month);
}
return isLeapYear(extendedYear) ? kLeapMonthLength[month] : kMonthLength[month];
@@ -633,7 +635,7 @@ GregorianCalendar::yearLength() const
void
GregorianCalendar::pinDayOfMonth()
{
- int32_t monthLen = monthLength(internalGet(UCAL_MONTH));
+ int32_t monthLen = monthLength(internalGetMonth());
int32_t dom = internalGet(UCAL_DATE);
if(dom > monthLen)
set(UCAL_DATE, monthLen);
@@ -651,7 +653,7 @@ GregorianCalendar::validateFields() const
field != UCAL_DAY_OF_YEAR &&
isSet((UCalendarDateFields)field) &&
! boundsCheck(internalGet((UCalendarDateFields)field), (UCalendarDateFields)field))
- return FALSE;
+ return false;
}
// Values differ in Least-Maximum and Maximum should be handled
@@ -659,15 +661,15 @@ GregorianCalendar::validateFields() const
if (isSet(UCAL_DATE)) {
int32_t date = internalGet(UCAL_DATE);
if (date < getMinimum(UCAL_DATE) ||
- date > monthLength(internalGet(UCAL_MONTH))) {
- return FALSE;
+ date > monthLength(internalGetMonth())) {
+ return false;
}
}
if (isSet(UCAL_DAY_OF_YEAR)) {
int32_t days = internalGet(UCAL_DAY_OF_YEAR);
if (days < 1 || days > yearLength()) {
- return FALSE;
+ return false;
}
}
@@ -675,10 +677,10 @@ GregorianCalendar::validateFields() const
// We've checked against minimum and maximum above already.
if (isSet(UCAL_DAY_OF_WEEK_IN_MONTH) &&
0 == internalGet(UCAL_DAY_OF_WEEK_IN_MONTH)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// -------------------------------------
@@ -821,14 +823,13 @@ GregorianCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) {
}
void
-GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status)
-{
+GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) UPRV_NO_SANITIZE_UNDEFINED {
if((amount == 0) || U_FAILURE(status)) {
return;
}
// J81 processing. (gregorian cutover)
- UBool inCutoverMonth = FALSE;
+ UBool inCutoverMonth = false;
int32_t cMonthLen=0; // 'c' for cutover; in days
int32_t cDayOfMonth=0; // no discontinuity: [0, cMonthLen)
double cMonthStart=0.0; // in ms
@@ -839,7 +840,7 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s
case UCAL_DAY_OF_MONTH:
case UCAL_WEEK_OF_MONTH:
{
- int32_t max = monthLength(internalGet(UCAL_MONTH));
+ int32_t max = monthLength(internalGetMonth());
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
@@ -849,7 +850,7 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s
// A month containing the cutover is 10 days shorter.
if ((cMonthStart < fGregorianCutover) &&
(cMonthStart + (cMonthLen=(max-10))*kOneDay >= fGregorianCutover)) {
- inCutoverMonth = TRUE;
+ inCutoverMonth = true;
}
}
break;
@@ -872,7 +873,7 @@ 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 (internalGet(UCAL_MONTH) == UCAL_JANUARY) {
+ if (internalGetMonth() == UCAL_JANUARY) {
if (woy >= 52) {
isoDoy += handleGetYearLength(isoYear);
}
@@ -1145,7 +1146,7 @@ int32_t GregorianCalendar::getActualMaximum(UCalendarDateFields field, UErrorCod
return 0;
}
- cal->setLenient(TRUE);
+ cal->setLenient(true);
int32_t era = cal->get(UCAL_ERA, status);
UDate d = cal->getTime(status);
@@ -1237,20 +1238,6 @@ int32_t GregorianCalendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy,
// -------------------------------------
-UBool
-GregorianCalendar::inDaylightTime(UErrorCode& status) const
-{
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime())
- return FALSE;
-
- // Force an update of the state of the Calendar.
- ((GregorianCalendar*)this)->complete(status); // cast away const
-
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
-}
-
-// -------------------------------------
-
/**
* Return the ERA. We need a special method for this because the
* default ERA is AD, but a zero (unset) ERA is BC.
@@ -1274,12 +1261,12 @@ GregorianCalendar::getType() const {
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
UBool GregorianCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
static void U_CALLCONV
diff --git a/contrib/libs/icu/i18n/gregoimp.cpp b/contrib/libs/icu/i18n/gregoimp.cpp
index 537aa19d8a4..31b5aeed835 100644
--- a/contrib/libs/icu/i18n/gregoimp.cpp
+++ b/contrib/libs/icu/i18n/gregoimp.cpp
@@ -33,28 +33,35 @@ int64_t ClockMath::floorDivide(int64_t numerator, int64_t denominator) {
}
int32_t ClockMath::floorDivide(double numerator, int32_t denominator,
- int32_t& remainder) {
- double quotient;
- quotient = uprv_floor(numerator / denominator);
- remainder = (int32_t) (numerator - (quotient * denominator));
+ int32_t* remainder) {
+ // For an integer n and representable ⌊x/n⌋, ⌊RN(x/n)⌋=⌊x/n⌋, where RN is
+ // rounding to nearest.
+ double quotient = uprv_floor(numerator / denominator);
+ if (remainder != nullptr) {
+ // For doubles x and n, where n is an integer and ⌊x+n⌋ < 2³¹, the
+ // expression `(int32_t) (x + n)` evaluated with rounding to nearest
+ // differs from ⌊x+n⌋ if 0 < ⌈x⌉−x ≪ x+n, as `x + n` is rounded up to
+ // 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;
}
double ClockMath::floorDivide(double dividend, double divisor,
- double& remainder) {
+ double* remainder) {
// Only designed to work for positive divisors
U_ASSERT(divisor > 0);
double quotient = floorDivide(dividend, divisor);
- remainder = dividend - (quotient * divisor);
+ double r = dividend - (quotient * divisor);
// N.B. For certain large dividends, on certain platforms, there
// is a bug such that the quotient is off by one. If you doubt
// this to be true, set a breakpoint below and run cintltst.
- if (remainder < 0 || remainder >= divisor) {
+ if (r < 0 || r >= divisor) {
// E.g. 6.7317038241449352e+022 / 86400000.0 is wrong on my
// machine (too high by one). 4.1792057231752762e+024 /
// 86400000.0 is wrong the other way (too low).
double q = quotient;
- quotient += (remainder < 0) ? -1 : +1;
+ quotient += (r < 0) ? -1 : +1;
if (q == quotient) {
// For quotients > ~2^53, we won't be able to add or
// subtract one, since the LSB of the mantissa will be >
@@ -65,12 +72,15 @@ double ClockMath::floorDivide(double dividend, double divisor,
// values give back an approximate answer rather than
// crashing. For example, UDate values above a ~10^25
// might all have a time of midnight.
- remainder = 0;
+ r = 0;
} else {
- remainder = dividend - (quotient * divisor);
+ r = dividend - (quotient * divisor);
}
}
- U_ASSERT(0 <= remainder && remainder < divisor);
+ U_ASSERT(0 <= r && r < divisor);
+ if (remainder != nullptr) {
+ *remainder = r;
+ }
return quotient;
}
@@ -106,10 +116,10 @@ void Grego::dayToFields(double day, int32_t& year, int32_t& month,
// representation. We use 400-year, 100-year, and 4-year cycles.
// For example, the 4-year cycle has 4 years + 1 leap day; giving
// 1461 == 365*4 + 1 days.
- int32_t n400 = ClockMath::floorDivide(day, 146097, doy); // 400-year cycle length
- int32_t n100 = ClockMath::floorDivide(doy, 36524, doy); // 100-year cycle length
- int32_t n4 = ClockMath::floorDivide(doy, 1461, doy); // 4-year cycle length
- int32_t n1 = ClockMath::floorDivide(doy, 365, doy);
+ int32_t n400 = ClockMath::floorDivide(day, 146097, &doy); // 400-year cycle length
+ int32_t n100 = ClockMath::floorDivide(doy, 36524, &doy); // 100-year cycle length
+ int32_t n4 = ClockMath::floorDivide(doy, 1461, &doy); // 4-year cycle length
+ int32_t n1 = ClockMath::floorDivide(doy, 365, &doy);
year = 400*n400 + 100*n100 + 4*n4 + n1;
if (n100 == 4 || n1 == 4) {
doy = 365; // Dec 31 at end of 4- or 400-year cycle
@@ -137,14 +147,14 @@ void Grego::dayToFields(double day, int32_t& year, int32_t& month,
void Grego::timeToFields(UDate time, int32_t& year, int32_t& month,
int32_t& dom, int32_t& dow, int32_t& doy, int32_t& mid) {
double millisInDay;
- double day = ClockMath::floorDivide((double)time, (double)U_MILLIS_PER_DAY, millisInDay);
+ double day = ClockMath::floorDivide((double)time, (double)U_MILLIS_PER_DAY, &millisInDay);
mid = (int32_t)millisInDay;
dayToFields(day, year, month, dom, dow, doy);
}
int32_t Grego::dayOfWeek(double day) {
int32_t dow;
- ClockMath::floorDivide(day + UCAL_THURSDAY, 7, 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 b1a5bc22c22..d65d6a4f88e 100644
--- a/contrib/libs/icu/i18n/gregoimp.h
+++ b/contrib/libs/icu/i18n/gregoimp.h
@@ -78,7 +78,7 @@ class ClockMath {
* @return the floor of the quotient
*/
static int32_t floorDivide(double numerator, int32_t denominator,
- int32_t& remainder);
+ int32_t* remainder);
/**
* For a positive divisor, return the quotient and remainder
@@ -91,7 +91,7 @@ class ClockMath {
* Calling with a divisor <= 0 is disallowed.
*/
static double floorDivide(double dividend, double divisor,
- double& remainder);
+ double* remainder);
};
// Useful millisecond constants
diff --git a/contrib/libs/icu/i18n/hebrwcal.cpp b/contrib/libs/icu/i18n/hebrwcal.cpp
index 4d8e59cef95..efd0d8fd4ac 100644
--- a/contrib/libs/icu/i18n/hebrwcal.cpp
+++ b/contrib/libs/icu/i18n/hebrwcal.cpp
@@ -20,10 +20,11 @@
#if !UCONFIG_NO_FORMATTING
#include "cmemory.h"
+#include "cstring.h"
#include "umutex.h"
#include <float.h>
-#include "gregoimp.h" // Math
-#include "astro.h" // CalendarAstronomer
+#include "gregoimp.h" // ClockMath
+#include "astro.h" // CalendarCache
#include "uhash.h"
#include "ucln_in.h"
@@ -63,6 +64,7 @@ static const int32_t LIMITS[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH
+ { 0, 0, 11, 12}, // ORDINAL_MONTH
};
/**
@@ -134,13 +136,13 @@ static const int16_t LEAP_MONTH_START[][3] = {
{ 383, 384, 385 }, // Elul
};
-static icu::CalendarCache *gCache = NULL;
+static icu::CalendarCache *gCache = nullptr;
U_CDECL_BEGIN
-static UBool calendar_hebrew_cleanup(void) {
+static UBool calendar_hebrew_cleanup() {
delete gCache;
- gCache = NULL;
- return TRUE;
+ gCache = nullptr;
+ return true;
}
U_CDECL_END
@@ -217,7 +219,8 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode&
return;
}
switch (field) {
- case UCAL_MONTH:
+ case UCAL_MONTH:
+ case UCAL_ORDINAL_MONTH:
{
// We can't just do a set(MONTH, get(MONTH) + amount). The
// reason is ADAR_1. Suppose amount is +2 and we land in
@@ -239,7 +242,7 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode&
}
month -= ELUL+1;
++year;
- acrossAdar1 = TRUE;
+ acrossAdar1 = true;
}
} else {
acrossAdar1 = (month > ADAR_1); // started after ADAR_1?
@@ -253,7 +256,7 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode&
}
month += ELUL+1;
--year;
- acrossAdar1 = TRUE;
+ acrossAdar1 = true;
}
}
set(UCAL_MONTH, month);
@@ -315,6 +318,7 @@ void HebrewCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode&
}
switch (field) {
case UCAL_MONTH:
+ case UCAL_ORDINAL_MONTH:
{
int32_t month = get(UCAL_MONTH, status);
int32_t year = get(UCAL_YEAR, status);
@@ -534,7 +538,8 @@ int32_t HebrewCalendar::handleGetYearLength(int32_t eyear) const {
}
void HebrewCalendar::validateField(UCalendarDateFields field, UErrorCode &status) {
- if (field == UCAL_MONTH && !isLeapYear(handleGetExtendedYear()) && internalGet(UCAL_MONTH) == ADAR_1) {
+ if ((field == UCAL_MONTH || field == UCAL_ORDINAL_MONTH)
+ && !isLeapYear(handleGetExtendedYear()) && internalGetMonth() == ADAR_1) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -607,6 +612,11 @@ void HebrewCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status)
internalSet(UCAL_ERA, 0);
internalSet(UCAL_YEAR, year);
internalSet(UCAL_EXTENDED_YEAR, year);
+ int32_t ordinal_month = month;
+ if (!isLeap && ordinal_month > ADAR_1) {
+ ordinal_month--;
+ }
+ internalSet(UCAL_ORDINAL_MONTH, ordinal_month);
internalSet(UCAL_MONTH, month);
internalSet(UCAL_DAY_OF_MONTH, dayOfMonth);
internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
@@ -666,17 +676,21 @@ int32_t HebrewCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UB
return (int) (day + 347997);
}
-UBool
-HebrewCalendar::inDaylightTime(UErrorCode& status) const
-{
- // copied from GregorianCalendar
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime())
- return FALSE;
+constexpr uint32_t kHebrewRelatedYearDiff = -3760;
- // Force an update of the state of the Calendar.
- ((HebrewCalendar*)this)->complete(status); // cast away const
+int32_t HebrewCalendar::getRelatedYear(UErrorCode &status) const
+{
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return year + kHebrewRelatedYearDiff;
+}
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
+void HebrewCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kHebrewRelatedYearDiff);
}
/**
@@ -686,11 +700,11 @@ HebrewCalendar::inDaylightTime(UErrorCode& status) const
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
UBool HebrewCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
static void U_CALLCONV initializeSystemDefaultCentury()
@@ -724,6 +738,49 @@ int32_t HebrewCalendar::defaultCenturyStartYear() const {
return gSystemDefaultCenturyStartYear;
}
+bool HebrewCalendar::inTemporalLeapYear(UErrorCode& status) const {
+ if (U_FAILURE(status)) return false;
+ int32_t eyear = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) return false;
+ return isLeapYear(eyear);
+}
+
+static const char * const gTemporalMonthCodesForHebrew[] = {
+ "M01", "M02", "M03", "M04", "M05", "M05L", "M06",
+ "M07", "M08", "M09", "M10", "M11", "M12", nullptr
+};
+
+const char* HebrewCalendar::getTemporalMonthCode(UErrorCode& status) const {
+ int32_t month = get(UCAL_MONTH, status);
+ if (U_FAILURE(status)) return nullptr;
+ return gTemporalMonthCodesForHebrew[month];
+}
+
+void HebrewCalendar::setTemporalMonthCode(const char* code, UErrorCode& status )
+{
+ 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++) {
+ if (uprv_strcmp(code, gTemporalMonthCodesForHebrew[m]) == 0) {
+ set(UCAL_MONTH, m);
+ return;
+ }
+ }
+ }
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+}
+
+int32_t HebrewCalendar::internalGetMonth() const {
+ 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);
+ }
+ return Calendar::internalGetMonth();
+}
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HebrewCalendar)
diff --git a/contrib/libs/icu/i18n/hebrwcal.h b/contrib/libs/icu/i18n/hebrwcal.h
index ae4401832d4..829a642211a 100644
--- a/contrib/libs/icu/i18n/hebrwcal.h
+++ b/contrib/libs/icu/i18n/hebrwcal.h
@@ -88,7 +88,7 @@ public:
* Useful constants for HebrewCalendar.
* @internal
*/
- enum EEras {
+ enum Month {
/**
* Constant for Tishri, the 1st month of the Hebrew year.
*/
@@ -181,13 +181,6 @@ public:
HebrewCalendar(const HebrewCalendar& source);
/**
- * Default assignment operator
- * @param right the object to be copied.
- * @internal
- */
- HebrewCalendar& operator=(const HebrewCalendar& right);
-
- /**
* Create and return a polymorphic copy of this calendar.
* @return return a polymorphic copy of this calendar.
* @internal
@@ -205,7 +198,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -218,7 +211,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- static UClassID U_EXPORT2 getStaticClassID(void);
+ static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "hebrew".
@@ -280,6 +273,20 @@ public:
*/
static UBool isLeapYear(int32_t year) ;
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
+
+ /**
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual void setRelatedYear(int32_t year) override;
+
protected:
/**
@@ -373,18 +380,6 @@ public:
virtual void validateField(UCalendarDateFields field, UErrorCode &status) override;
protected:
-
- /**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
- *
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
- * @internal
- */
- virtual UBool inDaylightTime(UErrorCode& status) const override;
-
/**
* Returns true because the Hebrew Calendar does have a default century
* @internal
@@ -404,6 +399,51 @@ public:
*/
virtual int32_t defaultCenturyStartYear() const override;
+ public:
+ /**
+ * Returns true if the date is in a leap year.
+ *
+ * @param status ICU Error Code
+ * @return True if the date in the fields is in a Temporal proposal
+ * defined leap year. False otherwise.
+ */
+ virtual bool inTemporalLeapYear(UErrorCode& status) const override;
+
+ /**
+ * Gets The Temporal monthCode value corresponding to the month for the date.
+ * The value is a string identifier that starts with the literal grapheme
+ * "M" followed by two graphemes representing the zero-padded month number
+ * of the current month in a normal (non-leap) year and suffixed by an
+ * optional literal grapheme "L" if this is a leap month in a lunisolar
+ * calendar. For the Hebrew calendar, the values are "M01" .. "M12" for
+ * non-leap year, and "M01" .. "M05", "M05L", "M06" .. "M12" for leap year.
+ *
+ * @param status ICU Error Code
+ * @return One of 13 possible strings in {"M01".. "M05", "M05L",
+ * "M06" .. "M12"}.
+ * @draft ICU 73
+ */
+ virtual const char* getTemporalMonthCode(UErrorCode& status) const override;
+
+ /**
+ * Sets The Temporal monthCode which is a string identifier that starts
+ * with the literal grapheme "M" followed by two graphemes representing
+ * the zero-padded month number of the current month in a normal
+ * (non-leap) year and suffixed by an optional literal grapheme "L" if this
+ * is a leap month in a lunisolar calendar. For Hebrew calendar, the values
+ * are "M01" .. "M12" for non-leap years, and "M01" .. "M05", "M05L", "M06"
+ * .. "M12" for leap year.
+ *
+ * @param temporalMonth The value to be set for temporal monthCode.
+ * @param status ICU Error Code
+ *
+ * @draft ICU 73
+ */
+ virtual void setTemporalMonthCode(const char* code, UErrorCode& status ) override;
+
+ protected:
+ virtual int32_t internalGetMonth() const override;
+
private: // Calendar-specific implementation
/**
* Finds the day # of the first day in the given Hebrew year.
diff --git a/contrib/libs/icu/i18n/indiancal.cpp b/contrib/libs/icu/i18n/indiancal.cpp
index 7bba7f50920..29c2749f48c 100644
--- a/contrib/libs/icu/i18n/indiancal.cpp
+++ b/contrib/libs/icu/i18n/indiancal.cpp
@@ -16,7 +16,6 @@
#include "mutex.h"
#include <float.h>
#include "gregoimp.h" // Math
-#include "astro.h" // CalendarAstronomer
#include "uhash.h"
// Debugging
@@ -81,6 +80,7 @@ static const int32_t LIMITS[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH
+ { 0, 0, 11, 11}, // ORDINAL_MONTH
};
static const int32_t INDIAN_ERA_START = 78;
@@ -110,7 +110,7 @@ static UBool isGregorianLeap(int32_t year)
*/
int32_t IndianCalendar::handleGetMonthLength(int32_t eyear, int32_t month) const {
if (month < 0 || month > 11) {
- eyear += ClockMath::floorDivide(month, 12, month);
+ eyear += ClockMath::floorDivide(month, 12, &month);
}
if (isGregorianLeap(eyear + INDIAN_ERA_START) && month == 0) {
@@ -210,7 +210,7 @@ int32_t IndianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UB
// 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);
+ eyear += (int32_t)ClockMath::floorDivide(month, 12, &month);
}
if(month == 12){
@@ -294,24 +294,27 @@ void IndianCalendar::handleComputeFields(int32_t julianDay, UErrorCode& /* stat
internalSet(UCAL_EXTENDED_YEAR, IndianYear);
internalSet(UCAL_YEAR, IndianYear);
internalSet(UCAL_MONTH, IndianMonth);
+ internalSet(UCAL_ORDINAL_MONTH, IndianMonth);
internalSet(UCAL_DAY_OF_MONTH, IndianDayOfMonth);
internalSet(UCAL_DAY_OF_YEAR, yday + 1); // yday is 0-based
}
-UBool
-IndianCalendar::inDaylightTime(UErrorCode& status) const
+constexpr uint32_t kIndianRelatedYearDiff = 79;
+
+int32_t IndianCalendar::getRelatedYear(UErrorCode &status) const
{
- // copied from GregorianCalendar
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) {
- return FALSE;
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
}
-
- // Force an update of the state of the Calendar.
- ((IndianCalendar*)this)->complete(status); // cast away const
-
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
+ return year + kIndianRelatedYearDiff;
}
+void IndianCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kIndianRelatedYearDiff);
+}
/**
* The system maintains a static default century start date and Year. They are
@@ -320,12 +323,12 @@ IndianCalendar::inDaylightTime(UErrorCode& status) const
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
UBool IndianCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
static void U_CALLCONV
diff --git a/contrib/libs/icu/i18n/indiancal.h b/contrib/libs/icu/i18n/indiancal.h
index 029515cf547..5ef9113a85a 100644
--- a/contrib/libs/icu/i18n/indiancal.h
+++ b/contrib/libs/icu/i18n/indiancal.h
@@ -261,7 +261,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -274,7 +274,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- static UClassID U_EXPORT2 getStaticClassID(void);
+ static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "indian".
@@ -284,24 +284,26 @@ public:
*/
virtual const char * getType() const override;
-private:
- IndianCalendar(); // default constructor not implemented
-
- // Default century.
-protected:
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
- *
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
* @internal
*/
- virtual UBool inDaylightTime(UErrorCode& status) const override;
+ virtual void setRelatedYear(int32_t year) override;
+
+private:
+ IndianCalendar() = delete; // default constructor not implemented
+ // Default century.
+protected:
/**
* Returns true because the Indian Calendar does have a default century
* @internal
diff --git a/contrib/libs/icu/i18n/inputext.cpp b/contrib/libs/icu/i18n/inputext.cpp
index fa4939e8f4f..bce9862c0fe 100644
--- a/contrib/libs/icu/i18n/inputext.cpp
+++ b/contrib/libs/icu/i18n/inputext.cpp
@@ -34,7 +34,7 @@ InputText::InputText(UErrorCode &status)
fRawInput(0),
fRawLength(0)
{
- if (fInputBytes == NULL || fByteStats == NULL) {
+ if (fInputBytes == nullptr || fByteStats == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -49,7 +49,7 @@ InputText::~InputText()
void InputText::setText(const char *in, int32_t len)
{
fInputLen = 0;
- fC1Bytes = FALSE;
+ fC1Bytes = false;
fRawInput = (const uint8_t *) in;
fRawLength = len == -1? (int32_t)uprv_strlen(in) : len;
}
@@ -70,7 +70,7 @@ void InputText::setDeclaredEncoding(const char* encoding, int32_t len)
UBool InputText::isSet() const
{
- return fRawInput != NULL;
+ return fRawInput != nullptr;
}
/**
@@ -83,7 +83,7 @@ void InputText::MungeInput(UBool fStripTags) {
int srci = 0;
int dsti = 0;
uint8_t b;
- bool inMarkup = FALSE;
+ bool inMarkup = false;
int32_t openTags = 0;
int32_t badTags = 0;
@@ -103,7 +103,7 @@ void InputText::MungeInput(UBool fStripTags) {
badTags += 1;
}
- inMarkup = TRUE;
+ inMarkup = true;
openTags += 1;
}
@@ -112,7 +112,7 @@ void InputText::MungeInput(UBool fStripTags) {
}
if (b == (uint8_t)0x3E) { /* Check for the ASCII '>' */
- inMarkup = FALSE;
+ inMarkup = false;
}
}
@@ -153,7 +153,7 @@ void InputText::MungeInput(UBool fStripTags) {
for (int32_t i = 0x80; i <= 0x9F; i += 1) {
if (fByteStats[i] != 0) {
- fC1Bytes = TRUE;
+ fC1Bytes = true;
break;
}
}
diff --git a/contrib/libs/icu/i18n/islamcal.cpp b/contrib/libs/icu/i18n/islamcal.cpp
index de37e6b9398..c21530a736e 100644
--- a/contrib/libs/icu/i18n/islamcal.cpp
+++ b/contrib/libs/icu/i18n/islamcal.cpp
@@ -54,20 +54,20 @@ static void debug_islamcal_msg(const char *pat, ...)
// --- The cache --
// cache of months
-static icu::CalendarCache *gMonthCache = NULL;
-static icu::CalendarAstronomer *gIslamicCalendarAstro = NULL;
+static icu::CalendarCache *gMonthCache = nullptr;
+static icu::CalendarAstronomer *gIslamicCalendarAstro = nullptr;
U_CDECL_BEGIN
-static UBool calendar_islamic_cleanup(void) {
+static UBool calendar_islamic_cleanup() {
if (gMonthCache) {
delete gMonthCache;
- gMonthCache = NULL;
+ gMonthCache = nullptr;
}
if (gIslamicCalendarAstro) {
delete gIslamicCalendarAstro;
- gIslamicCalendarAstro = NULL;
+ gIslamicCalendarAstro = nullptr;
}
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -206,67 +206,22 @@ int32_t getUmalqura_MonthLength(int32_t y, int32_t m) {
//-------------------------------------------------------------------------
const char *IslamicCalendar::getType() const {
- const char *sType = NULL;
-
- switch (cType) {
- case CIVIL:
- sType = "islamic-civil";
- break;
- case ASTRONOMICAL:
- sType = "islamic";
- break;
- case TBLA:
- sType = "islamic-tbla";
- break;
- case UMALQURA:
- sType = "islamic-umalqura";
- break;
- default:
- UPRV_UNREACHABLE_EXIT; // out of range
- }
- return sType;
+ return "islamic";
}
IslamicCalendar* IslamicCalendar::clone() const {
return new IslamicCalendar(*this);
}
-IslamicCalendar::IslamicCalendar(const Locale& aLocale, UErrorCode& success, ECalculationType type)
-: Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success),
-cType(type)
+IslamicCalendar::IslamicCalendar(const Locale& aLocale, UErrorCode& success)
+: Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success)
{
setTimeInMillis(getNow(), success); // Call this again now that the vtable is set up properly.
}
-IslamicCalendar::IslamicCalendar(const IslamicCalendar& other) : Calendar(other), cType(other.cType) {
-}
-
IslamicCalendar::~IslamicCalendar()
{
}
-
-void IslamicCalendar::setCalculationType(ECalculationType type, UErrorCode &status)
-{
- if (cType != type) {
- // The fields of the calendar will become invalid, because the calendar
- // rules are different
- UDate m = getTimeInMillis(status);
- cType = type;
- clear();
- setTimeInMillis(m, status);
- }
-}
-
-/**
-* Returns <code>true</code> if this object is using the fixed-cycle civil
-* calendar, or <code>false</code> if using the religious, astronomical
-* calendar.
-* @draft ICU 2.4
-*/
-UBool IslamicCalendar::isCivil() {
- return (cType == CIVIL);
-}
-
//-------------------------------------------------------------------------
// Minimum / Maximum access functions
//-------------------------------------------------------------------------
@@ -304,6 +259,7 @@ static const int32_t LIMITS[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH
+ { 0, 0, 11, 11}, // ORDINAL_MONTH
};
/**
@@ -365,19 +321,7 @@ UBool IslamicCalendar::civilLeapYear(int32_t year)
* from the Hijri epoch, origin 0.
*/
int32_t IslamicCalendar::yearStart(int32_t year) const{
- if (cType == CIVIL || cType == TBLA ||
- (cType == UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END)))
- {
- return (year-1)*354 + ClockMath::floorDivide((3+11*(int64_t)year),(int64_t)30);
- } else if(cType==ASTRONOMICAL){
- return trueMonthStart(12*(year-1));
- } else {
- year -= UMALQURA_YEAR_START;
- // rounded least-squares fit of the dates previously calculated from UMALQURA_MONTHLENGTH iteration
- int32_t yrStartLinearEstimate = (int32_t)((354.36720 * (double)year) + 460322.05 + 0.5);
- // need a slight correction to some
- return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year];
- }
+ return trueMonthStart(12*(year-1));
}
/**
@@ -388,19 +332,7 @@ int32_t IslamicCalendar::yearStart(int32_t year) const{
* @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 {
- if (cType == CIVIL || cType == TBLA) {
- // This does not handle months out of the range 0..11
- return (int32_t)uprv_ceil(29.5*month)
- + (year-1)*354 + (int32_t)ClockMath::floorDivide((3+11*(int64_t)year),(int64_t)30);
- } else if(cType==ASTRONOMICAL){
- return trueMonthStart(12*(year-1) + month);
- } else {
- int32_t ms = yearStart(year);
- for(int i=0; i< month; i++){
- ms+= handleGetMonthLength(year, i);
- }
- return ms;
- }
+ return trueMonthStart(12*(year-1) + month);
}
/**
@@ -473,9 +405,9 @@ double IslamicCalendar::moonAge(UDate time, UErrorCode &status)
static UMutex astroLock; // pod bay door lock
umtx_lock(&astroLock);
- if(gIslamicCalendarAstro == NULL) {
+ if(gIslamicCalendarAstro == nullptr) {
gIslamicCalendarAstro = new CalendarAstronomer();
- if (gIslamicCalendarAstro == NULL) {
+ if (gIslamicCalendarAstro == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return age;
}
@@ -506,22 +438,8 @@ double IslamicCalendar::moonAge(UDate time, UErrorCode &status)
* @draft ICU 2.4
*/
int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const {
-
- int32_t length = 0;
-
- if (cType == CIVIL || cType == TBLA ||
- (cType == UMALQURA && (extendedYear<UMALQURA_YEAR_START || extendedYear>UMALQURA_YEAR_END)) ) {
- length = 29 + (month+1) % 2;
- if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) {
- length++;
- }
- } else if(cType == ASTRONOMICAL){
- month = 12*(extendedYear-1) + month;
- length = trueMonthStart(month+1) - trueMonthStart(month) ;
- } else {
- length = getUmalqura_MonthLength(extendedYear - UMALQURA_YEAR_START, month);
- }
- return length;
+ month = 12*(extendedYear-1) + month;
+ return trueMonthStart(month+1) - trueMonthStart(month) ;
}
/**
@@ -529,19 +447,8 @@ int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t mont
* @draft ICU 2.4
*/
int32_t IslamicCalendar::handleGetYearLength(int32_t extendedYear) const {
- if (cType == CIVIL || cType == TBLA ||
- (cType == UMALQURA && (extendedYear<UMALQURA_YEAR_START || extendedYear>UMALQURA_YEAR_END)) ) {
- return 354 + (civilLeapYear(extendedYear) ? 1 : 0);
- } else if(cType == ASTRONOMICAL){
- int32_t month = 12*(extendedYear-1);
- return (trueMonthStart(month + 12) - trueMonthStart(month));
- } else {
- int len = 0;
- for(int i=0; i<12; i++) {
- len += handleGetMonthLength(extendedYear, i);
- }
- return len;
- }
+ int32_t month = 12*(extendedYear-1);
+ return (trueMonthStart(month + 12) - trueMonthStart(month));
}
//-------------------------------------------------------------------------
@@ -567,8 +474,8 @@ int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U
eyear += (month / 12) - 1;
month = (month % 12) + 11;
}
- return monthStart(eyear, month) + ((cType == TBLA)? ASTRONOMICAL_EPOC: CIVIL_EPOC) - 1;
-}
+ return monthStart(eyear, month) + getEpoc() - 1;
+}
//-------------------------------------------------------------------------
// Functions for converting from milliseconds to field values
@@ -604,105 +511,97 @@ int32_t IslamicCalendar::handleGetExtendedYear() {
* @draft ICU 2.4
*/
void IslamicCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) {
- int32_t year, month, dayOfMonth, dayOfYear;
- int32_t startDate;
- int32_t days = julianDay - CIVIL_EPOC;
+ if (U_FAILURE(status)) return;
+ int32_t days = julianDay - getEpoc();
- if (cType == CIVIL || cType == TBLA) {
- if(cType == TBLA) {
- days = julianDay - ASTRONOMICAL_EPOC;
- }
- // Use the civil calendar approximation, which is just arithmetic
- year = (int32_t)ClockMath::floorDivide(30 * (int64_t)days + 10646, (int64_t)10631);
- month = (int32_t)uprv_ceil((days - 29 - yearStart(year)) / 29.5 );
- month = month<11?month:11;
- startDate = monthStart(year, month);
- } else if(cType == ASTRONOMICAL){
- // Guess at the number of elapsed full months since the epoch
- int32_t months = (int32_t)uprv_floor((double)days / CalendarAstronomer::SYNODIC_MONTH);
+ // Guess at the number of elapsed full months since the epoch
+ int32_t month = (int32_t)uprv_floor((double)days / CalendarAstronomer::SYNODIC_MONTH);
- startDate = (int32_t)uprv_floor(months * CalendarAstronomer::SYNODIC_MONTH);
+ 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;
- }
- if ( days - startDate >= 25 && age > 0) {
- // If we're near the end of the month, assume next month and search backwards
- months++;
- }
-
- // Find out the last time that the new moon was actually visible at this longitude
- // This returns midnight the night that the moon was visible at sunset.
- while ((startDate = trueMonthStart(months)) > days) {
- // If it was after the date in question, back up a month and try again
- months--;
- }
+ double age = moonAge(internalGetTime(), status);
+ if (U_FAILURE(status)) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ if ( days - startDate >= 25 && age > 0) {
+ // If we're near the end of the month, assume next month and search backwards
+ month++;
+ }
- year = months >= 0 ? ((months / 12) + 1) : ((months + 1 ) / 12);
- month = ((months % 12) + 12 ) % 12;
- } else if(cType == UMALQURA) {
- 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;
- startDate = monthStart(year, month);
- }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;
- }else if(d < handleGetYearLength(y) ){
- int monthLen = handleGetMonthLength(y, m);
- m=0;
- while(d > monthLen){
- d -= monthLen;
- m++;
- monthLen = handleGetMonthLength(y, m);
- }
- break;
- }
- }
- year = y;
- month = m;
- }
- } else { // invalid 'civil'
- UPRV_UNREACHABLE_EXIT; // should not get here, out of range
+ // Find out the last time that the new moon was actually visible at this longitude
+ // This returns midnight the night that the moon was visible at sunset.
+ while ((startDate = trueMonthStart(month)) > days) {
+ // If it was after the date in question, back up a month and try again
+ month--;
}
- dayOfMonth = (days - monthStart(year, month)) + 1;
+ int32_t year = month >= 0 ? ((month / 12) + 1) : ((month + 1 ) / 12);
+ month = ((month % 12) + 12 ) % 12;
+ int32_t dayOfMonth = (days - monthStart(year, month)) + 1;
// Now figure out the day of the year.
- dayOfYear = (days - monthStart(year, 0)) + 1;
-
+ int32_t dayOfYear = (days - monthStart(year, 0)) + 1;
internalSet(UCAL_ERA, 0);
internalSet(UCAL_YEAR, year);
internalSet(UCAL_EXTENDED_YEAR, year);
internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
internalSet(UCAL_DAY_OF_MONTH, dayOfMonth);
- internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
-}
+ internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
+}
+
+int32_t IslamicCalendar::getEpoc() const {
+ return CIVIL_EPOC;
+}
-UBool
-IslamicCalendar::inDaylightTime(UErrorCode& status) const
+static int32_t gregoYearFromIslamicStart(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)
+ int cycle, offset, shift = 0;
+ if (year >= 1397) {
+ cycle = (year - 1397) / 67;
+ offset = (year - 1397) % 67;
+ shift = 2*cycle + ((offset >= 33)? 1: 0);
+ } else {
+ cycle = (year - 1396) / 67 - 1;
+ offset = -(year - 1396) % 67;
+ shift = 2*cycle + ((offset <= 33)? 1: 0);
+ }
+ return year + 579 - shift;
+}
+
+int32_t IslamicCalendar::getRelatedYear(UErrorCode &status) const
{
- // copied from GregorianCalendar
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime())
- return FALSE;
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return gregoYearFromIslamicStart(year);
+}
- // Force an update of the state of the Calendar.
- ((IslamicCalendar*)this)->complete(status); // cast away const
+static int32_t firstIslamicStartYearFromGrego(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)
+ int cycle, offset, shift = 0;
+ if (year >= 1977) {
+ cycle = (year - 1977) / 65;
+ offset = (year - 1977) % 65;
+ shift = 2*cycle + ((offset >= 32)? 1: 0);
+ } else {
+ cycle = (year - 1976) / 65 - 1;
+ offset = -(year - 1976) % 65;
+ shift = 2*cycle + ((offset <= 32)? 1: 0);
+ }
+ return year - 579 + shift;
+}
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
+void IslamicCalendar::setRelatedYear(int32_t year)
+{
+ set(UCAL_EXTENDED_YEAR, firstIslamicStartYearFromGrego(year));
}
/**
@@ -712,12 +611,12 @@ IslamicCalendar::inDaylightTime(UErrorCode& status) const
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
UBool IslamicCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
UDate IslamicCalendar::defaultCenturyStart() const
@@ -734,6 +633,14 @@ int32_t IslamicCalendar::defaultCenturyStartYear() const
return gSystemDefaultCenturyStartYear;
}
+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()
@@ -754,9 +661,317 @@ IslamicCalendar::initializeSystemDefaultCentury()
// out.
}
+/*****************************************************************************
+ * IslamicCivilCalendar
+ *****************************************************************************/
+IslamicCivilCalendar::IslamicCivilCalendar(const Locale& aLocale, UErrorCode& success)
+ : IslamicCalendar(aLocale, success)
+{
+}
+
+IslamicCivilCalendar::~IslamicCivilCalendar()
+{
+}
+
+const char *IslamicCivilCalendar::getType() const {
+ return "islamic-civil";
+}
+
+IslamicCivilCalendar* IslamicCivilCalendar::clone() const {
+ return new IslamicCivilCalendar(*this);
+}
+
+/**
+* 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)));
+}
+
+/**
+* Return the day # on which the given month starts. Days are counted
+* from the Hijri epoch, origin 0.
+*
+* @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 {
+ // 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 the length (in days) of the given month.
+*
+* @param year The hijri year
+* @param year The hijri month, 0-based
+* @draft ICU 2.4
+*/
+int32_t IslamicCivilCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const {
+ int32_t length = 29 + (month+1) % 2;
+ if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) {
+ length++;
+ }
+ return length;
+}
+
+/**
+* Return the number of days in the given Islamic year
+* @draft ICU 2.4
+*/
+int32_t IslamicCivilCalendar::handleGetYearLength(int32_t extendedYear) const {
+ return 354 + (civilLeapYear(extendedYear) ? 1 : 0);
+}
+
+/**
+* Override Calendar to compute several fields specific to the Islamic
+* 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.
+* @draft ICU 2.4
+*/
+void IslamicCivilCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) {
+ if (U_FAILURE(status)) return;
+ 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)));
+ 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;
+
+ // Now figure out the day of the year.
+ int32_t dayOfYear = (days - monthStart(year, 0)) + 1;
+
+ internalSet(UCAL_ERA, 0);
+ internalSet(UCAL_YEAR, year);
+ internalSet(UCAL_EXTENDED_YEAR, year);
+ internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
+ internalSet(UCAL_DAY_OF_MONTH, dayOfMonth);
+ internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
+}
+/*****************************************************************************
+ * IslamicTBLACalendar
+ *****************************************************************************/
+IslamicTBLACalendar::IslamicTBLACalendar(const Locale& aLocale, UErrorCode& success)
+ : IslamicCivilCalendar(aLocale, success)
+{
+}
+
+IslamicTBLACalendar::~IslamicTBLACalendar()
+{
+}
+
+const char *IslamicTBLACalendar::getType() const {
+ return "islamic-tbla";
+}
+
+IslamicTBLACalendar* IslamicTBLACalendar::clone() const {
+ return new IslamicTBLACalendar(*this);
+}
+
+int32_t IslamicTBLACalendar::getEpoc() const {
+ return ASTRONOMICAL_EPOC;
+}
+
+/*****************************************************************************
+ * IslamicUmalquraCalendar
+ *****************************************************************************/
+IslamicUmalquraCalendar::IslamicUmalquraCalendar(const Locale& aLocale, UErrorCode& success)
+ : IslamicCalendar(aLocale, success)
+{
+}
+
+IslamicUmalquraCalendar::~IslamicUmalquraCalendar()
+{
+}
+const char *IslamicUmalquraCalendar::getType() const {
+ return "islamic-umalqura";
+}
+
+IslamicUmalquraCalendar* IslamicUmalquraCalendar::clone() const {
+ return new IslamicUmalquraCalendar(*this);
+}
+
+/**
+* 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 {
+ 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)));
+ }
+ year -= UMALQURA_YEAR_START;
+ // rounded least-squares fit of the dates previously calculated from UMALQURA_MONTHLENGTH iteration
+ int32_t yrStartLinearEstimate = static_cast<int32_t>(
+ (354.36720 * (double)year) + 460322.05 + 0.5);
+ // need a slight correction to some
+ return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year];
+}
+
+/**
+* Return the day # on which the given month starts. Days are counted
+* from the Hijri epoch, origin 0.
+*
+* @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);
+ for(int i=0; i< month; i++){
+ ms+= handleGetMonthLength(year, i);
+ }
+ return ms;
+}
+
+/**
+* Return the length (in days) of the given month.
+*
+* @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;
+ 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 getUmalqura_MonthLength(extendedYear - UMALQURA_YEAR_START, month);
+}
+
+/**
+* Return the number of days in the given Islamic year
+* @draft ICU 2.4
+*/
+int32_t IslamicUmalquraCalendar::handleGetYearLength(int32_t extendedYear) const {
+ if (extendedYear<UMALQURA_YEAR_START || extendedYear>UMALQURA_YEAR_END) {
+ return 354 + (civilLeapYear(extendedYear) ? 1 : 0);
+ }
+ int len = 0;
+ for(int i=0; i<12; i++) {
+ len += handleGetMonthLength(extendedYear, i);
+ }
+ return len;
+}
+
+/**
+* Override Calendar to compute several fields specific to the Islamic
+* 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.
+* @draft ICU 2.4
+*/
+void IslamicUmalquraCalendar::handleComputeFields(int32_t julianDay, UErrorCode &status) {
+ if (U_FAILURE(status)) return;
+ int32_t year, month, dayOfMonth, dayOfYear;
+ 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);
+ }
+ 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;
+
+ internalSet(UCAL_ERA, 0);
+ internalSet(UCAL_YEAR, year);
+ internalSet(UCAL_EXTENDED_YEAR, year);
+ internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
+ internalSet(UCAL_DAY_OF_MONTH, dayOfMonth);
+ internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
+}
+/*****************************************************************************
+ * IslamicRGSACalendar
+ *****************************************************************************/
+IslamicRGSACalendar::IslamicRGSACalendar(const Locale& aLocale, UErrorCode& success)
+ : IslamicCalendar(aLocale, success)
+{
+}
+
+IslamicRGSACalendar::~IslamicRGSACalendar()
+{
+}
+
+const char *IslamicRGSACalendar::getType() const {
+ return "islamic-rgsa";
+}
+
+IslamicRGSACalendar* IslamicRGSACalendar::clone() const {
+ return new IslamicRGSACalendar(*this);
+}
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IslamicCalendar)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IslamicCivilCalendar)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IslamicUmalquraCalendar)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IslamicTBLACalendar)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IslamicRGSACalendar)
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/islamcal.h b/contrib/libs/icu/i18n/islamcal.h
index a29b7daa086..8469269bccc 100644
--- a/contrib/libs/icu/i18n/islamcal.h
+++ b/contrib/libs/icu/i18n/islamcal.h
@@ -53,7 +53,8 @@ U_NAMESPACE_BEGIN
* every 30 years. This calendar is easily calculated and thus predictable in
* advance, so it is used as the civil calendar in a number of Arab countries.
* This is the default behavior of a newly-created <code>IslamicCalendar</code>
- * object.
+ * object. This calendar variant is implemented in the IslamicCivilCalendar
+ * class.
* <p>
* The Islamic <em>religious</em> calendar, however, is based on the <em>observation</em>
* of the crescent moon. It is thus affected by the position at which the
@@ -71,10 +72,6 @@ U_NAMESPACE_BEGIN
* calculations. At present, the approximations used in this class are fairly
* simplistic; they will be improved in later versions of the code.
* <p>
- * The {@link #setCivil setCivil} method determines
- * which approach is used to determine the start of a month. By default, the
- * fixed-cycle civil calendar is used. However, if <code>setCivil(false)</code>
- * is called, an approximation of the true lunar calendar will be used.
*
* @see GregorianCalendar
*
@@ -88,18 +85,6 @@ class U_I18N_API IslamicCalendar : public Calendar {
//-------------------------------------------------------------------------
// Constants...
//-------------------------------------------------------------------------
-
- /**
- * Calendar type - civil or religious or um alqura
- * @internal
- */
- enum ECalculationType {
- ASTRONOMICAL,
- CIVIL,
- UMALQURA,
- TBLA
- };
-
/**
* Constants for the months
* @internal
@@ -192,16 +177,15 @@ class U_I18N_API IslamicCalendar : public Calendar {
* @param aLocale The given locale.
* @param success Indicates the status of IslamicCalendar object construction.
* Returns U_ZERO_ERROR if constructed successfully.
- * @param type The Islamic calendar calculation type. The default value is CIVIL.
* @internal
*/
- IslamicCalendar(const Locale& aLocale, UErrorCode &success, ECalculationType type = CIVIL);
+ IslamicCalendar(const Locale& aLocale, UErrorCode &success);
/**
* Copy Constructor
* @internal
*/
- IslamicCalendar(const IslamicCalendar& other);
+ IslamicCalendar(const IslamicCalendar& other) = default;
/**
* Destructor.
@@ -209,40 +193,20 @@ class U_I18N_API IslamicCalendar : public Calendar {
*/
virtual ~IslamicCalendar();
- /**
- * Sets Islamic calendar calculation type used by this instance.
- *
- * @param type The calendar calculation type, <code>CIVIL</code> to use the civil
- * calendar, <code>ASTRONOMICAL</code> to use the astronomical calendar.
- * @internal
- */
- void setCalculationType(ECalculationType type, UErrorCode &status);
-
- /**
- * Returns <code>true</code> if this object is using the fixed-cycle civil
- * calendar, or <code>false</code> if using the religious, astronomical
- * calendar.
- * @internal
- */
- UBool isCivil();
-
-
- // TODO: copy c'tor, etc
-
// clone
virtual IslamicCalendar* clone() const override;
- private:
+ 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.
*/
- int32_t yearStart(int32_t year) const;
+ virtual int32_t yearStart(int32_t year) const;
/**
* Return the day # on which the given month starts. Days are counted
@@ -251,7 +215,7 @@ class U_I18N_API IslamicCalendar : public Calendar {
* @param year The hijri year
* @param year The hijri month, 0-based
*/
- int32_t monthStart(int32_t year, int32_t month) const;
+ virtual int32_t monthStart(int32_t year, int32_t month) const;
/**
* Find the day number on which a particular month of the true/lunar
@@ -263,6 +227,7 @@ class U_I18N_API IslamicCalendar : public Calendar {
*/
int32_t trueMonthStart(int32_t month) 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
@@ -274,17 +239,6 @@ class U_I18N_API IslamicCalendar : public Calendar {
*/
static double moonAge(UDate time, UErrorCode &status);
- //-------------------------------------------------------------------------
- // Internal data....
- //
-
- /**
- * <code>CIVIL</code> if this object uses the fixed-cycle Islamic civil calendar,
- * and <code>ASTRONOMICAL</code> if it approximates the true religious calendar using
- * astronomical calculations for the time of the new moon.
- */
- ECalculationType cType;
-
//----------------------------------------------------------------------
// Calendar framework
//----------------------------------------------------------------------
@@ -346,6 +300,12 @@ class U_I18N_API IslamicCalendar : public Calendar {
*/
virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override;
+ /**
+ * Return the epoc.
+ * @internal
+ */
+ virtual int32_t getEpoc() const;
+
// UObject stuff
public:
/**
@@ -353,7 +313,7 @@ class U_I18N_API IslamicCalendar : public Calendar {
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -366,34 +326,44 @@ class U_I18N_API IslamicCalendar : public Calendar {
* @return The class ID for all objects of this class.
* @internal
*/
- /*U_I18N_API*/ static UClassID U_EXPORT2 getStaticClassID(void);
+ /*U_I18N_API*/ static UClassID U_EXPORT2 getStaticClassID();
/**
- * return the calendar type, "buddhist".
+ * return the calendar type, "islamic".
*
* @return calendar type
* @internal
*/
virtual const char * getType() const override;
- private:
- IslamicCalendar(); // default constructor not implemented
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
- // Default century.
- protected:
+ /**
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual void setRelatedYear(int32_t year) override;
/**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
+ * Returns true if the date is in a leap year.
*
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
- * @internal
+ * @param status ICU Error Code
+ * @return True if the date in the fields is in a Temporal proposal
+ * defined leap year. False otherwise.
*/
- virtual UBool inDaylightTime(UErrorCode& status) const override;
+ virtual bool inTemporalLeapYear(UErrorCode &status) const override;
+ private:
+ IslamicCalendar() = delete; // default constructor not implemented
+ // Default century.
+ protected:
/**
* Returns true because the Islamic Calendar does have a default century
* @internal
@@ -419,13 +389,375 @@ class U_I18N_API IslamicCalendar : public Calendar {
* are considered to fall within so that its start date is 80 years
* before the current time.
*/
- static void U_CALLCONV initializeSystemDefaultCentury(void);
+ static void U_CALLCONV initializeSystemDefaultCentury();
};
-U_NAMESPACE_END
+/*
+ * IslamicCivilCalendar is one of the two main variants of the Islamic calendar.
+ * The <em>civil</em> calendar, which uses a fixed cycle of alternating 29-
+ * and 30-day months, with a leap day added to the last month of 11 out of
+ * every 30 years. This calendar is easily calculated and thus predictable in
+ * advance, so it is used as the civil calendar in a number of Arab countries.
+ * This calendar is referring as "Islamic calendar, tabular (intercalary years
+ * [2,5,7,10,13,16,18,21,24,26,29]- civil epoch" in CLDR.
+ */
+class U_I18N_API IslamicCivilCalendar : public IslamicCalendar {
+ public:
+ /**
+ * Constructs an IslamicCivilCalendar based on the current time in the default time zone
+ * with the given locale.
+ *
+ * @param aLocale The given locale.
+ * @param success Indicates the status of IslamicCivilCalendar object construction.
+ * Returns U_ZERO_ERROR if constructed successfully.
+ * @internal
+ */
+ IslamicCivilCalendar(const Locale& aLocale, UErrorCode &success);
-#endif
-#endif
+ /**
+ * Copy Constructor
+ * @internal
+ */
+ IslamicCivilCalendar(const IslamicCivilCalendar& other) = default;
+
+ /**
+ * Destructor.
+ * @internal
+ */
+ virtual ~IslamicCivilCalendar();
+
+ // clone
+ virtual IslamicCivilCalendar* clone() const override;
+
+ /**
+ * @return The class ID for this object. All objects of a given class have the
+ * same class ID. Objects of other classes have different class IDs.
+ * @internal
+ */
+ virtual UClassID getDynamicClassID() const override;
+
+ /**
+ * Return the class ID for this class. This is useful only for comparing to a return
+ * value from getDynamicClassID(). For example:
+ *
+ * Base* polymorphic_pointer = createPolymorphicObject();
+ * if (polymorphic_pointer->getDynamicClassID() ==
+ * Derived::getStaticClassID()) ...
+ *
+ * @return The class ID for all objects of this class.
+ * @internal
+ */
+ static UClassID U_EXPORT2 getStaticClassID();
+
+ /**
+ * return the calendar type, "islamic-civil".
+ *
+ * @return calendar type
+ * @internal
+ */
+ virtual const char * getType() const override;
+
+ protected:
+ /**
+ * Return the day # on which the given year starts. Days are counted
+ * from the Hijri epoch, origin 0.
+ * @internal
+ */
+ virtual int32_t yearStart(int32_t year) const override;
+
+ /**
+ * Return the day # on which the given month starts. Days are counted
+ * from the Hijri epoch, origin 0.
+ *
+ * @param year The hijri year
+ * @param year The hijri month, 0-based
+ * @internal
+ */
+ virtual int32_t monthStart(int32_t year, int32_t month) const override;
+
+ /**
+ * Return the length (in days) of the given month.
+ *
+ * @param year The hijri year
+ * @param year The hijri month, 0-based
+ * @internal
+ */
+ virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override;
+
+ /**
+ * Return the number of days in the given Islamic year
+ * @internal
+ */
+ virtual int32_t handleGetYearLength(int32_t extendedYear) const override;
+
+ /**
+ * Override Calendar to compute several fields specific to the Islamic
+ * 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.
+ * @internal
+ */
+ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override;
+};
+
+/*
+ * IslamicTBLACalendar calendar.
+ * This is a subclass of IslamicCivilCalendar. The only differences in the
+ * calendar math is it uses different epoch.
+ * This calendar is referring as "Islamic calendar, tabular (intercalary years
+ * [2,5,7,10,13,16,18,21,24,26,29] - astronomical epoch" in CLDR.
+ */
+class U_I18N_API IslamicTBLACalendar : public IslamicCivilCalendar {
+ public:
+ /**
+ * Constructs an IslamicTBLACalendar based on the current time in the default time zone
+ * with the given locale.
+ *
+ * @param aLocale The given locale.
+ * @param success Indicates the status of IslamicTBLACalendar object construction.
+ * Returns U_ZERO_ERROR if constructed successfully.
+ * @internal
+ */
+ IslamicTBLACalendar(const Locale& aLocale, UErrorCode &success);
+
+ /**
+ * Copy Constructor
+ * @internal
+ */
+ IslamicTBLACalendar(const IslamicTBLACalendar& other) = default;
+
+ /**
+ * Destructor.
+ * @internal
+ */
+ virtual ~IslamicTBLACalendar();
+
+ /**
+ * @return The class ID for this object. All objects of a given class have the
+ * same class ID. Objects of other classes have different class IDs.
+ * @internal
+ */
+ virtual UClassID getDynamicClassID() const override;
+
+ /**
+ * Return the class ID for this class. This is useful only for comparing to a return
+ * value from getDynamicClassID(). For example:
+ *
+ * Base* polymorphic_pointer = createPolymorphicObject();
+ * if (polymorphic_pointer->getDynamicClassID() ==
+ * Derived::getStaticClassID()) ...
+ *
+ * @return The class ID for all objects of this class.
+ * @internal
+ */
+ static UClassID U_EXPORT2 getStaticClassID();
+
+ /**
+ * return the calendar type, "islamic-tbla".
+ *
+ * @return calendar type
+ * @internal
+ */
+ virtual const char * getType() const override;
+
+ // clone
+ virtual IslamicTBLACalendar* clone() const override;
+
+ protected:
+ /**
+ * Return the epoc.
+ * @internal
+ */
+ virtual int32_t getEpoc() const override;
+};
+
+/*
+ * IslamicUmalquraCalendar
+ * This calendar is referred as "Islamic calendar, Umm al-Qura" in CLDR.
+ */
+class U_I18N_API IslamicUmalquraCalendar : public IslamicCalendar {
+ public:
+ /**
+ * Constructs an IslamicUmalquraCalendar based on the current time in the default time zone
+ * with the given locale.
+ *
+ * @param aLocale The given locale.
+ * @param success Indicates the status of IslamicUmalquraCalendar object construction.
+ * Returns U_ZERO_ERROR if constructed successfully.
+ * @internal
+ */
+ IslamicUmalquraCalendar(const Locale& aLocale, UErrorCode &success);
+
+ /**
+ * Copy Constructor
+ * @internal
+ */
+ IslamicUmalquraCalendar(const IslamicUmalquraCalendar& other) = default;
+
+ /**
+ * Destructor.
+ * @internal
+ */
+ virtual ~IslamicUmalquraCalendar();
+
+ /**
+ * @return The class ID for this object. All objects of a given class have the
+ * same class ID. Objects of other classes have different class IDs.
+ * @internal
+ */
+ virtual UClassID getDynamicClassID() const override;
+
+ /**
+ * Return the class ID for this class. This is useful only for comparing to a return
+ * value from getDynamicClassID(). For example:
+ *
+ * Base* polymorphic_pointer = createPolymorphicObject();
+ * if (polymorphic_pointer->getDynamicClassID() ==
+ * Derived::getStaticClassID()) ...
+ *
+ * @return The class ID for all objects of this class.
+ * @internal
+ */
+ static UClassID U_EXPORT2 getStaticClassID();
+
+ /**
+ * return the calendar type, "islamic-umalqura".
+ *
+ * @return calendar type
+ * @internal
+ */
+ virtual const char * getType() const override;
+
+ // clone
+ virtual IslamicUmalquraCalendar* clone() const override;
+
+ protected:
+ /**
+ * Return the day # on which the given year starts. Days are counted
+ * from the Hijri epoch, origin 0.
+ * @internal
+ */
+ virtual int32_t yearStart(int32_t year) const override;
+
+ /**
+ * Return the day # on which the given month starts. Days are counted
+ * from the Hijri epoch, origin 0.
+ *
+ * @param year The hijri year
+ * @param year The hijri month, 0-based
+ * @internal
+ */
+ virtual int32_t monthStart(int32_t year, int32_t month) const override;
+
+ /**
+ * Return the length (in days) of the given month.
+ *
+ * @param year The hijri year
+ * @param year The hijri month, 0-based
+ * @internal
+ */
+ virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const override;
+
+ /**
+ * Return the number of days in the given Islamic year
+ * @internal
+ */
+ virtual int32_t handleGetYearLength(int32_t extendedYear) const override;
+ /**
+ * Override Calendar to compute several fields specific to the Islamic
+ * 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.
+ * @internal
+ */
+ virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override;
+};
+/*
+ * IslamicRGSACalendar
+ * Islamic calendar, Saudi Arabia sighting. Since the calendar depends on the
+ * sighting, it is impossible to implement by algorithm ahead of time. It is
+ * currently identical to IslamicCalendar except the getType will return
+ * "islamic-rgsa".
+ */
+class U_I18N_API IslamicRGSACalendar : public IslamicCalendar {
+ public:
+ /**
+ * Constructs an IslamicRGSACalendar based on the current time in the default time zone
+ * with the given locale.
+ *
+ * @param aLocale The given locale.
+ * @param success Indicates the status of IslamicRGSACalendar object construction.
+ * Returns U_ZERO_ERROR if constructed successfully.
+ * @internal
+ */
+ IslamicRGSACalendar(const Locale& aLocale, UErrorCode &success);
+
+ /**
+ * Copy Constructor
+ * @internal
+ */
+ IslamicRGSACalendar(const IslamicRGSACalendar& other) = default;
+
+ /**
+ * Destructor.
+ * @internal
+ */
+ virtual ~IslamicRGSACalendar();
+
+ /**
+ * @return The class ID for this object. All objects of a given class have the
+ * same class ID. Objects of other classes have different class IDs.
+ * @internal
+ */
+ virtual UClassID getDynamicClassID() const override;
+
+ /**
+ * Return the class ID for this class. This is useful only for comparing to a return
+ * value from getDynamicClassID(). For example:
+ *
+ * Base* polymorphic_pointer = createPolymorphicObject();
+ * if (polymorphic_pointer->getDynamicClassID() ==
+ * Derived::getStaticClassID()) ...
+ *
+ * @return The class ID for all objects of this class.
+ * @internal
+ */
+ static UClassID U_EXPORT2 getStaticClassID();
+
+ /**
+ * return the calendar type, "islamic-rgsa".
+ *
+ * @return calendar type
+ * @internal
+ */
+ virtual const char * getType() const override;
+
+ // clone
+ virtual IslamicRGSACalendar* clone() const override;
+};
+
+U_NAMESPACE_END
+
+#endif
+#endif
diff --git a/contrib/libs/icu/i18n/iso8601cal.cpp b/contrib/libs/icu/i18n/iso8601cal.cpp
new file mode 100644
index 00000000000..1bc81fac15e
--- /dev/null
+++ b/contrib/libs/icu/i18n/iso8601cal.cpp
@@ -0,0 +1,37 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "iso8601cal.h"
+#include "unicode/gregocal.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ISO8601Calendar)
+
+ISO8601Calendar::ISO8601Calendar(const Locale& aLocale, UErrorCode& success)
+: GregorianCalendar(aLocale, success)
+{
+ setFirstDayOfWeek(UCAL_MONDAY);
+ setMinimalDaysInFirstWeek(4);
+}
+
+ISO8601Calendar::~ISO8601Calendar()
+{
+}
+
+ISO8601Calendar* ISO8601Calendar::clone() const
+{
+ return new ISO8601Calendar(*this);
+}
+
+const char *ISO8601Calendar::getType() const
+{
+ return "iso8601";
+}
+
+U_NAMESPACE_END
+
+#endif
diff --git a/contrib/libs/icu/i18n/iso8601cal.h b/contrib/libs/icu/i18n/iso8601cal.h
new file mode 100644
index 00000000000..688fac3588b
--- /dev/null
+++ b/contrib/libs/icu/i18n/iso8601cal.h
@@ -0,0 +1,102 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+#ifndef ISO8601CAL_H
+#define ISO8601CAL_H
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/calendar.h"
+#include "unicode/gregocal.h"
+#include "unicode/timezone.h"
+
+U_NAMESPACE_BEGIN
+
+/**
+ * Concrete class which provides the ISO8601 calendar.
+ * <P>
+ * <code>ISO8601Calendar</code> is a subclass of <code>GregorianCalendar</code>
+ * that the first day of a week is Monday and the minimal days in the first
+ * week of a year or month is four days.
+ * <p>
+ * The ISO8601 calendar is identical to the Gregorian calendar in all respects
+ * except for the first day of week and the minimal days in the first week
+ * of a year.
+ * @internal
+ */
+class ISO8601Calendar : public GregorianCalendar {
+ public:
+ //-------------------------------------------------------------------------
+ // Constructors...
+ //-------------------------------------------------------------------------
+
+ /**
+ * Constructs a DangiCalendar based on the current time in the default time zone
+ * with the given locale.
+ *
+ * @param aLocale The given locale.
+ * @param success Indicates the status of ISO8601Calendar object construction.
+ * Returns U_ZERO_ERROR if constructed successfully.
+ * @internal
+ */
+ ISO8601Calendar(const Locale& aLocale, UErrorCode &success);
+
+ /**
+ * Copy Constructor
+ * @internal
+ */
+ ISO8601Calendar(const ISO8601Calendar& other) = default;
+
+ /**
+ * Destructor.
+ * @internal
+ */
+ virtual ~ISO8601Calendar();
+
+ /**
+ * Clone.
+ * @internal
+ */
+ virtual ISO8601Calendar* clone() const override;
+
+ // UObject stuff
+ public:
+ /**
+ * @return The class ID for this object. All objects of a given class have the
+ * same class ID. Objects of other classes have different class IDs.
+ * @internal
+ */
+ virtual UClassID getDynamicClassID() const override;
+
+ /**
+ * Return the class ID for this class. This is useful only for comparing to a return
+ * value from getDynamicClassID(). For example:
+ *
+ * Base* polymorphic_pointer = createPolymorphicObject();
+ * if (polymorphic_pointer->getDynamicClassID() ==
+ * Derived::getStaticClassID()) ...
+ *
+ * @return The class ID for all objects of this class.
+ * @internal
+ */
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
+
+ /**
+ * return the calendar type, "iso8601".
+ *
+ * @return calendar type
+ * @internal
+ */
+ virtual const char * getType() const override;
+
+
+ private:
+
+ ISO8601Calendar(); // default constructor not implemented
+};
+
+U_NAMESPACE_END
+
+#endif
+#endif
diff --git a/contrib/libs/icu/i18n/japancal.cpp b/contrib/libs/icu/i18n/japancal.cpp
index 75a248f406f..fc18d6c0eb1 100644
--- a/contrib/libs/icu/i18n/japancal.cpp
+++ b/contrib/libs/icu/i18n/japancal.cpp
@@ -39,18 +39,18 @@
#include "cstring.h"
static icu::EraRules * gJapaneseEraRules = nullptr;
-static icu::UInitOnce gJapaneseEraRulesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gJapaneseEraRulesInitOnce {};
static int32_t gCurrentEra = 0;
U_CDECL_BEGIN
-static UBool japanese_calendar_cleanup(void) {
+static UBool japanese_calendar_cleanup() {
if (gJapaneseEraRules) {
delete gJapaneseEraRules;
gJapaneseEraRules = nullptr;
}
gCurrentEra = 0;
gJapaneseEraRulesInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -71,21 +71,21 @@ UBool JapaneseCalendar::enableTentativeEra() {
// 1. Environment variable ICU_ENABLE_TENTATIVE_ERA=true or false
- UBool includeTentativeEra = FALSE;
+ UBool includeTentativeEra = false;
#if U_PLATFORM_HAS_WINUWP_API == 1
// UWP doesn't allow access to getenv(), but we can call GetEnvironmentVariableW to do the same thing.
- UChar varName[26] = {};
+ char16_t varName[26] = {};
u_charsToUChars(TENTATIVE_ERA_VAR_NAME, varName, static_cast<int32_t>(uprv_strlen(TENTATIVE_ERA_VAR_NAME)));
WCHAR varValue[5] = {};
DWORD ret = GetEnvironmentVariableW(reinterpret_cast<WCHAR*>(varName), varValue, UPRV_LENGTHOF(varValue));
if ((ret == 4) && (_wcsicmp(varValue, L"true") == 0)) {
- includeTentativeEra = TRUE;
+ includeTentativeEra = true;
}
#else
char *envVarVal = getenv(TENTATIVE_ERA_VAR_NAME);
- if (envVarVal != NULL && uprv_stricmp(envVarVal, "true") == 0) {
- includeTentativeEra = TRUE;
+ if (envVarVal != nullptr && uprv_stricmp(envVarVal, "true") == 0) {
+ includeTentativeEra = true;
}
#endif
return includeTentativeEra;
@@ -219,7 +219,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, internalGet(UCAL_MONTH) + 1, internalGet(UCAL_DAY_OF_MONTH), status);
+ int32_t eraIdx = gJapaneseEraRules->getEraIndex(year, internalGetMonth() + 1, internalGet(UCAL_DAY_OF_MONTH), status);
internalSet(UCAL_ERA, eraIdx);
internalSet(UCAL_YEAR, year - gJapaneseEraRules->getStartYear(eraIdx, status) + 1);
@@ -230,7 +230,7 @@ Disable pivoting
*/
UBool JapaneseCalendar::haveDefaultCentury() const
{
- return FALSE;
+ return false;
}
UDate JapaneseCalendar::defaultCenturyStart() const
diff --git a/contrib/libs/icu/i18n/japancal.h b/contrib/libs/icu/i18n/japancal.h
index 88513440528..3ae4900a2cd 100644
--- a/contrib/libs/icu/i18n/japancal.h
+++ b/contrib/libs/icu/i18n/japancal.h
@@ -70,14 +70,14 @@ public:
* Check environment variable.
* @internal
*/
- U_I18N_API static UBool U_EXPORT2 enableTentativeEra(void);
+ U_I18N_API static UBool U_EXPORT2 enableTentativeEra();
/**
* Useful constants for JapaneseCalendar.
* Exported for use by test code.
* @internal
*/
- U_I18N_API static uint32_t U_EXPORT2 getCurrentEra(void); // the current era
+ U_I18N_API static uint32_t U_EXPORT2 getCurrentEra(); // the current era
/**
* Constructs a JapaneseCalendar based on the current time in the default time zone
@@ -143,7 +143,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -156,7 +156,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "japanese".
diff --git a/contrib/libs/icu/i18n/listformatter.cpp b/contrib/libs/icu/i18n/listformatter.cpp
index 4142fa461da..3405b5de383 100644
--- a/contrib/libs/icu/i18n/listformatter.cpp
+++ b/contrib/libs/icu/i18n/listformatter.cpp
@@ -396,8 +396,8 @@ static const char* typeWidthToStyleString(UListFormatterType type, UListFormatte
return nullptr;
}
-static const UChar solidus = 0x2F;
-static const UChar aliasPrefix[] = { 0x6C,0x69,0x73,0x74,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x2F }; // "listPattern/"
+static const char16_t solidus = 0x2F;
+static const char16_t aliasPrefix[] = { 0x6C,0x69,0x73,0x74,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x2F }; // "listPattern/"
enum {
kAliasPrefixLen = UPRV_LENGTHOF(aliasPrefix),
kStyleLenMax = 24 // longest currently is 14
@@ -405,16 +405,9 @@ enum {
struct ListFormatter::ListPatternsSink : public ResourceSink {
UnicodeString two, start, middle, end;
-#if ((U_PLATFORM == U_PF_AIX) || (U_PLATFORM == U_PF_OS390)) && (U_CPLUSPLUS_VERSION < 11)
- char aliasedStyle[kStyleLenMax+1];
- ListPatternsSink() {
- uprv_memset(aliasedStyle, 0, kStyleLenMax+1);
- }
-#else
char aliasedStyle[kStyleLenMax+1] = {0};
ListPatternsSink() {}
-#endif
virtual ~ListPatternsSink();
void setAliasedStyle(UnicodeString alias) {
diff --git a/contrib/libs/icu/i18n/measfmt.cpp b/contrib/libs/icu/i18n/measfmt.cpp
index a9a56a3b58d..da4e69b49b7 100644
--- a/contrib/libs/icu/i18n/measfmt.cpp
+++ b/contrib/libs/icu/i18n/measfmt.cpp
@@ -181,12 +181,12 @@ static UBool getString(
UnicodeString &result,
UErrorCode &status) {
int32_t len = 0;
- const UChar *resStr = ures_getString(resource, &len, &status);
+ const char16_t *resStr = ures_getString(resource, &len, &status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- result.setTo(TRUE, resStr, len);
- return TRUE;
+ result.setTo(true, resStr, len);
+ return true;
}
static UnicodeString loadNumericDateFormatterPattern(
@@ -204,7 +204,7 @@ static UnicodeString loadNumericDateFormatterPattern(
ures_getByKeyWithFallback(
resource,
chs.data(),
- NULL,
+ nullptr,
&status));
if (U_FAILURE(status)) {
return result;
@@ -212,7 +212,7 @@ static UnicodeString loadNumericDateFormatterPattern(
getString(patternBundle.getAlias(), result, status);
// Replace 'h' with 'H'
int32_t len = result.length();
- UChar *buffer = result.getBuffer(len);
+ char16_t *buffer = result.getBuffer(len);
for (int32_t i = 0; i < len; ++i) {
if (buffer[i] == 0x68) { // 'h'
buffer[i] = 0x48; // 'H'
@@ -226,7 +226,7 @@ static NumericDateFormatters *loadNumericDateFormatters(
const UResourceBundle *resource,
UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
NumericDateFormatters *result = new NumericDateFormatters(
loadNumericDateFormatterPattern(resource, "hm", status),
@@ -234,12 +234,12 @@ static NumericDateFormatters *loadNumericDateFormatters(
loadNumericDateFormatterPattern(resource, "hms", status));
if (U_FAILURE(status)) {
delete result;
- return NULL;
+ return nullptr;
}
return result;
}
-template<> U_I18N_API
+template<>
const MeasureFormatCacheData *LocaleCacheKey<MeasureFormatCacheData>::createObject(
const void * /*unused*/, UErrorCode &status) const {
const char *localeId = fLoc.getName();
@@ -248,12 +248,12 @@ const MeasureFormatCacheData *LocaleCacheKey<MeasureFormatCacheData>::createObje
UNUM_CURRENCY_PLURAL, UNUM_CURRENCY_ISO, UNUM_CURRENCY};
LocalPointer<MeasureFormatCacheData> result(new MeasureFormatCacheData(), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
result->adoptNumericDateFormatters(loadNumericDateFormatters(
unitsBundle.getAlias(), status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
for (int32_t i = 0; i < WIDTH_INDEX_COUNT; ++i) {
@@ -266,17 +266,17 @@ const MeasureFormatCacheData *LocaleCacheKey<MeasureFormatCacheData>::createObje
status = localStatus;
}
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
}
NumberFormat *inf = NumberFormat::createInstance(
localeId, UNUM_DECIMAL, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
inf->setMaximumFractionDigits(0);
DecimalFormat *decfmt = dynamic_cast<DecimalFormat *>(inf);
- if (decfmt != NULL) {
+ if (decfmt != nullptr) {
decfmt->setRoundingMode(DecimalFormat::kRoundDown);
}
result->adoptIntegerFormat(inf);
@@ -352,12 +352,12 @@ static int32_t toHMS(
MeasureFormat::MeasureFormat(
const Locale &locale, UMeasureFormatWidth w, UErrorCode &status)
- : cache(NULL),
- numberFormat(NULL),
- pluralRules(NULL),
+ : cache(nullptr),
+ numberFormat(nullptr),
+ pluralRules(nullptr),
fWidth(w),
- listFormatter(NULL) {
- initMeasureFormat(locale, w, NULL, status);
+ listFormatter(nullptr) {
+ initMeasureFormat(locale, w, nullptr, status);
}
MeasureFormat::MeasureFormat(
@@ -365,11 +365,11 @@ MeasureFormat::MeasureFormat(
UMeasureFormatWidth w,
NumberFormat *nfToAdopt,
UErrorCode &status)
- : cache(NULL),
- numberFormat(NULL),
- pluralRules(NULL),
+ : cache(nullptr),
+ numberFormat(nullptr),
+ pluralRules(nullptr),
fWidth(w),
- listFormatter(NULL) {
+ listFormatter(nullptr) {
initMeasureFormat(locale, w, nfToAdopt, status);
}
@@ -379,11 +379,11 @@ MeasureFormat::MeasureFormat(const MeasureFormat &other) :
numberFormat(other.numberFormat),
pluralRules(other.pluralRules),
fWidth(other.fWidth),
- listFormatter(NULL) {
+ listFormatter(nullptr) {
cache->addRef();
numberFormat->addRef();
pluralRules->addRef();
- if (other.listFormatter != NULL) {
+ if (other.listFormatter != nullptr) {
listFormatter = new ListFormatter(*other.listFormatter);
}
}
@@ -398,30 +398,30 @@ MeasureFormat &MeasureFormat::operator=(const MeasureFormat &other) {
SharedObject::copyPtr(other.pluralRules, pluralRules);
fWidth = other.fWidth;
delete listFormatter;
- if (other.listFormatter != NULL) {
+ if (other.listFormatter != nullptr) {
listFormatter = new ListFormatter(*other.listFormatter);
} else {
- listFormatter = NULL;
+ listFormatter = nullptr;
}
return *this;
}
MeasureFormat::MeasureFormat() :
- cache(NULL),
- numberFormat(NULL),
- pluralRules(NULL),
+ cache(nullptr),
+ numberFormat(nullptr),
+ pluralRules(nullptr),
fWidth(UMEASFMT_WIDTH_SHORT),
- listFormatter(NULL) {
+ listFormatter(nullptr) {
}
MeasureFormat::~MeasureFormat() {
- if (cache != NULL) {
+ if (cache != nullptr) {
cache->removeRef();
}
- if (numberFormat != NULL) {
+ if (numberFormat != nullptr) {
numberFormat->removeRef();
}
- if (pluralRules != NULL) {
+ if (pluralRules != nullptr) {
pluralRules->removeRef();
}
delete listFormatter;
@@ -476,7 +476,7 @@ UnicodeString &MeasureFormat::format(
if (obj.getType() == Formattable::kObject) {
const UObject* formatObj = obj.getObject();
const Measure* amount = dynamic_cast<const Measure*>(formatObj);
- if (amount != NULL) {
+ if (amount != nullptr) {
return formatMeasure(
*amount, **numberFormat, appendTo, pos, status);
}
@@ -547,7 +547,7 @@ UnicodeString &MeasureFormat::formatMeasures(
measures, measureCount, appendTo, pos, status);
}
UnicodeString *results = new UnicodeString[measureCount];
- if (results == NULL) {
+ if (results == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return appendTo;
}
@@ -635,7 +635,7 @@ void MeasureFormat::adoptNumberFormat(
return;
}
SharedNumberFormat *shared = new SharedNumberFormat(nf.getAlias());
- if (shared == NULL) {
+ if (shared == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -645,9 +645,9 @@ void MeasureFormat::adoptNumberFormat(
UBool MeasureFormat::setMeasureFormatLocale(const Locale &locale, UErrorCode &status) {
if (U_FAILURE(status) || locale == getLocale(status)) {
- return FALSE;
+ return false;
}
- initMeasureFormat(locale, fWidth, NULL, status);
+ initMeasureFormat(locale, fWidth, nullptr, status);
return U_SUCCESS(status);
}
@@ -683,7 +683,7 @@ UnicodeString &MeasureFormat::formatMeasure(
const Formattable& amtNumber = measure.getNumber();
const MeasureUnit& amtUnit = measure.getUnit();
if (isCurrency(amtUnit)) {
- UChar isoCode[4];
+ char16_t isoCode[4];
u_charsToUChars(amtUnit.getSubtype(), isoCode, 4);
return cache->getCurrencyFormat(fWidth)->format(
new CurrencyAmount(amtNumber, isoCode, status),
@@ -769,7 +769,7 @@ UnicodeString &MeasureFormat::formatNumeric(
FormattedStringBuilder fsb;
- UBool protect = FALSE;
+ UBool protect = false;
const int32_t patternLength = pattern.length();
for (int32_t i = 0; i < patternLength; i++) {
char16_t c = pattern[i];
diff --git a/contrib/libs/icu/i18n/measunit.cpp b/contrib/libs/icu/i18n/measunit.cpp
index 5ad3991974d..47ae5bcf5df 100644
--- a/contrib/libs/icu/i18n/measunit.cpp
+++ b/contrib/libs/icu/i18n/measunit.cpp
@@ -43,24 +43,24 @@ static const int32_t gOffsets[] = {
17,
27,
31,
- 330,
- 341,
- 357,
- 361,
- 370,
+ 332,
+ 343,
+ 360,
+ 364,
373,
- 377,
- 385,
- 407,
- 411,
- 426,
- 427,
- 433,
- 443,
- 447,
+ 376,
+ 380,
+ 388,
+ 410,
+ 414,
+ 429,
+ 430,
+ 436,
+ 446,
451,
- 453,
- 487
+ 455,
+ 457,
+ 491
};
static const int32_t kCurrencyOffset = 5;
@@ -345,6 +345,7 @@ static const char * const gSubTypes[] = {
"SHP",
"SIT",
"SKK",
+ "SLE",
"SLL",
"SOS",
"SRD",
@@ -384,6 +385,7 @@ static const char * const gSubTypes[] = {
"UYW",
"UZS",
"VEB",
+ "VED",
"VEF",
"VES",
"VNC",
@@ -446,6 +448,7 @@ static const char * const gSubTypes[] = {
"month",
"month-person",
"nanosecond",
+ "quarter",
"second",
"week",
"week-person",
@@ -511,7 +514,6 @@ static const char * const gSubTypes[] = {
"grain",
"gram",
"kilogram",
- "metric-ton",
"microgram",
"milligram",
"ounce",
@@ -520,6 +522,7 @@ static const char * const gSubTypes[] = {
"solar-mass",
"stone",
"ton",
+ "tonne",
"",
"gigawatt",
"horsepower",
@@ -537,6 +540,7 @@ static const char * const gSubTypes[] = {
"millimeter-ofhg",
"pascal",
"pound-force-per-square-inch",
+ "beaufort",
"kilometer-per-hour",
"knot",
"meter-per-second",
@@ -1011,46 +1015,54 @@ MeasureUnit MeasureUnit::getNanosecond() {
return MeasureUnit(7, 10);
}
-MeasureUnit *MeasureUnit::createSecond(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createQuarter(UErrorCode &status) {
return MeasureUnit::create(7, 11, status);
}
-MeasureUnit MeasureUnit::getSecond() {
+MeasureUnit MeasureUnit::getQuarter() {
return MeasureUnit(7, 11);
}
-MeasureUnit *MeasureUnit::createWeek(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createSecond(UErrorCode &status) {
return MeasureUnit::create(7, 12, status);
}
-MeasureUnit MeasureUnit::getWeek() {
+MeasureUnit MeasureUnit::getSecond() {
return MeasureUnit(7, 12);
}
-MeasureUnit *MeasureUnit::createWeekPerson(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createWeek(UErrorCode &status) {
return MeasureUnit::create(7, 13, status);
}
-MeasureUnit MeasureUnit::getWeekPerson() {
+MeasureUnit MeasureUnit::getWeek() {
return MeasureUnit(7, 13);
}
-MeasureUnit *MeasureUnit::createYear(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createWeekPerson(UErrorCode &status) {
return MeasureUnit::create(7, 14, status);
}
-MeasureUnit MeasureUnit::getYear() {
+MeasureUnit MeasureUnit::getWeekPerson() {
return MeasureUnit(7, 14);
}
-MeasureUnit *MeasureUnit::createYearPerson(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createYear(UErrorCode &status) {
return MeasureUnit::create(7, 15, status);
}
-MeasureUnit MeasureUnit::getYearPerson() {
+MeasureUnit MeasureUnit::getYear() {
return MeasureUnit(7, 15);
}
+MeasureUnit *MeasureUnit::createYearPerson(UErrorCode &status) {
+ return MeasureUnit::create(7, 16, status);
+}
+
+MeasureUnit MeasureUnit::getYearPerson() {
+ return MeasureUnit(7, 16);
+}
+
MeasureUnit *MeasureUnit::createAmpere(UErrorCode &status) {
return MeasureUnit::create(8, 0, status);
}
@@ -1532,74 +1544,82 @@ MeasureUnit MeasureUnit::getKilogram() {
}
MeasureUnit *MeasureUnit::createMetricTon(UErrorCode &status) {
- return MeasureUnit::create(15, 6, status);
+ return MeasureUnit::create(15, 14, status);
}
MeasureUnit MeasureUnit::getMetricTon() {
- return MeasureUnit(15, 6);
+ return MeasureUnit(15, 14);
}
MeasureUnit *MeasureUnit::createMicrogram(UErrorCode &status) {
- return MeasureUnit::create(15, 7, status);
+ return MeasureUnit::create(15, 6, status);
}
MeasureUnit MeasureUnit::getMicrogram() {
- return MeasureUnit(15, 7);
+ return MeasureUnit(15, 6);
}
MeasureUnit *MeasureUnit::createMilligram(UErrorCode &status) {
- return MeasureUnit::create(15, 8, status);
+ return MeasureUnit::create(15, 7, status);
}
MeasureUnit MeasureUnit::getMilligram() {
- return MeasureUnit(15, 8);
+ return MeasureUnit(15, 7);
}
MeasureUnit *MeasureUnit::createOunce(UErrorCode &status) {
- return MeasureUnit::create(15, 9, status);
+ return MeasureUnit::create(15, 8, status);
}
MeasureUnit MeasureUnit::getOunce() {
- return MeasureUnit(15, 9);
+ return MeasureUnit(15, 8);
}
MeasureUnit *MeasureUnit::createOunceTroy(UErrorCode &status) {
- return MeasureUnit::create(15, 10, status);
+ return MeasureUnit::create(15, 9, status);
}
MeasureUnit MeasureUnit::getOunceTroy() {
- return MeasureUnit(15, 10);
+ return MeasureUnit(15, 9);
}
MeasureUnit *MeasureUnit::createPound(UErrorCode &status) {
- return MeasureUnit::create(15, 11, status);
+ return MeasureUnit::create(15, 10, status);
}
MeasureUnit MeasureUnit::getPound() {
- return MeasureUnit(15, 11);
+ return MeasureUnit(15, 10);
}
MeasureUnit *MeasureUnit::createSolarMass(UErrorCode &status) {
- return MeasureUnit::create(15, 12, status);
+ return MeasureUnit::create(15, 11, status);
}
MeasureUnit MeasureUnit::getSolarMass() {
- return MeasureUnit(15, 12);
+ return MeasureUnit(15, 11);
}
MeasureUnit *MeasureUnit::createStone(UErrorCode &status) {
- return MeasureUnit::create(15, 13, status);
+ return MeasureUnit::create(15, 12, status);
}
MeasureUnit MeasureUnit::getStone() {
- return MeasureUnit(15, 13);
+ return MeasureUnit(15, 12);
}
MeasureUnit *MeasureUnit::createTon(UErrorCode &status) {
- return MeasureUnit::create(15, 14, status);
+ return MeasureUnit::create(15, 13, status);
}
MeasureUnit MeasureUnit::getTon() {
+ return MeasureUnit(15, 13);
+}
+
+MeasureUnit *MeasureUnit::createTonne(UErrorCode &status) {
+ return MeasureUnit::create(15, 14, status);
+}
+
+MeasureUnit MeasureUnit::getTonne() {
return MeasureUnit(15, 14);
}
@@ -1731,38 +1751,46 @@ MeasureUnit MeasureUnit::getPoundPerSquareInch() {
return MeasureUnit(18, 9);
}
-MeasureUnit *MeasureUnit::createKilometerPerHour(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createBeaufort(UErrorCode &status) {
return MeasureUnit::create(19, 0, status);
}
-MeasureUnit MeasureUnit::getKilometerPerHour() {
+MeasureUnit MeasureUnit::getBeaufort() {
return MeasureUnit(19, 0);
}
-MeasureUnit *MeasureUnit::createKnot(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createKilometerPerHour(UErrorCode &status) {
return MeasureUnit::create(19, 1, status);
}
-MeasureUnit MeasureUnit::getKnot() {
+MeasureUnit MeasureUnit::getKilometerPerHour() {
return MeasureUnit(19, 1);
}
-MeasureUnit *MeasureUnit::createMeterPerSecond(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createKnot(UErrorCode &status) {
return MeasureUnit::create(19, 2, status);
}
-MeasureUnit MeasureUnit::getMeterPerSecond() {
+MeasureUnit MeasureUnit::getKnot() {
return MeasureUnit(19, 2);
}
-MeasureUnit *MeasureUnit::createMilePerHour(UErrorCode &status) {
+MeasureUnit *MeasureUnit::createMeterPerSecond(UErrorCode &status) {
return MeasureUnit::create(19, 3, status);
}
-MeasureUnit MeasureUnit::getMilePerHour() {
+MeasureUnit MeasureUnit::getMeterPerSecond() {
return MeasureUnit(19, 3);
}
+MeasureUnit *MeasureUnit::createMilePerHour(UErrorCode &status) {
+ return MeasureUnit::create(19, 4, status);
+}
+
+MeasureUnit MeasureUnit::getMilePerHour() {
+ return MeasureUnit(19, 4);
+}
+
MeasureUnit *MeasureUnit::createCelsius(UErrorCode &status) {
return MeasureUnit::create(20, 0, status);
}
@@ -2258,13 +2286,13 @@ StringEnumeration* MeasureUnit::getAvailableTypes(UErrorCode &errorCode) {
gTypes, UPRV_LENGTHOF(gTypes), &errorCode);
if (U_FAILURE(errorCode)) {
uenum_close(uenum);
- return NULL;
+ return nullptr;
}
StringEnumeration *result = new UStringEnumeration(uenum);
- if (result == NULL) {
+ if (result == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
uenum_close(uenum);
- return NULL;
+ return nullptr;
}
return result;
}
@@ -2290,10 +2318,10 @@ bool MeasureUnit::findBySubType(StringPiece subType, MeasureUnit* output) {
MeasureUnit *MeasureUnit::create(int typeId, int subTypeId, UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
MeasureUnit *result = new MeasureUnit(typeId, subTypeId);
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
return result;
diff --git a/contrib/libs/icu/i18n/measunit_extra.cpp b/contrib/libs/icu/i18n/measunit_extra.cpp
index 82811190079..295d6a8ce85 100644
--- a/contrib/libs/icu/i18n/measunit_extra.cpp
+++ b/contrib/libs/icu/i18n/measunit_extra.cpp
@@ -148,7 +148,7 @@ const struct UnitPrefixStrings {
* int32_t *unitCategories[ARR_SIZE];
* SimpleUnitIdentifiersSink identifierSink(gSerializedUnitCategoriesTrie, unitIdentifiers,
* unitCategories, ARR_SIZE, b, kTrieValueOffset);
- * LocalUResourceBundlePointer unitsBundle(ures_openDirect(NULL, "units", &status));
+ * LocalUResourceBundlePointer unitsBundle(ures_openDirect(nullptr, "units", &status));
* ures_getAllItemsWithFallback(unitsBundle.getAlias(), "convertUnits", identifierSink, status);
*/
class SimpleUnitIdentifiersSink : public icu::ResourceSink {
@@ -220,7 +220,7 @@ class SimpleUnitIdentifiersSink : public icu::ResourceSink {
break;
}
int32_t len;
- const UChar* uTarget = value.getString(len, status);
+ const char16_t* uTarget = value.getString(len, status);
CharString target;
target.appendInvariantChars(uTarget, len, status);
if (U_FAILURE(status)) { return; }
@@ -255,15 +255,15 @@ class SimpleUnitIdentifiersSink : public icu::ResourceSink {
*
* For example: "kilogram" -> "mass", "meter-per-second" -> "speed".
*
- * In C++ unitQuantity values are collected in order into a UChar* array, while
+ * In C++ unitQuantity values are collected in order into a char16_t* array, while
* unitQuantity keys are added added to a TrieBuilder, with associated values
- * being the index into the aforementioned UChar* array.
+ * being the index into the aforementioned char16_t* array.
*/
class CategoriesSink : public icu::ResourceSink {
public:
/**
* Constructor.
- * @param out Array of UChar* to which unitQuantity values will be saved.
+ * @param out Array of char16_t* to which unitQuantity values will be saved.
* The pointers returned not owned: they point directly at the resource
* strings in static memory.
* @param outSize The size of the `out` array.
@@ -271,7 +271,7 @@ class CategoriesSink : public icu::ResourceSink {
* each unitQuantity will be added, each with value being the offset
* into `out`.
*/
- explicit CategoriesSink(const UChar **out, int32_t &outSize, BytesTrieBuilder &trieBuilder)
+ explicit CategoriesSink(const char16_t **out, int32_t &outSize, BytesTrieBuilder &trieBuilder)
: outQuantitiesArray(out), outSize(outSize), trieBuilder(trieBuilder), outIndex(0) {}
void put(const char * /*key*/, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override {
@@ -305,14 +305,14 @@ class CategoriesSink : public icu::ResourceSink {
}
private:
- const UChar **outQuantitiesArray;
+ const char16_t **outQuantitiesArray;
int32_t &outSize;
BytesTrieBuilder &trieBuilder;
int32_t outIndex;
};
-icu::UInitOnce gUnitExtrasInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gUnitExtrasInitOnce {};
// Array of simple unit IDs.
//
@@ -327,11 +327,11 @@ int32_t *gSimpleUnitCategories = nullptr;
char *gSerializedUnitExtrasStemTrie = nullptr;
-// Array of UChar* pointing at the unit categories (aka "quantities", aka
+// Array of char16_t* pointing at the unit categories (aka "quantities", aka
// "types"), as found in the `unitQuantities` resource. The array memory itself
-// is owned by this pointer, but the individual UChar* in that array point at
+// is owned by this pointer, but the individual char16_t* in that array point at
// static memory.
-const UChar **gCategories = nullptr;
+const char16_t **gCategories = nullptr;
// Number of items in `gCategories`.
int32_t gCategoriesCount = 0;
// Serialized BytesTrie for mapping from base units to indices into gCategories.
@@ -349,7 +349,7 @@ UBool U_CALLCONV cleanupUnitExtras() {
uprv_free(gSimpleUnits);
gSimpleUnits = nullptr;
gUnitExtrasInitOnce.reset();
- return TRUE;
+ return true;
}
void U_CALLCONV initUnitExtras(UErrorCode& status) {
@@ -362,8 +362,8 @@ void U_CALLCONV initUnitExtras(UErrorCode& status) {
ures_getByKey(unitsBundle.getAlias(), CATEGORY_TABLE_NAME, nullptr, &status));
if (U_FAILURE(status)) { return; }
gCategoriesCount = unitQuantities.getAlias()->fSize;
- size_t quantitiesMallocSize = sizeof(UChar *) * gCategoriesCount;
- gCategories = static_cast<const UChar **>(uprv_malloc(quantitiesMallocSize));
+ size_t quantitiesMallocSize = sizeof(char16_t *) * gCategoriesCount;
+ gCategories = static_cast<const char16_t **>(uprv_malloc(quantitiesMallocSize));
if (gCategories == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -615,7 +615,7 @@ private:
// Set to true when we've seen a "-per-" or a "per-", after which all units
// are in the denominator. Until we find an "-and-", at which point the
- // identifier is invalid pending TODO(CLDR-13700).
+ // identifier is invalid pending TODO(CLDR-13701).
bool fAfterPer = false;
Parser() : fSource(""), fTrie(u"") {}
@@ -669,7 +669,7 @@ private:
* dimensionality.
*
* Returns an error if we parse both compound units and "-and-", since mixed
- * compound units are not yet supported - TODO(CLDR-13700).
+ * compound units are not yet supported - TODO(CLDR-13701).
*
* @param result Will be overwritten by the result, if status shows success.
* @param sawAnd If an "-and-" was parsed prior to finding the "single
@@ -718,7 +718,7 @@ private:
case COMPOUND_PART_PER:
if (sawAnd) {
// Mixed compound units not yet supported,
- // TODO(CLDR-13700).
+ // TODO(CLDR-13701).
status = kUnitIdentifierSyntaxError;
return result;
}
@@ -735,7 +735,7 @@ private:
case COMPOUND_PART_AND:
if (fAfterPer) {
// Can't start with "-and-", and mixed compound units
- // not yet supported, TODO(CLDR-13700).
+ // not yet supported, TODO(CLDR-13701).
status = kUnitIdentifierSyntaxError;
return result;
}
@@ -946,7 +946,7 @@ const char *SingleUnitImpl::getSimpleUnitID() const {
return gSimpleUnits[index];
}
-void SingleUnitImpl::appendNeutralIdentifier(CharString &result, UErrorCode &status) const {
+void SingleUnitImpl::appendNeutralIdentifier(CharString &result, UErrorCode &status) const UPRV_NO_SANITIZE_UNDEFINED {
int32_t absPower = std::abs(this->dimensionality);
U_ASSERT(absPower > 0); // "this function does not support the dimensionless single units";
@@ -1195,7 +1195,7 @@ UMeasurePrefix MeasureUnit::getPrefix(UErrorCode& status) const {
return SingleUnitImpl::forMeasureUnit(*this, status).unitPrefix;
}
-MeasureUnit MeasureUnit::withPrefix(UMeasurePrefix prefix, UErrorCode& status) const {
+MeasureUnit MeasureUnit::withPrefix(UMeasurePrefix prefix, UErrorCode& status) const UPRV_NO_SANITIZE_UNDEFINED {
SingleUnitImpl singleUnit = SingleUnitImpl::forMeasureUnit(*this, status);
singleUnit.unitPrefix = prefix;
return singleUnit.build(status);
diff --git a/contrib/libs/icu/i18n/measure.cpp b/contrib/libs/icu/i18n/measure.cpp
index b9c47fd4015..cdbd995034a 100644
--- a/contrib/libs/icu/i18n/measure.cpp
+++ b/contrib/libs/icu/i18n/measure.cpp
@@ -69,8 +69,8 @@ bool Measure::operator==(const UObject& other) const {
}
const Measure &m = static_cast<const Measure&>(other);
return number == m.number &&
- ((unit == NULL) == (m.unit == NULL)) &&
- (unit == NULL || *unit == *m.unit);
+ ((unit == nullptr) == (m.unit == nullptr)) &&
+ (unit == nullptr || *unit == *m.unit);
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/msgfmt.cpp b/contrib/libs/icu/i18n/msgfmt.cpp
index b8cb2e2ca56..29fb4b3a01b 100644
--- a/contrib/libs/icu/i18n/msgfmt.cpp
+++ b/contrib/libs/icu/i18n/msgfmt.cpp
@@ -55,87 +55,87 @@
// class MessageFormat
// *****************************************************************************
-#define SINGLE_QUOTE ((UChar)0x0027)
-#define COMMA ((UChar)0x002C)
-#define LEFT_CURLY_BRACE ((UChar)0x007B)
-#define RIGHT_CURLY_BRACE ((UChar)0x007D)
+#define SINGLE_QUOTE ((char16_t)0x0027)
+#define COMMA ((char16_t)0x002C)
+#define LEFT_CURLY_BRACE ((char16_t)0x007B)
+#define RIGHT_CURLY_BRACE ((char16_t)0x007D)
//---------------------------------------
// static data
-static const UChar ID_NUMBER[] = {
+static const char16_t ID_NUMBER[] = {
0x6E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0 /* "number" */
};
-static const UChar ID_DATE[] = {
+static const char16_t ID_DATE[] = {
0x64, 0x61, 0x74, 0x65, 0 /* "date" */
};
-static const UChar ID_TIME[] = {
+static const char16_t ID_TIME[] = {
0x74, 0x69, 0x6D, 0x65, 0 /* "time" */
};
-static const UChar ID_SPELLOUT[] = {
+static const char16_t ID_SPELLOUT[] = {
0x73, 0x70, 0x65, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0 /* "spellout" */
};
-static const UChar ID_ORDINAL[] = {
+static const char16_t ID_ORDINAL[] = {
0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0 /* "ordinal" */
};
-static const UChar ID_DURATION[] = {
+static const char16_t ID_DURATION[] = {
0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0 /* "duration" */
};
// MessageFormat Type List Number, Date, Time or Choice
-static const UChar * const TYPE_IDS[] = {
+static const char16_t * const TYPE_IDS[] = {
ID_NUMBER,
ID_DATE,
ID_TIME,
ID_SPELLOUT,
ID_ORDINAL,
ID_DURATION,
- NULL,
+ nullptr,
};
-static const UChar ID_EMPTY[] = {
+static const char16_t ID_EMPTY[] = {
0 /* empty string, used for default so that null can mark end of list */
};
-static const UChar ID_CURRENCY[] = {
+static const char16_t ID_CURRENCY[] = {
0x63, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x63, 0x79, 0 /* "currency" */
};
-static const UChar ID_PERCENT[] = {
+static const char16_t ID_PERCENT[] = {
0x70, 0x65, 0x72, 0x63, 0x65, 0x6E, 0x74, 0 /* "percent" */
};
-static const UChar ID_INTEGER[] = {
+static const char16_t ID_INTEGER[] = {
0x69, 0x6E, 0x74, 0x65, 0x67, 0x65, 0x72, 0 /* "integer" */
};
// NumberFormat modifier list, default, currency, percent or integer
-static const UChar * const NUMBER_STYLE_IDS[] = {
+static const char16_t * const NUMBER_STYLE_IDS[] = {
ID_EMPTY,
ID_CURRENCY,
ID_PERCENT,
ID_INTEGER,
- NULL,
+ nullptr,
};
-static const UChar ID_SHORT[] = {
+static const char16_t ID_SHORT[] = {
0x73, 0x68, 0x6F, 0x72, 0x74, 0 /* "short" */
};
-static const UChar ID_MEDIUM[] = {
+static const char16_t ID_MEDIUM[] = {
0x6D, 0x65, 0x64, 0x69, 0x75, 0x6D, 0 /* "medium" */
};
-static const UChar ID_LONG[] = {
+static const char16_t ID_LONG[] = {
0x6C, 0x6F, 0x6E, 0x67, 0 /* "long" */
};
-static const UChar ID_FULL[] = {
+static const char16_t ID_FULL[] = {
0x66, 0x75, 0x6C, 0x6C, 0 /* "full" */
};
// DateFormat modifier list, default, short, medium, long or full
-static const UChar * const DATE_STYLE_IDS[] = {
+static const char16_t * const DATE_STYLE_IDS[] = {
ID_EMPTY,
ID_SHORT,
ID_MEDIUM,
ID_LONG,
ID_FULL,
- NULL,
+ nullptr,
};
static const icu::DateFormat::EStyle DATE_STYLES[] = {
@@ -148,11 +148,11 @@ static const icu::DateFormat::EStyle DATE_STYLES[] = {
static const int32_t DEFAULT_INITIAL_CAPACITY = 10;
-static const UChar NULL_STRING[] = {
+static const char16_t NULL_STRING[] = {
0x6E, 0x75, 0x6C, 0x6C, 0 // "null"
};
-static const UChar OTHER_STRING[] = {
+static const char16_t OTHER_STRING[] = {
0x6F, 0x74, 0x68, 0x65, 0x72, 0 // "other"
};
@@ -177,7 +177,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(FormatNameEnumeration)
* the given UnicodeString.
*/
static UnicodeString& itos(int32_t i, UnicodeString& appendTo) {
- UChar temp[16];
+ char16_t temp[16];
uprv_itou(temp,16,i,10,0); // 10 == radix
appendTo.append(temp, -1);
return appendTo;
@@ -194,7 +194,7 @@ public:
app.appendString(s.getBuffer(), s.length());
len += s.length();
}
- void append(const UChar* s, const int32_t sLength) {
+ void append(const char16_t* s, const int32_t sLength) {
app.appendString(s, sLength);
len += sLength;
}
@@ -234,16 +234,16 @@ MessageFormat::MessageFormat(const UnicodeString& pattern,
UErrorCode& success)
: fLocale(Locale::getDefault()), // Uses the default locale
msgPattern(success),
- formatAliases(NULL),
+ formatAliases(nullptr),
formatAliasesCapacity(0),
- argTypes(NULL),
+ argTypes(nullptr),
argTypeCount(0),
argTypeCapacity(0),
- hasArgTypeConflicts(FALSE),
- defaultNumberFormat(NULL),
- defaultDateFormat(NULL),
- cachedFormatters(NULL),
- customFormatArgStarts(NULL),
+ hasArgTypeConflicts(false),
+ defaultNumberFormat(nullptr),
+ defaultDateFormat(nullptr),
+ cachedFormatters(nullptr),
+ customFormatArgStarts(nullptr),
pluralProvider(*this, UPLURAL_TYPE_CARDINAL),
ordinalProvider(*this, UPLURAL_TYPE_ORDINAL)
{
@@ -256,16 +256,16 @@ MessageFormat::MessageFormat(const UnicodeString& pattern,
UErrorCode& success)
: fLocale(newLocale),
msgPattern(success),
- formatAliases(NULL),
+ formatAliases(nullptr),
formatAliasesCapacity(0),
- argTypes(NULL),
+ argTypes(nullptr),
argTypeCount(0),
argTypeCapacity(0),
- hasArgTypeConflicts(FALSE),
- defaultNumberFormat(NULL),
- defaultDateFormat(NULL),
- cachedFormatters(NULL),
- customFormatArgStarts(NULL),
+ hasArgTypeConflicts(false),
+ defaultNumberFormat(nullptr),
+ defaultDateFormat(nullptr),
+ cachedFormatters(nullptr),
+ customFormatArgStarts(nullptr),
pluralProvider(*this, UPLURAL_TYPE_CARDINAL),
ordinalProvider(*this, UPLURAL_TYPE_ORDINAL)
{
@@ -279,16 +279,16 @@ MessageFormat::MessageFormat(const UnicodeString& pattern,
UErrorCode& success)
: fLocale(newLocale),
msgPattern(success),
- formatAliases(NULL),
+ formatAliases(nullptr),
formatAliasesCapacity(0),
- argTypes(NULL),
+ argTypes(nullptr),
argTypeCount(0),
argTypeCapacity(0),
- hasArgTypeConflicts(FALSE),
- defaultNumberFormat(NULL),
- defaultDateFormat(NULL),
- cachedFormatters(NULL),
- customFormatArgStarts(NULL),
+ hasArgTypeConflicts(false),
+ defaultNumberFormat(nullptr),
+ defaultDateFormat(nullptr),
+ cachedFormatters(nullptr),
+ customFormatArgStarts(nullptr),
pluralProvider(*this, UPLURAL_TYPE_CARDINAL),
ordinalProvider(*this, UPLURAL_TYPE_ORDINAL)
{
@@ -301,20 +301,20 @@ MessageFormat::MessageFormat(const MessageFormat& that)
Format(that),
fLocale(that.fLocale),
msgPattern(that.msgPattern),
- formatAliases(NULL),
+ formatAliases(nullptr),
formatAliasesCapacity(0),
- argTypes(NULL),
+ argTypes(nullptr),
argTypeCount(0),
argTypeCapacity(0),
hasArgTypeConflicts(that.hasArgTypeConflicts),
- defaultNumberFormat(NULL),
- defaultDateFormat(NULL),
- cachedFormatters(NULL),
- customFormatArgStarts(NULL),
+ defaultNumberFormat(nullptr),
+ defaultDateFormat(nullptr),
+ cachedFormatters(nullptr),
+ customFormatArgStarts(nullptr),
pluralProvider(*this, UPLURAL_TYPE_CARDINAL),
ordinalProvider(*this, UPLURAL_TYPE_ORDINAL)
{
- // This will take care of creating the hash tables (since they are NULL).
+ // This will take care of creating the hash tables (since they are nullptr).
UErrorCode ec = U_ZERO_ERROR;
copyObjects(that, ec);
if (U_FAILURE(ec)) {
@@ -338,17 +338,17 @@ MessageFormat::~MessageFormat()
/**
* Allocate argTypes[] to at least the given capacity and return
- * TRUE if successful. If not, leave argTypes[] unchanged.
+ * true if successful. If not, leave argTypes[] unchanged.
*
- * If argTypes is NULL, allocate it. If it is not NULL, enlarge it
+ * If argTypes is nullptr, allocate it. If it is not nullptr, enlarge it
* if necessary to be at least as large as specified.
*/
UBool MessageFormat::allocateArgTypes(int32_t capacity, UErrorCode& status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (argTypeCapacity >= capacity) {
- return TRUE;
+ return true;
}
if (capacity < DEFAULT_INITIAL_CAPACITY) {
capacity = DEFAULT_INITIAL_CAPACITY;
@@ -357,13 +357,13 @@ UBool MessageFormat::allocateArgTypes(int32_t capacity, UErrorCode& status) {
}
Formattable::Type* a = (Formattable::Type*)
uprv_realloc(argTypes, sizeof(*argTypes) * capacity);
- if (a == NULL) {
+ if (a == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
argTypes = a;
argTypeCapacity = capacity;
- return TRUE;
+ return true;
}
// -------------------------------------
@@ -394,20 +394,20 @@ MessageFormat::operator==(const Format& rhs) const
{
if (this == &rhs) return true;
- MessageFormat& that = (MessageFormat&)rhs;
-
// Check class ID before checking MessageFormat members
- if (!Format::operator==(rhs) ||
- msgPattern != that.msgPattern ||
+ if (!Format::operator==(rhs)) return false;
+
+ const MessageFormat& that = static_cast<const MessageFormat&>(rhs);
+ if (msgPattern != that.msgPattern ||
fLocale != that.fLocale) {
return false;
}
// Compare hashtables.
- if ((customFormatArgStarts == NULL) != (that.customFormatArgStarts == NULL)) {
+ if ((customFormatArgStarts == nullptr) != (that.customFormatArgStarts == nullptr)) {
return false;
}
- if (customFormatArgStarts == NULL) {
+ if (customFormatArgStarts == nullptr) {
return true;
}
@@ -450,9 +450,9 @@ MessageFormat::setLocale(const Locale& theLocale)
{
if (fLocale != theLocale) {
delete defaultNumberFormat;
- defaultNumberFormat = NULL;
+ defaultNumberFormat = nullptr;
delete defaultDateFormat;
- defaultDateFormat = NULL;
+ defaultDateFormat = nullptr;
fLocale = theLocale;
setLocaleIDs(fLocale.getName(), fLocale.getName());
pluralProvider.reset();
@@ -500,11 +500,11 @@ MessageFormat::applyPattern(const UnicodeString& pattern,
void MessageFormat::resetPattern() {
msgPattern.clear();
uhash_close(cachedFormatters);
- cachedFormatters = NULL;
+ cachedFormatters = nullptr;
uhash_close(customFormatArgStarts);
- customFormatArgStarts = NULL;
+ customFormatArgStarts = nullptr;
argTypeCount = 0;
- hasArgTypeConflicts = FALSE;
+ hasArgTypeConflicts = false;
}
void
@@ -515,7 +515,8 @@ MessageFormat::applyPattern(const UnicodeString& pattern,
if (aposMode != msgPattern.getApostropheMode()) {
msgPattern.clearPatternAndSetApostropheMode(aposMode);
}
- applyPattern(pattern, *parseError, status);
+ UParseError tempParseError;
+ applyPattern(pattern, (parseError == nullptr) ? tempParseError : *parseError, status);
}
// -------------------------------------
@@ -523,7 +524,7 @@ MessageFormat::applyPattern(const UnicodeString& pattern,
UnicodeString&
MessageFormat::toPattern(UnicodeString& appendTo) const {
- if ((customFormatArgStarts != NULL && 0 != uhash_count(customFormatArgStarts)) ||
+ if ((customFormatArgStarts != nullptr && 0 != uhash_count(customFormatArgStarts)) ||
0 == msgPattern.countParts()
) {
appendTo.setToBogus();
@@ -554,7 +555,7 @@ void MessageFormat::setArgStartFormat(int32_t argStart,
delete formatter;
return;
}
- if (cachedFormatters == NULL) {
+ if (cachedFormatters == nullptr) {
cachedFormatters=uhash_open(uhash_hashLong, uhash_compareLong,
equalFormatsForHash, &status);
if (U_FAILURE(status)) {
@@ -563,7 +564,7 @@ void MessageFormat::setArgStartFormat(int32_t argStart,
}
uhash_setValueDeleter(cachedFormatters, uprv_deleteUObject);
}
- if (formatter == NULL) {
+ if (formatter == nullptr) {
formatter = new DummyFormat();
}
uhash_iput(cachedFormatters, argStart, formatter, &status);
@@ -583,23 +584,23 @@ void MessageFormat::setCustomArgStartFormat(int32_t argStart,
Format* formatter,
UErrorCode& status) {
setArgStartFormat(argStart, formatter, status);
- if (customFormatArgStarts == NULL) {
+ if (customFormatArgStarts == nullptr) {
customFormatArgStarts=uhash_open(uhash_hashLong, uhash_compareLong,
- NULL, &status);
+ nullptr, &status);
}
uhash_iputi(customFormatArgStarts, argStart, 1, &status);
}
Format* MessageFormat::getCachedFormatter(int32_t argumentNumber) const {
- if (cachedFormatters == NULL) {
- return NULL;
+ if (cachedFormatters == nullptr) {
+ return nullptr;
}
void* ptr = uhash_iget(cachedFormatters, argumentNumber);
- if (ptr != NULL && dynamic_cast<DummyFormat*>((Format*)ptr) == NULL) {
+ if (ptr != nullptr && dynamic_cast<DummyFormat*>((Format*)ptr) == nullptr) {
return (Format*) ptr;
} else {
- // Not cached, or a DummyFormat representing setFormat(NULL).
- return NULL;
+ // Not cached, or a DummyFormat representing setFormat(nullptr).
+ return nullptr;
}
}
@@ -609,14 +610,14 @@ Format* MessageFormat::getCachedFormatter(int32_t argumentNumber) const {
void
MessageFormat::adoptFormats(Format** newFormats,
int32_t count) {
- if (newFormats == NULL || count < 0) {
+ if (newFormats == nullptr || count < 0) {
return;
}
// Throw away any cached formatters.
- if (cachedFormatters != NULL) {
+ if (cachedFormatters != nullptr) {
uhash_removeAll(cachedFormatters);
}
- if (customFormatArgStarts != NULL) {
+ if (customFormatArgStarts != nullptr) {
uhash_removeAll(customFormatArgStarts);
}
@@ -642,14 +643,14 @@ MessageFormat::adoptFormats(Format** newFormats,
void
MessageFormat::setFormats(const Format** newFormats,
int32_t count) {
- if (newFormats == NULL || count < 0) {
+ if (newFormats == nullptr || count < 0) {
return;
}
// Throw away any cached formatters.
- if (cachedFormatters != NULL) {
+ if (cachedFormatters != nullptr) {
uhash_removeAll(cachedFormatters);
}
- if (customFormatArgStarts != NULL) {
+ if (customFormatArgStarts != nullptr) {
uhash_removeAll(customFormatArgStarts);
}
@@ -657,10 +658,10 @@ MessageFormat::setFormats(const Format** newFormats,
int32_t formatNumber = 0;
for (int32_t partIndex = 0;
formatNumber < count && U_SUCCESS(status) && (partIndex = nextTopLevelArgStart(partIndex)) >= 0;) {
- Format* newFormat = NULL;
- if (newFormats[formatNumber] != NULL) {
+ Format* newFormat = nullptr;
+ if (newFormats[formatNumber] != nullptr) {
newFormat = newFormats[formatNumber]->clone();
- if (newFormat == NULL) {
+ if (newFormat == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -715,11 +716,11 @@ MessageFormat::adoptFormat(const UnicodeString& formatName,
Format* f;
if (p.isValid()) {
f = p.orphan();
- } else if (formatToAdopt == NULL) {
- f = NULL;
+ } else if (formatToAdopt == nullptr) {
+ f = nullptr;
} else {
f = formatToAdopt->clone();
- if (f == NULL) {
+ if (f == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -757,19 +758,19 @@ MessageFormat::setFormat(int32_t n, const Format& newFormat) {
// Do nothing if the variable is not less than the array count.
Format *
MessageFormat::getFormat(const UnicodeString& formatName, UErrorCode& status) {
- if (U_FAILURE(status) || cachedFormatters == NULL) return NULL;
+ if (U_FAILURE(status) || cachedFormatters == nullptr) return nullptr;
int32_t argNumber = MessagePattern::validateArgumentName(formatName);
if (argNumber < UMSGPAT_ARG_NAME_NOT_NUMBER) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
for (int32_t partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0;) {
if (argNameMatches(partIndex + 1, formatName, argNumber)) {
return getCachedFormatter(partIndex);
}
}
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -791,7 +792,7 @@ MessageFormat::setFormat(const UnicodeString& formatName,
) {
if (argNameMatches(partIndex + 1, formatName, argNumber)) {
Format* new_format = newFormat.clone();
- if (new_format == NULL) {
+ if (new_format == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -852,21 +853,23 @@ UnicodeString MessageFormat::getArgName(int32_t partIndex) {
StringEnumeration*
MessageFormat::getFormatNames(UErrorCode& status) {
- if (U_FAILURE(status)) return NULL;
+ if (U_FAILURE(status)) return nullptr;
- UVector *fFormatNames = new UVector(status);
+ LocalPointer<UVector> formatNames(new UVector(status), status);
if (U_FAILURE(status)) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- fFormatNames->setDeleter(uprv_deleteUObject);
+ formatNames->setDeleter(uprv_deleteUObject);
for (int32_t partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0;) {
- fFormatNames->addElementX(new UnicodeString(getArgName(partIndex + 1)), status);
+ LocalPointer<UnicodeString> name(getArgName(partIndex + 1).clone(), status);
+ formatNames->adoptElement(name.orphan(), status);
+ if (U_FAILURE(status)) return nullptr;
}
- StringEnumeration* nameEnumerator = new FormatNameEnumeration(fFormatNames, status);
- return nameEnumerator;
+ LocalPointer<StringEnumeration> nameEnumerator(
+ new FormatNameEnumeration(std::move(formatNames), status), status);
+ return U_SUCCESS(status) ? nameEnumerator.orphan() : nullptr;
}
// -------------------------------------
@@ -880,7 +883,7 @@ MessageFormat::format(const Formattable* source,
FieldPosition& ignore,
UErrorCode& success) const
{
- return format(source, NULL, cnt, appendTo, &ignore, success);
+ return format(source, nullptr, cnt, appendTo, &ignore, success);
}
// -------------------------------------
@@ -896,7 +899,7 @@ MessageFormat::format( const UnicodeString& pattern,
UErrorCode& success)
{
MessageFormat temp(pattern, success);
- return temp.format(arguments, NULL, cnt, appendTo, NULL, success);
+ return temp.format(arguments, nullptr, cnt, appendTo, nullptr, success);
}
// -------------------------------------
@@ -918,7 +921,7 @@ MessageFormat::format(const Formattable& source,
}
int32_t cnt;
const Formattable* tmpPtr = source.getArray(cnt);
- return format(tmpPtr, NULL, cnt, appendTo, &ignore, success);
+ return format(tmpPtr, nullptr, cnt, appendTo, &ignore, success);
}
UnicodeString&
@@ -927,7 +930,7 @@ MessageFormat::format(const UnicodeString* argumentNames,
int32_t count,
UnicodeString& appendTo,
UErrorCode& success) const {
- return format(arguments, argumentNames, count, appendTo, NULL, success);
+ return format(arguments, argumentNames, count, appendTo, nullptr, success);
}
// Does linear search to find the match for an ArgName.
@@ -939,7 +942,7 @@ const Formattable* MessageFormat::getArgFromListByName(const Formattable* argume
return arguments + i;
}
}
- return NULL;
+ return nullptr;
}
@@ -956,7 +959,7 @@ MessageFormat::format(const Formattable* arguments,
UnicodeStringAppendable usapp(appendTo);
AppendableWrapper app(usapp);
- format(0, NULL, arguments, argumentNames, cnt, app, pos, status);
+ format(0, nullptr, arguments, argumentNames, cnt, app, pos, status);
return appendTo;
}
@@ -971,7 +974,7 @@ public:
PluralSelectorContext(int32_t start, const UnicodeString &name,
const Formattable &num, double off, UErrorCode &errorCode)
: startIndex(start), argName(name), offset(off),
- numberArgIndex(-1), formatter(NULL), forReplaceNumber(FALSE) {
+ numberArgIndex(-1), formatter(nullptr), forReplaceNumber(false) {
// number needs to be set even when select() is not called.
// Keep it as a Number/Formattable:
// For format() methods, and to preserve information (e.g., BigDecimal).
@@ -994,14 +997,14 @@ public:
const Format *formatter;
/** formatted argument number - plural offset */
UnicodeString numberString;
- /** TRUE if number-offset was formatted with the stock number formatter */
+ /** true if number-offset was formatted with the stock number formatter */
UBool forReplaceNumber;
};
} // namespace
-// if argumentNames is NULL, this means arguments is a numeric array.
-// arguments can not be NULL.
+// if argumentNames is nullptr, this means arguments is a numeric array.
+// arguments can not be nullptr.
// We use const void *plNumber rather than const PluralSelectorContext *pluralNumber
// so that we need not declare the PluralSelectorContext in the public header file.
void MessageFormat::format(int32_t msgStart, const void *plNumber,
@@ -1046,31 +1049,31 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber,
UMessagePatternArgType argType = part->getArgType();
part = &msgPattern.getPart(++i);
const Formattable* arg;
- UBool noArg = FALSE;
+ UBool noArg = false;
UnicodeString argName = msgPattern.getSubstring(*part);
- if (argumentNames == NULL) {
+ if (argumentNames == nullptr) {
int32_t argNumber = part->getValue(); // ARG_NUMBER
if (0 <= argNumber && argNumber < cnt) {
arg = arguments + argNumber;
} else {
- arg = NULL;
- noArg = TRUE;
+ arg = nullptr;
+ noArg = true;
}
} else {
arg = getArgFromListByName(arguments, argumentNames, cnt, argName);
- if (arg == NULL) {
- noArg = TRUE;
+ if (arg == nullptr) {
+ noArg = true;
}
}
++i;
int32_t prevDestLength = appendTo.length();
- const Format* formatter = NULL;
+ const Format* formatter = nullptr;
if (noArg) {
appendTo.append(
UnicodeString(LEFT_CURLY_BRACE).append(argName).append(RIGHT_CURLY_BRACE));
- } else if (arg == NULL) {
+ } else if (arg == nullptr) {
appendTo.append(NULL_STRING, 4);
- } else if(plNumber!=NULL &&
+ } else if(plNumber!=nullptr &&
static_cast<const PluralSelectorContext *>(plNumber)->numberArgIndex==(i-2)) {
const PluralSelectorContext &pluralNumber =
*static_cast<const PluralSelectorContext *>(plNumber);
@@ -1097,7 +1100,7 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber,
(subMsgString.indexOf(SINGLE_QUOTE) >= 0 && !MessageImpl::jdkAposMode(msgPattern))
) {
MessageFormat subMsgFormat(subMsgString, fLocale, success);
- subMsgFormat.format(0, NULL, arguments, argumentNames, cnt, appendTo, ignore, success);
+ subMsgFormat.format(0, nullptr, arguments, argumentNames, cnt, appendTo, ignore, success);
} else {
appendTo.append(subMsgString);
}
@@ -1105,7 +1108,7 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber,
appendTo.formatAndAppend(formatter, *arg, success);
}
} else if (argType == UMSGPAT_ARG_TYPE_NONE || (cachedFormatters && uhash_iget(cachedFormatters, i - 2))) {
- // We arrive here if getCachedFormatter returned NULL, but there was actually an element in the hash table.
+ // We arrive here if getCachedFormatter returned nullptr, but there was actually an element in the hash table.
// This can only happen if the hash table contained a DummyFormat, so the if statement above is a check
// for the hash table containing DummyFormat.
if (arg->isNumeric()) {
@@ -1126,7 +1129,7 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber,
// because only this one converts non-double numeric types to double.
const double number = arg->getDouble(success);
int32_t subMsgStart = ChoiceFormat::findSubMessage(msgPattern, i, number);
- formatComplexSubMessage(subMsgStart, NULL, arguments, argumentNames,
+ formatComplexSubMessage(subMsgStart, nullptr, arguments, argumentNames,
cnt, appendTo, success);
} else if (UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType)) {
if (!arg->isNumeric()) {
@@ -1145,7 +1148,7 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber,
cnt, appendTo, success);
} else if (argType == UMSGPAT_ARG_TYPE_SELECT) {
int32_t subMsgStart = SelectFormat::findSubMessage(msgPattern, i, arg->getString(success), success);
- formatComplexSubMessage(subMsgStart, NULL, arguments, argumentNames,
+ formatComplexSubMessage(subMsgStart, nullptr, arguments, argumentNames,
cnt, appendTo, success);
} else {
// This should never happen.
@@ -1171,7 +1174,7 @@ void MessageFormat::formatComplexSubMessage(int32_t msgStart,
}
if (!MessageImpl::jdkAposMode(msgPattern)) {
- format(msgStart, plNumber, arguments, argumentNames, cnt, appendTo, NULL, success);
+ format(msgStart, plNumber, arguments, argumentNames, cnt, appendTo, nullptr, success);
return;
}
@@ -1216,8 +1219,8 @@ void MessageFormat::formatComplexSubMessage(int32_t msgStart,
if (sb.indexOf(LEFT_CURLY_BRACE) >= 0) {
UnicodeString emptyPattern; // gcc 3.3.3 fails with "UnicodeString()" as the first parameter.
MessageFormat subMsgFormat(emptyPattern, fLocale, success);
- subMsgFormat.applyPattern(sb, UMSGPAT_APOS_DOUBLE_REQUIRED, NULL, success);
- subMsgFormat.format(0, NULL, arguments, argumentNames, cnt, appendTo, NULL, success);
+ subMsgFormat.applyPattern(sb, UMSGPAT_APOS_DOUBLE_REQUIRED, nullptr, success);
+ subMsgFormat.format(0, nullptr, arguments, argumentNames, cnt, appendTo, nullptr, success);
} else {
appendTo.append(sb);
}
@@ -1246,12 +1249,12 @@ UnicodeString MessageFormat::getLiteralStringUntilNextArgument(int32_t from) con
FieldPosition* MessageFormat::updateMetaData(AppendableWrapper& /*dest*/, int32_t /*prevLength*/,
FieldPosition* /*fp*/, const Formattable* /*argId*/) const {
// Unlike in Java, there are no field attributes defined for MessageFormat. Do nothing.
- return NULL;
+ return nullptr;
/*
- if (fp != NULL && Field.ARGUMENT.equals(fp.getFieldAttribute())) {
+ if (fp != nullptr && Field.ARGUMENT.equals(fp.getFieldAttribute())) {
fp->setBeginIndex(prevLength);
fp->setEndIndex(dest.get_length());
- return NULL;
+ return nullptr;
}
return fp;
*/
@@ -1266,7 +1269,7 @@ MessageFormat::findOtherSubMessage(int32_t partIndex) const {
}
// Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples
// until ARG_LIMIT or end of plural-only pattern.
- UnicodeString other(FALSE, OTHER_STRING, 5);
+ UnicodeString other(false, OTHER_STRING, 5);
do {
part=&msgPattern.getPart(partIndex++);
UMessagePatternPartType type=part->getType();
@@ -1323,14 +1326,14 @@ void MessageFormat::copyObjects(const MessageFormat& that, UErrorCode& ec) {
}
uprv_memcpy(argTypes, that.argTypes, argTypeCount * sizeof(argTypes[0]));
}
- if (cachedFormatters != NULL) {
+ if (cachedFormatters != nullptr) {
uhash_removeAll(cachedFormatters);
}
- if (customFormatArgStarts != NULL) {
+ if (customFormatArgStarts != nullptr) {
uhash_removeAll(customFormatArgStarts);
}
if (that.cachedFormatters) {
- if (cachedFormatters == NULL) {
+ if (cachedFormatters == nullptr) {
cachedFormatters=uhash_open(uhash_hashLong, uhash_compareLong,
equalFormatsForHash, &ec);
if (U_FAILURE(ec)) {
@@ -1353,9 +1356,9 @@ void MessageFormat::copyObjects(const MessageFormat& that, UErrorCode& ec) {
}
}
if (that.customFormatArgStarts) {
- if (customFormatArgStarts == NULL) {
+ if (customFormatArgStarts == nullptr) {
customFormatArgStarts=uhash_open(uhash_hashLong, uhash_compareLong,
- NULL, &ec);
+ nullptr, &ec);
}
const int32_t count = uhash_count(that.customFormatArgStarts);
int32_t pos, idx;
@@ -1376,13 +1379,13 @@ MessageFormat::parse(int32_t msgStart,
count = 0;
if (U_FAILURE(ec)) {
pos.setErrorIndex(pos.getIndex());
- return NULL;
+ return nullptr;
}
// parse() does not work with named arguments.
if (msgPattern.hasNamedArguments()) {
ec = U_ARGUMENT_TYPE_MISMATCH;
pos.setErrorIndex(pos.getIndex());
- return NULL;
+ return nullptr;
}
LocalArray<Formattable> resultArray(new Formattable[argTypeCount ? argTypeCount : 1]);
const UnicodeString& msgString=msgPattern.getPatternString();
@@ -1391,7 +1394,7 @@ MessageFormat::parse(int32_t msgStart,
ParsePosition tempStatus(0);
for(int32_t i=msgStart+1; ; ++i) {
- UBool haveArgResult = FALSE;
+ UBool haveArgResult = false;
const MessagePattern::Part* part=&msgPattern.getPart(i);
const UMessagePatternPartType type=part->getType();
int32_t index=part->getIndex();
@@ -1402,7 +1405,7 @@ MessageFormat::parse(int32_t msgStart,
prevIndex += len;
} else {
pos.setErrorIndex(sourceOffset);
- return NULL; // leave index as is to signal error
+ return nullptr; // leave index as is to signal error
}
if(type==UMSGPAT_PART_TYPE_MSG_LIMIT) {
// Things went well! Done.
@@ -1423,22 +1426,22 @@ MessageFormat::parse(int32_t msgStart,
int32_t argNumber = part->getValue(); // ARG_NUMBER
UnicodeString key;
++i;
- const Format* formatter = NULL;
+ const Format* formatter = nullptr;
Formattable& argResult = resultArray[argNumber];
- if(cachedFormatters!=NULL && (formatter = getCachedFormatter(i - 2))!=NULL) {
+ if(cachedFormatters!=nullptr && (formatter = getCachedFormatter(i - 2))!=nullptr) {
// Just parse using the formatter.
tempStatus.setIndex(sourceOffset);
formatter->parseObject(source, argResult, tempStatus);
if (tempStatus.getIndex() == sourceOffset) {
pos.setErrorIndex(sourceOffset);
- return NULL; // leave index as is to signal error
+ return nullptr; // leave index as is to signal error
}
sourceOffset = tempStatus.getIndex();
- haveArgResult = TRUE;
+ haveArgResult = true;
} else if(
argType==UMSGPAT_ARG_TYPE_NONE || (cachedFormatters && uhash_iget(cachedFormatters, i -2))) {
- // We arrive here if getCachedFormatter returned NULL, but there was actually an element in the hash table.
+ // We arrive here if getCachedFormatter returned nullptr, but there was actually an element in the hash table.
// This can only happen if the hash table contained a DummyFormat, so the if statement above is a check
// for the hash table containing DummyFormat.
@@ -1455,7 +1458,7 @@ MessageFormat::parse(int32_t msgStart,
}
if (next < 0) {
pos.setErrorIndex(sourceOffset);
- return NULL; // leave index as is to signal error
+ return nullptr; // leave index as is to signal error
} else {
UnicodeString strValue(source.tempSubString(sourceOffset, next - sourceOffset));
UnicodeString compValue;
@@ -1464,7 +1467,7 @@ MessageFormat::parse(int32_t msgStart,
compValue.append(RIGHT_CURLY_BRACE);
if (0 != strValue.compare(compValue)) {
argResult.setString(strValue);
- haveArgResult = TRUE;
+ haveArgResult = true;
}
sourceOffset = next;
}
@@ -1473,19 +1476,19 @@ MessageFormat::parse(int32_t msgStart,
double choiceResult = ChoiceFormat::parseArgument(msgPattern, i, source, tempStatus);
if (tempStatus.getIndex() == sourceOffset) {
pos.setErrorIndex(sourceOffset);
- return NULL; // leave index as is to signal error
+ return nullptr; // leave index as is to signal error
}
argResult.setDouble(choiceResult);
- haveArgResult = TRUE;
+ haveArgResult = true;
sourceOffset = tempStatus.getIndex();
} else if(UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) || argType==UMSGPAT_ARG_TYPE_SELECT) {
// Parsing not supported.
ec = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
} else {
// This should never happen.
ec = U_INTERNAL_PROGRAM_ERROR;
- return NULL;
+ return nullptr;
}
if (haveArgResult && count <= argNumber) {
count = argNumber + 1;
@@ -1519,7 +1522,7 @@ MessageFormat::parse(const UnicodeString& source,
{
if (msgPattern.hasNamedArguments()) {
success = U_ARGUMENT_TYPE_MISMATCH;
- return NULL;
+ return nullptr;
}
ParsePosition status(0);
// Calls the actual implementation method and starts
@@ -1528,7 +1531,7 @@ MessageFormat::parse(const UnicodeString& source,
if (status.getIndex() == 0) {
success = U_MESSAGE_PARSE_ERROR;
delete[] result;
- return NULL;
+ return nullptr;
}
return result;
}
@@ -1543,7 +1546,7 @@ MessageFormat::parseObject( const UnicodeString& source,
{
int32_t cnt = 0;
Formattable* tmpResult = parse(source, status, cnt);
- if (tmpResult != NULL)
+ if (tmpResult != nullptr)
result.adoptArray(tmpResult, cnt);
}
@@ -1552,10 +1555,10 @@ MessageFormat::autoQuoteApostrophe(const UnicodeString& pattern, UErrorCode& sta
UnicodeString result;
if (U_SUCCESS(status)) {
int32_t plen = pattern.length();
- const UChar* pat = pattern.getBuffer();
+ const char16_t* pat = pattern.getBuffer();
int32_t blen = plen * 2 + 1; // space for null termination, convenience
- UChar* buf = result.getBuffer(blen);
- if (buf == NULL) {
+ char16_t* buf = result.getBuffer(blen);
+ if (buf == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
int32_t len = umsg_autoQuoteApostrophe(pat, plen, buf, blen, &status);
@@ -1572,7 +1575,7 @@ MessageFormat::autoQuoteApostrophe(const UnicodeString& pattern, UErrorCode& sta
static Format* makeRBNF(URBNFRuleSetTag tag, const Locale& locale, const UnicodeString& defaultRuleSet, UErrorCode& ec) {
RuleBasedNumberFormat* fmt = new RuleBasedNumberFormat(tag, locale, ec);
- if (fmt == NULL) {
+ if (fmt == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
} else if (U_SUCCESS(ec) && defaultRuleSet.length() > 0) {
UErrorCode localStatus = U_ZERO_ERROR; // ignore unrecognized default rule set
@@ -1586,10 +1589,10 @@ void MessageFormat::cacheExplicitFormats(UErrorCode& status) {
return;
}
- if (cachedFormatters != NULL) {
+ if (cachedFormatters != nullptr) {
uhash_removeAll(cachedFormatters);
}
- if (customFormatArgStarts != NULL) {
+ if (customFormatArgStarts != nullptr) {
uhash_removeAll(customFormatArgStarts);
}
@@ -1620,7 +1623,7 @@ void MessageFormat::cacheExplicitFormats(UErrorCode& status) {
for (int32_t i = 0; i < argTypeCount; ++i) {
argTypes[i] = Formattable::kObject;
}
- hasArgTypeConflicts = FALSE;
+ hasArgTypeConflicts = false;
// This loop starts at part index 1 because we do need to examine
// ARG_START parts. (But we can ignore the MSG_START.)
@@ -1671,7 +1674,7 @@ void MessageFormat::cacheExplicitFormats(UErrorCode& status) {
}
if (argNumber != -1) {
if (argTypes[argNumber] != Formattable::kObject && argTypes[argNumber] != formattableType) {
- hasArgTypeConflicts = TRUE;
+ hasArgTypeConflicts = true;
}
argTypes[argNumber] = formattableType;
}
@@ -1682,9 +1685,9 @@ Format* MessageFormat::createAppropriateFormat(UnicodeString& type, UnicodeStrin
Formattable::Type& formattableType, UParseError& parseError,
UErrorCode& ec) {
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
- Format* fmt = NULL;
+ Format* fmt = nullptr;
int32_t typeID, styleID;
DateFormat::EStyle date_style;
int32_t firstNonSpace;
@@ -1745,9 +1748,9 @@ Format* MessageFormat::createAppropriateFormat(UnicodeString& type, UnicodeStrin
fmt = DateFormat::createTimeInstance(date_style, fLocale);
}
- if (styleID < 0 && fmt != NULL) {
+ if (styleID < 0 && fmt != nullptr) {
SimpleDateFormat* sdtfmt = dynamic_cast<SimpleDateFormat*>(fmt);
- if (sdtfmt != NULL) {
+ if (sdtfmt != nullptr) {
sdtfmt->applyPattern(style);
}
}
@@ -1779,15 +1782,15 @@ Format* MessageFormat::createAppropriateFormat(UnicodeString& type, UnicodeStrin
//-------------------------------------
// Finds the string, s, in the string array, list.
int32_t MessageFormat::findKeyword(const UnicodeString& s,
- const UChar * const *list)
+ const char16_t * const *list)
{
if (s.isEmpty()) {
return 0; // default
}
int32_t length = s.length();
- const UChar *ps = PatternProps::trimWhiteSpace(s.getBuffer(), length);
- UnicodeString buffer(FALSE, ps, length);
+ const char16_t *ps = PatternProps::trimWhiteSpace(s.getBuffer(), length);
+ UnicodeString buffer(false, ps, length);
// Trims the space characters and turns all characters
// in s to lower case.
buffer.toLower("");
@@ -1806,10 +1809,10 @@ NumberFormat*
MessageFormat::createIntegerFormat(const Locale& locale, UErrorCode& status) const {
NumberFormat *temp = NumberFormat::createInstance(locale, status);
DecimalFormat *temp2;
- if (temp != NULL && (temp2 = dynamic_cast<DecimalFormat*>(temp)) != NULL) {
+ if (temp != nullptr && (temp2 = dynamic_cast<DecimalFormat*>(temp)) != nullptr) {
temp2->setMaximumFractionDigits(0);
- temp2->setDecimalSeparatorAlwaysShown(FALSE);
- temp2->setParseIntegerOnly(TRUE);
+ temp2->setDecimalSeparatorAlwaysShown(false);
+ temp2->setParseIntegerOnly(true);
}
return temp;
@@ -1817,19 +1820,19 @@ MessageFormat::createIntegerFormat(const Locale& locale, UErrorCode& status) con
/**
* Return the default number format. Used to format a numeric
- * argument when subformats[i].format is NULL. Returns NULL
+ * argument when subformats[i].format is nullptr. Returns nullptr
* on failure.
*
* Semantically const but may modify *this.
*/
const NumberFormat* MessageFormat::getDefaultNumberFormat(UErrorCode& ec) const {
- if (defaultNumberFormat == NULL) {
+ if (defaultNumberFormat == nullptr) {
MessageFormat* t = (MessageFormat*) this;
t->defaultNumberFormat = NumberFormat::createInstance(fLocale, ec);
if (U_FAILURE(ec)) {
delete t->defaultNumberFormat;
- t->defaultNumberFormat = NULL;
- } else if (t->defaultNumberFormat == NULL) {
+ t->defaultNumberFormat = nullptr;
+ } else if (t->defaultNumberFormat == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -1838,16 +1841,16 @@ const NumberFormat* MessageFormat::getDefaultNumberFormat(UErrorCode& ec) const
/**
* Return the default date format. Used to format a date
- * argument when subformats[i].format is NULL. Returns NULL
+ * argument when subformats[i].format is nullptr. Returns nullptr
* on failure.
*
* Semantically const but may modify *this.
*/
const DateFormat* MessageFormat::getDefaultDateFormat(UErrorCode& ec) const {
- if (defaultDateFormat == NULL) {
+ if (defaultDateFormat == nullptr) {
MessageFormat* t = (MessageFormat*) this;
t->defaultDateFormat = DateFormat::createDateTimeInstance(DateFormat::kShort, DateFormat::kShort, fLocale);
- if (t->defaultDateFormat == NULL) {
+ if (t->defaultDateFormat == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -1912,9 +1915,9 @@ void MessageFormat::DummyFormat::parseObject(const UnicodeString&,
}
-FormatNameEnumeration::FormatNameEnumeration(UVector *fNameList, UErrorCode& /*status*/) {
+FormatNameEnumeration::FormatNameEnumeration(LocalPointer<UVector> nameList, UErrorCode& /*status*/) {
pos=0;
- fFormatNames = fNameList;
+ fFormatNames = std::move(nameList);
}
const UnicodeString*
@@ -1922,7 +1925,7 @@ FormatNameEnumeration::snext(UErrorCode& status) {
if (U_SUCCESS(status) && pos < fFormatNames->size()) {
return (const UnicodeString*)fFormatNames->elementAt(pos++);
}
- return NULL;
+ return nullptr;
}
void
@@ -1932,15 +1935,14 @@ FormatNameEnumeration::reset(UErrorCode& /*status*/) {
int32_t
FormatNameEnumeration::count(UErrorCode& /*status*/) const {
- return (fFormatNames==NULL) ? 0 : fFormatNames->size();
+ return (fFormatNames==nullptr) ? 0 : fFormatNames->size();
}
FormatNameEnumeration::~FormatNameEnumeration() {
- delete fFormatNames;
}
MessageFormat::PluralSelectorProvider::PluralSelectorProvider(const MessageFormat &mf, UPluralType t)
- : msgFormat(mf), rules(NULL), type(t) {
+ : msgFormat(mf), rules(nullptr), type(t) {
}
MessageFormat::PluralSelectorProvider::~PluralSelectorProvider() {
@@ -1950,13 +1952,13 @@ MessageFormat::PluralSelectorProvider::~PluralSelectorProvider() {
UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double number,
UErrorCode& ec) const {
if (U_FAILURE(ec)) {
- return UnicodeString(FALSE, OTHER_STRING, 5);
+ return UnicodeString(false, OTHER_STRING, 5);
}
MessageFormat::PluralSelectorProvider* t = const_cast<MessageFormat::PluralSelectorProvider*>(this);
- if(rules == NULL) {
+ if(rules == nullptr) {
t->rules = PluralRules::forLocale(msgFormat.fLocale, type, ec);
if (U_FAILURE(ec)) {
- return UnicodeString(FALSE, OTHER_STRING, 5);
+ return UnicodeString(false, OTHER_STRING, 5);
}
}
// Select a sub-message according to how the number is formatted,
@@ -1968,25 +1970,25 @@ UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double nu
PluralSelectorContext &context = *static_cast<PluralSelectorContext *>(ctx);
int32_t otherIndex = msgFormat.findOtherSubMessage(context.startIndex);
context.numberArgIndex = msgFormat.findFirstPluralNumberArg(otherIndex, context.argName);
- if(context.numberArgIndex > 0 && msgFormat.cachedFormatters != NULL) {
+ if(context.numberArgIndex > 0 && msgFormat.cachedFormatters != nullptr) {
context.formatter =
(const Format*)uhash_iget(msgFormat.cachedFormatters, context.numberArgIndex);
}
- if(context.formatter == NULL) {
+ if(context.formatter == nullptr) {
context.formatter = msgFormat.getDefaultNumberFormat(ec);
- context.forReplaceNumber = TRUE;
+ context.forReplaceNumber = true;
}
if (context.number.getDouble(ec) != number) {
ec = U_INTERNAL_PROGRAM_ERROR;
- return UnicodeString(FALSE, OTHER_STRING, 5);
+ return UnicodeString(false, OTHER_STRING, 5);
}
context.formatter->format(context.number, context.numberString, ec);
auto* decFmt = dynamic_cast<const DecimalFormat *>(context.formatter);
- if(decFmt != NULL) {
+ if(decFmt != nullptr) {
number::impl::DecimalQuantity dq;
decFmt->formatToDecimalQuantity(context.number, dq, ec);
if (U_FAILURE(ec)) {
- return UnicodeString(FALSE, OTHER_STRING, 5);
+ return UnicodeString(false, OTHER_STRING, 5);
}
return rules->select(dq);
} else {
@@ -1996,7 +1998,7 @@ UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double nu
void MessageFormat::PluralSelectorProvider::reset() {
delete rules;
- rules = NULL;
+ rules = nullptr;
}
diff --git a/contrib/libs/icu/i18n/msgfmt_impl.h b/contrib/libs/icu/i18n/msgfmt_impl.h
index 57988389132..84344a3a251 100644
--- a/contrib/libs/icu/i18n/msgfmt_impl.h
+++ b/contrib/libs/icu/i18n/msgfmt_impl.h
@@ -26,16 +26,16 @@ U_NAMESPACE_BEGIN
class FormatNameEnumeration : public StringEnumeration {
public:
- FormatNameEnumeration(UVector *fFormatNames, UErrorCode& status);
+ FormatNameEnumeration(LocalPointer<UVector> fFormatNames, UErrorCode& status);
virtual ~FormatNameEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
private:
int32_t pos;
- UVector *fFormatNames;
+ LocalPointer<UVector> fFormatNames;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/name2uni.cpp b/contrib/libs/icu/i18n/name2uni.cpp
index ffbbf152d33..2d26dba812c 100644
--- a/contrib/libs/icu/i18n/name2uni.cpp
+++ b/contrib/libs/icu/i18n/name2uni.cpp
@@ -29,10 +29,10 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NameUnicodeTransliterator)
-static const UChar OPEN[] = {92,78,126,123,126,0}; // "\N~{~"
-static const UChar OPEN_DELIM = 92; // '\\' first char of OPEN
-static const UChar CLOSE_DELIM = 125; // '}'
-static const UChar SPACE = 32; // ' '
+static const char16_t OPEN[] = {92,78,126,123,126,0}; // "\N~{~"
+static const char16_t OPEN_DELIM = 92; // '\\' first char of OPEN
+static const char16_t CLOSE_DELIM = 125; // '}'
+static const char16_t SPACE = 32; // ' '
U_CDECL_BEGIN
@@ -50,7 +50,7 @@ _set_addRange(USet *set, UChar32 start, UChar32 end) {
}
static void U_CALLCONV
-_set_addString(USet *set, const UChar *str, int32_t length) {
+_set_addString(USet *set, const char16_t *str, int32_t length) {
((UnicodeSet *)set)->add(UnicodeString((UBool)(length<0), str, length));
}*/
@@ -68,10 +68,10 @@ NameUnicodeTransliterator::NameUnicodeTransliterator(UnicodeFilter* adoptedFilte
USetAdder sa = {
(USet *)legalPtr, // USet* == UnicodeSet*
_set_add,
- NULL, // Don't need _set_addRange
- NULL, // Don't need _set_addString
- NULL, // Don't need remove()
- NULL
+ nullptr, // Don't need _set_addRange
+ nullptr, // Don't need _set_addString
+ nullptr, // Don't need remove()
+ nullptr
};
uprv_getCharNameCharacters(&sa);
}
@@ -111,7 +111,7 @@ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPos
UBool isIncremental) const {
// The failure mode, here and below, is to behave like Any-Null,
// if either there is no name data (max len == 0) or there is no
- // memory (malloc() => NULL).
+ // memory (malloc() => nullptr).
int32_t maxLen = uprv_getMaxCharNameLength();
if (maxLen == 0) {
@@ -122,12 +122,12 @@ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPos
// Accommodate the longest possible name
++maxLen; // allow for temporary trailing space
char* cbuf = (char*) uprv_malloc(maxLen);
- if (cbuf == NULL) {
+ if (cbuf == nullptr) {
offsets.start = offsets.limit;
return;
}
- UnicodeString openPat(TRUE, OPEN, -1);
+ UnicodeString openPat(true, OPEN, -1);
UnicodeString str, name;
int32_t cursor = offsets.start;
@@ -222,7 +222,7 @@ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPos
}
// Check if c is a legal char. We assume here that
- // legal.contains(OPEN_DELIM) is FALSE, so when we abort a
+ // legal.contains(OPEN_DELIM) is false, so when we abort a
// name, we don't have to go back to openPos+1.
if (legal.contains(c)) {
name.append(c);
diff --git a/contrib/libs/icu/i18n/nfrlist.h b/contrib/libs/icu/i18n/nfrlist.h
index 3eb1882b2f9..1864d4d3bd9 100644
--- a/contrib/libs/icu/i18n/nfrlist.h
+++ b/contrib/libs/icu/i18n/nfrlist.h
@@ -39,7 +39,7 @@ protected:
uint32_t fCapacity;
public:
NFRuleList(uint32_t capacity = 10)
- : fStuff(capacity ? (NFRule**)uprv_malloc(capacity * sizeof(NFRule*)) : NULL)
+ : fStuff(capacity ? (NFRule**)uprv_malloc(capacity * sizeof(NFRule*)) : nullptr)
, fCount(0)
, fCapacity(capacity) {}
~NFRuleList() {
@@ -50,10 +50,10 @@ public:
uprv_free(fStuff);
}
}
- NFRule* operator[](uint32_t index) const { return fStuff != NULL ? fStuff[index] : NULL; }
+ NFRule* operator[](uint32_t index) const { return fStuff != nullptr ? fStuff[index] : nullptr; }
NFRule* remove(uint32_t index) {
- if (fStuff == NULL) {
- return NULL;
+ if (fStuff == nullptr) {
+ return nullptr;
}
NFRule* result = fStuff[index];
fCount -= 1;
@@ -67,7 +67,7 @@ public:
fCapacity += 10;
fStuff = (NFRule**)uprv_realloc(fStuff, fCapacity * sizeof(NFRule*)); // assume success
}
- if (fStuff != NULL) {
+ if (fStuff != nullptr) {
fStuff[fCount++] = thing;
} else {
fCapacity = 0;
@@ -75,17 +75,17 @@ public:
}
}
uint32_t size() const { return fCount; }
- NFRule* last() const { return (fCount > 0 && fStuff != NULL) ? fStuff[fCount-1] : NULL; }
+ NFRule* last() const { return (fCount > 0 && fStuff != nullptr) ? fStuff[fCount-1] : nullptr; }
NFRule** release() {
- add(NULL); // ensure null termination
+ add(nullptr); // ensure null termination
NFRule** result = fStuff;
- fStuff = NULL;
+ fStuff = nullptr;
fCount = 0;
fCapacity = 0;
return result;
}
void deleteAll() {
- NFRule** tmp = NULL;
+ NFRule** tmp = nullptr;
int32_t size = fCount;
if (size > 0) {
tmp = release();
diff --git a/contrib/libs/icu/i18n/nfrs.cpp b/contrib/libs/icu/i18n/nfrs.cpp
index df04e33e04f..1f4b9b9d294 100644
--- a/contrib/libs/icu/i18n/nfrs.cpp
+++ b/contrib/libs/icu/i18n/nfrs.cpp
@@ -118,17 +118,17 @@ util_lcm(int64_t x, int64_t y)
}
#endif
-static const UChar gPercent = 0x0025;
-static const UChar gColon = 0x003a;
-static const UChar gSemicolon = 0x003b;
-static const UChar gLineFeed = 0x000a;
+static const char16_t gPercent = 0x0025;
+static const char16_t gColon = 0x003a;
+static const char16_t gSemicolon = 0x003b;
+static const char16_t gLineFeed = 0x000a;
-static const UChar gPercentPercent[] =
+static const char16_t gPercentPercent[] =
{
0x25, 0x25, 0
}; /* "%%" */
-static const UChar gNoparse[] =
+static const char16_t gNoparse[] =
{
0x40, 0x6E, 0x6F, 0x70, 0x61, 0x72, 0x73, 0x65, 0
}; /* "@noparse" */
@@ -138,12 +138,12 @@ NFRuleSet::NFRuleSet(RuleBasedNumberFormat *_owner, UnicodeString* descriptions,
, rules(0)
, owner(_owner)
, fractionRules()
- , fIsFractionRuleSet(FALSE)
- , fIsPublic(FALSE)
- , fIsParseable(TRUE)
+ , fIsFractionRuleSet(false)
+ , fIsPublic(false)
+ , fIsParseable(true)
{
for (int32_t i = 0; i < NON_NUMERICAL_RULE_LENGTH; ++i) {
- nonNumericalRules[i] = NULL;
+ nonNumericalRules[i] = nullptr;
}
if (U_FAILURE(status)) {
@@ -185,7 +185,7 @@ NFRuleSet::NFRuleSet(RuleBasedNumberFormat *_owner, UnicodeString* descriptions,
fIsPublic = name.indexOf(gPercentPercent, 2, 0) != 0;
if ( name.endsWith(gNoparse,8) ) {
- fIsParseable = FALSE;
+ fIsParseable = false;
name.truncate(name.length()-8); // remove the @noparse from the name
}
@@ -273,13 +273,13 @@ void NFRuleSet::setNonNumericalRule(NFRule *rule) {
nonNumericalRules[NEGATIVE_RULE_INDEX] = rule;
}
else if (baseValue == NFRule::kImproperFractionRule) {
- setBestFractionRule(IMPROPER_FRACTION_RULE_INDEX, rule, TRUE);
+ setBestFractionRule(IMPROPER_FRACTION_RULE_INDEX, rule, true);
}
else if (baseValue == NFRule::kProperFractionRule) {
- setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, TRUE);
+ setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, true);
}
else if (baseValue == NFRule::kDefaultRule) {
- setBestFractionRule(DEFAULT_RULE_INDEX, rule, TRUE);
+ setBestFractionRule(DEFAULT_RULE_INDEX, rule, true);
}
else if (baseValue == NFRule::kInfinityRule) {
delete nonNumericalRules[INFINITY_RULE_INDEX];
@@ -303,7 +303,7 @@ void NFRuleSet::setBestFractionRule(int32_t originalIndex, NFRule *newRule, UBoo
fractionRules.add(newRule);
}
NFRule *bestResult = nonNumericalRules[originalIndex];
- if (bestResult == NULL) {
+ if (bestResult == nullptr) {
nonNumericalRules[originalIndex] = newRule;
}
else {
@@ -339,9 +339,9 @@ util_equalRules(const NFRule* rule1, const NFRule* rule2)
return *rule1 == *rule2;
}
} else if (!rule2) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool
@@ -380,7 +380,7 @@ NFRuleSet::setDecimalFormatSymbols(const DecimalFormatSymbols &newSymbols, UErro
for (uint32_t fIdx = 0; fIdx < fractionRules.size(); fIdx++) {
NFRule *fractionRule = fractionRules[fIdx];
if (nonNumericalRules[nonNumericalIdx]->getBaseValue() == fractionRule->getBaseValue()) {
- setBestFractionRule(nonNumericalIdx, fractionRule, FALSE);
+ setBestFractionRule(nonNumericalIdx, fractionRule, false);
}
}
}
@@ -535,7 +535,7 @@ NFRuleSet::findNormalRule(int64_t number) const
}
}
if (hi == 0) { // bad rule set, minimum base > 0
- return NULL; // want to throw exception here
+ return nullptr; // want to throw exception here
}
NFRule *result = rules[hi - 1];
@@ -547,7 +547,7 @@ NFRuleSet::findNormalRule(int64_t number) const
// return
if (result->shouldRollBack(number)) {
if (hi == 1) { // bad rule set, no prior rule to rollback to from this base
- return NULL;
+ return nullptr;
}
result = rules[hi - 2];
}
@@ -671,7 +671,7 @@ NFRuleSet::findFractionRuleSetRule(double number) const
static void dumpUS(FILE* f, const UnicodeString& us) {
int len = us.length();
char* buf = (char *)uprv_malloc((len+1)*sizeof(char)); //new char[len+1];
- if (buf != NULL) {
+ if (buf != nullptr) {
us.extract(0, len, buf);
buf[len] = 0;
fprintf(f, "%s", buf);
@@ -860,7 +860,7 @@ static const uint8_t asciiDigits[] = {
0x77u, 0x78u, 0x79u, 0x7au,
};
-static const UChar kUMinus = (UChar)0x002d;
+static const char16_t kUMinus = (char16_t)0x002d;
#ifdef RBNF_DEBUG
static const char kMinus = '-';
@@ -910,7 +910,7 @@ int64_t util64_atoi(const char* str, uint32_t radix)
return result;
}
-int64_t util64_utoi(const UChar* str, uint32_t radix)
+int64_t util64_utoi(const char16_t* str, uint32_t radix)
{
if (radix > 36) {
radix = 36;
@@ -925,7 +925,7 @@ int64_t util64_utoi(const UChar* str, uint32_t radix)
neg = 1;
}
int64_t result = 0;
- UChar c;
+ char16_t c;
uint8_t b;
while (((c = *str++) < 0x0080) && (b = digitInfo[c]) && ((b &= 0x7f) < radix)) {
result *= lradix;
@@ -983,7 +983,7 @@ uint32_t util64_toa(int64_t w, char* buf, uint32_t len, uint32_t radix, UBool ra
}
#endif
-uint32_t util64_tou(int64_t w, UChar* buf, uint32_t len, uint32_t radix, UBool raw)
+uint32_t util64_tou(int64_t w, char16_t* buf, uint32_t len, uint32_t radix, UBool raw)
{
if (radix > 36) {
radix = 36;
@@ -992,13 +992,13 @@ uint32_t util64_tou(int64_t w, UChar* buf, uint32_t len, uint32_t radix, UBool r
}
int64_t base = radix;
- UChar* p = buf;
+ char16_t* p = buf;
if (len && (w < 0) && (radix == 10) && !raw) {
w = -w;
*p++ = kUMinus;
--len;
} else if (len && (w == 0)) {
- *p++ = (UChar)raw ? 0 : asciiDigits[0];
+ *p++ = (char16_t)raw ? 0 : asciiDigits[0];
--len;
}
@@ -1006,7 +1006,7 @@ uint32_t util64_tou(int64_t w, UChar* buf, uint32_t len, uint32_t radix, UBool r
int64_t n = w / base;
int64_t m = n * base;
int32_t d = (int32_t)(w-m);
- *p++ = (UChar)(raw ? d : asciiDigits[d]);
+ *p++ = (char16_t)(raw ? d : asciiDigits[d]);
w = n;
--len;
}
@@ -1019,7 +1019,7 @@ uint32_t util64_tou(int64_t w, UChar* buf, uint32_t len, uint32_t radix, UBool r
++buf;
}
while (--p > buf) {
- UChar c = *p;
+ char16_t c = *p;
*p = *buf;
*buf = c;
++buf;
diff --git a/contrib/libs/icu/i18n/nfrs.h b/contrib/libs/icu/i18n/nfrs.h
index a6ad3a3bb7f..a1beedda17d 100644
--- a/contrib/libs/icu/i18n/nfrs.h
+++ b/contrib/libs/icu/i18n/nfrs.h
@@ -93,10 +93,10 @@ int64_t util64_fromDouble(double d);
uint64_t util64_pow(uint32_t radix, uint16_t exponent);
// convert n to digit string in buffer, return length of string
-uint32_t util64_tou(int64_t n, UChar* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = false);
+uint32_t util64_tou(int64_t n, char16_t* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = false);
#ifdef RBNF_DEBUG
-int64_t util64_utoi(const UChar* str, uint32_t radix = 10);
+int64_t util64_utoi(const char16_t* str, uint32_t radix = 10);
uint32_t util64_toa(int64_t n, char* buffer, uint32_t buflen, uint32_t radix = 10, UBool raw = false);
int64_t util64_atoi(const char* str, uint32_t radix);
#endif
diff --git a/contrib/libs/icu/i18n/nfrule.cpp b/contrib/libs/icu/i18n/nfrule.cpp
index 4bb0785127f..51bd4c974f4 100644
--- a/contrib/libs/icu/i18n/nfrule.cpp
+++ b/contrib/libs/icu/i18n/nfrule.cpp
@@ -40,10 +40,10 @@ NFRule::NFRule(const RuleBasedNumberFormat* _rbnf, const UnicodeString &_ruleTex
, exponent(0)
, decimalPoint(0)
, fRuleText(_ruleText)
- , sub1(NULL)
- , sub2(NULL)
+ , sub1(nullptr)
+ , sub2(nullptr)
, formatter(_rbnf)
- , rulePatternFormat(NULL)
+ , rulePatternFormat(nullptr)
{
if (!fRuleText.isEmpty()) {
parseRuleDescriptor(fRuleText, status);
@@ -54,54 +54,54 @@ NFRule::~NFRule()
{
if (sub1 != sub2) {
delete sub2;
- sub2 = NULL;
+ sub2 = nullptr;
}
delete sub1;
- sub1 = NULL;
+ sub1 = nullptr;
delete rulePatternFormat;
- rulePatternFormat = NULL;
+ rulePatternFormat = nullptr;
}
-static const UChar gLeftBracket = 0x005b;
-static const UChar gRightBracket = 0x005d;
-static const UChar gColon = 0x003a;
-static const UChar gZero = 0x0030;
-static const UChar gNine = 0x0039;
-static const UChar gSpace = 0x0020;
-static const UChar gSlash = 0x002f;
-static const UChar gGreaterThan = 0x003e;
-static const UChar gLessThan = 0x003c;
-static const UChar gComma = 0x002c;
-static const UChar gDot = 0x002e;
-static const UChar gTick = 0x0027;
-//static const UChar gMinus = 0x002d;
-static const UChar gSemicolon = 0x003b;
-static const UChar gX = 0x0078;
-
-static const UChar gMinusX[] = {0x2D, 0x78, 0}; /* "-x" */
-static const UChar gInf[] = {0x49, 0x6E, 0x66, 0}; /* "Inf" */
-static const UChar gNaN[] = {0x4E, 0x61, 0x4E, 0}; /* "NaN" */
-
-static const UChar gDollarOpenParenthesis[] = {0x24, 0x28, 0}; /* "$(" */
-static const UChar gClosedParenthesisDollar[] = {0x29, 0x24, 0}; /* ")$" */
-
-static const UChar gLessLess[] = {0x3C, 0x3C, 0}; /* "<<" */
-static const UChar gLessPercent[] = {0x3C, 0x25, 0}; /* "<%" */
-static const UChar gLessHash[] = {0x3C, 0x23, 0}; /* "<#" */
-static const UChar gLessZero[] = {0x3C, 0x30, 0}; /* "<0" */
-static const UChar gGreaterGreater[] = {0x3E, 0x3E, 0}; /* ">>" */
-static const UChar gGreaterPercent[] = {0x3E, 0x25, 0}; /* ">%" */
-static const UChar gGreaterHash[] = {0x3E, 0x23, 0}; /* ">#" */
-static const UChar gGreaterZero[] = {0x3E, 0x30, 0}; /* ">0" */
-static const UChar gEqualPercent[] = {0x3D, 0x25, 0}; /* "=%" */
-static const UChar gEqualHash[] = {0x3D, 0x23, 0}; /* "=#" */
-static const UChar gEqualZero[] = {0x3D, 0x30, 0}; /* "=0" */
-static const UChar gGreaterGreaterGreater[] = {0x3E, 0x3E, 0x3E, 0}; /* ">>>" */
-
-static const UChar * const RULE_PREFIXES[] = {
+static const char16_t gLeftBracket = 0x005b;
+static const char16_t gRightBracket = 0x005d;
+static const char16_t gColon = 0x003a;
+static const char16_t gZero = 0x0030;
+static const char16_t gNine = 0x0039;
+static const char16_t gSpace = 0x0020;
+static const char16_t gSlash = 0x002f;
+static const char16_t gGreaterThan = 0x003e;
+static const char16_t gLessThan = 0x003c;
+static const char16_t gComma = 0x002c;
+static const char16_t gDot = 0x002e;
+static const char16_t gTick = 0x0027;
+//static const char16_t gMinus = 0x002d;
+static const char16_t gSemicolon = 0x003b;
+static const char16_t gX = 0x0078;
+
+static const char16_t gMinusX[] = {0x2D, 0x78, 0}; /* "-x" */
+static const char16_t gInf[] = {0x49, 0x6E, 0x66, 0}; /* "Inf" */
+static const char16_t gNaN[] = {0x4E, 0x61, 0x4E, 0}; /* "NaN" */
+
+static const char16_t gDollarOpenParenthesis[] = {0x24, 0x28, 0}; /* "$(" */
+static const char16_t gClosedParenthesisDollar[] = {0x29, 0x24, 0}; /* ")$" */
+
+static const char16_t gLessLess[] = {0x3C, 0x3C, 0}; /* "<<" */
+static const char16_t gLessPercent[] = {0x3C, 0x25, 0}; /* "<%" */
+static const char16_t gLessHash[] = {0x3C, 0x23, 0}; /* "<#" */
+static const char16_t gLessZero[] = {0x3C, 0x30, 0}; /* "<0" */
+static const char16_t gGreaterGreater[] = {0x3E, 0x3E, 0}; /* ">>" */
+static const char16_t gGreaterPercent[] = {0x3E, 0x25, 0}; /* ">%" */
+static const char16_t gGreaterHash[] = {0x3E, 0x23, 0}; /* ">#" */
+static const char16_t gGreaterZero[] = {0x3E, 0x30, 0}; /* ">0" */
+static const char16_t gEqualPercent[] = {0x3D, 0x25, 0}; /* "=%" */
+static const char16_t gEqualHash[] = {0x3D, 0x23, 0}; /* "=#" */
+static const char16_t gEqualZero[] = {0x3D, 0x30, 0}; /* "=0" */
+static const char16_t gGreaterGreaterGreater[] = {0x3E, 0x3E, 0x3E, 0}; /* ">>>" */
+
+static const char16_t * const RULE_PREFIXES[] = {
gLessLess, gLessPercent, gLessHash, gLessZero,
gGreaterGreater, gGreaterPercent,gGreaterHash, gGreaterZero,
- gEqualPercent, gEqualHash, gEqualZero, NULL
+ gEqualPercent, gEqualHash, gEqualZero, nullptr
};
void
@@ -117,7 +117,7 @@ NFRule::makeRules(UnicodeString& description,
// (this also strips the rule descriptor, if any, off the
// description string)
NFRule* rule1 = new NFRule(rbnf, description, status);
- /* test for NULL */
+ /* test for nullptr */
if (rule1 == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -144,7 +144,7 @@ NFRule::makeRules(UnicodeString& description,
else {
// if the description does contain a matched pair of brackets,
// then it's really shorthand for two rules (with one exception)
- NFRule* rule2 = NULL;
+ NFRule* rule2 = nullptr;
UnicodeString sbuf;
// we'll actually only split the rule into two rules if its
@@ -161,7 +161,7 @@ NFRule::makeRules(UnicodeString& description,
// increment the original rule's base value ("rule1" actually
// goes SECOND in the rule set's rule list)
rule2 = new NFRule(rbnf, UnicodeString(), status);
- /* test for NULL */
+ /* test for nullptr */
if (rule2 == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -217,7 +217,7 @@ NFRule::makeRules(UnicodeString& description,
// BEFORE rule1 in the list: in all cases, rule2 OMITS the
// material in the brackets and rule1 INCLUDES the material
// in the brackets)
- if (rule2 != NULL) {
+ if (rule2 != nullptr) {
if (rule2->baseValue >= kNoBase) {
rules.add(rule2);
}
@@ -270,8 +270,8 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status)
// for one of the special rules. If it does, set the base
// value to the correct identifier value
int descriptorLength = descriptor.length();
- UChar firstChar = descriptor.charAt(0);
- UChar lastChar = descriptor.charAt(descriptorLength - 1);
+ char16_t firstChar = descriptor.charAt(0);
+ char16_t lastChar = descriptor.charAt(descriptorLength - 1);
if (firstChar >= gZero && firstChar <= gNine && lastChar != gX) {
// if the rule descriptor begins with a digit, it's a descriptor
// for a normal rule
@@ -279,7 +279,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status)
// just build up the value as we encounter the digits.
int64_t val = 0;
p = 0;
- UChar c = gSpace;
+ char16_t c = gSpace;
// begin parsing the descriptor: copy digits
// into "tempValue", skip periods, commas, and spaces,
@@ -420,9 +420,9 @@ NFRule::extractSubstitutions(const NFRuleSet* ruleSet,
}
fRuleText = ruleText;
sub1 = extractSubstitution(ruleSet, predecessor, status);
- if (sub1 == NULL) {
+ if (sub1 == nullptr) {
// Small optimization. There is no need to create a redundant NullSubstitution.
- sub2 = NULL;
+ sub2 = nullptr;
}
else {
sub2 = extractSubstitution(ruleSet, predecessor, status);
@@ -469,7 +469,7 @@ NFRule::extractSubstitution(const NFRuleSet* ruleSet,
const NFRule* predecessor,
UErrorCode& status)
{
- NFSubstitution* result = NULL;
+ NFSubstitution* result = nullptr;
// search the rule's rule text for the first two characters of
// a substitution token
@@ -479,7 +479,7 @@ NFRule::extractSubstitution(const NFRuleSet* ruleSet,
// if we didn't find one, create a null substitution positioned
// at the end of the rule text
if (subStart == -1) {
- return NULL;
+ return nullptr;
}
// special-case the ">>>" token, since searching for the > at the
@@ -490,7 +490,7 @@ NFRule::extractSubstitution(const NFRuleSet* ruleSet,
// otherwise the substitution token ends with the same character
// it began with
} else {
- UChar c = fRuleText.charAt(subStart);
+ char16_t c = fRuleText.charAt(subStart);
subEnd = fRuleText.indexOf(c, subStart + 1);
// special case for '<%foo<<'
if (c == gLessThan && subEnd != -1 && subEnd < fRuleText.length() - 1 && fRuleText.charAt(subEnd+1) == c) {
@@ -506,7 +506,7 @@ NFRule::extractSubstitution(const NFRuleSet* ruleSet,
// unmatched token character), create a null substitution positioned
// at the end of the rule
if (subEnd == -1) {
- return NULL;
+ return nullptr;
}
// if we get here, we have a real substitution token (or at least
@@ -549,10 +549,10 @@ NFRule::setBaseValue(int64_t newBaseValue, UErrorCode& status)
// description didn't specify a base value. This means it
// has substitutions, and some substitutions hold on to copies
// of the rule's divisor. Fix their copies of the divisor.
- if (sub1 != NULL) {
+ if (sub1 != nullptr) {
sub1->setDivisor(radix, exponent, status);
}
- if (sub2 != NULL) {
+ if (sub2 != nullptr) {
sub2->setDivisor(radix, exponent, status);
}
@@ -621,9 +621,9 @@ util_equalSubstitutions(const NFSubstitution* sub1, const NFSubstitution* sub2)
return *sub1 == *sub2;
}
} else if (!sub2) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/**
@@ -650,7 +650,7 @@ NFRule::operator==(const NFRule& rhs) const
*/
static void util_append64(UnicodeString& result, int64_t n)
{
- UChar buffer[256];
+ char16_t buffer[256];
int32_t len = util64_tou(n, buffer, sizeof(buffer));
UnicodeString temp(buffer, len);
result.append(temp);
@@ -690,7 +690,7 @@ NFRule::_appendRuleText(UnicodeString& result) const
// if the rule text begins with a space, write an apostrophe
// (whitespace after the rule descriptor is ignored; the
// apostrophe is used to make the whitespace significant)
- if (fRuleText.charAt(0) == gSpace && (sub1 == NULL || sub1->getPos() != 0)) {
+ if (fRuleText.charAt(0) == gSpace && (sub1 == nullptr || sub1->getPos() != 0)) {
result.append(gTick);
}
@@ -700,11 +700,11 @@ NFRule::_appendRuleText(UnicodeString& result) const
ruleTextCopy.setTo(fRuleText);
UnicodeString temp;
- if (sub2 != NULL) {
+ if (sub2 != nullptr) {
sub2->toString(temp);
ruleTextCopy.insert(sub2->getPos(), temp);
}
- if (sub1 != NULL) {
+ if (sub1 != nullptr) {
sub1->toString(temp);
ruleTextCopy.insert(sub1->getPos(), temp);
}
@@ -763,10 +763,10 @@ NFRule::doFormat(int64_t number, UnicodeString& toInsertInto, int32_t pos, int32
lengthOffset = fRuleText.length() - (toInsertInto.length() - initialLength);
}
- if (sub2 != NULL) {
+ if (sub2 != nullptr) {
sub2->doSubstitution(number, toInsertInto, pos - (sub2->getPos() > pluralRuleStart ? lengthOffset : 0), recursionCount, status);
}
- if (sub1 != NULL) {
+ if (sub1 != nullptr) {
sub1->doSubstitution(number, toInsertInto, pos - (sub1->getPos() > pluralRuleStart ? lengthOffset : 0), recursionCount, status);
}
}
@@ -817,10 +817,10 @@ NFRule::doFormat(double number, UnicodeString& toInsertInto, int32_t pos, int32_
lengthOffset = fRuleText.length() - (toInsertInto.length() - initialLength);
}
- if (sub2 != NULL) {
+ if (sub2 != nullptr) {
sub2->doSubstitution(number, toInsertInto, pos - (sub2->getPos() > pluralRuleStart ? lengthOffset : 0), recursionCount, status);
}
- if (sub1 != NULL) {
+ if (sub1 != nullptr) {
sub1->doSubstitution(number, toInsertInto, pos - (sub1->getPos() > pluralRuleStart ? lengthOffset : 0), recursionCount, status);
}
}
@@ -852,11 +852,11 @@ NFRule::shouldRollBack(int64_t number) const
// a modulus substitution, its base value isn't an even multiple
// of 100, and the value we're trying to format _is_ an even
// multiple of 100. This is called the "rollback rule."
- if ((sub1 != NULL && sub1->isModulusSubstitution()) || (sub2 != NULL && sub2->isModulusSubstitution())) {
+ if ((sub1 != nullptr && sub1->isModulusSubstitution()) || (sub2 != nullptr && sub2->isModulusSubstitution())) {
int64_t re = util64_pow(radix, exponent);
return (number % re) == 0 && (baseValue % re) != 0;
}
- return FALSE;
+ return false;
}
//-----------------------------------------------------------------------
@@ -887,7 +887,7 @@ NFRule::shouldRollBack(int64_t number) const
static void dumpUS(FILE* f, const UnicodeString& us) {
int len = us.length();
char* buf = (char *)uprv_malloc((len+1)*sizeof(char)); //new char[len+1];
- if (buf != NULL) {
+ if (buf != nullptr) {
us.extract(0, len, buf);
buf[len] = 0;
fprintf(f, "%s", buf);
@@ -908,8 +908,8 @@ NFRule::doParse(const UnicodeString& text,
ParsePosition pp;
UnicodeString workText(text);
- int32_t sub1Pos = sub1 != NULL ? sub1->getPos() : fRuleText.length();
- int32_t sub2Pos = sub2 != NULL ? sub2->getPos() : fRuleText.length();
+ int32_t sub1Pos = sub1 != nullptr ? sub1->getPos() : fRuleText.length();
+ int32_t sub2Pos = sub2 != nullptr ? sub2->getPos() : fRuleText.length();
// check to see whether the text before the first substitution
// matches the text at the beginning of the string being
@@ -943,19 +943,19 @@ NFRule::doParse(const UnicodeString& text,
// restored for ICU4C port
parsePosition.setErrorIndex(pp.getErrorIndex());
resVal.setLong(0);
- return TRUE;
+ return true;
}
if (baseValue == kInfinityRule) {
// If you match this, don't try to perform any calculations on it.
parsePosition.setIndex(pp.getIndex());
resVal.setDouble(uprv_getInfinity());
- return TRUE;
+ return true;
}
if (baseValue == kNaNRule) {
// If you match this, don't try to perform any calculations on it.
parsePosition.setIndex(pp.getIndex());
resVal.setDouble(uprv_getNaN());
- return TRUE;
+ return true;
}
// this is the fun part. The basic guts of the rule-matching
@@ -1010,7 +1010,7 @@ NFRule::doParse(const UnicodeString& text,
// null substitution), pp is now pointing at the first unmatched
// character. Take note of that, and try matchToDelimiter()
// on the input text again
- if (pp.getIndex() != 0 || sub1 == NULL) {
+ if (pp.getIndex() != 0 || sub1 == nullptr) {
start = pp.getIndex();
UnicodeString workText2;
@@ -1030,7 +1030,7 @@ NFRule::doParse(const UnicodeString& text,
// if we got a successful match on this second
// matchToDelimiter() call, update the high-water mark
// and result (if necessary)
- if (pp2.getIndex() != 0 || sub2 == NULL) {
+ if (pp2.getIndex() != 0 || sub2 == nullptr) {
if (prefixLength + pp.getIndex() + pp2.getIndex() > highWaterMark) {
highWaterMark = prefixLength + pp.getIndex() + pp2.getIndex();
result = partialResult;
@@ -1078,12 +1078,12 @@ NFRule::doParse(const UnicodeString& text,
// we have to account for it here. By definition, if the matching
// rule in a fraction rule set has no substitutions, its numerator
// is 1, and so the result is the reciprocal of its base value.
- if (isFractionRule && highWaterMark > 0 && sub1 == NULL) {
+ if (isFractionRule && highWaterMark > 0 && sub1 == nullptr) {
result = 1 / result;
}
resVal.setDouble(result);
- return TRUE; // ??? do we need to worry if it is a long or a double?
+ return true; // ??? do we need to worry if it is a long or a double?
}
/**
@@ -1191,7 +1191,7 @@ NFRule::matchToDelimiter(const UnicodeString& text,
if (subText.length() > 0) {
UBool success = sub->doParse(subText, tempPP, _baseValue, upperBound,
#if UCONFIG_NO_COLLATION
- FALSE,
+ false,
#else
formatter->isLenient(),
#endif
@@ -1235,7 +1235,7 @@ NFRule::matchToDelimiter(const UnicodeString& text,
// for "delimiter". Instead, just use "sub" to parse as much of
// "text" as possible.
}
- else if (sub == NULL) {
+ else if (sub == nullptr) {
return _baseValue;
}
else {
@@ -1245,7 +1245,7 @@ NFRule::matchToDelimiter(const UnicodeString& text,
// try to match the whole string against the substitution
UBool success = sub->doParse(text, tempPP, _baseValue, upperBound,
#if UCONFIG_NO_COLLATION
- FALSE,
+ false,
#else
formatter->isLenient(),
#endif
@@ -1309,7 +1309,7 @@ NFRule::prefixLength(const UnicodeString& str, const UnicodeString& prefix, UErr
// the CollationElementIterator protocol. Hopefully, this
// will change someday.)
const RuleBasedCollator* collator = formatter->getCollator();
- if (collator == NULL) {
+ if (collator == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -1579,7 +1579,7 @@ NFRule::allIgnorable(const UnicodeString& str, UErrorCode& status) const
{
// if the string is empty, we can just return true
if (str.length() == 0) {
- return TRUE;
+ return true;
}
#if !UCONFIG_NO_COLLATION
@@ -1588,16 +1588,16 @@ NFRule::allIgnorable(const UnicodeString& str, UErrorCode& status) const
// element is 0 (ignorable) at the primary level
if (formatter->isLenient()) {
const RuleBasedCollator* collator = formatter->getCollator();
- if (collator == NULL) {
+ if (collator == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
LocalPointer<CollationElementIterator> iter(collator->createCollationElementIterator(str));
// Memory allocation error check.
if (iter.isNull()) {
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
UErrorCode err = U_ZERO_ERROR;
@@ -1613,15 +1613,15 @@ NFRule::allIgnorable(const UnicodeString& str, UErrorCode& status) const
// if lenient parsing is turned off, there is no such thing as
// an ignorable character: return true only if the string is empty
- return FALSE;
+ return false;
}
void
NFRule::setDecimalFormatSymbols(const DecimalFormatSymbols& newSymbols, UErrorCode& status) {
- if (sub1 != NULL) {
+ if (sub1 != nullptr) {
sub1->setDecimalFormatSymbols(newSymbols, status);
}
- if (sub2 != NULL) {
+ if (sub2 != nullptr) {
sub2->setDecimalFormatSymbols(newSymbols, status);
}
}
diff --git a/contrib/libs/icu/i18n/nfrule.h b/contrib/libs/icu/i18n/nfrule.h
index 5e615e485c8..fda74fabf2c 100644
--- a/contrib/libs/icu/i18n/nfrule.h
+++ b/contrib/libs/icu/i18n/nfrule.h
@@ -63,7 +63,7 @@ public:
int64_t getBaseValue() const { return baseValue; }
void setBaseValue(int64_t value, UErrorCode& status);
- UChar getDecimalPoint() const { return decimalPoint; }
+ char16_t getDecimalPoint() const { return decimalPoint; }
int64_t getDivisor() const;
@@ -108,7 +108,7 @@ private:
int64_t baseValue;
int32_t radix;
int16_t exponent;
- UChar decimalPoint;
+ char16_t decimalPoint;
UnicodeString fRuleText;
NFSubstitution* sub1;
NFSubstitution* sub2;
diff --git a/contrib/libs/icu/i18n/nfsubs.cpp b/contrib/libs/icu/i18n/nfsubs.cpp
index 70ac18be468..4f3247ce50d 100644
--- a/contrib/libs/icu/i18n/nfsubs.cpp
+++ b/contrib/libs/icu/i18n/nfsubs.cpp
@@ -25,23 +25,23 @@
#if U_HAVE_RBNF
-static const UChar gLessThan = 0x003c;
-static const UChar gEquals = 0x003d;
-static const UChar gGreaterThan = 0x003e;
-static const UChar gPercent = 0x0025;
-static const UChar gPound = 0x0023;
-static const UChar gZero = 0x0030;
-static const UChar gSpace = 0x0020;
-
-static const UChar gEqualsEquals[] =
+static const char16_t gLessThan = 0x003c;
+static const char16_t gEquals = 0x003d;
+static const char16_t gGreaterThan = 0x003e;
+static const char16_t gPercent = 0x0025;
+static const char16_t gPound = 0x0023;
+static const char16_t gZero = 0x0030;
+static const char16_t gSpace = 0x0020;
+
+static const char16_t gEqualsEquals[] =
{
0x3D, 0x3D, 0
}; /* "==" */
-static const UChar gGreaterGreaterGreaterThan[] =
+static const char16_t gGreaterGreaterGreaterThan[] =
{
0x3E, 0x3E, 0x3E, 0
}; /* ">>>" */
-static const UChar gGreaterGreaterThan[] =
+static const char16_t gGreaterGreaterThan[] =
{
0x3E, 0x3E, 0
}; /* ">>" */
@@ -62,11 +62,11 @@ public:
virtual double transformNumber(double number) const override { return number; }
virtual double composeRuleValue(double newRuleValue, double /*oldRuleValue*/) const override { return newRuleValue; }
virtual double calcUpperBound(double oldUpperBound) const override { return oldUpperBound; }
- virtual UChar tokenChar() const override { return (UChar)0x003d; } // '='
+ virtual char16_t tokenChar() const override { return (char16_t)0x003d; } // '='
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
SameValueSubstitution::~SameValueSubstitution() {}
@@ -116,11 +116,11 @@ public:
virtual double calcUpperBound(double /*oldUpperBound*/) const override { return static_cast<double>(divisor); }
- virtual UChar tokenChar() const override { return (UChar)0x003c; } // '<'
+ virtual char16_t tokenChar() const override { return (char16_t)0x003c; } // '<'
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
MultiplierSubstitution::~MultiplierSubstitution() {}
@@ -167,15 +167,15 @@ public:
virtual double calcUpperBound(double /*oldUpperBound*/) const override { return static_cast<double>(divisor); }
- virtual UBool isModulusSubstitution() const override { return TRUE; }
+ virtual UBool isModulusSubstitution() const override { return true; }
- virtual UChar tokenChar() const override { return (UChar)0x003e; } // '>'
+ virtual char16_t tokenChar() const override { return (char16_t)0x003e; } // '>'
virtual void toString(UnicodeString& result) const override;
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
ModulusSubstitution::~ModulusSubstitution() {}
@@ -193,11 +193,11 @@ public:
virtual double transformNumber(double number) const override { return uprv_floor(number); }
virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { return newRuleValue + oldRuleValue; }
virtual double calcUpperBound(double /*oldUpperBound*/) const override { return DBL_MAX; }
- virtual UChar tokenChar() const override { return (UChar)0x003c; } // '<'
+ virtual char16_t tokenChar() const override { return (char16_t)0x003c; } // '<'
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
IntegralPartSubstitution::~IntegralPartSubstitution() {}
@@ -230,11 +230,11 @@ public:
virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { return newRuleValue + oldRuleValue; }
virtual double calcUpperBound(double /*oldUpperBound*/) const override { return 0.0; }
- virtual UChar tokenChar() const override { return (UChar)0x003e; } // '>'
+ virtual char16_t tokenChar() const override { return (char16_t)0x003e; } // '>'
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
FractionalPartSubstitution::~FractionalPartSubstitution() {}
@@ -252,11 +252,11 @@ public:
virtual double transformNumber(double number) const override { return uprv_fabs(number); }
virtual double composeRuleValue(double newRuleValue, double /*oldRuleValue*/) const override { return -newRuleValue; }
virtual double calcUpperBound(double /*oldUpperBound*/) const override { return DBL_MAX; }
- virtual UChar tokenChar() const override { return (UChar)0x003e; } // '>'
+ virtual char16_t tokenChar() const override { return (char16_t)0x003e; } // '>'
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
AbsoluteValueSubstitution::~AbsoluteValueSubstitution() {}
@@ -302,13 +302,13 @@ public:
virtual double composeRuleValue(double newRuleValue, double oldRuleValue) const override { return newRuleValue / oldRuleValue; }
virtual double calcUpperBound(double /*oldUpperBound*/) const override { return denominator; }
- virtual UChar tokenChar() const override { return (UChar)0x003c; } // '<'
+ virtual char16_t tokenChar() const override { return (char16_t)0x003c; } // '<'
private:
- static const UChar LTLT[2];
+ static const char16_t LTLT[2];
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
NumeratorSubstitution::~NumeratorSubstitution() {}
@@ -324,7 +324,7 @@ NFSubstitution::makeSubstitution(int32_t pos,
{
// if the description is empty, return a NullSubstitution
if (description.length() == 0) {
- return NULL;
+ return nullptr;
}
switch (description.charAt(0)) {
@@ -335,7 +335,7 @@ NFSubstitution::makeSubstitution(int32_t pos,
if (rule->getBaseValue() == NFRule::kNegativeNumberRule) {
// throw new IllegalArgumentException("<< not allowed in negative-number rule");
status = U_PARSE_ERROR;
- return NULL;
+ return nullptr;
}
// if the rule is a fraction rule, return an
@@ -380,7 +380,7 @@ NFSubstitution::makeSubstitution(int32_t pos,
else if (ruleSet->isFractionRuleSet()) {
// throw new IllegalArgumentException(">> not allowed in fraction rule set");
status = U_PARSE_ERROR;
- return NULL;
+ return nullptr;
}
// otherwise, return a ModulusSubstitution
@@ -399,14 +399,14 @@ NFSubstitution::makeSubstitution(int32_t pos,
// throw new IllegalArgumentException("Illegal substitution character");
status = U_PARSE_ERROR;
}
- return NULL;
+ return nullptr;
}
NFSubstitution::NFSubstitution(int32_t _pos,
const NFRuleSet* _ruleSet,
const UnicodeString& description,
UErrorCode& status)
- : pos(_pos), ruleSet(NULL), numberFormat(NULL)
+ : pos(_pos), ruleSet(nullptr), numberFormat(nullptr)
{
// the description should begin and end with the same character.
// If it doesn't that's a syntax error. Otherwise,
@@ -448,7 +448,7 @@ NFSubstitution::NFSubstitution(int32_t _pos,
return;
}
DecimalFormat *tempNumberFormat = new DecimalFormat(workingDescription, *sym, status);
- /* test for NULL */
+ /* test for nullptr */
if (!tempNumberFormat) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -467,9 +467,9 @@ NFSubstitution::NFSubstitution(int32_t _pos,
// a number even when it's 0)
// this causes problems when >>> is used in a frationalPartSubstitution
- // this->ruleSet = NULL;
+ // this->ruleSet = nullptr;
this->ruleSet = _ruleSet;
- this->numberFormat = NULL;
+ this->numberFormat = nullptr;
}
else {
// and of the description is none of these things, it's a syntax error
@@ -482,7 +482,7 @@ NFSubstitution::NFSubstitution(int32_t _pos,
NFSubstitution::~NFSubstitution()
{
delete numberFormat;
- numberFormat = NULL;
+ numberFormat = nullptr;
}
/**
@@ -499,7 +499,7 @@ NFSubstitution::setDivisor(int32_t /*radix*/, int16_t /*exponent*/, UErrorCode&
void
NFSubstitution::setDecimalFormatSymbols(const DecimalFormatSymbols &newSymbols, UErrorCode& /*status*/) {
- if (numberFormat != NULL) {
+ if (numberFormat != nullptr) {
numberFormat->setDecimalFormatSymbols(newSymbols);
}
}
@@ -523,10 +523,10 @@ NFSubstitution::operator==(const NFSubstitution& rhs) const
// this should be called by subclasses before their own equality tests
return typeid(*this) == typeid(rhs)
&& pos == rhs.pos
- && (ruleSet == NULL) == (rhs.ruleSet == NULL)
+ && (ruleSet == nullptr) == (rhs.ruleSet == nullptr)
// && ruleSet == rhs.ruleSet causes circularity, other checks to make instead?
- && (numberFormat == NULL
- ? (rhs.numberFormat == NULL)
+ && (numberFormat == nullptr
+ ? (rhs.numberFormat == nullptr)
: (*numberFormat == *rhs.numberFormat));
}
@@ -547,9 +547,9 @@ NFSubstitution::toString(UnicodeString& text) const
text.append(tokenChar());
UnicodeString temp;
- if (ruleSet != NULL) {
+ if (ruleSet != nullptr) {
ruleSet->getName(temp);
- } else if (numberFormat != NULL) {
+ } else if (numberFormat != nullptr) {
numberFormat->toPattern(temp);
}
text.append(temp);
@@ -573,12 +573,12 @@ NFSubstitution::toString(UnicodeString& text) const
void
NFSubstitution::doSubstitution(int64_t number, UnicodeString& toInsertInto, int32_t _pos, int32_t recursionCount, UErrorCode& status) const
{
- if (ruleSet != NULL) {
+ if (ruleSet != nullptr) {
// Perform a transformation on the number that is dependent
// on the type of substitution this is, then just call its
// rule set's format() method to format the result
ruleSet->format(transformNumber(number), toInsertInto, _pos + this->pos, recursionCount, status);
- } else if (numberFormat != NULL) {
+ } 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
@@ -634,16 +634,16 @@ NFSubstitution::doSubstitution(double number, UnicodeString& toInsertInto, int32
// if the result is an integer, from here on out we work in integer
// space (saving time and memory and preserving accuracy)
- if (numberToFormat == uprv_floor(numberToFormat) && ruleSet != NULL) {
+ if (numberToFormat == uprv_floor(numberToFormat) && ruleSet != nullptr) {
ruleSet->format(util64_fromDouble(numberToFormat), toInsertInto, _pos + this->pos, recursionCount, status);
// if the result isn't an integer, then call either our rule set's
// format() method or our DecimalFormat's format() method to
// format the result
} else {
- if (ruleSet != NULL) {
+ if (ruleSet != nullptr) {
ruleSet->format(numberToFormat, toInsertInto, _pos + this->pos, recursionCount, status);
- } else if (numberFormat != NULL) {
+ } else if (numberFormat != nullptr) {
UnicodeString temp;
numberFormat->format(numberToFormat, temp);
toInsertInto.insert(_pos + this->pos, temp);
@@ -715,7 +715,7 @@ NFSubstitution::doParse(const UnicodeString& text,
// be false even when the formatter's lenient-parse mode is
// on), then also try parsing the text using a default-
// constructed NumberFormat
- if (ruleSet != NULL) {
+ if (ruleSet != nullptr) {
ruleSet->parse(text, parsePosition, upperBound, nonNumericalExecutedRuleMask, result);
if (lenientParse && !ruleSet->isFractionRuleSet() && parsePosition.getIndex() == 0) {
UErrorCode status = U_ZERO_ERROR;
@@ -727,7 +727,7 @@ NFSubstitution::doParse(const UnicodeString& text,
}
// ...or use our DecimalFormat to parse the text
- } else if (numberFormat != NULL) {
+ } else if (numberFormat != nullptr) {
numberFormat->parse(text, result, parsePosition);
}
@@ -763,11 +763,11 @@ NFSubstitution::doParse(const UnicodeString& text,
// the result.
tempResult = composeRuleValue(tempResult, baseValue);
result.setDouble(tempResult);
- return TRUE;
+ return true;
// if the parse was UNsuccessful, return 0
} else {
result.setLong(0);
- return FALSE;
+ return false;
}
}
@@ -779,7 +779,7 @@ NFSubstitution::doParse(const UnicodeString& text,
*/
UBool
NFSubstitution::isModulusSubstitution() const {
- return FALSE;
+ return false;
}
//===================================================================
@@ -834,7 +834,7 @@ ModulusSubstitution::ModulusSubstitution(int32_t _pos,
UErrorCode& status)
: NFSubstitution(_pos, _ruleSet, description, status)
, divisor(rule->getDivisor())
- , ruleToUse(NULL)
+ , ruleToUse(nullptr)
{
// the owning rule's divisor controls the behavior of this
// substitution: rather than keeping a backpointer to the rule,
@@ -882,7 +882,7 @@ ModulusSubstitution::doSubstitution(int64_t number, UnicodeString& toInsertInto,
// if this isn't a >>> substitution, just use the inherited version
// of this function (which uses either a rule set or a DecimalFormat
// to format its substitution value)
- if (ruleToUse == NULL) {
+ if (ruleToUse == nullptr) {
NFSubstitution::doSubstitution(number, toInsertInto, _pos, recursionCount, status);
// a >>> substitution goes straight to a particular rule to
@@ -907,7 +907,7 @@ ModulusSubstitution::doSubstitution(double number, UnicodeString& toInsertInto,
// if this isn't a >>> substitution, just use the inherited version
// of this function (which uses either a rule set or a DecimalFormat
// to format its substitution value)
- if (ruleToUse == NULL) {
+ if (ruleToUse == nullptr) {
NFSubstitution::doSubstitution(number, toInsertInto, _pos, recursionCount, status);
// a >>> substitution goes straight to a particular rule to
@@ -943,14 +943,14 @@ ModulusSubstitution::doParse(const UnicodeString& text,
{
// if this isn't a >>> substitution, we can just use the
// inherited parse() routine to do the parsing
- if (ruleToUse == NULL) {
+ if (ruleToUse == nullptr) {
return NFSubstitution::doParse(text, parsePosition, baseValue, upperBound, lenientParse, nonNumericalExecutedRuleMask, result);
// but if it IS a >>> substitution, we have to do it here: we
// use the specific rule's doParse() method, and then we have to
// do some of the other work of NFRuleSet.parse()
} else {
- ruleToUse->doParse(text, parsePosition, FALSE, upperBound, nonNumericalExecutedRuleMask, result);
+ ruleToUse->doParse(text, parsePosition, false, upperBound, nonNumericalExecutedRuleMask, result);
if (parsePosition.getIndex() != 0) {
UErrorCode status = U_ZERO_ERROR;
@@ -959,7 +959,7 @@ ModulusSubstitution::doParse(const UnicodeString& text,
result.setDouble(tempResult);
}
- return TRUE;
+ return true;
}
}
/**
@@ -976,7 +976,7 @@ ModulusSubstitution::toString(UnicodeString& text) const
// either the name of the rule set it uses, or the pattern of
// the DecimalFormat it uses
- if ( ruleToUse != NULL ) { // Must have been a >>> substitution.
+ if ( ruleToUse != nullptr ) { // Must have been a >>> substitution.
text.remove();
text.append(tokenChar());
text.append(tokenChar());
@@ -1007,17 +1007,17 @@ FractionalPartSubstitution::FractionalPartSubstitution(int32_t _pos,
const UnicodeString& description,
UErrorCode& status)
: NFSubstitution(_pos, _ruleSet, description, status)
- , byDigits(FALSE)
- , useSpaces(TRUE)
+ , byDigits(false)
+ , useSpaces(true)
{
// akk, ruleSet can change in superclass constructor
if (0 == description.compare(gGreaterGreaterThan, 2) ||
0 == description.compare(gGreaterGreaterGreaterThan, 3) ||
_ruleSet == getRuleSet()) {
- byDigits = TRUE;
+ byDigits = true;
if (0 == description.compare(gGreaterGreaterGreaterThan, 3)) {
- useSpaces = FALSE;
+ useSpaces = false;
}
} else {
// cast away const
@@ -1059,14 +1059,14 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser
// // this flag keeps us from formatting trailing zeros. It starts
// // out false because we're pulling from the right, and switches
// // to true the first time we encounter a non-zero digit
- // UBool doZeros = FALSE;
+ // UBool doZeros = false;
// for (int32_t i = 0; i < kMaxDecimalDigits; i++) {
// int64_t digit = numberToFormat % 10;
// if (digit != 0 || doZeros) {
// if (doZeros && useSpaces) {
// toInsertInto.insert(_pos + getPos(), gSpace);
// }
- // doZeros = TRUE;
+ // doZeros = true;
// getRuleSet()->format(digit, toInsertInto, _pos + getPos());
// }
// numberToFormat /= 10;
@@ -1076,7 +1076,7 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser
dl.setToDouble(number);
dl.roundToMagnitude(-20, UNUM_ROUND_HALFEVEN, status); // round to 20 fraction digits.
- UBool pad = FALSE;
+ UBool pad = false;
for (int32_t didx = dl.getLowerDisplayMagnitude(); didx<0; didx++) {
// Loop iterates over fraction digits, starting with the LSD.
// include both real digits from the number, and zeros
@@ -1084,7 +1084,7 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser
if (pad && useSpaces) {
toInsertInto.insert(_pos + getPos(), gSpace);
} else {
- pad = TRUE;
+ pad = true;
}
int64_t digit = dl.getDigit(didx);
getRuleSet()->format(digit, toInsertInto, _pos + getPos(), recursionCount, status);
@@ -1146,7 +1146,7 @@ FractionalPartSubstitution::doParse(const UnicodeString& text,
DecimalQuantity dl;
int32_t totalDigits = 0;
- NumberFormat* fmt = NULL;
+ NumberFormat* fmt = nullptr;
while (workText.length() > 0 && workPos.getIndex() != 0) {
workPos.setIndex(0);
Formattable temp;
@@ -1163,7 +1163,7 @@ FractionalPartSubstitution::doParse(const UnicodeString& text,
fmt = NumberFormat::createInstance(status);
if (U_FAILURE(status)) {
delete fmt;
- fmt = NULL;
+ fmt = nullptr;
}
}
if (fmt) {
@@ -1191,7 +1191,7 @@ FractionalPartSubstitution::doParse(const UnicodeString& text,
result = dl.toDouble();
result = composeRuleValue(result, baseValue);
resVal.setDouble(result);
- return TRUE;
+ return true;
}
}
@@ -1224,7 +1224,7 @@ NumeratorSubstitution::doSubstitution(double number, UnicodeString& toInsertInto
int64_t longNF = util64_fromDouble(numberToFormat);
const NFRuleSet* aruleSet = getRuleSet();
- if (withZeros && aruleSet != NULL) {
+ if (withZeros && aruleSet != nullptr) {
// if there are leading zeros in the decimal expansion then emit them
int64_t nf =longNF;
int32_t len = toInsertInto.length();
@@ -1237,14 +1237,14 @@ NumeratorSubstitution::doSubstitution(double number, UnicodeString& toInsertInto
// if the result is an integer, from here on out we work in integer
// space (saving time and memory and preserving accuracy)
- if (numberToFormat == longNF && aruleSet != NULL) {
+ if (numberToFormat == longNF && aruleSet != nullptr) {
aruleSet->format(longNF, toInsertInto, apos + getPos(), recursionCount, status);
// if the result isn't an integer, then call either our rule set's
// format() method or our DecimalFormat's format() method to
// format the result
} else {
- if (aruleSet != NULL) {
+ if (aruleSet != nullptr) {
aruleSet->format(numberToFormat, toInsertInto, apos + getPos(), recursionCount, status);
} else {
UnicodeString temp;
@@ -1301,7 +1301,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text,
}
// we've parsed off the zeros, now let's parse the rest from our current position
- NFSubstitution::doParse(workText, parsePosition, withZeros ? 1 : baseValue, upperBound, FALSE, nonNumericalExecutedRuleMask, result);
+ NFSubstitution::doParse(workText, parsePosition, withZeros ? 1 : baseValue, upperBound, false, nonNumericalExecutedRuleMask, result);
if (withZeros) {
// any base value will do in this case. is there a way to
@@ -1310,10 +1310,8 @@ NumeratorSubstitution::doParse(const UnicodeString& text,
// compute the 'effective' base and prescale the value down
int64_t n = result.getLong(status); // force conversion!
int64_t d = 1;
- int32_t pow = 0;
while (d <= n) {
d *= 10;
- ++pow;
}
// now add the zeros
while (zeroCount > 0) {
@@ -1324,7 +1322,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text,
result.setDouble((double)n/(double)d);
}
- return TRUE;
+ return true;
}
bool
@@ -1336,7 +1334,7 @@ NumeratorSubstitution::operator==(const NFSubstitution& rhs) const
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NumeratorSubstitution)
-const UChar NumeratorSubstitution::LTLT[] = { 0x003c, 0x003c };
+const char16_t NumeratorSubstitution::LTLT[] = { 0x003c, 0x003c };
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/nfsubs.h b/contrib/libs/icu/i18n/nfsubs.h
index 0abd98be097..d252f864993 100644
--- a/contrib/libs/icu/i18n/nfsubs.h
+++ b/contrib/libs/icu/i18n/nfsubs.h
@@ -234,7 +234,7 @@ public:
* substitutions of this type. Used by toString().
* @return This substitution's token character.
*/
- virtual UChar tokenChar() const = 0;
+ virtual char16_t tokenChar() const = 0;
/**
* Returns true if this is a modulus substitution. (We didn't do this
@@ -245,12 +245,12 @@ public:
virtual UBool isModulusSubstitution() const;
private:
- NFSubstitution(const NFSubstitution &other); // forbid copying of this class
- NFSubstitution &operator=(const NFSubstitution &other); // forbid copying of this class
+ NFSubstitution(const NFSubstitution &other) = delete; // forbid copying of this class
+ NFSubstitution &operator=(const NFSubstitution &other) = delete; // forbid copying of this class
public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/nortrans.cpp b/contrib/libs/icu/i18n/nortrans.cpp
index 6a8d2c74194..d793433b3d2 100644
--- a/contrib/libs/icu/i18n/nortrans.cpp
+++ b/contrib/libs/icu/i18n/nortrans.cpp
@@ -45,13 +45,13 @@ void NormalizationTransliterator::registerIDs() {
Transliterator::_registerFactory(UNICODE_STRING_SIMPLE("Any-FCC"),
_create, cstrToken("nfc\0\3"));
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("NFC"),
- UNICODE_STRING_SIMPLE("NFD"), TRUE);
+ UNICODE_STRING_SIMPLE("NFD"), true);
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("NFKC"),
- UNICODE_STRING_SIMPLE("NFKD"), TRUE);
+ UNICODE_STRING_SIMPLE("NFKD"), true);
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("FCC"),
- UNICODE_STRING_SIMPLE("NFD"), FALSE);
+ UNICODE_STRING_SIMPLE("NFD"), false);
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("FCD"),
- UNICODE_STRING_SIMPLE("FCD"), FALSE);
+ UNICODE_STRING_SIMPLE("FCD"), false);
}
/**
@@ -62,11 +62,11 @@ Transliterator* NormalizationTransliterator::_create(const UnicodeString& ID,
const char *name = (const char *)context.pointer;
UNormalization2Mode mode = (UNormalization2Mode)uprv_strchr(name, 0)[1];
UErrorCode errorCode = U_ZERO_ERROR;
- const Normalizer2 *norm2 = Normalizer2::getInstance(NULL, name, mode, errorCode);
+ const Normalizer2 *norm2 = Normalizer2::getInstance(nullptr, name, mode, errorCode);
if(U_SUCCESS(errorCode)) {
return new NormalizationTransliterator(ID, *norm2);
} else {
- return NULL;
+ return nullptr;
}
}
diff --git a/contrib/libs/icu/i18n/number_affixutils.cpp b/contrib/libs/icu/i18n/number_affixutils.cpp
index f9c154c885c..5f5ff4c3a63 100644
--- a/contrib/libs/icu/i18n/number_affixutils.cpp
+++ b/contrib/libs/icu/i18n/number_affixutils.cpp
@@ -135,8 +135,7 @@ Field AffixUtils::getFieldForType(AffixPatternType type) {
case TYPE_PLUS_SIGN:
return {UFIELD_CATEGORY_NUMBER, UNUM_SIGN_FIELD};
case TYPE_APPROXIMATELY_SIGN:
- // TODO: Introduce a new field for the approximately sign?
- return {UFIELD_CATEGORY_NUMBER, UNUM_SIGN_FIELD};
+ return {UFIELD_CATEGORY_NUMBER, UNUM_APPROXIMATELY_SIGN_FIELD};
case TYPE_PERCENT:
return {UFIELD_CATEGORY_NUMBER, UNUM_PERCENT_FIELD};
case TYPE_PERMILLE:
diff --git a/contrib/libs/icu/i18n/number_asformat.h b/contrib/libs/icu/i18n/number_asformat.h
index 394b9a811fd..f921b429420 100644
--- a/contrib/libs/icu/i18n/number_asformat.h
+++ b/contrib/libs/icu/i18n/number_asformat.h
@@ -34,37 +34,37 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format {
/**
* Destructor.
*/
- ~LocalizedNumberFormatterAsFormat() U_OVERRIDE;
+ ~LocalizedNumberFormatterAsFormat() override;
/**
* Equals operator.
*/
- bool operator==(const Format& other) const U_OVERRIDE;
+ bool operator==(const Format& other) const override;
/**
* Creates a copy of this object.
*/
- LocalizedNumberFormatterAsFormat* clone() const U_OVERRIDE;
+ LocalizedNumberFormatterAsFormat* clone() const override;
/**
* Formats a Number using the wrapped LocalizedNumberFormatter. The provided formattable must be a
* number type.
*/
UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, FieldPosition& pos,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
/**
* Formats a Number using the wrapped LocalizedNumberFormatter. The provided formattable must be a
* number type.
*/
UnicodeString& format(const Formattable& obj, UnicodeString& appendTo, FieldPositionIterator* posIter,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
/**
* Not supported: sets an error index and returns.
*/
void parseObject(const UnicodeString& source, Formattable& result,
- ParsePosition& parse_pos) const U_OVERRIDE;
+ ParsePosition& parse_pos) const override;
/**
* Gets the LocalizedNumberFormatter that this wrapper class uses to format numbers.
@@ -86,7 +86,7 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format {
*/
const LocalizedNumberFormatter& getNumberFormatter() const;
- UClassID getDynamicClassID() const U_OVERRIDE;
+ UClassID getDynamicClassID() const override;
static UClassID U_EXPORT2 getStaticClassID();
private:
diff --git a/contrib/libs/icu/i18n/number_capi.cpp b/contrib/libs/icu/i18n/number_capi.cpp
index b87dbd93e5f..abada9ad869 100644
--- a/contrib/libs/icu/i18n/number_capi.cpp
+++ b/contrib/libs/icu/i18n/number_capi.cpp
@@ -16,6 +16,8 @@
#include "number_decnum.h"
#include "unicode/numberformatter.h"
#include "unicode/unumberformatter.h"
+#include "unicode/simplenumberformatter.h"
+#include "unicode/usimplenumberformatter.h"
using namespace icu;
using namespace icu::number;
@@ -35,6 +37,24 @@ struct UNumberFormatterData : public UMemory,
LocalizedNumberFormatter fFormatter;
};
+/**
+ * Implementation class for USimpleNumber. Wraps a SimpleNumberFormatter.
+ */
+struct USimpleNumberData : public UMemory,
+ // Magic number as ASCII == "SNM" (SimpleNuMber)
+ public IcuCApiHelper<USimpleNumber, USimpleNumberData, 0x534E4D00> {
+ SimpleNumber fNumber;
+};
+
+/**
+ * Implementation class for USimpleNumberFormatter. Wraps a SimpleNumberFormatter.
+ */
+struct USimpleNumberFormatterData : public UMemory,
+ // Magic number as ASCII == "SNF" (SimpleNumberFormatter)
+ public IcuCApiHelper<USimpleNumberFormatter, USimpleNumberFormatterData, 0x534E4600> {
+ SimpleNumberFormatter fFormatter;
+};
+
struct UFormattedNumberImpl;
// Magic number as ASCII == "FDN" (FormatteDNumber)
@@ -46,6 +66,8 @@ struct UFormattedNumberImpl : public UFormattedValueImpl, public UFormattedNumbe
FormattedNumber fImpl;
UFormattedNumberData fData;
+
+ void setTo(FormattedNumber value);
};
UFormattedNumberImpl::UFormattedNumberImpl()
@@ -58,6 +80,10 @@ UFormattedNumberImpl::~UFormattedNumberImpl() {
fImpl.fData = nullptr;
}
+void UFormattedNumberImpl::setTo(FormattedNumber value) {
+ fData = std::move(*value.fData);
+}
+
}
}
U_NAMESPACE_END
@@ -82,7 +108,7 @@ const DecimalQuantity* icu::number::impl::validateUFormattedNumberToDecimalQuant
U_CAPI UNumberFormatter* U_EXPORT2
-unumf_openForSkeletonAndLocale(const UChar* skeleton, int32_t skeletonLen, const char* locale,
+unumf_openForSkeletonAndLocale(const char16_t* skeleton, int32_t skeletonLen, const char* locale,
UErrorCode* ec) {
auto* impl = new UNumberFormatterData();
if (impl == nullptr) {
@@ -96,7 +122,7 @@ unumf_openForSkeletonAndLocale(const UChar* skeleton, int32_t skeletonLen, const
}
U_CAPI UNumberFormatter* U_EXPORT2
-unumf_openForSkeletonAndLocaleWithError(const UChar* skeleton, int32_t skeletonLen, const char* locale,
+unumf_openForSkeletonAndLocaleWithError(const char16_t* skeleton, int32_t skeletonLen, const char* locale,
UParseError* perror, UErrorCode* ec) {
auto* impl = new UNumberFormatterData();
if (impl == nullptr) {
@@ -105,7 +131,8 @@ unumf_openForSkeletonAndLocaleWithError(const UChar* skeleton, int32_t skeletonL
}
// Readonly-alias constructor (first argument is whether we are NUL-terminated)
UnicodeString skeletonString(skeletonLen == -1, skeleton, skeletonLen);
- impl->fFormatter = NumberFormatter::forSkeleton(skeletonString, *perror, *ec).locale(locale);
+ UParseError tempParseError;
+ impl->fFormatter = NumberFormatter::forSkeleton(skeletonString, (perror == nullptr) ? tempParseError : *perror, *ec).locale(locale);
return impl->exportForC();
}
@@ -150,7 +177,7 @@ unumf_formatDecimal(const UNumberFormatter* uformatter, const char* value, int32
}
U_CAPI int32_t U_EXPORT2
-unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t bufferCapacity,
+unumf_resultToString(const UFormattedNumber* uresult, char16_t* buffer, int32_t bufferCapacity,
UErrorCode* ec) {
const auto* result = UFormattedNumberApiHelper::validate(uresult, *ec);
if (U_FAILURE(*ec)) { return 0; }
@@ -166,11 +193,11 @@ unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t buf
U_CAPI UBool U_EXPORT2
unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* ufpos, UErrorCode* ec) {
const auto* result = UFormattedNumberApiHelper::validate(uresult, *ec);
- if (U_FAILURE(*ec)) { return FALSE; }
+ if (U_FAILURE(*ec)) { return false; }
if (ufpos == nullptr) {
*ec = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
FieldPosition fp;
@@ -181,7 +208,7 @@ unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* u
ufpos->beginIndex = fp.getBeginIndex();
ufpos->endIndex = fp.getEndIndex();
// NOTE: MSVC sometimes complains when implicitly converting between bool and UBool
- return retval ? TRUE : FALSE;
+ return retval ? true : false;
}
U_CAPI void U_EXPORT2
@@ -225,6 +252,154 @@ unumf_close(UNumberFormatter* f) {
}
+///// SIMPLE NUMBER FORMATTER /////
+
+U_CAPI USimpleNumber* U_EXPORT2
+usnum_openForInt64(int64_t value, UErrorCode* ec) {
+ auto* number = new USimpleNumberData();
+ if (number == nullptr) {
+ *ec = U_MEMORY_ALLOCATION_ERROR;
+ return nullptr;
+ }
+ number->fNumber = SimpleNumber::forInt64(value, *ec);
+ return number->exportForC();
+}
+
+U_CAPI void U_EXPORT2
+usnum_setToInt64(USimpleNumber* unumber, int64_t value, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber = SimpleNumber::forInt64(value, *ec);
+}
+
+U_CAPI void U_EXPORT2
+usnum_multiplyByPowerOfTen(USimpleNumber* unumber, int32_t power, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber.multiplyByPowerOfTen(power, *ec);
+}
+
+U_CAPI void U_EXPORT2
+usnum_roundTo(USimpleNumber* unumber, int32_t position, UNumberFormatRoundingMode roundingMode, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber.roundTo(position, roundingMode, *ec);
+}
+
+U_CAPI void U_EXPORT2
+usnum_setMinimumIntegerDigits(USimpleNumber* unumber, int32_t minimumIntegerDigits, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber.setMinimumIntegerDigits(minimumIntegerDigits, *ec);
+}
+
+U_CAPI void U_EXPORT2
+usnum_setMinimumFractionDigits(USimpleNumber* unumber, int32_t minimumFractionDigits, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber.setMinimumFractionDigits(minimumFractionDigits, *ec);
+}
+
+U_CAPI void U_EXPORT2
+usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber.truncateStart(maximumIntegerDigits, *ec);
+}
+
+U_CAPI void U_EXPORT2
+usnum_setSign(USimpleNumber* unumber, USimpleNumberSign sign, UErrorCode* ec) {
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ number->fNumber.setSign(sign, *ec);
+}
+
+U_CAPI USimpleNumberFormatter* U_EXPORT2
+usnumf_openForLocale(const char* locale, UErrorCode* ec) {
+ auto* impl = new USimpleNumberFormatterData();
+ if (impl == nullptr) {
+ *ec = U_MEMORY_ALLOCATION_ERROR;
+ return nullptr;
+ }
+ impl->fFormatter = SimpleNumberFormatter::forLocale(locale, *ec);
+ return impl->exportForC();
+}
+
+U_CAPI USimpleNumberFormatter* U_EXPORT2
+usnumf_openForLocaleAndGroupingStrategy(
+ const char* locale, UNumberGroupingStrategy groupingStrategy, UErrorCode* ec) {
+ auto* impl = new USimpleNumberFormatterData();
+ if (impl == nullptr) {
+ *ec = U_MEMORY_ALLOCATION_ERROR;
+ return nullptr;
+ }
+ impl->fFormatter = SimpleNumberFormatter::forLocaleAndGroupingStrategy(locale, groupingStrategy, *ec);
+ return impl->exportForC();
+}
+
+U_CAPI void U_EXPORT2
+usnumf_format(
+ const USimpleNumberFormatter* uformatter,
+ USimpleNumber* unumber,
+ UFormattedNumber* uresult,
+ UErrorCode* ec) {
+ auto* formatter = USimpleNumberFormatterData::validate(uformatter, *ec);
+ auto* number = USimpleNumberData::validate(unumber, *ec);
+ auto* result = UFormattedNumberApiHelper::validate(uresult, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ auto localResult = formatter->fFormatter.format(std::move(number->fNumber), *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ result->setTo(std::move(localResult));
+}
+
+U_CAPI void U_EXPORT2
+usnumf_formatInt64(
+ const USimpleNumberFormatter* uformatter,
+ int64_t value,
+ UFormattedNumber* uresult,
+ UErrorCode* ec) {
+ auto* formatter = USimpleNumberFormatterData::validate(uformatter, *ec);
+ auto* result = UFormattedNumberApiHelper::validate(uresult, *ec);
+ if (U_FAILURE(*ec)) {
+ return;
+ }
+ auto localResult = formatter->fFormatter.formatInt64(value, *ec);
+ result->setTo(std::move(localResult));
+}
+
+U_CAPI void U_EXPORT2
+usnum_close(USimpleNumber* unumber) {
+ UErrorCode localStatus = U_ZERO_ERROR;
+ const USimpleNumberData* impl = USimpleNumberData::validate(unumber, localStatus);
+ delete impl;
+}
+
+U_CAPI void U_EXPORT2
+usnumf_close(USimpleNumberFormatter* uformatter) {
+ UErrorCode localStatus = U_ZERO_ERROR;
+ const USimpleNumberFormatterData* impl = USimpleNumberFormatterData::validate(uformatter, localStatus);
+ delete impl;
+}
+
+
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/i18n/number_compact.cpp b/contrib/libs/icu/i18n/number_compact.cpp
index 62692f444df..2cfa65a031d 100644
--- a/contrib/libs/icu/i18n/number_compact.cpp
+++ b/contrib/libs/icu/i18n/number_compact.cpp
@@ -22,7 +22,7 @@ namespace {
// A dummy object used when a "0" compact decimal entry is encountered. This is necessary
// in order to prevent falling back to root. Object equality ("==") is intended.
-const UChar *USE_FALLBACK = u"<USE FALLBACK>";
+const char16_t *USE_FALLBACK = u"<USE FALLBACK>";
/** Produces a string like "NumberElements/latn/patternsShort/decimalFormat". */
void getResourceBundleKey(const char *nsName, CompactStyle compactStyle, CompactType compactType,
@@ -38,7 +38,7 @@ int32_t getIndex(int32_t magnitude, StandardPlural::Form plural) {
return magnitude * StandardPlural::COUNT + plural;
}
-int32_t countZeros(const UChar *patternString, int32_t patternLength) {
+int32_t countZeros(const char16_t *patternString, int32_t patternLength) {
// NOTE: This strategy for computing the number of zeros is a hack for efficiency.
// It could break if there are any 0s that aren't part of the main pattern.
int32_t numZeros = 0;
@@ -104,7 +104,7 @@ int32_t CompactData::getMultiplier(int32_t magnitude) const {
return multipliers[magnitude];
}
-const UChar *CompactData::getPattern(
+const char16_t *CompactData::getPattern(
int32_t magnitude,
const PluralRules *rules,
const DecimalQuantity &dq) const {
@@ -114,7 +114,7 @@ const UChar *CompactData::getPattern(
if (magnitude > largestMagnitude) {
magnitude = largestMagnitude;
}
- const UChar *patternString = nullptr;
+ const char16_t *patternString = nullptr;
if (dq.hasIntegerValue()) {
int64_t i = dq.toLong(true);
if (i == 0) {
@@ -151,14 +151,14 @@ void CompactData::getUniquePatterns(UVector &output, UErrorCode &status) const {
// Insert pattern into the UVector if the UVector does not already contain the pattern.
// Search the UVector from the end since identical patterns are likely to be adjacent.
for (int32_t i = output.size() - 1; i >= 0; i--) {
- if (u_strcmp(pattern, static_cast<const UChar *>(output[i])) == 0) {
+ if (u_strcmp(pattern, static_cast<const char16_t *>(output[i])) == 0) {
goto continue_outer;
}
}
// The string was not found; add it to the UVector.
- // ANDY: This requires a const_cast. Why?
- output.addElementX(const_cast<UChar *>(pattern), status);
+ // Note: must cast off const from pattern to store it in a UVector, which expects (void *)
+ output.addElement(const_cast<char16_t *>(pattern), status);
continue_outer:
continue;
@@ -173,10 +173,14 @@ void CompactData::CompactDataSink::put(const char *key, ResourceValue &value, UB
for (int i3 = 0; powersOfTenTable.getKeyAndValue(i3, key, value); ++i3) {
// Assumes that the keys are always of the form "10000" where the magnitude is the
- // length of the key minus one. We expect magnitudes to be less than MAX_DIGITS.
+ // length of the key minus one. We only support magnitudes less than COMPACT_MAX_DIGITS;
+ // ignore entries that have greater magnitude.
auto magnitude = static_cast<int8_t> (strlen(key) - 1);
+ U_ASSERT(magnitude < COMPACT_MAX_DIGITS); // debug assert
+ if (magnitude >= COMPACT_MAX_DIGITS) { // skip in production
+ continue;
+ }
int8_t multiplier = data.multipliers[magnitude];
- U_ASSERT(magnitude < COMPACT_MAX_DIGITS);
// Iterate over the plural variants ("one", "other", etc)
ResourceTable pluralVariantsTable = value.getTable(status);
@@ -193,7 +197,7 @@ void CompactData::CompactDataSink::put(const char *key, ResourceValue &value, UB
// The value "0" means that we need to use the default pattern and not fall back
// to parent locales. Example locale where this is relevant: 'it'.
int32_t patternLength;
- const UChar *patternString = value.getString(patternLength, status);
+ const char16_t *patternString = value.getString(patternLength, status);
if (U_FAILURE(status)) { return; }
if (u_strcmp(patternString, u"0") == 0) {
patternString = USE_FALLBACK;
@@ -275,7 +279,7 @@ void CompactHandler::precomputeAllModifiers(MutablePatternModifier &buildReferen
}
for (int32_t i = 0; i < precomputedModsLength; i++) {
- auto patternString = static_cast<const UChar *>(allPatterns[i]);
+ auto patternString = static_cast<const char16_t *>(allPatterns[i]);
UnicodeString hello(patternString);
CompactModInfo &info = precomputedMods[i];
ParsedPatternInfo patternInfo;
@@ -306,7 +310,7 @@ void CompactHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micr
magnitude -= multiplier;
}
- const UChar *patternString = data.getPattern(magnitude, rules, quantity);
+ const char16_t *patternString = data.getPattern(magnitude, rules, quantity);
if (patternString == nullptr) {
// Use the default (non-compact) modifier.
// No need to take any action.
diff --git a/contrib/libs/icu/i18n/number_compact.h b/contrib/libs/icu/i18n/number_compact.h
index 9802b9fb10e..aee1df74523 100644
--- a/contrib/libs/icu/i18n/number_compact.h
+++ b/contrib/libs/icu/i18n/number_compact.h
@@ -17,7 +17,7 @@
U_NAMESPACE_BEGIN namespace number {
namespace impl {
-static const int32_t COMPACT_MAX_DIGITS = 15;
+static const int32_t COMPACT_MAX_DIGITS = 20;
class CompactData : public MultiplierProducer {
public:
@@ -26,9 +26,9 @@ class CompactData : public MultiplierProducer {
void populate(const Locale &locale, const char *nsName, CompactStyle compactStyle,
CompactType compactType, UErrorCode &status);
- int32_t getMultiplier(int32_t magnitude) const U_OVERRIDE;
+ int32_t getMultiplier(int32_t magnitude) const override;
- const UChar *getPattern(
+ const char16_t *getPattern(
int32_t magnitude,
const PluralRules *rules,
const DecimalQuantity &dq) const;
@@ -36,7 +36,7 @@ class CompactData : public MultiplierProducer {
void getUniquePatterns(UVector &output, UErrorCode &status) const;
private:
- const UChar *patterns[(COMPACT_MAX_DIGITS + 1) * StandardPlural::COUNT];
+ const char16_t *patterns[(COMPACT_MAX_DIGITS + 1) * StandardPlural::COUNT];
int8_t multipliers[COMPACT_MAX_DIGITS + 1];
int8_t largestMagnitude;
UBool isEmpty;
@@ -45,7 +45,7 @@ class CompactData : public MultiplierProducer {
public:
explicit CompactDataSink(CompactData &data) : data(data) {}
- void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE;
+ void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override;
private:
CompactData &data;
@@ -54,7 +54,7 @@ class CompactData : public MultiplierProducer {
struct CompactModInfo {
const ImmutablePatternModifier *mod;
- const UChar* patternString;
+ const char16_t* patternString;
};
class CompactHandler : public MicroPropsGenerator, public UMemory {
@@ -70,10 +70,10 @@ class CompactHandler : public MicroPropsGenerator, public UMemory {
const MicroPropsGenerator *parent,
UErrorCode &status);
- ~CompactHandler() U_OVERRIDE;
+ ~CompactHandler() override;
void
- processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const U_OVERRIDE;
+ processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const override;
private:
const PluralRules *rules;
diff --git a/contrib/libs/icu/i18n/number_currencysymbols.cpp b/contrib/libs/icu/i18n/number_currencysymbols.cpp
index da1812f49f0..8d5127556be 100644
--- a/contrib/libs/icu/i18n/number_currencysymbols.cpp
+++ b/contrib/libs/icu/i18n/number_currencysymbols.cpp
@@ -108,6 +108,10 @@ UnicodeString CurrencySymbols::getPluralName(StandardPlural::Form plural, UError
}
}
+bool CurrencySymbols::hasEmptyCurrencySymbol() const {
+ return !fCurrencySymbol.isBogus() && fCurrencySymbol.isEmpty();
+}
+
CurrencyUnit
icu::number::impl::resolveCurrency(const DecimalFormatProperties& properties, const Locale& locale,
diff --git a/contrib/libs/icu/i18n/number_currencysymbols.h b/contrib/libs/icu/i18n/number_currencysymbols.h
index 7e38fdf8287..c2223bd0f0b 100644
--- a/contrib/libs/icu/i18n/number_currencysymbols.h
+++ b/contrib/libs/icu/i18n/number_currencysymbols.h
@@ -41,6 +41,8 @@ class U_I18N_API CurrencySymbols : public UMemory {
UnicodeString getPluralName(StandardPlural::Form plural, UErrorCode& status) const;
+ bool hasEmptyCurrencySymbol() const;
+
protected:
// Required fields:
CurrencyUnit fCurrency;
diff --git a/contrib/libs/icu/i18n/number_decimalquantity.cpp b/contrib/libs/icu/i18n/number_decimalquantity.cpp
index 6a2847b1c18..659465d0870 100644
--- a/contrib/libs/icu/i18n/number_decimalquantity.cpp
+++ b/contrib/libs/icu/i18n/number_decimalquantity.cpp
@@ -89,7 +89,7 @@ DecimalQuantity::DecimalQuantity(const DecimalQuantity &other) {
*this = other;
}
-DecimalQuantity::DecimalQuantity(DecimalQuantity&& src) U_NOEXCEPT {
+DecimalQuantity::DecimalQuantity(DecimalQuantity&& src) noexcept {
*this = std::move(src);
}
@@ -102,7 +102,7 @@ DecimalQuantity &DecimalQuantity::operator=(const DecimalQuantity &other) {
return *this;
}
-DecimalQuantity& DecimalQuantity::operator=(DecimalQuantity&& src) U_NOEXCEPT {
+DecimalQuantity& DecimalQuantity::operator=(DecimalQuantity&& src) noexcept {
if (this == &src) {
return *this;
}
@@ -181,20 +181,22 @@ uint64_t DecimalQuantity::getPositionFingerprint() const {
return fingerprint;
}
-void DecimalQuantity::roundToIncrement(double roundingIncrement, RoundingMode roundingMode,
- UErrorCode& status) {
+void DecimalQuantity::roundToIncrement(
+ uint64_t increment,
+ digits_t magnitude,
+ RoundingMode roundingMode,
+ UErrorCode& status) {
// Do not call this method with an increment having only a 1 or a 5 digit!
// Use a more efficient call to either roundToMagnitude() or roundToNickel().
// Check a few popular rounding increments; a more thorough check is in Java.
- U_ASSERT(roundingIncrement != 0.01);
- U_ASSERT(roundingIncrement != 0.05);
- U_ASSERT(roundingIncrement != 0.1);
- U_ASSERT(roundingIncrement != 0.5);
- U_ASSERT(roundingIncrement != 1);
- U_ASSERT(roundingIncrement != 5);
+ U_ASSERT(increment != 1);
+ U_ASSERT(increment != 5);
+ DecimalQuantity incrementDQ;
+ incrementDQ.setToLong(increment);
+ incrementDQ.adjustMagnitude(magnitude);
DecNum incrementDN;
- incrementDN.setTo(roundingIncrement, status);
+ incrementDQ.toDecNum(incrementDN, status);
if (U_FAILURE(status)) { return; }
// Divide this DecimalQuantity by the increment, round, then multiply back.
@@ -254,6 +256,12 @@ bool DecimalQuantity::adjustMagnitude(int32_t delta) {
return false;
}
+int32_t DecimalQuantity::adjustToZeroScale() {
+ int32_t retval = scale;
+ scale = 0;
+ return retval;
+}
+
double DecimalQuantity::getPluralOperand(PluralOperand operand) const {
// If this assertion fails, you need to call roundToInfinity() or some other rounding method.
// See the comment at the top of this file explaining the "isApproximate" field.
@@ -549,6 +557,65 @@ void DecimalQuantity::_setToDecNum(const DecNum& decnum, UErrorCode& status) {
}
}
+DecimalQuantity DecimalQuantity::fromExponentString(UnicodeString num, UErrorCode& status) {
+ if (num.indexOf(u'e') >= 0 || num.indexOf(u'c') >= 0
+ || num.indexOf(u'E') >= 0 || num.indexOf(u'C') >= 0) {
+ int32_t ePos = num.lastIndexOf('e');
+ if (ePos < 0) {
+ ePos = num.lastIndexOf('c');
+ }
+ if (ePos < 0) {
+ ePos = num.lastIndexOf('E');
+ }
+ if (ePos < 0) {
+ ePos = num.lastIndexOf('C');
+ }
+ int32_t expNumPos = ePos + 1;
+ UnicodeString exponentStr = num.tempSubString(expNumPos, num.length() - expNumPos);
+
+ // parse exponentStr into exponent, but note that parseAsciiInteger doesn't handle the minus sign
+ bool isExpStrNeg = num[expNumPos] == u'-';
+ int32_t exponentParsePos = isExpStrNeg ? 1 : 0;
+ int32_t exponent = ICU_Utility::parseAsciiInteger(exponentStr, exponentParsePos);
+ exponent = isExpStrNeg ? -exponent : exponent;
+
+ // Compute the decNumber representation
+ UnicodeString fractionStr = num.tempSubString(0, ePos);
+ CharString fracCharStr = CharString();
+ fracCharStr.appendInvariantChars(fractionStr, status);
+ DecNum decnum;
+ decnum.setTo(fracCharStr.toStringPiece(), status);
+
+ // Clear and set this DecimalQuantity instance
+ DecimalQuantity dq;
+ dq.setToDecNum(decnum, status);
+ int32_t numFracDigit = getVisibleFractionCount(fractionStr);
+ dq.setMinFraction(numFracDigit);
+ dq.adjustExponent(exponent);
+
+ return dq;
+ } else {
+ DecimalQuantity dq;
+ int numFracDigit = getVisibleFractionCount(num);
+
+ CharString numCharStr = CharString();
+ numCharStr.appendInvariantChars(num, status);
+ dq.setToDecNumber(numCharStr.toStringPiece(), status);
+
+ dq.setMinFraction(numFracDigit);
+ return dq;
+ }
+}
+
+int32_t DecimalQuantity::getVisibleFractionCount(UnicodeString value) {
+ int decimalPos = value.indexOf('.') + 1;
+ if (decimalPos == 0) {
+ return 0;
+ } else {
+ return value.length() - decimalPos;
+ }
+}
+
int64_t DecimalQuantity::toLong(bool truncateIfOverflow) const {
// NOTE: Call sites should be guarded by fitsInLong(), like this:
// if (dq.fitsInLong()) { /* use dq.toLong() */ } else { /* use some fallback */ }
@@ -948,6 +1015,44 @@ UnicodeString DecimalQuantity::toPlainString() const {
return sb;
}
+
+UnicodeString DecimalQuantity::toExponentString() const {
+ U_ASSERT(!isApproximate);
+ UnicodeString sb;
+ if (isNegative()) {
+ sb.append(u'-');
+ }
+
+ int32_t upper = scale + precision - 1;
+ int32_t lower = scale;
+ if (upper < lReqPos - 1) {
+ upper = lReqPos - 1;
+ }
+ if (lower > rReqPos) {
+ lower = rReqPos;
+ }
+ int32_t p = upper;
+ if (p < 0) {
+ sb.append(u'0');
+ }
+ for (; p >= 0; p--) {
+ sb.append(u'0' + getDigitPos(p - scale));
+ }
+ if (lower < 0) {
+ sb.append(u'.');
+ }
+ for(; p >= lower; p--) {
+ sb.append(u'0' + getDigitPos(p - scale));
+ }
+
+ if (exponent != 0) {
+ sb.append(u'c');
+ ICU_Utility::appendNumber(sb, exponent);
+ }
+
+ return sb;
+}
+
UnicodeString DecimalQuantity::toScientificString() const {
U_ASSERT(!isApproximate);
UnicodeString result;
diff --git a/contrib/libs/icu/i18n/number_decimalquantity.h b/contrib/libs/icu/i18n/number_decimalquantity.h
index 107c09a96a5..2211fe9c19e 100644
--- a/contrib/libs/icu/i18n/number_decimalquantity.h
+++ b/contrib/libs/icu/i18n/number_decimalquantity.h
@@ -36,7 +36,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
DecimalQuantity(const DecimalQuantity &other);
/** Move constructor. */
- DecimalQuantity(DecimalQuantity &&src) U_NOEXCEPT;
+ DecimalQuantity(DecimalQuantity &&src) noexcept;
DecimalQuantity();
@@ -50,7 +50,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
DecimalQuantity &operator=(const DecimalQuantity &other);
/** Move assignment */
- DecimalQuantity &operator=(DecimalQuantity&& src) U_NOEXCEPT;
+ DecimalQuantity &operator=(DecimalQuantity&& src) noexcept;
/**
* Sets the minimum integer digits that this {@link DecimalQuantity} should generate.
@@ -81,11 +81,15 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
*
* <p>If rounding to a power of ten, use the more efficient {@link #roundToMagnitude} instead.
*
- * @param roundingIncrement The increment to which to round.
+ * @param increment The increment to which to round.
+ * @param magnitude The power of 10 to which to round.
* @param roundingMode The {@link RoundingMode} to use if rounding is necessary.
*/
- void roundToIncrement(double roundingIncrement, RoundingMode roundingMode,
- UErrorCode& status);
+ void roundToIncrement(
+ uint64_t increment,
+ digits_t magnitude,
+ RoundingMode roundingMode,
+ UErrorCode& status);
/** Removes all fraction digits. */
void truncate();
@@ -141,6 +145,13 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
bool adjustMagnitude(int32_t delta);
/**
+ * Scales the number such that the least significant nonzero digit is at magnitude 0.
+ *
+ * @return The previous magnitude of the least significant digit.
+ */
+ int32_t adjustToZeroScale();
+
+ /**
* @return The power of ten corresponding to the most significant nonzero digit.
* The number must not be zero.
*/
@@ -184,10 +195,10 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
Signum signum() const;
/** @return Whether the value represented by this {@link DecimalQuantity} is infinite. */
- bool isInfinite() const U_OVERRIDE;
+ bool isInfinite() const override;
/** @return Whether the value represented by this {@link DecimalQuantity} is not a number. */
- bool isNaN() const U_OVERRIDE;
+ bool isNaN() const override;
/**
* Note: this method incorporates the value of {@code exponent}
@@ -234,6 +245,9 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
/** Internal method if the caller already has a DecNum. */
DecimalQuantity &setToDecNum(const DecNum& n, UErrorCode& status);
+ /** Returns a DecimalQuantity after parsing the input string. */
+ static DecimalQuantity fromExponentString(UnicodeString n, UErrorCode& status);
+
/**
* Appends a digit, optionally with one or more leading zeros, to the end of the value represented
* by this DecimalQuantity.
@@ -253,9 +267,9 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
*/
void appendDigit(int8_t value, int32_t leadingZeros, bool appendAsInteger);
- double getPluralOperand(PluralOperand operand) const U_OVERRIDE;
+ double getPluralOperand(PluralOperand operand) const override;
- bool hasIntegerValue() const U_OVERRIDE;
+ bool hasIntegerValue() const override;
/**
* Gets the digit at the specified magnitude. For example, if the represented number is 12.3,
@@ -315,6 +329,10 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
/** Returns the string without exponential notation. Slightly slower than toScientificString(). */
UnicodeString toPlainString() const;
+ /** Returns the string using ASCII digits and using exponential notation for non-zero
+ exponents, following the UTS 35 specification for plural rule samples. */
+ UnicodeString toExponentString() const;
+
/** Visible for testing */
inline bool isUsingBytes() { return usingBytes; }
@@ -518,6 +536,8 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
void _setToDecNum(const DecNum& dn, UErrorCode& status);
+ static int32_t getVisibleFractionCount(UnicodeString value);
+
void convertToAccurateDouble();
/** Ensure that a byte array of at least 40 digits is allocated. */
diff --git a/contrib/libs/icu/i18n/number_decimfmtprops.cpp b/contrib/libs/icu/i18n/number_decimfmtprops.cpp
index 7fa58bbc7ab..6dbfc69ec83 100644
--- a/contrib/libs/icu/i18n/number_decimfmtprops.cpp
+++ b/contrib/libs/icu/i18n/number_decimfmtprops.cpp
@@ -18,7 +18,7 @@ namespace {
alignas(DecimalFormatProperties)
char kRawDefaultProperties[sizeof(DecimalFormatProperties)];
-icu::UInitOnce gDefaultPropertiesInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gDefaultPropertiesInitOnce {};
void U_CALLCONV initDefaultProperties(UErrorCode&) {
// can't fail, uses placement new into statically allocated space.
diff --git a/contrib/libs/icu/i18n/number_fluent.cpp b/contrib/libs/icu/i18n/number_fluent.cpp
index fd486afb512..45d6b06c6df 100644
--- a/contrib/libs/icu/i18n/number_fluent.cpp
+++ b/contrib/libs/icu/i18n/number_fluent.cpp
@@ -288,6 +288,34 @@ Derived NumberFormatterSettings<Derived>::usage(const StringPiece usage)&& {
return move;
}
+template <typename Derived>
+Derived NumberFormatterSettings<Derived>::displayOptions(const DisplayOptions &displayOptions) const & {
+ Derived copy(*this);
+ // `displayCase` does not recognise the `undefined`
+ if (displayOptions.getGrammaticalCase() == UDISPOPT_GRAMMATICAL_CASE_UNDEFINED) {
+ copy.fMacros.unitDisplayCase.set(nullptr);
+ return copy;
+ }
+
+ copy.fMacros.unitDisplayCase.set(
+ udispopt_getGrammaticalCaseIdentifier(displayOptions.getGrammaticalCase()));
+ return copy;
+}
+
+template <typename Derived>
+Derived NumberFormatterSettings<Derived>::displayOptions(const DisplayOptions &displayOptions) && {
+ Derived move(std::move(*this));
+ // `displayCase` does not recognise the `undefined`
+ if (displayOptions.getGrammaticalCase() == UDISPOPT_GRAMMATICAL_CASE_UNDEFINED) {
+ move.fMacros.unitDisplayCase.set(nullptr);
+ return move;
+ }
+
+ move.fMacros.unitDisplayCase.set(
+ udispopt_getGrammaticalCaseIdentifier(displayOptions.getGrammaticalCase()));
+ return move;
+}
+
template<typename Derived>
Derived NumberFormatterSettings<Derived>::unitDisplayCase(const StringPiece unitDisplayCase) const& {
Derived copy(*this);
@@ -403,10 +431,10 @@ UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(const NFS<UNF>& other)
}
// Make default copy constructor call the NumberFormatterSettings copy constructor.
-UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(UNF&& src) U_NOEXCEPT
+UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(UNF&& src) noexcept
: UNF(static_cast<NFS<UNF>&&>(src)) {}
-UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(NFS<UNF>&& src) U_NOEXCEPT
+UnlocalizedNumberFormatter::UnlocalizedNumberFormatter(NFS<UNF>&& src) noexcept
: NFS<UNF>(std::move(src)) {
// No additional fields to assign
}
@@ -417,7 +445,7 @@ UnlocalizedNumberFormatter& UnlocalizedNumberFormatter::operator=(const UNF& oth
return *this;
}
-UnlocalizedNumberFormatter& UnlocalizedNumberFormatter::operator=(UNF&& src) U_NOEXCEPT {
+UnlocalizedNumberFormatter& UnlocalizedNumberFormatter::operator=(UNF&& src) noexcept {
NFS<UNF>::operator=(static_cast<NFS<UNF>&&>(src));
// No additional fields to assign
return *this;
@@ -433,10 +461,10 @@ LocalizedNumberFormatter::LocalizedNumberFormatter(const NFS<LNF>& other)
lnfCopyHelper(static_cast<const LNF&>(other), localStatus);
}
-LocalizedNumberFormatter::LocalizedNumberFormatter(LocalizedNumberFormatter&& src) U_NOEXCEPT
+LocalizedNumberFormatter::LocalizedNumberFormatter(LocalizedNumberFormatter&& src) noexcept
: LNF(static_cast<NFS<LNF>&&>(src)) {}
-LocalizedNumberFormatter::LocalizedNumberFormatter(NFS<LNF>&& src) U_NOEXCEPT
+LocalizedNumberFormatter::LocalizedNumberFormatter(NFS<LNF>&& src) noexcept
: NFS<LNF>(std::move(src)) {
lnfMoveHelper(std::move(static_cast<LNF&&>(src)));
}
@@ -449,7 +477,7 @@ LocalizedNumberFormatter& LocalizedNumberFormatter::operator=(const LNF& other)
return *this;
}
-LocalizedNumberFormatter& LocalizedNumberFormatter::operator=(LNF&& src) U_NOEXCEPT {
+LocalizedNumberFormatter& LocalizedNumberFormatter::operator=(LNF&& src) noexcept {
NFS<LNF>::operator=(static_cast<NFS<LNF>&&>(src));
lnfMoveHelper(std::move(src));
return *this;
diff --git a/contrib/libs/icu/i18n/number_formatimpl.cpp b/contrib/libs/icu/i18n/number_formatimpl.cpp
index 96e3e9e7c69..53bac49a55c 100644
--- a/contrib/libs/icu/i18n/number_formatimpl.cpp
+++ b/contrib/libs/icu/i18n/number_formatimpl.cpp
@@ -36,7 +36,7 @@ int32_t NumberFormatterImpl::formatStatic(const MacroProps &macros, UFormattedNu
NumberFormatterImpl impl(macros, false, status);
MicroProps& micros = impl.preProcessUnsafe(inValue, status);
if (U_FAILURE(status)) { return 0; }
- int32_t length = writeNumber(micros, inValue, outString, 0, status);
+ int32_t length = writeNumber(micros.simple, inValue, outString, 0, status);
length += writeAffixes(micros, outString, 0, length, status);
results->outputUnit = std::move(micros.outputUnit);
results->gender = micros.gender;
@@ -61,7 +61,7 @@ int32_t NumberFormatterImpl::format(UFormattedNumberData *results, UErrorCode &s
MicroProps micros;
preProcess(inValue, micros, status);
if (U_FAILURE(status)) { return 0; }
- int32_t length = writeNumber(micros, inValue, outString, 0, status);
+ int32_t length = writeNumber(micros.simple, inValue, outString, 0, status);
length += writeAffixes(micros, outString, 0, length, status);
results->outputUnit = std::move(micros.outputUnit);
results->gender = micros.gender;
@@ -186,7 +186,7 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
// Resolve the symbols. Do this here because currency may need to customize them.
if (macros.symbols.isDecimalFormatSymbols()) {
- fMicros.symbols = macros.symbols.getDecimalFormatSymbols();
+ fMicros.simple.symbols = macros.symbols.getDecimalFormatSymbols();
} else {
LocalPointer<DecimalFormatSymbols> newSymbols(
new DecimalFormatSymbols(macros.locale, *ns, status), status);
@@ -199,15 +199,15 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
return nullptr;
}
}
- fMicros.symbols = newSymbols.getAlias();
+ fMicros.simple.symbols = newSymbols.getAlias();
fSymbols.adoptInstead(newSymbols.orphan());
}
// Load and parse the pattern string. It is used for grouping sizes and affixes only.
// If we are formatting currency, check for a currency-specific pattern.
const char16_t* pattern = nullptr;
- if (isCurrency && fMicros.symbols->getCurrencyPattern() != nullptr) {
- pattern = fMicros.symbols->getCurrencyPattern();
+ if (isCurrency && fMicros.simple.symbols->getCurrencyPattern() != nullptr) {
+ pattern = fMicros.simple.symbols->getCurrencyPattern();
}
if (pattern == nullptr) {
CldrPatternStyle patternStyle;
@@ -291,14 +291,14 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
// Grouping strategy
if (!macros.grouper.isBogus()) {
- fMicros.grouping = macros.grouper;
+ fMicros.simple.grouping = macros.grouper;
} else if (isCompactNotation) {
// Compact notation uses minGrouping by default since ICU 59
- fMicros.grouping = Grouper::forStrategy(UNUM_GROUPING_MIN2);
+ fMicros.simple.grouping = Grouper::forStrategy(UNUM_GROUPING_MIN2);
} else {
- fMicros.grouping = Grouper::forStrategy(UNUM_GROUPING_AUTO);
+ fMicros.simple.grouping = Grouper::forStrategy(UNUM_GROUPING_AUTO);
}
- fMicros.grouping.setLocaleData(*fPatternInfo, macros.locale);
+ fMicros.simple.grouping.setLocaleData(*fPatternInfo, macros.locale);
// Padding strategy
if (!macros.padder.isBogus()) {
@@ -323,17 +323,17 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
// Decimal mark display
if (macros.decimal != UNUM_DECIMAL_SEPARATOR_COUNT) {
- fMicros.decimal = macros.decimal;
+ fMicros.simple.decimal = macros.decimal;
} else {
- fMicros.decimal = UNUM_DECIMAL_SEPARATOR_AUTO;
+ fMicros.simple.decimal = UNUM_DECIMAL_SEPARATOR_AUTO;
}
// Use monetary separator symbols
- fMicros.useCurrency = isCurrency;
+ fMicros.simple.useCurrency = isCurrency;
// Inner modifier (scientific notation)
if (macros.notation.fType == Notation::NTN_SCIENTIFIC) {
- auto newScientificHandler = new ScientificHandler(&macros.notation, fMicros.symbols, chain);
+ auto newScientificHandler = new ScientificHandler(&macros.notation, fMicros.simple.symbols, chain);
if (newScientificHandler == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return nullptr;
@@ -353,20 +353,22 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
}
fPatternModifier.adoptInstead(patternModifier);
const AffixPatternProvider* affixProvider =
- macros.affixProvider != nullptr
+ macros.affixProvider != nullptr && (
+ // For more information on this condition, see ICU-22073
+ !isCompactNotation || isCurrency == macros.affixProvider->hasCurrencySign())
? macros.affixProvider
: static_cast<const AffixPatternProvider*>(fPatternInfo.getAlias());
patternModifier->setPatternInfo(affixProvider, kUndefinedField);
patternModifier->setPatternAttributes(fMicros.sign, isPermille, macros.approximately);
if (patternModifier->needsPlurals()) {
patternModifier->setSymbols(
- fMicros.symbols,
+ fMicros.simple.symbols,
currency,
unitWidth,
resolvePluralRules(macros.rules, macros.locale, status),
status);
} else {
- patternModifier->setSymbols(fMicros.symbols, currency, unitWidth, nullptr, status);
+ patternModifier->setSymbols(fMicros.simple.symbols, currency, unitWidth, nullptr, status);
}
if (safe) {
fImmutablePatternModifier.adoptInsteadAndCheckErrorCode(patternModifier->createImmutable(status),
@@ -378,7 +380,7 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
// currencyAsDecimal
if (affixProvider->currencyAsDecimal()) {
- fMicros.currencyAsDecimal = patternModifier->getCurrencySymbolForUnitWidth(status);
+ fMicros.simple.currencyAsDecimal = patternModifier->getCurrencySymbolForUnitWidth(status);
}
// Outer modifier (CLDR units and currency long names)
@@ -479,8 +481,10 @@ NumberFormatterImpl::macrosToMicroGenerator(const MacroProps& macros, bool safe,
}
const PluralRules*
-NumberFormatterImpl::resolvePluralRules(const PluralRules* rulesPtr, const Locale& locale,
- UErrorCode& status) {
+NumberFormatterImpl::resolvePluralRules(
+ const PluralRules* rulesPtr,
+ const Locale& locale,
+ UErrorCode& status) {
if (rulesPtr != nullptr) {
return rulesPtr;
}
@@ -491,8 +495,12 @@ NumberFormatterImpl::resolvePluralRules(const PluralRules* rulesPtr, const Local
return fRules.getAlias();
}
-int32_t NumberFormatterImpl::writeAffixes(const MicroProps& micros, FormattedStringBuilder& string,
- int32_t start, int32_t end, UErrorCode& status) {
+int32_t NumberFormatterImpl::writeAffixes(
+ const MicroProps& micros,
+ FormattedStringBuilder& string,
+ int32_t start,
+ int32_t end,
+ UErrorCode& status) {
U_ASSERT(micros.modOuter != nullptr);
// Always apply the inner modifier (which is "strong").
int32_t length = micros.modInner->apply(string, start, end, status);
@@ -506,9 +514,12 @@ int32_t NumberFormatterImpl::writeAffixes(const MicroProps& micros, FormattedStr
return length;
}
-int32_t NumberFormatterImpl::writeNumber(const MicroProps& micros, DecimalQuantity& quantity,
- FormattedStringBuilder& string, int32_t index,
- UErrorCode& status) {
+int32_t NumberFormatterImpl::writeNumber(
+ const SimpleMicroProps& micros,
+ DecimalQuantity& quantity,
+ FormattedStringBuilder& string,
+ int32_t index,
+ UErrorCode& status) {
int32_t length = 0;
if (quantity.isInfinite()) {
length += string.insert(
@@ -526,7 +537,12 @@ int32_t NumberFormatterImpl::writeNumber(const MicroProps& micros, DecimalQuanti
} else {
// Add the integer digits
- length += writeIntegerDigits(micros, quantity, string, length + index, status);
+ length += writeIntegerDigits(
+ micros,
+ quantity,
+ string,
+ length + index,
+ status);
// Add the decimal point
if (quantity.getLowerDisplayMagnitude() < 0 || micros.decimal == UNUM_DECIMAL_SEPARATOR_ALWAYS) {
@@ -571,9 +587,12 @@ int32_t NumberFormatterImpl::writeNumber(const MicroProps& micros, DecimalQuanti
return length;
}
-int32_t NumberFormatterImpl::writeIntegerDigits(const MicroProps& micros, DecimalQuantity& quantity,
- FormattedStringBuilder& string, int32_t index,
- UErrorCode& status) {
+int32_t NumberFormatterImpl::writeIntegerDigits(
+ const SimpleMicroProps& micros,
+ DecimalQuantity& quantity,
+ FormattedStringBuilder& string,
+ int32_t index,
+ UErrorCode& status) {
int length = 0;
int integerCount = quantity.getUpperDisplayMagnitude() + 1;
for (int i = 0; i < integerCount; i++) {
@@ -603,9 +622,12 @@ int32_t NumberFormatterImpl::writeIntegerDigits(const MicroProps& micros, Decima
return length;
}
-int32_t NumberFormatterImpl::writeFractionDigits(const MicroProps& micros, DecimalQuantity& quantity,
- FormattedStringBuilder& string, int32_t index,
- UErrorCode& status) {
+int32_t NumberFormatterImpl::writeFractionDigits(
+ const SimpleMicroProps& micros,
+ DecimalQuantity& quantity,
+ FormattedStringBuilder& string,
+ int32_t index,
+ UErrorCode& status) {
int length = 0;
int fractionCount = -quantity.getLowerDisplayMagnitude();
for (int i = 0; i < fractionCount; i++) {
diff --git a/contrib/libs/icu/i18n/number_formatimpl.h b/contrib/libs/icu/i18n/number_formatimpl.h
index d7be1468b6d..62d53212616 100644
--- a/contrib/libs/icu/i18n/number_formatimpl.h
+++ b/contrib/libs/icu/i18n/number_formatimpl.h
@@ -79,14 +79,22 @@ class NumberFormatterImpl : public UMemory {
* Synthesizes the output string from a MicroProps and DecimalQuantity.
* This method formats only the main number, not affixes.
*/
- static int32_t writeNumber(const MicroProps& micros, DecimalQuantity& quantity,
- FormattedStringBuilder& string, int32_t index, UErrorCode& status);
+ static int32_t writeNumber(
+ const SimpleMicroProps& micros,
+ DecimalQuantity& quantity,
+ FormattedStringBuilder& string,
+ int32_t index,
+ UErrorCode& status);
/**
* Adds the affixes. Intended to be called immediately after formatNumber.
*/
- static int32_t writeAffixes(const MicroProps& micros, FormattedStringBuilder& string, int32_t start,
- int32_t end, UErrorCode& status);
+ static int32_t writeAffixes(
+ const MicroProps& micros,
+ FormattedStringBuilder& string,
+ int32_t start,
+ int32_t end,
+ UErrorCode& status);
private:
// Head of the MicroPropsGenerator linked list. Subclasses' processQuantity
@@ -146,12 +154,20 @@ class NumberFormatterImpl : public UMemory {
macrosToMicroGenerator(const MacroProps &macros, bool safe, UErrorCode &status);
static int32_t
- writeIntegerDigits(const MicroProps &micros, DecimalQuantity &quantity, FormattedStringBuilder &string,
- int32_t index, UErrorCode &status);
+ writeIntegerDigits(
+ const SimpleMicroProps& micros,
+ DecimalQuantity &quantity,
+ FormattedStringBuilder &string,
+ int32_t index,
+ UErrorCode &status);
static int32_t
- writeFractionDigits(const MicroProps &micros, DecimalQuantity &quantity, FormattedStringBuilder &string,
- int32_t index, UErrorCode &status);
+ writeFractionDigits(
+ const SimpleMicroProps& micros,
+ DecimalQuantity &quantity,
+ FormattedStringBuilder &string,
+ int32_t index,
+ UErrorCode &status);
};
} // namespace impl
diff --git a/contrib/libs/icu/i18n/number_grouping.cpp b/contrib/libs/icu/i18n/number_grouping.cpp
index 9ba639e67e2..54aeffee811 100644
--- a/contrib/libs/icu/i18n/number_grouping.cpp
+++ b/contrib/libs/icu/i18n/number_grouping.cpp
@@ -18,7 +18,7 @@ namespace {
int16_t getMinGroupingForLocale(const Locale& locale) {
// TODO: Cache this?
UErrorCode localStatus = U_ZERO_ERROR;
- LocalUResourceBundlePointer bundle(ures_open(NULL, locale.getName(), &localStatus));
+ LocalUResourceBundlePointer bundle(ures_open(nullptr, locale.getName(), &localStatus));
int32_t resultLen = 0;
const char16_t* result = ures_getStringByKeyWithFallback(
bundle.getAlias(),
diff --git a/contrib/libs/icu/i18n/number_longnames.cpp b/contrib/libs/icu/i18n/number_longnames.cpp
index 5a4cf6321c8..96c6ca6bf89 100644
--- a/contrib/libs/icu/i18n/number_longnames.cpp
+++ b/contrib/libs/icu/i18n/number_longnames.cpp
@@ -151,7 +151,7 @@ enum PlaceholderPosition { PH_EMPTY, PH_NONE, PH_BEGINNING, PH_MIDDLE, PH_END };
void extractCorePattern(const UnicodeString &pattern,
UnicodeString &coreUnit,
PlaceholderPosition &placeholderPosition,
- UChar &joinerChar) {
+ char16_t &joinerChar) {
joinerChar = 0;
int32_t len = pattern.length();
if (pattern.startsWith(u"{0}", 3)) {
@@ -209,7 +209,7 @@ getGenderForBuiltin(const Locale &locale, const MeasureUnit &builtinUnit, UError
UErrorCode localStatus = status;
int32_t resultLen = 0;
- const UChar *result =
+ const char16_t *result =
ures_getStringByKeyWithFallback(unitsBundle.getAlias(), key.data(), &resultLen, &localStatus);
if (U_SUCCESS(localStatus)) {
status = localStatus;
@@ -258,7 +258,7 @@ class InflectedPluralSink : public ResourceSink {
}
// See ResourceSink::put().
- void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE {
+ void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override {
int32_t pluralIndex = getIndex(key, status);
if (U_FAILURE(status)) { return; }
if (!outArray[pluralIndex].isBogus()) {
@@ -384,7 +384,7 @@ class PluralTableSink : public ResourceSink {
}
}
- void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE {
+ void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override {
if (uprv_strcmp(key, "case") == 0) {
return;
}
@@ -431,13 +431,33 @@ void getMeasureData(const Locale &locale,
subKey.append(unit.getType(), status);
subKey.append("/", status);
+ // Check if unitSubType is an alias or not.
+ LocalUResourceBundlePointer aliasBundle(ures_open(U_ICUDATA_ALIAS, "metadata", &status));
+
+ UErrorCode aliasStatus = status;
+ StackUResourceBundle aliasFillIn;
+ CharString aliasKey;
+ aliasKey.append("alias/unit/", aliasStatus);
+ aliasKey.append(unit.getSubtype(), aliasStatus);
+ aliasKey.append("/replacement", aliasStatus);
+ ures_getByKeyWithFallback(aliasBundle.getAlias(), aliasKey.data(), aliasFillIn.getAlias(),
+ &aliasStatus);
+ CharString unitSubType;
+ if (!U_FAILURE(aliasStatus)) {
+ // This means the subType is an alias. Then, replace unitSubType with the replacement.
+ auto replacement = ures_getUnicodeString(aliasFillIn.getAlias(), &status);
+ unitSubType.appendInvariantChars(replacement, status);
+ } else {
+ unitSubType.append(unit.getSubtype(), status);
+ }
+
// Map duration-year-person, duration-week-person, etc. to duration-year, duration-week, ...
// TODO(ICU-20400): Get duration-*-person data properly with aliases.
- int32_t subtypeLen = static_cast<int32_t>(uprv_strlen(unit.getSubtype()));
- if (subtypeLen > 7 && uprv_strcmp(unit.getSubtype() + subtypeLen - 7, "-person") == 0) {
- subKey.append({unit.getSubtype(), subtypeLen - 7}, status);
+ int32_t subtypeLen = static_cast<int32_t>(uprv_strlen(unitSubType.data()));
+ if (subtypeLen > 7 && uprv_strcmp(unitSubType.data() + subtypeLen - 7, "-person") == 0) {
+ subKey.append({unitSubType.data(), subtypeLen - 7}, status);
} else {
- subKey.append({unit.getSubtype(), subtypeLen}, status);
+ subKey.append({unitSubType.data(), subtypeLen}, status);
}
if (width != UNUM_UNIT_WIDTH_FULL_NAME) {
@@ -540,7 +560,7 @@ UnicodeString getCompoundValue(StringPiece compoundKey,
UErrorCode localStatus = status;
int32_t len = 0;
- const UChar *ptr =
+ const char16_t *ptr =
ures_getStringByKeyWithFallback(unitsBundle.getAlias(), key.data(), &len, &localStatus);
if (U_FAILURE(localStatus) && width != UNUM_UNIT_WIDTH_SHORT) {
// Fall back to short, which contains more compound data
@@ -586,7 +606,7 @@ class DerivedComponents {
*/
DerivedComponents(const Locale &locale, const char *feature, const char *structure) {
StackUResourceBundle derivationsBundle, stackBundle;
- ures_openDirectFillIn(derivationsBundle.getAlias(), NULL, "grammaticalFeatures", &status);
+ ures_openDirectFillIn(derivationsBundle.getAlias(), nullptr, "grammaticalFeatures", &status);
ures_getByKey(derivationsBundle.getAlias(), "grammaticalData", derivationsBundle.getAlias(),
&status);
ures_getByKey(derivationsBundle.getAlias(), "derivations", derivationsBundle.getAlias(),
@@ -675,7 +695,7 @@ class DerivedComponents {
UnicodeString
getDeriveCompoundRule(Locale locale, const char *feature, const char *structure, UErrorCode &status) {
StackUResourceBundle derivationsBundle, stackBundle;
- ures_openDirectFillIn(derivationsBundle.getAlias(), NULL, "grammaticalFeatures", &status);
+ ures_openDirectFillIn(derivationsBundle.getAlias(), nullptr, "grammaticalFeatures", &status);
ures_getByKey(derivationsBundle.getAlias(), "grammaticalData", derivationsBundle.getAlias(),
&status);
ures_getByKey(derivationsBundle.getAlias(), "derivations", derivationsBundle.getAlias(), &status);
@@ -739,7 +759,7 @@ UnicodeString getDerivedGender(Locale locale,
////////////////////////
// TODO: promote this somewhere? It's based on patternprops.cpp' trimWhitespace
-const UChar *trimSpaceChars(const UChar *s, int32_t &length) {
+const char16_t *trimSpaceChars(const char16_t *s, int32_t &length) {
if (length <= 0 || (!u_isJavaSpaceChar(s[0]) && !u_isJavaSpaceChar(s[length - 1]))) {
return s;
}
@@ -1033,7 +1053,7 @@ void LongNameHandler::forArbitraryUnit(const Locale &loc,
}
UnicodeString denominatorPattern = denominatorFormatter.getTextWithNoArguments();
int32_t trimmedLen = denominatorPattern.length();
- const UChar *trimmed = trimSpaceChars(denominatorPattern.getBuffer(), trimmedLen);
+ const char16_t *trimmed = trimSpaceChars(denominatorPattern.getBuffer(), trimmedLen);
UnicodeString denominatorString(false, trimmed, trimmedLen);
// 9. If the denominatorString is empty, set result to
// [numeratorString], otherwise set result to format(perPattern,
@@ -1124,7 +1144,7 @@ void LongNameHandler::processPatternTimes(MeasureUnitImpl &&productUnit,
}
PlaceholderPosition globalPlaceholder[ARRAY_LENGTH];
- UChar globalJoinerChar = 0;
+ char16_t globalJoinerChar = 0;
// Numbered list items are from the algorithms at
// https://unicode.org/reports/tr35/tr35-general.html#compound-units:
//
@@ -1321,7 +1341,7 @@ void LongNameHandler::processPatternTimes(MeasureUnitImpl &&productUnit,
// 4.6. Extract(corePattern, coreUnit, placeholder, placeholderPosition) from that pattern.
UnicodeString coreUnit;
PlaceholderPosition placeholderPosition;
- UChar joinerChar;
+ char16_t joinerChar;
extractCorePattern(getWithPlural(singleUnitArray, plural, status), coreUnit,
placeholderPosition, joinerChar);
@@ -1509,7 +1529,7 @@ void LongNameHandler::multiSimpleFormatsToModifiers(const UnicodeString *leadFor
void LongNameHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros,
UErrorCode &status) const {
- if (parent != NULL) {
+ if (parent != nullptr) {
parent->processQuantity(quantity, micros, status);
}
StandardPlural::Form pluralForm = utils::getPluralSafe(micros.rounder, rules, quantity, status);
@@ -1549,7 +1569,7 @@ void MixedUnitLongNameHandler::forMeasureUnit(const Locale &loc,
for (int32_t i = 0; i < fillIn->fMixedUnitCount; i++) {
// Grab data for each of the components.
UnicodeString *unitData = &fillIn->fMixedUnitData[i * ARRAY_LENGTH];
- // TODO(CLDR-14502): check from the CLDR-14502 ticket whether this
+ // TODO(CLDR-14582): check from the CLDR-14582 ticket whether this
// propagation of unitDisplayCase is correct:
getMeasureData(loc, impl.singleUnits[i]->build(status), width, unitDisplayCase, unitData,
status);
@@ -1706,12 +1726,12 @@ LongNameMultiplexer *LongNameMultiplexer::forMeasureUnits(const Locale &loc,
result->fMeasureUnits[i] = unit;
if (unit.getComplexity(status) == UMEASURE_UNIT_MIXED) {
MixedUnitLongNameHandler *mlnh = result->fMixedUnitHandlers.createAndCheckErrorCode(status);
- MixedUnitLongNameHandler::forMeasureUnit(loc, unit, width, unitDisplayCase, rules, NULL,
+ MixedUnitLongNameHandler::forMeasureUnit(loc, unit, width, unitDisplayCase, rules, nullptr,
mlnh, status);
result->fHandlers[i] = mlnh;
} else {
LongNameHandler *lnh = result->fLongNameHandlers.createAndCheckErrorCode(status);
- LongNameHandler::forMeasureUnit(loc, unit, width, unitDisplayCase, rules, NULL, lnh, status);
+ LongNameHandler::forMeasureUnit(loc, unit, width, unitDisplayCase, rules, nullptr, lnh, status);
result->fHandlers[i] = lnh;
}
if (U_FAILURE(status)) {
diff --git a/contrib/libs/icu/i18n/number_longnames.h b/contrib/libs/icu/i18n/number_longnames.h
index 06949989d7f..56d8c9b24e8 100644
--- a/contrib/libs/icu/i18n/number_longnames.h
+++ b/contrib/libs/icu/i18n/number_longnames.h
@@ -71,9 +71,9 @@ class LongNameHandler : public MicroPropsGenerator, public ModifierStore, public
* on the plural form.
*/
void
- processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const U_OVERRIDE;
+ processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const override;
- const Modifier* getModifier(Signum signum, StandardPlural::Form plural) const U_OVERRIDE;
+ const Modifier* getModifier(Signum signum, StandardPlural::Form plural) const override;
private:
// A set of pre-computed modifiers, one for each plural form.
@@ -168,12 +168,12 @@ class MixedUnitLongNameHandler : public MicroPropsGenerator, public ModifierStor
* provided via `micros.mixedMeasures`.
*/
void processQuantity(DecimalQuantity &quantity, MicroProps &micros,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
// Required for ModifierStore. And ModifierStore is required by
// SimpleModifier constructor's last parameter. We assert his will never get
// called though.
- const Modifier *getModifier(Signum signum, StandardPlural::Form plural) const U_OVERRIDE;
+ const Modifier *getModifier(Signum signum, StandardPlural::Form plural) const override;
private:
// Not owned
@@ -241,7 +241,7 @@ class LongNameMultiplexer : public MicroPropsGenerator, public UMemory {
// The output unit must be provided via `micros.outputUnit`, it must match
// one of the units provided to the factory function.
void processQuantity(DecimalQuantity &quantity, MicroProps &micros,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
private:
/**
diff --git a/contrib/libs/icu/i18n/number_mapper.cpp b/contrib/libs/icu/i18n/number_mapper.cpp
index 2d4d47a094d..2f398d4a939 100644
--- a/contrib/libs/icu/i18n/number_mapper.cpp
+++ b/contrib/libs/icu/i18n/number_mapper.cpp
@@ -134,7 +134,8 @@ MacroProps NumberPropertyMapper::oldToNew(const DecimalFormatProperties& propert
if (PatternStringUtils::ignoreRoundingIncrement(roundingIncrement, maxFrac)) {
precision = Precision::constructFraction(minFrac, maxFrac);
} else {
- precision = Precision::constructIncrement(roundingIncrement, minFrac);
+ // Convert the double increment to an integer increment
+ precision = Precision::increment(roundingIncrement).withMinFraction(minFrac);
}
} else if (explicitMinMaxSig) {
minSig = minSig < 1 ? 1 : minSig > kMaxIntFracSig ? kMaxIntFracSig : minSig;
@@ -255,8 +256,6 @@ MacroProps NumberPropertyMapper::oldToNew(const DecimalFormatProperties& propert
} else {
macros.notation = Notation::compactShort();
}
- // Do not forward the affix provider.
- macros.affixProvider = nullptr;
}
/////////////////
@@ -293,9 +292,14 @@ MacroProps NumberPropertyMapper::oldToNew(const DecimalFormatProperties& propert
} else if (rounding_.fType == Precision::PrecisionType::RND_INCREMENT
|| rounding_.fType == Precision::PrecisionType::RND_INCREMENT_ONE
|| rounding_.fType == Precision::PrecisionType::RND_INCREMENT_FIVE) {
- increment_ = rounding_.fUnion.increment.fIncrement;
minFrac_ = rounding_.fUnion.increment.fMinFrac;
+ // If incrementRounding is used, maxFrac is set equal to minFrac
maxFrac_ = rounding_.fUnion.increment.fMinFrac;
+ // Convert the integer increment to a double
+ DecimalQuantity dq;
+ dq.setToLong(rounding_.fUnion.increment.fIncrement);
+ dq.adjustMagnitude(rounding_.fUnion.increment.fIncrementMagnitude);
+ increment_ = dq.toDouble();
} else if (rounding_.fType == Precision::PrecisionType::RND_SIGNIFICANT) {
minSig_ = rounding_.fUnion.fracSig.fMinSig;
maxSig_ = rounding_.fUnion.fracSig.fMaxSig;
diff --git a/contrib/libs/icu/i18n/number_mapper.h b/contrib/libs/icu/i18n/number_mapper.h
index 8879b7a94ea..c01607e5688 100644
--- a/contrib/libs/icu/i18n/number_mapper.h
+++ b/contrib/libs/icu/i18n/number_mapper.h
@@ -38,25 +38,25 @@ class PropertiesAffixPatternProvider : public AffixPatternProvider, public UMemo
// AffixPatternProvider Methods:
- char16_t charAt(int32_t flags, int32_t i) const U_OVERRIDE;
+ char16_t charAt(int32_t flags, int32_t i) const override;
- int32_t length(int32_t flags) const U_OVERRIDE;
+ int32_t length(int32_t flags) const override;
- UnicodeString getString(int32_t flags) const U_OVERRIDE;
+ UnicodeString getString(int32_t flags) const override;
- bool hasCurrencySign() const U_OVERRIDE;
+ bool hasCurrencySign() const override;
- bool positiveHasPlusSign() const U_OVERRIDE;
+ bool positiveHasPlusSign() const override;
- bool hasNegativeSubpattern() const U_OVERRIDE;
+ bool hasNegativeSubpattern() const override;
- bool negativeHasMinusSign() const U_OVERRIDE;
+ bool negativeHasMinusSign() const override;
- bool containsSymbolType(AffixPatternType, UErrorCode&) const U_OVERRIDE;
+ bool containsSymbolType(AffixPatternType, UErrorCode&) const override;
- bool hasBody() const U_OVERRIDE;
+ bool hasBody() const override;
- bool currencyAsDecimal() const U_OVERRIDE;
+ bool currencyAsDecimal() const override;
private:
UnicodeString posPrefix;
@@ -92,25 +92,25 @@ class CurrencyPluralInfoAffixProvider : public AffixPatternProvider, public UMem
// AffixPatternProvider Methods:
- char16_t charAt(int32_t flags, int32_t i) const U_OVERRIDE;
+ char16_t charAt(int32_t flags, int32_t i) const override;
- int32_t length(int32_t flags) const U_OVERRIDE;
+ int32_t length(int32_t flags) const override;
- UnicodeString getString(int32_t flags) const U_OVERRIDE;
+ UnicodeString getString(int32_t flags) const override;
- bool hasCurrencySign() const U_OVERRIDE;
+ bool hasCurrencySign() const override;
- bool positiveHasPlusSign() const U_OVERRIDE;
+ bool positiveHasPlusSign() const override;
- bool hasNegativeSubpattern() const U_OVERRIDE;
+ bool hasNegativeSubpattern() const override;
- bool negativeHasMinusSign() const U_OVERRIDE;
+ bool negativeHasMinusSign() const override;
- bool containsSymbolType(AffixPatternType, UErrorCode&) const U_OVERRIDE;
+ bool containsSymbolType(AffixPatternType, UErrorCode&) const override;
- bool hasBody() const U_OVERRIDE;
+ bool hasBody() const override;
- bool currencyAsDecimal() const U_OVERRIDE;
+ bool currencyAsDecimal() const override;
private:
PropertiesAffixPatternProvider affixesByPlural[StandardPlural::COUNT];
diff --git a/contrib/libs/icu/i18n/number_microprops.h b/contrib/libs/icu/i18n/number_microprops.h
index c34e7c17e97..18addaae087 100644
--- a/contrib/libs/icu/i18n/number_microprops.h
+++ b/contrib/libs/icu/i18n/number_microprops.h
@@ -67,33 +67,39 @@ class IntMeasures : public MaybeStackArray<int64_t, 2> {
UErrorCode status = U_ZERO_ERROR;
};
+struct SimpleMicroProps : public UMemory {
+ Grouper grouping;
+ bool useCurrency = false;
+ UNumberDecimalSeparatorDisplay decimal = UNUM_DECIMAL_SEPARATOR_AUTO;
+
+ // Currency symbol to be used as the decimal separator
+ UnicodeString currencyAsDecimal = ICU_Utility::makeBogusString();
+
+ // Note: This struct has no direct ownership of the following pointer.
+ const DecimalFormatSymbols* symbols = nullptr;
+};
+
/**
* MicroProps is the first MicroPropsGenerator that should be should be called,
* producing an initialized MicroProps instance that will be passed on and
* modified throughout the rest of the chain of MicroPropsGenerator instances.
*/
struct MicroProps : public MicroPropsGenerator {
+ SimpleMicroProps simple;
// NOTE: All of these fields are properly initialized in NumberFormatterImpl.
RoundingImpl rounder;
- Grouper grouping;
Padder padding;
IntegerWidth integerWidth;
UNumberSignDisplay sign;
- UNumberDecimalSeparatorDisplay decimal;
- bool useCurrency;
char nsName[9];
- // Currency symbol to be used as the decimal separator
- UnicodeString currencyAsDecimal = ICU_Utility::makeBogusString();
-
// No ownership: must point at a string which will outlive MicroProps
// instances, e.g. a string with static storage duration, or just a string
// that will never be deallocated or modified.
const char *gender;
// Note: This struct has no direct ownership of the following pointers.
- const DecimalFormatSymbols* symbols;
// Pointers to Modifiers provided by the number formatting pipeline (when
// the value is known):
@@ -162,7 +168,7 @@ struct MicroProps : public MicroPropsGenerator {
* not already `*this`, it will be overwritten with a copy of `*this`.
*/
void processQuantity(DecimalQuantity &quantity, MicroProps &micros,
- UErrorCode &status) const U_OVERRIDE {
+ UErrorCode &status) const override {
(void) quantity;
(void) status;
if (this == &micros) {
diff --git a/contrib/libs/icu/i18n/number_modifiers.cpp b/contrib/libs/icu/i18n/number_modifiers.cpp
index b74bfd06fc8..0f6fdafb093 100644
--- a/contrib/libs/icu/i18n/number_modifiers.cpp
+++ b/contrib/libs/icu/i18n/number_modifiers.cpp
@@ -22,7 +22,7 @@ const int32_t ARG_NUM_LIMIT = 0x100;
// These are the default currency spacing UnicodeSets in CLDR.
// Pre-compute them for performance.
// The Java unit test testCurrencySpacingPatternStability() will start failing if these change in CLDR.
-icu::UInitOnce gDefaultCurrencySpacingInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gDefaultCurrencySpacingInitOnce {};
UnicodeSet *UNISET_DIGIT = nullptr;
UnicodeSet *UNISET_NOTSZ = nullptr;
@@ -33,7 +33,7 @@ UBool U_CALLCONV cleanupDefaultCurrencySpacing() {
delete UNISET_NOTSZ;
UNISET_NOTSZ = nullptr;
gDefaultCurrencySpacingInitOnce.reset();
- return TRUE;
+ return true;
}
void U_CALLCONV initDefaultCurrencySpacing(UErrorCode &status) {
@@ -62,12 +62,21 @@ Modifier::Parameters::Parameters(
ModifierStore::~ModifierStore() = default;
-AdoptingModifierStore::~AdoptingModifierStore() {
+AdoptingSignumModifierStore::~AdoptingSignumModifierStore() {
for (const Modifier *mod : mods) {
delete mod;
}
}
+AdoptingSignumModifierStore&
+AdoptingSignumModifierStore::operator=(AdoptingSignumModifierStore&& other) noexcept {
+ for (size_t i=0; i<SIGNUM_COUNT; i++) {
+ this->mods[i] = other.mods[i];
+ other.mods[i] = nullptr;
+ }
+ return *this;
+}
+
int32_t ConstantAffixModifier::apply(FormattedStringBuilder &output, int leftIndex, int rightIndex,
UErrorCode &status) const {
diff --git a/contrib/libs/icu/i18n/number_modifiers.h b/contrib/libs/icu/i18n/number_modifiers.h
index 09af3f48813..da6956bcfb4 100644
--- a/contrib/libs/icu/i18n/number_modifiers.h
+++ b/contrib/libs/icu/i18n/number_modifiers.h
@@ -29,19 +29,19 @@ class U_I18N_API ConstantAffixModifier : public Modifier, public UObject {
: fPrefix(prefix), fSuffix(suffix), fField(field), fStrong(strong) {}
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
- int32_t getPrefixLength() const U_OVERRIDE;
+ int32_t getPrefixLength() const override;
- int32_t getCodePointCount() const U_OVERRIDE;
+ int32_t getCodePointCount() const override;
- bool isStrong() const U_OVERRIDE;
+ bool isStrong() const override;
- bool containsField(Field field) const U_OVERRIDE;
+ bool containsField(Field field) const override;
- void getParameters(Parameters& output) const U_OVERRIDE;
+ void getParameters(Parameters& output) const override;
- bool semanticallyEquivalent(const Modifier& other) const U_OVERRIDE;
+ bool semanticallyEquivalent(const Modifier& other) const override;
private:
UnicodeString fPrefix;
@@ -65,19 +65,19 @@ class U_I18N_API SimpleModifier : public Modifier, public UMemory {
SimpleModifier();
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
- int32_t getPrefixLength() const U_OVERRIDE;
+ int32_t getPrefixLength() const override;
- int32_t getCodePointCount() const U_OVERRIDE;
+ int32_t getCodePointCount() const override;
- bool isStrong() const U_OVERRIDE;
+ bool isStrong() const override;
- bool containsField(Field field) const U_OVERRIDE;
+ bool containsField(Field field) const override;
- void getParameters(Parameters& output) const U_OVERRIDE;
+ void getParameters(Parameters& output) const override;
- bool semanticallyEquivalent(const Modifier& other) const U_OVERRIDE;
+ bool semanticallyEquivalent(const Modifier& other) const override;
/**
* TODO: This belongs in SimpleFormatterImpl. The only reason I haven't moved it there yet is because
@@ -158,19 +158,19 @@ class U_I18N_API ConstantMultiFieldModifier : public Modifier, public UMemory {
fStrong(strong) {}
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
- int32_t getPrefixLength() const U_OVERRIDE;
+ int32_t getPrefixLength() const override;
- int32_t getCodePointCount() const U_OVERRIDE;
+ int32_t getCodePointCount() const override;
- bool isStrong() const U_OVERRIDE;
+ bool isStrong() const override;
- bool containsField(Field field) const U_OVERRIDE;
+ bool containsField(Field field) const override;
- void getParameters(Parameters& output) const U_OVERRIDE;
+ void getParameters(Parameters& output) const override;
- bool semanticallyEquivalent(const Modifier& other) const U_OVERRIDE;
+ bool semanticallyEquivalent(const Modifier& other) const override;
protected:
// NOTE: In Java, these are stored as array pointers. In C++, the FormattedStringBuilder is stored by
@@ -195,7 +195,7 @@ class U_I18N_API CurrencySpacingEnabledModifier : public ConstantMultiFieldModif
UErrorCode &status);
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
/** Unsafe code path */
static int32_t
@@ -235,7 +235,7 @@ class U_I18N_API EmptyModifier : public Modifier, public UMemory {
explicit EmptyModifier(bool isStrong) : fStrong(isStrong) {}
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE {
+ UErrorCode &status) const override {
(void)output;
(void)leftIndex;
(void)rightIndex;
@@ -243,28 +243,28 @@ class U_I18N_API EmptyModifier : public Modifier, public UMemory {
return 0;
}
- int32_t getPrefixLength() const U_OVERRIDE {
+ int32_t getPrefixLength() const override {
return 0;
}
- int32_t getCodePointCount() const U_OVERRIDE {
+ int32_t getCodePointCount() const override {
return 0;
}
- bool isStrong() const U_OVERRIDE {
+ bool isStrong() const override {
return fStrong;
}
- bool containsField(Field field) const U_OVERRIDE {
+ bool containsField(Field field) const override {
(void)field;
return false;
}
- void getParameters(Parameters& output) const U_OVERRIDE {
+ void getParameters(Parameters& output) const override {
output.obj = nullptr;
}
- bool semanticallyEquivalent(const Modifier& other) const U_OVERRIDE {
+ bool semanticallyEquivalent(const Modifier& other) const override {
return other.getCodePointCount() == 0;
}
@@ -272,13 +272,45 @@ class U_I18N_API EmptyModifier : public Modifier, public UMemory {
bool fStrong;
};
+/** An adopting Modifier store that varies by signum but not plural form. */
+class U_I18N_API AdoptingSignumModifierStore : public UMemory {
+ public:
+ virtual ~AdoptingSignumModifierStore();
+
+ AdoptingSignumModifierStore() = default;
+
+ // No copying!
+ AdoptingSignumModifierStore(const AdoptingSignumModifierStore &other) = delete;
+ AdoptingSignumModifierStore& operator=(const AdoptingSignumModifierStore& other) = delete;
+
+ // Moving is OK
+ AdoptingSignumModifierStore(AdoptingSignumModifierStore &&other) noexcept {
+ *this = std::move(other);
+ }
+ AdoptingSignumModifierStore& operator=(AdoptingSignumModifierStore&& other) noexcept;
+
+ /** Take ownership of the Modifier and slot it in at the given Signum. */
+ void adoptModifier(Signum signum, const Modifier* mod) {
+ U_ASSERT(mods[signum] == nullptr);
+ mods[signum] = mod;
+ }
+
+ inline const Modifier*& operator[](Signum signum) {
+ return mods[signum];
+ }
+ inline Modifier const* operator[](Signum signum) const {
+ return mods[signum];
+ }
+
+ private:
+ const Modifier* mods[SIGNUM_COUNT] = {};
+};
+
/**
* This implementation of ModifierStore adopts Modifier pointers.
*/
class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory {
public:
- virtual ~AdoptingModifierStore();
-
static constexpr StandardPlural::Form DEFAULT_STANDARD_PLURAL = StandardPlural::OTHER;
AdoptingModifierStore() = default;
@@ -286,46 +318,36 @@ class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory {
// No copying!
AdoptingModifierStore(const AdoptingModifierStore &other) = delete;
- /**
- * Sets the Modifier with the specified signum and plural form.
- */
- void adoptModifier(Signum signum, StandardPlural::Form plural, const Modifier *mod) {
- U_ASSERT(mods[getModIndex(signum, plural)] == nullptr);
- mods[getModIndex(signum, plural)] = mod;
+ // Moving is OK
+ AdoptingModifierStore(AdoptingModifierStore &&other) = default;
+
+ /** Sets the modifiers for a specific plural form. */
+ void adoptSignumModifierStore(StandardPlural::Form plural, AdoptingSignumModifierStore other) {
+ mods[plural] = std::move(other);
}
- /**
- * Sets the Modifier with the specified signum.
- * The modifier will apply to all plural forms.
- */
- void adoptModifierWithoutPlural(Signum signum, const Modifier *mod) {
- U_ASSERT(mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)] == nullptr);
- mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)] = mod;
+ /** Sets the modifiers for the default plural form. */
+ void adoptSignumModifierStoreNoPlural(AdoptingSignumModifierStore other) {
+ mods[DEFAULT_STANDARD_PLURAL] = std::move(other);
}
/** Returns a reference to the modifier; no ownership change. */
- const Modifier *getModifier(Signum signum, StandardPlural::Form plural) const U_OVERRIDE {
- const Modifier* modifier = mods[getModIndex(signum, plural)];
+ const Modifier *getModifier(Signum signum, StandardPlural::Form plural) const override {
+ const Modifier* modifier = mods[plural][signum];
if (modifier == nullptr && plural != DEFAULT_STANDARD_PLURAL) {
- modifier = mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)];
+ modifier = mods[DEFAULT_STANDARD_PLURAL][signum];
}
return modifier;
}
/** Returns a reference to the modifier; no ownership change. */
const Modifier *getModifierWithoutPlural(Signum signum) const {
- return mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)];
+ return mods[DEFAULT_STANDARD_PLURAL][signum];
}
private:
// NOTE: mods is zero-initialized (to nullptr)
- const Modifier *mods[4 * StandardPlural::COUNT] = {};
-
- inline static int32_t getModIndex(Signum signum, StandardPlural::Form plural) {
- U_ASSERT(signum >= 0 && signum < SIGNUM_COUNT);
- U_ASSERT(plural >= 0 && plural < StandardPlural::COUNT);
- return static_cast<int32_t>(plural) * SIGNUM_COUNT + signum;
- }
+ AdoptingSignumModifierStore mods[StandardPlural::COUNT] = {};
};
} // namespace impl
diff --git a/contrib/libs/icu/i18n/number_multiplier.cpp b/contrib/libs/icu/i18n/number_multiplier.cpp
index 58e1e441bd2..dd5b3f8e069 100644
--- a/contrib/libs/icu/i18n/number_multiplier.cpp
+++ b/contrib/libs/icu/i18n/number_multiplier.cpp
@@ -58,13 +58,13 @@ Scale& Scale::operator=(const Scale& other) {
return *this;
}
-Scale::Scale(Scale&& src) U_NOEXCEPT
+Scale::Scale(Scale&& src) noexcept
: fMagnitude(src.fMagnitude), fArbitrary(src.fArbitrary), fError(src.fError) {
// Take ownership away from src if necessary
src.fArbitrary = nullptr;
}
-Scale& Scale::operator=(Scale&& src) U_NOEXCEPT {
+Scale& Scale::operator=(Scale&& src) noexcept {
fMagnitude = src.fMagnitude;
if (fArbitrary != nullptr) {
delete fArbitrary;
diff --git a/contrib/libs/icu/i18n/number_multiplier.h b/contrib/libs/icu/i18n/number_multiplier.h
index d8235dc601b..c752935b783 100644
--- a/contrib/libs/icu/i18n/number_multiplier.h
+++ b/contrib/libs/icu/i18n/number_multiplier.h
@@ -25,7 +25,7 @@ class U_I18N_API MultiplierFormatHandler : public MicroPropsGenerator, public UM
void setAndChain(const Scale& multiplier, const MicroPropsGenerator* parent);
void processQuantity(DecimalQuantity& quantity, MicroProps& micros,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
private:
Scale fMultiplier;
diff --git a/contrib/libs/icu/i18n/number_output.cpp b/contrib/libs/icu/i18n/number_output.cpp
index 2c2c25eaedb..729a2cd5e64 100644
--- a/contrib/libs/icu/i18n/number_output.cpp
+++ b/contrib/libs/icu/i18n/number_output.cpp
@@ -39,9 +39,10 @@ MeasureUnit FormattedNumber::getOutputUnit(UErrorCode& status) const {
return fData->outputUnit;
}
-const char *FormattedNumber::getGender(UErrorCode &status) const {
- UPRV_FORMATTED_VALUE_METHOD_GUARD("")
- return fData->gender;
+UDisplayOptionsNounClass FormattedNumber::getNounClass(UErrorCode &status) const {
+ UPRV_FORMATTED_VALUE_METHOD_GUARD(UDISPOPT_NOUN_CLASS_UNDEFINED);
+ const char *nounClass = fData->gender;
+ return udispopt_fromNounClassIdentifier(nounClass);
}
void FormattedNumber::getDecimalQuantity(impl::DecimalQuantity& output, UErrorCode& status) const {
diff --git a/contrib/libs/icu/i18n/number_patternmodifier.cpp b/contrib/libs/icu/i18n/number_patternmodifier.cpp
index b6543b262b4..6f398c6acf0 100644
--- a/contrib/libs/icu/i18n/number_patternmodifier.cpp
+++ b/contrib/libs/icu/i18n/number_patternmodifier.cpp
@@ -60,6 +60,21 @@ bool MutablePatternModifier::needsPlurals() const {
// Silently ignore any error codes.
}
+AdoptingSignumModifierStore MutablePatternModifier::createImmutableForPlural(StandardPlural::Form plural, UErrorCode& status) {
+ AdoptingSignumModifierStore pm;
+
+ setNumberProperties(SIGNUM_POS, plural);
+ pm.adoptModifier(SIGNUM_POS, createConstantModifier(status));
+ setNumberProperties(SIGNUM_NEG_ZERO, plural);
+ pm.adoptModifier(SIGNUM_NEG_ZERO, createConstantModifier(status));
+ setNumberProperties(SIGNUM_POS_ZERO, plural);
+ pm.adoptModifier(SIGNUM_POS_ZERO, createConstantModifier(status));
+ setNumberProperties(SIGNUM_NEG, plural);
+ pm.adoptModifier(SIGNUM_NEG, createConstantModifier(status));
+
+ return pm;
+}
+
ImmutablePatternModifier* MutablePatternModifier::createImmutable(UErrorCode& status) {
// TODO: Move StandardPlural VALUES to standardplural.h
static const StandardPlural::Form STANDARD_PLURAL_VALUES[] = {
@@ -79,14 +94,7 @@ ImmutablePatternModifier* MutablePatternModifier::createImmutable(UErrorCode& st
if (needsPlurals()) {
// Slower path when we require the plural keyword.
for (StandardPlural::Form plural : STANDARD_PLURAL_VALUES) {
- setNumberProperties(SIGNUM_POS, plural);
- pm->adoptModifier(SIGNUM_POS, plural, createConstantModifier(status));
- setNumberProperties(SIGNUM_NEG_ZERO, plural);
- pm->adoptModifier(SIGNUM_NEG_ZERO, plural, createConstantModifier(status));
- setNumberProperties(SIGNUM_POS_ZERO, plural);
- pm->adoptModifier(SIGNUM_POS_ZERO, plural, createConstantModifier(status));
- setNumberProperties(SIGNUM_NEG, plural);
- pm->adoptModifier(SIGNUM_NEG, plural, createConstantModifier(status));
+ pm->adoptSignumModifierStore(plural, createImmutableForPlural(plural, status));
}
if (U_FAILURE(status)) {
delete pm;
@@ -95,14 +103,7 @@ ImmutablePatternModifier* MutablePatternModifier::createImmutable(UErrorCode& st
return new ImmutablePatternModifier(pm, fRules); // adopts pm
} else {
// Faster path when plural keyword is not needed.
- setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT);
- pm->adoptModifierWithoutPlural(SIGNUM_POS, createConstantModifier(status));
- setNumberProperties(SIGNUM_NEG_ZERO, StandardPlural::Form::COUNT);
- pm->adoptModifierWithoutPlural(SIGNUM_NEG_ZERO, createConstantModifier(status));
- setNumberProperties(SIGNUM_POS_ZERO, StandardPlural::Form::COUNT);
- pm->adoptModifierWithoutPlural(SIGNUM_POS_ZERO, createConstantModifier(status));
- setNumberProperties(SIGNUM_NEG, StandardPlural::Form::COUNT);
- pm->adoptModifierWithoutPlural(SIGNUM_NEG, createConstantModifier(status));
+ pm->adoptSignumModifierStoreNoPlural(createImmutableForPlural(StandardPlural::Form::COUNT, status));
if (U_FAILURE(status)) {
delete pm;
return nullptr;
@@ -284,6 +285,7 @@ void MutablePatternModifier::prepareAffix(bool isPrefix) {
fApproximately,
fPlural,
fPerMilleReplacesPercent,
+ false, // dropCurrencySymbols
currentAffix);
}
diff --git a/contrib/libs/icu/i18n/number_patternmodifier.h b/contrib/libs/icu/i18n/number_patternmodifier.h
index 4f825e1ed21..ee38c20c9c9 100644
--- a/contrib/libs/icu/i18n/number_patternmodifier.h
+++ b/contrib/libs/icu/i18n/number_patternmodifier.h
@@ -42,9 +42,9 @@ class MutablePatternModifier;
// Exported as U_I18N_API because it is needed for the unit test PatternModifierTest
class U_I18N_API ImmutablePatternModifier : public MicroPropsGenerator, public UMemory {
public:
- ~ImmutablePatternModifier() U_OVERRIDE = default;
+ ~ImmutablePatternModifier() override = default;
- void processQuantity(DecimalQuantity&, MicroProps& micros, UErrorCode& status) const U_OVERRIDE;
+ void processQuantity(DecimalQuantity&, MicroProps& micros, UErrorCode& status) const override;
void applyToMicros(MicroProps& micros, const DecimalQuantity& quantity, UErrorCode& status) const;
@@ -89,7 +89,7 @@ class U_I18N_API MutablePatternModifier
public UMemory {
public:
- ~MutablePatternModifier() U_OVERRIDE = default;
+ ~MutablePatternModifier() override = default;
/**
* @param isStrong
@@ -156,6 +156,9 @@ class U_I18N_API MutablePatternModifier
*/
bool needsPlurals() const;
+ /** Creates a quantity-dependent Modifier for the specified plural form. */
+ AdoptingSignumModifierStore createImmutableForPlural(StandardPlural::Form plural, UErrorCode& status);
+
/**
* Creates a new quantity-dependent Modifier that behaves the same as the current instance, but which is immutable
* and can be saved for future use. The number properties in the current instance are mutated; all other properties
@@ -173,27 +176,27 @@ class U_I18N_API MutablePatternModifier
MicroPropsGenerator &addToChain(const MicroPropsGenerator *parent);
- void processQuantity(DecimalQuantity &, MicroProps &micros, UErrorCode &status) const U_OVERRIDE;
+ void processQuantity(DecimalQuantity &, MicroProps &micros, UErrorCode &status) const override;
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
- int32_t getPrefixLength() const U_OVERRIDE;
+ int32_t getPrefixLength() const override;
- int32_t getCodePointCount() const U_OVERRIDE;
+ int32_t getCodePointCount() const override;
- bool isStrong() const U_OVERRIDE;
+ bool isStrong() const override;
- bool containsField(Field field) const U_OVERRIDE;
+ bool containsField(Field field) const override;
- void getParameters(Parameters& output) const U_OVERRIDE;
+ void getParameters(Parameters& output) const override;
- bool semanticallyEquivalent(const Modifier& other) const U_OVERRIDE;
+ bool semanticallyEquivalent(const Modifier& other) const override;
/**
* Returns the string that substitutes a given symbol type in a pattern.
*/
- UnicodeString getSymbol(AffixPatternType type) const U_OVERRIDE;
+ UnicodeString getSymbol(AffixPatternType type) const override;
/**
* Returns the currency symbol for the unit width specified in setSymbols()
diff --git a/contrib/libs/icu/i18n/number_patternstring.cpp b/contrib/libs/icu/i18n/number_patternstring.cpp
index e819d39e967..aa082be5a87 100644
--- a/contrib/libs/icu/i18n/number_patternstring.cpp
+++ b/contrib/libs/icu/i18n/number_patternstring.cpp
@@ -750,7 +750,7 @@ UnicodeString PatternStringUtils::propertiesToPatternString(const DecimalFormatP
int32_t groupingLength = grouping1 + grouping2 + 1;
// Figure out the digits we need to put in the pattern.
- double roundingInterval = properties.roundingIncrement;
+ double increment = properties.roundingIncrement;
UnicodeString digitsString;
int32_t digitsStringScale = 0;
if (maxSig != uprv_min(dosMax, -1)) {
@@ -761,14 +761,14 @@ UnicodeString PatternStringUtils::propertiesToPatternString(const DecimalFormatP
while (digitsString.length() < maxSig) {
digitsString.append(u'#');
}
- } else if (roundingInterval != 0.0 && !ignoreRoundingIncrement(roundingInterval,maxFrac)) {
- // Rounding Interval.
- digitsStringScale = -roundingutils::doubleFractionLength(roundingInterval, nullptr);
- // TODO: Check for DoS here?
+ } else if (increment != 0.0 && !ignoreRoundingIncrement(increment,maxFrac)) {
+ // Rounding Increment.
DecimalQuantity incrementQuantity;
- incrementQuantity.setToDouble(roundingInterval);
+ incrementQuantity.setToDouble(increment);
+ incrementQuantity.roundToInfinity();
+ digitsStringScale = incrementQuantity.getLowerDisplayMagnitude();
incrementQuantity.adjustMagnitude(-digitsStringScale);
- incrementQuantity.roundToMagnitude(0, kDefaultMode, status);
+ incrementQuantity.setMinInteger(minInt - digitsStringScale);
UnicodeString str = incrementQuantity.toPlainString();
if (str.charAt(0) == u'-') {
// TODO: Unsupported operation exception or fail silently?
@@ -968,7 +968,7 @@ PatternStringUtils::convertLocalized(const UnicodeString& input, const DecimalFo
UnicodeString result;
int state = 0;
for (int offset = 0; offset < input.length(); offset++) {
- UChar ch = input.charAt(offset);
+ char16_t ch = input.charAt(offset);
// Handle a quote character (state shift)
if (ch == u'\'') {
@@ -1056,7 +1056,9 @@ void PatternStringUtils::patternInfoToStringBuilder(const AffixPatternProvider&
PatternSignType patternSignType,
bool approximately,
StandardPlural::Form plural,
- bool perMilleReplacesPercent, UnicodeString& output) {
+ bool perMilleReplacesPercent,
+ bool dropCurrencySymbols,
+ UnicodeString& output) {
// Should the output render '+' where '-' would normally appear in the pattern?
bool plusReplacesMinusSign = (patternSignType == PATTERN_SIGN_TYPE_POS_SIGN)
@@ -1130,6 +1132,9 @@ void PatternStringUtils::patternInfoToStringBuilder(const AffixPatternProvider&
if (perMilleReplacesPercent && candidate == u'%') {
candidate = u'‰';
}
+ if (dropCurrencySymbols && candidate == u'\u00A4') {
+ continue;
+ }
output.append(candidate);
}
}
diff --git a/contrib/libs/icu/i18n/number_patternstring.h b/contrib/libs/icu/i18n/number_patternstring.h
index 94afda37229..989d0d3464b 100644
--- a/contrib/libs/icu/i18n/number_patternstring.h
+++ b/contrib/libs/icu/i18n/number_patternstring.h
@@ -80,32 +80,32 @@ struct U_I18N_API ParsedPatternInfo : public AffixPatternProvider, public UMemor
ParsedPatternInfo()
: state(this->pattern), currentSubpattern(nullptr) {}
- ~ParsedPatternInfo() U_OVERRIDE = default;
+ ~ParsedPatternInfo() override = default;
// Need to declare this explicitly because of the destructor
- ParsedPatternInfo& operator=(ParsedPatternInfo&& src) U_NOEXCEPT = default;
+ ParsedPatternInfo& operator=(ParsedPatternInfo&& src) noexcept = default;
static int32_t getLengthFromEndpoints(const Endpoints& endpoints);
- char16_t charAt(int32_t flags, int32_t index) const U_OVERRIDE;
+ char16_t charAt(int32_t flags, int32_t index) const override;
- int32_t length(int32_t flags) const U_OVERRIDE;
+ int32_t length(int32_t flags) const override;
- UnicodeString getString(int32_t flags) const U_OVERRIDE;
+ UnicodeString getString(int32_t flags) const override;
- bool positiveHasPlusSign() const U_OVERRIDE;
+ bool positiveHasPlusSign() const override;
- bool hasNegativeSubpattern() const U_OVERRIDE;
+ bool hasNegativeSubpattern() const override;
- bool negativeHasMinusSign() const U_OVERRIDE;
+ bool negativeHasMinusSign() const override;
- bool hasCurrencySign() const U_OVERRIDE;
+ bool hasCurrencySign() const override;
- bool containsSymbolType(AffixPatternType type, UErrorCode& status) const U_OVERRIDE;
+ bool containsSymbolType(AffixPatternType type, UErrorCode& status) const override;
- bool hasBody() const U_OVERRIDE;
+ bool hasBody() const override;
- bool currencyAsDecimal() const U_OVERRIDE;
+ bool currencyAsDecimal() const override;
private:
struct U_I18N_API ParserState {
@@ -115,7 +115,7 @@ struct U_I18N_API ParsedPatternInfo : public AffixPatternProvider, public UMemor
explicit ParserState(const UnicodeString& _pattern)
: pattern(_pattern) {}
- ParserState& operator=(ParserState&& src) U_NOEXCEPT {
+ ParserState& operator=(ParserState&& src) noexcept {
// Leave pattern reference alone; it will continue to point to the same place in memory,
// which gets overwritten by ParsedPatternInfo's implicit move assignment.
offset = src.offset;
@@ -317,7 +317,9 @@ class U_I18N_API PatternStringUtils {
static void patternInfoToStringBuilder(const AffixPatternProvider& patternInfo, bool isPrefix,
PatternSignType patternSignType,
bool approximately,
- StandardPlural::Form plural, bool perMilleReplacesPercent,
+ StandardPlural::Form plural,
+ bool perMilleReplacesPercent,
+ bool dropCurrencySymbols,
UnicodeString& output);
static PatternSignType resolveSignDisplay(UNumberSignDisplay signDisplay, Signum signum);
diff --git a/contrib/libs/icu/i18n/number_rounding.cpp b/contrib/libs/icu/i18n/number_rounding.cpp
index 877df63c8f6..e6bb509ffd7 100644
--- a/contrib/libs/icu/i18n/number_rounding.cpp
+++ b/contrib/libs/icu/i18n/number_rounding.cpp
@@ -28,7 +28,7 @@ using icu::StringSegment;
void number::impl::parseIncrementOption(const StringSegment &segment,
Precision &outPrecision,
UErrorCode &status) {
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
@@ -36,27 +36,24 @@ void number::impl::parseIncrementOption(const StringSegment &segment,
// Utilize DecimalQuantity/decNumber to parse this for us.
DecimalQuantity dq;
UErrorCode localStatus = U_ZERO_ERROR;
- DecNum decnum;
- decnum.setTo({buffer.data(), buffer.length()}, localStatus);
- dq.setToDecNum(decnum, localStatus);
- if (U_FAILURE(localStatus) || decnum.isSpecial()) {
+ dq.setToDecNumber({buffer.data(), buffer.length()}, localStatus);
+ if (U_FAILURE(localStatus) || dq.isNaN() || dq.isInfinite()) {
// throw new SkeletonSyntaxException("Invalid rounding increment", segment, e);
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
- double increment = dq.toDouble();
-
- // We also need to figure out how many digits. Do a brute force string operation.
- int decimalOffset = 0;
- while (decimalOffset < segment.length() && segment.charAt(decimalOffset) != '.') {
- decimalOffset++;
- }
- if (decimalOffset == segment.length()) {
- outPrecision = Precision::increment(increment);
- } else {
- int32_t fractionLength = segment.length() - decimalOffset - 1;
- outPrecision = Precision::increment(increment).withMinFraction(fractionLength);
+ // Now we break apart the number into a mantissa and exponent (magnitude).
+ int32_t magnitude = dq.adjustToZeroScale();
+ // setToDecNumber drops trailing zeros, so we search for the '.' manually.
+ for (int32_t i=0; i<buffer.length(); i++) {
+ if (buffer[i] == '.') {
+ int32_t newMagnitude = i - buffer.length() + 1;
+ dq.adjustMagnitude(magnitude - newMagnitude);
+ magnitude = newMagnitude;
+ break;
+ }
}
+ outPrecision = Precision::incrementExact(dq.toLong(), magnitude);
}
namespace {
@@ -94,34 +91,6 @@ int32_t getDisplayMagnitudeSignificant(const DecimalQuantity &value, int minSig)
MultiplierProducer::~MultiplierProducer() = default;
-digits_t roundingutils::doubleFractionLength(double input, int8_t* singleDigit) {
- char buffer[DoubleToStringConverter::kBase10MaximalLength + 1];
- bool sign; // unused; always positive
- int32_t length;
- int32_t point;
- DoubleToStringConverter::DoubleToAscii(
- input,
- DoubleToStringConverter::DtoaMode::SHORTEST,
- 0,
- buffer,
- sizeof(buffer),
- &sign,
- &length,
- &point
- );
-
- if (singleDigit == nullptr) {
- // no-op
- } else if (length == 1) {
- *singleDigit = buffer[0] - '0';
- } else {
- *singleDigit = -1;
- }
-
- return static_cast<digits_t>(length - point);
-}
-
-
Precision Precision::unlimited() {
return Precision(RND_NONE, {});
}
@@ -204,7 +173,19 @@ Precision Precision::trailingZeroDisplay(UNumberTrailingZeroDisplay trailingZero
IncrementPrecision Precision::increment(double roundingIncrement) {
if (roundingIncrement > 0.0) {
- return constructIncrement(roundingIncrement, 0);
+ DecimalQuantity dq;
+ dq.setToDouble(roundingIncrement);
+ dq.roundToInfinity();
+ int32_t magnitude = dq.adjustToZeroScale();
+ return constructIncrement(dq.toLong(), magnitude);
+ } else {
+ return {U_NUMBER_ARG_OUTOFBOUNDS_ERROR};
+ }
+}
+
+IncrementPrecision Precision::incrementExact(uint64_t mantissa, int16_t magnitude) {
+ if (mantissa > 0.0) {
+ return constructIncrement(mantissa, magnitude);
} else {
return {U_NUMBER_ARG_OUTOFBOUNDS_ERROR};
}
@@ -226,7 +207,8 @@ Precision FractionPrecision::withSignificantDigits(
*this,
minSignificantDigits,
maxSignificantDigits,
- priority);
+ priority,
+ false);
} else {
return {U_NUMBER_ARG_OUTOFBOUNDS_ERROR};
}
@@ -239,7 +221,8 @@ Precision FractionPrecision::withMinDigits(int32_t minSignificantDigits) const {
*this,
1,
minSignificantDigits,
- UNUM_ROUNDING_PRIORITY_RELAXED);
+ UNUM_ROUNDING_PRIORITY_RELAXED,
+ true);
} else {
return {U_NUMBER_ARG_OUTOFBOUNDS_ERROR};
}
@@ -251,7 +234,8 @@ Precision FractionPrecision::withMaxDigits(int32_t maxSignificantDigits) const {
return constructFractionSignificant(*this,
1,
maxSignificantDigits,
- UNUM_ROUNDING_PRIORITY_STRICT);
+ UNUM_ROUNDING_PRIORITY_STRICT,
+ true);
} else {
return {U_NUMBER_ARG_OUTOFBOUNDS_ERROR};
}
@@ -266,8 +250,8 @@ Precision Precision::withCurrency(const CurrencyUnit &currency, UErrorCode &stat
int32_t minMaxFrac = ucurr_getDefaultFractionDigitsForUsage(
isoCode, fUnion.currencyUsage, &status);
Precision retval = (increment != 0.0)
- ? static_cast<Precision>(constructIncrement(increment, minMaxFrac))
- : static_cast<Precision>(constructFraction(minMaxFrac, minMaxFrac));
+ ? Precision::increment(increment)
+ : static_cast<Precision>(Precision::fixedFraction(minMaxFrac));
retval.fTrailingZeroDisplay = fTrailingZeroDisplay;
return retval;
}
@@ -285,7 +269,9 @@ Precision CurrencyPrecision::withCurrency(const CurrencyUnit &currency) const {
Precision IncrementPrecision::withMinFraction(int32_t minFrac) const {
if (fType == RND_ERROR) { return *this; } // no-op in error state
if (minFrac >= 0 && minFrac <= kMaxIntFracSig) {
- return constructIncrement(fUnion.increment.fIncrement, minFrac);
+ IncrementPrecision copy = *this;
+ copy.fUnion.increment.fMinFrac = minFrac;
+ return copy;
} else {
return {U_NUMBER_ARG_OUTOFBOUNDS_ERROR};
}
@@ -318,35 +304,34 @@ Precision::constructFractionSignificant(
const FractionPrecision &base,
int32_t minSig,
int32_t maxSig,
- UNumberRoundingPriority priority) {
+ UNumberRoundingPriority priority,
+ bool retain) {
FractionSignificantSettings settings = base.fUnion.fracSig;
settings.fMinSig = static_cast<digits_t>(minSig);
settings.fMaxSig = static_cast<digits_t>(maxSig);
settings.fPriority = priority;
+ settings.fRetain = retain;
PrecisionUnion union_;
union_.fracSig = settings;
return {RND_FRACTION_SIGNIFICANT, union_};
}
-IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) {
+IncrementPrecision Precision::constructIncrement(uint64_t increment, digits_t magnitude) {
IncrementSettings settings;
// Note: For number formatting, fIncrement is used for RND_INCREMENT but not
// RND_INCREMENT_ONE or RND_INCREMENT_FIVE. However, fIncrement is used in all
// three when constructing a skeleton.
settings.fIncrement = increment;
- settings.fMinFrac = static_cast<digits_t>(minFrac);
- // One of the few pre-computed quantities:
- // Note: it is possible for minFrac to be more than maxFrac... (misleading)
- int8_t singleDigit;
- settings.fMaxFrac = roundingutils::doubleFractionLength(increment, &singleDigit);
+ settings.fIncrementMagnitude = magnitude;
+ settings.fMinFrac = magnitude > 0 ? 0 : -magnitude;
PrecisionUnion union_;
union_.increment = settings;
- if (singleDigit == 1) {
+ if (increment == 1) {
// NOTE: In C++, we must return the correct value type with the correct union.
// It would be invalid to return a RND_FRACTION here because the methods on the
// IncrementPrecision type assume that the union is backed by increment data.
return {RND_INCREMENT_ONE, union_};
- } else if (singleDigit == 5) {
+ } else if (increment == 5) {
return {RND_INCREMENT_FIVE, union_};
} else {
return {RND_INCREMENT, union_};
@@ -457,6 +442,23 @@ void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const
break;
case Precision::RND_FRACTION_SIGNIFICANT: {
+ // From ECMA-402:
+ /*
+ Let sResult be ToRawPrecision(...).
+ Let fResult be ToRawFixed(...).
+ If intlObj.[[RoundingType]] is morePrecision, then
+ If sResult.[[RoundingMagnitude]] ≤ fResult.[[RoundingMagnitude]], then
+ Let result be sResult.
+ Else,
+ Let result be fResult.
+ Else,
+ Assert: intlObj.[[RoundingType]] is lessPrecision.
+ If sResult.[[RoundingMagnitude]] ≤ fResult.[[RoundingMagnitude]], then
+ Let result be fResult.
+ Else,
+ Let result be sResult.
+ */
+
int32_t roundingMag1 = getRoundingMagnitudeFraction(fPrecision.fUnion.fracSig.fMaxFrac);
int32_t roundingMag2 = getRoundingMagnitudeSignificant(value, fPrecision.fUnion.fracSig.fMaxSig);
int32_t roundingMag;
@@ -465,11 +467,35 @@ void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const
} else {
roundingMag = uprv_max(roundingMag1, roundingMag2);
}
- value.roundToMagnitude(roundingMag, fRoundingMode, status);
+ if (!value.isZeroish()) {
+ int32_t upperMag = value.getMagnitude();
+ value.roundToMagnitude(roundingMag, fRoundingMode, status);
+ if (!value.isZeroish() && value.getMagnitude() != upperMag && roundingMag1 == roundingMag2) {
+ // roundingMag2 needs to be the magnitude after rounding
+ roundingMag2 += 1;
+ }
+ }
int32_t displayMag1 = getDisplayMagnitudeFraction(fPrecision.fUnion.fracSig.fMinFrac);
int32_t displayMag2 = getDisplayMagnitudeSignificant(value, fPrecision.fUnion.fracSig.fMinSig);
- int32_t displayMag = uprv_min(displayMag1, displayMag2);
+ int32_t displayMag;
+ if (fPrecision.fUnion.fracSig.fRetain) {
+ // withMinDigits + withMaxDigits
+ displayMag = uprv_min(displayMag1, displayMag2);
+ } else if (fPrecision.fUnion.fracSig.fPriority == UNUM_ROUNDING_PRIORITY_RELAXED) {
+ if (roundingMag2 <= roundingMag1) {
+ displayMag = displayMag2;
+ } else {
+ displayMag = displayMag1;
+ }
+ } else {
+ U_ASSERT(fPrecision.fUnion.fracSig.fPriority == UNUM_ROUNDING_PRIORITY_STRICT);
+ if (roundingMag2 <= roundingMag1) {
+ displayMag = displayMag1;
+ } else {
+ displayMag = displayMag2;
+ }
+ }
resolvedMinFraction = uprv_max(0, -displayMag);
break;
@@ -478,6 +504,7 @@ void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const
case Precision::RND_INCREMENT:
value.roundToIncrement(
fPrecision.fUnion.increment.fIncrement,
+ fPrecision.fUnion.increment.fIncrementMagnitude,
fRoundingMode,
status);
resolvedMinFraction = fPrecision.fUnion.increment.fMinFrac;
@@ -485,7 +512,7 @@ void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const
case Precision::RND_INCREMENT_ONE:
value.roundToMagnitude(
- -fPrecision.fUnion.increment.fMaxFrac,
+ fPrecision.fUnion.increment.fIncrementMagnitude,
fRoundingMode,
status);
resolvedMinFraction = fPrecision.fUnion.increment.fMinFrac;
@@ -493,7 +520,7 @@ void RoundingImpl::apply(impl::DecimalQuantity &value, UErrorCode& status) const
case Precision::RND_INCREMENT_FIVE:
value.roundToNickel(
- -fPrecision.fUnion.increment.fMaxFrac,
+ fPrecision.fUnion.increment.fIncrementMagnitude,
fRoundingMode,
status);
resolvedMinFraction = fPrecision.fUnion.increment.fMinFrac;
diff --git a/contrib/libs/icu/i18n/number_roundingutils.h b/contrib/libs/icu/i18n/number_roundingutils.h
index 06fadd29fd5..66571272545 100644
--- a/contrib/libs/icu/i18n/number_roundingutils.h
+++ b/contrib/libs/icu/i18n/number_roundingutils.h
@@ -174,15 +174,6 @@ inline bool roundsAtMidpoint(int roundingMode) {
}
}
-/**
- * Computes the number of fraction digits in a double. Used for computing maxFrac for an increment.
- * Calls into the DoubleToStringConverter library to do so.
- *
- * @param singleDigit An output parameter; set to a number if that is the
- * only digit in the double, or -1 if there is more than one digit.
- */
-digits_t doubleFractionLength(double input, int8_t* singleDigit);
-
} // namespace roundingutils
diff --git a/contrib/libs/icu/i18n/number_scientific.h b/contrib/libs/icu/i18n/number_scientific.h
index a40a6e416d1..22140a09afc 100644
--- a/contrib/libs/icu/i18n/number_scientific.h
+++ b/contrib/libs/icu/i18n/number_scientific.h
@@ -22,19 +22,19 @@ class U_I18N_API ScientificModifier : public UMemory, public Modifier {
void set(int32_t exponent, const ScientificHandler *handler);
int32_t apply(FormattedStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
- int32_t getPrefixLength() const U_OVERRIDE;
+ int32_t getPrefixLength() const override;
- int32_t getCodePointCount() const U_OVERRIDE;
+ int32_t getCodePointCount() const override;
- bool isStrong() const U_OVERRIDE;
+ bool isStrong() const override;
- bool containsField(Field field) const U_OVERRIDE;
+ bool containsField(Field field) const override;
- void getParameters(Parameters& output) const U_OVERRIDE;
+ void getParameters(Parameters& output) const override;
- bool semanticallyEquivalent(const Modifier& other) const U_OVERRIDE;
+ bool semanticallyEquivalent(const Modifier& other) const override;
private:
int32_t fExponent;
@@ -47,9 +47,9 @@ class ScientificHandler : public UMemory, public MicroPropsGenerator, public Mul
const MicroPropsGenerator *parent);
void
- processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const U_OVERRIDE;
+ processQuantity(DecimalQuantity &quantity, MicroProps &micros, UErrorCode &status) const override;
- int32_t getMultiplier(int32_t magnitude) const U_OVERRIDE;
+ int32_t getMultiplier(int32_t magnitude) const override;
private:
const Notation::ScientificSettings fSettings;
diff --git a/contrib/libs/icu/i18n/number_simple.cpp b/contrib/libs/icu/i18n/number_simple.cpp
new file mode 100644
index 00000000000..a2af6be42d6
--- /dev/null
+++ b/contrib/libs/icu/i18n/number_simple.cpp
@@ -0,0 +1,255 @@
+// © 2017 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/numberformatter.h"
+#include "unicode/simplenumberformatter.h"
+#include "number_formatimpl.h"
+#include "number_utils.h"
+#include "number_patternmodifier.h"
+#include "number_utypes.h"
+
+using namespace icu;
+using namespace icu::number;
+using namespace icu::number::impl;
+
+
+SimpleNumber
+SimpleNumber::forInt64(int64_t value, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return SimpleNumber();
+ }
+ auto results = new UFormattedNumberData();
+ if (results == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return SimpleNumber();
+ }
+ results->quantity.setToLong(value);
+ return SimpleNumber(results, status);
+}
+
+SimpleNumber::SimpleNumber(UFormattedNumberData* data, UErrorCode& status) : fData(data) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ if (fData->quantity.isNegative()) {
+ fSign = UNUM_SIMPLE_NUMBER_MINUS_SIGN;
+ } else {
+ fSign = UNUM_SIMPLE_NUMBER_NO_SIGN;
+ }
+}
+
+void SimpleNumber::cleanup() {
+ delete fData;
+ fData = nullptr;
+}
+
+void SimpleNumber::multiplyByPowerOfTen(int32_t power, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+ fData->quantity.adjustMagnitude(power);
+}
+
+void SimpleNumber::roundTo(int32_t position, UNumberFormatRoundingMode roundingMode, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+ fData->quantity.roundToMagnitude(position, roundingMode, status);
+}
+
+void SimpleNumber::setMinimumIntegerDigits(uint32_t position, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+ fData->quantity.setMinInteger(position);
+}
+
+void SimpleNumber::setMinimumFractionDigits(uint32_t position, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+ fData->quantity.setMinFraction(position);
+}
+
+void SimpleNumber::truncateStart(uint32_t position, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+ fData->quantity.applyMaxInteger(position);
+}
+
+void SimpleNumber::setSign(USimpleNumberSign sign, UErrorCode& status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (fData == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+ fSign = sign;
+}
+
+
+void SimpleNumberFormatter::cleanup() {
+ delete fOwnedSymbols;
+ delete fMicros;
+ delete fPatternModifier;
+ fOwnedSymbols = nullptr;
+ fMicros = nullptr;
+ fPatternModifier = nullptr;
+}
+
+SimpleNumberFormatter SimpleNumberFormatter::forLocale(const icu::Locale &locale, UErrorCode &status) {
+ return SimpleNumberFormatter::forLocaleAndGroupingStrategy(locale, UNUM_GROUPING_AUTO, status);
+}
+
+SimpleNumberFormatter SimpleNumberFormatter::forLocaleAndGroupingStrategy(
+ const icu::Locale &locale,
+ UNumberGroupingStrategy groupingStrategy,
+ UErrorCode &status) {
+ SimpleNumberFormatter retval;
+ retval.fOwnedSymbols = new DecimalFormatSymbols(locale, status);
+ if (U_FAILURE(status)) {
+ return retval;
+ }
+ if (retval.fOwnedSymbols == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return retval;
+ }
+ retval.initialize(locale, *retval.fOwnedSymbols, groupingStrategy, status);
+ return retval;
+}
+
+
+SimpleNumberFormatter SimpleNumberFormatter::forLocaleAndSymbolsAndGroupingStrategy(
+ const icu::Locale &locale,
+ const DecimalFormatSymbols &symbols,
+ UNumberGroupingStrategy groupingStrategy,
+ UErrorCode &status) {
+ SimpleNumberFormatter retval;
+ retval.initialize(locale, symbols, groupingStrategy, status);
+ return retval;
+}
+
+
+void SimpleNumberFormatter::initialize(
+ const icu::Locale &locale,
+ const DecimalFormatSymbols &symbols,
+ UNumberGroupingStrategy groupingStrategy,
+ UErrorCode &status) {
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ fMicros = new SimpleMicroProps();
+ if (fMicros == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ fMicros->symbols = &symbols;
+
+ auto pattern = utils::getPatternForStyle(
+ locale,
+ symbols.getNumberingSystemName(),
+ CLDR_PATTERN_STYLE_DECIMAL,
+ status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ ParsedPatternInfo patternInfo;
+ PatternParser::parseToPatternInfo(UnicodeString(pattern), patternInfo, status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+
+ auto grouper = Grouper::forStrategy(groupingStrategy);
+ grouper.setLocaleData(patternInfo, locale);
+ fMicros->grouping = grouper;
+
+ MutablePatternModifier patternModifier(false);
+ patternModifier.setPatternInfo(&patternInfo, kUndefinedField);
+ patternModifier.setPatternAttributes(UNUM_SIGN_EXCEPT_ZERO, false, false);
+ patternModifier.setSymbols(fMicros->symbols, {}, UNUM_UNIT_WIDTH_SHORT, nullptr, status);
+
+ fPatternModifier = new AdoptingSignumModifierStore(patternModifier.createImmutableForPlural(StandardPlural::COUNT, status));
+
+ fGroupingStrategy = groupingStrategy;
+ return;
+}
+
+FormattedNumber SimpleNumberFormatter::format(SimpleNumber value, UErrorCode &status) const {
+ formatImpl(value.fData, value.fSign, status);
+
+ // Do not save the results object if we encountered a failure.
+ if (U_SUCCESS(status)) {
+ auto temp = value.fData;
+ value.fData = nullptr;
+ return FormattedNumber(temp);
+ } else {
+ return FormattedNumber(status);
+ }
+}
+
+void SimpleNumberFormatter::formatImpl(UFormattedNumberData* data, USimpleNumberSign sign, UErrorCode &status) const {
+ if (U_FAILURE(status)) {
+ return;
+ }
+ if (data == nullptr) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ if (fPatternModifier == nullptr || fMicros == nullptr) {
+ status = U_INVALID_STATE_ERROR;
+ return;
+ }
+
+ Signum signum;
+ if (sign == UNUM_SIMPLE_NUMBER_MINUS_SIGN) {
+ signum = SIGNUM_NEG;
+ } else if (sign == UNUM_SIMPLE_NUMBER_PLUS_SIGN) {
+ signum = SIGNUM_POS;
+ } else {
+ signum = SIGNUM_POS_ZERO;
+ }
+
+ const Modifier* modifier = (*fPatternModifier)[signum];
+ auto length = NumberFormatterImpl::writeNumber(
+ *fMicros,
+ data->quantity,
+ data->getStringRef(),
+ 0,
+ status);
+ length += modifier->apply(data->getStringRef(), 0, length, status);
+ data->getStringRef().writeTerminator(status);
+}
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/i18n/number_skeletons.cpp b/contrib/libs/icu/i18n/number_skeletons.cpp
index de70c5cedff..ef3befbffad 100644
--- a/contrib/libs/icu/i18n/number_skeletons.cpp
+++ b/contrib/libs/icu/i18n/number_skeletons.cpp
@@ -33,7 +33,7 @@ using namespace icu::number::impl::skeleton;
namespace {
-icu::UInitOnce gNumberSkeletonsInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gNumberSkeletonsInitOnce {};
char16_t* kSerializedStemTrie = nullptr;
@@ -41,7 +41,7 @@ UBool U_CALLCONV cleanupNumberSkeletons() {
uprv_free(kSerializedStemTrie);
kSerializedStemTrie = nullptr;
gNumberSkeletonsInitOnce.reset();
- return TRUE;
+ return true;
}
void U_CALLCONV initNumberSkeletons(UErrorCode& status) {
@@ -1022,7 +1022,7 @@ void blueprint_helpers::parseCurrencyOption(const StringSegment& segment, MacroP
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return;
}
- const UChar* currencyCode = segment.toTempUnicodeString().getBuffer();
+ const char16_t* currencyCode = segment.toTempUnicodeString().getBuffer();
UErrorCode localStatus = U_ZERO_ERROR;
CurrencyUnit currency(currencyCode, localStatus);
if (U_FAILURE(localStatus)) {
@@ -1057,7 +1057,7 @@ void blueprint_helpers::parseMeasureUnitOption(const StringSegment& segment, Mac
return;
}
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
CharString type;
SKELETON_UCHAR_TO_CHAR(type, stemString, 0, firstHyphen, status);
CharString subType;
@@ -1098,7 +1098,7 @@ void blueprint_helpers::parseMeasurePerUnitOption(const StringSegment& segment,
void blueprint_helpers::parseIdentifierUnitOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) {
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
@@ -1114,7 +1114,7 @@ void blueprint_helpers::parseIdentifierUnitOption(const StringSegment& segment,
void blueprint_helpers::parseUnitUsageOption(const StringSegment &segment, MacroProps &macros,
UErrorCode &status) {
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
@@ -1344,8 +1344,9 @@ bool blueprint_helpers::parseFracSigOption(const StringSegment& segment, MacroPr
// @, @@, @@@
maxSig = minSig;
}
- UNumberRoundingPriority priority;
+ auto& oldPrecision = static_cast<const FractionPrecision&>(macros.precision);
if (offset < segment.length()) {
+ UNumberRoundingPriority priority;
if (maxSig == -1) {
// The wildcard character is not allowed with the priority annotation
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
@@ -1367,22 +1368,19 @@ bool blueprint_helpers::parseFracSigOption(const StringSegment& segment, MacroPr
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return false;
}
+ macros.precision = oldPrecision.withSignificantDigits(minSig, maxSig, priority);
} else if (maxSig == -1) {
// withMinDigits
- maxSig = minSig;
- minSig = 1;
- priority = UNUM_ROUNDING_PRIORITY_RELAXED;
+ macros.precision = oldPrecision.withMinDigits(minSig);
} else if (minSig == 1) {
// withMaxDigits
- priority = UNUM_ROUNDING_PRIORITY_STRICT;
+ macros.precision = oldPrecision.withMaxDigits(maxSig);
} else {
// Digits options with both min and max sig require the priority option
status = U_NUMBER_SKELETON_SYNTAX_ERROR;
return false;
}
- auto& oldPrecision = static_cast<const FractionPrecision&>(macros.precision);
- macros.precision = oldPrecision.withSignificantDigits(minSig, maxSig, priority);
return true;
}
@@ -1399,12 +1397,16 @@ void blueprint_helpers::parseIncrementOption(const StringSegment &segment, Macro
number::impl::parseIncrementOption(segment, macros.precision, status);
}
-void blueprint_helpers::generateIncrementOption(double increment, int32_t minFrac, UnicodeString& sb,
- UErrorCode&) {
+void blueprint_helpers::generateIncrementOption(
+ uint32_t increment,
+ digits_t incrementMagnitude,
+ int32_t minFrac,
+ UnicodeString& sb,
+ UErrorCode&) {
// Utilize DecimalQuantity/double_conversion to format this for us.
DecimalQuantity dq;
- dq.setToDouble(increment);
- dq.roundToInfinity();
+ dq.setToLong(increment);
+ dq.adjustMagnitude(incrementMagnitude);
dq.setMinFraction(minFrac);
sb.append(dq.toPlainString());
}
@@ -1464,7 +1466,7 @@ void blueprint_helpers::generateIntegerWidthOption(int32_t minInt, int32_t maxIn
void blueprint_helpers::parseNumberingSystemOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) {
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
@@ -1481,13 +1483,13 @@ void blueprint_helpers::parseNumberingSystemOption(const StringSegment& segment,
void blueprint_helpers::generateNumberingSystemOption(const NumberingSystem& ns, UnicodeString& sb,
UErrorCode&) {
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
sb.append(UnicodeString(ns.getName(), -1, US_INV));
}
void blueprint_helpers::parseScaleOption(const StringSegment& segment, MacroProps& macros,
UErrorCode& status) {
- // Need to do char <-> UChar conversion...
+ // Need to do char <-> char16_t conversion...
U_ASSERT(U_SUCCESS(status));
CharString buffer;
SKELETON_UCHAR_TO_CHAR(buffer, segment.toTempUnicodeString(), 0, segment.length(), status);
@@ -1617,11 +1619,21 @@ bool GeneratorHelpers::precision(const MacroProps& macros, UnicodeString& sb, UE
const Precision::FractionSignificantSettings& impl = macros.precision.fUnion.fracSig;
blueprint_helpers::generateFractionStem(impl.fMinFrac, impl.fMaxFrac, sb, status);
sb.append(u'/');
- blueprint_helpers::generateDigitsStem(impl.fMinSig, impl.fMaxSig, sb, status);
- if (impl.fPriority == UNUM_ROUNDING_PRIORITY_RELAXED) {
- sb.append(u'r');
+ if (impl.fRetain) {
+ if (impl.fPriority == UNUM_ROUNDING_PRIORITY_RELAXED) {
+ // withMinDigits
+ blueprint_helpers::generateDigitsStem(impl.fMaxSig, -1, sb, status);
+ } else {
+ // withMaxDigits
+ blueprint_helpers::generateDigitsStem(1, impl.fMaxSig, sb, status);
+ }
} else {
- sb.append(u's');
+ blueprint_helpers::generateDigitsStem(impl.fMinSig, impl.fMaxSig, sb, status);
+ if (impl.fPriority == UNUM_ROUNDING_PRIORITY_RELAXED) {
+ sb.append(u'r');
+ } else {
+ sb.append(u's');
+ }
}
} else if (macros.precision.fType == Precision::RND_INCREMENT
|| macros.precision.fType == Precision::RND_INCREMENT_ONE
@@ -1630,6 +1642,7 @@ bool GeneratorHelpers::precision(const MacroProps& macros, UnicodeString& sb, UE
sb.append(u"precision-increment/", -1);
blueprint_helpers::generateIncrementOption(
impl.fIncrement,
+ impl.fIncrementMagnitude,
impl.fMinFrac,
sb,
status);
diff --git a/contrib/libs/icu/i18n/number_skeletons.h b/contrib/libs/icu/i18n/number_skeletons.h
index be41f1b3237..27f69cd48c3 100644
--- a/contrib/libs/icu/i18n/number_skeletons.h
+++ b/contrib/libs/icu/i18n/number_skeletons.h
@@ -286,7 +286,7 @@ bool parseTrailingZeroOption(const StringSegment& segment, MacroProps& macros, U
void parseIncrementOption(const StringSegment& segment, MacroProps& macros, UErrorCode& status);
void
-generateIncrementOption(double increment, int32_t minFrac, UnicodeString& sb, UErrorCode& status);
+generateIncrementOption(uint32_t increment, digits_t incrementMagnitude, int32_t minFrac, UnicodeString& sb, UErrorCode& status);
void parseIntegerWidthOption(const StringSegment& segment, MacroProps& macros, UErrorCode& status);
diff --git a/contrib/libs/icu/i18n/number_symbolswrapper.cpp b/contrib/libs/icu/i18n/number_symbolswrapper.cpp
index ac3043d1ca1..4742a69c1fb 100644
--- a/contrib/libs/icu/i18n/number_symbolswrapper.cpp
+++ b/contrib/libs/icu/i18n/number_symbolswrapper.cpp
@@ -16,7 +16,7 @@ SymbolsWrapper::SymbolsWrapper(const SymbolsWrapper &other) {
doCopyFrom(other);
}
-SymbolsWrapper::SymbolsWrapper(SymbolsWrapper &&src) U_NOEXCEPT {
+SymbolsWrapper::SymbolsWrapper(SymbolsWrapper &&src) noexcept {
doMoveFrom(std::move(src));
}
@@ -29,7 +29,7 @@ SymbolsWrapper &SymbolsWrapper::operator=(const SymbolsWrapper &other) {
return *this;
}
-SymbolsWrapper &SymbolsWrapper::operator=(SymbolsWrapper &&src) U_NOEXCEPT {
+SymbolsWrapper &SymbolsWrapper::operator=(SymbolsWrapper &&src) noexcept {
if (this == &src) {
return *this;
}
diff --git a/contrib/libs/icu/i18n/number_usageprefs.cpp b/contrib/libs/icu/i18n/number_usageprefs.cpp
index 5d93d12cce7..6f7fdaa9dca 100644
--- a/contrib/libs/icu/i18n/number_usageprefs.cpp
+++ b/contrib/libs/icu/i18n/number_usageprefs.cpp
@@ -60,7 +60,7 @@ StringProp &StringProp::operator=(const StringProp &other) {
}
// Move constructor
-StringProp::StringProp(StringProp &&src) U_NOEXCEPT : fValue(src.fValue),
+StringProp::StringProp(StringProp &&src) noexcept : fValue(src.fValue),
fLength(src.fLength),
fError(src.fError) {
// Take ownership away from src if necessary
@@ -68,7 +68,7 @@ StringProp::StringProp(StringProp &&src) U_NOEXCEPT : fValue(src.fValue),
}
// Move assignment operator
-StringProp &StringProp::operator=(StringProp &&src) U_NOEXCEPT {
+StringProp &StringProp::operator=(StringProp &&src) noexcept {
if (this == &src) {
return *this;
}
@@ -102,7 +102,9 @@ void StringProp::set(StringPiece value) {
fError = U_MEMORY_ALLOCATION_ERROR;
return;
}
- uprv_strncpy(fValue, value.data(), fLength);
+ if (fLength > 0) {
+ uprv_strncpy(fValue, value.data(), fLength);
+ }
fValue[fLength] = 0;
}
@@ -153,7 +155,7 @@ UsagePrefsHandler::UsagePrefsHandler(const Locale &locale,
const StringPiece usage,
const MicroPropsGenerator *parent,
UErrorCode &status)
- : fUnitsRouter(inputUnit, StringPiece(locale.getCountry()), usage, status),
+ : fUnitsRouter(inputUnit, locale, usage, status),
fParent(parent) {
}
diff --git a/contrib/libs/icu/i18n/number_usageprefs.h b/contrib/libs/icu/i18n/number_usageprefs.h
index 70547225a00..e90df99d396 100644
--- a/contrib/libs/icu/i18n/number_usageprefs.h
+++ b/contrib/libs/icu/i18n/number_usageprefs.h
@@ -44,7 +44,7 @@ class U_I18N_API UsagePrefsHandler : public MicroPropsGenerator, public UMemory
* micros.outputUnit.
*/
void processQuantity(DecimalQuantity &quantity, MicroProps &micros,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
/**
* Returns the list of possible output units, i.e. the full set of
@@ -111,7 +111,7 @@ class U_I18N_API UnitConversionHandler : public MicroPropsGenerator, public UMem
* Obtains the appropriate output values from the Unit Converter.
*/
void processQuantity(DecimalQuantity &quantity, MicroProps &micros,
- UErrorCode &status) const U_OVERRIDE;
+ UErrorCode &status) const override;
private:
MeasureUnit fOutputUnit;
LocalPointer<ComplexUnitsConverter> fUnitConverter;
diff --git a/contrib/libs/icu/i18n/number_utypes.h b/contrib/libs/icu/i18n/number_utypes.h
index 50c861787f4..0c130401894 100644
--- a/contrib/libs/icu/i18n/number_utypes.h
+++ b/contrib/libs/icu/i18n/number_utypes.h
@@ -35,6 +35,9 @@ public:
UFormattedNumberData() : FormattedValueStringBuilderImpl(kUndefinedField) {}
virtual ~UFormattedNumberData();
+ UFormattedNumberData(UFormattedNumberData&&) = default;
+ UFormattedNumberData& operator=(UFormattedNumberData&&) = default;
+
// The formatted quantity.
DecimalQuantity quantity;
diff --git a/contrib/libs/icu/i18n/numfmt.cpp b/contrib/libs/icu/i18n/numfmt.cpp
index b8ce1c930f9..74689e1363a 100644
--- a/contrib/libs/icu/i18n/numfmt.cpp
+++ b/contrib/libs/icu/i18n/numfmt.cpp
@@ -74,32 +74,32 @@ static inline void debugout(UnicodeString s) {
// If no number pattern can be located for a locale, this is the last
// resort. The patterns are same as the ones in root locale.
-static const UChar gLastResortDecimalPat[] = {
+static const char16_t gLastResortDecimalPat[] = {
0x23, 0x2C, 0x23, 0x23, 0x30, 0x2E, 0x23, 0x23, 0x23, 0 /* "#,##0.###" */
};
-static const UChar gLastResortCurrencyPat[] = {
+static const char16_t gLastResortCurrencyPat[] = {
0xA4, 0xA0, 0x23, 0x2C, 0x23, 0x23, 0x30, 0x2E, 0x30, 0x30, 0 /* "\u00A4\u00A0#,##0.00" */
};
-static const UChar gLastResortPercentPat[] = {
+static const char16_t gLastResortPercentPat[] = {
0x23, 0x2C, 0x23, 0x23, 0x30, 0x25, 0 /* "#,##0%" */
};
-static const UChar gLastResortScientificPat[] = {
+static const char16_t gLastResortScientificPat[] = {
0x23, 0x45, 0x30, 0 /* "#E0" */
};
-static const UChar gLastResortIsoCurrencyPat[] = {
+static const char16_t gLastResortIsoCurrencyPat[] = {
0xA4, 0xA4, 0xA0, 0x23, 0x2C, 0x23, 0x23, 0x30, 0x2E, 0x30, 0x30, 0 /* "\u00A4\u00A4\u00A0#,##0.00" */
};
-static const UChar gLastResortPluralCurrencyPat[] = {
+static const char16_t gLastResortPluralCurrencyPat[] = {
0x23, 0x2C, 0x23, 0x23, 0x30, 0x2E, 0x23, 0x23, 0x23, 0x20, 0xA4, 0xA4, 0xA4, 0 /* "#,##0.### \u00A4\u00A4\u00A4*/
};
-static const UChar gLastResortAccountingCurrencyPat[] = {
+static const char16_t gLastResortAccountingCurrencyPat[] = {
0xA4, 0xA0, 0x23, 0x2C, 0x23, 0x23, 0x30, 0x2E, 0x30, 0x30, 0 /* "\u00A4\u00A0#,##0.00" */
};
-static const UChar gSingleCurrencySign[] = {0xA4, 0};
-static const UChar gDoubleCurrencySign[] = {0xA4, 0xA4, 0};
+static const char16_t gSingleCurrencySign[] = {0xA4, 0};
+static const char16_t gDoubleCurrencySign[] = {0xA4, 0xA4, 0};
-static const UChar gSlash = 0x2f;
+static const char16_t gSlash = 0x2f;
// If the maximum base 10 exponent were 4, then the largest number would
// be 99,999 which has 5 digits.
@@ -108,39 +108,39 @@ static const UChar gSlash = 0x2f;
const int32_t icu::NumberFormat::gDefaultMaxIntegerDigits = 2000000000;
const int32_t icu::NumberFormat::gDefaultMinIntegerDigits = 127;
-static const UChar * const gLastResortNumberPatterns[UNUM_FORMAT_STYLE_COUNT] = {
- NULL, // UNUM_PATTERN_DECIMAL
+static const char16_t * const gLastResortNumberPatterns[UNUM_FORMAT_STYLE_COUNT] = {
+ nullptr, // UNUM_PATTERN_DECIMAL
gLastResortDecimalPat, // UNUM_DECIMAL
gLastResortCurrencyPat, // UNUM_CURRENCY
gLastResortPercentPat, // UNUM_PERCENT
gLastResortScientificPat, // UNUM_SCIENTIFIC
- NULL, // UNUM_SPELLOUT
- NULL, // UNUM_ORDINAL
- NULL, // UNUM_DURATION
- NULL, // UNUM_NUMBERING_SYSTEM
- NULL, // UNUM_PATTERN_RULEBASED
+ nullptr, // UNUM_SPELLOUT
+ nullptr, // UNUM_ORDINAL
+ nullptr, // UNUM_DURATION
+ gLastResortDecimalPat, // UNUM_NUMBERING_SYSTEM
+ nullptr, // UNUM_PATTERN_RULEBASED
gLastResortIsoCurrencyPat, // UNUM_CURRENCY_ISO
gLastResortPluralCurrencyPat, // UNUM_CURRENCY_PLURAL
gLastResortAccountingCurrencyPat, // UNUM_CURRENCY_ACCOUNTING
gLastResortCurrencyPat, // UNUM_CASH_CURRENCY
- NULL, // UNUM_DECIMAL_COMPACT_SHORT
- NULL, // UNUM_DECIMAL_COMPACT_LONG
+ nullptr, // UNUM_DECIMAL_COMPACT_SHORT
+ nullptr, // UNUM_DECIMAL_COMPACT_LONG
gLastResortCurrencyPat, // UNUM_CURRENCY_STANDARD
};
// Keys used for accessing resource bundles
static const icu::number::impl::CldrPatternStyle gFormatCldrStyles[UNUM_FORMAT_STYLE_COUNT] = {
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_PATTERN_DECIMAL
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_PATTERN_DECIMAL
icu::number::impl::CLDR_PATTERN_STYLE_DECIMAL, // UNUM_DECIMAL
icu::number::impl::CLDR_PATTERN_STYLE_CURRENCY, // UNUM_CURRENCY
icu::number::impl::CLDR_PATTERN_STYLE_PERCENT, // UNUM_PERCENT
icu::number::impl::CLDR_PATTERN_STYLE_SCIENTIFIC, // UNUM_SCIENTIFIC
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_SPELLOUT
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_ORDINAL
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_DURATION
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_NUMBERING_SYSTEM
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_PATTERN_RULEBASED
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_SPELLOUT
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_ORDINAL
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_DURATION
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_NUMBERING_SYSTEM
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_PATTERN_RULEBASED
// For UNUM_CURRENCY_ISO and UNUM_CURRENCY_PLURAL,
// the pattern is the same as the pattern of UNUM_CURRENCY
// except for replacing the single currency sign with
@@ -149,18 +149,18 @@ static const icu::number::impl::CldrPatternStyle gFormatCldrStyles[UNUM_FORMAT_S
icu::number::impl::CLDR_PATTERN_STYLE_CURRENCY, // UNUM_CURRENCY_PLURAL
icu::number::impl::CLDR_PATTERN_STYLE_ACCOUNTING, // UNUM_CURRENCY_ACCOUNTING
icu::number::impl::CLDR_PATTERN_STYLE_CURRENCY, // UNUM_CASH_CURRENCY
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_DECIMAL_COMPACT_SHORT
- /* NULL */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_DECIMAL_COMPACT_LONG
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_DECIMAL_COMPACT_SHORT
+ /* nullptr */ icu::number::impl::CLDR_PATTERN_STYLE_COUNT, // UNUM_DECIMAL_COMPACT_LONG
icu::number::impl::CLDR_PATTERN_STYLE_CURRENCY, // UNUM_CURRENCY_STANDARD
};
// Static hashtable cache of NumberingSystem objects used by NumberFormat
-static UHashtable * NumberingSystem_cache = NULL;
-static icu::UInitOnce gNSCacheInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable * NumberingSystem_cache = nullptr;
+static icu::UInitOnce gNSCacheInitOnce {};
#if !UCONFIG_NO_SERVICE
-static icu::ICULocaleService* gService = NULL;
-static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+static icu::ICULocaleService* gService = nullptr;
+static icu::UInitOnce gServiceInitOnce {};
#endif
/**
@@ -172,21 +172,21 @@ deleteNumberingSystem(void *obj) {
delete (icu::NumberingSystem *)obj;
}
-static UBool U_CALLCONV numfmt_cleanup(void) {
+static UBool U_CALLCONV numfmt_cleanup() {
#if !UCONFIG_NO_SERVICE
gServiceInitOnce.reset();
if (gService) {
delete gService;
- gService = NULL;
+ gService = nullptr;
}
#endif
gNSCacheInitOnce.reset();
if (NumberingSystem_cache) {
// delete NumberingSystem_cache;
uhash_close(NumberingSystem_cache);
- NumberingSystem_cache = NULL;
+ NumberingSystem_cache = nullptr;
}
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -210,7 +210,7 @@ SimpleNumberFormatFactory::SimpleNumberFormatFactory(const Locale& locale, UBool
SimpleNumberFormatFactory::~SimpleNumberFormatFactory() {}
-UBool SimpleNumberFormatFactory::visible(void) const {
+UBool SimpleNumberFormatFactory::visible() const {
return _visible;
}
@@ -222,20 +222,20 @@ SimpleNumberFormatFactory::getSupportedIDs(int32_t &count, UErrorCode& status) c
return &_id;
}
count = 0;
- return NULL;
+ return nullptr;
}
#endif /* #if !UCONFIG_NO_SERVICE */
// -------------------------------------
// default constructor
NumberFormat::NumberFormat()
-: fGroupingUsed(TRUE),
+: fGroupingUsed(true),
fMaxIntegerDigits(gDefaultMaxIntegerDigits),
fMinIntegerDigits(1),
fMaxFractionDigits(3), // invariant, >= minFractionDigits
fMinFractionDigits(0),
- fParseIntegerOnly(FALSE),
- fLenient(FALSE),
+ fParseIntegerOnly(false),
+ fLenient(false),
fCapitalizationContext(UDISPCTX_CAPITALIZATION_NONE)
{
fCurrency[0] = 0;
@@ -294,39 +294,39 @@ NumberFormat::operator==(const Format& that) const
#ifdef FMT_DEBUG
// This code makes it easy to determine why two format objects that should
// be equal aren't.
- UBool first = TRUE;
+ UBool first = true;
if (!Format::operator==(that)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("Format::!=");
}
if (!(fMaxIntegerDigits == other->fMaxIntegerDigits &&
fMinIntegerDigits == other->fMinIntegerDigits)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("Integer digits !=");
}
if (!(fMaxFractionDigits == other->fMaxFractionDigits &&
fMinFractionDigits == other->fMinFractionDigits)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("Fraction digits !=");
}
if (!(fGroupingUsed == other->fGroupingUsed)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("fGroupingUsed != ");
}
if (!(fParseIntegerOnly == other->fParseIntegerOnly)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("fParseIntegerOnly != ");
}
if (!(u_strcmp(fCurrency, other->fCurrency) == 0)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("fCurrency !=");
}
if (!(fLenient == other->fLenient)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("fLenient != ");
}
if (!(fCapitalizationContext == other->fCapitalizationContext)) {
- if (first) { printf("[ "); first = FALSE; } else { printf(", "); }
+ if (first) { printf("[ "); first = false; } else { printf(", "); }
debug("fCapitalizationContext != ");
}
if (!first) { printf(" ]"); }
@@ -474,45 +474,45 @@ NumberFormat::format(StringPiece decimalNum,
*/
class ArgExtractor {
const Formattable* num;
- UChar save[4];
+ char16_t save[4];
UBool fWasCurrency;
public:
ArgExtractor(const NumberFormat& nf, const Formattable& obj, UErrorCode& status);
~ArgExtractor();
- const Formattable* number(void) const;
- const UChar *iso(void) const;
- UBool wasCurrency(void) const;
+ const Formattable* number() const;
+ const char16_t *iso() const;
+ UBool wasCurrency() const;
};
inline const Formattable*
-ArgExtractor::number(void) const {
+ArgExtractor::number() const {
return num;
}
inline UBool
-ArgExtractor::wasCurrency(void) const {
+ArgExtractor::wasCurrency() const {
return fWasCurrency;
}
-inline const UChar *
-ArgExtractor::iso(void) const {
+inline const char16_t *
+ArgExtractor::iso() const {
return save;
}
ArgExtractor::ArgExtractor(const NumberFormat& /*nf*/, const Formattable& obj, UErrorCode& /*status*/)
- : num(&obj), fWasCurrency(FALSE) {
+ : num(&obj), fWasCurrency(false) {
- const UObject* o = obj.getObject(); // most commonly o==NULL
+ const UObject* o = obj.getObject(); // most commonly o==nullptr
const CurrencyAmount* amt;
- if (o != NULL && (amt = dynamic_cast<const CurrencyAmount*>(o)) != NULL) {
+ if (o != nullptr && (amt = dynamic_cast<const CurrencyAmount*>(o)) != nullptr) {
// getISOCurrency() returns a pointer to internal storage, so we
// copy it to retain it across the call to setCurrency().
- //const UChar* curr = amt->getISOCurrency();
+ //const char16_t* curr = amt->getISOCurrency();
u_strcpy(save, amt->getISOCurrency());
num = &amt->getNumber();
- fWasCurrency=TRUE;
+ fWasCurrency=true;
} else {
save[0]=0;
}
@@ -564,7 +564,7 @@ NumberFormat::format(const Formattable& obj,
ArgExtractor arg(*this, obj, status);
const Formattable *n = arg.number();
- const UChar *iso = arg.iso();
+ const char16_t *iso = arg.iso();
if(arg.wasCurrency() && u_strcmp(iso, getCurrency())) {
// trying to format a different currency.
@@ -575,7 +575,7 @@ NumberFormat::format(const Formattable& obj,
return cloneFmt->format(*n, appendTo, pos, status);
}
- if (n->isNumeric() && n->getDecimalQuantity() != NULL) {
+ if (n->isNumeric() && n->getDecimalQuantity() != nullptr) {
// Decimal Number. We will have a DigitList available if the value was
// set to a decimal number, or if the value originated with a parse.
//
@@ -619,7 +619,7 @@ NumberFormat::format(const Formattable& obj,
ArgExtractor arg(*this, obj, status);
const Formattable *n = arg.number();
- const UChar *iso = arg.iso();
+ const char16_t *iso = arg.iso();
if(arg.wasCurrency() && u_strcmp(iso, getCurrency())) {
// trying to format a different currency.
@@ -630,7 +630,7 @@ NumberFormat::format(const Formattable& obj,
return cloneFmt->format(*n, appendTo, posIter, status);
}
- if (n->isNumeric() && n->getDecimalQuantity() != NULL) {
+ if (n->isNumeric() && n->getDecimalQuantity() != nullptr) {
// Decimal Number
format(*n->getDecimalQuantity(), appendTo, posIter, status);
} else {
@@ -733,7 +733,7 @@ CurrencyAmount* NumberFormat::parseCurrency(const UnicodeString& text,
int32_t start = pos.getIndex();
parse(text, parseResult, pos);
if (pos.getIndex() != start) {
- UChar curr[4];
+ char16_t curr[4];
UErrorCode ec = U_ZERO_ERROR;
getEffectiveCurrency(curr, ec);
if (U_SUCCESS(ec)) {
@@ -745,7 +745,7 @@ CurrencyAmount* NumberFormat::parseCurrency(const UnicodeString& text,
}
}
}
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -878,7 +878,7 @@ public:
NFFactory(NumberFormatFactory* delegate)
: LocaleKeyFactory(delegate->visible() ? VISIBLE : INVISIBLE)
, _delegate(delegate)
- , _ids(NULL)
+ , _ids(nullptr)
{
}
@@ -887,18 +887,19 @@ public:
virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const override
{
if (handlesKey(key, status)) {
- const LocaleKey& lkey = (const LocaleKey&)key;
+ const LocaleKey* lkey = dynamic_cast<const LocaleKey*>(&key);
+ U_ASSERT(lkey != nullptr);
Locale loc;
- lkey.canonicalLocale(loc);
- int32_t kind = lkey.kind();
+ lkey->canonicalLocale(loc);
+ int32_t kind = lkey->kind();
UObject* result = _delegate->createFormat(loc, (UNumberFormatStyle)kind);
- if (result == NULL) {
- result = service->getKey((ICUServiceKey&)key /* cast away const */, NULL, this, status);
+ if (result == nullptr) {
+ result = service->getKey(const_cast<ICUServiceKey&>(key) /* cast away const */, nullptr, this, status);
}
return result;
}
- return NULL;
+ return nullptr;
}
protected:
@@ -922,7 +923,7 @@ protected:
}
return _ids;
}
- return NULL;
+ return nullptr;
}
};
@@ -948,10 +949,11 @@ public:
}
virtual UObject* handleDefault(const ICUServiceKey& key, UnicodeString* /* actualID */, UErrorCode& status) const override {
- LocaleKey& lkey = (LocaleKey&)key;
- int32_t kind = lkey.kind();
+ const LocaleKey* lkey = dynamic_cast<const LocaleKey*>(&key);
+ U_ASSERT(lkey != nullptr);
+ int32_t kind = lkey->kind();
Locale loc;
- lkey.currentLocale(loc);
+ lkey->currentLocale(loc);
return NumberFormat::makeInstance(loc, (UNumberFormatStyle)kind, status);
}
@@ -965,20 +967,20 @@ ICUNumberFormatService::~ICUNumberFormatService() {}
// -------------------------------------
static void U_CALLCONV initNumberFormatService() {
- U_ASSERT(gService == NULL);
+ U_ASSERT(gService == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_NUMFMT, numfmt_cleanup);
gService = new ICUNumberFormatService();
}
static ICULocaleService*
-getNumberFormatService(void)
+getNumberFormatService()
{
umtx_initOnce(gServiceInitOnce, &initNumberFormatService);
return gService;
}
static UBool haveService() {
- return !gServiceInitOnce.isReset() && (getNumberFormatService() != NULL);
+ return !gServiceInitOnce.isReset() && (getNumberFormatService() != nullptr);
}
// -------------------------------------
@@ -993,12 +995,12 @@ NumberFormat::registerFactory(NumberFormatFactory* toAdopt, UErrorCode& status)
ICULocaleService *service = getNumberFormatService();
if (service) {
NFFactory *tempnnf = new NFFactory(toAdopt);
- if (tempnnf != NULL) {
+ if (tempnnf != nullptr) {
return service->registerFactory(tempnnf, status);
}
}
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// -------------------------------------
@@ -1007,25 +1009,25 @@ UBool U_EXPORT2
NumberFormat::unregister(URegistryKey key, UErrorCode& status)
{
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (haveService()) {
return gService->unregister(key, status);
} else {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
}
// -------------------------------------
StringEnumeration* U_EXPORT2
-NumberFormat::getAvailableLocales(void)
+NumberFormat::getAvailableLocales()
{
ICULocaleService *service = getNumberFormatService();
if (service) {
return service->getAvailableLocales();
}
- return NULL; // no way to return error condition
+ return nullptr; // no way to return error condition
}
#endif /* UCONFIG_NO_SERVICE */
// -------------------------------------
@@ -1057,11 +1059,11 @@ NumberFormat::createInstance(const Locale& loc, UNumberFormatStyle kind, UErrorC
}
const SharedNumberFormat *shared = createSharedInstance(loc, kind, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
NumberFormat *result = (*shared)->clone();
shared->removeRef();
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
return result;
@@ -1177,7 +1179,7 @@ NumberFormat::setMinimumFractionDigits(int32_t newValue)
// -------------------------------------
-void NumberFormat::setCurrency(const UChar* theCurrency, UErrorCode& ec) {
+void NumberFormat::setCurrency(const char16_t* theCurrency, UErrorCode& ec) {
if (U_FAILURE(ec)) {
return;
}
@@ -1193,14 +1195,14 @@ const char16_t* NumberFormat::getCurrency() const {
return fCurrency;
}
-void NumberFormat::getEffectiveCurrency(UChar* result, UErrorCode& ec) const {
- const UChar* c = getCurrency();
+void NumberFormat::getEffectiveCurrency(char16_t* result, UErrorCode& ec) const {
+ const char16_t* c = getCurrency();
if (*c != 0) {
u_strncpy(result, c, 3);
result[3] = 0;
} else {
const char* loc = getLocaleID(ULOC_VALID_LOCALE, ec);
- if (loc == NULL) {
+ if (loc == nullptr) {
loc = uloc_getDefault();
}
ucurr_forLocale(loc, result, 4, &ec);
@@ -1239,16 +1241,16 @@ UDisplayContext NumberFormat::getContext(UDisplayContextType type, UErrorCode& s
// or percent) for the desired locale.
static void U_CALLCONV nscacheInit() {
- U_ASSERT(NumberingSystem_cache == NULL);
+ U_ASSERT(NumberingSystem_cache == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_NUMFMT, numfmt_cleanup);
UErrorCode status = U_ZERO_ERROR;
NumberingSystem_cache = uhash_open(uhash_hashLong,
uhash_compareLong,
- NULL,
+ nullptr,
&status);
if (U_FAILURE(status)) {
// Number Format code will run with no cache if creation fails.
- NumberingSystem_cache = NULL;
+ NumberingSystem_cache = nullptr;
return;
}
uhash_setValueDeleter(NumberingSystem_cache, deleteNumberingSystem);
@@ -1261,13 +1263,13 @@ const SharedNumberFormat *LocaleCacheKey<SharedNumberFormat>::createObject(
NumberFormat *nf = NumberFormat::internalCreateInstance(
localeId, UNUM_DECIMAL, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
SharedNumberFormat *result = new SharedNumberFormat(nf);
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
delete nf;
- return NULL;
+ return nullptr;
}
result->addRef();
return result;
@@ -1276,20 +1278,20 @@ const SharedNumberFormat *LocaleCacheKey<SharedNumberFormat>::createObject(
const SharedNumberFormat* U_EXPORT2
NumberFormat::createSharedInstance(const Locale& loc, UNumberFormatStyle kind, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (kind != UNUM_DECIMAL) {
status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
- const SharedNumberFormat *result = NULL;
+ const SharedNumberFormat *result = nullptr;
UnifiedCache::getByLocale(loc, result, status);
return result;
}
UBool
NumberFormat::isStyleSupported(UNumberFormatStyle style) {
- return gLastResortNumberPatterns[style] != NULL;
+ return gLastResortNumberPatterns[style] != nullptr;
}
NumberFormat*
@@ -1304,11 +1306,19 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
UNumberFormatStyle style,
UBool mustBeDecimalFormat,
UErrorCode& status) {
- if (U_FAILURE(status)) return NULL;
+ if (U_FAILURE(status)) return nullptr;
if (style < 0 || style >= UNUM_FORMAT_STYLE_COUNT) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
+ }
+
+ // For the purposes of general number formatting, UNUM_NUMBERING_SYSTEM should behave the same
+ // was as UNUM_DECIMAL. In both cases, you get either a DecimalFormat or a RuleBasedNumberFormat
+ // depending on the locale's numbering system (either the default one for the locale or a specific
+ // one specified by using the "@numbers=" or "-u-nu-" parameter in the locale ID.
+ if (style == UNUM_NUMBERING_SYSTEM) {
+ style = UNUM_DECIMAL;
}
// Some styles are not supported. This is a result of merging
@@ -1319,7 +1329,7 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
// because this method does not take a pattern string.
if (!isStyleSupported(style)) {
status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
#if U_PLATFORM_USES_ONLY_WIN32_API
@@ -1329,11 +1339,11 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
// if the locale has "@compat=host", create a host-specific NumberFormat
if (U_SUCCESS(status) && count > 0 && uprv_strcmp(buffer, "host") == 0) {
- UBool curr = TRUE;
+ UBool curr = true;
switch (style) {
case UNUM_DECIMAL:
- curr = FALSE;
+ curr = false;
// fall-through
U_FALLTHROUGH;
@@ -1361,15 +1371,15 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
// Get cached numbering system
LocalPointer<NumberingSystem> ownedNs;
- NumberingSystem *ns = NULL;
- if (NumberingSystem_cache != NULL) {
+ NumberingSystem *ns = nullptr;
+ if (NumberingSystem_cache != nullptr) {
// TODO: Bad hash key usage, see ticket #8504.
int32_t hashKey = desiredLocale.hashCode();
static UMutex nscacheMutex;
Mutex lock(&nscacheMutex);
ns = (NumberingSystem *)uhash_iget(NumberingSystem_cache, hashKey);
- if (ns == NULL) {
+ if (ns == nullptr) {
ns = NumberingSystem::createInstance(desiredLocale,status);
uhash_iput(NumberingSystem_cache, hashKey, (void*)ns, &status);
}
@@ -1380,25 +1390,25 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
// check results of getting a numbering system
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (mustBeDecimalFormat && ns->isAlgorithmic()) {
status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
LocalPointer<DecimalFormatSymbols> symbolsToAdopt;
UnicodeString pattern;
- LocalUResourceBundlePointer ownedResource(ures_open(NULL, desiredLocale.getName(), &status));
+ LocalUResourceBundlePointer ownedResource(ures_open(nullptr, desiredLocale.getName(), &status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
else {
// Loads the decimal symbols of the desired locale.
symbolsToAdopt.adoptInsteadAndCheckErrorCode(new DecimalFormatSymbols(desiredLocale, status), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// Load the pattern from data using the common library function
@@ -1407,15 +1417,15 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
ns->getName(),
gFormatCldrStyles[style],
status);
- pattern = UnicodeString(TRUE, patternPtr, -1);
+ pattern = UnicodeString(true, patternPtr, -1);
}
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if(style==UNUM_CURRENCY || style == UNUM_CURRENCY_ISO || style == UNUM_CURRENCY_ACCOUNTING
|| style == UNUM_CASH_CURRENCY || style == UNUM_CURRENCY_STANDARD){
- const UChar* currPattern = symbolsToAdopt->getCurrencyPattern();
- if(currPattern!=NULL){
+ const char16_t* currPattern = symbolsToAdopt->getCurrencyPattern();
+ if(currPattern!=nullptr){
pattern.setTo(currPattern, u_strlen(currPattern));
}
}
@@ -1450,9 +1460,9 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
}
RuleBasedNumberFormat *r = new RuleBasedNumberFormat(desiredRulesType,nsLoc,status);
- if (r == NULL) {
+ if (r == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
r->setDefaultRuleSet(nsRuleSetName,status);
f.adoptInstead(r);
@@ -1460,8 +1470,8 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
// replace single currency sign in the pattern with double currency sign
// if the style is UNUM_CURRENCY_ISO
if (style == UNUM_CURRENCY_ISO) {
- pattern.findAndReplace(UnicodeString(TRUE, gSingleCurrencySign, 1),
- UnicodeString(TRUE, gDoubleCurrencySign, 2));
+ pattern.findAndReplace(UnicodeString(true, gSingleCurrencySign, 1),
+ UnicodeString(true, gDoubleCurrencySign, 2));
}
// "new DecimalFormat()" does not adopt the symbols argument if its memory allocation fails.
@@ -1496,7 +1506,7 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
f->setLocaleIDs(ures_getLocaleByType(ownedResource.getAlias(), ULOC_VALID_LOCALE, &status),
ures_getLocaleByType(ownedResource.getAlias(), ULOC_ACTUAL_LOCALE, &status));
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
return f.orphan();
}
diff --git a/contrib/libs/icu/i18n/numparse_affixes.cpp b/contrib/libs/icu/i18n/numparse_affixes.cpp
index 14140065983..ad3d48b4731 100644
--- a/contrib/libs/icu/i18n/numparse_affixes.cpp
+++ b/contrib/libs/icu/i18n/numparse_affixes.cpp
@@ -169,6 +169,10 @@ NumberParseMatcher* AffixTokenMatcherWarehouse::nextCodePointMatcher(UChar32 cp,
return result;
}
+bool AffixTokenMatcherWarehouse::hasEmptyCurrencySymbol() const {
+ return fSetupData->currencySymbols.hasEmptyCurrencySymbol();
+}
+
CodePointMatcher::CodePointMatcher(UChar32 cp)
: fCp(cp) {}
@@ -280,8 +284,16 @@ void AffixMatcherWarehouse::createAffixMatchers(const AffixPatternProvider& patt
AffixPatternMatcher* posSuffix = nullptr;
// Pre-process the affix strings to resolve LDML rules like sign display.
- for (int8_t typeInt = 0; typeInt < PATTERN_SIGN_TYPE_COUNT; typeInt++) {
- auto type = static_cast<PatternSignType>(typeInt);
+ for (int8_t typeInt = 0; typeInt < PATTERN_SIGN_TYPE_COUNT * 2; typeInt++) {
+ auto type = static_cast<PatternSignType>(typeInt / 2);
+ bool dropCurrencySymbols = (typeInt % 2) == 1;
+
+ if (dropCurrencySymbols && !patternInfo.hasCurrencySign()) {
+ continue;
+ }
+ if (dropCurrencySymbols && !fTokenWarehouse->hasEmptyCurrencySymbol()) {
+ continue;
+ }
// Skip affixes in some cases
if (type == PATTERN_SIGN_TYPE_POS
@@ -297,7 +309,7 @@ void AffixMatcherWarehouse::createAffixMatchers(const AffixPatternProvider& patt
// TODO: Handle approximately sign?
bool hasPrefix = false;
PatternStringUtils::patternInfoToStringBuilder(
- patternInfo, true, type, false, StandardPlural::OTHER, false, sb);
+ patternInfo, true, type, false, StandardPlural::OTHER, false, dropCurrencySymbols, sb);
fAffixPatternMatchers[numAffixPatternMatchers] = AffixPatternMatcher::fromAffixPattern(
sb, *fTokenWarehouse, parseFlags, &hasPrefix, status);
AffixPatternMatcher* prefix = hasPrefix ? &fAffixPatternMatchers[numAffixPatternMatchers++]
@@ -307,7 +319,7 @@ void AffixMatcherWarehouse::createAffixMatchers(const AffixPatternProvider& patt
// TODO: Handle approximately sign?
bool hasSuffix = false;
PatternStringUtils::patternInfoToStringBuilder(
- patternInfo, false, type, false, StandardPlural::OTHER, false, sb);
+ patternInfo, false, type, false, StandardPlural::OTHER, false, dropCurrencySymbols, sb);
fAffixPatternMatchers[numAffixPatternMatchers] = AffixPatternMatcher::fromAffixPattern(
sb, *fTokenWarehouse, parseFlags, &hasSuffix, status);
AffixPatternMatcher* suffix = hasSuffix ? &fAffixPatternMatchers[numAffixPatternMatchers++]
diff --git a/contrib/libs/icu/i18n/numparse_affixes.h b/contrib/libs/icu/i18n/numparse_affixes.h
index a82b731ab5b..81b633c2626 100644
--- a/contrib/libs/icu/i18n/numparse_affixes.h
+++ b/contrib/libs/icu/i18n/numparse_affixes.h
@@ -53,7 +53,7 @@ class U_I18N_API CodePointMatcher : public NumberParseMatcher, public UMemory {
// Note: These need to be outside of the numparse::impl namespace, or Clang will generate a compile error.
#if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
template class U_I18N_API MaybeStackArray<numparse::impl::CodePointMatcher*, 8>;
-template class U_I18N_API MaybeStackArray<UChar, 4>;
+template class U_I18N_API MaybeStackArray<char16_t, 4>;
template class U_I18N_API MemoryPool<numparse::impl::CodePointMatcher, 8>;
template class U_I18N_API numparse::impl::CompactUnicodeString<4>;
#endif
@@ -101,6 +101,8 @@ class U_I18N_API AffixTokenMatcherWarehouse : public UMemory {
NumberParseMatcher* nextCodePointMatcher(UChar32 cp, UErrorCode& status);
+ bool hasEmptyCurrencySymbol() const;
+
private:
// NOTE: The following field may be unsafe to access after construction is done!
const AffixTokenMatcherSetupData* fSetupData;
@@ -204,10 +206,12 @@ class AffixMatcherWarehouse {
UErrorCode& status);
private:
- // 9 is the limit: positive, zero, and negative, each with prefix, suffix, and prefix+suffix
- AffixMatcher fAffixMatchers[9];
- // 6 is the limit: positive, zero, and negative, a prefix and a suffix for each
- AffixPatternMatcher fAffixPatternMatchers[6];
+ // 18 is the limit: positive, zero, and negative, each with prefix, suffix, and prefix+suffix,
+ // and doubled since there may be an empty currency symbol
+ AffixMatcher fAffixMatchers[18];
+ // 6 is the limit: positive, zero, and negative, a prefix and a suffix for each,
+ // and doubled since there may be an empty currency symbol
+ AffixPatternMatcher fAffixPatternMatchers[12];
// Reference to the warehouse for tokens used by the AffixPatternMatchers
AffixTokenMatcherWarehouse* fTokenWarehouse;
diff --git a/contrib/libs/icu/i18n/numparse_currency.h b/contrib/libs/icu/i18n/numparse_currency.h
index a94943312fd..4e99334a31b 100644
--- a/contrib/libs/icu/i18n/numparse_currency.h
+++ b/contrib/libs/icu/i18n/numparse_currency.h
@@ -44,7 +44,7 @@ class U_I18N_API CombinedCurrencyMatcher : public NumberParseMatcher, public UMe
UnicodeString toString() const override;
private:
- UChar fCurrencyCode[4];
+ char16_t fCurrencyCode[4];
UnicodeString fCurrency1;
UnicodeString fCurrency2;
diff --git a/contrib/libs/icu/i18n/numparse_types.h b/contrib/libs/icu/i18n/numparse_types.h
index 623f0e80f16..8e881793fd3 100644
--- a/contrib/libs/icu/i18n/numparse_types.h
+++ b/contrib/libs/icu/i18n/numparse_types.h
@@ -67,7 +67,7 @@ class CompactUnicodeString {
CompactUnicodeString(const UnicodeString& text, UErrorCode& status)
: fBuffer(text.length() + 1, status) {
if (U_FAILURE(status)) { return; }
- uprv_memcpy(fBuffer.getAlias(), text.getBuffer(), sizeof(UChar) * text.length());
+ uprv_memcpy(fBuffer.getAlias(), text.getBuffer(), sizeof(char16_t) * text.length());
fBuffer[text.length()] = 0;
}
@@ -81,7 +81,7 @@ class CompactUnicodeString {
}
private:
- MaybeStackArray<UChar, stackCapacity> fBuffer;
+ MaybeStackArray<char16_t, stackCapacity> fBuffer;
};
@@ -125,7 +125,7 @@ class U_I18N_API ParsedNumber {
/**
* The currency that got consumed.
*/
- UChar currencyCode[4];
+ char16_t currencyCode[4];
ParsedNumber();
diff --git a/contrib/libs/icu/i18n/numparse_utils.h b/contrib/libs/icu/i18n/numparse_utils.h
index 162954bae09..8fda4f4369b 100644
--- a/contrib/libs/icu/i18n/numparse_utils.h
+++ b/contrib/libs/icu/i18n/numparse_utils.h
@@ -28,8 +28,8 @@ inline static void putLeadCodePoint(const UnicodeString& input, UnicodeSet* outp
}
}
-inline static void copyCurrencyCode(UChar* dest, const UChar* src) {
- uprv_memcpy(dest, src, sizeof(UChar) * 3);
+inline static void copyCurrencyCode(char16_t* dest, const char16_t* src) {
+ uprv_memcpy(dest, src, sizeof(char16_t) * 3);
dest[3] = 0;
}
diff --git a/contrib/libs/icu/i18n/numparse_validators.h b/contrib/libs/icu/i18n/numparse_validators.h
index 5d43b779d0b..9bb4b482b55 100644
--- a/contrib/libs/icu/i18n/numparse_validators.h
+++ b/contrib/libs/icu/i18n/numparse_validators.h
@@ -16,33 +16,33 @@ namespace impl {
class ValidationMatcher : public NumberParseMatcher {
public:
- bool match(StringSegment&, ParsedNumber&, UErrorCode&) const U_OVERRIDE {
+ bool match(StringSegment&, ParsedNumber&, UErrorCode&) const override {
// No-op
return false;
}
- bool smokeTest(const StringSegment&) const U_OVERRIDE {
+ bool smokeTest(const StringSegment&) const override {
// No-op
return false;
}
- void postProcess(ParsedNumber& result) const U_OVERRIDE = 0;
+ void postProcess(ParsedNumber& result) const override = 0;
};
class RequireAffixValidator : public ValidationMatcher, public UMemory {
public:
- void postProcess(ParsedNumber& result) const U_OVERRIDE;
+ void postProcess(ParsedNumber& result) const override;
- UnicodeString toString() const U_OVERRIDE;
+ UnicodeString toString() const override;
};
class RequireCurrencyValidator : public ValidationMatcher, public UMemory {
public:
- void postProcess(ParsedNumber& result) const U_OVERRIDE;
+ void postProcess(ParsedNumber& result) const override;
- UnicodeString toString() const U_OVERRIDE;
+ UnicodeString toString() const override;
};
@@ -52,9 +52,9 @@ class RequireDecimalSeparatorValidator : public ValidationMatcher, public UMemor
RequireDecimalSeparatorValidator(bool patternHasDecimalSeparator);
- void postProcess(ParsedNumber& result) const U_OVERRIDE;
+ void postProcess(ParsedNumber& result) const override;
- UnicodeString toString() const U_OVERRIDE;
+ UnicodeString toString() const override;
private:
bool fPatternHasDecimalSeparator;
@@ -63,9 +63,9 @@ class RequireDecimalSeparatorValidator : public ValidationMatcher, public UMemor
class RequireNumberValidator : public ValidationMatcher, public UMemory {
public:
- void postProcess(ParsedNumber& result) const U_OVERRIDE;
+ void postProcess(ParsedNumber& result) const override;
- UnicodeString toString() const U_OVERRIDE;
+ UnicodeString toString() const override;
};
@@ -78,9 +78,9 @@ class MultiplierParseHandler : public ValidationMatcher, public UMemory {
MultiplierParseHandler(::icu::number::Scale multiplier);
- void postProcess(ParsedNumber& result) const U_OVERRIDE;
+ void postProcess(ParsedNumber& result) const override;
- UnicodeString toString() const U_OVERRIDE;
+ UnicodeString toString() const override;
private:
::icu::number::Scale fMultiplier;
diff --git a/contrib/libs/icu/i18n/numrange_capi.cpp b/contrib/libs/icu/i18n/numrange_capi.cpp
index bd3a9ef5e82..9222969eb49 100644
--- a/contrib/libs/icu/i18n/numrange_capi.cpp
+++ b/contrib/libs/icu/i18n/numrange_capi.cpp
@@ -83,7 +83,7 @@ const UFormattedNumberRangeData* number::impl::validateUFormattedNumberRange(
U_CAPI UNumberRangeFormatter* U_EXPORT2
unumrf_openForSkeletonWithCollapseAndIdentityFallback(
- const UChar* skeleton,
+ const char16_t* skeleton,
int32_t skeletonLen,
UNumberRangeCollapse collapse,
UNumberRangeIdentityFallback identityFallback,
@@ -97,8 +97,9 @@ unumrf_openForSkeletonWithCollapseAndIdentityFallback(
}
// Readonly-alias constructor (first argument is whether we are NUL-terminated)
UnicodeString skeletonString(skeletonLen == -1, skeleton, skeletonLen);
+ UParseError tempParseError;
impl->fFormatter = NumberRangeFormatter::withLocale(locale)
- .numberFormatterBoth(NumberFormatter::forSkeleton(skeletonString, *perror, *ec))
+ .numberFormatterBoth(NumberFormatter::forSkeleton(skeletonString, (perror == nullptr) ? tempParseError : *perror, *ec))
.collapse(collapse)
.identityFallback(identityFallback);
return impl->exportForC();
diff --git a/contrib/libs/icu/i18n/numrange_fluent.cpp b/contrib/libs/icu/i18n/numrange_fluent.cpp
index f1060b3c21d..0944f3024ff 100644
--- a/contrib/libs/icu/i18n/numrange_fluent.cpp
+++ b/contrib/libs/icu/i18n/numrange_fluent.cpp
@@ -204,10 +204,10 @@ UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(const NFS<UNF>&
}
// Make default copy constructor call the NumberRangeFormatterSettings copy constructor.
-UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(UNF&& src) U_NOEXCEPT
+UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(UNF&& src) noexcept
: UNF(static_cast<NFS<UNF>&&>(src)) {}
-UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(NFS<UNF>&& src) U_NOEXCEPT
+UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(NFS<UNF>&& src) noexcept
: NFS<UNF>(std::move(src)) {
// No additional fields to assign
}
@@ -218,7 +218,7 @@ UnlocalizedNumberRangeFormatter& UnlocalizedNumberRangeFormatter::operator=(cons
return *this;
}
-UnlocalizedNumberRangeFormatter& UnlocalizedNumberRangeFormatter::operator=(UNF&& src) U_NOEXCEPT {
+UnlocalizedNumberRangeFormatter& UnlocalizedNumberRangeFormatter::operator=(UNF&& src) noexcept {
NFS<UNF>::operator=(static_cast<NFS<UNF>&&>(src));
// No additional fields to assign
return *this;
@@ -233,10 +233,10 @@ LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(const NFS<LNF>& oth
// No additional fields to assign
}
-LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(LocalizedNumberRangeFormatter&& src) U_NOEXCEPT
+LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(LocalizedNumberRangeFormatter&& src) noexcept
: LNF(static_cast<NFS<LNF>&&>(src)) {}
-LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(NFS<LNF>&& src) U_NOEXCEPT
+LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(NFS<LNF>&& src) noexcept
: NFS<LNF>(std::move(src)) {
// Steal the compiled formatter
LNF&& _src = static_cast<LNF&&>(src);
@@ -252,7 +252,7 @@ LocalizedNumberRangeFormatter& LocalizedNumberRangeFormatter::operator=(const LN
return *this;
}
-LocalizedNumberRangeFormatter& LocalizedNumberRangeFormatter::operator=(LNF&& src) U_NOEXCEPT {
+LocalizedNumberRangeFormatter& LocalizedNumberRangeFormatter::operator=(LNF&& src) noexcept {
NFS<LNF>::operator=(static_cast<NFS<LNF>&&>(src));
// Steal the compiled formatter
auto* stolen = src.fAtomicFormatter.exchange(nullptr);
@@ -354,6 +354,7 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const {
// Try computing the formatter on our own
auto* temp = new NumberRangeFormatterImpl(fMacros, status);
if (U_FAILURE(status)) {
+ delete temp;
return nullptr;
}
if (temp == nullptr) {
diff --git a/contrib/libs/icu/i18n/numrange_impl.cpp b/contrib/libs/icu/i18n/numrange_impl.cpp
index 3c440c193c7..002a8b2a210 100644
--- a/contrib/libs/icu/i18n/numrange_impl.cpp
+++ b/contrib/libs/icu/i18n/numrange_impl.cpp
@@ -38,7 +38,7 @@ class NumberRangeDataSink : public ResourceSink {
public:
NumberRangeDataSink(NumberRangeData& data) : fData(data) {}
- void put(const char* key, ResourceValue& value, UBool /*noFallback*/, UErrorCode& status) U_OVERRIDE {
+ void put(const char* key, ResourceValue& value, UBool /*noFallback*/, UErrorCode& status) override {
ResourceTable miscTable = value.getTable(status);
if (U_FAILURE(status)) { return; }
for (int i = 0; miscTable.getKeyAndValue(i, key, value); i++) {
@@ -92,7 +92,7 @@ class NumberRangeDataSink : public ResourceSink {
void getNumberRangeData(const char* localeName, const char* nsName, NumberRangeData& data, UErrorCode& status) {
if (U_FAILURE(status)) { return; }
- LocalUResourceBundlePointer rb(ures_open(NULL, localeName, &status));
+ LocalUResourceBundlePointer rb(ures_open(nullptr, localeName, &status));
if (U_FAILURE(status)) { return; }
NumberRangeDataSink sink(data);
@@ -130,7 +130,7 @@ NumberRangeFormatterImpl::NumberRangeFormatterImpl(const RangeMacroProps& macros
fApproximatelyFormatter(status) {
const char* nsName = formatterImpl1.getRawMicroProps().nsName;
- if (uprv_strcmp(nsName, formatterImpl2.getRawMicroProps().nsName) != 0) {
+ if (!fSameFormatters && uprv_strcmp(nsName, formatterImpl2.getRawMicroProps().nsName) != 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -239,7 +239,7 @@ void NumberRangeFormatterImpl::formatSingleValue(UFormattedNumberRangeData& data
UErrorCode& status) const {
if (U_FAILURE(status)) { return; }
if (fSameFormatters) {
- int32_t length = NumberFormatterImpl::writeNumber(micros1, data.quantity1, data.getStringRef(), 0, status);
+ int32_t length = NumberFormatterImpl::writeNumber(micros1.simple, data.quantity1, data.getStringRef(), 0, status);
NumberFormatterImpl::writeAffixes(micros1, data.getStringRef(), 0, length, status);
} else {
formatRange(data, micros1, micros2, status);
@@ -256,7 +256,7 @@ void NumberRangeFormatterImpl::formatApproximately (UFormattedNumberRangeData& d
MicroProps microsAppx;
data.quantity1.resetExponent();
fApproximatelyFormatter.preProcess(data.quantity1, microsAppx, status);
- int32_t length = NumberFormatterImpl::writeNumber(microsAppx, data.quantity1, data.getStringRef(), 0, status);
+ int32_t length = NumberFormatterImpl::writeNumber(microsAppx.simple, data.quantity1, data.getStringRef(), 0, status);
length += microsAppx.modInner->apply(data.getStringRef(), 0, length, status);
length += microsAppx.modMiddle->apply(data.getStringRef(), 0, length, status);
microsAppx.modOuter->apply(data.getStringRef(), 0, length, status);
@@ -384,10 +384,10 @@ void NumberRangeFormatterImpl::formatRange(UFormattedNumberRangeData& data,
}
}
- length1 += NumberFormatterImpl::writeNumber(micros1, data.quantity1, string, UPRV_INDEX_0, status);
+ length1 += NumberFormatterImpl::writeNumber(micros1.simple, data.quantity1, string, UPRV_INDEX_0, status);
// ICU-21684: Write the second number to a temp string to avoid repeated insert operations
FormattedStringBuilder tempString;
- NumberFormatterImpl::writeNumber(micros2, data.quantity2, tempString, 0, status);
+ NumberFormatterImpl::writeNumber(micros2.simple, data.quantity2, tempString, 0, status);
length2 += string.insert(UPRV_INDEX_2, tempString, status);
// TODO: Support padding?
diff --git a/contrib/libs/icu/i18n/numsys.cpp b/contrib/libs/icu/i18n/numsys.cpp
index 44aaf8e2a5f..0d5c43e4b27 100644
--- a/contrib/libs/icu/i18n/numsys.cpp
+++ b/contrib/libs/icu/i18n/numsys.cpp
@@ -61,7 +61,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NumsysNameEnumeration)
NumberingSystem::NumberingSystem() {
radix = 10;
- algorithmic = FALSE;
+ algorithmic = false;
UnicodeString defaultDigits = DEFAULT_DIGITS;
desc.setTo(defaultDigits);
uprv_strcpy(name,gLatn);
@@ -116,8 +116,8 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) {
return nullptr;
}
- UBool nsResolved = TRUE;
- UBool usingFallback = FALSE;
+ UBool nsResolved = true;
+ UBool usingFallback = false;
char buffer[ULOC_KEYWORDS_CAPACITY] = "";
int32_t count = inLocale.getKeywordValue("numbers", buffer, sizeof(buffer), status);
if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) {
@@ -130,11 +130,11 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) {
buffer[count] = '\0'; // Make sure it is null terminated.
if ( !uprv_strcmp(buffer,gDefault) || !uprv_strcmp(buffer,gNative) ||
!uprv_strcmp(buffer,gTraditional) || !uprv_strcmp(buffer,gFinance)) {
- nsResolved = FALSE;
+ nsResolved = false;
}
} else {
uprv_strcpy(buffer, gDefault);
- nsResolved = FALSE;
+ nsResolved = false;
}
if (!nsResolved) { // Resolve the numbering system ( default, native, traditional or finance ) into a "real" numbering system
@@ -149,7 +149,7 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) {
while (!nsResolved) {
localStatus = U_ZERO_ERROR;
count = 0;
- const UChar *nsName = ures_getStringByKeyWithFallback(numberElementsRes.getAlias(), buffer, &count, &localStatus);
+ const char16_t *nsName = ures_getStringByKeyWithFallback(numberElementsRes.getAlias(), buffer, &count, &localStatus);
// Don't stomp on the catastrophic failure of OOM.
if (localStatus == U_MEMORY_ALLOCATION_ERROR) {
status = U_MEMORY_ALLOCATION_ERROR;
@@ -158,7 +158,7 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) {
if ( count > 0 && count < ULOC_KEYWORDS_CAPACITY ) { // numbering system found
u_UCharsToChars(nsName, buffer, count);
buffer[count] = '\0'; // Make sure it is null terminated.
- nsResolved = TRUE;
+ nsResolved = true;
}
if (!nsResolved) { // Fallback behavior per TR35 - traditional falls back to native, finance and native fall back to default
@@ -167,8 +167,8 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) {
} else if (!uprv_strcmp(buffer,gTraditional)) {
uprv_strcpy(buffer,gNative);
} else { // If we get here we couldn't find even the default numbering system
- usingFallback = TRUE;
- nsResolved = TRUE;
+ usingFallback = true;
+ nsResolved = true;
}
}
}
@@ -271,7 +271,7 @@ UBool NumberingSystem::isAlgorithmic() const {
namespace {
UVector* gNumsysNames = nullptr;
-UInitOnce gNumSysInitOnce = U_INITONCE_INITIALIZER;
+UInitOnce gNumSysInitOnce {};
U_CFUNC UBool U_CALLCONV numSysCleanup() {
delete gNumsysNames;
@@ -313,12 +313,7 @@ U_CFUNC void initNumsysNames(UErrorCode &status) {
}
const char *nsName = ures_getKey(nsCurrent.getAlias());
LocalPointer<UnicodeString> newElem(new UnicodeString(nsName, -1, US_INV), status);
- if (U_SUCCESS(status)) {
- numsysNames->addElementX(newElem.getAlias(), status);
- if (U_SUCCESS(status)) {
- newElem.orphan(); // on success, the numsysNames vector owns newElem.
- }
- }
+ numsysNames->adoptElement(newElem.orphan(), status);
}
ures_close(numberingSystemsInfo);
diff --git a/contrib/libs/icu/i18n/numsys_impl.h b/contrib/libs/icu/i18n/numsys_impl.h
index e76e634dd23..42cf102a131 100644
--- a/contrib/libs/icu/i18n/numsys_impl.h
+++ b/contrib/libs/icu/i18n/numsys_impl.h
@@ -29,8 +29,8 @@ public:
NumsysNameEnumeration(UErrorCode& status);
virtual ~NumsysNameEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
diff --git a/contrib/libs/icu/i18n/olsontz.cpp b/contrib/libs/icu/i18n/olsontz.cpp
index cae471a5a25..260e345d795 100644
--- a/contrib/libs/icu/i18n/olsontz.cpp
+++ b/contrib/libs/icu/i18n/olsontz.cpp
@@ -52,14 +52,14 @@ static void debug_tz_msg(const char *pat, ...)
#endif
static UBool arrayEqual(const void *a1, const void *a2, int32_t size) {
- if (a1 == NULL && a2 == NULL) {
- return TRUE;
+ if (a1 == nullptr && a2 == nullptr) {
+ return true;
}
- if ((a1 != NULL && a2 == NULL) || (a1 == NULL && a2 != NULL)) {
- return FALSE;
+ if ((a1 != nullptr && a2 == nullptr) || (a1 == nullptr && a2 != nullptr)) {
+ return false;
}
if (a1 == a2) {
- return TRUE;
+ return true;
}
return (uprv_memcmp(a1, a2, size) == 0);
@@ -87,7 +87,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OlsonTimeZone)
* Default constructor. Creates a time zone with an empty ID and
* a fixed GMT offset of zero.
*/
-/*OlsonTimeZone::OlsonTimeZone() : finalYear(INT32_MAX), finalMillis(DBL_MAX), finalZone(0), transitionRulesInitialized(FALSE) {
+/*OlsonTimeZone::OlsonTimeZone() : finalYear(INT32_MAX), finalMillis(DBL_MAX), finalZone(0), transitionRulesInitialized(false) {
clearTransitionRules();
constructEmpty();
}*/
@@ -97,17 +97,17 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OlsonTimeZone)
* constructor fails so the resultant object is well-behaved.
*/
void OlsonTimeZone::constructEmpty() {
- canonicalID = NULL;
+ canonicalID = nullptr;
transitionCountPre32 = transitionCount32 = transitionCountPost32 = 0;
- transitionTimesPre32 = transitionTimes32 = transitionTimesPost32 = NULL;
+ transitionTimesPre32 = transitionTimes32 = transitionTimesPost32 = nullptr;
- typeMapData = NULL;
+ typeMapData = nullptr;
typeCount = 1;
typeOffsets = ZEROS;
- finalZone = NULL;
+ finalZone = nullptr;
}
/**
@@ -121,11 +121,11 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
const UResourceBundle* res,
const UnicodeString& tzid,
UErrorCode& ec) :
- BasicTimeZone(tzid), finalZone(NULL)
+ BasicTimeZone(tzid), finalZone(nullptr)
{
clearTransitionRules();
U_DEBUG_TZ_MSG(("OlsonTimeZone(%s)\n", ures_getKey((UResourceBundle*)res)));
- if ((top == NULL || res == NULL) && U_SUCCESS(ec)) {
+ if ((top == nullptr || res == nullptr) && U_SUCCESS(ec)) {
ec = U_ILLEGAL_ARGUMENT_ERROR;
}
if (U_SUCCESS(ec)) {
@@ -142,7 +142,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
transitionCountPre32 = static_cast<int16_t>(len >> 1);
if (ec == U_MISSING_RESOURCE_ERROR) {
// No pre-32bit transitions
- transitionTimesPre32 = NULL;
+ transitionTimesPre32 = nullptr;
transitionCountPre32 = 0;
ec = U_ZERO_ERROR;
} else if (U_SUCCESS(ec) && (len < 0 || len > 0x7FFF || (len & 1) != 0) /* len must be even */) {
@@ -155,7 +155,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
transitionCount32 = static_cast<int16_t>(len);
if (ec == U_MISSING_RESOURCE_ERROR) {
// No 32bit transitions
- transitionTimes32 = NULL;
+ transitionTimes32 = nullptr;
transitionCount32 = 0;
ec = U_ZERO_ERROR;
} else if (U_SUCCESS(ec) && (len < 0 || len > 0x7FFF)) {
@@ -168,7 +168,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
transitionCountPost32 = static_cast<int16_t>(len >> 1);
if (ec == U_MISSING_RESOURCE_ERROR) {
// No pre-32bit transitions
- transitionTimesPost32 = NULL;
+ transitionTimesPost32 = nullptr;
transitionCountPost32 = 0;
ec = U_ZERO_ERROR;
} else if (U_SUCCESS(ec) && (len < 0 || len > 0x7FFF || (len & 1) != 0) /* len must be even */) {
@@ -184,7 +184,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
typeCount = (int16_t) len >> 1;
// Type map data must be of the same size as the transition count
- typeMapData = NULL;
+ typeMapData = nullptr;
if (transitionCount() > 0) {
ures_getByKey(res, kTYPEMAP, r.getAlias(), &ec);
typeMapData = ures_getBinary(r.getAlias(), &len, &ec);
@@ -198,14 +198,14 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
// Process final rule and data, if any
if (U_SUCCESS(ec)) {
- const UChar *ruleIdUStr = ures_getStringByKey(res, kFINALRULE, &len, &ec);
+ const char16_t *ruleIdUStr = ures_getStringByKey(res, kFINALRULE, &len, &ec);
ures_getByKey(res, kFINALRAW, r.getAlias(), &ec);
int32_t ruleRaw = ures_getInt(r.getAlias(), &ec);
ures_getByKey(res, kFINALYEAR, r.getAlias(), &ec);
int32_t ruleYear = ures_getInt(r.getAlias(), &ec);
if (U_SUCCESS(ec)) {
- UnicodeString ruleID(TRUE, ruleIdUStr, len);
- UResourceBundle *rule = TimeZone::loadRule(top, ruleID, NULL, ec);
+ UnicodeString ruleID(true, ruleIdUStr, len);
+ UResourceBundle *rule = TimeZone::loadRule(top, ruleID, nullptr, ec);
const int32_t *ruleData = ures_getIntVector(rule, &len, &ec);
if (U_SUCCESS(ec) && len == 11) {
UnicodeString emptyStr;
@@ -219,7 +219,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top,
ruleData[8] * U_MILLIS_PER_SECOND,
(SimpleTimeZone::TimeMode) ruleData[9],
ruleData[10] * U_MILLIS_PER_SECOND, ec);
- if (finalZone == NULL) {
+ if (finalZone == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
} else {
finalStartYear = ruleYear;
@@ -373,7 +373,7 @@ int32_t OlsonTimeZone::getOffset(uint8_t era, int32_t year, int32_t month,
year = -year;
}
- if (finalZone != NULL && year >= finalStartYear) {
+ if (finalZone != nullptr && year >= finalStartYear) {
return finalZone->getOffset(era, year, month, dom, dow,
millis, monthLength, ec);
}
@@ -381,7 +381,7 @@ int32_t OlsonTimeZone::getOffset(uint8_t era, int32_t year, int32_t month,
// Compute local epoch millis from input fields
UDate date = (UDate)(Grego::fieldsToDay(year, month, dom) * U_MILLIS_PER_DAY + millis);
int32_t rawoff, dstoff;
- getHistoricalOffset(date, TRUE, kDaylight, kStandard, rawoff, dstoff);
+ getHistoricalOffset(date, true, kDaylight, kStandard, rawoff, dstoff);
return rawoff + dstoff;
}
@@ -393,7 +393,7 @@ void OlsonTimeZone::getOffset(UDate date, UBool local, int32_t& rawoff,
if (U_FAILURE(ec)) {
return;
}
- if (finalZone != NULL && date >= finalStartMillis) {
+ if (finalZone != nullptr && date >= finalStartMillis) {
finalZone->getOffset(date, local, rawoff, dstoff, ec);
} else {
getHistoricalOffset(date, local, kFormer, kLatter, rawoff, dstoff);
@@ -406,10 +406,10 @@ void OlsonTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExist
if (U_FAILURE(ec)) {
return;
}
- if (finalZone != NULL && date >= finalStartMillis) {
+ if (finalZone != nullptr && date >= finalStartMillis) {
finalZone->getOffsetFromLocal(date, nonExistingTimeOpt, duplicatedTimeOpt, rawoff, dstoff, ec);
} else {
- getHistoricalOffset(date, TRUE, nonExistingTimeOpt, duplicatedTimeOpt, rawoff, dstoff);
+ getHistoricalOffset(date, true, nonExistingTimeOpt, duplicatedTimeOpt, rawoff, dstoff);
}
}
@@ -430,8 +430,7 @@ void OlsonTimeZone::setRawOffset(int32_t /*offsetMillis*/) {
int32_t OlsonTimeZone::getRawOffset() const {
UErrorCode ec = U_ZERO_ERROR;
int32_t raw, dst;
- getOffset((double) uprv_getUTCtime() * U_MILLIS_PER_SECOND,
- FALSE, raw, dst, ec);
+ getOffset(uprv_getUTCtime(), false, raw, dst, ec);
return raw;
}
@@ -560,12 +559,12 @@ OlsonTimeZone::getHistoricalOffset(UDate date, UBool local,
UBool OlsonTimeZone::useDaylightTime() const {
// If DST was observed in 1942 (for example) but has never been
// observed from 1943 to the present, most clients will expect
- // this method to return FALSE. This method determines whether
+ // this method to return false. This method determines whether
// DST is in use in the current year (at any point in the year)
- // and returns TRUE if so.
+ // and returns true if so.
UDate current = uprv_getUTCtime();
- if (finalZone != NULL && current >= finalStartMillis) {
+ if (finalZone != nullptr && current >= finalStartMillis) {
return finalZone->useDaylightTime();
}
@@ -576,7 +575,7 @@ UBool OlsonTimeZone::useDaylightTime() const {
double start = Grego::fieldsToDay(year, 0, 1) * SECONDS_PER_DAY;
double limit = Grego::fieldsToDay(year+1, 0, 1) * SECONDS_PER_DAY;
- // Return TRUE if DST is observed at any time during the current
+ // Return true if DST is observed at any time during the current
// year.
for (int16_t i = 0; i < transitionCount(); ++i) {
double transition = (double)transitionTimeInSeconds(i);
@@ -585,14 +584,14 @@ UBool OlsonTimeZone::useDaylightTime() const {
}
if ((transition >= start && dstOffsetAt(i) != 0)
|| (transition > start && dstOffsetAt(i - 1) != 0)) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
int32_t
OlsonTimeZone::getDSTSavings() const{
- if (finalZone != NULL){
+ if (finalZone != nullptr){
return finalZone->getDSTSavings();
}
return TimeZone::getDSTSavings();
@@ -602,45 +601,45 @@ OlsonTimeZone::getDSTSavings() const{
*/
UBool OlsonTimeZone::inDaylightTime(UDate date, UErrorCode& ec) const {
int32_t raw, dst;
- getOffset(date, FALSE, raw, dst, ec);
+ getOffset(date, false, raw, dst, ec);
return dst != 0;
}
UBool
OlsonTimeZone::hasSameRules(const TimeZone &other) const {
if (this == &other) {
- return TRUE;
+ return true;
}
const OlsonTimeZone* z = dynamic_cast<const OlsonTimeZone*>(&other);
- if (z == NULL) {
- return FALSE;
+ if (z == nullptr) {
+ return false;
}
// [sic] pointer comparison: typeMapData points into
// memory-mapped or DLL space, so if two zones have the same
// pointer, they are equal.
if (typeMapData == z->typeMapData) {
- return TRUE;
+ return true;
}
// If the pointers are not equal, the zones may still
// be equal if their rules and transitions are equal
- if ((finalZone == NULL && z->finalZone != NULL)
- || (finalZone != NULL && z->finalZone == NULL)
- || (finalZone != NULL && z->finalZone != NULL && *finalZone != *z->finalZone)) {
- return FALSE;
+ if ((finalZone == nullptr && z->finalZone != nullptr)
+ || (finalZone != nullptr && z->finalZone == nullptr)
+ || (finalZone != nullptr && z->finalZone != nullptr && *finalZone != *z->finalZone)) {
+ return false;
}
- if (finalZone != NULL) {
+ if (finalZone != nullptr) {
if (finalStartYear != z->finalStartYear || finalStartMillis != z->finalStartMillis) {
- return FALSE;
+ return false;
}
}
if (typeCount != z->typeCount
|| transitionCountPre32 != z->transitionCountPre32
|| transitionCount32 != z->transitionCount32
|| transitionCountPost32 != z->transitionCountPost32) {
- return FALSE;
+ return false;
}
return
@@ -652,34 +651,34 @@ OlsonTimeZone::hasSameRules(const TimeZone &other) const {
}
void
-OlsonTimeZone::clearTransitionRules(void) {
- initialRule = NULL;
- firstTZTransition = NULL;
- firstFinalTZTransition = NULL;
- historicRules = NULL;
+OlsonTimeZone::clearTransitionRules() {
+ initialRule = nullptr;
+ firstTZTransition = nullptr;
+ firstFinalTZTransition = nullptr;
+ historicRules = nullptr;
historicRuleCount = 0;
- finalZoneWithStartYear = NULL;
+ finalZoneWithStartYear = nullptr;
firstTZTransitionIdx = 0;
transitionRulesInitOnce.reset();
}
void
-OlsonTimeZone::deleteTransitionRules(void) {
- if (initialRule != NULL) {
+OlsonTimeZone::deleteTransitionRules() {
+ if (initialRule != nullptr) {
delete initialRule;
}
- if (firstTZTransition != NULL) {
+ if (firstTZTransition != nullptr) {
delete firstTZTransition;
}
- if (firstFinalTZTransition != NULL) {
+ if (firstFinalTZTransition != nullptr) {
delete firstFinalTZTransition;
}
- if (finalZoneWithStartYear != NULL) {
+ if (finalZoneWithStartYear != nullptr) {
delete finalZoneWithStartYear;
}
- if (historicRules != NULL) {
+ if (historicRules != nullptr) {
for (int i = 0; i < historicRuleCount; i++) {
- if (historicRules[i] != NULL) {
+ if (historicRules[i] != nullptr) {
delete historicRules[i];
}
}
@@ -721,7 +720,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
dst = initialDstOffset() * U_MILLIS_PER_SECOND;
initialRule = new InitialTimeZoneRule((dst == 0 ? stdName : dstName), raw, dst);
// Check to make sure initialRule was created
- if (initialRule == NULL) {
+ if (initialRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -746,7 +745,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
} else {
// Build historic rule array
UDate* times = (UDate*)uprv_malloc(sizeof(UDate)*transCount); /* large enough to store all transition times */
- if (times == NULL) {
+ if (times == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -757,7 +756,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
for (transitionIdx = firstTZTransitionIdx; transitionIdx < transCount; transitionIdx++) {
if (typeIdx == (int16_t)typeMapData[transitionIdx]) {
UDate tt = (UDate)transitionTime(transitionIdx);
- if (finalZone == NULL || tt <= finalStartMillis) {
+ if (finalZone == nullptr || tt <= finalStartMillis) {
// Exclude transitions after finalMillis
times[nTimes++] = tt;
}
@@ -767,24 +766,24 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
// Create a TimeArrayTimeZoneRule
raw = typeOffsets[typeIdx << 1] * U_MILLIS_PER_SECOND;
dst = typeOffsets[(typeIdx << 1) + 1] * U_MILLIS_PER_SECOND;
- if (historicRules == NULL) {
+ if (historicRules == nullptr) {
historicRuleCount = typeCount;
historicRules = (TimeArrayTimeZoneRule**)uprv_malloc(sizeof(TimeArrayTimeZoneRule*)*historicRuleCount);
- if (historicRules == NULL) {
+ if (historicRules == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
uprv_free(times);
return;
}
for (int i = 0; i < historicRuleCount; i++) {
- // Initialize TimeArrayTimeZoneRule pointers as NULL
- historicRules[i] = NULL;
+ // Initialize TimeArrayTimeZoneRule pointers as nullptr
+ historicRules[i] = nullptr;
}
}
historicRules[typeIdx] = new TimeArrayTimeZoneRule((dst == 0 ? stdName : dstName),
raw, dst, times, nTimes, DateTimeRule::UTC_TIME);
// Check for memory allocation error
- if (historicRules[typeIdx] == NULL) {
+ if (historicRules[typeIdx] == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -798,17 +797,17 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
firstTZTransition = new TimeZoneTransition((UDate)transitionTime(firstTZTransitionIdx),
*initialRule, *historicRules[typeIdx]);
// Check to make sure firstTZTransition was created.
- if (firstTZTransition == NULL) {
+ if (firstTZTransition == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
}
}
}
- if (finalZone != NULL) {
+ if (finalZone != nullptr) {
// Get the first occurrence of final rule starts
UDate startTime = (UDate)finalStartMillis;
- TimeZoneRule *firstFinalRule = NULL;
+ TimeZoneRule *firstFinalRule = nullptr;
if (finalZone->useDaylightTime()) {
/*
@@ -820,7 +819,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
*/
finalZoneWithStartYear = finalZone->clone();
// Check to make sure finalZone was actually cloned.
- if (finalZoneWithStartYear == NULL) {
+ if (finalZoneWithStartYear == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -831,7 +830,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
finalZoneWithStartYear->getNextTransition(startTime, false, tzt);
firstFinalRule = tzt.getTo()->clone();
// Check to make sure firstFinalRule received proper clone.
- if (firstFinalRule == NULL) {
+ if (firstFinalRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -841,7 +840,7 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
// final rule with no transitions
finalZoneWithStartYear = finalZone->clone();
// Check to make sure finalZone was actually cloned.
- if (finalZoneWithStartYear == NULL) {
+ if (finalZoneWithStartYear == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -850,23 +849,23 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
firstFinalRule = new TimeArrayTimeZoneRule(tzid,
finalZone->getRawOffset(), 0, &startTime, 1, DateTimeRule::UTC_TIME);
// Check firstFinalRule was properly created.
- if (firstFinalRule == NULL) {
+ if (firstFinalRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
}
}
- TimeZoneRule *prevRule = NULL;
+ TimeZoneRule *prevRule = nullptr;
if (transCount > 0) {
prevRule = historicRules[typeMapData[transCount - 1]];
}
- if (prevRule == NULL) {
+ if (prevRule == nullptr) {
// No historic transitions, but only finalZone available
prevRule = initialRule;
}
firstFinalTZTransition = new TimeZoneTransition();
// Check to make sure firstFinalTZTransition was created before dereferencing
- if (firstFinalTZTransition == NULL) {
+ if (firstFinalTZTransition == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -882,24 +881,24 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition
UErrorCode status = U_ZERO_ERROR;
checkTransitionRules(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- if (finalZone != NULL) {
+ if (finalZone != nullptr) {
if (inclusive && base == firstFinalTZTransition->getTime()) {
result = *firstFinalTZTransition;
- return TRUE;
+ return true;
} else if (base >= firstFinalTZTransition->getTime()) {
if (finalZone->useDaylightTime()) {
//return finalZone->getNextTransition(base, inclusive, result);
return finalZoneWithStartYear->getNextTransition(base, inclusive, result);
} else {
// No more transitions
- return FALSE;
+ return false;
}
}
}
- if (historicRules != NULL) {
+ if (historicRules != nullptr) {
// Find a historical transition
int16_t transCount = transitionCount();
int16_t ttidx = transCount - 1;
@@ -910,15 +909,15 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition
}
}
if (ttidx == transCount - 1) {
- if (firstFinalTZTransition != NULL) {
+ if (firstFinalTZTransition != nullptr) {
result = *firstFinalTZTransition;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
} else if (ttidx < firstTZTransitionIdx) {
result = *firstTZTransition;
- return TRUE;
+ return true;
} else {
// Create a TimeZoneTransition
TimeZoneRule *to = historicRules[typeMapData[ttidx + 1]];
@@ -936,10 +935,10 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition
result.setTime(startTime);
result.adoptFrom(from->clone());
result.adoptTo(to->clone());
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
UBool
@@ -947,25 +946,25 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi
UErrorCode status = U_ZERO_ERROR;
checkTransitionRules(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- if (finalZone != NULL) {
+ if (finalZone != nullptr) {
if (inclusive && base == firstFinalTZTransition->getTime()) {
result = *firstFinalTZTransition;
- return TRUE;
+ return true;
} else if (base > firstFinalTZTransition->getTime()) {
if (finalZone->useDaylightTime()) {
//return finalZone->getPreviousTransition(base, inclusive, result);
return finalZoneWithStartYear->getPreviousTransition(base, inclusive, result);
} else {
result = *firstFinalTZTransition;
- return TRUE;
+ return true;
}
}
}
- if (historicRules != NULL) {
+ if (historicRules != nullptr) {
// Find a historical transition
int16_t ttidx = transitionCount() - 1;
for (; ttidx >= firstTZTransitionIdx; ttidx--) {
@@ -976,10 +975,10 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi
}
if (ttidx < firstTZTransitionIdx) {
// No more transitions
- return FALSE;
+ return false;
} else if (ttidx == firstTZTransitionIdx) {
result = *firstTZTransition;
- return TRUE;
+ return true;
} else {
// Create a TimeZoneTransition
TimeZoneRule *to = historicRules[typeMapData[ttidx]];
@@ -997,10 +996,10 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi
result.setTime(startTime);
result.adoptFrom(from->clone());
result.adoptTo(to->clone());
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
int32_t
@@ -1014,16 +1013,16 @@ OlsonTimeZone::countTransitionRules(UErrorCode& status) const {
}
int32_t count = 0;
- if (historicRules != NULL) {
+ if (historicRules != nullptr) {
// historicRules may contain null entries when original zoneinfo data
// includes non transition data.
for (int32_t i = 0; i < historicRuleCount; i++) {
- if (historicRules[i] != NULL) {
+ if (historicRules[i] != nullptr) {
count++;
}
}
}
- if (finalZone != NULL) {
+ if (finalZone != nullptr) {
if (finalZone->useDaylightTime()) {
count += 2;
} else {
@@ -1051,11 +1050,11 @@ OlsonTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial,
// Transition rules
int32_t cnt = 0;
- if (historicRules != NULL && trscount > cnt) {
+ if (historicRules != nullptr && trscount > cnt) {
// historicRules may contain null entries when original zoneinfo data
// includes non transition data.
for (int32_t i = 0; i < historicRuleCount; i++) {
- if (historicRules[i] != NULL) {
+ if (historicRules[i] != nullptr) {
trsrules[cnt++] = historicRules[i];
if (cnt >= trscount) {
break;
@@ -1063,7 +1062,7 @@ OlsonTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial,
}
}
}
- if (finalZoneWithStartYear != NULL && trscount > cnt) {
+ if (finalZoneWithStartYear != nullptr && trscount > cnt) {
const InitialTimeZoneRule *tmpini;
int32_t tmpcnt = trscount - cnt;
finalZoneWithStartYear->getTimeZoneRules(tmpini, &trsrules[cnt], tmpcnt, status);
diff --git a/contrib/libs/icu/i18n/olsontz.h b/contrib/libs/icu/i18n/olsontz.h
index 75d86781edd..9fe0d5dfed1 100644
--- a/contrib/libs/icu/i18n/olsontz.h
+++ b/contrib/libs/icu/i18n/olsontz.h
@@ -263,7 +263,7 @@ class U_I18N_API OlsonTimeZone: public BasicTimeZone {
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
* which represent time transitions for this time zone. On successful return,
- * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and
+ * the argument initial points to non-nullptr <code>InitialTimeZoneRule</code> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code>
* instances up to the size specified by trscount. The results are referencing the
* rule instance held by this time zone instance. Therefore, after this time zone
@@ -282,7 +282,7 @@ class U_I18N_API OlsonTimeZone: public BasicTimeZone {
* Internal API returning the canonical ID of this zone.
* This ID won't be affected by setID().
*/
- const UChar *getCanonicalID() const;
+ const char16_t *getCanonicalID() const;
private:
/**
@@ -328,20 +328,20 @@ private:
/**
* Time of each transition in seconds from 1970 epoch before 32bit second range (<= 1900).
* Each transition in this range is represented by a pair of int32_t.
- * Length is transitionCount int32_t's. NULL if no transitions in this range.
+ * Length is transitionCount int32_t's. nullptr if no transitions in this range.
*/
const int32_t *transitionTimesPre32; // alias into res; do not delete
/**
* Time of each transition in seconds from 1970 epoch in 32bit second range.
- * Length is transitionCount int32_t's. NULL if no transitions in this range.
+ * Length is transitionCount int32_t's. nullptr if no transitions in this range.
*/
const int32_t *transitionTimes32; // alias into res; do not delete
/**
* Time of each transition in seconds from 1970 epoch after 32bit second range (>= 2038).
* Each transition in this range is represented by a pair of int32_t.
- * Length is transitionCount int32_t's. NULL if no transitions in this range.
+ * Length is transitionCount int32_t's. nullptr if no transitions in this range.
*/
const int32_t *transitionTimesPost32; // alias into res; do not delete
@@ -360,14 +360,14 @@ private:
/**
* Type description data, consisting of transitionCount uint8_t
* type indices (from 0..typeCount-1).
- * Length is transitionCount int16_t's. NULL if no transitions.
+ * Length is transitionCount int16_t's. nullptr if no transitions.
*/
const uint8_t *typeMapData; // alias into res; do not delete
/**
* A SimpleTimeZone that governs the behavior for date >= finalMillis.
*/
- SimpleTimeZone *finalZone; // owned, may be NULL
+ SimpleTimeZone *finalZone; // owned, may be nullptr
/**
* For date >= finalMillis, the finalZone will be used.
@@ -382,11 +382,11 @@ private:
/*
* Canonical (CLDR) ID of this zone
*/
- const UChar *canonicalID;
+ const char16_t *canonicalID;
/* BasicTimeZone support */
- void clearTransitionRules(void);
- void deleteTransitionRules(void);
+ void clearTransitionRules();
+ void deleteTransitionRules();
void checkTransitionRules(UErrorCode& status) const;
public: // Internal, for access from plain C code
@@ -400,7 +400,7 @@ private:
TimeArrayTimeZoneRule **historicRules;
int16_t historicRuleCount;
SimpleTimeZone *finalZoneWithStartYear; // hack
- UInitOnce transitionRulesInitOnce = U_INITONCE_INITIALIZER;
+ UInitOnce transitionRulesInitOnce {};
};
inline int16_t
@@ -441,7 +441,7 @@ OlsonTimeZone::initialDstOffset() const {
return typeOffsets[1];
}
-inline const UChar*
+inline const char16_t*
OlsonTimeZone::getCanonicalID() const {
return canonicalID;
}
diff --git a/contrib/libs/icu/i18n/persncal.cpp b/contrib/libs/icu/i18n/persncal.cpp
index d30577f337f..ab13f434348 100644
--- a/contrib/libs/icu/i18n/persncal.cpp
+++ b/contrib/libs/icu/i18n/persncal.cpp
@@ -58,6 +58,7 @@ static const int32_t kPersianCalendarLimits[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // MILLISECONDS_IN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // IS_LEAP_MONTH
+ { 0, 0, 11, 11}, // ORDINAL_MONTH
};
U_NAMESPACE_BEGIN
@@ -110,7 +111,7 @@ int32_t PersianCalendar::handleGetLimit(UCalendarDateFields field, ELimitType li
UBool PersianCalendar::isLeapYear(int32_t year)
{
int32_t remainder;
- ClockMath::floorDivide(25 * year + 11, 33, remainder);
+ ClockMath::floorDivide(25 * year + 11, 33, &remainder);
return (remainder < 8);
}
@@ -119,7 +120,7 @@ UBool PersianCalendar::isLeapYear(int32_t year)
* from the Persian epoch, origin 0.
*/
int32_t PersianCalendar::yearStart(int32_t year) {
- return handleComputeMonthStart(year,0,FALSE);
+ return handleComputeMonthStart(year,0,false);
}
/**
@@ -130,7 +131,7 @@ int32_t PersianCalendar::yearStart(int32_t year) {
* @param year The Persian month, 0-based
*/
int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const {
- return handleComputeMonthStart(year,month,TRUE);
+ return handleComputeMonthStart(year,month,true);
}
//----------------------------------------------------------------------
@@ -147,7 +148,7 @@ int32_t PersianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t mont
// If the month is out of range, adjust it into range, and
// modify the extended year value accordingly.
if (month < 0 || month > 11) {
- extendedYear += ClockMath::floorDivide(month, 12, month);
+ extendedYear += ClockMath::floorDivide(month, 12, &month);
}
return isLeapYear(extendedYear) ? kPersianLeapMonthLength[month] : kPersianMonthLength[month];
@@ -169,7 +170,7 @@ int32_t PersianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U
// 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);
+ eyear += ClockMath::floorDivide(month, 12, &month);
}
int32_t julianDay = PERSIAN_EPOCH - 1 + 365 * (eyear - 1) + ClockMath::floorDivide(8 * eyear + 21, 33);
@@ -229,32 +230,37 @@ void PersianCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*statu
internalSet(UCAL_YEAR, year);
internalSet(UCAL_EXTENDED_YEAR, year);
internalSet(UCAL_MONTH, month);
+ internalSet(UCAL_ORDINAL_MONTH, month);
internalSet(UCAL_DAY_OF_MONTH, dayOfMonth);
internalSet(UCAL_DAY_OF_YEAR, dayOfYear);
}
-UBool
-PersianCalendar::inDaylightTime(UErrorCode& status) const
-{
- // copied from GregorianCalendar
- if (U_FAILURE(status) || !getTimeZone().useDaylightTime())
- return FALSE;
+constexpr uint32_t kPersianRelatedYearDiff = 622;
- // Force an update of the state of the Calendar.
- ((PersianCalendar*)this)->complete(status); // cast away const
+int32_t PersianCalendar::getRelatedYear(UErrorCode &status) const
+{
+ int32_t year = get(UCAL_EXTENDED_YEAR, status);
+ if (U_FAILURE(status)) {
+ return 0;
+ }
+ return year + kPersianRelatedYearDiff;
+}
- return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE);
+void PersianCalendar::setRelatedYear(int32_t year)
+{
+ // set extended year
+ set(UCAL_EXTENDED_YEAR, year - kPersianRelatedYearDiff);
}
// default century
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
UBool PersianCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
static void U_CALLCONV initializeSystemDefaultCentury() {
diff --git a/contrib/libs/icu/i18n/persncal.h b/contrib/libs/icu/i18n/persncal.h
index d0f2ee5ec20..b943321a54d 100644
--- a/contrib/libs/icu/i18n/persncal.h
+++ b/contrib/libs/icu/i18n/persncal.h
@@ -255,7 +255,7 @@ class PersianCalendar : public Calendar {
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -268,7 +268,7 @@ class PersianCalendar : public Calendar {
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "persian".
@@ -278,22 +278,24 @@ class PersianCalendar : public Calendar {
*/
virtual const char * getType() const override;
- private:
- PersianCalendar(); // default constructor not implemented
-
- protected:
+ /**
+ * @return The related Gregorian year; will be obtained by modifying the value
+ * obtained by get from UCAL_EXTENDED_YEAR field
+ * @internal
+ */
+ virtual int32_t getRelatedYear(UErrorCode &status) const override;
/**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
- *
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
+ * @param year The related Gregorian year to set; will be modified as necessary then
+ * set in UCAL_EXTENDED_YEAR field
* @internal
*/
- virtual UBool inDaylightTime(UErrorCode& status) const override;
+ virtual void setRelatedYear(int32_t year) override;
+
+ private:
+ PersianCalendar(); // default constructor not implemented
+ protected:
/**
* Returns true because the Persian Calendar does have a default century
* @internal
diff --git a/contrib/libs/icu/i18n/pluralranges.cpp b/contrib/libs/icu/i18n/pluralranges.cpp
index da10e2117d0..403836f6275 100644
--- a/contrib/libs/icu/i18n/pluralranges.cpp
+++ b/contrib/libs/icu/i18n/pluralranges.cpp
@@ -26,7 +26,7 @@ class PluralRangesDataSink : public ResourceSink {
public:
PluralRangesDataSink(StandardPluralRanges& output) : fOutput(output) {}
- void put(const char* /*key*/, ResourceValue& value, UBool /*noFallback*/, UErrorCode& status) U_OVERRIDE {
+ void put(const char* /*key*/, ResourceValue& value, UBool /*noFallback*/, UErrorCode& status) override {
ResourceArray entriesArray = value.getArray(status);
if (U_FAILURE(status)) { return; }
fOutput.setCapacity(entriesArray.getSize(), status);
@@ -66,7 +66,7 @@ void getPluralRangesData(const Locale& locale, StandardPluralRanges& output, UEr
int32_t setLen;
// Not all languages are covered: fail gracefully
UErrorCode internalStatus = U_ZERO_ERROR;
- const UChar* set = ures_getStringByKeyWithFallback(rb.getAlias(), dataPath.data(), &setLen, &internalStatus);
+ const char16_t* set = ures_getStringByKeyWithFallback(rb.getAlias(), dataPath.data(), &setLen, &internalStatus);
if (U_FAILURE(internalStatus)) { return; }
dataPath.clear();
diff --git a/contrib/libs/icu/i18n/plurfmt.cpp b/contrib/libs/icu/i18n/plurfmt.cpp
index 65e275eeeb7..33a539cd198 100644
--- a/contrib/libs/icu/i18n/plurfmt.cpp
+++ b/contrib/libs/icu/i18n/plurfmt.cpp
@@ -31,7 +31,7 @@ U_NAMESPACE_BEGIN
using number::impl::DecimalQuantity;
-static const UChar OTHER_STRING[] = {
+static const char16_t OTHER_STRING[] = {
0x6F, 0x74, 0x68, 0x65, 0x72, 0 // "other"
};
@@ -40,23 +40,23 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralFormat)
PluralFormat::PluralFormat(UErrorCode& status)
: locale(Locale::getDefault()),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
- init(NULL, UPLURAL_TYPE_CARDINAL, status);
+ init(nullptr, UPLURAL_TYPE_CARDINAL, status);
}
PluralFormat::PluralFormat(const Locale& loc, UErrorCode& status)
: locale(loc),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
- init(NULL, UPLURAL_TYPE_CARDINAL, status);
+ init(nullptr, UPLURAL_TYPE_CARDINAL, status);
}
PluralFormat::PluralFormat(const PluralRules& rules, UErrorCode& status)
: locale(Locale::getDefault()),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
init(&rules, UPLURAL_TYPE_COUNT, status);
}
@@ -66,7 +66,7 @@ PluralFormat::PluralFormat(const Locale& loc,
UErrorCode& status)
: locale(loc),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
init(&rules, UPLURAL_TYPE_COUNT, status);
}
@@ -76,18 +76,18 @@ PluralFormat::PluralFormat(const Locale& loc,
UErrorCode& status)
: locale(loc),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
- init(NULL, type, status);
+ init(nullptr, type, status);
}
PluralFormat::PluralFormat(const UnicodeString& pat,
UErrorCode& status)
: locale(Locale::getDefault()),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
- init(NULL, UPLURAL_TYPE_CARDINAL, status);
+ init(nullptr, UPLURAL_TYPE_CARDINAL, status);
applyPattern(pat, status);
}
@@ -96,9 +96,9 @@ PluralFormat::PluralFormat(const Locale& loc,
UErrorCode& status)
: locale(loc),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
- init(NULL, UPLURAL_TYPE_CARDINAL, status);
+ init(nullptr, UPLURAL_TYPE_CARDINAL, status);
applyPattern(pat, status);
}
@@ -107,7 +107,7 @@ PluralFormat::PluralFormat(const PluralRules& rules,
UErrorCode& status)
: locale(Locale::getDefault()),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
init(&rules, UPLURAL_TYPE_COUNT, status);
applyPattern(pat, status);
@@ -119,7 +119,7 @@ PluralFormat::PluralFormat(const Locale& loc,
UErrorCode& status)
: locale(loc),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
init(&rules, UPLURAL_TYPE_COUNT, status);
applyPattern(pat, status);
@@ -131,9 +131,9 @@ PluralFormat::PluralFormat(const Locale& loc,
UErrorCode& status)
: locale(loc),
msgPattern(status),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(0) {
- init(NULL, type, status);
+ init(nullptr, type, status);
applyPattern(pat, status);
}
@@ -141,7 +141,7 @@ PluralFormat::PluralFormat(const PluralFormat& other)
: Format(other),
locale(other.locale),
msgPattern(other.msgPattern),
- numberFormat(NULL),
+ numberFormat(nullptr),
offset(other.offset) {
copyObjects(other);
}
@@ -149,19 +149,19 @@ PluralFormat::PluralFormat(const PluralFormat& other)
void
PluralFormat::copyObjects(const PluralFormat& other) {
UErrorCode status = U_ZERO_ERROR;
- if (numberFormat != NULL) {
+ if (numberFormat != nullptr) {
delete numberFormat;
}
- if (pluralRulesWrapper.pluralRules != NULL) {
+ if (pluralRulesWrapper.pluralRules != nullptr) {
delete pluralRulesWrapper.pluralRules;
}
- if (other.numberFormat == NULL) {
+ if (other.numberFormat == nullptr) {
numberFormat = NumberFormat::createInstance(locale, status);
} else {
numberFormat = other.numberFormat->clone();
}
- if (other.pluralRulesWrapper.pluralRules == NULL) {
+ if (other.pluralRulesWrapper.pluralRules == nullptr) {
pluralRulesWrapper.pluralRules = PluralRules::forLocale(locale, status);
} else {
pluralRulesWrapper.pluralRules = other.pluralRulesWrapper.pluralRules->clone();
@@ -179,11 +179,11 @@ PluralFormat::init(const PluralRules* rules, UPluralType type, UErrorCode& statu
return;
}
- if (rules==NULL) {
+ if (rules==nullptr) {
pluralRulesWrapper.pluralRules = PluralRules::forLocale(locale, type, status);
} else {
pluralRulesWrapper.pluralRules = rules->clone();
- if (pluralRulesWrapper.pluralRules == NULL) {
+ if (pluralRulesWrapper.pluralRules == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -194,7 +194,7 @@ PluralFormat::init(const PluralRules* rules, UPluralType type, UErrorCode& statu
void
PluralFormat::applyPattern(const UnicodeString& newPattern, UErrorCode& status) {
- msgPattern.parsePluralStyle(newPattern, NULL, status);
+ msgPattern.parsePluralStyle(newPattern, nullptr, status);
if (U_FAILURE(status)) {
msgPattern.clear();
offset = 0;
@@ -343,9 +343,9 @@ PluralFormat::setLocale(const Locale& loc, UErrorCode& status) {
msgPattern.clear();
delete numberFormat;
offset = 0;
- numberFormat = NULL;
+ numberFormat = nullptr;
pluralRulesWrapper.reset();
- init(NULL, UPLURAL_TYPE_CARDINAL, status);
+ init(nullptr, UPLURAL_TYPE_CARDINAL, status);
}
void
@@ -354,7 +354,7 @@ PluralFormat::setNumberFormat(const NumberFormat* format, UErrorCode& status) {
return;
}
NumberFormat* nf = format->clone();
- if (nf != NULL) {
+ if (nf != nullptr) {
delete numberFormat;
numberFormat = nf;
} else {
@@ -393,10 +393,10 @@ PluralFormat::operator==(const Format& other) const {
return
locale == o.locale &&
msgPattern == o.msgPattern && // implies same offset
- (numberFormat == NULL) == (o.numberFormat == NULL) &&
- (numberFormat == NULL || *numberFormat == *o.numberFormat) &&
- (pluralRulesWrapper.pluralRules == NULL) == (o.pluralRulesWrapper.pluralRules == NULL) &&
- (pluralRulesWrapper.pluralRules == NULL ||
+ (numberFormat == nullptr) == (o.numberFormat == nullptr) &&
+ (numberFormat == nullptr || *numberFormat == *o.numberFormat) &&
+ (pluralRulesWrapper.pluralRules == nullptr) == (o.pluralRulesWrapper.pluralRules == nullptr) &&
+ (pluralRulesWrapper.pluralRules == nullptr ||
*pluralRulesWrapper.pluralRules == *o.pluralRulesWrapper.pluralRules);
}
@@ -434,11 +434,11 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part
// (In other words, we never call the selector if we match against an explicit value,
// or if the only non-explicit keyword is "other".)
UnicodeString keyword;
- UnicodeString other(FALSE, OTHER_STRING, 5);
+ UnicodeString other(false, OTHER_STRING, 5);
// When we find a match, we set msgStart>0 and also set this boolean to true
// to avoid matching the keyword again (duplicates are allowed)
// while we continue to look for an explicit-value match.
- UBool haveKeywordMatch=FALSE;
+ UBool haveKeywordMatch=false;
// msgStart is 0 until we find any appropriate sub-message.
// We remember the first "other" sub-message if we have not seen any
// appropriate sub-message before.
@@ -477,7 +477,7 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part
// This is the first "other" sub-message,
// and the selected keyword is also "other".
// Do not match "other" again.
- haveKeywordMatch=TRUE;
+ haveKeywordMatch=true;
}
}
} else {
@@ -486,7 +486,7 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part
if(msgStart!=0 && (0 == keyword.compare(other))) {
// We have already seen an "other" sub-message.
// Do not match "other" again.
- haveKeywordMatch=TRUE;
+ haveKeywordMatch=true;
// Skip keyword matching but do getLimitPartIndex().
}
}
@@ -494,7 +494,7 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part
// keyword matches
msgStart=partIndex;
// Do not match this keyword again.
- haveKeywordMatch=TRUE;
+ haveKeywordMatch=true;
}
}
}
@@ -548,7 +548,7 @@ void PluralFormat::parseType(const UnicodeString& source, const NFRule *rbnfLeni
}
UnicodeString currArg = pattern.tempSubString(partStart->getLimit(), partLimit->getIndex() - partStart->getLimit());
- if (rbnfLenientScanner != NULL) {
+ if (rbnfLenientScanner != nullptr) {
// Check if non-lenient rule finds the text before call lenient parsing
int32_t tempIndex = source.indexOf(currArg, startingAt);
if (tempIndex >= 0) {
@@ -595,7 +595,7 @@ UnicodeString PluralFormat::PluralSelectorAdapter::select(void *context, double
void PluralFormat::PluralSelectorAdapter::reset() {
delete pluralRules;
- pluralRules = NULL;
+ pluralRules = nullptr;
}
diff --git a/contrib/libs/icu/i18n/plurrule.cpp b/contrib/libs/icu/i18n/plurrule.cpp
index d1918c46981..9c37b09e253 100644
--- a/contrib/libs/icu/i18n/plurrule.cpp
+++ b/contrib/libs/icu/i18n/plurrule.cpp
@@ -26,6 +26,7 @@
#include "hash.h"
#include "locutil.h"
#include "mutex.h"
+#include "number_decnum.h"
#include "patternprops.h"
#include "plurrule_impl.h"
#include "putilimp.h"
@@ -45,26 +46,28 @@
U_NAMESPACE_BEGIN
using namespace icu::pluralimpl;
+using icu::number::impl::DecNum;
using icu::number::impl::DecimalQuantity;
-
-static const UChar PLURAL_KEYWORD_OTHER[]={LOW_O,LOW_T,LOW_H,LOW_E,LOW_R,0};
-static const UChar PLURAL_DEFAULT_RULE[]={LOW_O,LOW_T,LOW_H,LOW_E,LOW_R,COLON,SPACE,LOW_N,0};
-static const UChar PK_IN[]={LOW_I,LOW_N,0};
-static const UChar PK_NOT[]={LOW_N,LOW_O,LOW_T,0};
-static const UChar PK_IS[]={LOW_I,LOW_S,0};
-static const UChar PK_MOD[]={LOW_M,LOW_O,LOW_D,0};
-static const UChar PK_AND[]={LOW_A,LOW_N,LOW_D,0};
-static const UChar PK_OR[]={LOW_O,LOW_R,0};
-static const UChar PK_VAR_N[]={LOW_N,0};
-static const UChar PK_VAR_I[]={LOW_I,0};
-static const UChar PK_VAR_F[]={LOW_F,0};
-static const UChar PK_VAR_T[]={LOW_T,0};
-static const UChar PK_VAR_E[]={LOW_E,0};
-static const UChar PK_VAR_C[]={LOW_C,0};
-static const UChar PK_VAR_V[]={LOW_V,0};
-static const UChar PK_WITHIN[]={LOW_W,LOW_I,LOW_T,LOW_H,LOW_I,LOW_N,0};
-static const UChar PK_DECIMAL[]={LOW_D,LOW_E,LOW_C,LOW_I,LOW_M,LOW_A,LOW_L,0};
-static const UChar PK_INTEGER[]={LOW_I,LOW_N,LOW_T,LOW_E,LOW_G,LOW_E,LOW_R,0};
+using icu::number::impl::RoundingMode;
+
+static const char16_t PLURAL_KEYWORD_OTHER[]={LOW_O,LOW_T,LOW_H,LOW_E,LOW_R,0};
+static const char16_t PLURAL_DEFAULT_RULE[]={LOW_O,LOW_T,LOW_H,LOW_E,LOW_R,COLON,SPACE,LOW_N,0};
+static const char16_t PK_IN[]={LOW_I,LOW_N,0};
+static const char16_t PK_NOT[]={LOW_N,LOW_O,LOW_T,0};
+static const char16_t PK_IS[]={LOW_I,LOW_S,0};
+static const char16_t PK_MOD[]={LOW_M,LOW_O,LOW_D,0};
+static const char16_t PK_AND[]={LOW_A,LOW_N,LOW_D,0};
+static const char16_t PK_OR[]={LOW_O,LOW_R,0};
+static const char16_t PK_VAR_N[]={LOW_N,0};
+static const char16_t PK_VAR_I[]={LOW_I,0};
+static const char16_t PK_VAR_F[]={LOW_F,0};
+static const char16_t PK_VAR_T[]={LOW_T,0};
+static const char16_t PK_VAR_E[]={LOW_E,0};
+static const char16_t PK_VAR_C[]={LOW_C,0};
+static const char16_t PK_VAR_V[]={LOW_V,0};
+static const char16_t PK_WITHIN[]={LOW_W,LOW_I,LOW_T,LOW_H,LOW_I,LOW_N,0};
+static const char16_t PK_DECIMAL[]={LOW_D,LOW_E,LOW_C,LOW_I,LOW_M,LOW_A,LOW_L,0};
+static const char16_t PK_INTEGER[]={LOW_I,LOW_N,LOW_T,LOW_E,LOW_G,LOW_E,LOW_R,0};
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralRules)
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralKeywordEnumeration)
@@ -176,7 +179,7 @@ PluralRules::createRules(const UnicodeString& description, UErrorCode& status) {
PluralRules* U_EXPORT2
PluralRules::createDefaultRules(UErrorCode& status) {
- return createRules(UnicodeString(TRUE, PLURAL_DEFAULT_RULE, -1), status);
+ return createRules(UnicodeString(true, PLURAL_DEFAULT_RULE, -1), status);
}
/******************************************************************************/
@@ -304,7 +307,7 @@ PluralRules::select(const number::FormattedNumber& number, UErrorCode& status) c
UnicodeString
PluralRules::select(const IFixedDecimal &number) const {
if (mRules == nullptr) {
- return UnicodeString(TRUE, PLURAL_DEFAULT_RULE, -1);
+ return UnicodeString(true, PLURAL_DEFAULT_RULE, -1);
}
else {
return mRules->select(number);
@@ -369,36 +372,18 @@ PluralRules::getAllKeywordValues(const UnicodeString & /* keyword */, double * /
return 0;
}
-
-static double scaleForInt(double d) {
- double scale = 1.0;
- while (d != floor(d)) {
- d = d * 10.0;
- scale = scale * 10.0;
- }
- return scale;
-}
-
-static const double powers10[7] = {1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0}; // powers of 10 for 0..6
-static double applyExponent(double source, int32_t exponent) {
- if (exponent >= 0 && exponent <= 6) {
- return source * powers10[exponent];
- }
- return source * pow(10.0, exponent);
-}
-
/**
- * Helper method for the overrides of getSamples() for double and FixedDecimal
- * return value types. Provide only one of an allocated array of doubles or
- * FixedDecimals, and a nullptr for the other.
+ * Helper method for the overrides of getSamples() for double and DecimalQuantity
+ * return value types. Provide only one of an allocated array of double or
+ * DecimalQuantity, and a nullptr for the other.
*/
static int32_t
getSamplesFromString(const UnicodeString &samples, double *destDbl,
- FixedDecimal* destFd, int32_t destCapacity,
+ DecimalQuantity* destDq, int32_t destCapacity,
UErrorCode& status) {
- if ((destDbl == nullptr && destFd == nullptr)
- || (destDbl != nullptr && destFd != nullptr)) {
+ if ((destDbl == nullptr && destDq == nullptr)
+ || (destDbl != nullptr && destDq != nullptr)) {
status = U_INTERNAL_PROGRAM_ERROR;
return 0;
}
@@ -420,58 +405,75 @@ getSamplesFromString(const UnicodeString &samples, double *destDbl,
// std::cout << "PluralRules::getSamples(), samplesRange = \"" << sampleRange.toUTF8String(ss) << "\"\n";
int32_t tildeIndex = sampleRange.indexOf(TILDE);
if (tildeIndex < 0) {
- FixedDecimal fixed(sampleRange, status);
+ DecimalQuantity dq = DecimalQuantity::fromExponentString(sampleRange, status);
if (isDouble) {
- double sampleValue = fixed.source;
- if (fixed.visibleDecimalDigitCount == 0 || sampleValue != floor(sampleValue)) {
- destDbl[sampleCount++] = applyExponent(sampleValue, fixed.exponent);
+ // See warning note below about lack of precision for floating point samples for numbers with
+ // trailing zeroes in the decimal fraction representation.
+ double dblValue = dq.toDouble();
+ if (!(dblValue == floor(dblValue) && dq.fractionCount() > 0)) {
+ destDbl[sampleCount++] = dblValue;
}
} else {
- destFd[sampleCount++] = fixed;
+ destDq[sampleCount++] = dq;
}
} else {
- FixedDecimal fixedLo(sampleRange.tempSubStringBetween(0, tildeIndex), status);
- FixedDecimal fixedHi(sampleRange.tempSubStringBetween(tildeIndex+1), status);
- double rangeLo = fixedLo.source;
- double rangeHi = fixedHi.source;
+ DecimalQuantity rangeLo =
+ DecimalQuantity::fromExponentString(sampleRange.tempSubStringBetween(0, tildeIndex), status);
+ DecimalQuantity rangeHi = DecimalQuantity::fromExponentString(sampleRange.tempSubStringBetween(tildeIndex+1), status);
if (U_FAILURE(status)) {
break;
}
- if (rangeHi < rangeLo) {
+ if (rangeHi.toDouble() < rangeLo.toDouble()) {
status = U_INVALID_FORMAT_ERROR;
break;
}
- // For ranges of samples with fraction decimal digits, scale the number up so that we
- // are adding one in the units place. Avoids roundoffs from repetitive adds of tenths.
+ DecimalQuantity incrementDq;
+ incrementDq.setToInt(1);
+ int32_t lowerDispMag = rangeLo.getLowerDisplayMagnitude();
+ int32_t exponent = rangeLo.getExponent();
+ int32_t incrementScale = lowerDispMag + exponent;
+ incrementDq.adjustMagnitude(incrementScale);
+ double incrementVal = incrementDq.toDouble(); // 10 ^ incrementScale
+
- double scale = scaleForInt(rangeLo);
- double t = scaleForInt(rangeHi);
- if (t > scale) {
- scale = t;
- }
- rangeLo *= scale;
- rangeHi *= scale;
- for (double n=rangeLo; n<=rangeHi; n+=1) {
- double sampleValue = n/scale;
+ DecimalQuantity dq(rangeLo);
+ double dblValue = dq.toDouble();
+ double end = rangeHi.toDouble();
+
+ while (dblValue <= end) {
if (isDouble) {
// Hack Alert: don't return any decimal samples with integer values that
// originated from a format with trailing decimals.
// This API is returning doubles, which can't distinguish having displayed
// zeros to the right of the decimal.
// This results in test failures with values mapping back to a different keyword.
- if (!(sampleValue == floor(sampleValue) && fixedLo.visibleDecimalDigitCount > 0)) {
- destDbl[sampleCount++] = sampleValue;
+ if (!(dblValue == floor(dblValue) && dq.fractionCount() > 0)) {
+ destDbl[sampleCount++] = dblValue;
}
} else {
- int32_t v = (int32_t) fixedLo.getPluralOperand(PluralOperand::PLURAL_OPERAND_V);
- int32_t e = (int32_t) fixedLo.getPluralOperand(PluralOperand::PLURAL_OPERAND_E);
- FixedDecimal newSample = FixedDecimal::createWithExponent(sampleValue, v, e);
- destFd[sampleCount++] = newSample;
+ destDq[sampleCount++] = dq;
}
if (sampleCount >= destCapacity) {
break;
}
+
+ // Increment dq for next iteration
+
+ // Because DecNum and DecimalQuantity do not support
+ // add operations, we need to convert to/from double,
+ // despite precision lossiness for decimal fractions like 0.1.
+ dblValue += incrementVal;
+ DecNum newDqDecNum;
+ newDqDecNum.setTo(dblValue, status);
+ DecimalQuantity newDq;
+ newDq.setToDecNum(newDqDecNum, status);
+ newDq.setMinFraction(-lowerDispMag);
+ newDq.roundToMagnitude(lowerDispMag, RoundingMode::UNUM_ROUND_HALFEVEN, status);
+ newDq.adjustMagnitude(-exponent);
+ newDq.adjustExponent(exponent);
+ dblValue = newDq.toDouble();
+ dq = newDq;
}
}
sampleStartIdx = sampleEndIdx + 1;
@@ -505,7 +507,7 @@ PluralRules::getSamples(const UnicodeString &keyword, double *dest,
}
int32_t
-PluralRules::getSamples(const UnicodeString &keyword, FixedDecimal *dest,
+PluralRules::getSamples(const UnicodeString &keyword, DecimalQuantity *dest,
int32_t destCapacity, UErrorCode& status) {
if (U_FAILURE(status)) {
return 0;
@@ -552,7 +554,7 @@ PluralRules::isKeyword(const UnicodeString& keyword) const {
UnicodeString
PluralRules::getKeywordOther() const {
- return UnicodeString(TRUE, PLURAL_KEYWORD_OTHER, 5);
+ return UnicodeString(true, PLURAL_KEYWORD_OTHER, 5);
}
bool
@@ -639,11 +641,11 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr
break;
case tNot:
U_ASSERT(curAndConstraint != nullptr);
- curAndConstraint->negated=TRUE;
+ curAndConstraint->negated=true;
break;
case tNotEqual:
- curAndConstraint->negated=TRUE;
+ curAndConstraint->negated=true;
U_FALLTHROUGH;
case tIn:
case tWithin:
@@ -759,7 +761,7 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr
break;
}
if (type == tEllipsis) {
- currentChain->fIntegerSamplesUnbounded = TRUE;
+ currentChain->fIntegerSamplesUnbounded = true;
continue;
}
currentChain->fIntegerSamples.append(token);
@@ -773,7 +775,7 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr
break;
}
if (type == tEllipsis) {
- currentChain->fDecimalSamplesUnbounded = TRUE;
+ currentChain->fDecimalSamplesUnbounded = true;
continue;
}
currentChain->fDecimalSamples.append(token);
@@ -820,7 +822,7 @@ PluralRules::getRuleFromResource(const Locale& locale, UPluralType type, UErrorC
}
int32_t resLen=0;
const char *curLocaleName=locale.getBaseName();
- const UChar* s = ures_getStringByKey(locRes.getAlias(), curLocaleName, &resLen, &errCode);
+ const char16_t* s = ures_getStringByKey(locRes.getAlias(), curLocaleName, &resLen, &errCode);
if (s == nullptr) {
// Check parent locales.
@@ -917,10 +919,10 @@ AndConstraint::~AndConstraint() {
UBool
AndConstraint::isFulfilled(const IFixedDecimal &number) {
- UBool result = TRUE;
+ UBool result = true;
if (digitsType == none) {
// An empty AndConstraint, created by a rule with a keyword but no following expression.
- return TRUE;
+ return true;
}
PluralOperand operand = tokenTypeToPluralOperand(digitsType);
@@ -929,7 +931,7 @@ AndConstraint::isFulfilled(const IFixedDecimal &number) {
// May be non-integer (n option only)
do {
if (integerOnly && n != uprv_floor(n)) {
- result = FALSE;
+ result = false;
break;
}
@@ -941,14 +943,14 @@ AndConstraint::isFulfilled(const IFixedDecimal &number) {
n == value; // 'is' rule
break;
}
- result = FALSE; // 'in' or 'within' rule
+ result = false; // 'in' or 'within' rule
for (int32_t r=0; r<rangeList->size(); r+=2) {
if (rangeList->elementAti(r) <= n && n <= rangeList->elementAti(r+1)) {
- result = TRUE;
+ result = true;
break;
}
}
- } while (FALSE);
+ } while (false);
if (negated) {
result = !result;
@@ -1024,10 +1026,10 @@ OrConstraint::add(UErrorCode& status) {
UBool
OrConstraint::isFulfilled(const IFixedDecimal &number) {
OrConstraint* orRule=this;
- UBool result=FALSE;
+ UBool result=false;
while (orRule!=nullptr && !result) {
- result=TRUE;
+ result=true;
AndConstraint* andRule = orRule->childNode;
while (andRule!=nullptr && result) {
result = andRule->isFulfilled(number);
@@ -1084,7 +1086,7 @@ RuleChain::select(const IFixedDecimal &number) const {
}
}
}
- return UnicodeString(TRUE, PLURAL_KEYWORD_OTHER, 5);
+ return UnicodeString(true, PLURAL_KEYWORD_OTHER, 5);
}
static UnicodeString tokenString(tokenType tok) {
@@ -1112,7 +1114,7 @@ static UnicodeString tokenString(tokenType tok) {
void
RuleChain::dumpRules(UnicodeString& result) {
- UChar digitString[16];
+ char16_t digitString[16];
if ( ruleHeader != nullptr ) {
result += fKeyword;
@@ -1223,14 +1225,14 @@ RuleChain::getKeywords(int32_t capacityOfKeywords, UnicodeString* keywords, int3
UBool
RuleChain::isKeyword(const UnicodeString& keywordParam) const {
if ( fKeyword == keywordParam ) {
- return TRUE;
+ return true;
}
if ( fNext != nullptr ) {
return fNext->isKeyword(keywordParam);
}
else {
- return FALSE;
+ return false;
}
}
@@ -1376,7 +1378,7 @@ PluralRuleParser::getNextToken(UErrorCode &status)
return;
}
- UChar ch;
+ char16_t ch;
while (ruleIndex < ruleSrc->length()) {
ch = ruleSrc->charAt(ruleIndex);
type = charType(ch);
@@ -1457,7 +1459,7 @@ PluralRuleParser::getNextToken(UErrorCode &status)
}
tokenType
-PluralRuleParser::charType(UChar ch) {
+PluralRuleParser::charType(char16_t ch) {
if ((ch>=U_ZERO) && (ch<=U_NINE)) {
return tNumber;
}
@@ -1545,34 +1547,24 @@ PluralKeywordEnumeration::PluralKeywordEnumeration(RuleChain *header, UErrorCode
return;
}
fKeywordNames.setDeleter(uprv_deleteUObject);
- UBool addKeywordOther = TRUE;
+ UBool addKeywordOther = true;
RuleChain *node = header;
while (node != nullptr) {
- auto newElem = new UnicodeString(node->fKeyword);
- if (newElem == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return;
- }
- fKeywordNames.addElementX(newElem, status);
+ LocalPointer<UnicodeString> newElem(node->fKeyword.clone(), status);
+ fKeywordNames.adoptElement(newElem.orphan(), status);
if (U_FAILURE(status)) {
- delete newElem;
return;
}
if (0 == node->fKeyword.compare(PLURAL_KEYWORD_OTHER, 5)) {
- addKeywordOther = FALSE;
+ addKeywordOther = false;
}
node = node->fNext;
}
if (addKeywordOther) {
- auto newElem = new UnicodeString(PLURAL_KEYWORD_OTHER);
- if (newElem == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return;
- }
- fKeywordNames.addElementX(newElem, status);
+ LocalPointer<UnicodeString> newElem(new UnicodeString(PLURAL_KEYWORD_OTHER), status);
+ fKeywordNames.adoptElement(newElem.orphan(), status);
if (U_FAILURE(status)) {
- delete newElem;
return;
}
}
@@ -1628,7 +1620,7 @@ FixedDecimal::FixedDecimal(double n, int32_t v, int64_t f, int32_t e) {
init(n, v, f, e);
// check values. TODO make into unit test.
//
- // long visiblePower = (int) Math.pow(10, v);
+ // long visiblePower = (int) Math.pow(10.0, v);
// if (decimalDigits > visiblePower) {
// throw new IllegalArgumentException();
// }
@@ -1761,7 +1753,7 @@ void FixedDecimal::init(double n, int32_t v, int64_t f, int32_t e, int32_t c) {
v = 0;
f = 0;
intValue = 0;
- _hasIntegerValue = FALSE;
+ _hasIntegerValue = false;
} else {
intValue = (int64_t)source;
_hasIntegerValue = (source == intValue);
@@ -1787,13 +1779,13 @@ void FixedDecimal::init(double n, int32_t v, int64_t f, int32_t e, int32_t c) {
// A single multiply of the original number works more reliably.
static int32_t p10[] = {1, 10, 100, 1000, 10000};
UBool FixedDecimal::quickInit(double n) {
- UBool success = FALSE;
+ UBool success = false;
n = fabs(n);
int32_t numFractionDigits;
for (numFractionDigits = 0; numFractionDigits <= 3; numFractionDigits++) {
double scaledN = n * p10[numFractionDigits];
if (scaledN == floor(scaledN)) {
- success = TRUE;
+ success = true;
break;
}
}
@@ -1816,9 +1808,9 @@ int32_t FixedDecimal::decimals(double n) {
}
}
- // Slow path, convert with sprintf, parse converted output.
+ // Slow path, convert with snprintf, parse converted output.
char buf[30] = {0};
- sprintf(buf, "%1.15e", n);
+ snprintf(buf, sizeof(buf), "%1.15e", n);
// formatted number looks like this: 1.234567890123457e-01
int exponent = atoi(buf+18);
int numFractionDigits = 15;
@@ -1881,7 +1873,7 @@ void FixedDecimal::adjustForMinFractionDigits(int32_t minFractionDigits) {
double FixedDecimal::getPluralOperand(PluralOperand operand) const {
switch(operand) {
- case PLURAL_OPERAND_N: return (exponent == 0 ? source : source * pow(10, exponent));
+ case PLURAL_OPERAND_N: return (exponent == 0 ? source : source * pow(10.0, exponent));
case PLURAL_OPERAND_I: return (double) longValue();
case PLURAL_OPERAND_F: return static_cast<double>(decimalDigits);
case PLURAL_OPERAND_T: return static_cast<double>(decimalDigitsWithoutTrailingZeros);
@@ -1932,14 +1924,14 @@ UnicodeString FixedDecimal::toString() const {
}
double FixedDecimal::doubleValue() const {
- return (isNegative ? -source : source) * pow(10, exponent);
+ return (isNegative ? -source : source) * pow(10.0, exponent);
}
int64_t FixedDecimal::longValue() const {
if (exponent == 0) {
return intValue;
} else {
- return (long) (pow(10, exponent) * intValue);
+ return (long) (pow(10.0, exponent) * intValue);
}
}
diff --git a/contrib/libs/icu/i18n/plurrule_impl.h b/contrib/libs/icu/i18n/plurrule_impl.h
index 7274da58f06..4de6d6460aa 100644
--- a/contrib/libs/icu/i18n/plurrule_impl.h
+++ b/contrib/libs/icu/i18n/plurrule_impl.h
@@ -34,7 +34,7 @@
* A FixedDecimal version of UPLRULES_NO_UNIQUE_VALUE used in PluralRulesTest
* for parsing of samples.
*/
-#define UPLRULES_NO_UNIQUE_VALUE_DECIMAL (FixedDecimal((double)-0.00123456777))
+#define UPLRULES_NO_UNIQUE_VALUE_DECIMAL(ERROR_CODE) (DecimalQuantity::fromExponentString(u"-0.00123456777", ERROR_CODE))
class PluralRulesTest;
@@ -50,67 +50,67 @@ namespace pluralimpl {
// TODO: Remove this and replace with u"" literals. Was for EBCDIC compatibility.
-static const UChar DOT = ((UChar) 0x002E);
-static const UChar SINGLE_QUOTE = ((UChar) 0x0027);
-static const UChar SLASH = ((UChar) 0x002F);
-static const UChar BACKSLASH = ((UChar) 0x005C);
-static const UChar SPACE = ((UChar) 0x0020);
-static const UChar EXCLAMATION = ((UChar) 0x0021);
-static const UChar QUOTATION_MARK = ((UChar) 0x0022);
-static const UChar NUMBER_SIGN = ((UChar) 0x0023);
-static const UChar PERCENT_SIGN = ((UChar) 0x0025);
-static const UChar ASTERISK = ((UChar) 0x002A);
-static const UChar COMMA = ((UChar) 0x002C);
-static const UChar HYPHEN = ((UChar) 0x002D);
-static const UChar U_ZERO = ((UChar) 0x0030);
-static const UChar U_ONE = ((UChar) 0x0031);
-static const UChar U_TWO = ((UChar) 0x0032);
-static const UChar U_THREE = ((UChar) 0x0033);
-static const UChar U_FOUR = ((UChar) 0x0034);
-static const UChar U_FIVE = ((UChar) 0x0035);
-static const UChar U_SIX = ((UChar) 0x0036);
-static const UChar U_SEVEN = ((UChar) 0x0037);
-static const UChar U_EIGHT = ((UChar) 0x0038);
-static const UChar U_NINE = ((UChar) 0x0039);
-static const UChar COLON = ((UChar) 0x003A);
-static const UChar SEMI_COLON = ((UChar) 0x003B);
-static const UChar EQUALS = ((UChar) 0x003D);
-static const UChar AT = ((UChar) 0x0040);
-static const UChar CAP_A = ((UChar) 0x0041);
-static const UChar CAP_B = ((UChar) 0x0042);
-static const UChar CAP_R = ((UChar) 0x0052);
-static const UChar CAP_Z = ((UChar) 0x005A);
-static const UChar LOWLINE = ((UChar) 0x005F);
-static const UChar LEFTBRACE = ((UChar) 0x007B);
-static const UChar RIGHTBRACE = ((UChar) 0x007D);
-static const UChar TILDE = ((UChar) 0x007E);
-static const UChar ELLIPSIS = ((UChar) 0x2026);
-
-static const UChar LOW_A = ((UChar) 0x0061);
-static const UChar LOW_B = ((UChar) 0x0062);
-static const UChar LOW_C = ((UChar) 0x0063);
-static const UChar LOW_D = ((UChar) 0x0064);
-static const UChar LOW_E = ((UChar) 0x0065);
-static const UChar LOW_F = ((UChar) 0x0066);
-static const UChar LOW_G = ((UChar) 0x0067);
-static const UChar LOW_H = ((UChar) 0x0068);
-static const UChar LOW_I = ((UChar) 0x0069);
-static const UChar LOW_J = ((UChar) 0x006a);
-static const UChar LOW_K = ((UChar) 0x006B);
-static const UChar LOW_L = ((UChar) 0x006C);
-static const UChar LOW_M = ((UChar) 0x006D);
-static const UChar LOW_N = ((UChar) 0x006E);
-static const UChar LOW_O = ((UChar) 0x006F);
-static const UChar LOW_P = ((UChar) 0x0070);
-static const UChar LOW_Q = ((UChar) 0x0071);
-static const UChar LOW_R = ((UChar) 0x0072);
-static const UChar LOW_S = ((UChar) 0x0073);
-static const UChar LOW_T = ((UChar) 0x0074);
-static const UChar LOW_U = ((UChar) 0x0075);
-static const UChar LOW_V = ((UChar) 0x0076);
-static const UChar LOW_W = ((UChar) 0x0077);
-static const UChar LOW_Y = ((UChar) 0x0079);
-static const UChar LOW_Z = ((UChar) 0x007A);
+static const char16_t DOT = ((char16_t) 0x002E);
+static const char16_t SINGLE_QUOTE = ((char16_t) 0x0027);
+static const char16_t SLASH = ((char16_t) 0x002F);
+static const char16_t BACKSLASH = ((char16_t) 0x005C);
+static const char16_t SPACE = ((char16_t) 0x0020);
+static const char16_t EXCLAMATION = ((char16_t) 0x0021);
+static const char16_t QUOTATION_MARK = ((char16_t) 0x0022);
+static const char16_t NUMBER_SIGN = ((char16_t) 0x0023);
+static const char16_t PERCENT_SIGN = ((char16_t) 0x0025);
+static const char16_t ASTERISK = ((char16_t) 0x002A);
+static const char16_t COMMA = ((char16_t) 0x002C);
+static const char16_t HYPHEN = ((char16_t) 0x002D);
+static const char16_t U_ZERO = ((char16_t) 0x0030);
+static const char16_t U_ONE = ((char16_t) 0x0031);
+static const char16_t U_TWO = ((char16_t) 0x0032);
+static const char16_t U_THREE = ((char16_t) 0x0033);
+static const char16_t U_FOUR = ((char16_t) 0x0034);
+static const char16_t U_FIVE = ((char16_t) 0x0035);
+static const char16_t U_SIX = ((char16_t) 0x0036);
+static const char16_t U_SEVEN = ((char16_t) 0x0037);
+static const char16_t U_EIGHT = ((char16_t) 0x0038);
+static const char16_t U_NINE = ((char16_t) 0x0039);
+static const char16_t COLON = ((char16_t) 0x003A);
+static const char16_t SEMI_COLON = ((char16_t) 0x003B);
+static const char16_t EQUALS = ((char16_t) 0x003D);
+static const char16_t AT = ((char16_t) 0x0040);
+static const char16_t CAP_A = ((char16_t) 0x0041);
+static const char16_t CAP_B = ((char16_t) 0x0042);
+static const char16_t CAP_R = ((char16_t) 0x0052);
+static const char16_t CAP_Z = ((char16_t) 0x005A);
+static const char16_t LOWLINE = ((char16_t) 0x005F);
+static const char16_t LEFTBRACE = ((char16_t) 0x007B);
+static const char16_t RIGHTBRACE = ((char16_t) 0x007D);
+static const char16_t TILDE = ((char16_t) 0x007E);
+static const char16_t ELLIPSIS = ((char16_t) 0x2026);
+
+static const char16_t LOW_A = ((char16_t) 0x0061);
+static const char16_t LOW_B = ((char16_t) 0x0062);
+static const char16_t LOW_C = ((char16_t) 0x0063);
+static const char16_t LOW_D = ((char16_t) 0x0064);
+static const char16_t LOW_E = ((char16_t) 0x0065);
+static const char16_t LOW_F = ((char16_t) 0x0066);
+static const char16_t LOW_G = ((char16_t) 0x0067);
+static const char16_t LOW_H = ((char16_t) 0x0068);
+static const char16_t LOW_I = ((char16_t) 0x0069);
+static const char16_t LOW_J = ((char16_t) 0x006a);
+static const char16_t LOW_K = ((char16_t) 0x006B);
+static const char16_t LOW_L = ((char16_t) 0x006C);
+static const char16_t LOW_M = ((char16_t) 0x006D);
+static const char16_t LOW_N = ((char16_t) 0x006E);
+static const char16_t LOW_O = ((char16_t) 0x006F);
+static const char16_t LOW_P = ((char16_t) 0x0070);
+static const char16_t LOW_Q = ((char16_t) 0x0071);
+static const char16_t LOW_R = ((char16_t) 0x0072);
+static const char16_t LOW_S = ((char16_t) 0x0073);
+static const char16_t LOW_T = ((char16_t) 0x0074);
+static const char16_t LOW_U = ((char16_t) 0x0075);
+static const char16_t LOW_V = ((char16_t) 0x0076);
+static const char16_t LOW_W = ((char16_t) 0x0077);
+static const char16_t LOW_Y = ((char16_t) 0x0079);
+static const char16_t LOW_Z = ((char16_t) 0x007A);
}
@@ -164,7 +164,7 @@ public:
private:
static tokenType getKeyType(const UnicodeString& token, tokenType type);
- static tokenType charType(UChar ch);
+ static tokenType charType(char16_t ch);
static UBool isValidKeyword(const UnicodeString& token);
const UnicodeString *ruleSrc; // The rules string.
@@ -299,16 +299,16 @@ class U_I18N_API FixedDecimal: public IFixedDecimal, public UObject {
FixedDecimal(double n, int32_t);
explicit FixedDecimal(double n);
FixedDecimal();
- ~FixedDecimal() U_OVERRIDE;
+ ~FixedDecimal() override;
FixedDecimal(const UnicodeString &s, UErrorCode &ec);
FixedDecimal(const FixedDecimal &other);
static FixedDecimal createWithExponent(double n, int32_t v, int32_t e);
- double getPluralOperand(PluralOperand operand) const U_OVERRIDE;
- bool isNaN() const U_OVERRIDE;
- bool isInfinite() const U_OVERRIDE;
- bool hasIntegerValue() const U_OVERRIDE;
+ double getPluralOperand(PluralOperand operand) const override;
+ bool isNaN() const override;
+ bool isInfinite() const override;
+ bool hasIntegerValue() const override;
bool isNanOrInfinity() const; // used in decimfmtimpl.cpp
@@ -410,8 +410,8 @@ class PluralKeywordEnumeration : public StringEnumeration {
public:
PluralKeywordEnumeration(RuleChain *header, UErrorCode& status);
virtual ~PluralKeywordEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
diff --git a/contrib/libs/icu/i18n/quant.cpp b/contrib/libs/icu/i18n/quant.cpp
index ed339333877..4a45db1bf5c 100644
--- a/contrib/libs/icu/i18n/quant.cpp
+++ b/contrib/libs/icu/i18n/quant.cpp
@@ -103,21 +103,21 @@ UnicodeString& Quantifier::toPattern(UnicodeString& result,
matcher->toMatcher()->toPattern(result, escapeUnprintable);
if (minCount == 0) {
if (maxCount == 1) {
- return result.append((UChar)63); /*?*/
+ return result.append((char16_t)63); /*?*/
} else if (maxCount == MAX) {
- return result.append((UChar)42); /***/
+ return result.append((char16_t)42); /***/
}
// else fall through
} else if (minCount == 1 && maxCount == MAX) {
- return result.append((UChar)43); /*+*/
+ return result.append((char16_t)43); /*+*/
}
- result.append((UChar)123); /*{*/
+ result.append((char16_t)123); /*{*/
ICU_Utility::appendNumber(result, minCount);
- result.append((UChar)44); /*,*/
+ result.append((char16_t)44); /*,*/
if (maxCount != MAX) {
ICU_Utility::appendNumber(result, maxCount);
}
- result.append((UChar)125); /*}*/
+ result.append((char16_t)125); /*}*/
return result;
}
diff --git a/contrib/libs/icu/i18n/quantityformatter.cpp b/contrib/libs/icu/i18n/quantityformatter.cpp
index 9c9aa99b670..0a1982e3d4c 100644
--- a/contrib/libs/icu/i18n/quantityformatter.cpp
+++ b/contrib/libs/icu/i18n/quantityformatter.cpp
@@ -32,14 +32,14 @@ U_NAMESPACE_BEGIN
QuantityFormatter::QuantityFormatter() {
for (int32_t i = 0; i < UPRV_LENGTHOF(formatters); ++i) {
- formatters[i] = NULL;
+ formatters[i] = nullptr;
}
}
QuantityFormatter::QuantityFormatter(const QuantityFormatter &other) {
for (int32_t i = 0; i < UPRV_LENGTHOF(formatters); ++i) {
- if (other.formatters[i] == NULL) {
- formatters[i] = NULL;
+ if (other.formatters[i] == nullptr) {
+ formatters[i] = nullptr;
} else {
formatters[i] = new SimpleFormatter(*other.formatters[i]);
}
@@ -53,8 +53,8 @@ QuantityFormatter &QuantityFormatter::operator=(
}
for (int32_t i = 0; i < UPRV_LENGTHOF(formatters); ++i) {
delete formatters[i];
- if (other.formatters[i] == NULL) {
- formatters[i] = NULL;
+ if (other.formatters[i] == nullptr) {
+ formatters[i] = nullptr;
} else {
formatters[i] = new SimpleFormatter(*other.formatters[i]);
}
@@ -71,7 +71,7 @@ QuantityFormatter::~QuantityFormatter() {
void QuantityFormatter::reset() {
for (int32_t i = 0; i < UPRV_LENGTHOF(formatters); ++i) {
delete formatters[i];
- formatters[i] = NULL;
+ formatters[i] = nullptr;
}
}
@@ -81,26 +81,26 @@ UBool QuantityFormatter::addIfAbsent(
UErrorCode &status) {
int32_t pluralIndex = StandardPlural::indexFromString(variant, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- if (formatters[pluralIndex] != NULL) {
- return TRUE;
+ if (formatters[pluralIndex] != nullptr) {
+ return true;
}
SimpleFormatter *newFmt = new SimpleFormatter(rawPattern, 0, 1, status);
- if (newFmt == NULL) {
+ if (newFmt == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
if (U_FAILURE(status)) {
delete newFmt;
- return FALSE;
+ return false;
}
formatters[pluralIndex] = newFmt;
- return TRUE;
+ return true;
}
UBool QuantityFormatter::isValid() const {
- return formatters[StandardPlural::OTHER] != NULL;
+ return formatters[StandardPlural::OTHER] != nullptr;
}
const SimpleFormatter *QuantityFormatter::getByVariant(
@@ -108,7 +108,7 @@ const SimpleFormatter *QuantityFormatter::getByVariant(
U_ASSERT(isValid());
int32_t pluralIndex = StandardPlural::indexOrOtherIndexFromString(variant);
const SimpleFormatter *pattern = formatters[pluralIndex];
- if (pattern == NULL) {
+ if (pattern == nullptr) {
pattern = formatters[StandardPlural::OTHER];
}
return pattern;
@@ -127,9 +127,9 @@ UnicodeString &QuantityFormatter::format(
return appendTo;
}
const SimpleFormatter *pattern = formatters[p];
- if (pattern == NULL) {
+ if (pattern == nullptr) {
pattern = formatters[StandardPlural::OTHER];
- if (pattern == NULL) {
+ if (pattern == nullptr) {
status = U_INVALID_STATE_ERROR;
return appendTo;
}
@@ -152,7 +152,7 @@ StandardPlural::Form QuantityFormatter::selectPlural(
}
UnicodeString pluralKeyword;
const DecimalFormat *decFmt = dynamic_cast<const DecimalFormat *>(&fmt);
- if (decFmt != NULL) {
+ if (decFmt != nullptr) {
number::impl::DecimalQuantity dq;
decFmt->formatToDecimalQuantity(number, dq, status);
if (U_FAILURE(status)) {
diff --git a/contrib/libs/icu/i18n/quantityformatter.h b/contrib/libs/icu/i18n/quantityformatter.h
index 841798cf889..ca0c0ee3711 100644
--- a/contrib/libs/icu/i18n/quantityformatter.h
+++ b/contrib/libs/icu/i18n/quantityformatter.h
@@ -86,7 +86,7 @@ public:
/**
* Gets the pattern formatter that would be used for a particular variant.
* If isValid() returns true, this method is guaranteed to return a
- * non-NULL value.
+ * non-nullptr value.
*/
const SimpleFormatter *getByVariant(const char *variant) const;
diff --git a/contrib/libs/icu/i18n/rbnf.cpp b/contrib/libs/icu/i18n/rbnf.cpp
index 7f54fd7a33f..06599b4fd16 100644
--- a/contrib/libs/icu/i18n/rbnf.cpp
+++ b/contrib/libs/icu/i18n/rbnf.cpp
@@ -45,19 +45,19 @@
#define U_ICUDATA_RBNF U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "rbnf"
-static const UChar gPercentPercent[] =
+static const char16_t gPercentPercent[] =
{
0x25, 0x25, 0
}; /* "%%" */
// All urbnf objects are created through openRules, so we init all of the
// Unicode string constants required by rbnf, nfrs, or nfr here.
-static const UChar gLenientParse[] =
+static const char16_t gLenientParse[] =
{
0x25, 0x25, 0x6C, 0x65, 0x6E, 0x69, 0x65, 0x6E, 0x74, 0x2D, 0x70, 0x61, 0x72, 0x73, 0x65, 0x3A, 0
}; /* "%%lenient-parse:" */
-static const UChar gSemiColon = 0x003B;
-static const UChar gSemiPercent[] =
+static const char16_t gSemiColon = 0x003B;
+static const char16_t gSemiPercent[] =
{
0x3B, 0x25, 0
}; /* ";%" */
@@ -87,48 +87,48 @@ protected:
public:
LocalizationInfo() : refcount(0) {}
- LocalizationInfo* ref(void) {
+ LocalizationInfo* ref() {
++refcount;
return this;
}
- LocalizationInfo* unref(void) {
+ LocalizationInfo* unref() {
if (refcount && --refcount == 0) {
delete this;
}
- return NULL;
+ return nullptr;
}
virtual bool operator==(const LocalizationInfo* rhs) const;
inline bool operator!=(const LocalizationInfo* rhs) const { return !operator==(rhs); }
- virtual int32_t getNumberOfRuleSets(void) const = 0;
- virtual const UChar* getRuleSetName(int32_t index) const = 0;
- virtual int32_t getNumberOfDisplayLocales(void) const = 0;
- virtual const UChar* getLocaleName(int32_t index) const = 0;
- virtual const UChar* getDisplayName(int32_t localeIndex, int32_t ruleIndex) const = 0;
+ virtual int32_t getNumberOfRuleSets() const = 0;
+ virtual const char16_t* getRuleSetName(int32_t index) const = 0;
+ virtual int32_t getNumberOfDisplayLocales() const = 0;
+ virtual const char16_t* getLocaleName(int32_t index) const = 0;
+ virtual const char16_t* getDisplayName(int32_t localeIndex, int32_t ruleIndex) const = 0;
- virtual int32_t indexForLocale(const UChar* locale) const;
- virtual int32_t indexForRuleSet(const UChar* ruleset) const;
+ virtual int32_t indexForLocale(const char16_t* locale) const;
+ virtual int32_t indexForRuleSet(const char16_t* ruleset) const;
// virtual UClassID getDynamicClassID() const = 0;
-// static UClassID getStaticClassID(void);
+// static UClassID getStaticClassID();
};
LocalizationInfo::~LocalizationInfo() {}
//UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(LocalizationInfo)
-// if both strings are NULL, this returns TRUE
+// if both strings are nullptr, this returns true
static UBool
-streq(const UChar* lhs, const UChar* rhs) {
+streq(const char16_t* lhs, const char16_t* rhs) {
if (rhs == lhs) {
- return TRUE;
+ return true;
}
if (lhs && rhs) {
return u_strcmp(lhs, rhs) == 0;
}
- return FALSE;
+ return false;
}
bool
@@ -148,7 +148,7 @@ LocalizationInfo::operator==(const LocalizationInfo* rhs) const {
int32_t dlc = getNumberOfDisplayLocales();
if (dlc == rhs->getNumberOfDisplayLocales()) {
for (int i = 0; i < dlc; ++i) {
- const UChar* locale = getLocaleName(i);
+ const char16_t* locale = getLocaleName(i);
int32_t ix = rhs->indexForLocale(locale);
// if no locale, ix is -1, getLocaleName returns null, so streq returns false
if (!streq(locale, rhs->getLocaleName(ix))) {
@@ -168,7 +168,7 @@ LocalizationInfo::operator==(const LocalizationInfo* rhs) const {
}
int32_t
-LocalizationInfo::indexForLocale(const UChar* locale) const {
+LocalizationInfo::indexForLocale(const char16_t* locale) const {
for (int i = 0; i < getNumberOfDisplayLocales(); ++i) {
if (streq(locale, getLocaleName(i))) {
return i;
@@ -178,7 +178,7 @@ LocalizationInfo::indexForLocale(const UChar* locale) const {
}
int32_t
-LocalizationInfo::indexForRuleSet(const UChar* ruleset) const {
+LocalizationInfo::indexForRuleSet(const char16_t* ruleset) const {
if (ruleset) {
for (int i = 0; i < getNumberOfRuleSets(); ++i) {
if (streq(ruleset, getRuleSetName(i))) {
@@ -198,9 +198,9 @@ class VArray {
int32_t size;
Fn_Deleter deleter;
public:
- VArray() : buf(NULL), cap(0), size(0), deleter(NULL) {}
+ VArray() : buf(nullptr), cap(0), size(0), deleter(nullptr) {}
- VArray(Fn_Deleter del) : buf(NULL), cap(0), size(0), deleter(del) {}
+ VArray(Fn_Deleter del) : buf(nullptr), cap(0), size(0), deleter(del) {}
~VArray() {
if (deleter) {
@@ -225,12 +225,12 @@ public:
} else {
cap += 256;
}
- if (buf == NULL) {
+ if (buf == nullptr) {
buf = (void**)uprv_malloc(cap * sizeof(void*));
} else {
buf = (void**)uprv_realloc(buf, cap * sizeof(void*));
}
- if (buf == NULL) {
+ if (buf == nullptr) {
// if we couldn't realloc, we leak the memory we've already allocated, but we're in deep trouble anyway
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -243,9 +243,9 @@ public:
}
}
- void** release(void) {
+ void** release() {
void** result = buf;
- buf = NULL;
+ buf = nullptr;
cap = 0;
size = 0;
return result;
@@ -255,14 +255,14 @@ public:
class LocDataParser;
class StringLocalizationInfo : public LocalizationInfo {
- UChar* info;
- UChar*** data;
+ char16_t* info;
+ char16_t*** data;
int32_t numRuleSets;
int32_t numLocales;
friend class LocDataParser;
- StringLocalizationInfo(UChar* i, UChar*** d, int32_t numRS, int32_t numLocs)
+ StringLocalizationInfo(char16_t* i, char16_t*** d, int32_t numRS, int32_t numLocs)
: info(i), data(d), numRuleSets(numRS), numLocales(numLocs)
{
}
@@ -271,14 +271,14 @@ public:
static StringLocalizationInfo* create(const UnicodeString& info, UParseError& perror, UErrorCode& status);
virtual ~StringLocalizationInfo();
- virtual int32_t getNumberOfRuleSets(void) const override { return numRuleSets; }
- virtual const UChar* getRuleSetName(int32_t index) const override;
- virtual int32_t getNumberOfDisplayLocales(void) const override { return numLocales; }
- virtual const UChar* getLocaleName(int32_t index) const override;
- virtual const UChar* getDisplayName(int32_t localeIndex, int32_t ruleIndex) const override;
+ virtual int32_t getNumberOfRuleSets() const override { return numRuleSets; }
+ virtual const char16_t* getRuleSetName(int32_t index) const override;
+ virtual int32_t getNumberOfDisplayLocales() const override { return numLocales; }
+ virtual const char16_t* getLocaleName(int32_t index) const override;
+ virtual const char16_t* getDisplayName(int32_t localeIndex, int32_t ruleIndex) const override;
// virtual UClassID getDynamicClassID() const;
-// static UClassID getStaticClassID(void);
+// static UClassID getStaticClassID();
private:
void init(UErrorCode& status) const;
@@ -298,48 +298,48 @@ enum {
* Utility for parsing a localization string and returning a StringLocalizationInfo*.
*/
class LocDataParser {
- UChar* data;
- const UChar* e;
- UChar* p;
- UChar ch;
+ char16_t* data;
+ const char16_t* e;
+ char16_t* p;
+ char16_t ch;
UParseError& pe;
UErrorCode& ec;
public:
LocDataParser(UParseError& parseError, UErrorCode& status)
- : data(NULL), e(NULL), p(NULL), ch(0xffff), pe(parseError), ec(status) {}
+ : data(nullptr), e(nullptr), p(nullptr), ch(0xffff), pe(parseError), ec(status) {}
~LocDataParser() {}
/*
* On a successful parse, return a StringLocalizationInfo*, otherwise delete locData, set perror and status,
- * and return NULL. The StringLocalizationInfo will adopt locData if it is created.
+ * and return nullptr. The StringLocalizationInfo will adopt locData if it is created.
*/
- StringLocalizationInfo* parse(UChar* data, int32_t len);
+ StringLocalizationInfo* parse(char16_t* data, int32_t len);
private:
- inline void inc(void) {
+ inline void inc() {
++p;
ch = 0xffff;
}
- inline UBool checkInc(UChar c) {
+ inline UBool checkInc(char16_t c) {
if (p < e && (ch == c || *p == c)) {
inc();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
- inline UBool check(UChar c) {
+ inline UBool check(char16_t c) {
return p < e && (ch == c || *p == c);
}
- inline void skipWhitespace(void) {
+ inline void skipWhitespace() {
while (p < e && PatternProps::isWhiteSpace(ch != 0xffff ? ch : *p)) {
inc();
}
}
- inline UBool inList(UChar c, const UChar* list) const {
+ inline UBool inList(char16_t c, const char16_t* list) const {
if (*list == SPACE && PatternProps::isWhiteSpace(c)) {
- return TRUE;
+ return true;
}
while (*list && *list != c) {
++list;
@@ -348,36 +348,36 @@ private:
}
void parseError(const char* msg);
- StringLocalizationInfo* doParse(void);
+ StringLocalizationInfo* doParse();
- UChar** nextArray(int32_t& requiredLength);
- UChar* nextString(void);
+ char16_t** nextArray(int32_t& requiredLength);
+ char16_t* nextString();
};
#ifdef RBNF_DEBUG
#define ERROR(msg) UPRV_BLOCK_MACRO_BEGIN { \
parseError(msg); \
- return NULL; \
+ return nullptr; \
} UPRV_BLOCK_MACRO_END
#define EXPLANATION_ARG explanationArg
#else
#define ERROR(msg) UPRV_BLOCK_MACRO_BEGIN { \
- parseError(NULL); \
- return NULL; \
+ parseError(nullptr); \
+ return nullptr; \
} UPRV_BLOCK_MACRO_END
#define EXPLANATION_ARG
#endif
-static const UChar DQUOTE_STOPLIST[] = {
+static const char16_t DQUOTE_STOPLIST[] = {
QUOTE, 0
};
-static const UChar SQUOTE_STOPLIST[] = {
+static const char16_t SQUOTE_STOPLIST[] = {
TICK, 0
};
-static const UChar NOQUOTE_STOPLIST[] = {
+static const char16_t NOQUOTE_STOPLIST[] = {
SPACE, COMMA, CLOSE_ANGLE, OPEN_ANGLE, TICK, QUOTE, 0
};
@@ -387,10 +387,10 @@ DeleteFn(void* p) {
}
StringLocalizationInfo*
-LocDataParser::parse(UChar* _data, int32_t len) {
+LocDataParser::parse(char16_t* _data, int32_t len) {
if (U_FAILURE(ec)) {
if (_data) uprv_free(_data);
- return NULL;
+ return nullptr;
}
pe.line = 0;
@@ -398,15 +398,15 @@ LocDataParser::parse(UChar* _data, int32_t len) {
pe.postContext[0] = 0;
pe.preContext[0] = 0;
- if (_data == NULL) {
+ if (_data == nullptr) {
ec = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if (len <= 0) {
ec = U_ILLEGAL_ARGUMENT_ERROR;
uprv_free(_data);
- return NULL;
+ return nullptr;
}
data = _data;
@@ -419,24 +419,24 @@ LocDataParser::parse(UChar* _data, int32_t len) {
StringLocalizationInfo*
-LocDataParser::doParse(void) {
+LocDataParser::doParse() {
skipWhitespace();
if (!checkInc(OPEN_ANGLE)) {
ERROR("Missing open angle");
} else {
VArray array(DeleteFn);
- UBool mightHaveNext = TRUE;
+ UBool mightHaveNext = true;
int32_t requiredLength = -1;
while (mightHaveNext) {
- mightHaveNext = FALSE;
- UChar** elem = nextArray(requiredLength);
+ mightHaveNext = false;
+ char16_t** elem = nextArray(requiredLength);
skipWhitespace();
UBool haveComma = check(COMMA);
if (elem) {
array.add(elem, ec);
if (haveComma) {
inc();
- mightHaveNext = TRUE;
+ mightHaveNext = true;
}
} else if (haveComma) {
ERROR("Unexpected character");
@@ -457,22 +457,22 @@ LocDataParser::doParse(void) {
ERROR("Extra text after close of localization data");
}
- array.add(NULL, ec);
+ array.add(nullptr, ec);
if (U_SUCCESS(ec)) {
- int32_t numLocs = array.length() - 2; // subtract first, NULL
- UChar*** result = (UChar***)array.release();
+ int32_t numLocs = array.length() - 2; // subtract first, nullptr
+ char16_t*** result = (char16_t***)array.release();
- return new StringLocalizationInfo(data, result, requiredLength-2, numLocs); // subtract first, NULL
+ return new StringLocalizationInfo(data, result, requiredLength-2, numLocs); // subtract first, nullptr
}
}
ERROR("Unknown error");
}
-UChar**
+char16_t**
LocDataParser::nextArray(int32_t& requiredLength) {
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
skipWhitespace();
@@ -481,17 +481,17 @@ LocDataParser::nextArray(int32_t& requiredLength) {
}
VArray array;
- UBool mightHaveNext = TRUE;
+ UBool mightHaveNext = true;
while (mightHaveNext) {
- mightHaveNext = FALSE;
- UChar* elem = nextString();
+ mightHaveNext = false;
+ char16_t* elem = nextString();
skipWhitespace();
UBool haveComma = check(COMMA);
if (elem) {
array.add(elem, ec);
if (haveComma) {
inc();
- mightHaveNext = TRUE;
+ mightHaveNext = true;
}
} else if (haveComma) {
ERROR("Unexpected comma");
@@ -506,7 +506,7 @@ LocDataParser::nextArray(int32_t& requiredLength) {
}
}
- array.add(NULL, ec);
+ array.add(nullptr, ec);
if (U_SUCCESS(ec)) {
if (requiredLength == -1) {
requiredLength = array.length() + 1;
@@ -515,19 +515,19 @@ LocDataParser::nextArray(int32_t& requiredLength) {
ERROR("Array not of required length");
}
- return (UChar**)array.release();
+ return (char16_t**)array.release();
}
ERROR("Unknown Error");
}
-UChar*
+char16_t*
LocDataParser::nextString() {
- UChar* result = NULL;
+ char16_t* result = nullptr;
skipWhitespace();
if (p < e) {
- const UChar* terminators;
- UChar c = *p;
+ const char16_t* terminators;
+ char16_t c = *p;
UBool haveQuote = c == QUOTE || c == TICK;
if (haveQuote) {
inc();
@@ -535,13 +535,13 @@ LocDataParser::nextString() {
} else {
terminators = NOQUOTE_STOPLIST;
}
- UChar* start = p;
+ char16_t* start = p;
while (p < e && !inList(*p, terminators)) ++p;
if (p == e) {
ERROR("Unexpected end of data");
}
- UChar x = *p;
+ char16_t x = *p;
if (p > start) {
ch = x;
*p = 0x0; // terminate by writing to data
@@ -569,17 +569,17 @@ void LocDataParser::parseError(const char* EXPLANATION_ARG)
return;
}
- const UChar* start = p - U_PARSE_CONTEXT_LEN - 1;
+ const char16_t* start = p - U_PARSE_CONTEXT_LEN - 1;
if (start < data) {
start = data;
}
- for (UChar* x = p; --x >= start;) {
+ for (char16_t* x = p; --x >= start;) {
if (!*x) {
start = x+1;
break;
}
}
- const UChar* limit = p + U_PARSE_CONTEXT_LEN - 1;
+ const char16_t* limit = p + U_PARSE_CONTEXT_LEN - 1;
if (limit > e) {
limit = e;
}
@@ -594,7 +594,7 @@ void LocDataParser::parseError(const char* EXPLANATION_ARG)
UnicodeString msg;
msg.append(start, p - start);
- msg.append((UChar)0x002f); /* SOLIDUS/SLASH */
+ msg.append((char16_t)0x002f); /* SOLIDUS/SLASH */
msg.append(p, limit-p);
msg.append(UNICODE_STRING_SIMPLE("'"));
@@ -610,9 +610,9 @@ void LocDataParser::parseError(const char* EXPLANATION_ARG)
#endif
uprv_free(data);
- data = NULL;
- p = NULL;
- e = NULL;
+ data = nullptr;
+ p = nullptr;
+ e = nullptr;
if (U_SUCCESS(ec)) {
ec = U_PARSE_ERROR;
@@ -624,18 +624,18 @@ void LocDataParser::parseError(const char* EXPLANATION_ARG)
StringLocalizationInfo*
StringLocalizationInfo::create(const UnicodeString& info, UParseError& perror, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
int32_t len = info.length();
if (len == 0) {
- return NULL; // no error;
+ return nullptr; // no error;
}
- UChar* p = (UChar*)uprv_malloc(len * sizeof(UChar));
+ char16_t* p = (char16_t*)uprv_malloc(len * sizeof(char16_t));
if (!p) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
info.extract(p, len, status);
if (!U_FAILURE(status)) {
@@ -647,7 +647,7 @@ StringLocalizationInfo::create(const UnicodeString& info, UParseError& perror, U
}
StringLocalizationInfo::~StringLocalizationInfo() {
- for (UChar*** p = (UChar***)data; *p; ++p) {
+ for (char16_t*** p = (char16_t***)data; *p; ++p) {
// remaining data is simply pointer into our unicode string data.
if (*p) uprv_free(*p);
}
@@ -656,29 +656,29 @@ StringLocalizationInfo::~StringLocalizationInfo() {
}
-const UChar*
+const char16_t*
StringLocalizationInfo::getRuleSetName(int32_t index) const {
if (index >= 0 && index < getNumberOfRuleSets()) {
return data[0][index];
}
- return NULL;
+ return nullptr;
}
-const UChar*
+const char16_t*
StringLocalizationInfo::getLocaleName(int32_t index) const {
if (index >= 0 && index < getNumberOfDisplayLocales()) {
return data[index+1][0];
}
- return NULL;
+ return nullptr;
}
-const UChar*
+const char16_t*
StringLocalizationInfo::getDisplayName(int32_t localeIndex, int32_t ruleIndex) const {
if (localeIndex >= 0 && localeIndex < getNumberOfDisplayLocales() &&
ruleIndex >= 0 && ruleIndex < getNumberOfRuleSets()) {
return data[localeIndex+1][ruleIndex+1];
}
- return NULL;
+ return nullptr;
}
// ----------
@@ -686,23 +686,23 @@ StringLocalizationInfo::getDisplayName(int32_t localeIndex, int32_t ruleIndex) c
RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
const UnicodeString& locs,
const Locale& alocale, UParseError& perror, UErrorCode& status)
- : fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ : fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(alocale)
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
LocalizationInfo* locinfo = StringLocalizationInfo::create(locs, perror, status);
init(description, locinfo, perror, status);
@@ -711,23 +711,23 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
const UnicodeString& locs,
UParseError& perror, UErrorCode& status)
- : fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ : fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(Locale::getDefault())
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
LocalizationInfo* locinfo = StringLocalizationInfo::create(locs, perror, status);
init(description, locinfo, perror, status);
@@ -736,23 +736,23 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
LocalizationInfo* info,
const Locale& alocale, UParseError& perror, UErrorCode& status)
- : fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ : fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(alocale)
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
init(description, info, perror, status);
}
@@ -760,70 +760,70 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
UParseError& perror,
UErrorCode& status)
- : fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ : fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(Locale::getDefault())
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
- init(description, NULL, perror, status);
+ init(description, nullptr, perror, status);
}
RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description,
const Locale& aLocale,
UParseError& perror,
UErrorCode& status)
- : fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ : fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(aLocale)
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
- init(description, NULL, perror, status);
+ init(description, nullptr, perror, status);
}
RuleBasedNumberFormat::RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale& alocale, UErrorCode& status)
- : fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ : fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(alocale)
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
if (U_FAILURE(status)) {
return;
@@ -840,18 +840,18 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale&
}
// TODO: read localization info from resource
- LocalizationInfo* locinfo = NULL;
+ LocalizationInfo* locinfo = nullptr;
UResourceBundle* nfrb = ures_open(U_ICUDATA_RBNF, locale.getName(), &status);
if (U_SUCCESS(status)) {
setLocaleIDs(ures_getLocaleByType(nfrb, ULOC_VALID_LOCALE, &status),
ures_getLocaleByType(nfrb, ULOC_ACTUAL_LOCALE, &status));
- UResourceBundle* rbnfRules = ures_getByKeyWithFallback(nfrb, rules_tag, NULL, &status);
+ UResourceBundle* rbnfRules = ures_getByKeyWithFallback(nfrb, rules_tag, nullptr, &status);
if (U_FAILURE(status)) {
ures_close(nfrb);
}
- UResourceBundle* ruleSets = ures_getByKeyWithFallback(rbnfRules, fmt_tag, NULL, &status);
+ UResourceBundle* ruleSets = ures_getByKeyWithFallback(rbnfRules, fmt_tag, nullptr, &status);
if (U_FAILURE(status)) {
ures_close(rbnfRules);
ures_close(nfrb);
@@ -860,7 +860,7 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale&
UnicodeString desc;
while (ures_hasNext(ruleSets)) {
- desc.append(ures_getNextUnicodeString(ruleSets,NULL,&status));
+ desc.append(ures_getNextUnicodeString(ruleSets,nullptr,&status));
}
UParseError perror;
@@ -874,23 +874,23 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale&
RuleBasedNumberFormat::RuleBasedNumberFormat(const RuleBasedNumberFormat& rhs)
: NumberFormat(rhs)
- , fRuleSets(NULL)
- , ruleSetDescriptions(NULL)
+ , fRuleSets(nullptr)
+ , ruleSetDescriptions(nullptr)
, numRuleSets(0)
- , defaultRuleSet(NULL)
+ , defaultRuleSet(nullptr)
, locale(rhs.locale)
- , collator(NULL)
- , decimalFormatSymbols(NULL)
- , defaultInfinityRule(NULL)
- , defaultNaNRule(NULL)
+ , collator(nullptr)
+ , decimalFormatSymbols(nullptr)
+ , defaultInfinityRule(nullptr)
+ , defaultNaNRule(nullptr)
, fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary)
- , lenient(FALSE)
- , lenientParseRules(NULL)
- , localizations(NULL)
- , capitalizationInfoSet(FALSE)
- , capitalizationForUIListMenu(FALSE)
- , capitalizationForStandAlone(FALSE)
- , capitalizationBrkIter(NULL)
+ , lenient(false)
+ , lenientParseRules(nullptr)
+ , localizations(nullptr)
+ , capitalizationInfoSet(false)
+ , capitalizationForUIListMenu(false)
+ , capitalizationForStandAlone(false)
+ , capitalizationBrkIter(nullptr)
{
this->operator=(rhs);
}
@@ -911,7 +911,7 @@ RuleBasedNumberFormat::operator=(const RuleBasedNumberFormat& rhs)
UParseError perror;
setDecimalFormatSymbols(*rhs.getDecimalFormatSymbols());
- init(rhs.originalDescription, rhs.localizations ? rhs.localizations->ref() : NULL, perror, status);
+ init(rhs.originalDescription, rhs.localizations ? rhs.localizations->ref() : nullptr, perror, status);
setDefaultRuleSet(rhs.getDefaultRuleSetName(), status);
setRoundingMode(rhs.getRoundingMode());
@@ -919,7 +919,7 @@ RuleBasedNumberFormat::operator=(const RuleBasedNumberFormat& rhs)
capitalizationForUIListMenu = rhs.capitalizationForUIListMenu;
capitalizationForStandAlone = rhs.capitalizationForStandAlone;
#if !UCONFIG_NO_BREAK_ITERATION
- capitalizationBrkIter = (rhs.capitalizationBrkIter!=NULL)? rhs.capitalizationBrkIter->clone(): NULL;
+ capitalizationBrkIter = (rhs.capitalizationBrkIter!=nullptr)? rhs.capitalizationBrkIter->clone(): nullptr;
#endif
return *this;
@@ -944,30 +944,30 @@ RuleBasedNumberFormat::operator==(const Format& other) const
}
if (typeid(*this) == typeid(other)) {
- const RuleBasedNumberFormat& rhs = (const RuleBasedNumberFormat&)other;
+ const RuleBasedNumberFormat& rhs = static_cast<const RuleBasedNumberFormat&>(other);
// test for capitalization info equality is adequately handled
// by the NumberFormat test for fCapitalizationContext equality;
// the info here is just derived from that.
if (locale == rhs.locale &&
lenient == rhs.lenient &&
- (localizations == NULL
- ? rhs.localizations == NULL
- : (rhs.localizations == NULL
+ (localizations == nullptr
+ ? rhs.localizations == nullptr
+ : (rhs.localizations == nullptr
? false
: *localizations == rhs.localizations))) {
NFRuleSet** p = fRuleSets;
NFRuleSet** q = rhs.fRuleSets;
- if (p == NULL) {
- return q == NULL;
- } else if (q == NULL) {
+ if (p == nullptr) {
+ return q == nullptr;
+ } else if (q == nullptr) {
return false;
}
while (*p && *q && (**p == **q)) {
++p;
++q;
}
- return *q == NULL && *p == NULL;
+ return *q == nullptr && *p == nullptr;
}
}
@@ -978,7 +978,7 @@ UnicodeString
RuleBasedNumberFormat::getRules() const
{
UnicodeString result;
- if (fRuleSets != NULL) {
+ if (fRuleSets != nullptr) {
for (NFRuleSet** p = fRuleSets; *p; ++p) {
(*p)->appendRules(result);
}
@@ -990,7 +990,7 @@ UnicodeString
RuleBasedNumberFormat::getRuleSetName(int32_t index) const
{
if (localizations) {
- UnicodeString string(TRUE, localizations->getRuleSetName(index), (int32_t)-1);
+ UnicodeString string(true, localizations->getRuleSetName(index), (int32_t)-1);
return string;
}
else if (fRuleSets) {
@@ -1027,7 +1027,7 @@ RuleBasedNumberFormat::getNumberOfRuleSetNames() const
}
int32_t
-RuleBasedNumberFormat::getNumberOfRuleSetDisplayNameLocales(void) const {
+RuleBasedNumberFormat::getNumberOfRuleSetDisplayNameLocales() const {
if (localizations) {
return localizations->getNumberOfDisplayLocales();
}
@@ -1040,13 +1040,13 @@ RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& st
return Locale("");
}
if (localizations && index >= 0 && index < localizations->getNumberOfDisplayLocales()) {
- UnicodeString name(TRUE, localizations->getLocaleName(index), -1);
+ UnicodeString name(true, localizations->getLocaleName(index), -1);
char buffer[64];
int32_t cap = name.length() + 1;
char* bp = buffer;
if (cap > 64) {
bp = (char *)uprv_malloc(cap);
- if (bp == NULL) {
+ if (bp == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return Locale("");
}
@@ -1068,12 +1068,12 @@ RuleBasedNumberFormat::getRuleSetDisplayName(int32_t index, const Locale& locale
if (localizations && index >= 0 && index < localizations->getNumberOfRuleSets()) {
UnicodeString localeName(localeParam.getBaseName(), -1, UnicodeString::kInvariant);
int32_t len = localeName.length();
- UChar* localeStr = localeName.getBuffer(len + 1);
+ char16_t* localeStr = localeName.getBuffer(len + 1);
while (len >= 0) {
localeStr[len] = 0;
int32_t ix = localizations->indexForLocale(localeStr);
if (ix >= 0) {
- UnicodeString name(TRUE, localizations->getDisplayName(ix, index), -1);
+ UnicodeString name(true, localizations->getDisplayName(ix, index), -1);
return name;
}
@@ -1081,7 +1081,7 @@ RuleBasedNumberFormat::getRuleSetDisplayName(int32_t index, const Locale& locale
do { --len;} while (len > 0 && localeStr[len] != 0x005f); // underscore
while (len > 0 && localeStr[len-1] == 0x005F) --len;
}
- UnicodeString name(TRUE, localizations->getRuleSetName(index), -1);
+ UnicodeString name(true, localizations->getRuleSetName(index), -1);
return name;
}
UnicodeString bogus;
@@ -1113,7 +1113,7 @@ RuleBasedNumberFormat::findRuleSet(const UnicodeString& name, UErrorCode& status
}
status = U_ILLEGAL_ARGUMENT_ERROR;
}
- return NULL;
+ return nullptr;
}
UnicodeString&
@@ -1326,7 +1326,7 @@ RuleBasedNumberFormat::adjustForCapitalizationContext(int32_t startPos,
if (capitalizationContext != UDISPCTX_CAPITALIZATION_NONE && startPos == 0 && currentResult.length() > 0) {
// capitalize currentResult according to context
UChar32 ch = currentResult.char32At(0);
- if (u_islower(ch) && U_SUCCESS(status) && capitalizationBrkIter != NULL &&
+ if (u_islower(ch) && U_SUCCESS(status) && capitalizationBrkIter != nullptr &&
( capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
(capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU && capitalizationForUIListMenu) ||
(capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_STANDALONE && capitalizationForStandAlone)) ) {
@@ -1402,7 +1402,7 @@ RuleBasedNumberFormat::setLenient(UBool enabled)
lenient = enabled;
if (!enabled && collator) {
delete collator;
- collator = NULL;
+ collator = nullptr;
}
}
@@ -1413,7 +1413,7 @@ RuleBasedNumberFormat::setDefaultRuleSet(const UnicodeString& ruleSetName, UErro
if (U_SUCCESS(status)) {
if (ruleSetName.isEmpty()) {
if (localizations) {
- UnicodeString name(TRUE, localizations->getRuleSetName(0), -1);
+ UnicodeString name(true, localizations->getRuleSetName(0), -1);
defaultRuleSet = findRuleSet(name, status);
} else {
initDefaultRuleSet();
@@ -1422,7 +1422,7 @@ RuleBasedNumberFormat::setDefaultRuleSet(const UnicodeString& ruleSetName, UErro
status = U_ILLEGAL_ARGUMENT_ERROR;
} else {
NFRuleSet* result = findRuleSet(ruleSetName, status);
- if (result != NULL) {
+ if (result != nullptr) {
defaultRuleSet = result;
}
}
@@ -1443,7 +1443,7 @@ RuleBasedNumberFormat::getDefaultRuleSetName() const {
void
RuleBasedNumberFormat::initDefaultRuleSet()
{
- defaultRuleSet = NULL;
+ defaultRuleSet = nullptr;
if (!fRuleSets) {
return;
}
@@ -1480,7 +1480,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali
{
// TODO: implement UParseError
uprv_memset(&pErr, 0, sizeof(UParseError));
- // Note: this can leave ruleSets == NULL, so remaining code should check
+ // Note: this can leave ruleSets == nullptr, so remaining code should check
if (U_FAILURE(status)) {
return;
}
@@ -1492,7 +1492,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali
return;
}
- this->localizations = localizationInfos == NULL ? NULL : localizationInfos->ref();
+ this->localizations = localizationInfos == nullptr ? nullptr : localizationInfos->ref();
UnicodeString description(rules);
if (!description.length()) {
@@ -1533,7 +1533,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali
// copy out the lenient-parse rules and delete them
// from the description
lenientParseRules = new UnicodeString();
- /* test for NULL */
+ /* test for nullptr */
if (lenientParseRules == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -1556,14 +1556,14 @@ 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 NULL */
+ /* test for nullptr */
if (fRuleSets == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
for (int i = 0; i <= numRuleSets; ++i) {
- fRuleSets[i] = NULL;
+ fRuleSets[i] = nullptr;
}
// divide up the descriptions into individual rule-set descriptions
@@ -1636,9 +1636,9 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali
// confirm the names, if any aren't in the rules, that's an error
// it is ok if the rules contain public rule sets that are not in this list
for (int32_t i = 0; i < localizationInfos->getNumberOfRuleSets(); ++i) {
- UnicodeString name(TRUE, localizationInfos->getRuleSetName(i), -1);
+ UnicodeString name(true, localizationInfos->getRuleSetName(i), -1);
NFRuleSet* rs = findRuleSet(name, status);
- if (rs == NULL) {
+ if (rs == nullptr) {
break; // error
}
if (i == 0) {
@@ -1661,17 +1661,17 @@ RuleBasedNumberFormat::setContext(UDisplayContext value, UErrorCode& status)
if (!capitalizationInfoSet &&
(value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE)) {
initCapitalizationContextInfo(locale);
- capitalizationInfoSet = TRUE;
+ capitalizationInfoSet = true;
}
#if !UCONFIG_NO_BREAK_ITERATION
- if ( capitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
+ if ( capitalizationBrkIter == nullptr && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
(value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU && capitalizationForUIListMenu) ||
(value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE && capitalizationForStandAlone)) ) {
status = U_ZERO_ERROR;
capitalizationBrkIter = BreakIterator::createSentenceInstance(locale, status);
if (U_FAILURE(status)) {
delete capitalizationBrkIter;
- capitalizationBrkIter = NULL;
+ capitalizationBrkIter = nullptr;
}
}
#endif
@@ -1682,15 +1682,15 @@ void
RuleBasedNumberFormat::initCapitalizationContextInfo(const Locale& thelocale)
{
#if !UCONFIG_NO_BREAK_ITERATION
- const char * localeID = (thelocale != NULL)? thelocale.getBaseName(): NULL;
+ const char * localeID = (thelocale != nullptr)? thelocale.getBaseName(): nullptr;
UErrorCode status = U_ZERO_ERROR;
- UResourceBundle *rb = ures_open(NULL, localeID, &status);
+ UResourceBundle *rb = ures_open(nullptr, localeID, &status);
rb = ures_getByKeyWithFallback(rb, "contextTransforms", rb, &status);
rb = ures_getByKeyWithFallback(rb, "number-spellout", rb, &status);
- if (U_SUCCESS(status) && rb != NULL) {
+ if (U_SUCCESS(status) && rb != nullptr) {
int32_t len = 0;
const int32_t * intVector = ures_getIntVector(rb, &len, &status);
- if (U_SUCCESS(status) && intVector != NULL && len >= 2) {
+ if (U_SUCCESS(status) && intVector != nullptr && len >= 2) {
capitalizationForUIListMenu = static_cast<UBool>(intVector[0]);
capitalizationForStandAlone = static_cast<UBool>(intVector[1]);
}
@@ -1748,34 +1748,34 @@ RuleBasedNumberFormat::dispose()
delete *p;
}
uprv_free(fRuleSets);
- fRuleSets = NULL;
+ fRuleSets = nullptr;
}
if (ruleSetDescriptions) {
delete [] ruleSetDescriptions;
- ruleSetDescriptions = NULL;
+ ruleSetDescriptions = nullptr;
}
#if !UCONFIG_NO_COLLATION
delete collator;
#endif
- collator = NULL;
+ collator = nullptr;
delete decimalFormatSymbols;
- decimalFormatSymbols = NULL;
+ decimalFormatSymbols = nullptr;
delete defaultInfinityRule;
- defaultInfinityRule = NULL;
+ defaultInfinityRule = nullptr;
delete defaultNaNRule;
- defaultNaNRule = NULL;
+ defaultNaNRule = nullptr;
delete lenientParseRules;
- lenientParseRules = NULL;
+ lenientParseRules = nullptr;
#if !UCONFIG_NO_BREAK_ITERATION
delete capitalizationBrkIter;
- capitalizationBrkIter = NULL;
+ capitalizationBrkIter = nullptr;
#endif
if (localizations) {
@@ -1799,11 +1799,11 @@ RuleBasedNumberFormat::getCollator() const
{
#if !UCONFIG_NO_COLLATION
if (!fRuleSets) {
- return NULL;
+ return nullptr;
}
// lazy-evaluate the collator
- if (collator == NULL && lenient) {
+ if (collator == nullptr && lenient) {
// create a default collator based on the formatter's locale,
// then pull out that collator's rules, append any additional
// rules specified in the description, and create a _new_
@@ -1813,18 +1813,18 @@ RuleBasedNumberFormat::getCollator() const
Collator* temp = Collator::createInstance(locale, status);
RuleBasedCollator* newCollator;
- if (U_SUCCESS(status) && (newCollator = dynamic_cast<RuleBasedCollator*>(temp)) != NULL) {
+ if (U_SUCCESS(status) && (newCollator = dynamic_cast<RuleBasedCollator*>(temp)) != nullptr) {
if (lenientParseRules) {
UnicodeString rules(newCollator->getRules());
rules.append(*lenientParseRules);
newCollator = new RuleBasedCollator(rules, status);
// Exit if newCollator could not be created.
- if (newCollator == NULL) {
- return NULL;
+ if (newCollator == nullptr) {
+ return nullptr;
}
} else {
- temp = NULL;
+ temp = nullptr;
}
if (U_SUCCESS(status)) {
newCollator->setAttribute(UCOL_DECOMPOSITION_MODE, UCOL_ON, status);
@@ -1875,7 +1875,7 @@ RuleBasedNumberFormat::initializeDefaultInfinityRule(UErrorCode &status)
if (U_FAILURE(status)) {
return nullptr;
}
- if (defaultInfinityRule == NULL) {
+ if (defaultInfinityRule == nullptr) {
UnicodeString rule(UNICODE_STRING_SIMPLE("Inf: "));
rule.append(getDecimalFormatSymbols()->getSymbol(DecimalFormatSymbols::kInfinitySymbol));
LocalPointer<NFRule> temp(new NFRule(this, rule, status), status);
@@ -1919,11 +1919,11 @@ RuleBasedNumberFormat::getDefaultNaNRule() const
void
RuleBasedNumberFormat::adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsToAdopt)
{
- if (symbolsToAdopt == NULL) {
- return; // do not allow caller to set decimalFormatSymbols to NULL
+ if (symbolsToAdopt == nullptr) {
+ return; // do not allow caller to set decimalFormatSymbols to nullptr
}
- if (decimalFormatSymbols != NULL) {
+ if (decimalFormatSymbols != nullptr) {
delete decimalFormatSymbols;
}
@@ -1934,11 +1934,11 @@ RuleBasedNumberFormat::adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsTo
UErrorCode status = U_ZERO_ERROR;
delete defaultInfinityRule;
- defaultInfinityRule = NULL;
+ defaultInfinityRule = nullptr;
initializeDefaultInfinityRule(status); // Reset with the new DecimalFormatSymbols
delete defaultNaNRule;
- defaultNaNRule = NULL;
+ defaultNaNRule = nullptr;
initializeDefaultNaNRule(status); // Reset with the new DecimalFormatSymbols
if (fRuleSets) {
diff --git a/contrib/libs/icu/i18n/rbt.cpp b/contrib/libs/icu/i18n/rbt.cpp
index 1de53e6071c..2176e89fddc 100644
--- a/contrib/libs/icu/i18n/rbt.cpp
+++ b/contrib/libs/icu/i18n/rbt.cpp
@@ -27,14 +27,14 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedTransliterator)
-static Replaceable *gLockedText = NULL;
+static Replaceable *gLockedText = nullptr;
void RuleBasedTransliterator::_construct(const UnicodeString& rules,
UTransDirection direction,
UParseError& parseError,
UErrorCode& status) {
fData = 0;
- isDataOwned = TRUE;
+ isDataOwned = true;
if (U_FAILURE(status)) {
return;
}
@@ -46,7 +46,7 @@ void RuleBasedTransliterator::_construct(const UnicodeString& rules,
}
if (parser.idBlockVector.size() != 0 ||
- parser.compoundFilter != NULL ||
+ parser.compoundFilter != nullptr ||
parser.dataVector.size() == 0) {
status = U_INVALID_RBT_SYNTAX; // ::ID blocks disallowed in RBT
return;
@@ -143,7 +143,7 @@ RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& id,
UnicodeFilter* adoptedFilter) :
Transliterator(id, adoptedFilter),
fData((TransliterationRuleData*)theData), // cast away const
- isDataOwned(FALSE) {
+ isDataOwned(false) {
setMaximumContextLength(fData->ruleSet.getMaximumContextLength());
}
@@ -241,7 +241,7 @@ RuleBasedTransliterator::handleTransliterate(Replaceable& text, UTransPosition&
// Double-locking must be prevented in these cases.
//
- UBool lockedMutexAtThisLevel = FALSE;
+ UBool lockedMutexAtThisLevel = false;
// Test whether this request is operating on the same text string as
// some other transliteration that is still in progress and holding the
@@ -263,11 +263,11 @@ RuleBasedTransliterator::handleTransliterate(Replaceable& text, UTransPosition&
umtx_lock(&transliteratorDataMutex); // Contention, longish waits possible here.
Mutex m;
gLockedText = &text;
- lockedMutexAtThisLevel = TRUE;
+ lockedMutexAtThisLevel = true;
}
// Check to make sure we don't dereference a null pointer.
- if (fData != NULL) {
+ if (fData != nullptr) {
while (index.start < index.limit &&
loopCount <= loopLimit &&
fData->ruleSet.transliterate(text, index, isIncremental)) {
@@ -277,7 +277,7 @@ RuleBasedTransliterator::handleTransliterate(Replaceable& text, UTransPosition&
if (lockedMutexAtThisLevel) {
{
Mutex m;
- gLockedText = NULL;
+ gLockedText = nullptr;
}
umtx_unlock(&transliteratorDataMutex);
}
@@ -292,14 +292,14 @@ UnicodeString& RuleBasedTransliterator::toRules(UnicodeString& rulesSource,
* Implement Transliterator framework
*/
void RuleBasedTransliterator::handleGetSourceSet(UnicodeSet& result) const {
- fData->ruleSet.getSourceTargetSet(result, FALSE);
+ fData->ruleSet.getSourceTargetSet(result, false);
}
/**
* Override Transliterator framework
*/
UnicodeSet& RuleBasedTransliterator::getTargetSet(UnicodeSet& result) const {
- return fData->ruleSet.getSourceTargetSet(result, TRUE);
+ return fData->ruleSet.getSourceTargetSet(result, true);
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/rbt.h b/contrib/libs/icu/i18n/rbt.h
index 8a43c90d462..59fa286a45a 100644
--- a/contrib/libs/icu/i18n/rbt.h
+++ b/contrib/libs/icu/i18n/rbt.h
@@ -193,7 +193,7 @@ public:
* @return The class ID for all objects of this class.
* @internal Use transliterator factory methods instead since this class will be removed in that release.
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* Returns a unique class ID <b>polymorphically</b>. This method
@@ -205,7 +205,7 @@ public:
* class have the same class ID. Objects of other classes have
* different class IDs.
*/
- virtual UClassID getDynamicClassID(void) const override;
+ virtual UClassID getDynamicClassID() const override;
private:
diff --git a/contrib/libs/icu/i18n/rbt_data.cpp b/contrib/libs/icu/i18n/rbt_data.cpp
index f3985fc7685..f4212848cb5 100644
--- a/contrib/libs/icu/i18n/rbt_data.cpp
+++ b/contrib/libs/icu/i18n/rbt_data.cpp
@@ -25,7 +25,7 @@ U_NAMESPACE_BEGIN
TransliterationRuleData::TransliterationRuleData(UErrorCode& status)
: UMemory(), ruleSet(status), variableNames(status),
- variables(0), variablesAreOwned(TRUE)
+ variables(0), variablesAreOwned(true)
{
if (U_FAILURE(status)) {
return;
@@ -37,7 +37,7 @@ TransliterationRuleData::TransliterationRuleData(UErrorCode& status)
TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& other) :
UMemory(other), ruleSet(other.ruleSet),
- variablesAreOwned(TRUE),
+ variablesAreOwned(true),
variablesBase(other.variablesBase),
variablesLength(other.variablesLength)
{
@@ -50,7 +50,7 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData&
UnicodeString* value =
new UnicodeString(*(const UnicodeString*)e->value.pointer);
// Exit out if value could not be created.
- if (value == NULL) {
+ if (value == nullptr) {
return;
}
variableNames.put(*(UnicodeString*)e->key.pointer, value, status);
@@ -59,14 +59,14 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData&
variables = 0;
if (other.variables != 0) {
variables = (UnicodeFunctor **)uprv_malloc(variablesLength * sizeof(UnicodeFunctor *));
- /* test for NULL */
+ /* test for nullptr */
if (variables == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
for (i=0; i<variablesLength; ++i) {
variables[i] = other.variables[i]->clone();
- if (variables[i] == NULL) {
+ if (variables[i] == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -78,7 +78,7 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData&
delete variables[n];
}
uprv_free(variables);
- variables = NULL;
+ variables = nullptr;
return;
}
diff --git a/contrib/libs/icu/i18n/rbt_data.h b/contrib/libs/icu/i18n/rbt_data.h
index 52a961dde01..43cbb4795b6 100644
--- a/contrib/libs/icu/i18n/rbt_data.h
+++ b/contrib/libs/icu/i18n/rbt_data.h
@@ -67,7 +67,7 @@ public:
Hashtable variableNames;
/**
- * Map category variable (UChar) to set (UnicodeFunctor).
+ * Map category variable (char16_t) to set (UnicodeFunctor).
* Variables that correspond to a set of characters are mapped
* from variable name to a stand-in character in data.variableNames.
* The stand-in then serves as a key in this hash to lookup the
@@ -91,7 +91,7 @@ public:
* variablesBase through variablesBase +
* variablesLength - 1 represent UnicodeFunctor objects.
*/
- UChar variablesBase;
+ char16_t variablesBase;
/**
* The length of variables.
@@ -118,7 +118,7 @@ public:
/**
* Given a stand-in character, return the UnicodeFunctor that it
- * represents, or NULL if it doesn't represent anything.
+ * represents, or nullptr if it doesn't represent anything.
* @param standIn the given stand-in character.
* @return the UnicodeFunctor that 'standIn' represents
*/
@@ -126,7 +126,7 @@ public:
/**
* Given a stand-in character, return the UnicodeMatcher that it
- * represents, or NULL if it doesn't represent anything or if it
+ * represents, or nullptr if it doesn't represent anything or if it
* represents something that is not a matcher.
* @param standIn the given stand-in character.
* @return return the UnicodeMatcher that 'standIn' represents
@@ -135,7 +135,7 @@ public:
/**
* Given a stand-in character, return the UnicodeReplacer that it
- * represents, or NULL if it doesn't represent anything or if it
+ * represents, or nullptr if it doesn't represent anything or if it
* represents something that is not a replacer.
* @param standIn the given stand-in character.
* @return return the UnicodeReplacer that 'standIn' represents
diff --git a/contrib/libs/icu/i18n/rbt_pars.cpp b/contrib/libs/icu/i18n/rbt_pars.cpp
index 2f207a8deb0..10482d5edb1 100644
--- a/contrib/libs/icu/i18n/rbt_pars.cpp
+++ b/contrib/libs/icu/i18n/rbt_pars.cpp
@@ -43,66 +43,66 @@
#include "putilimp.h"
// Operators
-#define VARIABLE_DEF_OP ((UChar)0x003D) /*=*/
-#define FORWARD_RULE_OP ((UChar)0x003E) /*>*/
-#define REVERSE_RULE_OP ((UChar)0x003C) /*<*/
-#define FWDREV_RULE_OP ((UChar)0x007E) /*~*/ // internal rep of <> op
+#define VARIABLE_DEF_OP ((char16_t)0x003D) /*=*/
+#define FORWARD_RULE_OP ((char16_t)0x003E) /*>*/
+#define REVERSE_RULE_OP ((char16_t)0x003C) /*<*/
+#define FWDREV_RULE_OP ((char16_t)0x007E) /*~*/ // internal rep of <> op
// Other special characters
-#define QUOTE ((UChar)0x0027) /*'*/
-#define ESCAPE ((UChar)0x005C) /*\*/
-#define END_OF_RULE ((UChar)0x003B) /*;*/
-#define RULE_COMMENT_CHAR ((UChar)0x0023) /*#*/
-
-#define SEGMENT_OPEN ((UChar)0x0028) /*(*/
-#define SEGMENT_CLOSE ((UChar)0x0029) /*)*/
-#define CONTEXT_ANTE ((UChar)0x007B) /*{*/
-#define CONTEXT_POST ((UChar)0x007D) /*}*/
-#define CURSOR_POS ((UChar)0x007C) /*|*/
-#define CURSOR_OFFSET ((UChar)0x0040) /*@*/
-#define ANCHOR_START ((UChar)0x005E) /*^*/
-#define KLEENE_STAR ((UChar)0x002A) /***/
-#define ONE_OR_MORE ((UChar)0x002B) /*+*/
-#define ZERO_OR_ONE ((UChar)0x003F) /*?*/
-
-#define DOT ((UChar)46) /*.*/
-
-static const UChar DOT_SET[] = { // "[^[:Zp:][:Zl:]\r\n$]";
+#define QUOTE ((char16_t)0x0027) /*'*/
+#define ESCAPE ((char16_t)0x005C) /*\*/
+#define END_OF_RULE ((char16_t)0x003B) /*;*/
+#define RULE_COMMENT_CHAR ((char16_t)0x0023) /*#*/
+
+#define SEGMENT_OPEN ((char16_t)0x0028) /*(*/
+#define SEGMENT_CLOSE ((char16_t)0x0029) /*)*/
+#define CONTEXT_ANTE ((char16_t)0x007B) /*{*/
+#define CONTEXT_POST ((char16_t)0x007D) /*}*/
+#define CURSOR_POS ((char16_t)0x007C) /*|*/
+#define CURSOR_OFFSET ((char16_t)0x0040) /*@*/
+#define ANCHOR_START ((char16_t)0x005E) /*^*/
+#define KLEENE_STAR ((char16_t)0x002A) /***/
+#define ONE_OR_MORE ((char16_t)0x002B) /*+*/
+#define ZERO_OR_ONE ((char16_t)0x003F) /*?*/
+
+#define DOT ((char16_t)46) /*.*/
+
+static const char16_t DOT_SET[] = { // "[^[:Zp:][:Zl:]\r\n$]";
91, 94, 91, 58, 90, 112, 58, 93, 91, 58, 90,
108, 58, 93, 92, 114, 92, 110, 36, 93, 0
};
// A function is denoted &Source-Target/Variant(text)
-#define FUNCTION ((UChar)38) /*&*/
+#define FUNCTION ((char16_t)38) /*&*/
// Aliases for some of the syntax characters. These are provided so
// transliteration rules can be expressed in XML without clashing with
// XML syntax characters '<', '>', and '&'.
-#define ALT_REVERSE_RULE_OP ((UChar)0x2190) // Left Arrow
-#define ALT_FORWARD_RULE_OP ((UChar)0x2192) // Right Arrow
-#define ALT_FWDREV_RULE_OP ((UChar)0x2194) // Left Right Arrow
-#define ALT_FUNCTION ((UChar)0x2206) // Increment (~Greek Capital Delta)
+#define ALT_REVERSE_RULE_OP ((char16_t)0x2190) // Left Arrow
+#define ALT_FORWARD_RULE_OP ((char16_t)0x2192) // Right Arrow
+#define ALT_FWDREV_RULE_OP ((char16_t)0x2194) // Left Right Arrow
+#define ALT_FUNCTION ((char16_t)0x2206) // Increment (~Greek Capital Delta)
// Special characters disallowed at the top level
-static const UChar ILLEGAL_TOP[] = {41,0}; // ")"
+static const char16_t ILLEGAL_TOP[] = {41,0}; // ")"
// Special characters disallowed within a segment
-static const UChar ILLEGAL_SEG[] = {123,125,124,64,0}; // "{}|@"
+static const char16_t ILLEGAL_SEG[] = {123,125,124,64,0}; // "{}|@"
// Special characters disallowed within a function argument
-static const UChar ILLEGAL_FUNC[] = {94,40,46,42,43,63,123,125,124,64,0}; // "^(.*+?{}|@"
+static const char16_t ILLEGAL_FUNC[] = {94,40,46,42,43,63,123,125,124,64,0}; // "^(.*+?{}|@"
// By definition, the ANCHOR_END special character is a
// trailing SymbolTable.SYMBOL_REF character.
// private static final char ANCHOR_END = '$';
-static const UChar gOPERATORS[] = { // "=><"
+static const char16_t gOPERATORS[] = { // "=><"
VARIABLE_DEF_OP, FORWARD_RULE_OP, REVERSE_RULE_OP,
ALT_FORWARD_RULE_OP, ALT_REVERSE_RULE_OP, ALT_FWDREV_RULE_OP,
0
};
-static const UChar HALF_ENDERS[] = { // "=><;"
+static const char16_t HALF_ENDERS[] = { // "=><;"
VARIABLE_DEF_OP, FORWARD_RULE_OP, REVERSE_RULE_OP,
ALT_FORWARD_RULE_OP, ALT_REVERSE_RULE_OP, ALT_FWDREV_RULE_OP,
END_OF_RULE,
@@ -111,15 +111,15 @@ static const UChar HALF_ENDERS[] = { // "=><;"
// These are also used in Transliterator::toRules()
static const int32_t ID_TOKEN_LEN = 2;
-static const UChar ID_TOKEN[] = { 0x3A, 0x3A }; // ':', ':'
+static const char16_t ID_TOKEN[] = { 0x3A, 0x3A }; // ':', ':'
/*
commented out until we do real ::BEGIN/::END functionality
static const int32_t BEGIN_TOKEN_LEN = 5;
-static const UChar BEGIN_TOKEN[] = { 0x42, 0x45, 0x47, 0x49, 0x4e }; // 'BEGIN'
+static const char16_t BEGIN_TOKEN[] = { 0x42, 0x45, 0x47, 0x49, 0x4e }; // 'BEGIN'
static const int32_t END_TOKEN_LEN = 3;
-static const UChar END_TOKEN[] = { 0x45, 0x4e, 0x44 }; // 'END'
+static const char16_t END_TOKEN[] = { 0x45, 0x4e, 0x44 }; // 'END'
*/
U_NAMESPACE_BEGIN
@@ -191,7 +191,7 @@ const UnicodeString* ParseData::lookup(const UnicodeString& name) const {
const UnicodeFunctor* ParseData::lookupMatcher(UChar32 ch) const {
// Note that we cannot use data.lookupSet() because the
// set array has not been constructed yet.
- const UnicodeFunctor* set = NULL;
+ const UnicodeFunctor* set = nullptr;
int32_t i = ch - data->variablesBase;
if (i >= 0 && i < variablesVector->size()) {
int32_t j = ch - data->variablesBase;
@@ -211,7 +211,7 @@ UnicodeString ParseData::parseReference(const UnicodeString& text,
int32_t i = start;
UnicodeString result;
while (i < limit) {
- UChar c = text.charAt(i);
+ char16_t c = text.charAt(i);
if ((i==start && !u_isIDStart(c)) || !u_isIDPart(c)) {
break;
}
@@ -231,9 +231,9 @@ UBool ParseData::isMatcher(UChar32 ch) {
int32_t i = ch - data->variablesBase;
if (i >= 0 && i < variablesVector->size()) {
UnicodeFunctor *f = (UnicodeFunctor*) variablesVector->elementAt(i);
- return f != NULL && f->toMatcher() != NULL;
+ return f != nullptr && f->toMatcher() != nullptr;
}
- return TRUE;
+ return true;
}
/**
@@ -246,9 +246,9 @@ UBool ParseData::isReplacer(UChar32 ch) {
int i = ch - data->variablesBase;
if (i >= 0 && i < variablesVector->size()) {
UnicodeFunctor *f = (UnicodeFunctor*) variablesVector->elementAt(i);
- return f != NULL && f->toReplacer() != NULL;
+ return f != nullptr && f->toReplacer() != nullptr;
}
- return TRUE;
+ return true;
}
//----------------------------------------------------------------------
@@ -348,7 +348,7 @@ RuleHalf::RuleHalf(TransliteratorParser& p) :
post = -1;
cursorOffset = 0;
cursorOffsetPos = 0;
- anchorStart = anchorEnd = FALSE;
+ anchorStart = anchorEnd = false;
nextSegmentNumber = 1;
}
@@ -364,7 +364,7 @@ RuleHalf::~RuleHalf() {
int32_t RuleHalf::parse(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
int32_t start = pos;
text.truncate(0);
- pos = parseSection(rule, pos, limit, text, UnicodeString(TRUE, ILLEGAL_TOP, -1), FALSE, status);
+ pos = parseSection(rule, pos, limit, text, UnicodeString(true, ILLEGAL_TOP, -1), false, status);
if (cursorOffset > 0 && cursor != cursorOffsetPos) {
return syntaxError(U_MISPLACED_CURSOR_OFFSET, rule, start, status);
@@ -403,7 +403,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
int32_t start = pos;
ParsePosition pp;
UnicodeString scratch;
- UBool done = FALSE;
+ UBool done = false;
int32_t quoteStart = -1; // Most recent 'single quoted string'
int32_t quoteLimit = -1;
int32_t varStart = -1; // Most recent $variableReference
@@ -413,14 +413,14 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
while (pos < limit && !done) {
// Since all syntax characters are in the BMP, fetching
// 16-bit code units suffices here.
- UChar c = rule.charAt(pos++);
+ char16_t c = rule.charAt(pos++);
if (PatternProps::isWhiteSpace(c)) {
// Ignore whitespace. Note that this is not Unicode
// spaces, but Java spaces -- a subset, representing
// whitespace likely to be seen in code.
continue;
}
- if (u_strchr(HALF_ENDERS, c) != NULL) {
+ if (u_strchr(HALF_ENDERS, c) != nullptr) {
if (isSegment) {
// Unclosed segment
return syntaxError(U_UNCLOSED_SEGMENT, rule, start, status);
@@ -511,7 +511,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
//------------------------------------------------------
case ANCHOR_START:
if (buf.length() == 0 && !anchorStart) {
- anchorStart = TRUE;
+ anchorStart = true;
} else {
return syntaxError(U_MISPLACED_ANCHOR_START,
rule, start, status);
@@ -529,7 +529,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
int32_t segmentNumber = nextSegmentNumber++; // 1-based
// Parse the segment
- pos = parseSection(rule, pos, limit, buf, UnicodeString(TRUE, ILLEGAL_SEG, -1), TRUE, status);
+ pos = parseSection(rule, pos, limit, buf, UnicodeString(true, ILLEGAL_SEG, -1), true, status);
// After parsing a segment, the relevant characters are
// in buf, starting at offset bufSegStart. Extract them
@@ -538,7 +538,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
StringMatcher* m =
new StringMatcher(buf, bufSegStart, buf.length(),
segmentNumber, *parser.curData);
- if (m == NULL) {
+ if (m == nullptr) {
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
@@ -555,14 +555,14 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
TransliteratorIDParser::SingleID* single =
TransliteratorIDParser::parseFilterID(rule, iref);
// The next character MUST be a segment open
- if (single == NULL ||
+ if (single == nullptr ||
!ICU_Utility::parseChar(rule, iref, SEGMENT_OPEN)) {
return syntaxError(U_INVALID_FUNCTION, rule, start, status);
}
Transliterator *t = single->createInstance();
delete single;
- if (t == NULL) {
+ if (t == nullptr) {
return syntaxError(U_INVALID_FUNCTION, rule, start, status);
}
@@ -571,7 +571,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
int32_t bufSegStart = buf.length();
// Parse the segment
- pos = parseSection(rule, iref, limit, buf, UnicodeString(TRUE, ILLEGAL_FUNC, -1), TRUE, status);
+ pos = parseSection(rule, iref, limit, buf, UnicodeString(true, ILLEGAL_FUNC, -1), true, status);
// After parsing a segment, the relevant characters are
// in buf, starting at offset bufSegStart.
@@ -579,7 +579,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
buf.extractBetween(bufSegStart, buf.length(), output);
FunctionReplacer *r =
new FunctionReplacer(t, new StringReplacer(output, parser.curData));
- if (r == NULL) {
+ if (r == nullptr) {
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
@@ -598,7 +598,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
if (pos == limit) {
// A variable ref character at the end acts as
// an anchor to the context limit, as in perl.
- anchorEnd = TRUE;
+ anchorEnd = true;
break;
}
// Parse "$1" "$2" .. "$9" .. (no upper limit)
@@ -621,7 +621,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
// end anchor then. If this also doesn't work
// (if we see a following character) then signal
// an error.
- anchorEnd = TRUE;
+ anchorEnd = true;
break;
}
pos = pp.getIndex();
@@ -673,7 +673,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
UnicodeFunctor *m =
new StringMatcher(buf, qstart, qlimit, 0, *parser.curData);
- if (m == NULL) {
+ if (m == nullptr) {
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
int32_t min = 0;
@@ -690,7 +690,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
// do nothing -- min, max already set
}
m = new Quantifier(m, min, max);
- if (m == NULL) {
+ if (m == nullptr) {
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
buf.truncate(qstart);
@@ -704,7 +704,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l
case SEGMENT_CLOSE:
// assert(isSegment);
// We're done parsing a segment.
- done = TRUE;
+ done = true;
break;
//------------------------------------------------------
@@ -786,7 +786,7 @@ void RuleHalf::removeContext() {
text.removeBetween(0, ante);
}
ante = post = -1;
- anchorStart = anchorEnd = FALSE;
+ anchorStart = anchorEnd = false;
}
/**
@@ -798,10 +798,10 @@ UBool RuleHalf::isValidOutput(TransliteratorParser& transParser) {
UChar32 c = text.char32At(i);
i += U16_LENGTH(c);
if (!transParser.parseData->isReplacer(c)) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/**
@@ -813,10 +813,10 @@ UBool RuleHalf::isValidInput(TransliteratorParser& transParser) {
UChar32 c = text.char32At(i);
i += U16_LENGTH(c);
if (!transParser.parseData->isMatcher(c)) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//----------------------------------------------------------------------
@@ -833,9 +833,9 @@ variablesVector(statusReturn),
segmentObjects(statusReturn)
{
idBlockVector.setDeleter(uprv_deleteUObject);
- curData = NULL;
- compoundFilter = NULL;
- parseData = NULL;
+ curData = nullptr;
+ compoundFilter = nullptr;
+ parseData = nullptr;
variableNames.setValueDeleter(uprv_deleteUObject);
}
@@ -867,7 +867,7 @@ TransliteratorParser::parse(const UnicodeString& rules,
*/
UnicodeSet* TransliteratorParser::orphanCompoundFilter() {
UnicodeSet* f = compoundFilter;
- compoundFilter = NULL;
+ compoundFilter = nullptr;
return f;
}
@@ -891,7 +891,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
uprv_memset(&parseError, 0, sizeof(parseError));
parseError.line = parseError.offset = -1;
- UBool parsingIDs = TRUE;
+ UBool parsingIDs = true;
int32_t ruleCount = 0;
while (!dataVector.isEmpty()) {
@@ -902,26 +902,26 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
}
idBlockVector.removeAllElements();
- curData = NULL;
+ curData = nullptr;
direction = theDirection;
ruleCount = 0;
delete compoundFilter;
- compoundFilter = NULL;
+ compoundFilter = nullptr;
while (!variablesVector.isEmpty()) {
delete (UnicodeFunctor*)variablesVector.orphanElementAt(0);
}
variableNames.removeAll();
parseData = new ParseData(0, &variablesVector, &variableNames);
- if (parseData == NULL) {
+ if (parseData == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- dotStandIn = (UChar) -1;
+ dotStandIn = (char16_t) -1;
- UnicodeString *tempstr = NULL; // used for memory allocation error checking
+ UnicodeString *tempstr = nullptr; // used for memory allocation error checking
UnicodeString str; // scratch
UnicodeString idBlockResult;
int32_t pos = 0;
@@ -932,18 +932,18 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
// and it is the offset to the _start_ of the compound filter
// pattern. Otherwise it is the offset to the _limit_ of the
// compound filter pattern within idBlockResult.
- compoundFilter = NULL;
+ compoundFilter = nullptr;
int32_t compoundFilterOffset = -1;
while (pos < limit && U_SUCCESS(status)) {
- UChar c = rule.charAt(pos++);
+ char16_t c = rule.charAt(pos++);
if (PatternProps::isWhiteSpace(c)) {
// Ignore leading whitespace.
continue;
}
// Skip lines starting with the comment character
if (c == RULE_COMMENT_CHAR) {
- pos = rule.indexOf((UChar)0x000A /*\n*/, pos) + 1;
+ pos = rule.indexOf((char16_t)0x000A /*\n*/, pos) + 1;
if (pos == 0) {
break; // No "\n" found; rest of rule is a comment
}
@@ -974,7 +974,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
int32_t p = pos;
if (!parsingIDs) {
- if (curData != NULL) {
+ if (curData != nullptr) {
U_ASSERT(!dataVector.hasDeleter());
if (direction == UTRANS_FORWARD)
dataVector.addElement(curData, status);
@@ -983,9 +983,9 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
if (U_FAILURE(status)) {
delete curData;
}
- curData = NULL;
+ curData = nullptr;
}
- parsingIDs = TRUE;
+ parsingIDs = true;
}
TransliteratorIDParser::SingleID* id =
@@ -1003,12 +1003,12 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
} else {
// Couldn't parse an ID. Try to parse a global filter
int32_t withParens = -1;
- UnicodeSet* f = TransliteratorIDParser::parseGlobalFilter(rule, p, direction, withParens, NULL);
- if (f != NULL) {
+ UnicodeSet* f = TransliteratorIDParser::parseGlobalFilter(rule, p, direction, withParens, nullptr);
+ if (f != nullptr) {
if (ICU_Utility::parseChar(rule, p, END_OF_RULE)
&& (direction == UTRANS_FORWARD) == (withParens == 0))
{
- if (compoundFilter != NULL) {
+ if (compoundFilter != nullptr) {
// Multiple compound filters
syntaxError(U_MULTIPLE_COMPOUND_FILTERS, rule, pos, status);
delete f;
@@ -1030,8 +1030,8 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
} else {
if (parsingIDs) {
tempstr = new UnicodeString(idBlockResult);
- // NULL pointer check
- if (tempstr == NULL) {
+ // nullptr pointer check
+ if (tempstr == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1044,10 +1044,10 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
return;
}
idBlockResult.remove();
- parsingIDs = FALSE;
+ parsingIDs = false;
curData = new TransliterationRuleData(status);
- // NULL pointer check
- if (curData == NULL) {
+ // nullptr pointer check
+ if (curData == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1075,8 +1075,8 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
if (parsingIDs && idBlockResult.length() > 0) {
tempstr = new UnicodeString(idBlockResult);
- // NULL pointer check
- if (tempstr == NULL) {
+ // nullptr pointer check
+ if (tempstr == nullptr) {
// TODO: Testing, forcing this path, shows many memory leaks. ICU-21701
// intltest translit/TransliteratorTest/TestInstantiation
status = U_MEMORY_ALLOCATION_ERROR;
@@ -1090,7 +1090,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
return;
}
}
- else if (!parsingIDs && curData != NULL) {
+ else if (!parsingIDs && curData != nullptr) {
if (direction == UTRANS_FORWARD) {
dataVector.addElement(curData, status);
} else {
@@ -1112,8 +1112,8 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
data->variables = 0;
} else {
data->variables = (UnicodeFunctor**)uprv_malloc(data->variablesLength * sizeof(UnicodeFunctor*));
- // NULL pointer check
- if (data->variables == NULL) {
+ // nullptr pointer check
+ if (data->variables == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1128,9 +1128,9 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
data->variableNames.removeAll();
int32_t p = UHASH_FIRST;
const UHashElement* he = variableNames.nextElement(p);
- while (he != NULL) {
+ while (he != nullptr) {
UnicodeString* tempus = ((UnicodeString*)(he->value.pointer))->clone();
- if (tempus == NULL) {
+ if (tempus == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1142,7 +1142,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule,
variablesVector.removeAllElements(); // keeps them from getting deleted when we succeed
// Index the rules
- if (compoundFilter != NULL) {
+ if (compoundFilter != nullptr) {
if ((direction == UTRANS_FORWARD && compoundFilterOffset != 1) ||
(direction == UTRANS_REVERSE && compoundFilterOffset != ruleCount)) {
status = U_MISPLACED_COMPOUND_FILTER;
@@ -1168,16 +1168,16 @@ void TransliteratorParser::setVariableRange(int32_t start, int32_t end, UErrorCo
return;
}
- curData->variablesBase = (UChar) start;
+ curData->variablesBase = (char16_t) start;
if (dataVector.size() == 0) {
- variableNext = (UChar) start;
- variableLimit = (UChar) (end + 1);
+ variableNext = (char16_t) start;
+ variableLimit = (char16_t) (end + 1);
}
}
/**
* Assert that the given character is NOT within the variable range.
- * If it is, return FALSE. This is necessary to ensure that the
+ * If it is, return false. This is necessary to ensure that the
* variable range does not overlap characters used in a rule.
*/
UBool TransliteratorParser::checkVariableRange(UChar32 ch) const {
@@ -1200,15 +1200,15 @@ void TransliteratorParser::pragmaNormalizeRules(UNormalizationMode /*mode*/) {
//TODO Finish
}
-static const UChar PRAGMA_USE[] = {0x75,0x73,0x65,0x20,0}; // "use "
+static const char16_t PRAGMA_USE[] = {0x75,0x73,0x65,0x20,0}; // "use "
-static const UChar PRAGMA_VARIABLE_RANGE[] = {0x7E,0x76,0x61,0x72,0x69,0x61,0x62,0x6C,0x65,0x20,0x72,0x61,0x6E,0x67,0x65,0x20,0x23,0x20,0x23,0x7E,0x3B,0}; // "~variable range # #~;"
+static const char16_t PRAGMA_VARIABLE_RANGE[] = {0x7E,0x76,0x61,0x72,0x69,0x61,0x62,0x6C,0x65,0x20,0x72,0x61,0x6E,0x67,0x65,0x20,0x23,0x20,0x23,0x7E,0x3B,0}; // "~variable range # #~;"
-static const UChar PRAGMA_MAXIMUM_BACKUP[] = {0x7E,0x6D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x62,0x61,0x63,0x6B,0x75,0x70,0x20,0x23,0x7E,0x3B,0}; // "~maximum backup #~;"
+static const char16_t PRAGMA_MAXIMUM_BACKUP[] = {0x7E,0x6D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x62,0x61,0x63,0x6B,0x75,0x70,0x20,0x23,0x7E,0x3B,0}; // "~maximum backup #~;"
-static const UChar PRAGMA_NFD_RULES[] = {0x7E,0x6E,0x66,0x64,0x20,0x72,0x75,0x6C,0x65,0x73,0x7E,0x3B,0}; // "~nfd rules~;"
+static const char16_t PRAGMA_NFD_RULES[] = {0x7E,0x6E,0x66,0x64,0x20,0x72,0x75,0x6C,0x65,0x73,0x7E,0x3B,0}; // "~nfd rules~;"
-static const UChar PRAGMA_NFC_RULES[] = {0x7E,0x6E,0x66,0x63,0x20,0x72,0x75,0x6C,0x65,0x73,0x7E,0x3B,0}; // "~nfc rules~;"
+static const char16_t PRAGMA_NFC_RULES[] = {0x7E,0x6E,0x66,0x63,0x20,0x72,0x75,0x6C,0x65,0x73,0x7E,0x3B,0}; // "~nfc rules~;"
/**
* Return true if the given rule looks like a pragma.
@@ -1218,7 +1218,7 @@ static const UChar PRAGMA_NFC_RULES[] = {0x7E,0x6E,0x66,0x63,0x20,0x72,0x75,0x6C
*/
UBool TransliteratorParser::resemblesPragma(const UnicodeString& rule, int32_t pos, int32_t limit) {
// Must start with /use\s/i
- return ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_USE, 4), NULL) >= 0;
+ return ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_USE, 4), nullptr) >= 0;
}
/**
@@ -1243,25 +1243,25 @@ int32_t TransliteratorParser::parsePragma(const UnicodeString& rule, int32_t pos
// use maximum backup 16;
// use nfd rules;
// use nfc rules;
- int p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_VARIABLE_RANGE, -1), array);
+ int p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_VARIABLE_RANGE, -1), array);
if (p >= 0) {
setVariableRange(array[0], array[1], status);
return p;
}
- p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_MAXIMUM_BACKUP, -1), array);
+ p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_MAXIMUM_BACKUP, -1), array);
if (p >= 0) {
pragmaMaximumBackup(array[0]);
return p;
}
- p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_NFD_RULES, -1), NULL);
+ p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_NFD_RULES, -1), nullptr);
if (p >= 0) {
pragmaNormalizeRules(UNORM_NFD);
return p;
}
- p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_NFC_RULES, -1), NULL);
+ p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_NFC_RULES, -1), nullptr);
if (p >= 0) {
pragmaNormalizeRules(UNORM_NFC);
return p;
@@ -1287,7 +1287,7 @@ int32_t TransliteratorParser::parsePragma(const UnicodeString& rule, int32_t pos
int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) {
// Locate the left side, operator, and right side
int32_t start = pos;
- UChar op = 0;
+ char16_t op = 0;
int32_t i;
// Set up segments data
@@ -1305,7 +1305,7 @@ int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos,
return start;
}
- if (pos == limit || u_strchr(gOPERATORS, (op = rule.charAt(--pos))) == NULL) {
+ if (pos == limit || u_strchr(gOPERATORS, (op = rule.charAt(--pos))) == nullptr) {
return syntaxError(U_MISSING_OPERATOR, rule, start, status);
}
++pos;
@@ -1366,8 +1366,8 @@ int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos,
}
// We allow anything on the right, including an empty string.
UnicodeString* value = new UnicodeString(right->text);
- // NULL pointer check
- if (value == NULL) {
+ // nullptr pointer check
+ if (value == nullptr) {
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
variableNames.put(undefinedVariableName, value, status);
@@ -1393,7 +1393,7 @@ int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos,
}
}
for (i=0; i<segmentObjects.size(); ++i) {
- if (segmentObjects.elementAt(i) == NULL) {
+ if (segmentObjects.elementAt(i) == nullptr) {
syntaxError(U_INTERNAL_TRANSLITERATOR_ERROR, rule, start, status); // will never happen
}
}
@@ -1451,11 +1451,11 @@ int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos,
}
// Flatten segment objects vector to an array
- UnicodeFunctor** segmentsArray = NULL;
+ UnicodeFunctor** segmentsArray = nullptr;
if (segmentObjects.size() > 0) {
segmentsArray = (UnicodeFunctor **)uprv_malloc(segmentObjects.size() * sizeof(UnicodeFunctor *));
// Null pointer check
- if (segmentsArray == NULL) {
+ if (segmentsArray == nullptr) {
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
segmentObjects.toArray((void**) segmentsArray);
@@ -1469,7 +1469,7 @@ int32_t TransliteratorParser::parseRule(const UnicodeString& rule, int32_t pos,
curData,
status);
//Null pointer check
- if (temptr == NULL) {
+ if (temptr == nullptr) {
uprv_free(segmentsArray);
return syntaxError(U_MEMORY_ALLOCATION_ERROR, rule, start, status);
}
@@ -1522,14 +1522,14 @@ int32_t TransliteratorParser::syntaxError(UErrorCode parseErrorCode,
* Parse a UnicodeSet out, store it, and return the stand-in character
* used to represent it.
*/
-UChar TransliteratorParser::parseSet(const UnicodeString& rule,
+char16_t TransliteratorParser::parseSet(const UnicodeString& rule,
ParsePosition& pos,
UErrorCode& status) {
UnicodeSet* set = new UnicodeSet(rule, pos, USET_IGNORE_SPACE, parseData, status);
// Null pointer check
- if (set == NULL) {
+ if (set == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return (UChar)0x0000; // Return empty character with error.
+ return (char16_t)0x0000; // Return empty character with error.
}
set->compact();
return generateStandInFor(set, status);
@@ -1539,14 +1539,14 @@ UChar TransliteratorParser::parseSet(const UnicodeString& rule,
* Generate and return a stand-in for a new UnicodeFunctor. Store
* the matcher (adopt it).
*/
-UChar TransliteratorParser::generateStandInFor(UnicodeFunctor* adopted, UErrorCode& status) {
+char16_t TransliteratorParser::generateStandInFor(UnicodeFunctor* adopted, UErrorCode& status) {
// assert(obj != null);
// Look up previous stand-in, if any. This is a short list
// (typical n is 0, 1, or 2); linear search is optimal.
for (int32_t i=0; i<variablesVector.size(); ++i) {
if (variablesVector.elementAt(i) == adopted) { // [sic] pointer comparison
- return (UChar) (curData->variablesBase + i);
+ return (char16_t) (curData->variablesBase + i);
}
}
@@ -1566,13 +1566,13 @@ UChar TransliteratorParser::generateStandInFor(UnicodeFunctor* adopted, UErrorCo
/**
* Return the standin for segment seg (1-based).
*/
-UChar TransliteratorParser::getSegmentStandin(int32_t seg, UErrorCode& status) {
+char16_t TransliteratorParser::getSegmentStandin(int32_t seg, UErrorCode& status) {
// Special character used to indicate an empty spot
- UChar empty = curData->variablesBase - 1;
+ char16_t empty = curData->variablesBase - 1;
while (segmentStandins.length() < seg) {
segmentStandins.append(empty);
}
- UChar c = segmentStandins.charAt(seg-1);
+ char16_t c = segmentStandins.charAt(seg-1);
if (c == empty) {
if (variableNext >= variableLimit) {
status = U_VARIABLE_RANGE_EXHAUSTED;
@@ -1582,7 +1582,7 @@ UChar TransliteratorParser::getSegmentStandin(int32_t seg, UErrorCode& status) {
// Set a placeholder in the primary variables vector that will be
// filled in later by setSegmentObject(). We know that we will get
// called first because setSegmentObject() will call us.
- variablesVector.addElement((void*) NULL, status);
+ variablesVector.addElement((void*) nullptr, status);
segmentStandins.setCharAt(seg-1, c);
}
return c;
@@ -1603,8 +1603,8 @@ void TransliteratorParser::setSegmentObject(int32_t seg, StringMatcher* adopted,
return;
}
int32_t index = getSegmentStandin(seg, status) - curData->variablesBase;
- if (segmentObjects.elementAt(seg-1) != NULL ||
- variablesVector.elementAt(index) != NULL) {
+ if (segmentObjects.elementAt(seg-1) != nullptr ||
+ variablesVector.elementAt(index) != nullptr) {
// should never happen
if (U_SUCCESS(status)) {status = U_INTERNAL_TRANSLITERATOR_ERROR;}
return;
@@ -1618,13 +1618,13 @@ void TransliteratorParser::setSegmentObject(int32_t seg, StringMatcher* adopted,
* Return the stand-in for the dot set. It is allocated the first
* time and reused thereafter.
*/
-UChar TransliteratorParser::getDotStandIn(UErrorCode& status) {
- if (dotStandIn == (UChar) -1) {
- UnicodeSet* tempus = new UnicodeSet(UnicodeString(TRUE, DOT_SET, -1), status);
+char16_t TransliteratorParser::getDotStandIn(UErrorCode& status) {
+ if (dotStandIn == (char16_t) -1) {
+ UnicodeSet* tempus = new UnicodeSet(UnicodeString(true, DOT_SET, -1), status);
// Null pointer check.
- if (tempus == NULL) {
+ if (tempus == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return (UChar)0x0000;
+ return (char16_t)0x0000;
}
dotStandIn = generateStandInFor(tempus, status);
}
@@ -1639,7 +1639,7 @@ void TransliteratorParser::appendVariableDef(const UnicodeString& name,
UnicodeString& buf,
UErrorCode& status) {
const UnicodeString* s = (const UnicodeString*) variableNames.get(name);
- if (s == NULL) {
+ if (s == nullptr) {
// We allow one undefined variable so that variable definition
// statements work. For the first undefined variable we return
// the special placeholder variableLimit-1, and save the variable
@@ -1651,7 +1651,7 @@ void TransliteratorParser::appendVariableDef(const UnicodeString& name,
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- buf.append((UChar) --variableLimit);
+ buf.append((char16_t) --variableLimit);
} else {
//throw new IllegalArgumentException("Undefined variable $"
// + name);
@@ -1673,15 +1673,15 @@ void TransliteratorParser::appendVariableDef(const UnicodeString& name,
U_NAMESPACE_END
U_CAPI int32_t
-utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorCode *status) {
+utrans_stripRules(const char16_t *source, int32_t sourceLen, char16_t *target, UErrorCode *status) {
U_NAMESPACE_USE
- //const UChar *sourceStart = source;
- const UChar *targetStart = target;
- const UChar *sourceLimit = source+sourceLen;
- UChar *targetLimit = target+sourceLen;
+ //const char16_t *sourceStart = source;
+ const char16_t *targetStart = target;
+ const char16_t *sourceLimit = source+sourceLen;
+ char16_t *targetLimit = target+sourceLen;
UChar32 c = 0;
- UBool quoted = FALSE;
+ UBool quoted = false;
int32_t index;
uprv_memset(target, 0, sourceLen*U_SIZEOF_UCHAR);
@@ -1748,7 +1748,7 @@ utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorC
/* ignore spaces carriage returns, and all leading spaces on the next line.
* and line feed unless in the form \uXXXX
*/
- quoted = FALSE;
+ quoted = false;
while (source < sourceLimit) {
c = *(source);
if (c != CR && c != LF && c != 0x0020) {
@@ -1759,7 +1759,7 @@ utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorC
continue;
}
- /* Append UChar * after dissembling if c > 0xffff*/
+ /* Append char16_t * after dissembling if c > 0xffff*/
index=0;
U16_APPEND_UNSAFE(target, index, c);
target+=index;
diff --git a/contrib/libs/icu/i18n/rbt_pars.h b/contrib/libs/icu/i18n/rbt_pars.h
index d1a4cd6997c..11cf50e756c 100644
--- a/contrib/libs/icu/i18n/rbt_pars.h
+++ b/contrib/libs/icu/i18n/rbt_pars.h
@@ -107,14 +107,14 @@ class TransliteratorParser : public UMemory {
* <code>variableLimit</code>. At any point during parsing, available
* variables are <code>variableNext..variableLimit-1</code>.
*/
- UChar variableNext;
+ char16_t variableNext;
/**
* The last available stand-in for variables. This is discovered
* dynamically. At any point during parsing, available variables are
* <code>variableNext..variableLimit-1</code>.
*/
- UChar variableLimit;
+ char16_t variableLimit;
/**
* When we encounter an undefined variable, we do not immediately signal
@@ -130,7 +130,7 @@ class TransliteratorParser : public UMemory {
* patterns. This is allocated the first time it is needed, and
* reused thereafter.
*/
- UChar dotStandIn;
+ char16_t dotStandIn;
public:
@@ -272,9 +272,9 @@ private:
* @param pos the position in pattern at which to start parsing.
* @return the stand-in character used to represent it.
*/
- UChar parseSet(const UnicodeString& rule,
- ParsePosition& pos,
- UErrorCode& status);
+ char16_t parseSet(const UnicodeString& rule,
+ ParsePosition& pos,
+ UErrorCode& status);
/**
* Generate and return a stand-in for a new UnicodeFunctor. Store
@@ -282,14 +282,14 @@ private:
* @param adopted the UnicodeFunctor to be adopted.
* @return a stand-in for a new UnicodeFunctor.
*/
- UChar generateStandInFor(UnicodeFunctor* adopted, UErrorCode& status);
+ char16_t generateStandInFor(UnicodeFunctor* adopted, UErrorCode& status);
/**
* Return the standin for segment seg (1-based).
* @param seg the given segment.
* @return the standIn character for the given segment.
*/
- UChar getSegmentStandin(int32_t seg, UErrorCode& status);
+ char16_t getSegmentStandin(int32_t seg, UErrorCode& status);
/**
* Set the object for segment seg (1-based).
@@ -303,7 +303,7 @@ private:
* time and reused thereafter.
* @return the stand-in for the dot set.
*/
- UChar getDotStandIn(UErrorCode& status);
+ char16_t getDotStandIn(UErrorCode& status);
/**
* Append the value of the given variable name to the given
diff --git a/contrib/libs/icu/i18n/rbt_rule.cpp b/contrib/libs/icu/i18n/rbt_rule.cpp
index 6cc5325c467..da8e4eaa1fb 100644
--- a/contrib/libs/icu/i18n/rbt_rule.cpp
+++ b/contrib/libs/icu/i18n/rbt_rule.cpp
@@ -26,7 +26,7 @@
#include "util.h"
#include "putilimp.h"
-static const UChar FORWARD_OP[] = {32,62,32,0}; // " > "
+static const char16_t FORWARD_OP[] = {32,62,32,0}; // " > "
U_NAMESPACE_BEGIN
@@ -50,9 +50,9 @@ U_NAMESPACE_BEGIN
* segments, or null if there are none. The array itself is adopted,
* but the pointers within it are not.
* @param segsCount number of elements in segs[]
- * @param anchorStart TRUE if the the rule is anchored on the left to
+ * @param anchorStart true if the the rule is anchored on the left to
* the context start
- * @param anchorEnd TRUE if the rule is anchored on the right to the
+ * @param anchorEnd true if the rule is anchored on the right to the
* context limit
*/
TransliterationRule::TransliterationRule(const UnicodeString& input,
@@ -116,22 +116,22 @@ TransliterationRule::TransliterationRule(const UnicodeString& input,
flags |= ANCHOR_END;
}
- anteContext = NULL;
+ anteContext = nullptr;
if (anteContextLength > 0) {
anteContext = new StringMatcher(pattern, 0, anteContextLength,
- FALSE, *data);
- /* test for NULL */
+ false, *data);
+ /* test for nullptr */
if (anteContext == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
}
- key = NULL;
+ key = nullptr;
if (keyLength > 0) {
key = new StringMatcher(pattern, anteContextLength, anteContextLength + keyLength,
- FALSE, *data);
- /* test for NULL */
+ false, *data);
+ /* test for nullptr */
if (key == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -139,11 +139,11 @@ TransliterationRule::TransliterationRule(const UnicodeString& input,
}
int32_t postContextLength = pattern.length() - keyLength - anteContextLength;
- postContext = NULL;
+ postContext = nullptr;
if (postContextLength > 0) {
postContext = new StringMatcher(pattern, anteContextLength + keyLength, pattern.length(),
- FALSE, *data);
- /* test for NULL */
+ false, *data);
+ /* test for nullptr */
if (postContext == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -151,7 +151,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input,
}
this->output = new StringReplacer(outputStr, cursorPosition + cursorOffset, data);
- /* test for NULL */
+ /* test for nullptr */
if (this->output == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -163,29 +163,29 @@ TransliterationRule::TransliterationRule(const UnicodeString& input,
*/
TransliterationRule::TransliterationRule(TransliterationRule& other) :
UMemory(other),
- anteContext(NULL),
- key(NULL),
- postContext(NULL),
+ anteContext(nullptr),
+ key(nullptr),
+ postContext(nullptr),
pattern(other.pattern),
anteContextLength(other.anteContextLength),
keyLength(other.keyLength),
flags(other.flags),
data(other.data) {
- segments = NULL;
+ segments = nullptr;
segmentsCount = 0;
if (other.segmentsCount > 0) {
segments = (UnicodeFunctor **)uprv_malloc(other.segmentsCount * sizeof(UnicodeFunctor *));
uprv_memcpy(segments, other.segments, (size_t)other.segmentsCount*sizeof(segments[0]));
}
- if (other.anteContext != NULL) {
+ if (other.anteContext != nullptr) {
anteContext = other.anteContext->clone();
}
- if (other.key != NULL) {
+ if (other.key != nullptr) {
key = other.key->clone();
}
- if (other.postContext != NULL) {
+ if (other.postContext != nullptr) {
postContext = other.postContext->clone();
}
output = other.output->clone();
@@ -208,7 +208,7 @@ TransliterationRule::~TransliterationRule() {
* needed to make repeated incremental transliteration with
* anchors work.
*/
-int32_t TransliterationRule::getContextLength(void) const {
+int32_t TransliterationRule::getContextLength() const {
return anteContextLength + ((flags & ANCHOR_START) ? 1 : 0);
}
@@ -225,7 +225,7 @@ int16_t TransliterationRule::getIndexValue() const {
return -1;
}
UChar32 c = pattern.char32At(anteContextLength);
- return (int16_t)(data->lookupMatcher(c) == NULL ? (c & 0xFF) : -1);
+ return (int16_t)(data->lookupMatcher(c) == nullptr ? (c & 0xFF) : -1);
}
/**
@@ -241,8 +241,8 @@ int16_t TransliterationRule::getIndexValue() const {
UBool TransliterationRule::matchesIndexValue(uint8_t v) const {
// Delegate to the key, or if there is none, to the postContext.
// If there is neither then we match any key; return true.
- UnicodeMatcher *m = (key != NULL) ? key : postContext;
- return (m != NULL) ? m->matchesIndexValue(v) : TRUE;
+ UnicodeMatcher *m = (key != nullptr) ? key : postContext;
+ return (m != nullptr) ? m->matchesIndexValue(v) : true;
}
/**
@@ -343,11 +343,11 @@ static inline int32_t posAfter(const Replaceable& str, int32_t pos) {
*
* @param text the text
* @param pos the position indices
- * @param incremental if TRUE, test for partial matches that may
+ * @param incremental if true, test for partial matches that may
* be completed by additional text inserted at pos.limit.
* @return one of <code>U_MISMATCH</code>,
* <code>U_PARTIAL_MATCH</code>, or <code>U_MATCH</code>. If
- * incremental is FALSE then U_PARTIAL_MATCH will not be returned.
+ * incremental is false then U_PARTIAL_MATCH will not be returned.
*/
UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text,
UTransPosition& pos,
@@ -361,7 +361,7 @@ UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text,
// ============================ MATCH ===========================
// Reset segment match data
- if (segments != NULL) {
+ if (segments != nullptr) {
for (int32_t i=0; i<segmentsCount; ++i) {
((StringMatcher*) segments[i])->resetMatch();
}
@@ -391,8 +391,8 @@ UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text,
// Start reverse match at char before pos.start
oText = posBefore(text, pos.start);
- if (anteContext != NULL) {
- match = anteContext->matches(text, oText, anteLimit, FALSE);
+ if (anteContext != nullptr) {
+ match = anteContext->matches(text, oText, anteLimit, false);
if (match != U_MATCH) {
return U_MISMATCH;
}
@@ -410,7 +410,7 @@ UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text,
oText = pos.start;
- if (key != NULL) {
+ if (key != nullptr) {
match = key->matches(text, oText, pos.limit, incremental);
if (match != U_MATCH) {
return match;
@@ -419,7 +419,7 @@ UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text,
keyLimit = oText;
- if (postContext != NULL) {
+ if (postContext != nullptr) {
if (incremental && keyLimit == pos.limit) {
// The key matches just before pos.limit, and there is
// a postContext. Since we are in incremental mode,
@@ -477,51 +477,51 @@ UnicodeString& TransliterationRule::toRule(UnicodeString& rule,
// Do not emit the braces '{' '}' around the pattern if there
// is neither anteContext nor postContext.
UBool emitBraces =
- (anteContext != NULL) || (postContext != NULL);
+ (anteContext != nullptr) || (postContext != nullptr);
// Emit start anchor
if ((flags & ANCHOR_START) != 0) {
- rule.append((UChar)94/*^*/);
+ rule.append((char16_t)94/*^*/);
}
// Emit the input pattern
ICU_Utility::appendToRule(rule, anteContext, escapeUnprintable, quoteBuf);
if (emitBraces) {
- ICU_Utility::appendToRule(rule, (UChar) 0x007B /*{*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t) 0x007B /*{*/, true, escapeUnprintable, quoteBuf);
}
ICU_Utility::appendToRule(rule, key, escapeUnprintable, quoteBuf);
if (emitBraces) {
- ICU_Utility::appendToRule(rule, (UChar) 0x007D /*}*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t) 0x007D /*}*/, true, escapeUnprintable, quoteBuf);
}
ICU_Utility::appendToRule(rule, postContext, escapeUnprintable, quoteBuf);
// Emit end anchor
if ((flags & ANCHOR_END) != 0) {
- rule.append((UChar)36/*$*/);
+ rule.append((char16_t)36/*$*/);
}
- ICU_Utility::appendToRule(rule, UnicodeString(TRUE, FORWARD_OP, 3), TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, UnicodeString(true, FORWARD_OP, 3), true, escapeUnprintable, quoteBuf);
// Emit the output pattern
ICU_Utility::appendToRule(rule, output->toReplacer()->toReplacerPattern(str, escapeUnprintable),
- TRUE, escapeUnprintable, quoteBuf);
+ true, escapeUnprintable, quoteBuf);
- ICU_Utility::appendToRule(rule, (UChar) 0x003B /*;*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t) 0x003B /*;*/, true, escapeUnprintable, quoteBuf);
return rule;
}
void TransliterationRule::setData(const TransliterationRuleData* d) {
data = d;
- if (anteContext != NULL) anteContext->setData(d);
- if (postContext != NULL) postContext->setData(d);
- if (key != NULL) key->setData(d);
- // assert(output != NULL);
+ if (anteContext != nullptr) anteContext->setData(d);
+ if (postContext != nullptr) postContext->setData(d);
+ if (key != nullptr) key->setData(d);
+ // assert(output != nullptr);
output->setData(d);
// Don't have to do segments since they are in the context or key
}
@@ -536,7 +536,7 @@ void TransliterationRule::addSourceSetTo(UnicodeSet& toUnionTo) const {
UChar32 ch = pattern.char32At(i);
i += U16_LENGTH(ch);
const UnicodeMatcher* matcher = data->lookupMatcher(ch);
- if (matcher == NULL) {
+ if (matcher == nullptr) {
toUnionTo.add(ch);
} else {
matcher->addMatchSetTo(toUnionTo);
diff --git a/contrib/libs/icu/i18n/rbt_rule.h b/contrib/libs/icu/i18n/rbt_rule.h
index b927f5d6c05..c6f5151d4cf 100644
--- a/contrib/libs/icu/i18n/rbt_rule.h
+++ b/contrib/libs/icu/i18n/rbt_rule.h
@@ -108,7 +108,7 @@ private:
UnicodeFunctor** segments;
/**
- * The number of elements in segments[] or zero if segments is NULL.
+ * The number of elements in segments[] or zero if segments is nullptr.
*/
int32_t segmentsCount;
@@ -217,7 +217,7 @@ public:
* anchors work.
* @return the preceding context length.
*/
- virtual int32_t getContextLength(void) const;
+ virtual int32_t getContextLength() const;
/**
* Internal method. Returns 8-bit index value for this rule.
diff --git a/contrib/libs/icu/i18n/rbt_set.cpp b/contrib/libs/icu/i18n/rbt_set.cpp
index abc4413c2c6..c0a2ccd8687 100644
--- a/contrib/libs/icu/i18n/rbt_set.cpp
+++ b/contrib/libs/icu/i18n/rbt_set.cpp
@@ -61,9 +61,9 @@ static UnicodeString& _formatInput(UnicodeString &appendTo,
input.extractBetween(pos.start, pos.limit, c);
input.extractBetween(pos.limit, pos.contextLimit, d);
input.extractBetween(pos.contextLimit, input.length(), e);
- appendTo.append(a).append((UChar)123/*{*/).append(b).
- append((UChar)124/*|*/).append(c).append((UChar)124/*|*/).append(d).
- append((UChar)125/*}*/).append(e);
+ appendTo.append(a).append((char16_t)123/*{*/).append(b).
+ append((char16_t)124/*|*/).append(c).append((char16_t)124/*|*/).append(d).
+ append((char16_t)125/*}*/).append(e);
} else {
appendTo.append("INVALID UTransPosition");
//appendTo.append((UnicodeString)"INVALID UTransPosition {cs=" +
@@ -78,7 +78,7 @@ static UnicodeString& _formatInput(UnicodeString &appendTo,
UnicodeString& _appendHex(uint32_t number,
int32_t digits,
UnicodeString& target) {
- static const UChar digitString[] = {
+ static const char16_t digitString[] = {
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0
};
@@ -114,8 +114,8 @@ inline void _debugOut(const char* msg, TransliterationRule* rule,
UnicodeString buf(msg, "");
if (rule) {
UnicodeString r;
- rule->toRule(r, TRUE);
- buf.append((UChar)32).append(r);
+ rule->toRule(r, true);
+ buf.append((char16_t)32).append(r);
}
buf.append(UnicodeString(" => ", ""));
UnicodeString* text = (UnicodeString*)&theText;
@@ -145,14 +145,14 @@ static void maskingError(const icu::TransliterationRule& rule1,
parseError.line = parseError.offset = -1;
// for pre-context
- rule1.toRule(r, FALSE);
+ rule1.toRule(r, false);
len = uprv_min(r.length(), U_PARSE_CONTEXT_LEN-1);
r.extract(0, len, parseError.preContext);
parseError.preContext[len] = 0;
//for post-context
r.truncate(0);
- rule2.toRule(r, FALSE);
+ rule2.toRule(r, false);
len = uprv_min(r.length(), U_PARSE_CONTEXT_LEN-1);
r.extract(0, len, parseError.postContext);
parseError.postContext[len] = 0;
@@ -163,16 +163,13 @@ U_NAMESPACE_BEGIN
/**
* Construct a new empty rule set.
*/
-TransliterationRuleSet::TransliterationRuleSet(UErrorCode& status) : UMemory() {
- ruleVector = new UVector(&_deleteRule, NULL, status);
+TransliterationRuleSet::TransliterationRuleSet(UErrorCode& status) :
+ UMemory(), ruleVector(nullptr), rules(nullptr), index {}, maxContextLength(0) {
+ LocalPointer<UVector> lpRuleVector(new UVector(_deleteRule, nullptr, status), status);
if (U_FAILURE(status)) {
return;
}
- if (ruleVector == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
- rules = NULL;
- maxContextLength = 0;
+ ruleVector = lpRuleVector.orphan();
}
/**
@@ -180,27 +177,24 @@ TransliterationRuleSet::TransliterationRuleSet(UErrorCode& status) : UMemory() {
*/
TransliterationRuleSet::TransliterationRuleSet(const TransliterationRuleSet& other) :
UMemory(other),
- ruleVector(0),
- rules(0),
+ ruleVector(nullptr),
+ rules(nullptr),
maxContextLength(other.maxContextLength) {
int32_t i, len;
uprv_memcpy(index, other.index, sizeof(index));
UErrorCode status = U_ZERO_ERROR;
- ruleVector = new UVector(&_deleteRule, NULL, status);
- if (other.ruleVector != 0 && ruleVector != 0 && U_SUCCESS(status)) {
+ LocalPointer<UVector> lpRuleVector(new UVector(_deleteRule, nullptr, status), status);
+ if (U_FAILURE(status)) {
+ return;
+ }
+ ruleVector = lpRuleVector.orphan();
+ if (other.ruleVector != nullptr && U_SUCCESS(status)) {
len = other.ruleVector->size();
for (i=0; i<len && U_SUCCESS(status); ++i) {
- TransliterationRule *tempTranslitRule = new TransliterationRule(*(TransliterationRule*)other.ruleVector->elementAt(i));
- // Null pointer test
- if (tempTranslitRule == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- break;
- }
- ruleVector->addElementX(tempTranslitRule, status);
- if (U_FAILURE(status)) {
- break;
- }
+ LocalPointer<TransliterationRule> tempTranslitRule(
+ new TransliterationRule(*(TransliterationRule*)other.ruleVector->elementAt(i)), status);
+ ruleVector->adoptElement(tempTranslitRule.orphan(), status);
}
}
if (other.rules != 0 && U_SUCCESS(status)) {
@@ -231,7 +225,7 @@ void TransliterationRuleSet::setData(const TransliterationRuleData* d) {
* Return the maximum context length.
* @return the length of the longest preceding context.
*/
-int32_t TransliterationRuleSet::getMaximumContextLength(void) const {
+int32_t TransliterationRuleSet::getMaximumContextLength() const {
return maxContextLength;
}
@@ -247,11 +241,11 @@ int32_t TransliterationRuleSet::getMaximumContextLength(void) const {
*/
void TransliterationRuleSet::addRule(TransliterationRule* adoptedRule,
UErrorCode& status) {
+ LocalPointer<TransliterationRule> lpAdoptedRule(adoptedRule);
+ ruleVector->adoptElement(lpAdoptedRule.orphan(), status);
if (U_FAILURE(status)) {
- delete adoptedRule;
return;
}
- ruleVector->addElementX(adoptedRule, status);
int32_t len;
if ((len = adoptedRule->getContextLength()) > maxContextLength) {
@@ -302,7 +296,7 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status)
* Be careful not to call malloc(0).
*/
int16_t* indexValue = (int16_t*) uprv_malloc( sizeof(int16_t) * (n > 0 ? n : 1) );
- /* test for NULL */
+ /* test for nullptr */
if (indexValue == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -316,7 +310,7 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status)
for (j=0; j<n; ++j) {
if (indexValue[j] >= 0) {
if (indexValue[j] == x) {
- v.addElementX(ruleVector->elementAt(j), status);
+ v.addElement(ruleVector->elementAt(j), status);
}
} else {
// If the indexValue is < 0, then the first key character is
@@ -325,13 +319,16 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status)
// rarely, so we seldom treat this code path.
TransliterationRule* r = (TransliterationRule*) ruleVector->elementAt(j);
if (r->matchesIndexValue((uint8_t)x)) {
- v.addElementX(r, status);
+ v.addElement(r, status);
}
}
}
}
uprv_free(indexValue);
index[256] = v.size();
+ if (U_FAILURE(status)) {
+ return;
+ }
/* Freeze things into an array.
*/
@@ -339,11 +336,11 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status)
/* You can't do malloc(0)! */
if (v.size() == 0) {
- rules = NULL;
+ rules = nullptr;
return;
}
rules = (TransliterationRule **)uprv_malloc(v.size() * sizeof(TransliterationRule *));
- /* test for NULL */
+ /* test for nullptr */
if (rules == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -390,14 +387,14 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status)
/**
* Transliterate the given text with the given UTransPosition
- * indices. Return TRUE if the transliteration should continue
- * or FALSE if it should halt (because of a U_PARTIAL_MATCH match).
- * Note that FALSE is only ever returned if isIncremental is TRUE.
+ * indices. Return true if the transliteration should continue
+ * or false if it should halt (because of a U_PARTIAL_MATCH match).
+ * Note that false is only ever returned if isIncremental is true.
* @param text the text to be transliterated
* @param pos the position indices, which will be updated
- * @param incremental if TRUE, assume new text may be inserted
- * at index.limit, and return FALSE if there is a partial match.
- * @return TRUE unless a U_PARTIAL_MATCH has been obtained,
+ * @param incremental if true, assume new text may be inserted
+ * at index.limit, and return false if there is a partial match.
+ * @return true unless a U_PARTIAL_MATCH has been obtained,
* indicating that transliteration should stop until more text
* arrives.
*/
@@ -410,18 +407,18 @@ UBool TransliterationRuleSet::transliterate(Replaceable& text,
switch (m) {
case U_MATCH:
_debugOut("match", rules[i], text, pos);
- return TRUE;
+ return true;
case U_PARTIAL_MATCH:
_debugOut("partial match", rules[i], text, pos);
- return FALSE;
+ return false;
default: /* Ram: added default to make GCC happy */
break;
}
}
// No match or partial match from any rule
pos.start += U16_LENGTH(text.char32At(pos.start));
- _debugOut("no match", NULL, text, pos);
- return TRUE;
+ _debugOut("no match", nullptr, text, pos);
+ return true;
}
/**
@@ -434,7 +431,7 @@ UnicodeString& TransliterationRuleSet::toRules(UnicodeString& ruleSource,
ruleSource.truncate(0);
for (i=0; i<count; ++i) {
if (i != 0) {
- ruleSource.append((UChar) 0x000A /*\n*/);
+ ruleSource.append((char16_t) 0x000A /*\n*/);
}
TransliterationRule *r =
(TransliterationRule*) ruleVector->elementAt(i);
diff --git a/contrib/libs/icu/i18n/rbt_set.h b/contrib/libs/icu/i18n/rbt_set.h
index 3a2890e8ec7..fb436ff67e9 100644
--- a/contrib/libs/icu/i18n/rbt_set.h
+++ b/contrib/libs/icu/i18n/rbt_set.h
@@ -92,7 +92,7 @@ public:
* Return the maximum context length.
* @return the length of the longest preceding context.
*/
- virtual int32_t getMaximumContextLength(void) const;
+ virtual int32_t getMaximumContextLength() const;
/**
* Add a rule to this set. Rules are added in order, and order is
diff --git a/contrib/libs/icu/i18n/rbtz.cpp b/contrib/libs/icu/i18n/rbtz.cpp
index 495d8310d00..e4d71436c58 100644
--- a/contrib/libs/icu/i18n/rbtz.cpp
+++ b/contrib/libs/icu/i18n/rbtz.cpp
@@ -39,35 +39,35 @@ deleteTransition(void* obj) {
U_CDECL_END
static UBool compareRules(UVector* rules1, UVector* rules2) {
- if (rules1 == NULL && rules2 == NULL) {
- return TRUE;
- } else if (rules1 == NULL || rules2 == NULL) {
- return FALSE;
+ if (rules1 == nullptr && rules2 == nullptr) {
+ return true;
+ } else if (rules1 == nullptr || rules2 == nullptr) {
+ return false;
}
int32_t size = rules1->size();
if (size != rules2->size()) {
- return FALSE;
+ return false;
}
for (int32_t i = 0; i < size; i++) {
TimeZoneRule *r1 = (TimeZoneRule*)rules1->elementAt(i);
TimeZoneRule *r2 = (TimeZoneRule*)rules2->elementAt(i);
if (*r1 != *r2) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedTimeZone)
RuleBasedTimeZone::RuleBasedTimeZone(const UnicodeString& id, InitialTimeZoneRule* initialRule)
-: BasicTimeZone(id), fInitialRule(initialRule), fHistoricRules(NULL), fFinalRules(NULL),
- fHistoricTransitions(NULL), fUpToDate(FALSE) {
+: BasicTimeZone(id), fInitialRule(initialRule), fHistoricRules(nullptr), fFinalRules(nullptr),
+ fHistoricTransitions(nullptr), fUpToDate(false) {
}
RuleBasedTimeZone::RuleBasedTimeZone(const RuleBasedTimeZone& source)
: BasicTimeZone(source), fInitialRule(source.fInitialRule->clone()),
- fHistoricTransitions(NULL), fUpToDate(FALSE) {
+ fHistoricTransitions(nullptr), fUpToDate(false) {
fHistoricRules = copyRules(source.fHistoricRules);
fFinalRules = copyRules(source.fFinalRules);
if (source.fUpToDate) {
@@ -90,7 +90,7 @@ RuleBasedTimeZone::operator=(const RuleBasedTimeZone& right) {
fHistoricRules = copyRules(right.fHistoricRules);
fFinalRules = copyRules(right.fFinalRules);
deleteTransitions();
- fUpToDate = FALSE;
+ fUpToDate = false;
}
return *this;
}
@@ -152,7 +152,7 @@ RuleBasedTimeZone::addTransitionRule(TimeZoneRule* rule, UErrorCode& status) {
fHistoricRules->adoptElement(lpRule.orphan(), status);
}
// Mark dirty, so transitions are recalculated at next complete() call
- fUpToDate = FALSE;
+ fUpToDate = false;
}
@@ -180,35 +180,35 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
}
// Make sure either no final rules or a pair of AnnualTimeZoneRules
// are available.
- if (fFinalRules != NULL && fFinalRules->size() != 2) {
+ if (fFinalRules != nullptr && fFinalRules->size() != 2) {
status = U_INVALID_STATE_ERROR;
return;
}
// Create a TimezoneTransition and add to the list
- if (fHistoricRules != NULL || fFinalRules != NULL) {
+ if (fHistoricRules != nullptr || fFinalRules != nullptr) {
TimeZoneRule *curRule = fInitialRule;
UDate lastTransitionTime = MIN_MILLIS;
// Build the transition array which represents historical time zone
// transitions.
- if (fHistoricRules != NULL && fHistoricRules->size() > 0) {
+ if (fHistoricRules != nullptr && fHistoricRules->size() > 0) {
int32_t i;
int32_t historicCount = fHistoricRules->size();
LocalMemory<bool> done((bool *)uprv_malloc(sizeof(bool) * historicCount));
- if (done == NULL) {
+ if (done == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
goto cleanup;
}
for (i = 0; i < historicCount; i++) {
done[i] = false;
}
- while (TRUE) {
+ while (true) {
int32_t curStdOffset = curRule->getRawOffset();
int32_t curDstSavings = curRule->getDSTSavings();
UDate nextTransitionTime = MAX_MILLIS;
- TimeZoneRule *nextRule = NULL;
- TimeZoneRule *r = NULL;
+ TimeZoneRule *nextRule = nullptr;
+ TimeZoneRule *r = nullptr;
UBool avail;
UDate tt;
UnicodeString curName, name;
@@ -237,12 +237,12 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
}
}
- if (nextRule == NULL) {
+ if (nextRule == nullptr) {
// Check if all historic rules are done
- UBool bDoneAll = TRUE;
+ UBool bDoneAll = true;
for (int32_t j = 0; j < historicCount; j++) {
if (!done[j]) {
- bDoneAll = FALSE;
+ bDoneAll = false;
break;
}
}
@@ -251,7 +251,7 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
}
}
- if (fFinalRules != NULL) {
+ if (fFinalRules != nullptr) {
// Check if one of final rules has earlier transition date
for (i = 0; i < 2 /* fFinalRules->size() */; i++) {
TimeZoneRule *fr = (TimeZoneRule*)fFinalRules->elementAt(i);
@@ -269,12 +269,12 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
}
}
- if (nextRule == NULL) {
+ if (nextRule == nullptr) {
// Nothing more
break;
}
- if (fHistoricTransitions == NULL) {
+ if (fHistoricTransitions == nullptr) {
LocalPointer<UVector> lpHistoricTransitions(
new UVector(deleteTransition, nullptr, status), status);
if (U_FAILURE(status)) {
@@ -297,8 +297,8 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
curRule = nextRule;
}
}
- if (fFinalRules != NULL) {
- if (fHistoricTransitions == NULL) {
+ if (fFinalRules != nullptr) {
+ if (fHistoricTransitions == nullptr) {
LocalPointer<UVector> lpHistoricTransitions(
new UVector(deleteTransition, nullptr, status), status);
if (U_FAILURE(status)) {
@@ -344,12 +344,12 @@ RuleBasedTimeZone::complete(UErrorCode& status) {
}
}
}
- fUpToDate = TRUE;
+ fUpToDate = true;
return;
cleanup:
deleteTransitions();
- fUpToDate = FALSE;
+ fUpToDate = false;
}
RuleBasedTimeZone*
@@ -386,7 +386,7 @@ RuleBasedTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t d
}
int32_t rawOffset, dstOffset;
UDate time = (UDate)Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY + millis;
- getOffsetInternal(time, TRUE, kDaylight, kStandard, rawOffset, dstOffset, status);
+ getOffsetInternal(time, true, kDaylight, kStandard, rawOffset, dstOffset, status);
if (U_FAILURE(status)) {
return 0;
}
@@ -402,7 +402,7 @@ RuleBasedTimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset,
void RuleBasedTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const {
- getOffsetInternal(date, TRUE, nonExistingTimeOpt, duplicatedTimeOpt, rawOffset, dstOffset, status);
+ getOffsetInternal(date, true, nonExistingTimeOpt, duplicatedTimeOpt, rawOffset, dstOffset, status);
}
@@ -427,8 +427,8 @@ RuleBasedTimeZone::getOffsetInternal(UDate date, UBool local,
status = U_INVALID_STATE_ERROR;
return;
}
- const TimeZoneRule *rule = NULL;
- if (fHistoricTransitions == NULL) {
+ const TimeZoneRule *rule = nullptr;
+ if (fHistoricTransitions == nullptr) {
rule = fInitialRule;
} else {
UDate tstart = getTransitionTime((Transition*)fHistoricTransitions->elementAt(0),
@@ -440,10 +440,10 @@ RuleBasedTimeZone::getOffsetInternal(UDate date, UBool local,
UDate tend = getTransitionTime((Transition*)fHistoricTransitions->elementAt(idx),
local, NonExistingTimeOpt, DuplicatedTimeOpt);
if (date > tend) {
- if (fFinalRules != NULL) {
+ if (fFinalRules != nullptr) {
rule = findRuleInFinal(date, local, NonExistingTimeOpt, DuplicatedTimeOpt);
}
- if (rule == NULL) {
+ if (rule == nullptr) {
// no final rules or the given time is before the first transition
// specified by the final rules -> use the last rule
rule = ((Transition*)fHistoricTransitions->elementAt(idx))->to;
@@ -461,7 +461,7 @@ RuleBasedTimeZone::getOffsetInternal(UDate date, UBool local,
}
}
}
- if (rule != NULL) {
+ if (rule != nullptr) {
rawOffset = rule->getRawOffset();
dstOffset = rule->getDSTSavings();
}
@@ -474,68 +474,67 @@ RuleBasedTimeZone::setRawOffset(int32_t /*offsetMillis*/) {
}
int32_t
-RuleBasedTimeZone::getRawOffset(void) const {
+RuleBasedTimeZone::getRawOffset() const {
// Note: This implementation returns standard GMT offset
// as of current time.
UErrorCode status = U_ZERO_ERROR;
int32_t raw, dst;
- getOffset(uprv_getUTCtime() * U_MILLIS_PER_SECOND,
- FALSE, raw, dst, status);
+ getOffset(uprv_getUTCtime(), false, raw, dst, status);
return raw;
}
UBool
-RuleBasedTimeZone::useDaylightTime(void) const {
+RuleBasedTimeZone::useDaylightTime() const {
// Note: This implementation returns true when
// daylight saving time is used as of now or
// after the next transition.
UErrorCode status = U_ZERO_ERROR;
- UDate now = uprv_getUTCtime() * U_MILLIS_PER_SECOND;
+ UDate now = uprv_getUTCtime();
int32_t raw, dst;
- getOffset(now, FALSE, raw, dst, status);
+ getOffset(now, false, raw, dst, status);
if (dst != 0) {
- return TRUE;
+ return true;
}
// If DST is not used now, check if DST is used after the next transition
UDate time;
TimeZoneRule *from, *to;
- UBool avail = findNext(now, FALSE, time, from, to);
+ UBool avail = findNext(now, false, time, from, to);
if (avail && to->getDSTSavings() != 0) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UBool
RuleBasedTimeZone::inDaylightTime(UDate date, UErrorCode& status) const {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
int32_t raw, dst;
- getOffset(date, FALSE, raw, dst, status);
+ getOffset(date, false, raw, dst, status);
if (dst != 0) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UBool
RuleBasedTimeZone::hasSameRules(const TimeZone& other) const {
if (this == &other) {
- return TRUE;
+ return true;
}
if (typeid(*this) != typeid(other)) {
- return FALSE;
+ return false;
}
- const RuleBasedTimeZone& that = (const RuleBasedTimeZone&)other;
+ const RuleBasedTimeZone& that = static_cast<const RuleBasedTimeZone&>(other);
if (*fInitialRule != *(that.fInitialRule)) {
- return FALSE;
+ return false;
}
if (compareRules(fHistoricRules, that.fHistoricRules)
&& compareRules(fFinalRules, that.fFinalRules)) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UBool
@@ -543,18 +542,18 @@ RuleBasedTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransi
UErrorCode status = U_ZERO_ERROR;
completeConst(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
UDate transitionTime;
TimeZoneRule *fromRule, *toRule;
UBool found = findNext(base, inclusive, transitionTime, fromRule, toRule);
if (found) {
result.setTime(transitionTime);
- result.setFrom((const TimeZoneRule&)*fromRule);
- result.setTo((const TimeZoneRule&)*toRule);
- return TRUE;
+ result.setFrom(*fromRule);
+ result.setTo(*toRule);
+ return true;
}
- return FALSE;
+ return false;
}
UBool
@@ -562,27 +561,27 @@ RuleBasedTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTr
UErrorCode status = U_ZERO_ERROR;
completeConst(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
UDate transitionTime;
TimeZoneRule *fromRule, *toRule;
UBool found = findPrev(base, inclusive, transitionTime, fromRule, toRule);
if (found) {
result.setTime(transitionTime);
- result.setFrom((const TimeZoneRule&)*fromRule);
- result.setTo((const TimeZoneRule&)*toRule);
- return TRUE;
+ result.setFrom(*fromRule);
+ result.setTo(*toRule);
+ return true;
}
- return FALSE;
+ return false;
}
int32_t
RuleBasedTimeZone::countTransitionRules(UErrorCode& /*status*/) const {
int32_t count = 0;
- if (fHistoricRules != NULL) {
+ if (fHistoricRules != nullptr) {
count += fHistoricRules->size();
}
- if (fFinalRules != NULL) {
+ if (fFinalRules != nullptr) {
count += fFinalRules->size();
}
return count;
@@ -602,14 +601,14 @@ RuleBasedTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial,
// Transition rules
int32_t cnt = 0;
int32_t idx;
- if (fHistoricRules != NULL && cnt < trscount) {
+ if (fHistoricRules != nullptr && cnt < trscount) {
int32_t historicCount = fHistoricRules->size();
idx = 0;
while (cnt < trscount && idx < historicCount) {
trsrules[cnt++] = (const TimeZoneRule*)fHistoricRules->elementAt(idx++);
}
}
- if (fFinalRules != NULL && cnt < trscount) {
+ if (fFinalRules != nullptr && cnt < trscount) {
int32_t finalCount = fFinalRules->size();
idx = 0;
while (cnt < trscount && idx < finalCount) {
@@ -621,25 +620,25 @@ RuleBasedTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial,
}
void
-RuleBasedTimeZone::deleteRules(void) {
+RuleBasedTimeZone::deleteRules() {
delete fInitialRule;
- fInitialRule = NULL;
- if (fHistoricRules != NULL) {
+ fInitialRule = nullptr;
+ if (fHistoricRules != nullptr) {
delete fHistoricRules;
- fHistoricRules = NULL;
+ fHistoricRules = nullptr;
}
- if (fFinalRules != NULL) {
+ if (fFinalRules != nullptr) {
delete fFinalRules;
- fFinalRules = NULL;
+ fFinalRules = nullptr;
}
}
void
-RuleBasedTimeZone::deleteTransitions(void) {
- if (fHistoricTransitions != NULL) {
+RuleBasedTimeZone::deleteTransitions() {
+ if (fHistoricTransitions != nullptr) {
delete fHistoricTransitions;
}
- fHistoricTransitions = NULL;
+ fHistoricTransitions = nullptr;
}
UVector*
@@ -667,14 +666,14 @@ RuleBasedTimeZone::copyRules(UVector* source) {
TimeZoneRule*
RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local,
int32_t NonExistingTimeOpt, int32_t DuplicatedTimeOpt) const {
- if (fFinalRules == NULL) {
- return NULL;
+ if (fFinalRules == nullptr) {
+ return nullptr;
}
AnnualTimeZoneRule* fr0 = (AnnualTimeZoneRule*)fFinalRules->elementAt(0);
AnnualTimeZoneRule* fr1 = (AnnualTimeZoneRule*)fFinalRules->elementAt(1);
- if (fr0 == NULL || fr1 == NULL) {
- return NULL;
+ if (fr0 == nullptr || fr1 == nullptr) {
+ return nullptr;
}
UDate start0, start1;
@@ -688,7 +687,7 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local,
NonExistingTimeOpt, DuplicatedTimeOpt);
base -= localDelta;
}
- UBool avail0 = fr0->getPreviousStart(base, fr1->getRawOffset(), fr1->getDSTSavings(), TRUE, start0);
+ UBool avail0 = fr0->getPreviousStart(base, fr1->getRawOffset(), fr1->getDSTSavings(), true, start0);
base = date;
if (local) {
@@ -697,7 +696,7 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local,
NonExistingTimeOpt, DuplicatedTimeOpt);
base -= localDelta;
}
- UBool avail1 = fr1->getPreviousStart(base, fr0->getRawOffset(), fr0->getDSTSavings(), TRUE, start1);
+ UBool avail1 = fr1->getPreviousStart(base, fr0->getRawOffset(), fr0->getDSTSavings(), true, start1);
if (!avail0 || !avail1) {
if (avail0) {
@@ -706,7 +705,7 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local,
return fr1;
}
// Both rules take effect after the given time
- return NULL;
+ return nullptr;
}
return (start0 > start1) ? fr0 : fr1;
@@ -715,35 +714,35 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local,
UBool
RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime,
TimeZoneRule*& fromRule, TimeZoneRule*& toRule) const {
- if (fHistoricTransitions == NULL) {
- return FALSE;
+ if (fHistoricTransitions == nullptr) {
+ return false;
}
- UBool isFinal = FALSE;
- UBool found = FALSE;
+ UBool isFinal = false;
+ UBool found = false;
Transition result;
Transition *tzt = (Transition*)fHistoricTransitions->elementAt(0);
UDate tt = tzt->time;
if (tt > base || (inclusive && tt == base)) {
result = *tzt;
- found = TRUE;
+ found = true;
} else {
int32_t idx = fHistoricTransitions->size() - 1;
tzt = (Transition*)fHistoricTransitions->elementAt(idx);
tt = tzt->time;
if (inclusive && tt == base) {
result = *tzt;
- found = TRUE;
+ found = true;
} else if (tt <= base) {
- if (fFinalRules != NULL) {
+ if (fFinalRules != nullptr) {
// Find a transion time with finalRules
TimeZoneRule *r0 = (TimeZoneRule*)fFinalRules->elementAt(0);
TimeZoneRule *r1 = (TimeZoneRule*)fFinalRules->elementAt(1);
UDate start0, start1;
UBool avail0 = r0->getNextStart(base, r1->getRawOffset(), r1->getDSTSavings(), inclusive, start0);
UBool avail1 = r1->getNextStart(base, r0->getRawOffset(), r0->getDSTSavings(), inclusive, start1);
- // avail0/avail1 should be always TRUE
+ // avail0/avail1 should be always true
if (!avail0 && !avail1) {
- return FALSE;
+ return false;
}
if (!avail1 || start0 < start1) {
result.time = start0;
@@ -754,8 +753,8 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime,
result.from = r0;
result.to = r1;
}
- isFinal = TRUE;
- found = TRUE;
+ isFinal = true;
+ found = true;
}
} else {
// Find a transition within the historic transitions
@@ -773,7 +772,7 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime,
result.time = prev->time;
result.from = prev->from;
result.to = prev->to;
- found = TRUE;
+ found = true;
}
}
if (found) {
@@ -781,52 +780,52 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime,
if (result.from->getRawOffset() == result.to->getRawOffset()
&& result.from->getDSTSavings() == result.to->getDSTSavings()) {
if (isFinal) {
- return FALSE;
+ return false;
} else {
// No offset changes. Try next one if not final
- return findNext(result.time, FALSE /* always exclusive */,
+ return findNext(result.time, false /* always exclusive */,
transitionTime, fromRule, toRule);
}
}
transitionTime = result.time;
fromRule = result.from;
toRule = result.to;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UBool
RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime,
TimeZoneRule*& fromRule, TimeZoneRule*& toRule) const {
- if (fHistoricTransitions == NULL) {
- return FALSE;
+ if (fHistoricTransitions == nullptr) {
+ return false;
}
- UBool found = FALSE;
+ UBool found = false;
Transition result;
Transition *tzt = (Transition*)fHistoricTransitions->elementAt(0);
UDate tt = tzt->time;
if (inclusive && tt == base) {
result = *tzt;
- found = TRUE;
+ found = true;
} else if (tt < base) {
int32_t idx = fHistoricTransitions->size() - 1;
tzt = (Transition*)fHistoricTransitions->elementAt(idx);
tt = tzt->time;
if (inclusive && tt == base) {
result = *tzt;
- found = TRUE;
+ found = true;
} else if (tt < base) {
- if (fFinalRules != NULL) {
+ if (fFinalRules != nullptr) {
// Find a transion time with finalRules
TimeZoneRule *r0 = (TimeZoneRule*)fFinalRules->elementAt(0);
TimeZoneRule *r1 = (TimeZoneRule*)fFinalRules->elementAt(1);
UDate start0, start1;
UBool avail0 = r0->getPreviousStart(base, r1->getRawOffset(), r1->getDSTSavings(), inclusive, start0);
UBool avail1 = r1->getPreviousStart(base, r0->getRawOffset(), r0->getDSTSavings(), inclusive, start1);
- // avail0/avail1 should be always TRUE
+ // avail0/avail1 should be always true
if (!avail0 && !avail1) {
- return FALSE;
+ return false;
}
if (!avail1 || start0 > start1) {
result.time = start0;
@@ -840,7 +839,7 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime,
} else {
result = *tzt;
}
- found = TRUE;
+ found = true;
} else {
// Find a transition within the historic transitions
idx--;
@@ -853,7 +852,7 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime,
idx--;
}
result = *tzt;
- found = TRUE;
+ found = true;
}
}
if (found) {
@@ -861,15 +860,15 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime,
if (result.from->getRawOffset() == result.to->getRawOffset()
&& result.from->getDSTSavings() == result.to->getDSTSavings()) {
// No offset changes. Try next one if not final
- return findPrev(result.time, FALSE /* always exclusive */,
+ return findPrev(result.time, false /* always exclusive */,
transitionTime, fromRule, toRule);
}
transitionTime = result.time;
fromRule = result.from;
toRule = result.to;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UDate
diff --git a/contrib/libs/icu/i18n/regexcmp.cpp b/contrib/libs/icu/i18n/regexcmp.cpp
index 89cb6584251..0a0d095ca46 100644
--- a/contrib/libs/icu/i18n/regexcmp.cpp
+++ b/contrib/libs/icu/i18n/regexcmp.cpp
@@ -66,14 +66,14 @@ RegexCompile::RegexCompile(RegexPattern *rxp, UErrorCode &status) :
fPeekChar = -1;
fLineNum = 1;
fCharNum = 0;
- fQuoteMode = FALSE;
- fInBackslashQuote = FALSE;
+ fQuoteMode = false;
+ fInBackslashQuote = false;
fModeFlags = fRXPat->fFlags | 0x80000000;
- fEOLComments = TRUE;
+ fEOLComments = true;
fMatchOpenParen = -1;
fMatchCloseParen = -1;
- fCaptureName = NULL;
+ fCaptureName = nullptr;
fLastSetLiteral = U_SENTINEL;
if (U_SUCCESS(status) && U_FAILURE(rxp->fDeferredStatus)) {
@@ -81,8 +81,8 @@ RegexCompile::RegexCompile(RegexPattern *rxp, UErrorCode &status) :
}
}
-static const UChar chAmp = 0x26; // '&'
-static const UChar chDash = 0x2d; // '-'
+static const char16_t chAmp = 0x26; // '&'
+static const char16_t chDash = 0x2d; // '-'
//------------------------------------------------------------------------------
@@ -91,7 +91,7 @@ static const UChar chDash = 0x2d; // '-'
//
//------------------------------------------------------------------------------
RegexCompile::~RegexCompile() {
- delete fCaptureName; // Normally will be NULL, but can exist if pattern
+ delete fCaptureName; // Normally will be nullptr, but can exist if pattern
// compilation stops with a syntax error.
}
@@ -141,10 +141,10 @@ void RegexCompile::compile(
}
// There should be no pattern stuff in the RegexPattern object. They can not be reused.
- U_ASSERT(fRXPat->fPattern == NULL || utext_nativeLength(fRXPat->fPattern) == 0);
+ U_ASSERT(fRXPat->fPattern == nullptr || utext_nativeLength(fRXPat->fPattern) == 0);
// Prepare the RegexPattern object to receive the compiled pattern.
- fRXPat->fPattern = utext_clone(fRXPat->fPattern, pat, FALSE, TRUE, fStatus);
+ fRXPat->fPattern = utext_clone(fRXPat->fPattern, pat, false, true, fStatus);
if (U_FAILURE(*fStatus)) {
return;
}
@@ -156,7 +156,7 @@ void RegexCompile::compile(
// UREGEX_LITERAL force entire pattern to be treated as a literal string.
if (fModeFlags & UREGEX_LITERAL) {
- fQuoteMode = TRUE;
+ fQuoteMode = true;
}
nextChar(fC); // Fetch the first char from the pattern string.
@@ -193,7 +193,7 @@ void RegexCompile::compile(
for (;;) { // loop through table rows belonging to this state, looking for one
// that matches the current input char.
REGEX_SCAN_DEBUG_PRINTF(("."));
- if (tableEl->fCharClass < 127 && fC.fQuoted == FALSE && tableEl->fCharClass == fC.fChar) {
+ if (tableEl->fCharClass < 127 && fC.fQuoted == false && tableEl->fCharClass == fC.fChar) {
// Table row specified an individual character, not a set, and
// the input character is not quoted, and
// the input character matched it.
@@ -213,7 +213,7 @@ void RegexCompile::compile(
}
if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class &&
- fC.fQuoted == FALSE && // char is not escaped &&
+ fC.fQuoted == false && // char is not escaped &&
fC.fChar != (UChar32)-1) { // char is not EOF
U_ASSERT(tableEl->fCharClass <= 137);
if (RegexStaticSets::gStaticSets->fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) {
@@ -232,7 +232,7 @@ void RegexCompile::compile(
// We've found the row of the state table that matches the current input
// character from the rules string.
// Perform any action specified by this row in the state table.
- if (doParseActions(tableEl->fAction) == FALSE) {
+ if (doParseActions(tableEl->fAction) == false) {
// Break out of the state machine loop if the
// the action signalled some kind of error, or
// the action was to exit, occurs on normal end-of-rules-input.
@@ -317,7 +317,7 @@ void RegexCompile::compile(
int32_t numSets = fRXPat->fSets->size();
fRXPat->fSets8 = new Regex8BitSet[numSets];
// Null pointer check.
- if (fRXPat->fSets8 == NULL) {
+ if (fRXPat->fSets8 == nullptr) {
e = *fStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -345,7 +345,7 @@ void RegexCompile::compile(
//------------------------------------------------------------------------------
UBool RegexCompile::doParseActions(int32_t action)
{
- UBool returnVal = TRUE;
+ UBool returnVal = true;
switch ((Regex_PatternParseAction)action) {
@@ -386,7 +386,7 @@ UBool RegexCompile::doParseActions(int32_t action)
appendOp(URX_END, 0);
// Terminate the pattern compilation state machine.
- returnVal = FALSE;
+ returnVal = false;
break;
@@ -395,7 +395,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// Scanning a '|', as in (A|B)
{
// Generate code for any pending literals preceding the '|'
- fixLiterals(FALSE);
+ fixLiterals(false);
// Insert a SAVE operation at the start of the pattern section preceding
// this OR at this level. This SAVE will branch the match forward
@@ -430,7 +430,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// Scanning (?<letter.
// The first letter of the name will come through again under doConinueNamedCapture.
fCaptureName = new UnicodeString();
- if (fCaptureName == NULL) {
+ if (fCaptureName == nullptr) {
error(U_MEMORY_ALLOCATION_ERROR);
}
break;
@@ -481,7 +481,7 @@ UBool RegexCompile::doParseActions(int32_t action)
fRXPat->fGroupMap->addElement(varsLoc, *fStatus);
// If this is a named capture group, add the name->group number mapping.
- if (fCaptureName != NULL) {
+ if (fCaptureName != nullptr) {
if (!fRXPat->initNamedCaptureMap()) {
if (U_SUCCESS(*fStatus)) {
error(fRXPat->fDeferredStatus);
@@ -490,7 +490,7 @@ UBool RegexCompile::doParseActions(int32_t action)
}
int32_t groupNumber = fRXPat->fGroupMap->size();
int32_t previousMapping = uhash_puti(fRXPat->fNamedCaptureMap, fCaptureName, groupNumber, fStatus);
- fCaptureName = NULL; // hash table takes ownership of the name (key) string.
+ fCaptureName = nullptr; // hash table takes ownership of the name (key) string.
if (previousMapping > 0 && U_SUCCESS(*fStatus)) {
error(U_REGEX_INVALID_CAPTURE_GROUP_NAME);
}
@@ -788,7 +788,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// 2. LOOP_SR_I set number (assuming repeated item is a set ref)
// 3. LOOP_C stack location
{
- int32_t topLoc = blockTopLoc(FALSE); // location of item #1
+ int32_t topLoc = blockTopLoc(false); // location of item #1
int32_t frameLoc;
// Check for simple constructs, which may get special optimized code.
@@ -850,7 +850,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// 2. state-save 1
// 3. ...
{
- int32_t topLoc = blockTopLoc(FALSE);
+ int32_t topLoc = blockTopLoc(false);
appendOp(URX_STATE_SAVE, topLoc);
}
break;
@@ -864,7 +864,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// 3. ...
// Insert the state save into the compiled pattern, and we're done.
{
- int32_t saveStateLoc = blockTopLoc(TRUE);
+ int32_t saveStateLoc = blockTopLoc(true);
int32_t saveStateOp = buildOp(URX_STATE_SAVE, fRXPat->fCompiledPat->size());
fRXPat->fCompiledPat->setElementAt(saveStateOp, saveStateLoc);
}
@@ -881,7 +881,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// This code is less than ideal, with two jmps instead of one, because we can only
// insert one instruction at the top of the block being iterated.
{
- int32_t jmp1_loc = blockTopLoc(TRUE);
+ int32_t jmp1_loc = blockTopLoc(true);
int32_t jmp2_loc = fRXPat->fCompiledPat->size();
int32_t jmp1_op = buildOp(URX_JMP, jmp2_loc+1);
@@ -919,7 +919,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// 5. ...
{
// location of item #1, the STATE_SAVE
- int32_t topLoc = blockTopLoc(FALSE);
+ int32_t topLoc = blockTopLoc(false);
int32_t dataLoc = -1;
// Check for simple *, where the construct being repeated
@@ -958,7 +958,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// Emit general case code for this *
// The optimizations did not apply.
- int32_t saveStateLoc = blockTopLoc(TRUE);
+ int32_t saveStateLoc = blockTopLoc(true);
int32_t jmpOp = buildOp(URX_JMP_SAV, saveStateLoc+1);
// Check for minimum match length of zero, which requires
@@ -993,7 +993,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// 3. STATE_SAVE 2
// 4 ...
{
- int32_t jmpLoc = blockTopLoc(TRUE); // loc 1.
+ int32_t jmpLoc = blockTopLoc(true); // loc 1.
int32_t saveLoc = fRXPat->fCompiledPat->size(); // loc 3.
int32_t jmpOp = buildOp(URX_JMP, saveLoc);
fRXPat->fCompiledPat->setElementAt(jmpOp, jmpLoc);
@@ -1048,7 +1048,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doInterval:
// Finished scanning a normal {lower,upper} interval. Generate the code for it.
- if (compileInlineInterval() == FALSE) {
+ if (compileInlineInterval() == false) {
compileInterval(URX_CTR_INIT, URX_CTR_LOOP);
}
break;
@@ -1060,7 +1060,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// (Can not reserve a slot in the compiled pattern at this time, because
// compileInterval needs to reserve also, and blockTopLoc can only reserve
// once per block.)
- int32_t topLoc = blockTopLoc(FALSE);
+ int32_t topLoc = blockTopLoc(false);
// Produce normal looping code.
compileInterval(URX_CTR_INIT, URX_CTR_LOOP);
@@ -1116,7 +1116,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doDotAny:
// scanned a ".", match any single character.
{
- fixLiterals(FALSE);
+ fixLiterals(false);
if (fModeFlags & UREGEX_DOTALL) {
appendOp(URX_DOTANY_ALL, 0);
} else if (fModeFlags & UREGEX_UNIX_LINES) {
@@ -1129,7 +1129,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doCaret:
{
- fixLiterals(FALSE);
+ fixLiterals(false);
if ( (fModeFlags & UREGEX_MULTILINE) == 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) {
appendOp(URX_CARET, 0);
} else if ((fModeFlags & UREGEX_MULTILINE) != 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) {
@@ -1144,7 +1144,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doDollar:
{
- fixLiterals(FALSE);
+ fixLiterals(false);
if ( (fModeFlags & UREGEX_MULTILINE) == 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) {
appendOp(URX_DOLLAR, 0);
} else if ((fModeFlags & UREGEX_MULTILINE) != 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) {
@@ -1158,7 +1158,7 @@ UBool RegexCompile::doParseActions(int32_t action)
break;
case doBackslashA:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_CARET, 0);
break;
@@ -1169,7 +1169,7 @@ UBool RegexCompile::doParseActions(int32_t action)
error(U_UNSUPPORTED_ERROR);
}
#endif
- fixLiterals(FALSE);
+ fixLiterals(false);
int32_t op = (fModeFlags & UREGEX_UWORD)? URX_BACKSLASH_BU : URX_BACKSLASH_B;
appendOp(op, 1);
}
@@ -1182,69 +1182,69 @@ UBool RegexCompile::doParseActions(int32_t action)
error(U_UNSUPPORTED_ERROR);
}
#endif
- fixLiterals(FALSE);
+ fixLiterals(false);
int32_t op = (fModeFlags & UREGEX_UWORD)? URX_BACKSLASH_BU : URX_BACKSLASH_B;
appendOp(op, 0);
}
break;
case doBackslashD:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_D, 1);
break;
case doBackslashd:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_D, 0);
break;
case doBackslashG:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_G, 0);
break;
case doBackslashH:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_H, 1);
break;
case doBackslashh:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_H, 0);
break;
case doBackslashR:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_R, 0);
break;
case doBackslashS:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_STAT_SETREF_N, URX_ISSPACE_SET);
break;
case doBackslashs:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_STATIC_SETREF, URX_ISSPACE_SET);
break;
case doBackslashV:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_V, 1);
break;
case doBackslashv:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_V, 0);
break;
case doBackslashW:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_STAT_SETREF_N, URX_ISWORD_SET);
break;
case doBackslashw:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_STATIC_SETREF, URX_ISWORD_SET);
break;
@@ -1253,17 +1253,17 @@ UBool RegexCompile::doParseActions(int32_t action)
// Grapheme Cluster Boundary requires ICU break iteration.
error(U_UNSUPPORTED_ERROR);
#endif
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_X, 0);
break;
case doBackslashZ:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_DOLLAR, 0);
break;
case doBackslashz:
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_BACKSLASH_Z, 0);
break;
@@ -1272,13 +1272,13 @@ UBool RegexCompile::doParseActions(int32_t action)
break;
case doExit:
- fixLiterals(FALSE);
- returnVal = FALSE;
+ fixLiterals(false);
+ returnVal = false;
break;
case doProperty:
{
- fixLiterals(FALSE);
+ fixLiterals(false);
UnicodeSet *theSet = scanProp();
compileSet(theSet);
}
@@ -1310,7 +1310,7 @@ UBool RegexCompile::doParseActions(int32_t action)
break;
}
c = peekCharLL();
- if (RegexStaticSets::gStaticSets->fRuleDigitsAlias->contains(c) == FALSE) {
+ if (RegexStaticSets::gStaticSets->fRuleDigitsAlias->contains(c) == false) {
break;
}
nextCharLL();
@@ -1323,7 +1323,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// of compilation, it will be changed to the variable's location.
U_ASSERT(groupNum > 0); // Shouldn't happen. '\0' begins an octal escape sequence,
// and shouldn't enter this code path at all.
- fixLiterals(FALSE);
+ fixLiterals(false);
if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
appendOp(URX_BACKREF_I, groupNum);
} else {
@@ -1333,9 +1333,9 @@ UBool RegexCompile::doParseActions(int32_t action)
break;
case doBeginNamedBackRef:
- U_ASSERT(fCaptureName == NULL);
+ U_ASSERT(fCaptureName == nullptr);
fCaptureName = new UnicodeString;
- if (fCaptureName == NULL) {
+ if (fCaptureName == nullptr) {
error(U_MEMORY_ALLOCATION_ERROR);
}
break;
@@ -1356,7 +1356,7 @@ UBool RegexCompile::doParseActions(int32_t action)
} else {
// Given the number, handle identically to a \n numbered back reference.
// See comments above, under doBackRef
- fixLiterals(FALSE);
+ fixLiterals(false);
if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
appendOp(URX_BACKREF_I, groupNumber);
} else {
@@ -1364,7 +1364,7 @@ UBool RegexCompile::doParseActions(int32_t action)
}
}
delete fCaptureName;
- fCaptureName = NULL;
+ fCaptureName = nullptr;
break;
}
@@ -1383,7 +1383,7 @@ UBool RegexCompile::doParseActions(int32_t action)
//
{
// Emit the STO_SP
- int32_t topLoc = blockTopLoc(TRUE);
+ int32_t topLoc = blockTopLoc(true);
int32_t stoLoc = allocateData(1); // Reserve the data location for storing save stack ptr.
int32_t op = buildOp(URX_STO_SP, stoLoc);
fRXPat->fCompiledPat->setElementAt(op, topLoc);
@@ -1411,7 +1411,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// TODO: do something to cut back the state stack each time through the loop.
{
// Reserve two slots at the top of the block.
- int32_t topLoc = blockTopLoc(TRUE);
+ int32_t topLoc = blockTopLoc(true);
insertOp(topLoc);
// emit STO_SP loc
@@ -1443,7 +1443,7 @@ UBool RegexCompile::doParseActions(int32_t action)
//
{
// Reserve two slots at the top of the block.
- int32_t topLoc = blockTopLoc(TRUE);
+ int32_t topLoc = blockTopLoc(true);
insertOp(topLoc);
// Emit the STO_SP
@@ -1464,7 +1464,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doBeginMatchMode:
fNewModeFlags = fModeFlags;
- fSetModeFlag = TRUE;
+ fSetModeFlag = true;
break;
case doMatchMode: // (?i) and similar
@@ -1478,7 +1478,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case 0x75: /* 'u' */ bit = 0; /* Unicode casing */ break;
case 0x77: /* 'w' */ bit = UREGEX_UWORD; break;
case 0x78: /* 'x' */ bit = UREGEX_COMMENTS; break;
- case 0x2d: /* '-' */ fSetModeFlag = FALSE; break;
+ case 0x2d: /* '-' */ fSetModeFlag = false; break;
default:
UPRV_UNREACHABLE_EXIT; // Should never happen. Other chars are filtered out
// by the scanner.
@@ -1513,7 +1513,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// - NOP, which may later be replaced by a save-state if there
// is an '|' alternation within the parens.
{
- fixLiterals(FALSE);
+ fixLiterals(false);
appendOp(URX_NOP, 0);
appendOp(URX_NOP, 0);
@@ -1539,7 +1539,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// We have just scanned a '(?'. We now need to prevent the character scanner from
// treating a '#' as a to-the-end-of-line comment.
// (This Perl compatibility just gets uglier and uglier to do...)
- fEOLComments = FALSE;
+ fEOLComments = false;
break;
@@ -1652,7 +1652,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doSetBegin:
{
- fixLiterals(FALSE);
+ fixLiterals(false);
LocalPointer<UnicodeSet> lpSet(new UnicodeSet(), *fStatus);
fSetStack.push(lpSet.orphan(), *fStatus);
fSetOpStack.push(setStart, *fStatus);
@@ -1820,7 +1820,7 @@ UBool RegexCompile::doParseActions(int32_t action)
case doSetPosixProp:
{
UnicodeSet *s = scanPosixProp();
- if (s != NULL) {
+ if (s != nullptr) {
UnicodeSet *tos = (UnicodeSet *)fSetStack.peek();
tos->addAll(*s);
delete s;
@@ -1832,7 +1832,7 @@ UBool RegexCompile::doParseActions(int32_t action)
// Scanned a \p \P within [brackets].
{
UnicodeSet *s = scanProp();
- if (s != NULL) {
+ if (s != nullptr) {
UnicodeSet *tos = (UnicodeSet *)fSetStack.peek();
tos->addAll(*s);
delete s;
@@ -1862,7 +1862,7 @@ UBool RegexCompile::doParseActions(int32_t action)
}
if (U_FAILURE(*fStatus)) {
- returnVal = FALSE;
+ returnVal = false;
}
return returnVal;
@@ -1913,12 +1913,12 @@ void RegexCompile::fixLiterals(UBool split) {
if (split) {
fLiteralChars.truncate(indexOfLastCodePoint);
- fixLiterals(FALSE); // Recursive call, emit code to match the first part of the string.
+ fixLiterals(false); // Recursive call, emit code to match the first part of the string.
// Note that the truncated literal string may be empty, in which case
// nothing will be emitted.
literalChar(lastCodePoint); // Re-add the last code point as if it were a new literal.
- fixLiterals(FALSE); // Second recursive call, code for the final code point.
+ fixLiterals(false); // Second recursive call, code for the final code point.
return;
}
@@ -2130,15 +2130,15 @@ int32_t RegexCompile::allocateStackData(int32_t size) {
// is reserved for this purpose. .* or similar don't
// and a slot needs to be added.
//
-// parameter reserveLoc : TRUE - ensure that there is space to add an opcode
+// parameter reserveLoc : true - ensure that there is space to add an opcode
// at the returned location.
-// FALSE - just return the address,
+// false - just return the address,
// do not reserve a location there.
//
//------------------------------------------------------------------------------
int32_t RegexCompile::blockTopLoc(UBool reserveLoc) {
int32_t theLoc;
- fixLiterals(TRUE); // Emit code for any pending literals.
+ fixLiterals(true); // Emit code for any pending literals.
// If last item was a string, emit separate op for the its last char.
if (fRXPat->fCompiledPat->size() == fMatchCloseParen)
{
@@ -2189,7 +2189,7 @@ void RegexCompile::handleCloseParen() {
}
// Emit code for any pending literals.
- fixLiterals(FALSE);
+ fixLiterals(false);
// Fixup any operations within the just-closed parenthesized group
// that need to reference the end of the (block).
@@ -2390,7 +2390,7 @@ void RegexCompile::handleCloseParen() {
//------------------------------------------------------------------------------
void RegexCompile::compileSet(UnicodeSet *theSet)
{
- if (theSet == NULL) {
+ if (theSet == nullptr) {
return;
}
// Remove any strings from the set.
@@ -2459,7 +2459,7 @@ void RegexCompile::compileInterval(int32_t InitOp, int32_t LoopOp)
{
// The CTR_INIT op at the top of the block with the {n,m} quantifier takes
// four slots in the compiled code. Reserve them.
- int32_t topOfBlock = blockTopLoc(TRUE);
+ int32_t topOfBlock = blockTopLoc(true);
insertOp(topOfBlock);
insertOp(topOfBlock);
insertOp(topOfBlock);
@@ -2507,10 +2507,10 @@ UBool RegexCompile::compileInlineInterval() {
if (fIntervalUpper > 10 || fIntervalUpper < fIntervalLow) {
// Too big to inline. Fail, which will cause looping code to be generated.
// (Upper < Lower picks up unbounded upper and errors, both.)
- return FALSE;
+ return false;
}
- int32_t topOfBlock = blockTopLoc(FALSE);
+ int32_t topOfBlock = blockTopLoc(false);
if (fIntervalUpper == 0) {
// Pathological case. Attempt no matches, as if the block doesn't exist.
// Discard the generated code for the block.
@@ -2522,7 +2522,7 @@ UBool RegexCompile::compileInlineInterval() {
if (fMatchCloseParen >= topOfBlock) {
fMatchCloseParen = -1;
}
- return TRUE;
+ return true;
}
if (topOfBlock != fRXPat->fCompiledPat->size()-1 && fIntervalUpper != 1) {
@@ -2530,7 +2530,7 @@ UBool RegexCompile::compileInlineInterval() {
// more complex block. Do it as a loop, not inlines.
// Note that things "repeated" a max of once are handled as inline, because
// the one copy of the code already generated is just fine.
- return FALSE;
+ return false;
}
// Pick up the opcode that is to be repeated
@@ -2560,7 +2560,7 @@ UBool RegexCompile::compileInlineInterval() {
}
appendOp(op);
}
- return TRUE;
+ return true;
}
@@ -2620,7 +2620,7 @@ void RegexCompile::findCaseInsensitiveStarters(UChar32 c, UnicodeSet *starterCh
0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2,
0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0};
- static const UChar RECaseFixData[] = {
+ static const char16_t RECaseFixData[] = {
0x1e9a, 0xfb00, 0xfb01, 0xfb02, 0xfb03, 0xfb04, 0x1e96, 0x130, 0x1f0, 0xdf,
0x1e9e, 0xfb05, 0xfb06, 0x1e97, 0x1e98, 0x1e99, 0x149, 0x1fb4, 0x1fc4, 0x1fb3,
0x1fb6, 0x1fb7, 0x1fbc, 0x1fc3, 0x1fc6, 0x1fc7, 0x1fcc, 0x390, 0x1fd2, 0x1fd3,
@@ -2701,7 +2701,7 @@ void RegexCompile::matchStartType() {
int32_t currentLen = 0; // Minimum length of a match to this point (loc) in the pattern
int32_t numInitialStrings = 0; // Number of strings encountered that could match at start.
- UBool atStart = TRUE; // True if no part of the pattern yet encountered
+ UBool atStart = true; // True if no part of the pattern yet encountered
// could have advanced the position in a match.
// (Maximum match length so far == 0)
@@ -2777,7 +2777,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2790,7 +2790,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
case URX_LOOP_SR_I:
@@ -2803,7 +2803,7 @@ void RegexCompile::matchStartType() {
fRXPat->fInitialChars->addAll(*s);
numInitialStrings += 2;
}
- atStart = FALSE;
+ atStart = false;
break;
case URX_LOOP_DOT_I:
@@ -2814,7 +2814,7 @@ void RegexCompile::matchStartType() {
fRXPat->fInitialChars->complement();
numInitialStrings += 2;
}
- atStart = FALSE;
+ atStart = false;
break;
@@ -2827,7 +2827,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2841,7 +2841,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2858,7 +2858,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2875,7 +2875,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2894,7 +2894,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2918,7 +2918,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2934,7 +2934,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2;
}
currentLen = safeIncrement(currentLen, 1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2957,21 +2957,21 @@ void RegexCompile::matchStartType() {
}
}
}
- atStart = FALSE;
+ atStart = false;
break;
case URX_JMP_SAV:
case URX_JMP_SAV_X:
// Combo of state save to the next loc, + jmp backwards.
// Net effect on min. length computation is nothing.
- atStart = FALSE;
+ atStart = false;
break;
case URX_BACKTRACK:
// Fails are kind of like a branch, except that the min length was
// propagated already, by the state save.
currentLen = forwardedLength.elementAti(loc+1);
- atStart = FALSE;
+ atStart = false;
break;
@@ -2986,7 +2986,7 @@ void RegexCompile::matchStartType() {
}
}
}
- atStart = FALSE;
+ atStart = false;
break;
@@ -3014,7 +3014,7 @@ void RegexCompile::matchStartType() {
}
currentLen = safeIncrement(currentLen, stringLen);
- atStart = FALSE;
+ atStart = false;
}
break;
@@ -3039,7 +3039,7 @@ void RegexCompile::matchStartType() {
numInitialStrings += 2; // Matching on an initial string not possible.
}
currentLen = safeIncrement(currentLen, stringLen);
- atStart = FALSE;
+ atStart = false;
}
break;
@@ -3067,7 +3067,7 @@ void RegexCompile::matchStartType() {
}
loc+=3; // Skips over operands of CTR_INIT
}
- atStart = FALSE;
+ atStart = false;
break;
@@ -3075,13 +3075,13 @@ void RegexCompile::matchStartType() {
case URX_CTR_LOOP_NG:
// Loop ops.
// The jump is conditional, backwards only.
- atStart = FALSE;
+ atStart = false;
break;
case URX_LOOP_C:
// More loop ops. These state-save to themselves.
// don't change the minimum match
- atStart = FALSE;
+ atStart = false;
break;
@@ -3177,7 +3177,7 @@ void RegexCompile::matchStartType() {
fRXPat->fStartType = START_CHAR;
fRXPat->fInitialChar = fRXPat->fInitialChars->charAt(0);
U_ASSERT(fRXPat->fInitialChar != (UChar32)-1);
- } else if (fRXPat->fInitialChars->contains((UChar32)0, (UChar32)0x10ffff) == FALSE &&
+ } else if (fRXPat->fInitialChars->contains((UChar32)0, (UChar32)0x10ffff) == false &&
fRXPat->fMinMatchLen > 0) {
// Matches start with a set of character smaller than the set of all chars.
fRXPat->fStartType = START_SET;
@@ -3834,7 +3834,7 @@ void RegexCompile::stripNOPs() {
fRXPat->fCompiledPat->setElementAt(op, dst);
dst++;
- fRXPat->fNeedsAltInput = TRUE;
+ fRXPat->fNeedsAltInput = true;
break;
}
case URX_RESERVED_OP:
@@ -3944,25 +3944,25 @@ void RegexCompile::error(UErrorCode e) {
// Numeric because there is no portable way to enter them as literals.
// (Think EBCDIC).
//
-static const UChar chCR = 0x0d; // New lines, for terminating comments.
-static const UChar chLF = 0x0a; // Line Feed
-static const UChar chPound = 0x23; // '#', introduces a comment.
-static const UChar chDigit0 = 0x30; // '0'
-static const UChar chDigit7 = 0x37; // '9'
-static const UChar chColon = 0x3A; // ':'
-static const UChar chE = 0x45; // 'E'
-static const UChar chQ = 0x51; // 'Q'
-//static const UChar chN = 0x4E; // 'N'
-static const UChar chP = 0x50; // 'P'
-static const UChar chBackSlash = 0x5c; // '\' introduces a char escape
-//static const UChar chLBracket = 0x5b; // '['
-static const UChar chRBracket = 0x5d; // ']'
-static const UChar chUp = 0x5e; // '^'
-static const UChar chLowerP = 0x70;
-static const UChar chLBrace = 0x7b; // '{'
-static const UChar chRBrace = 0x7d; // '}'
-static const UChar chNEL = 0x85; // NEL newline variant
-static const UChar chLS = 0x2028; // Unicode Line Separator
+static const char16_t chCR = 0x0d; // New lines, for terminating comments.
+static const char16_t chLF = 0x0a; // Line Feed
+static const char16_t chPound = 0x23; // '#', introduces a comment.
+static const char16_t chDigit0 = 0x30; // '0'
+static const char16_t chDigit7 = 0x37; // '9'
+static const char16_t chColon = 0x3A; // ':'
+static const char16_t chE = 0x45; // 'E'
+static const char16_t chQ = 0x51; // 'Q'
+//static const char16_t chN = 0x4E; // 'N'
+static const char16_t chP = 0x50; // 'P'
+static const char16_t chBackSlash = 0x5c; // '\' introduces a char escape
+//static const char16_t chLBracket = 0x5b; // '['
+static const char16_t chRBracket = 0x5d; // ']'
+static const char16_t chUp = 0x5e; // '^'
+static const char16_t chLowerP = 0x70;
+static const char16_t chLBrace = 0x7b; // '{'
+static const char16_t chRBrace = 0x7d; // '}'
+static const char16_t chNEL = 0x85; // NEL newline variant
+static const char16_t chLS = 0x2028; // Unicode Line Separator
//------------------------------------------------------------------------------
@@ -4032,13 +4032,13 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
tailRecursion:
fScanIndex = UTEXT_GETNATIVEINDEX(fRXPat->fPattern);
c.fChar = nextCharLL();
- c.fQuoted = FALSE;
+ c.fQuoted = false;
if (fQuoteMode) {
- c.fQuoted = TRUE;
+ c.fQuoted = true;
if ((c.fChar==chBackSlash && peekCharLL()==chE && ((fModeFlags & UREGEX_LITERAL) == 0)) ||
c.fChar == (UChar32)-1) {
- fQuoteMode = FALSE; // Exit quote mode,
+ fQuoteMode = false; // Exit quote mode,
nextCharLL(); // discard the E
// nextChar(c); // recurse to get the real next char
goto tailRecursion; // Note: fuzz testing produced testcases that
@@ -4050,7 +4050,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
// Don't check for any further escapes, just return it as-is.
// Don't set c.fQuoted, because that would prevent the state machine from
// dispatching on the character.
- fInBackslashQuote = FALSE;
+ fInBackslashQuote = false;
}
else
{
@@ -4065,7 +4065,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
if (c.fChar == (UChar32)-1) {
break; // End of Input
}
- if (c.fChar == chPound && fEOLComments == TRUE) {
+ if (c.fChar == chPound && fEOLComments) {
// Start of a comment. Consume the rest of it, until EOF or a new line
for (;;) {
c.fChar = nextCharLL();
@@ -4079,7 +4079,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
}
}
// TODO: check what Java & Perl do with non-ASCII white spaces. Ticket 6061.
- if (PatternProps::isWhiteSpace(c.fChar) == FALSE) {
+ if (PatternProps::isWhiteSpace(c.fChar) == false) {
break;
}
c.fChar = nextCharLL();
@@ -4098,7 +4098,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
// Return the single equivalent character.
//
nextCharLL(); // get & discard the peeked char.
- c.fQuoted = TRUE;
+ c.fQuoted = true;
if (UTEXT_FULL_TEXT_IN_CHUNK(fRXPat->fPattern, fPatternLength)) {
int32_t endIndex = (int32_t)pos;
@@ -4155,11 +4155,11 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
c.fChar >>= 3;
}
}
- c.fQuoted = TRUE;
+ c.fQuoted = true;
}
else if (peekCharLL() == chQ) {
// "\Q" enter quote mode, which will continue until "\E"
- fQuoteMode = TRUE;
+ fQuoteMode = true;
nextCharLL(); // discard the 'Q'.
// nextChar(c); // recurse to get the real next char.
goto tailRecursion; // Note: fuzz testing produced test cases that
@@ -4170,7 +4170,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
// We are in a '\' escape that will be handled by the state table scanner.
// Just return the backslash, but remember that the following char is to
// be taken literally.
- fInBackslashQuote = TRUE;
+ fInBackslashQuote = true;
}
}
}
@@ -4178,7 +4178,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
// re-enable # to end-of-line comments, in case they were disabled.
// They are disabled by the parser upon seeing '(?', but this lasts for
// the fetching of the next character only.
- fEOLComments = TRUE;
+ fEOLComments = true;
// putc(c.fChar, stdout);
}
@@ -4249,14 +4249,14 @@ UChar32 RegexCompile::scanNamedChar() {
// the scan position should be just after the '}'
//
// Return a UnicodeSet, constructed from the \P pattern,
-// or NULL if the pattern is invalid.
+// or nullptr if the pattern is invalid.
//
//------------------------------------------------------------------------------
UnicodeSet *RegexCompile::scanProp() {
- UnicodeSet *uset = NULL;
+ UnicodeSet *uset = nullptr;
if (U_FAILURE(*fStatus)) {
- return NULL;
+ return nullptr;
}
(void)chLowerP; // Suppress compiler unused variable warning.
U_ASSERT(fC.fChar == chLowerP || fC.fChar == chP);
@@ -4266,7 +4266,7 @@ UnicodeSet *RegexCompile::scanProp() {
nextChar(fC);
if (fC.fChar != chLBrace) {
error(U_REGEX_PROPERTY_SYNTAX);
- return NULL;
+ return nullptr;
}
for (;;) {
nextChar(fC);
@@ -4276,7 +4276,7 @@ UnicodeSet *RegexCompile::scanProp() {
if (fC.fChar == -1) {
// Hit the end of the input string without finding the closing '}'
error(U_REGEX_PROPERTY_SYNTAX);
- return NULL;
+ return nullptr;
}
propertyName.append(fC.fChar);
}
@@ -4294,7 +4294,7 @@ UnicodeSet *RegexCompile::scanProp() {
// the scan position must be on the closing ']'
//
// Return a UnicodeSet constructed from the pattern,
-// or NULL if this is not a valid POSIX-style set expression.
+// or nullptr if this is not a valid POSIX-style set expression.
// If not a property expression, restore the initial scan position
// (to the opening ':')
//
@@ -4305,10 +4305,10 @@ UnicodeSet *RegexCompile::scanProp() {
//
//------------------------------------------------------------------------------
UnicodeSet *RegexCompile::scanPosixProp() {
- UnicodeSet *uset = NULL;
+ UnicodeSet *uset = nullptr;
if (U_FAILURE(*fStatus)) {
- return NULL;
+ return nullptr;
}
U_ASSERT(fC.fChar == chColon);
@@ -4331,17 +4331,17 @@ UnicodeSet *RegexCompile::scanPosixProp() {
// ending on the second closing ].
UnicodeString propName;
- UBool negated = FALSE;
+ UBool negated = false;
// Check for and consume the '^' in a negated POSIX property, e.g. [:^Letter:]
nextChar(fC);
if (fC.fChar == chUp) {
- negated = TRUE;
+ negated = true;
nextChar(fC);
}
// Scan for the closing ":]", collecting the property name along the way.
- UBool sawPropSetTerminator = FALSE;
+ UBool sawPropSetTerminator = false;
for (;;) {
propName.append(fC.fChar);
nextChar(fC);
@@ -4352,7 +4352,7 @@ UnicodeSet *RegexCompile::scanPosixProp() {
if (fC.fChar == chColon) {
nextChar(fC);
if (fC.fChar == chRBracket) {
- sawPropSetTerminator = TRUE;
+ sawPropSetTerminator = true;
}
break;
}
@@ -4412,7 +4412,7 @@ UnicodeSet *RegexCompile::createSetForProperty(const UnicodeString &propName, UB
if (fModeFlags & UREGEX_CASE_INSENSITIVE) {
usetFlags |= USET_CASE_INSENSITIVE;
}
- set.adoptInsteadAndCheckErrorCode(new UnicodeSet(setExpr, usetFlags, NULL, status), status);
+ set.adoptInsteadAndCheckErrorCode(new UnicodeSet(setExpr, usetFlags, nullptr, status), status);
if (U_SUCCESS(status) || status == U_MEMORY_ALLOCATION_ERROR) {
break;
}
@@ -4610,16 +4610,16 @@ UnicodeSet *RegexCompile::createSetForProperty(const UnicodeString &propName, UB
// in the expression.
//
void RegexCompile::setEval(int32_t nextOp) {
- UnicodeSet *rightOperand = NULL;
- UnicodeSet *leftOperand = NULL;
+ UnicodeSet *rightOperand = nullptr;
+ UnicodeSet *leftOperand = nullptr;
for (;;) {
- U_ASSERT(fSetOpStack.empty()==FALSE);
+ U_ASSERT(fSetOpStack.empty()==false);
int32_t pendingSetOperation = fSetOpStack.peeki();
if ((pendingSetOperation&0xffff0000) < (nextOp&0xffff0000)) {
break;
}
fSetOpStack.popi();
- U_ASSERT(fSetStack.empty() == FALSE);
+ U_ASSERT(fSetStack.empty() == false);
rightOperand = (UnicodeSet *)fSetStack.peek();
// ICU 70 adds emoji properties of strings, but createSetForProperty() removes all strings
// (see comments there).
diff --git a/contrib/libs/icu/i18n/regexcmp.h b/contrib/libs/icu/i18n/regexcmp.h
index 9e1aa170f08..81ac9e51784 100644
--- a/contrib/libs/icu/i18n/regexcmp.h
+++ b/contrib/libs/icu/i18n/regexcmp.h
@@ -37,7 +37,6 @@ U_NAMESPACE_BEGIN
// class RegexCompile Contains the regular expression compiler.
//
//--------------------------------------------------------------------------------
-struct RegexTableEl;
class RegexPattern;
@@ -65,9 +64,6 @@ public:
void nextChar(RegexPatternChar &c); // Get the next char from the input stream.
- static void cleanup(); // Memory cleanup
-
-
// Categories of parentheses in pattern.
// The category is saved in the compile-time parentheses stack frame, and
@@ -154,12 +150,6 @@ private:
RegexPatternChar fC; // Current char for parse state machine
// processing.
- //
- // Data for the state machine that parses the regular expression.
- //
- RegexTableEl **fStateTable; // State Transition Table for regex Rule
- // parsing. index by p[state][char-class]
-
uint16_t fStack[kStackSize]; // State stack, holds state pushes
int32_t fStackPtr; // and pops as specified in the state
// transition rules.
@@ -211,10 +201,6 @@ private:
// -1 for the upper interval value means none
// was specified (unlimited occurrences.)
- int64_t fNameStartPos; // Starting position of a \N{NAME} name in a
- // pattern, valid while remainder of name is
- // scanned.
-
UStack fSetStack; // Stack of UnicodeSets, used while evaluating
// (at compile time) set expressions within
// the pattern.
diff --git a/contrib/libs/icu/i18n/regexcst.h b/contrib/libs/icu/i18n/regexcst.h
index d44c2aec2be..a475b6b363e 100644
--- a/contrib/libs/icu/i18n/regexcst.h
+++ b/contrib/libs/icu/i18n/regexcst.h
@@ -149,213 +149,213 @@ struct RegexTableEl {
};
static const struct RegexTableEl gRuleParseStateTable[] = {
- {doNOP, 0, 0, 0, TRUE}
- , {doPatStart, 255, 2,0, FALSE} // 1 start
- , {doLiteralChar, 254, 14,0, TRUE} // 2 term
- , {doLiteralChar, 130, 14,0, TRUE} // 3
- , {doSetBegin, 91 /* [ */, 123, 205, TRUE} // 4
- , {doNOP, 40 /* ( */, 27,0, TRUE} // 5
- , {doDotAny, 46 /* . */, 14,0, TRUE} // 6
- , {doCaret, 94 /* ^ */, 14,0, TRUE} // 7
- , {doDollar, 36 /* $ */, 14,0, TRUE} // 8
- , {doNOP, 92 /* \ */, 89,0, TRUE} // 9
- , {doOrOperator, 124 /* | */, 2,0, TRUE} // 10
- , {doCloseParen, 41 /* ) */, 255,0, TRUE} // 11
- , {doPatFinish, 253, 2,0, FALSE} // 12
- , {doRuleError, 255, 206,0, FALSE} // 13
- , {doNOP, 42 /* * */, 68,0, TRUE} // 14 expr-quant
- , {doNOP, 43 /* + */, 71,0, TRUE} // 15
- , {doNOP, 63 /* ? */, 74,0, TRUE} // 16
- , {doIntervalInit, 123 /* { */, 77,0, TRUE} // 17
- , {doNOP, 40 /* ( */, 23,0, TRUE} // 18
- , {doNOP, 255, 20,0, FALSE} // 19
- , {doOrOperator, 124 /* | */, 2,0, TRUE} // 20 expr-cont
- , {doCloseParen, 41 /* ) */, 255,0, TRUE} // 21
- , {doNOP, 255, 2,0, FALSE} // 22
- , {doSuppressComments, 63 /* ? */, 25,0, TRUE} // 23 open-paren-quant
- , {doNOP, 255, 27,0, FALSE} // 24
- , {doNOP, 35 /* # */, 50, 14, TRUE} // 25 open-paren-quant2
- , {doNOP, 255, 29,0, FALSE} // 26
- , {doSuppressComments, 63 /* ? */, 29,0, TRUE} // 27 open-paren
- , {doOpenCaptureParen, 255, 2, 14, FALSE} // 28
- , {doOpenNonCaptureParen, 58 /* : */, 2, 14, TRUE} // 29 open-paren-extended
- , {doOpenAtomicParen, 62 /* > */, 2, 14, TRUE} // 30
- , {doOpenLookAhead, 61 /* = */, 2, 20, TRUE} // 31
- , {doOpenLookAheadNeg, 33 /* ! */, 2, 20, TRUE} // 32
- , {doNOP, 60 /* < */, 46,0, TRUE} // 33
- , {doNOP, 35 /* # */, 50, 2, TRUE} // 34
- , {doBeginMatchMode, 105 /* i */, 53,0, FALSE} // 35
- , {doBeginMatchMode, 100 /* d */, 53,0, FALSE} // 36
- , {doBeginMatchMode, 109 /* m */, 53,0, FALSE} // 37
- , {doBeginMatchMode, 115 /* s */, 53,0, FALSE} // 38
- , {doBeginMatchMode, 117 /* u */, 53,0, FALSE} // 39
- , {doBeginMatchMode, 119 /* w */, 53,0, FALSE} // 40
- , {doBeginMatchMode, 120 /* x */, 53,0, FALSE} // 41
- , {doBeginMatchMode, 45 /* - */, 53,0, FALSE} // 42
- , {doConditionalExpr, 40 /* ( */, 206,0, TRUE} // 43
- , {doPerlInline, 123 /* { */, 206,0, TRUE} // 44
- , {doBadOpenParenType, 255, 206,0, FALSE} // 45
- , {doOpenLookBehind, 61 /* = */, 2, 20, TRUE} // 46 open-paren-lookbehind
- , {doOpenLookBehindNeg, 33 /* ! */, 2, 20, TRUE} // 47
- , {doBeginNamedCapture, 129, 64,0, FALSE} // 48
- , {doBadOpenParenType, 255, 206,0, FALSE} // 49
- , {doNOP, 41 /* ) */, 255,0, TRUE} // 50 paren-comment
- , {doMismatchedParenErr, 253, 206,0, FALSE} // 51
- , {doNOP, 255, 50,0, TRUE} // 52
- , {doMatchMode, 105 /* i */, 53,0, TRUE} // 53 paren-flag
- , {doMatchMode, 100 /* d */, 53,0, TRUE} // 54
- , {doMatchMode, 109 /* m */, 53,0, TRUE} // 55
- , {doMatchMode, 115 /* s */, 53,0, TRUE} // 56
- , {doMatchMode, 117 /* u */, 53,0, TRUE} // 57
- , {doMatchMode, 119 /* w */, 53,0, TRUE} // 58
- , {doMatchMode, 120 /* x */, 53,0, TRUE} // 59
- , {doMatchMode, 45 /* - */, 53,0, TRUE} // 60
- , {doSetMatchMode, 41 /* ) */, 2,0, TRUE} // 61
- , {doMatchModeParen, 58 /* : */, 2, 14, TRUE} // 62
- , {doBadModeFlag, 255, 206,0, FALSE} // 63
- , {doContinueNamedCapture, 129, 64,0, TRUE} // 64 named-capture
- , {doContinueNamedCapture, 128, 64,0, TRUE} // 65
- , {doOpenCaptureParen, 62 /* > */, 2, 14, TRUE} // 66
- , {doBadNamedCapture, 255, 206,0, FALSE} // 67
- , {doNGStar, 63 /* ? */, 20,0, TRUE} // 68 quant-star
- , {doPossessiveStar, 43 /* + */, 20,0, TRUE} // 69
- , {doStar, 255, 20,0, FALSE} // 70
- , {doNGPlus, 63 /* ? */, 20,0, TRUE} // 71 quant-plus
- , {doPossessivePlus, 43 /* + */, 20,0, TRUE} // 72
- , {doPlus, 255, 20,0, FALSE} // 73
- , {doNGOpt, 63 /* ? */, 20,0, TRUE} // 74 quant-opt
- , {doPossessiveOpt, 43 /* + */, 20,0, TRUE} // 75
- , {doOpt, 255, 20,0, FALSE} // 76
- , {doNOP, 128, 79,0, FALSE} // 77 interval-open
- , {doIntervalError, 255, 206,0, FALSE} // 78
- , {doIntevalLowerDigit, 128, 79,0, TRUE} // 79 interval-lower
- , {doNOP, 44 /* , */, 83,0, TRUE} // 80
- , {doIntervalSame, 125 /* } */, 86,0, TRUE} // 81
- , {doIntervalError, 255, 206,0, FALSE} // 82
- , {doIntervalUpperDigit, 128, 83,0, TRUE} // 83 interval-upper
- , {doNOP, 125 /* } */, 86,0, TRUE} // 84
- , {doIntervalError, 255, 206,0, FALSE} // 85
- , {doNGInterval, 63 /* ? */, 20,0, TRUE} // 86 interval-type
- , {doPossessiveInterval, 43 /* + */, 20,0, TRUE} // 87
- , {doInterval, 255, 20,0, FALSE} // 88
- , {doBackslashA, 65 /* A */, 2,0, TRUE} // 89 backslash
- , {doBackslashB, 66 /* B */, 2,0, TRUE} // 90
- , {doBackslashb, 98 /* b */, 2,0, TRUE} // 91
- , {doBackslashd, 100 /* d */, 14,0, TRUE} // 92
- , {doBackslashD, 68 /* D */, 14,0, TRUE} // 93
- , {doBackslashG, 71 /* G */, 2,0, TRUE} // 94
- , {doBackslashh, 104 /* h */, 14,0, TRUE} // 95
- , {doBackslashH, 72 /* H */, 14,0, TRUE} // 96
- , {doNOP, 107 /* k */, 115,0, TRUE} // 97
- , {doNamedChar, 78 /* N */, 14,0, FALSE} // 98
- , {doProperty, 112 /* p */, 14,0, FALSE} // 99
- , {doProperty, 80 /* P */, 14,0, FALSE} // 100
- , {doBackslashR, 82 /* R */, 14,0, TRUE} // 101
- , {doEnterQuoteMode, 81 /* Q */, 2,0, TRUE} // 102
- , {doBackslashS, 83 /* S */, 14,0, TRUE} // 103
- , {doBackslashs, 115 /* s */, 14,0, TRUE} // 104
- , {doBackslashv, 118 /* v */, 14,0, TRUE} // 105
- , {doBackslashV, 86 /* V */, 14,0, TRUE} // 106
- , {doBackslashW, 87 /* W */, 14,0, TRUE} // 107
- , {doBackslashw, 119 /* w */, 14,0, TRUE} // 108
- , {doBackslashX, 88 /* X */, 14,0, TRUE} // 109
- , {doBackslashZ, 90 /* Z */, 2,0, TRUE} // 110
- , {doBackslashz, 122 /* z */, 2,0, TRUE} // 111
- , {doBackRef, 128, 14,0, TRUE} // 112
- , {doEscapeError, 253, 206,0, FALSE} // 113
- , {doEscapedLiteralChar, 255, 14,0, TRUE} // 114
- , {doBeginNamedBackRef, 60 /* < */, 117,0, TRUE} // 115 named-backref
- , {doBadNamedCapture, 255, 206,0, FALSE} // 116
- , {doContinueNamedBackRef, 129, 119,0, TRUE} // 117 named-backref-2
- , {doBadNamedCapture, 255, 206,0, FALSE} // 118
- , {doContinueNamedBackRef, 129, 119,0, TRUE} // 119 named-backref-3
- , {doContinueNamedBackRef, 128, 119,0, TRUE} // 120
- , {doCompleteNamedBackRef, 62 /* > */, 14,0, TRUE} // 121
- , {doBadNamedCapture, 255, 206,0, FALSE} // 122
- , {doSetNegate, 94 /* ^ */, 126,0, TRUE} // 123 set-open
- , {doSetPosixProp, 58 /* : */, 128,0, FALSE} // 124
- , {doNOP, 255, 126,0, FALSE} // 125
- , {doSetLiteral, 93 /* ] */, 141,0, TRUE} // 126 set-open2
- , {doNOP, 255, 131,0, FALSE} // 127
- , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 128 set-posix
- , {doNOP, 58 /* : */, 131,0, FALSE} // 129
- , {doRuleError, 255, 206,0, FALSE} // 130
- , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 131 set-start
- , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 132
- , {doNOP, 92 /* \ */, 191,0, TRUE} // 133
- , {doNOP, 45 /* - */, 137,0, TRUE} // 134
- , {doNOP, 38 /* & */, 139,0, TRUE} // 135
- , {doSetLiteral, 255, 141,0, TRUE} // 136
- , {doRuleError, 45 /* - */, 206,0, FALSE} // 137 set-start-dash
- , {doSetAddDash, 255, 141,0, FALSE} // 138
- , {doRuleError, 38 /* & */, 206,0, FALSE} // 139 set-start-amp
- , {doSetAddAmp, 255, 141,0, FALSE} // 140
- , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 141 set-after-lit
- , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 142
- , {doNOP, 45 /* - */, 178,0, TRUE} // 143
- , {doNOP, 38 /* & */, 169,0, TRUE} // 144
- , {doNOP, 92 /* \ */, 191,0, TRUE} // 145
- , {doSetNoCloseError, 253, 206,0, FALSE} // 146
- , {doSetLiteral, 255, 141,0, TRUE} // 147
- , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 148 set-after-set
- , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 149
- , {doNOP, 45 /* - */, 171,0, TRUE} // 150
- , {doNOP, 38 /* & */, 166,0, TRUE} // 151
- , {doNOP, 92 /* \ */, 191,0, TRUE} // 152
- , {doSetNoCloseError, 253, 206,0, FALSE} // 153
- , {doSetLiteral, 255, 141,0, TRUE} // 154
- , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 155 set-after-range
- , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 156
- , {doNOP, 45 /* - */, 174,0, TRUE} // 157
- , {doNOP, 38 /* & */, 176,0, TRUE} // 158
- , {doNOP, 92 /* \ */, 191,0, TRUE} // 159
- , {doSetNoCloseError, 253, 206,0, FALSE} // 160
- , {doSetLiteral, 255, 141,0, TRUE} // 161
- , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 162 set-after-op
- , {doSetOpError, 93 /* ] */, 206,0, FALSE} // 163
- , {doNOP, 92 /* \ */, 191,0, TRUE} // 164
- , {doSetLiteral, 255, 141,0, TRUE} // 165
- , {doSetBeginIntersection1, 91 /* [ */, 123, 148, TRUE} // 166 set-set-amp
- , {doSetIntersection2, 38 /* & */, 162,0, TRUE} // 167
- , {doSetAddAmp, 255, 141,0, FALSE} // 168
- , {doSetIntersection2, 38 /* & */, 162,0, TRUE} // 169 set-lit-amp
- , {doSetAddAmp, 255, 141,0, FALSE} // 170
- , {doSetBeginDifference1, 91 /* [ */, 123, 148, TRUE} // 171 set-set-dash
- , {doSetDifference2, 45 /* - */, 162,0, TRUE} // 172
- , {doSetAddDash, 255, 141,0, FALSE} // 173
- , {doSetDifference2, 45 /* - */, 162,0, TRUE} // 174 set-range-dash
- , {doSetAddDash, 255, 141,0, FALSE} // 175
- , {doSetIntersection2, 38 /* & */, 162,0, TRUE} // 176 set-range-amp
- , {doSetAddAmp, 255, 141,0, FALSE} // 177
- , {doSetDifference2, 45 /* - */, 162,0, TRUE} // 178 set-lit-dash
- , {doSetAddDash, 91 /* [ */, 141,0, FALSE} // 179
- , {doSetAddDash, 93 /* ] */, 141,0, FALSE} // 180
- , {doNOP, 92 /* \ */, 183,0, TRUE} // 181
- , {doSetRange, 255, 155,0, TRUE} // 182
- , {doSetOpError, 115 /* s */, 206,0, FALSE} // 183 set-lit-dash-escape
- , {doSetOpError, 83 /* S */, 206,0, FALSE} // 184
- , {doSetOpError, 119 /* w */, 206,0, FALSE} // 185
- , {doSetOpError, 87 /* W */, 206,0, FALSE} // 186
- , {doSetOpError, 100 /* d */, 206,0, FALSE} // 187
- , {doSetOpError, 68 /* D */, 206,0, FALSE} // 188
- , {doSetNamedRange, 78 /* N */, 155,0, FALSE} // 189
- , {doSetRange, 255, 155,0, TRUE} // 190
- , {doSetProp, 112 /* p */, 148,0, FALSE} // 191 set-escape
- , {doSetProp, 80 /* P */, 148,0, FALSE} // 192
- , {doSetNamedChar, 78 /* N */, 141,0, FALSE} // 193
- , {doSetBackslash_s, 115 /* s */, 155,0, TRUE} // 194
- , {doSetBackslash_S, 83 /* S */, 155,0, TRUE} // 195
- , {doSetBackslash_w, 119 /* w */, 155,0, TRUE} // 196
- , {doSetBackslash_W, 87 /* W */, 155,0, TRUE} // 197
- , {doSetBackslash_d, 100 /* d */, 155,0, TRUE} // 198
- , {doSetBackslash_D, 68 /* D */, 155,0, TRUE} // 199
- , {doSetBackslash_h, 104 /* h */, 155,0, TRUE} // 200
- , {doSetBackslash_H, 72 /* H */, 155,0, TRUE} // 201
- , {doSetBackslash_v, 118 /* v */, 155,0, TRUE} // 202
- , {doSetBackslash_V, 86 /* V */, 155,0, TRUE} // 203
- , {doSetLiteralEscaped, 255, 141,0, TRUE} // 204
- , {doSetFinish, 255, 14,0, FALSE} // 205 set-finish
- , {doExit, 255, 206,0, TRUE} // 206 errorDeath
+ {doNOP, 0, 0, 0, true}
+ , {doPatStart, 255, 2,0, false} // 1 start
+ , {doLiteralChar, 254, 14,0, true} // 2 term
+ , {doLiteralChar, 130, 14,0, true} // 3
+ , {doSetBegin, 91 /* [ */, 123, 205, true} // 4
+ , {doNOP, 40 /* ( */, 27,0, true} // 5
+ , {doDotAny, 46 /* . */, 14,0, true} // 6
+ , {doCaret, 94 /* ^ */, 14,0, true} // 7
+ , {doDollar, 36 /* $ */, 14,0, true} // 8
+ , {doNOP, 92 /* \ */, 89,0, true} // 9
+ , {doOrOperator, 124 /* | */, 2,0, true} // 10
+ , {doCloseParen, 41 /* ) */, 255,0, true} // 11
+ , {doPatFinish, 253, 2,0, false} // 12
+ , {doRuleError, 255, 206,0, false} // 13
+ , {doNOP, 42 /* * */, 68,0, true} // 14 expr-quant
+ , {doNOP, 43 /* + */, 71,0, true} // 15
+ , {doNOP, 63 /* ? */, 74,0, true} // 16
+ , {doIntervalInit, 123 /* { */, 77,0, true} // 17
+ , {doNOP, 40 /* ( */, 23,0, true} // 18
+ , {doNOP, 255, 20,0, false} // 19
+ , {doOrOperator, 124 /* | */, 2,0, true} // 20 expr-cont
+ , {doCloseParen, 41 /* ) */, 255,0, true} // 21
+ , {doNOP, 255, 2,0, false} // 22
+ , {doSuppressComments, 63 /* ? */, 25,0, true} // 23 open-paren-quant
+ , {doNOP, 255, 27,0, false} // 24
+ , {doNOP, 35 /* # */, 50, 14, true} // 25 open-paren-quant2
+ , {doNOP, 255, 29,0, false} // 26
+ , {doSuppressComments, 63 /* ? */, 29,0, true} // 27 open-paren
+ , {doOpenCaptureParen, 255, 2, 14, false} // 28
+ , {doOpenNonCaptureParen, 58 /* : */, 2, 14, true} // 29 open-paren-extended
+ , {doOpenAtomicParen, 62 /* > */, 2, 14, true} // 30
+ , {doOpenLookAhead, 61 /* = */, 2, 20, true} // 31
+ , {doOpenLookAheadNeg, 33 /* ! */, 2, 20, true} // 32
+ , {doNOP, 60 /* < */, 46,0, true} // 33
+ , {doNOP, 35 /* # */, 50, 2, true} // 34
+ , {doBeginMatchMode, 105 /* i */, 53,0, false} // 35
+ , {doBeginMatchMode, 100 /* d */, 53,0, false} // 36
+ , {doBeginMatchMode, 109 /* m */, 53,0, false} // 37
+ , {doBeginMatchMode, 115 /* s */, 53,0, false} // 38
+ , {doBeginMatchMode, 117 /* u */, 53,0, false} // 39
+ , {doBeginMatchMode, 119 /* w */, 53,0, false} // 40
+ , {doBeginMatchMode, 120 /* x */, 53,0, false} // 41
+ , {doBeginMatchMode, 45 /* - */, 53,0, false} // 42
+ , {doConditionalExpr, 40 /* ( */, 206,0, true} // 43
+ , {doPerlInline, 123 /* { */, 206,0, true} // 44
+ , {doBadOpenParenType, 255, 206,0, false} // 45
+ , {doOpenLookBehind, 61 /* = */, 2, 20, true} // 46 open-paren-lookbehind
+ , {doOpenLookBehindNeg, 33 /* ! */, 2, 20, true} // 47
+ , {doBeginNamedCapture, 129, 64,0, false} // 48
+ , {doBadOpenParenType, 255, 206,0, false} // 49
+ , {doNOP, 41 /* ) */, 255,0, true} // 50 paren-comment
+ , {doMismatchedParenErr, 253, 206,0, false} // 51
+ , {doNOP, 255, 50,0, true} // 52
+ , {doMatchMode, 105 /* i */, 53,0, true} // 53 paren-flag
+ , {doMatchMode, 100 /* d */, 53,0, true} // 54
+ , {doMatchMode, 109 /* m */, 53,0, true} // 55
+ , {doMatchMode, 115 /* s */, 53,0, true} // 56
+ , {doMatchMode, 117 /* u */, 53,0, true} // 57
+ , {doMatchMode, 119 /* w */, 53,0, true} // 58
+ , {doMatchMode, 120 /* x */, 53,0, true} // 59
+ , {doMatchMode, 45 /* - */, 53,0, true} // 60
+ , {doSetMatchMode, 41 /* ) */, 2,0, true} // 61
+ , {doMatchModeParen, 58 /* : */, 2, 14, true} // 62
+ , {doBadModeFlag, 255, 206,0, false} // 63
+ , {doContinueNamedCapture, 129, 64,0, true} // 64 named-capture
+ , {doContinueNamedCapture, 128, 64,0, true} // 65
+ , {doOpenCaptureParen, 62 /* > */, 2, 14, true} // 66
+ , {doBadNamedCapture, 255, 206,0, false} // 67
+ , {doNGStar, 63 /* ? */, 20,0, true} // 68 quant-star
+ , {doPossessiveStar, 43 /* + */, 20,0, true} // 69
+ , {doStar, 255, 20,0, false} // 70
+ , {doNGPlus, 63 /* ? */, 20,0, true} // 71 quant-plus
+ , {doPossessivePlus, 43 /* + */, 20,0, true} // 72
+ , {doPlus, 255, 20,0, false} // 73
+ , {doNGOpt, 63 /* ? */, 20,0, true} // 74 quant-opt
+ , {doPossessiveOpt, 43 /* + */, 20,0, true} // 75
+ , {doOpt, 255, 20,0, false} // 76
+ , {doNOP, 128, 79,0, false} // 77 interval-open
+ , {doIntervalError, 255, 206,0, false} // 78
+ , {doIntevalLowerDigit, 128, 79,0, true} // 79 interval-lower
+ , {doNOP, 44 /* , */, 83,0, true} // 80
+ , {doIntervalSame, 125 /* } */, 86,0, true} // 81
+ , {doIntervalError, 255, 206,0, false} // 82
+ , {doIntervalUpperDigit, 128, 83,0, true} // 83 interval-upper
+ , {doNOP, 125 /* } */, 86,0, true} // 84
+ , {doIntervalError, 255, 206,0, false} // 85
+ , {doNGInterval, 63 /* ? */, 20,0, true} // 86 interval-type
+ , {doPossessiveInterval, 43 /* + */, 20,0, true} // 87
+ , {doInterval, 255, 20,0, false} // 88
+ , {doBackslashA, 65 /* A */, 2,0, true} // 89 backslash
+ , {doBackslashB, 66 /* B */, 2,0, true} // 90
+ , {doBackslashb, 98 /* b */, 2,0, true} // 91
+ , {doBackslashd, 100 /* d */, 14,0, true} // 92
+ , {doBackslashD, 68 /* D */, 14,0, true} // 93
+ , {doBackslashG, 71 /* G */, 2,0, true} // 94
+ , {doBackslashh, 104 /* h */, 14,0, true} // 95
+ , {doBackslashH, 72 /* H */, 14,0, true} // 96
+ , {doNOP, 107 /* k */, 115,0, true} // 97
+ , {doNamedChar, 78 /* N */, 14,0, false} // 98
+ , {doProperty, 112 /* p */, 14,0, false} // 99
+ , {doProperty, 80 /* P */, 14,0, false} // 100
+ , {doBackslashR, 82 /* R */, 14,0, true} // 101
+ , {doEnterQuoteMode, 81 /* Q */, 2,0, true} // 102
+ , {doBackslashS, 83 /* S */, 14,0, true} // 103
+ , {doBackslashs, 115 /* s */, 14,0, true} // 104
+ , {doBackslashv, 118 /* v */, 14,0, true} // 105
+ , {doBackslashV, 86 /* V */, 14,0, true} // 106
+ , {doBackslashW, 87 /* W */, 14,0, true} // 107
+ , {doBackslashw, 119 /* w */, 14,0, true} // 108
+ , {doBackslashX, 88 /* X */, 14,0, true} // 109
+ , {doBackslashZ, 90 /* Z */, 2,0, true} // 110
+ , {doBackslashz, 122 /* z */, 2,0, true} // 111
+ , {doBackRef, 128, 14,0, true} // 112
+ , {doEscapeError, 253, 206,0, false} // 113
+ , {doEscapedLiteralChar, 255, 14,0, true} // 114
+ , {doBeginNamedBackRef, 60 /* < */, 117,0, true} // 115 named-backref
+ , {doBadNamedCapture, 255, 206,0, false} // 116
+ , {doContinueNamedBackRef, 129, 119,0, true} // 117 named-backref-2
+ , {doBadNamedCapture, 255, 206,0, false} // 118
+ , {doContinueNamedBackRef, 129, 119,0, true} // 119 named-backref-3
+ , {doContinueNamedBackRef, 128, 119,0, true} // 120
+ , {doCompleteNamedBackRef, 62 /* > */, 14,0, true} // 121
+ , {doBadNamedCapture, 255, 206,0, false} // 122
+ , {doSetNegate, 94 /* ^ */, 126,0, true} // 123 set-open
+ , {doSetPosixProp, 58 /* : */, 128,0, false} // 124
+ , {doNOP, 255, 126,0, false} // 125
+ , {doSetLiteral, 93 /* ] */, 141,0, true} // 126 set-open2
+ , {doNOP, 255, 131,0, false} // 127
+ , {doSetEnd, 93 /* ] */, 255,0, true} // 128 set-posix
+ , {doNOP, 58 /* : */, 131,0, false} // 129
+ , {doRuleError, 255, 206,0, false} // 130
+ , {doSetEnd, 93 /* ] */, 255,0, true} // 131 set-start
+ , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 132
+ , {doNOP, 92 /* \ */, 191,0, true} // 133
+ , {doNOP, 45 /* - */, 137,0, true} // 134
+ , {doNOP, 38 /* & */, 139,0, true} // 135
+ , {doSetLiteral, 255, 141,0, true} // 136
+ , {doRuleError, 45 /* - */, 206,0, false} // 137 set-start-dash
+ , {doSetAddDash, 255, 141,0, false} // 138
+ , {doRuleError, 38 /* & */, 206,0, false} // 139 set-start-amp
+ , {doSetAddAmp, 255, 141,0, false} // 140
+ , {doSetEnd, 93 /* ] */, 255,0, true} // 141 set-after-lit
+ , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 142
+ , {doNOP, 45 /* - */, 178,0, true} // 143
+ , {doNOP, 38 /* & */, 169,0, true} // 144
+ , {doNOP, 92 /* \ */, 191,0, true} // 145
+ , {doSetNoCloseError, 253, 206,0, false} // 146
+ , {doSetLiteral, 255, 141,0, true} // 147
+ , {doSetEnd, 93 /* ] */, 255,0, true} // 148 set-after-set
+ , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 149
+ , {doNOP, 45 /* - */, 171,0, true} // 150
+ , {doNOP, 38 /* & */, 166,0, true} // 151
+ , {doNOP, 92 /* \ */, 191,0, true} // 152
+ , {doSetNoCloseError, 253, 206,0, false} // 153
+ , {doSetLiteral, 255, 141,0, true} // 154
+ , {doSetEnd, 93 /* ] */, 255,0, true} // 155 set-after-range
+ , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 156
+ , {doNOP, 45 /* - */, 174,0, true} // 157
+ , {doNOP, 38 /* & */, 176,0, true} // 158
+ , {doNOP, 92 /* \ */, 191,0, true} // 159
+ , {doSetNoCloseError, 253, 206,0, false} // 160
+ , {doSetLiteral, 255, 141,0, true} // 161
+ , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 162 set-after-op
+ , {doSetOpError, 93 /* ] */, 206,0, false} // 163
+ , {doNOP, 92 /* \ */, 191,0, true} // 164
+ , {doSetLiteral, 255, 141,0, true} // 165
+ , {doSetBeginIntersection1, 91 /* [ */, 123, 148, true} // 166 set-set-amp
+ , {doSetIntersection2, 38 /* & */, 162,0, true} // 167
+ , {doSetAddAmp, 255, 141,0, false} // 168
+ , {doSetIntersection2, 38 /* & */, 162,0, true} // 169 set-lit-amp
+ , {doSetAddAmp, 255, 141,0, false} // 170
+ , {doSetBeginDifference1, 91 /* [ */, 123, 148, true} // 171 set-set-dash
+ , {doSetDifference2, 45 /* - */, 162,0, true} // 172
+ , {doSetAddDash, 255, 141,0, false} // 173
+ , {doSetDifference2, 45 /* - */, 162,0, true} // 174 set-range-dash
+ , {doSetAddDash, 255, 141,0, false} // 175
+ , {doSetIntersection2, 38 /* & */, 162,0, true} // 176 set-range-amp
+ , {doSetAddAmp, 255, 141,0, false} // 177
+ , {doSetDifference2, 45 /* - */, 162,0, true} // 178 set-lit-dash
+ , {doSetAddDash, 91 /* [ */, 141,0, false} // 179
+ , {doSetAddDash, 93 /* ] */, 141,0, false} // 180
+ , {doNOP, 92 /* \ */, 183,0, true} // 181
+ , {doSetRange, 255, 155,0, true} // 182
+ , {doSetOpError, 115 /* s */, 206,0, false} // 183 set-lit-dash-escape
+ , {doSetOpError, 83 /* S */, 206,0, false} // 184
+ , {doSetOpError, 119 /* w */, 206,0, false} // 185
+ , {doSetOpError, 87 /* W */, 206,0, false} // 186
+ , {doSetOpError, 100 /* d */, 206,0, false} // 187
+ , {doSetOpError, 68 /* D */, 206,0, false} // 188
+ , {doSetNamedRange, 78 /* N */, 155,0, false} // 189
+ , {doSetRange, 255, 155,0, true} // 190
+ , {doSetProp, 112 /* p */, 148,0, false} // 191 set-escape
+ , {doSetProp, 80 /* P */, 148,0, false} // 192
+ , {doSetNamedChar, 78 /* N */, 141,0, false} // 193
+ , {doSetBackslash_s, 115 /* s */, 155,0, true} // 194
+ , {doSetBackslash_S, 83 /* S */, 155,0, true} // 195
+ , {doSetBackslash_w, 119 /* w */, 155,0, true} // 196
+ , {doSetBackslash_W, 87 /* W */, 155,0, true} // 197
+ , {doSetBackslash_d, 100 /* d */, 155,0, true} // 198
+ , {doSetBackslash_D, 68 /* D */, 155,0, true} // 199
+ , {doSetBackslash_h, 104 /* h */, 155,0, true} // 200
+ , {doSetBackslash_H, 72 /* H */, 155,0, true} // 201
+ , {doSetBackslash_v, 118 /* v */, 155,0, true} // 202
+ , {doSetBackslash_V, 86 /* V */, 155,0, true} // 203
+ , {doSetLiteralEscaped, 255, 141,0, true} // 204
+ , {doSetFinish, 255, 14,0, false} // 205 set-finish
+ , {doExit, 255, 206,0, true} // 206 errorDeath
};
static const char * const RegexStateNames[] = { 0,
"start",
diff --git a/contrib/libs/icu/i18n/regeximp.cpp b/contrib/libs/icu/i18n/regeximp.cpp
index d5556696258..86e238c0f71 100644
--- a/contrib/libs/icu/i18n/regeximp.cpp
+++ b/contrib/libs/icu/i18n/regeximp.cpp
@@ -19,7 +19,7 @@
U_NAMESPACE_BEGIN
CaseFoldingUTextIterator::CaseFoldingUTextIterator(UText &text) :
- fUText(text), fFoldChars(NULL), fFoldLength(0) {
+ fUText(text), fFoldChars(nullptr), fFoldLength(0) {
}
CaseFoldingUTextIterator::~CaseFoldingUTextIterator() {}
@@ -27,7 +27,7 @@ CaseFoldingUTextIterator::~CaseFoldingUTextIterator() {}
UChar32 CaseFoldingUTextIterator::next() {
UChar32 foldedC;
UChar32 originalC;
- if (fFoldChars == NULL) {
+ if (fFoldChars == nullptr) {
// We are not in a string folding of an earlier character.
// Start handling the next char from the input UText.
originalC = UTEXT_NEXT32(&fUText);
@@ -42,7 +42,7 @@ UChar32 CaseFoldingUTextIterator::next() {
fFoldLength = ~fFoldLength;
}
foldedC = (UChar32)fFoldLength;
- fFoldChars = NULL;
+ fFoldChars = nullptr;
return foldedC;
}
// String foldings fall through here.
@@ -51,20 +51,20 @@ UChar32 CaseFoldingUTextIterator::next() {
U16_NEXT(fFoldChars, fFoldIndex, fFoldLength, foldedC);
if (fFoldIndex >= fFoldLength) {
- fFoldChars = NULL;
+ fFoldChars = nullptr;
}
return foldedC;
}
UBool CaseFoldingUTextIterator::inExpansion() {
- return fFoldChars != NULL;
+ return fFoldChars != nullptr;
}
-CaseFoldingUCharIterator::CaseFoldingUCharIterator(const UChar *chars, int64_t start, int64_t limit) :
- fChars(chars), fIndex(start), fLimit(limit), fFoldChars(NULL), fFoldLength(0) {
+CaseFoldingUCharIterator::CaseFoldingUCharIterator(const char16_t *chars, int64_t start, int64_t limit) :
+ fChars(chars), fIndex(start), fLimit(limit), fFoldChars(nullptr), fFoldLength(0) {
}
@@ -74,7 +74,7 @@ CaseFoldingUCharIterator::~CaseFoldingUCharIterator() {}
UChar32 CaseFoldingUCharIterator::next() {
UChar32 foldedC;
UChar32 originalC;
- if (fFoldChars == NULL) {
+ if (fFoldChars == nullptr) {
// We are not in a string folding of an earlier character.
// Start handling the next char from the input UText.
if (fIndex >= fLimit) {
@@ -90,7 +90,7 @@ UChar32 CaseFoldingUCharIterator::next() {
fFoldLength = ~fFoldLength;
}
foldedC = (UChar32)fFoldLength;
- fFoldChars = NULL;
+ fFoldChars = nullptr;
return foldedC;
}
// String foldings fall through here.
@@ -99,14 +99,14 @@ UChar32 CaseFoldingUCharIterator::next() {
U16_NEXT(fFoldChars, fFoldIndex, fFoldLength, foldedC);
if (fFoldIndex >= fFoldLength) {
- fFoldChars = NULL;
+ fFoldChars = nullptr;
}
return foldedC;
}
UBool CaseFoldingUCharIterator::inExpansion() {
- return fFoldChars != NULL;
+ return fFoldChars != nullptr;
}
int64_t CaseFoldingUCharIterator::getIndex() {
diff --git a/contrib/libs/icu/i18n/regeximp.h b/contrib/libs/icu/i18n/regeximp.h
index bb0e1e838de..446cd90747c 100644
--- a/contrib/libs/icu/i18n/regeximp.h
+++ b/contrib/libs/icu/i18n/regeximp.h
@@ -343,7 +343,7 @@ inline void Regex8BitSet::add(UChar32 c) {
}
inline void Regex8BitSet::init(const UnicodeSet *s) {
- if (s != NULL) {
+ if (s != nullptr) {
for (int32_t i=0; i<=255; i++) {
if (s->contains(i)) {
this->add(i);
@@ -374,21 +374,21 @@ class CaseFoldingUTextIterator: public UMemory {
// folding of the same code point from the original UText.
private:
UText &fUText;
- const UChar *fFoldChars;
+ const char16_t *fFoldChars;
int32_t fFoldLength;
int32_t fFoldIndex;
};
-// Case folded UChar * string iterator.
-// Wraps a UChar *, provides a case-folded enumeration over its contents.
+// Case folded char16_t * string iterator.
+// Wraps a char16_t *, provides a case-folded enumeration over its contents.
// Used in implementing case insensitive matching constructs.
// Implementation in rematch.cpp
class CaseFoldingUCharIterator: public UMemory {
public:
- CaseFoldingUCharIterator(const UChar *chars, int64_t start, int64_t limit);
+ CaseFoldingUCharIterator(const char16_t *chars, int64_t start, int64_t limit);
~CaseFoldingUCharIterator();
UChar32 next(); // Next case folded character
@@ -400,10 +400,10 @@ class CaseFoldingUCharIterator: public UMemory {
int64_t getIndex(); // Return the current input buffer index.
private:
- const UChar *fChars;
+ const char16_t *fChars;
int64_t fIndex;
int64_t fLimit;
- const UChar *fFoldChars;
+ const char16_t *fFoldChars;
int32_t fFoldLength;
int32_t fFoldIndex;
diff --git a/contrib/libs/icu/i18n/regexst.cpp b/contrib/libs/icu/i18n/regexst.cpp
index 97e417ab5a8..91032305442 100644
--- a/contrib/libs/icu/i18n/regexst.cpp
+++ b/contrib/libs/icu/i18n/regexst.cpp
@@ -69,7 +69,7 @@ constexpr char16_t const *gGC_LVTPattern = u"[\\p{Hangul_Syllable_Type=LVT}]
RegexStaticSets *RegexStaticSets::gStaticSets = nullptr;
-UInitOnce gStaticSetsInitOnce = U_INITONCE_INITIALIZER;
+UInitOnce gStaticSetsInitOnce {};
RegexStaticSets::RegexStaticSets(UErrorCode *status) {
@@ -77,13 +77,13 @@ RegexStaticSets::RegexStaticSets(UErrorCode *status) {
fUnescapeCharSet.addAll(UnicodeString(true, gUnescapeChars, -1)).freeze();
fPropSets[URX_ISWORD_SET].applyPattern(UnicodeString(true, gIsWordPattern, -1), *status).freeze();
fPropSets[URX_ISSPACE_SET].applyPattern(UnicodeString(true, gIsSpacePattern, -1), *status).freeze();
- fPropSets[URX_GC_EXTEND].applyPattern(UnicodeString(TRUE, gGC_ExtendPattern, -1), *status).freeze();
- fPropSets[URX_GC_CONTROL].applyPattern(UnicodeString(TRUE, gGC_ControlPattern, -1), *status).freeze();
- fPropSets[URX_GC_L].applyPattern(UnicodeString(TRUE, gGC_LPattern, -1), *status).freeze();
- fPropSets[URX_GC_V].applyPattern(UnicodeString(TRUE, gGC_VPattern, -1), *status).freeze();
- fPropSets[URX_GC_T].applyPattern(UnicodeString(TRUE, gGC_TPattern, -1), *status).freeze();
- fPropSets[URX_GC_LV].applyPattern(UnicodeString(TRUE, gGC_LVPattern, -1), *status).freeze();
- fPropSets[URX_GC_LVT].applyPattern(UnicodeString(TRUE, gGC_LVTPattern, -1), *status).freeze();
+ fPropSets[URX_GC_EXTEND].applyPattern(UnicodeString(true, gGC_ExtendPattern, -1), *status).freeze();
+ fPropSets[URX_GC_CONTROL].applyPattern(UnicodeString(true, gGC_ControlPattern, -1), *status).freeze();
+ fPropSets[URX_GC_L].applyPattern(UnicodeString(true, gGC_LPattern, -1), *status).freeze();
+ fPropSets[URX_GC_V].applyPattern(UnicodeString(true, gGC_VPattern, -1), *status).freeze();
+ fPropSets[URX_GC_T].applyPattern(UnicodeString(true, gGC_TPattern, -1), *status).freeze();
+ fPropSets[URX_GC_LV].applyPattern(UnicodeString(true, gGC_LVPattern, -1), *status).freeze();
+ fPropSets[URX_GC_LVT].applyPattern(UnicodeString(true, gGC_LVTPattern, -1), *status).freeze();
//
@@ -143,11 +143,11 @@ RegexStaticSets::~RegexStaticSets() {
U_CDECL_BEGIN
static UBool U_CALLCONV
-regex_cleanup(void) {
+regex_cleanup() {
delete RegexStaticSets::gStaticSets;
RegexStaticSets::gStaticSets = nullptr;
gStaticSetsInitOnce.reset();
- return TRUE;
+ return true;
}
static void U_CALLCONV initStaticSets(UErrorCode &status) {
diff --git a/contrib/libs/icu/i18n/regextxt.cpp b/contrib/libs/icu/i18n/regextxt.cpp
index 41bb4a944b3..32d8a5c5f82 100644
--- a/contrib/libs/icu/i18n/regextxt.cpp
+++ b/contrib/libs/icu/i18n/regextxt.cpp
@@ -16,7 +16,7 @@
U_NAMESPACE_BEGIN
-U_CFUNC UChar U_CALLCONV
+U_CFUNC char16_t U_CALLCONV
uregex_utext_unescape_charAt(int32_t offset, void *ct) {
struct URegexUTextUnescapeCharContext *context = (struct URegexUTextUnescapeCharContext *)ct;
UChar32 c;
@@ -34,15 +34,15 @@ uregex_utext_unescape_charAt(int32_t offset, void *ct) {
// !!!: Doesn't handle characters outside BMP
if (U_IS_BMP(c)) {
- return (UChar)c;
+ return (char16_t)c;
} else {
return 0;
}
}
-U_CFUNC UChar U_CALLCONV
+U_CFUNC char16_t U_CALLCONV
uregex_ucstr_unescape_charAt(int32_t offset, void *context) {
- return ((UChar *)context)[offset];
+ return ((char16_t *)context)[offset];
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/region.cpp b/contrib/libs/icu/i18n/region.cpp
index 2e013708bb8..26440b6593c 100644
--- a/contrib/libs/icu/i18n/region.cpp
+++ b/contrib/libs/icu/i18n/region.cpp
@@ -39,37 +39,32 @@
U_CDECL_BEGIN
-static void U_CALLCONV
-deleteRegion(void *obj) {
- delete (icu::Region *)obj;
-}
-
/**
* Cleanup callback func
*/
-static UBool U_CALLCONV region_cleanup(void)
+static UBool U_CALLCONV region_cleanup()
{
icu::Region::cleanupRegionData();
- return TRUE;
+ return true;
}
U_CDECL_END
U_NAMESPACE_BEGIN
-static UInitOnce gRegionDataInitOnce = U_INITONCE_INITIALIZER;
+static UInitOnce gRegionDataInitOnce {};
static UVector* availableRegions[URGN_LIMIT];
-static UHashtable *regionAliases = NULL;
-static UHashtable *regionIDMap = NULL;
-static UHashtable *numericCodeMap = NULL;
-static UVector *allRegions = NULL;
+static UHashtable *regionAliases = nullptr;
+static UHashtable *regionIDMap = nullptr;
+static UHashtable *numericCodeMap = nullptr;
+static UVector *allRegions = nullptr;
-static const UChar UNKNOWN_REGION_ID [] = { 0x5A, 0x5A, 0 }; /* "ZZ" */
-static const UChar OUTLYING_OCEANIA_REGION_ID [] = { 0x51, 0x4F, 0 }; /* "QO" */
-static const UChar WORLD_ID [] = { 0x30, 0x30, 0x31, 0 }; /* "001" */
-static const UChar RANGE_MARKER = 0x7E; /* '~' */
+static const char16_t UNKNOWN_REGION_ID [] = { 0x5A, 0x5A, 0 }; /* "ZZ" */
+static const char16_t OUTLYING_OCEANIA_REGION_ID [] = { 0x51, 0x4F, 0 }; /* "QO" */
+static const char16_t WORLD_ID [] = { 0x30, 0x30, 0x31, 0 }; /* "001" */
+static const char16_t RANGE_MARKER = 0x7E; /* '~' */
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RegionNameEnumeration)
@@ -84,86 +79,92 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RegionNameEnumeration)
void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
// Construct service objs first
- LocalUHashtablePointer newRegionIDMap(uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, &status));
- LocalUHashtablePointer newNumericCodeMap(uhash_open(uhash_hashLong,uhash_compareLong,NULL,&status));
- LocalUHashtablePointer newRegionAliases(uhash_open(uhash_hashUnicodeString,uhash_compareUnicodeString,NULL,&status));
+ LocalUHashtablePointer newRegionIDMap(uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, &status));
+ LocalUHashtablePointer newNumericCodeMap(uhash_open(uhash_hashLong,uhash_compareLong,nullptr,&status));
+ LocalUHashtablePointer newRegionAliases(uhash_open(uhash_hashUnicodeString,uhash_compareUnicodeString,nullptr,&status));
LocalPointer<UVector> continents(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status);
LocalPointer<UVector> groupings(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status);
- allRegions = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status);
+ LocalPointer<UVector> lpAllRegions(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status);
+ allRegions = lpAllRegions.orphan();
- LocalUResourceBundlePointer metadata(ures_openDirect(NULL,"metadata",&status));
- LocalUResourceBundlePointer metadataAlias(ures_getByKey(metadata.getAlias(),"alias",NULL,&status));
- LocalUResourceBundlePointer territoryAlias(ures_getByKey(metadataAlias.getAlias(),"territory",NULL,&status));
+ LocalUResourceBundlePointer metadata(ures_openDirect(nullptr,"metadata",&status));
+ LocalUResourceBundlePointer metadataAlias(ures_getByKey(metadata.getAlias(),"alias",nullptr,&status));
+ LocalUResourceBundlePointer territoryAlias(ures_getByKey(metadataAlias.getAlias(),"territory",nullptr,&status));
- LocalUResourceBundlePointer supplementalData(ures_openDirect(NULL,"supplementalData",&status));
- LocalUResourceBundlePointer codeMappings(ures_getByKey(supplementalData.getAlias(),"codeMappings",NULL,&status));
+ LocalUResourceBundlePointer supplementalData(ures_openDirect(nullptr,"supplementalData",&status));
+ LocalUResourceBundlePointer codeMappings(ures_getByKey(supplementalData.getAlias(),"codeMappings",nullptr,&status));
- LocalUResourceBundlePointer idValidity(ures_getByKey(supplementalData.getAlias(),"idValidity",NULL,&status));
- LocalUResourceBundlePointer regionList(ures_getByKey(idValidity.getAlias(),"region",NULL,&status));
- LocalUResourceBundlePointer regionRegular(ures_getByKey(regionList.getAlias(),"regular",NULL,&status));
- LocalUResourceBundlePointer regionMacro(ures_getByKey(regionList.getAlias(),"macroregion",NULL,&status));
- LocalUResourceBundlePointer regionUnknown(ures_getByKey(regionList.getAlias(),"unknown",NULL,&status));
+ LocalUResourceBundlePointer idValidity(ures_getByKey(supplementalData.getAlias(),"idValidity",nullptr,&status));
+ LocalUResourceBundlePointer regionList(ures_getByKey(idValidity.getAlias(),"region",nullptr,&status));
+ LocalUResourceBundlePointer regionRegular(ures_getByKey(regionList.getAlias(),"regular",nullptr,&status));
+ LocalUResourceBundlePointer regionMacro(ures_getByKey(regionList.getAlias(),"macroregion",nullptr,&status));
+ LocalUResourceBundlePointer regionUnknown(ures_getByKey(regionList.getAlias(),"unknown",nullptr,&status));
- LocalUResourceBundlePointer territoryContainment(ures_getByKey(supplementalData.getAlias(),"territoryContainment",NULL,&status));
- LocalUResourceBundlePointer worldContainment(ures_getByKey(territoryContainment.getAlias(),"001",NULL,&status));
- LocalUResourceBundlePointer groupingContainment(ures_getByKey(territoryContainment.getAlias(),"grouping",NULL,&status));
+ LocalUResourceBundlePointer territoryContainment(ures_getByKey(supplementalData.getAlias(),"territoryContainment",nullptr,&status));
+ LocalUResourceBundlePointer worldContainment(ures_getByKey(territoryContainment.getAlias(),"001",nullptr,&status));
+ LocalUResourceBundlePointer groupingContainment(ures_getByKey(territoryContainment.getAlias(),"grouping",nullptr,&status));
+ ucln_i18n_registerCleanup(UCLN_I18N_REGION, region_cleanup);
if (U_FAILURE(status)) {
return;
}
// now, initialize
- uhash_setValueDeleter(newRegionIDMap.getAlias(), deleteRegion); // regionIDMap owns objs
- uhash_setKeyDeleter(newRegionAliases.getAlias(), uprv_deleteUObject); // regionAliases owns the string keys
+ uhash_setValueDeleter(newRegionIDMap.getAlias(), uprv_deleteUObject); // regionIDMap owns objs
+ uhash_setKeyDeleter(newRegionAliases.getAlias(), uprv_deleteUObject); // regionAliases owns the string keys
- while ( ures_hasNext(regionRegular.getAlias()) ) {
- UnicodeString regionName = ures_getNextUnicodeString(regionRegular.getAlias(),NULL,&status);
+ while (U_SUCCESS(status) && ures_hasNext(regionRegular.getAlias())) {
+ UnicodeString regionName = ures_getNextUnicodeString(regionRegular.getAlias(),nullptr,&status);
int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER);
- UChar buf[6];
+ char16_t buf[6];
regionName.extract(buf,6,status);
if ( rangeMarkerLocation > 0 ) {
- UChar endRange = regionName.charAt(rangeMarkerLocation+1);
+ char16_t endRange = regionName.charAt(rangeMarkerLocation+1);
buf[rangeMarkerLocation] = 0;
- while ( buf[rangeMarkerLocation-1] <= endRange ) {
+ while (U_SUCCESS(status) && buf[rangeMarkerLocation-1] <= endRange) {
LocalPointer<UnicodeString> newRegion(new UnicodeString(buf), status);
- allRegions->addElementX(newRegion.orphan(),status);
+ allRegions->adoptElement(newRegion.orphan(), status);
buf[rangeMarkerLocation-1]++;
}
} else {
LocalPointer<UnicodeString> newRegion(new UnicodeString(regionName), status);
- allRegions->addElementX(newRegion.orphan(),status);
+ allRegions->adoptElement(newRegion.orphan(), status);
}
}
- while ( ures_hasNext(regionMacro.getAlias()) ) {
- UnicodeString regionName = ures_getNextUnicodeString(regionMacro.getAlias(),NULL,&status);
+ while (U_SUCCESS(status) && ures_hasNext(regionMacro.getAlias())) {
+ UnicodeString regionName = ures_getNextUnicodeString(regionMacro.getAlias(),nullptr,&status);
int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER);
- UChar buf[6];
+ char16_t buf[6];
regionName.extract(buf,6,status);
if ( rangeMarkerLocation > 0 ) {
- UChar endRange = regionName.charAt(rangeMarkerLocation+1);
+ char16_t endRange = regionName.charAt(rangeMarkerLocation+1);
buf[rangeMarkerLocation] = 0;
- while ( buf[rangeMarkerLocation-1] <= endRange ) {
+ while ( buf[rangeMarkerLocation-1] <= endRange && U_SUCCESS(status)) {
LocalPointer<UnicodeString> newRegion(new UnicodeString(buf), status);
- allRegions->addElementX(newRegion.orphan(),status);
+ allRegions->adoptElement(newRegion.orphan(),status);
buf[rangeMarkerLocation-1]++;
}
} else {
LocalPointer<UnicodeString> newRegion(new UnicodeString(regionName), status);
- allRegions->addElementX(newRegion.orphan(),status);
+ allRegions->adoptElement(newRegion.orphan(),status);
}
}
- while ( ures_hasNext(regionUnknown.getAlias()) ) {
- LocalPointer<UnicodeString> regionName (new UnicodeString(ures_getNextUnicodeString(regionUnknown.getAlias(),NULL,&status),status));
- allRegions->addElementX(regionName.orphan(),status);
+ while (U_SUCCESS(status) && ures_hasNext(regionUnknown.getAlias())) {
+ LocalPointer<UnicodeString> regionName (
+ new UnicodeString(ures_getNextUnicodeString(regionUnknown.getAlias(), nullptr, &status), status));
+ allRegions->adoptElement(regionName.orphan(),status);
}
- while ( ures_hasNext(worldContainment.getAlias()) ) {
- UnicodeString *continentName = new UnicodeString(ures_getNextUnicodeString(worldContainment.getAlias(),NULL,&status));
- continents->addElementX(continentName,status);
+ while (U_SUCCESS(status) && ures_hasNext(worldContainment.getAlias())) {
+ UnicodeString *continentName = new UnicodeString(ures_getNextUnicodeString(worldContainment.getAlias(),nullptr,&status));
+ continents->adoptElement(continentName,status);
+ }
+ if (U_FAILURE(status)) {
+ return;
}
for ( int32_t i = 0 ; i < allRegions->size() ; i++ ) {
@@ -191,22 +192,32 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
}
UResourceBundle *groupingBundle = nullptr;
- while ( ures_hasNext(groupingContainment.getAlias()) ) {
+ while (U_SUCCESS(status) && ures_hasNext(groupingContainment.getAlias())) {
groupingBundle = ures_getNextResource(groupingContainment.getAlias(), groupingBundle, &status);
if (U_FAILURE(status)) {
break;
}
UnicodeString *groupingName = new UnicodeString(ures_getKey(groupingBundle), -1, US_INV);
- groupings->addElementX(groupingName,status);
- Region *grouping = (Region *) uhash_get(newRegionIDMap.getAlias(),groupingName);
- if (grouping != NULL) {
- for (int32_t i = 0; i < ures_getSize(groupingBundle); i++) {
+ LocalPointer<UnicodeString> lpGroupingName(groupingName, status);
+ groupings->adoptElement(lpGroupingName.orphan(), status);
+ if (U_FAILURE(status)) {
+ break;
+ }
+ Region *grouping = (Region *) uhash_get(newRegionIDMap.getAlias(), groupingName);
+ if (grouping != nullptr) {
+ for (int32_t i = 0; i < ures_getSize(groupingBundle) && U_SUCCESS(status); i++) {
UnicodeString child = ures_getUnicodeStringByIndex(groupingBundle, i, &status);
if (U_SUCCESS(status)) {
- if (grouping->containedRegions == NULL) {
- grouping->containedRegions = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status);
+ if (grouping->containedRegions == nullptr) {
+ LocalPointer<UVector> lpContainedRegions(
+ new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status);
+ grouping->containedRegions = lpContainedRegions.orphan();
+ if (U_FAILURE(status)) {
+ break;
+ }
}
- grouping->containedRegions->addElementX(new UnicodeString(child), status);
+ LocalPointer<UnicodeString> lpChildCopy(new UnicodeString(child), status);
+ grouping->containedRegions->adoptElement(lpChildCopy.orphan(), status);
}
}
}
@@ -214,20 +225,20 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
ures_close(groupingBundle);
// Process the territory aliases
- while ( ures_hasNext(territoryAlias.getAlias()) ) {
- LocalUResourceBundlePointer res(ures_getNextResource(territoryAlias.getAlias(),NULL,&status));
+ while (U_SUCCESS(status) && ures_hasNext(territoryAlias.getAlias())) {
+ LocalUResourceBundlePointer res(ures_getNextResource(territoryAlias.getAlias(),nullptr,&status));
const char *aliasFrom = ures_getKey(res.getAlias());
LocalPointer<UnicodeString> aliasFromStr(new UnicodeString(aliasFrom, -1, US_INV), status);
UnicodeString aliasTo = ures_getUnicodeStringByKey(res.getAlias(),"replacement",&status);
- res.adoptInstead(NULL);
+ res.adoptInstead(nullptr);
const Region *aliasToRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),&aliasTo);
Region *aliasFromRegion = (Region *)uhash_get(newRegionIDMap.getAlias(),aliasFromStr.getAlias());
- if ( aliasToRegion != NULL && aliasFromRegion == NULL ) { // This is just an alias from some string to a region
+ if ( aliasToRegion != nullptr && aliasFromRegion == nullptr ) { // This is just an alias from some string to a region
uhash_put(newRegionAliases.getAlias(),(void *)aliasFromStr.orphan(), (void *)aliasToRegion,&status);
} else {
- if ( aliasFromRegion == NULL ) { // Deprecated region code not in the primary codes list - so need to create a deprecated region for it.
+ if ( aliasFromRegion == nullptr ) { // Deprecated region code not in the primary codes list - so need to create a deprecated region for it.
LocalPointer<Region> newRgn(new Region, status);
if ( U_SUCCESS(status) ) {
aliasFromRegion = newRgn.orphan();
@@ -259,7 +270,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
}
UnicodeString currentRegion;
//currentRegion.remove(); TODO: was already 0 length?
- for (int32_t i = 0 ; i < aliasTo.length() ; i++ ) {
+ for (int32_t i = 0 ; i < aliasTo.length() && U_SUCCESS(status); i++ ) {
if ( aliasTo.charAt(i) != 0x0020 ) {
currentRegion.append(aliasTo.charAt(i));
}
@@ -267,7 +278,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
Region *target = (Region *)uhash_get(newRegionIDMap.getAlias(),(void *)&currentRegion);
if (target) {
LocalPointer<UnicodeString> preferredValue(new UnicodeString(target->idStr), status);
- aliasFromRegion->preferredValues->addElementX((void *)preferredValue.orphan(),status); // may add null if err
+ aliasFromRegion->preferredValues->adoptElement(preferredValue.orphan(),status); // may add null if err
}
currentRegion.remove();
}
@@ -276,9 +287,9 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
}
// Process the code mappings - This will allow us to assign numeric codes to most of the territories.
- while ( ures_hasNext(codeMappings.getAlias()) ) {
- UResourceBundle *mapping = ures_getNextResource(codeMappings.getAlias(),NULL,&status);
- if ( ures_getType(mapping) == URES_ARRAY && ures_getSize(mapping) == 3) {
+ while (U_SUCCESS(status) && ures_hasNext(codeMappings.getAlias())) {
+ UResourceBundle *mapping = ures_getNextResource(codeMappings.getAlias(),nullptr,&status);
+ if (U_SUCCESS(status) && ures_getType(mapping) == URES_ARRAY && ures_getSize(mapping) == 3) {
UnicodeString codeMappingID = ures_getUnicodeStringByIndex(mapping,0,&status);
UnicodeString codeMappingNumber = ures_getUnicodeStringByIndex(mapping,1,&status);
UnicodeString codeMapping3Letter = ures_getUnicodeStringByIndex(mapping,2,&status);
@@ -337,7 +348,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
// Load territory containment info from the supplemental data.
while ( ures_hasNext(territoryContainment.getAlias()) ) {
- LocalUResourceBundlePointer mapping(ures_getNextResource(territoryContainment.getAlias(),NULL,&status));
+ LocalUResourceBundlePointer mapping(ures_getNextResource(territoryContainment.getAlias(),nullptr,&status));
if( U_FAILURE(status) ) {
return; // error out
}
@@ -352,19 +363,27 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
for ( int j = 0 ; j < ures_getSize(mapping.getAlias()); j++ ) {
UnicodeString child = ures_getUnicodeStringByIndex(mapping.getAlias(),j,&status);
Region *childRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&child);
- if ( parentRegion != NULL && childRegion != NULL ) {
+ if ( parentRegion != nullptr && childRegion != nullptr ) {
// Add the child region to the set of regions contained by the parent
- if (parentRegion->containedRegions == NULL) {
- parentRegion->containedRegions = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status);
+ if (parentRegion->containedRegions == nullptr) {
+ LocalPointer<UVector> lpContainedRegions(
+ new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status);
+ parentRegion->containedRegions = lpContainedRegions.orphan();
+ if (U_FAILURE(status)) {
+ return;
+ }
}
LocalPointer<UnicodeString> childStr(new UnicodeString(), status);
- if( U_FAILURE(status) ) {
+ if (U_FAILURE(status)) {
return; // error out
}
childStr->fastCopyFrom(childRegion->idStr);
- parentRegion->containedRegions->addElementX((void *)childStr.orphan(),status);
+ parentRegion->containedRegions->adoptElement(childStr.orphan(),status);
+ if (U_FAILURE(status)) {
+ return;
+ }
// Set the parent region to be the containing region of the child.
// Regions of type GROUPING can't be set as the parent, since another region
@@ -380,7 +399,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
int32_t pos = UHASH_FIRST;
while ( const UHashElement* element = uhash_nextElement(newRegionIDMap.getAlias(),&pos)) {
Region *ar = (Region *)element->value.pointer;
- if ( availableRegions[ar->fType] == NULL ) {
+ if ( availableRegions[ar->fType] == nullptr ) {
LocalPointer<UVector> newAr(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status);
availableRegions[ar->fType] = newAr.orphan();
}
@@ -388,10 +407,9 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) {
if( U_FAILURE(status) ) {
return; // error out
}
- availableRegions[ar->fType]->addElementX((void *)arString.orphan(),status);
+ availableRegions[ar->fType]->adoptElement(arString.orphan(), status);
}
- ucln_i18n_registerCleanup(UCLN_I18N_REGION, region_cleanup);
// copy hashtables
numericCodeMap = newNumericCodeMap.orphan();
regionIDMap = newRegionIDMap.orphan();
@@ -402,6 +420,7 @@ void Region::cleanupRegionData() {
for (int32_t i = 0 ; i < URGN_LIMIT ; i++ ) {
if ( availableRegions[i] ) {
delete availableRegions[i];
+ availableRegions[i] = nullptr;
}
}
@@ -417,12 +436,11 @@ void Region::cleanupRegionData() {
uhash_close(regionIDMap);
}
if (allRegions) {
- allRegions->removeAllElements(); // Don't need the temporary list anymore.
delete allRegions;
- allRegions = NULL;
+ allRegions = nullptr;
}
- regionAliases = numericCodeMap = regionIDMap = NULL;
+ regionAliases = numericCodeMap = regionIDMap = nullptr;
gRegionDataInitOnce.reset();
}
@@ -430,9 +448,9 @@ void Region::cleanupRegionData() {
Region::Region ()
: code(-1),
fType(URGN_UNKNOWN),
- containingRegion(NULL),
- containedRegions(NULL),
- preferredValues(NULL) {
+ containingRegion(nullptr),
+ containedRegions(nullptr),
+ preferredValues(nullptr) {
id[0] = 0;
}
@@ -467,19 +485,19 @@ Region::operator!=(const Region &that) const {
* Returns a pointer to a Region using the given region code. The region code can be either 2-letter ISO code,
* 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LDML specification.
* The identifier will be canonicalized internally using the supplemental metadata as defined in the CLDR.
- * If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR )
+ * If the region code is nullptr or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR )
*/
const Region* U_EXPORT2
Region::getInstance(const char *region_code, UErrorCode &status) {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if ( !region_code ) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
UnicodeString regionCodeString = UnicodeString(region_code, -1, US_INV);
@@ -491,7 +509,7 @@ Region::getInstance(const char *region_code, UErrorCode &status) {
if ( !r ) { // Unknown region code
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if ( r->fType == URGN_DEPRECATED && r->preferredValues->size() == 1) {
@@ -515,7 +533,7 @@ Region::getInstance (int32_t code, UErrorCode &status) {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
Region *r = (Region *)uhash_iget(numericCodeMap,code);
@@ -527,12 +545,12 @@ Region::getInstance (int32_t code, UErrorCode &status) {
}
if( U_FAILURE(status) ) {
- return NULL;
+ return nullptr;
}
if ( !r ) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
if ( r->fType == URGN_DEPRECATED && r->preferredValues->size() == 1) {
@@ -554,13 +572,13 @@ StringEnumeration* U_EXPORT2
Region::getAvailable(URegionType type, UErrorCode &status) {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status); // returns immediately if U_FAILURE(status)
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
return new RegionNameEnumeration(availableRegions[type],status);
}
/**
- * Returns a pointer to the region that contains this region. Returns NULL if this region is code "001" (World)
+ * Returns a pointer to the region that contains this region. Returns nullptr if this region is code "001" (World)
* or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the
* region "039" (Southern Europe).
*/
@@ -573,17 +591,17 @@ Region::getContainingRegion() const {
/**
* Return a pointer to the region that geographically contains this region and matches the given type,
- * moving multiple steps up the containment chain if necessary. Returns NULL if no containing region can be found
+ * moving multiple steps up the containment chain if necessary. Returns nullptr if no containing region can be found
* that matches the given type. Note: The URegionTypes = "URGN_GROUPING", "URGN_DEPRECATED", or "URGN_UNKNOWN"
- * are not appropriate for use in this API. NULL will be returned in this case. For example, calling this method
+ * are not appropriate for use in this API. nullptr will be returned in this case. For example, calling this method
* with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ).
*/
const Region*
Region::getContainingRegion(URegionType type) const {
UErrorCode status = U_ZERO_ERROR;
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status);
- if ( containingRegion == NULL ) {
- return NULL;
+ if ( containingRegion == nullptr ) {
+ return nullptr;
}
return ( containingRegion->fType == type)? containingRegion: containingRegion->getContainingRegion(type);
@@ -592,7 +610,7 @@ Region::getContainingRegion(URegionType type) const {
/**
* Return an enumeration over the IDs of all the regions that are immediate children of this region in the
* region hierarchy. These returned regions could be either macro regions, territories, or a mixture of the two,
- * depending on the containment data as defined in CLDR. This API may return NULL if this region doesn't have
+ * depending on the containment data as defined in CLDR. This API may return nullptr if this region doesn't have
* any sub-regions. For example, calling this method with region "150" (Europe) returns an enumeration containing
* the various sub regions of Europe - "039" (Southern Europe) - "151" (Eastern Europe) - "154" (Northern Europe)
* and "155" (Western Europe).
@@ -601,7 +619,7 @@ StringEnumeration*
Region::getContainedRegions(UErrorCode &status) const {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status); // returns immediately if U_FAILURE(status)
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
return new RegionNameEnumeration(containedRegions,status);
}
@@ -615,33 +633,30 @@ Region::getContainedRegions(UErrorCode &status) const {
StringEnumeration*
Region::getContainedRegions( URegionType type, UErrorCode &status ) const {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status); // returns immediately if U_FAILURE(status)
+
+ UVector result(nullptr, uhash_compareChars, status);
+ LocalPointer<StringEnumeration> cr(getContainedRegions(status), status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- UVector *result = new UVector(NULL, uhash_compareChars, status);
-
- StringEnumeration *cr = getContainedRegions(status);
-
- for ( int32_t i = 0 ; i < cr->count(status) ; i++ ) {
- const char *regionId = cr->next(NULL,status);
- const Region *r = Region::getInstance(regionId,status);
+ const char *regionId;
+ while((regionId = cr->next(nullptr, status)) != nullptr && U_SUCCESS(status)) {
+ const Region *r = Region::getInstance(regionId, status);
if ( r->getType() == type) {
- result->addElementX((void *)&r->idStr,status);
+ result.addElement(const_cast<UnicodeString *>(&r->idStr), status);
} else {
- StringEnumeration *children = r->getContainedRegions(type, status);
- for ( int32_t j = 0 ; j < children->count(status) ; j++ ) {
- const char *id2 = children->next(NULL,status);
+ LocalPointer<StringEnumeration> children(r->getContainedRegions(type, status));
+ const char *id2;
+ while(U_SUCCESS(status) && ((id2 = children->next(nullptr, status)) != nullptr)) {
const Region *r2 = Region::getInstance(id2,status);
- result->addElementX((void *)&r2->idStr,status);
+ result.addElement(const_cast<UnicodeString *>(&r2->idStr), status);
}
- delete children;
}
}
- delete cr;
- StringEnumeration* resultEnumeration = new RegionNameEnumeration(result,status);
- delete result;
- return resultEnumeration;
+ LocalPointer<StringEnumeration> resultEnumeration(
+ new RegionNameEnumeration(&result, status), status);
+ return U_SUCCESS(status) ? resultEnumeration.orphan() : nullptr;
}
/**
@@ -653,33 +668,33 @@ Region::contains(const Region &other) const {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status);
if (!containedRegions) {
- return FALSE;
+ return false;
}
if (containedRegions->contains((void *)&other.idStr)) {
- return TRUE;
+ return true;
} else {
for ( int32_t i = 0 ; i < containedRegions->size() ; i++ ) {
UnicodeString *crStr = (UnicodeString *)containedRegions->elementAt(i);
Region *cr = (Region *) uhash_get(regionIDMap,(void *)crStr);
if ( cr && cr->contains(other) ) {
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
/**
* For deprecated regions, return an enumeration over the IDs of the regions that are the preferred replacement
- * regions for this region. Returns NULL for a non-deprecated region. For example, calling this method with region
+ * regions for this region. Returns nullptr for a non-deprecated region. For example, calling this method with region
* "SU" (Soviet Union) would return a list of the regions containing "RU" (Russia), "AM" (Armenia), "AZ" (Azerbaijan), etc...
*/
StringEnumeration*
Region::getPreferredValues(UErrorCode &status) const {
umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status); // returns immediately if U_FAILURE(status)
if (U_FAILURE(status) || fType != URGN_DEPRECATED) {
- return NULL;
+ return nullptr;
}
return new RegionNameEnumeration(preferredValues,status);
}
@@ -706,28 +721,31 @@ Region::getType() const {
return fType;
}
-RegionNameEnumeration::RegionNameEnumeration(UVector *fNameList, UErrorCode& status) {
- pos=0;
- if (fNameList && U_SUCCESS(status)) {
- fRegionNames = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, fNameList->size(),status);
- for ( int32_t i = 0 ; i < fNameList->size() ; i++ ) {
- UnicodeString* this_region_name = (UnicodeString *)fNameList->elementAt(i);
- UnicodeString* new_region_name = new UnicodeString(*this_region_name);
- fRegionNames->addElementX((void *)new_region_name,status);
+RegionNameEnumeration::RegionNameEnumeration(UVector *nameList, UErrorCode& status) :
+ pos(0), fRegionNames(nullptr) {
+ // TODO: https://unicode-org.atlassian.net/browse/ICU-21829
+ // Is all of the copying going on here really necessary?
+ if (nameList && U_SUCCESS(status)) {
+ LocalPointer<UVector> regionNames(
+ new UVector(uprv_deleteUObject, uhash_compareUnicodeString, nameList->size(), status), status);
+ for ( int32_t i = 0 ; U_SUCCESS(status) && i < nameList->size() ; i++ ) {
+ UnicodeString* this_region_name = (UnicodeString *)nameList->elementAt(i);
+ LocalPointer<UnicodeString> new_region_name(new UnicodeString(*this_region_name), status);
+ regionNames->adoptElement(new_region_name.orphan(), status);
+ }
+ if (U_SUCCESS(status)) {
+ fRegionNames = regionNames.orphan();
}
- }
- else {
- fRegionNames = NULL;
}
}
const UnicodeString*
RegionNameEnumeration::snext(UErrorCode& status) {
- if (U_FAILURE(status) || (fRegionNames==NULL)) {
- return NULL;
+ if (U_FAILURE(status) || (fRegionNames==nullptr)) {
+ return nullptr;
}
const UnicodeString* nextStr = (const UnicodeString *)fRegionNames->elementAt(pos);
- if (nextStr!=NULL) {
+ if (nextStr!=nullptr) {
pos++;
}
return nextStr;
@@ -740,7 +758,7 @@ RegionNameEnumeration::reset(UErrorCode& /*status*/) {
int32_t
RegionNameEnumeration::count(UErrorCode& /*status*/) const {
- return (fRegionNames==NULL) ? 0 : fRegionNames->size();
+ return (fRegionNames==nullptr) ? 0 : fRegionNames->size();
}
RegionNameEnumeration::~RegionNameEnumeration() {
diff --git a/contrib/libs/icu/i18n/region_impl.h b/contrib/libs/icu/i18n/region_impl.h
index 62acaa4511b..edabc6d0fe3 100644
--- a/contrib/libs/icu/i18n/region_impl.h
+++ b/contrib/libs/icu/i18n/region_impl.h
@@ -26,10 +26,14 @@ U_NAMESPACE_BEGIN
class RegionNameEnumeration : public StringEnumeration {
public:
- RegionNameEnumeration(UVector *fNameList, UErrorCode& status);
+ /**
+ * Construct an string enumeration over the supplied name list.
+ * Makes a copy of the supplied input name list; does not retain a reference to the original.
+ */
+ RegionNameEnumeration(UVector *nameList, UErrorCode& status);
virtual ~RegionNameEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
diff --git a/contrib/libs/icu/i18n/reldatefmt.cpp b/contrib/libs/icu/i18n/reldatefmt.cpp
index 6ef51607986..24d22a4b4bf 100644
--- a/contrib/libs/icu/i18n/reldatefmt.cpp
+++ b/contrib/libs/icu/i18n/reldatefmt.cpp
@@ -16,6 +16,8 @@
#include <cmath>
#include <functional>
+#include "unicode/calendar.h"
+#include "unicode/datefmt.h"
#include "unicode/dtfmtsym.h"
#include "unicode/ucasemap.h"
#include "unicode/ureldatefmt.h"
@@ -184,35 +186,19 @@ const UnicodeString& RelativeDateTimeCacheData::getAbsoluteUnitString(
return nullptr; // No formatter found.
}
-static UBool getStringWithFallback(
- const UResourceBundle *resource,
- const char *key,
- UnicodeString &result,
- UErrorCode &status) {
- int32_t len = 0;
- const UChar *resStr = ures_getStringByKeyWithFallback(
- resource, key, &len, &status);
- if (U_FAILURE(status)) {
- return FALSE;
- }
- result.setTo(TRUE, resStr, len);
- return TRUE;
-}
-
-
static UBool getStringByIndex(
const UResourceBundle *resource,
int32_t idx,
UnicodeString &result,
UErrorCode &status) {
int32_t len = 0;
- const UChar *resStr = ures_getStringByIndex(
+ const char16_t *resStr = ures_getStringByIndex(
resource, idx, &len, &status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- result.setTo(TRUE, resStr, len);
- return TRUE;
+ result.setTo(true, resStr, len);
+ return true;
}
namespace {
@@ -386,8 +372,8 @@ struct RelDateTimeFmtDataSink : public ResourceSink {
// Utility functions
static UDateRelativeDateTimeFormatterStyle styleFromAliasUnicodeString(UnicodeString s) {
- static const UChar narrow[7] = {0x002D, 0x006E, 0x0061, 0x0072, 0x0072, 0x006F, 0x0077};
- static const UChar sshort[6] = {0x002D, 0x0073, 0x0068, 0x006F, 0x0072, 0x0074,};
+ static const char16_t narrow[7] = {0x002D, 0x006E, 0x0061, 0x0072, 0x0072, 0x006F, 0x0077};
+ static const char16_t sshort[6] = {0x002D, 0x0073, 0x0068, 0x006F, 0x0072, 0x0074,};
if (s.endsWith(narrow, 7)) {
return UDAT_STYLE_NARROW;
}
@@ -661,39 +647,61 @@ static UBool loadUnitData(
return U_SUCCESS(status);
}
+static const int32_t cTypeBufMax = 32;
+
static UBool getDateTimePattern(
+ Locale locale,
const UResourceBundle *resource,
UnicodeString &result,
UErrorCode &status) {
- UnicodeString defaultCalendarName;
- if (!getStringWithFallback(
- resource,
- "calendar/default",
- defaultCalendarName,
- status)) {
- return FALSE;
+ if (U_FAILURE(status)) {
+ return false;
+ }
+ char cType[cTypeBufMax + 1];
+ Calendar::getCalendarTypeFromLocale(locale, cType, cTypeBufMax, status);
+ cType[cTypeBufMax] = 0;
+ if (U_FAILURE(status) || cType[0] == 0) {
+ status = U_ZERO_ERROR;
+ uprv_strcpy(cType, "gregorian");
}
+
+ LocalUResourceBundlePointer topLevel;
+ int32_t dateTimeFormatOffset = DateFormat::kMedium;
CharString pathBuffer;
+ // Currently, for compatibility with pre-CLDR-42 data, we default to the "atTime"
+ // combining patterns. Depending on guidance in CLDR 42 spec and on DisplayOptions,
+ // we may change this.
pathBuffer.append("calendar/", status)
- .appendInvariantChars(defaultCalendarName, status)
- .append("/DateTimePatterns", status);
- LocalUResourceBundlePointer topLevel(
+ .append(cType, status)
+ .append("/DateTimePatterns%atTime", status);
+ topLevel.adoptInstead(
ures_getByKeyWithFallback(
resource, pathBuffer.data(), nullptr, &status));
+ if (U_FAILURE(status) || ures_getSize(topLevel.getAlias()) < 4) {
+ // Fall back to standard combining patterns
+ status = U_ZERO_ERROR;
+ dateTimeFormatOffset = DateFormat::kDateTime;
+ pathBuffer.clear();
+ pathBuffer.append("calendar/", status)
+ .append(cType, status)
+ .append("/DateTimePatterns", status);
+ topLevel.adoptInstead(
+ ures_getByKeyWithFallback(
+ resource, pathBuffer.data(), nullptr, &status));
+ }
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- int32_t size = ures_getSize(topLevel.getAlias());
- if (size <= 8) {
+ if (dateTimeFormatOffset == DateFormat::kDateTime && ures_getSize(topLevel.getAlias()) <= DateFormat::kDateTime) {
// Oops, size is too small to access the index that we want, fallback
// to a hard-coded value.
result = UNICODE_STRING_SIMPLE("{1} {0}");
- return TRUE;
+ return true;
}
- return getStringByIndex(topLevel.getAlias(), 8, result, status);
+ return getStringByIndex(topLevel.getAlias(), dateTimeFormatOffset, result, status);
}
-template<> U_I18N_API
+template<>
const RelativeDateTimeCacheData *LocaleCacheKey<RelativeDateTimeCacheData>::createObject(const void * /*unused*/, UErrorCode &status) const {
const char *localeId = fLoc.getName();
LocalUResourceBundlePointer topLevel(ures_open(nullptr, localeId, &status));
@@ -714,7 +722,7 @@ const RelativeDateTimeCacheData *LocaleCacheKey<RelativeDateTimeCacheData>::crea
return nullptr;
}
UnicodeString dateTimePattern;
- if (!getDateTimePattern(topLevel.getAlias(), dateTimePattern, status)) {
+ if (!getDateTimePattern(fLoc, topLevel.getAlias(), dateTimePattern, status)) {
return nullptr;
}
result->adoptCombinedDateAndTime(
@@ -1204,9 +1212,9 @@ UBool RelativeDateTimeFormatter::checkNoAdjustForContext(UErrorCode& status) con
// casing. The code could be written and tested if there is demand.
if (fOptBreakIterator != nullptr) {
status = U_UNSUPPORTED_ERROR;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void RelativeDateTimeFormatter::init(
@@ -1302,7 +1310,7 @@ U_CAPI int32_t U_EXPORT2
ureldatefmt_formatNumeric( const URelativeDateTimeFormatter* reldatefmt,
double offset,
URelativeDateTimeUnit unit,
- UChar* result,
+ char16_t* result,
int32_t resultCapacity,
UErrorCode* status)
{
@@ -1345,7 +1353,7 @@ U_CAPI int32_t U_EXPORT2
ureldatefmt_format( const URelativeDateTimeFormatter* reldatefmt,
double offset,
URelativeDateTimeUnit unit,
- UChar* result,
+ char16_t* result,
int32_t resultCapacity,
UErrorCode* status)
{
@@ -1386,11 +1394,11 @@ ureldatefmt_formatToResult(
U_CAPI int32_t U_EXPORT2
ureldatefmt_combineDateAndTime( const URelativeDateTimeFormatter* reldatefmt,
- const UChar * relativeDateString,
+ const char16_t * relativeDateString,
int32_t relativeDateStringLen,
- const UChar * timeString,
+ const char16_t * timeString,
int32_t timeStringLen,
- UChar* result,
+ char16_t* result,
int32_t resultCapacity,
UErrorCode* status )
{
diff --git a/contrib/libs/icu/i18n/reldtfmt.cpp b/contrib/libs/icu/i18n/reldtfmt.cpp
index 5fdef1c0d67..0c836a0b79f 100644
--- a/contrib/libs/icu/i18n/reldtfmt.cpp
+++ b/contrib/libs/icu/i18n/reldtfmt.cpp
@@ -34,26 +34,26 @@ U_NAMESPACE_BEGIN
struct URelativeString {
int32_t offset; /** offset of this item, such as, the relative date **/
int32_t len; /** length of the string **/
- const UChar* string; /** string, or NULL if not set **/
+ const char16_t* string; /** string, or nullptr if not set **/
};
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RelativeDateFormat)
RelativeDateFormat::RelativeDateFormat(const RelativeDateFormat& other) :
- DateFormat(other), fDateTimeFormatter(NULL), fDatePattern(other.fDatePattern),
- fTimePattern(other.fTimePattern), fCombinedFormat(NULL),
+ DateFormat(other), fDateTimeFormatter(nullptr), fDatePattern(other.fDatePattern),
+ fTimePattern(other.fTimePattern), fCombinedFormat(nullptr),
fDateStyle(other.fDateStyle), fLocale(other.fLocale),
- fDatesLen(other.fDatesLen), fDates(NULL),
+ fDatesLen(other.fDatesLen), fDates(nullptr),
fCombinedHasDateAtStart(other.fCombinedHasDateAtStart),
fCapitalizationInfoSet(other.fCapitalizationInfoSet),
fCapitalizationOfRelativeUnitsForUIListMenu(other.fCapitalizationOfRelativeUnitsForUIListMenu),
fCapitalizationOfRelativeUnitsForStandAlone(other.fCapitalizationOfRelativeUnitsForStandAlone),
- fCapitalizationBrkIter(NULL)
+ fCapitalizationBrkIter(nullptr)
{
- if(other.fDateTimeFormatter != NULL) {
+ if(other.fDateTimeFormatter != nullptr) {
fDateTimeFormatter = other.fDateTimeFormatter->clone();
}
- if(other.fCombinedFormat != NULL) {
+ if(other.fCombinedFormat != nullptr) {
fCombinedFormat = new SimpleFormatter(*other.fCombinedFormat);
}
if (fDatesLen > 0) {
@@ -61,7 +61,7 @@ RelativeDateFormat::RelativeDateFormat(const RelativeDateFormat& other) :
uprv_memcpy(fDates, other.fDates, sizeof(fDates[0])*(size_t)fDatesLen);
}
#if !UCONFIG_NO_BREAK_ITERATION
- if (other.fCapitalizationBrkIter != NULL) {
+ if (other.fCapitalizationBrkIter != nullptr) {
fCapitalizationBrkIter = (other.fCapitalizationBrkIter)->clone();
}
#endif
@@ -69,11 +69,11 @@ RelativeDateFormat::RelativeDateFormat(const RelativeDateFormat& other) :
RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatStyle dateStyle,
const Locale& locale, UErrorCode& status) :
- DateFormat(), fDateTimeFormatter(NULL), fDatePattern(), fTimePattern(), fCombinedFormat(NULL),
- fDateStyle(dateStyle), fLocale(locale), fDatesLen(0), fDates(NULL),
- fCombinedHasDateAtStart(FALSE), fCapitalizationInfoSet(FALSE),
- fCapitalizationOfRelativeUnitsForUIListMenu(FALSE), fCapitalizationOfRelativeUnitsForStandAlone(FALSE),
- fCapitalizationBrkIter(NULL)
+ DateFormat(), fDateTimeFormatter(nullptr), fDatePattern(), fTimePattern(), fCombinedFormat(nullptr),
+ fDateStyle(dateStyle), fLocale(locale), fDatesLen(0), fDates(nullptr),
+ fCombinedHasDateAtStart(false), fCapitalizationInfoSet(false),
+ fCapitalizationOfRelativeUnitsForUIListMenu(false), fCapitalizationOfRelativeUnitsForStandAlone(false),
+ fCapitalizationBrkIter(nullptr)
{
if(U_FAILURE(status) ) {
return;
@@ -91,7 +91,7 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS
if (baseDateStyle != UDAT_NONE) {
df = createDateInstance((EStyle)baseDateStyle, locale);
fDateTimeFormatter=dynamic_cast<SimpleDateFormat *>(df);
- if (fDateTimeFormatter == NULL) {
+ if (fDateTimeFormatter == nullptr) {
status = U_UNSUPPORTED_ERROR;
return;
}
@@ -99,7 +99,7 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS
if (timeStyle != UDAT_NONE) {
df = createTimeInstance((EStyle)timeStyle, locale);
SimpleDateFormat *sdf = dynamic_cast<SimpleDateFormat *>(df);
- if (sdf != NULL) {
+ if (sdf != nullptr) {
sdf->toPattern(fTimePattern);
delete sdf;
}
@@ -108,7 +108,7 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS
// does not matter whether timeStyle is UDAT_NONE, we need something for fDateTimeFormatter
df = createTimeInstance((EStyle)timeStyle, locale);
fDateTimeFormatter=dynamic_cast<SimpleDateFormat *>(df);
- if (fDateTimeFormatter == NULL) {
+ if (fDateTimeFormatter == nullptr) {
status = U_UNSUPPORTED_ERROR;
delete df;
return;
@@ -117,7 +117,7 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS
}
// Initialize the parent fCalendar, so that parse() works correctly.
- initializeCalendar(NULL, locale, status);
+ initializeCalendar(nullptr, locale, status);
loadDates(status);
}
@@ -149,7 +149,7 @@ bool RelativeDateFormat::operator==(const Format& other) const {
return false;
}
-static const UChar APOSTROPHE = (UChar)0x0027;
+static const char16_t APOSTROPHE = (char16_t)0x0027;
UnicodeString& RelativeDateFormat::format( Calendar& cal,
UnicodeString& appendTo,
@@ -164,17 +164,17 @@ UnicodeString& RelativeDateFormat::format( Calendar& cal,
// look up string
int32_t len = 0;
- const UChar *theString = getStringForDay(dayDiff, len, status);
- if(U_SUCCESS(status) && (theString!=NULL)) {
+ const char16_t *theString = getStringForDay(dayDiff, len, status);
+ if(U_SUCCESS(status) && (theString!=nullptr)) {
// found a relative string
relativeDayString.setTo(theString, len);
}
if ( relativeDayString.length() > 0 && !fDatePattern.isEmpty() &&
- (fTimePattern.isEmpty() || fCombinedFormat == NULL || fCombinedHasDateAtStart)) {
+ (fTimePattern.isEmpty() || fCombinedFormat == nullptr || fCombinedHasDateAtStart)) {
#if !UCONFIG_NO_BREAK_ITERATION
// capitalize relativeDayString according to context for relative, set formatter no context
- if ( u_islower(relativeDayString.char32At(0)) && fCapitalizationBrkIter!= NULL &&
+ if ( u_islower(relativeDayString.char32At(0)) && fCapitalizationBrkIter!= nullptr &&
( capitalizationContext==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
(capitalizationContext==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU && fCapitalizationOfRelativeUnitsForUIListMenu) ||
(capitalizationContext==UDISPCTX_CAPITALIZATION_FOR_STANDALONE && fCapitalizationOfRelativeUnitsForStandAlone) ) ) {
@@ -191,7 +191,7 @@ UnicodeString& RelativeDateFormat::format( Calendar& cal,
if (fDatePattern.isEmpty()) {
fDateTimeFormatter->applyPattern(fTimePattern);
fDateTimeFormatter->format(cal,appendTo,pos);
- } else if (fTimePattern.isEmpty() || fCombinedFormat == NULL) {
+ } else if (fTimePattern.isEmpty() || fCombinedFormat == nullptr) {
if (relativeDayString.length() > 0) {
appendTo.append(relativeDayString);
} else {
@@ -243,16 +243,16 @@ void RelativeDateFormat::parse( const UnicodeString& text,
// no date pattern, try parsing as time
fDateTimeFormatter->applyPattern(fTimePattern);
fDateTimeFormatter->parse(text,cal,pos);
- } else if (fTimePattern.isEmpty() || fCombinedFormat == NULL) {
+ } else if (fTimePattern.isEmpty() || fCombinedFormat == nullptr) {
// no time pattern or way to combine, try parsing as date
// first check whether text matches a relativeDayString
- UBool matchedRelative = FALSE;
+ UBool matchedRelative = false;
for (int n=0; n < fDatesLen && !matchedRelative; n++) {
- if (fDates[n].string != NULL &&
+ if (fDates[n].string != nullptr &&
text.compare(startIndex, fDates[n].len, fDates[n].string) == 0) {
// it matched, handle the relative day string
UErrorCode status = U_ZERO_ERROR;
- matchedRelative = TRUE;
+ matchedRelative = true;
// Set the calendar to now+offset
cal.setTime(Calendar::getNow(),status);
@@ -280,7 +280,7 @@ void RelativeDateFormat::parse( const UnicodeString& text,
UErrorCode status = U_ZERO_ERROR;
for (int n=0; n < fDatesLen; n++) {
int32_t relativeStringOffset;
- if (fDates[n].string != NULL &&
+ if (fDates[n].string != nullptr &&
(relativeStringOffset = modifiedText.indexOf(fDates[n].string, fDates[n].len, startIndex)) >= startIndex) {
// it matched, replace the relative date with a real one for parsing
UnicodeString dateString;
@@ -347,20 +347,20 @@ RelativeDateFormat::parse(const UnicodeString& text, UErrorCode& status) const
}
-const UChar *RelativeDateFormat::getStringForDay(int32_t day, int32_t &len, UErrorCode &status) const {
+const char16_t *RelativeDateFormat::getStringForDay(int32_t day, int32_t &len, UErrorCode &status) const {
if(U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// Is it inside the resource bundle's range?
int n = day + UDAT_DIRECTION_THIS;
if (n >= 0 && n < fDatesLen) {
- if (fDates[n].offset == day && fDates[n].string != NULL) {
+ if (fDates[n].offset == day && fDates[n].string != nullptr) {
len = fDates[n].len;
return fDates[n].string;
}
}
- return NULL; // not found.
+ return nullptr; // not found.
}
UnicodeString&
@@ -370,7 +370,7 @@ RelativeDateFormat::toPattern(UnicodeString& result, UErrorCode& status) const
result.remove();
if (fDatePattern.isEmpty()) {
result.setTo(fTimePattern);
- } else if (fTimePattern.isEmpty() || fCombinedFormat == NULL) {
+ } else if (fTimePattern.isEmpty() || fCombinedFormat == nullptr) {
result.setTo(fDatePattern);
} else {
fCombinedFormat->format(fTimePattern, fDatePattern, result, status);
@@ -424,17 +424,17 @@ RelativeDateFormat::setContext(UDisplayContext value, UErrorCode& status)
if (!fCapitalizationInfoSet &&
(value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE)) {
initCapitalizationContextInfo(fLocale);
- fCapitalizationInfoSet = TRUE;
+ fCapitalizationInfoSet = true;
}
#if !UCONFIG_NO_BREAK_ITERATION
- if ( fCapitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
+ if ( fCapitalizationBrkIter == nullptr && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
(value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU && fCapitalizationOfRelativeUnitsForUIListMenu) ||
(value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE && fCapitalizationOfRelativeUnitsForStandAlone)) ) {
status = U_ZERO_ERROR;
fCapitalizationBrkIter = BreakIterator::createSentenceInstance(fLocale, status);
if (U_FAILURE(status)) {
delete fCapitalizationBrkIter;
- fCapitalizationBrkIter = NULL;
+ fCapitalizationBrkIter = nullptr;
}
}
#endif
@@ -445,17 +445,17 @@ void
RelativeDateFormat::initCapitalizationContextInfo(const Locale& thelocale)
{
#if !UCONFIG_NO_BREAK_ITERATION
- const char * localeID = (thelocale != NULL)? thelocale.getBaseName(): NULL;
+ const char * localeID = (thelocale != nullptr)? thelocale.getBaseName(): nullptr;
UErrorCode status = U_ZERO_ERROR;
- LocalUResourceBundlePointer rb(ures_open(NULL, localeID, &status));
+ LocalUResourceBundlePointer rb(ures_open(nullptr, localeID, &status));
ures_getByKeyWithFallback(rb.getAlias(),
"contextTransforms/relative",
rb.getAlias(), &status);
- if (U_SUCCESS(status) && rb != NULL) {
+ if (U_SUCCESS(status) && rb != nullptr) {
int32_t len = 0;
const int32_t * intVector = ures_getIntVector(rb.getAlias(),
&len, &status);
- if (U_SUCCESS(status) && intVector != NULL && len >= 2) {
+ if (U_SUCCESS(status) && intVector != nullptr && len >= 2) {
fCapitalizationOfRelativeUnitsForUIListMenu = static_cast<UBool>(intVector[0]);
fCapitalizationOfRelativeUnitsForStandAlone = static_cast<UBool>(intVector[1]);
}
@@ -477,7 +477,7 @@ struct RelDateFmtDataSink : public ResourceSink {
RelDateFmtDataSink(URelativeString* fDates, int32_t len) : fDatesPtr(fDates), fDatesLen(len) {
for (int32_t i = 0; i < fDatesLen; ++i) {
fDatesPtr[i].offset = 0;
- fDatesPtr[i].string = NULL;
+ fDatesPtr[i].string = nullptr;
fDatesPtr[i].len = -1;
}
}
@@ -495,7 +495,7 @@ struct RelDateFmtDataSink : public ResourceSink {
// Put in the proper spot, but don't override existing data.
n = offset + UDAT_DIRECTION_THIS; // Converts to index in UDAT_R
- if (n < fDatesLen && fDatesPtr[n].string == NULL) {
+ if (n < fDatesLen && fDatesPtr[n].string == nullptr) {
// Not found and n is an empty slot.
fDatesPtr[n].offset = offset;
fDatesPtr[n].string = value.getString(len, errorCode);
@@ -512,15 +512,15 @@ RelDateFmtDataSink::~RelDateFmtDataSink() {}
} // Namespace
-static const UChar patItem1[] = {0x7B,0x31,0x7D}; // "{1}"
+static const char16_t patItem1[] = {0x7B,0x31,0x7D}; // "{1}"
static const int32_t patItem1Len = 3;
void RelativeDateFormat::loadDates(UErrorCode &status) {
- UResourceBundle *rb = ures_open(NULL, fLocale.getBaseName(), &status);
+ UResourceBundle *rb = ures_open(nullptr, fLocale.getBaseName(), &status);
LocalUResourceBundlePointer dateTimePatterns(
ures_getByKeyWithFallback(rb,
"calendar/gregorian/DateTimePatterns",
- (UResourceBundle*)NULL, &status));
+ (UResourceBundle*)nullptr, &status));
if(U_SUCCESS(status)) {
int32_t patternsSize = ures_getSize(dateTimePatterns.getAlias());
if (patternsSize > kDateTime) {
@@ -534,11 +534,11 @@ void RelativeDateFormat::loadDates(UErrorCode &status) {
}
}
- const UChar *resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status);
+ const char16_t *resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status);
if (U_SUCCESS(status) && resStrLen >= patItem1Len && u_strncmp(resStr,patItem1,patItem1Len)==0) {
- fCombinedHasDateAtStart = TRUE;
+ fCombinedHasDateAtStart = true;
}
- fCombinedFormat = new SimpleFormatter(UnicodeString(TRUE, resStr, resStrLen), 2, 2, status);
+ fCombinedFormat = new SimpleFormatter(UnicodeString(true, resStr, resStrLen), 2, 2, status);
}
}
@@ -567,7 +567,7 @@ RelativeDateFormat::initializeCalendar(TimeZone* adoptZone, const Locale& locale
if(!U_FAILURE(status)) {
fCalendar = Calendar::createInstance(adoptZone?adoptZone:TimeZone::createDefault(), locale, status);
}
- if (U_SUCCESS(status) && fCalendar == NULL) {
+ if (U_SUCCESS(status) && fCalendar == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
return fCalendar;
diff --git a/contrib/libs/icu/i18n/reldtfmt.h b/contrib/libs/icu/i18n/reldtfmt.h
index 98b333a02be..3af43d49cab 100644
--- a/contrib/libs/icu/i18n/reldtfmt.h
+++ b/contrib/libs/icu/i18n/reldtfmt.h
@@ -233,7 +233,7 @@ public:
* with this date-time formatter.
* @internal ICU 4.8
*/
- virtual const DateFormatSymbols* getDateFormatSymbols(void) const;
+ virtual const DateFormatSymbols* getDateFormatSymbols() const;
/**
* Set a particular UDisplayContext value in the formatter, such as
@@ -273,9 +273,9 @@ private:
* Get the string at a specific offset.
* @param day day offset ( -1, 0, 1, etc.. )
* @param len on output, length of string.
- * @return the string, or NULL if none at that location.
+ * @return the string, or nullptr if none at that location.
*/
- const UChar *getStringForDay(int32_t day, int32_t &len, UErrorCode &status) const;
+ const char16_t *getStringForDay(int32_t day, int32_t &len, UErrorCode &status) const;
/**
* Load the Date string array
@@ -294,7 +294,7 @@ private:
/**
* initializes fCalendar from parameters. Returns fCalendar as a convenience.
- * @param adoptZone Zone to be adopted, or NULL for TimeZone::createDefault().
+ * @param adoptZone Zone to be adopted, or nullptr for TimeZone::createDefault().
* @param locale Locale of the calendar
* @param status Error code
* @return the newly constructed fCalendar
@@ -314,7 +314,7 @@ public:
* @return The class ID for all objects of this class.
* @internal ICU 3.8
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
@@ -327,7 +327,7 @@ public:
* other classes have different class IDs.
* @internal ICU 3.8
*/
- virtual UClassID getDynamicClassID(void) const override;
+ virtual UClassID getDynamicClassID() const override;
};
diff --git a/contrib/libs/icu/i18n/rematch.cpp b/contrib/libs/icu/i18n/rematch.cpp
index 7d6eaeed8bb..7a39afbf7b7 100644
--- a/contrib/libs/icu/i18n/rematch.cpp
+++ b/contrib/libs/icu/i18n/rematch.cpp
@@ -73,7 +73,7 @@ RegexMatcher::RegexMatcher(const RegexPattern *pat) {
if (U_FAILURE(fDeferredStatus)) {
return;
}
- if (pat==NULL) {
+ if (pat==nullptr) {
fDeferredStatus = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -98,7 +98,7 @@ RegexMatcher::RegexMatcher(const UnicodeString &regexp, const UnicodeString &inp
init2(&inputText, status);
utext_close(&inputText);
- fInputUniStrMaybeMutable = TRUE;
+ fInputUniStrMaybeMutable = true;
}
@@ -157,12 +157,12 @@ RegexMatcher::~RegexMatcher() {
delete fStack;
if (fData != fSmallData) {
uprv_free(fData);
- fData = NULL;
+ fData = nullptr;
}
if (fPatternOwned) {
delete fPatternOwned;
- fPatternOwned = NULL;
- fPattern = NULL;
+ fPatternOwned = nullptr;
+ fPattern = nullptr;
}
if (fInput) {
@@ -189,8 +189,8 @@ RegexMatcher::~RegexMatcher() {
// to run safely.
//
void RegexMatcher::init(UErrorCode &status) {
- fPattern = NULL;
- fPatternOwned = NULL;
+ fPattern = nullptr;
+ fPatternOwned = nullptr;
fFrameSize = 0;
fRegionStart = 0;
fRegionLimit = 0;
@@ -200,37 +200,37 @@ void RegexMatcher::init(UErrorCode &status) {
fLookLimit = 0;
fActiveStart = 0;
fActiveLimit = 0;
- fTransparentBounds = FALSE;
- fAnchoringBounds = TRUE;
- fMatch = FALSE;
+ fTransparentBounds = false;
+ fAnchoringBounds = true;
+ fMatch = false;
fMatchStart = 0;
fMatchEnd = 0;
fLastMatchEnd = -1;
fAppendPosition = 0;
- fHitEnd = FALSE;
- fRequireEnd = FALSE;
- fStack = NULL;
- fFrame = NULL;
+ fHitEnd = false;
+ fRequireEnd = false;
+ fStack = nullptr;
+ fFrame = nullptr;
fTimeLimit = 0;
fTime = 0;
fTickCounter = 0;
fStackLimit = DEFAULT_BACKTRACK_STACK_CAPACITY;
- fCallbackFn = NULL;
- fCallbackContext = NULL;
- fFindProgressCallbackFn = NULL;
- fFindProgressCallbackContext = NULL;
- fTraceDebug = FALSE;
+ fCallbackFn = nullptr;
+ fCallbackContext = nullptr;
+ fFindProgressCallbackFn = nullptr;
+ fFindProgressCallbackContext = nullptr;
+ fTraceDebug = false;
fDeferredStatus = status;
fData = fSmallData;
- fWordBreakItr = NULL;
- fGCBreakItr = NULL;
+ fWordBreakItr = nullptr;
+ fGCBreakItr = nullptr;
- fStack = NULL;
- fInputText = NULL;
- fAltInputText = NULL;
- fInput = NULL;
+ fStack = nullptr;
+ fInputText = nullptr;
+ fAltInputText = nullptr;
+ fInput = nullptr;
fInputLength = 0;
- fInputUniStrMaybeMutable = FALSE;
+ fInputUniStrMaybeMutable = false;
}
//
@@ -245,14 +245,14 @@ void RegexMatcher::init2(UText *input, UErrorCode &status) {
if (fPattern->fDataSize > UPRV_LENGTHOF(fSmallData)) {
fData = (int64_t *)uprv_malloc(fPattern->fDataSize * sizeof(int64_t));
- if (fData == NULL) {
+ if (fData == nullptr) {
status = fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
}
fStack = new UVector64(status);
- if (fStack == NULL) {
+ if (fStack == nullptr) {
status = fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -266,10 +266,10 @@ void RegexMatcher::init2(UText *input, UErrorCode &status) {
}
-static const UChar BACKSLASH = 0x5c;
-static const UChar DOLLARSIGN = 0x24;
-static const UChar LEFTBRACKET = 0x7b;
-static const UChar RIGHTBRACKET = 0x7d;
+static const char16_t BACKSLASH = 0x5c;
+static const char16_t DOLLARSIGN = 0x24;
+static const char16_t LEFTBRACKET = 0x7b;
+static const char16_t RIGHTBRACKET = 0x7d;
//--------------------------------------------------------------------------------
//
@@ -309,7 +309,7 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest,
status = fDeferredStatus;
return *this;
}
- if (fMatch == FALSE) {
+ if (fMatch == false) {
status = U_REGEX_INVALID_STATE;
return *this;
}
@@ -326,10 +326,10 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest,
len16 = (int32_t)(fMatchStart-fAppendPosition);
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
- len16 = utext_extract(fInputText, fAppendPosition, fMatchStart, NULL, 0, &lengthStatus);
+ len16 = utext_extract(fInputText, fAppendPosition, fMatchStart, nullptr, 0, &lengthStatus);
}
- UChar *inputChars = (UChar *)uprv_malloc(sizeof(UChar)*(len16+1));
- if (inputChars == NULL) {
+ char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(len16+1));
+ if (inputChars == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return *this;
}
@@ -364,10 +364,10 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest,
UChar32 escapedChar = u_unescapeAt(uregex_utext_unescape_charAt, &offset, INT32_MAX, &context);
if (escapedChar != (UChar32)0xFFFFFFFF) {
if (U_IS_BMP(escapedChar)) {
- UChar c16 = (UChar)escapedChar;
+ char16_t c16 = (char16_t)escapedChar;
destLen += utext_replace(dest, destLen, destLen, &c16, 1, &status);
} else {
- UChar surrogate[2];
+ char16_t surrogate[2];
surrogate[0] = U16_LEAD(escapedChar);
surrogate[1] = U16_TRAIL(escapedChar);
if (U_SUCCESS(status)) {
@@ -386,10 +386,10 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest,
(void)UTEXT_NEXT32(replacement);
// Plain backslash escape. Just put out the escaped character.
if (U_IS_BMP(c)) {
- UChar c16 = (UChar)c;
+ char16_t c16 = (char16_t)c;
destLen += utext_replace(dest, destLen, destLen, &c16, 1, &status);
} else {
- UChar surrogate[2];
+ char16_t surrogate[2];
surrogate[0] = U16_LEAD(c);
surrogate[1] = U16_TRAIL(c);
if (U_SUCCESS(status)) {
@@ -400,10 +400,10 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest,
} else if (c != DOLLARSIGN) {
// Normal char, not a $. Copy it out without further checks.
if (U_IS_BMP(c)) {
- UChar c16 = (UChar)c;
+ char16_t c16 = (char16_t)c;
destLen += utext_replace(dest, destLen, destLen, &c16, 1, &status);
} else {
- UChar surrogate[2];
+ char16_t surrogate[2];
surrogate[0] = U16_LEAD(c);
surrogate[1] = U16_TRAIL(c);
if (U_SUCCESS(status)) {
@@ -449,7 +449,7 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest,
if (nextChar == U_SENTINEL) {
break;
}
- if (u_isdigit(nextChar) == FALSE) {
+ if (u_isdigit(nextChar) == false) {
break;
}
int32_t nextDigitVal = u_charDigitValue(nextChar);
@@ -524,12 +524,12 @@ UText *RegexMatcher::appendTail(UText *dest, UErrorCode &status) {
if (UTEXT_USES_U16(fInputText)) {
len16 = (int32_t)(fInputLength-fAppendPosition);
} else {
- len16 = utext_extract(fInputText, fAppendPosition, fInputLength, NULL, 0, &status);
+ len16 = utext_extract(fInputText, fAppendPosition, fInputLength, nullptr, 0, &status);
status = U_ZERO_ERROR; // buffer overflow
}
- UChar *inputChars = (UChar *)uprv_malloc(sizeof(UChar)*(len16));
- if (inputChars == NULL) {
+ char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(len16));
+ if (inputChars == nullptr) {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
} else {
utext_extract(fInputText, fAppendPosition, fInputLength, inputChars, len16, &status); // unterminated
@@ -561,7 +561,7 @@ int64_t RegexMatcher::end64(int32_t group, UErrorCode &err) const {
if (U_FAILURE(err)) {
return -1;
}
- if (fMatch == FALSE) {
+ if (fMatch == false) {
err = U_REGEX_INVALID_STATE;
return -1;
}
@@ -594,16 +594,16 @@ int32_t RegexMatcher::end(int32_t group, UErrorCode &err) const {
// string from the find() function, and calls the user progress callback
// function if there is one installed.
//
-// Return: TRUE if the find operation is to be terminated.
-// FALSE if the find operation is to continue running.
+// Return: true if the find operation is to be terminated.
+// false if the find operation is to continue running.
//
//--------------------------------------------------------------------------------
UBool RegexMatcher::findProgressInterrupt(int64_t pos, UErrorCode &status) {
if (fFindProgressCallbackFn && !(*fFindProgressCallbackFn)(fFindProgressCallbackContext, pos)) {
status = U_REGEX_STOPPED_BY_CALLER;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//--------------------------------------------------------------------------------
@@ -613,7 +613,7 @@ UBool RegexMatcher::findProgressInterrupt(int64_t pos, UErrorCode &status) {
//--------------------------------------------------------------------------------
UBool RegexMatcher::find() {
if (U_FAILURE(fDeferredStatus)) {
- return FALSE;
+ return false;
}
UErrorCode status = U_ZERO_ERROR;
UBool result = find(status);
@@ -630,11 +630,11 @@ UBool RegexMatcher::find(UErrorCode &status) {
// matcher has been reset.)
//
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return FALSE;
+ return false;
}
if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) {
@@ -654,9 +654,9 @@ UBool RegexMatcher::find(UErrorCode &status) {
// Previous match had zero length. Move start position up one position
// to avoid sending find() into a loop on zero-length matches.
if (startPos >= fActiveLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
(void)UTEXT_NEXT32(fInputText);
@@ -667,8 +667,8 @@ UBool RegexMatcher::find(UErrorCode &status) {
// A previous find() failed to match. Don't try again.
// (without this test, a pattern with a zero-length match
// could match again at the end of an input string.)
- fHitEnd = TRUE;
- return FALSE;
+ fHitEnd = true;
+ return false;
}
}
@@ -681,9 +681,9 @@ UBool RegexMatcher::find(UErrorCode &status) {
if (UTEXT_USES_U16(fInputText)) {
testStartLimit = fActiveLimit - fPattern->fMinMatchLen;
if (startPos > testStartLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
} else {
// We don't know exactly how long the minimum match length is in native characters.
@@ -699,16 +699,16 @@ UBool RegexMatcher::find(UErrorCode &status) {
// No optimization was found.
// Try a match at each input position.
for (;;) {
- MatchAt(startPos, FALSE, status);
+ MatchAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
if (startPos >= testStartLimit) {
- fHitEnd = TRUE;
- return FALSE;
+ fHitEnd = true;
+ return false;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
(void)UTEXT_NEXT32(fInputText);
@@ -717,7 +717,7 @@ UBool RegexMatcher::find(UErrorCode &status) {
// match at the end of a string, so we must make sure that the loop
// runs with startPos == testStartLimit the last time through.
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
UPRV_UNREACHABLE_EXIT;
@@ -725,12 +725,12 @@ UBool RegexMatcher::find(UErrorCode &status) {
// Matches are only possible at the start of the input string
// (pattern begins with ^ or \A)
if (startPos > fActiveStart) {
- fMatch = FALSE;
- return FALSE;
+ fMatch = false;
+ return false;
}
- MatchAt(startPos, FALSE, status);
+ MatchAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
return fMatch;
@@ -749,22 +749,22 @@ UBool RegexMatcher::find(UErrorCode &status) {
// and handle end of text in the following block.
if (c >= 0 && ((c<256 && fPattern->fInitialChars8->contains(c)) ||
(c>=256 && fPattern->fInitialChars->contains(c)))) {
- MatchAt(pos, FALSE, status);
+ MatchAt(pos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
UTEXT_SETNATIVEINDEX(fInputText, pos);
}
if (startPos > testStartLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
}
UPRV_UNREACHABLE_EXIT;
@@ -781,22 +781,22 @@ UBool RegexMatcher::find(UErrorCode &status) {
c = UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
if (c == theChar) {
- MatchAt(pos, FALSE, status);
+ MatchAt(pos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
}
if (startPos > testStartLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
}
UPRV_UNREACHABLE_EXIT;
@@ -805,12 +805,12 @@ UBool RegexMatcher::find(UErrorCode &status) {
{
UChar32 ch;
if (startPos == fAnchorStart) {
- MatchAt(startPos, FALSE, status);
+ MatchAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
ch = UTEXT_NEXT32(fInputText);
@@ -824,19 +824,19 @@ UBool RegexMatcher::find(UErrorCode &status) {
if (fPattern->fFlags & UREGEX_UNIX_LINES) {
for (;;) {
if (ch == 0x0a) {
- MatchAt(startPos, FALSE, status);
+ MatchAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
}
if (startPos >= testStartLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
ch = UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
@@ -844,7 +844,7 @@ UBool RegexMatcher::find(UErrorCode &status) {
// match at the end of a string, so we must make sure that the loop
// runs with startPos == testStartLimit the last time through.
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
} else {
for (;;) {
@@ -853,19 +853,19 @@ UBool RegexMatcher::find(UErrorCode &status) {
(void)UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
}
- MatchAt(startPos, FALSE, status);
+ MatchAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
}
if (startPos >= testStartLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
ch = UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
@@ -873,7 +873,7 @@ UBool RegexMatcher::find(UErrorCode &status) {
// match at the end of a string, so we must make sure that the loop
// runs with startPos == testStartLimit the last time through.
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
}
}
@@ -884,7 +884,7 @@ UBool RegexMatcher::find(UErrorCode &status) {
// we have reports of this in production code, don't use UPRV_UNREACHABLE_EXIT.
// See ICU-21669.
status = U_INTERNAL_PROGRAM_ERROR;
- return FALSE;
+ return false;
}
UPRV_UNREACHABLE_EXIT;
@@ -894,23 +894,23 @@ UBool RegexMatcher::find(UErrorCode &status) {
UBool RegexMatcher::find(int64_t start, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return FALSE;
+ return false;
}
this->reset(); // Note: Reset() is specified by Java Matcher documentation.
// This will reset the region to be the full input length.
if (start < 0) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
int64_t nativeStart = start;
if (nativeStart < fActiveStart || nativeStart > fActiveLimit) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
fMatchEnd = nativeStart;
return find(status);
@@ -933,7 +933,7 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
startPos = (int32_t)fActiveStart;
}
- const UChar *inputBuf = fInputText->chunkContents;
+ const char16_t *inputBuf = fInputText->chunkContents;
if (fMatch) {
// Save the position of any previous successful match.
@@ -943,9 +943,9 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
// Previous match had zero length. Move start position up one position
// to avoid sending find() into a loop on zero-length matches.
if (startPos >= fActiveLimit) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
U16_FWD_1(inputBuf, startPos, fInputLength);
}
@@ -954,8 +954,8 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
// A previous find() failed to match. Don't try again.
// (without this test, a pattern with a zero-length match
// could match again at the end of an input string.)
- fHitEnd = TRUE;
- return FALSE;
+ fHitEnd = true;
+ return false;
}
}
@@ -967,9 +967,9 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
// Note: a match can begin at inputBuf + testLen; it is an inclusive limit.
int32_t testLen = (int32_t)(fActiveLimit - fPattern->fMinMatchLen);
if (startPos > testLen) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
UChar32 c;
@@ -980,23 +980,23 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
// No optimization was found.
// Try a match at each input position.
for (;;) {
- MatchChunkAt(startPos, FALSE, status);
+ MatchChunkAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
if (startPos >= testLen) {
- fHitEnd = TRUE;
- return FALSE;
+ fHitEnd = true;
+ return false;
}
U16_FWD_1(inputBuf, startPos, fActiveLimit);
// Note that it's perfectly OK for a pattern to have a zero-length
// match at the end of a string, so we must make sure that the loop
// runs with startPos == testLen the last time through.
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
UPRV_UNREACHABLE_EXIT;
@@ -1004,12 +1004,12 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
// Matches are only possible at the start of the input string
// (pattern begins with ^ or \A)
if (startPos > fActiveStart) {
- fMatch = FALSE;
- return FALSE;
+ fMatch = false;
+ return false;
}
- MatchChunkAt(startPos, FALSE, status);
+ MatchChunkAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
return fMatch;
@@ -1023,21 +1023,21 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
U16_NEXT(inputBuf, startPos, fActiveLimit, c); // like c = inputBuf[startPos++];
if ((c<256 && fPattern->fInitialChars8->contains(c)) ||
(c>=256 && fPattern->fInitialChars->contains(c))) {
- MatchChunkAt(pos, FALSE, status);
+ MatchChunkAt(pos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
}
if (startPos > testLen) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
}
UPRV_UNREACHABLE_EXIT;
@@ -1052,21 +1052,21 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
int32_t pos = startPos;
U16_NEXT(inputBuf, startPos, fActiveLimit, c); // like c = inputBuf[startPos++];
if (c == theChar) {
- MatchChunkAt(pos, FALSE, status);
+ MatchChunkAt(pos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
}
if (startPos > testLen) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
}
UPRV_UNREACHABLE_EXIT;
@@ -1075,12 +1075,12 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
{
UChar32 ch;
if (startPos == fAnchorStart) {
- MatchChunkAt(startPos, FALSE, status);
+ MatchChunkAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
U16_FWD_1(inputBuf, startPos, fActiveLimit);
}
@@ -1089,25 +1089,25 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
for (;;) {
ch = inputBuf[startPos-1];
if (ch == 0x0a) {
- MatchChunkAt(startPos, FALSE, status);
+ MatchChunkAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
}
if (startPos >= testLen) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
U16_FWD_1(inputBuf, startPos, fActiveLimit);
// Note that it's perfectly OK for a pattern to have a zero-length
// match at the end of a string, so we must make sure that the loop
// runs with startPos == testLen the last time through.
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
} else {
for (;;) {
@@ -1116,25 +1116,25 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
if (ch == 0x0d && startPos < fActiveLimit && inputBuf[startPos] == 0x0a) {
startPos++;
}
- MatchChunkAt(startPos, FALSE, status);
+ MatchChunkAt(startPos, false, status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (fMatch) {
- return TRUE;
+ return true;
}
}
if (startPos >= testLen) {
- fMatch = FALSE;
- fHitEnd = TRUE;
- return FALSE;
+ fMatch = false;
+ fHitEnd = true;
+ return false;
}
U16_FWD_1(inputBuf, startPos, fActiveLimit);
// Note that it's perfectly OK for a pattern to have a zero-length
// match at the end of a string, so we must make sure that the loop
// runs with startPos == testLen the last time through.
if (findProgressInterrupt(startPos, status))
- return FALSE;
+ return false;
}
}
}
@@ -1145,7 +1145,7 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) {
// we have reports of this in production code, don't use UPRV_UNREACHABLE_EXIT.
// See ICU-21669.
status = U_INTERNAL_PROGRAM_ERROR;
- return FALSE;
+ return false;
}
UPRV_UNREACHABLE_EXIT;
@@ -1175,7 +1175,7 @@ UText *RegexMatcher::group(int32_t groupNum, UText *dest, int64_t &group_len, UE
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- } else if (fMatch == FALSE) {
+ } else if (fMatch == false) {
status = U_REGEX_INVALID_STATE;
} else if (groupNum < 0 || groupNum > fPattern->fGroupMap->size()) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
@@ -1199,12 +1199,12 @@ UText *RegexMatcher::group(int32_t groupNum, UText *dest, int64_t &group_len, UE
if (s < 0) {
// A capture group wasn't part of the match
- return utext_clone(dest, fInputText, FALSE, TRUE, &status);
+ return utext_clone(dest, fInputText, false, true, &status);
}
U_ASSERT(s <= e);
group_len = e - s;
- dest = utext_clone(dest, fInputText, FALSE, TRUE, &status);
+ dest = utext_clone(dest, fInputText, false, true, &status);
if (dest)
UTEXT_SETNATIVEINDEX(dest, s);
return dest;
@@ -1220,14 +1220,14 @@ UnicodeString RegexMatcher::group(int32_t groupNum, UErrorCode &status) const {
// Get the group length using a utext_extract preflight.
// UText is actually pretty efficient at this when underlying encoding is UTF-16.
- int32_t length = utext_extract(fInputText, groupStart, groupEnd, NULL, 0, &status);
+ int32_t length = utext_extract(fInputText, groupStart, groupEnd, nullptr, 0, &status);
if (status != U_BUFFER_OVERFLOW_ERROR) {
return result;
}
status = U_ZERO_ERROR;
- UChar *buf = result.getBuffer(length);
- if (buf == NULL) {
+ char16_t *buf = result.getBuffer(length);
+ if (buf == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
int32_t extractLength = utext_extract(fInputText, groupStart, groupEnd, buf, length, &status);
@@ -1255,13 +1255,13 @@ int64_t RegexMatcher::appendGroup(int32_t groupNum, UText *dest, UErrorCode &sta
}
int64_t destLen = utext_nativeLength(dest);
- if (fMatch == FALSE) {
+ if (fMatch == false) {
status = U_REGEX_INVALID_STATE;
- return utext_replace(dest, destLen, destLen, NULL, 0, &status);
+ return utext_replace(dest, destLen, destLen, nullptr, 0, &status);
}
if (groupNum < 0 || groupNum > fPattern->fGroupMap->size()) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return utext_replace(dest, destLen, destLen, NULL, 0, &status);
+ return utext_replace(dest, destLen, destLen, nullptr, 0, &status);
}
int64_t s, e;
@@ -1278,7 +1278,7 @@ int64_t RegexMatcher::appendGroup(int32_t groupNum, UText *dest, UErrorCode &sta
if (s < 0) {
// A capture group wasn't part of the match
- return utext_replace(dest, destLen, destLen, NULL, 0, &status);
+ return utext_replace(dest, destLen, destLen, nullptr, 0, &status);
}
U_ASSERT(s <= e);
@@ -1292,10 +1292,10 @@ int64_t RegexMatcher::appendGroup(int32_t groupNum, UText *dest, UErrorCode &sta
len16 = (int32_t)(e-s);
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
- len16 = utext_extract(fInputText, s, e, NULL, 0, &lengthStatus);
+ len16 = utext_extract(fInputText, s, e, nullptr, 0, &lengthStatus);
}
- UChar *groupChars = (UChar *)uprv_malloc(sizeof(UChar)*(len16+1));
- if (groupChars == NULL) {
+ char16_t *groupChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(len16+1));
+ if (groupChars == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
@@ -1361,12 +1361,12 @@ const UnicodeString &RegexMatcher::input() const {
if (UTEXT_USES_U16(fInputText)) {
len16 = (int32_t)fInputLength;
} else {
- len16 = utext_extract(fInputText, 0, fInputLength, NULL, 0, &status);
+ len16 = utext_extract(fInputText, 0, fInputLength, nullptr, 0, &status);
status = U_ZERO_ERROR; // overflow, length status
}
UnicodeString *result = new UnicodeString(len16, 0, 0);
- UChar *inputChars = result->getBuffer(len16);
+ char16_t *inputChars = result->getBuffer(len16);
utext_extract(fInputText, 0, fInputLength, inputChars, len16, &status); // unterminated warning
result->releaseBuffer(len16);
@@ -1409,10 +1409,10 @@ UText *RegexMatcher::getInput (UText *dest, UErrorCode &status) const {
input16Len = (int32_t)fInputLength;
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
- input16Len = utext_extract(fInputText, 0, fInputLength, NULL, 0, &lengthStatus); // buffer overflow error
+ input16Len = utext_extract(fInputText, 0, fInputLength, nullptr, 0, &lengthStatus); // buffer overflow error
}
- UChar *inputChars = (UChar *)uprv_malloc(sizeof(UChar)*(input16Len));
- if (inputChars == NULL) {
+ char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(input16Len));
+ if (inputChars == nullptr) {
return dest;
}
@@ -1425,14 +1425,14 @@ UText *RegexMatcher::getInput (UText *dest, UErrorCode &status) const {
}
return dest;
} else {
- return utext_clone(NULL, fInputText, FALSE, TRUE, &status);
+ return utext_clone(nullptr, fInputText, false, true, &status);
}
}
static UBool compat_SyncMutableUTextContents(UText *ut);
static UBool compat_SyncMutableUTextContents(UText *ut) {
- UBool retVal = FALSE;
+ UBool retVal = false;
// In the following test, we're really only interested in whether the UText should switch
// between heap and stack allocation. If length hasn't changed, we won't, so the chunkContents
@@ -1450,7 +1450,7 @@ static UBool compat_SyncMutableUTextContents(UText *ut) {
ut->chunkLength = newLength;
ut->chunkNativeLimit = newLength;
ut->nativeIndexingLimit = newLength;
- retVal = TRUE;
+ retVal = true;
}
return retVal;
@@ -1463,11 +1463,11 @@ static UBool compat_SyncMutableUTextContents(UText *ut) {
//--------------------------------------------------------------------------------
UBool RegexMatcher::lookingAt(UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return FALSE;
+ return false;
}
if (fInputUniStrMaybeMutable) {
@@ -1480,9 +1480,9 @@ UBool RegexMatcher::lookingAt(UErrorCode &status) {
resetPreserveRegion();
}
if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) {
- MatchChunkAt((int32_t)fActiveStart, FALSE, status);
+ MatchChunkAt((int32_t)fActiveStart, false, status);
} else {
- MatchAt(fActiveStart, FALSE, status);
+ MatchAt(fActiveStart, false, status);
}
return fMatch;
}
@@ -1490,17 +1490,17 @@ UBool RegexMatcher::lookingAt(UErrorCode &status) {
UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return FALSE;
+ return false;
}
reset();
if (start < 0) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
if (fInputUniStrMaybeMutable) {
@@ -1514,13 +1514,13 @@ UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) {
nativeStart = start;
if (nativeStart < fActiveStart || nativeStart > fActiveLimit) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) {
- MatchChunkAt((int32_t)nativeStart, FALSE, status);
+ MatchChunkAt((int32_t)nativeStart, false, status);
} else {
- MatchAt(nativeStart, FALSE, status);
+ MatchAt(nativeStart, false, status);
}
return fMatch;
}
@@ -1534,11 +1534,11 @@ UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) {
//--------------------------------------------------------------------------------
UBool RegexMatcher::matches(UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return FALSE;
+ return false;
}
if (fInputUniStrMaybeMutable) {
@@ -1552,9 +1552,9 @@ UBool RegexMatcher::matches(UErrorCode &status) {
}
if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) {
- MatchChunkAt((int32_t)fActiveStart, TRUE, status);
+ MatchChunkAt((int32_t)fActiveStart, true, status);
} else {
- MatchAt(fActiveStart, TRUE, status);
+ MatchAt(fActiveStart, true, status);
}
return fMatch;
}
@@ -1562,17 +1562,17 @@ UBool RegexMatcher::matches(UErrorCode &status) {
UBool RegexMatcher::matches(int64_t start, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return FALSE;
+ return false;
}
reset();
if (start < 0) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
if (fInputUniStrMaybeMutable) {
@@ -1586,13 +1586,13 @@ UBool RegexMatcher::matches(int64_t start, UErrorCode &status) {
nativeStart = start;
if (nativeStart < fActiveStart || nativeStart > fActiveLimit) {
status = U_INDEX_OUTOFBOUNDS_ERROR;
- return FALSE;
+ return false;
}
if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) {
- MatchChunkAt((int32_t)nativeStart, TRUE, status);
+ MatchChunkAt((int32_t)nativeStart, true, status);
} else {
- MatchAt(nativeStart, TRUE, status);
+ MatchAt(nativeStart, true, status);
}
return fMatch;
}
@@ -1726,12 +1726,12 @@ UText *RegexMatcher::replaceAll(UText *replacement, UText *dest, UErrorCode &sta
return dest;
}
- if (dest == NULL) {
+ if (dest == nullptr) {
UnicodeString emptyString;
UText empty = UTEXT_INITIALIZER;
utext_openUnicodeString(&empty, &emptyString, &status);
- dest = utext_clone(NULL, &empty, TRUE, FALSE, &status);
+ dest = utext_clone(nullptr, &empty, true, false, &status);
utext_close(&empty);
}
@@ -1788,12 +1788,12 @@ UText *RegexMatcher::replaceFirst(UText *replacement, UText *dest, UErrorCode &s
return getInput(dest, status);
}
- if (dest == NULL) {
+ if (dest == nullptr) {
UnicodeString emptyString;
UText empty = UTEXT_INITIALIZER;
utext_openUnicodeString(&empty, &emptyString, &status);
- dest = utext_clone(NULL, &empty, TRUE, FALSE, &status);
+ dest = utext_clone(nullptr, &empty, true, false, &status);
utext_close(&empty);
}
@@ -1839,9 +1839,9 @@ void RegexMatcher::resetPreserveRegion() {
fMatchEnd = 0;
fLastMatchEnd = -1;
fAppendPosition = 0;
- fMatch = FALSE;
- fHitEnd = FALSE;
- fRequireEnd = FALSE;
+ fMatch = false;
+ fHitEnd = false;
+ fRequireEnd = false;
fTime = 0;
fTickCounter = TIMER_INITIAL_VALUE;
//resetStack(); // more expensive than it looks...
@@ -1851,7 +1851,7 @@ void RegexMatcher::resetPreserveRegion() {
RegexMatcher &RegexMatcher::reset(const UnicodeString &input) {
fInputText = utext_openConstUnicodeString(fInputText, &input, &fDeferredStatus);
if (fPattern->fNeedsAltInput) {
- fAltInputText = utext_clone(fAltInputText, fInputText, FALSE, TRUE, &fDeferredStatus);
+ fAltInputText = utext_clone(fAltInputText, fInputText, false, true, &fDeferredStatus);
}
if (U_FAILURE(fDeferredStatus)) {
return *this;
@@ -1860,11 +1860,11 @@ RegexMatcher &RegexMatcher::reset(const UnicodeString &input) {
reset();
delete fInput;
- fInput = NULL;
+ fInput = nullptr;
// Do the following for any UnicodeString.
// This is for compatibility for those clients who modify the input string "live" during regex operations.
- fInputUniStrMaybeMutable = TRUE;
+ fInputUniStrMaybeMutable = true;
#if UCONFIG_NO_BREAK_ITERATION==0
if (fWordBreakItr) {
@@ -1881,15 +1881,15 @@ RegexMatcher &RegexMatcher::reset(const UnicodeString &input) {
RegexMatcher &RegexMatcher::reset(UText *input) {
if (fInputText != input) {
- fInputText = utext_clone(fInputText, input, FALSE, TRUE, &fDeferredStatus);
- if (fPattern->fNeedsAltInput) fAltInputText = utext_clone(fAltInputText, fInputText, FALSE, TRUE, &fDeferredStatus);
+ fInputText = utext_clone(fInputText, input, false, true, &fDeferredStatus);
+ if (fPattern->fNeedsAltInput) fAltInputText = utext_clone(fAltInputText, fInputText, false, true, &fDeferredStatus);
if (U_FAILURE(fDeferredStatus)) {
return *this;
}
fInputLength = utext_nativeLength(fInputText);
delete fInput;
- fInput = NULL;
+ fInput = nullptr;
#if UCONFIG_NO_BREAK_ITERATION==0
if (fWordBreakItr) {
@@ -1901,12 +1901,12 @@ RegexMatcher &RegexMatcher::reset(UText *input) {
#endif
}
reset();
- fInputUniStrMaybeMutable = FALSE;
+ fInputUniStrMaybeMutable = false;
return *this;
}
-/*RegexMatcher &RegexMatcher::reset(const UChar *) {
+/*RegexMatcher &RegexMatcher::reset(const char16_t *) {
fDeferredStatus = U_INTERNAL_PROGRAM_ERROR;
return *this;
}*/
@@ -1935,7 +1935,7 @@ RegexMatcher &RegexMatcher::refreshInputText(UText *input, UErrorCode &status) {
if (U_FAILURE(status)) {
return *this;
}
- if (input == NULL) {
+ if (input == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return *this;
}
@@ -1945,15 +1945,15 @@ RegexMatcher &RegexMatcher::refreshInputText(UText *input, UErrorCode &status) {
}
int64_t pos = utext_getNativeIndex(fInputText);
// Shallow read-only clone of the new UText into the existing input UText
- fInputText = utext_clone(fInputText, input, FALSE, TRUE, &status);
+ fInputText = utext_clone(fInputText, input, false, true, &status);
if (U_FAILURE(status)) {
return *this;
}
utext_setNativeIndex(fInputText, pos);
- if (fAltInputText != NULL) {
+ if (fAltInputText != nullptr) {
pos = utext_getNativeIndex(fAltInputText);
- fAltInputText = utext_clone(fAltInputText, input, FALSE, TRUE, &status);
+ fAltInputText = utext_clone(fAltInputText, input, false, true, &status);
if (U_FAILURE(status)) {
return *this;
}
@@ -1980,7 +1980,7 @@ void RegexMatcher::setTrace(UBool state) {
*
* @param src The source UText
* @param dest The destination UText. Must be writable.
- * May be NULL, in which case a new UText will be allocated.
+ * May be nullptr, in which case a new UText will be allocated.
* @param start Start index of source substring.
* @param limit Limit index of source substring.
* @param status An error code.
@@ -1991,21 +1991,21 @@ static UText *utext_extract_replace(UText *src, UText *dest, int64_t start, int6
}
if (start == limit) {
if (dest) {
- utext_replace(dest, 0, utext_nativeLength(dest), NULL, 0, status);
+ utext_replace(dest, 0, utext_nativeLength(dest), nullptr, 0, status);
return dest;
} else {
- return utext_openUChars(NULL, NULL, 0, status);
+ return utext_openUChars(nullptr, nullptr, 0, status);
}
}
- int32_t length = utext_extract(src, start, limit, NULL, 0, status);
+ int32_t length = utext_extract(src, start, limit, nullptr, 0, status);
if (*status != U_BUFFER_OVERFLOW_ERROR && U_FAILURE(*status)) {
return dest;
}
*status = U_ZERO_ERROR;
- MaybeStackArray<UChar, 40> buffer;
+ MaybeStackArray<char16_t, 40> buffer;
if (length >= buffer.getCapacity()) {
- UChar *newBuf = buffer.resize(length+1); // Leave space for terminating Nul.
- if (newBuf == NULL) {
+ char16_t *newBuf = buffer.resize(length+1); // Leave space for terminating Nul.
+ if (newBuf == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -2018,18 +2018,18 @@ static UText *utext_extract_replace(UText *src, UText *dest, int64_t start, int6
// Caller did not provide a preexisting UText.
// Open a new one, and have it adopt the text buffer storage.
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
int32_t ownedLength = 0;
- UChar *ownedBuf = buffer.orphanOrClone(length+1, ownedLength);
- if (ownedBuf == NULL) {
+ char16_t *ownedBuf = buffer.orphanOrClone(length+1, ownedLength);
+ if (ownedBuf == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- UText *result = utext_openUChars(NULL, ownedBuf, length, status);
+ UText *result = utext_openUChars(nullptr, ownedBuf, length, status);
if (U_FAILURE(*status)) {
uprv_free(ownedBuf);
- return NULL;
+ return nullptr;
}
result->providerProperties |= (1 << UTEXT_PROVIDER_OWNS_TEXT);
return result;
@@ -2053,13 +2053,13 @@ int32_t RegexMatcher::split(const UnicodeString &input,
}
UText **destText = (UText **)uprv_malloc(sizeof(UText*)*destCapacity);
- if (destText == NULL) {
+ if (destText == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
int32_t i;
for (i = 0; i < destCapacity; i++) {
- destText[i] = utext_openUnicodeString(NULL, &dest[i], &status);
+ destText[i] = utext_openUnicodeString(nullptr, &dest[i], &status);
}
int32_t fieldCount = split(&inputText, destText, destCapacity, status);
@@ -2126,15 +2126,15 @@ int32_t RegexMatcher::split(UText *input,
UText remainingText = UTEXT_INITIALIZER;
utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart,
fActiveLimit-nextOutputStringStart, &status);
- dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status);
+ dest[i] = utext_clone(nullptr, &remainingText, true, false, &status);
utext_close(&remainingText);
}
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
int32_t remaining16Length =
- utext_extract(input, nextOutputStringStart, fActiveLimit, NULL, 0, &lengthStatus);
- UChar *remainingChars = (UChar *)uprv_malloc(sizeof(UChar)*(remaining16Length+1));
- if (remainingChars == NULL) {
+ utext_extract(input, nextOutputStringStart, fActiveLimit, nullptr, 0, &lengthStatus);
+ char16_t *remainingChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(remaining16Length+1));
+ if (remainingChars == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -2145,7 +2145,7 @@ int32_t RegexMatcher::split(UText *input,
} else {
UText remainingText = UTEXT_INITIALIZER;
utext_openUChars(&remainingText, remainingChars, remaining16Length, &status);
- dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status);
+ dest[i] = utext_clone(nullptr, &remainingText, true, false, &status);
utext_close(&remainingText);
}
@@ -2166,14 +2166,14 @@ int32_t RegexMatcher::split(UText *input,
UText remainingText = UTEXT_INITIALIZER;
utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart,
fMatchStart-nextOutputStringStart, &status);
- dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status);
+ dest[i] = utext_clone(nullptr, &remainingText, true, false, &status);
utext_close(&remainingText);
}
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
- int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fMatchStart, NULL, 0, &lengthStatus);
- UChar *remainingChars = (UChar *)uprv_malloc(sizeof(UChar)*(remaining16Length+1));
- if (remainingChars == NULL) {
+ int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fMatchStart, nullptr, 0, &lengthStatus);
+ char16_t *remainingChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(remaining16Length+1));
+ if (remainingChars == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -2183,7 +2183,7 @@ int32_t RegexMatcher::split(UText *input,
} else {
UText remainingText = UTEXT_INITIALIZER;
utext_openUChars(&remainingText, remainingChars, remaining16Length, &status);
- dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status);
+ dest[i] = utext_clone(nullptr, &remainingText, true, false, &status);
utext_close(&remainingText);
}
@@ -2212,10 +2212,10 @@ int32_t RegexMatcher::split(UText *input,
// the delimiter at the end of input.
if (i+1 < destCapacity) {
++i;
- if (dest[i] == NULL) {
- dest[i] = utext_openUChars(NULL, NULL, 0, &status);
+ if (dest[i] == nullptr) {
+ dest[i] = utext_openUChars(nullptr, nullptr, 0, &status);
} else {
- static const UChar emptyString[] = {(UChar)0};
+ static const char16_t emptyString[] = {(char16_t)0};
utext_replace(dest[i], 0, utext_nativeLength(dest[i]), emptyString, 0, &status);
}
}
@@ -2236,14 +2236,14 @@ int32_t RegexMatcher::split(UText *input,
UText remainingText = UTEXT_INITIALIZER;
utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart,
fActiveLimit-nextOutputStringStart, &status);
- dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status);
+ dest[i] = utext_clone(nullptr, &remainingText, true, false, &status);
utext_close(&remainingText);
}
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
- int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fActiveLimit, NULL, 0, &lengthStatus);
- UChar *remainingChars = (UChar *)uprv_malloc(sizeof(UChar)*(remaining16Length+1));
- if (remainingChars == NULL) {
+ int32_t remaining16Length = utext_extract(input, nextOutputStringStart, fActiveLimit, nullptr, 0, &lengthStatus);
+ char16_t *remainingChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(remaining16Length+1));
+ if (remainingChars == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -2254,7 +2254,7 @@ int32_t RegexMatcher::split(UText *input,
} else {
UText remainingText = UTEXT_INITIALIZER;
utext_openUChars(&remainingText, remainingChars, remaining16Length, &status);
- dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status);
+ dest[i] = utext_clone(nullptr, &remainingText, true, false, &status);
utext_close(&remainingText);
}
@@ -2297,7 +2297,7 @@ int64_t RegexMatcher::start64(int32_t group, UErrorCode &status) const {
status = fDeferredStatus;
return -1;
}
- if (fMatch == FALSE) {
+ if (fMatch == false) {
status = U_REGEX_INVALID_STATE;
return -1;
}
@@ -2516,7 +2516,7 @@ REStackFrame *RegexMatcher::resetStack() {
REStackFrame *iFrame = (REStackFrame *)fStack->reserveBlock(fPattern->fFrameSize, fDeferredStatus);
if(U_FAILURE(fDeferredStatus)) {
- return NULL;
+ return nullptr;
}
int32_t i;
@@ -2534,7 +2534,7 @@ REStackFrame *RegexMatcher::resetStack() {
// in perl, "xab..cd..", \b is true at positions 0,3,5,7
// For us,
// If the current char is a combining mark,
-// \b is FALSE.
+// \b is false.
// Else Scan backwards to the first non-combining char.
// We are at a boundary if the this char and the original chars are
// opposite in membership in \w set
@@ -2545,11 +2545,11 @@ REStackFrame *RegexMatcher::resetStack() {
//
//--------------------------------------------------------------------------------
UBool RegexMatcher::isWordBoundary(int64_t pos) {
- UBool isBoundary = FALSE;
- UBool cIsWord = FALSE;
+ UBool isBoundary = false;
+ UBool cIsWord = false;
if (pos >= fLookLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
} else {
// Determine whether char c at current position is a member of the word set of chars.
// If we're off the end of the string, behave as though we're not at a word char.
@@ -2557,14 +2557,14 @@ UBool RegexMatcher::isWordBoundary(int64_t pos) {
UChar32 c = UTEXT_CURRENT32(fInputText);
if (u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND) || u_charType(c) == U_FORMAT_CHAR) {
// Current char is a combining one. Not a boundary.
- return FALSE;
+ return false;
}
cIsWord = RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET].contains(c);
}
// Back up until we come to a non-combining char, determine whether
// that char is a word char.
- UBool prevCIsWord = FALSE;
+ UBool prevCIsWord = false;
for (;;) {
if (UTEXT_GETNATIVEINDEX(fInputText) <= fLookStart) {
break;
@@ -2581,13 +2581,13 @@ UBool RegexMatcher::isWordBoundary(int64_t pos) {
}
UBool RegexMatcher::isChunkWordBoundary(int32_t pos) {
- UBool isBoundary = FALSE;
- UBool cIsWord = FALSE;
+ UBool isBoundary = false;
+ UBool cIsWord = false;
- const UChar *inputBuf = fInputText->chunkContents;
+ const char16_t *inputBuf = fInputText->chunkContents;
if (pos >= fLookLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
} else {
// Determine whether char c at current position is a member of the word set of chars.
// If we're off the end of the string, behave as though we're not at a word char.
@@ -2595,14 +2595,14 @@ UBool RegexMatcher::isChunkWordBoundary(int32_t pos) {
U16_GET(inputBuf, fLookStart, pos, fLookLimit, c);
if (u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND) || u_charType(c) == U_FORMAT_CHAR) {
// Current char is a combining one. Not a boundary.
- return FALSE;
+ return false;
}
cIsWord = RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET].contains(c);
}
// Back up until we come to a non-combining char, determine whether
// that char is a word char.
- UBool prevCIsWord = FALSE;
+ UBool prevCIsWord = false;
for (;;) {
if (pos <= fLookStart) {
break;
@@ -2629,7 +2629,7 @@ UBool RegexMatcher::isChunkWordBoundary(int32_t pos) {
//
//--------------------------------------------------------------------------------
UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) {
- UBool returnVal = FALSE;
+ UBool returnVal = false;
#if UCONFIG_NO_BREAK_ITERATION==0
// Note: this point will never be reached if break iteration is configured out.
@@ -2639,7 +2639,7 @@ UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) {
if (fWordBreakItr == nullptr) {
fWordBreakItr = BreakIterator::createWordInstance(Locale::getEnglish(), status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
fWordBreakItr->setText(fInputText, status);
}
@@ -2647,8 +2647,8 @@ UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) {
// Note: zero width boundary tests like \b see through transparent region bounds,
// which is why fLookLimit is used here, rather than fActiveLimit.
if (pos >= fLookLimit) {
- fHitEnd = TRUE;
- returnVal = TRUE; // With Unicode word rules, only positions within the interior of "real"
+ fHitEnd = true;
+ returnVal = true; // With Unicode word rules, only positions within the interior of "real"
// words are not boundaries. All non-word chars stand by themselves,
// with word boundaries on both sides.
} else {
@@ -2696,8 +2696,8 @@ int64_t RegexMatcher::followingGCBoundary(int64_t pos, UErrorCode &status) {
void RegexMatcher::IncrementTime(UErrorCode &status) {
fTickCounter = TIMER_INITIAL_VALUE;
fTime++;
- if (fCallbackFn != NULL) {
- if ((*fCallbackFn)(fCallbackContext, fTime) == FALSE) {
+ if (fCallbackFn != nullptr) {
+ if ((*fCallbackFn)(fCallbackContext, fTime) == false) {
status = U_REGEX_STOPPED_BY_CALLER;
return;
}
@@ -2787,7 +2787,7 @@ UnicodeString StringFromUText(UText *ut) {
//
//--------------------------------------------------------------------------------
void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
- UBool isMatch = FALSE; // True if the we have a match.
+ UBool isMatch = false; // True if the we have a match.
int64_t backSearchIndex = U_INT64_MAX; // used after greedy single-character matches for searching backwards
@@ -2811,7 +2811,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
//
int64_t *pat = fPattern->fCompiledPat->getBuffer();
- const UChar *litText = fPattern->fLiteralText.getBuffer();
+ const char16_t *litText = fPattern->fLiteralText.getBuffer();
UVector *fSets = fPattern->fSets;
fFrameSize = fPattern->fFrameSize;
@@ -2872,7 +2872,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
break;
}
} else {
- fHitEnd = TRUE;
+ fHitEnd = true;
}
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
@@ -2892,22 +2892,22 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
U_ASSERT(opType == URX_STRING_LEN);
U_ASSERT(stringLen >= 2);
- const UChar *patternString = litText+stringStartIdx;
+ const char16_t *patternString = litText+stringStartIdx;
int32_t patternStringIndex = 0;
UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
UChar32 inputChar;
UChar32 patternChar;
- UBool success = TRUE;
+ UBool success = true;
while (patternStringIndex < stringLen) {
if (UTEXT_GETNATIVEINDEX(fInputText) >= fActiveLimit) {
- success = FALSE;
- fHitEnd = TRUE;
+ success = false;
+ fHitEnd = true;
break;
}
inputChar = UTEXT_NEXT32(fInputText);
U16_NEXT(patternString, patternStringIndex, stringLen, patternChar);
if (patternChar != inputChar) {
- success = FALSE;
+ success = false;
break;
}
}
@@ -2934,7 +2934,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
- isMatch = TRUE;
+ isMatch = true;
goto breakFromLoop;
// Start and End Capture stack frame variables are laid out out like this:
@@ -2962,8 +2962,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
{
if (fp->fInputIdx >= fAnchorLimit) {
// We really are at the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
@@ -2977,8 +2977,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// If not in the middle of a CR/LF sequence
if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && ((void)UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOUS32(fInputText))==0x0d)) {
// At new-line at end of input. Success
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
@@ -2986,8 +2986,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
} else {
UChar32 nextC = UTEXT_NEXT32(fInputText);
if (c == 0x0d && nextC == 0x0a && UTEXT_GETNATIVEINDEX(fInputText) >= fAnchorLimit) {
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break; // At CR/LF at end of input. Success
}
}
@@ -3000,16 +3000,16 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_DOLLAR_D: // $, test for End of Line, in UNIX_LINES mode.
if (fp->fInputIdx >= fAnchorLimit) {
// Off the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
} else {
UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
UChar32 c = UTEXT_NEXT32(fInputText);
// Either at the last character of input, or off the end.
if (c == 0x0a && UTEXT_GETNATIVEINDEX(fInputText) == fAnchorLimit) {
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
}
@@ -3023,8 +3023,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
{
if (fp->fInputIdx >= fAnchorLimit) {
// We really are at the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
// If we are positioned just before a new-line, succeed.
@@ -3049,8 +3049,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
{
if (fp->fInputIdx >= fAnchorLimit) {
// We really are at the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE; // Java set requireEnd in this case, even though
+ fHitEnd = true;
+ fRequireEnd = true; // Java set requireEnd in this case, even though
break; // adding a new-line would not lose the match.
}
// If we are not positioned just before a new-line, the test fails; backtrack out.
@@ -3134,7 +3134,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_BACKSLASH_D: // Test for decimal digit
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3155,7 +3155,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_BACKSLASH_G: // Test for position at end of previous match
- if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) {
+ if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==false && fp->fInputIdx==fActiveStart))) {
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
}
break;
@@ -3164,7 +3164,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_BACKSLASH_H: // Test for \h, horizontal white space.
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3185,7 +3185,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_BACKSLASH_R: // Test for \R, any line break sequence.
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3206,7 +3206,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_BACKSLASH_V: // \v, any single line ending character.
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3228,14 +3228,14 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// Fail if at end of input
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status);
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp->fInputIdx = fActiveLimit;
}
break;
@@ -3245,8 +3245,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
if (fp->fInputIdx < fAnchorLimit) {
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
} else {
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
}
break;
@@ -3260,7 +3260,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// 0: success if input char is in set.
// 1: success if input char is not in set.
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3297,7 +3297,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// Test input character for NOT being a member of one of
// the predefined sets (Word Characters, for example)
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3309,13 +3309,13 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
UChar32 c = UTEXT_NEXT32(fInputText);
if (c < 256) {
Regex8BitSet &s8 = RegexStaticSets::gStaticSets->fPropSets8[opValue];
- if (s8.contains(c) == FALSE) {
+ if (s8.contains(c) == false) {
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
break;
}
} else {
const UnicodeSet &s = RegexStaticSets::gStaticSets->fPropSets[opValue];
- if (s.contains(c) == FALSE) {
+ if (s.contains(c) == false) {
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
break;
}
@@ -3328,7 +3328,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
case URX_SETREF:
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
} else {
@@ -3363,7 +3363,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// . matches anything, but stops at end-of-line.
if (fp->fInputIdx >= fActiveLimit) {
// At end of input. Match failed. Backtrack out.
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3387,7 +3387,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// ., in dot-matches-all (including new lines) mode
if (fp->fInputIdx >= fActiveLimit) {
// At end of input. Match failed. Backtrack out.
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3417,7 +3417,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// UNIX_LINES mode, so 0x0a is the only recognized line ending.
if (fp->fInputIdx >= fActiveLimit) {
// At end of input. Match failed. Backtrack out.
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -3441,7 +3441,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
break;
case URX_FAIL:
- isMatch = FALSE;
+ isMatch = false;
goto breakFromLoop;
case URX_JMP_SAV:
@@ -3658,21 +3658,21 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// match succeeds. Verified by testing: Perl matches succeed
// in this case, so we do too.
- UBool success = TRUE;
+ UBool success = true;
for (;;) {
if (utext_getNativeIndex(fAltInputText) >= groupEndIdx) {
- success = TRUE;
+ success = true;
break;
}
if (utext_getNativeIndex(fInputText) >= fActiveLimit) {
- success = FALSE;
- fHitEnd = TRUE;
+ success = false;
+ fHitEnd = true;
break;
}
UChar32 captureGroupChar = utext_next32(fAltInputText);
UChar32 inputChar = utext_next32(fInputText);
if (inputChar != captureGroupChar) {
- success = FALSE;
+ success = false;
break;
}
}
@@ -3707,21 +3707,21 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// match succeeds. Verified by testing: Perl matches succeed
// in this case, so we do too.
- UBool success = TRUE;
+ UBool success = true;
for (;;) {
if (!captureGroupItr.inExpansion() && utext_getNativeIndex(fAltInputText) >= groupEndIdx) {
- success = TRUE;
+ success = true;
break;
}
if (!inputItr.inExpansion() && utext_getNativeIndex(fInputText) >= fActiveLimit) {
- success = FALSE;
- fHitEnd = TRUE;
+ success = false;
+ fHitEnd = true;
break;
}
UChar32 captureGroupChar = captureGroupItr.next();
UChar32 inputChar = inputItr.next();
if (inputChar != captureGroupChar) {
- success = FALSE;
+ success = false;
break;
}
}
@@ -3730,7 +3730,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// We obtained a match by consuming part of a string obtained from
// case-folding a single code point of the input text.
// This does not count as an overall match.
- success = FALSE;
+ success = false;
}
if (success) {
@@ -3823,7 +3823,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
break;
}
} else {
- fHitEnd = TRUE;
+ fHitEnd = true;
}
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
@@ -3836,7 +3836,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
// offset to the string text, and one for the length.
// The compiled string has already been case folded.
{
- const UChar *patternString = litText + opValue;
+ const char16_t *patternString = litText + opValue;
int32_t patternStringIdx = 0;
op = (int32_t)pat[fp->fPatIdx];
@@ -3849,25 +3849,25 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
UChar32 cPattern;
UChar32 cText;
- UBool success = TRUE;
+ UBool success = true;
UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
CaseFoldingUTextIterator inputIterator(*fInputText);
while (patternStringIdx < patternStringLen) {
if (!inputIterator.inExpansion() && UTEXT_GETNATIVEINDEX(fInputText) >= fActiveLimit) {
- success = FALSE;
- fHitEnd = TRUE;
+ success = false;
+ fHitEnd = true;
break;
}
U16_NEXT(patternString, patternStringIdx, patternStringLen, cPattern);
cText = inputIterator.next();
if (cText != cPattern) {
- success = FALSE;
+ success = false;
break;
}
}
if (inputIterator.inExpansion()) {
- success = FALSE;
+ success = false;
}
if (success) {
@@ -4099,16 +4099,16 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
UTEXT_SETNATIVEINDEX(fInputText, ix);
for (;;) {
if (ix >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
break;
}
UChar32 c = UTEXT_NEXT32(fInputText);
if (c<256) {
- if (s8->contains(c) == FALSE) {
+ if (s8->contains(c) == false) {
break;
}
} else {
- if (s->contains(c) == FALSE) {
+ if (s->contains(c) == false) {
break;
}
}
@@ -4152,7 +4152,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
if ((opValue & 1) == 1) {
// Dot-matches-All mode. Jump straight to the end of the string.
ix = fActiveLimit;
- fHitEnd = TRUE;
+ fHitEnd = true;
} else {
// NOT DOT ALL mode. Line endings do not match '.'
// Scan forward until a line ending or end of input.
@@ -4160,7 +4160,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
UTEXT_SETNATIVEINDEX(fInputText, ix);
for (;;) {
if (ix >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
break;
}
UChar32 c = UTEXT_NEXT32(fInputText);
@@ -4252,7 +4252,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) {
}
if (U_FAILURE(status)) {
- isMatch = FALSE;
+ isMatch = false;
break;
}
}
@@ -4295,7 +4295,7 @@ breakFromLoop:
//
//--------------------------------------------------------------------------------
void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &status) {
- UBool isMatch = FALSE; // True if the we have a match.
+ UBool isMatch = false; // True if the we have a match.
int32_t backSearchIndex = INT32_MAX; // used after greedy single-character matches for searching backwards
@@ -4319,10 +4319,10 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
//
int64_t *pat = fPattern->fCompiledPat->getBuffer();
- const UChar *litText = fPattern->fLiteralText.getBuffer();
+ const char16_t *litText = fPattern->fLiteralText.getBuffer();
UVector *fSets = fPattern->fSets;
- const UChar *inputBuf = fInputText->chunkContents;
+ const char16_t *inputBuf = fInputText->chunkContents;
fFrameSize = fPattern->fFrameSize;
REStackFrame *fp = resetStack();
@@ -4381,7 +4381,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
break;
}
} else {
- fHitEnd = TRUE;
+ fHitEnd = true;
}
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
@@ -4402,19 +4402,19 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
U_ASSERT(opType == URX_STRING_LEN);
U_ASSERT(stringLen >= 2);
- const UChar * pInp = inputBuf + fp->fInputIdx;
- const UChar * pInpLimit = inputBuf + fActiveLimit;
- const UChar * pPat = litText+stringStartIdx;
- const UChar * pEnd = pInp + stringLen;
- UBool success = TRUE;
+ const char16_t * pInp = inputBuf + fp->fInputIdx;
+ const char16_t * pInpLimit = inputBuf + fActiveLimit;
+ const char16_t * pPat = litText+stringStartIdx;
+ const char16_t * pEnd = pInp + stringLen;
+ UBool success = true;
while (pInp < pEnd) {
if (pInp >= pInpLimit) {
- fHitEnd = TRUE;
- success = FALSE;
+ fHitEnd = true;
+ success = false;
break;
}
if (*pInp++ != *pPat++) {
- success = FALSE;
+ success = false;
break;
}
}
@@ -4441,7 +4441,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
- isMatch = TRUE;
+ isMatch = true;
goto breakFromLoop;
// Start and End Capture stack frame variables are laid out out like this:
@@ -4474,8 +4474,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
}
if (fp->fInputIdx >= fAnchorLimit) {
// We really are at the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
@@ -4488,15 +4488,15 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
if (isLineTerminator(c)) {
if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) {
// At new-line at end of input. Success
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
}
} else if (fp->fInputIdx == fAnchorLimit-2 &&
inputBuf[fp->fInputIdx]==0x0d && inputBuf[fp->fInputIdx+1]==0x0a) {
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break; // At CR/LF at end of input. Success
}
@@ -4511,14 +4511,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
if (fp->fInputIdx == fAnchorLimit-1) {
// At last char of input. Success if it's a new line.
if (inputBuf[fp->fInputIdx] == 0x0a) {
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
} else {
// Off the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
}
@@ -4532,8 +4532,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
{
if (fp->fInputIdx >= fAnchorLimit) {
// We really are at the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
break;
}
// If we are positioned just before a new-line, succeed.
@@ -4557,8 +4557,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
{
if (fp->fInputIdx >= fAnchorLimit) {
// We really are at the end of input. Success.
- fHitEnd = TRUE;
- fRequireEnd = TRUE; // Java set requireEnd in this case, even though
+ fHitEnd = true;
+ fRequireEnd = true; // Java set requireEnd in this case, even though
break; // adding a new-line would not lose the match.
}
// If we are not positioned just before a new-line, the test fails; backtrack out.
@@ -4585,7 +4585,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
}
// Check whether character just before the current pos is a new-line
// unless we are at the end of input
- UChar c = inputBuf[fp->fInputIdx - 1];
+ char16_t c = inputBuf[fp->fInputIdx - 1];
if ((fp->fInputIdx < fAnchorLimit) &&
isLineTerminator(c)) {
// It's a new-line. ^ is true. Success.
@@ -4607,7 +4607,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
}
// Check whether character just before the current pos is a new-line
U_ASSERT(fp->fInputIdx <= fAnchorLimit);
- UChar c = inputBuf[fp->fInputIdx - 1];
+ char16_t c = inputBuf[fp->fInputIdx - 1];
if (c != 0x0a) {
// Not at the start of a line. Back-track out.
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
@@ -4640,7 +4640,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
case URX_BACKSLASH_D: // Test for decimal digit
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4658,7 +4658,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
case URX_BACKSLASH_G: // Test for position at end of previous match
- if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) {
+ if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==false && fp->fInputIdx==fActiveStart))) {
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
}
break;
@@ -4667,7 +4667,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
case URX_BACKSLASH_H: // Test for \h, horizontal white space.
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4686,7 +4686,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
case URX_BACKSLASH_R: // Test for \R, any line break sequence.
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4695,7 +4695,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
if (isLineTerminator(c)) {
if (c == 0x0d && fp->fInputIdx < fActiveLimit) {
// Check for CR/LF sequence. Consume both together when found.
- UChar c2;
+ char16_t c2;
U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c2);
if (c2 != 0x0a) {
U16_PREV(inputBuf, 0, fp->fInputIdx, c2);
@@ -4711,7 +4711,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
case URX_BACKSLASH_V: // Any single code point line ending.
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4731,14 +4731,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// Fail if at end of input
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status);
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp->fInputIdx = fActiveLimit;
}
break;
@@ -4748,8 +4748,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
if (fp->fInputIdx < fAnchorLimit) {
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
} else {
- fHitEnd = TRUE;
- fRequireEnd = TRUE;
+ fHitEnd = true;
+ fRequireEnd = true;
}
break;
@@ -4763,7 +4763,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// 0: success if input char is in set.
// 1: success if input char is not in set.
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4797,7 +4797,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// Test input character for NOT being a member of one of
// the predefined sets (Word Characters, for example)
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4808,12 +4808,12 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
if (c < 256) {
Regex8BitSet &s8 = RegexStaticSets::gStaticSets->fPropSets8[opValue];
- if (s8.contains(c) == FALSE) {
+ if (s8.contains(c) == false) {
break;
}
} else {
const UnicodeSet &s = RegexStaticSets::gStaticSets->fPropSets[opValue];
- if (s.contains(c) == FALSE) {
+ if (s.contains(c) == false) {
break;
}
}
@@ -4825,7 +4825,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
case URX_SETREF:
{
if (fp->fInputIdx >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4860,7 +4860,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// . matches anything, but stops at end-of-line.
if (fp->fInputIdx >= fActiveLimit) {
// At end of input. Match failed. Backtrack out.
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4882,7 +4882,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// . in dot-matches-all (including new lines) mode
if (fp->fInputIdx >= fActiveLimit) {
// At end of input. Match failed. Backtrack out.
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4907,7 +4907,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// UNIX_LINES mode, so 0x0a is the only recognized line ending.
if (fp->fInputIdx >= fActiveLimit) {
// At end of input. Match failed. Backtrack out.
- fHitEnd = TRUE;
+ fHitEnd = true;
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
}
@@ -4928,7 +4928,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
break;
case URX_FAIL:
- isMatch = FALSE;
+ isMatch = false;
goto breakFromLoop;
case URX_JMP_SAV:
@@ -5137,15 +5137,15 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match.
break;
}
- UBool success = TRUE;
+ UBool success = true;
for (int64_t groupIndex = groupStartIdx; groupIndex < groupEndIdx; ++groupIndex,++inputIndex) {
if (inputIndex >= fActiveLimit) {
- success = FALSE;
- fHitEnd = TRUE;
+ success = false;
+ fHitEnd = true;
break;
}
if (inputBuf[groupIndex] != inputBuf[inputIndex]) {
- success = FALSE;
+ success = false;
break;
}
}
@@ -5153,7 +5153,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
inputIndex < fActiveLimit && U16_IS_TRAIL(inputBuf[inputIndex])) {
// Capture group ended with an unpaired lead surrogate.
// Back reference is not permitted to match lead only of a surrogatge pair.
- success = FALSE;
+ success = false;
}
if (success) {
fp->fInputIdx = inputIndex;
@@ -5181,21 +5181,21 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// match succeeds. Verified by testing: Perl matches succeed
// in this case, so we do too.
- UBool success = TRUE;
+ UBool success = true;
for (;;) {
UChar32 captureGroupChar = captureGroupItr.next();
if (captureGroupChar == U_SENTINEL) {
- success = TRUE;
+ success = true;
break;
}
UChar32 inputChar = inputItr.next();
if (inputChar == U_SENTINEL) {
- success = FALSE;
- fHitEnd = TRUE;
+ success = false;
+ fHitEnd = true;
break;
}
if (inputChar != captureGroupChar) {
- success = FALSE;
+ success = false;
break;
}
}
@@ -5204,7 +5204,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// We obtained a match by consuming part of a string obtained from
// case-folding a single code point of the input text.
// This does not count as an overall match.
- success = FALSE;
+ success = false;
}
if (success) {
@@ -5291,7 +5291,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
break;
}
} else {
- fHitEnd = TRUE;
+ fHitEnd = true;
}
fp = (REStackFrame *)fStack->popFrame(fFrameSize);
break;
@@ -5302,7 +5302,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
// offset to the string text, and one for the length.
// The compiled string has already been case folded.
{
- const UChar *patternString = litText + opValue;
+ const char16_t *patternString = litText + opValue;
op = (int32_t)pat[fp->fPatIdx];
fp->fPatIdx++;
@@ -5313,22 +5313,22 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
UChar32 cText;
UChar32 cPattern;
- UBool success = TRUE;
+ UBool success = true;
int32_t patternStringIdx = 0;
CaseFoldingUCharIterator inputIterator(inputBuf, fp->fInputIdx, fActiveLimit);
while (patternStringIdx < patternStringLen) {
U16_NEXT(patternString, patternStringIdx, patternStringLen, cPattern);
cText = inputIterator.next();
if (cText != cPattern) {
- success = FALSE;
+ success = false;
if (cText == U_SENTINEL) {
- fHitEnd = TRUE;
+ fHitEnd = true;
}
break;
}
}
if (inputIterator.inExpansion()) {
- success = FALSE;
+ success = false;
}
if (success) {
@@ -5540,18 +5540,18 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
int32_t ix = (int32_t)fp->fInputIdx;
for (;;) {
if (ix >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
break;
}
UChar32 c;
U16_NEXT(inputBuf, ix, fActiveLimit, c);
if (c<256) {
- if (s8->contains(c) == FALSE) {
+ if (s8->contains(c) == false) {
U16_BACK_1(inputBuf, 0, ix);
break;
}
} else {
- if (s->contains(c) == FALSE) {
+ if (s->contains(c) == false) {
U16_BACK_1(inputBuf, 0, ix);
break;
}
@@ -5595,14 +5595,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
if ((opValue & 1) == 1) {
// Dot-matches-All mode. Jump straight to the end of the string.
ix = (int32_t)fActiveLimit;
- fHitEnd = TRUE;
+ fHitEnd = true;
} else {
// NOT DOT ALL mode. Line endings do not match '.'
// Scan forward until a line ending or end of input.
ix = (int32_t)fp->fInputIdx;
for (;;) {
if (ix >= fActiveLimit) {
- fHitEnd = TRUE;
+ fHitEnd = true;
break;
}
UChar32 c;
@@ -5694,7 +5694,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu
}
if (U_FAILURE(status)) {
- isMatch = FALSE;
+ isMatch = false;
break;
}
}
diff --git a/contrib/libs/icu/i18n/remtrans.cpp b/contrib/libs/icu/i18n/remtrans.cpp
index 03b878575ca..40af1845c7b 100644
--- a/contrib/libs/icu/i18n/remtrans.cpp
+++ b/contrib/libs/icu/i18n/remtrans.cpp
@@ -17,7 +17,7 @@
#include "remtrans.h"
#include "unicode/unifilt.h"
-static const UChar CURR_ID[] = {65, 110, 121, 45, 0x52, 0x65, 0x6D, 0x6F, 0x76, 0x65, 0x00}; /* "Any-Remove" */
+static const char16_t CURR_ID[] = {65, 110, 121, 45, 0x52, 0x65, 0x6D, 0x6F, 0x76, 0x65, 0x00}; /* "Any-Remove" */
U_NAMESPACE_BEGIN
@@ -37,20 +37,20 @@ static Transliterator* RemoveTransliterator_create(const UnicodeString& /*ID*/,
*/
void RemoveTransliterator::registerIDs() {
- Transliterator::_registerFactory(UnicodeString(TRUE, ::CURR_ID, -1),
+ Transliterator::_registerFactory(UnicodeString(true, ::CURR_ID, -1),
RemoveTransliterator_create, integerToken(0));
Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("Remove"),
- UNICODE_STRING_SIMPLE("Null"), FALSE);
+ UNICODE_STRING_SIMPLE("Null"), false);
}
-RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(TRUE, ::CURR_ID, -1), 0) {}
+RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(true, ::CURR_ID, -1), 0) {}
RemoveTransliterator::~RemoveTransliterator() {}
RemoveTransliterator* RemoveTransliterator::clone() const {
RemoveTransliterator* result = new RemoveTransliterator();
- if (result != NULL && getFilter() != 0) {
+ if (result != nullptr && getFilter() != 0) {
result->adoptFilter(getFilter()->clone());
}
return result;
diff --git a/contrib/libs/icu/i18n/repattrn.cpp b/contrib/libs/icu/i18n/repattrn.cpp
index 8c94948d29a..c0a88f70d92 100644
--- a/contrib/libs/icu/i18n/repattrn.cpp
+++ b/contrib/libs/icu/i18n/repattrn.cpp
@@ -77,15 +77,15 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) {
return *this;
}
- if (other.fPatternString == NULL) {
- fPatternString = NULL;
- fPattern = utext_clone(fPattern, other.fPattern, FALSE, TRUE, &fDeferredStatus);
+ if (other.fPatternString == nullptr) {
+ fPatternString = nullptr;
+ fPattern = utext_clone(fPattern, other.fPattern, false, true, &fDeferredStatus);
} else {
fPatternString = new UnicodeString(*(other.fPatternString));
- if (fPatternString == NULL) {
+ if (fPatternString == nullptr) {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
} else {
- fPattern = utext_openConstUnicodeString(NULL, fPatternString, &fDeferredStatus);
+ fPattern = utext_openConstUnicodeString(nullptr, fPatternString, &fDeferredStatus);
}
}
if (U_FAILURE(fDeferredStatus)) {
@@ -117,7 +117,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) {
int32_t i;
int32_t numSets = other.fSets->size();
fSets8 = new Regex8BitSet[numSets];
- if (fSets8 == NULL) {
+ if (fSets8 == nullptr) {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
return *this;
}
@@ -127,7 +127,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) {
}
UnicodeSet *sourceSet = (UnicodeSet *)other.fSets->elementAt(i);
UnicodeSet *newSet = new UnicodeSet(*sourceSet);
- if (newSet == NULL) {
+ if (newSet == nullptr) {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -145,7 +145,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) {
const UnicodeString *name = (const UnicodeString *)hashEl->key.pointer;
UnicodeString *key = new UnicodeString(*name);
int32_t val = hashEl->value.integer;
- if (key == NULL) {
+ if (key == nullptr) {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
} else {
uhash_puti(fNamedCaptureMap, key, val, &fDeferredStatus);
@@ -166,24 +166,24 @@ void RegexPattern::init() {
fFlags = 0;
fCompiledPat = 0;
fLiteralText.remove();
- fSets = NULL;
- fSets8 = NULL;
+ fSets = nullptr;
+ fSets8 = nullptr;
fDeferredStatus = U_ZERO_ERROR;
fMinMatchLen = 0;
fFrameSize = 0;
fDataSize = 0;
- fGroupMap = NULL;
+ fGroupMap = nullptr;
fStartType = START_NO_INFO;
fInitialStringIdx = 0;
fInitialStringLen = 0;
- fInitialChars = NULL;
+ fInitialChars = nullptr;
fInitialChar = 0;
- fInitialChars8 = NULL;
- fNeedsAltInput = FALSE;
- fNamedCaptureMap = NULL;
+ fInitialChars8 = nullptr;
+ fNeedsAltInput = false;
+ fNamedCaptureMap = nullptr;
- fPattern = NULL; // will be set later
- fPatternString = NULL; // may be set later
+ fPattern = nullptr; // will be set later
+ fPatternString = nullptr; // may be set later
fCompiledPat = new UVector64(fDeferredStatus);
fGroupMap = new UVector32(fDeferredStatus);
fSets = new UVector(fDeferredStatus);
@@ -192,8 +192,8 @@ void RegexPattern::init() {
if (U_FAILURE(fDeferredStatus)) {
return;
}
- if (fCompiledPat == NULL || fGroupMap == NULL || fSets == NULL ||
- fInitialChars == NULL || fInitialChars8 == NULL) {
+ if (fCompiledPat == nullptr || fGroupMap == nullptr || fSets == nullptr ||
+ fInitialChars == nullptr || fInitialChars8 == nullptr) {
fDeferredStatus = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -228,36 +228,36 @@ bool RegexPattern::initNamedCaptureMap() {
//--------------------------------------------------------------------------
void RegexPattern::zap() {
delete fCompiledPat;
- fCompiledPat = NULL;
+ fCompiledPat = nullptr;
int i;
for (i=1; i<fSets->size(); i++) {
UnicodeSet *s;
s = (UnicodeSet *)fSets->elementAt(i);
- if (s != NULL) {
+ if (s != nullptr) {
delete s;
}
}
delete fSets;
- fSets = NULL;
+ fSets = nullptr;
delete[] fSets8;
- fSets8 = NULL;
+ fSets8 = nullptr;
delete fGroupMap;
- fGroupMap = NULL;
+ fGroupMap = nullptr;
delete fInitialChars;
- fInitialChars = NULL;
+ fInitialChars = nullptr;
delete fInitialChars8;
- fInitialChars8 = NULL;
- if (fPattern != NULL) {
+ fInitialChars8 = nullptr;
+ if (fPattern != nullptr) {
utext_close(fPattern);
- fPattern = NULL;
+ fPattern = nullptr;
}
- if (fPatternString != NULL) {
+ if (fPatternString != nullptr) {
delete fPatternString;
- fPatternString = NULL;
+ fPatternString = nullptr;
}
- if (fNamedCaptureMap != NULL) {
+ if (fNamedCaptureMap != nullptr) {
uhash_close(fNamedCaptureMap);
- fNamedCaptureMap = NULL;
+ fNamedCaptureMap = nullptr;
}
}
@@ -293,13 +293,13 @@ RegexPattern *RegexPattern::clone() const {
//--------------------------------------------------------------------------
bool RegexPattern::operator ==(const RegexPattern &other) const {
if (this->fFlags == other.fFlags && this->fDeferredStatus == other.fDeferredStatus) {
- if (this->fPatternString != NULL && other.fPatternString != NULL) {
+ if (this->fPatternString != nullptr && other.fPatternString != nullptr) {
return *(this->fPatternString) == *(other.fPatternString);
- } else if (this->fPattern == NULL) {
- if (other.fPattern == NULL) {
+ } else if (this->fPattern == nullptr) {
+ if (other.fPattern == nullptr) {
return true;
}
- } else if (other.fPattern != NULL) {
+ } else if (other.fPattern != nullptr) {
UTEXT_SETNATIVEINDEX(this->fPattern, 0);
UTEXT_SETNATIVEINDEX(other.fPattern, 0);
return utext_equals(this->fPattern, other.fPattern);
@@ -320,7 +320,7 @@ RegexPattern::compile(const UnicodeString &regex,
UErrorCode &status)
{
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
const uint32_t allFlags = UREGEX_CANON_EQ | UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS |
@@ -329,23 +329,23 @@ RegexPattern::compile(const UnicodeString &regex,
if ((flags & ~allFlags) != 0) {
status = U_REGEX_INVALID_FLAG;
- return NULL;
+ return nullptr;
}
if ((flags & UREGEX_CANON_EQ) != 0) {
status = U_REGEX_UNIMPLEMENTED;
- return NULL;
+ return nullptr;
}
RegexPattern *This = new RegexPattern;
- if (This == NULL) {
+ if (This == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(This->fDeferredStatus)) {
status = This->fDeferredStatus;
delete This;
- return NULL;
+ return nullptr;
}
This->fFlags = flags;
@@ -354,7 +354,7 @@ RegexPattern::compile(const UnicodeString &regex,
if (U_FAILURE(status)) {
delete This;
- This = NULL;
+ This = nullptr;
}
return This;
@@ -371,7 +371,7 @@ RegexPattern::compile(UText *regex,
UErrorCode &status)
{
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
const uint32_t allFlags = UREGEX_CANON_EQ | UREGEX_CASE_INSENSITIVE | UREGEX_COMMENTS |
@@ -380,23 +380,23 @@ RegexPattern::compile(UText *regex,
if ((flags & ~allFlags) != 0) {
status = U_REGEX_INVALID_FLAG;
- return NULL;
+ return nullptr;
}
if ((flags & UREGEX_CANON_EQ) != 0) {
status = U_REGEX_UNIMPLEMENTED;
- return NULL;
+ return nullptr;
}
RegexPattern *This = new RegexPattern;
- if (This == NULL) {
+ if (This == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(This->fDeferredStatus)) {
status = This->fDeferredStatus;
delete This;
- return NULL;
+ return nullptr;
}
This->fFlags = flags;
@@ -405,7 +405,7 @@ RegexPattern::compile(UText *regex,
if (U_FAILURE(status)) {
delete This;
- This = NULL;
+ This = nullptr;
}
return This;
@@ -479,7 +479,7 @@ uint32_t RegexPattern::flags() const {
RegexMatcher *RegexPattern::matcher(const UnicodeString &input,
UErrorCode &status) const {
RegexMatcher *retMatcher = matcher(status);
- if (retMatcher != NULL) {
+ if (retMatcher != nullptr) {
retMatcher->fDeferredStatus = status;
retMatcher->reset(input);
}
@@ -493,20 +493,20 @@ RegexMatcher *RegexPattern::matcher(const UnicodeString &input,
//
//---------------------------------------------------------------------
RegexMatcher *RegexPattern::matcher(UErrorCode &status) const {
- RegexMatcher *retMatcher = NULL;
+ RegexMatcher *retMatcher = nullptr;
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (U_FAILURE(fDeferredStatus)) {
status = fDeferredStatus;
- return NULL;
+ return nullptr;
}
retMatcher = new RegexMatcher(this);
- if (retMatcher == NULL) {
+ if (retMatcher == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return retMatcher;
}
@@ -524,11 +524,11 @@ UBool U_EXPORT2 RegexPattern::matches(const UnicodeString &regex,
UParseError &pe,
UErrorCode &status) {
- if (U_FAILURE(status)) {return FALSE;}
+ if (U_FAILURE(status)) {return false;}
UBool retVal;
- RegexPattern *pat = NULL;
- RegexMatcher *matcher = NULL;
+ RegexPattern *pat = nullptr;
+ RegexMatcher *matcher = nullptr;
pat = RegexPattern::compile(regex, 0, pe, status);
matcher = pat->matcher(input, status);
@@ -548,11 +548,11 @@ UBool U_EXPORT2 RegexPattern::matches(UText *regex,
UParseError &pe,
UErrorCode &status) {
- if (U_FAILURE(status)) {return FALSE;}
+ if (U_FAILURE(status)) {return false;}
- UBool retVal = FALSE;
- RegexPattern *pat = NULL;
- RegexMatcher *matcher = NULL;
+ UBool retVal = false;
+ RegexPattern *pat = nullptr;
+ RegexMatcher *matcher = nullptr;
pat = RegexPattern::compile(regex, 0, pe, status);
matcher = pat->matcher(status);
@@ -576,18 +576,18 @@ UBool U_EXPORT2 RegexPattern::matches(UText *regex,
//
//---------------------------------------------------------------------
UnicodeString RegexPattern::pattern() const {
- if (fPatternString != NULL) {
+ if (fPatternString != nullptr) {
return *fPatternString;
- } else if (fPattern == NULL) {
+ } else if (fPattern == nullptr) {
return UnicodeString();
} else {
UErrorCode status = U_ZERO_ERROR;
int64_t nativeLen = utext_nativeLength(fPattern);
- int32_t len16 = utext_extract(fPattern, 0, nativeLen, NULL, 0, &status); // buffer overflow error
+ int32_t len16 = utext_extract(fPattern, 0, nativeLen, nullptr, 0, &status); // buffer overflow error
UnicodeString result;
status = U_ZERO_ERROR;
- UChar *resultChars = result.getBuffer(len16);
+ char16_t *resultChars = result.getBuffer(len16);
utext_extract(fPattern, 0, nativeLen, resultChars, len16, &status); // unterminated warning
result.releaseBuffer(len16);
@@ -604,10 +604,10 @@ UnicodeString RegexPattern::pattern() const {
//
//---------------------------------------------------------------------
UText *RegexPattern::patternText(UErrorCode &status) const {
- if (U_FAILURE(status)) {return NULL;}
+ if (U_FAILURE(status)) {return nullptr;}
status = U_ZERO_ERROR;
- if (fPattern != NULL) {
+ if (fPattern != nullptr) {
return fPattern;
} else {
RegexStaticSets::initGlobals(&status);
@@ -788,7 +788,7 @@ void RegexPattern::dumpOp(int32_t index) const {
{
UnicodeString s;
UnicodeSet *set = (UnicodeSet *)fSets->elementAt(val);
- set->toPattern(s, TRUE);
+ set->toPattern(s, true);
printf("%s", CStr(s)());
}
break;
@@ -802,7 +802,7 @@ void RegexPattern::dumpOp(int32_t index) const {
val &= ~URX_NEG_SET;
}
UnicodeSet &set = RegexStaticSets::gStaticSets->fPropSets[val];
- set.toPattern(s, TRUE);
+ set.toPattern(s, true);
printf("%s", CStr(s)());
}
break;
@@ -833,7 +833,7 @@ void RegexPattern::dumpPattern() const {
printf(" Initial match string: \"%s\"\n", CStr(initialString)());
} else if (fStartType == START_SET) {
UnicodeString s;
- fInitialChars->toPattern(s, TRUE);
+ fInitialChars->toPattern(s, true);
printf(" Match First Chars: %s\n", CStr(s)());
} else if (fStartType == START_CHAR) {
@@ -850,7 +850,7 @@ void RegexPattern::dumpPattern() const {
printf(" None\n");
} else {
int32_t pos = UHASH_FIRST;
- const UHashElement *el = NULL;
+ const UHashElement *el = nullptr;
while ((el = uhash_nextElement(fNamedCaptureMap, &pos))) {
const UnicodeString *name = (const UnicodeString *)el->key.pointer;
int32_t number = el->value.integer;
diff --git a/contrib/libs/icu/i18n/rulebasedcollator.cpp b/contrib/libs/icu/i18n/rulebasedcollator.cpp
index 5e5cc3db626..e9482628d9b 100644
--- a/contrib/libs/icu/i18n/rulebasedcollator.cpp
+++ b/contrib/libs/icu/i18n/rulebasedcollator.cpp
@@ -74,7 +74,7 @@ FixedSortKeyByteSink::~FixedSortKeyByteSink() {}
void
FixedSortKeyByteSink::AppendBeyondCapacity(const char *bytes, int32_t /*n*/, int32_t length) {
- // buffer_ != NULL && bytes != NULL && n > 0 && appended_ > capacity_
+ // buffer_ != nullptr && bytes != nullptr && n > 0 && appended_ > capacity_
// Fill the buffer completely.
int32_t available = capacity_ - length;
if (available > 0) {
@@ -84,7 +84,7 @@ FixedSortKeyByteSink::AppendBeyondCapacity(const char *bytes, int32_t /*n*/, int
UBool
FixedSortKeyByteSink::Resize(int32_t /*appendCapacity*/, int32_t /*length*/) {
- return FALSE;
+ return false;
}
} // namespace
@@ -108,7 +108,7 @@ CollationKeyByteSink::~CollationKeyByteSink() {}
void
CollationKeyByteSink::AppendBeyondCapacity(const char *bytes, int32_t n, int32_t length) {
- // buffer_ != NULL && bytes != NULL && n > 0 && appended_ > capacity_
+ // buffer_ != nullptr && bytes != nullptr && n > 0 && appended_ > capacity_
if (Resize(n, length)) {
uprv_memcpy(buffer_ + length, bytes, n);
}
@@ -116,8 +116,8 @@ CollationKeyByteSink::AppendBeyondCapacity(const char *bytes, int32_t n, int32_t
UBool
CollationKeyByteSink::Resize(int32_t appendCapacity, int32_t length) {
- if (buffer_ == NULL) {
- return FALSE; // allocation failed before already
+ if (buffer_ == nullptr) {
+ return false; // allocation failed before already
}
int32_t newCapacity = 2 * capacity_;
int32_t altCapacity = length + 2 * appendCapacity;
@@ -128,13 +128,13 @@ CollationKeyByteSink::Resize(int32_t appendCapacity, int32_t length) {
newCapacity = 200;
}
uint8_t *newBuffer = key_.reallocate(newCapacity, length);
- if (newBuffer == NULL) {
+ if (newBuffer == nullptr) {
SetNotOk();
- return FALSE;
+ return false;
}
buffer_ = reinterpret_cast<char *>(newBuffer);
capacity_ = newCapacity;
- return TRUE;
+ return true;
}
RuleBasedCollator::RuleBasedCollator(const RuleBasedCollator &other)
@@ -152,15 +152,15 @@ RuleBasedCollator::RuleBasedCollator(const RuleBasedCollator &other)
RuleBasedCollator::RuleBasedCollator(const uint8_t *bin, int32_t length,
const RuleBasedCollator *base, UErrorCode &errorCode)
- : data(NULL),
- settings(NULL),
- tailoring(NULL),
- cacheEntry(NULL),
+ : data(nullptr),
+ settings(nullptr),
+ tailoring(nullptr),
+ cacheEntry(nullptr),
validLocale(""),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
+ actualLocaleIsSameAsValid(false) {
if(U_FAILURE(errorCode)) { return; }
- if(bin == NULL || length == 0 || base == NULL) {
+ if(bin == nullptr || length == 0 || base == nullptr) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -188,7 +188,7 @@ RuleBasedCollator::RuleBasedCollator(const CollationCacheEntry *entry)
cacheEntry(entry),
validLocale(entry->validLocale),
explicitlySetAttributes(0),
- actualLocaleIsSameAsValid(FALSE) {
+ actualLocaleIsSameAsValid(false) {
settings->addRef();
cacheEntry->addRef();
}
@@ -204,9 +204,9 @@ RuleBasedCollator::adoptTailoring(CollationTailoring *t, UErrorCode &errorCode)
t->deleteIfZeroRefCount();
return;
}
- U_ASSERT(settings == NULL && data == NULL && tailoring == NULL && cacheEntry == NULL);
+ U_ASSERT(settings == nullptr && data == nullptr && tailoring == nullptr && cacheEntry == nullptr);
cacheEntry = new CollationCacheEntry(t->actualLocale, t);
- if(cacheEntry == NULL) {
+ if(cacheEntry == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
t->deleteIfZeroRefCount();
return;
@@ -217,7 +217,7 @@ RuleBasedCollator::adoptTailoring(CollationTailoring *t, UErrorCode &errorCode)
tailoring = t;
cacheEntry->addRef();
validLocale = t->actualLocale;
- actualLocaleIsSameAsValid = FALSE;
+ actualLocaleIsSameAsValid = false;
}
RuleBasedCollator *
@@ -246,8 +246,8 @@ RuleBasedCollator::operator==(const Collator& other) const {
const RuleBasedCollator &o = static_cast<const RuleBasedCollator &>(other);
if(*settings != *o.settings) { return false; }
if(data == o.data) { return true; }
- UBool thisIsRoot = data->base == NULL;
- UBool otherIsRoot = o.data->base == NULL;
+ UBool thisIsRoot = data->base == nullptr;
+ UBool otherIsRoot = o.data->base == nullptr;
U_ASSERT(!thisIsRoot || !otherIsRoot); // otherwise their data pointers should be ==
if(thisIsRoot != otherIsRoot) { return false; }
if((thisIsRoot || !tailoring->rules.isEmpty()) &&
@@ -274,7 +274,7 @@ RuleBasedCollator::operator==(const Collator& other) const {
int32_t
RuleBasedCollator::hashCode() const {
int32_t h = settings->hashCode();
- if(data->base == NULL) { return h; } // root collator
+ if(data->base == nullptr) { return h; } // root collator
// Do not rely on the rule string, see comments in operator==().
UErrorCode errorCode = U_ZERO_ERROR;
LocalPointer<UnicodeSet> set(getTailoredSet(errorCode));
@@ -290,10 +290,10 @@ void
RuleBasedCollator::setLocales(const Locale &requested, const Locale &valid,
const Locale &actual) {
if(actual == tailoring->actualLocale) {
- actualLocaleIsSameAsValid = FALSE;
+ actualLocaleIsSameAsValid = false;
} else {
U_ASSERT(actual == valid);
- actualLocaleIsSameAsValid = TRUE;
+ actualLocaleIsSameAsValid = true;
}
// Do not modify tailoring.actualLocale:
// We cannot be sure that that would be thread-safe.
@@ -321,7 +321,7 @@ RuleBasedCollator::getLocale(ULocDataLocaleType type, UErrorCode& errorCode) con
const char *
RuleBasedCollator::internalGetLocaleID(ULocDataLocaleType type, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
const Locale *result;
switch(type) {
@@ -334,9 +334,9 @@ RuleBasedCollator::internalGetLocaleID(ULocDataLocaleType type, UErrorCode &erro
case ULOC_REQUESTED_LOCALE:
default:
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if(result->isBogus()) { return NULL; }
+ if(result->isBogus()) { return nullptr; }
const char *id = result->getName();
return id[0] == 0 ? "root" : id;
}
@@ -366,17 +366,17 @@ RuleBasedCollator::getVersion(UVersionInfo version) const {
UnicodeSet *
RuleBasedCollator::getTailoredSet(UErrorCode &errorCode) const {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
UnicodeSet *tailored = new UnicodeSet();
- if(tailored == NULL) {
+ if(tailored == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- if(data->base != NULL) {
+ if(data->base != nullptr) {
TailoredSet(tailored).forData(data, errorCode);
if(U_FAILURE(errorCode)) {
delete tailored;
- return NULL;
+ return nullptr;
}
}
return tailored;
@@ -387,19 +387,19 @@ RuleBasedCollator::internalGetContractionsAndExpansions(
UnicodeSet *contractions, UnicodeSet *expansions,
UBool addPrefixes, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return; }
- if(contractions != NULL) {
+ if(contractions != nullptr) {
contractions->clear();
}
- if(expansions != NULL) {
+ if(expansions != nullptr) {
expansions->clear();
}
- ContractionsAndExpansions(contractions, expansions, NULL, addPrefixes).forData(data, errorCode);
+ ContractionsAndExpansions(contractions, expansions, nullptr, addPrefixes).forData(data, errorCode);
}
void
RuleBasedCollator::internalAddContractions(UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return; }
- ContractionsAndExpansions(&set, NULL, NULL, FALSE).forCodePoint(data, c, errorCode);
+ ContractionsAndExpansions(&set, nullptr, nullptr, false).forCodePoint(data, c, errorCode);
}
const CollationSettings &
@@ -457,7 +457,7 @@ RuleBasedCollator::setAttribute(UColAttribute attr, UColAttributeValue value,
}
}
CollationSettings *ownedSettings = SharedObject::copyOnWrite(settings);
- if(ownedSettings == NULL) {
+ if(ownedSettings == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -532,13 +532,14 @@ RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode)
}
}
CollationSettings *ownedSettings = SharedObject::copyOnWrite(settings);
- if(ownedSettings == NULL) {
+ if(ownedSettings == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return *this;
}
if(group == UCOL_REORDER_CODE_DEFAULT) {
- group = (UColReorderCode)(UCOL_REORDER_CODE_FIRST + defaultSettings.getMaxVariable());
+ group = (UColReorderCode)(
+ UCOL_REORDER_CODE_FIRST + int32_t{defaultSettings.getMaxVariable()});
}
uint32_t varTop = data->getLastPrimaryForGroup(group);
U_ASSERT(varTop != 0);
@@ -556,7 +557,7 @@ RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode)
UColReorderCode
RuleBasedCollator::getMaxVariable() const {
- return (UColReorderCode)(UCOL_REORDER_CODE_FIRST + settings->getMaxVariable());
+ return (UColReorderCode)(UCOL_REORDER_CODE_FIRST + int32_t{settings->getMaxVariable()});
}
uint32_t
@@ -565,9 +566,9 @@ RuleBasedCollator::getVariableTop(UErrorCode & /*errorCode*/) const {
}
uint32_t
-RuleBasedCollator::setVariableTop(const UChar *varTop, int32_t len, UErrorCode &errorCode) {
+RuleBasedCollator::setVariableTop(const char16_t *varTop, int32_t len, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return 0; }
- if(varTop == NULL && len !=0) {
+ if(varTop == nullptr && len !=0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -616,7 +617,7 @@ RuleBasedCollator::setVariableTop(uint32_t varTop, UErrorCode &errorCode) {
varTop = v;
if(varTop != settings->variableTop) {
CollationSettings *ownedSettings = SharedObject::copyOnWrite(settings);
- if(ownedSettings == NULL) {
+ if(ownedSettings == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -638,7 +639,7 @@ int32_t
RuleBasedCollator::getReorderCodes(int32_t *dest, int32_t capacity,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return 0; }
- if(capacity < 0 || (dest == NULL && capacity > 0)) {
+ if(capacity < 0 || (dest == nullptr && capacity > 0)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -656,7 +657,7 @@ void
RuleBasedCollator::setReorderCodes(const int32_t *reorderCodes, int32_t length,
UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- if(length < 0 || (reorderCodes == NULL && length > 0)) {
+ if(length < 0 || (reorderCodes == nullptr && length > 0)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -671,7 +672,7 @@ RuleBasedCollator::setReorderCodes(const int32_t *reorderCodes, int32_t length,
if(length == 1 && reorderCodes[0] == UCOL_REORDER_CODE_DEFAULT) {
if(settings != &defaultSettings) {
CollationSettings *ownedSettings = SharedObject::copyOnWrite(settings);
- if(ownedSettings == NULL) {
+ if(ownedSettings == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -681,7 +682,7 @@ RuleBasedCollator::setReorderCodes(const int32_t *reorderCodes, int32_t length,
return;
}
CollationSettings *ownedSettings = SharedObject::copyOnWrite(settings);
- if(ownedSettings == NULL) {
+ if(ownedSettings == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -721,11 +722,11 @@ RuleBasedCollator::compare(const UnicodeString &left, const UnicodeString &right
}
UCollationResult
-RuleBasedCollator::compare(const UChar *left, int32_t leftLength,
- const UChar *right, int32_t rightLength,
+RuleBasedCollator::compare(const char16_t *left, int32_t leftLength,
+ const char16_t *right, int32_t rightLength,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
- if((left == NULL && leftLength != 0) || (right == NULL && rightLength != 0)) {
+ if((left == nullptr && leftLength != 0) || (right == nullptr && rightLength != 0)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return UCOL_EQUAL;
}
@@ -745,7 +746,7 @@ RuleBasedCollator::compareUTF8(const StringPiece &left, const StringPiece &right
if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
const uint8_t *leftBytes = reinterpret_cast<const uint8_t *>(left.data());
const uint8_t *rightBytes = reinterpret_cast<const uint8_t *>(right.data());
- if((leftBytes == NULL && !left.empty()) || (rightBytes == NULL && !right.empty())) {
+ if((leftBytes == nullptr && !left.empty()) || (rightBytes == nullptr && !right.empty())) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return UCOL_EQUAL;
}
@@ -757,7 +758,7 @@ RuleBasedCollator::internalCompareUTF8(const char *left, int32_t leftLength,
const char *right, int32_t rightLength,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
- if((left == NULL && leftLength != 0) || (right == NULL && rightLength != 0)) {
+ if((left == nullptr && leftLength != 0) || (right == nullptr && rightLength != 0)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return UCOL_EQUAL;
}
@@ -808,7 +809,7 @@ public:
UChar32 nextDecomposedCodePoint(const Normalizer2Impl &nfcImpl, UChar32 c) {
if(index >= 0) { return c; }
decomp = nfcImpl.getDecomposition(c, buffer, length);
- if(decomp == NULL) { return c; }
+ if(decomp == nullptr) { return c; }
index = 0;
U16_NEXT_UNSAFE(decomp, index, c);
return c;
@@ -820,24 +821,24 @@ protected:
*/
virtual UChar32 nextRawCodePoint() = 0;
private:
- const UChar *decomp;
- UChar buffer[4];
+ const char16_t *decomp;
+ char16_t buffer[4];
int32_t index;
int32_t length;
};
class UTF16NFDIterator : public NFDIterator {
public:
- UTF16NFDIterator(const UChar *text, const UChar *textLimit) : s(text), limit(textLimit) {}
+ UTF16NFDIterator(const char16_t *text, const char16_t *textLimit) : s(text), limit(textLimit) {}
protected:
virtual UChar32 nextRawCodePoint() override {
if(s == limit) { return U_SENTINEL; }
UChar32 c = *s++;
- if(limit == NULL && c == 0) {
- s = NULL;
+ if(limit == nullptr && c == 0) {
+ s = nullptr;
return U_SENTINEL;
}
- UChar trail;
+ char16_t trail;
if(U16_IS_LEAD(c) && s != limit && U16_IS_TRAIL(trail = *s)) {
++s;
c = U16_GET_SUPPLEMENTARY(c, trail);
@@ -845,18 +846,18 @@ protected:
return c;
}
- const UChar *s;
- const UChar *limit;
+ const char16_t *s;
+ const char16_t *limit;
};
class FCDUTF16NFDIterator : public UTF16NFDIterator {
public:
- FCDUTF16NFDIterator(const Normalizer2Impl &nfcImpl, const UChar *text, const UChar *textLimit)
- : UTF16NFDIterator(NULL, NULL) {
+ FCDUTF16NFDIterator(const Normalizer2Impl &nfcImpl, const char16_t *text, const char16_t *textLimit)
+ : UTF16NFDIterator(nullptr, nullptr) {
UErrorCode errorCode = U_ZERO_ERROR;
- const UChar *spanLimit = nfcImpl.makeFCD(text, textLimit, NULL, errorCode);
+ const char16_t *spanLimit = nfcImpl.makeFCD(text, textLimit, nullptr, errorCode);
if(U_FAILURE(errorCode)) { return; }
- if(spanLimit == textLimit || (textLimit == NULL && *spanLimit == 0)) {
+ if(spanLimit == textLimit || (textLimit == nullptr && *spanLimit == 0)) {
s = text;
limit = spanLimit;
} else {
@@ -897,7 +898,7 @@ protected:
class FCDUTF8NFDIterator : public NFDIterator {
public:
FCDUTF8NFDIterator(const CollationData *data, const uint8_t *text, int32_t textLength)
- : u8ci(data, FALSE, text, 0, textLength) {}
+ : u8ci(data, false, text, 0, textLength) {}
protected:
virtual UChar32 nextRawCodePoint() override {
UErrorCode errorCode = U_ZERO_ERROR;
@@ -921,7 +922,7 @@ private:
class FCDUIterNFDIterator : public NFDIterator {
public:
FCDUIterNFDIterator(const CollationData *data, UCharIterator &it, int32_t startIndex)
- : uici(data, FALSE, it, startIndex) {}
+ : uici(data, false, it, startIndex) {}
protected:
virtual UChar32 nextRawCodePoint() override {
UErrorCode errorCode = U_ZERO_ERROR;
@@ -965,8 +966,8 @@ UCollationResult compareNFDIter(const Normalizer2Impl &nfcImpl,
} // namespace
UCollationResult
-RuleBasedCollator::doCompare(const UChar *left, int32_t leftLength,
- const UChar *right, int32_t rightLength,
+RuleBasedCollator::doCompare(const char16_t *left, int32_t leftLength,
+ const char16_t *right, int32_t rightLength,
UErrorCode &errorCode) const {
// U_FAILURE(errorCode) checked by caller.
if(left == right && leftLength == rightLength) {
@@ -974,13 +975,13 @@ RuleBasedCollator::doCompare(const UChar *left, int32_t leftLength,
}
// Identical-prefix test.
- const UChar *leftLimit;
- const UChar *rightLimit;
+ const char16_t *leftLimit;
+ const char16_t *rightLimit;
int32_t equalPrefixLength = 0;
if(leftLength < 0) {
- leftLimit = NULL;
- rightLimit = NULL;
- UChar c;
+ leftLimit = nullptr;
+ rightLimit = nullptr;
+ char16_t c;
while((c = left[equalPrefixLength]) == right[equalPrefixLength]) {
if(c == 0) { return UCOL_EQUAL; }
++equalPrefixLength;
@@ -1121,7 +1122,7 @@ RuleBasedCollator::doCompare(const uint8_t *left, int32_t leftLength,
UBool numeric = settings->isNumeric();
if(equalPrefixLength > 0) {
- UBool unsafe = FALSE;
+ UBool unsafe = false;
if(equalPrefixLength != leftLength) {
int32_t i = equalPrefixLength;
UChar32 c;
@@ -1282,12 +1283,12 @@ RuleBasedCollator::getCollationKey(const UnicodeString &s, CollationKey &key,
}
CollationKey &
-RuleBasedCollator::getCollationKey(const UChar *s, int32_t length, CollationKey& key,
+RuleBasedCollator::getCollationKey(const char16_t *s, int32_t length, CollationKey& key,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) {
return key.setToBogus();
}
- if(s == NULL && length != 0) {
+ if(s == nullptr && length != 0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return key.setToBogus();
}
@@ -1311,13 +1312,13 @@ RuleBasedCollator::getSortKey(const UnicodeString &s,
}
int32_t
-RuleBasedCollator::getSortKey(const UChar *s, int32_t length,
+RuleBasedCollator::getSortKey(const char16_t *s, int32_t length,
uint8_t *dest, int32_t capacity) const {
- if((s == NULL && length != 0) || capacity < 0 || (dest == NULL && capacity > 0)) {
+ if((s == nullptr && length != 0) || capacity < 0 || (dest == nullptr && capacity > 0)) {
return 0;
}
uint8_t noDest[1] = { 0 };
- if(dest == NULL) {
+ if(dest == nullptr) {
// Distinguish pure preflighting from an allocation error.
dest = noDest;
capacity = 0;
@@ -1329,22 +1330,22 @@ RuleBasedCollator::getSortKey(const UChar *s, int32_t length,
}
void
-RuleBasedCollator::writeSortKey(const UChar *s, int32_t length,
+RuleBasedCollator::writeSortKey(const char16_t *s, int32_t length,
SortKeyByteSink &sink, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return; }
- const UChar *limit = (length >= 0) ? s + length : NULL;
+ const char16_t *limit = (length >= 0) ? s + length : nullptr;
UBool numeric = settings->isNumeric();
CollationKeys::LevelCallback callback;
if(settings->dontCheckFCD()) {
UTF16CollationIterator iter(data, numeric, s, s, limit);
CollationKeys::writeSortKeyUpToQuaternary(iter, data->compressibleBytes, *settings,
sink, Collation::PRIMARY_LEVEL,
- callback, TRUE, errorCode);
+ callback, true, errorCode);
} else {
FCDUTF16CollationIterator iter(data, numeric, s, s, limit);
CollationKeys::writeSortKeyUpToQuaternary(iter, data->compressibleBytes, *settings,
sink, Collation::PRIMARY_LEVEL,
- callback, TRUE, errorCode);
+ callback, true, errorCode);
}
if(settings->getStrength() == UCOL_IDENTICAL) {
writeIdenticalLevel(s, limit, sink, errorCode);
@@ -1354,10 +1355,10 @@ RuleBasedCollator::writeSortKey(const UChar *s, int32_t length,
}
void
-RuleBasedCollator::writeIdenticalLevel(const UChar *s, const UChar *limit,
+RuleBasedCollator::writeIdenticalLevel(const char16_t *s, const char16_t *limit,
SortKeyByteSink &sink, UErrorCode &errorCode) const {
// NFD quick check
- const UChar *nfdQCYesLimit = data->nfcImpl.decompose(s, limit, NULL, errorCode);
+ const char16_t *nfdQCYesLimit = data->nfcImpl.decompose(s, limit, nullptr, errorCode);
if(U_FAILURE(errorCode)) { return; }
sink.Append(Collation::LEVEL_SEPARATOR_BYTE);
UChar32 prev = 0;
@@ -1366,7 +1367,7 @@ RuleBasedCollator::writeIdenticalLevel(const UChar *s, const UChar *limit,
}
// Is there non-NFD text?
int32_t destLengthEstimate;
- if(limit != NULL) {
+ if(limit != nullptr) {
if(nfdQCYesLimit == limit) { return; }
destLengthEstimate = (int32_t)(limit - nfdQCYesLimit);
} else {
@@ -1403,9 +1404,9 @@ public:
// Remember a level that will be at least partially written.
level = l;
levelCapacity = sink.GetRemainingCapacity();
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
Collation::Level getLevel() const { return level; }
@@ -1423,7 +1424,7 @@ int32_t
RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2],
uint8_t *dest, int32_t count, UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return 0; }
- if(iter == NULL || state == NULL || count < 0 || (count > 0 && dest == NULL)) {
+ if(iter == nullptr || state == nullptr || count < 0 || (count > 0 && dest == nullptr)) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1440,11 +1441,11 @@ RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2
if(settings->dontCheckFCD()) {
UIterCollationIterator ci(data, numeric, *iter);
CollationKeys::writeSortKeyUpToQuaternary(ci, data->compressibleBytes, *settings,
- sink, level, callback, FALSE, errorCode);
+ sink, level, callback, false, errorCode);
} else {
FCDUIterCollationIterator ci(data, numeric, *iter, 0);
CollationKeys::writeSortKeyUpToQuaternary(ci, data->compressibleBytes, *settings,
- sink, level, callback, FALSE, errorCode);
+ sink, level, callback, false, errorCode);
}
if(U_FAILURE(errorCode)) { return 0; }
if(sink.NumberOfBytesAppended() > count) {
@@ -1466,9 +1467,9 @@ RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2
for(;;) {
UChar32 c = iter->next(iter);
if(c < 0) { break; }
- s.append((UChar)c);
+ s.append((char16_t)c);
}
- const UChar *sArray = s.getBuffer();
+ const char16_t *sArray = s.getBuffer();
writeIdenticalLevel(sArray, sArray + s.length(), sink, errorCode);
if(U_FAILURE(errorCode)) { return 0; }
if(sink.NumberOfBytesAppended() > count) {
@@ -1491,8 +1492,8 @@ void
RuleBasedCollator::internalGetCEs(const UnicodeString &str, UVector64 &ces,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return; }
- const UChar *s = str.getBuffer();
- const UChar *limit = s + str.length();
+ const char16_t *s = str.getBuffer();
+ const char16_t *limit = s + str.length();
UBool numeric = settings->isNumeric();
if(settings->dontCheckFCD()) {
UTF16CollationIterator iter(data, numeric, s, s, limit);
@@ -1541,18 +1542,18 @@ RuleBasedCollator::internalGetShortDefinitionString(const char *locale,
char *buffer, int32_t capacity,
UErrorCode &errorCode) const {
if(U_FAILURE(errorCode)) { return 0; }
- if(buffer == NULL ? capacity != 0 : capacity < 0) {
+ if(buffer == nullptr ? capacity != 0 : capacity < 0) {
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- if(locale == NULL) {
+ if(locale == nullptr) {
locale = internalGetLocaleID(ULOC_VALID_LOCALE, errorCode);
}
char resultLocale[ULOC_FULLNAME_CAPACITY + 1];
int32_t length = ucol_getFunctionalEquivalent(resultLocale, ULOC_FULLNAME_CAPACITY,
"collation", locale,
- NULL, &errorCode);
+ nullptr, &errorCode);
if(U_FAILURE(errorCode)) { return 0; }
resultLocale[length] = 0;
@@ -1622,11 +1623,11 @@ RuleBasedCollator::initMaxExpansions(UErrorCode &errorCode) const {
CollationElementIterator *
RuleBasedCollator::createCollationElementIterator(const UnicodeString& source) const {
UErrorCode errorCode = U_ZERO_ERROR;
- if(!initMaxExpansions(errorCode)) { return NULL; }
+ if(!initMaxExpansions(errorCode)) { return nullptr; }
CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode);
if(U_FAILURE(errorCode)) {
delete cei;
- return NULL;
+ return nullptr;
}
return cei;
}
@@ -1634,11 +1635,11 @@ RuleBasedCollator::createCollationElementIterator(const UnicodeString& source) c
CollationElementIterator *
RuleBasedCollator::createCollationElementIterator(const CharacterIterator& source) const {
UErrorCode errorCode = U_ZERO_ERROR;
- if(!initMaxExpansions(errorCode)) { return NULL; }
+ if(!initMaxExpansions(errorCode)) { return nullptr; }
CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode);
if(U_FAILURE(errorCode)) {
delete cei;
- return NULL;
+ return nullptr;
}
return cei;
}
diff --git a/contrib/libs/icu/i18n/scientificnumberformatter.cpp b/contrib/libs/icu/i18n/scientificnumberformatter.cpp
index 6c2cb3aeed2..8f9c19c384d 100644
--- a/contrib/libs/icu/i18n/scientificnumberformatter.cpp
+++ b/contrib/libs/icu/i18n/scientificnumberformatter.cpp
@@ -20,7 +20,7 @@
U_NAMESPACE_BEGIN
-static const UChar kSuperscriptDigits[] = {
+static const char16_t kSuperscriptDigits[] = {
0x2070,
0xB9,
0xB2,
@@ -32,8 +32,8 @@ static const UChar kSuperscriptDigits[] = {
0x2078,
0x2079};
-static const UChar kSuperscriptPlusSign = 0x207A;
-static const UChar kSuperscriptMinusSign = 0x207B;
+static const char16_t kSuperscriptPlusSign = 0x207A;
+static const char16_t kSuperscriptMinusSign = 0x207B;
static UBool copyAsSuperscript(
const UnicodeString &s,
@@ -42,19 +42,19 @@ static UBool copyAsSuperscript(
UnicodeString &result,
UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
for (int32_t i = beginIndex; i < endIndex;) {
UChar32 c = s.char32At(i);
int32_t digit = u_charDigitValue(c);
if (digit < 0) {
status = U_INVALID_CHAR_FOUND;
- return FALSE;
+ return false;
}
result.append(kSuperscriptDigits[digit]);
i += U16_LENGTH(c);
}
- return TRUE;
+ return true;
}
ScientificNumberFormatter *ScientificNumberFormatter::createSuperscriptInstance(
@@ -101,22 +101,22 @@ ScientificNumberFormatter *ScientificNumberFormatter::createInstance(
LocalPointer<DecimalFormat> fmt(fmtToAdopt);
LocalPointer<Style> style(styleToAdopt);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
ScientificNumberFormatter *result =
new ScientificNumberFormatter(
fmt.getAlias(),
style.getAlias(),
status);
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
fmt.orphan();
style.orphan();
if (U_FAILURE(status)) {
delete result;
- return NULL;
+ return nullptr;
}
return result;
}
@@ -246,12 +246,12 @@ ScientificNumberFormatter::ScientificNumberFormatter(
if (U_FAILURE(status)) {
return;
}
- if (fDecimalFormat == NULL || fStyle == NULL) {
+ if (fDecimalFormat == nullptr || fStyle == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
const DecimalFormatSymbols *sym = fDecimalFormat->getDecimalFormatSymbols();
- if (sym == NULL) {
+ if (sym == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -262,8 +262,8 @@ ScientificNumberFormatter::ScientificNumberFormatter(
const ScientificNumberFormatter &other)
: UObject(other),
fPreExponent(other.fPreExponent),
- fDecimalFormat(NULL),
- fStyle(NULL) {
+ fDecimalFormat(nullptr),
+ fStyle(nullptr) {
fDecimalFormat = static_cast<DecimalFormat *>(
other.fDecimalFormat->clone());
fStyle = other.fStyle->clone();
diff --git a/contrib/libs/icu/i18n/scriptset.cpp b/contrib/libs/icu/i18n/scriptset.cpp
index 6a1db8c01c3..736a85cf8c1 100644
--- a/contrib/libs/icu/i18n/scriptset.cpp
+++ b/contrib/libs/icu/i18n/scriptset.cpp
@@ -55,11 +55,11 @@ bool ScriptSet::operator == (const ScriptSet &other) const {
UBool ScriptSet::test(UScriptCode script, UErrorCode &status) const {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
uint32_t index = script / 32;
uint32_t bit = 1 << (script & 31);
@@ -188,19 +188,19 @@ int32_t ScriptSet::nextSetBit(int32_t fromIndex) const {
UBool ScriptSet::isEmpty() const {
for (uint32_t i=0; i<UPRV_LENGTHOF(bits); i++) {
if (bits[i] != 0) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
UnicodeString &ScriptSet::displayScripts(UnicodeString &dest) const {
- UBool firstTime = TRUE;
+ UBool firstTime = true;
for (int32_t i = nextSetBit(0); i >= 0; i = nextSetBit(i + 1)) {
if (!firstTime) {
- dest.append((UChar)0x20);
+ dest.append((char16_t)0x20);
}
- firstTime = FALSE;
+ firstTime = false;
const char *scriptName = uscript_getShortName((UScriptCode(i)));
dest.append(UnicodeString(scriptName, -1, US_INV));
}
@@ -248,12 +248,12 @@ void ScriptSet::setScriptExtensions(UChar32 codePoint, UErrorCode& status) {
UErrorCode internalStatus = U_ZERO_ERROR;
int32_t script_count = -1;
- while (TRUE) {
+ while (true) {
script_count = uscript_getScriptExtensions(
codePoint, scripts.getAlias(), scripts.getCapacity(), &internalStatus);
if (internalStatus == U_BUFFER_OVERFLOW_ERROR) {
// Need to allocate more space
- if (scripts.resize(script_count) == NULL) {
+ if (scripts.resize(script_count) == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
diff --git a/contrib/libs/icu/i18n/scriptset.h b/contrib/libs/icu/i18n/scriptset.h
index 51980ab7b3e..df5cfdc7486 100644
--- a/contrib/libs/icu/i18n/scriptset.h
+++ b/contrib/libs/icu/i18n/scriptset.h
@@ -83,4 +83,7 @@ uhash_hashScriptSet(const UElement key);
U_CAPI void U_EXPORT2
uhash_deleteScriptSet(void *obj);
-#endif // __SCRIPTSET_H__
+U_CAPI UBool U_EXPORT2
+uhash_equalsScriptSet(const UElement key1, const UElement key2);
+
+#endif // __SCRIPTSET_H_
diff --git a/contrib/libs/icu/i18n/search.cpp b/contrib/libs/icu/i18n/search.cpp
index 9e559bcc71f..ec5028ca81b 100644
--- a/contrib/libs/icu/i18n/search.cpp
+++ b/contrib/libs/icu/i18n/search.cpp
@@ -40,7 +40,7 @@ SearchIterator::SearchIterator(const SearchIterator &other)
SearchIterator::~SearchIterator()
{
- if (m_search_ != NULL) {
+ if (m_search_ != nullptr) {
uprv_free(m_search_);
}
}
@@ -55,10 +55,10 @@ void SearchIterator::setAttribute(USearchAttribute attribute,
switch (attribute)
{
case USEARCH_OVERLAP :
- m_search_->isOverlap = (value == USEARCH_ON ? TRUE : FALSE);
+ m_search_->isOverlap = (value == USEARCH_ON ? true : false);
break;
case USEARCH_CANONICAL_MATCH :
- m_search_->isCanonicalMatch = (value == USEARCH_ON ? TRUE : FALSE);
+ m_search_->isCanonicalMatch = (value == USEARCH_ON ? true : false);
break;
case USEARCH_ELEMENT_COMPARISON :
if (value == USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD || value == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD) {
@@ -81,10 +81,9 @@ USearchAttributeValue SearchIterator::getAttribute(
{
switch (attribute) {
case USEARCH_OVERLAP :
- return (m_search_->isOverlap == TRUE ? USEARCH_ON : USEARCH_OFF);
+ return (m_search_->isOverlap ? USEARCH_ON : USEARCH_OFF);
case USEARCH_CANONICAL_MATCH :
- return (m_search_->isCanonicalMatch == TRUE ? USEARCH_ON :
- USEARCH_OFF);
+ return (m_search_->isCanonicalMatch ? USEARCH_ON : USEARCH_OFF);
case USEARCH_ELEMENT_COMPARISON :
{
int16_t value = m_search_->elementComparisonType;
@@ -126,7 +125,7 @@ void SearchIterator::setBreakIterator(BreakIterator *breakiter,
{
if (U_SUCCESS(status)) {
#if 0
- m_search_->breakIter = NULL;
+ m_search_->breakIter = nullptr;
// the c++ breakiterator may not make use of ubreakiterator.
// so we'll have to keep track of it ourselves.
#else
@@ -144,7 +143,7 @@ void SearchIterator::setBreakIterator(BreakIterator *breakiter,
}
}
-const BreakIterator * SearchIterator::getBreakIterator(void) const
+const BreakIterator * SearchIterator::getBreakIterator() const
{
return m_breakiterator_;
}
@@ -171,7 +170,7 @@ void SearchIterator::setText(CharacterIterator &text, UErrorCode &status)
}
}
-const UnicodeString & SearchIterator::getText(void) const
+const UnicodeString & SearchIterator::getText() const
{
return m_text_;
}
@@ -191,8 +190,9 @@ bool SearchIterator::operator==(const SearchIterator &that) const
m_search_->matchedLength == that.m_search_->matchedLength &&
m_search_->textLength == that.m_search_->textLength &&
getOffset() == that.getOffset() &&
+ (m_search_->textLength == 0 ||
(uprv_memcmp(m_search_->text, that.m_search_->text,
- m_search_->textLength * sizeof(UChar)) == 0));
+ m_search_->textLength * sizeof(char16_t)) == 0)));
}
// public methods ----------------------------------------------------
@@ -241,8 +241,8 @@ int32_t SearchIterator::next(UErrorCode &status)
int32_t offset = getOffset();
int32_t matchindex = m_search_->matchedIndex;
int32_t matchlength = m_search_->matchedLength;
- m_search_->reset = FALSE;
- if (m_search_->isForwardSearching == TRUE) {
+ m_search_->reset = false;
+ if (m_search_->isForwardSearching) {
int32_t textlength = m_search_->textLength;
if (offset == textlength || matchindex == textlength ||
(matchindex != USEARCH_DONE &&
@@ -258,7 +258,7 @@ int32_t SearchIterator::next(UErrorCode &status)
// setOffset has been called or that previous ran off the text
// string. the iterator would have been set to offset 0 if a
// match is not found.
- m_search_->isForwardSearching = TRUE;
+ m_search_->isForwardSearching = true;
if (m_search_->matchedIndex != USEARCH_DONE) {
// there's no need to set the collation element iterator
// the next call to next will set the offset.
@@ -286,8 +286,8 @@ int32_t SearchIterator::previous(UErrorCode &status)
int32_t offset;
if (m_search_->reset) {
offset = m_search_->textLength;
- m_search_->isForwardSearching = FALSE;
- m_search_->reset = FALSE;
+ m_search_->isForwardSearching = false;
+ m_search_->reset = false;
setOffset(offset, status);
}
else {
@@ -295,13 +295,13 @@ int32_t SearchIterator::previous(UErrorCode &status)
}
int32_t matchindex = m_search_->matchedIndex;
- if (m_search_->isForwardSearching == TRUE) {
+ if (m_search_->isForwardSearching) {
// switching direction.
// if matchedIndex == USEARCH_DONE, it means that either a
// setOffset has been called or that next ran off the text
// string. the iterator would have been set to offset textLength if
// a match is not found.
- m_search_->isForwardSearching = FALSE;
+ m_search_->isForwardSearching = false;
if (matchindex != USEARCH_DONE) {
return matchindex;
}
@@ -333,11 +333,11 @@ void SearchIterator::reset()
UErrorCode status = U_ZERO_ERROR;
setMatchNotFound();
setOffset(0, status);
- m_search_->isOverlap = FALSE;
- m_search_->isCanonicalMatch = FALSE;
+ m_search_->isOverlap = false;
+ m_search_->isCanonicalMatch = false;
m_search_->elementComparisonType = 0;
- m_search_->isForwardSearching = TRUE;
- m_search_->reset = TRUE;
+ m_search_->isForwardSearching = true;
+ m_search_->reset = true;
}
// protected constructors and destructors -----------------------------
@@ -345,17 +345,17 @@ void SearchIterator::reset()
SearchIterator::SearchIterator()
{
m_search_ = (USearch *)uprv_malloc(sizeof(USearch));
- m_search_->breakIter = NULL;
- m_search_->isOverlap = FALSE;
- m_search_->isCanonicalMatch = FALSE;
+ m_search_->breakIter = nullptr;
+ m_search_->isOverlap = false;
+ m_search_->isCanonicalMatch = false;
m_search_->elementComparisonType = 0;
- m_search_->isForwardSearching = TRUE;
- m_search_->reset = TRUE;
+ m_search_->isForwardSearching = true;
+ m_search_->reset = true;
m_search_->matchedIndex = USEARCH_DONE;
m_search_->matchedLength = 0;
- m_search_->text = NULL;
+ m_search_->text = nullptr;
m_search_->textLength = 0;
- m_breakiterator_ = NULL;
+ m_breakiterator_ = nullptr;
}
SearchIterator::SearchIterator(const UnicodeString &text,
@@ -364,12 +364,12 @@ SearchIterator::SearchIterator(const UnicodeString &text,
m_text_(text)
{
m_search_ = (USearch *)uprv_malloc(sizeof(USearch));
- m_search_->breakIter = NULL;
- m_search_->isOverlap = FALSE;
- m_search_->isCanonicalMatch = FALSE;
+ m_search_->breakIter = nullptr;
+ m_search_->isOverlap = false;
+ m_search_->isCanonicalMatch = false;
m_search_->elementComparisonType = 0;
- m_search_->isForwardSearching = TRUE;
- m_search_->reset = TRUE;
+ m_search_->isForwardSearching = true;
+ m_search_->reset = true;
m_search_->matchedIndex = USEARCH_DONE;
m_search_->matchedLength = 0;
m_search_->text = m_text_.getBuffer();
@@ -381,12 +381,12 @@ SearchIterator::SearchIterator(CharacterIterator &text,
m_breakiterator_(breakiter)
{
m_search_ = (USearch *)uprv_malloc(sizeof(USearch));
- m_search_->breakIter = NULL;
- m_search_->isOverlap = FALSE;
- m_search_->isCanonicalMatch = FALSE;
+ m_search_->breakIter = nullptr;
+ m_search_->isOverlap = false;
+ m_search_->isCanonicalMatch = false;
m_search_->elementComparisonType = 0;
- m_search_->isForwardSearching = TRUE;
- m_search_->reset = TRUE;
+ m_search_->isForwardSearching = true;
+ m_search_->reset = true;
m_search_->matchedIndex = USEARCH_DONE;
m_search_->matchedLength = 0;
text.getText(m_text_);
diff --git a/contrib/libs/icu/i18n/selfmt.cpp b/contrib/libs/icu/i18n/selfmt.cpp
index bb18e84ef65..abe39bcb635 100644
--- a/contrib/libs/icu/i18n/selfmt.cpp
+++ b/contrib/libs/icu/i18n/selfmt.cpp
@@ -41,7 +41,7 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SelectFormat)
-static const UChar SELECT_KEYWORD_OTHER[] = {LOW_O, LOW_T, LOW_H, LOW_E, LOW_R, 0};
+static const char16_t SELECT_KEYWORD_OTHER[] = {LOW_O, LOW_T, LOW_H, LOW_E, LOW_R, 0};
SelectFormat::SelectFormat(const UnicodeString& pat,
UErrorCode& status) : msgPattern(status) {
@@ -61,7 +61,7 @@ SelectFormat::applyPattern(const UnicodeString& newPattern, UErrorCode& status)
return;
}
- msgPattern.parseSelectStyle(newPattern, NULL, status);
+ msgPattern.parseSelectStyle(newPattern, nullptr, status);
if (U_FAILURE(status)) {
msgPattern.clear();
}
@@ -129,7 +129,7 @@ int32_t SelectFormat::findSubMessage(const MessagePattern& pattern, int32_t part
if (U_FAILURE(ec)) {
return 0;
}
- UnicodeString other(FALSE, SELECT_KEYWORD_OTHER, 5);
+ UnicodeString other(false, SELECT_KEYWORD_OTHER, 5);
int32_t count = pattern.countParts();
int32_t msgStart=0;
// Iterate over (ARG_SELECTOR, message) pairs until ARG_LIMIT or end of select-only pattern.
@@ -172,7 +172,7 @@ SelectFormat::operator==(const Format& other) const {
if (!Format::operator==(other)) {
return false;
}
- const SelectFormat& o = (const SelectFormat&)other;
+ const SelectFormat& o = static_cast<const SelectFormat&>(other);
return msgPattern == o.msgPattern;
}
diff --git a/contrib/libs/icu/i18n/selfmtimpl.h b/contrib/libs/icu/i18n/selfmtimpl.h
index a36d1a5c347..6cf875efdee 100644
--- a/contrib/libs/icu/i18n/selfmtimpl.h
+++ b/contrib/libs/icu/i18n/selfmtimpl.h
@@ -27,62 +27,62 @@
U_NAMESPACE_BEGIN
-#define DOT ((UChar)0x002E)
-#define SINGLE_QUOTE ((UChar)0x0027)
-#define SLASH ((UChar)0x002F)
-#define BACKSLASH ((UChar)0x005C)
-#define SPACE ((UChar)0x0020)
-#define TAB ((UChar)0x0009)
-#define QUOTATION_MARK ((UChar)0x0022)
-#define ASTERISK ((UChar)0x002A)
-#define COMMA ((UChar)0x002C)
-#define HYPHEN ((UChar)0x002D)
-#define U_ZERO ((UChar)0x0030)
-#define U_ONE ((UChar)0x0031)
-#define U_TWO ((UChar)0x0032)
-#define U_THREE ((UChar)0x0033)
-#define U_FOUR ((UChar)0x0034)
-#define U_FIVE ((UChar)0x0035)
-#define U_SIX ((UChar)0x0036)
-#define U_SEVEN ((UChar)0x0037)
-#define U_EIGHT ((UChar)0x0038)
-#define U_NINE ((UChar)0x0039)
-#define COLON ((UChar)0x003A)
-#define SEMI_COLON ((UChar)0x003B)
-#define CAP_A ((UChar)0x0041)
-#define CAP_B ((UChar)0x0042)
-#define CAP_R ((UChar)0x0052)
-#define CAP_Z ((UChar)0x005A)
-#define LOWLINE ((UChar)0x005F)
-#define LEFTBRACE ((UChar)0x007B)
-#define RIGHTBRACE ((UChar)0x007D)
+#define DOT ((char16_t)0x002E)
+#define SINGLE_QUOTE ((char16_t)0x0027)
+#define SLASH ((char16_t)0x002F)
+#define BACKSLASH ((char16_t)0x005C)
+#define SPACE ((char16_t)0x0020)
+#define TAB ((char16_t)0x0009)
+#define QUOTATION_MARK ((char16_t)0x0022)
+#define ASTERISK ((char16_t)0x002A)
+#define COMMA ((char16_t)0x002C)
+#define HYPHEN ((char16_t)0x002D)
+#define U_ZERO ((char16_t)0x0030)
+#define U_ONE ((char16_t)0x0031)
+#define U_TWO ((char16_t)0x0032)
+#define U_THREE ((char16_t)0x0033)
+#define U_FOUR ((char16_t)0x0034)
+#define U_FIVE ((char16_t)0x0035)
+#define U_SIX ((char16_t)0x0036)
+#define U_SEVEN ((char16_t)0x0037)
+#define U_EIGHT ((char16_t)0x0038)
+#define U_NINE ((char16_t)0x0039)
+#define COLON ((char16_t)0x003A)
+#define SEMI_COLON ((char16_t)0x003B)
+#define CAP_A ((char16_t)0x0041)
+#define CAP_B ((char16_t)0x0042)
+#define CAP_R ((char16_t)0x0052)
+#define CAP_Z ((char16_t)0x005A)
+#define LOWLINE ((char16_t)0x005F)
+#define LEFTBRACE ((char16_t)0x007B)
+#define RIGHTBRACE ((char16_t)0x007D)
-#define LOW_A ((UChar)0x0061)
-#define LOW_B ((UChar)0x0062)
-#define LOW_C ((UChar)0x0063)
-#define LOW_D ((UChar)0x0064)
-#define LOW_E ((UChar)0x0065)
-#define LOW_F ((UChar)0x0066)
-#define LOW_G ((UChar)0x0067)
-#define LOW_H ((UChar)0x0068)
-#define LOW_I ((UChar)0x0069)
-#define LOW_J ((UChar)0x006a)
-#define LOW_K ((UChar)0x006B)
-#define LOW_L ((UChar)0x006C)
-#define LOW_M ((UChar)0x006D)
-#define LOW_N ((UChar)0x006E)
-#define LOW_O ((UChar)0x006F)
-#define LOW_P ((UChar)0x0070)
-#define LOW_Q ((UChar)0x0071)
-#define LOW_R ((UChar)0x0072)
-#define LOW_S ((UChar)0x0073)
-#define LOW_T ((UChar)0x0074)
-#define LOW_U ((UChar)0x0075)
-#define LOW_V ((UChar)0x0076)
-#define LOW_W ((UChar)0x0077)
-#define LOW_X ((UChar)0x0078)
-#define LOW_Y ((UChar)0x0079)
-#define LOW_Z ((UChar)0x007A)
+#define LOW_A ((char16_t)0x0061)
+#define LOW_B ((char16_t)0x0062)
+#define LOW_C ((char16_t)0x0063)
+#define LOW_D ((char16_t)0x0064)
+#define LOW_E ((char16_t)0x0065)
+#define LOW_F ((char16_t)0x0066)
+#define LOW_G ((char16_t)0x0067)
+#define LOW_H ((char16_t)0x0068)
+#define LOW_I ((char16_t)0x0069)
+#define LOW_J ((char16_t)0x006a)
+#define LOW_K ((char16_t)0x006B)
+#define LOW_L ((char16_t)0x006C)
+#define LOW_M ((char16_t)0x006D)
+#define LOW_N ((char16_t)0x006E)
+#define LOW_O ((char16_t)0x006F)
+#define LOW_P ((char16_t)0x0070)
+#define LOW_Q ((char16_t)0x0071)
+#define LOW_R ((char16_t)0x0072)
+#define LOW_S ((char16_t)0x0073)
+#define LOW_T ((char16_t)0x0074)
+#define LOW_U ((char16_t)0x0075)
+#define LOW_V ((char16_t)0x0076)
+#define LOW_W ((char16_t)0x0077)
+#define LOW_X ((char16_t)0x0078)
+#define LOW_Y ((char16_t)0x0079)
+#define LOW_Z ((char16_t)0x007A)
class UnicodeSet;
diff --git a/contrib/libs/icu/i18n/sharedbreakiterator.h b/contrib/libs/icu/i18n/sharedbreakiterator.h
index b6d67bc8e8e..76e959fda3e 100644
--- a/contrib/libs/icu/i18n/sharedbreakiterator.h
+++ b/contrib/libs/icu/i18n/sharedbreakiterator.h
@@ -38,8 +38,8 @@ public:
BreakIterator &operator*() const { return *ptr; }
private:
BreakIterator *ptr;
- SharedBreakIterator(const SharedBreakIterator &);
- SharedBreakIterator &operator=(const SharedBreakIterator &);
+ SharedBreakIterator(const SharedBreakIterator &) = delete;
+ SharedBreakIterator &operator=(const SharedBreakIterator &) = delete;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/sharedcalendar.h b/contrib/libs/icu/i18n/sharedcalendar.h
index 1526f92e88f..60d1d5d4879 100644
--- a/contrib/libs/icu/i18n/sharedcalendar.h
+++ b/contrib/libs/icu/i18n/sharedcalendar.h
@@ -13,6 +13,7 @@
#include "unicode/utypes.h"
#include "sharedobject.h"
+#include "unifiedcache.h"
U_NAMESPACE_BEGIN
@@ -27,10 +28,15 @@ public:
const Calendar &operator*() const { return *ptr; }
private:
Calendar *ptr;
- SharedCalendar(const SharedCalendar &);
- SharedCalendar &operator=(const SharedCalendar &);
+ SharedCalendar(const SharedCalendar &) = delete;
+ SharedCalendar &operator=(const SharedCalendar &) = delete;
};
+template<> U_I18N_API
+const SharedCalendar *LocaleCacheKey<SharedCalendar>::createObject(
+ const void * /*unusedCreationContext*/, UErrorCode &status) const;
+
+
U_NAMESPACE_END
#endif
diff --git a/contrib/libs/icu/i18n/shareddateformatsymbols.h b/contrib/libs/icu/i18n/shareddateformatsymbols.h
index 66a06ecae54..b51fad98b0b 100644
--- a/contrib/libs/icu/i18n/shareddateformatsymbols.h
+++ b/contrib/libs/icu/i18n/shareddateformatsymbols.h
@@ -17,6 +17,7 @@
#include "sharedobject.h"
#include "unicode/dtfmtsym.h"
+#include "unifiedcache.h"
U_NAMESPACE_BEGIN
@@ -30,10 +31,15 @@ public:
const DateFormatSymbols &get() const { return dfs; }
private:
DateFormatSymbols dfs;
- SharedDateFormatSymbols(const SharedDateFormatSymbols &);
- SharedDateFormatSymbols &operator=(const SharedDateFormatSymbols &);
+ SharedDateFormatSymbols(const SharedDateFormatSymbols &) = delete;
+ SharedDateFormatSymbols &operator=(const SharedDateFormatSymbols &) = delete;
};
+template<> U_I18N_API
+const SharedDateFormatSymbols *
+ LocaleCacheKey<SharedDateFormatSymbols>::createObject(
+ const void * /*unusedContext*/, UErrorCode &status) const;
+
U_NAMESPACE_END
#endif /* !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/i18n/sharednumberformat.h b/contrib/libs/icu/i18n/sharednumberformat.h
index a7e105b5ac1..bd914c03407 100644
--- a/contrib/libs/icu/i18n/sharednumberformat.h
+++ b/contrib/libs/icu/i18n/sharednumberformat.h
@@ -13,6 +13,7 @@
#include "unicode/utypes.h"
#include "sharedobject.h"
+#include "unifiedcache.h"
U_NAMESPACE_BEGIN
@@ -27,10 +28,14 @@ public:
const NumberFormat &operator*() const { return *ptr; }
private:
NumberFormat *ptr;
- SharedNumberFormat(const SharedNumberFormat &);
- SharedNumberFormat &operator=(const SharedNumberFormat &);
+ SharedNumberFormat(const SharedNumberFormat &) = delete;
+ SharedNumberFormat &operator=(const SharedNumberFormat &) = delete;
};
+template<> U_I18N_API
+const SharedNumberFormat *LocaleCacheKey<SharedNumberFormat>::createObject(
+ const void * /*unused*/, UErrorCode &status) const;
+
U_NAMESPACE_END
#endif
diff --git a/contrib/libs/icu/i18n/sharedpluralrules.h b/contrib/libs/icu/i18n/sharedpluralrules.h
index 28d8b25c14b..11c82c5619a 100644
--- a/contrib/libs/icu/i18n/sharedpluralrules.h
+++ b/contrib/libs/icu/i18n/sharedpluralrules.h
@@ -13,6 +13,7 @@
#include "unicode/utypes.h"
#include "sharedobject.h"
+#include "unifiedcache.h"
U_NAMESPACE_BEGIN
@@ -26,10 +27,14 @@ public:
const PluralRules &operator*() const { return *ptr; }
private:
PluralRules *ptr;
- SharedPluralRules(const SharedPluralRules &);
- SharedPluralRules &operator=(const SharedPluralRules &);
+ SharedPluralRules(const SharedPluralRules &) = delete;
+ SharedPluralRules &operator=(const SharedPluralRules &) =delete;
};
+template<> U_I18N_API
+const SharedPluralRules *LocaleCacheKey<SharedPluralRules>::createObject(
+ const void * /*unused*/, UErrorCode &status) const;
+
U_NAMESPACE_END
#endif
diff --git a/contrib/libs/icu/i18n/simpletz.cpp b/contrib/libs/icu/i18n/simpletz.cpp
index d9b0cd8e1e6..8b21152f52f 100644
--- a/contrib/libs/icu/i18n/simpletz.cpp
+++ b/contrib/libs/icu/i18n/simpletz.cpp
@@ -53,8 +53,8 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleTimeZone)
// Gregorian calendar started.
const int8_t SimpleTimeZone::STATICMONTHLENGTH[] = {31,29,31,30,31,30,31,31,30,31,30,31};
-static const UChar DST_STR[] = {0x0028,0x0044,0x0053,0x0054,0x0029,0}; // "(DST)"
-static const UChar STD_STR[] = {0x0028,0x0053,0x0054,0x0044,0x0029,0}; // "(STD)"
+static const char16_t DST_STR[] = {0x0028,0x0044,0x0053,0x0054,0x0029,0}; // "(DST)"
+static const char16_t STD_STR[] = {0x0028,0x0053,0x0054,0x0044,0x0029,0}; // "(STD)"
// *****************************************************************************
@@ -76,7 +76,7 @@ SimpleTimeZone::SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID)
endTime(0),
startYear(0),
rawOffset(rawOffsetGMT),
- useDaylight(FALSE),
+ useDaylight(false),
startMode(DOM_MODE),
endMode(DOM_MODE),
dstSavings(U_MILLIS_PER_HOUR)
@@ -262,7 +262,7 @@ void
SimpleTimeZone::setStartYear(int32_t year)
{
startYear = year;
- transitionRulesInitialized = FALSE;
+ transitionRulesInitialized = false;
}
// -------------------------------------
@@ -316,7 +316,7 @@ SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t da
startTime = time;
startTimeMode = mode;
decodeStartRule(status);
- transitionRulesInitialized = FALSE;
+ transitionRulesInitialized = false;
}
// -------------------------------------
@@ -368,7 +368,7 @@ SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayO
endTime = time;
endTimeMode = mode;
decodeEndRule(status);
- transitionRulesInitialized = FALSE;
+ transitionRulesInitialized = false;
}
// -------------------------------------
@@ -518,9 +518,8 @@ SimpleTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingT
}
rawOffsetGMT = getRawOffset();
- int32_t year, month, dom, dow;
- double day = uprv_floor(date / U_MILLIS_PER_DAY);
- int32_t millis = (int32_t) (date - day * U_MILLIS_PER_DAY);
+ int32_t year, month, dom, dow, millis;
+ int32_t day = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis);
Grego::dayToFields(day, year, month, dom, dow);
@@ -532,25 +531,24 @@ SimpleTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingT
return;
}
- UBool recalc = FALSE;
+ UBool recalc = false;
// Now we need some adjustment
if (savingsDST > 0) {
if ((nonExistingTimeOpt & kStdDstMask) == kStandard
|| ((nonExistingTimeOpt & kStdDstMask) != kDaylight && (nonExistingTimeOpt & kFormerLatterMask) != kLatter)) {
date -= getDSTSavings();
- recalc = TRUE;
+ recalc = true;
}
} else {
if ((duplicatedTimeOpt & kStdDstMask) == kDaylight
|| ((duplicatedTimeOpt & kStdDstMask) != kStandard && (duplicatedTimeOpt & kFormerLatterMask) == kFormer)) {
date -= getDSTSavings();
- recalc = TRUE;
+ recalc = true;
}
}
if (recalc) {
- day = uprv_floor(date / U_MILLIS_PER_DAY);
- millis = (int32_t) (date - day * U_MILLIS_PER_DAY);
+ day = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis);
Grego::dayToFields(day, year, month, dom, dow);
savingsDST = getOffset(GregorianCalendar::AD, year, month, dom,
(uint8_t) dow, millis,
@@ -681,7 +679,7 @@ void
SimpleTimeZone::setRawOffset(int32_t offsetMillis)
{
rawOffset = offsetMillis;
- transitionRulesInitialized = FALSE;
+ transitionRulesInitialized = false;
}
// -------------------------------------
@@ -695,7 +693,7 @@ SimpleTimeZone::setDSTSavings(int32_t millisSavedDuringDST, UErrorCode& status)
else {
dstSavings = millisSavedDuringDST;
}
- transitionRulesInitialized = FALSE;
+ transitionRulesInitialized = false;
}
// -------------------------------------
@@ -725,12 +723,12 @@ UBool SimpleTimeZone::inDaylightTime(UDate date, UErrorCode& status) const
// This method is wasteful since it creates a new GregorianCalendar and
// deletes it each time it is called. However, this is a deprecated method
// and provided only for Java compatibility as of 8/6/97 [LIU].
- if (U_FAILURE(status)) return FALSE;
+ if (U_FAILURE(status)) return false;
GregorianCalendar *gc = new GregorianCalendar(*this, status);
- /* test for NULL */
+ /* test for nullptr */
if (gc == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
gc->setTime(date, status);
UBool result = gc->inDaylightTime(status);
@@ -748,8 +746,8 @@ UBool SimpleTimeZone::inDaylightTime(UDate date, UErrorCode& status) const
UBool
SimpleTimeZone::hasSameRules(const TimeZone& other) const
{
- if (this == &other) return TRUE;
- if (typeid(*this) != typeid(other)) return FALSE;
+ if (this == &other) return true;
+ if (typeid(*this) != typeid(other)) return false;
SimpleTimeZone *that = (SimpleTimeZone*)&other;
return rawOffset == that->rawOffset &&
useDaylight == that->useDaylight &&
@@ -872,7 +870,7 @@ SimpleTimeZone::decodeStartRule(UErrorCode& status)
{
if(U_FAILURE(status)) return;
- useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? TRUE : FALSE);
+ useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? true : false);
if (useDaylight && dstSavings == 0) {
dstSavings = U_MILLIS_PER_HOUR;
}
@@ -927,7 +925,7 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status)
{
if(U_FAILURE(status)) return;
- useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? TRUE : FALSE);
+ useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? true : false);
if (useDaylight && dstSavings == 0) {
dstSavings = U_MILLIS_PER_HOUR;
}
@@ -975,13 +973,13 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status)
UBool
SimpleTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const {
if (!useDaylight) {
- return FALSE;
+ return false;
}
UErrorCode status = U_ZERO_ERROR;
checkTransitionRules(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
UDate firstTransitionTime = firstTransition->getTime();
@@ -993,74 +991,74 @@ SimpleTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransitio
UBool dstAvail = dstRule->getNextStart(base, stdRule->getRawOffset(), stdRule->getDSTSavings(), inclusive, dstDate);
if (stdAvail && (!dstAvail || stdDate < dstDate)) {
result.setTime(stdDate);
- result.setFrom((const TimeZoneRule&)*dstRule);
- result.setTo((const TimeZoneRule&)*stdRule);
- return TRUE;
+ result.setFrom(*dstRule);
+ result.setTo(*stdRule);
+ return true;
}
if (dstAvail && (!stdAvail || dstDate < stdDate)) {
result.setTime(dstDate);
- result.setFrom((const TimeZoneRule&)*stdRule);
- result.setTo((const TimeZoneRule&)*dstRule);
- return TRUE;
+ result.setFrom(*stdRule);
+ result.setTo(*dstRule);
+ return true;
}
- return FALSE;
+ return false;
}
UBool
SimpleTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const {
if (!useDaylight) {
- return FALSE;
+ return false;
}
UErrorCode status = U_ZERO_ERROR;
checkTransitionRules(status);
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
UDate firstTransitionTime = firstTransition->getTime();
if (base < firstTransitionTime || (!inclusive && base == firstTransitionTime)) {
- return FALSE;
+ return false;
}
UDate stdDate, dstDate;
UBool stdAvail = stdRule->getPreviousStart(base, dstRule->getRawOffset(), dstRule->getDSTSavings(), inclusive, stdDate);
UBool dstAvail = dstRule->getPreviousStart(base, stdRule->getRawOffset(), stdRule->getDSTSavings(), inclusive, dstDate);
if (stdAvail && (!dstAvail || stdDate > dstDate)) {
result.setTime(stdDate);
- result.setFrom((const TimeZoneRule&)*dstRule);
- result.setTo((const TimeZoneRule&)*stdRule);
- return TRUE;
+ result.setFrom(*dstRule);
+ result.setTo(*stdRule);
+ return true;
}
if (dstAvail && (!stdAvail || dstDate > stdDate)) {
result.setTime(dstDate);
- result.setFrom((const TimeZoneRule&)*stdRule);
- result.setTo((const TimeZoneRule&)*dstRule);
- return TRUE;
+ result.setFrom(*stdRule);
+ result.setTo(*dstRule);
+ return true;
}
- return FALSE;
+ return false;
}
void
-SimpleTimeZone::clearTransitionRules(void) {
- initialRule = NULL;
- firstTransition = NULL;
- stdRule = NULL;
- dstRule = NULL;
- transitionRulesInitialized = FALSE;
+SimpleTimeZone::clearTransitionRules() {
+ initialRule = nullptr;
+ firstTransition = nullptr;
+ stdRule = nullptr;
+ dstRule = nullptr;
+ transitionRulesInitialized = false;
}
void
-SimpleTimeZone::deleteTransitionRules(void) {
- if (initialRule != NULL) {
+SimpleTimeZone::deleteTransitionRules() {
+ if (initialRule != nullptr) {
delete initialRule;
}
- if (firstTransition != NULL) {
+ if (firstTransition != nullptr) {
delete firstTransition;
}
- if (stdRule != NULL) {
+ if (stdRule != nullptr) {
delete stdRule;
}
- if (dstRule != NULL) {
+ if (dstRule != nullptr) {
delete dstRule;
}
clearTransitionRules();
@@ -1133,7 +1131,7 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
return;
}
// Check for Null pointer
- if (dtRule == NULL) {
+ if (dtRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1142,7 +1140,7 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
dtRule, startYear, AnnualTimeZoneRule::MAX_YEAR);
// Check for Null pointer
- if (dstRule == NULL) {
+ if (dstRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -1170,7 +1168,7 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
}
// Check for Null pointer
- if (dtRule == NULL) {
+ if (dtRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -1180,7 +1178,7 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
dtRule, startYear, AnnualTimeZoneRule::MAX_YEAR);
//Check for Null pointer
- if (stdRule == NULL) {
+ if (stdRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -1192,7 +1190,7 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
// Create a TimeZoneRule for initial time
if (firstStdStart < firstDstStart) {
initialRule = new InitialTimeZoneRule(tzid+UnicodeString(DST_STR), getRawOffset(), dstRule->getDSTSavings());
- if (initialRule == NULL) {
+ if (initialRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -1200,14 +1198,14 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
firstTransition = new TimeZoneTransition(firstStdStart, *initialRule, *stdRule);
} else {
initialRule = new InitialTimeZoneRule(tzid+UnicodeString(STD_STR), getRawOffset(), 0);
- if (initialRule == NULL) {
+ if (initialRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
}
firstTransition = new TimeZoneTransition(firstDstStart, *initialRule, *dstRule);
}
- if (firstTransition == NULL) {
+ if (firstTransition == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
@@ -1217,14 +1215,14 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) {
// Create a TimeZoneRule for initial time
initialRule = new InitialTimeZoneRule(tzid, getRawOffset(), 0);
// Check for null pointer.
- if (initialRule == NULL) {
+ if (initialRule == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
deleteTransitionRules();
return;
}
}
- transitionRulesInitialized = TRUE;
+ transitionRulesInitialized = true;
}
int32_t
@@ -1246,7 +1244,7 @@ SimpleTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial,
}
initial = initialRule;
int32_t cnt = 0;
- if (stdRule != NULL) {
+ if (stdRule != nullptr) {
if (cnt < trscount) {
trsrules[cnt++] = stdRule;
}
diff --git a/contrib/libs/icu/i18n/smpdtfmt.cpp b/contrib/libs/icu/i18n/smpdtfmt.cpp
index 91748d82f9f..a87fb8d5e15 100644
--- a/contrib/libs/icu/i18n/smpdtfmt.cpp
+++ b/contrib/libs/icu/i18n/smpdtfmt.cpp
@@ -45,6 +45,7 @@
#include "unicode/ustring.h"
#include "unicode/basictz.h"
#include "unicode/simpleformatter.h"
+#include "unicode/simplenumberformatter.h"
#include "unicode/simpletz.h"
#include "unicode/rbtz.h"
#include "unicode/tzfmt.h"
@@ -94,16 +95,16 @@ U_NAMESPACE_BEGIN
// GMT-minutes. For instance, in France the time zone is GMT+60.
// Also accepted are GMT+H:MM or GMT-H:MM.
// Currently not being used
-//static const UChar gGmt[] = {0x0047, 0x004D, 0x0054, 0x0000}; // "GMT"
-//static const UChar gGmtPlus[] = {0x0047, 0x004D, 0x0054, 0x002B, 0x0000}; // "GMT+"
-//static const UChar gGmtMinus[] = {0x0047, 0x004D, 0x0054, 0x002D, 0x0000}; // "GMT-"
-//static const UChar gDefGmtPat[] = {0x0047, 0x004D, 0x0054, 0x007B, 0x0030, 0x007D, 0x0000}; /* GMT{0} */
-//static const UChar gDefGmtNegHmsPat[] = {0x002D, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0x0000}; /* -HH:mm:ss */
-//static const UChar gDefGmtNegHmPat[] = {0x002D, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x0000}; /* -HH:mm */
-//static const UChar gDefGmtPosHmsPat[] = {0x002B, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0x0000}; /* +HH:mm:ss */
-//static const UChar gDefGmtPosHmPat[] = {0x002B, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x0000}; /* +HH:mm */
-//static const UChar gUt[] = {0x0055, 0x0054, 0x0000}; // "UT"
-//static const UChar gUtc[] = {0x0055, 0x0054, 0x0043, 0x0000}; // "UT"
+//static const char16_t gGmt[] = {0x0047, 0x004D, 0x0054, 0x0000}; // "GMT"
+//static const char16_t gGmtPlus[] = {0x0047, 0x004D, 0x0054, 0x002B, 0x0000}; // "GMT+"
+//static const char16_t gGmtMinus[] = {0x0047, 0x004D, 0x0054, 0x002D, 0x0000}; // "GMT-"
+//static const char16_t gDefGmtPat[] = {0x0047, 0x004D, 0x0054, 0x007B, 0x0030, 0x007D, 0x0000}; /* GMT{0} */
+//static const char16_t gDefGmtNegHmsPat[] = {0x002D, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0x0000}; /* -HH:mm:ss */
+//static const char16_t gDefGmtNegHmPat[] = {0x002D, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x0000}; /* -HH:mm */
+//static const char16_t gDefGmtPosHmsPat[] = {0x002B, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0x0000}; /* +HH:mm:ss */
+//static const char16_t gDefGmtPosHmPat[] = {0x002B, 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0x0000}; /* +HH:mm */
+//static const char16_t gUt[] = {0x0055, 0x0054, 0x0000}; // "UT"
+//static const char16_t gUtc[] = {0x0055, 0x0054, 0x0043, 0x0000}; // "UT"
typedef enum GmtPatSize {
kGmtLen = 3,
@@ -159,21 +160,21 @@ static const int8_t kTimeFieldsCount = 10;
// This is a pattern-of-last-resort used when we can't load a usable pattern out
// of a resource.
-static const UChar gDefaultPattern[] =
+static const char16_t gDefaultPattern[] =
{
- 0x79, 0x79, 0x79, 0x79, 0x4D, 0x4D, 0x64, 0x64, 0x20, 0x68, 0x68, 0x3A, 0x6D, 0x6D, 0x20, 0x61, 0
-}; /* "yyyyMMdd hh:mm a" */
+ 0x79, 0x4D, 0x4D, 0x64, 0x64, 0x20, 0x68, 0x68, 0x3A, 0x6D, 0x6D, 0x20, 0x61, 0
+}; /* "yMMdd hh:mm a" */
// This prefix is designed to NEVER MATCH real text, in order to
// suppress the parsing of negative numbers. Adjust as needed (if
// this becomes valid Unicode).
-static const UChar SUPPRESS_NEGATIVE_PREFIX[] = {0xAB00, 0};
+static const char16_t SUPPRESS_NEGATIVE_PREFIX[] = {0xAB00, 0};
/**
* These are the tags we expect to see in normal resource bundle files associated
* with a locale.
*/
-static const UChar QUOTE = 0x27; // Single quote
+static const char16_t QUOTE = 0x27; // Single quote
/*
* The field range check bias for each UDateFormatField.
@@ -244,7 +245,7 @@ static UMutex LOCK;
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleDateFormat)
SimpleDateFormat::NSOverride::~NSOverride() {
- if (snf != NULL) {
+ if (snf != nullptr) {
snf->removeRef();
}
}
@@ -263,12 +264,12 @@ void SimpleDateFormat::NSOverride::free() {
// to modify it so that it doesn't use thousands separators, doesn't always
// show the decimal point, and recognizes integers only when parsing
static void fixNumberFormatForDates(NumberFormat &nf) {
- nf.setGroupingUsed(FALSE);
+ nf.setGroupingUsed(false);
DecimalFormat* decfmt = dynamic_cast<DecimalFormat*>(&nf);
- if (decfmt != NULL) {
- decfmt->setDecimalSeparatorAlwaysShown(FALSE);
+ if (decfmt != nullptr) {
+ decfmt->setDecimalSeparatorAlwaysShown(false);
}
- nf.setParseIntegerOnly(TRUE);
+ nf.setParseIntegerOnly(true);
nf.setMinimumFractionDigits(0); // To prevent "Jan 1.00, 1997.00"
}
@@ -276,7 +277,7 @@ static const SharedNumberFormat *createSharedNumberFormat(
NumberFormat *nfToAdopt) {
fixNumberFormatForDates(*nfToAdopt);
const SharedNumberFormat *result = new SharedNumberFormat(nfToAdopt);
- if (result == NULL) {
+ if (result == nullptr) {
delete nfToAdopt;
}
return result;
@@ -286,10 +287,10 @@ static const SharedNumberFormat *createSharedNumberFormat(
const Locale &loc, UErrorCode &status) {
NumberFormat *nf = NumberFormat::createInstance(loc, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
const SharedNumberFormat *result = createSharedNumberFormat(nf);
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
return result;
@@ -298,11 +299,11 @@ static const SharedNumberFormat *createSharedNumberFormat(
static const SharedNumberFormat **allocSharedNumberFormatters() {
const SharedNumberFormat **result = (const SharedNumberFormat**)
uprv_malloc(UDAT_FIELD_COUNT * sizeof(const SharedNumberFormat*));
- if (result == NULL) {
- return NULL;
+ if (result == nullptr) {
+ return nullptr;
}
for (int32_t i = 0; i < UDAT_FIELD_COUNT; ++i) {
- result[i] = NULL;
+ result[i] = nullptr;
}
return result;
}
@@ -316,8 +317,8 @@ static void freeSharedNumberFormatters(const SharedNumberFormat ** list) {
const NumberFormat *SimpleDateFormat::getNumberFormatByIndex(
UDateFormatField index) const {
- if (fSharedNumberFormatters == NULL ||
- fSharedNumberFormatters[index] == NULL) {
+ if (fSharedNumberFormatters == nullptr ||
+ fSharedNumberFormatters[index] == nullptr) {
return fNumberFormat;
}
return &(**fSharedNumberFormatters[index]);
@@ -334,7 +335,7 @@ SimpleDateFormat::~SimpleDateFormat()
if (fTimeZoneFormat) {
delete fTimeZoneFormat;
}
- freeFastNumberFormatters();
+ delete fSimpleNumberFormatter;
#if !UCONFIG_NO_BREAK_ITERATION
delete fCapitalizationBrkIter;
@@ -344,11 +345,7 @@ SimpleDateFormat::~SimpleDateFormat()
//----------------------------------------------------------------------
SimpleDateFormat::SimpleDateFormat(UErrorCode& status)
- : fLocale(Locale::getDefault()),
- fSymbols(NULL),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ : fLocale(Locale::getDefault())
{
initializeBooleanAttributes();
construct(kShort, (EStyle) (kShort + kDateOffset), fLocale, status);
@@ -360,16 +357,12 @@ SimpleDateFormat::SimpleDateFormat(UErrorCode& status)
SimpleDateFormat::SimpleDateFormat(const UnicodeString& pattern,
UErrorCode &status)
: fPattern(pattern),
- fLocale(Locale::getDefault()),
- fSymbols(NULL),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fLocale(Locale::getDefault())
{
fDateOverride.setToBogus();
fTimeOverride.setToBogus();
initializeBooleanAttributes();
- initializeCalendar(NULL,fLocale,status);
+ initializeCalendar(nullptr,fLocale,status);
fSymbols = DateFormatSymbols::createForLocale(fLocale, status);
initialize(fLocale, status);
initializeDefaultCentury();
@@ -381,16 +374,12 @@ SimpleDateFormat::SimpleDateFormat(const UnicodeString& pattern,
const UnicodeString& override,
UErrorCode &status)
: fPattern(pattern),
- fLocale(Locale::getDefault()),
- fSymbols(NULL),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fLocale(Locale::getDefault())
{
fDateOverride.setTo(override);
fTimeOverride.setToBogus();
initializeBooleanAttributes();
- initializeCalendar(NULL,fLocale,status);
+ initializeCalendar(nullptr,fLocale,status);
fSymbols = DateFormatSymbols::createForLocale(fLocale, status);
initialize(fLocale, status);
initializeDefaultCentury();
@@ -405,17 +394,14 @@ SimpleDateFormat::SimpleDateFormat(const UnicodeString& pattern,
const Locale& locale,
UErrorCode& status)
: fPattern(pattern),
- fLocale(locale),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fLocale(locale)
{
fDateOverride.setToBogus();
fTimeOverride.setToBogus();
initializeBooleanAttributes();
- initializeCalendar(NULL,fLocale,status);
+ initializeCalendar(nullptr,fLocale,status);
fSymbols = DateFormatSymbols::createForLocale(fLocale, status);
initialize(fLocale, status);
initializeDefaultCentury();
@@ -428,17 +414,14 @@ SimpleDateFormat::SimpleDateFormat(const UnicodeString& pattern,
const Locale& locale,
UErrorCode& status)
: fPattern(pattern),
- fLocale(locale),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fLocale(locale)
{
fDateOverride.setTo(override);
fTimeOverride.setToBogus();
initializeBooleanAttributes();
- initializeCalendar(NULL,fLocale,status);
+ initializeCalendar(nullptr,fLocale,status);
fSymbols = DateFormatSymbols::createForLocale(fLocale, status);
initialize(fLocale, status);
initializeDefaultCentury();
@@ -454,17 +437,14 @@ SimpleDateFormat::SimpleDateFormat(const UnicodeString& pattern,
UErrorCode& status)
: fPattern(pattern),
fLocale(Locale::getDefault()),
- fSymbols(symbolsToAdopt),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fSymbols(symbolsToAdopt)
{
fDateOverride.setToBogus();
fTimeOverride.setToBogus();
initializeBooleanAttributes();
- initializeCalendar(NULL,fLocale,status);
+ initializeCalendar(nullptr,fLocale,status);
initialize(fLocale, status);
initializeDefaultCentury();
}
@@ -476,17 +456,14 @@ SimpleDateFormat::SimpleDateFormat(const UnicodeString& pattern,
UErrorCode& status)
: fPattern(pattern),
fLocale(Locale::getDefault()),
- fSymbols(new DateFormatSymbols(symbols)),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fSymbols(new DateFormatSymbols(symbols))
{
fDateOverride.setToBogus();
fTimeOverride.setToBogus();
initializeBooleanAttributes();
- initializeCalendar(NULL, fLocale, status);
+ initializeCalendar(nullptr, fLocale, status);
initialize(fLocale, status);
initializeDefaultCentury();
}
@@ -498,11 +475,7 @@ SimpleDateFormat::SimpleDateFormat(EStyle timeStyle,
EStyle dateStyle,
const Locale& locale,
UErrorCode& status)
-: fLocale(locale),
- fSymbols(NULL),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+: fLocale(locale)
{
initializeBooleanAttributes();
construct(timeStyle, dateStyle, fLocale, status);
@@ -521,15 +494,11 @@ SimpleDateFormat::SimpleDateFormat(EStyle timeStyle,
SimpleDateFormat::SimpleDateFormat(const Locale& locale,
UErrorCode& status)
: fPattern(gDefaultPattern),
- fLocale(locale),
- fSymbols(NULL),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fLocale(locale)
{
if (U_FAILURE(status)) return;
initializeBooleanAttributes();
- initializeCalendar(NULL, fLocale, status);
+ initializeCalendar(nullptr, fLocale, status);
fSymbols = DateFormatSymbols::createForLocale(fLocale, status);
if (U_FAILURE(status))
{
@@ -537,7 +506,7 @@ SimpleDateFormat::SimpleDateFormat(const Locale& locale,
delete fSymbols;
// This constructor doesn't fail; it uses last resort data
fSymbols = new DateFormatSymbols(status);
- /* test for NULL */
+ /* test for nullptr */
if (fSymbols == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
@@ -557,11 +526,7 @@ SimpleDateFormat::SimpleDateFormat(const Locale& locale,
SimpleDateFormat::SimpleDateFormat(const SimpleDateFormat& other)
: DateFormat(other),
- fLocale(other.fLocale),
- fSymbols(NULL),
- fTimeZoneFormat(NULL),
- fSharedNumberFormatters(NULL),
- fCapitalizationBrkIter(NULL)
+ fLocale(other.fLocale)
{
initializeBooleanAttributes();
*this = other;
@@ -574,12 +539,18 @@ SimpleDateFormat& SimpleDateFormat::operator=(const SimpleDateFormat& other)
if (this == &other) {
return *this;
}
+
+ // fSimpleNumberFormatter references fNumberFormatter, delete it
+ // before we call the = operator which may invalidate fNumberFormatter
+ delete fSimpleNumberFormatter;
+ fSimpleNumberFormatter = nullptr;
+
DateFormat::operator=(other);
fDateOverride = other.fDateOverride;
fTimeOverride = other.fTimeOverride;
delete fSymbols;
- fSymbols = NULL;
+ fSymbols = nullptr;
if (other.fSymbols)
fSymbols = new DateFormatSymbols(*other.fSymbols);
@@ -595,7 +566,7 @@ SimpleDateFormat& SimpleDateFormat::operator=(const SimpleDateFormat& other)
fLocale = other.fLocale;
// TimeZoneFormat can now be set independently via setter.
- // If it is NULL, it will be lazily initialized from locale.
+ // If it is nullptr, it will be lazily initialized from locale.
delete fTimeZoneFormat;
fTimeZoneFormat = nullptr;
TimeZoneFormat *otherTZFormat;
@@ -621,16 +592,16 @@ SimpleDateFormat& SimpleDateFormat::operator=(const SimpleDateFormat& other)
}
#if !UCONFIG_NO_BREAK_ITERATION
- if (other.fCapitalizationBrkIter != NULL) {
+ if (other.fCapitalizationBrkIter != nullptr) {
fCapitalizationBrkIter = (other.fCapitalizationBrkIter)->clone();
}
#endif
- if (fSharedNumberFormatters != NULL) {
+ if (fSharedNumberFormatters != nullptr) {
freeSharedNumberFormatters(fSharedNumberFormatters);
- fSharedNumberFormatters = NULL;
+ fSharedNumberFormatters = nullptr;
}
- if (other.fSharedNumberFormatters != NULL) {
+ if (other.fSharedNumberFormatters != nullptr) {
fSharedNumberFormatters = allocSharedNumberFormatters();
if (fSharedNumberFormatters) {
for (int32_t i = 0; i < UDAT_FIELD_COUNT; ++i) {
@@ -642,9 +613,10 @@ SimpleDateFormat& SimpleDateFormat::operator=(const SimpleDateFormat& other)
}
UErrorCode localStatus = U_ZERO_ERROR;
- freeFastNumberFormatters();
- initFastNumberFormatters(localStatus);
-
+ // SimpleNumberFormatter does not have a copy constructor. Furthermore,
+ // it references data from an internal field, fNumberFormatter,
+ // so we must rematerialize that reference after copying over the number formatter.
+ initSimpleNumberFormatter(localStatus);
return *this;
}
@@ -667,8 +639,8 @@ SimpleDateFormat::operator==(const Format& other) const
// DateFormat::operator== guarantees following cast is safe
SimpleDateFormat* that = (SimpleDateFormat*)&other;
return (fPattern == that->fPattern &&
- fSymbols != NULL && // Check for pathological object
- that->fSymbols != NULL && // Check for pathological object
+ fSymbols != nullptr && // Check for pathological object
+ that->fSymbols != nullptr && // Check for pathological object
*fSymbols == *that->fSymbols &&
fHaveDefaultCentury == that->fHaveDefaultCentury &&
fDefaultCenturyStart == that->fDefaultCenturyStart);
@@ -677,7 +649,7 @@ SimpleDateFormat::operator==(const Format& other) const
}
//----------------------------------------------------------------------
-static const UChar* timeSkeletons[4] = {
+static const char16_t* timeSkeletons[4] = {
u"jmmsszzzz", // kFull
u"jmmssz", // kLong
u"jmmss", // kMedium
@@ -693,23 +665,23 @@ void SimpleDateFormat::construct(EStyle timeStyle,
if (U_FAILURE(status)) return;
// We will need the calendar to know what type of symbols to load.
- initializeCalendar(NULL, locale, status);
+ initializeCalendar(nullptr, locale, status);
if (U_FAILURE(status)) return;
// Load date time patterns directly from resources.
- const char* cType = fCalendar ? fCalendar->getType() : NULL;
- LocalUResourceBundlePointer bundle(ures_open(NULL, locale.getBaseName(), &status));
+ const char* cType = fCalendar ? fCalendar->getType() : nullptr;
+ LocalUResourceBundlePointer bundle(ures_open(nullptr, locale.getBaseName(), &status));
if (U_FAILURE(status)) return;
- UBool cTypeIsGregorian = TRUE;
+ UBool cTypeIsGregorian = true;
LocalUResourceBundlePointer dateTimePatterns;
- if (cType != NULL && uprv_strcmp(cType, "gregorian") != 0) {
+ if (cType != nullptr && uprv_strcmp(cType, "gregorian") != 0) {
CharString resourcePath("calendar/", status);
resourcePath.append(cType, status).append("/DateTimePatterns", status);
dateTimePatterns.adoptInstead(
ures_getByKeyWithFallback(bundle.getAlias(), resourcePath.data(),
- (UResourceBundle*)NULL, &status));
- cTypeIsGregorian = FALSE;
+ (UResourceBundle*)nullptr, &status));
+ cTypeIsGregorian = false;
}
// Check for "gregorian" fallback.
@@ -718,7 +690,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
dateTimePatterns.adoptInstead(
ures_getByKeyWithFallback(bundle.getAlias(),
"calendar/gregorian/DateTimePatterns",
- (UResourceBundle*)NULL, &status));
+ (UResourceBundle*)nullptr, &status));
}
if (U_FAILURE(status)) return;
@@ -736,13 +708,13 @@ void SimpleDateFormat::construct(EStyle timeStyle,
// create a symbols object from the locale
fSymbols = DateFormatSymbols::createForLocale(locale, status);
if (U_FAILURE(status)) return;
- /* test for NULL */
+ /* test for nullptr */
if (fSymbols == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- const UChar *resStr,*ovrStr;
+ const char16_t *resStr,*ovrStr;
int32_t resStrLen,ovrStrLen = 0;
fDateOverride.setToBogus();
fTimeOverride.setToBogus();
@@ -776,7 +748,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
// region preferences anyway.
LocalPointer<DateTimePatternGenerator> dtpg(DateTimePatternGenerator::createInstanceNoStdPat(locale, useStatus));
if (U_SUCCESS(useStatus)) {
- UnicodeString timeSkeleton(TRUE, timeSkeletons[timeStyle], -1);
+ UnicodeString timeSkeleton(true, timeSkeletons[timeStyle], -1);
timePattern = dtpg->getBestPattern(timeSkeleton, useStatus);
}
}
@@ -792,7 +764,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
UnicodeString tempus1(timePattern);
if (tempus1.length() == 0) {
currentBundle.adoptInstead(
- ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)timeStyle, NULL, &status));
+ ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)timeStyle, nullptr, &status));
if (U_FAILURE(status)) {
status = U_INVALID_FORMAT_ERROR;
return;
@@ -805,7 +777,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
case URES_ARRAY: {
resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status);
ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status);
- fTimeOverride.setTo(TRUE, ovrStr, ovrStrLen);
+ fTimeOverride.setTo(true, ovrStr, ovrStrLen);
break;
}
default: {
@@ -814,11 +786,11 @@ void SimpleDateFormat::construct(EStyle timeStyle,
}
}
- tempus1.setTo(TRUE, resStr, resStrLen);
+ tempus1.setTo(true, resStr, resStrLen);
}
currentBundle.adoptInstead(
- ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)dateStyle, NULL, &status));
+ ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)dateStyle, nullptr, &status));
if (U_FAILURE(status)) {
status = U_INVALID_FORMAT_ERROR;
return;
@@ -831,7 +803,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
case URES_ARRAY: {
resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status);
ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status);
- fDateOverride.setTo(TRUE, ovrStr, ovrStrLen);
+ fDateOverride.setTo(true, ovrStr, ovrStrLen);
break;
}
default: {
@@ -840,17 +812,40 @@ void SimpleDateFormat::construct(EStyle timeStyle,
}
}
- UnicodeString tempus2(TRUE, resStr, resStrLen);
+ UnicodeString tempus2(true, resStr, resStrLen);
- int32_t glueIndex = kDateTime;
- int32_t patternsSize = ures_getSize(dateTimePatterns.getAlias());
- if (patternsSize >= (kDateTimeOffset + kShort + 1)) {
- // Get proper date time format
- glueIndex = (int32_t)(kDateTimeOffset + (dateStyle - kDateOffset));
+ // Currently, for compatibility with pre-CLDR-42 data, we default to the "atTime"
+ // combining patterns. Depending on guidance in CLDR 42 spec and on DisplayOptions,
+ // we may change this.
+ LocalUResourceBundlePointer dateAtTimePatterns;
+ if (!cTypeIsGregorian) {
+ CharString resourcePath("calendar/", status);
+ resourcePath.append(cType, status).append("/DateTimePatterns%atTime", status);
+ dateAtTimePatterns.adoptInstead(
+ ures_getByKeyWithFallback(bundle.getAlias(), resourcePath.data(),
+ nullptr, &status));
+ }
+ if (cTypeIsGregorian || status == U_MISSING_RESOURCE_ERROR) {
+ status = U_ZERO_ERROR;
+ dateAtTimePatterns.adoptInstead(
+ ures_getByKeyWithFallback(bundle.getAlias(),
+ "calendar/gregorian/DateTimePatterns%atTime",
+ nullptr, &status));
}
+ if (U_SUCCESS(status) && ures_getSize(dateAtTimePatterns.getAlias()) >= 4) {
+ resStr = ures_getStringByIndex(dateAtTimePatterns.getAlias(), dateStyle - kDateOffset, &resStrLen, &status);
+ } else {
+ status = U_ZERO_ERROR;
+ int32_t glueIndex = kDateTime;
+ int32_t patternsSize = ures_getSize(dateTimePatterns.getAlias());
+ if (patternsSize >= (kDateTimeOffset + kShort + 1)) {
+ // Get proper date time format
+ glueIndex = (int32_t)(kDateTimeOffset + (dateStyle - kDateOffset));
+ }
- resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status);
- SimpleFormatter(UnicodeString(TRUE, resStr, resStrLen), 2, 2, status).
+ resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status);
+ }
+ SimpleFormatter(UnicodeString(true, resStr, resStrLen), 2, 2, status).
format(tempus1, tempus2, fPattern, status);
}
// if the pattern includes just time data or just date date, load the appropriate
@@ -860,7 +855,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
fPattern.setTo(timePattern);
if (fPattern.length() == 0) {
currentBundle.adoptInstead(
- ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)timeStyle, NULL, &status));
+ ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)timeStyle, nullptr, &status));
if (U_FAILURE(status)) {
status = U_INVALID_FORMAT_ERROR;
return;
@@ -873,7 +868,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
case URES_ARRAY: {
resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status);
ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status);
- fDateOverride.setTo(TRUE, ovrStr, ovrStrLen);
+ fDateOverride.setTo(true, ovrStr, ovrStrLen);
break;
}
default: {
@@ -881,12 +876,12 @@ void SimpleDateFormat::construct(EStyle timeStyle,
return;
}
}
- fPattern.setTo(TRUE, resStr, resStrLen);
+ fPattern.setTo(true, resStr, resStrLen);
}
}
else if (dateStyle != kNone) {
currentBundle.adoptInstead(
- ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)dateStyle, NULL, &status));
+ ures_getByIndex(dateTimePatterns.getAlias(), (int32_t)dateStyle, nullptr, &status));
if (U_FAILURE(status)) {
status = U_INVALID_FORMAT_ERROR;
return;
@@ -899,7 +894,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
case URES_ARRAY: {
resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status);
ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status);
- fDateOverride.setTo(TRUE, ovrStr, ovrStrLen);
+ fDateOverride.setTo(true, ovrStr, ovrStrLen);
break;
}
default: {
@@ -907,7 +902,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
return;
}
}
- fPattern.setTo(TRUE, resStr, resStrLen);
+ fPattern.setTo(true, resStr, resStrLen);
}
// and if it includes _neither_, that's an error
@@ -950,13 +945,13 @@ SimpleDateFormat::initialize(const Locale& locale,
// We don't need to check that the row count is >= 1, since all 2d arrays have at
// least one row
fNumberFormat = NumberFormat::createInstance(locale, status);
- if (fNumberFormat != NULL && U_SUCCESS(status))
+ if (fNumberFormat != nullptr && U_SUCCESS(status))
{
fixNumberFormatForDates(*fNumberFormat);
- //fNumberFormat->setLenient(TRUE); // Java uses a custom DateNumberFormat to format/parse
+ //fNumberFormat->setLenient(true); // Java uses a custom DateNumberFormat to format/parse
initNumberFormatters(locale, status);
- initFastNumberFormatters(status);
+ initSimpleNumberFormatter(status);
}
else if (U_SUCCESS(status))
@@ -1010,7 +1005,7 @@ void SimpleDateFormat::parseAmbiguousDatesAsAfter(UDate startDate, UErrorCode& s
fCalendar->setTime(startDate, status);
if(U_SUCCESS(status)) {
- fHaveDefaultCentury = TRUE;
+ fHaveDefaultCentury = true;
fDefaultCenturyStart = startDate;
fDefaultCenturyStartYear = fCalendar->get(UCAL_YEAR, status);
}
@@ -1046,13 +1041,13 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo,
return appendTo;
}
Calendar* workCal = &cal;
- Calendar* calClone = NULL;
+ Calendar* calClone = nullptr;
if (&cal != fCalendar && uprv_strcmp(cal.getType(), fCalendar->getType()) != 0) {
// Different calendar type
// We use the time and time zone from the input calendar, but
// do not use the input calendar for field calculation.
calClone = fCalendar->clone();
- if (calClone != NULL) {
+ if (calClone != nullptr) {
UDate t = cal.getTime(status);
calClone->setTime(t, status);
calClone->setTimeZone(cal.getTimeZone());
@@ -1063,15 +1058,15 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo,
}
}
- UBool inQuote = FALSE;
- UChar prevCh = 0;
+ UBool inQuote = false;
+ char16_t prevCh = 0;
int32_t count = 0;
int32_t fieldNum = 0;
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) {
- UChar ch = fPattern[i];
+ char16_t ch = fPattern[i];
// Use subFormat() to format a repeated pattern character
// when a different pattern or non-pattern character is seen
@@ -1084,7 +1079,7 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo,
// Consecutive single quotes are a single quote literal,
// either outside of quotes or between quotes
if ((i+1) < fPattern.length() && fPattern[i+1] == QUOTE) {
- appendTo += (UChar)QUOTE;
+ appendTo += (char16_t)QUOTE;
++i;
} else {
inQuote = ! inQuote;
@@ -1108,7 +1103,7 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo,
prevCh, handler, *workCal, status);
}
- if (calClone != NULL) {
+ if (calClone != nullptr) {
delete calClone;
}
@@ -1136,7 +1131,7 @@ SimpleDateFormat::fgCalendarFieldToLevel[] =
/*A?.*/ 40, 0, 0
};
-int32_t SimpleDateFormat::getLevelFromChar(UChar ch) {
+int32_t SimpleDateFormat::getLevelFromChar(char16_t ch) {
// Map date field LETTER into calendar field level.
// the larger the level, the smaller the field unit.
// NOTE: if new fields adds in, the table needs to update.
@@ -1166,48 +1161,48 @@ int32_t SimpleDateFormat::getLevelFromChar(UChar ch) {
return ch < UPRV_LENGTHOF(mapCharToLevel) ? mapCharToLevel[ch] : -1;
}
-UBool SimpleDateFormat::isSyntaxChar(UChar ch) {
+UBool SimpleDateFormat::isSyntaxChar(char16_t ch) {
static const UBool mapCharToIsSyntax[] = {
//
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
//
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
//
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
//
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
// ! " # $ % & '
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
// ( ) * + , - . /
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
// 0 1 2 3 4 5 6 7
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
#if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR
// 8 9 : ; < = > ?
- FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, true, false, false, false, false, false,
#else
// 8 9 : ; < = > ?
- FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ false, false, false, false, false, false, false, false,
#endif
// @ A B C D E F G
- FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ false, true, true, true, true, true, true, true,
// H I J K L M N O
- TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ true, true, true, true, true, true, true, true,
// P Q R S T U V W
- TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ true, true, true, true, true, true, true, true,
// X Y Z [ \ ] ^ _
- TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ true, true, true, false, false, false, false, false,
// ` a b c d e f g
- FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ false, true, true, true, true, true, true, true,
// h i j k l m n o
- TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ true, true, true, true, true, true, true, true,
// p q r s t u v w
- TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ true, true, true, true, true, true, true, true,
// x y z { | } ~
- TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE
+ true, true, true, false, false, false, false, false
};
- return ch < UPRV_LENGTHOF(mapCharToIsSyntax) ? mapCharToIsSyntax[ch] : FALSE;
+ return ch < UPRV_LENGTHOF(mapCharToIsSyntax) ? mapCharToIsSyntax[ch] : false;
}
// Map index into pattern character string to Calendar field number.
@@ -1291,7 +1286,7 @@ _appendSymbolWithMonthPattern(UnicodeString& dst, int32_t value, const UnicodeSt
const UnicodeString* monthPattern, UErrorCode& status) {
U_ASSERT(0 <= value && value < symbolsCount);
if (0 <= value && value < symbolsCount) {
- if (monthPattern == NULL) {
+ if (monthPattern == nullptr) {
dst += symbols[value];
} else {
SimpleFormatter(*monthPattern, 1, 1, status).format(symbols[value], dst, status);
@@ -1301,18 +1296,8 @@ _appendSymbolWithMonthPattern(UnicodeString& dst, int32_t value, const UnicodeSt
//----------------------------------------------------------------------
-static number::LocalizedNumberFormatter*
-createFastFormatter(const DecimalFormat* df, int32_t minInt, int32_t maxInt, UErrorCode& status) {
- const number::LocalizedNumberFormatter* lnfBase = df->toNumberFormatter(status);
- if (U_FAILURE(status)) {
- return nullptr;
- }
- return lnfBase->integerWidth(
- number::IntegerWidth::zeroFillTo(minInt).truncateAt(maxInt)
- ).clone().orphan();
-}
-
-void SimpleDateFormat::initFastNumberFormatters(UErrorCode& status) {
+void
+SimpleDateFormat::initSimpleNumberFormatter(UErrorCode &status) {
if (U_FAILURE(status)) {
return;
}
@@ -1320,27 +1305,20 @@ void SimpleDateFormat::initFastNumberFormatters(UErrorCode& status) {
if (df == nullptr) {
return;
}
- fFastNumberFormatters[SMPDTFMT_NF_1x10] = createFastFormatter(df, 1, 10, status);
- fFastNumberFormatters[SMPDTFMT_NF_2x10] = createFastFormatter(df, 2, 10, status);
- fFastNumberFormatters[SMPDTFMT_NF_3x10] = createFastFormatter(df, 3, 10, status);
- fFastNumberFormatters[SMPDTFMT_NF_4x10] = createFastFormatter(df, 4, 10, status);
- fFastNumberFormatters[SMPDTFMT_NF_2x2] = createFastFormatter(df, 2, 2, status);
-}
-
-void SimpleDateFormat::freeFastNumberFormatters() {
- delete fFastNumberFormatters[SMPDTFMT_NF_1x10];
- delete fFastNumberFormatters[SMPDTFMT_NF_2x10];
- delete fFastNumberFormatters[SMPDTFMT_NF_3x10];
- delete fFastNumberFormatters[SMPDTFMT_NF_4x10];
- delete fFastNumberFormatters[SMPDTFMT_NF_2x2];
- fFastNumberFormatters[SMPDTFMT_NF_1x10] = nullptr;
- fFastNumberFormatters[SMPDTFMT_NF_2x10] = nullptr;
- fFastNumberFormatters[SMPDTFMT_NF_3x10] = nullptr;
- fFastNumberFormatters[SMPDTFMT_NF_4x10] = nullptr;
- fFastNumberFormatters[SMPDTFMT_NF_2x2] = nullptr;
+ const DecimalFormatSymbols* syms = df->getDecimalFormatSymbols();
+ if (syms == nullptr) {
+ return;
+ }
+ fSimpleNumberFormatter = new number::SimpleNumberFormatter(
+ number::SimpleNumberFormatter::forLocaleAndSymbolsAndGroupingStrategy(
+ fLocale, *syms, UNUM_GROUPING_OFF, status
+ )
+ );
+ if (fSimpleNumberFormatter == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ }
}
-
void
SimpleDateFormat::initNumberFormatters(const Locale &locale,UErrorCode &status) {
if (U_FAILURE(status)) {
@@ -1350,9 +1328,9 @@ SimpleDateFormat::initNumberFormatters(const Locale &locale,UErrorCode &status)
return;
}
umtx_lock(&LOCK);
- if (fSharedNumberFormatters == NULL) {
+ if (fSharedNumberFormatters == nullptr) {
fSharedNumberFormatters = allocSharedNumberFormatters();
- if (fSharedNumberFormatters == NULL) {
+ if (fSharedNumberFormatters == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -1376,19 +1354,19 @@ SimpleDateFormat::processOverrideString(const Locale &locale, const UnicodeStrin
int32_t len;
UnicodeString nsName;
UnicodeString ovrField;
- UBool moreToProcess = TRUE;
- NSOverride *overrideList = NULL;
+ UBool moreToProcess = true;
+ NSOverride *overrideList = nullptr;
while (moreToProcess) {
- int32_t delimiterPosition = str.indexOf((UChar)ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE,start);
+ int32_t delimiterPosition = str.indexOf((char16_t)ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE,start);
if (delimiterPosition == -1) {
- moreToProcess = FALSE;
+ moreToProcess = false;
len = str.length() - start;
} else {
len = delimiterPosition - start;
}
UnicodeString currentString(str,start,len);
- int32_t equalSignPosition = currentString.indexOf((UChar)ULOC_KEYWORD_ASSIGN_UNICODE,0);
+ int32_t equalSignPosition = currentString.indexOf((char16_t)ULOC_KEYWORD_ASSIGN_UNICODE,0);
if (equalSignPosition == -1) { // Simple override string such as "hebrew"
nsName.setTo(currentString);
ovrField.setToBogus();
@@ -1400,12 +1378,12 @@ SimpleDateFormat::processOverrideString(const Locale &locale, const UnicodeStrin
int32_t nsNameHash = nsName.hashCode();
// See if the numbering system is in the override list, if not, then add it.
NSOverride *curr = overrideList;
- const SharedNumberFormat *snf = NULL;
- UBool found = FALSE;
+ const SharedNumberFormat *snf = nullptr;
+ UBool found = false;
while ( curr && !found ) {
if ( curr->hash == nsNameHash ) {
snf = curr->snf;
- found = TRUE;
+ found = true;
}
curr = curr->next;
}
@@ -1529,7 +1507,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
}
currentNumberFormat = getNumberFormatByIndex(patternCharIndex);
- if (currentNumberFormat == NULL) {
+ if (currentNumberFormat == nullptr) {
status = U_INTERNAL_PROGRAM_ERROR;
return;
}
@@ -1557,7 +1535,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
break;
case UDAT_YEAR_NAME_FIELD:
- if (fSymbols->fShortYearNames != NULL && value <= fSymbols->fShortYearNamesCount) {
+ if (fSymbols->fShortYearNames != nullptr && value <= fSymbols->fShortYearNamesCount) {
// the Calendar YEAR field runs 1 through 60 for cyclic years
_appendSymbol(appendTo, value - 1, fSymbols->fShortYearNames, fSymbols->fShortYearNamesCount);
break;
@@ -1598,43 +1576,43 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
value--; // Adjust the month number down 1 in Hebrew non-leap years, i.e. Adar is 6, not 7.
}
{
- int32_t isLeapMonth = (fSymbols->fLeapMonthPatterns != NULL && fSymbols->fLeapMonthPatternsCount >= DateFormatSymbols::kMonthPatternsCount)?
+ int32_t isLeapMonth = (fSymbols->fLeapMonthPatterns != nullptr && fSymbols->fLeapMonthPatternsCount >= DateFormatSymbols::kMonthPatternsCount)?
cal.get(UCAL_IS_LEAP_MONTH, status): 0;
// should consolidate the next section by using arrays of pointers & counts for the right symbols...
if (count == 5) {
if (patternCharIndex == UDAT_MONTH_FIELD) {
_appendSymbolWithMonthPattern(appendTo, value, fSymbols->fNarrowMonths, fSymbols->fNarrowMonthsCount,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatNarrow]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatNarrow]): nullptr, status);
} else {
_appendSymbolWithMonthPattern(appendTo, value, fSymbols->fStandaloneNarrowMonths, fSymbols->fStandaloneNarrowMonthsCount,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternStandaloneNarrow]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternStandaloneNarrow]): nullptr, status);
}
capContextUsageType = DateFormatSymbols::kCapContextUsageMonthNarrow;
} else if (count == 4) {
if (patternCharIndex == UDAT_MONTH_FIELD) {
_appendSymbolWithMonthPattern(appendTo, value, fSymbols->fMonths, fSymbols->fMonthsCount,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatWide]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatWide]): nullptr, status);
capContextUsageType = DateFormatSymbols::kCapContextUsageMonthFormat;
} else {
_appendSymbolWithMonthPattern(appendTo, value, fSymbols->fStandaloneMonths, fSymbols->fStandaloneMonthsCount,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternStandaloneWide]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternStandaloneWide]): nullptr, status);
capContextUsageType = DateFormatSymbols::kCapContextUsageMonthStandalone;
}
} else if (count == 3) {
if (patternCharIndex == UDAT_MONTH_FIELD) {
_appendSymbolWithMonthPattern(appendTo, value, fSymbols->fShortMonths, fSymbols->fShortMonthsCount,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatAbbrev]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatAbbrev]): nullptr, status);
capContextUsageType = DateFormatSymbols::kCapContextUsageMonthFormat;
} else {
_appendSymbolWithMonthPattern(appendTo, value, fSymbols->fStandaloneShortMonths, fSymbols->fStandaloneShortMonthsCount,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternStandaloneAbbrev]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternStandaloneAbbrev]): nullptr, status);
capContextUsageType = DateFormatSymbols::kCapContextUsageMonthStandalone;
}
} else {
UnicodeString monthNumber;
zeroPaddingNumber(currentNumberFormat,monthNumber, value + 1, count, maxIntCount);
_appendSymbolWithMonthPattern(appendTo, 0, &monthNumber, 1,
- (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternNumeric]): NULL, status);
+ (isLeapMonth!=0)? &(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternNumeric]): nullptr, status);
}
}
break;
@@ -1772,7 +1750,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
case UDAT_TIMEZONE_ISO_FIELD: // 'X'
case UDAT_TIMEZONE_ISO_LOCAL_FIELD: // 'x'
{
- UChar zsbuf[ZONE_NAME_U16_MAX];
+ char16_t zsbuf[ZONE_NAME_U16_MAX];
UnicodeString zoneString(zsbuf, 0, UPRV_LENGTHOF(zsbuf));
const TimeZone& tz = cal.getTimeZone();
UDate date = cal.getTime(status);
@@ -1911,7 +1889,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
case UDAT_AM_PM_MIDNIGHT_NOON_FIELD:
{
- const UnicodeString *toAppend = NULL;
+ const UnicodeString *toAppend = nullptr;
int32_t hour = cal.get(UCAL_HOUR_OF_DAY, status);
// Note: "midnight" can be ambiguous as to whether it refers to beginning of day or end of day.
@@ -1937,10 +1915,10 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
}
}
- // toAppend is NULL if time isn't exactly midnight or noon (as displayed).
+ // toAppend is nullptr if time isn't exactly midnight or noon (as displayed).
// toAppend is bogus if time is midnight or noon, but no localized string exists.
// In either case, fall back to am/pm.
- if (toAppend == NULL || toAppend->isBogus()) {
+ if (toAppend == nullptr || toAppend->isBogus()) {
// Reformat with identical arguments except ch, now changed to 'a'.
// We are passing a different fieldToOutput because we want to add
// 'b' to field position. This makes this fallback stable when
@@ -1963,7 +1941,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
// Data doesn't conform to spec, therefore loading failed.
break;
}
- if (ruleSet == NULL) {
+ if (ruleSet == nullptr) {
// Data doesn't exist for the locale we're looking for.
// Falling back to am/pm.
// We are passing a different fieldToOutput because we want to add
@@ -1997,7 +1975,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
// Rule set exists, therefore periodType can't be UNKNOWN.
// Get localized string.
U_ASSERT(periodType != DayPeriodRules::DAYPERIOD_UNKNOWN);
- UnicodeString *toAppend = NULL;
+ UnicodeString *toAppend = nullptr;
int32_t index;
// Note: "midnight" can be ambiguous as to whether it refers to beginning of day or end of day.
@@ -2020,7 +1998,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
// Midnight/Noon -> General Periods -> AM/PM.
// Midnight/Noon -> General Periods.
- if ((toAppend == NULL || toAppend->isBogus()) &&
+ if ((toAppend == nullptr || toAppend->isBogus()) &&
(periodType == DayPeriodRules::DAYPERIOD_MIDNIGHT ||
periodType == DayPeriodRules::DAYPERIOD_NOON)) {
periodType = ruleSet->getDayPeriodForHour(hour);
@@ -2060,12 +2038,12 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
}
#if !UCONFIG_NO_BREAK_ITERATION
// if first field, check to see whether we need to and are able to titlecase it
- if (fieldNum == 0 && fCapitalizationBrkIter != NULL && appendTo.length() > beginOffset &&
+ if (fieldNum == 0 && fCapitalizationBrkIter != nullptr && appendTo.length() > beginOffset &&
u_islower(appendTo.char32At(beginOffset))) {
- UBool titlecase = FALSE;
+ UBool titlecase = false;
switch (capitalizationContext) {
case UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE:
- titlecase = TRUE;
+ titlecase = true;
break;
case UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU:
titlecase = fSymbols->fCapitalization[capContextUsageType][0];
@@ -2074,7 +2052,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
titlecase = fSymbols->fCapitalization[capContextUsageType][1];
break;
default:
- // titlecase = FALSE;
+ // titlecase = false;
break;
}
if (titlecase) {
@@ -2093,6 +2071,11 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
//----------------------------------------------------------------------
void SimpleDateFormat::adoptNumberFormat(NumberFormat *formatToAdopt) {
+ // Null out the fast formatter, it references fNumberFormat which we're
+ // about to invalidate
+ delete fSimpleNumberFormatter;
+ fSimpleNumberFormatter = nullptr;
+
fixNumberFormatForDates(*formatToAdopt);
delete fNumberFormat;
fNumberFormat = formatToAdopt;
@@ -2101,13 +2084,12 @@ void SimpleDateFormat::adoptNumberFormat(NumberFormat *formatToAdopt) {
// (can't fail).
if (fSharedNumberFormatters) {
freeSharedNumberFormatters(fSharedNumberFormatters);
- fSharedNumberFormatters = NULL;
+ fSharedNumberFormatters = nullptr;
}
- // Also re-compute the fast formatters.
+ // Recompute fSimpleNumberFormatter if necessary
UErrorCode localStatus = U_ZERO_ERROR;
- freeFastNumberFormatters();
- initFastNumberFormatters(localStatus);
+ initSimpleNumberFormatter(localStatus);
}
void SimpleDateFormat::adoptNumberFormat(const UnicodeString& fields, NumberFormat *formatToAdopt, UErrorCode &status){
@@ -2118,20 +2100,20 @@ void SimpleDateFormat::adoptNumberFormat(const UnicodeString& fields, NumberForm
}
// We must ensure fSharedNumberFormatters is allocated.
- if (fSharedNumberFormatters == NULL) {
+ if (fSharedNumberFormatters == nullptr) {
fSharedNumberFormatters = allocSharedNumberFormatters();
- if (fSharedNumberFormatters == NULL) {
+ if (fSharedNumberFormatters == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
}
const SharedNumberFormat *newFormat = createSharedNumberFormat(fmt.orphan());
- if (newFormat == NULL) {
+ if (newFormat == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
for (int i=0; i<fields.length(); i++) {
- UChar field = fields.charAt(i);
+ char16_t field = fields.charAt(i);
// if the pattern character is unrecognized, signal an error and bail out
UDateFormatField patternCharIndex = DateFormatSymbols::getPatternCharIndex(field);
if (patternCharIndex == UDAT_FIELD_COUNT) {
@@ -2148,10 +2130,10 @@ void SimpleDateFormat::adoptNumberFormat(const UnicodeString& fields, NumberForm
}
const NumberFormat *
-SimpleDateFormat::getNumberFormatForField(UChar field) const {
+SimpleDateFormat::getNumberFormatForField(char16_t field) const {
UDateFormatField index = DateFormatSymbols::getPatternCharIndex(field);
if (index == UDAT_FIELD_COUNT) {
- return NULL;
+ return nullptr;
}
return getNumberFormatByIndex(index);
}
@@ -2163,36 +2145,19 @@ SimpleDateFormat::zeroPaddingNumber(
UnicodeString &appendTo,
int32_t value, int32_t minDigits, int32_t maxDigits) const
{
- const number::LocalizedNumberFormatter* fastFormatter = nullptr;
- // NOTE: This uses the heuristic that these five min/max int settings account for the vast majority
- // of SimpleDateFormat number formatting cases at the time of writing (ICU 62).
- if (currentNumberFormat == fNumberFormat) {
- if (maxDigits == 10) {
- if (minDigits == 1) {
- fastFormatter = fFastNumberFormatters[SMPDTFMT_NF_1x10];
- } else if (minDigits == 2) {
- fastFormatter = fFastNumberFormatters[SMPDTFMT_NF_2x10];
- } else if (minDigits == 3) {
- fastFormatter = fFastNumberFormatters[SMPDTFMT_NF_3x10];
- } else if (minDigits == 4) {
- fastFormatter = fFastNumberFormatters[SMPDTFMT_NF_4x10];
- }
- } else if (maxDigits == 2) {
- if (minDigits == 2) {
- fastFormatter = fFastNumberFormatters[SMPDTFMT_NF_2x2];
- }
- }
- }
- if (fastFormatter != nullptr) {
+
+ if (currentNumberFormat == fNumberFormat && fSimpleNumberFormatter) {
// Can use fast path
- number::impl::UFormattedNumberData result;
- result.quantity.setToInt(value);
UErrorCode localStatus = U_ZERO_ERROR;
- fastFormatter->formatImpl(&result, localStatus);
+ number::SimpleNumber number = number::SimpleNumber::forInt64(value, localStatus);
+ number.setMinimumIntegerDigits(minDigits, localStatus);
+ number.truncateStart(maxDigits, localStatus);
+
+ number::FormattedNumber result = fSimpleNumberFormatter->format(std::move(number), localStatus);
if (U_FAILURE(localStatus)) {
return;
}
- appendTo.append(result.getStringRef().toTempUnicodeString());
+ appendTo.append(result.toTempString(localStatus));
return;
}
@@ -2220,7 +2185,7 @@ SimpleDateFormat::zeroPaddingNumber(
* Return true if the given format character, occurring count
* times, represents a numeric field.
*/
-UBool SimpleDateFormat::isNumeric(UChar formatChar, int32_t count) {
+UBool SimpleDateFormat::isNumeric(char16_t formatChar, int32_t count) {
return DateFormatSymbols::isNumericPatternChar(formatChar, count);
}
@@ -2228,13 +2193,13 @@ UBool
SimpleDateFormat::isAtNumericField(const UnicodeString &pattern, int32_t patternOffset) {
if (patternOffset >= pattern.length()) {
// not at any field
- return FALSE;
+ return false;
}
- UChar ch = pattern.charAt(patternOffset);
+ char16_t ch = pattern.charAt(patternOffset);
UDateFormatField f = DateFormatSymbols::getPatternCharIndex(ch);
if (f == UDAT_FIELD_COUNT) {
// not at any field
- return FALSE;
+ return false;
}
int32_t i = patternOffset;
while (pattern.charAt(++i) == ch) {}
@@ -2245,13 +2210,13 @@ UBool
SimpleDateFormat::isAfterNonNumericField(const UnicodeString &pattern, int32_t patternOffset) {
if (patternOffset <= 0) {
// not after any field
- return FALSE;
+ return false;
}
- UChar ch = pattern.charAt(--patternOffset);
+ char16_t ch = pattern.charAt(--patternOffset);
UDateFormatField f = DateFormatSymbols::getPatternCharIndex(ch);
if (f == UDAT_FIELD_COUNT) {
// not after any field
- return FALSE;
+ return false;
}
int32_t i = patternOffset;
while (pattern.charAt(--i) == ch) {}
@@ -2273,7 +2238,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
// the hour to interpret time correctly.
int32_t dayPeriodInt = -1;
- UBool ambiguousYear[] = { FALSE };
+ UBool ambiguousYear[] = { false };
int32_t saveHebrewMonth = -1;
int32_t count = 0;
UTimeZoneFormatTimeType tzTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
@@ -2286,18 +2251,18 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
int32_t abutPat = -1; // If >=0, we are in a run of abutting numeric fields
int32_t abutStart = 0;
int32_t abutPass = 0;
- UBool inQuote = FALSE;
+ UBool inQuote = false;
- MessageFormat * numericLeapMonthFormatter = NULL;
+ MessageFormat * numericLeapMonthFormatter = nullptr;
- Calendar* calClone = NULL;
+ Calendar* calClone = nullptr;
Calendar *workCal = &cal;
if (&cal != fCalendar && uprv_strcmp(cal.getType(), fCalendar->getType()) != 0) {
// Different calendar type
// We use the time/zone from the input calendar, but
// do not use the input calendar for field calculation.
calClone = fCalendar->clone();
- if (calClone != NULL) {
+ if (calClone != nullptr) {
calClone->setTime(cal.getTime(status),status);
if (U_FAILURE(status)) {
goto ExitParse;
@@ -2310,9 +2275,9 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
}
}
- if (fSymbols->fLeapMonthPatterns != NULL && fSymbols->fLeapMonthPatternsCount >= DateFormatSymbols::kMonthPatternsCount) {
+ if (fSymbols->fLeapMonthPatterns != nullptr && fSymbols->fLeapMonthPatternsCount >= DateFormatSymbols::kMonthPatternsCount) {
numericLeapMonthFormatter = new MessageFormat(fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternNumeric], fLocale, status);
- if (numericLeapMonthFormatter == NULL) {
+ if (numericLeapMonthFormatter == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
goto ExitParse;
} else if (U_FAILURE(status)) {
@@ -2321,7 +2286,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
}
for (int32_t i=0; i<fPattern.length(); ++i) {
- UChar ch = fPattern.charAt(i);
+ char16_t ch = fPattern.charAt(i);
// Handle alphabetic field characters.
if (!inQuote && isSyntaxChar(ch)) {
@@ -2370,7 +2335,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
}
pos = subParse(text, pos, ch, count,
- TRUE, FALSE, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType);
+ true, false, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType);
// If the parse fails anywhere in the run, back up to the
// start of the run and retry.
@@ -2385,7 +2350,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
// fields.
else if (ch != 0x6C) { // pattern char 'l' (SMALL LETTER L) just gets ignored
int32_t s = subParse(text, pos, ch, count,
- FALSE, TRUE, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType, &dayPeriodInt);
+ false, true, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType, &dayPeriodInt);
if (s == -pos-1) {
// era not present, in special cases allow this to continue
@@ -2394,7 +2359,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
if (i+1 < fPattern.length()) {
// move to next pattern character
- UChar c = fPattern.charAt(i+1);
+ char16_t c = fPattern.charAt(i+1);
// check for whitespace
if (PatternProps::isWhiteSpace(c)) {
@@ -2545,7 +2510,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
if (ambiguousYear[0]) {
copy = cal.clone();
// Check for failed cloning.
- if (copy == NULL) {
+ if (copy == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
goto ExitParse;
}
@@ -2561,17 +2526,17 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
if (tzTimeType != UTZFMT_TIME_TYPE_UNKNOWN) {
copy = cal.clone();
// Check for failed cloning.
- if (copy == NULL) {
+ if (copy == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
goto ExitParse;
}
const TimeZone & tz = cal.getTimeZone();
- BasicTimeZone *btz = NULL;
+ BasicTimeZone *btz = nullptr;
- if (dynamic_cast<const OlsonTimeZone *>(&tz) != NULL
- || dynamic_cast<const SimpleTimeZone *>(&tz) != NULL
- || dynamic_cast<const RuleBasedTimeZone *>(&tz) != NULL
- || dynamic_cast<const VTimeZone *>(&tz) != NULL) {
+ if (dynamic_cast<const OlsonTimeZone *>(&tz) != nullptr
+ || dynamic_cast<const SimpleTimeZone *>(&tz) != nullptr
+ || dynamic_cast<const RuleBasedTimeZone *>(&tz) != nullptr
+ || dynamic_cast<const VTimeZone *>(&tz) != nullptr) {
btz = (BasicTimeZone*)&tz;
}
@@ -2583,7 +2548,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
// Make sure parsed time zone type (Standard or Daylight)
// matches the rule used by the parsed time zone.
int32_t raw, dst;
- if (btz != NULL) {
+ if (btz != nullptr) {
if (tzTimeType == UTZFMT_TIME_TYPE_STANDARD) {
btz->getOffsetFromLocal(localMillis,
UCAL_TZ_LOCAL_STANDARD_FORMER, UCAL_TZ_LOCAL_STANDARD_LATTER, raw, dst, status);
@@ -2594,7 +2559,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
} else {
// No good way to resolve ambiguous time at transition,
// but following code work in most case.
- tz.getOffset(localMillis, TRUE, raw, dst, status);
+ tz.getOffset(localMillis, true, raw, dst, status);
}
// Now, compare the results with parsed type, either standard or daylight saving time
@@ -2606,7 +2571,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
}
} else { // tztype == TZTYPE_DST
if (dst == 0) {
- if (btz != NULL) {
+ if (btz != nullptr) {
// This implementation resolves daylight saving time offset
// closest rule after the given time.
UDate baseTime = localMillis + raw;
@@ -2617,7 +2582,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
// Search for DST rule after the given time
while (time < limit) {
- trsAvail = btz->getNextTransition(time, FALSE, trs);
+ trsAvail = btz->getNextTransition(time, false, trs);
if (!trsAvail) {
break;
}
@@ -2634,7 +2599,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition&
time = baseTime;
limit = baseTime - MAX_DAYLIGHT_DETECTION_RANGE;
while (time > limit) {
- trsAvail = btz->getPreviousTransition(time, TRUE, trs);
+ trsAvail = btz->getPreviousTransition(time, true, trs);
if (!trsAvail) {
break;
}
@@ -2671,10 +2636,10 @@ ExitParse:
cal.setTime(workCal->getTime(status), status);
}
- if (numericLeapMonthFormatter != NULL) {
+ if (numericLeapMonthFormatter != nullptr) {
delete numericLeapMonthFormatter;
}
- if (calClone != NULL) {
+ if (calClone != nullptr) {
delete calClone;
}
@@ -2759,13 +2724,13 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
UBool partialMatchLenient,
UBool oldLeniency)
{
- UBool inQuote = FALSE;
+ UBool inQuote = false;
UnicodeString literal;
int32_t i = patternOffset;
// scan pattern looking for contiguous literal characters
for ( ; i < pattern.length(); i += 1) {
- UChar ch = pattern.charAt(i);
+ char16_t ch = pattern.charAt(i);
if (!inQuote && isSyntaxChar(ch)) {
break;
@@ -2801,10 +2766,10 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
}
for (p = 0; p < literal.length() && t < text.length();) {
- UBool needWhitespace = FALSE;
+ UBool needWhitespace = false;
while (p < literal.length() && PatternProps::isWhiteSpace(literal.charAt(p))) {
- needWhitespace = TRUE;
+ needWhitespace = true;
p += 1;
}
@@ -2812,7 +2777,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
int32_t tStart = t;
while (t < text.length()) {
- UChar tch = text.charAt(t);
+ char16_t tch = text.charAt(t);
if (!u_isUWhiteSpace(tch) && !PatternProps::isWhiteSpace(tch)) {
break;
@@ -2827,7 +2792,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
if (!whitespaceLenient && t == tStart) {
// didn't find matching whitespace:
// an error in strict mode
- return FALSE;
+ return false;
}
// In strict mode, this run of whitespace
@@ -2849,7 +2814,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
}
// if it is actual whitespace and we're whitespace lenient it's OK
- UChar wsc = text.charAt(t);
+ char16_t wsc = text.charAt(t);
if(PatternProps::isWhiteSpace(wsc)) {
// Lenient mode and it's just whitespace we skip it
++t;
@@ -2861,7 +2826,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
break;
}
- return FALSE;
+ return false;
}
++p;
++t;
@@ -2873,16 +2838,16 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
if (p <= 0) {
// no match. Pretend it matched a run of whitespace
// and ignorables in the text.
- const UnicodeSet *ignorables = NULL;
+ const UnicodeSet *ignorables = nullptr;
UDateFormatField patternCharIndex = DateFormatSymbols::getPatternCharIndex(pattern.charAt(i));
if (patternCharIndex != UDAT_FIELD_COUNT) {
ignorables = SimpleDateFormatStaticSets::getIgnorables(patternCharIndex);
}
for (t = textOffset; t < text.length(); t += 1) {
- UChar ch = text.charAt(t);
+ char16_t ch = text.charAt(t);
- if (ignorables == NULL || !ignorables->contains(ch)) {
+ if (ignorables == nullptr || !ignorables->contains(ch)) {
break;
}
}
@@ -2892,7 +2857,50 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern,
patternOffset = i - 1;
textOffset = t;
- return TRUE;
+ return true;
+}
+
+//----------------------------------------------------------------------
+// check both wide and abbrev months.
+// Does not currently handle monthPattern.
+// UCalendarDateFields field = UCAL_MONTH
+
+int32_t SimpleDateFormat::matchAlphaMonthStrings(const UnicodeString& text,
+ int32_t start,
+ const UnicodeString* wideData,
+ const UnicodeString* shortData,
+ int32_t dataCount,
+ Calendar& cal) const
+{
+ int32_t i;
+ int32_t bestMatchLength = 0, bestMatch = -1;
+
+ for (i = 0; i < dataCount; ++i) {
+ int32_t matchLen = 0;
+ if ((matchLen = matchStringWithOptionalDot(text, start, wideData[i])) > bestMatchLength) {
+ bestMatch = i;
+ bestMatchLength = matchLen;
+ }
+ }
+ for (i = 0; i < dataCount; ++i) {
+ int32_t matchLen = 0;
+ if ((matchLen = matchStringWithOptionalDot(text, start, shortData[i])) > bestMatchLength) {
+ bestMatch = i;
+ bestMatchLength = matchLen;
+ }
+ }
+
+ if (bestMatch >= 0) {
+ // Adjustment for Hebrew Calendar month Adar II
+ if (!strcmp(cal.getType(),"hebrew") && bestMatch==13) {
+ cal.set(UCAL_MONTH,6);
+ } else {
+ cal.set(UCAL_MONTH, bestMatch);
+ }
+ return start + bestMatchLength;
+ }
+
+ return -start;
}
//----------------------------------------------------------------------
@@ -2914,6 +2922,8 @@ int32_t SimpleDateFormat::matchString(const UnicodeString& text,
// the same prefix (e.g., Cerven and Cervenec (June and July) in Czech).
// We keep track of the longest match, and return that. Note that this
// unfortunately requires us to test all array elements.
+ // But this does not really work for cases such as Chuvash in which
+ // May is "ҫу" and August is "ҫурла"/"ҫур.", hence matchAlphaMonthStrings.
int32_t bestMatchLength = 0, bestMatch = -1;
UnicodeString bestMatchName;
int32_t isLeapMonth = 0;
@@ -2925,7 +2935,7 @@ int32_t SimpleDateFormat::matchString(const UnicodeString& text,
bestMatchLength = matchLen;
}
- if (monthPattern != NULL) {
+ if (monthPattern != nullptr) {
UErrorCode status = U_ZERO_ERROR;
UnicodeString leapMonthName;
SimpleFormatter(*monthPattern, 1, 1, status).format(data[i], leapMonthName, status);
@@ -2950,7 +2960,7 @@ int32_t SimpleDateFormat::matchString(const UnicodeString& text,
}
cal.set(field, bestMatch);
}
- if (monthPattern != NULL) {
+ if (monthPattern != nullptr) {
cal.set(UCAL_IS_LEAP_MONTH, isLeapMonth);
}
}
@@ -2997,7 +3007,7 @@ SimpleDateFormat::set2DigitYearStart(UDate d, UErrorCode& status)
* Private member function that converts the parsed date strings into
* timeFields. Returns -start (for ParsePosition) if failed.
*/
-int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UChar ch, int32_t count,
+int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, char16_t ch, int32_t count,
UBool obeyCount, UBool allowNegative, UBool ambiguousYear[], int32_t& saveHebrewMonth, Calendar& cal,
int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType,
int32_t *dayPeriod) const
@@ -3011,7 +3021,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
UDateFormatField patternCharIndex = DateFormatSymbols::getPatternCharIndex(ch);
const NumberFormat *currentNumberFormat;
UnicodeString temp;
- UBool gotNumber = FALSE;
+ UBool gotNumber = false;
#if defined (U_DEBUG_CAL)
//fprintf(stderr, "%s:%d - [%c] st=%d \n", __FILE__, __LINE__, (char) ch, start);
@@ -3022,13 +3032,13 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
}
currentNumberFormat = getNumberFormatByIndex(patternCharIndex);
- if (currentNumberFormat == NULL) {
+ if (currentNumberFormat == nullptr) {
return -start;
}
UCalendarDateFields field = fgPatternIndexToCalendarField[patternCharIndex]; // UCAL_FIELD_COUNT if irrelevant
UnicodeString hebr("hebr", 4, US_INV);
- if (numericLeapMonthFormatter != NULL) {
+ if (numericLeapMonthFormatter != nullptr) {
numericLeapMonthFormatter->setFormats((const Format **)&currentNumberFormat, 1);
}
UBool isChineseCalendar = (uprv_strcmp(cal.getType(),"chinese") == 0 || uprv_strcmp(cal.getType(),"dangi") == 0);
@@ -3072,12 +3082,12 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
// but that's going to be difficult.
const UnicodeString* src;
- UBool parsedNumericLeapMonth = FALSE;
- if (numericLeapMonthFormatter != NULL && (patternCharIndex == UDAT_MONTH_FIELD || patternCharIndex == UDAT_STANDALONE_MONTH_FIELD)) {
+ UBool parsedNumericLeapMonth = false;
+ if (numericLeapMonthFormatter != nullptr && (patternCharIndex == UDAT_MONTH_FIELD || patternCharIndex == UDAT_STANDALONE_MONTH_FIELD)) {
int32_t argCount;
Formattable * args = numericLeapMonthFormatter->parse(text, pos, argCount);
- if (args != NULL && argCount == 1 && pos.getIndex() > parseStart && args[0].isNumeric()) {
- parsedNumericLeapMonth = TRUE;
+ if (args != nullptr && argCount == 1 && pos.getIndex() > parseStart && args[0].isNumeric()) {
+ parsedNumericLeapMonth = true;
number.setLong(args[0].getLong());
cal.set(UCAL_IS_LEAP_MONTH, 1);
delete[] args;
@@ -3106,17 +3116,17 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
if (txtLoc > parseStart) {
value = number.getLong();
- gotNumber = TRUE;
+ gotNumber = true;
// suffix processing
if (value < 0 ) {
- txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, TRUE);
+ txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, true);
if (txtLoc != pos.getIndex()) {
value *= -1;
}
}
else {
- txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, FALSE);
+ txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, false);
}
if (!getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status)) {
@@ -3171,11 +3181,11 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
return pos.getIndex();
}
if (count == 5) {
- ps = matchString(text, start, UCAL_ERA, fSymbols->fNarrowEras, fSymbols->fNarrowErasCount, NULL, cal);
+ ps = matchString(text, start, UCAL_ERA, fSymbols->fNarrowEras, fSymbols->fNarrowErasCount, nullptr, cal);
} else if (count == 4) {
- ps = matchString(text, start, UCAL_ERA, fSymbols->fEraNames, fSymbols->fEraNamesCount, NULL, cal);
+ ps = matchString(text, start, UCAL_ERA, fSymbols->fEraNames, fSymbols->fEraNamesCount, nullptr, cal);
} else {
- ps = matchString(text, start, UCAL_ERA, fSymbols->fEras, fSymbols->fErasCount, NULL, cal);
+ ps = matchString(text, start, UCAL_ERA, fSymbols->fEras, fSymbols->fErasCount, nullptr, cal);
}
// check return position, if it equals -start, then matchString error
@@ -3249,8 +3259,8 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
return pos.getIndex();
case UDAT_YEAR_NAME_FIELD:
- if (fSymbols->fShortYearNames != NULL) {
- int32_t newStart = matchString(text, start, UCAL_YEAR, fSymbols->fShortYearNames, fSymbols->fShortYearNamesCount, NULL, cal);
+ if (fSymbols->fShortYearNames != nullptr) {
+ int32_t newStart = matchString(text, start, UCAL_YEAR, fSymbols->fShortYearNames, fSymbols->fShortYearNamesCount, nullptr, cal);
if (newStart > 0) {
return newStart;
}
@@ -3291,9 +3301,9 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
// count >= 3 // i.e., MMM/MMMM, LLL/LLLL
// Want to be able to parse both short and long forms.
// Try count == 4 first:
- UnicodeString * wideMonthPat = NULL;
- UnicodeString * shortMonthPat = NULL;
- if (fSymbols->fLeapMonthPatterns != NULL && fSymbols->fLeapMonthPatternsCount >= DateFormatSymbols::kMonthPatternsCount) {
+ UnicodeString * wideMonthPat = nullptr;
+ UnicodeString * shortMonthPat = nullptr;
+ if (fSymbols->fLeapMonthPatterns != nullptr && fSymbols->fLeapMonthPatternsCount >= DateFormatSymbols::kMonthPatternsCount) {
if (patternCharIndex==UDAT_MONTH_FIELD) {
wideMonthPat = &fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatWide];
shortMonthPat = &fSymbols->fLeapMonthPatterns[DateFormatSymbols::kLeapMonthPatternFormatAbbrev];
@@ -3304,6 +3314,14 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
}
int32_t newStart = 0;
if (patternCharIndex==UDAT_MONTH_FIELD) {
+ if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) && count>=3 && count <=4 &&
+ fSymbols->fLeapMonthPatterns==nullptr && fSymbols->fMonthsCount==fSymbols->fShortMonthsCount) {
+ // single function to check both wide and short, an experiment
+ newStart = matchAlphaMonthStrings(text, start, fSymbols->fMonths, fSymbols->fShortMonths, fSymbols->fMonthsCount, cal); // try MMMM,MMM
+ if (newStart > 0) {
+ return newStart;
+ }
+ }
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 4) {
newStart = matchString(text, start, UCAL_MONTH, fSymbols->fMonths, fSymbols->fMonthsCount, wideMonthPat, cal); // try MMMM
if (newStart > 0) {
@@ -3314,6 +3332,14 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
newStart = matchString(text, start, UCAL_MONTH, fSymbols->fShortMonths, fSymbols->fShortMonthsCount, shortMonthPat, cal); // try MMM
}
} else {
+ if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) && count>=3 && count <=4 &&
+ fSymbols->fLeapMonthPatterns==nullptr && fSymbols->fStandaloneMonthsCount==fSymbols->fStandaloneShortMonthsCount) {
+ // single function to check both wide and short, an experiment
+ newStart = matchAlphaMonthStrings(text, start, fSymbols->fStandaloneMonths, fSymbols->fStandaloneShortMonths, fSymbols->fStandaloneMonthsCount, cal); // try MMMM,MMM
+ if (newStart > 0) {
+ return newStart;
+ }
+ }
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 4) {
newStart = matchString(text, start, UCAL_MONTH, fSymbols->fStandaloneMonths, fSymbols->fStandaloneMonthsCount, wideMonthPat, cal); // try LLLL
if (newStart > 0) {
@@ -3377,25 +3403,25 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
int32_t newStart = 0;
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 4) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fWeekdays, fSymbols->fWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fWeekdays, fSymbols->fWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
// EEEE wide failed, now try EEE abbreviated
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 3) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fShortWeekdays, fSymbols->fShortWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fShortWeekdays, fSymbols->fShortWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
// EEE abbreviated failed, now try EEEEEE short
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 6) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fShorterWeekdays, fSymbols->fShorterWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fShorterWeekdays, fSymbols->fShorterWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
// EEEEEE short failed, now try EEEEE narrow
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 5) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fNarrowWeekdays, fSymbols->fNarrowWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fNarrowWeekdays, fSymbols->fNarrowWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
if (!getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status) || patternCharIndex == UDAT_DAY_OF_WEEK_FIELD)
@@ -3417,17 +3443,17 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
int32_t newStart = 0;
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 4) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fStandaloneWeekdays, fSymbols->fStandaloneWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fStandaloneWeekdays, fSymbols->fStandaloneWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 3) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fStandaloneShortWeekdays, fSymbols->fStandaloneShortWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fStandaloneShortWeekdays, fSymbols->fStandaloneShortWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
if(getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 6) {
if ((newStart = matchString(text, start, UCAL_DAY_OF_WEEK,
- fSymbols->fStandaloneShorterWeekdays, fSymbols->fStandaloneShorterWeekdaysCount, NULL, cal)) > 0)
+ fSymbols->fStandaloneShorterWeekdays, fSymbols->fStandaloneShorterWeekdaysCount, nullptr, cal)) > 0)
return newStart;
}
if (!getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status))
@@ -3442,13 +3468,13 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
int32_t newStart = 0;
// try wide/abbrev
if( getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count < 5 ) {
- if ((newStart = matchString(text, start, UCAL_AM_PM, fSymbols->fAmPms, fSymbols->fAmPmsCount, NULL, cal)) > 0) {
+ if ((newStart = matchString(text, start, UCAL_AM_PM, fSymbols->fAmPms, fSymbols->fAmPmsCount, nullptr, cal)) > 0) {
return newStart;
}
}
// try narrow
if( getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count >= 5 ) {
- if ((newStart = matchString(text, start, UCAL_AM_PM, fSymbols->fNarrowAmPms, fSymbols->fNarrowAmPmsCount, NULL, cal)) > 0) {
+ if ((newStart = matchString(text, start, UCAL_AM_PM, fSymbols->fNarrowAmPms, fSymbols->fNarrowAmPmsCount, nullptr, cal)) > 0) {
return newStart;
}
}
@@ -3547,7 +3573,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3562,7 +3588,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3575,7 +3601,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3602,7 +3628,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3615,7 +3641,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3645,7 +3671,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3675,7 +3701,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
const TimeZoneFormat *tzfmt = tzFormat(status);
if (U_SUCCESS(status)) {
TimeZone *tz = tzfmt->parse(style, text, pos, tzTimeType);
- if (tz != NULL) {
+ if (tz != nullptr) {
cal.adoptTimeZone(tz);
return pos.getIndex();
}
@@ -3686,8 +3712,8 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
// so we should not get here. Leave support in for future definition.
case UDAT_TIME_SEPARATOR_FIELD:
{
- static const UChar def_sep = DateFormatSymbols::DEFAULT_TIME_SEPARATOR;
- static const UChar alt_sep = DateFormatSymbols::ALTERNATE_TIME_SEPARATOR;
+ static const char16_t def_sep = DateFormatSymbols::DEFAULT_TIME_SEPARATOR;
+ static const char16_t alt_sep = DateFormatSymbols::ALTERNATE_TIME_SEPARATOR;
// Try matching a time separator.
int32_t count_sep = 1;
@@ -3704,12 +3730,12 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
data[count_sep++].setTo(alt_sep);
}
- return matchString(text, start, UCAL_FIELD_COUNT /* => nothing to set */, data, count_sep, NULL, cal);
+ return matchString(text, start, UCAL_FIELD_COUNT /* => nothing to set */, data, count_sep, nullptr, cal);
}
case UDAT_AM_PM_MIDNIGHT_NOON_FIELD:
{
- U_ASSERT(dayPeriod != NULL);
+ U_ASSERT(dayPeriod != nullptr);
int32_t ampmStart = subParse(text, start, 0x61, count,
obeyCount, allowNegative, ambiguousYear, saveHebrewMonth, cal,
patLoc, numericLeapMonthFormatter, tzTimeType);
@@ -3746,7 +3772,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
case UDAT_FLEXIBLE_DAY_PERIOD_FIELD:
{
- U_ASSERT(dayPeriod != NULL);
+ U_ASSERT(dayPeriod != nullptr);
int32_t newStart = 0;
if (getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status) || count == 3) {
@@ -3792,6 +3818,9 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
src = &text;
}
parseInt(*src, number, pos, allowNegative,currentNumberFormat);
+ if (obeyCount && !isLenient() && pos.getIndex() < start + count) {
+ return -start;
+ }
if (pos.getIndex() != parseStart) {
int32_t val = number.getLong();
@@ -3881,7 +3910,7 @@ void SimpleDateFormat::parseInt(const UnicodeString& text,
// Memory allocation error
return;
}
- df->setNegativePrefix(UnicodeString(TRUE, SUPPRESS_NEGATIVE_PREFIX, -1));
+ df->setNegativePrefix(UnicodeString(true, SUPPRESS_NEGATIVE_PREFIX, -1));
fmt = df.getAlias();
}
int32_t oldPos = pos.getIndex();
@@ -3936,16 +3965,16 @@ void SimpleDateFormat::translatePattern(const UnicodeString& originalPattern,
}
translatedPattern.remove();
- UBool inQuote = FALSE;
+ UBool inQuote = false;
for (int32_t i = 0; i < originalPattern.length(); ++i) {
- UChar c = originalPattern[i];
+ char16_t c = originalPattern[i];
if (inQuote) {
if (c == QUOTE) {
- inQuote = FALSE;
+ inQuote = false;
}
} else {
if (c == QUOTE) {
- inQuote = TRUE;
+ inQuote = true;
} else if (isSyntaxChar(c)) {
int32_t ci = from.indexOf(c);
if (ci == -1) {
@@ -4001,18 +4030,18 @@ SimpleDateFormat::applyPattern(const UnicodeString& pattern)
// use procedure from adoptNumberFormat to clear overrides
if (fSharedNumberFormatters) {
freeSharedNumberFormatters(fSharedNumberFormatters);
- fSharedNumberFormatters = NULL;
+ fSharedNumberFormatters = nullptr;
}
fDateOverride.setToBogus(); // record status
} else if (fDateOverride.isBogus() && fHasHanYearChar) {
// No current override (=> no Gannen numbering) but new pattern needs it;
// use procedures from initNUmberFormatters / adoptNumberFormat
umtx_lock(&LOCK);
- if (fSharedNumberFormatters == NULL) {
+ if (fSharedNumberFormatters == nullptr) {
fSharedNumberFormatters = allocSharedNumberFormatters();
}
umtx_unlock(&LOCK);
- if (fSharedNumberFormatters != NULL) {
+ if (fSharedNumberFormatters != nullptr) {
Locale ovrLoc(fLocale.getLanguage(),fLocale.getCountry(),fLocale.getVariant(),"numbers=jpanyear");
UErrorCode status = U_ZERO_ERROR;
const SharedNumberFormat *snf = createSharedNumberFormat(ovrLoc, status);
@@ -4067,7 +4096,7 @@ SimpleDateFormat::setDateFormatSymbols(const DateFormatSymbols& newFormatSymbols
//----------------------------------------------------------------------
const TimeZoneFormat*
-SimpleDateFormat::getTimeZoneFormat(void) const {
+SimpleDateFormat::getTimeZoneFormat() const {
// TimeZoneFormat initialization might fail when out of memory.
// If we always initialize TimeZoneFormat instance, we can return
// such status there. For now, this implementation lazily instantiates
@@ -4125,13 +4154,13 @@ SimpleDateFormat::setContext(UDisplayContext value, UErrorCode& status)
DateFormat::setContext(value, status);
#if !UCONFIG_NO_BREAK_ITERATION
if (U_SUCCESS(status)) {
- if ( fCapitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
+ if ( fCapitalizationBrkIter == nullptr && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE) ) {
status = U_ZERO_ERROR;
fCapitalizationBrkIter = BreakIterator::createSentenceInstance(fLocale, status);
if (U_FAILURE(status)) {
delete fCapitalizationBrkIter;
- fCapitalizationBrkIter = NULL;
+ fCapitalizationBrkIter = nullptr;
}
}
}
@@ -4153,9 +4182,9 @@ SimpleDateFormat::isFieldUnitIgnored(const UnicodeString& pattern,
UCalendarDateFields field) {
int32_t fieldLevel = fgCalendarFieldToLevel[field];
int32_t level;
- UChar ch;
- UBool inQuote = FALSE;
- UChar prevCh = 0;
+ char16_t ch;
+ UBool inQuote = false;
+ char16_t prevCh = 0;
int32_t count = 0;
for (int32_t i = 0; i < pattern.length(); ++i) {
@@ -4164,7 +4193,7 @@ SimpleDateFormat::isFieldUnitIgnored(const UnicodeString& pattern,
level = getLevelFromChar(prevCh);
// the larger the level, the smaller the field unit.
if (fieldLevel <= level) {
- return FALSE;
+ return false;
}
count = 0;
}
@@ -4184,16 +4213,16 @@ SimpleDateFormat::isFieldUnitIgnored(const UnicodeString& pattern,
// last item
level = getLevelFromChar(prevCh);
if (fieldLevel <= level) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//----------------------------------------------------------------------
const Locale&
-SimpleDateFormat::getSmpFmtLocale(void) const {
+SimpleDateFormat::getSmpFmtLocale() const {
return fLocale;
}
@@ -4219,7 +4248,7 @@ SimpleDateFormat::checkIntSuffix(const UnicodeString& text, int32_t start,
// get the suffix
DecimalFormat* decfmt = dynamic_cast<DecimalFormat*>(fNumberFormat);
- if (decfmt != NULL) {
+ if (decfmt != nullptr) {
if (isNegative) {
suf = decfmt->getNegativeSuffix(suf);
}
@@ -4271,10 +4300,10 @@ SimpleDateFormat::compareSimpleAffix(const UnicodeString& affix,
// U+0020 is UWhiteSpace. So we have to first do a direct
// match of the run of Pattern_White_Space in the pattern,
// then match any extra characters.
- UBool literalMatch = FALSE;
+ UBool literalMatch = false;
while (pos < input.length() &&
input.char32At(pos) == c) {
- literalMatch = TRUE;
+ literalMatch = true;
i += len;
pos += len;
if (i == affix.length()) {
@@ -4320,7 +4349,7 @@ SimpleDateFormat::compareSimpleAffix(const UnicodeString& affix,
int32_t
SimpleDateFormat::skipPatternWhiteSpace(const UnicodeString& text, int32_t pos) const {
- const UChar* s = text.getBuffer();
+ const char16_t* s = text.getBuffer();
return (int32_t)(PatternProps::skipWhiteSpace(s + pos, text.length() - pos) - s);
}
@@ -4352,26 +4381,26 @@ SimpleDateFormat::tzFormat(UErrorCode &status) const {
}
void SimpleDateFormat::parsePattern() {
- fHasMinute = FALSE;
- fHasSecond = FALSE;
- fHasHanYearChar = FALSE;
+ fHasMinute = false;
+ fHasSecond = false;
+ fHasHanYearChar = false;
int len = fPattern.length();
- UBool inQuote = FALSE;
+ UBool inQuote = false;
for (int32_t i = 0; i < len; ++i) {
- UChar ch = fPattern[i];
+ char16_t ch = fPattern[i];
if (ch == QUOTE) {
inQuote = !inQuote;
}
if (ch == 0x5E74) { // don't care whether this is inside quotes
- fHasHanYearChar = TRUE;
+ fHasHanYearChar = true;
}
if (!inQuote) {
if (ch == 0x6D) { // 0x6D == 'm'
- fHasMinute = TRUE;
+ fHasMinute = true;
}
if (ch == 0x73) { // 0x73 == 's'
- fHasSecond = TRUE;
+ fHasSecond = true;
}
}
}
diff --git a/contrib/libs/icu/i18n/smpdtfst.cpp b/contrib/libs/icu/i18n/smpdtfst.cpp
index db59a4b4ab7..9f9166aceba 100644
--- a/contrib/libs/icu/i18n/smpdtfst.cpp
+++ b/contrib/libs/icu/i18n/smpdtfst.cpp
@@ -29,20 +29,20 @@
U_NAMESPACE_BEGIN
-SimpleDateFormatStaticSets *gStaticSets = NULL;
-UInitOnce gSimpleDateFormatStaticSetsInitOnce = U_INITONCE_INITIALIZER;
+SimpleDateFormatStaticSets *gStaticSets = nullptr;
+UInitOnce gSimpleDateFormatStaticSetsInitOnce {};
SimpleDateFormatStaticSets::SimpleDateFormatStaticSets(UErrorCode &status)
-: fDateIgnorables(NULL),
- fTimeIgnorables(NULL),
- fOtherIgnorables(NULL)
+: fDateIgnorables(nullptr),
+ fTimeIgnorables(nullptr),
+ fOtherIgnorables(nullptr)
{
fDateIgnorables = new UnicodeSet(UNICODE_STRING("[-,./[:whitespace:]]", 20), status);
fTimeIgnorables = new UnicodeSet(UNICODE_STRING("[-.:[:whitespace:]]", 19), status);
fOtherIgnorables = new UnicodeSet(UNICODE_STRING("[:whitespace:]", 14), status);
// Check for null pointers
- if (fDateIgnorables == NULL || fTimeIgnorables == NULL || fOtherIgnorables == NULL) {
+ if (fDateIgnorables == nullptr || fTimeIgnorables == nullptr || fOtherIgnorables == nullptr) {
goto ExitConstrDeleteAll;
}
@@ -54,18 +54,18 @@ SimpleDateFormatStaticSets::SimpleDateFormatStaticSets(UErrorCode &status)
return; // If we reached this point, everything is fine so just exit
ExitConstrDeleteAll: // Remove all sets and return error
- delete fDateIgnorables; fDateIgnorables = NULL;
- delete fTimeIgnorables; fTimeIgnorables = NULL;
- delete fOtherIgnorables; fOtherIgnorables = NULL;
+ delete fDateIgnorables; fDateIgnorables = nullptr;
+ delete fTimeIgnorables; fTimeIgnorables = nullptr;
+ delete fOtherIgnorables; fOtherIgnorables = nullptr;
status = U_MEMORY_ALLOCATION_ERROR;
}
SimpleDateFormatStaticSets::~SimpleDateFormatStaticSets() {
- delete fDateIgnorables; fDateIgnorables = NULL;
- delete fTimeIgnorables; fTimeIgnorables = NULL;
- delete fOtherIgnorables; fOtherIgnorables = NULL;
+ delete fDateIgnorables; fDateIgnorables = nullptr;
+ delete fTimeIgnorables; fTimeIgnorables = nullptr;
+ delete fOtherIgnorables; fOtherIgnorables = nullptr;
}
@@ -76,26 +76,26 @@ SimpleDateFormatStaticSets::~SimpleDateFormatStaticSets() {
//
//------------------------------------------------------------------------------
UBool
-SimpleDateFormatStaticSets::cleanup(void)
+SimpleDateFormatStaticSets::cleanup()
{
delete gStaticSets;
- gStaticSets = NULL;
+ gStaticSets = nullptr;
gSimpleDateFormatStaticSetsInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_BEGIN
static UBool U_CALLCONV
-smpdtfmt_cleanup(void)
+smpdtfmt_cleanup()
{
return SimpleDateFormatStaticSets::cleanup();
}
static void U_CALLCONV smpdtfmt_initSets(UErrorCode &status) {
ucln_i18n_registerCleanup(UCLN_I18N_SMPDTFMT, smpdtfmt_cleanup);
- U_ASSERT(gStaticSets == NULL);
+ U_ASSERT(gStaticSets == nullptr);
gStaticSets = new SimpleDateFormatStaticSets(status);
- if (gStaticSets == NULL) {
+ if (gStaticSets == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -108,7 +108,7 @@ UnicodeSet *SimpleDateFormatStaticSets::getIgnorables(UDateFormatField fieldInde
UErrorCode status = U_ZERO_ERROR;
umtx_initOnce(gSimpleDateFormatStaticSetsInitOnce, &smpdtfmt_initSets, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
switch (fieldIndex) {
diff --git a/contrib/libs/icu/i18n/sortkey.cpp b/contrib/libs/icu/i18n/sortkey.cpp
index 441d15d4263..1fd066cc203 100644
--- a/contrib/libs/icu/i18n/sortkey.cpp
+++ b/contrib/libs/icu/i18n/sortkey.cpp
@@ -61,8 +61,8 @@ CollationKey::CollationKey(const uint8_t* newValues, int32_t count)
: UObject(), fFlagAndLength(count),
fHashCode(kInvalidHashCode)
{
- if (count < 0 || (newValues == NULL && count != 0) ||
- (count > getCapacity() && reallocate(count, 0) == NULL)) {
+ if (count < 0 || (newValues == nullptr && count != 0) ||
+ (count > getCapacity() && reallocate(count, 0) == nullptr)) {
setToBogus();
return;
}
@@ -83,7 +83,7 @@ CollationKey::CollationKey(const CollationKey& other)
}
int32_t length = fFlagAndLength;
- if (length > getCapacity() && reallocate(length, 0) == NULL) {
+ if (length > getCapacity() && reallocate(length, 0) == nullptr) {
setToBogus();
return;
}
@@ -100,7 +100,7 @@ CollationKey::~CollationKey()
uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) {
uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity));
- if(newBytes == NULL) { return NULL; }
+ if(newBytes == nullptr) { return nullptr; }
if(length > 0) {
uprv_memcpy(newBytes, getBytes(), length);
}
@@ -156,7 +156,7 @@ CollationKey::operator=(const CollationKey& other)
}
int32_t length = other.getLength();
- if (length > getCapacity() && reallocate(length, 0) == NULL) {
+ if (length > getCapacity() && reallocate(length, 0) == nullptr) {
return setToBogus();
}
if (length > 0) {
@@ -227,7 +227,7 @@ CollationKey::toByteArray(int32_t& count) const
{
uint8_t *result = (uint8_t*) uprv_malloc( sizeof(uint8_t) * fCount );
- if (result == NULL)
+ if (result == nullptr)
{
count = 0;
}
@@ -247,7 +247,7 @@ static int32_t
computeHashCode(const uint8_t *key, int32_t length) {
const char *s = reinterpret_cast<const char *>(key);
int32_t hash;
- if (s == NULL || length == 0) {
+ if (s == nullptr || length == 0) {
hash = kEmptyHashCode;
} else {
hash = ustr_hashCharsN(s, length);
diff --git a/contrib/libs/icu/i18n/standardplural.cpp b/contrib/libs/icu/i18n/standardplural.cpp
index 5a6069bf7dd..9183e925503 100644
--- a/contrib/libs/icu/i18n/standardplural.cpp
+++ b/contrib/libs/icu/i18n/standardplural.cpp
@@ -84,14 +84,14 @@ int32_t StandardPlural::indexOrNegativeFromString(const char *keyword) {
return -1;
}
-static const UChar gZero[] = u"zero";
-static const UChar gOne[] = u"one";
-static const UChar gTwo[] = u"two";
-static const UChar gFew[] = u"few";
-static const UChar gMany[] = u"many";
-static const UChar gOther[] = u"other";
-static const UChar gEq0[] = u"=0";
-static const UChar gEq1[] = u"=1";
+static const char16_t gZero[] = u"zero";
+static const char16_t gOne[] = u"one";
+static const char16_t gTwo[] = u"two";
+static const char16_t gFew[] = u"few";
+static const char16_t gMany[] = u"many";
+static const char16_t gOther[] = u"other";
+static const char16_t gEq0[] = u"=0";
+static const char16_t gEq1[] = u"=1";
int32_t StandardPlural::indexOrNegativeFromString(const UnicodeString &keyword) {
switch (keyword.length()) {
diff --git a/contrib/libs/icu/i18n/string_segment.cpp b/contrib/libs/icu/i18n/string_segment.cpp
index 5d19ac57f5e..2ddb738f4d0 100644
--- a/contrib/libs/icu/i18n/string_segment.cpp
+++ b/contrib/libs/icu/i18n/string_segment.cpp
@@ -64,7 +64,7 @@ UnicodeString StringSegment::toUnicodeString() const {
const UnicodeString StringSegment::toTempUnicodeString() const {
// Use the readonly-aliasing constructor for efficiency.
- return UnicodeString(FALSE, fStr.getBuffer() + fStart, fEnd - fStart);
+ return UnicodeString(false, fStr.getBuffer() + fStart, fEnd - fStart);
}
UChar32 StringSegment::getCodePoint() const {
@@ -131,8 +131,8 @@ bool StringSegment::codePointsEqual(UChar32 cp1, UChar32 cp2, bool foldCase) {
if (!foldCase) {
return false;
}
- cp1 = u_foldCase(cp1, TRUE);
- cp2 = u_foldCase(cp2, TRUE);
+ cp1 = u_foldCase(cp1, true);
+ cp2 = u_foldCase(cp2, true);
return cp1 == cp2;
}
diff --git a/contrib/libs/icu/i18n/strmatch.cpp b/contrib/libs/icu/i18n/strmatch.cpp
index a20f7873fec..ff52eeacdc4 100644
--- a/contrib/libs/icu/i18n/strmatch.cpp
+++ b/contrib/libs/icu/i18n/strmatch.cpp
@@ -96,7 +96,7 @@ UMatchDegree StringMatcher::matches(const Replaceable& text,
if (limit < cursor) {
// Match in the reverse direction
for (i=pattern.length()-1; i>=0; --i) {
- UChar keyChar = pattern.charAt(i);
+ char16_t keyChar = pattern.charAt(i);
UnicodeMatcher* subm = data->lookupMatcher(keyChar);
if (subm == 0) {
if (cursor > limit &&
@@ -127,11 +127,11 @@ UMatchDegree StringMatcher::matches(const Replaceable& text,
// without completing our match.
return U_PARTIAL_MATCH;
}
- UChar keyChar = pattern.charAt(i);
+ char16_t keyChar = pattern.charAt(i);
UnicodeMatcher* subm = data->lookupMatcher(keyChar);
if (subm == 0) {
// Don't need the cursor < limit check if
- // incremental is TRUE (because it's done above); do need
+ // incremental is true (because it's done above); do need
// it otherwise.
if (cursor < limit &&
keyChar == text.charAt(cursor)) {
@@ -165,24 +165,24 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result,
result.truncate(0);
UnicodeString str, quoteBuf;
if (segmentNumber > 0) {
- result.append((UChar)40); /*(*/
+ result.append((char16_t)40); /*(*/
}
for (int32_t i=0; i<pattern.length(); ++i) {
- UChar keyChar = pattern.charAt(i);
+ char16_t keyChar = pattern.charAt(i);
const UnicodeMatcher* m = data->lookupMatcher(keyChar);
if (m == 0) {
- ICU_Utility::appendToRule(result, keyChar, FALSE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(result, keyChar, false, escapeUnprintable, quoteBuf);
} else {
ICU_Utility::appendToRule(result, m->toPattern(str, escapeUnprintable),
- TRUE, escapeUnprintable, quoteBuf);
+ true, escapeUnprintable, quoteBuf);
}
}
if (segmentNumber > 0) {
- result.append((UChar)41); /*)*/
+ result.append((char16_t)41); /*)*/
}
// Flush quoteBuf out to result
ICU_Utility::appendToRule(result, -1,
- TRUE, escapeUnprintable, quoteBuf);
+ true, escapeUnprintable, quoteBuf);
return result;
}
@@ -191,7 +191,7 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result,
*/
UBool StringMatcher::matchesIndexValue(uint8_t v) const {
if (pattern.length() == 0) {
- return TRUE;
+ return true;
}
UChar32 c = pattern.char32At(0);
const UnicodeMatcher *m = data->lookupMatcher(c);
@@ -206,7 +206,7 @@ void StringMatcher::addMatchSetTo(UnicodeSet& toUnionTo) const {
for (int32_t i=0; i<pattern.length(); i+=U16_LENGTH(ch)) {
ch = pattern.char32At(i);
const UnicodeMatcher* matcher = data->lookupMatcher(ch);
- if (matcher == NULL) {
+ if (matcher == nullptr) {
toUnionTo.add(ch);
} else {
matcher->addMatchSetTo(toUnionTo);
@@ -247,7 +247,7 @@ UnicodeString& StringMatcher::toReplacerPattern(UnicodeString& rule,
UBool /*escapeUnprintable*/) const {
// assert(segmentNumber > 0);
rule.truncate(0);
- rule.append((UChar)0x0024 /*$*/);
+ rule.append((char16_t)0x0024 /*$*/);
ICU_Utility::appendNumber(rule, segmentNumber, 10, 1);
return rule;
}
@@ -282,7 +282,7 @@ void StringMatcher::setData(const TransliterationRuleData* d) {
while (i<pattern.length()) {
UChar32 c = pattern.char32At(i);
UnicodeFunctor* f = data->lookup(c);
- if (f != NULL) {
+ if (f != nullptr) {
f->setData(data);
}
i += U16_LENGTH(c);
diff --git a/contrib/libs/icu/i18n/strrepl.cpp b/contrib/libs/icu/i18n/strrepl.cpp
index 9fafeb2659c..2981553869a 100644
--- a/contrib/libs/icu/i18n/strrepl.cpp
+++ b/contrib/libs/icu/i18n/strrepl.cpp
@@ -41,9 +41,9 @@ StringReplacer::StringReplacer(const UnicodeString& theOutput,
const TransliterationRuleData* theData) {
output = theOutput;
cursorPos = theCursorPos;
- hasCursor = TRUE;
+ hasCursor = true;
data = theData;
- isComplex = TRUE;
+ isComplex = true;
}
/**
@@ -59,9 +59,9 @@ StringReplacer::StringReplacer(const UnicodeString& theOutput,
const TransliterationRuleData* theData) {
output = theOutput;
cursorPos = 0;
- hasCursor = FALSE;
+ hasCursor = false;
data = theData;
- isComplex = TRUE;
+ isComplex = true;
}
/**
@@ -131,7 +131,7 @@ int32_t StringReplacer::replace(Replaceable& text,
*/
UnicodeString buf;
int32_t oOutput; // offset into 'output'
- isComplex = FALSE;
+ isComplex = false;
// The temporary buffer starts at tempStart, and extends
// to destLimit. The start of the buffer has a single
@@ -149,7 +149,7 @@ int32_t StringReplacer::replace(Replaceable& text,
text.copy(start-len, start, tempStart);
destStart += len;
} else {
- UnicodeString str((UChar) 0xFFFF);
+ UnicodeString str((char16_t) 0xFFFF);
text.handleReplaceBetween(tempStart, tempStart, str);
destStart++;
}
@@ -162,11 +162,11 @@ int32_t StringReplacer::replace(Replaceable& text,
}
UChar32 c = output.char32At(oOutput);
UnicodeReplacer* r = data->lookupReplacer(c);
- if (r == NULL) {
+ if (r == nullptr) {
// Accumulate straight (non-segment) text.
buf.append(c);
} else {
- isComplex = TRUE;
+ isComplex = true;
// Insert any accumulated straight text.
if (buf.length() > 0) {
@@ -249,27 +249,27 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule,
// Handle a cursor preceding the output
if (hasCursor && cursor < 0) {
while (cursor++ < 0) {
- ICU_Utility::appendToRule(rule, (UChar)0x0040 /*@*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t)0x0040 /*@*/, true, escapeUnprintable, quoteBuf);
}
// Fall through and append '|' below
}
for (int32_t i=0; i<output.length(); ++i) {
if (hasCursor && i == cursor) {
- ICU_Utility::appendToRule(rule, (UChar)0x007C /*|*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t)0x007C /*|*/, true, escapeUnprintable, quoteBuf);
}
- UChar c = output.charAt(i); // Ok to use 16-bits here
+ char16_t c = output.charAt(i); // Ok to use 16-bits here
UnicodeReplacer* r = data->lookupReplacer(c);
- if (r == NULL) {
- ICU_Utility::appendToRule(rule, c, FALSE, escapeUnprintable, quoteBuf);
+ if (r == nullptr) {
+ ICU_Utility::appendToRule(rule, c, false, escapeUnprintable, quoteBuf);
} else {
UnicodeString buf;
r->toReplacerPattern(buf, escapeUnprintable);
- buf.insert(0, (UChar)0x20);
- buf.append((UChar)0x20);
+ buf.insert(0, (char16_t)0x20);
+ buf.append((char16_t)0x20);
ICU_Utility::appendToRule(rule, buf,
- TRUE, escapeUnprintable, quoteBuf);
+ true, escapeUnprintable, quoteBuf);
}
}
@@ -279,13 +279,13 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule,
if (hasCursor && cursor > output.length()) {
cursor -= output.length();
while (cursor-- > 0) {
- ICU_Utility::appendToRule(rule, (UChar)0x0040 /*@*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t)0x0040 /*@*/, true, escapeUnprintable, quoteBuf);
}
- ICU_Utility::appendToRule(rule, (UChar)0x007C /*|*/, TRUE, escapeUnprintable, quoteBuf);
+ ICU_Utility::appendToRule(rule, (char16_t)0x007C /*|*/, true, escapeUnprintable, quoteBuf);
}
// Flush quoteBuf out to result
ICU_Utility::appendToRule(rule, -1,
- TRUE, escapeUnprintable, quoteBuf);
+ true, escapeUnprintable, quoteBuf);
return rule;
}
@@ -298,7 +298,7 @@ void StringReplacer::addReplacementSetTo(UnicodeSet& toUnionTo) const {
for (int32_t i=0; i<output.length(); i+=U16_LENGTH(ch)) {
ch = output.char32At(i);
UnicodeReplacer* r = data->lookupReplacer(ch);
- if (r == NULL) {
+ if (r == nullptr) {
toUnionTo.add(ch);
} else {
r->addReplacementSetTo(toUnionTo);
@@ -315,7 +315,7 @@ void StringReplacer::setData(const TransliterationRuleData* d) {
while (i<output.length()) {
UChar32 c = output.char32At(i);
UnicodeFunctor* f = data->lookup(c);
- if (f != NULL) {
+ if (f != nullptr) {
f->setData(data);
}
i += U16_LENGTH(c);
diff --git a/contrib/libs/icu/i18n/stsearch.cpp b/contrib/libs/icu/i18n/stsearch.cpp
index 1bade8fbd11..395ce1cdc11 100644
--- a/contrib/libs/icu/i18n/stsearch.cpp
+++ b/contrib/libs/icu/i18n/stsearch.cpp
@@ -32,7 +32,7 @@ StringSearch::StringSearch(const UnicodeString &pattern,
m_pattern_(pattern)
{
if (U_FAILURE(status)) {
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
return;
}
@@ -41,7 +41,7 @@ StringSearch::StringSearch(const UnicodeString &pattern,
locale.getName(), (UBreakIterator *)breakiter,
&status);
uprv_free(m_search_);
- m_search_ = NULL;
+ m_search_ = nullptr;
if (U_SUCCESS(status)) {
// m_search_ has been created by the base SearchIterator class
@@ -58,12 +58,12 @@ StringSearch::StringSearch(const UnicodeString &pattern,
m_pattern_(pattern)
{
if (U_FAILURE(status)) {
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
return;
}
- if (coll == NULL) {
+ if (coll == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
return;
}
m_strsrch_ = usearch_openFromCollator(m_pattern_.getBuffer(),
@@ -73,7 +73,7 @@ StringSearch::StringSearch(const UnicodeString &pattern,
(UBreakIterator *)breakiter,
&status);
uprv_free(m_search_);
- m_search_ = NULL;
+ m_search_ = nullptr;
if (U_SUCCESS(status)) {
// m_search_ has been created by the base SearchIterator class
@@ -90,7 +90,7 @@ StringSearch::StringSearch(const UnicodeString &pattern,
m_pattern_(pattern)
{
if (U_FAILURE(status)) {
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
return;
}
m_strsrch_ = usearch_open(m_pattern_.getBuffer(), m_pattern_.length(),
@@ -98,7 +98,7 @@ StringSearch::StringSearch(const UnicodeString &pattern,
locale.getName(), (UBreakIterator *)breakiter,
&status);
uprv_free(m_search_);
- m_search_ = NULL;
+ m_search_ = nullptr;
if (U_SUCCESS(status)) {
// m_search_ has been created by the base SearchIterator class
@@ -115,12 +115,12 @@ StringSearch::StringSearch(const UnicodeString &pattern,
m_pattern_(pattern)
{
if (U_FAILURE(status)) {
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
return;
}
- if (coll == NULL) {
+ if (coll == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
return;
}
m_strsrch_ = usearch_openFromCollator(m_pattern_.getBuffer(),
@@ -130,7 +130,7 @@ StringSearch::StringSearch(const UnicodeString &pattern,
(UBreakIterator *)breakiter,
&status);
uprv_free(m_search_);
- m_search_ = NULL;
+ m_search_ = nullptr;
if (U_SUCCESS(status)) {
// m_search_ has been created by the base SearchIterator class
@@ -146,11 +146,11 @@ StringSearch::StringSearch(const StringSearch &that) :
// Free m_search_ from the superclass
uprv_free(m_search_);
- m_search_ = NULL;
+ m_search_ = nullptr;
- if (that.m_strsrch_ == NULL) {
+ if (that.m_strsrch_ == nullptr) {
// This was not a good copy
- m_strsrch_ = NULL;
+ m_strsrch_ = nullptr;
}
else {
// Make a deep copy
@@ -170,9 +170,9 @@ StringSearch::StringSearch(const StringSearch &that) :
StringSearch::~StringSearch()
{
- if (m_strsrch_ != NULL) {
+ if (m_strsrch_ != nullptr) {
usearch_close(m_strsrch_);
- m_search_ = NULL;
+ m_search_ = nullptr;
}
}
@@ -196,9 +196,9 @@ StringSearch & StringSearch::operator=(const StringSearch &that)
m_text_.getBuffer(),
m_text_.length(),
that.m_strsrch_->collator,
- NULL, &status);
+ nullptr, &status);
// Check null pointer
- if (m_strsrch_ != NULL) {
+ if (m_strsrch_ != nullptr) {
m_search_ = m_strsrch_->search;
}
}
@@ -211,9 +211,10 @@ bool StringSearch::operator==(const SearchIterator &that) const
return true;
}
if (SearchIterator::operator ==(that)) {
- StringSearch &thatsrch = (StringSearch &)that;
- return (this->m_pattern_ == thatsrch.m_pattern_ &&
- this->m_strsrch_->collator == thatsrch.m_strsrch_->collator);
+ const StringSearch *thatsrch = dynamic_cast<const StringSearch *>(&that);
+ if (thatsrch == nullptr) return false;
+ return (this->m_pattern_ == thatsrch->m_pattern_ &&
+ this->m_strsrch_->collator == thatsrch->m_strsrch_->collator);
}
return false;
}
@@ -226,7 +227,7 @@ void StringSearch::setOffset(int32_t position, UErrorCode &status)
usearch_setOffset(m_strsrch_, position, &status);
}
-int32_t StringSearch::getOffset(void) const
+int32_t StringSearch::getOffset() const
{
return usearch_getOffset(m_strsrch_);
}
@@ -289,7 +290,7 @@ StringSearch * StringSearch::safeClone() const
getCollator(),
m_breakiterator_,
status);
- /* test for NULL */
+ /* test for nullptr */
if (result == 0) {
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
@@ -298,7 +299,7 @@ StringSearch * StringSearch::safeClone() const
result->setMatchStart(m_strsrch_->search->matchedIndex);
result->setMatchLength(m_strsrch_->search->matchedLength);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
return result;
}
@@ -355,7 +356,7 @@ int32_t StringSearch::handleNext(int32_t position, UErrorCode &status)
if (U_FAILURE(status)) {
return USEARCH_DONE;
}
- if (m_breakiterator_ == NULL
+ if (m_breakiterator_ == nullptr
#if !UCONFIG_NO_BREAK_ITERATION
||
m_search_->matchedIndex == USEARCH_DONE ||
@@ -443,7 +444,7 @@ int32_t StringSearch::handlePrev(int32_t position, UErrorCode &status)
if (U_FAILURE(status)) {
return USEARCH_DONE;
}
- if (m_breakiterator_ == NULL
+ if (m_breakiterator_ == nullptr
#if !UCONFIG_NO_BREAK_ITERATION
||
m_search_->matchedIndex == USEARCH_DONE ||
diff --git a/contrib/libs/icu/i18n/taiwncal.cpp b/contrib/libs/icu/i18n/taiwncal.cpp
index 27352aa10c3..48f0b99e18d 100644
--- a/contrib/libs/icu/i18n/taiwncal.cpp
+++ b/contrib/libs/icu/i18n/taiwncal.cpp
@@ -140,11 +140,11 @@ void TaiwanCalendar::timeToFields(UDate theTime, UBool quick, UErrorCode& status
*/
static UDate gSystemDefaultCenturyStart = DBL_MIN;
static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemDefaultCenturyInit {};
UBool TaiwanCalendar::haveDefaultCentury() const
{
- return TRUE;
+ return true;
}
static void U_CALLCONV initializeSystemDefaultCentury()
diff --git a/contrib/libs/icu/i18n/taiwncal.h b/contrib/libs/icu/i18n/taiwncal.h
index ab6b6aff099..b0a30f91080 100644
--- a/contrib/libs/icu/i18n/taiwncal.h
+++ b/contrib/libs/icu/i18n/taiwncal.h
@@ -104,7 +104,7 @@ public:
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
- 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
@@ -117,7 +117,7 @@ public:
* @return The class ID for all objects of this class.
* @internal
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "Taiwan".
diff --git a/contrib/libs/icu/i18n/timezone.cpp b/contrib/libs/icu/i18n/timezone.cpp
index 8115a45e0ac..75479267d75 100644
--- a/contrib/libs/icu/i18n/timezone.cpp
+++ b/contrib/libs/icu/i18n/timezone.cpp
@@ -105,15 +105,15 @@ static char gStrBuf[256];
// Static data and constants
-static const UChar WORLD[] = {0x30, 0x30, 0x31, 0x00}; /* "001" */
+static const char16_t WORLD[] = {0x30, 0x30, 0x31, 0x00}; /* "001" */
-static const UChar GMT_ID[] = {0x47, 0x4D, 0x54, 0x00}; /* "GMT" */
-static const UChar UNKNOWN_ZONE_ID[] = {0x45, 0x74, 0x63, 0x2F, 0x55, 0x6E, 0x6B, 0x6E, 0x6F, 0x77, 0x6E, 0x00}; /* "Etc/Unknown" */
+static const char16_t GMT_ID[] = {0x47, 0x4D, 0x54, 0x00}; /* "GMT" */
+static const char16_t UNKNOWN_ZONE_ID[] = {0x45, 0x74, 0x63, 0x2F, 0x55, 0x6E, 0x6B, 0x6E, 0x6F, 0x77, 0x6E, 0x00}; /* "Etc/Unknown" */
static const int32_t GMT_ID_LENGTH = 3;
static const int32_t UNKNOWN_ZONE_ID_LENGTH = 11;
-static icu::TimeZone* DEFAULT_ZONE = NULL;
-static icu::UInitOnce gDefaultZoneInitOnce = U_INITONCE_INITIALIZER;
+static icu::TimeZone* DEFAULT_ZONE = nullptr;
+static icu::UInitOnce gDefaultZoneInitOnce {};
alignas(icu::SimpleTimeZone)
static char gRawGMT[sizeof(icu::SimpleTimeZone)];
@@ -121,36 +121,36 @@ static char gRawGMT[sizeof(icu::SimpleTimeZone)];
alignas(icu::SimpleTimeZone)
static char gRawUNKNOWN[sizeof(icu::SimpleTimeZone)];
-static icu::UInitOnce gStaticZonesInitOnce = U_INITONCE_INITIALIZER;
-static UBool gStaticZonesInitialized = FALSE; // Whether the static zones are initialized and ready to use.
+static icu::UInitOnce gStaticZonesInitOnce {};
+static UBool gStaticZonesInitialized = false; // Whether the static zones are initialized and ready to use.
static char TZDATA_VERSION[16];
-static icu::UInitOnce gTZDataVersionInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gTZDataVersionInitOnce {};
-static int32_t* MAP_SYSTEM_ZONES = NULL;
-static int32_t* MAP_CANONICAL_SYSTEM_ZONES = NULL;
-static int32_t* MAP_CANONICAL_SYSTEM_LOCATION_ZONES = NULL;
+static int32_t* MAP_SYSTEM_ZONES = nullptr;
+static int32_t* MAP_CANONICAL_SYSTEM_ZONES = nullptr;
+static int32_t* MAP_CANONICAL_SYSTEM_LOCATION_ZONES = nullptr;
static int32_t LEN_SYSTEM_ZONES = 0;
static int32_t LEN_CANONICAL_SYSTEM_ZONES = 0;
static int32_t LEN_CANONICAL_SYSTEM_LOCATION_ZONES = 0;
-static icu::UInitOnce gSystemZonesInitOnce = U_INITONCE_INITIALIZER;
-static icu::UInitOnce gCanonicalZonesInitOnce = U_INITONCE_INITIALIZER;
-static icu::UInitOnce gCanonicalLocationZonesInitOnce = U_INITONCE_INITIALIZER;
+static icu::UInitOnce gSystemZonesInitOnce {};
+static icu::UInitOnce gCanonicalZonesInitOnce {};
+static icu::UInitOnce gCanonicalLocationZonesInitOnce {};
U_CDECL_BEGIN
-static UBool U_CALLCONV timeZone_cleanup(void)
+static UBool U_CALLCONV timeZone_cleanup()
{
U_NAMESPACE_USE
delete DEFAULT_ZONE;
- DEFAULT_ZONE = NULL;
+ DEFAULT_ZONE = nullptr;
gDefaultZoneInitOnce.reset();
if (gStaticZonesInitialized) {
reinterpret_cast<SimpleTimeZone*>(gRawGMT)->~SimpleTimeZone();
reinterpret_cast<SimpleTimeZone*>(gRawUNKNOWN)->~SimpleTimeZone();
- gStaticZonesInitialized = FALSE;
+ gStaticZonesInitialized = false;
gStaticZonesInitOnce.reset();
}
@@ -172,7 +172,7 @@ static UBool U_CALLCONV timeZone_cleanup(void)
MAP_CANONICAL_SYSTEM_LOCATION_ZONES = 0;
gCanonicalLocationZonesInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -181,7 +181,7 @@ U_NAMESPACE_BEGIN
static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id, UErrorCode &status)
{
UnicodeString copy;
- const UChar *u;
+ const char16_t *u;
int32_t len;
int32_t start = 0;
@@ -204,7 +204,7 @@ static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id
break;
}
U_DEBUG_TZ_MSG(("tz: compare to %s, %d .. [%d] .. %d\n", U_DEBUG_TZ_STR(u), start, mid, limit));
- copy.setTo(TRUE, u, len);
+ copy.setTo(true, u, len);
int r = id.compare(copy);
if(r==0) {
U_DEBUG_TZ_MSG(("fisa: found at %d\n", mid));
@@ -223,12 +223,12 @@ static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id
* Fetch a specific zone by name. Replaces the getByKey call.
* @param top Top timezone resource
* @param id Time zone ID
- * @param oldbundle Bundle for reuse (or NULL). see 'ures_open()'
+ * @param oldbundle Bundle for reuse (or nullptr). see 'ures_open()'
* @return the zone's bundle if found, or undefined if error. Reuses oldbundle.
*/
static UResourceBundle* getZoneByName(const UResourceBundle* top, const UnicodeString& id, UResourceBundle *oldbundle, UErrorCode& status) {
// load the Rules object
- UResourceBundle *tmp = ures_getByKey(top, kNAMES, NULL, &status);
+ UResourceBundle *tmp = ures_getByKey(top, kNAMES, nullptr, &status);
// search for the string
int32_t idx = findInStringArray(tmp, id, status);
@@ -237,7 +237,7 @@ static UResourceBundle* getZoneByName(const UResourceBundle* top, const UnicodeS
// not found
status = U_MISSING_RESOURCE_ERROR;
//ures_close(oldbundle);
- //oldbundle = NULL;
+ //oldbundle = nullptr;
} else {
U_DEBUG_TZ_MSG(("gzbn: oldbundle= size %d, type %d, %s\n", ures_getSize(tmp), ures_getType(tmp), u_errorName(status)));
tmp = ures_getByKey(top, kZONES, tmp, &status); // get Zones object from top
@@ -248,7 +248,7 @@ static UResourceBundle* getZoneByName(const UResourceBundle* top, const UnicodeS
ures_close(tmp);
if(U_FAILURE(status)) {
//ures_close(oldbundle);
- return NULL;
+ return nullptr;
} else {
return oldbundle;
}
@@ -291,7 +291,7 @@ static UResourceBundle* openOlsonResource(const UnicodeString& id,
if (ures_getType(&res) == URES_INT) {
int32_t deref = ures_getInt(&res, &ec) + 0;
U_DEBUG_TZ_MSG(("getInt: %s - type is %d\n", u_errorName(ec), ures_getType(&res)));
- UResourceBundle *ares = ures_getByKey(top, kZONES, NULL, &ec); // dereference Zones section
+ UResourceBundle *ares = ures_getByKey(top, kZONES, nullptr, &ec); // dereference Zones section
ures_getByIndex(ares, deref, &res, &ec);
ures_close(ares);
U_DEBUG_TZ_MSG(("alias to #%d (%s) - %s\n", deref, "??", u_errorName(ec)));
@@ -312,10 +312,10 @@ void U_CALLCONV initStaticTimeZones() {
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup);
// new can't fail below, as we use placement new into statically allocated space.
- new(gRawGMT) SimpleTimeZone(0, UnicodeString(TRUE, GMT_ID, GMT_ID_LENGTH));
- new(gRawUNKNOWN) SimpleTimeZone(0, UnicodeString(TRUE, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH));
+ new(gRawGMT) SimpleTimeZone(0, UnicodeString(true, GMT_ID, GMT_ID_LENGTH));
+ new(gRawUNKNOWN) SimpleTimeZone(0, UnicodeString(true, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH));
- gStaticZonesInitialized = TRUE;
+ gStaticZonesInitialized = true;
}
} // anonymous namespace
@@ -328,7 +328,7 @@ TimeZone::getUnknown()
}
const TimeZone* U_EXPORT2
-TimeZone::getGMT(void)
+TimeZone::getGMT()
{
umtx_initOnce(gStaticZonesInitOnce, &initStaticTimeZones);
return reinterpret_cast<SimpleTimeZone*>(gRawGMT);
@@ -389,7 +389,7 @@ namespace {
TimeZone*
createSystemTimeZone(const UnicodeString& id, UErrorCode& ec) {
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
TimeZone* z = 0;
StackUResourceBundle res;
@@ -398,7 +398,7 @@ createSystemTimeZone(const UnicodeString& id, UErrorCode& ec) {
U_DEBUG_TZ_MSG(("post-err=%s\n", u_errorName(ec)));
if (U_SUCCESS(ec)) {
z = new OlsonTimeZone(top, res.getAlias(), id, ec);
- if (z == NULL) {
+ if (z == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
U_DEBUG_TZ_MSG(("cstz: olson time zone failed to initialize - err %s\n", u_errorName(ec)));
}
@@ -407,7 +407,7 @@ createSystemTimeZone(const UnicodeString& id, UErrorCode& ec) {
if (U_FAILURE(ec)) {
U_DEBUG_TZ_MSG(("cstz: failed to create, err %s\n", u_errorName(ec)));
delete z;
- z = NULL;
+ z = nullptr;
}
return z;
}
@@ -433,16 +433,16 @@ TimeZone::createTimeZone(const UnicodeString& ID)
* all else fails, we return GMT, which is probably not what the
* user wants, but at least is a functioning TimeZone object.
*
- * We cannot return NULL, because that would break compatibility
+ * We cannot return nullptr, because that would break compatibility
* with the JDK.
*/
TimeZone* result = createSystemTimeZone(ID);
- if (result == NULL) {
+ if (result == nullptr) {
U_DEBUG_TZ_MSG(("failed to load system time zone with id - falling to custom"));
result = createCustomTimeZone(ID);
}
- if (result == NULL) {
+ if (result == nullptr) {
U_DEBUG_TZ_MSG(("failed to load time zone with id - falling to Etc/Unknown(GMT)"));
const TimeZone& unknown = getUnknown();
// Unknown zone uses statically allocated memory, so creation of it can never fail due to OOM.
@@ -460,7 +460,7 @@ TimeZone::detectHostTimeZone()
// which have platform specific implementations in putil.cpp
int32_t rawOffset = 0;
const char *hostID;
- UBool hostDetectionSucceeded = TRUE;
+ UBool hostDetectionSucceeded = true;
// First, try to create a system timezone, based
// on the string ID in tzname[0].
@@ -477,15 +477,15 @@ TimeZone::detectHostTimeZone()
// Invert sign because UNIX semantics are backwards
rawOffset = uprv_timezone() * -U_MILLIS_PER_SECOND;
- TimeZone* hostZone = NULL;
+ TimeZone* hostZone = nullptr;
UnicodeString hostStrID(hostID, -1, US_INV);
if (hostStrID.length() == 0) {
// The host time zone detection (or remapping) above has failed and
// we have no name at all. Fallback to using the Unknown zone.
- hostStrID = UnicodeString(TRUE, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH);
- hostDetectionSucceeded = FALSE;
+ hostStrID = UnicodeString(true, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH);
+ hostDetectionSucceeded = false;
}
hostZone = createSystemTimeZone(hostStrID);
@@ -496,18 +496,18 @@ TimeZone::detectHostTimeZone()
#endif
int32_t hostIDLen = hostStrID.length();
- if (hostZone != NULL && rawOffset != hostZone->getRawOffset()
+ if (hostZone != nullptr && rawOffset != hostZone->getRawOffset()
&& (3 <= hostIDLen && hostIDLen <= 4))
{
// Uh oh. This probably wasn't a good id.
// It was probably an ambiguous abbreviation
delete hostZone;
- hostZone = NULL;
+ hostZone = nullptr;
}
// Construct a fixed standard zone with the host's ID
// and raw offset.
- if (hostZone == NULL && hostDetectionSucceeded) {
+ if (hostZone == nullptr && hostDetectionSucceeded) {
hostZone = new SimpleTimeZone(rawOffset, hostStrID);
}
@@ -516,7 +516,7 @@ TimeZone::detectHostTimeZone()
// Note: This is extremely unlikely situation. If
// new SimpleTimeZone(...) above fails, the following
// code may also fail.
- if (hostZone == NULL) {
+ if (hostZone == nullptr) {
// Unknown zone uses static allocated memory, so it must always exist.
// However, clone() allocates memory and can fail.
hostZone = TimeZone::getUnknown().clone();
@@ -531,8 +531,8 @@ static UMutex gDefaultZoneMutex;
/**
* Initialize DEFAULT_ZONE from the system default time zone.
- * Upon return, DEFAULT_ZONE will not be NULL, unless operator new()
- * returns NULL.
+ * Upon return, DEFAULT_ZONE will not be nullptr, unless operator new()
+ * returns nullptr.
*/
static void U_CALLCONV initDefault()
{
@@ -541,7 +541,7 @@ static void U_CALLCONV initDefault()
Mutex lock(&gDefaultZoneMutex);
// If setDefault() has already been called we can skip getting the
// default zone information from the system.
- if (DEFAULT_ZONE != NULL) {
+ if (DEFAULT_ZONE != nullptr) {
return;
}
@@ -560,7 +560,7 @@ static void U_CALLCONV initDefault()
TimeZone *default_zone = TimeZone::detectHostTimeZone();
- U_ASSERT(DEFAULT_ZONE == NULL);
+ U_ASSERT(DEFAULT_ZONE == nullptr);
DEFAULT_ZONE = default_zone;
}
@@ -573,7 +573,7 @@ TimeZone::createDefault()
umtx_initOnce(gDefaultZoneInitOnce, initDefault);
{
Mutex lock(&gDefaultZoneMutex);
- return (DEFAULT_ZONE != NULL) ? DEFAULT_ZONE->clone() : NULL;
+ return (DEFAULT_ZONE != nullptr) ? DEFAULT_ZONE->clone() : nullptr;
}
}
@@ -600,7 +600,7 @@ TimeZone::forLocaleOrDefault(const Locale& locale)
void U_EXPORT2
TimeZone::adoptDefault(TimeZone* zone)
{
- if (zone != NULL)
+ if (zone != nullptr)
{
{
Mutex lock(&gDefaultZoneMutex);
@@ -630,7 +630,7 @@ static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) {
if (U_SUCCESS(ec)) {
int32_t size = ures_getSize(res);
int32_t *m = (int32_t *)uprv_malloc(size * sizeof(int32_t));
- if (m == NULL) {
+ if (m == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
} else {
int32_t numEntries = 0;
@@ -655,7 +655,7 @@ static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) {
}
}
if (type == UCAL_ZONE_TYPE_CANONICAL_LOCATION) {
- const UChar *region = TimeZone::getRegion(id, ec);
+ const char16_t *region = TimeZone::getRegion(id, ec);
if (U_FAILURE(ec)) {
break;
}
@@ -669,7 +669,7 @@ static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) {
if (U_SUCCESS(ec)) {
int32_t *tmp = m;
m = (int32_t *)uprv_realloc(tmp, numEntries * sizeof(int32_t));
- if (m == NULL) {
+ if (m == nullptr) {
// realloc failed.. use the original one even it has unused
// area at the end
m = tmp;
@@ -677,17 +677,17 @@ static void U_CALLCONV initMap(USystemTimeZoneType type, UErrorCode& ec) {
switch(type) {
case UCAL_ZONE_TYPE_ANY:
- U_ASSERT(MAP_SYSTEM_ZONES == NULL);
+ U_ASSERT(MAP_SYSTEM_ZONES == nullptr);
MAP_SYSTEM_ZONES = m;
LEN_SYSTEM_ZONES = numEntries;
break;
case UCAL_ZONE_TYPE_CANONICAL:
- U_ASSERT(MAP_CANONICAL_SYSTEM_ZONES == NULL);
+ U_ASSERT(MAP_CANONICAL_SYSTEM_ZONES == nullptr);
MAP_CANONICAL_SYSTEM_ZONES = m;
LEN_CANONICAL_SYSTEM_ZONES = numEntries;
break;
case UCAL_ZONE_TYPE_CANONICAL_LOCATION:
- U_ASSERT(MAP_CANONICAL_SYSTEM_LOCATION_ZONES == NULL);
+ U_ASSERT(MAP_CANONICAL_SYSTEM_LOCATION_ZONES == nullptr);
MAP_CANONICAL_SYSTEM_LOCATION_ZONES = m;
LEN_CANONICAL_SYSTEM_LOCATION_ZONES = numEntries;
break;
@@ -716,12 +716,12 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset,
date += rawOffset; // now in local standard millis
}
- // When local == TRUE, date might not be in local standard
+ // When local == true, date might not be in local standard
// millis. getOffset taking 7 parameters used here assume
// the given time in day is local standard time.
// At STD->DST transition, there is a range of time which
// does not exist. When 'date' is in this time range
- // (and local == TRUE), this method interprets the specified
+ // (and local == true), this method interprets the specified
// local time as DST. At DST->STD transition, there is a
// range of time which occurs twice. In this case, this
// method interprets the specified local time as STD.
@@ -729,9 +729,8 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset,
// (with 7 args) twice when local == true and DST is
// detected in the initial call.
for (int32_t pass=0; ; ++pass) {
- int32_t year, month, dom, dow;
- double day = uprv_floor(date / U_MILLIS_PER_DAY);
- int32_t millis = (int32_t) (date - day * U_MILLIS_PER_DAY);
+ int32_t year, month, dom, dow, millis;
+ double day = ClockMath::floorDivide(date, U_MILLIS_PER_DAY, &millis);
Grego::dayToFields(day, year, month, dom, dow);
@@ -740,7 +739,7 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset,
Grego::monthLength(year, month),
ec) - rawOffset;
- // Recompute if local==TRUE, dstOffset!=0.
+ // Recompute if local==true, dstOffset!=0.
if (pass!=0 || !local || dstOffset == 0) {
break;
}
@@ -757,7 +756,7 @@ class TZEnumeration : public StringEnumeration {
private:
// Map into to zones. Our results are zone[map[i]] for
- // i=0..len-1, where zone[i] is the i-th Olson zone. If map==NULL
+ // i=0..len-1, where zone[i] is the i-th Olson zone. If map==nullptr
// then our results are zone[i] for i=0..len-1. Len will be zero
// if the zone data could not be loaded.
int32_t* map;
@@ -767,13 +766,13 @@ private:
TZEnumeration(int32_t* mapData, int32_t mapLen, UBool adoptMapData) : pos(0) {
map = mapData;
- localMap = adoptMapData ? mapData : NULL;
+ localMap = adoptMapData ? mapData : nullptr;
len = mapLen;
}
UBool getID(int32_t i, UErrorCode& ec) {
int32_t idLen = 0;
- const UChar* id = NULL;
+ const char16_t* id = nullptr;
UResourceBundle *top = ures_openDirect(0, kZONEINFO, &ec);
top = ures_getByKey(top, kNAMES, top, &ec); // dereference Zones section
id = ures_getStringByIndex(top, i, &idLen, &ec);
@@ -781,7 +780,7 @@ private:
unistr.truncate(0);
}
else {
- unistr.fastCopyFrom(UnicodeString(TRUE, id, idLen));
+ unistr.fastCopyFrom(UnicodeString(true, id, idLen));
}
ures_close(top);
return U_SUCCESS(ec);
@@ -790,9 +789,9 @@ private:
static int32_t* getMap(USystemTimeZoneType type, int32_t& len, UErrorCode& ec) {
len = 0;
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
- int32_t* m = NULL;
+ int32_t* m = nullptr;
switch (type) {
case UCAL_ZONE_TYPE_ANY:
umtx_initOnce(gSystemZonesInitOnce, &initMap, type, ec);
@@ -811,7 +810,7 @@ private:
break;
default:
ec = U_ILLEGAL_ARGUMENT_ERROR;
- m = NULL;
+ m = nullptr;
len = 0;
break;
}
@@ -825,28 +824,28 @@ public:
static TZEnumeration* create(USystemTimeZoneType type, const char* region, const int32_t* rawOffset, UErrorCode& ec) {
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
int32_t baseLen;
int32_t *baseMap = getMap(type, baseLen, ec);
if (U_FAILURE(ec)) {
- return NULL;
+ return nullptr;
}
// If any additional conditions are available,
// create instance local map filtered by the conditions.
- int32_t *filteredMap = NULL;
+ int32_t *filteredMap = nullptr;
int32_t numEntries = 0;
- if (region != NULL || rawOffset != NULL) {
+ if (region != nullptr || rawOffset != nullptr) {
int32_t filteredMapSize = DEFAULT_FILTERED_MAP_SIZE;
filteredMap = (int32_t *)uprv_malloc(filteredMapSize * sizeof(int32_t));
- if (filteredMap == NULL) {
+ if (filteredMap == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// Walk through the base map
@@ -858,7 +857,7 @@ public:
if (U_FAILURE(ec)) {
break;
}
- if (region != NULL) {
+ if (region != nullptr) {
// Filter by region
char tzregion[4]; // max 3 letters + null term
TimeZone::getRegion(id, tzregion, sizeof(tzregion), ec);
@@ -870,7 +869,7 @@ public:
continue;
}
}
- if (rawOffset != NULL) {
+ if (rawOffset != nullptr) {
// Filter by raw offset
// Note: This is VERY inefficient
TimeZone *z = createSystemTimeZone(id, ec);
@@ -888,7 +887,7 @@ public:
if (filteredMapSize <= numEntries) {
filteredMapSize += MAP_INCREMENT_SIZE;
int32_t *tmp = (int32_t *)uprv_realloc(filteredMap, filteredMapSize * sizeof(int32_t));
- if (tmp == NULL) {
+ if (tmp == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
break;
} else {
@@ -901,37 +900,37 @@ public:
if (U_FAILURE(ec)) {
uprv_free(filteredMap);
- filteredMap = NULL;
+ filteredMap = nullptr;
}
ures_close(res);
}
- TZEnumeration *result = NULL;
+ TZEnumeration *result = nullptr;
if (U_SUCCESS(ec)) {
// Finally, create a new enumeration instance
- if (filteredMap == NULL) {
- result = new TZEnumeration(baseMap, baseLen, FALSE);
+ if (filteredMap == nullptr) {
+ result = new TZEnumeration(baseMap, baseLen, false);
} else {
- result = new TZEnumeration(filteredMap, numEntries, TRUE);
- filteredMap = NULL;
+ result = new TZEnumeration(filteredMap, numEntries, true);
+ filteredMap = nullptr;
}
- if (result == NULL) {
+ if (result == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
}
}
- if (filteredMap != NULL) {
+ if (filteredMap != nullptr) {
uprv_free(filteredMap);
}
return result;
}
- TZEnumeration(const TZEnumeration &other) : StringEnumeration(), map(NULL), localMap(NULL), len(0), pos(0) {
- if (other.localMap != NULL) {
+ TZEnumeration(const TZEnumeration &other) : StringEnumeration(), map(nullptr), localMap(nullptr), len(0), pos(0) {
+ if (other.localMap != nullptr) {
localMap = (int32_t *)uprv_malloc(other.len * sizeof(int32_t));
- if (localMap != NULL) {
+ if (localMap != nullptr) {
len = other.len;
uprv_memcpy(localMap, other.localMap, len * sizeof(int32_t));
pos = other.pos;
@@ -939,11 +938,11 @@ public:
} else {
len = 0;
pos = 0;
- map = NULL;
+ map = nullptr;
}
} else {
map = other.map;
- localMap = NULL;
+ localMap = nullptr;
len = other.len;
pos = other.pos;
}
@@ -960,7 +959,7 @@ public:
}
virtual const UnicodeString* snext(UErrorCode& status) override {
- if (U_SUCCESS(status) && map != NULL && pos < len) {
+ if (U_SUCCESS(status) && map != nullptr && pos < len) {
getID(map[pos], status);
++pos;
return &unistr;
@@ -973,12 +972,12 @@ public:
}
public:
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
};
TZEnumeration::~TZEnumeration() {
- if (localMap != NULL) {
+ if (localMap != nullptr) {
uprv_free(localMap);
}
}
@@ -996,17 +995,17 @@ TimeZone::createTimeZoneIDEnumeration(
StringEnumeration* U_EXPORT2
TimeZone::createEnumeration(UErrorCode& status) {
- return TZEnumeration::create(UCAL_ZONE_TYPE_ANY, NULL, NULL, status);
+ return TZEnumeration::create(UCAL_ZONE_TYPE_ANY, nullptr, nullptr, status);
}
StringEnumeration* U_EXPORT2
TimeZone::createEnumerationForRawOffset(int32_t rawOffset, UErrorCode& status) {
- return TZEnumeration::create(UCAL_ZONE_TYPE_ANY, NULL, &rawOffset, status);
+ return TZEnumeration::create(UCAL_ZONE_TYPE_ANY, nullptr, &rawOffset, status);
}
StringEnumeration* U_EXPORT2
TimeZone::createEnumerationForRegion(const char* region, UErrorCode& status) {
- return TZEnumeration::create(UCAL_ZONE_TYPE_ANY, region, NULL, status);
+ return TZEnumeration::create(UCAL_ZONE_TYPE_ANY, region, nullptr, status);
}
//
@@ -1071,11 +1070,11 @@ TimeZone::getEquivalentID(const UnicodeString& id, int32_t index) {
}
}
if (zone >= 0) {
- UResourceBundle *ares = ures_getByKey(top, kNAMES, NULL, &ec); // dereference Zones section
+ UResourceBundle *ares = ures_getByKey(top, kNAMES, nullptr, &ec); // dereference Zones section
if (U_SUCCESS(ec)) {
int32_t idLen = 0;
- const UChar* id2 = ures_getStringByIndex(ares, zone, &idLen, &ec);
- result.fastCopyFrom(UnicodeString(TRUE, id2, idLen));
+ const char16_t* id2 = ures_getStringByIndex(ares, zone, &idLen, &ec);
+ result.fastCopyFrom(UnicodeString(true, id2, idLen));
U_DEBUG_TZ_MSG(("gei(%d) -> %d, len%d, %s\n", index, zone, result.length(), u_errorName(ec)));
}
ures_close(ares);
@@ -1093,18 +1092,18 @@ TimeZone::getEquivalentID(const UnicodeString& id, int32_t index) {
// These methods are used by ZoneMeta class only.
-const UChar*
+const char16_t*
TimeZone::findID(const UnicodeString& id) {
- const UChar *result = NULL;
+ const char16_t *result = nullptr;
UErrorCode ec = U_ZERO_ERROR;
- UResourceBundle *rb = ures_openDirect(NULL, kZONEINFO, &ec);
+ UResourceBundle *rb = ures_openDirect(nullptr, kZONEINFO, &ec);
// resolve zone index by name
- UResourceBundle *names = ures_getByKey(rb, kNAMES, NULL, &ec);
+ UResourceBundle *names = ures_getByKey(rb, kNAMES, nullptr, &ec);
int32_t idx = findInStringArray(names, id, ec);
- result = ures_getStringByIndex(names, idx, NULL, &ec);
+ result = ures_getStringByIndex(names, idx, nullptr, &ec);
if (U_FAILURE(ec)) {
- result = NULL;
+ result = nullptr;
}
ures_close(names);
ures_close(rb);
@@ -1112,16 +1111,16 @@ TimeZone::findID(const UnicodeString& id) {
}
-const UChar*
+const char16_t*
TimeZone::dereferOlsonLink(const UnicodeString& id) {
- const UChar *result = NULL;
+ const char16_t *result = nullptr;
UErrorCode ec = U_ZERO_ERROR;
- UResourceBundle *rb = ures_openDirect(NULL, kZONEINFO, &ec);
+ UResourceBundle *rb = ures_openDirect(nullptr, kZONEINFO, &ec);
// resolve zone index by name
- UResourceBundle *names = ures_getByKey(rb, kNAMES, NULL, &ec);
+ UResourceBundle *names = ures_getByKey(rb, kNAMES, nullptr, &ec);
int32_t idx = findInStringArray(names, id, ec);
- result = ures_getStringByIndex(names, idx, NULL, &ec);
+ result = ures_getStringByIndex(names, idx, nullptr, &ec);
// open the zone bundle by index
ures_getByKey(rb, kZONES, rb, &ec);
@@ -1131,7 +1130,7 @@ TimeZone::dereferOlsonLink(const UnicodeString& id) {
if (ures_getType(rb) == URES_INT) {
// this is a link - dereference the link
int32_t deref = ures_getInt(rb, &ec);
- const UChar* tmp = ures_getStringByIndex(names, deref, NULL, &ec);
+ const char16_t* tmp = ures_getStringByIndex(names, deref, nullptr, &ec);
if (U_SUCCESS(ec)) {
result = tmp;
}
@@ -1144,27 +1143,27 @@ TimeZone::dereferOlsonLink(const UnicodeString& id) {
return result;
}
-const UChar*
+const char16_t*
TimeZone::getRegion(const UnicodeString& id) {
UErrorCode status = U_ZERO_ERROR;
return getRegion(id, status);
}
-const UChar*
+const char16_t*
TimeZone::getRegion(const UnicodeString& id, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- const UChar *result = NULL;
- UResourceBundle *rb = ures_openDirect(NULL, kZONEINFO, &status);
+ const char16_t *result = nullptr;
+ UResourceBundle *rb = ures_openDirect(nullptr, kZONEINFO, &status);
// resolve zone index by name
- UResourceBundle *res = ures_getByKey(rb, kNAMES, NULL, &status);
+ UResourceBundle *res = ures_getByKey(rb, kNAMES, nullptr, &status);
int32_t idx = findInStringArray(res, id, status);
// get region mapping
ures_getByKey(rb, kREGIONS, res, &status);
- const UChar *tmp = ures_getStringByIndex(res, idx, NULL, &status);
+ const char16_t *tmp = ures_getStringByIndex(res, idx, nullptr, &status);
if (U_SUCCESS(status)) {
result = tmp;
}
@@ -1186,13 +1185,13 @@ TimeZone::getRegion(const UnicodeString& id, char *region, int32_t capacity, UEr
return 0;
}
- const UChar *uregion = NULL;
+ const char16_t *uregion = nullptr;
// "Etc/Unknown" is not a system zone ID,
// but in the zone data
if (id.compare(UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH) != 0) {
uregion = getRegion(id);
}
- if (uregion == NULL) {
+ if (uregion == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1214,13 +1213,13 @@ TimeZone::getRegion(const UnicodeString& id, char *region, int32_t capacity, UEr
UnicodeString&
TimeZone::getDisplayName(UnicodeString& result) const
{
- return getDisplayName(FALSE,LONG,Locale::getDefault(), result);
+ return getDisplayName(false,LONG,Locale::getDefault(), result);
}
UnicodeString&
TimeZone::getDisplayName(const Locale& locale, UnicodeString& result) const
{
- return getDisplayName(FALSE, LONG, locale, result);
+ return getDisplayName(false, LONG, locale, result);
}
UnicodeString&
@@ -1288,7 +1287,7 @@ TimeZone::getDisplayName(UBool inDaylight, EDisplayType style, const Locale& loc
tzfmt->formatOffsetLocalizedGMT(offset, result, status);
break;
case SHORT_GMT:
- tzfmt->formatOffsetISO8601Basic(offset, FALSE, FALSE, FALSE, result, status);
+ tzfmt->formatOffsetISO8601Basic(offset, false, false, false, result, status);
break;
default:
UPRV_UNREACHABLE_EXIT;
@@ -1349,7 +1348,7 @@ TimeZone::createCustomTimeZone(const UnicodeString& id)
int32_t offset = sign * ((hour * 60 + min) * 60 + sec) * 1000;
return new SimpleTimeZone(offset, customID);
}
- return NULL;
+ return nullptr;
}
UnicodeString&
@@ -1388,17 +1387,17 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
if (id[pos.getIndex()] == MINUS /*'-'*/) {
sign = -1;
} else if (id[pos.getIndex()] != PLUS /*'+'*/) {
- return FALSE;
+ return false;
}
pos.setIndex(pos.getIndex() + 1);
UErrorCode success = U_ZERO_ERROR;
numberFormat = NumberFormat::createInstance(success);
if(U_FAILURE(success)){
- return FALSE;
+ return false;
}
- numberFormat->setParseIntegerOnly(TRUE);
- //numberFormat->setLenient(TRUE); // TODO: May need to set this, depends on latest timezone parsing
+ 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();
@@ -1406,7 +1405,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
numberFormat->parse(id, n, pos);
if (pos.getIndex() == start) {
delete numberFormat;
- return FALSE;
+ return false;
}
hour = n.getLong();
@@ -1414,7 +1413,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
if (pos.getIndex() - start > 2
|| id[pos.getIndex()] != COLON) {
delete numberFormat;
- return FALSE;
+ return false;
}
// hh:mm
pos.setIndex(pos.getIndex() + 1);
@@ -1424,13 +1423,13 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
if ((pos.getIndex() - oldPos) != 2) {
// must be 2 digits
delete numberFormat;
- return FALSE;
+ return false;
}
min = n.getLong();
if (pos.getIndex() < id.length()) {
if (id[pos.getIndex()] != COLON) {
delete numberFormat;
- return FALSE;
+ return false;
}
// [:ss]
pos.setIndex(pos.getIndex() + 1);
@@ -1440,7 +1439,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
if (pos.getIndex() != id.length()
|| (pos.getIndex() - oldPos) != 2) {
delete numberFormat;
- return FALSE;
+ return false;
}
sec = n.getLong();
}
@@ -1458,7 +1457,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
if (length <= 0 || 6 < length) {
// invalid length
delete numberFormat;
- return FALSE;
+ return false;
}
switch (length) {
case 1:
@@ -1482,11 +1481,11 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign,
delete numberFormat;
if (hour > kMAX_CUSTOM_HOUR || min > kMAX_CUSTOM_MIN || sec > kMAX_CUSTOM_SEC) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UnicodeString&
@@ -1496,33 +1495,33 @@ TimeZone::formatCustomID(int32_t hour, int32_t min, int32_t sec,
id.setTo(GMT_ID, GMT_ID_LENGTH);
if (hour | min | sec) {
if (negative) {
- id += (UChar)MINUS;
+ id += (char16_t)MINUS;
} else {
- id += (UChar)PLUS;
+ id += (char16_t)PLUS;
}
if (hour < 10) {
- id += (UChar)ZERO_DIGIT;
+ id += (char16_t)ZERO_DIGIT;
} else {
- id += (UChar)(ZERO_DIGIT + hour/10);
+ id += (char16_t)(ZERO_DIGIT + hour/10);
}
- id += (UChar)(ZERO_DIGIT + hour%10);
- id += (UChar)COLON;
+ id += (char16_t)(ZERO_DIGIT + hour%10);
+ id += (char16_t)COLON;
if (min < 10) {
- id += (UChar)ZERO_DIGIT;
+ id += (char16_t)ZERO_DIGIT;
} else {
- id += (UChar)(ZERO_DIGIT + min/10);
+ id += (char16_t)(ZERO_DIGIT + min/10);
}
- id += (UChar)(ZERO_DIGIT + min%10);
+ id += (char16_t)(ZERO_DIGIT + min%10);
if (sec) {
- id += (UChar)COLON;
+ id += (char16_t)COLON;
if (sec < 10) {
- id += (UChar)ZERO_DIGIT;
+ id += (char16_t)ZERO_DIGIT;
} else {
- id += (UChar)(ZERO_DIGIT + sec/10);
+ id += (char16_t)(ZERO_DIGIT + sec/10);
}
- id += (UChar)(ZERO_DIGIT + sec%10);
+ id += (char16_t)(ZERO_DIGIT + sec%10);
}
}
return id;
@@ -1540,8 +1539,8 @@ static void U_CALLCONV initTZDataVersion(UErrorCode &status) {
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup);
int32_t len = 0;
StackUResourceBundle bundle;
- ures_openDirectFillIn(bundle.getAlias(), NULL, kZONEINFO, &status);
- const UChar *tzver = ures_getStringByKey(bundle.getAlias(), kTZVERSION, &len, &status);
+ ures_openDirectFillIn(bundle.getAlias(), nullptr, kZONEINFO, &status);
+ const char16_t *tzver = ures_getStringByKey(bundle.getAlias(), kTZVERSION, &len, &status);
if (U_SUCCESS(status)) {
if (len >= (int32_t)sizeof(TZDATA_VERSION)) {
@@ -1562,7 +1561,7 @@ TimeZone::getTZDataVersion(UErrorCode& status)
UnicodeString&
TimeZone::getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UErrorCode& status)
{
- UBool isSystemID = FALSE;
+ UBool isSystemID = false;
return getCanonicalID(id, canonicalID, isSystemID, status);
}
@@ -1571,18 +1570,18 @@ TimeZone::getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UB
UErrorCode& status)
{
canonicalID.remove();
- isSystemID = FALSE;
+ isSystemID = false;
if (U_FAILURE(status)) {
return canonicalID;
}
if (id.compare(UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH) == 0) {
// special case - Etc/Unknown is a canonical ID, but not system ID
canonicalID.fastCopyFrom(id);
- isSystemID = FALSE;
+ isSystemID = false;
} else {
ZoneMeta::getCanonicalCLDRID(id, canonicalID, status);
if (U_SUCCESS(status)) {
- isSystemID = TRUE;
+ isSystemID = true;
} else {
// Not a system ID
status = U_ZERO_ERROR;
@@ -1601,7 +1600,7 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode
// canonicalize the input ID
UnicodeString canonicalID;
- UBool isSystemID = FALSE;
+ UBool isSystemID = false;
getCanonicalID(id, canonicalID, isSystemID, status);
if (U_FAILURE(status) || !isSystemID) {
@@ -1614,15 +1613,15 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode
return winid;
}
- UResourceBundle *mapTimezones = ures_openDirect(NULL, "windowsZones", &status);
+ UResourceBundle *mapTimezones = ures_openDirect(nullptr, "windowsZones", &status);
ures_getByKey(mapTimezones, "mapTimezones", mapTimezones, &status);
if (U_FAILURE(status)) {
return winid;
}
- UResourceBundle *winzone = NULL;
- UBool found = FALSE;
+ UResourceBundle *winzone = nullptr;
+ UBool found = false;
while (ures_hasNext(mapTimezones) && !found) {
winzone = ures_getNextResource(mapTimezones, winzone, &status);
if (U_FAILURE(status)) {
@@ -1631,7 +1630,7 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode
if (ures_getType(winzone) != URES_TABLE) {
continue;
}
- UResourceBundle *regionalData = NULL;
+ UResourceBundle *regionalData = nullptr;
while (ures_hasNext(winzone) && !found) {
regionalData = ures_getNextResource(winzone, regionalData, &status);
if (U_FAILURE(status)) {
@@ -1641,22 +1640,22 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode
continue;
}
int32_t len;
- const UChar *tzids = ures_getString(regionalData, &len, &status);
+ const char16_t *tzids = ures_getString(regionalData, &len, &status);
if (U_FAILURE(status)) {
break;
}
- const UChar *start = tzids;
- UBool hasNext = TRUE;
+ const char16_t *start = tzids;
+ UBool hasNext = true;
while (hasNext) {
- const UChar *end = u_strchr(start, (UChar)0x20);
- if (end == NULL) {
+ const char16_t *end = u_strchr(start, (char16_t)0x20);
+ if (end == nullptr) {
end = tzids + len;
- hasNext = FALSE;
+ hasNext = false;
}
if (canonicalID.compare(start, static_cast<int32_t>(end - start)) == 0) {
winid = UnicodeString(ures_getKey(winzone), -1 , US_INV);
- found = TRUE;
+ found = true;
break;
}
start = end + 1;
@@ -1679,7 +1678,7 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic
return id;
}
- UResourceBundle *zones = ures_openDirect(NULL, "windowsZones", &status);
+ UResourceBundle *zones = ures_openDirect(nullptr, "windowsZones", &status);
ures_getByKey(zones, "mapTimezones", zones, &status);
if (U_FAILURE(status)) {
ures_close(zones);
@@ -1703,21 +1702,21 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic
return id;
}
- const UChar *tzid = NULL;
+ const char16_t *tzid = nullptr;
int32_t len = 0;
- UBool gotID = FALSE;
+ UBool gotID = false;
if (region) {
- const UChar *tzids = ures_getStringByKey(zones, region, &len, &tmperr); // use tmperr, because
+ const char16_t *tzids = ures_getStringByKey(zones, region, &len, &tmperr); // use tmperr, because
// regional mapping is optional
if (U_SUCCESS(tmperr)) {
// first ID delimited by space is the default one
- const UChar *end = u_strchr(tzids, (UChar)0x20);
- if (end == NULL) {
+ const char16_t *end = u_strchr(tzids, (char16_t)0x20);
+ if (end == nullptr) {
id.setTo(tzids, -1);
} else {
id.setTo(tzids, static_cast<int32_t>(end - tzids));
}
- gotID = TRUE;
+ gotID = true;
}
}
diff --git a/contrib/libs/icu/i18n/titletrn.cpp b/contrib/libs/icu/i18n/titletrn.cpp
index 9c39b4676ad..d3732893a78 100644
--- a/contrib/libs/icu/i18n/titletrn.cpp
+++ b/contrib/libs/icu/i18n/titletrn.cpp
@@ -28,7 +28,7 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TitlecaseTransliterator)
TitlecaseTransliterator::TitlecaseTransliterator() :
- CaseMapTransliterator(UNICODE_STRING("Any-Title", 9), NULL)
+ CaseMapTransliterator(UNICODE_STRING("Any-Title", 9), nullptr)
{
// Need to look back 2 characters in the case of "can't"
setMaximumContextLength(2);
@@ -87,7 +87,7 @@ void TitlecaseTransliterator::handleTransliterate(
// Our mode; we are either converting letter toTitle or
// toLower.
- UBool doTitle = TRUE;
+ UBool doTitle = true;
// Determine if there is a preceding context of cased case-ignorable*,
// in which case we want to start in toLower mode. If the
@@ -99,7 +99,7 @@ void TitlecaseTransliterator::handleTransliterate(
c = text.char32At(start);
type=ucase_getTypeOrIgnorable(c);
if(type>0) { // cased
- doTitle=FALSE;
+ doTitle=false;
break;
} else if(type==0) { // uncased but not ignorable
break;
@@ -117,7 +117,7 @@ void TitlecaseTransliterator::handleTransliterate(
csc.limit = offsets.contextLimit;
UnicodeString tmp;
- const UChar *s;
+ const char16_t *s;
int32_t textPos, delta, result;
for(textPos=offsets.start; textPos<offsets.limit;) {
@@ -146,7 +146,7 @@ void TitlecaseTransliterator::handleTransliterate(
// see UCASE_MAX_STRING_LENGTH
if(result<=UCASE_MAX_STRING_LENGTH) {
// string s[result]
- tmp.setTo(FALSE, s, result);
+ tmp.setTo(false, s, result);
delta=result-U16_LENGTH(c);
} else {
// single code point
diff --git a/contrib/libs/icu/i18n/tmunit.cpp b/contrib/libs/icu/i18n/tmunit.cpp
index 361aecb92ed..ffa67eddeb3 100644
--- a/contrib/libs/icu/i18n/tmunit.cpp
+++ b/contrib/libs/icu/i18n/tmunit.cpp
@@ -59,11 +59,11 @@ TimeUnit* U_EXPORT2
TimeUnit::createInstance(TimeUnit::UTimeUnitFields timeUnitField,
UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (timeUnitField < 0 || timeUnitField >= UTIMEUNIT_FIELD_COUNT) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
return new TimeUnit(timeUnitField);
}
diff --git a/contrib/libs/icu/i18n/tmutamt.cpp b/contrib/libs/icu/i18n/tmutamt.cpp
index 2753c29374a..94fd8cfa97f 100644
--- a/contrib/libs/icu/i18n/tmutamt.cpp
+++ b/contrib/libs/icu/i18n/tmutamt.cpp
@@ -63,7 +63,7 @@ TimeUnitAmount::~TimeUnitAmount() {
const TimeUnit&
TimeUnitAmount::getTimeUnit() const {
- return (const TimeUnit&) getUnit();
+ return static_cast<const TimeUnit&>(getUnit());
}
diff --git a/contrib/libs/icu/i18n/tmutfmt.cpp b/contrib/libs/icu/i18n/tmutfmt.cpp
index 057bb634ebb..87b509ea35c 100644
--- a/contrib/libs/icu/i18n/tmutfmt.cpp
+++ b/contrib/libs/icu/i18n/tmutfmt.cpp
@@ -24,24 +24,24 @@
#include "unicode/msgfmt.h"
#include "uassert.h"
-#define LEFT_CURLY_BRACKET ((UChar)0x007B)
-#define RIGHT_CURLY_BRACKET ((UChar)0x007D)
-#define SPACE ((UChar)0x0020)
-#define DIGIT_ZERO ((UChar)0x0030)
-#define LOW_S ((UChar)0x0073)
-#define LOW_M ((UChar)0x006D)
-#define LOW_I ((UChar)0x0069)
-#define LOW_N ((UChar)0x006E)
-#define LOW_H ((UChar)0x0068)
-#define LOW_W ((UChar)0x0077)
-#define LOW_D ((UChar)0x0064)
-#define LOW_Y ((UChar)0x0079)
-#define LOW_Z ((UChar)0x007A)
-#define LOW_E ((UChar)0x0065)
-#define LOW_R ((UChar)0x0072)
-#define LOW_O ((UChar)0x006F)
-#define LOW_N ((UChar)0x006E)
-#define LOW_T ((UChar)0x0074)
+#define LEFT_CURLY_BRACKET ((char16_t)0x007B)
+#define RIGHT_CURLY_BRACKET ((char16_t)0x007D)
+#define SPACE ((char16_t)0x0020)
+#define DIGIT_ZERO ((char16_t)0x0030)
+#define LOW_S ((char16_t)0x0073)
+#define LOW_M ((char16_t)0x006D)
+#define LOW_I ((char16_t)0x0069)
+#define LOW_N ((char16_t)0x006E)
+#define LOW_H ((char16_t)0x0068)
+#define LOW_W ((char16_t)0x0077)
+#define LOW_D ((char16_t)0x0064)
+#define LOW_Y ((char16_t)0x0079)
+#define LOW_Z ((char16_t)0x007A)
+#define LOW_E ((char16_t)0x0065)
+#define LOW_R ((char16_t)0x0072)
+#define LOW_O ((char16_t)0x006F)
+#define LOW_N ((char16_t)0x006E)
+#define LOW_T ((char16_t)0x0074)
//TODO: define in compile time
@@ -68,26 +68,26 @@ static const char gTimeUnitMinute[] = "minute";
static const char gTimeUnitSecond[] = "second";
static const char gPluralCountOther[] = "other";
-static const UChar DEFAULT_PATTERN_FOR_SECOND[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_S, 0};
-static const UChar DEFAULT_PATTERN_FOR_MINUTE[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_M, LOW_I, LOW_N, 0};
-static const UChar DEFAULT_PATTERN_FOR_HOUR[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_H, 0};
-static const UChar DEFAULT_PATTERN_FOR_WEEK[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_W, 0};
-static const UChar DEFAULT_PATTERN_FOR_DAY[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_D, 0};
-static const UChar DEFAULT_PATTERN_FOR_MONTH[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_M, 0};
-static const UChar DEFAULT_PATTERN_FOR_YEAR[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_Y, 0};
+static const char16_t DEFAULT_PATTERN_FOR_SECOND[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_S, 0};
+static const char16_t DEFAULT_PATTERN_FOR_MINUTE[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_M, LOW_I, LOW_N, 0};
+static const char16_t DEFAULT_PATTERN_FOR_HOUR[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_H, 0};
+static const char16_t DEFAULT_PATTERN_FOR_WEEK[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_W, 0};
+static const char16_t DEFAULT_PATTERN_FOR_DAY[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_D, 0};
+static const char16_t DEFAULT_PATTERN_FOR_MONTH[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_M, 0};
+static const char16_t DEFAULT_PATTERN_FOR_YEAR[] = {LEFT_CURLY_BRACKET, DIGIT_ZERO, RIGHT_CURLY_BRACKET, SPACE, LOW_Y, 0};
-static const UChar PLURAL_COUNT_ZERO[] = {LOW_Z, LOW_E, LOW_R, LOW_O, 0};
-static const UChar PLURAL_COUNT_ONE[] = {LOW_O, LOW_N, LOW_E, 0};
-static const UChar PLURAL_COUNT_TWO[] = {LOW_T, LOW_W, LOW_O, 0};
+static const char16_t PLURAL_COUNT_ZERO[] = {LOW_Z, LOW_E, LOW_R, LOW_O, 0};
+static const char16_t PLURAL_COUNT_ONE[] = {LOW_O, LOW_N, LOW_E, 0};
+static const char16_t PLURAL_COUNT_TWO[] = {LOW_T, LOW_W, LOW_O, 0};
TimeUnitFormat::TimeUnitFormat(UErrorCode& status) {
- initMeasureFormat(Locale::getDefault(), UMEASFMT_WIDTH_WIDE, NULL, status);
+ initMeasureFormat(Locale::getDefault(), UMEASFMT_WIDTH_WIDE, nullptr, status);
create(UTMUTFMT_FULL_STYLE, status);
}
TimeUnitFormat::TimeUnitFormat(const Locale& locale, UErrorCode& status) {
- initMeasureFormat(locale, UMEASFMT_WIDTH_WIDE, NULL, status);
+ initMeasureFormat(locale, UMEASFMT_WIDTH_WIDE, nullptr, status);
create(UTMUTFMT_FULL_STYLE, status);
}
@@ -95,13 +95,13 @@ TimeUnitFormat::TimeUnitFormat(const Locale& locale, UErrorCode& status) {
TimeUnitFormat::TimeUnitFormat(const Locale& locale, UTimeUnitFormatStyle style, UErrorCode& status) {
switch (style) {
case UTMUTFMT_FULL_STYLE:
- initMeasureFormat(locale, UMEASFMT_WIDTH_WIDE, NULL, status);
+ initMeasureFormat(locale, UMEASFMT_WIDTH_WIDE, nullptr, status);
break;
case UTMUTFMT_ABBREVIATED_STYLE:
- initMeasureFormat(locale, UMEASFMT_WIDTH_SHORT, NULL, status);
+ initMeasureFormat(locale, UMEASFMT_WIDTH_SHORT, nullptr, status);
break;
default:
- initMeasureFormat(locale, UMEASFMT_WIDTH_WIDE, NULL, status);
+ initMeasureFormat(locale, UMEASFMT_WIDTH_WIDE, nullptr, status);
break;
}
create(style, status);
@@ -120,7 +120,7 @@ TimeUnitFormat::TimeUnitFormat(const TimeUnitFormat& other)
copyHash(other.fTimeUnitToCountToPatterns[i], fTimeUnitToCountToPatterns[i], status);
} else {
delete fTimeUnitToCountToPatterns[i];
- fTimeUnitToCountToPatterns[i] = NULL;
+ fTimeUnitToCountToPatterns[i] = nullptr;
}
}
}
@@ -131,7 +131,7 @@ TimeUnitFormat::~TimeUnitFormat() {
i < TimeUnit::UTIMEUNIT_FIELD_COUNT;
i = (TimeUnit::UTimeUnitFields)(i+1)) {
deleteHash(fTimeUnitToCountToPatterns[i]);
- fTimeUnitToCountToPatterns[i] = NULL;
+ fTimeUnitToCountToPatterns[i] = nullptr;
}
}
@@ -152,7 +152,7 @@ TimeUnitFormat::operator=(const TimeUnitFormat& other) {
i < TimeUnit::UTIMEUNIT_FIELD_COUNT;
i = (TimeUnit::UTimeUnitFields)(i+1)) {
deleteHash(fTimeUnitToCountToPatterns[i]);
- fTimeUnitToCountToPatterns[i] = NULL;
+ fTimeUnitToCountToPatterns[i] = nullptr;
}
for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR;
i < TimeUnit::UTIMEUNIT_FIELD_COUNT;
@@ -163,7 +163,7 @@ TimeUnitFormat::operator=(const TimeUnitFormat& other) {
copyHash(other.fTimeUnitToCountToPatterns[i], fTimeUnitToCountToPatterns[i], status);
} else {
delete fTimeUnitToCountToPatterns[i];
- fTimeUnitToCountToPatterns[i] = NULL;
+ fTimeUnitToCountToPatterns[i] = nullptr;
}
}
fStyle = other.fStyle;
@@ -180,7 +180,7 @@ TimeUnitFormat::parseObject(const UnicodeString& source,
int32_t oldPos = pos.getIndex();
int32_t newPos = -1;
int32_t longestParseDistance = 0;
- UnicodeString* countOfLongestMatch = NULL;
+ UnicodeString* countOfLongestMatch = nullptr;
#ifdef TMUTFMT_DEBUG
char res[1000];
source.extract(0, source.length(), res, "UTF-8");
@@ -193,8 +193,8 @@ TimeUnitFormat::parseObject(const UnicodeString& source,
i = (TimeUnit::UTimeUnitFields)(i+1)) {
Hashtable* countToPatterns = fTimeUnitToCountToPatterns[i];
int32_t elemPos = UHASH_FIRST;
- const UHashElement* elem = NULL;
- while ((elem = countToPatterns->nextElement(elemPos)) != NULL){
+ const UHashElement* elem = nullptr;
+ while ((elem = countToPatterns->nextElement(elemPos)) != nullptr){
const UHashTok keyTok = elem->key;
UnicodeString* count = (UnicodeString*)keyTok.pointer;
#ifdef TMUTFMT_DEBUG
@@ -288,12 +288,12 @@ TimeUnitFormat::parseObject(const UnicodeString& source,
void
TimeUnitFormat::create(UTimeUnitFormatStyle style, UErrorCode& status) {
- // fTimeUnitToCountToPatterns[] must have its elements initialized to NULL first
+ // fTimeUnitToCountToPatterns[] must have its elements initialized to nullptr first
// before checking for failure status.
for (TimeUnit::UTimeUnitFields i = TimeUnit::UTIMEUNIT_YEAR;
i < TimeUnit::UTIMEUNIT_FIELD_COUNT;
i = (TimeUnit::UTimeUnitFields)(i+1)) {
- fTimeUnitToCountToPatterns[i] = NULL;
+ fTimeUnitToCountToPatterns[i] = nullptr;
}
if (U_FAILURE(status)) {
@@ -320,14 +320,14 @@ void
TimeUnitFormat::setup(UErrorCode& err) {
initDataMembers(err);
- UVector pluralCounts(0, uhash_compareUnicodeString, 6, err);
+ UVector pluralCounts(nullptr, uhash_compareUnicodeString, 6, err);
LocalPointer<StringEnumeration> keywords(getPluralRules().getKeywords(err), err);
if (U_FAILURE(err)) {
return;
}
UnicodeString* pluralCount;
- while ((pluralCount = const_cast<UnicodeString*>(keywords->snext(err))) != NULL) {
- pluralCounts.addElementX(pluralCount, err);
+ while ((pluralCount = const_cast<UnicodeString*>(keywords->snext(err))) != nullptr) {
+ pluralCounts.addElement(pluralCount, err);
}
readFromCurrentLocale(UTMUTFMT_FULL_STYLE, gUnitsTag, pluralCounts, err);
checkConsistency(UTMUTFMT_FULL_STYLE, gUnitsTag, err);
@@ -345,7 +345,7 @@ TimeUnitFormat::initDataMembers(UErrorCode& err){
i < TimeUnit::UTIMEUNIT_FIELD_COUNT;
i = (TimeUnit::UTimeUnitFields)(i+1)) {
deleteHash(fTimeUnitToCountToPatterns[i]);
- fTimeUnitToCountToPatterns[i] = NULL;
+ fTimeUnitToCountToPatterns[i] = nullptr;
}
}
@@ -358,7 +358,7 @@ struct TimeUnitFormatReadSink : public ResourceSink {
TimeUnitFormatReadSink(TimeUnitFormat *timeUnitFormatObj,
const UVector &pluralCounts, UTimeUnitFormatStyle style) :
timeUnitFormatObj(timeUnitFormatObj), pluralCounts(pluralCounts),
- style(style), beenHere(FALSE){}
+ style(style), beenHere(false){}
virtual ~TimeUnitFormatReadSink();
@@ -367,7 +367,7 @@ struct TimeUnitFormatReadSink : public ResourceSink {
if (beenHere) {
return;
} else {
- beenHere = TRUE;
+ beenHere = true;
}
ResourceTable units = value.getTable(errorCode);
@@ -375,7 +375,7 @@ struct TimeUnitFormatReadSink : public ResourceSink {
for (int32_t i = 0; units.getKeyAndValue(i, key, value); ++i) {
const char* timeUnitName = key;
- if (timeUnitName == NULL) {
+ if (timeUnitName == nullptr) {
continue;
}
@@ -400,7 +400,7 @@ struct TimeUnitFormatReadSink : public ResourceSink {
LocalPointer<Hashtable> localCountToPatterns;
Hashtable *countToPatterns =
timeUnitFormatObj->fTimeUnitToCountToPatterns[timeUnitField];
- if (countToPatterns == NULL) {
+ if (countToPatterns == nullptr) {
localCountToPatterns.adoptInsteadAndCheckErrorCode(
timeUnitFormatObj->initHash(errorCode), errorCode);
countToPatterns = localCountToPatterns.getAlias();
@@ -430,15 +430,15 @@ struct TimeUnitFormatReadSink : public ResourceSink {
}
MessageFormat** formatters =
(MessageFormat**)countToPatterns->get(pluralCountUniStr);
- if (formatters == NULL) {
+ if (formatters == nullptr) {
LocalMemory<MessageFormat *> localFormatters(
(MessageFormat **)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*)));
if (localFormatters.isNull()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
- localFormatters[UTMUTFMT_FULL_STYLE] = NULL;
- localFormatters[UTMUTFMT_ABBREVIATED_STYLE] = NULL;
+ localFormatters[UTMUTFMT_FULL_STYLE] = nullptr;
+ localFormatters[UTMUTFMT_ABBREVIATED_STYLE] = nullptr;
countToPatterns->put(pluralCountUniStr, localFormatters.getAlias(), errorCode);
if (U_FAILURE(errorCode)) {
return;
@@ -448,7 +448,7 @@ struct TimeUnitFormatReadSink : public ResourceSink {
formatters[style] = messageFormat.orphan();
}
- if (timeUnitFormatObj->fTimeUnitToCountToPatterns[timeUnitField] == NULL) {
+ if (timeUnitFormatObj->fTimeUnitToCountToPatterns[timeUnitField] == nullptr) {
timeUnitFormatObj->fTimeUnitToCountToPatterns[timeUnitField] = localCountToPatterns.orphan();
}
}
@@ -471,7 +471,7 @@ TimeUnitFormat::readFromCurrentLocale(UTimeUnitFormatStyle style, const char* ke
UErrorCode status = U_ZERO_ERROR;
LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_UNIT, getLocaleID(status), &status));
- LocalUResourceBundlePointer unitsRes(ures_getByKey(rb.getAlias(), key, NULL, &status));
+ LocalUResourceBundlePointer unitsRes(ures_getByKey(rb.getAlias(), key, nullptr, &status));
ures_getByKey(unitsRes.getAlias(), "duration", unitsRes.getAlias(), &status);
if (U_FAILURE(status)) {
return;
@@ -507,19 +507,19 @@ TimeUnitFormat::checkConsistency(UTimeUnitFormatStyle style, const char* key, UE
LocalPointer<StringEnumeration> keywords(
getPluralRules().getKeywords(err), err);
const UnicodeString* pluralCount;
- while (U_SUCCESS(err) && (pluralCount = keywords->snext(err)) != NULL) {
+ while (U_SUCCESS(err) && (pluralCount = keywords->snext(err)) != nullptr) {
for (int32_t i = 0; i < TimeUnit::UTIMEUNIT_FIELD_COUNT; ++i) {
// for each time unit,
// get all the patterns for each plural rule in this locale.
Hashtable* countToPatterns = fTimeUnitToCountToPatterns[i];
- if ( countToPatterns == NULL ) {
+ if ( countToPatterns == nullptr ) {
fTimeUnitToCountToPatterns[i] = countToPatterns = initHash(err);
if (U_FAILURE(err)) {
return;
}
}
MessageFormat** formatters = (MessageFormat**)countToPatterns->get(*pluralCount);
- if( formatters == NULL || formatters[style] == NULL ) {
+ if( formatters == nullptr || formatters[style] == nullptr ) {
// look through parents
const char* localeName = getLocaleID(err);
CharString pluralCountChars;
@@ -559,31 +559,31 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key,
char parentLocale[ULOC_FULLNAME_CAPACITY];
uprv_strcpy(parentLocale, localeName);
int32_t locNameLen;
- U_ASSERT(countToPatterns != NULL);
+ U_ASSERT(countToPatterns != nullptr);
while ((locNameLen = uloc_getParent(parentLocale, parentLocale,
ULOC_FULLNAME_CAPACITY, &status)) >= 0){
// look for pattern for srcPluralCount in locale tree
LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_UNIT, parentLocale, &status));
- LocalUResourceBundlePointer unitsRes(ures_getByKey(rb.getAlias(), key, NULL, &status));
+ LocalUResourceBundlePointer unitsRes(ures_getByKey(rb.getAlias(), key, nullptr, &status));
const char* timeUnitName = getTimeUnitName(srcTimeUnitField, status);
- LocalUResourceBundlePointer countsToPatternRB(ures_getByKey(unitsRes.getAlias(), timeUnitName, NULL, &status));
- const UChar* pattern;
+ LocalUResourceBundlePointer countsToPatternRB(ures_getByKey(unitsRes.getAlias(), timeUnitName, nullptr, &status));
+ const char16_t* pattern;
int32_t ptLength;
pattern = ures_getStringByKeyWithFallback(countsToPatternRB.getAlias(), searchPluralCount, &ptLength, &status);
if (U_SUCCESS(status)) {
//found
LocalPointer<MessageFormat> messageFormat(
- new MessageFormat(UnicodeString(TRUE, pattern, ptLength), getLocale(err), err), err);
+ new MessageFormat(UnicodeString(true, pattern, ptLength), getLocale(err), err), err);
if (U_FAILURE(err)) {
return;
}
MessageFormat** formatters = (MessageFormat**)countToPatterns->get(srcPluralCount);
- if (formatters == NULL) {
+ if (formatters == nullptr) {
LocalMemory<MessageFormat *> localFormatters(
(MessageFormat**)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*)));
formatters = localFormatters.getAlias();
- localFormatters[UTMUTFMT_FULL_STYLE] = NULL;
- localFormatters[UTMUTFMT_ABBREVIATED_STYLE] = NULL;
+ localFormatters[UTMUTFMT_FULL_STYLE] = nullptr;
+ localFormatters[UTMUTFMT_ABBREVIATED_STYLE] = nullptr;
countToPatterns->put(srcPluralCount, localFormatters.orphan(), err);
if (U_FAILURE(err)) {
return;
@@ -615,7 +615,7 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key,
return;
}
MessageFormat** formatters = (MessageFormat**)countToPatterns->get(srcPluralCount);
- if (formatters != NULL && formatters[style] != NULL) {
+ if (formatters != nullptr && formatters[style] != nullptr) {
return;
}
}
@@ -625,7 +625,7 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key,
if ( uprv_strcmp(searchPluralCount, gPluralCountOther) == 0 ) {
// set default fall back the same as the resource in root
LocalPointer<MessageFormat> messageFormat;
- const UChar *pattern = NULL;
+ const char16_t *pattern = nullptr;
if ( srcTimeUnitField == TimeUnit::UTIMEUNIT_SECOND ) {
pattern = DEFAULT_PATTERN_FOR_SECOND;
} else if ( srcTimeUnitField == TimeUnit::UTIMEUNIT_MINUTE ) {
@@ -641,15 +641,15 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key,
} else if ( srcTimeUnitField == TimeUnit::UTIMEUNIT_YEAR ) {
pattern = DEFAULT_PATTERN_FOR_YEAR;
}
- if (pattern != NULL) {
+ if (pattern != nullptr) {
messageFormat.adoptInsteadAndCheckErrorCode(
- new MessageFormat(UnicodeString(TRUE, pattern, -1), getLocale(err), err), err);
+ new MessageFormat(UnicodeString(true, pattern, -1), getLocale(err), err), err);
}
if (U_FAILURE(err)) {
return;
}
MessageFormat** formatters = (MessageFormat**)countToPatterns->get(srcPluralCount);
- if (formatters == NULL) {
+ if (formatters == nullptr) {
LocalMemory<MessageFormat *> localFormatters (
(MessageFormat**)uprv_malloc(UTMUTFMT_FORMAT_STYLE_COUNT*sizeof(MessageFormat*)));
if (localFormatters.isNull()) {
@@ -657,8 +657,8 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key,
return;
}
formatters = localFormatters.getAlias();
- formatters[UTMUTFMT_FULL_STYLE] = NULL;
- formatters[UTMUTFMT_ABBREVIATED_STYLE] = NULL;
+ formatters[UTMUTFMT_FULL_STYLE] = nullptr;
+ formatters[UTMUTFMT_ABBREVIATED_STYLE] = nullptr;
countToPatterns->put(srcPluralCount, localFormatters.orphan(), err);
}
if (U_SUCCESS(err)) {
@@ -692,9 +692,9 @@ TimeUnitFormat::setNumberFormat(const NumberFormat& format, UErrorCode& status){
void
TimeUnitFormat::deleteHash(Hashtable* htable) {
int32_t pos = UHASH_FIRST;
- const UHashElement* element = NULL;
+ const UHashElement* element = nullptr;
if ( htable ) {
- while ( (element = htable->nextElement(pos)) != NULL ) {
+ while ( (element = htable->nextElement(pos)) != nullptr ) {
const UHashTok valueTok = element->value;
const MessageFormat** value = (const MessageFormat**)valueTok.pointer;
delete value[UTMUTFMT_FULL_STYLE];
@@ -713,9 +713,9 @@ TimeUnitFormat::copyHash(const Hashtable* source, Hashtable* target, UErrorCode&
return;
}
int32_t pos = UHASH_FIRST;
- const UHashElement* element = NULL;
+ const UHashElement* element = nullptr;
if ( source ) {
- while ( (element = source->nextElement(pos)) != NULL ) {
+ while ( (element = source->nextElement(pos)) != nullptr ) {
const UHashTok keyTok = element->key;
const UnicodeString* key = (UnicodeString*)keyTok.pointer;
const UHashTok valueTok = element->value;
@@ -742,7 +742,7 @@ U_CDECL_BEGIN
*
* @param val1 one value in comparison
* @param val2 the other value in comparison
- * @return TRUE if 2 values are the same, FALSE otherwise
+ * @return true if 2 values are the same, false otherwise
*/
static UBool U_CALLCONV tmutfmtHashTableValueComparator(UHashTok val1, UHashTok val2);
@@ -758,16 +758,16 @@ U_CDECL_END
Hashtable*
TimeUnitFormat::initHash(UErrorCode& status) {
if ( U_FAILURE(status) ) {
- return NULL;
+ return nullptr;
}
Hashtable* hTable;
- if ( (hTable = new Hashtable(TRUE, status)) == NULL ) {
+ if ( (hTable = new Hashtable(true, status)) == nullptr ) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if ( U_FAILURE(status) ) {
delete hTable;
- return NULL;
+ return nullptr;
}
hTable->setValueComparator(tmutfmtHashTableValueComparator);
return hTable;
@@ -778,7 +778,7 @@ const char*
TimeUnitFormat::getTimeUnitName(TimeUnit::UTimeUnitFields unitField,
UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
switch (unitField) {
case TimeUnit::UTIMEUNIT_YEAR:
@@ -797,7 +797,7 @@ TimeUnitFormat::getTimeUnitName(TimeUnit::UTimeUnitFields unitField,
return gTimeUnitSecond;
default:
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
}
diff --git a/contrib/libs/icu/i18n/translit.cpp b/contrib/libs/icu/i18n/translit.cpp
index c7d6b510576..29d38b12c7f 100644
--- a/contrib/libs/icu/i18n/translit.cpp
+++ b/contrib/libs/icu/i18n/translit.cpp
@@ -54,9 +54,9 @@
#include "cstring.h"
#include "uinvchar.h"
-static const UChar TARGET_SEP = 0x002D; /*-*/
-static const UChar ID_DELIM = 0x003B; /*;*/
-static const UChar VARIANT_SEP = 0x002F; // '/'
+static const char16_t TARGET_SEP = 0x002D; /*-*/
+static const char16_t ID_DELIM = 0x003B; /*;*/
+static const char16_t VARIANT_SEP = 0x002F; // '/'
/**
* Prefix for resource bundle key for the display name for a
@@ -107,7 +107,7 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(Transliterator)
/**
- * Return TRUE if the given UTransPosition is valid for text of
+ * Return true if the given UTransPosition is valid for text of
* the given length.
*/
static inline UBool positionIsValid(UTransPosition& index, int32_t len) {
@@ -122,7 +122,7 @@ static inline UBool positionIsValid(UTransPosition& index, int32_t len) {
* Default constructor.
* @param theID the string identifier for this transliterator
* @param theFilter the filter. Any character for which
- * <tt>filter.contains()</tt> returns <tt>FALSE</tt> will not be
+ * <tt>filter.contains()</tt> returns <tt>false</tt> will not be
* altered by this transliterator. If <tt>filter</tt> is
* <tt>null</tt> then no filtering is applied.
*/
@@ -132,7 +132,7 @@ Transliterator::Transliterator(const UnicodeString& theID,
maximumContextLength(0)
{
// NUL-terminate the ID string, which is a non-aliased copy.
- ID.append((UChar)0);
+ ID.append((char16_t)0);
ID.truncate(ID.length()-1);
}
@@ -153,7 +153,7 @@ Transliterator::Transliterator(const Transliterator& other) :
maximumContextLength(other.maximumContextLength)
{
// NUL-terminate the ID string, which is a non-aliased copy.
- ID.append((UChar)0);
+ ID.append((char16_t)0);
ID.truncate(ID.length()-1);
if (other.filter != 0) {
@@ -163,7 +163,7 @@ Transliterator::Transliterator(const Transliterator& other) :
}
Transliterator* Transliterator::clone() const {
- return NULL;
+ return nullptr;
}
/**
@@ -202,7 +202,7 @@ int32_t Transliterator::transliterate(Replaceable& text,
offsets.contextLimit = limit;
offsets.start = start;
offsets.limit = limit;
- filteredTransliterate(text, offsets, FALSE, TRUE);
+ filteredTransliterate(text, offsets, false, true);
return offsets.limit;
}
@@ -341,7 +341,7 @@ void Transliterator::finishTransliteration(Replaceable& text,
return;
}
- filteredTransliterate(text, index, FALSE, TRUE);
+ filteredTransliterate(text, index, false, true);
}
/**
@@ -380,7 +380,7 @@ void Transliterator::_transliterate(Replaceable& text,
return;
}
- filteredTransliterate(text, index, TRUE, TRUE);
+ filteredTransliterate(text, index, true, true);
#if 0
// TODO
@@ -440,7 +440,7 @@ void Transliterator::filteredTransliterate(Replaceable& text,
// This method processes text in two groupings:
//
// RUNS -- A run is a contiguous group of characters which are contained
- // in the filter for this transliterator (filter.contains(ch) == TRUE).
+ // in the filter for this transliterator (filter.contains(ch) == true).
// Text outside of runs may appear as context but it is not modified.
// The start and limit Position values are narrowed to each run.
//
@@ -474,7 +474,7 @@ void Transliterator::filteredTransliterate(Replaceable& text,
for (;;) {
- if (filter != NULL) {
+ if (filter != nullptr) {
// Narrow the range to be transliterated to the first segment
// of unfiltered characters at or after index.start.
@@ -503,10 +503,10 @@ void Transliterator::filteredTransliterate(Replaceable& text,
// Is this run incremental? If there is additional
// filtered text (if limit < globalLimit) then we pass in
- // an incremental value of FALSE to force the subclass to
+ // an incremental value of false to force the subclass to
// complete the transliteration for this run.
UBool isIncrementalRun =
- (index.limit < globalLimit ? FALSE : incremental);
+ (index.limit < globalLimit ? false : incremental);
int32_t delta;
@@ -585,7 +585,7 @@ void Transliterator::filteredTransliterate(Replaceable& text,
// return, start will be updated to point after the
// transliterated text, and limit and contextLimit will be
// adjusted for length changes.
- handleTransliterate(text, index, TRUE);
+ handleTransliterate(text, index, true);
delta = index.limit - passLimit; // change in length
@@ -666,7 +666,7 @@ void Transliterator::filteredTransliterate(Replaceable& text,
globalLimit += delta;
}
- if (filter == NULL || isIncrementalRun) {
+ if (filter == nullptr || isIncrementalRun) {
break;
}
@@ -682,7 +682,7 @@ void Transliterator::filteredTransliterate(Replaceable& text,
void Transliterator::filteredTransliterate(Replaceable& text,
UTransPosition& index,
UBool incremental) const {
- filteredTransliterate(text, index, incremental, FALSE);
+ filteredTransliterate(text, index, incremental, false);
}
/**
@@ -700,7 +700,7 @@ void Transliterator::setMaximumContextLength(int32_t maxContextLength) {
* @see #registerInstance
* @see #getAvailableIDs
*/
-const UnicodeString& Transliterator::getID(void) const {
+const UnicodeString& Transliterator::getID() const {
return ID;
}
@@ -834,19 +834,19 @@ UnicodeString& U_EXPORT2 Transliterator::getDisplayName(const UnicodeString& id,
* if this transliterator uses no filter. Caller musn't delete
* the result!
*/
-const UnicodeFilter* Transliterator::getFilter(void) const {
+const UnicodeFilter* Transliterator::getFilter() const {
return filter;
}
/**
* Returns the filter used by this transliterator, or
- * <tt>NULL</tt> if this transliterator uses no filter. The
+ * <tt>nullptr</tt> if this transliterator uses no filter. The
* caller must eventually delete the result. After this call,
- * this transliterator's filter is set to <tt>NULL</tt>.
+ * this transliterator's filter is set to <tt>nullptr</tt>.
*/
-UnicodeFilter* Transliterator::orphanFilter(void) {
+UnicodeFilter* Transliterator::orphanFilter() {
UnicodeFilter *result = filter;
- filter = NULL;
+ filter = nullptr;
return result;
}
@@ -921,7 +921,7 @@ Transliterator::createInstance(const UnicodeString& ID,
UnicodeString canonID;
UVector list(status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
UnicodeSet* globalFilter = nullptr;
@@ -930,17 +930,17 @@ Transliterator::createInstance(const UnicodeString& ID,
if (!TransliteratorIDParser::parseCompoundID(ID, dir, canonID, list, globalFilter)) {
status = U_INVALID_ID;
delete globalFilter;
- return NULL;
+ return nullptr;
}
LocalPointer<UnicodeSet> lpGlobalFilter(globalFilter);
TransliteratorIDParser::instantiateList(list, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
U_ASSERT(list.size() > 0);
- Transliterator* t = NULL;
+ Transliterator* t = nullptr;
if (list.size() > 1 || canonID.indexOf(ID_DELIM) >= 0) {
// [NOTE: If it's a compoundID, we instantiate a CompoundTransliterator even if it only
@@ -954,7 +954,7 @@ Transliterator::createInstance(const UnicodeString& ID,
t = (Transliterator*)list.elementAt(0);
}
// Check null pointer
- if (t != NULL) {
+ if (t != nullptr) {
t->setID(canonID);
if (lpGlobalFilter.isValid()) {
t->adoptFilter(lpGlobalFilter.orphan());
@@ -1029,12 +1029,12 @@ Transliterator* Transliterator::createBasicInstance(const UnicodeString& id,
if (U_FAILURE(ec)) {
delete t;
delete alias;
- t = NULL;
+ t = nullptr;
break;
}
}
- if (t != NULL && canon != NULL) {
+ if (t != nullptr && canon != nullptr) {
t->setID(*canon);
}
@@ -1056,7 +1056,7 @@ Transliterator::createFromRules(const UnicodeString& ID,
UParseError& parseError,
UErrorCode& status)
{
- Transliterator* t = NULL;
+ Transliterator* t = nullptr;
TransliteratorParser parser(status);
parser.parse(rules, dir, parseError, status);
@@ -1070,16 +1070,16 @@ Transliterator::createFromRules(const UnicodeString& ID,
t = new NullTransliterator();
}
else if (parser.idBlockVector.size() == 0 && parser.dataVector.size() == 1) {
- t = new RuleBasedTransliterator(ID, (TransliterationRuleData*)parser.dataVector.orphanElementAt(0), TRUE);
+ t = new RuleBasedTransliterator(ID, (TransliterationRuleData*)parser.dataVector.orphanElementAt(0), true);
}
else if (parser.idBlockVector.size() == 1 && parser.dataVector.size() == 0) {
// idBlock, no data -- this is an alias. The ID has
// been munged from reverse into forward mode, if
// necessary, so instantiate the ID in the forward
// direction.
- if (parser.compoundFilter != NULL) {
+ if (parser.compoundFilter != nullptr) {
UnicodeString filterPattern;
- parser.compoundFilter->toPattern(filterPattern, FALSE);
+ parser.compoundFilter->toPattern(filterPattern, false);
t = createInstance(filterPattern + UnicodeString(ID_DELIM)
+ *((UnicodeString*)parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status);
}
@@ -1087,7 +1087,7 @@ Transliterator::createFromRules(const UnicodeString& ID,
t = createInstance(*((UnicodeString*)parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status);
- if (t != NULL) {
+ if (t != nullptr) {
t->setID(ID);
}
}
@@ -1110,7 +1110,7 @@ Transliterator::createFromRules(const UnicodeString& ID,
delete temp;
return nullptr;
}
- if (temp != NULL && typeid(*temp) != typeid(NullTransliterator)) {
+ if (temp != nullptr && typeid(*temp) != typeid(NullTransliterator)) {
transliterators.addElement(temp, status);
if (U_FAILURE(status)) {
delete temp;
@@ -1125,9 +1125,9 @@ Transliterator::createFromRules(const UnicodeString& ID,
TransliterationRuleData* data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0);
// TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")?
RuleBasedTransliterator* temprbt = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++),
- data, TRUE);
- // Check if NULL before adding it to transliterators to avoid future usage of NULL pointer.
- if (temprbt == NULL) {
+ data, true);
+ // Check if nullptr before adding it to transliterators to avoid future usage of nullptr pointer.
+ if (temprbt == nullptr) {
if (U_SUCCESS(status)) {
status = U_MEMORY_ALLOCATION_ERROR;
}
@@ -1146,12 +1146,12 @@ Transliterator::createFromRules(const UnicodeString& ID,
t = new CompoundTransliterator(transliterators, passNumber - 1, parseError, status);
// Null pointer check
- if (t != NULL) {
+ if (t != nullptr) {
t->setID(ID);
t->adoptFilter(parser.orphanCompoundFilter());
}
}
- if (U_SUCCESS(status) && t == NULL) {
+ if (U_SUCCESS(status) && t == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
return t;
@@ -1182,7 +1182,7 @@ UnicodeString& Transliterator::toRules(UnicodeString& rulesSource,
int32_t Transliterator::countElements() const {
const CompoundTransliterator* ct = dynamic_cast<const CompoundTransliterator*>(this);
- return ct != NULL ? ct->getCount() : 0;
+ return ct != nullptr ? ct->getCount() : 0;
}
const Transliterator& Transliterator::getElement(int32_t index, UErrorCode& ec) const {
@@ -1190,7 +1190,7 @@ const Transliterator& Transliterator::getElement(int32_t index, UErrorCode& ec)
return *this;
}
const CompoundTransliterator* cpd = dynamic_cast<const CompoundTransliterator*>(this);
- int32_t n = (cpd == NULL) ? 1 : cpd->getCount();
+ int32_t n = (cpd == nullptr) ? 1 : cpd->getCount();
if (index < 0 || index >= n) {
ec = U_INDEX_OUTOFBOUNDS_ERROR;
return *this;
@@ -1201,18 +1201,18 @@ const Transliterator& Transliterator::getElement(int32_t index, UErrorCode& ec)
UnicodeSet& Transliterator::getSourceSet(UnicodeSet& result) const {
handleGetSourceSet(result);
- if (filter != NULL) {
+ if (filter != nullptr) {
UnicodeSet* filterSet = dynamic_cast<UnicodeSet*>(filter);
- UBool deleteFilterSet = FALSE;
+ UBool deleteFilterSet = false;
// Most, but not all filters will be UnicodeSets. Optimize for
// the high-runner case.
- if (filterSet == NULL) {
+ if (filterSet == nullptr) {
filterSet = new UnicodeSet();
// Check null pointer
- if (filterSet == NULL) {
+ if (filterSet == nullptr) {
return result;
}
- deleteFilterSet = TRUE;
+ deleteFilterSet = true;
filter->addMatchSetTo(*filterSet);
}
result.retainAll(*filterSet);
@@ -1248,7 +1248,7 @@ void Transliterator::_registerFactory(const UnicodeString& id,
Transliterator::Factory factory,
Transliterator::Token context) {
UErrorCode ec = U_ZERO_ERROR;
- registry->put(id, factory, context, TRUE, ec);
+ registry->put(id, factory, context, true, ec);
}
// To be called only by Transliterator subclasses that are called
@@ -1283,7 +1283,7 @@ void U_EXPORT2 Transliterator::registerInstance(Transliterator* adoptedPrototype
void Transliterator::_registerInstance(Transliterator* adoptedPrototype) {
UErrorCode ec = U_ZERO_ERROR;
- registry->put(adoptedPrototype, TRUE, ec);
+ registry->put(adoptedPrototype, true, ec);
}
void U_EXPORT2 Transliterator::registerAlias(const UnicodeString& aliasID,
@@ -1298,7 +1298,7 @@ void U_EXPORT2 Transliterator::registerAlias(const UnicodeString& aliasID,
void Transliterator::_registerAlias(const UnicodeString& aliasID,
const UnicodeString& realID) {
UErrorCode ec = U_ZERO_ERROR;
- registry->put(aliasID, realID, FALSE, TRUE, ec);
+ registry->put(aliasID, realID, false, true, ec);
}
/**
@@ -1323,7 +1323,7 @@ void U_EXPORT2 Transliterator::unregister(const UnicodeString& ID) {
* To retrieve the actual IDs, call getAvailableID(i) with
* i from 0 to countAvailableIDs() - 1.
*/
-int32_t U_EXPORT2 Transliterator::countAvailableIDs(void) {
+int32_t U_EXPORT2 Transliterator::countAvailableIDs() {
int32_t retVal = 0;
Mutex lock(&registryMutex);
UErrorCode ec = U_ZERO_ERROR;
@@ -1340,32 +1340,32 @@ int32_t U_EXPORT2 Transliterator::countAvailableIDs(void) {
* range, the result of getAvailableID(0) is returned.
*/
const UnicodeString& U_EXPORT2 Transliterator::getAvailableID(int32_t index) {
- const UnicodeString* result = NULL;
+ const UnicodeString* result = nullptr;
umtx_lock(&registryMutex);
UErrorCode ec = U_ZERO_ERROR;
if (HAVE_REGISTRY(ec)) {
result = &registry->getAvailableID(index);
}
umtx_unlock(&registryMutex);
- U_ASSERT(result != NULL); // fail if no registry
+ U_ASSERT(result != nullptr); // fail if no registry
return *result;
}
StringEnumeration* U_EXPORT2 Transliterator::getAvailableIDs(UErrorCode& ec) {
- if (U_FAILURE(ec)) return NULL;
- StringEnumeration* result = NULL;
+ if (U_FAILURE(ec)) return nullptr;
+ StringEnumeration* result = nullptr;
umtx_lock(&registryMutex);
if (HAVE_REGISTRY(ec)) {
result = registry->getAvailableIDs();
}
umtx_unlock(&registryMutex);
- if (result == NULL) {
+ if (result == nullptr) {
ec = U_INTERNAL_TRANSLITERATOR_ERROR;
}
return result;
}
-int32_t U_EXPORT2 Transliterator::countAvailableSources(void) {
+int32_t U_EXPORT2 Transliterator::countAvailableSources() {
Mutex lock(&registryMutex);
UErrorCode ec = U_ZERO_ERROR;
return HAVE_REGISTRY(ec) ? _countAvailableSources() : 0;
@@ -1417,7 +1417,7 @@ UnicodeString& U_EXPORT2 Transliterator::getAvailableVariant(int32_t index,
return result;
}
-int32_t Transliterator::_countAvailableSources(void) {
+int32_t Transliterator::_countAvailableSources() {
return registry->countAvailableSources();
}
@@ -1456,19 +1456,19 @@ UnicodeString& Transliterator::_getAvailableVariant(int32_t index,
* @deprecated the new architecture provides filtering at the top
* level. This method will be removed Dec 31 2001.
*/
-UChar Transliterator::filteredCharAt(const Replaceable& text, int32_t i) const {
- UChar c;
+char16_t Transliterator::filteredCharAt(const Replaceable& text, int32_t i) const {
+ char16_t c;
const UnicodeFilter* localFilter = getFilter();
return (localFilter == 0) ? text.charAt(i) :
- (localFilter->contains(c = text.charAt(i)) ? c : (UChar)0xFFFE);
+ (localFilter->contains(c = text.charAt(i)) ? c : (char16_t)0xFFFE);
}
#endif
/**
- * If the registry is initialized, return TRUE. If not, initialize it
- * and return TRUE. If the registry cannot be initialized, return
- * FALSE (rare).
+ * If the registry is initialized, return true. If not, initialize it
+ * and return true. If the registry cannot be initialized, return
+ * false (rare).
*
* IMPORTANT: Upon entry, registryMutex must be LOCKED. The entire
* initialization is done with the lock held. There is NO REASON to
@@ -1477,14 +1477,14 @@ UChar Transliterator::filteredCharAt(const Replaceable& text, int32_t i) const {
*/
UBool Transliterator::initializeRegistry(UErrorCode &status) {
if (registry != 0) {
- return TRUE;
+ return true;
}
registry = new TransliteratorRegistry(status);
if (registry == 0 || U_FAILURE(status)) {
delete registry;
registry = 0;
- return FALSE; // can't create registry, no recovery
+ return false; // can't create registry, no recovery
}
/* The following code parses the index table located in
@@ -1525,7 +1525,7 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
UErrorCode lstatus = U_ZERO_ERROR;
UResourceBundle *bundle, *transIDs, *colBund;
- bundle = ures_open(U_ICUDATA_TRANSLIT, NULL/*open default locale*/, &lstatus);
+ bundle = ures_open(U_ICUDATA_TRANSLIT, nullptr/*open default locale*/, &lstatus);
transIDs = ures_getByKey(bundle, RB_RULE_BASED_IDS, 0, &lstatus);
const UnicodeString T_PART = UNICODE_STRING_SIMPLE("-t-");
@@ -1534,7 +1534,7 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
delete registry;
registry = nullptr;
status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
if (U_SUCCESS(lstatus)) {
maxRows = ures_getSize(transIDs);
@@ -1546,14 +1546,14 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
ures_close(colBund);
continue;
}
- UResourceBundle* res = ures_getNextResource(colBund, NULL, &lstatus);
+ UResourceBundle* res = ures_getNextResource(colBund, nullptr, &lstatus);
const char* typeStr = ures_getKey(res);
- UChar type;
+ char16_t type;
u_charsToUChars(typeStr, &type, 1);
if (U_SUCCESS(lstatus)) {
int32_t len = 0;
- const UChar *resString;
+ const char16_t *resString;
switch (type) {
case 0x66: // 'f'
case 0x69: // 'i'
@@ -1567,13 +1567,13 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
(ures_getUnicodeStringByKey(res, "direction", &lstatus).charAt(0) ==
0x0046 /*F*/) ?
UTRANS_FORWARD : UTRANS_REVERSE;
- registry->put(id, UnicodeString(TRUE, resString, len), dir, TRUE, visible, lstatus);
+ registry->put(id, UnicodeString(true, resString, len), dir, true, visible, lstatus);
}
break;
case 0x61: // 'a'
// 'alias'; row[2]=createInstance argument
resString = ures_getString(res, &len, &lstatus);
- registry->put(id, UnicodeString(TRUE, resString, len), TRUE, TRUE, lstatus);
+ registry->put(id, UnicodeString(true, resString, len), true, true, lstatus);
break;
}
}
@@ -1602,12 +1602,12 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
BreakTransliterator* tempBreakTranslit = new BreakTransliterator();
#endif
// Check for null pointers
- if (tempNullTranslit == NULL || tempLowercaseTranslit == NULL || tempUppercaseTranslit == NULL ||
- tempTitlecaseTranslit == NULL || tempUnicodeTranslit == NULL ||
+ if (tempNullTranslit == nullptr || tempLowercaseTranslit == nullptr || tempUppercaseTranslit == nullptr ||
+ tempTitlecaseTranslit == nullptr || tempUnicodeTranslit == nullptr ||
#if !UCONFIG_NO_BREAK_ITERATION
- tempBreakTranslit == NULL ||
+ tempBreakTranslit == nullptr ||
#endif
- tempNameUnicodeTranslit == NULL )
+ tempNameUnicodeTranslit == nullptr )
{
delete tempNullTranslit;
delete tempLowercaseTranslit;
@@ -1620,20 +1620,20 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
#endif
// Since there was an error, remove registry
delete registry;
- registry = NULL;
+ registry = nullptr;
status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
- registry->put(tempNullTranslit, TRUE, status);
- registry->put(tempLowercaseTranslit, TRUE, status);
- registry->put(tempUppercaseTranslit, TRUE, status);
- registry->put(tempTitlecaseTranslit, TRUE, status);
- registry->put(tempUnicodeTranslit, TRUE, status);
- registry->put(tempNameUnicodeTranslit, TRUE, status);
+ registry->put(tempNullTranslit, true, status);
+ registry->put(tempLowercaseTranslit, true, status);
+ registry->put(tempUppercaseTranslit, true, status);
+ registry->put(tempTitlecaseTranslit, true, status);
+ registry->put(tempUnicodeTranslit, true, status);
+ registry->put(tempNameUnicodeTranslit, true, status);
#if !UCONFIG_NO_BREAK_ITERATION
- registry->put(tempBreakTranslit, FALSE, status); // FALSE means invisible.
+ registry->put(tempBreakTranslit, false, status); // false means invisible.
#endif
RemoveTransliterator::registerIDs(); // Must be within mutex
@@ -1643,15 +1643,15 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) {
AnyTransliterator::registerIDs();
_registerSpecialInverse(UNICODE_STRING_SIMPLE("Null"),
- UNICODE_STRING_SIMPLE("Null"), FALSE);
+ UNICODE_STRING_SIMPLE("Null"), false);
_registerSpecialInverse(UNICODE_STRING_SIMPLE("Upper"),
- UNICODE_STRING_SIMPLE("Lower"), TRUE);
+ UNICODE_STRING_SIMPLE("Lower"), true);
_registerSpecialInverse(UNICODE_STRING_SIMPLE("Title"),
- UNICODE_STRING_SIMPLE("Lower"), FALSE);
+ UNICODE_STRING_SIMPLE("Lower"), false);
ucln_i18n_registerCleanup(UCLN_I18N_TRANSLITERATOR, utrans_transliterator_cleanup);
- return TRUE;
+ return true;
}
U_NAMESPACE_END
@@ -1663,14 +1663,14 @@ U_NAMESPACE_END
* necessarily invalidate any rule-based transliterators held by the
* user, because RBTs hold pointers to common data objects.
*/
-U_CFUNC UBool utrans_transliterator_cleanup(void) {
+U_CFUNC UBool utrans_transliterator_cleanup() {
U_NAMESPACE_USE
TransliteratorIDParser::cleanup();
if (registry) {
delete registry;
- registry = NULL;
+ registry = nullptr;
}
- return TRUE;
+ return true;
}
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/contrib/libs/icu/i18n/transreg.cpp b/contrib/libs/icu/i18n/transreg.cpp
index 726ad56f0f6..46c68eb74da 100644
--- a/contrib/libs/icu/i18n/transreg.cpp
+++ b/contrib/libs/icu/i18n/transreg.cpp
@@ -40,14 +40,14 @@
#include <stdio.h>
#endif
-// UChar constants
-static const UChar LOCALE_SEP = 95; // '_'
-//static const UChar ID_SEP = 0x002D; /*-*/
-//static const UChar VARIANT_SEP = 0x002F; // '/'
+// char16_t constants
+static const char16_t LOCALE_SEP = 95; // '_'
+//static const char16_t ID_SEP = 0x002D; /*-*/
+//static const char16_t VARIANT_SEP = 0x002F; // '/'
// String constants
-static const UChar ANY[] = { 0x41, 0x6E, 0x79, 0 }; // Any
-static const UChar LAT[] = { 0x4C, 0x61, 0x74, 0 }; // Lat
+static const char16_t ANY[] = { 0x41, 0x6E, 0x79, 0 }; // Any
+static const char16_t LAT[] = { 0x4C, 0x61, 0x74, 0 }; // Lat
// empty string
#define NO_VARIANT UnicodeString()
@@ -123,7 +123,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe,
if (U_FAILURE(ec)) {
return 0;
}
- Transliterator *t = NULL;
+ Transliterator *t = nullptr;
switch (type) {
case SIMPLE:
t = Transliterator::createInstance(aliasesOrRules, UTRANS_FORWARD, pe, ec);
@@ -141,22 +141,16 @@ Transliterator* TransliteratorAlias::create(UParseError& pe,
// to see whether there really are ID blocks at the beginning and end (by looking for U+FFFF, which
// marks the position where an anonymous transliterator goes) and adjust accordingly
int32_t anonymousRBTs = transes->size();
- int32_t transCount = anonymousRBTs * 2 + 1;
- if (!aliasesOrRules.isEmpty() && aliasesOrRules[0] == (UChar)(0xffff))
- --transCount;
- if (aliasesOrRules.length() >= 2 && aliasesOrRules[aliasesOrRules.length() - 1] == (UChar)(0xffff))
- --transCount;
- UnicodeString noIDBlock((UChar)(0xffff));
- noIDBlock += ((UChar)(0xffff));
+ UnicodeString noIDBlock((char16_t)(0xffff));
+ noIDBlock += ((char16_t)(0xffff));
int32_t pos = aliasesOrRules.indexOf(noIDBlock);
while (pos >= 0) {
- --transCount;
pos = aliasesOrRules.indexOf(noIDBlock, pos + 1);
}
UVector transliterators(uprv_deleteUObject, nullptr, ec);
UnicodeString idBlock;
- int32_t blockSeparatorPos = aliasesOrRules.indexOf((UChar)(0xffff));
+ int32_t blockSeparatorPos = aliasesOrRules.indexOf((char16_t)(0xffff));
while (blockSeparatorPos >= 0) {
aliasesOrRules.extract(0, blockSeparatorPos, idBlock);
aliasesOrRules.remove(0, blockSeparatorPos + 1);
@@ -164,7 +158,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe,
transliterators.adoptElement(Transliterator::createInstance(idBlock, UTRANS_FORWARD, pe, ec), ec);
if (!transes->isEmpty())
transliterators.adoptElement(transes->orphanElementAt(0), ec);
- blockSeparatorPos = aliasesOrRules.indexOf((UChar)(0xffff));
+ blockSeparatorPos = aliasesOrRules.indexOf((char16_t)(0xffff));
}
if (!aliasesOrRules.isEmpty())
transliterators.adoptElement(Transliterator::createInstance(aliasesOrRules, UTRANS_FORWARD, pe, ec), ec);
@@ -187,7 +181,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe,
}
break;
case RULES:
- UPRV_UNREACHABLE_EXIT; // don't call create() if isRuleBased() returns TRUE!
+ UPRV_UNREACHABLE_EXIT; // don't call create() if isRuleBased() returns true!
}
return t;
}
@@ -248,8 +242,8 @@ class TransliteratorSpec : public UMemory {
UnicodeString spec;
UnicodeString nextSpec;
UnicodeString scriptName;
- UBool isSpecLocale; // TRUE if spec is a locale
- UBool isNextLocale; // TRUE if nextSpec is a locale
+ UBool isSpecLocale; // true if spec is a locale
+ UBool isNextLocale; // true if nextSpec is a locale
ResourceBundle* res;
TransliteratorSpec(const TransliteratorSpec &other); // forbid copying of this class
@@ -265,7 +259,7 @@ TransliteratorSpec::TransliteratorSpec(const UnicodeString& theSpec)
LocaleUtility::initLocaleFromName(theSpec, topLoc);
if (!topLoc.isBogus()) {
res = new ResourceBundle(U_ICUDATA_TRANSLIT, topLoc, status);
- /* test for NULL */
+ /* test for nullptr */
if (res == 0) {
return;
}
@@ -319,7 +313,7 @@ void TransliteratorSpec::reset() {
}
void TransliteratorSpec::setupNext() {
- isNextLocale = FALSE;
+ isNextLocale = false;
if (isSpecLocale) {
nextSpec = spec;
int32_t i = nextSpec.lastIndexOf(LOCALE_SEP);
@@ -327,7 +321,7 @@ void TransliteratorSpec::setupNext() {
// to the scriptName.
if (i > 0) {
nextSpec.truncate(i);
- isNextLocale = TRUE;
+ isNextLocale = true;
} else {
nextSpec = scriptName; // scriptName may be empty
}
@@ -365,10 +359,10 @@ ResourceBundle& TransliteratorSpec::getBundle() const {
#ifdef DEBUG_MEM
// Vector of Entry pointers currently in use
-static UVector* DEBUG_entries = NULL;
+static UVector* DEBUG_entries = nullptr;
static void DEBUG_setup() {
- if (DEBUG_entries == NULL) {
+ if (DEBUG_entries == nullptr) {
UErrorCode ec = U_ZERO_ERROR;
DEBUG_entries = new UVector(ec);
}
@@ -410,7 +404,7 @@ static void DEBUG_delEntry(TransliteratorEntry* e) {
// Track object usage
static void DEBUG_useEntry(TransliteratorEntry* e) {
- if (e == NULL) return;
+ if (e == nullptr) return;
DEBUG_setup();
int i = DEBUG_findEntry(e);
if (i < 0) {
@@ -480,7 +474,7 @@ private:
TransliteratorEntry::TransliteratorEntry() {
u.prototype = 0;
- compoundFilter = NULL;
+ compoundFilter = nullptr;
entryType = NONE;
DEBUG_newEntry(this);
}
@@ -496,7 +490,7 @@ TransliteratorEntry::~TransliteratorEntry() {
// invalidates any RBTs that the user has instantiated.
delete u.data;
} else if (entryType == COMPOUND_RBT) {
- while (u.dataVector != NULL && !u.dataVector->isEmpty())
+ while (u.dataVector != nullptr && !u.dataVector->isEmpty())
delete (TransliterationRuleData*)u.dataVector->orphanElementAt(0);
delete u.dataVector;
}
@@ -534,8 +528,8 @@ U_CDECL_END
//----------------------------------------------------------------------
TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) :
- registry(TRUE, status),
- specDAG(TRUE, SPECDAG_INIT_SIZE, status),
+ registry(true, status),
+ specDAG(true, SPECDAG_INIT_SIZE, status),
variantList(VARIANT_LIST_INIT_SIZE, status),
availableIDs(AVAILABLE_IDS_INIT_SIZE, status)
{
@@ -543,7 +537,7 @@ TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) :
variantList.setDeleter(uprv_deleteUObject);
variantList.setComparer(uhash_compareCaselessUnicodeString);
UnicodeString *emptyString = new UnicodeString();
- if (emptyString != NULL) {
+ if (emptyString != nullptr) {
variantList.adoptElement(emptyString, status);
}
availableIDs.setDeleter(uprv_deleteUObject);
@@ -558,7 +552,7 @@ TransliteratorRegistry::~TransliteratorRegistry() {
Transliterator* TransliteratorRegistry::get(const UnicodeString& ID,
TransliteratorAlias*& aliasReturn,
UErrorCode& status) {
- U_ASSERT(aliasReturn == NULL);
+ U_ASSERT(aliasReturn == nullptr);
TransliteratorEntry *entry = find(ID);
return (entry == 0) ? 0
: instantiateEntry(ID, entry, aliasReturn, status);
@@ -568,7 +562,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID,
TransliteratorParser& parser,
TransliteratorAlias*& aliasReturn,
UErrorCode& status) {
- U_ASSERT(aliasReturn == NULL);
+ U_ASSERT(aliasReturn == nullptr);
TransliteratorEntry *entry = find(ID);
if (entry == 0) {
@@ -580,7 +574,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID,
// The usage model for the caller is that they will first call
// reg->get() inside the mutex, they'll get back an alias, they call
- // alias->isRuleBased(), and if they get TRUE, they call alias->parse()
+ // alias->isRuleBased(), and if they get true, they call alias->parse()
// outside the mutex, then reg->reget() inside the mutex again. A real
// mess, but it gets things working for ICU 3.0. [alan].
@@ -597,7 +591,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID,
if (parser.idBlockVector.isEmpty() && parser.dataVector.isEmpty()) {
entry->u.data = 0;
entry->entryType = TransliteratorEntry::ALIAS;
- entry->stringArg = UNICODE_STRING_SIMPLE("Any-NULL");
+ entry->stringArg = UNICODE_STRING_SIMPLE("Any-nullptr");
}
else if (parser.idBlockVector.isEmpty() && parser.dataVector.size() == 1) {
entry->u.data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0);
@@ -632,7 +626,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID,
if (U_FAILURE(status)) {
delete data;
}
- entry->stringArg += (UChar)0xffff; // use U+FFFF to mark position of RBTs in ID block
+ entry->stringArg += (char16_t)0xffff; // use U+FFFF to mark position of RBTs in ID block
}
}
}
@@ -648,7 +642,7 @@ void TransliteratorRegistry::put(Transliterator* adoptedProto,
UErrorCode& ec)
{
TransliteratorEntry *entry = new TransliteratorEntry();
- if (entry == NULL) {
+ if (entry == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -662,7 +656,7 @@ void TransliteratorRegistry::put(const UnicodeString& ID,
UBool visible,
UErrorCode& ec) {
TransliteratorEntry *entry = new TransliteratorEntry();
- if (entry == NULL) {
+ if (entry == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -677,14 +671,14 @@ void TransliteratorRegistry::put(const UnicodeString& ID,
UBool visible,
UErrorCode& ec) {
TransliteratorEntry *entry = new TransliteratorEntry();
- if (entry == NULL) {
+ if (entry == nullptr) {
ec = U_MEMORY_ALLOCATION_ERROR;
return;
}
entry->entryType = (dir == UTRANS_FORWARD) ? TransliteratorEntry::RULES_FORWARD
: TransliteratorEntry::RULES_REVERSE;
if (readonlyResourceAlias) {
- entry->stringArg.setTo(TRUE, resourceName.getBuffer(), -1);
+ entry->stringArg.setTo(true, resourceName.getBuffer(), -1);
}
else {
entry->stringArg = resourceName;
@@ -699,10 +693,10 @@ void TransliteratorRegistry::put(const UnicodeString& ID,
UErrorCode& /*ec*/) {
TransliteratorEntry *entry = new TransliteratorEntry();
// Null pointer check
- if (entry != NULL) {
+ if (entry != nullptr) {
entry->entryType = TransliteratorEntry::ALIAS;
if (readonlyAliasAlias) {
- entry->stringArg.setTo(TRUE, alias.getBuffer(), -1);
+ entry->stringArg.setTo(true, alias.getBuffer(), -1);
}
else {
entry->stringArg = alias;
@@ -733,7 +727,7 @@ void TransliteratorRegistry::remove(const UnicodeString& ID) {
* To retrieve the actual IDs, call getAvailableID(i) with
* i from 0 to countAvailableIDs() - 1.
*/
-int32_t TransliteratorRegistry::countAvailableIDs(void) const {
+int32_t TransliteratorRegistry::countAvailableIDs() const {
return availableIDs.size();
}
@@ -754,7 +748,7 @@ StringEnumeration* TransliteratorRegistry::getAvailableIDs() const {
return new Enumeration(*this);
}
-int32_t TransliteratorRegistry::countAvailableSources(void) const {
+int32_t TransliteratorRegistry::countAvailableSources() const {
return specDAG.count();
}
@@ -838,7 +832,7 @@ UnicodeString& TransliteratorRegistry::getAvailableVariant(int32_t index,
if (varMask & 1) {
if (varCount == index) {
UnicodeString *v = (UnicodeString*) variantList.elementAt(varListIndex);
- if (v != NULL) {
+ if (v != nullptr) {
result = *v;
return result;
}
@@ -879,7 +873,7 @@ const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& stat
// doing as long as there is some possibility of removing this code in favor
// of some new code based on Doug's service framework.
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
int32_t n = reg.availableIDs.size();
if (index > n) {
@@ -891,7 +885,7 @@ const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& stat
unistr = *(const UnicodeString*)reg.availableIDs[index++];
return &unistr;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -916,7 +910,7 @@ void TransliteratorRegistry::registerEntry(const UnicodeString& source,
UnicodeString ID;
UnicodeString s(source);
if (s.length() == 0) {
- s.setTo(TRUE, ANY, 3);
+ s.setTo(true, ANY, 3);
}
TransliteratorIDParser::STVtoID(source, target, variant, ID);
registerEntry(ID, s, target, variant, adopted, visible);
@@ -954,7 +948,7 @@ void TransliteratorRegistry::registerEntry(const UnicodeString& ID,
if (!availableIDs.contains((void*) &ID)) {
UnicodeString *newID = ID.clone();
// Check to make sure newID was created.
- if (newID != NULL) {
+ if (newID != nullptr) {
// NUL-terminate the ID string
newID->getTerminatedBuffer();
availableIDs.adoptElement(newID, status);
@@ -984,8 +978,8 @@ void TransliteratorRegistry::registerSTV(const UnicodeString& source,
} else if (source.compare(LAT,3) == 0) {
size = LAT_TARGETS_INIT_SIZE;
}
- targets = new Hashtable(TRUE, size, status);
- if (U_FAILURE(status) || targets == NULL) {
+ targets = new Hashtable(true, size, status);
+ if (U_FAILURE(status) || targets == nullptr) {
return;
}
specDAG.put(source, targets, status);
@@ -997,7 +991,7 @@ void TransliteratorRegistry::registerSTV(const UnicodeString& source,
return;
}
UnicodeString *variantEntry = new UnicodeString(variant);
- if (variantEntry != NULL) {
+ if (variantEntry != nullptr) {
variantList.adoptElement(variantEntry, status);
if (U_SUCCESS(status)) {
variantListIndex = variantList.size() - 1;
@@ -1022,7 +1016,7 @@ void TransliteratorRegistry::removeSTV(const UnicodeString& source,
// assert(target.length() > 0);
UErrorCode status = U_ZERO_ERROR;
Hashtable *targets = (Hashtable*) specDAG.get(source);
- if (targets == NULL) {
+ if (targets == nullptr) {
return; // should never happen for valid s-t/v
}
uint32_t varMask = targets->geti(target);
@@ -1085,18 +1079,18 @@ TransliteratorEntry* TransliteratorRegistry::findInStaticStore(const Translitera
// If we found an entry, store it in the Hashtable for next
// time.
if (entry != 0) {
- registerEntry(src.getTop(), trg.getTop(), variant, entry, FALSE);
+ registerEntry(src.getTop(), trg.getTop(), variant, entry, false);
}
return entry;
}
// As of 2.0, resource bundle keys cannot contain '_'
-static const UChar TRANSLITERATE_TO[] = {84,114,97,110,115,108,105,116,101,114,97,116,101,84,111,0}; // "TransliterateTo"
+static const char16_t TRANSLITERATE_TO[] = {84,114,97,110,115,108,105,116,101,114,97,116,101,84,111,0}; // "TransliterateTo"
-static const UChar TRANSLITERATE_FROM[] = {84,114,97,110,115,108,105,116,101,114,97,116,101,70,114,111,109,0}; // "TransliterateFrom"
+static const char16_t TRANSLITERATE_FROM[] = {84,114,97,110,115,108,105,116,101,114,97,116,101,70,114,111,109,0}; // "TransliterateFrom"
-static const UChar TRANSLITERATE[] = {84,114,97,110,115,108,105,116,101,114,97,116,101,0}; // "Transliterate"
+static const char16_t TRANSLITERATE[] = {84,114,97,110,115,108,105,116,101,114,97,116,101,0}; // "Transliterate"
/**
* Attempt to find an entry in a single resource bundle. This is
@@ -1164,7 +1158,7 @@ TransliteratorEntry* TransliteratorRegistry::findInBundle(const TransliteratorSp
if (pass==2) {
// Failed
- return NULL;
+ return nullptr;
}
// We have succeeded in loading a string from the locale
@@ -1328,15 +1322,15 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID
{
UVector* rbts = new UVector(uprv_deleteUObject, nullptr, entry->u.dataVector->size(), status);
// Check for null pointer
- if (rbts == NULL) {
+ if (rbts == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
int32_t passNumber = 1;
for (int32_t i = 0; U_SUCCESS(status) && i < entry->u.dataVector->size(); i++) {
// 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);
+ (TransliterationRuleData*)(entry->u.dataVector->elementAt(i)), false);
if (tl == 0)
status = U_MEMORY_ALLOCATION_ERROR;
else
diff --git a/contrib/libs/icu/i18n/transreg.h b/contrib/libs/icu/i18n/transreg.h
index 686e62ae33c..da9c2ee8b96 100644
--- a/contrib/libs/icu/i18n/transreg.h
+++ b/contrib/libs/icu/i18n/transreg.h
@@ -163,13 +163,13 @@ class TransliteratorRegistry : public UMemory {
* compound) attempt to instantiate it from the registry. Return
* 0 on failure.
*
- * Return a non-NULL aliasReturn value if the ID points to an alias.
+ * Return a non-nullptr aliasReturn value if the ID points to an alias.
* We cannot instantiate it ourselves because the alias may contain
* filters or compounds, which we do not understand. Caller should
- * make aliasReturn NULL before calling.
+ * make aliasReturn nullptr before calling.
* @param ID the given ID
* @param aliasReturn output param to receive TransliteratorAlias;
- * should be NULL on entry
+ * should be nullptr on entry
* @param parseError Struct to receive information on position
* of error if an error is encountered
* @param status Output param set to success/failure code.
@@ -191,7 +191,7 @@ class TransliteratorRegistry : public UMemory {
* from within the TransliteratorRegistry mutex.
*
* @param aliasReturn output param to receive TransliteratorAlias;
- * should be NULL on entry
+ * should be nullptr on entry
*/
Transliterator* reget(const UnicodeString& ID,
TransliteratorParser& parser,
@@ -268,7 +268,7 @@ class TransliteratorRegistry : public UMemory {
* @return the number of IDs currently registered with the system.
* @internal
*/
- int32_t countAvailableIDs(void) const;
+ int32_t countAvailableIDs() const;
/**
* == OBSOLETE - remove in ICU 3.4 ==
@@ -287,7 +287,7 @@ class TransliteratorRegistry : public UMemory {
* Return the number of registered source specifiers.
* @return the number of registered source specifiers.
*/
- int32_t countAvailableSources(void) const;
+ int32_t countAvailableSources() const;
/**
* Return a registered source specifier.
@@ -460,7 +460,7 @@ class TransliteratorRegistry : public UMemory {
U_NAMESPACE_END
-U_CFUNC UBool utrans_transliterator_cleanup(void);
+U_CFUNC UBool utrans_transliterator_cleanup();
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/contrib/libs/icu/i18n/tridpars.cpp b/contrib/libs/icu/i18n/tridpars.cpp
index 0ca168e7a3e..6c23a0dc902 100644
--- a/contrib/libs/icu/i18n/tridpars.cpp
+++ b/contrib/libs/icu/i18n/tridpars.cpp
@@ -31,21 +31,21 @@
U_NAMESPACE_BEGIN
-static const UChar ID_DELIM = 0x003B; // ;
-static const UChar TARGET_SEP = 0x002D; // -
-static const UChar VARIANT_SEP = 0x002F; // /
-static const UChar OPEN_REV = 0x0028; // (
-static const UChar CLOSE_REV = 0x0029; // )
+static const char16_t ID_DELIM = 0x003B; // ;
+static const char16_t TARGET_SEP = 0x002D; // -
+static const char16_t VARIANT_SEP = 0x002F; // /
+static const char16_t OPEN_REV = 0x0028; // (
+static const char16_t CLOSE_REV = 0x0029; // )
-//static const UChar EMPTY[] = {0}; // ""
-static const UChar ANY[] = {65,110,121,0}; // "Any"
-static const UChar ANY_NULL[] = {65,110,121,45,78,117,108,108,0}; // "Any-Null"
+//static const char16_t EMPTY[] = {0}; // ""
+static const char16_t ANY[] = {65,110,121,0}; // "Any"
+static const char16_t ANY_NULL[] = {65,110,121,45,78,117,108,108,0}; // "Any-Null"
static const int32_t FORWARD = UTRANS_FORWARD;
static const int32_t REVERSE = UTRANS_REVERSE;
-static Hashtable* SPECIAL_INVERSES = NULL;
-static UInitOnce gSpecialInversesInitOnce = U_INITONCE_INITIALIZER;
+static Hashtable* SPECIAL_INVERSES = nullptr;
+static UInitOnce gSpecialInversesInitOnce {};
/**
* The mutex controlling access to SPECIAL_INVERSES
@@ -77,11 +77,11 @@ TransliteratorIDParser::SingleID::SingleID(const UnicodeString& c, const Unicode
Transliterator* TransliteratorIDParser::SingleID::createInstance() {
Transliterator* t;
if (basicID.length() == 0) {
- t = createBasicInstance(UnicodeString(TRUE, ANY_NULL, 8), &canonID);
+ t = createBasicInstance(UnicodeString(true, ANY_NULL, 8), &canonID);
} else {
t = createBasicInstance(basicID, &canonID);
}
- if (t != NULL) {
+ if (t != nullptr) {
if (filter.length() != 0) {
UErrorCode ec = U_ZERO_ERROR;
UnicodeSet *set = new UnicodeSet(filter, ec);
@@ -106,7 +106,7 @@ Transliterator* TransliteratorIDParser::SingleID::createInstance() {
* the last character parsed.
* @param dir the direction. If the direction is REVERSE then the
* SingleID is constructed for the reverse direction.
- * @return a SingleID object or NULL
+ * @return a SingleID object or nullptr
*/
TransliteratorIDParser::SingleID*
TransliteratorIDParser::parseSingleID(const UnicodeString& id, int32_t& pos,
@@ -116,29 +116,29 @@ TransliteratorIDParser::parseSingleID(const UnicodeString& id, int32_t& pos,
// The ID will be of the form A, A(), A(B), or (B), where
// A and B are filter IDs.
- Specs* specsA = NULL;
- Specs* specsB = NULL;
- UBool sawParen = FALSE;
+ Specs* specsA = nullptr;
+ Specs* specsB = nullptr;
+ UBool sawParen = false;
// On the first pass, look for (B) or (). If this fails, then
// on the second pass, look for A, A(B), or A().
for (int32_t pass=1; pass<=2; ++pass) {
if (pass == 2) {
- specsA = parseFilterID(id, pos, TRUE);
- if (specsA == NULL) {
+ specsA = parseFilterID(id, pos, true);
+ if (specsA == nullptr) {
pos = start;
- return NULL;
+ return nullptr;
}
}
if (ICU_Utility::parseChar(id, pos, OPEN_REV)) {
- sawParen = TRUE;
+ sawParen = true;
if (!ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
- specsB = parseFilterID(id, pos, TRUE);
+ specsB = parseFilterID(id, pos, true);
// Must close with a ')'
- if (specsB == NULL || !ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
+ if (specsB == nullptr || !ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
delete specsA;
pos = start;
- return NULL;
+ return nullptr;
}
}
break;
@@ -152,15 +152,15 @@ TransliteratorIDParser::parseSingleID(const UnicodeString& id, int32_t& pos,
SingleID* b = specsToID(specsB, FORWARD);
single = specsToID(specsA, FORWARD);
// Null pointers check
- if (b == NULL || single == NULL) {
+ if (b == nullptr || single == nullptr) {
delete b;
delete single;
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
single->canonID.append(OPEN_REV)
.append(b->canonID).append(CLOSE_REV);
- if (specsA != NULL) {
+ if (specsA != nullptr) {
single->filter = specsA->filter;
}
delete b;
@@ -168,33 +168,33 @@ TransliteratorIDParser::parseSingleID(const UnicodeString& id, int32_t& pos,
SingleID* a = specsToID(specsA, FORWARD);
single = specsToID(specsB, FORWARD);
// Check for null pointer.
- if (a == NULL || single == NULL) {
+ if (a == nullptr || single == nullptr) {
delete a;
delete single;
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
single->canonID.append(OPEN_REV)
.append(a->canonID).append(CLOSE_REV);
- if (specsB != NULL) {
+ if (specsB != nullptr) {
single->filter = specsB->filter;
}
delete a;
}
} else {
- // assert(specsA != NULL);
+ // assert(specsA != nullptr);
if (dir == FORWARD) {
single = specsToID(specsA, FORWARD);
} else {
single = specsToSpecialInverse(*specsA, status);
- if (single == NULL) {
+ if (single == nullptr) {
single = specsToID(specsA, REVERSE);
}
}
- // Check for NULL pointer
- if (single == NULL) {
+ // Check for nullptr pointer
+ if (single == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
single->filter = specsA->filter;
}
@@ -219,15 +219,15 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos) {
int32_t start = pos;
- Specs* specs = parseFilterID(id, pos, TRUE);
- if (specs == NULL) {
+ Specs* specs = parseFilterID(id, pos, true);
+ if (specs == nullptr) {
pos = start;
- return NULL;
+ return nullptr;
}
// Assemble return results
SingleID* single = specsToID(specs, FORWARD);
- if (single != NULL) {
+ if (single != nullptr) {
single->filter = specs->filter;
}
delete specs;
@@ -250,8 +250,8 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos) {
* added to the canonID, either at the end, if dir is FORWARD, or
* at the start, if dir is REVERSE. The pattern will be enclosed
* in parentheses if appropriate, and will be suffixed with an
- * ID_DELIM character. May be NULL.
- * @return a UnicodeSet object or NULL. A non-NULL results
+ * ID_DELIM character. May be nullptr.
+ * @return a UnicodeSet object or nullptr. A non-nullptr results
* indicates a successful parse, regardless of whether the filter
* applies to the given direction. The caller should discard it
* if withParens != (dir == REVERSE).
@@ -260,7 +260,7 @@ UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, i
int32_t dir,
int32_t& withParens,
UnicodeString* canonID) {
- UnicodeSet* filter = NULL;
+ UnicodeSet* filter = nullptr;
int32_t start = pos;
if (withParens == -1) {
@@ -268,17 +268,17 @@ UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, i
} else if (withParens == 1) {
if (!ICU_Utility::parseChar(id, pos, OPEN_REV)) {
pos = start;
- return NULL;
+ return nullptr;
}
}
- ICU_Utility::skipWhitespace(id, pos, TRUE);
+ ICU_Utility::skipWhitespace(id, pos, true);
if (UnicodeSet::resemblesPattern(id, pos)) {
ParsePosition ppos(pos);
UErrorCode ec = U_ZERO_ERROR;
- filter = new UnicodeSet(id, ppos, USET_IGNORE_SPACE, NULL, ec);
- /* test for NULL */
+ filter = new UnicodeSet(id, ppos, USET_IGNORE_SPACE, nullptr, ec);
+ /* test for nullptr */
if (filter == 0) {
pos = start;
return 0;
@@ -286,7 +286,7 @@ UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, i
if (U_FAILURE(ec)) {
delete filter;
pos = start;
- return NULL;
+ return nullptr;
}
UnicodeString pattern;
@@ -296,13 +296,13 @@ UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, i
if (withParens == 1 && !ICU_Utility::parseChar(id, pos, CLOSE_REV)) {
delete filter;
pos = start;
- return NULL;
+ return nullptr;
}
// In the forward direction, append the pattern to the
// canonID. In the reverse, insert it at zero, and invert
// the presence of parens ("A" <-> "(A)").
- if (canonID != NULL) {
+ if (canonID != nullptr) {
if (dir == FORWARD) {
if (withParens == 1) {
pattern.insert(0, OPEN_REV);
@@ -351,8 +351,8 @@ U_CDECL_END
* discarded.
* @param globalFilter OUTPUT parameter that receives a pointer to
* a newly created global filter for this ID in this direction, or
- * NULL if there is none.
- * @return TRUE if the parse succeeds, that is, if the entire
+ * nullptr if there is none.
+ * @return true if the parse succeeds, that is, if the entire
* id is consumed without syntax error.
*/
UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t dir,
@@ -367,13 +367,13 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d
UObjectDeleter *save = list.setDeleter(_deleteSingleID);
UnicodeSet* filter;
- globalFilter = NULL;
+ globalFilter = nullptr;
canonID.truncate(0);
// Parse leading global filter, if any
withParens = 0; // parens disallowed
filter = parseGlobalFilter(id, pos, dir, withParens, &canonID);
- if (filter != NULL) {
+ if (filter != nullptr) {
if (!ICU_Utility::parseChar(id, pos, ID_DELIM)) {
// Not a global filter; backup and resume
canonID.truncate(0);
@@ -384,13 +384,13 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d
} else {
delete filter;
}
- filter = NULL;
+ filter = nullptr;
}
- UBool sawDelimiter = TRUE;
+ UBool sawDelimiter = true;
for (;;) {
SingleID* single = parseSingleID(id, pos, dir, ec);
- if (single == NULL) {
+ if (single == nullptr) {
break;
}
if (dir == FORWARD) {
@@ -402,7 +402,7 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d
goto FAIL;
}
if (!ICU_Utility::parseChar(id, pos, ID_DELIM)) {
- sawDelimiter = FALSE;
+ sawDelimiter = false;
break;
}
}
@@ -425,7 +425,7 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d
if (sawDelimiter) {
withParens = 1; // parens required
filter = parseGlobalFilter(id, pos, dir, withParens, &canonID);
- if (filter != NULL) {
+ if (filter != nullptr) {
// Don't require trailing ';', but parse it if present
ICU_Utility::parseChar(id, pos, ID_DELIM);
@@ -434,32 +434,32 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d
} else {
delete filter;
}
- filter = NULL;
+ filter = nullptr;
}
}
// Trailing unparsed text is a syntax error
- ICU_Utility::skipWhitespace(id, pos, TRUE);
+ ICU_Utility::skipWhitespace(id, pos, true);
if (pos != id.length()) {
goto FAIL;
}
list.setDeleter(save);
- return TRUE;
+ return true;
FAIL:
list.removeAllElements();
list.setDeleter(save);
delete globalFilter;
- globalFilter = NULL;
- return FALSE;
+ globalFilter = nullptr;
+ return false;
}
/**
* Convert the elements of the 'list' vector, which are SingleID
* objects, into actual Transliterator objects. In the course of
* this, some (or all) entries may be removed. If all entries
- * are removed, the NULL transliterator will be added.
+ * are removed, the nullptr transliterator will be added.
*
* Delete entries with empty basicIDs; these are generated by
* elements like "(A)" in the forward direction, or "A()" in
@@ -492,7 +492,7 @@ void TransliteratorIDParser::instantiateList(UVector& list,
SingleID* single = (SingleID*) list.elementAt(i);
if (single->basicID.length() != 0) {
t = single->createInstance();
- if (t == NULL) {
+ if (t == nullptr) {
ec = U_INVALID_ID;
goto RETURN;
}
@@ -503,10 +503,10 @@ void TransliteratorIDParser::instantiateList(UVector& list,
}
}
- // An empty list is equivalent to a NULL transliterator.
+ // An empty list is equivalent to a nullptr transliterator.
if (tlist.size() == 0) {
- t = createBasicInstance(UnicodeString(TRUE, ANY_NULL, 8), NULL);
- if (t == NULL) {
+ t = createBasicInstance(UnicodeString(true, ANY_NULL, 8), nullptr);
+ if (t == nullptr) {
// Should never happen
ec = U_INTERNAL_TRANSLITERATOR_ERROR;
}
@@ -541,8 +541,8 @@ void TransliteratorIDParser::instantiateList(UVector& list,
* @param id the id string, in any of several forms
* @return an array of 4 strings: source, target, variant, and
* isSourcePresent. If the source is not present, ANY will be
- * given as the source, and isSourcePresent will be NULL. Otherwise
- * isSourcePresent will be non-NULL. The target may be empty if the
+ * given as the source, and isSourcePresent will be nullptr. Otherwise
+ * isSourcePresent will be non-nullptr. The target may be empty if the
* id is not well-formed. The variant may be empty.
*/
void TransliteratorIDParser::IDtoSTV(const UnicodeString& id,
@@ -559,7 +559,7 @@ void TransliteratorIDParser::IDtoSTV(const UnicodeString& id,
if (var < 0) {
var = id.length();
}
- isSourcePresent = FALSE;
+ isSourcePresent = false;
if (sep < 0) {
// Form: T/V or T (or /V)
@@ -569,7 +569,7 @@ void TransliteratorIDParser::IDtoSTV(const UnicodeString& id,
// Form: S-T/V or S-T (or -T/V or -T)
if (sep > 0) {
id.extractBetween(0, sep, source);
- isSourcePresent = TRUE;
+ isSourcePresent = true;
}
id.extractBetween(++sep, var, target);
id.extractBetween(var, id.length(), variant);
@@ -577,7 +577,7 @@ void TransliteratorIDParser::IDtoSTV(const UnicodeString& id,
// Form: (S/V-T or /V-T)
if (var > 0) {
id.extractBetween(0, var, source);
- isSourcePresent = TRUE;
+ isSourcePresent = true;
}
id.extractBetween(var, sep++, variant);
id.extractBetween(sep, id.length(), target);
@@ -607,13 +607,13 @@ void TransliteratorIDParser::STVtoID(const UnicodeString& source,
}
// NUL-terminate the ID string for getTerminatedBuffer.
// This prevents valgrind and Purify warnings.
- id.append((UChar)0);
+ id.append((char16_t)0);
id.truncate(id.length()-1);
}
/**
* Register two targets as being inverses of one another. For
- * example, calling registerSpecialInverse("NFC", "NFD", TRUE) causes
+ * example, calling registerSpecialInverse("NFC", "NFD", true) causes
* Transliterator to form the following inverse relationships:
*
* <pre>NFC => NFD
@@ -640,7 +640,7 @@ void TransliteratorIDParser::STVtoID(const UnicodeString& source,
* @param target the target against which to register the inverse
* @param inverseTarget the inverse of target, that is
* Any-target.getInverse() => Any-inverseTarget
- * @param bidirectional if TRUE, register the reverse relation
+ * @param bidirectional if true, register the reverse relation
* as well, that is, Any-inverseTarget.getInverse() => Any-target
*/
void TransliteratorIDParser::registerSpecialInverse(const UnicodeString& target,
@@ -652,22 +652,22 @@ void TransliteratorIDParser::registerSpecialInverse(const UnicodeString& target,
return;
}
- // If target == inverseTarget then force bidirectional => FALSE
+ // If target == inverseTarget then force bidirectional => false
if (bidirectional && 0==target.caseCompare(inverseTarget, U_FOLD_CASE_DEFAULT)) {
- bidirectional = FALSE;
+ bidirectional = false;
}
Mutex lock(&LOCK);
UnicodeString *tempus = new UnicodeString(inverseTarget); // Used for null pointer check before usage.
- if (tempus == NULL) {
+ if (tempus == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
SPECIAL_INVERSES->put(target, tempus, status);
if (bidirectional) {
tempus = new UnicodeString(target);
- if (tempus == NULL) {
+ if (tempus == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -688,15 +688,15 @@ void TransliteratorIDParser::registerSpecialInverse(const UnicodeString& target,
* offset of the first character to parse in id. On output,
* pos is the offset after the last parsed character. If the
* parse failed, pos will be unchanged.
- * @param allowFilter2 if TRUE, a UnicodeSet pattern is allowed
+ * @param allowFilter2 if true, a UnicodeSet pattern is allowed
* at any location between specs or delimiters, and is returned
* as the fifth string in the array.
- * @return a Specs object, or NULL if the parse failed. If
+ * @return a Specs object, or nullptr if the parse failed. If
* neither source nor target was seen in the parsed id, then the
- * parse fails. If allowFilter is TRUE, then the parsed filter
+ * parse fails. If allowFilter is true, then the parsed filter
* pattern is returned in the Specs object, otherwise the returned
- * filter reference is NULL. If the parse fails for any reason
- * NULL is returned.
+ * filter reference is nullptr. If the parse fails for any reason
+ * nullptr is returned.
*/
TransliteratorIDParser::Specs*
TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
@@ -706,7 +706,7 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
UnicodeString target;
UnicodeString variant;
UnicodeString filter;
- UChar delimiter = 0;
+ char16_t delimiter = 0;
int32_t specCount = 0;
int32_t start = pos;
@@ -714,7 +714,7 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
// pass: a filter, a delimiter character (either '-' or '/'),
// or a spec (source, target, or variant).
for (;;) {
- ICU_Utility::skipWhitespace(id, pos, TRUE);
+ ICU_Utility::skipWhitespace(id, pos, true);
if (pos == id.length()) {
break;
}
@@ -725,10 +725,10 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
ParsePosition ppos(pos);
UErrorCode ec = U_ZERO_ERROR;
- UnicodeSet set(id, ppos, USET_IGNORE_SPACE, NULL, ec);
+ UnicodeSet set(id, ppos, USET_IGNORE_SPACE, nullptr, ec);
if (U_FAILURE(ec)) {
pos = start;
- return NULL;
+ return nullptr;
}
id.extractBetween(pos, ppos.getIndex(), filter);
pos = ppos.getIndex();
@@ -736,7 +736,7 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
}
if (delimiter == 0) {
- UChar c = id.charAt(pos);
+ char16_t c = id.charAt(pos);
if ((c == TARGET_SEP && target.length() == 0) ||
(c == VARIANT_SEP && variant.length() == 0)) {
delimiter = c;
@@ -788,14 +788,14 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
// Must have either source or target
if (source.length() == 0 && target.length() == 0) {
pos = start;
- return NULL;
+ return nullptr;
}
// Empty source or target defaults to ANY
- UBool sawSource = TRUE;
+ UBool sawSource = true;
if (source.length() == 0) {
source.setTo(ANY, 3);
- sawSource = FALSE;
+ sawSource = false;
}
if (target.length() == 0) {
target.setTo(ANY, 3);
@@ -808,15 +808,15 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
* Givens a Spec object, convert it to a SingleID object. The
* Spec object is a more unprocessed parse result. The SingleID
* object contains information about canonical and basic IDs.
- * @return a SingleID; never returns NULL. Returned object always
- * has 'filter' field of NULL.
+ * @return a SingleID; never returns nullptr. Returned object always
+ * has 'filter' field of nullptr.
*/
TransliteratorIDParser::SingleID*
TransliteratorIDParser::specsToID(const Specs* specs, int32_t dir) {
UnicodeString canonID;
UnicodeString basicID;
UnicodeString basicPrefix;
- if (specs != NULL) {
+ if (specs != nullptr) {
UnicodeString buf;
if (dir == FORWARD) {
if (specs->sawSource) {
@@ -845,18 +845,18 @@ TransliteratorIDParser::specsToID(const Specs* specs, int32_t dir) {
/**
* Given a Specs object, return a SingleID representing the
* special inverse of that ID. If there is no special inverse
- * then return NULL.
- * @return a SingleID or NULL. Returned object always has
- * 'filter' field of NULL.
+ * then return nullptr.
+ * @return a SingleID or nullptr. Returned object always has
+ * 'filter' field of nullptr.
*/
TransliteratorIDParser::SingleID*
TransliteratorIDParser::specsToSpecialInverse(const Specs& specs, UErrorCode &status) {
if (0!=specs.source.caseCompare(ANY, 3, U_FOLD_CASE_DEFAULT)) {
- return NULL;
+ return nullptr;
}
umtx_initOnce(gSpecialInversesInitOnce, init, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
UnicodeString* inverseTarget;
@@ -865,7 +865,7 @@ TransliteratorIDParser::specsToSpecialInverse(const Specs& specs, UErrorCode &st
inverseTarget = (UnicodeString*) SPECIAL_INVERSES->get(specs.target);
umtx_unlock(&LOCK);
- if (inverseTarget != NULL) {
+ if (inverseTarget != nullptr) {
// If the original ID contained "Any-" then make the
// special inverse "Any-Foo"; otherwise make it "Foo".
// So "Any-NFC" => "Any-NFD" but "NFC" => "NFD".
@@ -878,7 +878,7 @@ TransliteratorIDParser::specsToSpecialInverse(const Specs& specs, UErrorCode &st
}
buf.append(*inverseTarget);
- UnicodeString basicID(TRUE, ANY, 3);
+ UnicodeString basicID(true, ANY, 3);
basicID.append(TARGET_SEP).append(*inverseTarget);
if (specs.variant.length() != 0) {
@@ -887,7 +887,7 @@ TransliteratorIDParser::specsToSpecialInverse(const Specs& specs, UErrorCode &st
}
return new SingleID(buf, basicID);
}
- return NULL;
+ return nullptr;
}
/**
@@ -903,11 +903,11 @@ Transliterator* TransliteratorIDParser::createBasicInstance(const UnicodeString&
* Initialize static memory. Called through umtx_initOnce only.
*/
void U_CALLCONV TransliteratorIDParser::init(UErrorCode &status) {
- U_ASSERT(SPECIAL_INVERSES == NULL);
+ U_ASSERT(SPECIAL_INVERSES == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_TRANSLITERATOR, utrans_transliterator_cleanup);
- SPECIAL_INVERSES = new Hashtable(TRUE, status);
- if (SPECIAL_INVERSES == NULL) {
+ SPECIAL_INVERSES = new Hashtable(true, status);
+ if (SPECIAL_INVERSES == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -920,7 +920,7 @@ void U_CALLCONV TransliteratorIDParser::init(UErrorCode &status) {
void TransliteratorIDParser::cleanup() {
if (SPECIAL_INVERSES) {
delete SPECIAL_INVERSES;
- SPECIAL_INVERSES = NULL;
+ SPECIAL_INVERSES = nullptr;
}
gSpecialInversesInitOnce.reset();
}
diff --git a/contrib/libs/icu/i18n/tzfmt.cpp b/contrib/libs/icu/i18n/tzfmt.cpp
index ef3cfad80ce..ed53438c414 100644
--- a/contrib/libs/icu/i18n/tzfmt.cpp
+++ b/contrib/libs/icu/i18n/tzfmt.cpp
@@ -70,35 +70,35 @@ static const char gGmtFormatTag[]= "gmtFormat";
static const char gGmtZeroFormatTag[] = "gmtZeroFormat";
static const char gHourFormatTag[]= "hourFormat";
-static const UChar TZID_GMT[] = {0x0045, 0x0074, 0x0063, 0x002F, 0x0047, 0x004D, 0x0054, 0}; // Etc/GMT
-static const UChar UNKNOWN_ZONE_ID[] = {
+static const char16_t TZID_GMT[] = {0x0045, 0x0074, 0x0063, 0x002F, 0x0047, 0x004D, 0x0054, 0}; // Etc/GMT
+static const char16_t UNKNOWN_ZONE_ID[] = {
0x0045, 0x0074, 0x0063, 0x002F, 0x0055, 0x006E, 0x006B, 0x006E, 0x006F, 0x0077, 0x006E, 0}; // Etc/Unknown
-static const UChar UNKNOWN_SHORT_ZONE_ID[] = {0x0075, 0x006E, 0x006B, 0}; // unk
-static const UChar UNKNOWN_LOCATION[] = {0x0055, 0x006E, 0x006B, 0x006E, 0x006F, 0x0077, 0x006E, 0}; // Unknown
-
-static const UChar DEFAULT_GMT_PATTERN[] = {0x0047, 0x004D, 0x0054, 0x007B, 0x0030, 0x007D, 0}; // GMT{0}
-//static const UChar DEFAULT_GMT_ZERO[] = {0x0047, 0x004D, 0x0054, 0}; // GMT
-static const UChar DEFAULT_GMT_POSITIVE_HM[] = {0x002B, 0x0048, 0x003A, 0x006D, 0x006D, 0}; // +H:mm
-static const UChar DEFAULT_GMT_POSITIVE_HMS[] = {0x002B, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0}; // +H:mm:ss
-static const UChar DEFAULT_GMT_NEGATIVE_HM[] = {0x002D, 0x0048, 0x003A, 0x006D, 0x006D, 0}; // -H:mm
-static const UChar DEFAULT_GMT_NEGATIVE_HMS[] = {0x002D, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0}; // -H:mm:ss
-static const UChar DEFAULT_GMT_POSITIVE_H[] = {0x002B, 0x0048, 0}; // +H
-static const UChar DEFAULT_GMT_NEGATIVE_H[] = {0x002D, 0x0048, 0}; // -H
+static const char16_t UNKNOWN_SHORT_ZONE_ID[] = {0x0075, 0x006E, 0x006B, 0}; // unk
+static const char16_t UNKNOWN_LOCATION[] = {0x0055, 0x006E, 0x006B, 0x006E, 0x006F, 0x0077, 0x006E, 0}; // Unknown
+
+static const char16_t DEFAULT_GMT_PATTERN[] = {0x0047, 0x004D, 0x0054, 0x007B, 0x0030, 0x007D, 0}; // GMT{0}
+//static const char16_t DEFAULT_GMT_ZERO[] = {0x0047, 0x004D, 0x0054, 0}; // GMT
+static const char16_t DEFAULT_GMT_POSITIVE_HM[] = {0x002B, 0x0048, 0x003A, 0x006D, 0x006D, 0}; // +H:mm
+static const char16_t DEFAULT_GMT_POSITIVE_HMS[] = {0x002B, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0}; // +H:mm:ss
+static const char16_t DEFAULT_GMT_NEGATIVE_HM[] = {0x002D, 0x0048, 0x003A, 0x006D, 0x006D, 0}; // -H:mm
+static const char16_t DEFAULT_GMT_NEGATIVE_HMS[] = {0x002D, 0x0048, 0x003A, 0x006D, 0x006D, 0x003A, 0x0073, 0x0073, 0}; // -H:mm:ss
+static const char16_t DEFAULT_GMT_POSITIVE_H[] = {0x002B, 0x0048, 0}; // +H
+static const char16_t DEFAULT_GMT_NEGATIVE_H[] = {0x002D, 0x0048, 0}; // -H
static const UChar32 DEFAULT_GMT_DIGITS[] = {
0x0030, 0x0031, 0x0032, 0x0033, 0x0034,
0x0035, 0x0036, 0x0037, 0x0038, 0x0039
};
-static const UChar DEFAULT_GMT_OFFSET_SEP = 0x003A; // ':'
+static const char16_t DEFAULT_GMT_OFFSET_SEP = 0x003A; // ':'
-static const UChar ARG0[] = {0x007B, 0x0030, 0x007D}; // "{0}"
+static const char16_t ARG0[] = {0x007B, 0x0030, 0x007D}; // "{0}"
static const int32_t ARG0_LEN = 3;
-static const UChar DEFAULT_GMT_OFFSET_MINUTE_PATTERN[] = {0x006D, 0x006D, 0}; // "mm"
-static const UChar DEFAULT_GMT_OFFSET_SECOND_PATTERN[] = {0x0073, 0x0073, 0}; // "ss"
+static const char16_t DEFAULT_GMT_OFFSET_MINUTE_PATTERN[] = {0x006D, 0x006D, 0}; // "mm"
+static const char16_t DEFAULT_GMT_OFFSET_SECOND_PATTERN[] = {0x0073, 0x0073, 0}; // "ss"
-static const UChar ALT_GMT_STRINGS[][4] = {
+static const char16_t ALT_GMT_STRINGS[][4] = {
{0x0047, 0x004D, 0x0054, 0}, // GMT
{0x0055, 0x0054, 0x0043, 0}, // UTC
{0x0055, 0x0054, 0, 0}, // UT
@@ -117,11 +117,11 @@ static const int32_t PARSE_GMT_OFFSET_TYPES[] = {
-1
};
-static const UChar SINGLEQUOTE = 0x0027;
-static const UChar PLUS = 0x002B;
-static const UChar MINUS = 0x002D;
-static const UChar ISO8601_UTC = 0x005A; // 'Z'
-static const UChar ISO8601_SEP = 0x003A; // ':'
+static const char16_t SINGLEQUOTE = 0x0027;
+static const char16_t PLUS = 0x002B;
+static const char16_t MINUS = 0x002D;
+static const char16_t ISO8601_UTC = 0x005A; // 'Z'
+static const char16_t ISO8601_SEP = 0x003A; // ':'
static const int32_t MILLIS_PER_HOUR = 60 * 60 * 1000;
static const int32_t MILLIS_PER_MINUTE = 60 * 1000;
@@ -144,11 +144,11 @@ static const int32_t ALL_GENERIC_NAME_TYPES = UTZGNM_LOCATION | UTZGNM_LONG | UT
#define MAX_OFFSET_DIGITS 6
// Time Zone ID/Short ID trie
-static TextTrieMap *gZoneIdTrie = NULL;
-static icu::UInitOnce gZoneIdTrieInitOnce = U_INITONCE_INITIALIZER;
+static TextTrieMap *gZoneIdTrie = nullptr;
+static icu::UInitOnce gZoneIdTrieInitOnce {};
-static TextTrieMap *gShortZoneIdTrie = NULL;
-static icu::UInitOnce gShortZoneIdTrieInitOnce = U_INITONCE_INITIALIZER;
+static TextTrieMap *gShortZoneIdTrie = nullptr;
+static icu::UInitOnce gShortZoneIdTrieInitOnce {};
static UMutex gLock;
@@ -156,21 +156,21 @@ U_CDECL_BEGIN
/**
* Cleanup callback func
*/
-static UBool U_CALLCONV tzfmt_cleanup(void)
+static UBool U_CALLCONV tzfmt_cleanup()
{
- if (gZoneIdTrie != NULL) {
+ if (gZoneIdTrie != nullptr) {
delete gZoneIdTrie;
}
- gZoneIdTrie = NULL;
+ gZoneIdTrie = nullptr;
gZoneIdTrieInitOnce.reset();
- if (gShortZoneIdTrie != NULL) {
+ if (gShortZoneIdTrie != nullptr) {
delete gShortZoneIdTrie;
}
- gShortZoneIdTrie = NULL;
+ gShortZoneIdTrie = nullptr;
gShortZoneIdTrieInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -194,14 +194,14 @@ public:
static GMTOffsetField* createText(const UnicodeString& text, UErrorCode& status);
static GMTOffsetField* createTimeField(FieldType type, uint8_t width, UErrorCode& status);
static UBool isValid(FieldType type, int32_t width);
- static FieldType getTypeByLetter(UChar ch);
+ static FieldType getTypeByLetter(char16_t ch);
FieldType getType() const;
uint8_t getWidth() const;
- const UChar* getPatternText(void) const;
+ const char16_t* getPatternText() const;
private:
- UChar* fText;
+ char16_t* fText;
FieldType fType;
uint8_t fWidth;
@@ -209,7 +209,7 @@ private:
};
GMTOffsetField::GMTOffsetField()
-: fText(NULL), fType(TEXT), fWidth(0) {
+: fText(nullptr), fType(TEXT), fWidth(0) {
}
GMTOffsetField::~GMTOffsetField() {
@@ -221,20 +221,20 @@ GMTOffsetField::~GMTOffsetField() {
GMTOffsetField*
GMTOffsetField::createText(const UnicodeString& text, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
GMTOffsetField* result = new GMTOffsetField();
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
int32_t len = text.length();
- result->fText = (UChar*)uprv_malloc((len + 1) * sizeof(UChar));
- if (result->fText == NULL) {
+ result->fText = (char16_t*)uprv_malloc((len + 1) * sizeof(char16_t));
+ if (result->fText == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
delete result;
- return NULL;
+ return nullptr;
}
u_strncpy(result->fText, text.getBuffer(), len);
result->fText[len] = 0;
@@ -247,12 +247,12 @@ GMTOffsetField*
GMTOffsetField::createTimeField(FieldType type, uint8_t width, UErrorCode& status) {
U_ASSERT(type != TEXT);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
GMTOffsetField* result = new GMTOffsetField();
- if (result == NULL) {
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
result->fType = type;
@@ -276,7 +276,7 @@ GMTOffsetField::isValid(FieldType type, int32_t width) {
}
GMTOffsetField::FieldType
-GMTOffsetField::getTypeByLetter(UChar ch) {
+GMTOffsetField::getTypeByLetter(char16_t ch) {
if (ch == 0x0048 /* H */) {
return HOUR;
} else if (ch == 0x006D /* m */) {
@@ -297,8 +297,8 @@ GMTOffsetField::getWidth() const {
return fWidth;
}
-inline const UChar*
-GMTOffsetField::getPatternText(void) const {
+inline const char16_t*
+GMTOffsetField::getPatternText() const {
return fText;
}
@@ -317,11 +317,11 @@ U_CDECL_END
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeZoneFormat)
TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
-: fLocale(locale), fTimeZoneNames(NULL), fTimeZoneGenericNames(NULL),
- fDefParseOptionFlags(0), fTZDBTimeZoneNames(NULL) {
+: fLocale(locale), fTimeZoneNames(nullptr), fTimeZoneGenericNames(nullptr),
+ fDefParseOptionFlags(0), fTZDBTimeZoneNames(nullptr) {
for (int32_t i = 0; i < UTZFMT_PAT_COUNT; i++) {
- fGMTOffsetPatternItems[i] = NULL;
+ fGMTOffsetPatternItems[i] = nullptr;
}
const char* region = fLocale.getCountry();
@@ -351,13 +351,13 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
return;
}
- const UChar* gmtPattern = NULL;
- const UChar* hourFormats = NULL;
+ const char16_t* gmtPattern = nullptr;
+ const char16_t* hourFormats = nullptr;
UResourceBundle *zoneBundle = ures_open(U_ICUDATA_ZONE, locale.getName(), &status);
- UResourceBundle *zoneStringsArray = ures_getByKeyWithFallback(zoneBundle, gZoneStringsTag, NULL, &status);
+ UResourceBundle *zoneStringsArray = ures_getByKeyWithFallback(zoneBundle, gZoneStringsTag, nullptr, &status);
if (U_SUCCESS(status)) {
- const UChar* resStr;
+ const char16_t* resStr;
int32_t len;
resStr = ures_getStringByKeyWithFallback(zoneStringsArray, gGmtFormatTag, &len, &status);
if (len > 0) {
@@ -365,7 +365,7 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
}
resStr = ures_getStringByKeyWithFallback(zoneStringsArray, gGmtZeroFormatTag, &len, &status);
if (len > 0) {
- fGMTZeroFormat.setTo(TRUE, resStr, len);
+ fGMTZeroFormat.setTo(true, resStr, len);
}
resStr = ures_getStringByKeyWithFallback(zoneStringsArray, gHourFormatTag, &len, &status);
if (len > 0) {
@@ -375,39 +375,39 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
ures_close(zoneBundle);
}
- if (gmtPattern == NULL) {
+ if (gmtPattern == nullptr) {
gmtPattern = DEFAULT_GMT_PATTERN;
}
- initGMTPattern(UnicodeString(TRUE, gmtPattern, -1), status);
+ initGMTPattern(UnicodeString(true, gmtPattern, -1), status);
- UBool useDefaultOffsetPatterns = TRUE;
+ UBool useDefaultOffsetPatterns = true;
if (hourFormats) {
- UChar *sep = u_strchr(hourFormats, (UChar)0x003B /* ';' */);
- if (sep != NULL) {
+ char16_t *sep = u_strchr(hourFormats, (char16_t)0x003B /* ';' */);
+ if (sep != nullptr) {
UErrorCode tmpStatus = U_ZERO_ERROR;
- fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(FALSE, hourFormats, (int32_t)(sep - hourFormats));
- fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(TRUE, sep + 1, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(false, hourFormats, (int32_t)(sep - hourFormats));
+ fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(true, sep + 1, -1);
expandOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS], tmpStatus);
expandOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS], tmpStatus);
truncateOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_H], tmpStatus);
truncateOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_H], tmpStatus);
if (U_SUCCESS(tmpStatus)) {
- useDefaultOffsetPatterns = FALSE;
+ useDefaultOffsetPatterns = false;
}
}
}
if (useDefaultOffsetPatterns) {
- fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_H].setTo(TRUE, DEFAULT_GMT_POSITIVE_H, -1);
- fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(TRUE, DEFAULT_GMT_POSITIVE_HM, -1);
- fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS].setTo(TRUE, DEFAULT_GMT_POSITIVE_HMS, -1);
- fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_H].setTo(TRUE, DEFAULT_GMT_NEGATIVE_H, -1);
- fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(TRUE, DEFAULT_GMT_NEGATIVE_HM, -1);
- fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS].setTo(TRUE, DEFAULT_GMT_NEGATIVE_HMS, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_H].setTo(true, DEFAULT_GMT_POSITIVE_H, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(true, DEFAULT_GMT_POSITIVE_HM, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS].setTo(true, DEFAULT_GMT_POSITIVE_HMS, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_H].setTo(true, DEFAULT_GMT_NEGATIVE_H, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(true, DEFAULT_GMT_NEGATIVE_HM, -1);
+ fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS].setTo(true, DEFAULT_GMT_NEGATIVE_HMS, -1);
}
initGMTOffsetPatterns(status);
NumberingSystem* ns = NumberingSystem::createInstance(locale, status);
- UBool useDefDigits = TRUE;
+ UBool useDefDigits = true;
if (ns && !ns->isAlgorithmic()) {
UnicodeString digits = ns->getDescription();
useDefDigits = !toCodePoints(digits, fGMTOffsetDigits, 10);
@@ -419,11 +419,11 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
}
TimeZoneFormat::TimeZoneFormat(const TimeZoneFormat& other)
-: Format(other), fTimeZoneNames(NULL), fTimeZoneGenericNames(NULL),
- fTZDBTimeZoneNames(NULL) {
+: Format(other), fTimeZoneNames(nullptr), fTimeZoneGenericNames(nullptr),
+ fTZDBTimeZoneNames(nullptr) {
for (int32_t i = 0; i < UTZFMT_PAT_COUNT; i++) {
- fGMTOffsetPatternItems[i] = NULL;
+ fGMTOffsetPatternItems[i] = nullptr;
}
*this = other;
}
@@ -446,9 +446,9 @@ TimeZoneFormat::operator=(const TimeZoneFormat& other) {
delete fTimeZoneNames;
delete fTimeZoneGenericNames;
- fTimeZoneGenericNames = NULL;
+ fTimeZoneGenericNames = nullptr;
delete fTZDBTimeZoneNames;
- fTZDBTimeZoneNames = NULL;
+ fTZDBTimeZoneNames = nullptr;
fLocale = other.fLocale;
uprv_memcpy(fTargetRegion, other.fTargetRegion, sizeof(fTargetRegion));
@@ -467,7 +467,7 @@ TimeZoneFormat::operator=(const TimeZoneFormat& other) {
for (int32_t i = 0; i < UTZFMT_PAT_COUNT; i++) {
fGMTOffsetPatterns[i] = other.fGMTOffsetPatterns[i];
delete fGMTOffsetPatternItems[i];
- fGMTOffsetPatternItems[i] = NULL;
+ fGMTOffsetPatternItems[i] = nullptr;
}
initGMTOffsetPatterns(status);
U_ASSERT(U_SUCCESS(status));
@@ -517,7 +517,7 @@ TimeZoneFormat::createInstance(const Locale& locale, UErrorCode& status) {
return tzfmt;
}
delete tzfmt;
- return NULL;
+ return nullptr;
}
// ------------------------------------------------------------------
@@ -550,7 +550,7 @@ TimeZoneFormat::setDefaultParseOptions(uint32_t flags) {
}
uint32_t
-TimeZoneFormat::getDefaultParseOptions(void) const {
+TimeZoneFormat::getDefaultParseOptions() const {
return fDefParseOptionFlags;
}
@@ -599,7 +599,7 @@ TimeZoneFormat::setGMTOffsetPattern(UTimeZoneFormatGMTOffsetPatternType type, co
}
UVector* patternItems = parseOffsetPattern(pattern, required, status);
- if (patternItems == NULL) {
+ if (patternItems == nullptr) {
return;
}
@@ -652,12 +652,12 @@ TimeZoneFormat::setGMTZeroFormat(const UnicodeString& gmtZeroFormat, UErrorCode&
UnicodeString&
TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate date,
- UnicodeString& name, UTimeZoneFormatTimeType* timeType /* = NULL */) const {
+ UnicodeString& name, UTimeZoneFormatTimeType* timeType /* = nullptr */) const {
if (timeType) {
*timeType = UTZFMT_TIME_TYPE_UNKNOWN;
}
- UBool noOffsetFormatFallback = FALSE;
+ UBool noOffsetFormatFallback = false;
switch (style) {
case UTZFMT_STYLE_GENERIC_LOCATION:
@@ -678,22 +678,22 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
case UTZFMT_STYLE_ZONE_ID:
tz.getID(name);
- noOffsetFormatFallback = TRUE;
+ noOffsetFormatFallback = true;
break;
case UTZFMT_STYLE_ZONE_ID_SHORT:
{
- const UChar* shortID = ZoneMeta::getShortID(tz);
- if (shortID == NULL) {
+ const char16_t* shortID = ZoneMeta::getShortID(tz);
+ if (shortID == nullptr) {
shortID = UNKNOWN_SHORT_ZONE_ID;
}
name.setTo(shortID, -1);
}
- noOffsetFormatFallback = TRUE;
+ noOffsetFormatFallback = true;
break;
case UTZFMT_STYLE_EXEMPLAR_LOCATION:
formatExemplarLocation(tz, name);
- noOffsetFormatFallback = TRUE;
+ noOffsetFormatFallback = true;
break;
default:
@@ -704,7 +704,7 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
if (name.isEmpty() && !noOffsetFormatFallback) {
UErrorCode status = U_ZERO_ERROR;
int32_t rawOffset, dstOffset;
- tz.getOffset(date, FALSE, rawOffset, dstOffset, status);
+ tz.getOffset(date, false, rawOffset, dstOffset, status);
int32_t offset = rawOffset + dstOffset;
if (U_SUCCESS(status)) {
switch (style) {
@@ -722,43 +722,43 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
break;
case UTZFMT_STYLE_ISO_BASIC_SHORT:
- formatOffsetISO8601Basic(offset, TRUE, TRUE, TRUE, name, status);
+ formatOffsetISO8601Basic(offset, true, true, true, name, status);
break;
case UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT:
- formatOffsetISO8601Basic(offset, FALSE, TRUE, TRUE, name, status);
+ formatOffsetISO8601Basic(offset, false, true, true, name, status);
break;
case UTZFMT_STYLE_ISO_BASIC_FIXED:
- formatOffsetISO8601Basic(offset, TRUE, FALSE, TRUE, name, status);
+ formatOffsetISO8601Basic(offset, true, false, true, name, status);
break;
case UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED:
- formatOffsetISO8601Basic(offset, FALSE, FALSE, TRUE, name, status);
+ formatOffsetISO8601Basic(offset, false, false, true, name, status);
break;
case UTZFMT_STYLE_ISO_EXTENDED_FIXED:
- formatOffsetISO8601Extended(offset, TRUE, FALSE, TRUE, name, status);
+ formatOffsetISO8601Extended(offset, true, false, true, name, status);
break;
case UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED:
- formatOffsetISO8601Extended(offset, FALSE, FALSE, TRUE, name, status);
+ formatOffsetISO8601Extended(offset, false, false, true, name, status);
break;
case UTZFMT_STYLE_ISO_BASIC_FULL:
- formatOffsetISO8601Basic(offset, TRUE, FALSE, FALSE, name, status);
+ formatOffsetISO8601Basic(offset, true, false, false, name, status);
break;
case UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL:
- formatOffsetISO8601Basic(offset, FALSE, FALSE, FALSE, name, status);
+ formatOffsetISO8601Basic(offset, false, false, false, name, status);
break;
case UTZFMT_STYLE_ISO_EXTENDED_FULL:
- formatOffsetISO8601Extended(offset, TRUE, FALSE, FALSE, name, status);
+ formatOffsetISO8601Extended(offset, true, false, false, name, status);
break;
case UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL:
- formatOffsetISO8601Extended(offset, FALSE, FALSE, FALSE, name, status);
+ formatOffsetISO8601Extended(offset, false, false, false, name, status);
break;
default:
@@ -785,17 +785,17 @@ TimeZoneFormat::format(const Formattable& obj, UnicodeString& appendTo,
if (obj.getType() == Formattable::kObject) {
const UObject* formatObj = obj.getObject();
const TimeZone* tz = dynamic_cast<const TimeZone*>(formatObj);
- if (tz == NULL) {
+ if (tz == nullptr) {
const Calendar* cal = dynamic_cast<const Calendar*>(formatObj);
- if (cal != NULL) {
+ if (cal != nullptr) {
tz = &cal->getTimeZone();
date = cal->getTime(status);
}
}
- if (tz != NULL) {
+ if (tz != nullptr) {
int32_t rawOffset, dstOffset;
- tz->getOffset(date, FALSE, rawOffset, dstOffset, status);
- UChar buf[ZONE_NAME_U16_MAX];
+ tz->getOffset(date, false, rawOffset, dstOffset, status);
+ char16_t buf[ZONE_NAME_U16_MAX];
UnicodeString result(buf, 0, UPRV_LENGTHOF(buf));
formatOffsetLocalizedGMT(rawOffset + dstOffset, result, status);
if (U_SUCCESS(status)) {
@@ -812,13 +812,13 @@ TimeZoneFormat::format(const Formattable& obj, UnicodeString& appendTo,
TimeZone*
TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
- UTimeZoneFormatTimeType* timeType /*= NULL*/) const {
+ UTimeZoneFormatTimeType* timeType /*= nullptr*/) const {
return parse(style, text, pos, getDefaultParseOptions(), timeType);
}
TimeZone*
TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
- int32_t parseOptions, UTimeZoneFormatTimeType* timeType /* = NULL */) const {
+ int32_t parseOptions, UTimeZoneFormatTimeType* timeType /* = nullptr */) const {
if (timeType) {
*timeType = UTZFMT_TIME_TYPE_UNKNOWN;
}
@@ -841,7 +841,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
// Try localized GMT format first if necessary
if (fallbackLocalizedGMT || fallbackShortLocalizedGMT) {
- UBool hasDigitOffset = FALSE;
+ UBool hasDigitOffset = false;
offset = parseOffsetLocalizedGMT(text, tmpPos, fallbackShortLocalizedGMT, &hasDigitOffset);
if (tmpPos.getErrorIndex() == -1) {
// Even when the input text was successfully parsed as a localized GMT format text,
@@ -862,7 +862,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
}
UErrorCode status = U_ZERO_ERROR;
- UChar tzIDBuf[32];
+ char16_t tzIDBuf[32];
UnicodeString tzID(tzIDBuf, 0, UPRV_LENGTHOF(tzIDBuf));
UBool parseTZDBAbbrev = ((parseOptions & UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS) != 0);
@@ -931,8 +931,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
tmpPos.setErrorIndex(-1);
// Exclude the case of UTC Indicator "Z" here
- UBool hasDigitOffset = FALSE;
- offset = parseOffsetISO8601(text, tmpPos, FALSE, &hasDigitOffset);
+ UBool hasDigitOffset = false;
+ offset = parseOffsetISO8601(text, tmpPos, false, &hasDigitOffset);
if (tmpPos.getErrorIndex() == -1 && hasDigitOffset) {
pos.setIndex(tmpPos.getIndex());
return createTimeZoneForOffset(offset);
@@ -955,7 +955,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
LocalPointer<TimeZoneNames::MatchInfoCollection> specificMatches(fTimeZoneNames->find(text, startIdx, nameTypes, status));
if (U_FAILURE(status)) {
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
if (!specificMatches.isNull()) {
int32_t matchIdx = -1;
@@ -988,7 +988,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
tzdbTimeZoneNames->find(text, startIdx, nameTypes, status));
if (U_FAILURE(status)) {
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
if (!tzdbNameMatches.isNull()) {
int32_t matchIdx = -1;
@@ -1044,7 +1044,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
}
if (U_FAILURE(status)) {
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
if (len > 0) {
// Found a match
@@ -1112,7 +1112,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
// Failed to parse the input text as the time zone format in the specified style.
// Check the longest match among other styles below.
- UChar parsedIDBuf[32];
+ char16_t parsedIDBuf[32];
UnicodeString parsedID(parsedIDBuf, 0, UPRV_LENGTHOF(parsedIDBuf));
UTimeZoneFormatTimeType parsedTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
@@ -1125,8 +1125,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
tmpPos.setIndex(startIdx);
tmpPos.setErrorIndex(-1);
- UBool hasDigitOffset = FALSE;
- offset = parseOffsetISO8601(text, tmpPos, FALSE, &hasDigitOffset);
+ UBool hasDigitOffset = false;
+ offset = parseOffsetISO8601(text, tmpPos, false, &hasDigitOffset);
if (tmpPos.getErrorIndex() == -1) {
if (tmpPos.getIndex() == maxPos || hasDigitOffset) {
pos.setIndex(tmpPos.getIndex());
@@ -1151,8 +1151,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
tmpPos.setIndex(startIdx);
tmpPos.setErrorIndex(-1);
- UBool hasDigitOffset = FALSE;
- offset = parseOffsetLocalizedGMT(text, tmpPos, FALSE, &hasDigitOffset);
+ UBool hasDigitOffset = false;
+ offset = parseOffsetLocalizedGMT(text, tmpPos, false, &hasDigitOffset);
if (tmpPos.getErrorIndex() == -1) {
if (tmpPos.getIndex() == maxPos || hasDigitOffset) {
pos.setIndex(tmpPos.getIndex());
@@ -1173,8 +1173,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
tmpPos.setIndex(startIdx);
tmpPos.setErrorIndex(-1);
- UBool hasDigitOffset = FALSE;
- offset = parseOffsetLocalizedGMT(text, tmpPos, TRUE, &hasDigitOffset);
+ UBool hasDigitOffset = false;
+ offset = parseOffsetLocalizedGMT(text, tmpPos, true, &hasDigitOffset);
if (tmpPos.getErrorIndex() == -1) {
if (tmpPos.getIndex() == maxPos || hasDigitOffset) {
pos.setIndex(tmpPos.getIndex());
@@ -1205,7 +1205,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
LocalPointer<TimeZoneNames::MatchInfoCollection> specificMatches(fTimeZoneNames->find(text, startIdx, ALL_SIMPLE_NAME_TYPES, status));
if (U_FAILURE(status)) {
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
int32_t specificMatchIdx = -1;
int32_t matchPos = -1;
@@ -1232,7 +1232,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
tzdbTimeZoneNames->find(text, startIdx, ALL_SIMPLE_NAME_TYPES, status));
if (U_FAILURE(status)) {
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
int32_t tzdbNameMatchIdx = -1;
int32_t matchPos = -1;
@@ -1264,7 +1264,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
}
if (U_FAILURE(status)) {
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
if (genMatchLen > 0 && parsedPos < startIdx + genMatchLen) {
@@ -1320,7 +1320,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
}
pos.setErrorIndex(startIdx);
- return NULL;
+ return nullptr;
}
void
@@ -1343,12 +1343,12 @@ TimeZoneFormat::formatGeneric(const TimeZone& tz, int32_t genType, UDate date, U
}
if (genType == UTZGNM_LOCATION) {
- const UChar* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
- if (canonicalID == NULL) {
+ const char16_t* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
+ if (canonicalID == nullptr) {
name.setToBogus();
return name;
}
- return gnames->getGenericLocationName(UnicodeString(TRUE, canonicalID, -1), name);
+ return gnames->getGenericLocationName(UnicodeString(true, canonicalID, -1), name);
}
return gnames->getDisplayName(tz, (UTimeZoneGenericNameType)genType, date, name);
}
@@ -1356,24 +1356,24 @@ TimeZoneFormat::formatGeneric(const TimeZone& tz, int32_t genType, UDate date, U
UnicodeString&
TimeZoneFormat::formatSpecific(const TimeZone& tz, UTimeZoneNameType stdType, UTimeZoneNameType dstType,
UDate date, UnicodeString& name, UTimeZoneFormatTimeType *timeType) const {
- if (fTimeZoneNames == NULL) {
+ if (fTimeZoneNames == nullptr) {
name.setToBogus();
return name;
}
UErrorCode status = U_ZERO_ERROR;
UBool isDaylight = tz.inDaylightTime(date, status);
- const UChar* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
+ const char16_t* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
- if (U_FAILURE(status) || canonicalID == NULL) {
+ if (U_FAILURE(status) || canonicalID == nullptr) {
name.setToBogus();
return name;
}
if (isDaylight) {
- fTimeZoneNames->getDisplayName(UnicodeString(TRUE, canonicalID, -1), dstType, date, name);
+ fTimeZoneNames->getDisplayName(UnicodeString(true, canonicalID, -1), dstType, date, name);
} else {
- fTimeZoneNames->getDisplayName(UnicodeString(TRUE, canonicalID, -1), stdType, date, name);
+ fTimeZoneNames->getDisplayName(UnicodeString(true, canonicalID, -1), stdType, date, name);
}
if (timeType && !name.isEmpty()) {
@@ -1385,11 +1385,11 @@ TimeZoneFormat::formatSpecific(const TimeZone& tz, UTimeZoneNameType stdType, UT
const TimeZoneGenericNames*
TimeZoneFormat::getTimeZoneGenericNames(UErrorCode& status) const {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
umtx_lock(&gLock);
- if (fTimeZoneGenericNames == NULL) {
+ if (fTimeZoneGenericNames == nullptr) {
TimeZoneFormat *nonConstThis = const_cast<TimeZoneFormat *>(this);
nonConstThis->fTimeZoneGenericNames = TimeZoneGenericNames::createInstance(fLocale, status);
}
@@ -1401,13 +1401,13 @@ TimeZoneFormat::getTimeZoneGenericNames(UErrorCode& status) const {
const TZDBTimeZoneNames*
TimeZoneFormat::getTZDBTimeZoneNames(UErrorCode& status) const {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
umtx_lock(&gLock);
- if (fTZDBTimeZoneNames == NULL) {
+ if (fTZDBTimeZoneNames == nullptr) {
TZDBTimeZoneNames *tzdbNames = new TZDBTimeZoneNames(fLocale);
- if (tzdbNames == NULL) {
+ if (tzdbNames == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
TimeZoneFormat *nonConstThis = const_cast<TimeZoneFormat *>(this);
@@ -1421,18 +1421,18 @@ TimeZoneFormat::getTZDBTimeZoneNames(UErrorCode& status) const {
UnicodeString&
TimeZoneFormat::formatExemplarLocation(const TimeZone& tz, UnicodeString& name) const {
- UChar locationBuf[ZONE_NAME_U16_MAX];
+ char16_t locationBuf[ZONE_NAME_U16_MAX];
UnicodeString location(locationBuf, 0, UPRV_LENGTHOF(locationBuf));
- const UChar* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
+ const char16_t* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
if (canonicalID) {
- fTimeZoneNames->getExemplarLocationName(UnicodeString(TRUE, canonicalID, -1), location);
+ fTimeZoneNames->getExemplarLocationName(UnicodeString(true, canonicalID, -1), location);
}
if (location.length() > 0) {
name.setTo(location);
} else {
// Use "unknown" location
- fTimeZoneNames->getExemplarLocationName(UnicodeString(TRUE, UNKNOWN_ZONE_ID, -1), location);
+ fTimeZoneNames->getExemplarLocationName(UnicodeString(true, UNKNOWN_ZONE_ID, -1), location);
if (location.length() > 0) {
name.setTo(location);
} else {
@@ -1450,38 +1450,38 @@ TimeZoneFormat::formatExemplarLocation(const TimeZone& tz, UnicodeString& name)
UnicodeString&
TimeZoneFormat::formatOffsetISO8601Basic(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
UnicodeString& result, UErrorCode& status) const {
- return formatOffsetISO8601(offset, TRUE, useUtcIndicator, isShort, ignoreSeconds, result, status);
+ return formatOffsetISO8601(offset, true, useUtcIndicator, isShort, ignoreSeconds, result, status);
}
UnicodeString&
TimeZoneFormat::formatOffsetISO8601Extended(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
UnicodeString& result, UErrorCode& status) const {
- return formatOffsetISO8601(offset, FALSE, useUtcIndicator, isShort, ignoreSeconds, result, status);
+ return formatOffsetISO8601(offset, false, useUtcIndicator, isShort, ignoreSeconds, result, status);
}
UnicodeString&
TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const {
- return formatOffsetLocalizedGMT(offset, FALSE, result, status);
+ return formatOffsetLocalizedGMT(offset, false, result, status);
}
UnicodeString&
TimeZoneFormat::formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const {
- return formatOffsetLocalizedGMT(offset, TRUE, result, status);
+ return formatOffsetLocalizedGMT(offset, true, result, status);
}
int32_t
TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const {
- return parseOffsetISO8601(text, pos, FALSE);
+ return parseOffsetISO8601(text, pos, false);
}
int32_t
TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const {
- return parseOffsetLocalizedGMT(text, pos, FALSE, NULL);
+ return parseOffsetLocalizedGMT(text, pos, false, nullptr);
}
int32_t
TimeZoneFormat::parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const {
- return parseOffsetLocalizedGMT(text, pos, TRUE, NULL);
+ return parseOffsetLocalizedGMT(text, pos, true, nullptr);
}
// ------------------------------------------------------------------
@@ -1502,7 +1502,7 @@ TimeZoneFormat::formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcI
OffsetFields minFields = isShort ? FIELDS_H : FIELDS_HM;
OffsetFields maxFields = ignoreSeconds ? FIELDS_HM : FIELDS_HMS;
- UChar sep = isBasic ? 0 : ISO8601_SEP;
+ char16_t sep = isBasic ? 0 : ISO8601_SEP;
// Note: FIELDS_HMS as maxFields is a CLDR/ICU extension. ISO 8601 specification does
// not support seconds field.
@@ -1532,7 +1532,7 @@ TimeZoneFormat::formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcI
lastIdx--;
}
- UChar sign = PLUS;
+ char16_t sign = PLUS;
if (offset < 0) {
// if all output fields are 0s, do not use negative sign
for (int32_t idx = 0; idx <= lastIdx; idx++) {
@@ -1548,8 +1548,8 @@ TimeZoneFormat::formatOffsetISO8601(int32_t offset, UBool isBasic, UBool useUtcI
if (sep && idx != 0) {
result.append(sep);
}
- result.append((UChar)(0x0030 + fields[idx]/10));
- result.append((UChar)(0x0030 + fields[idx]%10));
+ result.append((char16_t)(0x0030 + fields[idx]/10));
+ result.append((char16_t)(0x0030 + fields[idx]%10));
}
return result;
@@ -1572,10 +1572,10 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS
return result;
}
- UBool positive = TRUE;
+ UBool positive = true;
if (offset < 0) {
offset = -offset;
- positive = FALSE;
+ positive = false;
}
int32_t offsetH = offset / MILLIS_PER_HOUR;
@@ -1586,7 +1586,7 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS
U_ASSERT(offsetH <= MAX_OFFSET_HOUR && offsetM <= MAX_OFFSET_MINUTE && offsetS <= MAX_OFFSET_SECOND);
- const UVector* offsetPatternItems = NULL;
+ const UVector* offsetPatternItems = nullptr;
if (positive) {
if (offsetS != 0) {
offsetPatternItems = fGMTOffsetPatternItems[UTZFMT_PAT_POSITIVE_HMS];
@@ -1605,7 +1605,7 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS
}
}
- U_ASSERT(offsetPatternItems != NULL);
+ U_ASSERT(offsetPatternItems != nullptr);
// Building the GMT format string
result.setTo(fGMTPatternPrefix);
@@ -1638,9 +1638,9 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS
}
int32_t
-TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly, UBool* hasDigitOffset /* = NULL */) const {
+TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly, UBool* hasDigitOffset /* = nullptr */) const {
if (hasDigitOffset) {
- *hasDigitOffset = FALSE;
+ *hasDigitOffset = false;
}
int32_t start = pos.getIndex();
if (start >= text.length()) {
@@ -1648,8 +1648,8 @@ TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos
return 0;
}
- UChar firstChar = text.charAt(start);
- if (firstChar == ISO8601_UTC || firstChar == (UChar)(ISO8601_UTC + 0x20)) {
+ char16_t firstChar = text.charAt(start);
+ if (firstChar == ISO8601_UTC || firstChar == (char16_t)(ISO8601_UTC + 0x20)) {
// "Z" (or "z") - indicates UTC
pos.setIndex(start + 1);
return 0;
@@ -1672,7 +1672,7 @@ TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos
// as basic format. For example, "0230" can be parsed as offset 2:00 (only first digits are valid for
// extended format), but it can be parsed as offset 2:30 with basic format. We use longer result.
ParsePosition posBasic(start + 1);
- int32_t tmpOffset = parseAbuttingAsciiOffsetFields(text, posBasic, FIELDS_H, FIELDS_HMS, FALSE);
+ int32_t tmpOffset = parseAbuttingAsciiOffsetFields(text, posBasic, FIELDS_H, FIELDS_HMS, false);
if (posBasic.getErrorIndex() == -1 && posBasic.getIndex() > posOffset.getIndex()) {
offset = tmpOffset;
posOffset.setIndex(posBasic.getIndex());
@@ -1686,7 +1686,7 @@ TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos
pos.setIndex(posOffset.getIndex());
if (hasDigitOffset) {
- *hasDigitOffset = TRUE;
+ *hasDigitOffset = true;
}
return sign * offset;
}
@@ -1698,7 +1698,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
int32_t parsedLength = 0;
if (hasDigitOffset) {
- *hasDigitOffset = FALSE;
+ *hasDigitOffset = false;
}
offset = parseOffsetLocalizedGMTPattern(text, start, isShort, parsedLength);
@@ -1715,7 +1715,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
if (parsedLength > 0) {
if (hasDigitOffset) {
- *hasDigitOffset = TRUE;
+ *hasDigitOffset = true;
}
pos.setIndex(start + parsedLength);
return offset;
@@ -1725,7 +1725,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
offset = parseOffsetDefaultLocalizedGMT(text, start, parsedLength);
if (parsedLength > 0) {
if (hasDigitOffset) {
- *hasDigitOffset = TRUE;
+ *hasDigitOffset = true;
}
pos.setIndex(start + parsedLength);
return offset;
@@ -1739,7 +1739,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
// Check if this is a default GMT zero format
for (int32_t i = 0; ALT_GMT_STRINGS[i][0] != 0; i++) {
- const UChar* defGMTZero = ALT_GMT_STRINGS[i];
+ const char16_t* defGMTZero = ALT_GMT_STRINGS[i];
int32_t defGMTZeroLen = u_strlen(defGMTZero);
if (text.caseCompare(start, defGMTZeroLen, defGMTZero, 0) == 0) {
pos.setIndex(start + defGMTZeroLen);
@@ -1756,7 +1756,7 @@ int32_t
TimeZoneFormat::parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_t start, UBool /*isShort*/, int32_t& parsedLen) const {
int32_t idx = start;
int32_t offset = 0;
- UBool parsed = FALSE;
+ UBool parsed = false;
do {
// Prefix part
@@ -1768,7 +1768,7 @@ TimeZoneFormat::parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_
idx += len;
// Offset part
- offset = parseOffsetFields(text, idx, FALSE, len);
+ offset = parseOffsetFields(text, idx, false, len);
if (len == 0) {
// offset field match failed
break;
@@ -1781,8 +1781,8 @@ TimeZoneFormat::parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_
break;
}
idx += len;
- parsed = TRUE;
- } while (FALSE);
+ parsed = true;
+ } while (false);
parsedLen = parsed ? idx - start : 0;
return offset;
@@ -1802,9 +1802,9 @@ TimeZoneFormat::parseOffsetFields(const UnicodeString& text, int32_t start, UBoo
for (int32_t patidx = 0; PARSE_GMT_OFFSET_TYPES[patidx] >= 0; patidx++) {
int32_t gmtPatType = PARSE_GMT_OFFSET_TYPES[patidx];
UVector* items = fGMTOffsetPatternItems[gmtPatType];
- U_ASSERT(items != NULL);
+ U_ASSERT(items != nullptr);
- outLen = parseOffsetFieldsWithPattern(text, start, items, FALSE, offsetH, offsetM, offsetS);
+ outLen = parseOffsetFieldsWithPattern(text, start, items, false, offsetH, offsetM, offsetS);
if (outLen > 0) {
sign = (gmtPatType == UTZFMT_PAT_POSITIVE_H || gmtPatType == UTZFMT_PAT_POSITIVE_HM || gmtPatType == UTZFMT_PAT_POSITIVE_HMS) ?
1 : -1;
@@ -1826,10 +1826,10 @@ TimeZoneFormat::parseOffsetFields(const UnicodeString& text, int32_t start, UBoo
for (int32_t patidx = 0; PARSE_GMT_OFFSET_TYPES[patidx] >= 0; patidx++) {
int32_t gmtPatType = PARSE_GMT_OFFSET_TYPES[patidx];
UVector* items = fGMTOffsetPatternItems[gmtPatType];
- U_ASSERT(items != NULL);
+ U_ASSERT(items != nullptr);
// forcing parse to use single hour digit
- tmpLen = parseOffsetFieldsWithPattern(text, start, items, TRUE, tmpH, tmpM, tmpS);
+ tmpLen = parseOffsetFieldsWithPattern(text, start, items, true, tmpH, tmpM, tmpS);
if (tmpLen > 0) {
tmpSign = (gmtPatType == UTZFMT_PAT_POSITIVE_H || gmtPatType == UTZFMT_PAT_POSITIVE_HM || gmtPatType == UTZFMT_PAT_POSITIVE_HMS) ?
1 : -1;
@@ -1857,7 +1857,7 @@ TimeZoneFormat::parseOffsetFields(const UnicodeString& text, int32_t start, UBoo
int32_t
TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t start,
UVector* patternItems, UBool forceSingleHourDigit, int32_t& hour, int32_t& min, int32_t& sec) const {
- UBool failed = FALSE;
+ UBool failed = false;
int32_t offsetH, offsetM, offsetS;
offsetH = offsetM = offsetS = 0;
int32_t idx = start;
@@ -1867,7 +1867,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
const GMTOffsetField* field = (const GMTOffsetField*)patternItems->elementAt(i);
GMTOffsetField::FieldType fieldType = field->getType();
if (fieldType == GMTOffsetField::TEXT) {
- const UChar* patStr = field->getPatternText();
+ const char16_t* patStr = field->getPatternText();
len = u_strlen(patStr);
if (i == 0) {
// When TimeZoneFormat parse() is called from SimpleDateFormat,
@@ -1891,7 +1891,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
}
}
if (text.caseCompare(idx, len, patStr, 0) != 0) {
- failed = TRUE;
+ failed = true;
break;
}
idx += len;
@@ -1906,7 +1906,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
}
if (len == 0) {
- failed = TRUE;
+ failed = true;
break;
}
idx += len;
@@ -2004,7 +2004,7 @@ TimeZoneFormat::parseOffsetDefaultLocalizedGMT(const UnicodeString& text, int st
int32_t gmtLen = 0;
for (int32_t i = 0; ALT_GMT_STRINGS[i][0] != 0; i++) {
- const UChar* gmt = ALT_GMT_STRINGS[i];
+ const char16_t* gmt = ALT_GMT_STRINGS[i];
int32_t len = u_strlen(gmt);
if (text.caseCompare(start, len, gmt, 0) == 0) {
gmtLen = len;
@@ -2023,7 +2023,7 @@ TimeZoneFormat::parseOffsetDefaultLocalizedGMT(const UnicodeString& text, int st
// parse sign
int32_t sign = 1;
- UChar c = text.charAt(idx);
+ char16_t c = text.charAt(idx);
if (c == PLUS) {
sign = 1;
} else if (c == MINUS) {
@@ -2062,7 +2062,7 @@ TimeZoneFormat::parseOffsetDefaultLocalizedGMT(const UnicodeString& text, int st
}
int32_t
-TimeZoneFormat::parseDefaultOffsetFields(const UnicodeString& text, int32_t start, UChar separator, int32_t& parsedLen) const {
+TimeZoneFormat::parseDefaultOffsetFields(const UnicodeString& text, int32_t start, char16_t separator, int32_t& parsedLen) const {
int32_t max = text.length();
int32_t idx = start;
int32_t len = 0;
@@ -2092,7 +2092,7 @@ TimeZoneFormat::parseDefaultOffsetFields(const UnicodeString& text, int32_t star
idx += (1 + len);
}
}
- } while (FALSE);
+ } while (false);
if (idx == start) {
return 0;
@@ -2165,11 +2165,11 @@ TimeZoneFormat::parseSingleLocalizedDigit(const UnicodeString& text, int32_t sta
}
UnicodeString&
-TimeZoneFormat::formatOffsetWithAsciiDigits(int32_t offset, UChar sep, OffsetFields minFields, OffsetFields maxFields, UnicodeString& result) {
+TimeZoneFormat::formatOffsetWithAsciiDigits(int32_t offset, char16_t sep, OffsetFields minFields, OffsetFields maxFields, UnicodeString& result) {
U_ASSERT(maxFields >= minFields);
U_ASSERT(offset > -MAX_OFFSET && offset < MAX_OFFSET);
- UChar sign = PLUS;
+ char16_t sign = PLUS;
if (offset < 0) {
sign = MINUS;
offset = -offset;
@@ -2199,8 +2199,8 @@ TimeZoneFormat::formatOffsetWithAsciiDigits(int32_t offset, UChar sep, OffsetFie
if (sep && idx != 0) {
result.append(sep);
}
- result.append((UChar)(0x0030 + fields[idx]/10));
- result.append((UChar)(0x0030 + fields[idx]%10));
+ result.append((char16_t)(0x0030 + fields[idx]/10));
+ result.append((char16_t)(0x0030 + fields[idx]%10));
}
return result;
@@ -2219,7 +2219,7 @@ TimeZoneFormat::parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParseP
int32_t numDigits = 0;
int32_t idx = start;
while (numDigits < maxDigits && idx < text.length()) {
- UChar uch = text.charAt(idx);
+ char16_t uch = text.charAt(idx);
int32_t digit = DIGIT_VAL(uch);
if (digit < 0) {
break;
@@ -2240,7 +2240,7 @@ TimeZoneFormat::parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParseP
}
int32_t hour = 0, min = 0, sec = 0;
- UBool bParsed = FALSE;
+ UBool bParsed = false;
while (numDigits >= minDigits) {
switch (numDigits) {
case 1: //H
@@ -2289,12 +2289,12 @@ TimeZoneFormat::parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParseP
}
int32_t
-TimeZoneFormat::parseAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos, UChar sep, OffsetFields minFields, OffsetFields maxFields) {
+TimeZoneFormat::parseAsciiOffsetFields(const UnicodeString& text, ParsePosition& pos, char16_t sep, OffsetFields minFields, OffsetFields maxFields) {
int32_t start = pos.getIndex();
int32_t fieldVal[] = {0, 0, 0};
int32_t fieldLen[] = {0, -1, -1};
for (int32_t idx = start, fieldIdx = 0; idx < text.length() && fieldIdx <= maxFields; idx++) {
- UChar c = text.charAt(idx);
+ char16_t c = text.charAt(idx);
if (c == sep) {
if (fieldIdx == 0) {
if (fieldLen[0] == 0) {
@@ -2409,20 +2409,20 @@ TimeZoneFormat::unquote(const UnicodeString& pattern, UnicodeString& result) {
return result;
}
result.remove();
- UBool isPrevQuote = FALSE;
- UBool inQuote = FALSE;
+ UBool isPrevQuote = false;
+ UBool inQuote = false;
for (int32_t i = 0; i < pattern.length(); i++) {
- UChar c = pattern.charAt(i);
+ char16_t c = pattern.charAt(i);
if (c == SINGLEQUOTE) {
if (isPrevQuote) {
result.append(c);
- isPrevQuote = FALSE;
+ isPrevQuote = false;
} else {
- isPrevQuote = TRUE;
+ isPrevQuote = true;
}
inQuote = !inQuote;
} else {
- isPrevQuote = FALSE;
+ isPrevQuote = false;
result.append(c);
}
}
@@ -2432,34 +2432,34 @@ TimeZoneFormat::unquote(const UnicodeString& pattern, UnicodeString& result) {
UVector*
TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields required, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- UVector* result = new UVector(deleteGMTOffsetField, NULL, status);
- if (result == NULL) {
+ UVector* result = new UVector(deleteGMTOffsetField, nullptr, status);
+ if (result == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
int32_t checkBits = 0;
- UBool isPrevQuote = FALSE;
- UBool inQuote = FALSE;
- UChar textBuf[32];
+ UBool isPrevQuote = false;
+ UBool inQuote = false;
+ char16_t textBuf[32];
UnicodeString text(textBuf, 0, UPRV_LENGTHOF(textBuf));
GMTOffsetField::FieldType itemType = GMTOffsetField::TEXT;
int32_t itemLength = 1;
for (int32_t i = 0; i < pattern.length(); i++) {
- UChar ch = pattern.charAt(i);
+ char16_t ch = pattern.charAt(i);
if (ch == SINGLEQUOTE) {
if (isPrevQuote) {
text.append(SINGLEQUOTE);
- isPrevQuote = FALSE;
+ isPrevQuote = false;
} else {
- isPrevQuote = TRUE;
+ isPrevQuote = true;
if (itemType != GMTOffsetField::TEXT) {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElementX(fld, status);
+ result->adoptElement(fld, status);
if (U_FAILURE(status)) {
break;
}
@@ -2472,7 +2472,7 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
}
inQuote = !inQuote;
} else {
- isPrevQuote = FALSE;
+ isPrevQuote = false;
if (inQuote) {
text.append(ch);
} else {
@@ -2485,7 +2485,7 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
if (itemType == GMTOffsetField::TEXT) {
if (text.length() > 0) {
GMTOffsetField* textfld = GMTOffsetField::createText(text, status);
- result->addElementX(textfld, status);
+ result->adoptElement(textfld, status);
if (U_FAILURE(status)) {
break;
}
@@ -2494,7 +2494,7 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
} else {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElementX(fld, status);
+ result->adoptElement(fld, status);
if (U_FAILURE(status)) {
break;
}
@@ -2512,7 +2512,7 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
if (itemType != GMTOffsetField::TEXT) {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElementX(fld, status);
+ result->adoptElement(fld, status);
if (U_FAILURE(status)) {
break;
}
@@ -2532,12 +2532,12 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
if (itemType == GMTOffsetField::TEXT) {
if (text.length() > 0) {
GMTOffsetField* tfld = GMTOffsetField::createText(text, status);
- result->addElementX(tfld, status);
+ result->adoptElement(tfld, status);
}
} else {
if (GMTOffsetField::isValid(itemType, itemLength)) {
GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast<uint8_t>(itemLength), status);
- result->addElementX(fld, status);
+ result->adoptElement(fld, status);
} else {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
@@ -2566,7 +2566,7 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
// error
delete result;
- return NULL;
+ return nullptr;
}
UnicodeString&
@@ -2585,7 +2585,7 @@ TimeZoneFormat::expandOffsetPattern(const UnicodeString& offsetHM, UnicodeString
}
UnicodeString sep;
- int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf((UChar)0x0048 /* H */);
+ int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf((char16_t)0x0048 /* H */);
if (idx_H >= 0) {
sep = offsetHM.tempSubString(idx_H + 1, idx_mm - (idx_H + 1));
}
@@ -2610,12 +2610,12 @@ TimeZoneFormat::truncateOffsetPattern(const UnicodeString& offsetHM, UnicodeStri
status = U_ILLEGAL_ARGUMENT_ERROR;
return result;
}
- UChar HH[] = {0x0048, 0x0048};
+ char16_t HH[] = {0x0048, 0x0048};
int32_t idx_HH = offsetHM.tempSubString(0, idx_mm).lastIndexOf(HH, 2, 0);
if (idx_HH >= 0) {
return result.setTo(offsetHM.tempSubString(0, idx_HH + 2));
}
- int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf((UChar)0x0048, 0);
+ int32_t idx_H = offsetHM.tempSubString(0, idx_mm).lastIndexOf((char16_t)0x0048, 0);
if (idx_H >= 0) {
return result.setTo(offsetHM.tempSubString(0, idx_H + 1));
}
@@ -2642,24 +2642,27 @@ TimeZoneFormat::initGMTOffsetPatterns(UErrorCode& status) {
break;
}
}
+ if (U_FAILURE(status)) {
+ return;
+ }
checkAbuttingHoursAndMinutes();
}
void
TimeZoneFormat::checkAbuttingHoursAndMinutes() {
- fAbuttingOffsetHoursAndMinutes= FALSE;
+ fAbuttingOffsetHoursAndMinutes= false;
for (int32_t type = 0; type < UTZFMT_PAT_COUNT; type++) {
- UBool afterH = FALSE;
+ UBool afterH = false;
UVector *items = fGMTOffsetPatternItems[type];
for (int32_t i = 0; i < items->size(); i++) {
const GMTOffsetField* item = (GMTOffsetField*)items->elementAt(i);
GMTOffsetField::FieldType fieldType = item->getType();
if (fieldType != GMTOffsetField::TEXT) {
if (afterH) {
- fAbuttingOffsetHoursAndMinutes = TRUE;
+ fAbuttingOffsetHoursAndMinutes = true;
break;
} else if (fieldType == GMTOffsetField::HOUR) {
- afterH = TRUE;
+ afterH = true;
}
} else if (afterH) {
break;
@@ -2675,7 +2678,7 @@ UBool
TimeZoneFormat::toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t size) {
int32_t count = str.countChar32();
if (count != size) {
- return FALSE;
+ return false;
}
for (int32_t idx = 0, start = 0; idx < size; idx++) {
@@ -2683,14 +2686,14 @@ TimeZoneFormat::toCodePoints(const UnicodeString& str, UChar32* codeArray, int32
start = str.moveIndex32(start, 1);
}
- return TRUE;
+ return true;
}
TimeZone*
TimeZoneFormat::createTimeZoneForOffset(int32_t offset) const {
if (offset == 0) {
// when offset is 0, we should use "Etc/GMT"
- return TimeZone::createTimeZone(UnicodeString(TRUE, TZID_GMT, -1));
+ return TimeZone::createTimeZone(UnicodeString(true, TZID_GMT, -1));
}
return ZoneMeta::createCustomTimeZone(offset);
}
@@ -2714,7 +2717,7 @@ TimeZoneFormat::getTimeType(UTimeZoneNameType nameType) {
UnicodeString&
TimeZoneFormat::getTimeZoneID(const TimeZoneNames::MatchInfoCollection* matches, int32_t idx, UnicodeString& tzID) const {
if (!matches->getTimeZoneIDAt(idx, tzID)) {
- UChar mzIDBuf[32];
+ char16_t mzIDBuf[32];
UnicodeString mzID(mzIDBuf, 0, UPRV_LENGTHOF(mzIDBuf));
if (matches->getMetaZoneIDAt(idx, mzID)) {
fTimeZoneNames->getReferenceZoneID(mzID, fTargetRegion, tzID);
@@ -2730,15 +2733,15 @@ public:
virtual ~ZoneIdMatchHandler();
UBool handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) override;
- const UChar* getID();
+ const char16_t* getID();
int32_t getMatchLen();
private:
int32_t fLen;
- const UChar* fID;
+ const char16_t* fID;
};
ZoneIdMatchHandler::ZoneIdMatchHandler()
-: fLen(0), fID(NULL) {
+: fLen(0), fID(nullptr) {
}
ZoneIdMatchHandler::~ZoneIdMatchHandler() {
@@ -2747,21 +2750,21 @@ ZoneIdMatchHandler::~ZoneIdMatchHandler() {
UBool
ZoneIdMatchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (node->hasValues()) {
- const UChar* id = (const UChar*)node->getValue(0);
- if (id != NULL) {
+ const char16_t* id = (const char16_t*)node->getValue(0);
+ if (id != nullptr) {
if (fLen < matchLength) {
fID = id;
fLen = matchLength;
}
}
}
- return TRUE;
+ return true;
}
-const UChar*
+const char16_t*
ZoneIdMatchHandler::getID() {
return fID;
}
@@ -2773,20 +2776,20 @@ ZoneIdMatchHandler::getMatchLen() {
static void U_CALLCONV initZoneIdTrie(UErrorCode &status) {
- U_ASSERT(gZoneIdTrie == NULL);
+ U_ASSERT(gZoneIdTrie == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONEFORMAT, tzfmt_cleanup);
- gZoneIdTrie = new TextTrieMap(TRUE, NULL); // No deleter, because values are pooled by ZoneMeta
- if (gZoneIdTrie == NULL) {
+ gZoneIdTrie = new TextTrieMap(true, nullptr); // No deleter, because values are pooled by ZoneMeta
+ if (gZoneIdTrie == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
StringEnumeration *tzenum = TimeZone::createEnumeration(status);
if (U_SUCCESS(status)) {
const UnicodeString *id;
- while ((id = tzenum->snext(status)) != NULL) {
- const UChar* uid = ZoneMeta::findTimeZoneID(*id);
+ while ((id = tzenum->snext(status)) != nullptr) {
+ const char16_t* uid = ZoneMeta::findTimeZoneID(*id);
if (uid) {
- gZoneIdTrie->put(uid, const_cast<UChar *>(uid), status);
+ gZoneIdTrie->put(uid, const_cast<char16_t *>(uid), status);
}
}
delete tzenum;
@@ -2822,20 +2825,20 @@ TimeZoneFormat::parseZoneID(const UnicodeString& text, ParsePosition& pos, Unico
}
static void U_CALLCONV initShortZoneIdTrie(UErrorCode &status) {
- U_ASSERT(gShortZoneIdTrie == NULL);
+ U_ASSERT(gShortZoneIdTrie == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONEFORMAT, tzfmt_cleanup);
- StringEnumeration *tzenum = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL, NULL, NULL, status);
+ StringEnumeration *tzenum = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL, nullptr, nullptr, status);
if (U_SUCCESS(status)) {
- gShortZoneIdTrie = new TextTrieMap(TRUE, NULL); // No deleter, because values are pooled by ZoneMeta
- if (gShortZoneIdTrie == NULL) {
+ gShortZoneIdTrie = new TextTrieMap(true, nullptr); // No deleter, because values are pooled by ZoneMeta
+ if (gShortZoneIdTrie == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
const UnicodeString *id;
- while ((id = tzenum->snext(status)) != NULL) {
- const UChar* uID = ZoneMeta::findTimeZoneID(*id);
- const UChar* shortID = ZoneMeta::getShortID(*id);
+ while ((id = tzenum->snext(status)) != nullptr) {
+ const char16_t* uID = ZoneMeta::findTimeZoneID(*id);
+ const char16_t* shortID = ZoneMeta::getShortID(*id);
if (shortID && uID) {
- gShortZoneIdTrie->put(shortID, const_cast<UChar *>(uID), status);
+ gShortZoneIdTrie->put(shortID, const_cast<char16_t *>(uID), status);
}
}
}
diff --git a/contrib/libs/icu/i18n/tzgnames.cpp b/contrib/libs/icu/i18n/tzgnames.cpp
index ed5f42d7bc1..d55b0fd2ae0 100644
--- a/contrib/libs/icu/i18n/tzgnames.cpp
+++ b/contrib/libs/icu/i18n/tzgnames.cpp
@@ -46,10 +46,10 @@ static const char gZoneStrings[] = "zoneStrings";
static const char gRegionFormatTag[] = "regionFormat";
static const char gFallbackFormatTag[] = "fallbackFormat";
-static const UChar gEmpty[] = {0x00};
+static const char16_t gEmpty[] = {0x00};
-static const UChar gDefRegionPattern[] = {0x7B, 0x30, 0x7D, 0x00}; // "{0}"
-static const UChar gDefFallbackPattern[] = {0x7B, 0x31, 0x7D, 0x20, 0x28, 0x7B, 0x30, 0x7D, 0x29, 0x00}; // "{1} ({0})"
+static const char16_t gDefRegionPattern[] = {0x7B, 0x30, 0x7D, 0x00}; // "{0}"
+static const char16_t gDefFallbackPattern[] = {0x7B, 0x31, 0x7D, 0x20, 0x28, 0x7B, 0x30, 0x7D, 0x29, 0x00}; // "{1} ({0})"
static const double kDstCheckRange = (double)184*U_MILLIS_PER_DAY;
@@ -58,8 +58,8 @@ static const double kDstCheckRange = (double)184*U_MILLIS_PER_DAY;
U_CDECL_BEGIN
typedef struct PartialLocationKey {
- const UChar* tzID;
- const UChar* mzID;
+ const char16_t* tzID;
+ const char16_t* mzID;
UBool isLong;
} PartialLocationKey;
@@ -71,10 +71,10 @@ hashPartialLocationKey(const UHashTok key) {
// <tzID>&<mzID>#[L|S]
PartialLocationKey *p = (PartialLocationKey *)key.pointer;
UnicodeString str(p->tzID);
- str.append((UChar)0x26)
+ str.append((char16_t)0x26)
.append(p->mzID, -1)
- .append((UChar)0x23)
- .append((UChar)(p->isLong ? 0x4C : 0x53));
+ .append((char16_t)0x23)
+ .append((char16_t)(p->isLong ? 0x4C : 0x53));
return str.hashCode();
}
@@ -87,10 +87,10 @@ comparePartialLocationKey(const UHashTok key1, const UHashTok key2) {
PartialLocationKey *p2 = (PartialLocationKey *)key2.pointer;
if (p1 == p2) {
- return TRUE;
+ return true;
}
- if (p1 == NULL || p2 == NULL) {
- return FALSE;
+ if (p1 == nullptr || p2 == nullptr) {
+ return false;
}
// We just check identity of tzID/mzID
return (p1->tzID == p2->tzID && p1->mzID == p2->mzID && p1->isLong == p2->isLong);
@@ -109,7 +109,7 @@ deleteGNameInfo(void *obj) {
*/
typedef struct GNameInfo {
UTimeZoneGenericNameType type;
- const UChar* tzID;
+ const char16_t* tzID;
} ZNameInfo;
/**
@@ -145,14 +145,14 @@ TimeZoneGenericNameMatchInfo::TimeZoneGenericNameMatchInfo(UVector* matches)
}
TimeZoneGenericNameMatchInfo::~TimeZoneGenericNameMatchInfo() {
- if (fMatches != NULL) {
+ if (fMatches != nullptr) {
delete fMatches;
}
}
int32_t
TimeZoneGenericNameMatchInfo::size() const {
- if (fMatches == NULL) {
+ if (fMatches == nullptr) {
return 0;
}
return fMatches->size();
@@ -161,7 +161,7 @@ TimeZoneGenericNameMatchInfo::size() const {
UTimeZoneGenericNameType
TimeZoneGenericNameMatchInfo::getGenericNameType(int32_t index) const {
GMatchInfo *minfo = (GMatchInfo *)fMatches->elementAt(index);
- if (minfo != NULL) {
+ if (minfo != nullptr) {
return static_cast<UTimeZoneGenericNameType>(minfo->gnameInfo->type);
}
return UTZGNM_UNKNOWN;
@@ -170,7 +170,7 @@ TimeZoneGenericNameMatchInfo::getGenericNameType(int32_t index) const {
int32_t
TimeZoneGenericNameMatchInfo::getMatchLength(int32_t index) const {
ZMatchInfo *minfo = (ZMatchInfo *)fMatches->elementAt(index);
- if (minfo != NULL) {
+ if (minfo != nullptr) {
return minfo->matchLength;
}
return -1;
@@ -179,8 +179,8 @@ TimeZoneGenericNameMatchInfo::getMatchLength(int32_t index) const {
UnicodeString&
TimeZoneGenericNameMatchInfo::getTimeZoneID(int32_t index, UnicodeString& tzID) const {
GMatchInfo *minfo = (GMatchInfo *)fMatches->elementAt(index);
- if (minfo != NULL && minfo->gnameInfo->tzID != NULL) {
- tzID.setTo(TRUE, minfo->gnameInfo->tzID, -1);
+ if (minfo != nullptr && minfo->gnameInfo->tzID != nullptr) {
+ tzID.setTo(true, minfo->gnameInfo->tzID, -1);
} else {
tzID.setToBogus();
}
@@ -205,11 +205,11 @@ private:
};
GNameSearchHandler::GNameSearchHandler(uint32_t types)
-: fTypes(types), fResults(NULL), fMaxMatchLen(0) {
+: fTypes(types), fResults(nullptr), fMaxMatchLen(0) {
}
GNameSearchHandler::~GNameSearchHandler() {
- if (fResults != NULL) {
+ if (fResults != nullptr) {
delete fResults;
}
}
@@ -217,47 +217,44 @@ GNameSearchHandler::~GNameSearchHandler() {
UBool
GNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (node->hasValues()) {
int32_t valuesCount = node->countValues();
for (int32_t i = 0; i < valuesCount; i++) {
GNameInfo *nameinfo = (ZNameInfo *)node->getValue(i);
- if (nameinfo == NULL) {
+ if (nameinfo == nullptr) {
break;
}
if ((nameinfo->type & fTypes) != 0) {
// matches a requested type
- if (fResults == NULL) {
- fResults = new UVector(uprv_free, NULL, status);
- if (fResults == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
+ if (fResults == nullptr) {
+ LocalPointer<UVector> lpResults(new UVector(uprv_free, nullptr, status), status);
+ if (U_FAILURE(status)) {
+ return false;
}
+ fResults = lpResults.orphan();
}
- if (U_SUCCESS(status)) {
- U_ASSERT(fResults != NULL);
- GMatchInfo *gmatch = (GMatchInfo *)uprv_malloc(sizeof(GMatchInfo));
- if (gmatch == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- } else {
- // add the match to the vector
- gmatch->gnameInfo = nameinfo;
- gmatch->matchLength = matchLength;
- gmatch->timeType = UTZFMT_TIME_TYPE_UNKNOWN;
- fResults->addElementX(gmatch, status);
- if (U_FAILURE(status)) {
- uprv_free(gmatch);
- } else {
- if (matchLength > fMaxMatchLen) {
- fMaxMatchLen = matchLength;
- }
- }
- }
+ GMatchInfo *gmatch = (GMatchInfo *)uprv_malloc(sizeof(GMatchInfo));
+ if (gmatch == nullptr) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return false;
+ }
+ // add the match to the vector
+ gmatch->gnameInfo = nameinfo;
+ gmatch->matchLength = matchLength;
+ gmatch->timeType = UTZFMT_TIME_TYPE_UNKNOWN;
+ fResults->adoptElement(gmatch, status);
+ if (U_FAILURE(status)) {
+ return false;
+ }
+ if (matchLength > fMaxMatchLen) {
+ fMaxMatchLen = matchLength;
}
}
}
}
- return TRUE;
+ return true;
}
UVector*
@@ -267,7 +264,7 @@ GNameSearchHandler::getMatches(int32_t& maxMatchLen) {
maxMatchLen = fMaxMatchLen;
// reset
- fResults = NULL;
+ fResults = nullptr;
fMaxMatchLen = 0;
return results;
}
@@ -309,7 +306,7 @@ private:
void loadStrings(const UnicodeString& tzCanonicalID);
- const UChar* getGenericLocationName(const UnicodeString& tzCanonicalID);
+ const char16_t* getGenericLocationName(const UnicodeString& tzCanonicalID);
UnicodeString& formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameType type,
UDate date, UnicodeString& name) const;
@@ -318,7 +315,7 @@ private:
const UnicodeString& mzID, UBool isLong, const UnicodeString& mzDisplayName,
UnicodeString& name) const;
- const UChar* getPartialLocationName(const UnicodeString& tzCanonicalID,
+ const char16_t* getPartialLocationName(const UnicodeString& tzCanonicalID,
const UnicodeString& mzID, UBool isLong, const UnicodeString& mzDisplayName);
TimeZoneGenericNameMatchInfo* findLocal(const UnicodeString& text, int32_t start, uint32_t types, UErrorCode& status) const;
@@ -336,13 +333,13 @@ private:
// ---------------------------------------------------
TZGNCore::TZGNCore(const Locale& locale, UErrorCode& status)
: fLocale(locale),
- fTimeZoneNames(NULL),
- fLocationNamesMap(NULL),
- fPartialLocationNamesMap(NULL),
- fLocaleDisplayNames(NULL),
+ fTimeZoneNames(nullptr),
+ fLocationNamesMap(nullptr),
+ fPartialLocationNamesMap(nullptr),
+ fLocaleDisplayNames(nullptr),
fStringPool(status),
- fGNamesTrie(TRUE, deleteGNameInfo),
- fGNamesTrieFullyLoaded(FALSE) {
+ fGNamesTrie(true, deleteGNameInfo),
+ fGNamesTrieFullyLoaded(false) {
initialize(locale, status);
}
@@ -363,20 +360,20 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) {
}
// Initialize format patterns
- UnicodeString rpat(TRUE, gDefRegionPattern, -1);
- UnicodeString fpat(TRUE, gDefFallbackPattern, -1);
+ UnicodeString rpat(true, gDefRegionPattern, -1);
+ UnicodeString fpat(true, gDefFallbackPattern, -1);
UErrorCode tmpsts = U_ZERO_ERROR; // OK with fallback warning..
UResourceBundle *zoneStrings = ures_open(U_ICUDATA_ZONE, locale.getName(), &tmpsts);
zoneStrings = ures_getByKeyWithFallback(zoneStrings, gZoneStrings, zoneStrings, &tmpsts);
if (U_SUCCESS(tmpsts)) {
- const UChar *regionPattern = ures_getStringByKeyWithFallback(zoneStrings, gRegionFormatTag, NULL, &tmpsts);
+ const char16_t *regionPattern = ures_getStringByKeyWithFallback(zoneStrings, gRegionFormatTag, nullptr, &tmpsts);
if (U_SUCCESS(tmpsts) && u_strlen(regionPattern) > 0) {
rpat.setTo(regionPattern, -1);
}
tmpsts = U_ZERO_ERROR;
- const UChar *fallbackPattern = ures_getStringByKeyWithFallback(zoneStrings, gFallbackFormatTag, NULL, &tmpsts);
+ const char16_t *fallbackPattern = ures_getStringByKeyWithFallback(zoneStrings, gFallbackFormatTag, nullptr, &tmpsts);
if (U_SUCCESS(tmpsts) && u_strlen(fallbackPattern) > 0) {
fpat.setTo(fallbackPattern, -1);
}
@@ -394,13 +391,13 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) {
fLocaleDisplayNames = LocaleDisplayNames::createInstance(locale);
// hash table for names - no key/value deleters
- fLocationNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
+ fLocationNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
if (U_FAILURE(status)) {
cleanup();
return;
}
- fPartialLocationNamesMap = uhash_open(hashPartialLocationKey, comparePartialLocationKey, NULL, &status);
+ fPartialLocationNamesMap = uhash_open(hashPartialLocationKey, comparePartialLocationKey, nullptr, &status);
if (U_FAILURE(status)) {
cleanup();
return;
@@ -433,19 +430,19 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) {
// preload generic names for the default zone
TimeZone *tz = TimeZone::createDefault();
- const UChar *tzID = ZoneMeta::getCanonicalCLDRID(*tz);
- if (tzID != NULL) {
- loadStrings(UnicodeString(TRUE, tzID, -1));
+ const char16_t *tzID = ZoneMeta::getCanonicalCLDRID(*tz);
+ if (tzID != nullptr) {
+ loadStrings(UnicodeString(true, tzID, -1));
}
delete tz;
}
void
TZGNCore::cleanup() {
- if (fLocaleDisplayNames != NULL) {
+ if (fLocaleDisplayNames != nullptr) {
delete fLocaleDisplayNames;
}
- if (fTimeZoneNames != NULL) {
+ if (fTimeZoneNames != nullptr) {
delete fTimeZoneNames;
}
@@ -460,9 +457,9 @@ TZGNCore::getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, UDat
switch (type) {
case UTZGNM_LOCATION:
{
- const UChar* tzCanonicalID = ZoneMeta::getCanonicalCLDRID(tz);
- if (tzCanonicalID != NULL) {
- getGenericLocationName(UnicodeString(TRUE, tzCanonicalID, -1), name);
+ const char16_t* tzCanonicalID = ZoneMeta::getCanonicalCLDRID(tz);
+ if (tzCanonicalID != nullptr) {
+ getGenericLocationName(UnicodeString(true, tzCanonicalID, -1), name);
}
}
break;
@@ -470,9 +467,9 @@ TZGNCore::getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, UDat
case UTZGNM_SHORT:
formatGenericNonLocationName(tz, type, date, name);
if (name.isEmpty()) {
- const UChar* tzCanonicalID = ZoneMeta::getCanonicalCLDRID(tz);
- if (tzCanonicalID != NULL) {
- getGenericLocationName(UnicodeString(TRUE, tzCanonicalID, -1), name);
+ const char16_t* tzCanonicalID = ZoneMeta::getCanonicalCLDRID(tz);
+ if (tzCanonicalID != nullptr) {
+ getGenericLocationName(UnicodeString(true, tzCanonicalID, -1), name);
}
}
break;
@@ -489,7 +486,7 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID, UnicodeStri
return name;
}
- const UChar *locname = NULL;
+ const char16_t *locname = nullptr;
TZGNCore *nonConstThis = const_cast<TZGNCore *>(this);
umtx_lock(&gLock);
{
@@ -497,7 +494,7 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID, UnicodeStri
}
umtx_unlock(&gLock);
- if (locname == NULL) {
+ if (locname == nullptr) {
name.setToBogus();
} else {
name.setTo(locname, u_strlen(locname));
@@ -509,25 +506,25 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID, UnicodeStri
/*
* This method updates the cache and must be called with a lock
*/
-const UChar*
+const char16_t*
TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID) {
U_ASSERT(!tzCanonicalID.isEmpty());
if (tzCanonicalID.length() > ZID_KEY_MAX) {
- return NULL;
+ return nullptr;
}
UErrorCode status = U_ZERO_ERROR;
- UChar tzIDKey[ZID_KEY_MAX + 1];
+ char16_t tzIDKey[ZID_KEY_MAX + 1];
int32_t tzIDKeyLen = tzCanonicalID.extract(tzIDKey, ZID_KEY_MAX + 1, status);
U_ASSERT(status == U_ZERO_ERROR); // already checked length above
tzIDKey[tzIDKeyLen] = 0;
- const UChar *locname = (const UChar *)uhash_get(fLocationNamesMap, tzIDKey);
+ const char16_t *locname = (const char16_t *)uhash_get(fLocationNamesMap, tzIDKey);
- if (locname != NULL) {
+ if (locname != nullptr) {
// gEmpty indicate the name is not available
if (locname == gEmpty) {
- return NULL;
+ return nullptr;
}
return locname;
}
@@ -535,7 +532,7 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID) {
// Construct location name
UnicodeString name;
UnicodeString usCountryCode;
- UBool isPrimary = FALSE;
+ UBool isPrimary = false;
ZoneMeta::getCanonicalCountry(tzCanonicalID, usCountryCode, &isPrimary);
@@ -562,26 +559,26 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID) {
fRegionFormat.format(city, name, status);
}
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
}
- locname = name.isEmpty() ? NULL : fStringPool.get(name, status);
+ locname = name.isEmpty() ? nullptr : fStringPool.get(name, status);
if (U_SUCCESS(status)) {
// Cache the result
- const UChar* cacheID = ZoneMeta::findTimeZoneID(tzCanonicalID);
- U_ASSERT(cacheID != NULL);
- if (locname == NULL) {
+ const char16_t* cacheID = ZoneMeta::findTimeZoneID(tzCanonicalID);
+ U_ASSERT(cacheID != nullptr);
+ if (locname == nullptr) {
// gEmpty to indicate - no location name available
uhash_put(fLocationNamesMap, (void *)cacheID, (void *)gEmpty, &status);
} else {
uhash_put(fLocationNamesMap, (void *)cacheID, (void *)locname, &status);
if (U_FAILURE(status)) {
- locname = NULL;
+ locname = nullptr;
} else {
// put the name info into the trie
GNameInfo *nameinfo = (ZNameInfo *)uprv_malloc(sizeof(GNameInfo));
- if (nameinfo != NULL) {
+ if (nameinfo != nullptr) {
nameinfo->type = UTZGNM_LOCATION;
nameinfo->tzID = cacheID;
fGNamesTrie.put(locname, nameinfo, status);
@@ -598,12 +595,12 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
U_ASSERT(type == UTZGNM_LONG || type == UTZGNM_SHORT);
name.setToBogus();
- const UChar* uID = ZoneMeta::getCanonicalCLDRID(tz);
- if (uID == NULL) {
+ const char16_t* uID = ZoneMeta::getCanonicalCLDRID(tz);
+ if (uID == nullptr) {
return name;
}
- UnicodeString tzID(TRUE, uID, -1);
+ UnicodeString tzID(true, uID, -1);
// Try to get a name from time zone first
UTimeZoneNameType nameType = (type == UTZGNM_LONG) ? UTZNM_LONG_GENERIC : UTZNM_SHORT_GENERIC;
@@ -614,59 +611,59 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
}
// Try meta zone
- UChar mzIDBuf[32];
+ char16_t mzIDBuf[32];
UnicodeString mzID(mzIDBuf, 0, UPRV_LENGTHOF(mzIDBuf));
fTimeZoneNames->getMetaZoneID(tzID, date, mzID);
if (!mzID.isEmpty()) {
UErrorCode status = U_ZERO_ERROR;
- UBool useStandard = FALSE;
+ UBool useStandard = false;
int32_t raw, sav;
- UChar tmpNameBuf[ZONE_NAME_U16_MAX];
+ char16_t tmpNameBuf[ZONE_NAME_U16_MAX];
- tz.getOffset(date, FALSE, raw, sav, status);
+ tz.getOffset(date, false, raw, sav, status);
if (U_FAILURE(status)) {
return name;
}
if (sav == 0) {
- useStandard = TRUE;
+ useStandard = true;
TimeZone *tmptz = tz.clone();
// Check if the zone actually uses daylight saving time around the time
- BasicTimeZone *btz = NULL;
- if (dynamic_cast<OlsonTimeZone *>(tmptz) != NULL
- || dynamic_cast<SimpleTimeZone *>(tmptz) != NULL
- || dynamic_cast<RuleBasedTimeZone *>(tmptz) != NULL
- || dynamic_cast<VTimeZone *>(tmptz) != NULL) {
+ BasicTimeZone *btz = nullptr;
+ if (dynamic_cast<OlsonTimeZone *>(tmptz) != nullptr
+ || dynamic_cast<SimpleTimeZone *>(tmptz) != nullptr
+ || dynamic_cast<RuleBasedTimeZone *>(tmptz) != nullptr
+ || dynamic_cast<VTimeZone *>(tmptz) != nullptr) {
btz = (BasicTimeZone*)tmptz;
}
- if (btz != NULL) {
+ if (btz != nullptr) {
TimeZoneTransition before;
- UBool beforTrs = btz->getPreviousTransition(date, TRUE, before);
+ UBool beforTrs = btz->getPreviousTransition(date, true, before);
if (beforTrs
&& (date - before.getTime() < kDstCheckRange)
&& before.getFrom()->getDSTSavings() != 0) {
- useStandard = FALSE;
+ useStandard = false;
} else {
TimeZoneTransition after;
- UBool afterTrs = btz->getNextTransition(date, FALSE, after);
+ UBool afterTrs = btz->getNextTransition(date, false, after);
if (afterTrs
&& (after.getTime() - date < kDstCheckRange)
&& after.getTo()->getDSTSavings() != 0) {
- useStandard = FALSE;
+ useStandard = false;
}
}
} else {
// If not BasicTimeZone... only if the instance is not an ICU's implementation.
// We may get a wrong answer in edge case, but it should practically work OK.
- tmptz->getOffset(date - kDstCheckRange, FALSE, raw, sav, status);
+ tmptz->getOffset(date - kDstCheckRange, false, raw, sav, status);
if (sav != 0) {
- useStandard = FALSE;
+ useStandard = false;
} else {
- tmptz->getOffset(date + kDstCheckRange, FALSE, raw, sav, status);
+ tmptz->getOffset(date + kDstCheckRange, false, raw, sav, status);
if (sav != 0){
- useStandard = FALSE;
+ useStandard = false;
}
}
if (U_FAILURE(status)) {
@@ -689,7 +686,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
// for some meta zones in some locales. This looks like a data bugs.
// For now, we check if the standard name is different from its generic
// name below.
- UChar genNameBuf[ZONE_NAME_U16_MAX];
+ char16_t genNameBuf[ZONE_NAME_U16_MAX];
UnicodeString mzGenericName(genNameBuf, 0, UPRV_LENGTHOF(genNameBuf));
fTimeZoneNames->getMetaZoneDisplayName(mzID, nameType, mzGenericName);
if (stdName.caseCompare(mzGenericName, 0) == 0) {
@@ -705,7 +702,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
// Check if we need to use a partial location format.
// This check is done by comparing offset with the meta zone's
// golden zone at the given date.
- UChar idBuf[32];
+ char16_t idBuf[32];
UnicodeString goldenID(idBuf, 0, UPRV_LENGTHOF(idBuf));
fTimeZoneNames->getReferenceZoneID(mzID, fTargetRegion, goldenID);
if (!goldenID.isEmpty() && goldenID != tzID) {
@@ -716,7 +713,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
// With getOffset(date, false, offsets1),
// you may get incorrect results because of time overlap at DST->STD
// transition.
- goldenZone->getOffset(date + raw + sav, TRUE, raw1, sav1, status);
+ goldenZone->getOffset(date + raw + sav, true, raw1, sav1, status);
delete goldenZone;
if (U_SUCCESS(status)) {
if (raw != raw1 || sav != sav1) {
@@ -744,7 +741,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
return name;
}
- const UChar *uplname = NULL;
+ const char16_t *uplname = nullptr;
TZGNCore *nonConstThis = const_cast<TZGNCore *>(this);
umtx_lock(&gLock);
{
@@ -752,10 +749,10 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
}
umtx_unlock(&gLock);
- if (uplname == NULL) {
+ if (uplname == nullptr) {
name.setToBogus();
} else {
- name.setTo(TRUE, uplname, -1);
+ name.setTo(true, uplname, -1);
}
return name;
}
@@ -763,7 +760,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
/*
* This method updates the cache and must be called with a lock
*/
-const UChar*
+const char16_t*
TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
const UnicodeString& mzID, UBool isLong, const UnicodeString& mzDisplayName) {
U_ASSERT(!tzCanonicalID.isEmpty());
@@ -774,10 +771,10 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
key.tzID = ZoneMeta::findTimeZoneID(tzCanonicalID);
key.mzID = ZoneMeta::findMetaZoneID(mzID);
key.isLong = isLong;
- U_ASSERT(key.tzID != NULL && key.mzID != NULL);
+ U_ASSERT(key.tzID != nullptr && key.mzID != nullptr);
- const UChar* uplname = (const UChar*)uhash_get(fPartialLocationNamesMap, (void *)&key);
- if (uplname != NULL) {
+ const char16_t* uplname = (const char16_t*)uhash_get(fPartialLocationNamesMap, (void *)&key);
+ if (uplname != nullptr) {
return uplname;
}
@@ -813,14 +810,14 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
UnicodeString name;
fFallbackFormat.format(location, mzDisplayName, name, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
uplname = fStringPool.get(name, status);
if (U_SUCCESS(status)) {
// Add the name to cache
PartialLocationKey* cacheKey = (PartialLocationKey *)uprv_malloc(sizeof(PartialLocationKey));
- if (cacheKey != NULL) {
+ if (cacheKey != nullptr) {
cacheKey->tzID = key.tzID;
cacheKey->mzID = key.mzID;
cacheKey->isLong = key.isLong;
@@ -830,7 +827,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
} else {
// put the name to the local trie as well
GNameInfo *nameinfo = (ZNameInfo *)uprv_malloc(sizeof(GNameInfo));
- if (nameinfo != NULL) {
+ if (nameinfo != nullptr) {
nameinfo->type = isLong ? UTZGNM_LONG : UTZGNM_SHORT;
nameinfo->tzID = key.tzID;
fGNamesTrie.put(uplname, nameinfo, status);
@@ -862,7 +859,7 @@ TZGNCore::loadStrings(const UnicodeString& tzCanonicalID) {
};
StringEnumeration *mzIDs = fTimeZoneNames->getAvailableMetaZoneIDs(tzCanonicalID, status);
- while ((mzID = mzIDs->snext(status)) != NULL) {
+ while ((mzID = mzIDs->snext(status)) != nullptr) {
if (U_FAILURE(status)) {
break;
}
@@ -881,7 +878,7 @@ TZGNCore::loadStrings(const UnicodeString& tzCanonicalID) {
}
}
}
- if (mzIDs != NULL) {
+ if (mzIDs != nullptr) {
delete mzIDs;
}
}
@@ -905,10 +902,10 @@ TZGNCore::findBestMatch(const UnicodeString& text, int32_t start, uint32_t types
int32_t bestMatchLen = 0;
UTimeZoneFormatTimeType bestMatchTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
UnicodeString bestMatchTzID;
- // UBool isLongStandard = FALSE; // workaround - see the comments below
- UBool isStandard = FALSE; // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
+ // UBool isLongStandard = false; // workaround - see the comments below
+ UBool isStandard = false; // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
- if (tznamesMatches != NULL) {
+ if (tznamesMatches != nullptr) {
UnicodeString mzID;
for (int32_t i = 0; i < tznamesMatches->size(); i++) {
int32_t len = tznamesMatches->getMatchLengthAt(i);
@@ -926,9 +923,9 @@ TZGNCore::findBestMatch(const UnicodeString& text, int32_t start, uint32_t types
}
switch (nameType) {
case UTZNM_LONG_STANDARD:
- // isLongStandard = TRUE;
+ // isLongStandard = true;
case UTZNM_SHORT_STANDARD: // this one is never used for generic, but just in case
- isStandard = TRUE; // TODO: Remove this later, see the comments above.
+ isStandard = true; // TODO: Remove this later, see the comments above.
bestMatchTimeType = UTZFMT_TIME_TYPE_STANDARD;
break;
case UTZNM_LONG_DAYLIGHT:
@@ -982,7 +979,7 @@ TZGNCore::findBestMatch(const UnicodeString& text, int32_t start, uint32_t types
if (U_FAILURE(status)) {
return 0;
}
- if (localMatches != NULL) {
+ if (localMatches != nullptr) {
for (int32_t i = 0; i < localMatches->size(); i++) {
int32_t len = localMatches->getMatchLength(i);
@@ -1020,25 +1017,25 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE
umtx_unlock(&gLock);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- TimeZoneGenericNameMatchInfo *gmatchInfo = NULL;
+ TimeZoneGenericNameMatchInfo *gmatchInfo = nullptr;
int32_t maxLen = 0;
UVector *results = handler.getMatches(maxLen);
- if (results != NULL && ((maxLen == (text.length() - start)) || fGNamesTrieFullyLoaded)) {
+ if (results != nullptr && ((maxLen == (text.length() - start)) || fGNamesTrieFullyLoaded)) {
// perfect match
gmatchInfo = new TimeZoneGenericNameMatchInfo(results);
- if (gmatchInfo == NULL) {
+ if (gmatchInfo == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
delete results;
- return NULL;
+ return nullptr;
}
return gmatchInfo;
}
- if (results != NULL) {
+ if (results != nullptr) {
delete results;
}
@@ -1047,29 +1044,29 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE
umtx_lock(&gLock);
{
if (!fGNamesTrieFullyLoaded) {
- StringEnumeration *tzIDs = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL, NULL, NULL, status);
+ StringEnumeration *tzIDs = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL, nullptr, nullptr, status);
if (U_SUCCESS(status)) {
const UnicodeString *tzID;
- while ((tzID = tzIDs->snext(status)) != NULL) {
+ while ((tzID = tzIDs->snext(status)) != nullptr) {
if (U_FAILURE(status)) {
break;
}
nonConstThis->loadStrings(*tzID);
}
}
- if (tzIDs != NULL) {
+ if (tzIDs != nullptr) {
delete tzIDs;
}
if (U_SUCCESS(status)) {
- nonConstThis->fGNamesTrieFullyLoaded = TRUE;
+ nonConstThis->fGNamesTrieFullyLoaded = true;
}
}
}
umtx_unlock(&gLock);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
umtx_lock(&gLock);
@@ -1080,12 +1077,12 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE
umtx_unlock(&gLock);
results = handler.getMatches(maxLen);
- if (results != NULL && maxLen > 0) {
+ if (results != nullptr && maxLen > 0) {
gmatchInfo = new TimeZoneGenericNameMatchInfo(results);
- if (gmatchInfo == NULL) {
+ if (gmatchInfo == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
delete results;
- return NULL;
+ return nullptr;
}
}
@@ -1108,7 +1105,7 @@ TZGNCore::findTimeZoneNames(const UnicodeString& text, int32_t start, uint32_t t
return fTimeZoneNames->find(text, start, nameTypes, status);
}
- return NULL;
+ return nullptr;
}
typedef struct TZGNCoreRef {
@@ -1119,8 +1116,8 @@ typedef struct TZGNCoreRef {
// TZGNCore object cache handling
static UMutex gTZGNLock;
-static UHashtable *gTZGNCoreCache = NULL;
-static UBool gTZGNCoreCacheInitialized = FALSE;
+static UHashtable *gTZGNCoreCache = nullptr;
+static UBool gTZGNCoreCacheInitialized = false;
// Access count - incremented every time up to SWEEP_INTERVAL,
// then reset to 0
@@ -1139,14 +1136,14 @@ U_CDECL_BEGIN
/**
* Cleanup callback func
*/
-static UBool U_CALLCONV tzgnCore_cleanup(void)
+static UBool U_CALLCONV tzgnCore_cleanup()
{
- if (gTZGNCoreCache != NULL) {
+ if (gTZGNCoreCache != nullptr) {
uhash_close(gTZGNCoreCache);
- gTZGNCoreCache = NULL;
+ gTZGNCoreCache = nullptr;
}
- gTZGNCoreCacheInitialized = FALSE;
- return TRUE;
+ gTZGNCoreCacheInitialized = false;
+ return true;
}
/**
@@ -1170,7 +1167,7 @@ static void sweepCache() {
const UHashElement* elem;
double now = (double)uprv_getUTCtime();
- while ((elem = uhash_nextElement(gTZGNCoreCache, &pos)) != NULL) {
+ while ((elem = uhash_nextElement(gTZGNCoreCache, &pos)) != nullptr) {
TZGNCoreRef *entry = (TZGNCoreRef *)elem->value.pointer;
if (entry->refCount <= 0 && (now - entry->lastAccess) > CACHE_EXPIRATION) {
// delete this entry
@@ -1196,46 +1193,46 @@ TimeZoneGenericNames::~TimeZoneGenericNames() {
TimeZoneGenericNames*
TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
TimeZoneGenericNames* instance = new TimeZoneGenericNames();
- if (instance == NULL) {
+ if (instance == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
- TZGNCoreRef *cacheEntry = NULL;
+ TZGNCoreRef *cacheEntry = nullptr;
{
Mutex lock(&gTZGNLock);
if (!gTZGNCoreCacheInitialized) {
// Create empty hashtable
- gTZGNCoreCache = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
+ gTZGNCoreCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &status);
if (U_SUCCESS(status)) {
uhash_setKeyDeleter(gTZGNCoreCache, uprv_free);
uhash_setValueDeleter(gTZGNCoreCache, deleteTZGNCoreRef);
- gTZGNCoreCacheInitialized = TRUE;
+ gTZGNCoreCacheInitialized = true;
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONEGENERICNAMES, tzgnCore_cleanup);
}
}
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// Check the cache, if not available, create new one and cache
const char *key = locale.getName();
cacheEntry = (TZGNCoreRef *)uhash_get(gTZGNCoreCache, key);
- if (cacheEntry == NULL) {
- TZGNCore *tzgnCore = NULL;
- char *newKey = NULL;
+ if (cacheEntry == nullptr) {
+ TZGNCore *tzgnCore = nullptr;
+ char *newKey = nullptr;
tzgnCore = new TZGNCore(locale, status);
- if (tzgnCore == NULL) {
+ if (tzgnCore == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
if (U_SUCCESS(status)) {
newKey = (char *)uprv_malloc(uprv_strlen(key) + 1);
- if (newKey == NULL) {
+ if (newKey == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
uprv_strcpy(newKey, key);
@@ -1243,7 +1240,7 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) {
}
if (U_SUCCESS(status)) {
cacheEntry = (TZGNCoreRef *)uprv_malloc(sizeof(TZGNCoreRef));
- if (cacheEntry == NULL) {
+ if (cacheEntry == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
cacheEntry->obj = tzgnCore;
@@ -1254,16 +1251,16 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) {
}
}
if (U_FAILURE(status)) {
- if (tzgnCore != NULL) {
+ if (tzgnCore != nullptr) {
delete tzgnCore;
}
- if (newKey != NULL) {
+ if (newKey != nullptr) {
uprv_free(newKey);
}
- if (cacheEntry != NULL) {
+ if (cacheEntry != nullptr) {
uprv_free(cacheEntry);
}
- cacheEntry = NULL;
+ cacheEntry = nullptr;
}
} else {
// Update the reference count
@@ -1278,9 +1275,9 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) {
}
} // End of mutex locked block
- if (cacheEntry == NULL) {
+ if (cacheEntry == nullptr) {
delete instance;
- return NULL;
+ return nullptr;
}
instance->fRef = cacheEntry;
diff --git a/contrib/libs/icu/i18n/tznames.cpp b/contrib/libs/icu/i18n/tznames.cpp
index 5c504d01cb6..900499fd400 100644
--- a/contrib/libs/icu/i18n/tznames.cpp
+++ b/contrib/libs/icu/i18n/tznames.cpp
@@ -30,8 +30,8 @@ U_NAMESPACE_BEGIN
// TimeZoneNames object cache handling
static UMutex gTimeZoneNamesLock;
-static UHashtable *gTimeZoneNamesCache = NULL;
-static UBool gTimeZoneNamesCacheInitialized = FALSE;
+static UHashtable *gTimeZoneNamesCache = nullptr;
+static UBool gTimeZoneNamesCacheInitialized = false;
// Access count - incremented every time up to SWEEP_INTERVAL,
// then reset to 0
@@ -56,14 +56,14 @@ U_CDECL_BEGIN
/**
* Cleanup callback func
*/
-static UBool U_CALLCONV timeZoneNames_cleanup(void)
+static UBool U_CALLCONV timeZoneNames_cleanup()
{
- if (gTimeZoneNamesCache != NULL) {
+ if (gTimeZoneNamesCache != nullptr) {
uhash_close(gTimeZoneNamesCache);
- gTimeZoneNamesCache = NULL;
+ gTimeZoneNamesCache = nullptr;
}
- gTimeZoneNamesCacheInitialized = FALSE;
- return TRUE;
+ gTimeZoneNamesCacheInitialized = false;
+ return true;
}
/**
@@ -135,11 +135,11 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s
Mutex lock(&gTimeZoneNamesLock);
if (!gTimeZoneNamesCacheInitialized) {
// Create empty hashtable if it is not already initialized.
- gTimeZoneNamesCache = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
+ gTimeZoneNamesCache = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &status);
if (U_SUCCESS(status)) {
uhash_setKeyDeleter(gTimeZoneNamesCache, uprv_free);
uhash_setValueDeleter(gTimeZoneNamesCache, deleteTimeZoneNamesCacheEntry);
- gTimeZoneNamesCacheInitialized = TRUE;
+ gTimeZoneNamesCacheInitialized = true;
ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONENAMES, timeZoneNames_cleanup);
}
}
@@ -149,21 +149,21 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s
}
// Check the cache, if not available, create new one and cache
- TimeZoneNamesCacheEntry *cacheEntry = NULL;
+ TimeZoneNamesCacheEntry *cacheEntry = nullptr;
const char *key = locale.getName();
cacheEntry = (TimeZoneNamesCacheEntry *)uhash_get(gTimeZoneNamesCache, key);
- if (cacheEntry == NULL) {
- TimeZoneNames *tznames = NULL;
- char *newKey = NULL;
+ if (cacheEntry == nullptr) {
+ TimeZoneNames *tznames = nullptr;
+ char *newKey = nullptr;
tznames = new TimeZoneNamesImpl(locale, status);
- if (tznames == NULL) {
+ if (tznames == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
if (U_SUCCESS(status)) {
newKey = (char *)uprv_malloc(uprv_strlen(key) + 1);
- if (newKey == NULL) {
+ if (newKey == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
uprv_strcpy(newKey, key);
@@ -171,7 +171,7 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s
}
if (U_SUCCESS(status)) {
cacheEntry = (TimeZoneNamesCacheEntry *)uprv_malloc(sizeof(TimeZoneNamesCacheEntry));
- if (cacheEntry == NULL) {
+ if (cacheEntry == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else {
cacheEntry->names = tznames;
@@ -182,16 +182,16 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s
}
}
if (U_FAILURE(status)) {
- if (tznames != NULL) {
+ if (tznames != nullptr) {
delete tznames;
}
- if (newKey != NULL) {
+ if (newKey != nullptr) {
uprv_free(newKey);
}
- if (cacheEntry != NULL) {
+ if (cacheEntry != nullptr) {
uprv_free(cacheEntry);
}
- cacheEntry = NULL;
+ cacheEntry = nullptr;
}
} else {
// Update the reference count
@@ -236,7 +236,7 @@ TimeZoneNamesDelegate::operator==(const TimeZoneNames& other) const {
TimeZoneNamesDelegate*
TimeZoneNamesDelegate::clone() const {
TimeZoneNamesDelegate* other = new TimeZoneNamesDelegate();
- if (other != NULL) {
+ if (other != nullptr) {
umtx_lock(&gTimeZoneNamesLock);
{
// Just increment the reference count
@@ -306,10 +306,10 @@ TimeZoneNames::~TimeZoneNames() {
TimeZoneNames*
TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) {
- TimeZoneNames *instance = NULL;
+ TimeZoneNames *instance = nullptr;
if (U_SUCCESS(status)) {
instance = new TimeZoneNamesDelegate(locale, status);
- if (instance == NULL && U_SUCCESS(status)) {
+ if (instance == nullptr && U_SUCCESS(status)) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -318,10 +318,10 @@ TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) {
TimeZoneNames*
TimeZoneNames::createTZDBInstance(const Locale& locale, UErrorCode& status) {
- TimeZoneNames *instance = NULL;
+ TimeZoneNames *instance = nullptr;
if (U_SUCCESS(status)) {
instance = new TZDBTimeZoneNames(locale);
- if (instance == NULL && U_SUCCESS(status)) {
+ if (instance == nullptr && U_SUCCESS(status)) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -337,7 +337,7 @@ UnicodeString&
TimeZoneNames::getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const {
getTimeZoneDisplayName(tzID, type, name);
if (name.isEmpty()) {
- UChar mzIDBuf[32];
+ char16_t mzIDBuf[32];
UnicodeString mzID(mzIDBuf, 0, UPRV_LENGTHOF(mzIDBuf));
getMetaZoneID(tzID, date, mzID);
getMetaZoneDisplayName(mzID, type, name);
@@ -378,12 +378,12 @@ struct MatchInfo : UMemory {
MatchInfo(UTimeZoneNameType nameType, int32_t matchLength, const UnicodeString* tzID, const UnicodeString* mzID) {
this->nameType = nameType;
this->matchLength = matchLength;
- if (tzID != NULL) {
+ if (tzID != nullptr) {
this->id.setTo(*tzID);
- this->isTZID = TRUE;
+ this->isTZID = true;
} else {
this->id.setTo(*mzID);
- this->isTZID = FALSE;
+ this->isTZID = false;
}
}
};
@@ -399,11 +399,11 @@ U_CDECL_END
// MatchInfoCollection class
// ---------------------------------------------------
TimeZoneNames::MatchInfoCollection::MatchInfoCollection()
-: fMatches(NULL) {
+: fMatches(nullptr) {
}
TimeZoneNames::MatchInfoCollection::~MatchInfoCollection() {
- if (fMatches != NULL) {
+ if (fMatches != nullptr) {
delete fMatches;
}
}
@@ -414,15 +414,12 @@ TimeZoneNames::MatchInfoCollection::addZone(UTimeZoneNameType nameType, int32_t
if (U_FAILURE(status)) {
return;
}
- MatchInfo* matchInfo = new MatchInfo(nameType, matchLength, &tzID, NULL);
- if (matchInfo == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return;
- }
- matches(status)->addElementX(matchInfo, status);
+ LocalPointer <MatchInfo> matchInfo(new MatchInfo(nameType, matchLength, &tzID, nullptr), status);
+ UVector *matchesVec = matches(status);
if (U_FAILURE(status)) {
- delete matchInfo;
+ return;
}
+ matchesVec->adoptElement(matchInfo.orphan(), status);
}
void
@@ -431,20 +428,17 @@ TimeZoneNames::MatchInfoCollection::addMetaZone(UTimeZoneNameType nameType, int3
if (U_FAILURE(status)) {
return;
}
- MatchInfo* matchInfo = new MatchInfo(nameType, matchLength, NULL, &mzID);
- if (matchInfo == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return;
- }
- matches(status)->addElementX(matchInfo, status);
+ LocalPointer<MatchInfo> matchInfo(new MatchInfo(nameType, matchLength, nullptr, &mzID), status);
+ UVector *matchesVec = matches(status);
if (U_FAILURE(status)) {
- delete matchInfo;
+ return;
}
+ matchesVec->adoptElement(matchInfo.orphan(), status);
}
int32_t
TimeZoneNames::MatchInfoCollection::size() const {
- if (fMatches == NULL) {
+ if (fMatches == nullptr) {
return 0;
}
return fMatches->size();
@@ -474,9 +468,9 @@ TimeZoneNames::MatchInfoCollection::getTimeZoneIDAt(int32_t idx, UnicodeString&
const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx);
if (match && match->isTZID) {
tzID.setTo(match->id);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UBool
@@ -485,25 +479,25 @@ TimeZoneNames::MatchInfoCollection::getMetaZoneIDAt(int32_t idx, UnicodeString&
const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx);
if (match && !match->isTZID) {
mzID.setTo(match->id);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
UVector*
TimeZoneNames::MatchInfoCollection::matches(UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- if (fMatches != NULL) {
+ if (fMatches != nullptr) {
return fMatches;
}
- fMatches = new UVector(deleteMatchInfo, NULL, status);
- if (fMatches == NULL) {
+ fMatches = new UVector(deleteMatchInfo, nullptr, status);
+ if (fMatches == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
} else if (U_FAILURE(status)) {
delete fMatches;
- fMatches = NULL;
+ fMatches = nullptr;
}
return fMatches;
}
diff --git a/contrib/libs/icu/i18n/tznames_impl.cpp b/contrib/libs/icu/i18n/tznames_impl.cpp
index d450b745648..8e52fd90a68 100644
--- a/contrib/libs/icu/i18n/tznames_impl.cpp
+++ b/contrib/libs/icu/i18n/tznames_impl.cpp
@@ -46,7 +46,7 @@ static const char gMZPrefix[] = "meta:";
static const char EMPTY[] = "<empty>"; // place holder for empty ZNames
static const char DUMMY_LOADER[] = "<dummy>"; // place holder for dummy ZNamesLoader
-static const UChar NO_NAME[] = { 0 }; // for empty no-fallback time zone names
+static const char16_t NO_NAME[] = { 0 }; // for empty no-fallback time zone names
// stuff for TZDBTimeZoneNames
static const char* TZDBNAMES_KEYS[] = {"ss", "sd"};
@@ -54,11 +54,11 @@ static const int32_t TZDBNAMES_KEYS_SIZE = UPRV_LENGTHOF(TZDBNAMES_KEYS);
static UMutex gDataMutex;
-static UHashtable* gTZDBNamesMap = NULL;
-static icu::UInitOnce gTZDBNamesMapInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable* gTZDBNamesMap = nullptr;
+static icu::UInitOnce gTZDBNamesMapInitOnce {};
-static TextTrieMap* gTZDBNamesTrie = NULL;
-static icu::UInitOnce gTZDBNamesTrieInitOnce = U_INITONCE_INITIALIZER;
+static TextTrieMap* gTZDBNamesTrie = nullptr;
+static icu::UInitOnce gTZDBNamesTrieInitOnce {};
// The order in which strings are stored may be different than the order in the public enum.
enum UTimeZoneNameTypeIndex {
@@ -72,23 +72,23 @@ enum UTimeZoneNameTypeIndex {
UTZNM_INDEX_SHORT_DAYLIGHT,
UTZNM_INDEX_COUNT
};
-static const UChar* const EMPTY_NAMES[UTZNM_INDEX_COUNT] = {0,0,0,0,0,0,0};
+static const char16_t* const EMPTY_NAMES[UTZNM_INDEX_COUNT] = {0,0,0,0,0,0,0};
U_CDECL_BEGIN
-static UBool U_CALLCONV tzdbTimeZoneNames_cleanup(void) {
- if (gTZDBNamesMap != NULL) {
+static UBool U_CALLCONV tzdbTimeZoneNames_cleanup() {
+ if (gTZDBNamesMap != nullptr) {
uhash_close(gTZDBNamesMap);
- gTZDBNamesMap = NULL;
+ gTZDBNamesMap = nullptr;
}
gTZDBNamesMapInitOnce.reset();
- if (gTZDBNamesTrie != NULL) {
+ if (gTZDBNamesTrie != nullptr) {
delete gTZDBNamesTrie;
- gTZDBNamesTrie = NULL;
+ gTZDBNamesTrie = nullptr;
}
gTZDBNamesTrieInitOnce.reset();
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -97,8 +97,8 @@ U_CDECL_END
*/
struct ZNameInfo {
UTimeZoneNameType type;
- const UChar* tzID;
- const UChar* mzID;
+ const char16_t* tzID;
+ const char16_t* mzID;
};
/**
@@ -122,7 +122,7 @@ void CharacterNode::clear() {
}
void CharacterNode::deleteValues(UObjectDeleter *valueDeleter) {
- if (fValues == NULL) {
+ if (fValues == nullptr) {
// Do nothing.
} else if (!fHasValuesVector) {
if (valueDeleter) {
@@ -141,26 +141,36 @@ CharacterNode::addValue(void *value, UObjectDeleter *valueDeleter, UErrorCode &s
}
return;
}
- if (fValues == NULL) {
+ if (fValues == nullptr) {
fValues = value;
} else {
// At least one value already.
if (!fHasValuesVector) {
// There is only one value so far, and not in a vector yet.
// Create a vector and add the old value.
- UVector *values = new UVector(valueDeleter, NULL, DEFAULT_CHARACTERNODE_CAPACITY, status);
+ LocalPointer<UVector> values(
+ new UVector(valueDeleter, nullptr, DEFAULT_CHARACTERNODE_CAPACITY, status), status);
if (U_FAILURE(status)) {
if (valueDeleter) {
valueDeleter(value);
}
return;
}
- values->addElementX(fValues, status);
- fValues = values;
- fHasValuesVector = TRUE;
+ if (values->hasDeleter()) {
+ values->adoptElement(fValues, status);
+ } else {
+ values->addElement(fValues, status);
+ }
+ fValues = values.orphan();
+ fHasValuesVector = true;
}
// Add the new value.
- ((UVector *)fValues)->addElementX(value, status);
+ UVector *values = (UVector *)fValues;
+ if (values->hasDeleter()) {
+ values->adoptElement(value, status);
+ } else {
+ values->addElement(value, status);
+ }
}
}
@@ -174,8 +184,8 @@ TextTrieMapSearchResultHandler::~TextTrieMapSearchResultHandler(){
// TextTrieMap class implementation
// ---------------------------------------------------
TextTrieMap::TextTrieMap(UBool ignoreCase, UObjectDeleter *valueDeleter)
-: fIgnoreCase(ignoreCase), fNodes(NULL), fNodesCapacity(0), fNodesCount(0),
- fLazyContents(NULL), fIsEmpty(TRUE), fValueDeleter(valueDeleter) {
+: fIgnoreCase(ignoreCase), fNodes(nullptr), fNodesCapacity(0), fNodesCount(0),
+ fLazyContents(nullptr), fIsEmpty(true), fValueDeleter(valueDeleter) {
}
TextTrieMap::~TextTrieMap() {
@@ -184,7 +194,7 @@ TextTrieMap::~TextTrieMap() {
fNodes[index].deleteValues(fValueDeleter);
}
uprv_free(fNodes);
- if (fLazyContents != NULL) {
+ if (fLazyContents != nullptr) {
for (int32_t i=0; i<fLazyContents->size(); i+=2) {
if (fValueDeleter) {
fValueDeleter(fLazyContents->elementAt(i+1));
@@ -209,20 +219,18 @@ int32_t TextTrieMap::isEmpty() const {
//
void
TextTrieMap::put(const UnicodeString &key, void *value, ZNStringPool &sp, UErrorCode &status) {
- const UChar *s = sp.get(key, status);
+ const char16_t *s = sp.get(key, status);
put(s, value, status);
}
// This method is designed for a persistent key, such as string key stored in
// resource bundle.
void
-TextTrieMap::put(const UChar *key, void *value, UErrorCode &status) {
- fIsEmpty = FALSE;
- if (fLazyContents == NULL) {
- fLazyContents = new UVector(status);
- if (fLazyContents == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
+TextTrieMap::put(const char16_t *key, void *value, UErrorCode &status) {
+ fIsEmpty = false;
+ if (fLazyContents == nullptr) {
+ LocalPointer<UVector> lpLazyContents(new UVector(status), status);
+ fLazyContents = lpLazyContents.orphan();
}
if (U_FAILURE(status)) {
if (fValueDeleter) {
@@ -230,10 +238,10 @@ TextTrieMap::put(const UChar *key, void *value, UErrorCode &status) {
}
return;
}
- U_ASSERT(fLazyContents != NULL);
+ U_ASSERT(fLazyContents != nullptr);
- UChar *s = const_cast<UChar *>(key);
- fLazyContents->addElementX(s, status);
+ char16_t *s = const_cast<char16_t *>(key);
+ fLazyContents->addElement(s, status);
if (U_FAILURE(status)) {
if (fValueDeleter) {
fValueDeleter((void*) key);
@@ -241,15 +249,15 @@ TextTrieMap::put(const UChar *key, void *value, UErrorCode &status) {
return;
}
- fLazyContents->addElementX(value, status);
+ fLazyContents->addElement(value, status);
}
void
TextTrieMap::putImpl(const UnicodeString &key, void *value, UErrorCode &status) {
- if (fNodes == NULL) {
+ if (fNodes == nullptr) {
fNodesCapacity = 512;
fNodes = (CharacterNode *)uprv_malloc(fNodesCapacity * sizeof(CharacterNode));
- if (fNodes == NULL) {
+ if (fNodes == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -258,7 +266,7 @@ TextTrieMap::putImpl(const UnicodeString &key, void *value, UErrorCode &status)
}
UnicodeString foldedKey;
- const UChar *keyBuffer;
+ const char16_t *keyBuffer;
int32_t keyLength;
if (fIgnoreCase) {
// Ok to use fastCopyFrom() because we discard the copy when we return.
@@ -281,34 +289,34 @@ TextTrieMap::putImpl(const UnicodeString &key, void *value, UErrorCode &status)
UBool
TextTrieMap::growNodes() {
if (fNodesCapacity == 0xffff) {
- return FALSE; // We use 16-bit node indexes.
+ return false; // We use 16-bit node indexes.
}
int32_t newCapacity = fNodesCapacity + 1000;
if (newCapacity > 0xffff) {
newCapacity = 0xffff;
}
CharacterNode *newNodes = (CharacterNode *)uprv_malloc(newCapacity * sizeof(CharacterNode));
- if (newNodes == NULL) {
- return FALSE;
+ if (newNodes == nullptr) {
+ return false;
}
uprv_memcpy(newNodes, fNodes, fNodesCount * sizeof(CharacterNode));
uprv_free(fNodes);
fNodes = newNodes;
fNodesCapacity = newCapacity;
- return TRUE;
+ return true;
}
CharacterNode*
-TextTrieMap::addChildNode(CharacterNode *parent, UChar c, UErrorCode &status) {
+TextTrieMap::addChildNode(CharacterNode *parent, char16_t c, UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// Linear search of the sorted list of children.
uint16_t prevIndex = 0;
uint16_t nodeIndex = parent->fFirstChild;
while (nodeIndex > 0) {
CharacterNode *current = fNodes + nodeIndex;
- UChar childCharacter = current->fCharacter;
+ char16_t childCharacter = current->fCharacter;
if (childCharacter == c) {
return current;
} else if (childCharacter > c) {
@@ -323,7 +331,7 @@ TextTrieMap::addChildNode(CharacterNode *parent, UChar c, UErrorCode &status) {
int32_t parentIndex = (int32_t)(parent - fNodes);
if (!growNodes()) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
parent = fNodes + parentIndex;
}
@@ -343,12 +351,12 @@ TextTrieMap::addChildNode(CharacterNode *parent, UChar c, UErrorCode &status) {
}
CharacterNode*
-TextTrieMap::getChildNode(CharacterNode *parent, UChar c) const {
+TextTrieMap::getChildNode(CharacterNode *parent, char16_t c) const {
// Linear search of the sorted list of children.
uint16_t nodeIndex = parent->fFirstChild;
while (nodeIndex > 0) {
CharacterNode *current = fNodes + nodeIndex;
- UChar childCharacter = current->fCharacter;
+ char16_t childCharacter = current->fCharacter;
if (childCharacter == c) {
return current;
} else if (childCharacter > c) {
@@ -356,7 +364,7 @@ TextTrieMap::getChildNode(CharacterNode *parent, UChar c) const {
}
nodeIndex = current->fNextSibling;
}
- return NULL;
+ return nullptr;
}
@@ -365,15 +373,15 @@ TextTrieMap::getChildNode(CharacterNode *parent, UChar c) const {
// needed for parsing operations, which are less common than formatting,
// and the Trie is big, which is why its creation is deferred until first use.
void TextTrieMap::buildTrie(UErrorCode &status) {
- if (fLazyContents != NULL) {
+ if (fLazyContents != nullptr) {
for (int32_t i=0; i<fLazyContents->size(); i+=2) {
- const UChar *key = (UChar *)fLazyContents->elementAt(i);
+ const char16_t *key = (char16_t *)fLazyContents->elementAt(i);
void *val = fLazyContents->elementAt(i+1);
- UnicodeString keyString(TRUE, key, -1); // Aliasing UnicodeString constructor.
+ UnicodeString keyString(true, key, -1); // Aliasing UnicodeString constructor.
putImpl(keyString, val, status);
}
delete fLazyContents;
- fLazyContents = NULL;
+ fLazyContents = nullptr;
}
}
@@ -391,12 +399,12 @@ TextTrieMap::search(const UnicodeString &text, int32_t start,
static UMutex TextTrieMutex;
Mutex lock(&TextTrieMutex);
- if (fLazyContents != NULL) {
+ if (fLazyContents != nullptr) {
TextTrieMap *nonConstThis = const_cast<TextTrieMap *>(this);
nonConstThis->buildTrie(status);
}
}
- if (fNodes == NULL) {
+ if (fNodes == nullptr) {
return;
}
search(fNodes, text, start, start, handler, status);
@@ -426,18 +434,18 @@ TextTrieMap::search(CharacterNode *node, const UnicodeString &text, int32_t star
tmp.foldCase();
int32_t tmpidx = 0;
while (tmpidx < tmp.length()) {
- UChar c = tmp.charAt(tmpidx++);
+ char16_t c = tmp.charAt(tmpidx++);
node = getChildNode(node, c);
- if (node == NULL) {
+ if (node == nullptr) {
break;
}
}
} else {
// here we just get the next UTF16 code unit
- UChar c = text.charAt(index++);
+ char16_t c = text.charAt(index++);
node = getChildNode(node, c);
}
- if (node != NULL) {
+ if (node != nullptr) {
search(node, text, start, index, handler, status);
}
}
@@ -449,23 +457,23 @@ static const int32_t POOL_CHUNK_SIZE = 2000;
struct ZNStringPoolChunk: public UMemory {
ZNStringPoolChunk *fNext; // Ptr to next pool chunk
int32_t fLimit; // Index to start of unused area at end of fStrings
- UChar fStrings[POOL_CHUNK_SIZE]; // Strings array
+ char16_t fStrings[POOL_CHUNK_SIZE]; // Strings array
ZNStringPoolChunk();
};
ZNStringPoolChunk::ZNStringPoolChunk() {
- fNext = NULL;
+ fNext = nullptr;
fLimit = 0;
}
ZNStringPool::ZNStringPool(UErrorCode &status) {
- fChunks = NULL;
- fHash = NULL;
+ fChunks = nullptr;
+ fHash = nullptr;
if (U_FAILURE(status)) {
return;
}
fChunks = new ZNStringPoolChunk;
- if (fChunks == NULL) {
+ if (fChunks == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -480,28 +488,28 @@ ZNStringPool::ZNStringPool(UErrorCode &status) {
}
ZNStringPool::~ZNStringPool() {
- if (fHash != NULL) {
+ if (fHash != nullptr) {
uhash_close(fHash);
- fHash = NULL;
+ fHash = nullptr;
}
- while (fChunks != NULL) {
+ while (fChunks != nullptr) {
ZNStringPoolChunk *nextChunk = fChunks->fNext;
delete fChunks;
fChunks = nextChunk;
}
}
-static const UChar EmptyString = 0;
+static const char16_t EmptyString = 0;
-const UChar *ZNStringPool::get(const UChar *s, UErrorCode &status) {
- const UChar *pooledString;
+const char16_t *ZNStringPool::get(const char16_t *s, UErrorCode &status) {
+ const char16_t *pooledString;
if (U_FAILURE(status)) {
return &EmptyString;
}
- pooledString = static_cast<UChar *>(uhash_get(fHash, s));
- if (pooledString != NULL) {
+ pooledString = static_cast<char16_t *>(uhash_get(fHash, s));
+ if (pooledString != nullptr) {
return pooledString;
}
@@ -515,14 +523,14 @@ const UChar *ZNStringPool::get(const UChar *s, UErrorCode &status) {
}
ZNStringPoolChunk *oldChunk = fChunks;
fChunks = new ZNStringPoolChunk;
- if (fChunks == NULL) {
+ if (fChunks == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return &EmptyString;
}
fChunks->fNext = oldChunk;
}
- UChar *destString = &fChunks->fStrings[fChunks->fLimit];
+ char16_t *destString = &fChunks->fStrings[fChunks->fLimit];
u_strcpy(destString, s);
fChunks->fLimit += (length + 1);
uhash_put(fHash, destString, destString, &status);
@@ -535,15 +543,15 @@ const UChar *ZNStringPool::get(const UChar *s, UErrorCode &status) {
// into the pool's storage. Used for strings from resource bundles,
// which will persist for the life of the zone string formatter, and
// therefore can be used directly without copying.
-const UChar *ZNStringPool::adopt(const UChar * s, UErrorCode &status) {
- const UChar *pooledString;
+const char16_t *ZNStringPool::adopt(const char16_t * s, UErrorCode &status) {
+ const char16_t *pooledString;
if (U_FAILURE(status)) {
return &EmptyString;
}
- if (s != NULL) {
- pooledString = static_cast<UChar *>(uhash_get(fHash, s));
- if (pooledString == NULL) {
- UChar *ncs = const_cast<UChar *>(s);
+ if (s != nullptr) {
+ pooledString = static_cast<char16_t *>(uhash_get(fHash, s));
+ if (pooledString == nullptr) {
+ char16_t *ncs = const_cast<char16_t *>(s);
uhash_put(fHash, ncs, ncs, &status);
}
}
@@ -551,7 +559,7 @@ const UChar *ZNStringPool::adopt(const UChar * s, UErrorCode &status) {
}
-const UChar *ZNStringPool::get(const UnicodeString &s, UErrorCode &status) {
+const char16_t *ZNStringPool::get(const UnicodeString &s, UErrorCode &status) {
UnicodeString &nonConstStr = const_cast<UnicodeString &>(s);
return this->get(nonConstStr.getTerminatedBuffer(), status);
}
@@ -565,7 +573,7 @@ const UChar *ZNStringPool::get(const UnicodeString &s, UErrorCode &status) {
*/
void ZNStringPool::freeze() {
uhash_close(fHash);
- fHash = NULL;
+ fHash = nullptr;
}
@@ -601,38 +609,38 @@ private:
}
}
- const UChar* fNames[UTZNM_INDEX_COUNT];
+ const char16_t* fNames[UTZNM_INDEX_COUNT];
UBool fDidAddIntoTrie;
// Whether we own the location string, if computed rather than loaded from a bundle.
// A meta zone names instance never has an exemplar location string.
UBool fOwnsLocationName;
- ZNames(const UChar* names[], const UChar* locationName)
- : fDidAddIntoTrie(FALSE) {
+ ZNames(const char16_t* names[], const char16_t* locationName)
+ : fDidAddIntoTrie(false) {
uprv_memcpy(fNames, names, sizeof(fNames));
- if (locationName != NULL) {
- fOwnsLocationName = TRUE;
+ if (locationName != nullptr) {
+ fOwnsLocationName = true;
fNames[UTZNM_INDEX_EXEMPLAR_LOCATION] = locationName;
} else {
- fOwnsLocationName = FALSE;
+ fOwnsLocationName = false;
}
}
public:
~ZNames() {
if (fOwnsLocationName) {
- const UChar* locationName = fNames[UTZNM_INDEX_EXEMPLAR_LOCATION];
- U_ASSERT(locationName != NULL);
+ const char16_t* locationName = fNames[UTZNM_INDEX_EXEMPLAR_LOCATION];
+ U_ASSERT(locationName != nullptr);
uprv_free((void*) locationName);
}
}
private:
- static void* createMetaZoneAndPutInCache(UHashtable* cache, const UChar* names[],
+ static void* createMetaZoneAndPutInCache(UHashtable* cache, const char16_t* names[],
const UnicodeString& mzID, UErrorCode& status) {
- if (U_FAILURE(status)) { return NULL; }
- U_ASSERT(names != NULL);
+ if (U_FAILURE(status)) { return nullptr; }
+ U_ASSERT(names != nullptr);
// Use the persistent ID as the resource key, so we can
// avoid duplications.
@@ -642,35 +650,35 @@ private:
if (uprv_memcmp(names, EMPTY_NAMES, sizeof(EMPTY_NAMES)) == 0) {
value = (void*) EMPTY;
} else {
- value = (void*) (new ZNames(names, NULL));
- if (value == NULL) {
+ value = (void*) (new ZNames(names, nullptr));
+ if (value == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
}
uhash_put(cache, key, value, &status);
return value;
}
- static void* createTimeZoneAndPutInCache(UHashtable* cache, const UChar* names[],
+ static void* createTimeZoneAndPutInCache(UHashtable* cache, const char16_t* names[],
const UnicodeString& tzID, UErrorCode& status) {
- if (U_FAILURE(status)) { return NULL; }
- U_ASSERT(names != NULL);
+ if (U_FAILURE(status)) { return nullptr; }
+ U_ASSERT(names != nullptr);
// If necessary, compute the location name from the time zone name.
- UChar* locationName = NULL;
- if (names[UTZNM_INDEX_EXEMPLAR_LOCATION] == NULL) {
+ char16_t* locationName = nullptr;
+ if (names[UTZNM_INDEX_EXEMPLAR_LOCATION] == nullptr) {
UnicodeString locationNameUniStr;
TimeZoneNamesImpl::getDefaultExemplarLocationName(tzID, locationNameUniStr);
// Copy the computed location name to the heap
if (locationNameUniStr.length() > 0) {
- const UChar* buff = locationNameUniStr.getTerminatedBuffer();
- int32_t len = sizeof(UChar) * (locationNameUniStr.length() + 1);
- locationName = (UChar*) uprv_malloc(len);
- if (locationName == NULL) {
+ const char16_t* buff = locationNameUniStr.getTerminatedBuffer();
+ int32_t len = sizeof(char16_t) * (locationNameUniStr.length() + 1);
+ locationName = (char16_t*) uprv_malloc(len);
+ if (locationName == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(locationName, buff, len);
}
@@ -681,37 +689,37 @@ private:
// TODO: Is there a more efficient way, like intern() in Java?
void* key = (void*) ZoneMeta::findTimeZoneID(tzID);
void* value = (void*) (new ZNames(names, locationName));
- if (value == NULL) {
+ if (value == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uhash_put(cache, key, value, &status);
return value;
}
- const UChar* getName(UTimeZoneNameType type) const {
+ const char16_t* getName(UTimeZoneNameType type) const {
UTimeZoneNameTypeIndex index = getTZNameTypeIndex(type);
- return index >= 0 ? fNames[index] : NULL;
+ return index >= 0 ? fNames[index] : nullptr;
}
- void addAsMetaZoneIntoTrie(const UChar* mzID, TextTrieMap& trie, UErrorCode& status) {
- addNamesIntoTrie(mzID, NULL, trie, status);
+ void addAsMetaZoneIntoTrie(const char16_t* mzID, TextTrieMap& trie, UErrorCode& status) {
+ addNamesIntoTrie(mzID, nullptr, trie, status);
}
- void addAsTimeZoneIntoTrie(const UChar* tzID, TextTrieMap& trie, UErrorCode& status) {
- addNamesIntoTrie(NULL, tzID, trie, status);
+ void addAsTimeZoneIntoTrie(const char16_t* tzID, TextTrieMap& trie, UErrorCode& status) {
+ addNamesIntoTrie(nullptr, tzID, trie, status);
}
- void addNamesIntoTrie(const UChar* mzID, const UChar* tzID, TextTrieMap& trie,
+ void addNamesIntoTrie(const char16_t* mzID, const char16_t* tzID, TextTrieMap& trie,
UErrorCode& status) {
if (U_FAILURE(status)) { return; }
if (fDidAddIntoTrie) { return; }
- fDidAddIntoTrie = TRUE;
+ fDidAddIntoTrie = true;
for (int32_t i = 0; i < UTZNM_INDEX_COUNT; i++) {
- const UChar* name = fNames[i];
- if (name != NULL) {
+ const char16_t* name = fNames[i];
+ if (name != nullptr) {
ZNameInfo *nameinfo = (ZNameInfo *)uprv_malloc(sizeof(ZNameInfo));
- if (nameinfo == NULL) {
+ if (nameinfo == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -731,7 +739,7 @@ public:
};
struct ZNames::ZNamesLoader : public ResourceSink {
- const UChar *names[UTZNM_INDEX_COUNT];
+ const char16_t *names[UTZNM_INDEX_COUNT];
ZNamesLoader() {
clear();
@@ -756,8 +764,8 @@ struct ZNames::ZNamesLoader : public ResourceSink {
// Replace "/" with ":".
UnicodeString uKey(tzID);
for (int32_t i = 0; i < uKey.length(); i++) {
- if (uKey.charAt(i) == (UChar)0x2F) {
- uKey.setCharAt(i, (UChar)0x3A);
+ if (uKey.charAt(i) == (char16_t)0x2F) {
+ uKey.setCharAt(i, (char16_t)0x3A);
}
}
@@ -768,8 +776,8 @@ struct ZNames::ZNamesLoader : public ResourceSink {
}
void loadNames(const UResourceBundle* zoneStrings, const char* key, UErrorCode& errorCode) {
- U_ASSERT(zoneStrings != NULL);
- U_ASSERT(key != NULL);
+ U_ASSERT(zoneStrings != nullptr);
+ U_ASSERT(key != nullptr);
U_ASSERT(key[0] != '\0');
UErrorCode localStatus = U_ZERO_ERROR;
@@ -785,11 +793,11 @@ struct ZNames::ZNamesLoader : public ResourceSink {
void setNameIfEmpty(const char* key, const ResourceValue* value, UErrorCode& errorCode) {
UTimeZoneNameTypeIndex type = nameTypeFromKey(key);
if (type == UTZNM_INDEX_UNKNOWN) { return; }
- if (names[type] == NULL) {
+ if (names[type] == nullptr) {
int32_t length;
// 'NO_NAME' indicates internally that this field should remain empty. It will be
- // replaced by 'NULL' in getNames()
- names[type] = (value == NULL) ? NO_NAME : value->getString(length, errorCode);
+ // replaced by 'nullptr' in getNames()
+ names[type] = (value == nullptr) ? NO_NAME : value->getString(length, errorCode);
}
}
@@ -799,7 +807,7 @@ struct ZNames::ZNamesLoader : public ResourceSink {
if (U_FAILURE(errorCode)) { return; }
for (int32_t i = 0; namesTable.getKeyAndValue(i, key, value); ++i) {
if (value.isNoInheritanceMarker()) {
- setNameIfEmpty(key, NULL, errorCode);
+ setNameIfEmpty(key, nullptr, errorCode);
} else {
setNameIfEmpty(key, &value, errorCode);
}
@@ -833,11 +841,11 @@ struct ZNames::ZNamesLoader : public ResourceSink {
* This is different than Java, where the array will no longer be modified and null
* may be returned.
*/
- const UChar** getNames() {
- // Remove 'NO_NAME' references in the array and replace with 'NULL'
+ const char16_t** getNames() {
+ // Remove 'NO_NAME' references in the array and replace with 'nullptr'
for (int32_t i = 0; i < UTZNM_INDEX_COUNT; ++i) {
if (names[i] == NO_NAME) {
- names[i] = NULL;
+ names[i] = nullptr;
}
}
return names;
@@ -854,10 +862,10 @@ class MetaZoneIDsEnumeration : public StringEnumeration {
public:
MetaZoneIDsEnumeration();
MetaZoneIDsEnumeration(const UVector& mzIDs);
- MetaZoneIDsEnumeration(UVector* mzIDs);
+ MetaZoneIDsEnumeration(LocalPointer<UVector> mzIDs);
virtual ~MetaZoneIDsEnumeration();
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
virtual const UnicodeString* snext(UErrorCode& status) override;
virtual void reset(UErrorCode& status) override;
virtual int32_t count(UErrorCode& status) const override;
@@ -865,22 +873,23 @@ private:
int32_t fLen;
int32_t fPos;
const UVector* fMetaZoneIDs;
- UVector *fLocalVector;
+ LocalPointer<UVector> fLocalVector;
};
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(MetaZoneIDsEnumeration)
MetaZoneIDsEnumeration::MetaZoneIDsEnumeration()
-: fLen(0), fPos(0), fMetaZoneIDs(NULL), fLocalVector(NULL) {
+: fLen(0), fPos(0), fMetaZoneIDs(nullptr), fLocalVector(nullptr) {
}
MetaZoneIDsEnumeration::MetaZoneIDsEnumeration(const UVector& mzIDs)
-: fPos(0), fMetaZoneIDs(&mzIDs), fLocalVector(NULL) {
+: fPos(0), fMetaZoneIDs(&mzIDs), fLocalVector(nullptr) {
fLen = fMetaZoneIDs->size();
}
-MetaZoneIDsEnumeration::MetaZoneIDsEnumeration(UVector *mzIDs)
-: fLen(0), fPos(0), fMetaZoneIDs(mzIDs), fLocalVector(mzIDs) {
+MetaZoneIDsEnumeration::MetaZoneIDsEnumeration(LocalPointer<UVector> mzIDs)
+: fLen(0), fPos(0), fMetaZoneIDs(nullptr), fLocalVector(std::move(mzIDs)) {
+ fMetaZoneIDs = fLocalVector.getAlias();
if (fMetaZoneIDs) {
fLen = fMetaZoneIDs->size();
}
@@ -888,11 +897,11 @@ MetaZoneIDsEnumeration::MetaZoneIDsEnumeration(UVector *mzIDs)
const UnicodeString*
MetaZoneIDsEnumeration::snext(UErrorCode& status) {
- if (U_SUCCESS(status) && fMetaZoneIDs != NULL && fPos < fLen) {
- unistr.setTo((const UChar*)fMetaZoneIDs->elementAt(fPos++), -1);
+ if (U_SUCCESS(status) && fMetaZoneIDs != nullptr && fPos < fLen) {
+ unistr.setTo((const char16_t*)fMetaZoneIDs->elementAt(fPos++), -1);
return &unistr;
}
- return NULL;
+ return nullptr;
}
void
@@ -906,9 +915,6 @@ MetaZoneIDsEnumeration::count(UErrorCode& /*status*/) const {
}
MetaZoneIDsEnumeration::~MetaZoneIDsEnumeration() {
- if (fLocalVector) {
- delete fLocalVector;
- }
}
@@ -930,11 +936,11 @@ private:
};
ZNameSearchHandler::ZNameSearchHandler(uint32_t types)
-: fTypes(types), fMaxMatchLen(0), fResults(NULL) {
+: fTypes(types), fMaxMatchLen(0), fResults(nullptr) {
}
ZNameSearchHandler::~ZNameSearchHandler() {
- if (fResults != NULL) {
+ if (fResults != nullptr) {
delete fResults;
}
}
@@ -942,25 +948,25 @@ ZNameSearchHandler::~ZNameSearchHandler() {
UBool
ZNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
if (node->hasValues()) {
int32_t valuesCount = node->countValues();
for (int32_t i = 0; i < valuesCount; i++) {
ZNameInfo *nameinfo = (ZNameInfo *)node->getValue(i);
- if (nameinfo == NULL) {
+ if (nameinfo == nullptr) {
continue;
}
if ((nameinfo->type & fTypes) != 0) {
// matches a requested type
- if (fResults == NULL) {
+ if (fResults == nullptr) {
fResults = new TimeZoneNames::MatchInfoCollection();
- if (fResults == NULL) {
+ if (fResults == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
if (U_SUCCESS(status)) {
- U_ASSERT(fResults != NULL);
+ U_ASSERT(fResults != nullptr);
if (nameinfo->tzID) {
fResults->addZone(nameinfo->type, matchLength, UnicodeString(nameinfo->tzID, -1), status);
} else {
@@ -974,7 +980,7 @@ ZNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node,
}
}
}
- return TRUE;
+ return true;
}
TimeZoneNames::MatchInfoCollection*
@@ -984,7 +990,7 @@ ZNameSearchHandler::getMatches(int32_t& maxMatchLen) {
maxMatchLen = fMaxMatchLen;
// reset
- fResults = NULL;
+ fResults = nullptr;
fMaxMatchLen = 0;
return results;
}
@@ -1019,12 +1025,12 @@ U_CDECL_END
TimeZoneNamesImpl::TimeZoneNamesImpl(const Locale& locale, UErrorCode& status)
: fLocale(locale),
- fZoneStrings(NULL),
- fTZNamesMap(NULL),
- fMZNamesMap(NULL),
- fNamesTrieFullyLoaded(FALSE),
- fNamesFullyLoaded(FALSE),
- fNamesTrie(TRUE, deleteZNameInfo) {
+ fZoneStrings(nullptr),
+ fTZNamesMap(nullptr),
+ fMZNamesMap(nullptr),
+ fNamesTrieFullyLoaded(false),
+ fNamesFullyLoaded(false),
+ fNamesTrie(true, deleteZNameInfo) {
initialize(locale, status);
}
@@ -1045,8 +1051,8 @@ TimeZoneNamesImpl::initialize(const Locale& locale, UErrorCode& status) {
}
// Initialize hashtables holding time zone/meta zone names
- fMZNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
- fTZNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
+ fMZNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
+ fTZNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
if (U_FAILURE(status)) {
cleanup();
return;
@@ -1058,8 +1064,8 @@ TimeZoneNamesImpl::initialize(const Locale& locale, UErrorCode& status) {
// preload zone strings for the default zone
TimeZone *tz = TimeZone::createDefault();
- const UChar *tzID = ZoneMeta::getCanonicalCLDRID(*tz);
- if (tzID != NULL) {
+ const char16_t *tzID = ZoneMeta::getCanonicalCLDRID(*tz);
+ if (tzID != nullptr) {
loadStrings(UnicodeString(tzID), status);
}
delete tz;
@@ -1079,7 +1085,7 @@ TimeZoneNamesImpl::loadStrings(const UnicodeString& tzCanonicalID, UErrorCode& s
U_ASSERT(!mzIDs.isNull());
const UnicodeString *mzID;
- while (((mzID = mzIDs->snext(status)) != NULL) && U_SUCCESS(status)) {
+ while (((mzID = mzIDs->snext(status)) != nullptr) && U_SUCCESS(status)) {
loadMetaZoneNames(*mzID, status);
}
}
@@ -1090,17 +1096,17 @@ TimeZoneNamesImpl::~TimeZoneNamesImpl() {
void
TimeZoneNamesImpl::cleanup() {
- if (fZoneStrings != NULL) {
+ if (fZoneStrings != nullptr) {
ures_close(fZoneStrings);
- fZoneStrings = NULL;
+ fZoneStrings = nullptr;
}
- if (fMZNamesMap != NULL) {
+ if (fMZNamesMap != nullptr) {
uhash_close(fMZNamesMap);
- fMZNamesMap = NULL;
+ fMZNamesMap = nullptr;
}
- if (fTZNamesMap != NULL) {
+ if (fTZNamesMap != nullptr) {
uhash_close(fTZNamesMap);
- fTZNamesMap = NULL;
+ fTZNamesMap = nullptr;
}
}
@@ -1128,10 +1134,10 @@ TimeZoneNamesImpl::getAvailableMetaZoneIDs(UErrorCode& status) const {
StringEnumeration*
TimeZoneNamesImpl::_getAvailableMetaZoneIDs(UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
const UVector* mzIDs = ZoneMeta::getAvailableMetazoneIDs();
- if (mzIDs == NULL) {
+ if (mzIDs == nullptr) {
return new MetaZoneIDsEnumeration();
}
return new MetaZoneIDsEnumeration(*mzIDs);
@@ -1146,35 +1152,30 @@ TimeZoneNamesImpl::getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode
StringEnumeration*
TimeZoneNamesImpl::_getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
const UVector* mappings = ZoneMeta::getMetazoneMappings(tzID);
- if (mappings == NULL) {
+ if (mappings == nullptr) {
return new MetaZoneIDsEnumeration();
}
- MetaZoneIDsEnumeration *senum = NULL;
- UVector* mzIDs = new UVector(NULL, uhash_compareUChars, status);
- if (mzIDs == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
+ LocalPointer<MetaZoneIDsEnumeration> senum;
+ LocalPointer<UVector> mzIDs(new UVector(nullptr, uhash_compareUChars, status), status);
if (U_SUCCESS(status)) {
- U_ASSERT(mzIDs != NULL);
+ U_ASSERT(mzIDs.isValid());
for (int32_t i = 0; U_SUCCESS(status) && i < mappings->size(); i++) {
OlsonToMetaMappingEntry *map = (OlsonToMetaMappingEntry *)mappings->elementAt(i);
- const UChar *mzID = map->mzid;
+ const char16_t *mzID = map->mzid;
if (!mzIDs->contains((void *)mzID)) {
- mzIDs->addElementX((void *)mzID, status);
+ mzIDs->addElement((void *)mzID, status);
}
}
if (U_SUCCESS(status)) {
- senum = new MetaZoneIDsEnumeration(mzIDs);
- } else {
- delete mzIDs;
+ senum.adoptInsteadAndCheckErrorCode(new MetaZoneIDsEnumeration(std::move(mzIDs)), status);
}
}
- return senum;
+ return U_SUCCESS(status) ? senum.orphan() : nullptr;
}
UnicodeString&
@@ -1210,7 +1211,7 @@ TimeZoneNamesImpl::getMetaZoneDisplayName(const UnicodeString& mzID,
return name;
}
- ZNames *znames = NULL;
+ ZNames *znames = nullptr;
TimeZoneNamesImpl *nonConstThis = const_cast<TimeZoneNamesImpl *>(this);
{
@@ -1220,10 +1221,10 @@ TimeZoneNamesImpl::getMetaZoneDisplayName(const UnicodeString& mzID,
if (U_FAILURE(status)) { return name; }
}
- if (znames != NULL) {
- const UChar* s = znames->getName(type);
- if (s != NULL) {
- name.setTo(TRUE, s, -1);
+ if (znames != nullptr) {
+ const char16_t* s = znames->getName(type);
+ if (s != nullptr) {
+ name.setTo(true, s, -1);
}
}
return name;
@@ -1236,7 +1237,7 @@ TimeZoneNamesImpl::getTimeZoneDisplayName(const UnicodeString& tzID, UTimeZoneNa
return name;
}
- ZNames *tznames = NULL;
+ ZNames *tznames = nullptr;
TimeZoneNamesImpl *nonConstThis = const_cast<TimeZoneNamesImpl *>(this);
{
@@ -1246,10 +1247,10 @@ TimeZoneNamesImpl::getTimeZoneDisplayName(const UnicodeString& tzID, UTimeZoneNa
if (U_FAILURE(status)) { return name; }
}
- if (tznames != NULL) {
- const UChar *s = tznames->getName(type);
- if (s != NULL) {
- name.setTo(TRUE, s, -1);
+ if (tznames != nullptr) {
+ const char16_t *s = tznames->getName(type);
+ if (s != nullptr) {
+ name.setTo(true, s, -1);
}
}
return name;
@@ -1258,8 +1259,8 @@ TimeZoneNamesImpl::getTimeZoneDisplayName(const UnicodeString& tzID, UTimeZoneNa
UnicodeString&
TimeZoneNamesImpl::getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const {
name.setToBogus(); // cleanup result.
- const UChar* locName = NULL;
- ZNames *tznames = NULL;
+ const char16_t* locName = nullptr;
+ ZNames *tznames = nullptr;
TimeZoneNamesImpl *nonConstThis = const_cast<TimeZoneNamesImpl *>(this);
{
@@ -1269,11 +1270,11 @@ TimeZoneNamesImpl::getExemplarLocationName(const UnicodeString& tzID, UnicodeStr
if (U_FAILURE(status)) { return name; }
}
- if (tznames != NULL) {
+ if (tznames != nullptr) {
locName = tznames->getName(UTZNM_EXEMPLAR_LOCATION);
}
- if (locName != NULL) {
- name.setTo(TRUE, locName, -1);
+ if (locName != nullptr) {
+ name.setTo(true, locName, -1);
}
return name;
@@ -1301,26 +1302,26 @@ static void mergeTimeZoneKey(const UnicodeString& mzID, char* result) {
*/
ZNames*
TimeZoneNamesImpl::loadMetaZoneNames(const UnicodeString& mzID, UErrorCode& status) {
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
U_ASSERT(mzID.length() <= ZID_KEY_MAX - MZ_PREFIX_LEN);
- UChar mzIDKey[ZID_KEY_MAX + 1];
+ char16_t mzIDKey[ZID_KEY_MAX + 1];
mzID.extract(mzIDKey, ZID_KEY_MAX + 1, status);
U_ASSERT(U_SUCCESS(status)); // already checked length above
mzIDKey[mzID.length()] = 0;
void* mznames = uhash_get(fMZNamesMap, mzIDKey);
- if (mznames == NULL) {
+ if (mznames == nullptr) {
ZNames::ZNamesLoader loader;
loader.loadMetaZone(fZoneStrings, mzID, status);
mznames = ZNames::createMetaZoneAndPutInCache(fMZNamesMap, loader.getNames(), mzID, status);
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
}
if (mznames != EMPTY) {
return (ZNames*)mznames;
} else {
- return NULL;
+ return nullptr;
}
}
@@ -1329,20 +1330,20 @@ TimeZoneNamesImpl::loadMetaZoneNames(const UnicodeString& mzID, UErrorCode& stat
*/
ZNames*
TimeZoneNamesImpl::loadTimeZoneNames(const UnicodeString& tzID, UErrorCode& status) {
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
U_ASSERT(tzID.length() <= ZID_KEY_MAX);
- UChar tzIDKey[ZID_KEY_MAX + 1];
+ char16_t tzIDKey[ZID_KEY_MAX + 1];
int32_t tzIDKeyLen = tzID.extract(tzIDKey, ZID_KEY_MAX + 1, status);
U_ASSERT(U_SUCCESS(status)); // already checked length above
tzIDKey[tzIDKeyLen] = 0;
void *tznames = uhash_get(fTZNamesMap, tzIDKey);
- if (tznames == NULL) {
+ if (tznames == nullptr) {
ZNames::ZNamesLoader loader;
loader.loadTimeZone(fZoneStrings, tzID, status);
tznames = ZNames::createTimeZoneAndPutInCache(fTZNamesMap, loader.getNames(), tzID, status);
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
}
// tznames is never EMPTY
@@ -1362,8 +1363,8 @@ TimeZoneNamesImpl::find(const UnicodeString& text, int32_t start, uint32_t types
// First try of lookup.
matches = doFind(handler, text, start, status);
- if (U_FAILURE(status)) { return NULL; }
- if (matches != NULL) {
+ if (U_FAILURE(status)) { return nullptr; }
+ if (matches != nullptr) {
return matches;
}
@@ -1375,8 +1376,8 @@ TimeZoneNamesImpl::find(const UnicodeString& text, int32_t start, uint32_t types
// Second try of lookup.
matches = doFind(handler, text, start, status);
- if (U_FAILURE(status)) { return NULL; }
- if (matches != NULL) {
+ if (U_FAILURE(status)) { return nullptr; }
+ if (matches != nullptr) {
return matches;
}
@@ -1384,8 +1385,8 @@ TimeZoneNamesImpl::find(const UnicodeString& text, int32_t start, uint32_t types
// Load everything now.
nonConstThis->internalLoadAllDisplayNames(status);
nonConstThis->addAllNamesIntoTrie(status);
- nonConstThis->fNamesTrieFullyLoaded = TRUE;
- if (U_FAILURE(status)) { return NULL; }
+ nonConstThis->fNamesTrieFullyLoaded = true;
+ if (U_FAILURE(status)) { return nullptr; }
// Third try: we must return this one.
return doFind(handler, text, start, status);
@@ -1397,16 +1398,16 @@ TimeZoneNamesImpl::doFind(ZNameSearchHandler& handler,
const UnicodeString& text, int32_t start, UErrorCode& status) const {
fNamesTrie.search(text, start, (TextTrieMapSearchResultHandler *)&handler, status);
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
int32_t maxLen = 0;
TimeZoneNames::MatchInfoCollection* matches = handler.getMatches(maxLen);
- if (matches != NULL && ((maxLen == (text.length() - start)) || fNamesTrieFullyLoaded)) {
+ if (matches != nullptr && ((maxLen == (text.length() - start)) || fNamesTrieFullyLoaded)) {
// perfect match, or no more names available
return matches;
}
delete matches;
- return NULL;
+ return nullptr;
}
// Caller must synchronize.
@@ -1416,18 +1417,18 @@ void TimeZoneNamesImpl::addAllNamesIntoTrie(UErrorCode& status) {
const UHashElement* element;
pos = UHASH_FIRST;
- while ((element = uhash_nextElement(fMZNamesMap, &pos)) != NULL) {
+ while ((element = uhash_nextElement(fMZNamesMap, &pos)) != nullptr) {
if (element->value.pointer == EMPTY) { continue; }
- UChar* mzID = (UChar*) element->key.pointer;
+ char16_t* mzID = (char16_t*) element->key.pointer;
ZNames* znames = (ZNames*) element->value.pointer;
znames->addAsMetaZoneIntoTrie(mzID, fNamesTrie, status);
if (U_FAILURE(status)) { return; }
}
pos = UHASH_FIRST;
- while ((element = uhash_nextElement(fTZNamesMap, &pos)) != NULL) {
+ while ((element = uhash_nextElement(fTZNamesMap, &pos)) != nullptr) {
if (element->value.pointer == EMPTY) { continue; }
- UChar* tzID = (UChar*) element->key.pointer;
+ char16_t* tzID = (char16_t*) element->key.pointer;
ZNames* znames = (ZNames*) element->value.pointer;
znames->addAsTimeZoneIntoTrie(tzID, fNamesTrie, status);
if (U_FAILURE(status)) { return; }
@@ -1449,7 +1450,7 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink {
ZoneStringsLoader(TimeZoneNamesImpl& _tzn, UErrorCode& status)
: tzn(_tzn) {
- keyToLoader = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
+ keyToLoader = uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &status);
if (U_FAILURE(status)) { return; }
uhash_setKeyDeleter(keyToLoader, uprv_free);
uhash_setValueDeleter(keyToLoader, deleteZNamesLoader);
@@ -1459,9 +1460,9 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink {
void* createKey(const char* key, UErrorCode& status) {
int32_t len = sizeof(char) * (static_cast<int32_t>(uprv_strlen(key)) + 1);
char* newKey = (char*) uprv_malloc(len);
- if (newKey == NULL) {
+ if (newKey == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
uprv_memcpy(newKey, key, len);
newKey[len-1] = '\0';
@@ -1493,7 +1494,7 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink {
int32_t pos = UHASH_FIRST;
const UHashElement* element;
- while ((element = uhash_nextElement(keyToLoader, &pos)) != NULL) {
+ while ((element = uhash_nextElement(keyToLoader, &pos)) != nullptr) {
if (element->value.pointer == DUMMY_LOADER) { continue; }
ZNames::ZNamesLoader* loader = (ZNames::ZNamesLoader*) element->value.pointer;
char* key = (char*) element->key.pointer;
@@ -1514,16 +1515,16 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink {
if (U_FAILURE(status)) { return; }
void* loader = uhash_get(keyToLoader, key);
- if (loader == NULL) {
+ if (loader == nullptr) {
if (isMetaZone(key)) {
UnicodeString mzID = mzIDFromKey(key);
void* cacheVal = uhash_get(tzn.fMZNamesMap, mzID.getTerminatedBuffer());
- if (cacheVal != NULL) {
+ if (cacheVal != nullptr) {
// We have already loaded the names for this meta zone.
loader = (void*) DUMMY_LOADER;
} else {
loader = (void*) new ZNames::ZNamesLoader();
- if (loader == NULL) {
+ if (loader == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1531,12 +1532,12 @@ struct TimeZoneNamesImpl::ZoneStringsLoader : public ResourceSink {
} else {
UnicodeString tzID = tzIDFromKey(key);
void* cacheVal = uhash_get(tzn.fTZNamesMap, tzID.getTerminatedBuffer());
- if (cacheVal != NULL) {
+ if (cacheVal != nullptr) {
// We have already loaded the names for this time zone.
loader = (void*) DUMMY_LOADER;
} else {
loader = (void*) new ZNames::ZNamesLoader();
- if (loader == NULL) {
+ if (loader == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1596,8 +1597,8 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID,
if (U_FAILURE(status)) return;
if (tzID.isEmpty()) { return; }
- void* tznames = NULL;
- void* mznames = NULL;
+ void* tznames = nullptr;
+ void* mznames = nullptr;
TimeZoneNamesImpl *nonConstThis = const_cast<TimeZoneNamesImpl*>(this);
// Load the time zone strings
@@ -1606,14 +1607,14 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID,
tznames = (void*) nonConstThis->loadTimeZoneNames(tzID, status);
if (U_FAILURE(status)) { return; }
}
- U_ASSERT(tznames != NULL);
+ U_ASSERT(tznames != nullptr);
// Load the values into the dest array
for (int i = 0; i < numTypes; i++) {
UTimeZoneNameType type = types[i];
- const UChar* name = ((ZNames*)tznames)->getName(type);
- if (name == NULL) {
- if (mznames == NULL) {
+ const char16_t* name = ((ZNames*)tznames)->getName(type);
+ if (name == nullptr) {
+ if (mznames == nullptr) {
// Load the meta zone name
UnicodeString mzID;
getMetaZoneID(tzID, date, mzID);
@@ -1626,19 +1627,19 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID,
mznames = (void*) nonConstThis->loadMetaZoneNames(mzID, status);
if (U_FAILURE(status)) { return; }
// Note: when the metazone doesn't exist, in Java, loadMetaZoneNames returns
- // a dummy object instead of NULL.
- if (mznames == NULL) {
+ // a dummy object instead of nullptr.
+ if (mznames == nullptr) {
mznames = (void*) EMPTY;
}
}
}
- U_ASSERT(mznames != NULL);
+ U_ASSERT(mznames != nullptr);
if (mznames != EMPTY) {
name = ((ZNames*)mznames)->getName(type);
}
}
- if (name != NULL) {
- dest[i].setTo(TRUE, name, -1);
+ if (name != nullptr) {
+ dest[i].setTo(true, name, -1);
} else {
dest[i].setToBogus();
}
@@ -1648,7 +1649,7 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID,
// Caller must synchronize.
void TimeZoneNamesImpl::internalLoadAllDisplayNames(UErrorCode& status) {
if (!fNamesFullyLoaded) {
- fNamesFullyLoaded = TRUE;
+ fNamesFullyLoaded = true;
ZoneStringsLoader loader(*this, status);
loader.load(status);
@@ -1658,21 +1659,21 @@ void TimeZoneNamesImpl::internalLoadAllDisplayNames(UErrorCode& status) {
// load strings for all zones
StringEnumeration *tzIDs = TimeZone::createTimeZoneIDEnumeration(
- UCAL_ZONE_TYPE_CANONICAL, NULL, NULL, status);
+ UCAL_ZONE_TYPE_CANONICAL, nullptr, nullptr, status);
if (U_SUCCESS(status)) {
- while ((id = tzIDs->snext(status)) != NULL) {
+ while ((id = tzIDs->snext(status)) != nullptr) {
if (U_FAILURE(status)) {
break;
}
UnicodeString copy(*id);
void* value = uhash_get(fTZNamesMap, copy.getTerminatedBuffer());
- if (value == NULL) {
+ if (value == nullptr) {
// loadStrings also loads related metazone strings
loadStrings(*id, status);
}
}
}
- if (tzIDs != NULL) {
+ if (tzIDs != nullptr) {
delete tzIDs;
}
}
@@ -1680,11 +1681,11 @@ void TimeZoneNamesImpl::internalLoadAllDisplayNames(UErrorCode& status) {
-static const UChar gEtcPrefix[] = { 0x45, 0x74, 0x63, 0x2F }; // "Etc/"
+static const char16_t gEtcPrefix[] = { 0x45, 0x74, 0x63, 0x2F }; // "Etc/"
static const int32_t gEtcPrefixLen = 4;
-static const UChar gSystemVPrefix[] = { 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x56, 0x2F }; // "SystemV/
+static const char16_t gSystemVPrefix[] = { 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x56, 0x2F }; // "SystemV/
static const int32_t gSystemVPrefixLen = 8;
-static const UChar gRiyadh8[] = { 0x52, 0x69, 0x79, 0x61, 0x64, 0x68, 0x38 }; // "Riyadh8"
+static const char16_t gRiyadh8[] = { 0x52, 0x69, 0x79, 0x61, 0x64, 0x68, 0x38 }; // "Riyadh8"
static const int32_t gRiyadh8Len = 7;
UnicodeString& U_EXPORT2
@@ -1695,11 +1696,11 @@ TimeZoneNamesImpl::getDefaultExemplarLocationName(const UnicodeString& tzID, Uni
return name;
}
- int32_t sep = tzID.lastIndexOf((UChar)0x2F /* '/' */);
+ int32_t sep = tzID.lastIndexOf((char16_t)0x2F /* '/' */);
if (sep > 0 && sep + 1 < tzID.length()) {
name.setTo(tzID, sep + 1);
- name.findAndReplace(UnicodeString((UChar)0x5f /* _ */),
- UnicodeString((UChar)0x20 /* space */));
+ name.findAndReplace(UnicodeString((char16_t)0x5f /* _ */),
+ UnicodeString((char16_t)0x20 /* space */));
} else {
name.setToBogus();
}
@@ -1718,29 +1719,29 @@ public:
virtual ~TZDBNames();
static TZDBNames* createInstance(UResourceBundle* rb, const char* key);
- const UChar* getName(UTimeZoneNameType type) const;
+ const char16_t* getName(UTimeZoneNameType type) const;
const char** getParseRegions(int32_t& numRegions) const;
protected:
- TZDBNames(const UChar** names, char** regions, int32_t numRegions);
+ TZDBNames(const char16_t** names, char** regions, int32_t numRegions);
private:
- const UChar** fNames;
+ const char16_t** fNames;
char** fRegions;
int32_t fNumRegions;
};
-TZDBNames::TZDBNames(const UChar** names, char** regions, int32_t numRegions)
+TZDBNames::TZDBNames(const char16_t** names, char** regions, int32_t numRegions)
: fNames(names),
fRegions(regions),
fNumRegions(numRegions) {
}
TZDBNames::~TZDBNames() {
- if (fNames != NULL) {
+ if (fNames != nullptr) {
uprv_free(fNames);
}
- if (fRegions != NULL) {
+ if (fRegions != nullptr) {
char **p = fRegions;
for (int32_t i = 0; i < fNumRegions; p++, i++) {
uprv_free(*p);
@@ -1751,69 +1752,69 @@ TZDBNames::~TZDBNames() {
TZDBNames*
TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
- if (rb == NULL || key == NULL || *key == 0) {
- return NULL;
+ if (rb == nullptr || key == nullptr || *key == 0) {
+ return nullptr;
}
UErrorCode status = U_ZERO_ERROR;
- const UChar **names = NULL;
- char** regions = NULL;
+ const char16_t **names = nullptr;
+ char** regions = nullptr;
int32_t numRegions = 0;
int32_t len = 0;
- UResourceBundle* rbTable = NULL;
+ UResourceBundle* rbTable = nullptr;
rbTable = ures_getByKey(rb, key, rbTable, &status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- names = (const UChar **)uprv_malloc(sizeof(const UChar*) * TZDBNAMES_KEYS_SIZE);
- UBool isEmpty = TRUE;
- if (names != NULL) {
+ names = (const char16_t **)uprv_malloc(sizeof(const char16_t*) * TZDBNAMES_KEYS_SIZE);
+ UBool isEmpty = true;
+ if (names != nullptr) {
for (int32_t i = 0; i < TZDBNAMES_KEYS_SIZE; i++) {
status = U_ZERO_ERROR;
- const UChar *value = ures_getStringByKey(rbTable, TZDBNAMES_KEYS[i], &len, &status);
+ const char16_t *value = ures_getStringByKey(rbTable, TZDBNAMES_KEYS[i], &len, &status);
if (U_FAILURE(status) || len == 0) {
- names[i] = NULL;
+ names[i] = nullptr;
} else {
names[i] = value;
- isEmpty = FALSE;
+ isEmpty = false;
}
}
}
if (isEmpty) {
- if (names != NULL) {
+ if (names != nullptr) {
uprv_free(names);
}
- return NULL;
+ return nullptr;
}
- UResourceBundle *regionsRes = ures_getByKey(rbTable, "parseRegions", NULL, &status);
- UBool regionError = FALSE;
+ UResourceBundle *regionsRes = ures_getByKey(rbTable, "parseRegions", nullptr, &status);
+ UBool regionError = false;
if (U_SUCCESS(status)) {
numRegions = ures_getSize(regionsRes);
if (numRegions > 0) {
regions = (char**)uprv_malloc(sizeof(char*) * numRegions);
- if (regions != NULL) {
+ if (regions != nullptr) {
char **pRegion = regions;
for (int32_t i = 0; i < numRegions; i++, pRegion++) {
- *pRegion = NULL;
+ *pRegion = nullptr;
}
// filling regions
pRegion = regions;
for (int32_t i = 0; i < numRegions; i++, pRegion++) {
status = U_ZERO_ERROR;
- const UChar *uregion = ures_getStringByIndex(regionsRes, i, &len, &status);
+ const char16_t *uregion = ures_getStringByIndex(regionsRes, i, &len, &status);
if (U_FAILURE(status)) {
- regionError = TRUE;
+ regionError = true;
break;
}
*pRegion = (char*)uprv_malloc(sizeof(char) * (len + 1));
- if (*pRegion == NULL) {
- regionError = TRUE;
+ if (*pRegion == nullptr) {
+ regionError = true;
break;
}
u_UCharsToChars(uregion, *pRegion, len);
@@ -1826,28 +1827,28 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
ures_close(rbTable);
if (regionError) {
- if (names != NULL) {
+ if (names != nullptr) {
uprv_free(names);
}
- if (regions != NULL) {
+ if (regions != nullptr) {
char **p = regions;
for (int32_t i = 0; i < numRegions; p++, i++) {
uprv_free(*p);
}
uprv_free(regions);
}
- return NULL;
+ return nullptr;
}
return new TZDBNames(names, regions, numRegions);
}
-const UChar*
+const char16_t*
TZDBNames::getName(UTimeZoneNameType type) const {
- if (fNames == NULL) {
- return NULL;
+ if (fNames == nullptr) {
+ return nullptr;
}
- const UChar *name = NULL;
+ const char16_t *name = nullptr;
switch(type) {
case UTZNM_SHORT_STANDARD:
name = fNames[0];
@@ -1856,14 +1857,14 @@ TZDBNames::getName(UTimeZoneNameType type) const {
name = fNames[1];
break;
default:
- name = NULL;
+ name = nullptr;
}
return name;
}
const char**
TZDBNames::getParseRegions(int32_t& numRegions) const {
- if (fRegions == NULL) {
+ if (fRegions == nullptr) {
numRegions = 0;
} else {
numRegions = fNumRegions;
@@ -1877,7 +1878,7 @@ U_CDECL_BEGIN
* in the trie
*/
typedef struct TZDBNameInfo {
- const UChar* mzID;
+ const char16_t* mzID;
UTimeZoneNameType type;
UBool ambiguousType;
const char** parseRegions;
@@ -1902,11 +1903,11 @@ private:
};
TZDBNameSearchHandler::TZDBNameSearchHandler(uint32_t types, const char* region)
-: fTypes(types), fMaxMatchLen(0), fResults(NULL), fRegion(region) {
+: fTypes(types), fMaxMatchLen(0), fResults(nullptr), fRegion(region) {
}
TZDBNameSearchHandler::~TZDBNameSearchHandler() {
- if (fResults != NULL) {
+ if (fResults != nullptr) {
delete fResults;
}
}
@@ -1914,17 +1915,17 @@ TZDBNameSearchHandler::~TZDBNameSearchHandler() {
UBool
TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
if (U_FAILURE(status)) {
- return FALSE;
+ return false;
}
- TZDBNameInfo *match = NULL;
- TZDBNameInfo *defaultRegionMatch = NULL;
+ TZDBNameInfo *match = nullptr;
+ TZDBNameInfo *defaultRegionMatch = nullptr;
if (node->hasValues()) {
int32_t valuesCount = node->countValues();
for (int32_t i = 0; i < valuesCount; i++) {
TZDBNameInfo *ninfo = (TZDBNameInfo *)node->getValue(i);
- if (ninfo == NULL) {
+ if (ninfo == nullptr) {
continue;
}
if ((ninfo->type & fTypes) != 0) {
@@ -1935,14 +1936,14 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
// multiple results returned for the same time zone type.
// For this reason, this implementation resolve one among same
// zone type with a same name at this level.
- if (ninfo->parseRegions == NULL) {
+ if (ninfo->parseRegions == nullptr) {
// parseRegions == null means this is the default metazone
// mapping for the abbreviation.
- if (defaultRegionMatch == NULL) {
+ if (defaultRegionMatch == nullptr) {
match = defaultRegionMatch = ninfo;
}
} else {
- UBool matchRegion = FALSE;
+ UBool matchRegion = false;
// non-default metazone mapping for an abbreviation
// comes with applicable regions. For example, the default
// metazone mapping for "CST" is America_Central,
@@ -1952,21 +1953,21 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
const char *region = ninfo->parseRegions[j];
if (uprv_strcmp(fRegion, region) == 0) {
match = ninfo;
- matchRegion = TRUE;
+ matchRegion = true;
break;
}
}
if (matchRegion) {
break;
}
- if (match == NULL) {
+ if (match == nullptr) {
match = ninfo;
}
}
}
}
- if (match != NULL) {
+ if (match != nullptr) {
UTimeZoneNameType ntype = match->type;
// Note: Workaround for duplicated standard/daylight names
// The tz database contains a few zones sharing a
@@ -1987,15 +1988,15 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
ntype = UTZNM_SHORT_GENERIC;
}
- if (fResults == NULL) {
+ if (fResults == nullptr) {
fResults = new TimeZoneNames::MatchInfoCollection();
- if (fResults == NULL) {
+ if (fResults == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
}
if (U_SUCCESS(status)) {
- U_ASSERT(fResults != NULL);
- U_ASSERT(match->mzID != NULL);
+ U_ASSERT(fResults != nullptr);
+ U_ASSERT(match->mzID != nullptr);
fResults->addMetaZone(ntype, matchLength, UnicodeString(match->mzID, -1), status);
if (U_SUCCESS(status) && matchLength > fMaxMatchLen) {
fMaxMatchLen = matchLength;
@@ -2003,7 +2004,7 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
}
}
}
- return TRUE;
+ return true;
}
TimeZoneNames::MatchInfoCollection*
@@ -2013,7 +2014,7 @@ TZDBNameSearchHandler::getMatches(int32_t& maxMatchLen) {
maxMatchLen = fMaxMatchLen;
// reset
- fResults = NULL;
+ fResults = nullptr;
fMaxMatchLen = 0;
return results;
}
@@ -2030,9 +2031,9 @@ deleteTZDBNames(void *obj) {
}
static void U_CALLCONV initTZDBNamesMap(UErrorCode &status) {
- gTZDBNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
+ gTZDBNamesMap = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
if (U_FAILURE(status)) {
- gTZDBNamesMap = NULL;
+ gTZDBNamesMap = nullptr;
return;
}
// no key deleters for tzdb name maps
@@ -2045,7 +2046,7 @@ static void U_CALLCONV initTZDBNamesMap(UErrorCode &status) {
*/
static void U_CALLCONV
deleteTZDBNameInfo(void *obj) {
- if (obj != NULL) {
+ if (obj != nullptr) {
uprv_free(obj);
}
}
@@ -2054,8 +2055,8 @@ static void U_CALLCONV prepareFind(UErrorCode &status) {
if (U_FAILURE(status)) {
return;
}
- gTZDBNamesTrie = new TextTrieMap(TRUE, deleteTZDBNameInfo);
- if (gTZDBNamesTrie == NULL) {
+ gTZDBNamesTrie = new TextTrieMap(true, deleteTZDBNameInfo);
+ if (gTZDBNamesTrie == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -2068,12 +2069,12 @@ static void U_CALLCONV prepareFind(UErrorCode &status) {
if (U_FAILURE(status)) {
break;
}
- if (names == NULL) {
+ if (names == nullptr) {
continue;
}
- const UChar *std = names->getName(UTZNM_SHORT_STANDARD);
- const UChar *dst = names->getName(UTZNM_SHORT_DAYLIGHT);
- if (std == NULL && dst == NULL) {
+ const char16_t *std = names->getName(UTZNM_SHORT_STANDARD);
+ const char16_t *dst = names->getName(UTZNM_SHORT_DAYLIGHT);
+ if (std == nullptr && dst == nullptr) {
continue;
}
int32_t numRegions = 0;
@@ -2084,12 +2085,12 @@ static void U_CALLCONV prepareFind(UErrorCode &status) {
// time. For example, Australia/Sydney observes DST,
// but "EST" is used for both standard and daylight.
// we need to store the information for later processing.
- UBool ambiguousType = (std != NULL && dst != NULL && u_strcmp(std, dst) == 0);
+ UBool ambiguousType = (std != nullptr && dst != nullptr && u_strcmp(std, dst) == 0);
- const UChar *uMzID = ZoneMeta::findMetaZoneID(*mzID);
- if (std != NULL) {
+ const char16_t *uMzID = ZoneMeta::findMetaZoneID(*mzID);
+ if (std != nullptr) {
TZDBNameInfo *stdInf = (TZDBNameInfo *)uprv_malloc(sizeof(TZDBNameInfo));
- if (stdInf == NULL) {
+ if (stdInf == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -2100,9 +2101,9 @@ static void U_CALLCONV prepareFind(UErrorCode &status) {
stdInf->nRegions = numRegions;
gTZDBNamesTrie->put(std, stdInf, status);
}
- if (U_SUCCESS(status) && dst != NULL) {
+ if (U_SUCCESS(status) && dst != nullptr) {
TZDBNameInfo *dstInf = (TZDBNameInfo *)uprv_malloc(sizeof(TZDBNameInfo));
- if (dstInf == NULL) {
+ if (dstInf == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
@@ -2119,7 +2120,7 @@ static void U_CALLCONV prepareFind(UErrorCode &status) {
if (U_FAILURE(status)) {
delete gTZDBNamesTrie;
- gTZDBNamesTrie = NULL;
+ gTZDBNamesTrie = nullptr;
return;
}
@@ -2130,7 +2131,7 @@ U_CDECL_END
TZDBTimeZoneNames::TZDBTimeZoneNames(const Locale& locale)
: fLocale(locale) {
- UBool useWorld = TRUE;
+ UBool useWorld = true;
const char* region = fLocale.getCountry();
int32_t regionLen = static_cast<int32_t>(uprv_strlen(region));
if (regionLen == 0) {
@@ -2142,11 +2143,11 @@ TZDBTimeZoneNames::TZDBTimeZoneNames(const Locale& locale)
}
regionLen = uloc_getCountry(loc.data(), fRegion, sizeof(fRegion), &status);
if (U_SUCCESS(status) && regionLen < (int32_t)sizeof(fRegion)) {
- useWorld = FALSE;
+ useWorld = false;
}
} else if (regionLen < (int32_t)sizeof(fRegion)) {
uprv_strcpy(fRegion, region);
- useWorld = FALSE;
+ useWorld = false;
}
if (useWorld) {
uprv_strcpy(fRegion, "001");
@@ -2202,10 +2203,10 @@ TZDBTimeZoneNames::getMetaZoneDisplayName(const UnicodeString& mzID,
UErrorCode status = U_ZERO_ERROR;
const TZDBNames *tzdbNames = TZDBTimeZoneNames::getMetaZoneNames(mzID, status);
if (U_SUCCESS(status)) {
- if (tzdbNames != NULL) {
- const UChar *s = tzdbNames->getName(type);
- if (s != NULL) {
- name.setTo(TRUE, s, -1);
+ if (tzdbNames != nullptr) {
+ const char16_t *s = tzdbNames->getName(type);
+ if (s != nullptr) {
+ name.setTo(true, s, -1);
}
}
}
@@ -2224,13 +2225,13 @@ TZDBTimeZoneNames::MatchInfoCollection*
TZDBTimeZoneNames::find(const UnicodeString& text, int32_t start, uint32_t types, UErrorCode& status) const {
umtx_initOnce(gTZDBNamesTrieInitOnce, &prepareFind, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
TZDBNameSearchHandler handler(types, fRegion);
gTZDBNamesTrie->search(text, start, (TextTrieMapSearchResultHandler *)&handler, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
int32_t maxLen = 0;
return handler.getMatches(maxLen);
@@ -2240,12 +2241,12 @@ const TZDBNames*
TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& status) {
umtx_initOnce(gTZDBNamesMapInitOnce, &initTZDBNamesMap, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- TZDBNames* tzdbNames = NULL;
+ TZDBNames* tzdbNames = nullptr;
- UChar mzIDKey[ZID_KEY_MAX + 1];
+ 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
mzIDKey[mzID.length()] = 0;
@@ -2254,7 +2255,7 @@ TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& statu
umtx_lock(&gTZDBNamesMapLock);
{
void *cacheVal = uhash_get(gTZDBNamesMap, mzIDKey);
- if (cacheVal == NULL) {
+ if (cacheVal == nullptr) {
UResourceBundle *zoneStringsRes = ures_openDirect(U_ICUDATA_ZONE, "tzdbNames", &status);
zoneStringsRes = ures_getByKey(zoneStringsRes, gZoneStrings, zoneStringsRes, &status);
if (U_SUCCESS(status)) {
@@ -2262,7 +2263,7 @@ TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& statu
mergeTimeZoneKey(mzID, key);
tzdbNames = TZDBNames::createInstance(zoneStringsRes, key);
- if (tzdbNames == NULL) {
+ if (tzdbNames == nullptr) {
cacheVal = (void *)EMPTY;
} else {
cacheVal = tzdbNames;
@@ -2271,21 +2272,21 @@ TZDBTimeZoneNames::getMetaZoneNames(const UnicodeString& mzID, UErrorCode& statu
// avoid duplications.
// TODO: Is there a more efficient way, like intern() in Java?
void* newKey = (void*) ZoneMeta::findMetaZoneID(mzID);
- if (newKey != NULL) {
+ if (newKey != nullptr) {
uhash_put(gTZDBNamesMap, newKey, cacheVal, &status);
if (U_FAILURE(status)) {
- if (tzdbNames != NULL) {
+ if (tzdbNames != nullptr) {
delete tzdbNames;
- tzdbNames = NULL;
+ tzdbNames = nullptr;
}
}
} else {
// Should never happen with a valid input
- if (tzdbNames != NULL) {
+ if (tzdbNames != nullptr) {
// It's not possible that we get a valid tzdbNames with unknown ID.
// But just in case..
delete tzdbNames;
- tzdbNames = NULL;
+ tzdbNames = nullptr;
}
}
}
diff --git a/contrib/libs/icu/i18n/tznames_impl.h b/contrib/libs/icu/i18n/tznames_impl.h
index d047fa35418..8ca2f84e73d 100644
--- a/contrib/libs/icu/i18n/tznames_impl.h
+++ b/contrib/libs/icu/i18n/tznames_impl.h
@@ -33,7 +33,7 @@
U_NAMESPACE_BEGIN
/*
- * ZNStringPool Pool of (UChar *) strings. Provides for sharing of repeated
+ * ZNStringPool Pool of (char16_t *) strings. Provides for sharing of repeated
* zone strings.
*/
struct ZNStringPoolChunk;
@@ -47,17 +47,17 @@ class U_I18N_API ZNStringPool: public UMemory {
*
* Life time of the returned string is that of the pool.
*/
- const UChar *get(const UChar *s, UErrorCode &status);
+ const char16_t *get(const char16_t *s, UErrorCode &status);
/* Get the pooled string that is equal to the supplied string s.
* Copy the string into the pool if it is not already present.
*/
- const UChar *get(const UnicodeString &s, UErrorCode &status);
+ const char16_t *get(const UnicodeString &s, UErrorCode &status);
/* Adopt a string into the pool, without copying it.
* Used for strings from resource bundles, which will persist without copying.
*/
- const UChar *adopt(const UChar *s, UErrorCode &status);
+ const char16_t *adopt(const char16_t *s, UErrorCode &status);
/* Freeze the string pool. Discards the hash table that is used
* for looking up a string. All pointers to pooled strings remain valid.
@@ -86,24 +86,24 @@ struct CharacterNode {
inline const void *getValue(int32_t index) const;
void *fValues; // Union of one single value vs. UVector of values.
- UChar fCharacter; // UTF-16 code unit.
+ char16_t fCharacter; // UTF-16 code unit.
uint16_t fFirstChild; // 0 if no children.
uint16_t fNextSibling; // 0 terminates the list.
UBool fHasValuesVector;
UBool fPadding;
- // No value: fValues == NULL and fHasValuesVector == false
+ // No value: fValues == nullptr and fHasValuesVector == false
// One value: fValues == value and fHasValuesVector == false
// >=2 values: fValues == UVector of values and fHasValuesVector == true
};
inline UBool CharacterNode::hasValues() const {
- return (UBool)(fValues != NULL);
+ return (UBool)(fValues != nullptr);
}
inline int32_t CharacterNode::countValues() const {
return
- fValues == NULL ? 0 :
+ fValues == nullptr ? 0 :
!fHasValuesVector ? 1 :
((const UVector *)fValues)->size();
}
@@ -136,7 +136,7 @@ public:
virtual ~TextTrieMap();
void put(const UnicodeString &key, void *value, ZNStringPool &sp, UErrorCode &status);
- void put(const UChar*, void *value, UErrorCode &status);
+ void put(const char16_t*, void *value, UErrorCode &status);
void search(const UnicodeString &text, int32_t start,
TextTrieMapSearchResultHandler *handler, UErrorCode& status) const;
int32_t isEmpty() const;
@@ -152,8 +152,8 @@ private:
UObjectDeleter *fValueDeleter;
UBool growNodes();
- CharacterNode* addChildNode(CharacterNode *parent, UChar c, UErrorCode &status);
- CharacterNode* getChildNode(CharacterNode *parent, UChar c) const;
+ CharacterNode* addChildNode(CharacterNode *parent, char16_t c, UErrorCode &status);
+ CharacterNode* getChildNode(CharacterNode *parent, char16_t c) const;
void putImpl(const UnicodeString &key, void *value, UErrorCode &status);
void buildTrie(UErrorCode &status);
@@ -249,7 +249,7 @@ public:
TimeZoneNames::MatchInfoCollection* find(const UnicodeString& text, int32_t start, uint32_t types, UErrorCode& status) const override;
- // When TZDBNames for the metazone is not available, this method returns NULL,
+ // When TZDBNames for the metazone is not available, this method returns nullptr,
// but does NOT set U_MISSING_RESOURCE_ERROR to status.
static const TZDBNames* getMetaZoneNames(const UnicodeString& mzId, UErrorCode& status);
diff --git a/contrib/libs/icu/i18n/tzrule.cpp b/contrib/libs/icu/i18n/tzrule.cpp
index a60fffbe020..a3522f1d8b2 100644
--- a/contrib/libs/icu/i18n/tzrule.cpp
+++ b/contrib/libs/icu/i18n/tzrule.cpp
@@ -74,12 +74,12 @@ TimeZoneRule::getName(UnicodeString& name) const {
}
int32_t
-TimeZoneRule::getRawOffset(void) const {
+TimeZoneRule::getRawOffset() const {
return fRawOffset;
}
int32_t
-TimeZoneRule::getDSTSavings(void) const {
+TimeZoneRule::getDSTSavings() const {
return fDSTSavings;
}
@@ -135,26 +135,26 @@ InitialTimeZoneRule::operator!=(const TimeZoneRule& that) const {
UBool
InitialTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
if (this == &other) {
- return TRUE;
+ return true;
}
- if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == FALSE) {
- return FALSE;
+ if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == false) {
+ return false;
}
- return TRUE;
+ return true;
}
UBool
InitialTimeZoneRule::getFirstStart(int32_t /*prevRawOffset*/,
int32_t /*prevDSTSavings*/,
UDate& /*result*/) const {
- return FALSE;
+ return false;
}
UBool
InitialTimeZoneRule::getFinalStart(int32_t /*prevRawOffset*/,
int32_t /*prevDSTSavings*/,
UDate& /*result*/) const {
- return FALSE;
+ return false;
}
UBool
@@ -163,7 +163,7 @@ InitialTimeZoneRule::getNextStart(UDate /*base*/,
int32_t /*prevDSTSavings*/,
UBool /*inclusive*/,
UDate& /*result*/) const {
- return FALSE;
+ return false;
}
UBool
@@ -172,7 +172,7 @@ InitialTimeZoneRule::getPreviousStart(UDate /*base*/,
int32_t /*prevDSTSavings*/,
UBool /*inclusive*/,
UDate& /*result*/) const {
- return FALSE;
+ return false;
}
@@ -210,7 +210,7 @@ AnnualTimeZoneRule::~AnnualTimeZoneRule() {
}
AnnualTimeZoneRule*
-AnnualTimeZoneRule::clone(void) const {
+AnnualTimeZoneRule::clone() const {
return new AnnualTimeZoneRule(*this);
}
@@ -266,14 +266,14 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
int32_t prevDSTSavings,
UDate &result) const {
if (year < fStartYear || year > fEndYear) {
- return FALSE;
+ return false;
}
double ruleDay;
DateTimeRule::DateRuleType type = fDateTimeRule->getDateRuleType();
if (type == DateTimeRule::DOM) {
ruleDay = Grego::fieldsToDay(year, fDateTimeRule->getRuleMonth(), fDateTimeRule->getRuleDayOfMonth());
} else {
- UBool after = TRUE;
+ UBool after = true;
if (type == DateTimeRule::DOW) {
// Normalize DOW rule into DOW_GEQ_DOM or DOW_LEQ_DOM
int32_t weeks = fDateTimeRule->getRuleWeekInMonth();
@@ -281,7 +281,7 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
ruleDay = Grego::fieldsToDay(year, fDateTimeRule->getRuleMonth(), 1);
ruleDay += 7 * (weeks - 1);
} else {
- after = FALSE;
+ after = false;
ruleDay = Grego::fieldsToDay(year, fDateTimeRule->getRuleMonth(),
Grego::monthLength(year, fDateTimeRule->getRuleMonth()));
ruleDay += 7 * (weeks + 1);
@@ -290,7 +290,7 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
int32_t month = fDateTimeRule->getRuleMonth();
int32_t dom = fDateTimeRule->getRuleDayOfMonth();
if (type == DateTimeRule::DOW_LEQ_DOM) {
- after = FALSE;
+ after = false;
// Handle Feb <=29
if (month == UCAL_FEBRUARY && dom == 29 && !Grego::isLeapYear(year)) {
dom--;
@@ -315,16 +315,16 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
if (fDateTimeRule->getTimeRuleType() == DateTimeRule::WALL_TIME) {
result -= prevDSTSavings;
}
- return TRUE;
+ return true;
}
UBool
AnnualTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
if (this == &other) {
- return TRUE;
+ return true;
}
- if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == FALSE) {
- return FALSE;
+ if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == false) {
+ return false;
}
AnnualTimeZoneRule* that = (AnnualTimeZoneRule*)&other;
return (*fDateTimeRule == *(that->fDateTimeRule) &&
@@ -344,7 +344,7 @@ AnnualTimeZoneRule::getFinalStart(int32_t prevRawOffset,
int32_t prevDSTSavings,
UDate& result) const {
if (fEndYear == MAX_YEAR) {
- return FALSE;
+ return false;
}
return getStartInYear(fEndYear, prevRawOffset, prevDSTSavings, result);
}
@@ -367,10 +367,10 @@ AnnualTimeZoneRule::getNextStart(UDate base,
return getStartInYear(year + 1, prevRawOffset, prevDSTSavings, result);
} else {
result = tmp;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
UBool
@@ -391,10 +391,10 @@ AnnualTimeZoneRule::getPreviousStart(UDate base,
return getStartInYear(year - 1, prevRawOffset, prevDSTSavings, result);
} else {
result = tmp;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeArrayTimeZoneRule)
@@ -406,7 +406,7 @@ TimeArrayTimeZoneRule::TimeArrayTimeZoneRule(const UnicodeString& name,
int32_t numStartTimes,
DateTimeRule::TimeRuleType timeRuleType)
: TimeZoneRule(name, rawOffset, dstSavings), fTimeRuleType(timeRuleType),
- fStartTimes(NULL) {
+ fStartTimes(nullptr) {
UErrorCode status = U_ZERO_ERROR;
initStartTimes(startTimes, numStartTimes, status);
//TODO - status?
@@ -414,7 +414,7 @@ TimeArrayTimeZoneRule::TimeArrayTimeZoneRule(const UnicodeString& name,
TimeArrayTimeZoneRule::TimeArrayTimeZoneRule(const TimeArrayTimeZoneRule& source)
-: TimeZoneRule(source), fTimeRuleType(source.fTimeRuleType), fStartTimes(NULL) {
+: TimeZoneRule(source), fTimeRuleType(source.fTimeRuleType), fStartTimes(nullptr) {
UErrorCode status = U_ZERO_ERROR;
initStartTimes(source.fStartTimes, source.fNumStartTimes, status);
//TODO - status?
@@ -422,13 +422,13 @@ TimeArrayTimeZoneRule::TimeArrayTimeZoneRule(const TimeArrayTimeZoneRule& source
TimeArrayTimeZoneRule::~TimeArrayTimeZoneRule() {
- if (fStartTimes != NULL && fStartTimes != fLocalStartTimes) {
+ if (fStartTimes != nullptr && fStartTimes != fLocalStartTimes) {
uprv_free(fStartTimes);
}
}
TimeArrayTimeZoneRule*
-TimeArrayTimeZoneRule::clone(void) const {
+TimeArrayTimeZoneRule::clone() const {
return new TimeArrayTimeZoneRule(*this);
}
@@ -475,42 +475,42 @@ TimeArrayTimeZoneRule::operator!=(const TimeZoneRule& that) const {
}
DateTimeRule::TimeRuleType
-TimeArrayTimeZoneRule::getTimeType(void) const {
+TimeArrayTimeZoneRule::getTimeType() const {
return fTimeRuleType;
}
UBool
TimeArrayTimeZoneRule::getStartTimeAt(int32_t index, UDate& result) const {
if (index >= fNumStartTimes || index < 0) {
- return FALSE;
+ return false;
}
result = fStartTimes[index];
- return TRUE;
+ return true;
}
int32_t
-TimeArrayTimeZoneRule::countStartTimes(void) const {
+TimeArrayTimeZoneRule::countStartTimes() const {
return fNumStartTimes;
}
UBool
TimeArrayTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
if (this == &other) {
- return TRUE;
+ return true;
}
- if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == FALSE) {
- return FALSE;
+ if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == false) {
+ return false;
}
TimeArrayTimeZoneRule* that = (TimeArrayTimeZoneRule*)&other;
if (fTimeRuleType != that->fTimeRuleType ||
fNumStartTimes != that->fNumStartTimes) {
- return FALSE;
+ return false;
}
// Compare start times
- UBool res = TRUE;
+ UBool res = true;
for (int32_t i = 0; i < fNumStartTimes; i++) {
if (fStartTimes[i] != that->fStartTimes[i]) {
- res = FALSE;
+ res = false;
break;
}
}
@@ -521,22 +521,22 @@ UBool
TimeArrayTimeZoneRule::getFirstStart(int32_t prevRawOffset,
int32_t prevDSTSavings,
UDate& result) const {
- if (fNumStartTimes <= 0 || fStartTimes == NULL) {
- return FALSE;
+ if (fNumStartTimes <= 0 || fStartTimes == nullptr) {
+ return false;
}
result = getUTC(fStartTimes[0], prevRawOffset, prevDSTSavings);
- return TRUE;
+ return true;
}
UBool
TimeArrayTimeZoneRule::getFinalStart(int32_t prevRawOffset,
int32_t prevDSTSavings,
UDate& result) const {
- if (fNumStartTimes <= 0 || fStartTimes == NULL) {
- return FALSE;
+ if (fNumStartTimes <= 0 || fStartTimes == nullptr) {
+ return false;
}
result = getUTC(fStartTimes[fNumStartTimes - 1], prevRawOffset, prevDSTSavings);
- return TRUE;
+ return true;
}
UBool
@@ -554,9 +554,9 @@ TimeArrayTimeZoneRule::getNextStart(UDate base,
result = time;
}
if (i == fNumStartTimes - 1) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
UBool
@@ -570,10 +570,10 @@ TimeArrayTimeZoneRule::getPreviousStart(UDate base,
UDate time = getUTC(fStartTimes[i], prevRawOffset, prevDSTSavings);
if (time < base || (inclusive && time == base)) {
result = time;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -582,16 +582,16 @@ TimeArrayTimeZoneRule::getPreviousStart(UDate base,
UBool
TimeArrayTimeZoneRule::initStartTimes(const UDate source[], int32_t size, UErrorCode& status) {
// Free old array
- if (fStartTimes != NULL && fStartTimes != fLocalStartTimes) {
+ if (fStartTimes != nullptr && fStartTimes != fLocalStartTimes) {
uprv_free(fStartTimes);
}
// Allocate new one if needed
if (size > TIMEARRAY_STACK_BUFFER_SIZE) {
fStartTimes = (UDate*)uprv_malloc(sizeof(UDate)*size);
- if (fStartTimes == NULL) {
+ if (fStartTimes == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
fNumStartTimes = 0;
- return FALSE;
+ return false;
}
} else {
fStartTimes = (UDate*)fLocalStartTimes;
@@ -599,15 +599,15 @@ TimeArrayTimeZoneRule::initStartTimes(const UDate source[], int32_t size, UError
uprv_memcpy(fStartTimes, source, sizeof(UDate)*size);
fNumStartTimes = size;
// Sort dates
- uprv_sortArray(fStartTimes, fNumStartTimes, (int32_t)sizeof(UDate), compareDates, NULL, TRUE, &status);
+ uprv_sortArray(fStartTimes, fNumStartTimes, (int32_t)sizeof(UDate), compareDates, nullptr, true, &status);
if (U_FAILURE(status)) {
- if (fStartTimes != NULL && fStartTimes != fLocalStartTimes) {
+ if (fStartTimes != nullptr && fStartTimes != fLocalStartTimes) {
uprv_free(fStartTimes);
}
fNumStartTimes = 0;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
UDate
diff --git a/contrib/libs/icu/i18n/tztrans.cpp b/contrib/libs/icu/i18n/tztrans.cpp
index 900e4be5408..dbce3422020 100644
--- a/contrib/libs/icu/i18n/tztrans.cpp
+++ b/contrib/libs/icu/i18n/tztrans.cpp
@@ -25,31 +25,31 @@ TimeZoneTransition::TimeZoneTransition(UDate time, const TimeZoneRule& from, con
}
TimeZoneTransition::TimeZoneTransition()
-: UObject(), fTime(0), fFrom(NULL), fTo(NULL) {
+: UObject(), fTime(0), fFrom(nullptr), fTo(nullptr) {
}
TimeZoneTransition::TimeZoneTransition(const TimeZoneTransition& source)
-: UObject(), fTime(source.fTime), fFrom(NULL), fTo(NULL) {
- if (source.fFrom != NULL) {
+: UObject(), fTime(source.fTime), fFrom(nullptr), fTo(nullptr) {
+ if (source.fFrom != nullptr) {
fFrom = source.fFrom->clone();
}
- if (source.fTo != NULL) {
+ if (source.fTo != nullptr) {
fTo = source.fTo->clone();
}
}
TimeZoneTransition::~TimeZoneTransition() {
- if (fFrom != NULL) {
+ if (fFrom != nullptr) {
delete fFrom;
}
- if (fTo != NULL) {
+ if (fTo != nullptr) {
delete fTo;
}
}
TimeZoneTransition*
-TimeZoneTransition::clone(void) const {
+TimeZoneTransition::clone() const {
return new TimeZoneTransition(*this);
}
@@ -74,10 +74,10 @@ TimeZoneTransition::operator==(const TimeZoneTransition& that) const {
if (fTime != that.fTime) {
return false;
}
- if ((fFrom == NULL && that.fFrom == NULL)
- || (fFrom != NULL && that.fFrom != NULL && *fFrom == *(that.fFrom))) {
- if ((fTo == NULL && that.fTo == NULL)
- || (fTo != NULL && that.fTo != NULL && *fTo == *(that.fTo))) {
+ if ((fFrom == nullptr && that.fFrom == nullptr)
+ || (fFrom != nullptr && that.fFrom != nullptr && *fFrom == *(that.fFrom))) {
+ if ((fTo == nullptr && that.fTo == nullptr)
+ || (fTo != nullptr && that.fTo != nullptr && *fTo == *(that.fTo))) {
return true;
}
}
@@ -96,7 +96,7 @@ TimeZoneTransition::setTime(UDate time) {
void
TimeZoneTransition::setFrom(const TimeZoneRule& from) {
- if (fFrom != NULL) {
+ if (fFrom != nullptr) {
delete fFrom;
}
fFrom = from.clone();
@@ -104,7 +104,7 @@ TimeZoneTransition::setFrom(const TimeZoneRule& from) {
void
TimeZoneTransition::adoptFrom(TimeZoneRule* from) {
- if (fFrom != NULL) {
+ if (fFrom != nullptr) {
delete fFrom;
}
fFrom = from;
@@ -112,7 +112,7 @@ TimeZoneTransition::adoptFrom(TimeZoneRule* from) {
void
TimeZoneTransition::setTo(const TimeZoneRule& to) {
- if (fTo != NULL) {
+ if (fTo != nullptr) {
delete fTo;
}
fTo = to.clone();
@@ -120,24 +120,24 @@ TimeZoneTransition::setTo(const TimeZoneRule& to) {
void
TimeZoneTransition::adoptTo(TimeZoneRule* to) {
- if (fTo != NULL) {
+ if (fTo != nullptr) {
delete fTo;
}
fTo = to;
}
UDate
-TimeZoneTransition::getTime(void) const {
+TimeZoneTransition::getTime() const {
return fTime;
}
const TimeZoneRule*
-TimeZoneTransition::getTo(void) const {
+TimeZoneTransition::getTo() const {
return fTo;
}
const TimeZoneRule*
-TimeZoneTransition::getFrom(void) const {
+TimeZoneTransition::getFrom() const {
return fFrom;
}
diff --git a/contrib/libs/icu/i18n/ucal.cpp b/contrib/libs/icu/i18n/ucal.cpp
index 33f72589c50..18d9cf4ec7e 100644
--- a/contrib/libs/icu/i18n/ucal.cpp
+++ b/contrib/libs/icu/i18n/ucal.cpp
@@ -32,7 +32,7 @@
U_NAMESPACE_USE
static TimeZone*
-_createTimeZone(const UChar* zoneID, int32_t len, UErrorCode* ec) {
+_createTimeZone(const char16_t* zoneID, int32_t len, UErrorCode* ec) {
TimeZone* zone = nullptr;
if (ec != nullptr && U_SUCCESS(*ec)) {
// Note that if zoneID is invalid, we get back GMT. This odd
@@ -67,7 +67,7 @@ ucal_openCountryTimeZones(const char* country, UErrorCode* ec) {
}
U_CAPI int32_t U_EXPORT2
-ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec) {
+ucal_getDefaultTimeZone(char16_t* result, int32_t resultCapacity, UErrorCode* ec) {
int32_t len = 0;
if (ec != nullptr && U_SUCCESS(*ec)) {
TimeZone* zone = TimeZone::createDefault();
@@ -84,7 +84,7 @@ ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec) {
}
U_CAPI void U_EXPORT2
-ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec) {
+ucal_setDefaultTimeZone(const char16_t* zoneID, UErrorCode* ec) {
TimeZone* zone = _createTimeZone(zoneID, -1, ec);
if (zone != nullptr) {
TimeZone::adoptDefault(zone);
@@ -92,7 +92,7 @@ ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec) {
}
U_CAPI int32_t U_EXPORT2
-ucal_getHostTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec) {
+ucal_getHostTimeZone(char16_t* result, int32_t resultCapacity, UErrorCode* ec) {
int32_t len = 0;
if (ec != nullptr && U_SUCCESS(*ec)) {
TimeZone *zone = TimeZone::detectHostTimeZone();
@@ -109,7 +109,7 @@ ucal_getHostTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec) {
}
U_CAPI int32_t U_EXPORT2
-ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec) {
+ucal_getDSTSavings(const char16_t* zoneID, UErrorCode* ec) {
int32_t result = 0;
TimeZone* zone = _createTimeZone(zoneID, -1, ec);
if (U_SUCCESS(*ec)) {
@@ -124,7 +124,7 @@ ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec) {
UDate d = Calendar::getNow();
for (int32_t i=0; i<53; ++i, d+=U_MILLIS_PER_DAY*7.0) {
int32_t raw, dst;
- zone->getOffset(d, FALSE, raw, dst, *ec);
+ zone->getOffset(d, false, raw, dst, *ec);
if (U_FAILURE(*ec)) {
break;
} else if (dst != 0) {
@@ -148,7 +148,7 @@ ucal_getNow()
#define ULOC_LOCALE_IDENTIFIER_CAPACITY (ULOC_FULLNAME_CAPACITY + 1 + ULOC_KEYWORD_AND_VALUES_CAPACITY)
U_CAPI UCalendar* U_EXPORT2
-ucal_open( const UChar* zoneID,
+ucal_open( const char16_t* zoneID,
int32_t len,
const char* locale,
UCalendarType caltype,
@@ -211,7 +211,7 @@ ucal_clone(const UCalendar* cal,
U_CAPI void U_EXPORT2
ucal_setTimeZone( UCalendar* cal,
- const UChar* zoneID,
+ const char16_t* zoneID,
int32_t len,
UErrorCode *status)
{
@@ -229,7 +229,7 @@ ucal_setTimeZone( UCalendar* cal,
U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneID(const UCalendar *cal,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status)
{
@@ -246,7 +246,7 @@ U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneDisplayName(const UCalendar* cal,
UCalendarDisplayNameType type,
const char *locale,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UErrorCode* status)
{
@@ -263,19 +263,19 @@ ucal_getTimeZoneDisplayName(const UCalendar* cal,
switch(type) {
case UCAL_STANDARD:
- tz.getDisplayName(FALSE, TimeZone::LONG, Locale(locale), id);
+ tz.getDisplayName(false, TimeZone::LONG, Locale(locale), id);
break;
case UCAL_SHORT_STANDARD:
- tz.getDisplayName(FALSE, TimeZone::SHORT, Locale(locale), id);
+ tz.getDisplayName(false, TimeZone::SHORT, Locale(locale), id);
break;
case UCAL_DST:
- tz.getDisplayName(TRUE, TimeZone::LONG, Locale(locale), id);
+ tz.getDisplayName(true, TimeZone::LONG, Locale(locale), id);
break;
case UCAL_SHORT_DST:
- tz.getDisplayName(TRUE, TimeZone::SHORT, Locale(locale), id);
+ tz.getDisplayName(true, TimeZone::SHORT, Locale(locale), id);
break;
}
@@ -338,9 +338,7 @@ ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode) {
U_CAPI int32_t U_EXPORT2
ucal_getAttribute( const UCalendar* cal,
- UCalendarAttribute attr)
-{
-
+ UCalendarAttribute attr) UPRV_NO_SANITIZE_UNDEFINED {
switch(attr) {
case UCAL_LENIENT:
return ((Calendar*)cal)->isLenient();
@@ -468,10 +466,12 @@ U_CAPI void U_EXPORT2
ucal_add( UCalendar* cal,
UCalendarDateFields field,
int32_t amount,
- UErrorCode* status)
-{
-
+ UErrorCode* status) UPRV_NO_SANITIZE_UNDEFINED {
if(U_FAILURE(*status)) return;
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
((Calendar*)cal)->add(field, amount, *status);
}
@@ -480,10 +480,12 @@ U_CAPI void U_EXPORT2
ucal_roll( UCalendar* cal,
UCalendarDateFields field,
int32_t amount,
- UErrorCode* status)
-{
-
+ UErrorCode* status) UPRV_NO_SANITIZE_UNDEFINED {
if(U_FAILURE(*status)) return;
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
((Calendar*)cal)->roll(field, amount, *status);
}
@@ -491,10 +493,12 @@ ucal_roll( UCalendar* cal,
U_CAPI int32_t U_EXPORT2
ucal_get( const UCalendar* cal,
UCalendarDateFields field,
- UErrorCode* status )
-{
-
+ UErrorCode* status ) UPRV_NO_SANITIZE_UNDEFINED {
if(U_FAILURE(*status)) return -1;
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return -1;
+ }
return ((Calendar*)cal)->get(field, *status);
}
@@ -502,24 +506,30 @@ ucal_get( const UCalendar* cal,
U_CAPI void U_EXPORT2
ucal_set( UCalendar* cal,
UCalendarDateFields field,
- int32_t value)
-{
+ int32_t value) UPRV_NO_SANITIZE_UNDEFINED {
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ return;
+ }
((Calendar*)cal)->set(field, value);
}
U_CAPI UBool U_EXPORT2
ucal_isSet( const UCalendar* cal,
- UCalendarDateFields field)
-{
+ UCalendarDateFields field) UPRV_NO_SANITIZE_UNDEFINED {
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ return false;
+ }
return ((Calendar*)cal)->isSet(field);
}
U_CAPI void U_EXPORT2
ucal_clearField( UCalendar* cal,
- UCalendarDateFields field)
-{
+ UCalendarDateFields field) UPRV_NO_SANITIZE_UNDEFINED {
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ return;
+ }
((Calendar*)cal)->clear(field);
}
@@ -535,12 +545,14 @@ U_CAPI int32_t U_EXPORT2
ucal_getLimit( const UCalendar* cal,
UCalendarDateFields field,
UCalendarLimitType type,
- UErrorCode *status)
-{
-
+ UErrorCode *status) UPRV_NO_SANITIZE_UNDEFINED {
if(status==0 || U_FAILURE(*status)) {
return -1;
}
+ if (field < 0 || UCAL_FIELD_COUNT <= field) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return -1;
+ }
switch(type) {
case UCAL_MINIMUM:
@@ -588,13 +600,13 @@ 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) {
+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)) {
return 0;
}
if (isSystemID) {
- *isSystemID = FALSE;
+ *isSystemID = false;
}
if (id == 0 || len == 0 || result == 0 || resultCapacity <= 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -602,7 +614,7 @@ ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
}
int32_t reslen = 0;
UnicodeString canonical;
- UBool systemID = FALSE;
+ UBool systemID = false;
TimeZone::getCanonicalID(UnicodeString(id, len), canonical, systemID, *status);
if (U_SUCCESS(*status)) {
if (isSystemID) {
@@ -644,7 +656,7 @@ U_CAPI UBool U_EXPORT2
ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status)
{
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
return ((Calendar*)cal)->isWeekend(date, *status);
}
@@ -697,7 +709,7 @@ 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);
+ (void)ulocimp_getRegionForSupplementalData(locale, true, prefRegion, sizeof(prefRegion), status);
// Read preferred calendar values from supplementalData calendarPreference
UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", status);
@@ -715,7 +727,7 @@ ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool
if (U_SUCCESS(*status)) {
for (int i = 0; i < ures_getSize(order); i++) {
int32_t len;
- const UChar *type = ures_getStringByIndex(order, i, &len, status);
+ const char16_t *type = ures_getStringByIndex(order, i, &len, status);
char *caltype = (char*)uprv_malloc(len + 1);
if (caltype == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
@@ -724,7 +736,7 @@ ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool
u_UCharsToChars(type, caltype, len);
*(caltype + len) = 0;
- ulist_addItemEndList(values, caltype, TRUE, status);
+ ulist_addItemEndList(values, caltype, true, status);
if (U_FAILURE(*status)) {
break;
}
@@ -734,7 +746,7 @@ ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool
// If not commonlyUsed, add other available values
for (int32_t i = 0; CAL_TYPES[i] != nullptr; i++) {
if (!ulist_containsString(values, CAL_TYPES[i], (int32_t)uprv_strlen(CAL_TYPES[i]))) {
- ulist_addItemEndList(values, CAL_TYPES[i], FALSE, status);
+ ulist_addItemEndList(values, CAL_TYPES[i], false, status);
if (U_FAILURE(*status)) {
break;
}
@@ -773,7 +785,7 @@ ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType typ
UDate* transition, UErrorCode* status)
{
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
UDate base = ((Calendar*)cal)->getTime(*status);
const TimeZone& tz = ((Calendar*)cal)->getTimeZone();
@@ -786,14 +798,14 @@ ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType typ
btz->getPreviousTransition(base, inclusive, tzt);
if (result) {
*transition = tzt.getTime();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
U_CAPI int32_t U_EXPORT2
-ucal_getWindowsTimeZoneID(const UChar* id, int32_t len, UChar* winid, int32_t winidCapacity, UErrorCode* status) {
+ucal_getWindowsTimeZoneID(const char16_t* id, int32_t len, char16_t* winid, int32_t winidCapacity, UErrorCode* status) {
if (U_FAILURE(*status)) {
return 0;
}
@@ -811,7 +823,7 @@ ucal_getWindowsTimeZoneID(const UChar* id, int32_t len, UChar* winid, int32_t wi
}
U_CAPI int32_t U_EXPORT2
-ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region, UChar* id, int32_t idCapacity, UErrorCode* status) {
+ucal_getTimeZoneIDForWindowsID(const char16_t* winid, int32_t len, const char* region, char16_t* id, int32_t idCapacity, UErrorCode* status) {
if (U_FAILURE(*status)) {
return 0;
}
diff --git a/contrib/libs/icu/i18n/ucln_in.cpp b/contrib/libs/icu/i18n/ucln_in.cpp
index f29cbe41dde..a67487bcc6c 100644
--- a/contrib/libs/icu/i18n/ucln_in.cpp
+++ b/contrib/libs/icu/i18n/ucln_in.cpp
@@ -30,7 +30,7 @@ static const char copyright[] = U_COPYRIGHT_STRING;
static cleanupFunc *gCleanupFunctions[UCLN_I18N_COUNT];
-static UBool U_CALLCONV i18n_cleanup(void)
+static UBool U_CALLCONV i18n_cleanup()
{
int32_t libType = UCLN_I18N_START;
(void)copyright; /* Suppress unused variable warning with clang. */
@@ -39,13 +39,13 @@ static UBool U_CALLCONV i18n_cleanup(void)
if (gCleanupFunctions[libType])
{
gCleanupFunctions[libType]();
- gCleanupFunctions[libType] = NULL;
+ gCleanupFunctions[libType] = nullptr;
}
}
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
ucln_unRegisterAutomaticCleanup();
#endif
- return TRUE;
+ return true;
}
void ucln_i18n_registerCleanup(ECleanupI18NType type,
diff --git a/contrib/libs/icu/i18n/ucol.cpp b/contrib/libs/icu/i18n/ucol.cpp
index f59333ede3c..7c9fb00bf3f 100644
--- a/contrib/libs/icu/i18n/ucol.cpp
+++ b/contrib/libs/icu/i18n/ucol.cpp
@@ -43,18 +43,18 @@ ucol_openBinary(const uint8_t *bin, int32_t length,
const UCollator *base,
UErrorCode *status)
{
- if(U_FAILURE(*status)) { return NULL; }
+ if(U_FAILURE(*status)) { return nullptr; }
RuleBasedCollator *coll = new RuleBasedCollator(
bin, length,
RuleBasedCollator::rbcFromUCollator(base),
*status);
- if(coll == NULL) {
+ if(coll == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if(U_FAILURE(*status)) {
delete coll;
- return NULL;
+ return nullptr;
}
return coll->toUCollator();
}
@@ -68,7 +68,7 @@ ucol_cloneBinary(const UCollator *coll,
return 0;
}
const RuleBasedCollator *rbc = RuleBasedCollator::rbcFromUCollator(coll);
- if(rbc == NULL && coll != NULL) {
+ if(rbc == nullptr && coll != nullptr) {
*status = U_UNSUPPORTED_ERROR;
return 0;
}
@@ -78,36 +78,42 @@ ucol_cloneBinary(const UCollator *coll,
U_CAPI UCollator* U_EXPORT2
ucol_safeClone(const UCollator *coll, void * /*stackBuffer*/, int32_t * pBufferSize, UErrorCode *status)
{
- if (status == NULL || U_FAILURE(*status)){
- return NULL;
+ if (status == nullptr || U_FAILURE(*status)){
+ return nullptr;
}
- if (coll == NULL) {
+ if (coll == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
- if (pBufferSize != NULL) {
+ if (pBufferSize != nullptr) {
int32_t inputSize = *pBufferSize;
*pBufferSize = 1;
if (inputSize == 0) {
- return NULL; // preflighting for deprecated functionality
+ return nullptr; // preflighting for deprecated functionality
}
}
Collator *newColl = Collator::fromUCollator(coll)->clone();
- if (newColl == NULL) {
+ if (newColl == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return nullptr;
- } else {
+ } else if (pBufferSize != nullptr) {
*status = U_SAFECLONE_ALLOCATED_WARNING;
}
return newColl->toUCollator();
}
+U_CAPI UCollator* U_EXPORT2
+ucol_clone(const UCollator *coll, UErrorCode *status)
+{
+ return ucol_safeClone(coll, nullptr, nullptr, status);
+}
+
U_CAPI void U_EXPORT2
ucol_close(UCollator *coll)
{
UTRACE_ENTRY_OC(UTRACE_UCOL_CLOSE);
UTRACE_DATA1(UTRACE_INFO, "coll = %p", coll);
- if(coll != NULL) {
+ if(coll != nullptr) {
delete Collator::fromUCollator(coll);
}
UTRACE_EXIT();
@@ -118,12 +124,12 @@ ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
const uint8_t *src2, int32_t src2Length,
uint8_t *dest, int32_t destCapacity) {
/* check arguments */
- if( src1==NULL || src1Length<-1 || src1Length==0 || (src1Length>0 && src1[src1Length-1]!=0) ||
- src2==NULL || src2Length<-1 || src2Length==0 || (src2Length>0 && src2[src2Length-1]!=0) ||
- destCapacity<0 || (destCapacity>0 && dest==NULL)
+ if( src1==nullptr || src1Length<-1 || src1Length==0 || (src1Length>0 && src1[src1Length-1]!=0) ||
+ src2==nullptr || src2Length<-1 || src2Length==0 || (src2Length>0 && src2[src2Length-1]!=0) ||
+ destCapacity<0 || (destCapacity>0 && dest==nullptr)
) {
/* error, attempt to write a zero byte and return 0 */
- if(dest!=NULL && destCapacity>0) {
+ if(dest!=nullptr && destCapacity>0) {
*dest=0;
}
return 0;
@@ -190,7 +196,7 @@ ucol_mergeSortkeys(const uint8_t *src1, int32_t src1Length,
U_CAPI int32_t U_EXPORT2
ucol_getSortKey(const UCollator *coll,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
uint8_t *result,
int32_t resultLength)
@@ -198,7 +204,7 @@ ucol_getSortKey(const UCollator *coll,
UTRACE_ENTRY(UTRACE_UCOL_GET_SORTKEY);
if (UTRACE_LEVEL(UTRACE_VERBOSE)) {
UTRACE_DATA3(UTRACE_VERBOSE, "coll=%p, source string = %vh ", coll, source,
- ((sourceLength==-1 && source!=NULL) ? u_strlen(source) : sourceLength));
+ ((sourceLength==-1 && source!=nullptr) ? u_strlen(source) : sourceLength));
}
int32_t keySize = Collator::fromUCollator(coll)->
@@ -217,7 +223,7 @@ ucol_nextSortKeyPart(const UCollator *coll,
UErrorCode *status)
{
/* error checking */
- if(status==NULL || U_FAILURE(*status)) {
+ if(status==nullptr || U_FAILURE(*status)) {
return 0;
}
UTRACE_ENTRY(UTRACE_UCOL_NEXTSORTKEYPART);
@@ -247,10 +253,10 @@ ucol_getBound(const uint8_t *source,
UErrorCode *status)
{
// consistency checks
- if(status == NULL || U_FAILURE(*status)) {
+ if(status == nullptr || U_FAILURE(*status)) {
return 0;
}
- if(source == NULL) {
+ if(source == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -275,7 +281,7 @@ ucol_getBound(const uint8_t *source,
// enum will not changes. They are set so that the enum value
// corresponds to the number of extra bytes each bound type
// needs.
- if(result != NULL && resultLength >= sourceIndex+boundType) {
+ if(result != nullptr && resultLength >= sourceIndex+boundType) {
uprv_memcpy(result, source, sourceIndex);
switch(boundType) {
// Lower bound just gets terminated. No extra bytes
@@ -314,15 +320,15 @@ ucol_getMaxVariable(const UCollator *coll) {
}
U_CAPI uint32_t U_EXPORT2
-ucol_setVariableTop(UCollator *coll, const UChar *varTop, int32_t len, UErrorCode *status) {
- if(U_FAILURE(*status) || coll == NULL) {
+ucol_setVariableTop(UCollator *coll, const char16_t *varTop, int32_t len, UErrorCode *status) {
+ if(U_FAILURE(*status) || coll == nullptr) {
return 0;
}
return Collator::fromUCollator(coll)->setVariableTop(varTop, len, *status);
}
U_CAPI uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode *status) {
- if(U_FAILURE(*status) || coll == NULL) {
+ if(U_FAILURE(*status) || coll == nullptr) {
return 0;
}
return Collator::fromUCollator(coll)->getVariableTop(*status);
@@ -330,7 +336,7 @@ U_CAPI uint32_t U_EXPORT2 ucol_getVariableTop(const UCollator *coll, UErrorCode
U_CAPI void U_EXPORT2
ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *status) {
- if(U_FAILURE(*status) || coll == NULL) {
+ if(U_FAILURE(*status) || coll == nullptr) {
return;
}
Collator::fromUCollator(coll)->setVariableTop(varTop, *status);
@@ -338,7 +344,7 @@ ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *stat
U_CAPI void U_EXPORT2
ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status) {
- if(U_FAILURE(*status) || coll == NULL) {
+ if(U_FAILURE(*status) || coll == nullptr) {
return;
}
@@ -347,7 +353,7 @@ ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value,
U_CAPI UColAttributeValue U_EXPORT2
ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status) {
- if(U_FAILURE(*status) || coll == NULL) {
+ if(U_FAILURE(*status) || coll == nullptr) {
return UCOL_DEFAULT;
}
@@ -421,7 +427,7 @@ ucol_strcollIter( const UCollator *coll,
UTRACE_ENTRY(UTRACE_UCOL_STRCOLLITER);
UTRACE_DATA3(UTRACE_VERBOSE, "coll=%p, sIter=%p, tIter=%p", coll, sIter, tIter);
- if(sIter == NULL || tIter == NULL || coll == NULL) {
+ if(sIter == nullptr || tIter == nullptr || coll == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
UTRACE_EXIT_VALUE_STATUS(UCOL_EQUAL, *status);
return UCOL_EQUAL;
@@ -439,9 +445,9 @@ ucol_strcollIter( const UCollator *coll,
/* */
U_CAPI UCollationResult U_EXPORT2
ucol_strcoll( const UCollator *coll,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
- const UChar *target,
+ const char16_t *target,
int32_t targetLength)
{
UTRACE_ENTRY(UTRACE_UCOL_STRCOLL);
@@ -490,9 +496,9 @@ ucol_strcollUTF8(
/* convenience function for comparing strings */
U_CAPI UBool U_EXPORT2
ucol_greater( const UCollator *coll,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
- const UChar *target,
+ const char16_t *target,
int32_t targetLength)
{
return (ucol_strcoll(coll, source, sourceLength, target, targetLength)
@@ -502,9 +508,9 @@ ucol_greater( const UCollator *coll,
/* convenience function for comparing strings */
U_CAPI UBool U_EXPORT2
ucol_greaterOrEqual( const UCollator *coll,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
- const UChar *target,
+ const char16_t *target,
int32_t targetLength)
{
return (ucol_strcoll(coll, source, sourceLength, target, targetLength)
@@ -514,9 +520,9 @@ ucol_greaterOrEqual( const UCollator *coll,
/* convenience function for comparing strings */
U_CAPI UBool U_EXPORT2
ucol_equal( const UCollator *coll,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
- const UChar *target,
+ const char16_t *target,
int32_t targetLength)
{
return (ucol_strcoll(coll, source, sourceLength, target, targetLength)
@@ -526,7 +532,7 @@ ucol_equal( const UCollator *coll,
U_CAPI void U_EXPORT2
ucol_getUCAVersion(const UCollator* coll, UVersionInfo info) {
const Collator *c = Collator::fromUCollator(coll);
- if(c != NULL) {
+ if(c != nullptr) {
UVersionInfo v;
c->getVersion(v);
// Note: This is tied to how the current implementation encodes the UCA version
@@ -542,29 +548,29 @@ ucol_getUCAVersion(const UCollator* coll, UVersionInfo info) {
}
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
ucol_getRules(const UCollator *coll, int32_t *length) {
const RuleBasedCollator *rbc = RuleBasedCollator::rbcFromUCollator(coll);
- // OK to crash if coll==NULL: We do not want to check "this" pointers.
- if(rbc != NULL || coll == NULL) {
+ // OK to crash if coll==nullptr: We do not want to check "this" pointers.
+ if(rbc != nullptr || coll == nullptr) {
const UnicodeString &rules = rbc->getRules();
U_ASSERT(rules.getBuffer()[rules.length()] == 0);
*length = rules.length();
return rules.getBuffer();
}
- static const UChar _NUL = 0;
+ static const char16_t _NUL = 0;
*length = 0;
return &_NUL;
}
U_CAPI int32_t U_EXPORT2
-ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, UChar *buffer, int32_t bufferLen) {
+ucol_getRulesEx(const UCollator *coll, UColRuleOption delta, char16_t *buffer, int32_t bufferLen) {
UnicodeString rules;
const RuleBasedCollator *rbc = RuleBasedCollator::rbcFromUCollator(coll);
- if(rbc != NULL || coll == NULL) {
+ if(rbc != nullptr || coll == nullptr) {
rbc->getRules(delta, rules);
}
- if(buffer != NULL && bufferLen > 0) {
+ if(buffer != nullptr && bufferLen > 0) {
UErrorCode errorCode = U_ZERO_ERROR;
return rules.extract(buffer, bufferLen, errorCode);
} else {
@@ -580,16 +586,16 @@ ucol_getLocale(const UCollator *coll, ULocDataLocaleType type, UErrorCode *statu
U_CAPI const char * U_EXPORT2
ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode *status) {
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
UTRACE_ENTRY(UTRACE_UCOL_GETLOCALE);
UTRACE_DATA1(UTRACE_INFO, "coll=%p", coll);
const char *result;
const RuleBasedCollator *rbc = RuleBasedCollator::rbcFromUCollator(coll);
- if(rbc == NULL && coll != NULL) {
+ if(rbc == nullptr && coll != nullptr) {
*status = U_UNSUPPORTED_ERROR;
- result = NULL;
+ result = nullptr;
} else {
result = rbc->internalGetLocaleID(type, *status);
}
@@ -602,12 +608,12 @@ ucol_getLocaleByType(const UCollator *coll, ULocDataLocaleType type, UErrorCode
U_CAPI USet * U_EXPORT2
ucol_getTailoredSet(const UCollator *coll, UErrorCode *status) {
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
UnicodeSet *set = Collator::fromUCollator(coll)->getTailoredSet(*status);
if(U_FAILURE(*status)) {
delete set;
- return NULL;
+ return nullptr;
}
return set->toUSet();
}
diff --git a/contrib/libs/icu/i18n/ucol_res.cpp b/contrib/libs/icu/i18n/ucol_res.cpp
index b277cf3b280..9bf28db264f 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 UChar *rootRules = NULL;
+static const char16_t *rootRules = nullptr;
static int32_t rootRulesLength = 0;
-static UResourceBundle *rootBundle = NULL;
-static UInitOnce gInitOnceUcolRes = U_INITONCE_INITIALIZER;
+static UResourceBundle *rootBundle = nullptr;
+static UInitOnce gInitOnceUcolRes {};
} // namespace
@@ -70,12 +70,12 @@ U_CDECL_BEGIN
static UBool U_CALLCONV
ucol_res_cleanup() {
- rootRules = NULL;
+ rootRules = nullptr;
rootRulesLength = 0;
ures_close(rootBundle);
- rootBundle = NULL;
+ rootBundle = nullptr;
gInitOnceUcolRes.reset();
- return TRUE;
+ return true;
}
void U_CALLCONV
@@ -86,7 +86,7 @@ CollationLoader::loadRootRules(UErrorCode &errorCode) {
rootRules = ures_getStringByKey(rootBundle, "UCARules", &rootRulesLength, &errorCode);
if(U_FAILURE(errorCode)) {
ures_close(rootBundle);
- rootBundle = NULL;
+ rootBundle = nullptr;
return;
}
ucln_i18n_registerCleanup(UCLN_I18N_UCOL_RES, ucol_res_cleanup);
@@ -107,7 +107,7 @@ void
CollationLoader::loadRules(const char *localeID, const char *collationType,
UnicodeString &rules, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { return; }
- U_ASSERT(collationType != NULL && *collationType != 0);
+ U_ASSERT(collationType != nullptr && *collationType != 0);
// Copy the type for lowercasing.
char type[16];
int32_t typeLength = static_cast<int32_t>(uprv_strlen(collationType));
@@ -120,11 +120,11 @@ CollationLoader::loadRules(const char *localeID, const char *collationType,
LocalUResourceBundlePointer bundle(ures_open(U_ICUDATA_COLL, localeID, &errorCode));
LocalUResourceBundlePointer collations(
- ures_getByKey(bundle.getAlias(), "collations", NULL, &errorCode));
+ ures_getByKey(bundle.getAlias(), "collations", nullptr, &errorCode));
LocalUResourceBundlePointer data(
- ures_getByKeyWithFallback(collations.getAlias(), type, NULL, &errorCode));
+ ures_getByKeyWithFallback(collations.getAlias(), type, nullptr, &errorCode));
int32_t length;
- const UChar *s = ures_getStringByKey(data.getAlias(), "Sequence", &length, &errorCode);
+ const char16_t *s = ures_getStringByKey(data.getAlias(), "Sequence", &length, &errorCode);
if(U_FAILURE(errorCode)) { return; }
// No string pointer aliasing so that we need not hold onto the resource bundle.
@@ -147,7 +147,7 @@ LocaleCacheKey<CollationCacheEntry>::createObject(const void *creationContext,
const CollationCacheEntry *
CollationLoader::loadTailoring(const Locale &locale, UErrorCode &errorCode) {
const CollationCacheEntry *rootEntry = CollationRoot::getRootCacheEntry(errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
const char *name = locale.getName();
if(*name == 0 || uprv_strcmp(name, "root") == 0) {
@@ -168,8 +168,8 @@ CollationLoader::CollationLoader(const CollationCacheEntry *re, const Locale &re
UErrorCode &errorCode)
: cache(UnifiedCache::getInstance(errorCode)), rootEntry(re),
validLocale(re->validLocale), locale(requested),
- typesTried(0), typeFallback(FALSE),
- bundle(NULL), collations(NULL), data(NULL) {
+ typesTried(0), typeFallback(false),
+ bundle(nullptr), collations(nullptr), data(nullptr) {
type[0] = 0;
defaultType[0] = 0;
if(U_FAILURE(errorCode)) { return; }
@@ -213,11 +213,11 @@ CollationLoader::createCacheEntry(UErrorCode &errorCode) {
// In a cache miss, cache.get() calls CacheKey::createObject(),
// which means that we progress via recursion.
// loadFromCollations() will recurse to itself as well for collation type fallback.
- if(bundle == NULL) {
+ if(bundle == nullptr) {
return loadFromLocale(errorCode);
- } else if(collations == NULL) {
+ } else if(collations == nullptr) {
return loadFromBundle(errorCode);
- } else if(data == NULL) {
+ } else if(data == nullptr) {
return loadFromCollations(errorCode);
} else {
return loadFromData(errorCode);
@@ -226,8 +226,8 @@ CollationLoader::createCacheEntry(UErrorCode &errorCode) {
const CollationCacheEntry *
CollationLoader::loadFromLocale(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
- U_ASSERT(bundle == NULL);
+ if(U_FAILURE(errorCode)) { return nullptr; }
+ U_ASSERT(bundle == nullptr);
bundle = ures_openNoDefault(U_ICUDATA_COLL, locale.getBaseName(), &errorCode);
if(errorCode == U_MISSING_RESOURCE_ERROR) {
errorCode = U_USING_DEFAULT_WARNING;
@@ -238,7 +238,7 @@ CollationLoader::loadFromLocale(UErrorCode &errorCode) {
}
Locale requestedLocale(locale);
const char *vLocale = ures_getLocaleByType(bundle, ULOC_ACTUAL_LOCALE, &errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
locale = validLocale = Locale(vLocale); // no type until loadFromCollations()
if(type[0] != 0) {
locale.setKeywordValue("collation", type, errorCode);
@@ -252,24 +252,24 @@ CollationLoader::loadFromLocale(UErrorCode &errorCode) {
const CollationCacheEntry *
CollationLoader::loadFromBundle(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
- U_ASSERT(collations == NULL);
+ if(U_FAILURE(errorCode)) { return nullptr; }
+ U_ASSERT(collations == nullptr);
// There are zero or more tailorings in the collations table.
- collations = ures_getByKey(bundle, "collations", NULL, &errorCode);
+ collations = ures_getByKey(bundle, "collations", nullptr, &errorCode);
if(errorCode == U_MISSING_RESOURCE_ERROR) {
errorCode = U_USING_DEFAULT_WARNING;
// Return the root tailoring with the validLocale, without collation type.
return makeCacheEntryFromRoot(validLocale, errorCode);
}
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
// Fetch the default type from the data.
{
UErrorCode internalErrorCode = U_ZERO_ERROR;
LocalUResourceBundlePointer def(
- ures_getByKeyWithFallback(collations, "default", NULL, &internalErrorCode));
+ ures_getByKeyWithFallback(collations, "default", nullptr, &internalErrorCode));
int32_t length;
- const UChar *s = ures_getString(def.getAlias(), &length, &internalErrorCode);
+ const char16_t *s = ures_getString(def.getAlias(), &length, &internalErrorCode);
if(U_SUCCESS(internalErrorCode) && 0 < length && length < UPRV_LENGTHOF(defaultType)) {
u_UCharsToChars(s, defaultType, length + 1);
} else {
@@ -313,15 +313,15 @@ CollationLoader::loadFromBundle(UErrorCode &errorCode) {
const CollationCacheEntry *
CollationLoader::loadFromCollations(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
- U_ASSERT(data == NULL);
+ if(U_FAILURE(errorCode)) { return nullptr; }
+ U_ASSERT(data == nullptr);
// Load the collations/type tailoring, with type fallback.
LocalUResourceBundlePointer localData(
- ures_getByKeyWithFallback(collations, type, NULL, &errorCode));
+ ures_getByKeyWithFallback(collations, type, nullptr, &errorCode));
int32_t typeLength = static_cast<int32_t>(uprv_strlen(type));
if(errorCode == U_MISSING_RESOURCE_ERROR) {
errorCode = U_USING_DEFAULT_WARNING;
- typeFallback = TRUE;
+ typeFallback = true;
if((typesTried & TRIED_SEARCH) == 0 &&
typeLength > 6 && uprv_strncmp(type, "search", 6) == 0) {
// fall back from something like "searchjl" to "search"
@@ -342,11 +342,11 @@ CollationLoader::loadFromCollations(UErrorCode &errorCode) {
locale.setKeywordValue("collation", type, errorCode);
return getCacheEntry(errorCode);
}
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
data = localData.orphan();
const char *actualLocale = ures_getLocaleByType(data, ULOC_ACTUAL_LOCALE, &errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
const char *vLocale = validLocale.getBaseName();
UBool actualAndValidLocalesAreDifferent = Locale(actualLocale) != Locale(vLocale);
@@ -355,7 +355,7 @@ CollationLoader::loadFromCollations(UErrorCode &errorCode) {
// For the valid locale, suppress the default type.
if(uprv_strcmp(type, defaultType) != 0) {
validLocale.setKeywordValue("collation", type, errorCode);
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
}
// Is this the same as the root collator? If so, then use that instead.
@@ -379,32 +379,32 @@ CollationLoader::loadFromCollations(UErrorCode &errorCode) {
const CollationCacheEntry *
CollationLoader::loadFromData(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
LocalPointer<CollationTailoring> t(new CollationTailoring(rootEntry->tailoring->settings));
if(t.isNull() || t->isBogus()) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
// deserialize
- LocalUResourceBundlePointer binary(ures_getByKey(data, "%%CollationBin", NULL, &errorCode));
+ LocalUResourceBundlePointer binary(ures_getByKey(data, "%%CollationBin", nullptr, &errorCode));
// Note: U_MISSING_RESOURCE_ERROR --> The old code built from rules if available
// but that created undesirable dependencies.
- int32_t length;
+ int32_t length = 0;
const uint8_t *inBytes = ures_getBinary(binary.getAlias(), &length, &errorCode);
CollationDataReader::read(rootEntry->tailoring, inBytes, length, *t, errorCode);
// Note: U_COLLATOR_VERSION_MISMATCH --> The old code built from rules if available
// but that created undesirable dependencies.
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
// Try to fetch the optional rules string.
{
UErrorCode internalErrorCode = U_ZERO_ERROR;
int32_t len;
- const UChar *s = ures_getStringByKey(data, "Sequence", &len,
+ const char16_t *s = ures_getStringByKey(data, "Sequence", &len,
&internalErrorCode);
if(U_SUCCESS(internalErrorCode)) {
- t->rules.setTo(TRUE, s, len);
+ t->rules.setTo(true, s, len);
}
}
@@ -421,13 +421,13 @@ CollationLoader::loadFromData(UErrorCode &errorCode) {
// Opening a bundle for the actual locale should always succeed.
LocalUResourceBundlePointer actualBundle(
ures_open(U_ICUDATA_COLL, actualLocale, &errorCode));
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
UErrorCode internalErrorCode = U_ZERO_ERROR;
LocalUResourceBundlePointer def(
- ures_getByKeyWithFallback(actualBundle.getAlias(), "collations/default", NULL,
+ ures_getByKeyWithFallback(actualBundle.getAlias(), "collations/default", nullptr,
&internalErrorCode));
int32_t len;
- const UChar *s = ures_getString(def.getAlias(), &len, &internalErrorCode);
+ const char16_t *s = ures_getString(def.getAlias(), &len, &internalErrorCode);
if(U_SUCCESS(internalErrorCode) && len < UPRV_LENGTHOF(defaultType)) {
u_UCharsToChars(s, defaultType, len + 1);
} else {
@@ -439,17 +439,17 @@ CollationLoader::loadFromData(UErrorCode &errorCode) {
t->actualLocale.setKeywordValue("collation", type, errorCode);
} else if(uprv_strcmp(locale.getName(), locale.getBaseName()) != 0) {
// Remove the collation keyword if it was set.
- t->actualLocale.setKeywordValue("collation", NULL, errorCode);
+ t->actualLocale.setKeywordValue("collation", nullptr, errorCode);
}
- if(U_FAILURE(errorCode)) { return NULL; }
+ if(U_FAILURE(errorCode)) { return nullptr; }
if(typeFallback) {
errorCode = U_USING_DEFAULT_WARNING;
}
t->bundle = bundle;
- bundle = NULL;
+ bundle = nullptr;
const CollationCacheEntry *entry = new CollationCacheEntry(validLocale, t.getAlias());
- if(entry == NULL) {
+ if(entry == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return nullptr;
} else {
@@ -463,7 +463,7 @@ CollationLoader::loadFromData(UErrorCode &errorCode) {
const CollationCacheEntry *
CollationLoader::getCacheEntry(UErrorCode &errorCode) {
LocaleCacheKey<CollationCacheEntry> key(locale);
- const CollationCacheEntry *entry = NULL;
+ const CollationCacheEntry *entry = nullptr;
cache->get(key, this, entry, errorCode);
return entry;
}
@@ -473,7 +473,7 @@ CollationLoader::makeCacheEntryFromRoot(
const Locale &/*loc*/,
UErrorCode &errorCode) const {
if (U_FAILURE(errorCode)) {
- return NULL;
+ return nullptr;
}
rootEntry->addRef();
return makeCacheEntry(validLocale, rootEntry, errorCode);
@@ -488,10 +488,10 @@ CollationLoader::makeCacheEntry(
return entryFromCache;
}
CollationCacheEntry *entry = new CollationCacheEntry(loc, entryFromCache->tailoring);
- if(entry == NULL) {
+ if(entry == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
entryFromCache->removeRef();
- return NULL;
+ return nullptr;
}
entry->addRef();
entryFromCache->removeRef();
@@ -508,7 +508,7 @@ ucol_open(const char *loc,
{
UTRACE_ENTRY_OC(UTRACE_UCOL_OPEN);
UTRACE_DATA1(UTRACE_INFO, "locale = \"%s\"", loc);
- UCollator *result = NULL;
+ UCollator *result = nullptr;
Collator *coll = Collator::createInstance(loc, *status);
if(U_SUCCESS(*status)) {
@@ -522,14 +522,14 @@ ucol_open(const char *loc,
U_CAPI int32_t U_EXPORT2
ucol_getDisplayName( const char *objLoc,
const char *dispLoc,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status)
{
if(U_FAILURE(*status)) return -1;
UnicodeString dst;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
dst.setTo(result, 0, resultLength);
}
@@ -542,10 +542,10 @@ ucol_getAvailable(int32_t index)
{
int32_t count = 0;
const Locale *loc = Collator::getAvailableLocales(count);
- if (loc != NULL && index < count) {
+ if (loc != nullptr && index < count) {
return loc[index].getName();
}
- return NULL;
+ return nullptr;
}
U_CAPI int32_t U_EXPORT2
@@ -561,12 +561,12 @@ U_CAPI UEnumeration* U_EXPORT2
ucol_openAvailableLocales(UErrorCode *status) {
// This is a wrapper over Collator::getAvailableLocales()
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
StringEnumeration *s = icu::Collator::getAvailableLocales();
- if (s == NULL) {
+ if (s == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return uenum_openFromStringEnumeration(s, status);
}
@@ -582,7 +582,7 @@ static const char* const KEYWORDS[] = { "collation" };
U_CAPI UEnumeration* U_EXPORT2
ucol_getKeywords(UErrorCode *status) {
- UEnumeration *result = NULL;
+ UEnumeration *result = nullptr;
if (U_SUCCESS(*status)) {
return uenum_openCharStringsEnumeration(KEYWORDS, KEYWORD_COUNT, status);
}
@@ -592,21 +592,21 @@ ucol_getKeywords(UErrorCode *status) {
U_CAPI UEnumeration* U_EXPORT2
ucol_getKeywordValues(const char *keyword, UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
// hard-coded to accept exactly one collation keyword
// modify if additional collation keyword is added later
- if (keyword==NULL || uprv_strcmp(keyword, KEYWORDS[0])!=0)
+ if (keyword==nullptr || uprv_strcmp(keyword, KEYWORDS[0])!=0)
{
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
return ures_getKeywordValues(U_ICUDATA_COLL, RESOURCE_NAME, status);
}
static const UEnumeration defaultKeywordValues = {
- NULL,
- NULL,
+ nullptr,
+ nullptr,
ulist_close_keyword_values_iterator,
ulist_count_keyword_values,
uenum_unextDefault,
@@ -619,7 +619,7 @@ namespace {
struct KeywordsSink : public ResourceSink {
public:
KeywordsSink(UErrorCode &errorCode) :
- values(ulist_createEmptyList(&errorCode)), hasDefault(FALSE) {}
+ values(ulist_createEmptyList(&errorCode)), hasDefault(false) {}
virtual ~KeywordsSink();
virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
@@ -634,18 +634,18 @@ public:
defcoll.appendInvariantChars(value.getUnicodeString(errorCode), errorCode);
if (U_SUCCESS(errorCode) && !defcoll.isEmpty()) {
char *ownedDefault = uprv_strdup(defcoll.data());
- if (ownedDefault == NULL) {
+ if (ownedDefault == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
ulist_removeString(values, defcoll.data());
- ulist_addItemBeginList(values, ownedDefault, TRUE, &errorCode);
- hasDefault = TRUE;
+ ulist_addItemBeginList(values, ownedDefault, true, &errorCode);
+ hasDefault = true;
}
}
} else if (type == URES_TABLE && uprv_strncmp(key, "private-", 8) != 0) {
if (!ulist_containsString(values, key, (int32_t)uprv_strlen(key))) {
- ulist_addItemEndList(values, key, FALSE, &errorCode);
+ ulist_addItemEndList(values, key, false, &errorCode);
}
}
if (U_FAILURE(errorCode)) { return; }
@@ -673,17 +673,17 @@ ucol_getKeywordValuesForLocale(const char* /*key*/, const char* locale,
LocalUResourceBundlePointer bundle(ures_open(U_ICUDATA_COLL, locale, status));
KeywordsSink sink(*status);
ures_getAllItemsWithFallback(bundle.getAlias(), RESOURCE_NAME, sink, *status);
- if (U_FAILURE(*status)) { return NULL; }
+ if (U_FAILURE(*status)) { return nullptr; }
UEnumeration *en = (UEnumeration *)uprv_malloc(sizeof(UEnumeration));
- if (en == NULL) {
+ if (en == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
ulist_resetList(sink.values); // Initialize the iterator.
en->context = sink.values;
- sink.values = NULL; // Avoid deletion in the sink destructor.
+ sink.values = nullptr; // Avoid deletion in the sink destructor.
return en;
}
@@ -695,7 +695,7 @@ ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
// N.B.: Resource name is "collations" but keyword is "collation"
return ures_getFunctionalEquivalent(result, resultCapacity, U_ICUDATA_COLL,
"collations", keyword, locale,
- isAvailable, TRUE, status);
+ isAvailable, true, status);
}
#endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/contrib/libs/icu/i18n/ucol_sit.cpp b/contrib/libs/icu/i18n/ucol_sit.cpp
index 4dc81aebcc9..a740286d79e 100644
--- a/contrib/libs/icu/i18n/ucol_sit.cpp
+++ b/contrib/libs/icu/i18n/ucol_sit.cpp
@@ -99,7 +99,7 @@ struct CollatorSpec {
CharString locale;
UColAttributeValue options[UCOL_ATTRIBUTE_COUNT];
uint32_t variableTopValue;
- UChar variableTopString[locElementCapacity];
+ char16_t variableTopString[locElementCapacity];
int32_t variableTopStringLen;
UBool variableTopSet;
CharString entries[UCOL_SIT_ITEMS_COUNT];
@@ -109,7 +109,7 @@ CollatorSpec::CollatorSpec() :
locale(),
variableTopValue(0),
variableTopString(),
-variableTopSet(FALSE)
+variableTopSet(false)
{
// set collation options to default
for(int32_t i = 0; i < UCOL_ATTRIBUTE_COUNT; i++) {
@@ -189,7 +189,7 @@ _processRFC3066Locale(CollatorSpec *spec, uint32_t, const char* string,
char terminator = *string;
string++;
const char *end = uprv_strchr(string+1, terminator);
- if(end == NULL || end - string >= loc3066Capacity) {
+ if(end == nullptr || end - string >= loc3066Capacity) {
*status = U_BUFFER_OVERFLOW_ERROR;
return string;
} else {
@@ -217,10 +217,10 @@ _processCollatorOption(CollatorSpec *spec, uint32_t option, const char* string,
U_CDECL_END
-static UChar
+static char16_t
readHexCodeUnit(const char **string, UErrorCode *status)
{
- UChar result = 0;
+ char16_t result = 0;
int32_t value = 0;
char c;
int32_t noDigits = 0;
@@ -238,7 +238,7 @@ readHexCodeUnit(const char **string, UErrorCode *status)
#endif
return 0;
}
- result = (result << 4) | (UChar)value;
+ result = (result << 4) | (char16_t)value;
noDigits++;
(*string)++;
}
@@ -270,7 +270,7 @@ _processVariableTop(CollatorSpec *spec, uint32_t value1, const char* string, UEr
spec->variableTopValue = readHexCodeUnit(&string, status);
}
if(U_SUCCESS(*status)) {
- spec->variableTopSet = TRUE;
+ spec->variableTopSet = true;
}
return string;
}
@@ -456,8 +456,8 @@ ucol_prepareShortStringOpen( const char *definition,
UResourceBundle *b = ures_open(U_ICUDATA_COLL, buffer, status);
/* we try to find stuff from keyword */
- UResourceBundle *collations = ures_getByKey(b, "collations", NULL, status);
- UResourceBundle *collElem = NULL;
+ 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);
@@ -469,10 +469,10 @@ ucol_prepareShortStringOpen( const char *definition,
if(keyLen == 0) {
// no keyword
// we try to find the default setting, which will give us the keyword value
- UResourceBundle *defaultColl = ures_getByKeyWithFallback(collations, "default", NULL, status);
+ UResourceBundle *defaultColl = ures_getByKeyWithFallback(collations, "default", nullptr, status);
if(U_SUCCESS(*status)) {
int32_t defaultKeyLen = 0;
- const UChar *defaultKey = ures_getString(defaultColl, &defaultKeyLen, status);
+ const char16_t *defaultKey = ures_getString(defaultColl, &defaultKeyLen, status);
u_UCharsToChars(defaultKey, keyBuffer, defaultKeyLen);
keyBuffer[defaultKeyLen] = 0;
} else {
@@ -539,7 +539,7 @@ ucol_openFromShortString( const char *definition,
if(U_FAILURE(*status)) {
parseError->offset = (int32_t)(string - definition);
ucol_close(result);
- return NULL;
+ return nullptr;
}
}
@@ -555,7 +555,7 @@ ucol_openFromShortString( const char *definition,
if(U_FAILURE(*status)) { // here it can only be a bogus value
ucol_close(result);
- result = NULL;
+ result = nullptr;
}
UTRACE_EXIT_PTR_STATUS(result, *status);
@@ -571,7 +571,7 @@ ucol_getShortDefinitionString(const UCollator *coll,
UErrorCode *status)
{
if(U_FAILURE(*status)) return 0;
- if(coll == NULL) {
+ if(coll == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -618,7 +618,7 @@ ucol_getContractions( const UCollator *coll,
USet *contractions,
UErrorCode *status)
{
- ucol_getContractionsAndExpansions(coll, contractions, NULL, FALSE, status);
+ ucol_getContractionsAndExpansions(coll, contractions, nullptr, false, status);
return uset_getItemCount(contractions);
}
@@ -642,12 +642,12 @@ ucol_getContractionsAndExpansions( const UCollator *coll,
if(U_FAILURE(*status)) {
return;
}
- if(coll == NULL) {
+ if(coll == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
const icu::RuleBasedCollator *rbc = icu::RuleBasedCollator::rbcFromUCollator(coll);
- if(rbc == NULL) {
+ if(rbc == nullptr) {
*status = U_UNSUPPORTED_ERROR;
return;
}
diff --git a/contrib/libs/icu/i18n/ucoleitr.cpp b/contrib/libs/icu/i18n/ucoleitr.cpp
index 596ce032956..36b83c4c104 100644
--- a/contrib/libs/icu/i18n/ucoleitr.cpp
+++ b/contrib/libs/icu/i18n/ucoleitr.cpp
@@ -92,7 +92,7 @@ void RCEBuffer::put(uint32_t ce, int32_t ixLow, int32_t ixHigh, UErrorCode &erro
}
if (bufferIndex >= bufferSize) {
RCEI *newBuffer = NEW_ARRAY(RCEI, bufferSize + BUFFER_GROW);
- if (newBuffer == NULL) {
+ if (newBuffer == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -120,7 +120,7 @@ const RCEI *RCEBuffer::get()
return &buffer[--bufferIndex];
}
- return NULL;
+ return nullptr;
}
PCEBuffer::PCEBuffer()
@@ -154,7 +154,7 @@ void PCEBuffer::put(uint64_t ce, int32_t ixLow, int32_t ixHigh, UErrorCode &erro
}
if (bufferIndex >= bufferSize) {
PCEI *newBuffer = NEW_ARRAY(PCEI, bufferSize + BUFFER_GROW);
- if (newBuffer == NULL) {
+ if (newBuffer == nullptr) {
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -182,7 +182,7 @@ const PCEI *PCEBuffer::get()
return &buffer[--bufferIndex];
}
- return NULL;
+ return nullptr;
}
UCollationPCE::UCollationPCE(UCollationElements *elems) { init(elems); }
@@ -205,7 +205,7 @@ void UCollationPCE::init(const Collator &coll)
strength = coll.getAttribute(UCOL_STRENGTH, status);
toShift = coll.getAttribute(UCOL_ALTERNATE_HANDLING, status) == UCOL_SHIFTED;
- isShifted = FALSE;
+ isShifted = false;
variableTop = coll.getVariableTop(status);
}
@@ -254,13 +254,13 @@ uint64_t UCollationPCE::processCE(uint32_t ce)
}
primary = secondary = tertiary = 0;
- isShifted = TRUE;
+ isShifted = true;
} else {
if (strength >= UCOL_QUATERNARY) {
quaternary = 0xFFFF;
}
- isShifted = FALSE;
+ isShifted = false;
}
return primary << 48 | secondary << 32 | tertiary << 16 | quaternary;
@@ -272,28 +272,28 @@ U_NAMESPACE_END
U_CAPI UCollationElements* U_EXPORT2
ucol_openElements(const UCollator *coll,
- const UChar *text,
+ const char16_t *text,
int32_t textLength,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (coll == NULL || (text == NULL && textLength != 0)) {
+ if (coll == nullptr || (text == nullptr && textLength != 0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
const RuleBasedCollator *rbc = RuleBasedCollator::rbcFromUCollator(coll);
- if (rbc == NULL) {
+ if (rbc == nullptr) {
*status = U_UNSUPPORTED_ERROR; // coll is a Collator but not a RuleBasedCollator
- return NULL;
+ return nullptr;
}
UnicodeString s((UBool)(textLength < 0), text, textLength);
CollationElementIterator *cei = rbc->createCollationElementIterator(s);
- if (cei == NULL) {
+ if (cei == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return cei->toUCollationElements();
@@ -353,11 +353,11 @@ UCollationPCE::nextProcessed(
result = processCE((uint32_t)ce);
} while (result == UCOL_IGNORABLE);
- if (ixLow != NULL) {
+ if (ixLow != nullptr) {
*ixLow = low;
}
- if (ixHigh != NULL) {
+ if (ixHigh != nullptr) {
*ixHigh = high;
}
@@ -433,11 +433,11 @@ UCollationPCE::previousProcessed(
finish:
if (pceBuffer.isEmpty()) {
// **** Is -1 the right value for ixLow, ixHigh? ****
- if (ixLow != NULL) {
+ if (ixLow != nullptr) {
*ixLow = -1;
}
- if (ixHigh != NULL) {
+ if (ixHigh != nullptr) {
*ixHigh = -1
;
}
@@ -446,11 +446,11 @@ finish:
const PCEI *pcei = pceBuffer.get();
- if (ixLow != NULL) {
+ if (ixLow != nullptr) {
*ixLow = pcei->low;
}
- if (ixHigh != NULL) {
+ if (ixHigh != nullptr) {
*ixHigh = pcei->high;
}
@@ -476,7 +476,7 @@ ucol_getMaxExpansion(const UCollationElements *elems,
U_CAPI void U_EXPORT2
ucol_setText( UCollationElements *elems,
- const UChar *text,
+ const char16_t *text,
int32_t textLength,
UErrorCode *status)
{
@@ -484,7 +484,7 @@ ucol_setText( UCollationElements *elems,
return;
}
- if ((text == NULL && textLength != 0)) {
+ if ((text == nullptr && textLength != 0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
diff --git a/contrib/libs/icu/i18n/ucsdet.cpp b/contrib/libs/icu/i18n/ucsdet.cpp
index 63f204d0e10..c8b8712fbaa 100644
--- a/contrib/libs/icu/i18n/ucsdet.cpp
+++ b/contrib/libs/icu/i18n/ucsdet.cpp
@@ -39,7 +39,7 @@ ucsdet_open(UErrorCode *status)
if (U_FAILURE(*status)) {
delete csd;
- csd = NULL;
+ csd = nullptr;
}
return (UCharsetDetector *) csd;
@@ -66,7 +66,7 @@ U_CAPI const char * U_EXPORT2
ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status)
{
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return ((CharsetMatch *) ucsm)->getName();
@@ -86,7 +86,7 @@ U_CAPI const char * U_EXPORT2
ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status)
{
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return ((CharsetMatch *) ucsm)->getLanguage();
@@ -96,7 +96,7 @@ U_CAPI const UCharsetMatch * U_EXPORT2
ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status)
{
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return (const UCharsetMatch *) ((CharsetDetector *) ucsd)->detect(*status);
@@ -117,7 +117,7 @@ ucsdet_detectAll(UCharsetDetector *ucsd,
int32_t *maxMatchesFound, UErrorCode *status)
{
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
CharsetDetector *csd = (CharsetDetector *) ucsd;
@@ -147,8 +147,8 @@ U_CAPI UBool U_EXPORT2
ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd)
{
// todo: could use an error return...
- if (ucsd == NULL) {
- return FALSE;
+ if (ucsd == nullptr) {
+ return false;
}
return ((CharsetDetector *) ucsd)->getStripTagsFlag();
@@ -158,8 +158,8 @@ U_CAPI UBool U_EXPORT2
ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter)
{
// todo: could use an error return...
- if (ucsd == NULL) {
- return FALSE;
+ if (ucsd == nullptr) {
+ return false;
}
CharsetDetector *csd = (CharsetDetector *) ucsd;
@@ -172,7 +172,7 @@ ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter)
U_CAPI int32_t U_EXPORT2
ucsdet_getUChars(const UCharsetMatch *ucsm,
- UChar *buf, int32_t cap, UErrorCode *status)
+ char16_t *buf, int32_t cap, UErrorCode *status)
{
if(U_FAILURE(*status)) {
return 0;
diff --git a/contrib/libs/icu/i18n/udat.cpp b/contrib/libs/icu/i18n/udat.cpp
index d9549d04c57..e249be3aee9 100644
--- a/contrib/libs/icu/i18n/udat.cpp
+++ b/contrib/libs/icu/i18n/udat.cpp
@@ -34,11 +34,11 @@ U_NAMESPACE_USE
/**
* Verify that fmt is a SimpleDateFormat. Invalid error if not.
* @param fmt the UDateFormat, definitely a DateFormat, maybe something else
- * @param status error code, will be set to failure if there is a failure or the fmt is NULL.
+ * @param status error code, will be set to failure if there is a failure or the fmt is nullptr.
*/
static void verifyIsSimpleDateFormat(const UDateFormat* fmt, UErrorCode *status) {
if(U_SUCCESS(*status) &&
- dynamic_cast<const SimpleDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))==NULL) {
+ dynamic_cast<const SimpleDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))==nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
}
@@ -90,41 +90,41 @@ static UCalendarDateFields gDateFieldMapping[] = {
};
U_CAPI UCalendarDateFields U_EXPORT2
-udat_toCalendarDateField(UDateFormatField field) {
+udat_toCalendarDateField(UDateFormatField field) UPRV_NO_SANITIZE_UNDEFINED {
static_assert(UDAT_FIELD_COUNT == UPRV_LENGTHOF(gDateFieldMapping),
"UDateFormatField and gDateFieldMapping should have the same number of entries and be kept in sync.");
return (field >= UDAT_ERA_FIELD && field < UPRV_LENGTHOF(gDateFieldMapping))? gDateFieldMapping[field]: UCAL_FIELD_COUNT;
}
/* For now- one opener. */
-static UDateFormatOpener gOpener = NULL;
+static UDateFormatOpener gOpener = nullptr;
U_CAPI void U_EXPORT2
udat_registerOpener(UDateFormatOpener opener, UErrorCode *status)
{
if(U_FAILURE(*status)) return;
- umtx_lock(NULL);
- if(gOpener==NULL) {
+ umtx_lock(nullptr);
+ if(gOpener==nullptr) {
gOpener = opener;
} else {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
}
U_CAPI UDateFormatOpener U_EXPORT2
udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status)
{
- if(U_FAILURE(*status)) return NULL;
- UDateFormatOpener oldOpener = NULL;
- umtx_lock(NULL);
- if(gOpener==NULL || gOpener!=opener) {
+ if(U_FAILURE(*status)) return nullptr;
+ UDateFormatOpener oldOpener = nullptr;
+ umtx_lock(nullptr);
+ if(gOpener==nullptr || gOpener!=opener) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
} else {
oldOpener=gOpener;
- gOpener=NULL;
+ gOpener=nullptr;
}
- umtx_unlock(NULL);
+ umtx_unlock(nullptr);
return oldOpener;
}
@@ -134,9 +134,9 @@ U_CAPI UDateFormat* U_EXPORT2
udat_open(UDateFormatStyle timeStyle,
UDateFormatStyle dateStyle,
const char *locale,
- const UChar *tzID,
+ const char16_t *tzID,
int32_t tzIDLength,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
UErrorCode *status)
{
@@ -144,9 +144,9 @@ udat_open(UDateFormatStyle timeStyle,
if(U_FAILURE(*status)) {
return 0;
}
- if(gOpener!=NULL) { // if it's registered
+ if(gOpener!=nullptr) { // if it's registered
fmt = (DateFormat*) (*gOpener)(timeStyle,dateStyle,locale,tzID,tzIDLength,pattern,patternLength,status);
- if(fmt!=NULL) {
+ if(fmt!=nullptr) {
return (UDateFormat*)fmt;
} // else fall through.
}
@@ -198,6 +198,7 @@ udat_open(UDateFormatStyle timeStyle,
U_CAPI void U_EXPORT2
udat_close(UDateFormat* format)
{
+ if (format == nullptr) return;
delete (DateFormat*)format;
}
@@ -220,7 +221,7 @@ udat_clone(const UDateFormat *fmt,
U_CAPI int32_t U_EXPORT2
udat_format( const UDateFormat* format,
UDate dateToFormat,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPosition* position,
UErrorCode* status)
@@ -228,14 +229,14 @@ udat_format( const UDateFormat* format,
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -258,7 +259,7 @@ udat_format( const UDateFormat* format,
U_CAPI int32_t U_EXPORT2
udat_formatCalendar(const UDateFormat* format,
UCalendar* calendar,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPosition* position,
UErrorCode* status)
@@ -266,14 +267,14 @@ udat_formatCalendar(const UDateFormat* format,
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -296,7 +297,7 @@ udat_formatCalendar(const UDateFormat* format,
U_CAPI int32_t U_EXPORT2
udat_formatForFields( const UDateFormat* format,
UDate dateToFormat,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPositionIterator* fpositer,
UErrorCode* status)
@@ -304,14 +305,14 @@ udat_formatForFields( const UDateFormat* format,
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -324,7 +325,7 @@ udat_formatForFields( const UDateFormat* format,
U_CAPI int32_t U_EXPORT2
udat_formatCalendarForFields(const UDateFormat* format,
UCalendar* calendar,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPositionIterator* fpositer,
UErrorCode* status)
@@ -332,14 +333,14 @@ udat_formatCalendarForFields(const UDateFormat* format,
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -351,7 +352,7 @@ udat_formatCalendarForFields(const UDateFormat* format,
U_CAPI UDate U_EXPORT2
udat_parse( const UDateFormat* format,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos,
UErrorCode *status)
@@ -363,7 +364,7 @@ udat_parse( const UDateFormat* format,
int32_t stackParsePos = 0;
UDate res;
- if(parsePos == NULL) {
+ if(parsePos == nullptr) {
parsePos = &stackParsePos;
}
@@ -384,7 +385,7 @@ udat_parse( const UDateFormat* format,
U_CAPI void U_EXPORT2
udat_parseCalendar(const UDateFormat* format,
UCalendar* calendar,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos,
UErrorCode *status)
@@ -395,7 +396,7 @@ udat_parseCalendar(const UDateFormat* format,
ParsePosition pp;
int32_t stackParsePos = 0;
- if(parsePos == NULL) {
+ if(parsePos == nullptr) {
parsePos = &stackParsePos;
}
@@ -429,9 +430,9 @@ udat_getBooleanAttribute(const UDateFormat* fmt,
UDateFormatBooleanAttribute attr,
UErrorCode* status)
{
- if(U_FAILURE(*status)) return FALSE;
+ if(U_FAILURE(*status)) return false;
return ((DateFormat*)fmt)->getBooleanAttribute(attr, *status);
- //return FALSE;
+ //return false;
}
U_CAPI void U_EXPORT2
@@ -458,7 +459,7 @@ udat_setCalendar(UDateFormat* fmt,
}
U_CAPI const UNumberFormat* U_EXPORT2
-udat_getNumberFormatForField(const UDateFormat* fmt, UChar field)
+udat_getNumberFormatForField(const UDateFormat* fmt, char16_t field)
{
UErrorCode status = U_ZERO_ERROR;
verifyIsSimpleDateFormat(fmt, &status);
@@ -474,14 +475,14 @@ udat_getNumberFormat(const UDateFormat* fmt)
U_CAPI void U_EXPORT2
udat_adoptNumberFormatForFields( UDateFormat* fmt,
- const UChar* fields,
+ const char16_t* fields,
UNumberFormat* numberFormatToSet,
UErrorCode* status)
{
verifyIsSimpleDateFormat(fmt, status);
if (U_FAILURE(*status)) return;
- if (fields!=NULL) {
+ if (fields!=nullptr) {
UnicodeString overrideFields(fields);
((SimpleDateFormat*)fmt)->adoptNumberFormat(overrideFields, (NumberFormat*)numberFormatToSet, *status);
}
@@ -535,21 +536,21 @@ udat_set2DigitYearStart( UDateFormat *fmt,
U_CAPI int32_t U_EXPORT2
udat_toPattern( const UDateFormat *fmt,
UBool localized,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status)
{
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -557,12 +558,12 @@ udat_toPattern( const UDateFormat *fmt,
const DateFormat *df=reinterpret_cast<const DateFormat *>(fmt);
const SimpleDateFormat *sdtfmt=dynamic_cast<const SimpleDateFormat *>(df);
const RelativeDateFormat *reldtfmt;
- if (sdtfmt!=NULL) {
+ if (sdtfmt!=nullptr) {
if(localized)
sdtfmt->toLocalizedPattern(res, *status);
else
sdtfmt->toPattern(res);
- } else if (!localized && (reldtfmt=dynamic_cast<const RelativeDateFormat *>(df))!=NULL) {
+ } else if (!localized && (reldtfmt=dynamic_cast<const RelativeDateFormat *>(df))!=nullptr) {
reldtfmt->toPattern(res, *status);
} else {
*status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -577,7 +578,7 @@ udat_toPattern( const UDateFormat *fmt,
U_CAPI void U_EXPORT2
udat_applyPattern( UDateFormat *format,
UBool localized,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength)
{
const UnicodeString pat((UBool)(patternLength == -1), pattern, patternLength);
@@ -598,22 +599,22 @@ U_CAPI int32_t U_EXPORT2
udat_getSymbols(const UDateFormat *fmt,
UDateFormatSymbolType type,
int32_t index,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status)
{
const DateFormatSymbols *syms;
const SimpleDateFormat* sdtfmt;
const RelativeDateFormat* rdtfmt;
- if ((sdtfmt = dynamic_cast<const SimpleDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != NULL) {
+ if ((sdtfmt = dynamic_cast<const SimpleDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != nullptr) {
syms = sdtfmt->getDateFormatSymbols();
- } else if ((rdtfmt = dynamic_cast<const RelativeDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != NULL) {
+ } else if ((rdtfmt = dynamic_cast<const RelativeDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != nullptr) {
syms = rdtfmt->getDateFormatSymbols();
} else {
return -1;
}
int32_t count = 0;
- const UnicodeString *res = NULL;
+ const UnicodeString *res = nullptr;
switch(type) {
case UDAT_ERAS:
@@ -647,8 +648,8 @@ udat_getSymbols(const UDateFormat *fmt,
case UDAT_LOCALIZED_CHARS:
{
UnicodeString res1;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res1.setTo(result, 0, resultLength);
}
@@ -760,9 +761,9 @@ udat_countSymbols( const UDateFormat *fmt,
const DateFormatSymbols *syms;
const SimpleDateFormat* sdtfmt;
const RelativeDateFormat* rdtfmt;
- if ((sdtfmt = dynamic_cast<const SimpleDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != NULL) {
+ if ((sdtfmt = dynamic_cast<const SimpleDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != nullptr) {
syms = sdtfmt->getDateFormatSymbols();
- } else if ((rdtfmt = dynamic_cast<const RelativeDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != NULL) {
+ } else if ((rdtfmt = dynamic_cast<const RelativeDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))) != nullptr) {
syms = rdtfmt->getDateFormatSymbols();
} else {
return 0;
@@ -925,12 +926,12 @@ class DateFormatSymbolsSingleSetter /* not : public UObject because all methods
public:
static void
setSymbol(UnicodeString *array, int32_t count, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
- if(array!=NULL) {
+ if(array!=nullptr) {
if(index>=count) {
errorCode=U_INDEX_OUTOFBOUNDS_ERROR;
- } else if(value==NULL) {
+ } else if(value==nullptr) {
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
} else {
array[index].setTo(value, valueLength);
@@ -940,182 +941,182 @@ public:
static void
setEra(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fEras, syms->fErasCount, index, value, valueLength, errorCode);
}
static void
setEraName(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fEraNames, syms->fEraNamesCount, index, value, valueLength, errorCode);
}
static void
setMonth(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fMonths, syms->fMonthsCount, index, value, valueLength, errorCode);
}
static void
setShortMonth(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fShortMonths, syms->fShortMonthsCount, index, value, valueLength, errorCode);
}
static void
setNarrowMonth(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fNarrowMonths, syms->fNarrowMonthsCount, index, value, valueLength, errorCode);
}
static void
setStandaloneMonth(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneMonths, syms->fStandaloneMonthsCount, index, value, valueLength, errorCode);
}
static void
setStandaloneShortMonth(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneShortMonths, syms->fStandaloneShortMonthsCount, index, value, valueLength, errorCode);
}
static void
setStandaloneNarrowMonth(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneNarrowMonths, syms->fStandaloneNarrowMonthsCount, index, value, valueLength, errorCode);
}
static void
setWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fWeekdays, syms->fWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setShortWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fShortWeekdays, syms->fShortWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setShorterWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fShorterWeekdays, syms->fShorterWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setNarrowWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fNarrowWeekdays, syms->fNarrowWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setStandaloneWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneWeekdays, syms->fStandaloneWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setStandaloneShortWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneShortWeekdays, syms->fStandaloneShortWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setStandaloneShorterWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneShorterWeekdays, syms->fStandaloneShorterWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setStandaloneNarrowWeekday(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneNarrowWeekdays, syms->fStandaloneNarrowWeekdaysCount, index, value, valueLength, errorCode);
}
static void
setQuarter(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fQuarters, syms->fQuartersCount, index, value, valueLength, errorCode);
}
static void
setShortQuarter(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fShortQuarters, syms->fShortQuartersCount, index, value, valueLength, errorCode);
}
static void
setNarrowQuarter(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fNarrowQuarters, syms->fNarrowQuartersCount, index, value, valueLength, errorCode);
}
static void
setStandaloneQuarter(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneQuarters, syms->fStandaloneQuartersCount, index, value, valueLength, errorCode);
}
static void
setStandaloneShortQuarter(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneShortQuarters, syms->fStandaloneShortQuartersCount, index, value, valueLength, errorCode);
}
static void
setStandaloneNarrowQuarter(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fStandaloneNarrowQuarters, syms->fStandaloneNarrowQuartersCount, index, value, valueLength, errorCode);
}
static void
setShortYearNames(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fShortYearNames, syms->fShortYearNamesCount, index, value, valueLength, errorCode);
}
static void
setShortZodiacNames(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fShortZodiacNames, syms->fShortZodiacNamesCount, index, value, valueLength, errorCode);
}
static void
setAmPm(DateFormatSymbols *syms, int32_t index,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(syms->fAmPms, syms->fAmPmsCount, index, value, valueLength, errorCode);
}
static void
setLocalPatternChars(DateFormatSymbols *syms,
- const UChar *value, int32_t valueLength, UErrorCode &errorCode)
+ const char16_t *value, int32_t valueLength, UErrorCode &errorCode)
{
setSymbol(&syms->fLocalPatternChars, 1, 0, value, valueLength, errorCode);
}
@@ -1127,7 +1128,7 @@ U_CAPI void U_EXPORT2
udat_setSymbols( UDateFormat *format,
UDateFormatSymbolType type,
int32_t index,
- UChar *value,
+ char16_t *value,
int32_t valueLength,
UErrorCode *status)
{
@@ -1253,11 +1254,11 @@ udat_getLocaleByType(const UDateFormat *fmt,
ULocDataLocaleType type,
UErrorCode* status)
{
- if (fmt == NULL) {
+ if (fmt == nullptr) {
if (U_SUCCESS(*status)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
- return NULL;
+ return nullptr;
}
return ((Format*)fmt)->getLocaleID(type, *status);
}
@@ -1285,11 +1286,11 @@ udat_getContext(const UDateFormat* fmt, UDisplayContextType type, UErrorCode* st
/**
* Verify that fmt is a RelativeDateFormat. Invalid error if not.
* @param fmt the UDateFormat, definitely a DateFormat, maybe something else
- * @param status error code, will be set to failure if there is a failure or the fmt is NULL.
+ * @param status error code, will be set to failure if there is a failure or the fmt is nullptr.
*/
static void verifyIsRelativeDateFormat(const UDateFormat* fmt, UErrorCode *status) {
if(U_SUCCESS(*status) &&
- dynamic_cast<const RelativeDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))==NULL) {
+ dynamic_cast<const RelativeDateFormat*>(reinterpret_cast<const DateFormat*>(fmt))==nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
}
@@ -1297,7 +1298,7 @@ static void verifyIsRelativeDateFormat(const UDateFormat* fmt, UErrorCode *statu
U_CAPI int32_t U_EXPORT2
udat_toPatternRelativeDate(const UDateFormat *fmt,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status)
{
@@ -1305,14 +1306,14 @@ udat_toPatternRelativeDate(const UDateFormat *fmt,
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString datePattern;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
datePattern.setTo(result, 0, resultLength);
}
@@ -1322,7 +1323,7 @@ udat_toPatternRelativeDate(const UDateFormat *fmt,
U_CAPI int32_t U_EXPORT2
udat_toPatternRelativeTime(const UDateFormat *fmt,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status)
{
@@ -1330,14 +1331,14 @@ udat_toPatternRelativeTime(const UDateFormat *fmt,
if(U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString timePattern;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
timePattern.setTo(result, 0, resultLength);
}
@@ -1347,9 +1348,9 @@ udat_toPatternRelativeTime(const UDateFormat *fmt,
U_CAPI void U_EXPORT2
udat_applyPatternRelative(UDateFormat *format,
- const UChar *datePattern,
+ const char16_t *datePattern,
int32_t datePatternLength,
- const UChar *timePattern,
+ const char16_t *timePattern,
int32_t timePatternLength,
UErrorCode *status)
{
diff --git a/contrib/libs/icu/i18n/udateintervalformat.cpp b/contrib/libs/icu/i18n/udateintervalformat.cpp
index 355744346a3..a332eacc533 100644
--- a/contrib/libs/icu/i18n/udateintervalformat.cpp
+++ b/contrib/libs/icu/i18n/udateintervalformat.cpp
@@ -36,32 +36,32 @@ UPRV_FORMATTED_VALUE_CAPI_AUTO_IMPL(
U_CAPI UDateIntervalFormat* U_EXPORT2
udtitvfmt_open(const char* locale,
- const UChar* skeleton,
+ const char16_t* skeleton,
int32_t skeletonLength,
- const UChar* tzID,
+ const char16_t* tzID,
int32_t tzIDLength,
UErrorCode* status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if ((skeleton == NULL ? skeletonLength != 0 : skeletonLength < -1) ||
- (tzID == NULL ? tzIDLength != 0 : tzIDLength < -1)
+ if ((skeleton == nullptr ? skeletonLength != 0 : skeletonLength < -1) ||
+ (tzID == nullptr ? tzIDLength != 0 : tzIDLength < -1)
) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
UnicodeString skel((UBool)(skeletonLength == -1), skeleton, skeletonLength);
LocalPointer<DateIntervalFormat> formatter(
DateIntervalFormat::createInstance(skel, Locale(locale), *status));
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
if(tzID != 0) {
TimeZone *zone = TimeZone::createTimeZone(UnicodeString((UBool)(tzIDLength == -1), tzID, tzIDLength));
- if(zone == NULL) {
+ if(zone == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
formatter->adoptTimeZone(zone);
}
@@ -80,7 +80,7 @@ U_CAPI int32_t U_EXPORT2
udtitvfmt_format(const UDateIntervalFormat* formatter,
UDate fromDate,
UDate toDate,
- UChar* result,
+ char16_t* result,
int32_t resultCapacity,
UFieldPosition* position,
UErrorCode* status)
@@ -88,13 +88,13 @@ udtitvfmt_format(const UDateIntervalFormat* formatter,
if (U_FAILURE(*status)) {
return -1;
}
- if (result == NULL ? resultCapacity != 0 : resultCapacity < 0) {
+ if (result == nullptr ? resultCapacity != 0 : resultCapacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer (copied from udat_format)
res.setTo(result, 0, resultCapacity);
}
diff --git a/contrib/libs/icu/i18n/udatpg.cpp b/contrib/libs/icu/i18n/udatpg.cpp
index 332636a9388..07aee36882d 100644
--- a/contrib/libs/icu/i18n/udatpg.cpp
+++ b/contrib/libs/icu/i18n/udatpg.cpp
@@ -30,7 +30,7 @@ U_NAMESPACE_USE
U_CAPI UDateTimePatternGenerator * U_EXPORT2
udatpg_open(const char *locale, UErrorCode *pErrorCode) {
- if(locale==NULL) {
+ if(locale==nullptr) {
return (UDateTimePatternGenerator *)DateTimePatternGenerator::createInstance(*pErrorCode);
} else {
return (UDateTimePatternGenerator *)DateTimePatternGenerator::createInstance(Locale(locale), *pErrorCode);
@@ -50,15 +50,15 @@ udatpg_close(UDateTimePatternGenerator *dtpg) {
U_CAPI UDateTimePatternGenerator * U_EXPORT2
udatpg_clone(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
- return NULL;
+ return nullptr;
}
return (UDateTimePatternGenerator *)(((const DateTimePatternGenerator *)dtpg)->clone());
}
U_CAPI int32_t U_EXPORT2
udatpg_getBestPattern(UDateTimePatternGenerator *dtpg,
- const UChar *skeleton, int32_t length,
- UChar *bestPattern, int32_t capacity,
+ const char16_t *skeleton, int32_t length,
+ char16_t *bestPattern, int32_t capacity,
UErrorCode *pErrorCode) {
return udatpg_getBestPatternWithOptions(dtpg, skeleton, length,
UDATPG_MATCH_NO_OPTIONS,
@@ -67,14 +67,14 @@ udatpg_getBestPattern(UDateTimePatternGenerator *dtpg,
U_CAPI int32_t U_EXPORT2
udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg,
- const UChar *skeleton, int32_t length,
+ const char16_t *skeleton, int32_t length,
UDateTimePatternMatchOptions options,
- UChar *bestPattern, int32_t capacity,
+ char16_t *bestPattern, int32_t capacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(skeleton==NULL && length!=0) {
+ if(skeleton==nullptr && length!=0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -85,13 +85,13 @@ udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg,
U_CAPI int32_t U_EXPORT2
udatpg_getSkeleton(UDateTimePatternGenerator * /* dtpg */,
- const UChar *pattern, int32_t length,
- UChar *skeleton, int32_t capacity,
+ const char16_t *pattern, int32_t length,
+ char16_t *skeleton, int32_t capacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(pattern==NULL && length!=0) {
+ if(pattern==nullptr && length!=0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -103,13 +103,13 @@ udatpg_getSkeleton(UDateTimePatternGenerator * /* dtpg */,
U_CAPI int32_t U_EXPORT2
udatpg_getBaseSkeleton(UDateTimePatternGenerator * /* dtpg */,
- const UChar *pattern, int32_t length,
- UChar *skeleton, int32_t capacity,
+ const char16_t *pattern, int32_t length,
+ char16_t *skeleton, int32_t capacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if(pattern==NULL && length!=0) {
+ if(pattern==nullptr && length!=0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -121,14 +121,14 @@ udatpg_getBaseSkeleton(UDateTimePatternGenerator * /* dtpg */,
U_CAPI UDateTimePatternConflict U_EXPORT2
udatpg_addPattern(UDateTimePatternGenerator *dtpg,
- const UChar *pattern, int32_t patternLength,
+ const char16_t *pattern, int32_t patternLength,
UBool override,
- UChar *conflictingPattern, int32_t capacity, int32_t *pLength,
+ char16_t *conflictingPattern, int32_t capacity, int32_t *pLength,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return UDATPG_NO_CONFLICT;
}
- if(pattern==NULL && patternLength!=0) {
+ if(pattern==nullptr && patternLength!=0) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return UDATPG_NO_CONFLICT;
}
@@ -137,7 +137,7 @@ udatpg_addPattern(UDateTimePatternGenerator *dtpg,
UDateTimePatternConflict result=((DateTimePatternGenerator *)dtpg)->
addPattern(patternString, override, conflictingPatternString, *pErrorCode);
int32_t length=conflictingPatternString.extract(conflictingPattern, capacity, *pErrorCode);
- if(pLength!=NULL) {
+ if(pLength!=nullptr) {
*pLength=length;
}
return result;
@@ -146,17 +146,17 @@ udatpg_addPattern(UDateTimePatternGenerator *dtpg,
U_CAPI void U_EXPORT2
udatpg_setAppendItemFormat(UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
- const UChar *value, int32_t length) {
+ const char16_t *value, int32_t length) {
UnicodeString valueString((UBool)(length<0), value, length);
((DateTimePatternGenerator *)dtpg)->setAppendItemFormat(field, valueString);
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
udatpg_getAppendItemFormat(const UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
int32_t *pLength) {
const UnicodeString &result=((const DateTimePatternGenerator *)dtpg)->getAppendItemFormat(field);
- if(pLength!=NULL) {
+ if(pLength!=nullptr) {
*pLength=result.length();
}
return result.getBuffer();
@@ -165,17 +165,17 @@ udatpg_getAppendItemFormat(const UDateTimePatternGenerator *dtpg,
U_CAPI void U_EXPORT2
udatpg_setAppendItemName(UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
- const UChar *value, int32_t length) {
+ const char16_t *value, int32_t length) {
UnicodeString valueString((UBool)(length<0), value, length);
((DateTimePatternGenerator *)dtpg)->setAppendItemName(field, valueString);
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
udatpg_getAppendItemName(const UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
int32_t *pLength) {
const UnicodeString &result=((const DateTimePatternGenerator *)dtpg)->getAppendItemName(field);
- if(pLength!=NULL) {
+ if(pLength!=nullptr) {
*pLength=result.length();
}
return result.getBuffer();
@@ -185,16 +185,16 @@ U_CAPI int32_t U_EXPORT2
udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg,
UDateTimePatternField field,
UDateTimePGDisplayWidth width,
- UChar *fieldName, int32_t capacity,
+ char16_t *fieldName, int32_t capacity,
UErrorCode *pErrorCode) {
if (U_FAILURE(*pErrorCode))
return -1;
- if (fieldName == NULL ? capacity != 0 : capacity < 0) {
+ if (fieldName == nullptr ? capacity != 0 : capacity < 0) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString result = ((const DateTimePatternGenerator *)dtpg)->getFieldDisplayName(field,width);
- if (fieldName == NULL) {
+ if (fieldName == nullptr) {
return result.length();
}
return result.extract(fieldName, capacity, *pErrorCode);
@@ -202,33 +202,68 @@ udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg,
U_CAPI void U_EXPORT2
udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg,
- const UChar *dtFormat, int32_t length) {
+ const char16_t *dtFormat, int32_t length) {
UnicodeString dtFormatString((UBool)(length<0), dtFormat, length);
((DateTimePatternGenerator *)dtpg)->setDateTimeFormat(dtFormatString);
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
udatpg_getDateTimeFormat(const UDateTimePatternGenerator *dtpg,
int32_t *pLength) {
- const UnicodeString &result=((const DateTimePatternGenerator *)dtpg)->getDateTimeFormat();
- if(pLength!=NULL) {
+ UErrorCode status = U_ZERO_ERROR;
+ return udatpg_getDateTimeFormatForStyle(dtpg, UDAT_MEDIUM, pLength, &status);
+}
+
+U_CAPI void U_EXPORT2
+udatpg_setDateTimeFormatForStyle(UDateTimePatternGenerator *udtpg,
+ UDateFormatStyle style,
+ const char16_t *dateTimeFormat, int32_t length,
+ UErrorCode *pErrorCode) {
+ if (U_FAILURE(*pErrorCode)) {
+ return;
+ } else if (dateTimeFormat==nullptr) {
+ *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ DateTimePatternGenerator *dtpg = reinterpret_cast<DateTimePatternGenerator *>(udtpg);
+ UnicodeString dtFormatString((UBool)(length<0), dateTimeFormat, length);
+ dtpg->setDateTimeFormat(style, dtFormatString, *pErrorCode);
+}
+
+U_CAPI const char16_t* U_EXPORT2
+udatpg_getDateTimeFormatForStyle(const UDateTimePatternGenerator *udtpg,
+ UDateFormatStyle style, int32_t *pLength,
+ UErrorCode *pErrorCode) {
+ static const char16_t emptyString[] = { (char16_t)0 };
+ if (U_FAILURE(*pErrorCode)) {
+ if (pLength !=nullptr) {
+ *pLength = 0;
+ }
+ return emptyString;
+ }
+ const DateTimePatternGenerator *dtpg = reinterpret_cast<const DateTimePatternGenerator *>(udtpg);
+ const UnicodeString &result = dtpg->getDateTimeFormat(style, *pErrorCode);
+ if (pLength != nullptr) {
*pLength=result.length();
}
+ // Note: The UnicodeString for the dateTimeFormat string in the DateTimePatternGenerator
+ // was NUL-terminated what it was set, to avoid doing it here which could re-allocate
+ // the buffe and affect and cont references to the string or its buffer.
return result.getBuffer();
-}
+ }
U_CAPI void U_EXPORT2
udatpg_setDecimal(UDateTimePatternGenerator *dtpg,
- const UChar *decimal, int32_t length) {
+ const char16_t *decimal, int32_t length) {
UnicodeString decimalString((UBool)(length<0), decimal, length);
((DateTimePatternGenerator *)dtpg)->setDecimal(decimalString);
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
udatpg_getDecimal(const UDateTimePatternGenerator *dtpg,
int32_t *pLength) {
const UnicodeString &result=((const DateTimePatternGenerator *)dtpg)->getDecimal();
- if(pLength!=NULL) {
+ if(pLength!=nullptr) {
*pLength=result.length();
}
return result.getBuffer();
@@ -236,9 +271,9 @@ udatpg_getDecimal(const UDateTimePatternGenerator *dtpg,
U_CAPI int32_t U_EXPORT2
udatpg_replaceFieldTypes(UDateTimePatternGenerator *dtpg,
- const UChar *pattern, int32_t patternLength,
- const UChar *skeleton, int32_t skeletonLength,
- UChar *dest, int32_t destCapacity,
+ const char16_t *pattern, int32_t patternLength,
+ const char16_t *skeleton, int32_t skeletonLength,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
return udatpg_replaceFieldTypesWithOptions(dtpg, pattern, patternLength, skeleton, skeletonLength,
UDATPG_MATCH_NO_OPTIONS,
@@ -247,15 +282,15 @@ udatpg_replaceFieldTypes(UDateTimePatternGenerator *dtpg,
U_CAPI int32_t U_EXPORT2
udatpg_replaceFieldTypesWithOptions(UDateTimePatternGenerator *dtpg,
- const UChar *pattern, int32_t patternLength,
- const UChar *skeleton, int32_t skeletonLength,
+ const char16_t *pattern, int32_t patternLength,
+ const char16_t *skeleton, int32_t skeletonLength,
UDateTimePatternMatchOptions options,
- UChar *dest, int32_t destCapacity,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *pErrorCode) {
if(U_FAILURE(*pErrorCode)) {
return 0;
}
- if((pattern==NULL && patternLength!=0) || (skeleton==NULL && skeletonLength!=0)) {
+ if((pattern==nullptr && patternLength!=0) || (skeleton==nullptr && skeletonLength!=0)) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -279,13 +314,13 @@ udatpg_openBaseSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErr
pErrorCode);
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
udatpg_getPatternForSkeleton(const UDateTimePatternGenerator *dtpg,
- const UChar *skeleton, int32_t skeletonLength,
+ const char16_t *skeleton, int32_t skeletonLength,
int32_t *pLength) {
UnicodeString skeletonString((UBool)(skeletonLength<0), skeleton, skeletonLength);
const UnicodeString &result=((const DateTimePatternGenerator *)dtpg)->getPatternForSkeleton(skeletonString);
- if(pLength!=NULL) {
+ if(pLength!=nullptr) {
*pLength=result.length();
}
return result.getBuffer();
diff --git a/contrib/libs/icu/i18n/ufieldpositer.cpp b/contrib/libs/icu/i18n/ufieldpositer.cpp
index 64de856c308..f28e1aa20ee 100644
--- a/contrib/libs/icu/i18n/ufieldpositer.cpp
+++ b/contrib/libs/icu/i18n/ufieldpositer.cpp
@@ -22,10 +22,10 @@ U_CAPI UFieldPositionIterator* U_EXPORT2
ufieldpositer_open(UErrorCode* status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
FieldPositionIterator* fpositer = new FieldPositionIterator();
- if (fpositer == NULL) {
+ if (fpositer == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
return (UFieldPositionIterator*)fpositer;
diff --git a/contrib/libs/icu/i18n/uitercollationiterator.cpp b/contrib/libs/icu/i18n/uitercollationiterator.cpp
index 103c91cac8b..6f840f3fe5e 100644
--- a/contrib/libs/icu/i18n/uitercollationiterator.cpp
+++ b/contrib/libs/icu/i18n/uitercollationiterator.cpp
@@ -50,11 +50,11 @@ UIterCollationIterator::handleNextCE32(UChar32 &c, UErrorCode & /*errorCode*/) {
return UTRIE2_GET32_FROM_U16_SINGLE_LEAD(trie, c);
}
-UChar
+char16_t
UIterCollationIterator::handleGetTrailSurrogate() {
UChar32 trail = iter.next(&iter);
if(!U16_IS_TRAIL(trail) && trail >= 0) { iter.previous(&iter); }
- return (UChar)trail;
+ return (char16_t)trail;
}
UChar32
@@ -140,7 +140,7 @@ FCDUIterCollationIterator::handleNextCE32(UChar32 &c, UErrorCode &errorCode) {
return UTRIE2_GET32_FROM_U16_SINGLE_LEAD(trie, c);
}
-UChar
+char16_t
FCDUIterCollationIterator::handleGetTrailSurrogate() {
if(state <= ITER_IN_FCD_SEGMENT) {
UChar32 trail = iter.next(&iter);
@@ -149,10 +149,10 @@ FCDUIterCollationIterator::handleGetTrailSurrogate() {
} else if(trail >= 0) {
iter.previous(&iter);
}
- return (UChar)trail;
+ return (char16_t)trail;
} else {
U_ASSERT(pos < normalized.length());
- UChar trail;
+ char16_t trail;
if(U16_IS_TRAIL(trail = normalized[pos])) { ++pos; }
return trail;
}
@@ -303,7 +303,7 @@ FCDUIterCollationIterator::switchToForward() {
UBool
FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(state == ITER_CHECK_FWD);
// The input text [start..(iter index)[ passes the FCD check.
pos = iter.getIndex(&iter, UITER_CURRENT);
@@ -333,12 +333,12 @@ FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) {
}
s.append(c);
}
- if(!normalize(s, errorCode)) { return FALSE; }
+ if(!normalize(s, errorCode)) { return false; }
start = pos;
limit = pos + s.length();
state = IN_NORM_ITER_AT_LIMIT;
pos = 0;
- return TRUE;
+ return true;
}
prevCC = (uint8_t)fcd16;
if(prevCC == 0) {
@@ -350,7 +350,7 @@ FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) {
U_ASSERT(pos != limit);
iter.move(&iter, -s.length(), UITER_CURRENT);
state = ITER_IN_FCD_SEGMENT;
- return TRUE;
+ return true;
}
void
@@ -384,7 +384,7 @@ FCDUIterCollationIterator::switchToBackward() {
UBool
FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(state == ITER_CHECK_BWD);
// The input text [(iter index)..limit[ passes the FCD check.
pos = iter.getIndex(&iter, UITER_CURRENT);
@@ -417,12 +417,12 @@ FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) {
s.append(c);
}
s.reverse();
- if(!normalize(s, errorCode)) { return FALSE; }
+ if(!normalize(s, errorCode)) { return false; }
limit = pos;
start = pos - s.length();
state = IN_NORM_ITER_AT_START;
pos = normalized.length();
- return TRUE;
+ return true;
}
nextCC = (uint8_t)(fcd16 >> 8);
if(nextCC == 0) {
@@ -434,7 +434,7 @@ FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) {
U_ASSERT(pos != start);
iter.move(&iter, s.length(), UITER_CURRENT);
state = ITER_IN_FCD_SEGMENT;
- return TRUE;
+ return true;
}
UBool
diff --git a/contrib/libs/icu/i18n/uitercollationiterator.h b/contrib/libs/icu/i18n/uitercollationiterator.h
index e0da353f268..23d8562a87f 100644
--- a/contrib/libs/icu/i18n/uitercollationiterator.h
+++ b/contrib/libs/icu/i18n/uitercollationiterator.h
@@ -50,7 +50,7 @@ public:
protected:
virtual uint32_t handleNextCE32(UChar32 &c, UErrorCode &errorCode) override;
- virtual UChar handleGetTrailSurrogate() override;
+ virtual char16_t handleGetTrailSurrogate() override;
virtual void forwardNumCodePoints(int32_t num, UErrorCode &errorCode) override;
@@ -82,7 +82,7 @@ public:
protected:
virtual uint32_t handleNextCE32(UChar32 &c, UErrorCode &errorCode) override;
- virtual UChar handleGetTrailSurrogate() override;
+ virtual char16_t handleGetTrailSurrogate() override;
virtual void forwardNumCodePoints(int32_t num, UErrorCode &errorCode) override;
diff --git a/contrib/libs/icu/i18n/ulistformatter.cpp b/contrib/libs/icu/i18n/ulistformatter.cpp
index bfb7cf96bd4..721905f0970 100644
--- a/contrib/libs/icu/i18n/ulistformatter.cpp
+++ b/contrib/libs/icu/i18n/ulistformatter.cpp
@@ -24,11 +24,11 @@ ulistfmt_open(const char* locale,
UErrorCode* status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
LocalPointer<ListFormatter> listfmt(ListFormatter::createInstance(Locale(locale), *status));
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return (UListFormatter*)listfmt.orphan();
}
@@ -39,11 +39,11 @@ ulistfmt_openForType(const char* locale, UListFormatterType type,
UListFormatterWidth width, UErrorCode* status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
LocalPointer<ListFormatter> listfmt(ListFormatter::createInstance(Locale(locale), type, width, *status));
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return (UListFormatter*)listfmt.orphan();
}
@@ -67,14 +67,14 @@ UPRV_FORMATTED_VALUE_CAPI_AUTO_IMPL(
static UnicodeString* getUnicodeStrings(
- const UChar* const strings[],
+ const char16_t* const strings[],
const int32_t* stringLengths,
int32_t stringCount,
UnicodeString* length4StackBuffer,
LocalArray<UnicodeString>& maybeOwner,
UErrorCode& status) {
U_ASSERT(U_SUCCESS(status));
- if (stringCount < 0 || (strings == NULL && stringCount > 0)) {
+ if (stringCount < 0 || (strings == nullptr && stringCount > 0)) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return nullptr;
}
@@ -86,9 +86,9 @@ static UnicodeString* getUnicodeStrings(
}
ustrings = maybeOwner.getAlias();
}
- if (stringLengths == NULL) {
+ if (stringLengths == nullptr) {
for (int32_t stringIndex = 0; stringIndex < stringCount; stringIndex++) {
- ustrings[stringIndex].setTo(TRUE, strings[stringIndex], -1);
+ ustrings[stringIndex].setTo(true, strings[stringIndex], -1);
}
} else {
for (int32_t stringIndex = 0; stringIndex < stringCount; stringIndex++) {
@@ -101,17 +101,17 @@ static UnicodeString* getUnicodeStrings(
U_CAPI int32_t U_EXPORT2
ulistfmt_format(const UListFormatter* listfmt,
- const UChar* const strings[],
+ const char16_t* const strings[],
const int32_t * stringLengths,
int32_t stringCount,
- UChar* result,
+ char16_t* result,
int32_t resultCapacity,
UErrorCode* status)
{
if (U_FAILURE(*status)) {
return -1;
}
- if ((result == NULL) ? resultCapacity != 0 : resultCapacity < 0) {
+ if ((result == nullptr) ? resultCapacity != 0 : resultCapacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -123,8 +123,8 @@ ulistfmt_format(const UListFormatter* listfmt,
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer (copied from udat_format)
res.setTo(result, 0, resultCapacity);
}
@@ -136,7 +136,7 @@ ulistfmt_format(const UListFormatter* listfmt,
U_CAPI void U_EXPORT2
ulistfmt_formatStringsToResult(
const UListFormatter* listfmt,
- const UChar* const strings[],
+ const char16_t* const strings[],
const int32_t * stringLengths,
int32_t stringCount,
UFormattedList* uresult,
diff --git a/contrib/libs/icu/i18n/ulocdata.cpp b/contrib/libs/icu/i18n/ulocdata.cpp
index 68b9e0cf634..8e0687c5f63 100644
--- a/contrib/libs/icu/i18n/ulocdata.cpp
+++ b/contrib/libs/icu/i18n/ulocdata.cpp
@@ -55,24 +55,24 @@ ulocdata_open(const char *localeID, UErrorCode *status)
ULocaleData *uld;
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
uld = (ULocaleData *)uprv_malloc(sizeof(ULocaleData));
- if (uld == NULL) {
+ if (uld == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return(NULL);
+ return(nullptr);
}
- uld->langBundle = NULL;
+ uld->langBundle = nullptr;
- uld->noSubstitute = FALSE;
- uld->bundle = ures_open(NULL, localeID, 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 NULL;
+ return nullptr;
}
return uld;
@@ -81,7 +81,7 @@ ulocdata_open(const char *localeID, UErrorCode *status)
U_CAPI void U_EXPORT2
ulocdata_close(ULocaleData *uld)
{
- if ( uld != NULL ) {
+ if ( uld != nullptr ) {
ures_close(uld->langBundle);
ures_close(uld->bundle);
uprv_free(uld);
@@ -108,12 +108,12 @@ ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
"AuxExemplarCharacters",
"ExemplarCharactersIndex",
"ExemplarCharactersPunctuation"};
- const UChar *exemplarChars = NULL;
+ const char16_t *exemplarChars = nullptr;
int32_t len = 0;
UErrorCode localStatus = U_ZERO_ERROR;
if (U_FAILURE(*status))
- return NULL;
+ return nullptr;
exemplarChars = ures_getStringByKey(uld->bundle, exemplarSetTypes[extype], &len, &localStatus);
if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) {
@@ -125,9 +125,9 @@ ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
}
if (U_FAILURE(*status))
- return NULL;
+ return nullptr;
- if(fillIn != NULL)
+ if(fillIn != nullptr)
uset_applyPattern(fillIn, exemplarChars, len,
USET_IGNORE_SPACE | options, status);
else
@@ -140,7 +140,7 @@ ulocdata_getExemplarSet(ULocaleData *uld, USet *fillIn,
U_CAPI int32_t U_EXPORT2
ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type,
- UChar *result, int32_t resultLength, UErrorCode *status){
+ char16_t *result, int32_t resultLength, UErrorCode *status){
static const char* const delimiterKeys[] = {
"quotationStart",
@@ -151,13 +151,13 @@ ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type,
UResourceBundle *delimiterBundle;
int32_t len = 0;
- const UChar *delimiter = NULL;
+ const char16_t *delimiter = nullptr;
UErrorCode localStatus = U_ZERO_ERROR;
if (U_FAILURE(*status))
return 0;
- delimiterBundle = ures_getByKey(uld->bundle, "delimiters", NULL, &localStatus);
+ delimiterBundle = ures_getByKey(uld->bundle, "delimiters", nullptr, &localStatus);
if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) {
localStatus = U_MISSING_RESOURCE_ERROR;
@@ -194,24 +194,24 @@ ulocdata_getDelimiter(ULocaleData *uld, ULocaleDataDelimiterType type,
static UResourceBundle * measurementTypeBundleForLocale(const char *localeID, const char *measurementType, UErrorCode *status){
char region[ULOC_COUNTRY_CAPACITY];
UResourceBundle *rb;
- UResourceBundle *measTypeBundle = NULL;
+ UResourceBundle *measTypeBundle = nullptr;
- ulocimp_getRegionForSupplementalData(localeID, TRUE, region, ULOC_COUNTRY_CAPACITY, status);
+ ulocimp_getRegionForSupplementalData(localeID, true, region, ULOC_COUNTRY_CAPACITY, status);
- rb = ures_openDirect(NULL, "supplementalData", status);
+ rb = ures_openDirect(nullptr, "supplementalData", status);
ures_getByKey(rb, "measurementData", rb, status);
- if (rb != NULL) {
- UResourceBundle *measDataBundle = ures_getByKey(rb, region, NULL, status);
+ if (rb != nullptr) {
+ UResourceBundle *measDataBundle = ures_getByKey(rb, region, nullptr, status);
if (U_SUCCESS(*status)) {
- measTypeBundle = ures_getByKey(measDataBundle, measurementType, NULL, status);
+ measTypeBundle = ures_getByKey(measDataBundle, measurementType, nullptr, status);
}
if (*status == U_MISSING_RESOURCE_ERROR) {
*status = U_ZERO_ERROR;
- if (measDataBundle != NULL) {
+ if (measDataBundle != nullptr) {
ures_close(measDataBundle);
}
- measDataBundle = ures_getByKey(rb, "001", NULL, status);
- measTypeBundle = ures_getByKey(measDataBundle, measurementType, NULL, status);
+ measDataBundle = ures_getByKey(rb, "001", nullptr, status);
+ measTypeBundle = ures_getByKey(measDataBundle, measurementType, nullptr, status);
}
ures_close(measDataBundle);
}
@@ -222,15 +222,18 @@ static UResourceBundle * measurementTypeBundleForLocale(const char *localeID, co
U_CAPI UMeasurementSystem U_EXPORT2
ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status){
- UResourceBundle* measurement=NULL;
+ UResourceBundle* measurement=nullptr;
UMeasurementSystem system = UMS_LIMIT;
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return system;
}
measurement = measurementTypeBundleForLocale(localeID, MEASUREMENT_SYSTEM, status);
- system = (UMeasurementSystem) ures_getInt(measurement, status);
+ int32_t result = ures_getInt(measurement, status);
+ if (U_SUCCESS(*status)) {
+ system = static_cast<UMeasurementSystem>(result);
+ }
ures_close(measurement);
@@ -240,11 +243,11 @@ ulocdata_getMeasurementSystem(const char *localeID, UErrorCode *status){
U_CAPI void U_EXPORT2
ulocdata_getPaperSize(const char* localeID, int32_t *height, int32_t *width, UErrorCode *status){
- UResourceBundle* paperSizeBundle = NULL;
- const int32_t* paperSize=NULL;
+ UResourceBundle* paperSizeBundle = nullptr;
+ const int32_t* paperSize=nullptr;
int32_t len = 0;
- if(status == NULL || U_FAILURE(*status)){
+ if(status == nullptr || U_FAILURE(*status)){
return;
}
@@ -266,26 +269,26 @@ ulocdata_getPaperSize(const char* localeID, int32_t *height, int32_t *width, UEr
U_CAPI void U_EXPORT2
ulocdata_getCLDRVersion(UVersionInfo versionArray, UErrorCode *status) {
- UResourceBundle *rb = NULL;
- rb = ures_openDirect(NULL, "supplementalData", status);
+ UResourceBundle *rb = nullptr;
+ rb = ures_openDirect(nullptr, "supplementalData", status);
ures_getVersionByKey(rb, "cldrVersion", versionArray, status);
ures_close(rb);
}
U_CAPI int32_t U_EXPORT2
ulocdata_getLocaleDisplayPattern(ULocaleData *uld,
- UChar *result,
+ char16_t *result,
int32_t resultCapacity,
UErrorCode *status) {
UResourceBundle *patternBundle;
int32_t len = 0;
- const UChar *pattern = NULL;
+ const char16_t *pattern = nullptr;
UErrorCode localStatus = U_ZERO_ERROR;
if (U_FAILURE(*status))
return 0;
- patternBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", NULL, &localStatus);
+ patternBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", nullptr, &localStatus);
if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) {
localStatus = U_MISSING_RESOURCE_ERROR;
@@ -322,22 +325,22 @@ ulocdata_getLocaleDisplayPattern(ULocaleData *uld,
U_CAPI int32_t U_EXPORT2
ulocdata_getLocaleSeparator(ULocaleData *uld,
- UChar *result,
+ char16_t *result,
int32_t resultCapacity,
UErrorCode *status) {
UResourceBundle *separatorBundle;
int32_t len = 0;
- const UChar *separator = NULL;
+ const char16_t *separator = nullptr;
UErrorCode localStatus = U_ZERO_ERROR;
- UChar *p0, *p1;
- static const UChar sub0[4] = { 0x007b, 0x0030, 0x007d , 0x0000 }; /* {0} */
- static const UChar sub1[4] = { 0x007b, 0x0031, 0x007d , 0x0000 }; /* {1} */
+ char16_t *p0, *p1;
+ static const char16_t sub0[4] = { 0x007b, 0x0030, 0x007d , 0x0000 }; /* {0} */
+ static const char16_t sub1[4] = { 0x007b, 0x0031, 0x007d , 0x0000 }; /* {1} */
static const int32_t subLen = 3;
if (U_FAILURE(*status))
return 0;
- separatorBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", NULL, &localStatus);
+ separatorBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", nullptr, &localStatus);
if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) {
localStatus = U_MISSING_RESOURCE_ERROR;
@@ -370,8 +373,8 @@ ulocdata_getLocaleSeparator(ULocaleData *uld,
/* For backwards compatibility, if we have a pattern, return the portion between {0} and {1} */
p0=u_strstr(separator, sub0);
p1=u_strstr(separator, sub1);
- if (p0!=NULL && p1!=NULL && p0<=p1) {
- separator = (const UChar *)p0 + subLen;
+ if (p0!=nullptr && p1!=nullptr && p0<=p1) {
+ separator = (const char16_t *)p0 + subLen;
len = static_cast<int32_t>(p1 - separator);
/* Desired separator is no longer zero-terminated; handle that if necessary */
if (len < resultCapacity) {
diff --git a/contrib/libs/icu/i18n/umsg.cpp b/contrib/libs/icu/i18n/umsg.cpp
index c2d5a9a1f5a..ea6e62e2aaf 100644
--- a/contrib/libs/icu/i18n/umsg.cpp
+++ b/contrib/libs/icu/i18n/umsg.cpp
@@ -59,9 +59,9 @@ U_NAMESPACE_USE
U_CAPI int32_t
u_formatMessage(const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status,
...)
@@ -81,16 +81,16 @@ u_formatMessage(const char *locale,
U_CAPI int32_t U_EXPORT2
u_vformatMessage( const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
va_list ap,
UErrorCode *status)
{
//argument checking deferred to subsequent method calls
- UMessageFormat *fmt = umsg_open(pattern,patternLength,locale,NULL,status);
+ UMessageFormat *fmt = umsg_open(pattern,patternLength,locale,nullptr,status);
int32_t retVal = umsg_vformat(fmt,result,resultLength,ap,status);
umsg_close(fmt);
return retVal;
@@ -98,9 +98,9 @@ u_vformatMessage( const char *locale,
U_CAPI int32_t
u_formatMessageWithError(const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UParseError *parseError,
UErrorCode *status,
@@ -121,9 +121,9 @@ u_formatMessageWithError(const char *locale,
U_CAPI int32_t U_EXPORT2
u_vformatMessageWithError( const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UParseError *parseError,
va_list ap,
@@ -144,9 +144,9 @@ u_vformatMessageWithError( const char *locale,
// 3. Iterate through each formattable returned, and assign to the arguments
U_CAPI void
u_parseMessage( const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
UErrorCode *status,
...)
@@ -164,15 +164,15 @@ u_parseMessage( const char *locale,
U_CAPI void U_EXPORT2
u_vparseMessage(const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
va_list ap,
UErrorCode *status)
{
//argument checking deferred to subsequent method calls
- UMessageFormat *fmt = umsg_open(pattern,patternLength,locale,NULL,status);
+ UMessageFormat *fmt = umsg_open(pattern,patternLength,locale,nullptr,status);
int32_t count = 0;
umsg_vparse(fmt,source,sourceLength,&count,ap,status);
umsg_close(fmt);
@@ -180,9 +180,9 @@ u_vparseMessage(const char *locale,
U_CAPI void
u_parseMessageWithError(const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
UParseError *error,
UErrorCode *status,
@@ -201,9 +201,9 @@ u_parseMessageWithError(const char *locale,
}
U_CAPI void U_EXPORT2
u_vparseMessageWithError(const char *locale,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
va_list ap,
UParseError *error,
@@ -223,24 +223,24 @@ u_vparseMessageWithError(const char *locale,
U_CAPI UMessageFormat* U_EXPORT2
-umsg_open( const UChar *pattern,
+umsg_open( const char16_t *pattern,
int32_t patternLength,
const char *locale,
UParseError *parseError,
UErrorCode *status)
{
//check arguments
- if(status==NULL || U_FAILURE(*status))
+ if(status==nullptr || U_FAILURE(*status))
{
return 0;
}
- if(pattern==NULL||patternLength<-1){
+ if(pattern==nullptr||patternLength<-1){
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
UParseError tErr;
- if(parseError==NULL)
+ if(parseError==nullptr)
{
parseError = &tErr;
}
@@ -249,9 +249,9 @@ umsg_open( const UChar *pattern,
UnicodeString patString(patternLength == -1, pattern, len);
MessageFormat* retVal = new MessageFormat(patString,Locale(locale),*parseError,*status);
- if(retVal == NULL) {
+ if(retVal == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_SUCCESS(*status) && MessageFormatAdapter::hasArgTypeConflicts(*retVal)) {
*status = U_ARGUMENT_TYPE_MISMATCH;
@@ -263,7 +263,7 @@ U_CAPI void U_EXPORT2
umsg_close(UMessageFormat* format)
{
//check arguments
- if(format==NULL){
+ if(format==nullptr){
return;
}
delete (MessageFormat*) format;
@@ -274,12 +274,12 @@ umsg_clone(const UMessageFormat *fmt,
UErrorCode *status)
{
//check arguments
- if(status==NULL || U_FAILURE(*status)){
- return NULL;
+ if(status==nullptr || U_FAILURE(*status)){
+ return nullptr;
}
- if(fmt==NULL){
+ if(fmt==nullptr){
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
UMessageFormat retVal = (UMessageFormat)((MessageFormat*)fmt)->clone();
if(retVal == 0) {
@@ -293,7 +293,7 @@ U_CAPI void U_EXPORT2
umsg_setLocale(UMessageFormat *fmt, const char* locale)
{
//check arguments
- if(fmt==NULL){
+ if(fmt==nullptr){
return;
}
((MessageFormat*)fmt)->setLocale(Locale(locale));
@@ -303,7 +303,7 @@ U_CAPI const char* U_EXPORT2
umsg_getLocale(const UMessageFormat *fmt)
{
//check arguments
- if(fmt==NULL){
+ if(fmt==nullptr){
return "";
}
return ((const MessageFormat*)fmt)->getLocale().getName();
@@ -311,22 +311,22 @@ umsg_getLocale(const UMessageFormat *fmt)
U_CAPI void U_EXPORT2
umsg_applyPattern(UMessageFormat *fmt,
- const UChar* pattern,
+ const char16_t* pattern,
int32_t patternLength,
UParseError* parseError,
UErrorCode* status)
{
//check arguments
UParseError tErr;
- if(status ==NULL||U_FAILURE(*status)){
+ if(status ==nullptr||U_FAILURE(*status)){
return ;
}
- if(fmt==NULL || (pattern==NULL && patternLength!=0) || patternLength<-1) {
+ if(fmt==nullptr || (pattern==nullptr && patternLength!=0) || patternLength<-1) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return ;
}
- if(parseError==NULL){
+ if(parseError==nullptr){
parseError = &tErr;
}
@@ -336,23 +336,23 @@ umsg_applyPattern(UMessageFormat *fmt,
U_CAPI int32_t U_EXPORT2
umsg_toPattern(const UMessageFormat *fmt,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UErrorCode* status)
{
//check arguments
- if(status ==NULL||U_FAILURE(*status)){
+ if(status ==nullptr||U_FAILURE(*status)){
return -1;
}
- if(fmt==NULL||resultLength<0 || (resultLength>0 && result==0)){
+ if(fmt==nullptr||resultLength<0 || (resultLength>0 && result==0)){
*status=U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -362,7 +362,7 @@ umsg_toPattern(const UMessageFormat *fmt,
U_CAPI int32_t
umsg_format( const UMessageFormat *fmt,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UErrorCode *status,
...)
@@ -387,7 +387,7 @@ umsg_format( const UMessageFormat *fmt,
U_CAPI int32_t U_EXPORT2
umsg_vformat( const UMessageFormat *fmt,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
va_list ap,
UErrorCode *status)
@@ -397,7 +397,7 @@ umsg_vformat( const UMessageFormat *fmt,
{
return -1;
}
- if(fmt==NULL||resultLength<0 || (resultLength>0 && result==0)) {
+ if(fmt==nullptr||resultLength<0 || (resultLength>0 && result==0)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -412,7 +412,7 @@ umsg_vformat( const UMessageFormat *fmt,
// iterate through the vararg list, and get the arguments out
for(int32_t i = 0; i < count; ++i) {
- UChar *stringVal;
+ char16_t *stringVal;
double tDouble=0;
int32_t tInt =0;
int64_t tInt64 = 0;
@@ -440,7 +440,7 @@ umsg_vformat( const UMessageFormat *fmt,
case Formattable::kString:
// For some reason, a temporary is needed
- stringVal = va_arg(ap, UChar*);
+ stringVal = va_arg(ap, char16_t*);
if(stringVal){
args[i].setString(UnicodeString(stringVal));
}else{
@@ -483,7 +483,7 @@ umsg_vformat( const UMessageFormat *fmt,
U_CAPI void
umsg_parse( const UMessageFormat *fmt,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
int32_t *count,
UErrorCode *status,
@@ -505,18 +505,18 @@ umsg_parse( const UMessageFormat *fmt,
U_CAPI void U_EXPORT2
umsg_vparse(const UMessageFormat *fmt,
- const UChar *source,
+ const char16_t *source,
int32_t sourceLength,
int32_t *count,
va_list ap,
UErrorCode *status)
{
//check arguments
- if(status==NULL||U_FAILURE(*status))
+ if(status==nullptr||U_FAILURE(*status))
{
return;
}
- if(fmt==NULL||source==NULL || sourceLength<-1 || count==NULL){
+ if(fmt==nullptr||source==nullptr || sourceLength<-1 || count==nullptr){
*status=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -528,7 +528,7 @@ umsg_vparse(const UMessageFormat *fmt,
Formattable *args = ((const MessageFormat*)fmt)->parse(srcString,*count,*status);
UDate *aDate;
double *aDouble;
- UChar *aString;
+ char16_t *aString;
int32_t* aInt;
int64_t* aInt64;
UnicodeString temp;
@@ -574,7 +574,7 @@ umsg_vparse(const UMessageFormat *fmt,
break;
case Formattable::kString:
- aString = va_arg(ap, UChar*);
+ aString = va_arg(ap, char16_t*);
if(aString){
args[i].getString(temp);
len = temp.length();
@@ -602,9 +602,9 @@ umsg_vparse(const UMessageFormat *fmt,
delete [] args;
}
-#define SINGLE_QUOTE ((UChar)0x0027)
-#define CURLY_BRACE_LEFT ((UChar)0x007B)
-#define CURLY_BRACE_RIGHT ((UChar)0x007D)
+#define SINGLE_QUOTE ((char16_t)0x0027)
+#define CURLY_BRACE_LEFT ((char16_t)0x007B)
+#define CURLY_BRACE_RIGHT ((char16_t)0x007D)
#define STATE_INITIAL 0
#define STATE_SINGLE_QUOTE 1
@@ -613,9 +613,9 @@ umsg_vparse(const UMessageFormat *fmt,
#define MAppend(c) if (len < destCapacity) dest[len++] = c; else len++
-int32_t umsg_autoQuoteApostrophe(const UChar* pattern,
+int32_t umsg_autoQuoteApostrophe(const char16_t* pattern,
int32_t patternLength,
- UChar* dest,
+ char16_t* dest,
int32_t destCapacity,
UErrorCode* ec)
{
@@ -623,11 +623,11 @@ int32_t umsg_autoQuoteApostrophe(const UChar* pattern,
int32_t braceCount = 0;
int32_t len = 0;
- if (ec == NULL || U_FAILURE(*ec)) {
+ if (ec == nullptr || U_FAILURE(*ec)) {
return -1;
}
- if (pattern == NULL || patternLength < -1 || (dest == NULL && destCapacity > 0)) {
+ if (pattern == nullptr || patternLength < -1 || (dest == nullptr && destCapacity > 0)) {
*ec = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -638,7 +638,7 @@ int32_t umsg_autoQuoteApostrophe(const UChar* pattern,
}
for (int i = 0; i < patternLength; ++i) {
- UChar c = pattern[i];
+ char16_t c = pattern[i];
switch (state) {
case STATE_INITIAL:
switch (c) {
diff --git a/contrib/libs/icu/i18n/unesctrn.cpp b/contrib/libs/icu/i18n/unesctrn.cpp
index 0636fe1d149..cce191ca62e 100644
--- a/contrib/libs/icu/i18n/unesctrn.cpp
+++ b/contrib/libs/icu/i18n/unesctrn.cpp
@@ -26,47 +26,47 @@ U_NAMESPACE_BEGIN
/**
* Special character marking the end of the spec[] array.
*/
-static const UChar END = 0xFFFF;
+static const char16_t END = 0xFFFF;
// Unicode: "U+10FFFF" hex, min=4, max=6
-static const UChar SPEC_Unicode[] = {
+static const char16_t SPEC_Unicode[] = {
2, 0, 16, 4, 6, 85/*U*/, 43/*+*/,
END
};
// Java: "\\uFFFF" hex, min=4, max=4
-static const UChar SPEC_Java[] = {
+static const char16_t SPEC_Java[] = {
2, 0, 16, 4, 4, 92/*\*/, 117/*u*/,
END
};
// C: "\\uFFFF" hex, min=4, max=4; \\U0010FFFF hex, min=8, max=8
-static const UChar SPEC_C[] = {
+static const char16_t SPEC_C[] = {
2, 0, 16, 4, 4, 92/*\*/, 117/*u*/,
2, 0, 16, 8, 8, 92/*\*/, 85/*U*/,
END
};
// XML: "&#x10FFFF;" hex, min=1, max=6
-static const UChar SPEC_XML[] = {
+static const char16_t SPEC_XML[] = {
3, 1, 16, 1, 6, 38/*&*/, 35/*#*/, 120/*x*/, 59/*;*/,
END
};
// XML10: "&#1114111;" dec, min=1, max=7 (not really "Hex-Any")
-static const UChar SPEC_XML10[] = {
+static const char16_t SPEC_XML10[] = {
2, 1, 10, 1, 7, 38/*&*/, 35/*#*/, 59/*;*/,
END
};
// Perl: "\\x{263A}" hex, min=1, max=6
-static const UChar SPEC_Perl[] = {
+static const char16_t SPEC_Perl[] = {
3, 1, 16, 1, 6, 92/*\*/, 120/*x*/, 123/*{*/, 125/*}*/,
END
};
// All: Java, C, Perl, XML, XML10, Unicode
-static const UChar SPEC_Any[] = {
+static const char16_t SPEC_Any[] = {
2, 0, 16, 4, 6, 85/*U*/, 43/*+*/, // Unicode
2, 0, 16, 4, 4, 92/*\*/, 117/*u*/, // Java
2, 0, 16, 8, 8, 92/*\*/, 85/*U*/, // C (surrogates)
@@ -78,15 +78,15 @@ static const UChar SPEC_Any[] = {
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnescapeTransliterator)
-static UChar* copySpec(const UChar* spec) {
+static char16_t* copySpec(const char16_t* spec) {
int32_t len = 0;
while (spec[len] != END) {
++len;
}
++len;
- UChar *result = (UChar *)uprv_malloc(len*sizeof(UChar));
+ char16_t *result = (char16_t *)uprv_malloc(len*sizeof(char16_t));
// Check for memory allocation error.
- if (result != NULL) {
+ if (result != nullptr) {
uprv_memcpy(result, spec, (size_t)len*sizeof(result[0]));
}
return result;
@@ -143,8 +143,8 @@ void UnescapeTransliterator::registerIDs() {
* Constructor. Takes the encoded spec array.
*/
UnescapeTransliterator::UnescapeTransliterator(const UnicodeString& newID,
- const UChar *newSpec) :
- Transliterator(newID, NULL)
+ const char16_t *newSpec) :
+ Transliterator(newID, nullptr)
{
this->spec = copySpec(newSpec);
}
@@ -175,13 +175,13 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
UBool isIncremental) const {
int32_t start = pos.start;
int32_t limit = pos.limit;
- int32_t i, j, ipat;
+ int32_t i, ipat;
while (start < limit) {
// Loop over the forms in spec[]. Exit this loop when we
// match one of the specs. Exit the outer loop if a
// partial match is detected and isIncremental is true.
- for (j=0, ipat=0; spec[ipat] != END; ++j) {
+ for (ipat=0; spec[ipat] != END;) {
// Read the header
int32_t prefixLen = spec[ipat++];
@@ -193,7 +193,7 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
// s is a copy of start that is advanced over the
// characters as we parse them.
int32_t s = start;
- UBool match = TRUE;
+ UBool match = true;
for (i=0; i<prefixLen; ++i) {
if (s >= limit) {
@@ -205,13 +205,13 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
if (isIncremental) {
goto exit;
}
- match = FALSE;
+ match = false;
break;
}
}
- UChar c = text.charAt(s++);
+ char16_t c = text.charAt(s++);
if (c != spec[ipat + i]) {
- match = FALSE;
+ match = false;
break;
}
}
@@ -248,12 +248,12 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
if (s > start && isIncremental) {
goto exit;
}
- match = FALSE;
+ match = false;
break;
}
- UChar c = text.charAt(s++);
+ char16_t c = text.charAt(s++);
if (c != spec[ipat + prefixLen + i]) {
- match = FALSE;
+ match = false;
break;
}
}
diff --git a/contrib/libs/icu/i18n/unesctrn.h b/contrib/libs/icu/i18n/unesctrn.h
index e905c5bc5f5..3bea2780827 100644
--- a/contrib/libs/icu/i18n/unesctrn.h
+++ b/contrib/libs/icu/i18n/unesctrn.h
@@ -46,7 +46,7 @@ class UnescapeTransliterator : public Transliterator {
* and suffix. The end is marked by a header of length one
* consisting of the character END.
*/
- UChar* spec; // owned; may not be NULL
+ char16_t* spec; // owned; may not be nullptr
public:
@@ -62,7 +62,7 @@ class UnescapeTransliterator : public Transliterator {
* @param spec the encoded spec array
*/
UnescapeTransliterator(const UnicodeString& ID,
- const UChar *spec);
+ const char16_t *spec);
/**
* Copy constructor.
diff --git a/contrib/libs/icu/i18n/uni2name.cpp b/contrib/libs/icu/i18n/uni2name.cpp
index 904da0207bc..727f8953dbb 100644
--- a/contrib/libs/icu/i18n/uni2name.cpp
+++ b/contrib/libs/icu/i18n/uni2name.cpp
@@ -26,8 +26,8 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnicodeNameTransliterator)
-static const UChar OPEN_DELIM[] = {92,78,123,0}; // "\N{"
-static const UChar CLOSE_DELIM = 125; // "}"
+static const char16_t OPEN_DELIM[] = {92,78,123,0}; // "\N{"
+static const char16_t CLOSE_DELIM = 125; // "}"
#define OPEN_DELIM_LEN 3
/**
@@ -73,7 +73,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos
UBool /*isIncremental*/) const {
// The failure mode, here and below, is to behave like Any-Null,
// if either there is no name data (max len == 0) or there is no
- // memory (malloc() => NULL).
+ // memory (malloc() => nullptr).
int32_t maxLen = uprv_getMaxCharNameLength();
if (maxLen == 0) {
@@ -83,7 +83,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos
// Accommodate the longest possible name plus padding
char* buf = (char*) uprv_malloc(maxLen);
- if (buf == NULL) {
+ if (buf == nullptr) {
offsets.start = offsets.limit;
return;
}
@@ -91,7 +91,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos
int32_t cursor = offsets.start;
int32_t limit = offsets.limit;
- UnicodeString str(FALSE, OPEN_DELIM, OPEN_DELIM_LEN);
+ UnicodeString str(false, OPEN_DELIM, OPEN_DELIM_LEN);
UErrorCode status;
int32_t len;
diff --git a/contrib/libs/icu/i18n/units_complexconverter.cpp b/contrib/libs/icu/i18n/units_complexconverter.cpp
index 78cefbf7ebb..edbb6573ff1 100644
--- a/contrib/libs/icu/i18n/units_complexconverter.cpp
+++ b/contrib/libs/icu/i18n/units_complexconverter.cpp
@@ -143,7 +143,7 @@ MaybeStackVector<Measure> ComplexUnitsConverter::convert(double quantity,
// TODO: return an error for "foot-and-foot"?
MaybeStackVector<Measure> result;
int sign = 1;
- if (quantity < 0) {
+ if (quantity < 0 && unitsConverters_.length() > 1) {
quantity *= -1;
sign = -1;
}
@@ -164,12 +164,14 @@ MaybeStackVector<Measure> ComplexUnitsConverter::convert(double quantity,
if (i < n - 1) {
// If quantity is at the limits of double's precision from an
// integer value, we take that integer value.
- int64_t flooredQuantity = static_cast<int64_t>(floor(quantity * (1 + DBL_EPSILON)));
+ int64_t flooredQuantity;
if (uprv_isNaN(quantity)) {
// With clang on Linux: floor does not support NaN, resulting in
// a giant negative number. For now, we produce "0 feet, NaN
// inches". TODO(icu-units#131): revisit desired output.
flooredQuantity = 0;
+ } else {
+ flooredQuantity = static_cast<int64_t>(floor(quantity * (1 + DBL_EPSILON)));
}
intValues[i] = flooredQuantity;
@@ -183,7 +185,7 @@ MaybeStackVector<Measure> ComplexUnitsConverter::convert(double quantity,
} else {
quantity = remainder;
}
- }
+ }
}
applyRounder(intValues, quantity, rounder, status);
@@ -210,7 +212,6 @@ MaybeStackVector<Measure> ComplexUnitsConverter::convert(double quantity,
}
}
-
// Transfer values into result and return:
for(int32_t i = 0, n = unitsConverters_.length(); i < n; ++i) {
U_ASSERT(tmpResult[i] != nullptr);
@@ -224,6 +225,12 @@ MaybeStackVector<Measure> ComplexUnitsConverter::convert(double quantity,
void ComplexUnitsConverter::applyRounder(MaybeStackArray<int64_t, 5> &intValues, double &quantity,
icu::number::impl::RoundingImpl *rounder,
UErrorCode &status) const {
+ if (uprv_isInfinite(quantity) || uprv_isNaN(quantity)) {
+ // Inf and NaN can't be rounded, and calculating `carry` below is known
+ // to fail on Gentoo on HPPA and OpenSUSE on riscv64. Nothing to do.
+ return;
+ }
+
if (rounder == nullptr) {
// Nothing to do for the quantity.
return;
diff --git a/contrib/libs/icu/i18n/units_complexconverter.h b/contrib/libs/icu/i18n/units_complexconverter.h
index 5c669b45ddd..d56ce8d4ce3 100644
--- a/contrib/libs/icu/i18n/units_complexconverter.h
+++ b/contrib/libs/icu/i18n/units_complexconverter.h
@@ -108,13 +108,15 @@ class U_I18N_API ComplexUnitsConverter : public UMemory {
MaybeStackVector<Measure>
convert(double quantity, icu::number::impl::RoundingImpl *rounder, UErrorCode &status) const;
- private:
+ // TODO(ICU-21937): Make it private after submitting the public units conversion API.
MaybeStackVector<UnitsConverter> unitsConverters_;
+ // TODO(ICU-21937): Make it private after submitting the public units conversion API.
// Individual units of mixed units, sorted big to small, with indices
// indicating the requested output mixed unit order.
MaybeStackVector<MeasureUnitImplWithIndex> units_;
+ private:
// Sorts units_, which must be populated before calling this, and populates
// unitsConverters_.
void init(const MeasureUnitImpl &inputUnit, const ConversionRates &ratesInfo, UErrorCode &status);
diff --git a/contrib/libs/icu/i18n/units_converter.cpp b/contrib/libs/icu/i18n/units_converter.cpp
index 7e946e584bb..b89f4951210 100644
--- a/contrib/libs/icu/i18n/units_converter.cpp
+++ b/contrib/libs/icu/i18n/units_converter.cpp
@@ -9,6 +9,7 @@
#include "cmemory.h"
#include "double-conversion-string-to-double.h"
#include "measunit_impl.h"
+#include "putilimp.h"
#include "uassert.h"
#include "unicode/errorcode.h"
#include "unicode/localpointer.h"
@@ -388,8 +389,14 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign
factor.constantExponents[CONSTANT_GLUCOSE_MOLAR_MASS] += power * signum;
} else if (baseStr == "item_per_mole") {
factor.constantExponents[CONSTANT_ITEM_PER_MOLE] += power * signum;
+ } else if (baseStr == "meters_per_AU") {
+ factor.constantExponents[CONSTANT_METERS_PER_AU] += power * signum;
} else if (baseStr == "PI") {
factor.constantExponents[CONSTANT_PI] += power * signum;
+ } else if (baseStr == "sec_per_julian_year") {
+ 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 (signum == Signum::NEGATIVE) {
factor.factorDen *= std::pow(strToDouble(baseStr, status), power);
@@ -588,10 +595,7 @@ double UnitsConverter::convert(double inputValue) const {
if (conversionRate_.reciprocal) {
if (result == 0) {
- // TODO: demonstrate the resulting behaviour in tests... and figure
- // out desired behaviour. (Theoretical result should be infinity,
- // not 0.)
- return 0.0;
+ return uprv_getInfinity();
}
result = 1.0 / result;
}
@@ -603,10 +607,7 @@ double UnitsConverter::convertInverse(double inputValue) const {
double result = inputValue;
if (conversionRate_.reciprocal) {
if (result == 0) {
- // TODO: demonstrate the resulting behaviour in tests... and figure
- // out desired behaviour. (Theoretical result should be infinity,
- // not 0.)
- return 0.0;
+ return uprv_getInfinity();
}
result = 1.0 / result;
}
diff --git a/contrib/libs/icu/i18n/units_converter.h b/contrib/libs/icu/i18n/units_converter.h
index 5c002f4147e..fd1d6ec4227 100644
--- a/contrib/libs/icu/i18n/units_converter.h
+++ b/contrib/libs/icu/i18n/units_converter.h
@@ -30,6 +30,9 @@ enum Constants {
CONSTANT_LB2KG, // Pound to Kilogram
CONSTANT_GLUCOSE_MOLAR_MASS,
CONSTANT_ITEM_PER_MOLE,
+ CONSTANT_METERS_PER_AU,
+ CONSTANT_SEC_PER_JULIAN_YEAR,
+ CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND,
// Must be the last element.
CONSTANTS_COUNT
@@ -49,6 +52,9 @@ static const double constantsValues[CONSTANTS_COUNT] = {
0.45359237, // CONSTANT_LB2KG
180.1557, // CONSTANT_GLUCOSE_MOLAR_MASS
6.02214076E+23, // CONSTANT_ITEM_PER_MOLE
+ 149597870700, // CONSTANT_METERS_PER_AU
+ 31557600, // CONSTANT_SEC_PER_JULIAN_YEAR
+ 299792458, // CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND
};
typedef enum Signum {
diff --git a/contrib/libs/icu/i18n/units_data.cpp b/contrib/libs/icu/i18n/units_data.cpp
index d1d1fc5bc05..801ede88378 100644
--- a/contrib/libs/icu/i18n/units_data.cpp
+++ b/contrib/libs/icu/i18n/units_data.cpp
@@ -5,10 +5,12 @@
#if !UCONFIG_NO_FORMATTING
+#include "bytesinkutil.h"
#include "cstring.h"
#include "number_decimalquantity.h"
#include "resource.h"
#include "uassert.h"
+#include "unicode/locid.h"
#include "unicode/unistr.h"
#include "unicode/ures.h"
#include "units_data.h"
@@ -203,11 +205,11 @@ class UnitPreferencesSink : public ResourceSink {
for (int32_t i = 0; unitPref.getKeyAndValue(i, key, value); ++i) {
if (uprv_strcmp(key, "unit") == 0) {
int32_t length;
- const UChar *u = value.getString(length, status);
+ const char16_t *u = value.getString(length, status);
up->unit.appendInvariantChars(u, length, status);
} else if (uprv_strcmp(key, "geq") == 0) {
int32_t length;
- const UChar *g = value.getString(length, status);
+ const char16_t *g = value.getString(length, status);
CharString geq;
geq.appendInvariantChars(g, length, status);
DecimalQuantity dq;
@@ -366,7 +368,7 @@ int32_t UnitPreferenceMetadata::compareTo(const UnitPreferenceMetadata &other, b
// TODO: this may be unnecessary. Fold into ConversionRates class? Or move to anonymous namespace?
void U_I18N_API getAllConversionRates(MaybeStackVector<ConversionRateInfo> &result, UErrorCode &status) {
- LocalUResourceBundlePointer unitsBundle(ures_openDirect(NULL, "units", &status));
+ LocalUResourceBundlePointer unitsBundle(ures_openDirect(nullptr, "units", &status));
ConversionRateDataSink sink(&result);
ures_getAllItemsWithFallback(unitsBundle.getAlias(), "convertUnits", sink, status);
}
@@ -382,29 +384,107 @@ const ConversionRateInfo *ConversionRates::extractConversionInfo(StringPiece sou
}
U_I18N_API UnitPreferences::UnitPreferences(UErrorCode &status) {
- LocalUResourceBundlePointer unitsBundle(ures_openDirect(NULL, "units", &status));
+ LocalUResourceBundlePointer unitsBundle(ures_openDirect(nullptr, "units", &status));
UnitPreferencesSink sink(&unitPrefs_, &metadata_);
ures_getAllItemsWithFallback(unitsBundle.getAlias(), "unitPreferenceData", sink, status);
}
-// TODO: make outPreferences const?
-//
-// TODO: consider replacing `UnitPreference **&outPreferences` with slice class
-// of some kind.
-void U_I18N_API UnitPreferences::getPreferencesFor(StringPiece category, StringPiece usage,
- StringPiece region,
- const UnitPreference *const *&outPreferences,
- int32_t &preferenceCount, UErrorCode &status) const {
- int32_t idx = getPreferenceMetadataIndex(&metadata_, category, usage, region, 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_SUCCESS(status) && result.isEmpty()) {
+ status = U_MISSING_RESOURCE_ERROR;
+ }
+ return result;
+}
+
+MaybeStackVector<UnitPreference>
+ U_I18N_API UnitPreferences::getPreferencesFor(StringPiece category, StringPiece usage,
+ const Locale &locale, UErrorCode &status) const {
+
+ MaybeStackVector<UnitPreference> result;
+
+ // TODO: remove this once all the categories are allowed.
+ // WARNING: when this is removed please make sure to keep the "fahrenhe" => "fahrenheit" mapping
+ UErrorCode internalMuStatus = U_ZERO_ERROR;
+ if (category.compare("temperature") == 0) {
+ CharString localeUnitCharString = getKeyWordValue(locale, "mu", internalMuStatus);
+ if (U_SUCCESS(internalMuStatus)) {
+ // The value for -u-mu- is `fahrenhe`, but CLDR and everything else uses `fahrenheit`
+ if (localeUnitCharString == "fahrenhe") {
+ localeUnitCharString = CharString("fahrenheit", status);
+ }
+ // TODO: use the unit category as Java especially when all the categories are allowed..
+ if (localeUnitCharString == "celsius"
+ || localeUnitCharString == "fahrenheit"
+ || localeUnitCharString == "kelvin"
+ ) {
+ UnitPreference unitPref;
+ unitPref.unit.append(localeUnitCharString, status);
+ result.emplaceBackAndCheckErrorCode(status, unitPref);
+ return result;
+ }
+ }
+ }
+
+ CharString region(locale.getCountry(), 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);
+ }
+ }
+ }
+
+ int32_t idx =
+ getPreferenceMetadataIndex(&metadata_, category, usage, region.toStringPiece(), status);
if (U_FAILURE(status)) {
- outPreferences = nullptr;
- preferenceCount = 0;
- return;
+ return result;
}
+
U_ASSERT(idx >= 0); // Failures should have been taken care of by `status`.
const UnitPreferenceMetadata *m = metadata_[idx];
- outPreferences = unitPrefs_.getAlias() + m->prefsOffset;
- preferenceCount = m->prefsCount;
+ for (int32_t i = 0; i < m->prefsCount; i++) {
+ result.emplaceBackAndCheckErrorCode(status, *(unitPrefs_[i + m->prefsOffset]));
+ }
+ return result;
}
} // namespace units
diff --git a/contrib/libs/icu/i18n/units_data.h b/contrib/libs/icu/i18n/units_data.h
index 2c19b9434bd..118458ecca2 100644
--- a/contrib/libs/icu/i18n/units_data.h
+++ b/contrib/libs/icu/i18n/units_data.h
@@ -99,6 +99,13 @@ struct U_I18N_API UnitPreference : public UMemory {
CharString unit;
double geq;
UnicodeString skeleton;
+
+ UnitPreference(const UnitPreference &other) {
+ UErrorCode status = U_ZERO_ERROR;
+ this->unit.append(other.unit, status);
+ this->geq = other.geq;
+ this->skeleton = other.skeleton;
+ }
};
/**
@@ -189,12 +196,11 @@ class U_I18N_API UnitPreferences {
* @param preferenceCount The number of unit preferences that belong to the
* result set.
* @param status Receives status.
- *
- * TODO(hugovdm): maybe replace `UnitPreference **&outPreferences` with a slice class?
*/
- void getPreferencesFor(StringPiece category, StringPiece usage, StringPiece region,
- const UnitPreference *const *&outPreferences, int32_t &preferenceCount,
- UErrorCode &status) const;
+ MaybeStackVector<UnitPreference> getPreferencesFor(StringPiece category, StringPiece usage,
+ const Locale &locale,
+
+ UErrorCode &status) const;
protected:
// Metadata about the sets of preferences, this is the index for looking up
diff --git a/contrib/libs/icu/i18n/units_router.cpp b/contrib/libs/icu/i18n/units_router.cpp
index 0e6082fae5c..03c9b4d1d7c 100644
--- a/contrib/libs/icu/i18n/units_router.cpp
+++ b/contrib/libs/icu/i18n/units_router.cpp
@@ -43,17 +43,17 @@ Precision UnitsRouter::parseSkeletonToPrecision(icu::UnicodeString precisionSkel
return result;
}
-UnitsRouter::UnitsRouter(StringPiece inputUnitIdentifier, StringPiece region, StringPiece usage,
+UnitsRouter::UnitsRouter(StringPiece inputUnitIdentifier, const Locale &locale, StringPiece usage,
UErrorCode &status) {
- this->init(MeasureUnit::forIdentifier(inputUnitIdentifier, status), region, usage, status);
+ this->init(MeasureUnit::forIdentifier(inputUnitIdentifier, status), locale, usage, status);
}
-UnitsRouter::UnitsRouter(const MeasureUnit &inputUnit, StringPiece region, StringPiece usage,
+UnitsRouter::UnitsRouter(const MeasureUnit &inputUnit, const Locale &locale, StringPiece usage,
UErrorCode &status) {
- this->init(std::move(inputUnit), region, usage, status);
+ this->init(std::move(inputUnit), locale, usage, status);
}
-void UnitsRouter::init(const MeasureUnit &inputUnit, StringPiece region, StringPiece usage,
+void UnitsRouter::init(const MeasureUnit &inputUnit, const Locale &locale, StringPiece usage,
UErrorCode &status) {
if (U_FAILURE(status)) {
@@ -73,22 +73,19 @@ void UnitsRouter::init(const MeasureUnit &inputUnit, StringPiece region, StringP
return;
}
- const UnitPreference *const *unitPreferences;
- int32_t preferencesCount = 0;
- prefs.getPreferencesFor(category.toStringPiece(), usage, region, unitPreferences, preferencesCount,
- status);
-
- for (int i = 0; i < preferencesCount; ++i) {
- U_ASSERT(unitPreferences[i] != nullptr);
- const auto &preference = *unitPreferences[i];
+ const MaybeStackVector<UnitPreference> unitPrefs =
+ 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];
MeasureUnitImpl complexTargetUnitImpl =
- MeasureUnitImpl::forIdentifier(preference.unit.data(), status);
+ MeasureUnitImpl::forIdentifier(preference->unit.data(), status);
if (U_FAILURE(status)) {
return;
}
- UnicodeString precision = preference.skeleton;
+ UnicodeString precision = preference->skeleton;
// For now, we only have "precision-increment" in Units Preferences skeleton.
// Therefore, we check if the skeleton starts with "precision-increment" and force the program to
@@ -103,7 +100,7 @@ void UnitsRouter::init(const MeasureUnit &inputUnit, StringPiece region, StringP
outputUnits_.emplaceBackAndCheckErrorCode(status,
complexTargetUnitImpl.copy(status).build(status));
converterPreferences_.emplaceBackAndCheckErrorCode(status, inputUnitImpl, complexTargetUnitImpl,
- preference.geq, std::move(precision),
+ preference->geq, std::move(precision),
conversionRates, status);
if (U_FAILURE(status)) {
diff --git a/contrib/libs/icu/i18n/units_router.h b/contrib/libs/icu/i18n/units_router.h
index b3300f7e277..978fdf91fd5 100644
--- a/contrib/libs/icu/i18n/units_router.h
+++ b/contrib/libs/icu/i18n/units_router.h
@@ -11,6 +11,7 @@
#include "cmemory.h"
#include "measunit_impl.h"
+#include "unicode/locid.h"
#include "unicode/measunit.h"
#include "unicode/stringpiece.h"
#include "unicode/uobject.h"
@@ -30,8 +31,6 @@ namespace units {
struct RouteResult : UMemory {
// A list of measures: a single measure for single units, multiple measures
// for mixed units.
- //
- // TODO(icu-units/icu#21): figure out the right mixed unit API.
MaybeStackVector<Measure> measures;
// The output unit for this RouteResult. This may be a MIXED unit - for
@@ -120,9 +119,10 @@ namespace units {
*/
class U_I18N_API UnitsRouter {
public:
- UnitsRouter(StringPiece inputUnitIdentifier, StringPiece locale, StringPiece usage,
+ UnitsRouter(StringPiece inputUnitIdentifier, const Locale &locale, StringPiece usage,
+ UErrorCode &status);
+ UnitsRouter(const MeasureUnit &inputUnit, const Locale &locale, StringPiece usage,
UErrorCode &status);
- UnitsRouter(const MeasureUnit &inputUnit, StringPiece locale, StringPiece usage, UErrorCode &status);
/**
* Performs locale and usage sensitive unit conversion.
@@ -155,7 +155,7 @@ class U_I18N_API UnitsRouter {
static number::Precision parseSkeletonToPrecision(icu::UnicodeString precisionSkeleton,
UErrorCode &status);
- void init(const MeasureUnit &inputUnit, StringPiece locale, StringPiece usage, UErrorCode &status);
+ void init(const MeasureUnit &inputUnit, const Locale &locale, StringPiece usage, UErrorCode &status);
};
} // namespace units
diff --git a/contrib/libs/icu/i18n/unum.cpp b/contrib/libs/icu/i18n/unum.cpp
index 7043f7adc12..11a7bcba57d 100644
--- a/contrib/libs/icu/i18n/unum.cpp
+++ b/contrib/libs/icu/i18n/unum.cpp
@@ -39,16 +39,16 @@ U_NAMESPACE_USE
U_CAPI UNumberFormat* U_EXPORT2
unum_open( UNumberFormatStyle style,
- const UChar* pattern,
+ const char16_t* pattern,
int32_t patternLength,
const char* locale,
UParseError* parseErr,
UErrorCode* status) {
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- NumberFormat *retVal = NULL;
+ NumberFormat *retVal = nullptr;
switch(style) {
case UNUM_DECIMAL:
@@ -68,22 +68,22 @@ unum_open( UNumberFormatStyle style,
/* UnicodeString can handle the case when patternLength = -1. */
const UnicodeString pat(pattern, patternLength);
- if(parseErr==NULL){
+ if(parseErr==nullptr){
parseErr = &tErr;
}
DecimalFormatSymbols *syms = new DecimalFormatSymbols(Locale(locale), *status);
- if(syms == NULL) {
+ if(syms == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete syms;
- return NULL;
+ return nullptr;
}
retVal = new DecimalFormat(pat, syms, *parseErr, *status);
- if(retVal == NULL) {
+ if(retVal == nullptr) {
delete syms;
}
} break;
@@ -94,7 +94,7 @@ unum_open( UNumberFormatStyle style,
/* UnicodeString can handle the case when patternLength = -1. */
const UnicodeString pat(pattern, patternLength);
- if(parseErr==NULL){
+ if(parseErr==nullptr){
parseErr = &tErr;
}
@@ -113,9 +113,20 @@ unum_open( UNumberFormatStyle style,
retVal = new RuleBasedNumberFormat(URBNF_DURATION, Locale(locale), *status);
break;
- case UNUM_NUMBERING_SYSTEM:
- retVal = new RuleBasedNumberFormat(URBNF_NUMBERING_SYSTEM, Locale(locale), *status);
- break;
+ case UNUM_NUMBERING_SYSTEM: {
+ // if the locale ID specifies a numbering system, go through NumberFormat::createInstance()
+ // to handle it properly (we have to specify UNUM_DEFAULT to get it to handle the numbering
+ // system, but we'll always get a RuleBasedNumberFormat back); otherwise, just go ahead and
+ // create a RuleBasedNumberFormat ourselves
+ UErrorCode localErr = U_ZERO_ERROR;
+ Locale localeObj(locale);
+ int32_t keywordLength = localeObj.getKeywordValue("numbers", nullptr, 0, localErr);
+ if (keywordLength > 0) {
+ retVal = NumberFormat::createInstance(localeObj, UNUM_DEFAULT, *status);
+ } else {
+ retVal = new RuleBasedNumberFormat(URBNF_NUMBERING_SYSTEM, localeObj, *status);
+ }
+ } break;
#endif
case UNUM_DECIMAL_COMPACT_SHORT:
@@ -128,16 +139,16 @@ unum_open( UNumberFormatStyle style,
default:
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
}
- if(retVal == NULL && U_SUCCESS(*status)) {
+ if(retVal == nullptr && U_SUCCESS(*status)) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
- if (U_FAILURE(*status) && retVal != NULL) {
+ if (U_FAILURE(*status) && retVal != nullptr) {
delete retVal;
- retVal = NULL;
+ retVal = nullptr;
}
return reinterpret_cast<UNumberFormat *>(retVal);
@@ -159,11 +170,11 @@ unum_clone(const UNumberFormat *fmt,
Format *res = 0;
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
res = df->clone();
} else {
const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
- U_ASSERT(rbnf != NULL);
+ U_ASSERT(rbnf != nullptr);
res = rbnf->clone();
}
@@ -178,7 +189,7 @@ unum_clone(const UNumberFormat *fmt,
U_CAPI int32_t U_EXPORT2
unum_format( const UNumberFormat* fmt,
int32_t number,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPosition *pos,
UErrorCode* status)
@@ -189,7 +200,7 @@ unum_format( const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_formatInt64(const UNumberFormat* fmt,
int64_t number,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPosition *pos,
UErrorCode* status)
@@ -198,8 +209,8 @@ unum_formatInt64(const UNumberFormat* fmt,
return -1;
UnicodeString res;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -222,7 +233,7 @@ unum_formatInt64(const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_formatDouble( const UNumberFormat* fmt,
double number,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPosition *pos, /* 0 if ignore */
UErrorCode* status)
@@ -231,8 +242,8 @@ unum_formatDouble( const UNumberFormat* fmt,
if(U_FAILURE(*status)) return -1;
UnicodeString res;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -255,7 +266,7 @@ unum_formatDouble( const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_formatDoubleForFields(const UNumberFormat* format,
double number,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPositionIterator* fpositer,
UErrorCode* status)
@@ -263,14 +274,14 @@ unum_formatDoubleForFields(const UNumberFormat* format,
if (U_FAILURE(*status))
return -1;
- if (result == NULL ? resultLength != 0 : resultLength < 0) {
+ if (result == nullptr ? resultLength != 0 : resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
UnicodeString res;
- if (result != NULL) {
- // NULL destination for pure preflighting: empty dummy string
+ if (result != nullptr) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -284,7 +295,7 @@ U_CAPI int32_t U_EXPORT2
unum_formatDecimal(const UNumberFormat* fmt,
const char * number,
int32_t length,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UFieldPosition *pos, /* 0 if ignore */
UErrorCode* status) {
@@ -292,7 +303,7 @@ unum_formatDecimal(const UNumberFormat* fmt,
if(U_FAILURE(*status)) {
return -1;
}
- if ((result == NULL && resultLength != 0) || resultLength < 0) {
+ if ((result == nullptr && resultLength != 0) || resultLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -327,16 +338,16 @@ unum_formatDecimal(const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_formatDoubleCurrency(const UNumberFormat* fmt,
double number,
- UChar* currency,
- UChar* result,
+ char16_t* currency,
+ char16_t* result,
int32_t resultLength,
UFieldPosition* pos, /* ignored if 0 */
UErrorCode* status) {
if (U_FAILURE(*status)) return -1;
UnicodeString res;
- if (!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if (!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
@@ -347,7 +358,7 @@ unum_formatDoubleCurrency(const UNumberFormat* fmt,
}
CurrencyAmount *tempCurrAmnt = new CurrencyAmount(number, currency, *status);
// Check for null pointer.
- if (tempCurrAmnt == NULL) {
+ if (tempCurrAmnt == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return -1;
}
@@ -365,7 +376,7 @@ unum_formatDoubleCurrency(const UNumberFormat* fmt,
static void
parseRes(Formattable& res,
const UNumberFormat* fmt,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos /* 0 = start */,
UErrorCode *status)
@@ -393,7 +404,7 @@ parseRes(Formattable& res,
U_CAPI int32_t U_EXPORT2
unum_parse( const UNumberFormat* fmt,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos /* 0 = start */,
UErrorCode *status)
@@ -405,7 +416,7 @@ unum_parse( const UNumberFormat* fmt,
U_CAPI int64_t U_EXPORT2
unum_parseInt64( const UNumberFormat* fmt,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos /* 0 = start */,
UErrorCode *status)
@@ -417,7 +428,7 @@ unum_parseInt64( const UNumberFormat* fmt,
U_CAPI double U_EXPORT2
unum_parseDouble( const UNumberFormat* fmt,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos /* 0 = start */,
UErrorCode *status)
@@ -429,7 +440,7 @@ unum_parseDouble( const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_parseDecimal(const UNumberFormat* fmt,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t *parsePos /* 0 = start */,
char *outBuf,
@@ -439,7 +450,7 @@ unum_parseDecimal(const UNumberFormat* fmt,
if (U_FAILURE(*status)) {
return -1;
}
- if ((outBuf == NULL && outBufLength != 0) || outBufLength < 0) {
+ if ((outBuf == nullptr && outBufLength != 0) || outBufLength < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return -1;
}
@@ -462,10 +473,10 @@ unum_parseDecimal(const UNumberFormat* fmt,
U_CAPI double U_EXPORT2
unum_parseDoubleCurrency(const UNumberFormat* fmt,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t* parsePos, /* 0 = start */
- UChar* currency,
+ char16_t* currency,
UErrorCode* status) {
double doubleVal = 0.0;
currency[0] = 0;
@@ -474,17 +485,17 @@ unum_parseDoubleCurrency(const UNumberFormat* fmt,
}
const UnicodeString src((UBool)(textLength == -1), text, textLength);
ParsePosition pp;
- if (parsePos != NULL) {
+ if (parsePos != nullptr) {
pp.setIndex(*parsePos);
}
*status = U_PARSE_ERROR; // assume failure, reset if succeed
LocalPointer<CurrencyAmount> currAmt(((const NumberFormat*)fmt)->parseCurrency(src, pp));
if (pp.getErrorIndex() != -1) {
- if (parsePos != NULL) {
+ if (parsePos != nullptr) {
*parsePos = pp.getErrorIndex();
}
} else {
- if (parsePos != NULL) {
+ if (parsePos != nullptr) {
*parsePos = pp.getIndex();
}
if (pp.getIndex() > 0) {
@@ -508,6 +519,28 @@ unum_countAvailable()
return uloc_countAvailable();
}
+U_CAPI bool U_EXPORT2
+unum_hasAttribute(const UNumberFormat* fmt,
+ UNumberFormatAttribute attr)
+{
+ const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
+ bool isDecimalFormat = dynamic_cast<const DecimalFormat*>(nf) != nullptr;
+
+ switch (attr) {
+ case UNUM_LENIENT_PARSE:
+ case UNUM_MAX_INTEGER_DIGITS:
+ case UNUM_MIN_INTEGER_DIGITS:
+ case UNUM_INTEGER_DIGITS:
+ case UNUM_MAX_FRACTION_DIGITS:
+ case UNUM_MIN_FRACTION_DIGITS:
+ case UNUM_FRACTION_DIGITS:
+ case UNUM_ROUNDING_MODE:
+ return true;
+ default:
+ return isDecimalFormat;
+ }
+}
+
U_CAPI int32_t U_EXPORT2
unum_getAttribute(const UNumberFormat* fmt,
UNumberFormatAttribute attr)
@@ -543,7 +576,7 @@ unum_getAttribute(const UNumberFormat* fmt,
// The remaining attributes are only supported for DecimalFormat
const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
UErrorCode ignoredStatus = U_ZERO_ERROR;
return df->getAttribute(attr, ignoredStatus);
}
@@ -588,7 +621,7 @@ unum_setAttribute( UNumberFormat* fmt,
// The remaining attributes are only supported for DecimalFormat
DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
UErrorCode ignoredStatus = U_ZERO_ERROR;
df->setAttribute(attr, newValue, ignoredStatus);
}
@@ -600,7 +633,7 @@ unum_getDoubleAttribute(const UNumberFormat* fmt,
{
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
- if (df != NULL && attr == UNUM_ROUNDING_INCREMENT) {
+ if (df != nullptr && attr == UNUM_ROUNDING_INCREMENT) {
return df->getRoundingIncrement();
} else {
return -1.0;
@@ -614,7 +647,7 @@ unum_setDoubleAttribute( UNumberFormat* fmt,
{
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
- if (df != NULL && attr == UNUM_ROUNDING_INCREMENT) {
+ if (df != nullptr && attr == UNUM_ROUNDING_INCREMENT) {
df->setRoundingIncrement(newValue);
}
}
@@ -622,7 +655,7 @@ unum_setDoubleAttribute( UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_getTextAttribute(const UNumberFormat* fmt,
UNumberFormatTextAttribute tag,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UErrorCode* status)
{
@@ -630,15 +663,15 @@ unum_getTextAttribute(const UNumberFormat* fmt,
return -1;
UnicodeString res;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
res.setTo(result, 0, resultLength);
}
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
switch(tag) {
case UNUM_POSITIVE_PREFIX:
df->getPositivePrefix(res);
@@ -670,14 +703,14 @@ unum_getTextAttribute(const UNumberFormat* fmt,
}
} else {
const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
- U_ASSERT(rbnf != NULL);
+ U_ASSERT(rbnf != nullptr);
if (tag == UNUM_DEFAULT_RULESET) {
res = rbnf->getDefaultRuleSetName();
} else if (tag == UNUM_PUBLIC_RULESETS) {
int32_t count = rbnf->getNumberOfRuleSetNames();
for (int i = 0; i < count; ++i) {
res += rbnf->getRuleSetName(i);
- res += (UChar)0x003b; // semicolon
+ res += (char16_t)0x003b; // semicolon
}
} else {
*status = U_UNSUPPORTED_ERROR;
@@ -691,7 +724,7 @@ unum_getTextAttribute(const UNumberFormat* fmt,
U_CAPI void U_EXPORT2
unum_setTextAttribute( UNumberFormat* fmt,
UNumberFormatTextAttribute tag,
- const UChar* newValue,
+ const char16_t* newValue,
int32_t newValueLength,
UErrorCode *status)
{
@@ -701,7 +734,7 @@ unum_setTextAttribute( UNumberFormat* fmt,
UnicodeString val(newValue, newValueLength);
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
switch(tag) {
case UNUM_POSITIVE_PREFIX:
df->setPositivePrefix(val);
@@ -733,7 +766,7 @@ unum_setTextAttribute( UNumberFormat* fmt,
}
} else {
RuleBasedNumberFormat* rbnf = dynamic_cast<RuleBasedNumberFormat*>(nf);
- U_ASSERT(rbnf != NULL);
+ U_ASSERT(rbnf != nullptr);
if (tag == UNUM_DEFAULT_RULESET) {
rbnf->setDefaultRuleSet(val, *status);
} else {
@@ -745,7 +778,7 @@ unum_setTextAttribute( UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_toPattern( const UNumberFormat* fmt,
UBool isPatternLocalized,
- UChar* result,
+ char16_t* result,
int32_t resultLength,
UErrorCode* status)
{
@@ -753,22 +786,22 @@ unum_toPattern( const UNumberFormat* fmt,
return -1;
UnicodeString pat;
- if(!(result==NULL && resultLength==0)) {
- // NULL destination for pure preflighting: empty dummy string
+ if(!(result==nullptr && resultLength==0)) {
+ // nullptr destination for pure preflighting: empty dummy string
// otherwise, alias the destination buffer
pat.setTo(result, 0, resultLength);
}
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
if(isPatternLocalized)
df->toLocalizedPattern(pat);
else
df->toPattern(pat);
} else {
const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
- U_ASSERT(rbnf != NULL);
+ U_ASSERT(rbnf != nullptr);
pat = rbnf->getRules();
}
return pat.extract(result, resultLength, *status);
@@ -777,20 +810,19 @@ unum_toPattern( const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_getSymbol(const UNumberFormat *fmt,
UNumberFormatSymbol symbol,
- UChar *buffer,
+ char16_t *buffer,
int32_t size,
- UErrorCode *status)
-{
- if(status==NULL || U_FAILURE(*status)) {
+ UErrorCode *status) UPRV_NO_SANITIZE_UNDEFINED {
+ if(status==nullptr || U_FAILURE(*status)) {
return 0;
}
- if(fmt==NULL || symbol< 0 || symbol>=UNUM_FORMAT_SYMBOL_COUNT) {
+ if(fmt==nullptr || symbol< 0 || symbol>=UNUM_FORMAT_SYMBOL_COUNT) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
const NumberFormat *nf = reinterpret_cast<const NumberFormat *>(fmt);
const DecimalFormat *dcf = dynamic_cast<const DecimalFormat *>(nf);
- if (dcf == NULL) {
+ if (dcf == nullptr) {
*status = U_UNSUPPORTED_ERROR;
return 0;
}
@@ -804,20 +836,19 @@ unum_getSymbol(const UNumberFormat *fmt,
U_CAPI void U_EXPORT2
unum_setSymbol(UNumberFormat *fmt,
UNumberFormatSymbol symbol,
- const UChar *value,
+ const char16_t *value,
int32_t length,
- UErrorCode *status)
-{
- if(status==NULL || U_FAILURE(*status)) {
+ UErrorCode *status) UPRV_NO_SANITIZE_UNDEFINED {
+ if(status==nullptr || U_FAILURE(*status)) {
return;
}
- if(fmt==NULL || symbol< 0 || symbol>=UNUM_FORMAT_SYMBOL_COUNT || value==NULL || length<-1) {
+ if(fmt==nullptr || symbol< 0 || symbol>=UNUM_FORMAT_SYMBOL_COUNT || value==nullptr || length<-1) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return;
}
NumberFormat *nf = reinterpret_cast<NumberFormat *>(fmt);
DecimalFormat *dcf = dynamic_cast<DecimalFormat *>(nf);
- if (dcf == NULL) {
+ if (dcf == nullptr) {
*status = U_UNSUPPORTED_ERROR;
return;
}
@@ -831,7 +862,7 @@ unum_setSymbol(UNumberFormat *fmt,
U_CAPI void U_EXPORT2
unum_applyPattern( UNumberFormat *fmt,
UBool localized,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternLength,
UParseError *parseError,
UErrorCode* status)
@@ -839,21 +870,21 @@ unum_applyPattern( UNumberFormat *fmt,
UErrorCode tStatus = U_ZERO_ERROR;
UParseError tParseError;
- if(parseError == NULL){
+ if(parseError == nullptr){
parseError = &tParseError;
}
- if(status==NULL){
+ if(status==nullptr){
status = &tStatus;
}
int32_t len = (patternLength == -1 ? u_strlen(pattern) : patternLength);
- const UnicodeString pat((UChar*)pattern, len, len);
+ const UnicodeString pat((char16_t*)pattern, len, len);
// Verify if the object passed is a DecimalFormat object
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
- if (df != NULL) {
+ if (df != nullptr) {
if(localized) {
df->applyLocalizedPattern(pat,*parseError, *status);
} else {
@@ -870,11 +901,11 @@ unum_getLocaleByType(const UNumberFormat *fmt,
ULocDataLocaleType type,
UErrorCode* status)
{
- if (fmt == NULL) {
+ if (fmt == nullptr) {
if (U_SUCCESS(*status)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
}
- return NULL;
+ return nullptr;
}
return ((const Format*)fmt)->getLocaleID(type, *status);
}
@@ -901,23 +932,23 @@ unum_getContext(const UNumberFormat *fmt, UDisplayContextType type, UErrorCode*
U_CAPI UFormattable * U_EXPORT2
unum_parseToUFormattable(const UNumberFormat* fmt,
UFormattable *result,
- const UChar* text,
+ const char16_t* text,
int32_t textLength,
int32_t* parsePos, /* 0 = start */
UErrorCode* status) {
- UFormattable *newFormattable = NULL;
+ UFormattable *newFormattable = nullptr;
if (U_FAILURE(*status)) return result;
- if (fmt == NULL || (text==NULL && textLength!=0)) {
+ if (fmt == nullptr || (text==nullptr && textLength!=0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return result;
}
- if (result == NULL) { // allocate if not allocated.
+ if (result == nullptr) { // allocate if not allocated.
newFormattable = result = ufmt_open(status);
}
parseRes(*(Formattable::fromUFormattable(result)), fmt, text, textLength, parsePos, status);
- if (U_FAILURE(*status) && newFormattable != NULL) {
+ if (U_FAILURE(*status) && newFormattable != nullptr) {
ufmt_close(newFormattable);
- result = NULL; // deallocate if there was a parse error
+ result = nullptr; // deallocate if there was a parse error
}
return result;
}
@@ -925,15 +956,15 @@ unum_parseToUFormattable(const UNumberFormat* fmt,
U_CAPI int32_t U_EXPORT2
unum_formatUFormattable(const UNumberFormat* fmt,
const UFormattable *number,
- UChar *result,
+ char16_t *result,
int32_t resultLength,
UFieldPosition *pos, /* ignored if 0 */
UErrorCode *status) {
if (U_FAILURE(*status)) {
return 0;
}
- if (fmt == NULL || number==NULL ||
- (result==NULL ? resultLength!=0 : resultLength<0)) {
+ if (fmt == nullptr || number==nullptr ||
+ (result==nullptr ? resultLength!=0 : resultLength<0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
diff --git a/contrib/libs/icu/i18n/unumsys.cpp b/contrib/libs/icu/i18n/unumsys.cpp
index 4a0d0fa3b6f..9a9fa12e2f4 100644
--- a/contrib/libs/icu/i18n/unumsys.cpp
+++ b/contrib/libs/icu/i18n/unumsys.cpp
@@ -31,7 +31,7 @@ unumsys_openByName(const char *name, UErrorCode *status)
{
// createInstanceByName does NOT return immediately if status indicates error
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return (UNumberingSystem*)NumberingSystem::createInstanceByName(name, *status);
}
@@ -73,7 +73,7 @@ unumsys_isAlgorithmic(const UNumberingSystem *unumsys)
}
U_CAPI int32_t U_EXPORT2
-unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result,
+unumsys_getDescription(const UNumberingSystem *unumsys, char16_t *result,
int32_t resultLength, UErrorCode *status)
{
if (U_FAILURE(*status)) {
diff --git a/contrib/libs/icu/i18n/upluralrules.cpp b/contrib/libs/icu/i18n/upluralrules.cpp
index 73e59a75c4d..9c473128119 100644
--- a/contrib/libs/icu/i18n/upluralrules.cpp
+++ b/contrib/libs/icu/i18n/upluralrules.cpp
@@ -41,7 +41,7 @@ namespace {
UnicodeString select(const PluralRules &rules, const Formattable& obj, const NumberFormat& fmt, UErrorCode& status) {
if (U_SUCCESS(status)) {
const DecimalFormat *decFmt = dynamic_cast<const DecimalFormat *>(&fmt);
- if (decFmt != NULL) {
+ if (decFmt != nullptr) {
number::impl::DecimalQuantity dq;
decFmt->formatToDecimalQuantity(obj, dq, status);
if (U_SUCCESS(status)) {
@@ -80,13 +80,13 @@ uplrules_close(UPluralRules *uplrules)
U_CAPI int32_t U_EXPORT2
uplrules_select(const UPluralRules *uplrules,
double number,
- UChar *keyword, int32_t capacity,
+ char16_t *keyword, int32_t capacity,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
return 0;
}
- if (keyword == NULL ? capacity != 0 : capacity < 0) {
+ if (keyword == nullptr ? capacity != 0 : capacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -97,13 +97,13 @@ uplrules_select(const UPluralRules *uplrules,
U_CAPI int32_t U_EXPORT2
uplrules_selectFormatted(const UPluralRules *uplrules,
const UFormattedNumber* number,
- UChar *keyword, int32_t capacity,
+ char16_t *keyword, int32_t capacity,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
return 0;
}
- if (keyword == NULL ? capacity != 0 : capacity < 0) {
+ if (keyword == nullptr ? capacity != 0 : capacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -119,13 +119,13 @@ uplrules_selectFormatted(const UPluralRules *uplrules,
U_CAPI int32_t U_EXPORT2
uplrules_selectForRange(const UPluralRules *uplrules,
const UFormattedNumberRange* urange,
- UChar *keyword, int32_t capacity,
+ char16_t *keyword, int32_t capacity,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
return 0;
}
- if (keyword == NULL ? capacity != 0 : capacity < 0) {
+ if (keyword == nullptr ? capacity != 0 : capacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -139,7 +139,7 @@ U_CAPI int32_t U_EXPORT2
uplrules_selectWithFormat(const UPluralRules *uplrules,
double number,
const UNumberFormat *fmt,
- UChar *keyword, int32_t capacity,
+ char16_t *keyword, int32_t capacity,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
@@ -147,7 +147,7 @@ uplrules_selectWithFormat(const UPluralRules *uplrules,
}
const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules);
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
- if (plrules == NULL || nf == NULL || ((keyword == NULL)? capacity != 0 : capacity < 0)) {
+ if (plrules == nullptr || nf == nullptr || ((keyword == nullptr)? capacity != 0 : capacity < 0)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -161,20 +161,20 @@ uplrules_getKeywords(const UPluralRules *uplrules,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
const PluralRules* plrules = reinterpret_cast<const PluralRules*>(uplrules);
- if (plrules == NULL) {
+ if (plrules == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
StringEnumeration *senum = plrules->getKeywords(*status);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (senum == NULL) {
+ if (senum == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return uenum_openFromStringEnumeration(senum, status);
}
diff --git a/contrib/libs/icu/i18n/uregex.cpp b/contrib/libs/icu/i18n/uregex.cpp
index 514159e8b7a..2a520209fad 100644
--- a/contrib/libs/icu/i18n/uregex.cpp
+++ b/contrib/libs/icu/i18n/uregex.cpp
@@ -38,10 +38,10 @@ public:
int32_t fMagic;
RegexPattern *fPat;
u_atomic_int32_t *fPatRefCount;
- UChar *fPatString;
+ char16_t *fPatString;
int32_t fPatStringLen;
RegexMatcher *fMatcher;
- const UChar *fText; // Text from setText()
+ const char16_t *fText; // Text from setText()
int32_t fTextLength; // Length provided by user with setText(), which
// may be -1.
UBool fOwnsText;
@@ -51,25 +51,25 @@ static const int32_t REXP_MAGIC = 0x72657870; // "rexp" in ASCII
RegularExpression::RegularExpression() {
fMagic = REXP_MAGIC;
- fPat = NULL;
- fPatRefCount = NULL;
- fPatString = NULL;
+ fPat = nullptr;
+ fPatRefCount = nullptr;
+ fPatString = nullptr;
fPatStringLen = 0;
- fMatcher = NULL;
- fText = NULL;
+ fMatcher = nullptr;
+ fText = nullptr;
fTextLength = 0;
- fOwnsText = FALSE;
+ fOwnsText = false;
}
RegularExpression::~RegularExpression() {
delete fMatcher;
- fMatcher = NULL;
- if (fPatRefCount!=NULL && umtx_atomic_dec(fPatRefCount)==0) {
+ fMatcher = nullptr;
+ if (fPatRefCount!=nullptr && umtx_atomic_dec(fPatRefCount)==0) {
delete fPat;
uprv_free(fPatString);
uprv_free((void *)fPatRefCount);
}
- if (fOwnsText && fText!=NULL) {
+ if (fOwnsText && fText!=nullptr) {
uprv_free((void *)fText);
}
fMagic = 0;
@@ -82,22 +82,22 @@ U_NAMESPACE_USE
//----------------------------------------------------------------------------------------
//
// validateRE Do boilerplate style checks on API function parameters.
-// Return TRUE if they look OK.
+// Return true if they look OK.
//----------------------------------------------------------------------------------------
static UBool validateRE(const RegularExpression *re, UBool requiresText, UErrorCode *status) {
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
- if (re == NULL || re->fMagic != REXP_MAGIC) {
+ if (re == nullptr || re->fMagic != REXP_MAGIC) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
// !!! Not sure how to update this with the new UText backing, which is stored in re->fMatcher anyway
- if (requiresText && re->fText == NULL && !re->fOwnsText) {
+ if (requiresText && re->fText == nullptr && !re->fOwnsText) {
*status = U_REGEX_INVALID_STATE;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
//----------------------------------------------------------------------------------------
@@ -106,18 +106,18 @@ static UBool validateRE(const RegularExpression *re, UBool requiresText, UErrorC
//
//----------------------------------------------------------------------------------------
U_CAPI URegularExpression * U_EXPORT2
-uregex_open( const UChar *pattern,
+uregex_open( const char16_t *pattern,
int32_t patternLength,
uint32_t flags,
UParseError *pe,
UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (pattern == NULL || patternLength < -1 || patternLength == 0) {
+ if (pattern == nullptr || patternLength < -1 || patternLength == 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
int32_t actualPatLen = patternLength;
if (actualPatLen == -1) {
@@ -126,13 +126,13 @@ uregex_open( const UChar *pattern,
RegularExpression *re = new RegularExpression;
u_atomic_int32_t *refC = (u_atomic_int32_t *)uprv_malloc(sizeof(int32_t));
- UChar *patBuf = (UChar *)uprv_malloc(sizeof(UChar)*(actualPatLen+1));
- if (re == NULL || refC == NULL || patBuf == NULL) {
+ char16_t *patBuf = (char16_t *)uprv_malloc(sizeof(char16_t)*(actualPatLen+1));
+ if (re == nullptr || refC == nullptr || patBuf == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
delete re;
uprv_free((void *)refC);
uprv_free(patBuf);
- return NULL;
+ return nullptr;
}
re->fPatRefCount = refC;
*re->fPatRefCount = 1;
@@ -153,7 +153,7 @@ uregex_open( const UChar *pattern,
//
// Compile the pattern
//
- if (pe != NULL) {
+ if (pe != nullptr) {
re->fPat = RegexPattern::compile(&patText, flags, *pe, *status);
} else {
re->fPat = RegexPattern::compile(&patText, flags, *status);
@@ -174,7 +174,7 @@ uregex_open( const UChar *pattern,
ErrorExit:
delete re;
- return NULL;
+ return nullptr;
}
@@ -190,33 +190,33 @@ uregex_openUText(UText *pattern,
UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (pattern == NULL) {
+ if (pattern == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
int64_t patternNativeLength = utext_nativeLength(pattern);
if (patternNativeLength == 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
RegularExpression *re = new RegularExpression;
UErrorCode lengthStatus = U_ZERO_ERROR;
- int32_t pattern16Length = utext_extract(pattern, 0, patternNativeLength, NULL, 0, &lengthStatus);
+ int32_t pattern16Length = utext_extract(pattern, 0, patternNativeLength, nullptr, 0, &lengthStatus);
u_atomic_int32_t *refC = (u_atomic_int32_t *)uprv_malloc(sizeof(int32_t));
- UChar *patBuf = (UChar *)uprv_malloc(sizeof(UChar)*(pattern16Length+1));
- if (re == NULL || refC == NULL || patBuf == NULL) {
+ char16_t *patBuf = (char16_t *)uprv_malloc(sizeof(char16_t)*(pattern16Length+1));
+ if (re == nullptr || refC == nullptr || patBuf == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
delete re;
uprv_free((void *)refC);
uprv_free(patBuf);
- return NULL;
+ return nullptr;
}
re->fPatRefCount = refC;
*re->fPatRefCount = 1;
@@ -236,7 +236,7 @@ uregex_openUText(UText *pattern,
//
// Compile the pattern
//
- if (pe != NULL) {
+ if (pe != nullptr) {
re->fPat = RegexPattern::compile(&patText, flags, *pe, *status);
} else {
re->fPat = RegexPattern::compile(&patText, flags, *status);
@@ -257,7 +257,7 @@ uregex_openUText(UText *pattern,
ErrorExit:
delete re;
- return NULL;
+ return nullptr;
}
@@ -270,7 +270,7 @@ U_CAPI void U_EXPORT2
uregex_close(URegularExpression *re2) {
RegularExpression *re = (RegularExpression*)re2;
UErrorCode status = U_ZERO_ERROR;
- if (validateRE(re, FALSE, &status) == FALSE) {
+ if (validateRE(re, false, &status) == false) {
return;
}
delete re;
@@ -285,20 +285,20 @@ uregex_close(URegularExpression *re2) {
U_CAPI URegularExpression * U_EXPORT2
uregex_clone(const URegularExpression *source2, UErrorCode *status) {
RegularExpression *source = (RegularExpression*)source2;
- if (validateRE(source, FALSE, status) == FALSE) {
- return NULL;
+ if (validateRE(source, false, status) == false) {
+ return nullptr;
}
RegularExpression *clone = new RegularExpression;
- if (clone == NULL) {
+ if (clone == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
clone->fMatcher = source->fPat->matcher(*status);
if (U_FAILURE(*status)) {
delete clone;
- return NULL;
+ return nullptr;
}
clone->fPat = source->fPat;
@@ -319,16 +319,16 @@ uregex_clone(const URegularExpression *source2, UErrorCode *status) {
// uregex_pattern
//
//------------------------------------------------------------------------------
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
uregex_pattern(const URegularExpression *regexp2,
int32_t *patLength,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
- return NULL;
+ if (validateRE(regexp, false, status) == false) {
+ return nullptr;
}
- if (patLength != NULL) {
+ if (patLength != nullptr) {
*patLength = regexp->fPatStringLen;
}
return regexp->fPatString;
@@ -356,7 +356,7 @@ uregex_patternUText(const URegularExpression *regexp2,
U_CAPI int32_t U_EXPORT2
uregex_flags(const URegularExpression *regexp2, UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return 0;
}
int32_t flags = regexp->fPat->flags();
@@ -371,25 +371,25 @@ uregex_flags(const URegularExpression *regexp2, UErrorCode *status) {
//------------------------------------------------------------------------------
U_CAPI void U_EXPORT2
uregex_setText(URegularExpression *regexp2,
- const UChar *text,
+ const char16_t *text,
int32_t textLength,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return;
}
- if (text == NULL || textLength < -1) {
+ if (text == nullptr || textLength < -1) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- if (regexp->fOwnsText && regexp->fText != NULL) {
+ if (regexp->fOwnsText && regexp->fText != nullptr) {
uprv_free((void *)regexp->fText);
}
regexp->fText = text;
regexp->fTextLength = textLength;
- regexp->fOwnsText = FALSE;
+ regexp->fOwnsText = false;
UText input = UTEXT_INITIALIZER;
utext_openUChars(&input, text, textLength, status);
@@ -408,21 +408,21 @@ uregex_setUText(URegularExpression *regexp2,
UText *text,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return;
}
- if (text == NULL) {
+ if (text == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
- if (regexp->fOwnsText && regexp->fText != NULL) {
+ if (regexp->fOwnsText && regexp->fText != nullptr) {
uprv_free((void *)regexp->fText);
}
- regexp->fText = NULL; // only fill it in on request
+ regexp->fText = nullptr; // only fill it in on request
regexp->fTextLength = -1;
- regexp->fOwnsText = TRUE;
+ regexp->fOwnsText = true;
regexp->fMatcher->reset(text);
}
@@ -433,35 +433,35 @@ uregex_setUText(URegularExpression *regexp2,
// uregex_getText
//
//------------------------------------------------------------------------------
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
uregex_getText(URegularExpression *regexp2,
int32_t *textLength,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
- return NULL;
+ if (validateRE(regexp, false, status) == false) {
+ return nullptr;
}
- if (regexp->fText == NULL) {
+ if (regexp->fText == nullptr) {
// need to fill in the text
UText *inputText = regexp->fMatcher->inputText();
int64_t inputNativeLength = utext_nativeLength(inputText);
if (UTEXT_FULL_TEXT_IN_CHUNK(inputText, inputNativeLength)) {
regexp->fText = inputText->chunkContents;
regexp->fTextLength = (int32_t)inputNativeLength;
- regexp->fOwnsText = FALSE; // because the UText owns it
+ regexp->fOwnsText = false; // because the UText owns it
} else {
UErrorCode lengthStatus = U_ZERO_ERROR;
- regexp->fTextLength = utext_extract(inputText, 0, inputNativeLength, NULL, 0, &lengthStatus); // buffer overflow error
- UChar *inputChars = (UChar *)uprv_malloc(sizeof(UChar)*(regexp->fTextLength+1));
+ regexp->fTextLength = utext_extract(inputText, 0, inputNativeLength, nullptr, 0, &lengthStatus); // buffer overflow error
+ char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(regexp->fTextLength+1));
utext_extract(inputText, 0, inputNativeLength, inputChars, regexp->fTextLength+1, status);
regexp->fText = inputChars;
- regexp->fOwnsText = TRUE; // should already be set but just in case
+ regexp->fOwnsText = true; // should already be set but just in case
}
}
- if (textLength != NULL) {
+ if (textLength != nullptr) {
*textLength = regexp->fTextLength;
}
return regexp->fText;
@@ -478,7 +478,7 @@ uregex_getUText(URegularExpression *regexp2,
UText *dest,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return dest;
}
return regexp->fMatcher->getInput(dest, *status);
@@ -495,7 +495,7 @@ uregex_refreshUText(URegularExpression *regexp2,
UText *text,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return;
}
regexp->fMatcher->refreshInputText(text, *status);
@@ -519,8 +519,8 @@ uregex_matches64(URegularExpression *regexp2,
int64_t startIndex,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- UBool result = FALSE;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ UBool result = false;
+ if (validateRE(regexp, true, status) == false) {
return result;
}
if (startIndex == -1) {
@@ -549,8 +549,8 @@ uregex_lookingAt64(URegularExpression *regexp2,
int64_t startIndex,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- UBool result = FALSE;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ UBool result = false;
+ if (validateRE(regexp, true, status) == false) {
return result;
}
if (startIndex == -1) {
@@ -580,8 +580,8 @@ uregex_find64(URegularExpression *regexp2,
int64_t startIndex,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- UBool result = FALSE;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ UBool result = false;
+ if (validateRE(regexp, true, status) == false) {
return result;
}
if (startIndex == -1) {
@@ -603,8 +603,8 @@ U_CAPI UBool U_EXPORT2
uregex_findNext(URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
- return FALSE;
+ if (validateRE(regexp, true, status) == false) {
+ return false;
}
UBool result = regexp->fMatcher->find(*status);
return result;
@@ -619,7 +619,7 @@ U_CAPI int32_t U_EXPORT2
uregex_groupCount(URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return 0;
}
int32_t result = regexp->fMatcher->groupCount();
@@ -634,11 +634,11 @@ uregex_groupCount(URegularExpression *regexp2,
//------------------------------------------------------------------------------
int32_t
uregex_groupNumberFromName(URegularExpression *regexp2,
- const UChar *groupName,
+ const char16_t *groupName,
int32_t nameLength,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return 0;
}
int32_t result = regexp->fPat->groupNumberFromName(UnicodeString(groupName, nameLength), *status);
@@ -651,7 +651,7 @@ uregex_groupNumberFromCName(URegularExpression *regexp2,
int32_t nameLength,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return 0;
}
return regexp->fPat->groupNumberFromName(groupName, nameLength, *status);
@@ -665,19 +665,19 @@ uregex_groupNumberFromCName(URegularExpression *regexp2,
U_CAPI int32_t U_EXPORT2
uregex_group(URegularExpression *regexp2,
int32_t groupNum,
- UChar *dest,
+ char16_t *dest,
int32_t destCapacity,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (destCapacity < 0 || (destCapacity > 0 && dest == NULL)) {
+ if (destCapacity < 0 || (destCapacity > 0 && dest == nullptr)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- if (destCapacity == 0 || regexp->fText != NULL) {
+ if (destCapacity == 0 || regexp->fText != nullptr) {
// If preflighting or if we already have the text as UChars,
// this is a little cheaper than extracting from the UText
@@ -739,9 +739,9 @@ uregex_groupUText(URegularExpression *regexp2,
int64_t *groupLength,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
UErrorCode emptyTextStatus = U_ZERO_ERROR;
- return (dest ? dest : utext_openUChars(NULL, NULL, 0, &emptyTextStatus));
+ return (dest ? dest : utext_openUChars(nullptr, nullptr, 0, &emptyTextStatus));
}
return regexp->fMatcher->group(groupNum, dest, *groupLength, *status);
@@ -764,7 +764,7 @@ uregex_start64(URegularExpression *regexp2,
int32_t groupNum,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
int64_t result = regexp->fMatcher->start64(groupNum, *status);
@@ -788,7 +788,7 @@ uregex_end64(URegularExpression *regexp2,
int32_t groupNum,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
int64_t result = regexp->fMatcher->end64(groupNum, *status);
@@ -812,7 +812,7 @@ uregex_reset64(URegularExpression *regexp2,
int64_t index,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return;
}
regexp->fMatcher->reset(index, *status);
@@ -838,7 +838,7 @@ uregex_setRegion64(URegularExpression *regexp2,
int64_t regionLimit,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return;
}
regexp->fMatcher->region(regionStart, regionLimit, *status);
@@ -857,7 +857,7 @@ uregex_setRegionAndStart(URegularExpression *regexp2,
int64_t startIndex,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return;
}
regexp->fMatcher->region(regionStart, regionLimit, startIndex, *status);
@@ -878,7 +878,7 @@ U_CAPI int64_t U_EXPORT2
uregex_regionStart64(const URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
return regexp->fMatcher->regionStart();
@@ -900,7 +900,7 @@ U_CAPI int64_t U_EXPORT2
uregex_regionEnd64(const URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
return regexp->fMatcher->regionEnd();
@@ -916,8 +916,8 @@ U_CAPI UBool U_EXPORT2
uregex_hasTransparentBounds(const URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
- return FALSE;
+ if (validateRE(regexp, false, status) == false) {
+ return false;
}
return regexp->fMatcher->hasTransparentBounds();
}
@@ -933,7 +933,7 @@ uregex_useTransparentBounds(URegularExpression *regexp2,
UBool b,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return;
}
regexp->fMatcher->useTransparentBounds(b);
@@ -949,8 +949,8 @@ U_CAPI UBool U_EXPORT2
uregex_hasAnchoringBounds(const URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
- return FALSE;
+ if (validateRE(regexp, false, status) == false) {
+ return false;
}
return regexp->fMatcher->hasAnchoringBounds();
}
@@ -966,7 +966,7 @@ uregex_useAnchoringBounds(URegularExpression *regexp2,
UBool b,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status) == FALSE) {
+ if (validateRE(regexp, false, status) == false) {
return;
}
regexp->fMatcher->useAnchoringBounds(b);
@@ -982,8 +982,8 @@ U_CAPI UBool U_EXPORT2
uregex_hitEnd(const URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
- return FALSE;
+ if (validateRE(regexp, true, status) == false) {
+ return false;
}
return regexp->fMatcher->hitEnd();
}
@@ -998,8 +998,8 @@ U_CAPI UBool U_EXPORT2
uregex_requireEnd(const URegularExpression *regexp2,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
- return FALSE;
+ if (validateRE(regexp, true, status) == false) {
+ return false;
}
return regexp->fMatcher->requireEnd();
}
@@ -1015,7 +1015,7 @@ uregex_setTimeLimit(URegularExpression *regexp2,
int32_t limit,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
regexp->fMatcher->setTimeLimit(limit, *status);
}
}
@@ -1032,7 +1032,7 @@ uregex_getTimeLimit(const URegularExpression *regexp2,
UErrorCode *status) {
int32_t retVal = 0;
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
retVal = regexp->fMatcher->getTimeLimit();
}
return retVal;
@@ -1050,7 +1050,7 @@ uregex_setStackLimit(URegularExpression *regexp2,
int32_t limit,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
regexp->fMatcher->setStackLimit(limit, *status);
}
}
@@ -1067,7 +1067,7 @@ uregex_getStackLimit(const URegularExpression *regexp2,
UErrorCode *status) {
int32_t retVal = 0;
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
retVal = regexp->fMatcher->getStackLimit();
}
return retVal;
@@ -1085,7 +1085,7 @@ uregex_setMatchCallback(URegularExpression *regexp2,
const void *context,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
regexp->fMatcher->setMatchCallback(callback, context, *status);
}
}
@@ -1102,7 +1102,7 @@ uregex_getMatchCallback(const URegularExpression *regexp2,
const void **context,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
regexp->fMatcher->getMatchCallback(*callback, *context, *status);
}
}
@@ -1119,7 +1119,7 @@ uregex_setFindProgressCallback(URegularExpression *regexp2,
const void *context,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
regexp->fMatcher->setFindProgressCallback(callback, context, *status);
}
}
@@ -1136,7 +1136,7 @@ uregex_getFindProgressCallback(const URegularExpression *regexp2,
const void **context,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, FALSE, status)) {
+ if (validateRE(regexp, false, status)) {
regexp->fMatcher->getFindProgressCallback(*callback, *context, *status);
}
}
@@ -1149,17 +1149,17 @@ uregex_getFindProgressCallback(const URegularExpression *regexp2,
//------------------------------------------------------------------------------
U_CAPI int32_t U_EXPORT2
uregex_replaceAll(URegularExpression *regexp2,
- const UChar *replacementText,
+ const char16_t *replacementText,
int32_t replacementLength,
- UChar *destBuf,
+ char16_t *destBuf,
int32_t destCapacity,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (replacementText == NULL || replacementLength < -1 ||
- (destBuf == NULL && destCapacity > 0) ||
+ if (replacementText == nullptr || replacementLength < -1 ||
+ (destBuf == nullptr && destCapacity > 0) ||
destCapacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -1203,10 +1203,10 @@ uregex_replaceAllUText(URegularExpression *regexp2,
UText *dest,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (replacementText == NULL) {
+ if (replacementText == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1223,17 +1223,17 @@ uregex_replaceAllUText(URegularExpression *regexp2,
//------------------------------------------------------------------------------
U_CAPI int32_t U_EXPORT2
uregex_replaceFirst(URegularExpression *regexp2,
- const UChar *replacementText,
+ const char16_t *replacementText,
int32_t replacementLength,
- UChar *destBuf,
+ char16_t *destBuf,
int32_t destCapacity,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (replacementText == NULL || replacementLength < -1 ||
- (destBuf == NULL && destCapacity > 0) ||
+ if (replacementText == nullptr || replacementLength < -1 ||
+ (destBuf == nullptr && destCapacity > 0) ||
destCapacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@@ -1264,10 +1264,10 @@ uregex_replaceFirstUText(URegularExpression *regexp2,
UText *dest,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (replacementText == NULL) {
+ if (replacementText == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -1291,22 +1291,22 @@ U_NAMESPACE_BEGIN
class RegexCImpl {
public:
inline static int32_t appendReplacement(RegularExpression *regexp,
- const UChar *replacementText,
+ const char16_t *replacementText,
int32_t replacementLength,
- UChar **destBuf,
+ char16_t **destBuf,
int32_t *destCapacity,
UErrorCode *status);
inline static int32_t appendTail(RegularExpression *regexp,
- UChar **destBuf,
+ char16_t **destBuf,
int32_t *destCapacity,
UErrorCode *status);
inline static int32_t split(RegularExpression *regexp,
- UChar *destBuf,
+ char16_t *destBuf,
int32_t destCapacity,
int32_t *requiredCapacity,
- UChar *destFields[],
+ char16_t *destFields[],
int32_t destFieldsCapacity,
UErrorCode *status);
};
@@ -1315,17 +1315,17 @@ U_NAMESPACE_END
-static const UChar BACKSLASH = 0x5c;
-static const UChar DOLLARSIGN = 0x24;
-static const UChar LEFTBRACKET = 0x7b;
-static const UChar RIGHTBRACKET = 0x7d;
+static const char16_t BACKSLASH = 0x5c;
+static const char16_t DOLLARSIGN = 0x24;
+static const char16_t LEFTBRACKET = 0x7b;
+static const char16_t RIGHTBRACKET = 0x7d;
//
// Move a character to an output buffer, with bounds checking on the index.
// Index advances even if capacity is exceeded, for preflight size computations.
// This little sequence is used a LOT.
//
-static inline void appendToBuf(UChar c, int32_t *idx, UChar *buf, int32_t bufCapacity) {
+static inline void appendToBuf(char16_t c, int32_t *idx, char16_t *buf, int32_t bufCapacity) {
if (*idx < bufCapacity) {
buf[*idx] = c;
}
@@ -1337,42 +1337,42 @@ static inline void appendToBuf(UChar c, int32_t *idx, UChar *buf, int32_t bufCap
// appendReplacement, the actual implementation.
//
int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
- const UChar *replacementText,
+ const char16_t *replacementText,
int32_t replacementLength,
- UChar **destBuf,
+ char16_t **destBuf,
int32_t *destCapacity,
UErrorCode *status) {
// If we come in with a buffer overflow error, don't suppress the operation.
// A series of appendReplacements, appendTail need to correctly preflight
// the buffer size when an overflow happens somewhere in the middle.
- UBool pendingBufferOverflow = FALSE;
- if (*status == U_BUFFER_OVERFLOW_ERROR && destCapacity != NULL && *destCapacity == 0) {
- pendingBufferOverflow = TRUE;
+ UBool pendingBufferOverflow = false;
+ if (*status == U_BUFFER_OVERFLOW_ERROR && destCapacity != nullptr && *destCapacity == 0) {
+ pendingBufferOverflow = true;
*status = U_ZERO_ERROR;
}
//
// Validate all parameters
//
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (replacementText == NULL || replacementLength < -1 ||
- destCapacity == NULL || destBuf == NULL ||
- (*destBuf == NULL && *destCapacity > 0) ||
+ if (replacementText == nullptr || replacementLength < -1 ||
+ destCapacity == nullptr || destBuf == nullptr ||
+ (*destBuf == nullptr && *destCapacity > 0) ||
*destCapacity < 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
RegexMatcher *m = regexp->fMatcher;
- if (m->fMatch == FALSE) {
+ if (m->fMatch == false) {
*status = U_REGEX_INVALID_STATE;
return 0;
}
- UChar *dest = *destBuf;
+ char16_t *dest = *destBuf;
int32_t capacity = *destCapacity;
int32_t destIdx = 0;
int32_t i;
@@ -1385,7 +1385,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
}
// Copy input string from the end of previous match to start of current match
- if (regexp->fText != NULL) {
+ if (regexp->fText != nullptr) {
int32_t matchStart;
int32_t lastMatchEnd;
if (UTEXT_USES_U16(m->fInputText)) {
@@ -1394,9 +1394,9 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
} else {
// !!!: Would like a better way to do this!
UErrorCode tempStatus = U_ZERO_ERROR;
- lastMatchEnd = utext_extract(m->fInputText, 0, m->fLastMatchEnd, NULL, 0, &tempStatus);
+ lastMatchEnd = utext_extract(m->fInputText, 0, m->fLastMatchEnd, nullptr, 0, &tempStatus);
tempStatus = U_ZERO_ERROR;
- matchStart = lastMatchEnd + utext_extract(m->fInputText, m->fLastMatchEnd, m->fMatchStart, NULL, 0, &tempStatus);
+ matchStart = lastMatchEnd + utext_extract(m->fInputText, m->fLastMatchEnd, m->fMatchStart, nullptr, 0, &tempStatus);
}
for (i=lastMatchEnd; i<matchStart; i++) {
appendToBuf(regexp->fText[i], &destIdx, dest, capacity);
@@ -1404,7 +1404,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
} else {
UErrorCode possibleOverflowError = U_ZERO_ERROR; // ignore
destIdx += utext_extract(m->fInputText, m->fLastMatchEnd, m->fMatchStart,
- dest==NULL?NULL:&dest[destIdx], REMAINING_CAPACITY(destIdx, capacity),
+ dest==nullptr?nullptr:&dest[destIdx], REMAINING_CAPACITY(destIdx, capacity),
&possibleOverflowError);
}
U_ASSERT(destIdx >= 0);
@@ -1412,7 +1412,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
// scan the replacement text, looking for substitutions ($n) and \escapes.
int32_t replIdx = 0;
while (replIdx < replacementLength && U_SUCCESS(*status)) {
- UChar c = replacementText[replIdx];
+ char16_t c = replacementText[replIdx];
replIdx++;
if (c != DOLLARSIGN && c != BACKSLASH) {
// Common case, no substitution, no escaping,
@@ -1442,7 +1442,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
if (escapedChar != (UChar32)0xFFFFFFFF) {
if (escapedChar <= 0xffff) {
- appendToBuf((UChar)escapedChar, &destIdx, dest, capacity);
+ appendToBuf((char16_t)escapedChar, &destIdx, dest, capacity);
} else {
appendToBuf(U16_LEAD(escapedChar), &destIdx, dest, capacity);
appendToBuf(U16_TRAIL(escapedChar), &destIdx, dest, capacity);
@@ -1477,7 +1477,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
break;
}
U16_GET(replacementText, 0, replIdx, replacementLength, c32);
- if (u_isdigit(c32) == FALSE) {
+ if (u_isdigit(c32) == false) {
break;
}
@@ -1528,7 +1528,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
// Finally, append the capture group data to the destination.
if (U_SUCCESS(*status)) {
destIdx += uregex_group((URegularExpression*)regexp, groupNum,
- dest==NULL?NULL:&dest[destIdx], REMAINING_CAPACITY(destIdx, capacity), status);
+ dest==nullptr?nullptr:&dest[destIdx], REMAINING_CAPACITY(destIdx, capacity), status);
if (*status == U_BUFFER_OVERFLOW_ERROR) {
// Ignore buffer overflow when extracting the group. We need to
// continue on to get full size of the untruncated result. We will
@@ -1585,9 +1585,9 @@ int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
//
U_CAPI int32_t U_EXPORT2
uregex_appendReplacement(URegularExpression *regexp2,
- const UChar *replacementText,
+ const char16_t *replacementText,
int32_t replacementLength,
- UChar **destBuf,
+ char16_t **destBuf,
int32_t *destCapacity,
UErrorCode *status) {
@@ -1615,7 +1615,7 @@ uregex_appendReplacementUText(URegularExpression *regexp2,
//
//------------------------------------------------------------------------------
int32_t RegexCImpl::appendTail(RegularExpression *regexp,
- UChar **destBuf,
+ char16_t **destBuf,
int32_t *destCapacity,
UErrorCode *status)
{
@@ -1623,18 +1623,18 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp,
// If we come in with a buffer overflow error, don't suppress the operation.
// A series of appendReplacements, appendTail need to correctly preflight
// the buffer size when an overflow happens somewhere in the middle.
- UBool pendingBufferOverflow = FALSE;
- if (*status == U_BUFFER_OVERFLOW_ERROR && destCapacity != NULL && *destCapacity == 0) {
- pendingBufferOverflow = TRUE;
+ UBool pendingBufferOverflow = false;
+ if (*status == U_BUFFER_OVERFLOW_ERROR && destCapacity != nullptr && *destCapacity == 0) {
+ pendingBufferOverflow = true;
*status = U_ZERO_ERROR;
}
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if (destCapacity == NULL || destBuf == NULL ||
- (*destBuf == NULL && *destCapacity > 0) ||
+ if (destCapacity == nullptr || destBuf == nullptr ||
+ (*destBuf == nullptr && *destCapacity > 0) ||
*destCapacity < 0)
{
*status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -1645,9 +1645,9 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp,
int32_t destIdx = 0;
int32_t destCap = *destCapacity;
- UChar *dest = *destBuf;
+ char16_t *dest = *destBuf;
- if (regexp->fText != NULL) {
+ if (regexp->fText != nullptr) {
int32_t srcIdx;
int64_t nativeIdx = (m->fMatch ? m->fMatchEnd : m->fLastMatchEnd);
if (nativeIdx == -1) {
@@ -1656,7 +1656,7 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp,
srcIdx = (int32_t)nativeIdx;
} else {
UErrorCode newStatus = U_ZERO_ERROR;
- srcIdx = utext_extract(m->fInputText, 0, nativeIdx, NULL, 0, &newStatus);
+ srcIdx = utext_extract(m->fInputText, 0, nativeIdx, nullptr, 0, &newStatus);
}
for (;;) {
@@ -1665,7 +1665,7 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp,
if (srcIdx == regexp->fTextLength) {
break;
}
- UChar c = regexp->fText[srcIdx];
+ char16_t c = regexp->fText[srcIdx];
if (c == 0 && regexp->fTextLength == -1) {
regexp->fTextLength = srcIdx;
break;
@@ -1723,7 +1723,7 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp,
if (destIdx < destCap) {
*destBuf += destIdx;
*destCapacity -= destIdx;
- } else if (*destBuf != NULL) {
+ } else if (*destBuf != nullptr) {
*destBuf += destCap;
*destCapacity = 0;
}
@@ -1741,7 +1741,7 @@ int32_t RegexCImpl::appendTail(RegularExpression *regexp,
//
U_CAPI int32_t U_EXPORT2
uregex_appendTail(URegularExpression *regexp2,
- UChar **destBuf,
+ char16_t **destBuf,
int32_t *destCapacity,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
@@ -1770,16 +1770,16 @@ uregex_appendTailUText(URegularExpression *regexp2,
//
//------------------------------------------------------------------------------
#if 0
-static void copyString(UChar *destBuffer, // Destination buffer.
+static void copyString(char16_t *destBuffer, // Destination buffer.
int32_t destCapacity, // Total capacity of dest buffer
int32_t *destIndex, // Index into dest buffer. Updated on return.
// Update not clipped to destCapacity.
- const UChar *srcPtr, // Pointer to source string
+ const char16_t *srcPtr, // Pointer to source string
int32_t srcLen) // Source string len.
{
int32_t si;
int32_t di = *destIndex;
- UChar c;
+ char16_t c;
for (si=0; si<srcLen; si++) {
c = srcPtr[si];
@@ -1805,10 +1805,10 @@ static void copyString(UChar *destBuffer, // Destination buffer.
//
//------------------------------------------------------------------------------
int32_t RegexCImpl::split(RegularExpression *regexp,
- UChar *destBuf,
+ char16_t *destBuf,
int32_t destCapacity,
int32_t *requiredCapacity,
- UChar *destFields[],
+ char16_t *destFields[],
int32_t destFieldsCapacity,
UErrorCode *status) {
//
@@ -1845,9 +1845,9 @@ int32_t RegexCImpl::split(RegularExpression *regexp,
destIdx = (int32_t)(destFields[i] - destFields[0]);
}
- destFields[i] = &destBuf[destIdx];
+ destFields[i] = (destBuf == nullptr) ? nullptr : &destBuf[destIdx];
destIdx += 1 + utext_extract(inputText, nextOutputStringStart, inputLen,
- &destBuf[destIdx], REMAINING_CAPACITY(destIdx, destCapacity), status);
+ destFields[i], REMAINING_CAPACITY(destIdx, destCapacity), status);
}
break;
}
@@ -1855,10 +1855,10 @@ int32_t RegexCImpl::split(RegularExpression *regexp,
if (regexp->fMatcher->find()) {
// We found another delimiter. Move everything from where we started looking
// up until the start of the delimiter into the next output string.
- destFields[i] = &destBuf[destIdx];
+ destFields[i] = (destBuf == nullptr) ? nullptr : &destBuf[destIdx];
destIdx += 1 + utext_extract(inputText, nextOutputStringStart, regexp->fMatcher->fMatchStart,
- &destBuf[destIdx], REMAINING_CAPACITY(destIdx, destCapacity), &tStatus);
+ destFields[i], REMAINING_CAPACITY(destIdx, destCapacity), &tStatus);
if (tStatus == U_BUFFER_OVERFLOW_ERROR) {
tStatus = U_ZERO_ERROR;
} else {
@@ -1914,9 +1914,9 @@ int32_t RegexCImpl::split(RegularExpression *regexp,
{
// We ran off the end of the input while looking for the next delimiter.
// All the remaining text goes into the current output string.
- destFields[i] = &destBuf[destIdx];
+ destFields[i] = (destBuf == nullptr) ? nullptr : &destBuf[destIdx];
destIdx += 1 + utext_extract(inputText, nextOutputStringStart, inputLen,
- &destBuf[destIdx], REMAINING_CAPACITY(destIdx, destCapacity), status);
+ destFields[i], REMAINING_CAPACITY(destIdx, destCapacity), status);
break;
}
}
@@ -1924,10 +1924,10 @@ int32_t RegexCImpl::split(RegularExpression *regexp,
// Zero out any unused portion of the destFields array
int j;
for (j=i+1; j<destFieldsCapacity; j++) {
- destFields[j] = NULL;
+ destFields[j] = nullptr;
}
- if (requiredCapacity != NULL) {
+ if (requiredCapacity != nullptr) {
*requiredCapacity = destIdx;
}
if (destIdx > destCapacity) {
@@ -1941,19 +1941,19 @@ int32_t RegexCImpl::split(RegularExpression *regexp,
//
U_CAPI int32_t U_EXPORT2
uregex_split(URegularExpression *regexp2,
- UChar *destBuf,
+ char16_t *destBuf,
int32_t destCapacity,
int32_t *requiredCapacity,
- UChar *destFields[],
+ char16_t *destFields[],
int32_t destFieldsCapacity,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
- if (validateRE(regexp, TRUE, status) == FALSE) {
+ if (validateRE(regexp, true, status) == false) {
return 0;
}
- if ((destBuf == NULL && destCapacity > 0) ||
+ if ((destBuf == nullptr && destCapacity > 0) ||
destCapacity < 0 ||
- destFields == NULL ||
+ destFields == nullptr ||
destFieldsCapacity < 1 ) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
diff --git a/contrib/libs/icu/i18n/uregexc.cpp b/contrib/libs/icu/i18n/uregexc.cpp
index c7d3bcd2c74..8bdac191147 100644
--- a/contrib/libs/icu/i18n/uregexc.cpp
+++ b/contrib/libs/icu/i18n/uregexc.cpp
@@ -29,11 +29,11 @@ uregex_openC( const char *pattern,
UParseError *pe,
UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (pattern == NULL) {
+ if (pattern == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
UnicodeString patString(pattern);
diff --git a/contrib/libs/icu/i18n/usearch.cpp b/contrib/libs/icu/i18n/usearch.cpp
index 80b80fa3b43..6d9b60cef72 100644
--- a/contrib/libs/icu/i18n/usearch.cpp
+++ b/contrib/libs/icu/i18n/usearch.cpp
@@ -74,9 +74,9 @@ inline uint32_t getMask(UCollationStrength strength)
U_CDECL_BEGIN
static UBool U_CALLCONV
-usearch_cleanup(void) {
+usearch_cleanup() {
g_nfcImpl = nullptr;
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -106,10 +106,10 @@ inline void initializeFCD(UErrorCode *status)
* @return fcd value
*/
static
-uint16_t getFCD(const UChar *str, int32_t *offset,
+uint16_t getFCD(const char16_t *str, int32_t *offset,
int32_t strlength)
{
- const UChar *temp = str + *offset;
+ const char16_t *temp = str + *offset;
uint16_t result = g_nfcImpl->nextFCD16(temp, str + strlength);
*offset = (int32_t)(temp - str);
return result;
@@ -403,7 +403,7 @@ inline void initializePattern(UStringSearch *strsrch, UErrorCode *status)
if (U_FAILURE(*status)) { return; }
UPattern *pattern = &(strsrch->pattern);
- const UChar *patterntext = pattern->text;
+ const char16_t *patterntext = pattern->text;
int32_t length = pattern->textLength;
int32_t index = 0;
@@ -502,7 +502,7 @@ inline void setMatchNotFound(UStringSearch *strsrch, UErrorCode &status)
* Checks if the offset runs out of the text string
* @param offset
* @param textlength of the text string
-* @return TRUE if offset is out of bounds, FALSE otherwise
+* @return true if offset is out of bounds, false otherwise
*/
static
inline UBool isOutOfBounds(int32_t textlength, int32_t offset)
@@ -515,13 +515,13 @@ inline UBool isOutOfBounds(int32_t textlength, int32_t offset)
* @param strsrch string search data
* @param start offset of possible match
* @param end offset of possible match
-* @return TRUE if identical match is found
+* @return true if identical match is found
*/
static
inline UBool checkIdentical(const UStringSearch *strsrch, int32_t start, int32_t end)
{
if (strsrch->strength != UCOL_IDENTICAL) {
- return TRUE;
+ return true;
}
// Note: We could use Normalizer::compare() or similar, but for short strings
@@ -529,18 +529,18 @@ inline UBool checkIdentical(const UStringSearch *strsrch, int32_t start, int32_t
UErrorCode status = U_ZERO_ERROR;
UnicodeString t2, p2;
strsrch->nfd->normalize(
- UnicodeString(FALSE, strsrch->search->text + start, end - start), t2, status);
+ UnicodeString(false, strsrch->search->text + start, end - start), t2, status);
strsrch->nfd->normalize(
- UnicodeString(FALSE, strsrch->pattern.text, strsrch->pattern.textLength), p2, status);
- // return FALSE if NFD failed
+ UnicodeString(false, strsrch->pattern.text, strsrch->pattern.textLength), p2, status);
+ // return false if NFD failed
return U_SUCCESS(status) && t2 == p2;
}
// constructors and destructor -------------------------------------------
-U_CAPI UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern,
+U_CAPI UStringSearch * U_EXPORT2 usearch_open(const char16_t *pattern,
int32_t patternlength,
- const UChar *text,
+ const char16_t *text,
int32_t textlength,
const char *locale,
UBreakIterator *breakiter,
@@ -570,7 +570,7 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern,
return nullptr;
}
else {
- result->ownCollator = TRUE;
+ result->ownCollator = true;
}
return result;
}
@@ -579,9 +579,9 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern,
}
U_CAPI UStringSearch * U_EXPORT2 usearch_openFromCollator(
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternlength,
- const UChar *text,
+ const char16_t *text,
int32_t textlength,
const UCollator *collator,
UBreakIterator *breakiter,
@@ -669,7 +669,7 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_openFromCollator(
}
#endif
- result->ownCollator = FALSE;
+ result->ownCollator = false;
result->search->matchedLength = 0;
result->search->matchedIndex = USEARCH_DONE;
result->utilIter = nullptr;
@@ -681,11 +681,11 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_openFromCollator(
return nullptr;
}
- result->search->isOverlap = FALSE;
- result->search->isCanonicalMatch = FALSE;
+ result->search->isOverlap = false;
+ result->search->isCanonicalMatch = false;
result->search->elementComparisonType = 0;
- result->search->isForwardSearching = TRUE;
- result->search->reset = TRUE;
+ result->search->isForwardSearching = true;
+ result->search->reset = true;
initialize(result, status);
@@ -734,17 +734,17 @@ U_CAPI void U_EXPORT2 usearch_close(UStringSearch *strsrch)
namespace {
UBool initTextProcessedIter(UStringSearch *strsrch, UErrorCode *status) {
- if (U_FAILURE(*status)) { return FALSE; }
+ if (U_FAILURE(*status)) { return false; }
if (strsrch->textProcessedIter == nullptr) {
strsrch->textProcessedIter = new icu::UCollationPCE(strsrch->textIter);
if (strsrch->textProcessedIter == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return FALSE;
+ return false;
}
} else {
strsrch->textProcessedIter->init(strsrch->textIter);
}
- return TRUE;
+ return true;
}
}
@@ -764,7 +764,7 @@ U_CAPI void U_EXPORT2 usearch_setOffset(UStringSearch *strsrch,
}
strsrch->search->matchedIndex = USEARCH_DONE;
strsrch->search->matchedLength = 0;
- strsrch->search->reset = FALSE;
+ strsrch->search->reset = false;
}
}
@@ -789,11 +789,11 @@ U_CAPI void U_EXPORT2 usearch_setAttribute(UStringSearch *strsrch,
switch (attribute)
{
case USEARCH_OVERLAP :
- strsrch->search->isOverlap = (value == USEARCH_ON ? TRUE : FALSE);
+ strsrch->search->isOverlap = (value == USEARCH_ON ? true : false);
break;
case USEARCH_CANONICAL_MATCH :
- strsrch->search->isCanonicalMatch = (value == USEARCH_ON ? TRUE :
- FALSE);
+ strsrch->search->isCanonicalMatch = (value == USEARCH_ON ? true :
+ false);
break;
case USEARCH_ELEMENT_COMPARISON :
if (value == USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD || value == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD) {
@@ -819,11 +819,9 @@ U_CAPI USearchAttributeValue U_EXPORT2 usearch_getAttribute(
if (strsrch) {
switch (attribute) {
case USEARCH_OVERLAP :
- return (strsrch->search->isOverlap == TRUE ? USEARCH_ON :
- USEARCH_OFF);
+ return (strsrch->search->isOverlap ? USEARCH_ON : USEARCH_OFF);
case USEARCH_CANONICAL_MATCH :
- return (strsrch->search->isCanonicalMatch == TRUE ? USEARCH_ON :
- USEARCH_OFF);
+ return (strsrch->search->isCanonicalMatch ? USEARCH_ON : USEARCH_OFF);
case USEARCH_ELEMENT_COMPARISON :
{
int16_t value = strsrch->search->elementComparisonType;
@@ -851,7 +849,7 @@ U_CAPI int32_t U_EXPORT2 usearch_getMatchedStart(
U_CAPI int32_t U_EXPORT2 usearch_getMatchedText(const UStringSearch *strsrch,
- UChar *result,
+ char16_t *result,
int32_t resultCapacity,
UErrorCode *status)
{
@@ -876,7 +874,7 @@ U_CAPI int32_t U_EXPORT2 usearch_getMatchedText(const UStringSearch *strsrch,
}
if (copylength > 0) {
uprv_memcpy(result, strsrch->search->text + copyindex,
- copylength * sizeof(UChar));
+ copylength * sizeof(char16_t));
}
return u_terminateUChars(result, resultCapacity,
strsrch->search->matchedLength, status);
@@ -918,7 +916,7 @@ usearch_getBreakIterator(const UStringSearch *strsrch)
#endif
U_CAPI void U_EXPORT2 usearch_setText( UStringSearch *strsrch,
- const UChar *text,
+ const char16_t *text,
int32_t textlength,
UErrorCode *status)
{
@@ -936,7 +934,7 @@ U_CAPI void U_EXPORT2 usearch_setText( UStringSearch *strsrch,
ucol_setText(strsrch->textIter, text, textlength, status);
strsrch->search->matchedIndex = USEARCH_DONE;
strsrch->search->matchedLength = 0;
- strsrch->search->reset = TRUE;
+ strsrch->search->reset = true;
#if !UCONFIG_NO_BREAK_ITERATION
if (strsrch->search->breakIter != nullptr) {
ubrk_setText(strsrch->search->breakIter, text,
@@ -950,7 +948,7 @@ U_CAPI void U_EXPORT2 usearch_setText( UStringSearch *strsrch,
}
}
-U_CAPI const UChar * U_EXPORT2 usearch_getText(const UStringSearch *strsrch,
+U_CAPI const char16_t * U_EXPORT2 usearch_getText(const UStringSearch *strsrch,
int32_t *length)
{
if (strsrch) {
@@ -978,7 +976,7 @@ U_CAPI void U_EXPORT2 usearch_setCollator( UStringSearch *strsrch,
strsrch->textIter = strsrch->utilIter = nullptr;
if (strsrch->ownCollator && (strsrch->collator != collator)) {
ucol_close((UCollator *)strsrch->collator);
- strsrch->ownCollator = FALSE;
+ strsrch->ownCollator = false;
}
strsrch->collator = collator;
strsrch->strength = ucol_getStrength(collator);
@@ -1024,7 +1022,7 @@ U_CAPI UCollator * U_EXPORT2 usearch_getCollator(const UStringSearch *strsrch)
}
U_CAPI void U_EXPORT2 usearch_setPattern( UStringSearch *strsrch,
- const UChar *pattern,
+ const char16_t *pattern,
int32_t patternlength,
UErrorCode *status)
{
@@ -1047,7 +1045,7 @@ U_CAPI void U_EXPORT2 usearch_setPattern( UStringSearch *strsrch,
}
}
-U_CAPI const UChar* U_EXPORT2
+U_CAPI const char16_t* U_EXPORT2
usearch_getPattern(const UStringSearch *strsrch,
int32_t *length)
{
@@ -1064,7 +1062,7 @@ U_CAPI int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
UErrorCode *status)
{
if (strsrch && U_SUCCESS(*status)) {
- strsrch->search->isForwardSearching = TRUE;
+ strsrch->search->isForwardSearching = true;
usearch_setOffset(strsrch, 0, status);
if (U_SUCCESS(*status)) {
return usearch_next(strsrch, status);
@@ -1078,7 +1076,7 @@ U_CAPI int32_t U_EXPORT2 usearch_following(UStringSearch *strsrch,
UErrorCode *status)
{
if (strsrch && U_SUCCESS(*status)) {
- strsrch->search->isForwardSearching = TRUE;
+ strsrch->search->isForwardSearching = true;
// position checked in usearch_setOffset
usearch_setOffset(strsrch, position, status);
if (U_SUCCESS(*status)) {
@@ -1092,7 +1090,7 @@ U_CAPI int32_t U_EXPORT2 usearch_last(UStringSearch *strsrch,
UErrorCode *status)
{
if (strsrch && U_SUCCESS(*status)) {
- strsrch->search->isForwardSearching = FALSE;
+ strsrch->search->isForwardSearching = false;
usearch_setOffset(strsrch, strsrch->search->textLength, status);
if (U_SUCCESS(*status)) {
return usearch_previous(strsrch, status);
@@ -1106,7 +1104,7 @@ U_CAPI int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch,
UErrorCode *status)
{
if (strsrch && U_SUCCESS(*status)) {
- strsrch->search->isForwardSearching = FALSE;
+ strsrch->search->isForwardSearching = false;
// position checked in usearch_setOffset
usearch_setOffset(strsrch, position, status);
if (U_SUCCESS(*status)) {
@@ -1146,7 +1144,7 @@ U_CAPI int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch,
// or is set by the user
int32_t offset = usearch_getOffset(strsrch);
USearch *search = strsrch->search;
- search->reset = FALSE;
+ search->reset = false;
int32_t textlength = search->textLength;
if (search->isForwardSearching) {
if (offset == textlength ||
@@ -1164,7 +1162,7 @@ U_CAPI int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch,
// setOffset has been called or that previous ran off the text
// string. the iterator would have been set to offset 0 if a
// match is not found.
- search->isForwardSearching = TRUE;
+ search->isForwardSearching = true;
if (search->matchedIndex != USEARCH_DONE) {
// there's no need to set the collation element iterator
// the next call to next will set the offset.
@@ -1240,8 +1238,8 @@ U_CAPI int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
USearch *search = strsrch->search;
if (search->reset) {
offset = search->textLength;
- search->isForwardSearching = FALSE;
- search->reset = FALSE;
+ search->isForwardSearching = false;
+ search->reset = false;
setColEIterOffset(strsrch->textIter, offset, *status);
}
else {
@@ -1249,13 +1247,13 @@ U_CAPI int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
}
int32_t matchedindex = search->matchedIndex;
- if (search->isForwardSearching == TRUE) {
+ if (search->isForwardSearching) {
// switching direction.
// if matchedIndex == USEARCH_DONE, it means that either a
// setOffset has been called or that next ran off the text
// string. the iterator would have been set to offset textLength if
// a match is not found.
- search->isForwardSearching = FALSE;
+ search->isForwardSearching = false;
if (matchedindex != USEARCH_DONE) {
return matchedindex;
}
@@ -1318,7 +1316,7 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
*/
if (strsrch) {
UErrorCode status = U_ZERO_ERROR;
- UBool sameCollAttribute = TRUE;
+ UBool sameCollAttribute = true;
uint32_t ceMask;
UBool shift;
uint32_t varTop;
@@ -1327,14 +1325,14 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
UCollationStrength newStrength = ucol_getStrength(strsrch->collator);
if ((strsrch->strength < UCOL_QUATERNARY && newStrength >= UCOL_QUATERNARY) ||
(strsrch->strength >= UCOL_QUATERNARY && newStrength < UCOL_QUATERNARY)) {
- sameCollAttribute = FALSE;
+ sameCollAttribute = false;
}
strsrch->strength = ucol_getStrength(strsrch->collator);
ceMask = getMask(strsrch->strength);
if (strsrch->ceMask != ceMask) {
strsrch->ceMask = ceMask;
- sameCollAttribute = FALSE;
+ sameCollAttribute = false;
}
// if status is a failure, ucol_getAttribute returns UCOL_DEFAULT
@@ -1342,14 +1340,14 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
&status) == UCOL_SHIFTED;
if (strsrch->toShift != shift) {
strsrch->toShift = shift;
- sameCollAttribute = FALSE;
+ sameCollAttribute = false;
}
// if status is a failure, ucol_getVariableTop returns 0
varTop = ucol_getVariableTop(strsrch->collator, &status);
if (strsrch->variableTop != varTop) {
strsrch->variableTop = varTop;
- sameCollAttribute = FALSE;
+ sameCollAttribute = false;
}
if (!sameCollAttribute) {
initialize(strsrch, &status);
@@ -1359,11 +1357,11 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
&status);
strsrch->search->matchedLength = 0;
strsrch->search->matchedIndex = USEARCH_DONE;
- strsrch->search->isOverlap = FALSE;
- strsrch->search->isCanonicalMatch = FALSE;
+ strsrch->search->isOverlap = false;
+ strsrch->search->isCanonicalMatch = false;
strsrch->search->elementComparisonType = 0;
- strsrch->search->isForwardSearching = TRUE;
- strsrch->search->reset = TRUE;
+ strsrch->search->isForwardSearching = true;
+ strsrch->search->reset = true;
}
}
@@ -1413,11 +1411,11 @@ CEIBuffer::CEIBuffer(UStringSearch *ss, UErrorCode *status) {
strSearch = ss;
bufSize = ss->pattern.pcesLength + CEBUFFER_EXTRA;
if (ss->search->elementComparisonType != 0) {
- const UChar * patText = ss->pattern.text;
+ const char16_t * patText = ss->pattern.text;
if (patText) {
- const UChar * patTextLimit = patText + ss->pattern.textLength;
+ const char16_t * patTextLimit = patText + ss->pattern.textLength;
while ( patText < patTextLimit ) {
- UChar c = *patText++;
+ char16_t c = *patText++;
if (MIGHT_BE_JAMO_L(c)) {
bufSize += MAX_TARGET_IGNORABLES_PER_PAT_JAMO_L;
} else {
@@ -1559,7 +1557,7 @@ static int32_t nextBoundaryAfter(UStringSearch *strsrch, int32_t startIndex, UEr
return startIndex;
}
#if 0
- const UChar *text = strsrch->search->text;
+ const char16_t *text = strsrch->search->text;
int32_t textLen = strsrch->search->textLength;
U_ASSERT(startIndex>=0);
@@ -1610,23 +1608,23 @@ static int32_t nextBoundaryAfter(UStringSearch *strsrch, int32_t startIndex, UEr
}
/*
- * Returns TRUE if index is on a break boundary. If the UStringSearch
+ * Returns true if index is on a break boundary. If the UStringSearch
* has an external break iterator, test using that, otherwise test
* using the internal character break iterator.
*/
static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &status) {
if (U_FAILURE(status)) {
- return TRUE;
+ return true;
}
#if 0
- const UChar *text = strsrch->search->text;
+ const char16_t *text = strsrch->search->text;
int32_t textLen = strsrch->search->textLength;
U_ASSERT(index>=0);
U_ASSERT(index<=textLen);
if (index>=textLen || index<=0) {
- return TRUE;
+ return true;
}
// If the character at the current index is not a GRAPHEME_EXTEND
@@ -1635,7 +1633,7 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
U16_GET(text, 0, index, textLen, c);
int32_t gcProperty = u_getIntPropertyValue(c, UCHAR_GRAPHEME_CLUSTER_BREAK);
if (gcProperty != U_GCB_EXTEND && gcProperty != U_GCB_SPACING_MARK) {
- return TRUE;
+ return true;
}
// We are at a combining mark. If the preceding character is anything
@@ -1647,13 +1645,13 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
#elif !UCONFIG_NO_BREAK_ITERATION
UBreakIterator *breakiterator = getBreakIterator(strsrch, status);
if (U_FAILURE(status)) {
- return TRUE;
+ return true;
}
return ubrk_isBoundary(breakiterator, index);
#else
// **** or use the original code? ****
- return TRUE;
+ return true;
#endif
}
@@ -1661,7 +1659,7 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
static UBool onBreakBoundaries(const UStringSearch *strsrch, int32_t start, int32_t end, UErrorCode &status)
{
if (U_FAILURE(status)) {
- return TRUE;
+ return true;
}
#if !UCONFIG_NO_BREAK_ITERATION
@@ -1673,7 +1671,7 @@ static UBool onBreakBoundaries(const UStringSearch *strsrch, int32_t start, int3
// out-of-range indexes are never boundary positions
if (start < startindex || start > endindex ||
end < startindex || end > endindex) {
- return FALSE;
+ return false;
}
return ubrk_isBoundary(breakiterator, start) &&
@@ -1681,7 +1679,7 @@ static UBool onBreakBoundaries(const UStringSearch *strsrch, int32_t start, int3
}
#endif
- return TRUE;
+ return true;
}
#endif
@@ -1773,7 +1771,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
// TODO: reject search patterns beginning with a combining char.
@@ -1796,7 +1794,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
startIdx > strsrch->search->textLength ||
strsrch->pattern.ces == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
if (strsrch->pattern.pces == nullptr) {
@@ -1809,7 +1807,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
// An out-of-memory (OOM) failure can occur in the initializePatternPCETable function
// or CEIBuffer constructor above, so we need to check the status.
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
int32_t targetIx = 0;
@@ -1840,7 +1838,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
//
for(targetIx=0; ; targetIx++)
{
- found = TRUE;
+ found = true;
// Inner loop checks for a match beginning at each
// position from the outer loop.
int32_t targetIxOffset = 0;
@@ -1851,7 +1849,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
const CEI *firstCEI = ceb.get(targetIx);
if (firstCEI == nullptr) {
*status = U_INTERNAL_PROGRAM_ERROR;
- found = FALSE;
+ found = false;
break;
}
@@ -1863,7 +1861,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
// which will fail the compare, below.
UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonType);
if ( ceMatch == U_CE_NO_MATCH ) {
- found = FALSE;
+ found = false;
break;
} else if ( ceMatch > U_CE_NO_MATCH ) {
if ( ceMatch == U_CE_SKIP_TARG ) {
@@ -1912,7 +1910,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
nextCEI = ceb.get(targetIx + targetIxOffset);
maxLimit = nextCEI->lowIndex;
if (nextCEI->lowIndex == nextCEI->highIndex && nextCEI->ce != UCOL_PROCESSED_NULLORDER) {
- found = FALSE;
+ found = false;
}
} else {
for ( ; ; ++targetIxOffset ) {
@@ -1928,7 +1926,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
if ( (((nextCEI->ce) >> 32) & 0xFFFF0000UL) == 0 ) {
UCompareCEsResult ceMatch = compareCE64s(nextCEI->ce, patCE, strsrch->search->elementComparisonType);
if ( ceMatch == U_CE_NO_MATCH || ceMatch == U_CE_SKIP_PATN ) {
- found = FALSE;
+ found = false;
break;
}
// If lowIndex == highIndex, this target CE is part of an expansion of the last matched
@@ -1951,7 +1949,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
// This type of match should be rejected for not completely consuming a
// combining sequence.
if (!isBreakBoundary(strsrch, mStart, *status)) {
- found = FALSE;
+ found = false;
}
if (U_FAILURE(*status)) {
break;
@@ -1964,7 +1962,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
// _following_ character.
int32_t secondIx = firstCEI->highIndex;
if (mStart == secondIx) {
- found = FALSE;
+ found = false;
}
// Allow matches to end in the middle of a grapheme cluster if the following
@@ -1978,7 +1976,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
// subsequent check for normalization boundary; however they are likely much faster
// tests in any case)
// * the match limit is a normalization boundary
- UBool allowMidclusterMatch = FALSE;
+ UBool allowMidclusterMatch = false;
if (strsrch->search->text != nullptr && strsrch->search->textLength > maxLimit) {
allowMidclusterMatch =
strsrch->search->breakIter == nullptr &&
@@ -2032,11 +2030,11 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
// If advancing to the end of a combining sequence in character indexing space
// advanced us beyond the end of the match in CE space, reject this match.
if (mLimit > maxLimit) {
- found = FALSE;
+ found = false;
}
if (!isBreakBoundary(strsrch, mLimit, *status)) {
- found = FALSE;
+ found = false;
}
if (U_FAILURE(*status)) {
break;
@@ -2044,7 +2042,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
}
if (! checkIdentical(strsrch, mStart, mLimit)) {
- found = FALSE;
+ found = false;
}
if (found) {
@@ -2067,10 +2065,10 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
//
if (U_FAILURE(*status)) {
- found = FALSE; // No match if a failure occured.
+ found = false; // No match if a failure occured.
}
- if (found==FALSE) {
+ if (found==false) {
mLimit = -1;
mStart = -1;
}
@@ -2093,7 +2091,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
UErrorCode *status)
{
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
// TODO: reject search patterns beginning with a combining char.
@@ -2116,7 +2114,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
startIdx > strsrch->search->textLength ||
strsrch->pattern.ces == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return FALSE;
+ return false;
}
if (strsrch->pattern.pces == nullptr) {
@@ -2138,7 +2136,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
if (startIdx < strsrch->search->textLength) {
UBreakIterator *breakiterator = getBreakIterator(strsrch, *status);
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
int32_t next = ubrk_following(breakiterator, startIdx);
@@ -2155,7 +2153,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// An out-of-memory (OOM) failure can occur above, so we need to check the status.
if (U_FAILURE(*status)) {
- return FALSE;
+ return false;
}
const CEI *targetCEI = nullptr;
@@ -2178,14 +2176,14 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// and the beginning of the base text.
for(targetIx = limitIx; ; targetIx += 1)
{
- found = TRUE;
+ found = true;
// For targetIx > limitIx, this ceb.getPrevious gets a CE that is as far back in the ring buffer
// (compared to the last CE fetched for the previous targetIx value) as we need to go
// for this targetIx value, so if it is non-nullptr then other ceb.getPrevious calls should be OK.
const CEI *lastCEI = ceb.getPrevious(targetIx);
if (lastCEI == nullptr) {
*status = U_INTERNAL_PROGRAM_ERROR;
- found = FALSE;
+ found = false;
break;
}
// Inner loop checks for a match beginning at each
@@ -2200,7 +2198,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// which will fail the compare, below.
UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonType);
if ( ceMatch == U_CE_NO_MATCH ) {
- found = FALSE;
+ found = false;
break;
} else if ( ceMatch > U_CE_NO_MATCH ) {
if ( ceMatch == U_CE_SKIP_TARG ) {
@@ -2240,7 +2238,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// This type of match should be rejected for not completely consuming a
// combining sequence.
if (!isBreakBoundary(strsrch, mStart, *status)) {
- found = FALSE;
+ found = false;
}
if (U_FAILURE(*status)) {
break;
@@ -2249,7 +2247,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// Look at the high index of the first CE in the match. If it's the same as the
// low index, the first CE in the match is in the middle of an expansion.
if (mStart == firstCEI->highIndex) {
- found = FALSE;
+ found = false;
}
@@ -2267,7 +2265,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
const CEI *nextCEI = ceb.getPrevious(targetIx - 1);
if (nextCEI->lowIndex == nextCEI->highIndex && nextCEI->ce != UCOL_PROCESSED_NULLORDER) {
- found = FALSE;
+ found = false;
}
mLimit = maxLimit = nextCEI->lowIndex;
@@ -2283,7 +2281,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// subsequent check for normalization boundary; however they are likely much faster
// tests in any case)
// * the match limit is a normalization boundary
- UBool allowMidclusterMatch = FALSE;
+ UBool allowMidclusterMatch = false;
if (strsrch->search->text != nullptr && strsrch->search->textLength > maxLimit) {
allowMidclusterMatch =
strsrch->search->breakIter == nullptr &&
@@ -2316,12 +2314,12 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
// If advancing to the end of a combining sequence in character indexing space
// advanced us beyond the end of the match in CE space, reject this match.
if (mLimit > maxLimit) {
- found = FALSE;
+ found = false;
}
// Make sure the end of the match is on a break boundary
if (!isBreakBoundary(strsrch, mLimit, *status)) {
- found = FALSE;
+ found = false;
}
if (U_FAILURE(*status)) {
break;
@@ -2345,7 +2343,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
if (! checkIdentical(strsrch, mStart, mLimit)) {
- found = FALSE;
+ found = false;
}
if (found) {
@@ -2368,10 +2366,10 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch *strsrch,
//
if (U_FAILURE(*status)) {
- found = FALSE; // No match if a failure occured.
+ found = false; // No match if a failure occured.
}
- if (found==FALSE) {
+ if (found==false) {
mLimit = -1;
mStart = -1;
}
@@ -2393,7 +2391,7 @@ UBool usearch_handleNextExact(UStringSearch *strsrch, UErrorCode *status)
{
if (U_FAILURE(*status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
int32_t textOffset = ucol_getOffset(strsrch->textIter);
@@ -2403,10 +2401,10 @@ UBool usearch_handleNextExact(UStringSearch *strsrch, UErrorCode *status)
if (usearch_search(strsrch, textOffset, &start, &end, status)) {
strsrch->search->matchedIndex = start;
strsrch->search->matchedLength = end - start;
- return TRUE;
+ return true;
} else {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
}
@@ -2414,7 +2412,7 @@ UBool usearch_handleNextCanonical(UStringSearch *strsrch, UErrorCode *status)
{
if (U_FAILURE(*status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
int32_t textOffset = ucol_getOffset(strsrch->textIter);
@@ -2424,10 +2422,10 @@ UBool usearch_handleNextCanonical(UStringSearch *strsrch, UErrorCode *status)
if (usearch_search(strsrch, textOffset, &start, &end, status)) {
strsrch->search->matchedIndex = start;
strsrch->search->matchedLength = end - start;
- return TRUE;
+ return true;
} else {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
}
@@ -2435,7 +2433,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
{
if (U_FAILURE(*status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
int32_t textOffset;
@@ -2448,7 +2446,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
initializePatternPCETable(strsrch, status);
if (!initTextProcessedIter(strsrch, status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
for (int32_t nPCEs = 0; nPCEs < strsrch->pattern.pcesLength - 1; nPCEs++) {
int64_t pce = strsrch->textProcessedIter->nextProcessed(nullptr, nullptr, status);
@@ -2459,7 +2457,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
}
if (U_FAILURE(*status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
textOffset = ucol_getOffset(strsrch->textIter);
}
@@ -2473,10 +2471,10 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
if (usearch_searchBackwards(strsrch, textOffset, &start, &end, status)) {
strsrch->search->matchedIndex = start;
strsrch->search->matchedLength = end - start;
- return TRUE;
+ return true;
} else {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
}
@@ -2485,7 +2483,7 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
{
if (U_FAILURE(*status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
int32_t textOffset;
@@ -2498,7 +2496,7 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
initializePatternPCETable(strsrch, status);
if (!initTextProcessedIter(strsrch, status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
for (int32_t nPCEs = 0; nPCEs < strsrch->pattern.pcesLength - 1; nPCEs++) {
int64_t pce = strsrch->textProcessedIter->nextProcessed(nullptr, nullptr, status);
@@ -2509,7 +2507,7 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
}
if (U_FAILURE(*status)) {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
textOffset = ucol_getOffset(strsrch->textIter);
}
@@ -2523,10 +2521,10 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
if (usearch_searchBackwards(strsrch, textOffset, &start, &end, status)) {
strsrch->search->matchedIndex = start;
strsrch->search->matchedLength = end - start;
- return TRUE;
+ return true;
} else {
setMatchNotFound(strsrch, *status);
- return FALSE;
+ return false;
}
}
diff --git a/contrib/libs/icu/i18n/uspoof.cpp b/contrib/libs/icu/i18n/uspoof.cpp
index dd4618baa70..271caeafff9 100644
--- a/contrib/libs/icu/i18n/uspoof.cpp
+++ b/contrib/libs/icu/i18n/uspoof.cpp
@@ -38,30 +38,30 @@ U_NAMESPACE_USE
//
// Static Objects used by the spoof impl, their thread safe initialization and their cleanup.
//
-static UnicodeSet *gInclusionSet = NULL;
-static UnicodeSet *gRecommendedSet = NULL;
-static const Normalizer2 *gNfdNormalizer = NULL;
-static UInitOnce gSpoofInitStaticsOnce = U_INITONCE_INITIALIZER;
+static UnicodeSet *gInclusionSet = nullptr;
+static UnicodeSet *gRecommendedSet = nullptr;
+static const Normalizer2 *gNfdNormalizer = nullptr;
+static UInitOnce gSpoofInitStaticsOnce {};
namespace {
UBool U_CALLCONV
-uspoof_cleanup(void) {
+uspoof_cleanup() {
delete gInclusionSet;
- gInclusionSet = NULL;
+ gInclusionSet = nullptr;
delete gRecommendedSet;
- gRecommendedSet = NULL;
- gNfdNormalizer = NULL;
+ gRecommendedSet = nullptr;
+ gNfdNormalizer = nullptr;
gSpoofInitStaticsOnce.reset();
- return TRUE;
+ return true;
}
void U_CALLCONV initializeStatics(UErrorCode &status) {
static const char16_t *inclusionPat =
- u"['\\-.\\:\\u00B7\\u0375\\u058A\\u05F3\\u05F4\\u06FD\\u06FE\\u0F0B\\u200C"
- u"\\u200D\\u2010\\u2019\\u2027\\u30A0\\u30FB]";
+ u"['\\-.\\:\\u00B7\\u0375\\u058A\\u05F3\\u05F4\\u06FD\\u06FE\\u0F0B\\u2010"
+ u"\\u2019\\u2027\\u30A0\\u30FB]";
gInclusionSet = new UnicodeSet(UnicodeString(inclusionPat), status);
- if (gInclusionSet == NULL) {
+ if (gInclusionSet == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -103,14 +103,14 @@ void U_CALLCONV initializeStatics(UErrorCode &status) {
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\\u0CF2\\u0D00\\u0D02\\u0D03\\u0D05-\\u0D0C\\u0D0E-"
+ 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-\\u0ECD\\u0ED0-\\u0ED9\\u0EDE\\u0EDF\\u0F00\\u0F20-"
+ 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"
@@ -131,20 +131,21 @@ void U_CALLCONV initializeStatics(UErrorCode &status) {
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\\uA7AE\\uA7B8"
- u"\\uA7B9\\uA7C0-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA9E7-\\uA9FE"
- u"\\uAA60-\\uAA76\\uAA7A-\\uAA7F\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16"
- u"\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB66\\uAB67\\uAC00-\\uD7A3\\uFA0E\\uFA0F"
- u"\\uFA11\\uFA13\\uFA14\\uFA1F\\uFA21\\uFA23\\uFA24\\uFA27-\\uFA29\\U00011301"
- u"\\U00011303\\U0001133B\\U0001133C\\U00016FF0\\U00016FF1\\U0001B11F-"
- u"\\U0001B122\\U0001B150-\\U0001B152\\U0001B164-\\U0001B167\\U0001DF00-"
- u"\\U0001DF1E\\U0001E7E0-\\U0001E7E6\\U0001E7E8-\\U0001E7EB\\U0001E7ED"
- u"\\U0001E7EE\\U0001E7F0-\\U0001E7FE\\U00020000-\\U0002A6DF\\U0002A700-"
- u"\\U0002B738\\U0002B740-\\U0002B81D\\U0002B820-\\U0002CEA1\\U0002CEB0-"
- u"\\U0002EBE0\\U00030000-\\U0003134A]";
+ 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 == NULL) {
+ if (gRecommendedSet == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
delete gInclusionSet;
return;
@@ -164,16 +165,16 @@ U_CAPI USpoofChecker * U_EXPORT2
uspoof_open(UErrorCode *status) {
umtx_initOnce(gSpoofInitStaticsOnce, &initializeStatics, *status);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
SpoofImpl *si = new SpoofImpl(*status);
- if (si == NULL) {
+ if (si == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete si;
- return NULL;
+ return nullptr;
}
return si->asUSpoofChecker();
}
@@ -183,44 +184,44 @@ U_CAPI USpoofChecker * U_EXPORT2
uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLength,
UErrorCode *status) {
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
- if (data == NULL) {
+ if (data == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
umtx_initOnce(gSpoofInitStaticsOnce, &initializeStatics, *status);
if (U_FAILURE(*status))
{
- return NULL;
+ return nullptr;
}
SpoofData *sd = new SpoofData(data, length, *status);
- if (sd == NULL) {
+ if (sd == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete sd;
- return NULL;
+ return nullptr;
}
SpoofImpl *si = new SpoofImpl(sd, *status);
- if (si == NULL) {
+ if (si == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
delete sd; // explicit delete as the destructor for si won't be called.
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete si; // no delete for sd, as the si destructor will delete it.
- return NULL;
+ return nullptr;
}
- if (pActualLength != NULL) {
+ if (pActualLength != nullptr) {
*pActualLength = sd->size();
}
return si->asUSpoofChecker();
@@ -230,17 +231,17 @@ uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLeng
U_CAPI USpoofChecker * U_EXPORT2
uspoof_clone(const USpoofChecker *sc, UErrorCode *status) {
const SpoofImpl *src = SpoofImpl::validateThis(sc, *status);
- if (src == NULL) {
- return NULL;
+ if (src == nullptr) {
+ return nullptr;
}
SpoofImpl *result = new SpoofImpl(*src, *status); // copy constructor
- if (result == NULL) {
+ if (result == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete result;
- result = NULL;
+ result = nullptr;
}
return result->asUSpoofChecker();
}
@@ -257,7 +258,7 @@ uspoof_close(USpoofChecker *sc) {
U_CAPI void U_EXPORT2
uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status) {
SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
+ if (This == nullptr) {
return;
}
@@ -275,7 +276,7 @@ uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status) {
U_CAPI int32_t U_EXPORT2
uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status) {
const SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
+ if (This == nullptr) {
return 0;
}
return This->fChecks;
@@ -285,7 +286,7 @@ U_CAPI void U_EXPORT2
uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel) {
UErrorCode status = U_ZERO_ERROR;
SpoofImpl *This = SpoofImpl::validateThis(sc, status);
- if (This != NULL) {
+ if (This != nullptr) {
This->fRestrictionLevel = restrictionLevel;
This->fChecks |= USPOOF_RESTRICTION_LEVEL;
}
@@ -295,7 +296,7 @@ U_CAPI URestrictionLevel U_EXPORT2
uspoof_getRestrictionLevel(const USpoofChecker *sc) {
UErrorCode status = U_ZERO_ERROR;
const SpoofImpl *This = SpoofImpl::validateThis(sc, status);
- if (This == NULL) {
+ if (This == nullptr) {
return USPOOF_UNRESTRICTIVE;
}
return This->fRestrictionLevel;
@@ -304,7 +305,7 @@ uspoof_getRestrictionLevel(const USpoofChecker *sc) {
U_CAPI void U_EXPORT2
uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode *status) {
SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
+ if (This == nullptr) {
return;
}
This->setAllowedLocales(localesList, *status);
@@ -313,8 +314,8 @@ uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode
U_CAPI const char * U_EXPORT2
uspoof_getAllowedLocales(USpoofChecker *sc, UErrorCode *status) {
SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
- return NULL;
+ if (This == nullptr) {
+ return nullptr;
}
return This->getAllowedLocales(*status);
}
@@ -329,8 +330,8 @@ uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status) {
U_CAPI const UnicodeSet * U_EXPORT2
uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status) {
const SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
- return NULL;
+ if (This == nullptr) {
+ return nullptr;
}
return This->fAllowedCharsSet;
}
@@ -346,7 +347,7 @@ uspoof_setAllowedChars(USpoofChecker *sc, const USet *chars, UErrorCode *status)
U_CAPI void U_EXPORT2
uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const UnicodeSet *chars, UErrorCode *status) {
SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
+ if (This == nullptr) {
return;
}
if (chars->isBogus()) {
@@ -354,7 +355,7 @@ uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const UnicodeSet *chars, UErrorCo
return;
}
UnicodeSet *clonedSet = chars->clone();
- if (clonedSet == NULL || clonedSet->isBogus()) {
+ if (clonedSet == nullptr || clonedSet->isBogus()) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -367,28 +368,28 @@ uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const UnicodeSet *chars, UErrorCo
U_CAPI int32_t U_EXPORT2
uspoof_check(const USpoofChecker *sc,
- const UChar *id, int32_t length,
+ const char16_t *id, int32_t length,
int32_t *position,
UErrorCode *status) {
// Backwards compatibility:
- if (position != NULL) {
+ if (position != nullptr) {
*position = 0;
}
// Delegate to uspoof_check2
- return uspoof_check2(sc, id, length, NULL, status);
+ return uspoof_check2(sc, id, length, nullptr, status);
}
U_CAPI int32_t U_EXPORT2
uspoof_check2(const USpoofChecker *sc,
- const UChar* id, int32_t length,
+ const char16_t* id, int32_t length,
USpoofCheckResult* checkResult,
UErrorCode *status) {
const SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
+ if (This == nullptr) {
return 0;
}
if (length < -1) {
@@ -408,12 +409,12 @@ uspoof_checkUTF8(const USpoofChecker *sc,
UErrorCode *status) {
// Backwards compatibility:
- if (position != NULL) {
+ if (position != nullptr) {
*position = 0;
}
// Delegate to uspoof_check2
- return uspoof_check2UTF8(sc, id, length, NULL, status);
+ return uspoof_check2UTF8(sc, id, length, nullptr, status);
}
@@ -434,8 +435,8 @@ uspoof_check2UTF8(const USpoofChecker *sc,
U_CAPI int32_t U_EXPORT2
uspoof_areConfusable(const USpoofChecker *sc,
- const UChar *id1, int32_t length1,
- const UChar *id2, int32_t length2,
+ const char16_t *id1, int32_t length1,
+ const char16_t *id2, int32_t length2,
UErrorCode *status) {
SpoofImpl::validateThis(sc, *status);
if (U_FAILURE(*status)) {
@@ -545,19 +546,19 @@ uspoof_checkUnicodeString(const USpoofChecker *sc,
UErrorCode *status) {
// Backwards compatibility:
- if (position != NULL) {
+ if (position != nullptr) {
*position = 0;
}
// Delegate to uspoof_check2
- return uspoof_check2UnicodeString(sc, id, NULL, status);
+ return uspoof_check2UnicodeString(sc, id, nullptr, status);
}
namespace {
int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
- U_ASSERT(This != NULL);
- U_ASSERT(checkResult != NULL);
+ U_ASSERT(This != nullptr);
+ U_ASSERT(checkResult != nullptr);
checkResult->clear();
int32_t result = 0;
@@ -611,7 +612,7 @@ int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* c
int32_t i;
UChar32 c;
UChar32 firstNonspacingMark = 0;
- UBool haveMultipleMarks = FALSE;
+ UBool haveMultipleMarks = false;
UnicodeSet marksSeenSoFar; // Set of combining marks in a single combining sequence.
for (i=0; i<nfdLength ;) {
@@ -621,7 +622,7 @@ int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* c
firstNonspacingMark = 0;
if (haveMultipleMarks) {
marksSeenSoFar.clear();
- haveMultipleMarks = FALSE;
+ haveMultipleMarks = false;
}
continue;
}
@@ -631,7 +632,7 @@ int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* c
}
if (!haveMultipleMarks) {
marksSeenSoFar.add(firstNonspacingMark);
- haveMultipleMarks = TRUE;
+ haveMultipleMarks = true;
}
if (marksSeenSoFar.contains(c)) {
// report the error, and stop scanning.
@@ -655,14 +656,14 @@ uspoof_check2UnicodeString(const USpoofChecker *sc,
USpoofCheckResult* checkResult,
UErrorCode *status) {
const SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
- return FALSE;
+ if (This == nullptr) {
+ return false;
}
- if (checkResult != NULL) {
+ if (checkResult != nullptr) {
CheckResult* ThisCheckResult = CheckResult::validateThis(checkResult, *status);
- if (ThisCheckResult == NULL) {
- return FALSE;
+ if (ThisCheckResult == nullptr) {
+ return false;
}
return checkImpl(This, id, ThisCheckResult, status);
} else {
@@ -676,15 +677,15 @@ uspoof_check2UnicodeString(const USpoofChecker *sc,
U_CAPI int32_t U_EXPORT2
uspoof_getSkeleton(const USpoofChecker *sc,
uint32_t type,
- const UChar *id, int32_t length,
- UChar *dest, int32_t destCapacity,
+ const char16_t *id, int32_t length,
+ char16_t *dest, int32_t destCapacity,
UErrorCode *status) {
SpoofImpl::validateThis(sc, *status);
if (U_FAILURE(*status)) {
return 0;
}
- if (length<-1 || destCapacity<0 || (destCapacity==0 && dest!=NULL)) {
+ if (length<-1 || destCapacity<0 || (destCapacity==0 && dest!=nullptr)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -738,7 +739,7 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
if (U_FAILURE(*status)) {
return 0;
}
- if (length<-1 || destCapacity<0 || (destCapacity==0 && dest!=NULL)) {
+ if (length<-1 || destCapacity<0 || (destCapacity==0 && dest!=nullptr)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -760,7 +761,7 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
U_CAPI int32_t U_EXPORT2
uspoof_serialize(USpoofChecker *sc,void *buf, int32_t capacity, UErrorCode *status) {
SpoofImpl *This = SpoofImpl::validateThis(sc, *status);
- if (This == NULL) {
+ if (This == nullptr) {
U_ASSERT(U_FAILURE(*status));
return 0;
}
@@ -799,9 +800,9 @@ uspoof_getRecommendedUnicodeSet(UErrorCode *status) {
U_CAPI USpoofCheckResult* U_EXPORT2
uspoof_openCheckResult(UErrorCode *status) {
CheckResult* checkResult = new CheckResult();
- if (checkResult == NULL) {
+ if (checkResult == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
return checkResult->asUSpoofCheckResult();
}
@@ -830,7 +831,7 @@ uspoof_getCheckResultRestrictionLevel(const USpoofCheckResult *checkResult, UErr
U_CAPI const USet* U_EXPORT2
uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode *status) {
const CheckResult* This = CheckResult::validateThis(checkResult, *status);
- if (U_FAILURE(*status)) { return NULL; }
+ if (U_FAILURE(*status)) { return nullptr; }
return This->fNumerics.toUSet();
}
diff --git a/contrib/libs/icu/i18n/uspoof_build.cpp b/contrib/libs/icu/i18n/uspoof_build.cpp
index 192fb9a6885..098d272e196 100644
--- a/contrib/libs/icu/i18n/uspoof_build.cpp
+++ b/contrib/libs/icu/i18n/uspoof_build.cpp
@@ -53,16 +53,16 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
int32_t *errorType, UParseError *pe, UErrorCode *status) {
uspoof_internalInitStatics(status);
if (U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
#if UCONFIG_NO_REGULAR_EXPRESSIONS
*status = U_UNSUPPORTED_ERROR;
- return NULL;
+ return nullptr;
#else
- if (errorType!=NULL) {
+ if (errorType!=nullptr) {
*errorType = 0;
}
- if (pe != NULL) {
+ if (pe != nullptr) {
pe->line = 0;
pe->offset = 0;
pe->preContext[0] = 0;
@@ -72,26 +72,26 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
// Set up a shell of a spoof detector, with empty data.
SpoofData *newSpoofData = new SpoofData(*status);
- if (newSpoofData == NULL) {
+ if (newSpoofData == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete newSpoofData;
- return NULL;
+ return nullptr;
}
SpoofImpl *This = new SpoofImpl(newSpoofData, *status);
- if (This == NULL) {
+ if (This == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
delete newSpoofData; // explicit delete as the destructor for SpoofImpl won't be called.
- return NULL;
+ return nullptr;
}
if (U_FAILURE(*status)) {
delete This; // no delete for newSpoofData, as the SpoofImpl destructor will delete it.
- return NULL;
+ return nullptr;
}
// Compile the binary data from the source (text) format.
@@ -99,7 +99,7 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
if (U_FAILURE(*status)) {
delete This;
- This = NULL;
+ This = nullptr;
}
return (USpoofChecker *)This;
#endif // UCONFIG_NO_REGULAR_EXPRESSIONS
diff --git a/contrib/libs/icu/i18n/uspoof_conf.cpp b/contrib/libs/icu/i18n/uspoof_conf.cpp
index 04081cabfb0..42dba1c0378 100644
--- a/contrib/libs/icu/i18n/uspoof_conf.cpp
+++ b/contrib/libs/icu/i18n/uspoof_conf.cpp
@@ -63,36 +63,32 @@ U_NAMESPACE_USE
// at the same time
//
-SPUString::SPUString(UnicodeString *s) {
- fStr = s;
+SPUString::SPUString(LocalPointer<UnicodeString> s) {
+ fStr = std::move(s);
fCharOrStrTableIndex = 0;
}
SPUString::~SPUString() {
- delete fStr;
}
-SPUStringPool::SPUStringPool(UErrorCode &status) : fVec(NULL), fHash(NULL) {
- fVec = new UVector(status);
- if (fVec == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
+SPUStringPool::SPUStringPool(UErrorCode &status) : fVec(nullptr), fHash(nullptr) {
+ LocalPointer<UVector> vec(new UVector(status), status);
+ if (U_FAILURE(status)) {
return;
}
+ vec->setDeleter(
+ [](void *obj) {delete (SPUString *)obj;});
+ fVec = vec.orphan();
fHash = uhash_open(uhash_hashUnicodeString, // key hash function
uhash_compareUnicodeString, // Key Comparator
- NULL, // Value Comparator
+ nullptr, // Value Comparator
&status);
}
SPUStringPool::~SPUStringPool() {
- int i;
- for (i=fVec->size()-1; i>=0; i--) {
- SPUString *s = static_cast<SPUString *>(fVec->elementAt(i));
- delete s;
- }
delete fVec;
uhash_close(fHash);
}
@@ -135,18 +131,21 @@ void SPUStringPool::sort(UErrorCode &status) {
SPUString *SPUStringPool::addString(UnicodeString *src, UErrorCode &status) {
+ LocalPointer<UnicodeString> lpSrc(src);
+ if (U_FAILURE(status)) {
+ return nullptr;
+ }
SPUString *hashedString = static_cast<SPUString *>(uhash_get(fHash, src));
- if (hashedString != NULL) {
- delete src;
- } else {
- hashedString = new SPUString(src);
- if (hashedString == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
- }
- uhash_put(fHash, src, hashedString, &status);
- fVec->addElementX(hashedString, status);
+ if (hashedString != nullptr) {
+ return hashedString;
+ }
+ LocalPointer<SPUString> spuStr(new SPUString(std::move(lpSrc)), status);
+ hashedString = spuStr.getAlias();
+ fVec->adoptElement(spuStr.orphan(), status);
+ if (U_FAILURE(status)) {
+ return nullptr;
}
+ uhash_put(fHash, src, hashedString, &status);
return hashedString;
}
@@ -154,43 +153,43 @@ SPUString *SPUStringPool::addString(UnicodeString *src, UErrorCode &status) {
ConfusabledataBuilder::ConfusabledataBuilder(SpoofImpl *spImpl, UErrorCode &status) :
fSpoofImpl(spImpl),
- fInput(NULL),
- fTable(NULL),
- fKeySet(NULL),
- fKeyVec(NULL),
- fValueVec(NULL),
- fStringTable(NULL),
- stringPool(NULL),
- fParseLine(NULL),
- fParseHexNum(NULL),
+ fInput(nullptr),
+ fTable(nullptr),
+ fKeySet(nullptr),
+ fKeyVec(nullptr),
+ fValueVec(nullptr),
+ fStringTable(nullptr),
+ stringPool(nullptr),
+ fParseLine(nullptr),
+ fParseHexNum(nullptr),
fLineNum(0)
{
if (U_FAILURE(status)) {
return;
}
- fTable = uhash_open(uhash_hashLong, uhash_compareLong, NULL, &status);
+ fTable = uhash_open(uhash_hashLong, uhash_compareLong, nullptr, &status);
fKeySet = new UnicodeSet();
- if (fKeySet == NULL) {
+ if (fKeySet == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
fKeyVec = new UVector(status);
- if (fKeyVec == NULL) {
+ if (fKeyVec == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
fValueVec = new UVector(status);
- if (fValueVec == NULL) {
+ if (fValueVec == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
stringPool = new SPUStringPool(status);
- if (stringPool == NULL) {
+ if (stringPool == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -218,7 +217,7 @@ void ConfusabledataBuilder::buildConfusableData(SpoofImpl * spImpl, const char *
}
ConfusabledataBuilder builder(spImpl, status);
builder.build(confusables, confusablesLen, status);
- if (U_FAILURE(status) && errorType != NULL) {
+ if (U_FAILURE(status) && errorType != nullptr) {
*errorType = USPOOF_SINGLE_SCRIPT_CONFUSABLE;
pe->line = builder.fLineNum;
}
@@ -228,22 +227,22 @@ void ConfusabledataBuilder::buildConfusableData(SpoofImpl * spImpl, const char *
void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesLen,
UErrorCode &status) {
- // Convert the user input data from UTF-8 to UChar (UTF-16)
+ // Convert the user input data from UTF-8 to char16_t (UTF-16)
int32_t inputLen = 0;
if (U_FAILURE(status)) {
return;
}
- u_strFromUTF8(NULL, 0, &inputLen, confusables, confusablesLen, &status);
+ u_strFromUTF8(nullptr, 0, &inputLen, confusables, confusablesLen, &status);
if (status != U_BUFFER_OVERFLOW_ERROR) {
return;
}
status = U_ZERO_ERROR;
- fInput = static_cast<UChar *>(uprv_malloc((inputLen+1) * sizeof(UChar)));
- if (fInput == NULL) {
+ fInput = static_cast<char16_t *>(uprv_malloc((inputLen+1) * sizeof(char16_t)));
+ if (fInput == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
- u_strFromUTF8(fInput, inputLen+1, NULL, confusables, confusablesLen, &status);
+ u_strFromUTF8(fInput, inputLen+1, nullptr, confusables, confusablesLen, &status);
// Regular Expression to parse a line from Confusables.txt. The expression will match
@@ -264,12 +263,12 @@ void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesL
"|^([ \\t]*(?:#.*?)?)$" // OR match empty lines or lines with only a #comment
"|^(.*?)$", -1, US_INV); // OR match any line, which catches illegal lines.
// TODO: Why are we using the regex C API here? C++ would just take UnicodeString...
- fParseLine = uregex_open(pattern.getBuffer(), pattern.length(), 0, NULL, &status);
+ fParseLine = uregex_open(pattern.getBuffer(), pattern.length(), 0, nullptr, &status);
// Regular expression for parsing a hex number out of a space-separated list of them.
// Capture group 1 gets the number, with spaces removed.
pattern = UNICODE_STRING_SIMPLE("\\s*([0-9A-F]+)");
- fParseHexNum = uregex_open(pattern.getBuffer(), pattern.length(), 0, NULL, &status);
+ fParseHexNum = uregex_open(pattern.getBuffer(), pattern.length(), 0, nullptr, &status);
// Zap any Byte Order Mark at the start of input. Changing it to a space is benign
// given the syntax of the input.
@@ -301,7 +300,7 @@ void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesL
uregex_setText(fParseHexNum, &fInput[mapStringStart], mapStringLength, &status);
UnicodeString *mapString = new UnicodeString();
- if (mapString == NULL) {
+ if (mapString == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -371,7 +370,7 @@ void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesL
for (UChar32 keyChar=fKeySet->getRangeStart(range);
keyChar <= fKeySet->getRangeEnd(range); keyChar++) {
SPUString *targetMapping = static_cast<SPUString *>(uhash_iget(fTable, keyChar));
- U_ASSERT(targetMapping != NULL);
+ U_ASSERT(targetMapping != nullptr);
// Set an error code if trying to consume a long string. Otherwise,
// codePointAndLengthToKey will abort on a U_ASSERT.
@@ -408,7 +407,7 @@ void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesL
//
void ConfusabledataBuilder::outputData(UErrorCode &status) {
- U_ASSERT(fSpoofImpl->fSpoofData->fDataOwned == TRUE);
+ U_ASSERT(fSpoofImpl->fSpoofData->fDataOwned);
// The Key Table
// While copying the keys to the runtime array,
@@ -460,8 +459,8 @@ void ConfusabledataBuilder::outputData(UErrorCode &status) {
uint32_t stringsLength = fStringTable->length();
// Reserve an extra space so the string will be nul-terminated. This is
// only a convenience, for when debugging; it is not needed otherwise.
- UChar *strings =
- static_cast<UChar *>(fSpoofImpl->fSpoofData->reserveSpace(stringsLength*sizeof(UChar)+2, status));
+ char16_t *strings =
+ static_cast<char16_t *>(fSpoofImpl->fSpoofData->reserveSpace(stringsLength*sizeof(char16_t)+2, status));
if (U_FAILURE(status)) {
return;
}
diff --git a/contrib/libs/icu/i18n/uspoof_conf.h b/contrib/libs/icu/i18n/uspoof_conf.h
index 600d7ea42a4..a5e3b9e109c 100644
--- a/contrib/libs/icu/i18n/uspoof_conf.h
+++ b/contrib/libs/icu/i18n/uspoof_conf.h
@@ -39,11 +39,12 @@ U_NAMESPACE_BEGIN
// Instances of SPUString exist during the compilation process only.
struct SPUString : public UMemory {
- UnicodeString *fStr; // The actual string.
- int32_t fCharOrStrTableIndex; // Index into the final runtime data for this
- // string (or, for length 1, the single string char
- // itself, there being no string table entry for it.)
- SPUString(UnicodeString *s);
+ LocalPointer<UnicodeString> fStr; // The actual string.
+ int32_t fCharOrStrTableIndex; // Index into the final runtime data for this
+ // string (or, for length 1, the single string char
+ // itself, there being no string table entry for it.)
+
+ SPUString(LocalPointer<UnicodeString> s);
~SPUString();
};
@@ -89,7 +90,7 @@ class SPUStringPool : public UMemory {
class ConfusabledataBuilder : public UMemory {
private:
SpoofImpl *fSpoofImpl;
- UChar *fInput;
+ char16_t *fInput;
UHashtable *fTable;
UnicodeSet *fKeySet; // A set of all keys (UChar32s) that go into the four mapping tables.
diff --git a/contrib/libs/icu/i18n/uspoof_impl.cpp b/contrib/libs/icu/i18n/uspoof_impl.cpp
index b283d813210..7a6084a1096 100644
--- a/contrib/libs/icu/i18n/uspoof_impl.cpp
+++ b/contrib/libs/icu/i18n/uspoof_impl.cpp
@@ -53,9 +53,9 @@ SpoofImpl::SpoofImpl() {
void SpoofImpl::construct(UErrorCode& status) {
fChecks = USPOOF_ALL_CHECKS;
- fSpoofData = NULL;
- fAllowedCharsSet = NULL;
- fAllowedLocales = NULL;
+ fSpoofData = nullptr;
+ fAllowedCharsSet = nullptr;
+ fAllowedLocales = nullptr;
fRestrictionLevel = USPOOF_HIGHLY_RESTRICTIVE;
if (U_FAILURE(status)) { return; }
@@ -63,7 +63,7 @@ void SpoofImpl::construct(UErrorCode& status) {
UnicodeSet *allowedCharsSet = new UnicodeSet(0, 0x10ffff);
fAllowedCharsSet = allowedCharsSet;
fAllowedLocales = uprv_strdup("");
- if (fAllowedCharsSet == NULL || fAllowedLocales == NULL) {
+ if (fAllowedCharsSet == nullptr || fAllowedLocales == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -73,25 +73,25 @@ void SpoofImpl::construct(UErrorCode& status) {
// Copy Constructor, used by the user level clone() function.
SpoofImpl::SpoofImpl(const SpoofImpl &src, UErrorCode &status) :
- fChecks(USPOOF_ALL_CHECKS), fSpoofData(NULL), fAllowedCharsSet(NULL) ,
- fAllowedLocales(NULL) {
+ fChecks(USPOOF_ALL_CHECKS), fSpoofData(nullptr), fAllowedCharsSet(nullptr) ,
+ fAllowedLocales(nullptr) {
if (U_FAILURE(status)) {
return;
}
fChecks = src.fChecks;
- if (src.fSpoofData != NULL) {
+ if (src.fSpoofData != nullptr) {
fSpoofData = src.fSpoofData->addReference();
}
fAllowedCharsSet = src.fAllowedCharsSet->clone();
fAllowedLocales = uprv_strdup(src.fAllowedLocales);
- if (fAllowedCharsSet == NULL || fAllowedLocales == NULL) {
+ if (fAllowedCharsSet == nullptr || fAllowedLocales == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
fRestrictionLevel = src.fRestrictionLevel;
}
SpoofImpl::~SpoofImpl() {
- if (fSpoofData != NULL) {
+ if (fSpoofData != nullptr) {
fSpoofData->removeReference(); // Will delete if refCount goes to zero.
}
delete fAllowedCharsSet;
@@ -110,10 +110,10 @@ USpoofChecker *SpoofImpl::asUSpoofChecker() {
const SpoofImpl *SpoofImpl::validateThis(const USpoofChecker *sc, UErrorCode &status) {
auto* This = validate(sc, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- if (This->fSpoofData != NULL && !This->fSpoofData->validateDataVersion(status)) {
- return NULL;
+ if (This->fSpoofData != nullptr && !This->fSpoofData->validateDataVersion(status)) {
+ return nullptr;
}
return This;
}
@@ -126,16 +126,16 @@ SpoofImpl *SpoofImpl::validateThis(USpoofChecker *sc, UErrorCode &status) {
void SpoofImpl::setAllowedLocales(const char *localesList, UErrorCode &status) {
UnicodeSet allowedChars;
- UnicodeSet *tmpSet = NULL;
+ UnicodeSet *tmpSet = nullptr;
const char *locStart = localesList;
- const char *locEnd = NULL;
+ const char *locEnd = nullptr;
const char *localesListEnd = localesList + uprv_strlen(localesList);
int32_t localeListCount = 0; // Number of locales provided by caller.
// Loop runs once per locale from the localesList, a comma separated list of locales.
do {
locEnd = uprv_strchr(locStart, ',');
- if (locEnd == NULL) {
+ if (locEnd == nullptr) {
locEnd = localesListEnd;
}
while (*locStart == ' ') {
@@ -167,7 +167,7 @@ void SpoofImpl::setAllowedLocales(const char *localesList, UErrorCode &status) {
uprv_free((void *)fAllowedLocales);
fAllowedLocales = uprv_strdup("");
tmpSet = new UnicodeSet(0, 0x10ffff);
- if (fAllowedLocales == NULL || tmpSet == NULL) {
+ if (fAllowedLocales == nullptr || tmpSet == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -195,7 +195,7 @@ void SpoofImpl::setAllowedLocales(const char *localesList, UErrorCode &status) {
// Store the updated spoof checker state.
tmpSet = allowedChars.clone();
const char *tmpLocalesList = uprv_strdup(localesList);
- if (tmpSet == NULL || tmpLocalesList == NULL) {
+ if (tmpSet == nullptr || tmpLocalesList == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -320,10 +320,10 @@ URestrictionLevel SpoofImpl::getRestrictionLevel(const UnicodeString& input, UEr
// Section 5.2 step 2
// Java use a static UnicodeSet for this test. In C++, avoid the static variable
// and just do a simple for loop.
- UBool allASCII = TRUE;
+ UBool allASCII = true;
for (int32_t i=0, length=input.length(); i<length; i++) {
if (input.charAt(i) > 0x7f) {
- allASCII = FALSE;
+ allASCII = false;
break;
}
}
@@ -405,11 +405,11 @@ bool SpoofImpl::isIllegalCombiningDotLeadCharacter(UChar32 cp) const {
// Convert a text format hex number. Utility function used by builder code. Static.
-// Input: UChar *string text. Output: a UChar32
+// Input: char16_t *string text. Output: a UChar32
// Input has been pre-checked, and will have no non-hex chars.
// The number must fall in the code point range of 0..0x10ffff
// Static Function.
-UChar32 SpoofImpl::ScanHex(const UChar *s, int32_t start, int32_t limit, UErrorCode &status) {
+UChar32 SpoofImpl::ScanHex(const char16_t *s, int32_t start, int32_t limit, UErrorCode &status) {
if (U_FAILURE(status)) {
return 0;
}
@@ -488,16 +488,16 @@ CheckResult::~CheckResult() {
UBool SpoofData::validateDataVersion(UErrorCode &status) const {
if (U_FAILURE(status) ||
- fRawData == NULL ||
+ fRawData == nullptr ||
fRawData->fMagic != USPOOF_MAGIC ||
fRawData->fFormatVersion[0] != USPOOF_CONFUSABLE_DATA_FORMAT_VERSION ||
fRawData->fFormatVersion[1] != 0 ||
fRawData->fFormatVersion[2] != 0 ||
fRawData->fFormatVersion[3] != 0) {
status = U_INVALID_FORMAT_ERROR;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static UBool U_CALLCONV
@@ -515,12 +515,12 @@ spoofDataIsAcceptable(void *context,
pInfo->formatVersion[0] == USPOOF_CONFUSABLE_DATA_FORMAT_VERSION
) {
UVersionInfo *version = static_cast<UVersionInfo *>(context);
- if(version != NULL) {
+ if(version != nullptr) {
uprv_memcpy(version, pInfo->dataVersion, 4);
}
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -538,18 +538,18 @@ spoofDataIsAcceptable(void *context,
// uspoof_cleanupDefaultData - Called during cleanup.
//
-static UInitOnce gSpoofInitDefaultOnce = U_INITONCE_INITIALIZER;
+static UInitOnce gSpoofInitDefaultOnce {};
static SpoofData* gDefaultSpoofData;
static UBool U_CALLCONV
-uspoof_cleanupDefaultData(void) {
+uspoof_cleanupDefaultData() {
if (gDefaultSpoofData) {
// Will delete, assuming all user-level spoof checkers were closed.
gDefaultSpoofData->removeReference();
gDefaultSpoofData = nullptr;
gSpoofInitDefaultOnce.reset();
}
- return TRUE;
+ return true;
}
static void U_CALLCONV uspoof_loadDefaultData(UErrorCode& status) {
@@ -573,7 +573,7 @@ static void U_CALLCONV uspoof_loadDefaultData(UErrorCode& status) {
SpoofData* SpoofData::getDefault(UErrorCode& status) {
umtx_initOnce(gSpoofInitDefaultOnce, &uspoof_loadDefaultData, status);
- if (U_FAILURE(status)) { return NULL; }
+ if (U_FAILURE(status)) { return nullptr; }
gDefaultSpoofData->addReference();
return gDefaultSpoofData;
}
@@ -605,7 +605,7 @@ SpoofData::SpoofData(const void *data, int32_t length, UErrorCode &status)
status = U_INVALID_FORMAT_ERROR;
return;
}
- if (data == NULL) {
+ if (data == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -636,7 +636,7 @@ SpoofData::SpoofData(UErrorCode &status) {
fRawData = static_cast<SpoofDataHeader *>(uprv_malloc(initialSize));
fMemLimit = initialSize;
- if (fRawData == NULL) {
+ if (fRawData == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -654,14 +654,14 @@ SpoofData::SpoofData(UErrorCode &status) {
// Should be updated if any new fields are added.
// Called by constructors to put things in a known initial state.
void SpoofData::reset() {
- fRawData = NULL;
- fDataOwned = FALSE;
- fUDM = NULL;
+ fRawData = nullptr;
+ fDataOwned = false;
+ fUDM = nullptr;
fMemLimit = 0;
fRefCount = 1;
- fCFUKeys = NULL;
- fCFUValues = NULL;
- fCFUStrings = NULL;
+ fCFUKeys = nullptr;
+ fCFUValues = nullptr;
+ fCFUStrings = nullptr;
}
@@ -673,7 +673,7 @@ void SpoofData::reset() {
// during the opening of a Spoof Checker from prebuilt data.
//
// The pointers for non-existent data sections (identified by an offset of 0)
-// are set to NULL.
+// are set to nullptr.
//
// Note: During building the data, adding each new data section
// reallocs the raw data area, which likely relocates it, which
@@ -681,9 +681,9 @@ void SpoofData::reset() {
// multiple calls to this function during building.
//
void SpoofData::initPtrs(UErrorCode &status) {
- fCFUKeys = NULL;
- fCFUValues = NULL;
- fCFUStrings = NULL;
+ fCFUKeys = nullptr;
+ fCFUValues = nullptr;
+ fCFUStrings = nullptr;
if (U_FAILURE(status)) {
return;
}
@@ -694,7 +694,7 @@ void SpoofData::initPtrs(UErrorCode &status) {
fCFUValues = (uint16_t *)((char *)fRawData + fRawData->fCFUStringIndex);
}
if (fRawData->fCFUStringTable != 0) {
- fCFUStrings = (UChar *)((char *)fRawData + fRawData->fCFUStringTable);
+ fCFUStrings = (char16_t *)((char *)fRawData + fRawData->fCFUStringTable);
}
}
@@ -703,11 +703,11 @@ SpoofData::~SpoofData() {
if (fDataOwned) {
uprv_free(fRawData);
}
- fRawData = NULL;
- if (fUDM != NULL) {
+ fRawData = nullptr;
+ if (fUDM != nullptr) {
udata_close(fUDM);
}
- fUDM = NULL;
+ fUDM = nullptr;
}
@@ -726,7 +726,7 @@ SpoofData *SpoofData::addReference() {
void *SpoofData::reserveSpace(int32_t numBytes, UErrorCode &status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (!fDataOwned) {
UPRV_UNREACHABLE_EXIT;
@@ -806,7 +806,7 @@ int32_t SpoofData::appendValueTo(int32_t index, UnicodeString& dest) const {
// an index into the string table (for longer strings)
uint16_t value = fCFUValues[index];
if (stringLength == 1) {
- dest.append((UChar)value);
+ dest.append((char16_t)value);
} else {
dest.append(fCFUStrings + value, stringLength);
}
@@ -828,10 +828,10 @@ U_CAPI int32_t U_EXPORT2
uspoof_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outData,
UErrorCode *status) {
- if (status == NULL || U_FAILURE(*status)) {
+ if (status == nullptr || U_FAILURE(*status)) {
return 0;
}
- if(ds==NULL || inData==NULL || length<-1 || (length>0 && outData==NULL)) {
+ if(ds==nullptr || inData==nullptr || length<-1 || (length>0 && outData==nullptr)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -945,7 +945,7 @@ uspoof_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *ou
uint32_t magic = ds->readUInt32(spoofDH->fMagic);
ds->writeUInt32((uint32_t *)&outputDH->fMagic, magic);
- if (outputDH->fFormatVersion != spoofDH->fFormatVersion) {
+ if (inBytes != outBytes) {
uprv_memcpy(outputDH->fFormatVersion, spoofDH->fFormatVersion, sizeof(spoofDH->fFormatVersion));
}
// swap starting at fLength
diff --git a/contrib/libs/icu/i18n/uspoof_impl.h b/contrib/libs/icu/i18n/uspoof_impl.h
index e75ae262bdd..3bdaf76e299 100644
--- a/contrib/libs/icu/i18n/uspoof_impl.h
+++ b/contrib/libs/icu/i18n/uspoof_impl.h
@@ -28,6 +28,7 @@
#ifdef __cplusplus
#include "capi_helper.h"
+#include "umutex.h"
U_NAMESPACE_BEGIN
@@ -90,10 +91,10 @@ public:
bool isIllegalCombiningDotLeadCharacter(UChar32 cp) const;
/** parse a hex number. Untility used by the builders. */
- static UChar32 ScanHex(const UChar *s, int32_t start, int32_t limit, UErrorCode &status);
+ static UChar32 ScanHex(const char16_t *s, int32_t start, int32_t limit, UErrorCode &status);
- static UClassID U_EXPORT2 getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const override;
+ static UClassID U_EXPORT2 getStaticClassID();
+ virtual UClassID getDynamicClassID() const override;
//
// Data Members
@@ -157,7 +158,7 @@ public:
//
// String Table:
// The strings table contains all of the value strings (those of length two or greater)
-// concatenated together into one long UChar (UTF-16) array.
+// concatenated together into one long char16_t (UTF-16) array.
//
// There is no nul character or other mark between adjacent strings.
//
@@ -276,7 +277,7 @@ class SpoofData: public UMemory {
SpoofDataHeader *fRawData; // Ptr to the raw memory-mapped data
UBool fDataOwned; // True if the raw data is owned, and needs
// to be deleted when refcount goes to zero.
- UDataMemory *fUDM; // If not NULL, our data came from a
+ UDataMemory *fUDM; // If not nullptr, our data came from a
// UDataMemory, which we must close when
// we are done.
@@ -286,7 +287,7 @@ class SpoofData: public UMemory {
// Confusable data
int32_t *fCFUKeys;
uint16_t *fCFUValues;
- UChar *fCFUStrings;
+ char16_t *fCFUStrings;
friend class ConfusabledataBuilder;
};
diff --git a/contrib/libs/icu/i18n/utf16collationiterator.cpp b/contrib/libs/icu/i18n/utf16collationiterator.cpp
index f1bdfabe738..e04721f7d7d 100644
--- a/contrib/libs/icu/i18n/utf16collationiterator.cpp
+++ b/contrib/libs/icu/i18n/utf16collationiterator.cpp
@@ -28,11 +28,11 @@
U_NAMESPACE_BEGIN
UTF16CollationIterator::UTF16CollationIterator(const UTF16CollationIterator &other,
- const UChar *newText)
+ const char16_t *newText)
: CollationIterator(other),
start(newText),
pos(newText + (other.pos - other.start)),
- limit(other.limit == NULL ? NULL : newText + (other.limit - other.start)) {
+ limit(other.limit == nullptr ? nullptr : newText + (other.limit - other.start)) {
}
UTF16CollationIterator::~UTF16CollationIterator() {}
@@ -66,21 +66,21 @@ UTF16CollationIterator::handleNextCE32(UChar32 &c, UErrorCode & /*errorCode*/) {
return UTRIE2_GET32_FROM_U16_SINGLE_LEAD(trie, c);
}
-UChar
+char16_t
UTF16CollationIterator::handleGetTrailSurrogate() {
if(pos == limit) { return 0; }
- UChar trail;
+ char16_t trail;
if(U16_IS_TRAIL(trail = *pos)) { ++pos; }
return trail;
}
UBool
UTF16CollationIterator::foundNULTerminator() {
- if(limit == NULL) {
+ if(limit == nullptr) {
limit = --pos;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -90,12 +90,12 @@ UTF16CollationIterator::nextCodePoint(UErrorCode & /*errorCode*/) {
return U_SENTINEL;
}
UChar32 c = *pos;
- if(c == 0 && limit == NULL) {
+ if(c == 0 && limit == nullptr) {
limit = pos;
return U_SENTINEL;
}
++pos;
- UChar trail;
+ char16_t trail;
if(U16_IS_LEAD(c) && pos != limit && U16_IS_TRAIL(trail = *pos)) {
++pos;
return U16_GET_SUPPLEMENTARY(c, trail);
@@ -110,7 +110,7 @@ UTF16CollationIterator::previousCodePoint(UErrorCode & /*errorCode*/) {
return U_SENTINEL;
}
UChar32 c = *--pos;
- UChar lead;
+ char16_t lead;
if(U16_IS_TRAIL(c) && pos != start && U16_IS_LEAD(lead = *(pos - 1))) {
--pos;
return U16_GET_SUPPLEMENTARY(lead, c);
@@ -123,7 +123,7 @@ void
UTF16CollationIterator::forwardNumCodePoints(int32_t num, UErrorCode & /*errorCode*/) {
while(num > 0 && pos != limit) {
UChar32 c = *pos;
- if(c == 0 && limit == NULL) {
+ if(c == 0 && limit == nullptr) {
limit = pos;
break;
}
@@ -149,19 +149,19 @@ UTF16CollationIterator::backwardNumCodePoints(int32_t num, UErrorCode & /*errorC
// FCDUTF16CollationIterator ----------------------------------------------- ***
FCDUTF16CollationIterator::FCDUTF16CollationIterator(const FCDUTF16CollationIterator &other,
- const UChar *newText)
+ const char16_t *newText)
: UTF16CollationIterator(other),
rawStart(newText),
segmentStart(newText + (other.segmentStart - other.rawStart)),
- segmentLimit(other.segmentLimit == NULL ? NULL : newText + (other.segmentLimit - other.rawStart)),
- rawLimit(other.rawLimit == NULL ? NULL : newText + (other.rawLimit - other.rawStart)),
+ segmentLimit(other.segmentLimit == nullptr ? nullptr : newText + (other.segmentLimit - other.rawStart)),
+ rawLimit(other.rawLimit == nullptr ? nullptr : newText + (other.rawLimit - other.rawStart)),
nfcImpl(other.nfcImpl),
normalized(other.normalized),
checkDir(other.checkDir) {
if(checkDir != 0 || other.start == other.segmentStart) {
start = newText + (other.start - other.rawStart);
pos = newText + (other.pos - other.rawStart);
- limit = other.limit == NULL ? NULL : newText + (other.limit - other.rawStart);
+ limit = other.limit == nullptr ? nullptr : newText + (other.limit - other.rawStart);
} else {
start = normalized.getBuffer();
pos = start + (other.pos - other.start);
@@ -239,11 +239,11 @@ FCDUTF16CollationIterator::handleNextCE32(UChar32 &c, UErrorCode &errorCode) {
UBool
FCDUTF16CollationIterator::foundNULTerminator() {
- if(limit == NULL) {
+ if(limit == nullptr) {
limit = rawLimit = --pos;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -265,7 +265,7 @@ FCDUTF16CollationIterator::nextCodePoint(UErrorCode &errorCode) {
}
c = *pos++;
}
- } else if(c == 0 && limit == NULL) {
+ } else if(c == 0 && limit == nullptr) {
limit = rawLimit = --pos;
return U_SENTINEL;
}
@@ -277,7 +277,7 @@ FCDUTF16CollationIterator::nextCodePoint(UErrorCode &errorCode) {
switchToForward();
}
}
- UChar trail;
+ char16_t trail;
if(U16_IS_LEAD(c) && pos != limit && U16_IS_TRAIL(trail = *pos)) {
++pos;
return U16_GET_SUPPLEMENTARY(c, trail);
@@ -313,7 +313,7 @@ FCDUTF16CollationIterator::previousCodePoint(UErrorCode &errorCode) {
switchToBackward();
}
}
- UChar lead;
+ char16_t lead;
if(U16_IS_TRAIL(c) && pos != start && U16_IS_LEAD(lead = *(pos - 1))) {
--pos;
return U16_GET_SUPPLEMENTARY(lead, c);
@@ -361,7 +361,7 @@ FCDUTF16CollationIterator::switchToForward() {
// Switch to checking forward from it.
pos = start = segmentStart = segmentLimit;
// Note: If this segment is at the end of the input text,
- // then it might help to return FALSE to indicate that, so that
+ // then it might help to return false to indicate that, so that
// we do not have to re-check and normalize when we turn around and go backwards.
// However, that would complicate the call sites for an optimization of an unusual case.
}
@@ -372,14 +372,14 @@ FCDUTF16CollationIterator::switchToForward() {
UBool
FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(checkDir > 0 && pos != limit);
// The input text [segmentStart..pos[ passes the FCD check.
- const UChar *p = pos;
+ const char16_t *p = pos;
uint8_t prevCC = 0;
for(;;) {
// Fetch the next character's fcd16 value.
- const UChar *q = p;
+ const char16_t *q = p;
uint16_t fcd16 = nfcImpl.nextFCD16(p, rawLimit);
uint8_t leadCC = (uint8_t)(fcd16 >> 8);
if(leadCC == 0 && q != pos) {
@@ -392,7 +392,7 @@ FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) {
do {
q = p;
} while(p != rawLimit && nfcImpl.nextFCD16(p, rawLimit) > 0xff);
- if(!normalize(pos, q, errorCode)) { return FALSE; }
+ if(!normalize(pos, q, errorCode)) { return false; }
pos = start;
break;
}
@@ -405,7 +405,7 @@ FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) {
}
U_ASSERT(pos != limit);
checkDir = 0;
- return TRUE;
+ return true;
}
void
@@ -436,14 +436,14 @@ FCDUTF16CollationIterator::switchToBackward() {
UBool
FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(checkDir < 0 && pos != start);
// The input text [pos..segmentLimit[ passes the FCD check.
- const UChar *p = pos;
+ const char16_t *p = pos;
uint8_t nextCC = 0;
for(;;) {
// Fetch the previous character's fcd16 value.
- const UChar *q = p;
+ const char16_t *q = p;
uint16_t fcd16 = nfcImpl.previousFCD16(rawStart, p);
uint8_t trailCC = (uint8_t)fcd16;
if(trailCC == 0 && q != pos) {
@@ -458,7 +458,7 @@ FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) {
q = p;
} while(fcd16 > 0xff && p != rawStart &&
(fcd16 = nfcImpl.previousFCD16(rawStart, p)) != 0);
- if(!normalize(q, pos, errorCode)) { return FALSE; }
+ if(!normalize(q, pos, errorCode)) { return false; }
pos = limit;
break;
}
@@ -471,22 +471,22 @@ FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) {
}
U_ASSERT(pos != start);
checkDir = 0;
- return TRUE;
+ return true;
}
UBool
-FCDUTF16CollationIterator::normalize(const UChar *from, const UChar *to, UErrorCode &errorCode) {
+FCDUTF16CollationIterator::normalize(const char16_t *from, const char16_t *to, UErrorCode &errorCode) {
// NFD without argument checking.
U_ASSERT(U_SUCCESS(errorCode));
nfcImpl.decompose(from, to, normalized, (int32_t)(to - from), errorCode);
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
// Switch collation processing into the FCD buffer
// with the result of normalizing [segmentStart, segmentLimit[.
segmentStart = from;
segmentLimit = to;
start = normalized.getBuffer();
limit = start + normalized.length();
- return TRUE;
+ return true;
}
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/utf16collationiterator.h b/contrib/libs/icu/i18n/utf16collationiterator.h
index 6db70511b0d..34634bf494a 100644
--- a/contrib/libs/icu/i18n/utf16collationiterator.h
+++ b/contrib/libs/icu/i18n/utf16collationiterator.h
@@ -34,11 +34,11 @@ U_NAMESPACE_BEGIN
class U_I18N_API UTF16CollationIterator : public CollationIterator {
public:
UTF16CollationIterator(const CollationData *d, UBool numeric,
- const UChar *s, const UChar *p, const UChar *lim)
+ const char16_t *s, const char16_t *p, const char16_t *lim)
: CollationIterator(d, numeric),
start(s), pos(p), limit(lim) {}
- UTF16CollationIterator(const UTF16CollationIterator &other, const UChar *newText);
+ UTF16CollationIterator(const UTF16CollationIterator &other, const char16_t *newText);
virtual ~UTF16CollationIterator();
@@ -48,7 +48,7 @@ public:
virtual int32_t getOffset() const override;
- void setText(const UChar *s, const UChar *lim) {
+ void setText(const char16_t *s, const char16_t *lim) {
reset();
start = pos = s;
limit = lim;
@@ -62,11 +62,11 @@ protected:
// Copy constructor only for subclasses which set the pointers.
UTF16CollationIterator(const UTF16CollationIterator &other)
: CollationIterator(other),
- start(NULL), pos(NULL), limit(NULL) {}
+ start(nullptr), pos(nullptr), limit(nullptr) {}
virtual uint32_t handleNextCE32(UChar32 &c, UErrorCode &errorCode) override;
- virtual UChar handleGetTrailSurrogate() override;
+ virtual char16_t handleGetTrailSurrogate() override;
virtual UBool foundNULTerminator() override;
@@ -75,8 +75,8 @@ protected:
virtual void backwardNumCodePoints(int32_t num, UErrorCode &errorCode) override;
// UTF-16 string pointers.
- // limit can be NULL for NUL-terminated strings.
- const UChar *start, *pos, *limit;
+ // limit can be nullptr for NUL-terminated strings.
+ const char16_t *start, *pos, *limit;
};
/**
@@ -85,13 +85,13 @@ protected:
class U_I18N_API FCDUTF16CollationIterator : public UTF16CollationIterator {
public:
FCDUTF16CollationIterator(const CollationData *data, UBool numeric,
- const UChar *s, const UChar *p, const UChar *lim)
+ const char16_t *s, const char16_t *p, const char16_t *lim)
: UTF16CollationIterator(data, numeric, s, p, lim),
- rawStart(s), segmentStart(p), segmentLimit(NULL), rawLimit(lim),
+ rawStart(s), segmentStart(p), segmentLimit(nullptr), rawLimit(lim),
nfcImpl(data->nfcImpl),
checkDir(1) {}
- FCDUTF16CollationIterator(const FCDUTF16CollationIterator &other, const UChar *newText);
+ FCDUTF16CollationIterator(const FCDUTF16CollationIterator &other, const char16_t *newText);
virtual ~FCDUTF16CollationIterator();
@@ -143,10 +143,10 @@ private:
*/
UBool previousSegment(UErrorCode &errorCode);
- UBool normalize(const UChar *from, const UChar *to, UErrorCode &errorCode);
+ UBool normalize(const char16_t *from, const char16_t *to, UErrorCode &errorCode);
// Text pointers: The input text is [rawStart, rawLimit[
- // where rawLimit can be NULL for NUL-terminated text.
+ // where rawLimit can be nullptr for NUL-terminated text.
//
// checkDir > 0:
//
@@ -168,11 +168,11 @@ private:
// or the current segment had to be normalized so that
// [segmentStart..segmentLimit[ turned into the normalized string,
// corresponding to normalized.getBuffer()==start<=pos<=limit==start+normalized.length().
- const UChar *rawStart;
- const UChar *segmentStart;
- const UChar *segmentLimit;
- // rawLimit==NULL for a NUL-terminated string.
- const UChar *rawLimit;
+ const char16_t *rawStart;
+ const char16_t *segmentStart;
+ const char16_t *segmentLimit;
+ // rawLimit==nullptr for a NUL-terminated string.
+ const char16_t *rawLimit;
const Normalizer2Impl &nfcImpl;
UnicodeString normalized;
diff --git a/contrib/libs/icu/i18n/utf8collationiterator.cpp b/contrib/libs/icu/i18n/utf8collationiterator.cpp
index 345b1994ef0..ea7278afc6c 100644
--- a/contrib/libs/icu/i18n/utf8collationiterator.cpp
+++ b/contrib/libs/icu/i18n/utf8collationiterator.cpp
@@ -80,15 +80,15 @@ UBool
UTF8CollationIterator::foundNULTerminator() {
if(length < 0) {
length = --pos;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
UBool
UTF8CollationIterator::forbidSurrogateCodePoints() const {
- return TRUE;
+ return true;
}
UChar32
@@ -224,7 +224,7 @@ FCDUTF8CollationIterator::nextHasLccc() const {
// The lowest code point with ccc!=0 is U+0300 which is CC 80 in UTF-8.
// CJK U+4000..U+DFFF except U+Axxx are also FCD-inert. (Lead bytes E4..ED except EA.)
UChar32 c = u8[pos];
- if(c < 0xcc || (0xe4 <= c && c <= 0xed && c != 0xea)) { return FALSE; }
+ if(c < 0xcc || (0xe4 <= c && c <= 0xed && c != 0xea)) { return false; }
int32_t i = pos;
U8_NEXT_OR_FFFD(u8, i, length, c);
if(c > 0xffff) { c = U16_LEAD(c); }
@@ -235,18 +235,18 @@ UBool
FCDUTF8CollationIterator::previousHasTccc() const {
U_ASSERT(state == CHECK_BWD && pos != 0);
UChar32 c = u8[pos - 1];
- if(U8_IS_SINGLE(c)) { return FALSE; }
+ if(U8_IS_SINGLE(c)) { return false; }
int32_t i = pos;
U8_PREV_OR_FFFD(u8, 0, i, c);
if(c > 0xffff) { c = U16_LEAD(c); }
return CollationFCD::hasTccc(c);
}
-UChar
+char16_t
FCDUTF8CollationIterator::handleGetTrailSurrogate() {
if(state != IN_NORMALIZED) { return 0; }
U_ASSERT(pos < normalized.length());
- UChar trail;
+ char16_t trail;
if(U16_IS_TRAIL(trail = normalized[pos])) { ++pos; }
return trail;
}
@@ -255,9 +255,9 @@ UBool
FCDUTF8CollationIterator::foundNULTerminator() {
if(state == CHECK_FWD && length < 0) {
length = --pos;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -383,7 +383,7 @@ FCDUTF8CollationIterator::switchToForward() {
UBool
FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(state == CHECK_FWD && pos != length);
// The input text [start..pos[ passes the FCD check.
int32_t segmentStart = pos;
@@ -414,12 +414,12 @@ FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) {
}
s.append(c);
}
- if(!normalize(s, errorCode)) { return FALSE; }
+ if(!normalize(s, errorCode)) { return false; }
start = segmentStart;
limit = pos;
state = IN_NORMALIZED;
pos = 0;
- return TRUE;
+ return true;
}
prevCC = (uint8_t)fcd16;
if(pos == length || prevCC == 0) {
@@ -431,7 +431,7 @@ FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) {
pos = segmentStart;
U_ASSERT(pos != limit);
state = IN_FCD_SEGMENT;
- return TRUE;
+ return true;
}
void
@@ -462,7 +462,7 @@ FCDUTF8CollationIterator::switchToBackward() {
UBool
FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) {
- if(U_FAILURE(errorCode)) { return FALSE; }
+ if(U_FAILURE(errorCode)) { return false; }
U_ASSERT(state == CHECK_BWD && pos != 0);
// The input text [pos..limit[ passes the FCD check.
int32_t segmentLimit = pos;
@@ -496,12 +496,12 @@ FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) {
s.append(c);
}
s.reverse();
- if(!normalize(s, errorCode)) { return FALSE; }
+ if(!normalize(s, errorCode)) { return false; }
limit = segmentLimit;
start = pos;
state = IN_NORMALIZED;
pos = normalized.length();
- return TRUE;
+ return true;
}
nextCC = (uint8_t)(fcd16 >> 8);
if(pos == 0 || nextCC == 0) {
@@ -513,7 +513,7 @@ FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) {
pos = segmentLimit;
U_ASSERT(pos != start);
state = IN_FCD_SEGMENT;
- return TRUE;
+ return true;
}
UBool
diff --git a/contrib/libs/icu/i18n/utf8collationiterator.h b/contrib/libs/icu/i18n/utf8collationiterator.h
index 09cfce4369f..13ca87846bc 100644
--- a/contrib/libs/icu/i18n/utf8collationiterator.h
+++ b/contrib/libs/icu/i18n/utf8collationiterator.h
@@ -98,7 +98,7 @@ public:
protected:
virtual uint32_t handleNextCE32(UChar32 &c, UErrorCode &errorCode) override;
- virtual UChar handleGetTrailSurrogate() override;
+ virtual char16_t handleGetTrailSurrogate() override;
virtual UBool foundNULTerminator() override;
diff --git a/contrib/libs/icu/i18n/utmscale.cpp b/contrib/libs/icu/i18n/utmscale.cpp
index 7bf6eec331a..61df43e7782 100644
--- a/contrib/libs/icu/i18n/utmscale.cpp
+++ b/contrib/libs/icu/i18n/utmscale.cpp
@@ -39,7 +39,7 @@ static const int64_t timeScaleTable[UDTS_MAX_SCALE][UTSV_MAX_SCALE_VALUE] = {
U_CAPI int64_t U_EXPORT2
utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status)
{
- if (status == NULL || U_FAILURE(*status)) {
+ if (status == nullptr || U_FAILURE(*status)) {
return 0;
}
@@ -54,11 +54,10 @@ utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErr
}
U_CAPI int64_t U_EXPORT2
-utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status)
-{
+utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status) UPRV_NO_SANITIZE_UNDEFINED {
const int64_t *data;
- if (status == NULL || U_FAILURE(*status)) {
+ if (status == nullptr || U_FAILURE(*status)) {
return 0;
}
@@ -78,11 +77,10 @@ utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *stat
}
U_CAPI int64_t U_EXPORT2
-utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status)
-{
+utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status) UPRV_NO_SANITIZE_UNDEFINED {
const int64_t *data;
- if (status == NULL || U_FAILURE(*status)) {
+ if (status == nullptr || U_FAILURE(*status)) {
return 0;
}
diff --git a/contrib/libs/icu/i18n/utrans.cpp b/contrib/libs/icu/i18n/utrans.cpp
index 1cbba81d658..390335f3342 100644
--- a/contrib/libs/icu/i18n/utrans.cpp
+++ b/contrib/libs/icu/i18n/utrans.cpp
@@ -28,7 +28,7 @@
#include "rbt.h"
// Following macro is to be followed by <return value>';' or just ';'
-#define utrans_ENTRY(s) if ((s)==NULL || U_FAILURE(*(s))) return
+#define utrans_ENTRY(s) if ((s)==nullptr || U_FAILURE(*(s))) return
/********************************************************************
* Replaceable-UReplaceableCallbacks glue
@@ -60,7 +60,7 @@ public:
virtual void copy(int32_t start, int32_t limit, int32_t dest) override;
- // virtual Replaceable *clone() const { return NULL; } same as default
+ // virtual Replaceable *clone() const { return nullptr; } same as default
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
@@ -80,7 +80,7 @@ protected:
virtual int32_t getLength() const override;
- virtual UChar getCharAt(int32_t offset) const override;
+ virtual char16_t getCharAt(int32_t offset) const override;
virtual UChar32 getChar32At(int32_t offset) const override;
};
@@ -101,7 +101,7 @@ int32_t ReplaceableGlue::getLength() const {
return (*func->length)(rep);
}
-UChar ReplaceableGlue::getCharAt(int32_t offset) const {
+char16_t ReplaceableGlue::getCharAt(int32_t offset) const {
return (*func->charAt)(rep, offset);
}
@@ -132,36 +132,36 @@ U_NAMESPACE_END
U_NAMESPACE_USE
U_CAPI UTransliterator* U_EXPORT2
-utrans_openU(const UChar *id,
+utrans_openU(const char16_t *id,
int32_t idLength,
UTransDirection dir,
- const UChar *rules,
+ const char16_t *rules,
int32_t rulesLength,
UParseError *parseError,
UErrorCode *status) {
- if(status==NULL || U_FAILURE(*status)) {
- return NULL;
+ if(status==nullptr || U_FAILURE(*status)) {
+ return nullptr;
}
- if (id == NULL) {
+ if (id == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
UParseError temp;
- if(parseError == NULL){
+ if(parseError == nullptr){
parseError = &temp;
}
UnicodeString ID(idLength<0, id, idLength); // r-o alias
- if(rules==NULL){
+ if(rules==nullptr){
- Transliterator *trans = NULL;
+ Transliterator *trans = nullptr;
trans = Transliterator::createInstance(ID, dir, *parseError, *status);
if(U_FAILURE(*status)){
- return NULL;
+ return nullptr;
}
return (UTransliterator*) trans;
}else{
@@ -169,10 +169,10 @@ utrans_openU(const UChar *id,
rules,
rulesLength); // r-o alias
- Transliterator *trans = NULL;
+ Transliterator *trans = nullptr;
trans = Transliterator::createFromRules(ID, ruleStr, dir, *parseError, *status);
if(U_FAILURE(*status)) {
- return NULL;
+ return nullptr;
}
return (UTransliterator*) trans;
@@ -182,7 +182,7 @@ utrans_openU(const UChar *id,
U_CAPI UTransliterator* U_EXPORT2
utrans_open(const char* id,
UTransDirection dir,
- const UChar* rules, /* may be Null */
+ const char16_t* rules, /* may be Null */
int32_t rulesLength, /* -1 if null-terminated */
UParseError* parseError, /* may be Null */
UErrorCode* status) {
@@ -196,7 +196,7 @@ U_CAPI UTransliterator* U_EXPORT2
utrans_openInverse(const UTransliterator* trans,
UErrorCode* status) {
- utrans_ENTRY(status) NULL;
+ utrans_ENTRY(status) nullptr;
UTransliterator* result =
(UTransliterator*) ((Transliterator*) trans)->createInverse(*status);
@@ -208,15 +208,15 @@ U_CAPI UTransliterator* U_EXPORT2
utrans_clone(const UTransliterator* trans,
UErrorCode* status) {
- utrans_ENTRY(status) NULL;
+ utrans_ENTRY(status) nullptr;
- if (trans == NULL) {
+ if (trans == nullptr) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
Transliterator *t = ((Transliterator*) trans)->clone();
- if (t == NULL) {
+ if (t == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
}
return (UTransliterator*) t;
@@ -227,12 +227,12 @@ utrans_close(UTransliterator* trans) {
delete (Transliterator*) trans;
}
-U_CAPI const UChar * U_EXPORT2
+U_CAPI const char16_t * U_EXPORT2
utrans_getUnicodeID(const UTransliterator *trans,
int32_t *resultLength) {
// Transliterator keeps its ID NUL-terminated
const UnicodeString &ID=((Transliterator*) trans)->getID();
- if(resultLength!=NULL) {
+ if(resultLength!=nullptr) {
*resultLength=ID.length();
}
return ID.getBuffer();
@@ -254,7 +254,7 @@ utrans_register(UTransliterator* adoptedTrans,
}
U_CAPI void U_EXPORT2
-utrans_unregisterID(const UChar* id, int32_t idLength) {
+utrans_unregisterID(const char16_t* id, int32_t idLength) {
UnicodeString ID(idLength<0, id, idLength); // r-o alias
Transliterator::unregister(ID);
}
@@ -267,37 +267,37 @@ utrans_unregister(const char* id) {
U_CAPI void U_EXPORT2
utrans_setFilter(UTransliterator* trans,
- const UChar* filterPattern,
+ const char16_t* filterPattern,
int32_t filterPatternLen,
UErrorCode* status) {
utrans_ENTRY(status);
- UnicodeFilter* filter = NULL;
- if (filterPattern != NULL && *filterPattern != 0) {
+ UnicodeFilter* filter = nullptr;
+ if (filterPattern != nullptr && *filterPattern != 0) {
// Create read only alias of filterPattern:
UnicodeString pat(filterPatternLen < 0, filterPattern, filterPatternLen);
filter = new UnicodeSet(pat, *status);
- /* test for NULL */
- if (filter == NULL) {
+ /* test for nullptr */
+ if (filter == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
return;
}
if (U_FAILURE(*status)) {
delete filter;
- filter = NULL;
+ filter = nullptr;
}
}
((Transliterator*) trans)->adoptFilter(filter);
}
U_CAPI int32_t U_EXPORT2
-utrans_countAvailableIDs(void) {
+utrans_countAvailableIDs() {
return Transliterator::countAvailableIDs();
}
U_CAPI int32_t U_EXPORT2
utrans_getAvailableID(int32_t index,
- char* buf, // may be NULL
+ char* buf, // may be nullptr
int32_t bufCapacity) {
return Transliterator::getAvailableID(index).extract(0, 0x7fffffff, buf, bufCapacity, US_INV);
}
@@ -312,17 +312,17 @@ typedef struct UTransEnumeration {
U_CDECL_BEGIN
static int32_t U_CALLCONV
utrans_enum_count(UEnumeration *uenum, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
return ((UTransEnumeration *)uenum)->count;
}
-static const UChar* U_CALLCONV
+static const char16_t* U_CALLCONV
utrans_enum_unext(UEnumeration *uenum,
int32_t* resultLength,
UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return 0;
}
@@ -331,22 +331,22 @@ utrans_enum_unext(UEnumeration *uenum,
if(index<ute->count) {
const UnicodeString &ID=Transliterator::getAvailableID(index);
ute->index=index+1;
- if(resultLength!=NULL) {
+ if(resultLength!=nullptr) {
*resultLength=ID.length();
}
// Transliterator keeps its ID NUL-terminated
return ID.getBuffer();
}
- if(resultLength!=NULL) {
+ if(resultLength!=nullptr) {
*resultLength=0;
}
- return NULL;
+ return nullptr;
}
static void U_CALLCONV
utrans_enum_reset(UEnumeration *uenum, UErrorCode *pErrorCode) {
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
return;
}
@@ -362,8 +362,8 @@ utrans_enum_close(UEnumeration *uenum) {
U_CDECL_END
static const UEnumeration utransEnumeration={
- NULL,
- NULL,
+ nullptr,
+ nullptr,
utrans_enum_close,
utrans_enum_count,
utrans_enum_unext,
@@ -375,14 +375,14 @@ U_CAPI UEnumeration * U_EXPORT2
utrans_openIDs(UErrorCode *pErrorCode) {
UTransEnumeration *ute;
- if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
- return NULL;
+ if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
+ return nullptr;
}
ute=(UTransEnumeration *)uprv_malloc(sizeof(UTransEnumeration));
- if(ute==NULL) {
+ if(ute==nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
ute->uenum=utransEnumeration;
@@ -436,7 +436,7 @@ utrans_transIncremental(const UTransliterator* trans,
U_CAPI void U_EXPORT2
utrans_transUChars(const UTransliterator* trans,
- UChar* text,
+ char16_t* text,
int32_t* textLength,
int32_t textCapacity,
int32_t start,
@@ -450,7 +450,7 @@ utrans_transUChars(const UTransliterator* trans,
return;
}
- int32_t textLen = (textLength == NULL || *textLength < 0)
+ int32_t textLen = (textLength == nullptr || *textLength < 0)
? u_strlen(text) : *textLength;
// writeable alias: for this ct, len CANNOT be -1 (why?)
UnicodeString str(text, textLen, textCapacity);
@@ -458,16 +458,16 @@ utrans_transUChars(const UTransliterator* trans,
*limit = ((Transliterator*) trans)->transliterate(str, start, *limit);
// Copy the string buffer back to text (only if necessary)
- // and fill in *neededCapacity (if neededCapacity != NULL).
+ // and fill in *neededCapacity (if neededCapacity != nullptr).
textLen = str.extract(text, textCapacity, *status);
- if(textLength != NULL) {
+ if(textLength != nullptr) {
*textLength = textLen;
}
}
U_CAPI void U_EXPORT2
utrans_transIncrementalUChars(const UTransliterator* trans,
- UChar* text,
+ char16_t* text,
int32_t* textLength,
int32_t textCapacity,
UTransPosition* pos,
@@ -480,7 +480,7 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
return;
}
- int32_t textLen = (textLength == NULL || *textLength < 0)
+ int32_t textLen = (textLength == nullptr || *textLength < 0)
? u_strlen(text) : *textLength;
// writeable alias: for this ct, len CANNOT be -1 (why?)
UnicodeString str(text, textLen, textCapacity);
@@ -488,9 +488,9 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
((Transliterator*) trans)->transliterate(str, *pos, *status);
// Copy the string buffer back to text (only if necessary)
- // and fill in *neededCapacity (if neededCapacity != NULL).
+ // and fill in *neededCapacity (if neededCapacity != nullptr).
textLen = str.extract(text, textCapacity, *status);
- if(textLength != NULL) {
+ if(textLength != nullptr) {
*textLength = textLen;
}
}
@@ -498,10 +498,10 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
U_CAPI int32_t U_EXPORT2
utrans_toRules( const UTransliterator* trans,
UBool escapeUnprintable,
- UChar* result, int32_t resultLength,
+ char16_t* result, int32_t resultLength,
UErrorCode* status) {
utrans_ENTRY(status) 0;
- if ( (result==NULL)? resultLength!=0: resultLength<0 ) {
+ if ( (result==nullptr)? resultLength!=0: resultLength<0 ) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -519,7 +519,7 @@ utrans_getSourceSet(const UTransliterator* trans,
UErrorCode* status) {
utrans_ENTRY(status) fillIn;
- if (fillIn == NULL) {
+ if (fillIn == nullptr) {
fillIn = uset_openEmpty();
}
if (ignoreFilter) {
diff --git a/contrib/libs/icu/i18n/vtzone.cpp b/contrib/libs/icu/i18n/vtzone.cpp
index 9111e08848f..25af556aa22 100644
--- a/contrib/libs/icu/i18n/vtzone.cpp
+++ b/contrib/libs/icu/i18n/vtzone.cpp
@@ -24,50 +24,42 @@
U_NAMESPACE_BEGIN
-// This is the deleter that will be use to remove TimeZoneRule
-U_CDECL_BEGIN
-static void U_CALLCONV
-deleteTimeZoneRule(void* obj) {
- delete (TimeZoneRule*) obj;
-}
-U_CDECL_END
-
// Smybol characters used by RFC2445 VTIMEZONE
-static const UChar COLON = 0x3A; /* : */
-static const UChar SEMICOLON = 0x3B; /* ; */
-static const UChar EQUALS_SIGN = 0x3D; /* = */
-static const UChar COMMA = 0x2C; /* , */
-static const UChar PLUS = 0x2B; /* + */
-static const UChar MINUS = 0x2D; /* - */
+static const char16_t COLON = 0x3A; /* : */
+static const char16_t SEMICOLON = 0x3B; /* ; */
+static const char16_t EQUALS_SIGN = 0x3D; /* = */
+static const char16_t COMMA = 0x2C; /* , */
+static const char16_t PLUS = 0x2B; /* + */
+static const char16_t MINUS = 0x2D; /* - */
// RFC2445 VTIMEZONE tokens
-static const UChar ICAL_BEGIN_VTIMEZONE[] = {0x42, 0x45, 0x47, 0x49, 0x4E, 0x3A, 0x56, 0x54, 0x49, 0x4D, 0x45, 0x5A, 0x4F, 0x4E, 0x45, 0}; /* "BEGIN:VTIMEZONE" */
-static const UChar ICAL_END_VTIMEZONE[] = {0x45, 0x4E, 0x44, 0x3A, 0x56, 0x54, 0x49, 0x4D, 0x45, 0x5A, 0x4F, 0x4E, 0x45, 0}; /* "END:VTIMEZONE" */
-static const UChar ICAL_BEGIN[] = {0x42, 0x45, 0x47, 0x49, 0x4E, 0}; /* "BEGIN" */
-static const UChar ICAL_END[] = {0x45, 0x4E, 0x44, 0}; /* "END" */
-static const UChar ICAL_VTIMEZONE[] = {0x56, 0x54, 0x49, 0x4D, 0x45, 0x5A, 0x4F, 0x4E, 0x45, 0}; /* "VTIMEZONE" */
-static const UChar ICAL_TZID[] = {0x54, 0x5A, 0x49, 0x44, 0}; /* "TZID" */
-static const UChar ICAL_STANDARD[] = {0x53, 0x54, 0x41, 0x4E, 0x44, 0x41, 0x52, 0x44, 0}; /* "STANDARD" */
-static const UChar ICAL_DAYLIGHT[] = {0x44, 0x41, 0x59, 0x4C, 0x49, 0x47, 0x48, 0x54, 0}; /* "DAYLIGHT" */
-static const UChar ICAL_DTSTART[] = {0x44, 0x54, 0x53, 0x54, 0x41, 0x52, 0x54, 0}; /* "DTSTART" */
-static const UChar ICAL_TZOFFSETFROM[] = {0x54, 0x5A, 0x4F, 0x46, 0x46, 0x53, 0x45, 0x54, 0x46, 0x52, 0x4F, 0x4D, 0}; /* "TZOFFSETFROM" */
-static const UChar ICAL_TZOFFSETTO[] = {0x54, 0x5A, 0x4F, 0x46, 0x46, 0x53, 0x45, 0x54, 0x54, 0x4F, 0}; /* "TZOFFSETTO" */
-static const UChar ICAL_RDATE[] = {0x52, 0x44, 0x41, 0x54, 0x45, 0}; /* "RDATE" */
-static const UChar ICAL_RRULE[] = {0x52, 0x52, 0x55, 0x4C, 0x45, 0}; /* "RRULE" */
-static const UChar ICAL_TZNAME[] = {0x54, 0x5A, 0x4E, 0x41, 0x4D, 0x45, 0}; /* "TZNAME" */
-static const UChar ICAL_TZURL[] = {0x54, 0x5A, 0x55, 0x52, 0x4C, 0}; /* "TZURL" */
-static const UChar ICAL_LASTMOD[] = {0x4C, 0x41, 0x53, 0x54, 0x2D, 0x4D, 0x4F, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0}; /* "LAST-MODIFIED" */
-
-static const UChar ICAL_FREQ[] = {0x46, 0x52, 0x45, 0x51, 0}; /* "FREQ" */
-static const UChar ICAL_UNTIL[] = {0x55, 0x4E, 0x54, 0x49, 0x4C, 0}; /* "UNTIL" */
-static const UChar ICAL_YEARLY[] = {0x59, 0x45, 0x41, 0x52, 0x4C, 0x59, 0}; /* "YEARLY" */
-static const UChar ICAL_BYMONTH[] = {0x42, 0x59, 0x4D, 0x4F, 0x4E, 0x54, 0x48, 0}; /* "BYMONTH" */
-static const UChar ICAL_BYDAY[] = {0x42, 0x59, 0x44, 0x41, 0x59, 0}; /* "BYDAY" */
-static const UChar ICAL_BYMONTHDAY[] = {0x42, 0x59, 0x4D, 0x4F, 0x4E, 0x54, 0x48, 0x44, 0x41, 0x59, 0}; /* "BYMONTHDAY" */
-
-static const UChar ICAL_NEWLINE[] = {0x0D, 0x0A, 0}; /* CRLF */
-
-static const UChar ICAL_DOW_NAMES[7][3] = {
+static const char16_t ICAL_BEGIN_VTIMEZONE[] = {0x42, 0x45, 0x47, 0x49, 0x4E, 0x3A, 0x56, 0x54, 0x49, 0x4D, 0x45, 0x5A, 0x4F, 0x4E, 0x45, 0}; /* "BEGIN:VTIMEZONE" */
+static const char16_t ICAL_END_VTIMEZONE[] = {0x45, 0x4E, 0x44, 0x3A, 0x56, 0x54, 0x49, 0x4D, 0x45, 0x5A, 0x4F, 0x4E, 0x45, 0}; /* "END:VTIMEZONE" */
+static const char16_t ICAL_BEGIN[] = {0x42, 0x45, 0x47, 0x49, 0x4E, 0}; /* "BEGIN" */
+static const char16_t ICAL_END[] = {0x45, 0x4E, 0x44, 0}; /* "END" */
+static const char16_t ICAL_VTIMEZONE[] = {0x56, 0x54, 0x49, 0x4D, 0x45, 0x5A, 0x4F, 0x4E, 0x45, 0}; /* "VTIMEZONE" */
+static const char16_t ICAL_TZID[] = {0x54, 0x5A, 0x49, 0x44, 0}; /* "TZID" */
+static const char16_t ICAL_STANDARD[] = {0x53, 0x54, 0x41, 0x4E, 0x44, 0x41, 0x52, 0x44, 0}; /* "STANDARD" */
+static const char16_t ICAL_DAYLIGHT[] = {0x44, 0x41, 0x59, 0x4C, 0x49, 0x47, 0x48, 0x54, 0}; /* "DAYLIGHT" */
+static const char16_t ICAL_DTSTART[] = {0x44, 0x54, 0x53, 0x54, 0x41, 0x52, 0x54, 0}; /* "DTSTART" */
+static const char16_t ICAL_TZOFFSETFROM[] = {0x54, 0x5A, 0x4F, 0x46, 0x46, 0x53, 0x45, 0x54, 0x46, 0x52, 0x4F, 0x4D, 0}; /* "TZOFFSETFROM" */
+static const char16_t ICAL_TZOFFSETTO[] = {0x54, 0x5A, 0x4F, 0x46, 0x46, 0x53, 0x45, 0x54, 0x54, 0x4F, 0}; /* "TZOFFSETTO" */
+static const char16_t ICAL_RDATE[] = {0x52, 0x44, 0x41, 0x54, 0x45, 0}; /* "RDATE" */
+static const char16_t ICAL_RRULE[] = {0x52, 0x52, 0x55, 0x4C, 0x45, 0}; /* "RRULE" */
+static const char16_t ICAL_TZNAME[] = {0x54, 0x5A, 0x4E, 0x41, 0x4D, 0x45, 0}; /* "TZNAME" */
+static const char16_t ICAL_TZURL[] = {0x54, 0x5A, 0x55, 0x52, 0x4C, 0}; /* "TZURL" */
+static const char16_t ICAL_LASTMOD[] = {0x4C, 0x41, 0x53, 0x54, 0x2D, 0x4D, 0x4F, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0}; /* "LAST-MODIFIED" */
+
+static const char16_t ICAL_FREQ[] = {0x46, 0x52, 0x45, 0x51, 0}; /* "FREQ" */
+static const char16_t ICAL_UNTIL[] = {0x55, 0x4E, 0x54, 0x49, 0x4C, 0}; /* "UNTIL" */
+static const char16_t ICAL_YEARLY[] = {0x59, 0x45, 0x41, 0x52, 0x4C, 0x59, 0}; /* "YEARLY" */
+static const char16_t ICAL_BYMONTH[] = {0x42, 0x59, 0x4D, 0x4F, 0x4E, 0x54, 0x48, 0}; /* "BYMONTH" */
+static const char16_t ICAL_BYDAY[] = {0x42, 0x59, 0x44, 0x41, 0x59, 0}; /* "BYDAY" */
+static const char16_t ICAL_BYMONTHDAY[] = {0x42, 0x59, 0x4D, 0x4F, 0x4E, 0x54, 0x48, 0x44, 0x41, 0x59, 0}; /* "BYMONTHDAY" */
+
+static const char16_t ICAL_NEWLINE[] = {0x0D, 0x0A, 0}; /* CRLF */
+
+static const char16_t ICAL_DOW_NAMES[7][3] = {
{0x53, 0x55, 0}, /* "SU" */
{0x4D, 0x4F, 0}, /* "MO" */
{0x54, 0x55, 0}, /* "TU" */
@@ -80,9 +72,9 @@ static const UChar ICAL_DOW_NAMES[7][3] = {
static const int32_t MONTHLENGTH[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
// ICU custom property
-static const UChar ICU_TZINFO_PROP[] = {0x58, 0x2D, 0x54, 0x5A, 0x49, 0x4E, 0x46, 0x4F, 0x3A, 0}; /* "X-TZINFO:" */
-static const UChar ICU_TZINFO_PARTIAL[] = {0x2F, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6C, 0x40, 0}; /* "/Partial@" */
-static const UChar ICU_TZINFO_SIMPLE[] = {0x2F, 0x53, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x40, 0}; /* "/Simple@" */
+static const char16_t ICU_TZINFO_PROP[] = {0x58, 0x2D, 0x54, 0x5A, 0x49, 0x4E, 0x46, 0x4F, 0x3A, 0}; /* "X-TZINFO:" */
+static const char16_t ICU_TZINFO_PARTIAL[] = {0x2F, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6C, 0x40, 0}; /* "/Partial@" */
+static const char16_t ICU_TZINFO_SIMPLE[] = {0x2F, 0x53, 0x69, 0x6D, 0x70, 0x6C, 0x65, 0x40, 0}; /* "/Simple@" */
/*
@@ -118,12 +110,12 @@ static int32_t parseAsciiDigits(const UnicodeString& str, int32_t start, int32_t
}
static UnicodeString& appendAsciiDigits(int32_t number, uint8_t length, UnicodeString& str) {
- UBool negative = FALSE;
+ UBool negative = false;
int32_t digits[10]; // max int32_t is 10 decimal digits
int32_t i;
if (number < 0) {
- negative = TRUE;
+ negative = true;
number *= -1;
}
@@ -147,13 +139,13 @@ static UnicodeString& appendAsciiDigits(int32_t number, uint8_t length, UnicodeS
str.append(MINUS);
}
for (i = length - 1; i >= 0; i--) {
- str.append((UChar)(digits[i] + 0x0030));
+ str.append((char16_t)(digits[i] + 0x0030));
}
return str;
}
static UnicodeString& appendMillis(UDate date, UnicodeString& str) {
- UBool negative = FALSE;
+ UBool negative = false;
int32_t digits[20]; // max int64_t is 20 decimal digits
int32_t i;
int64_t number;
@@ -166,7 +158,7 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) {
number = (int64_t)date;
}
if (number < 0) {
- negative = TRUE;
+ negative = true;
number *= -1;
}
i = 0;
@@ -180,7 +172,7 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) {
}
i--;
while (i >= 0) {
- str.append((UChar)(digits[i--] + 0x0030));
+ str.append((char16_t)(digits[i--] + 0x0030));
}
return str;
}
@@ -196,7 +188,7 @@ static UnicodeString& getDateTimeString(UDate time, UnicodeString& str) {
appendAsciiDigits(year, 4, str);
appendAsciiDigits(month + 1, 2, str);
appendAsciiDigits(dom, 2, str);
- str.append((UChar)0x0054 /*'T'*/);
+ str.append((char16_t)0x0054 /*'T'*/);
int32_t t = mid;
int32_t hour = t / U_MILLIS_PER_HOUR;
@@ -216,7 +208,7 @@ static UnicodeString& getDateTimeString(UDate time, UnicodeString& str) {
*/
static UnicodeString& getUTCDateTimeString(UDate time, UnicodeString& str) {
getDateTimeString(time, str);
- str.append((UChar)0x005A /*'Z'*/);
+ str.append((char16_t)0x005A /*'Z'*/);
return str;
}
@@ -230,8 +222,8 @@ static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErro
}
int32_t year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
- UBool isUTC = FALSE;
- UBool isValid = FALSE;
+ UBool isUTC = false;
+ UBool isValid = false;
do {
int length = str.length();
if (length != 15 && length != 16) {
@@ -248,7 +240,7 @@ static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErro
// invalid format
break;
}
- isUTC = TRUE;
+ isUTC = true;
}
year = parseAsciiDigits(str, 0, 4, status);
@@ -269,7 +261,7 @@ static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErro
break;
}
- isValid = TRUE;
+ isValid = true;
} while(false);
if (!isValid) {
@@ -293,7 +285,7 @@ static int32_t offsetStrToMillis(const UnicodeString& str, UErrorCode& status) {
return 0;
}
- UBool isValid = FALSE;
+ UBool isValid = false;
int32_t sign = 0, hour = 0, min = 0, sec = 0;
do {
@@ -303,7 +295,7 @@ static int32_t offsetStrToMillis(const UnicodeString& str, UErrorCode& status) {
break;
}
// sign
- UChar s = str.charAt(0);
+ char16_t s = str.charAt(0);
if (s == PLUS) {
sign = 1;
} else if (s == MINUS) {
@@ -391,19 +383,19 @@ static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow,
wim = 0;
until = MIN_MILLIS;
- UBool yearly = FALSE;
- //UBool parseError = FALSE;
+ UBool yearly = false;
+ //UBool parseError = false;
int32_t prop_start = 0;
int32_t prop_end;
UnicodeString prop, attr, value;
- UBool nextProp = TRUE;
+ UBool nextProp = true;
while (nextProp) {
prop_end = rrule.indexOf(SEMICOLON, prop_start);
if (prop_end == -1) {
prop.setTo(rrule, prop_start);
- nextProp = FALSE;
+ nextProp = false;
} else {
prop.setTo(rrule, prop_start, prop_end - prop_start);
prop_start = prop_end + 1;
@@ -419,7 +411,7 @@ static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow,
if (attr.compare(ICAL_FREQ, -1) == 0) {
// only support YEARLY frequency type
if (value.compare(ICAL_YEARLY, -1) == 0) {
- yearly = TRUE;
+ yearly = true;
} else {
goto rruleParseError;
}
@@ -486,12 +478,12 @@ static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow,
int32_t dom_idx = 0;
int32_t dom_start = 0;
int32_t dom_end;
- UBool nextDOM = TRUE;
+ UBool nextDOM = true;
while (nextDOM) {
dom_end = value.indexOf(COMMA, dom_start);
if (dom_end == -1) {
dom_end = value.length();
- nextDOM = FALSE;
+ nextDOM = false;
}
if (dom_idx < domCount) {
dom[dom_idx] = parseAsciiDigits(value, dom_start, dom_end - dom_start, status);
@@ -571,10 +563,10 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff
}
// Make sure days are continuous
for (i = 1; i < 7; i++) {
- UBool found = FALSE;
+ UBool found = false;
for (j = 0; j < 7; j++) {
if (days[j] == firstDay + i) {
- found = TRUE;
+ found = true;
break;
}
}
@@ -711,7 +703,7 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff
} else if (dayOfWeek != 0 && nthDayOfWeek == 0 && dayOfMonth != 0) {
// First day of week after day of month rule, for example,
// first Sunday after 15th day in the month
- adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, TRUE, startMID, DateTimeRule::WALL_TIME);
+ adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, true, startMID, DateTimeRule::WALL_TIME);
}
if (adtr == nullptr) {
goto unsupportedRRule;
@@ -767,36 +759,36 @@ static TimeZoneRule* createRuleByRDATE(const UnicodeString& zonename, int32_t ra
*/
static UBool isEquivalentDateRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, const DateTimeRule *dtrule) {
if (month != dtrule->getRuleMonth() || dayOfWeek != dtrule->getRuleDayOfWeek()) {
- return FALSE;
+ return false;
}
if (dtrule->getTimeRuleType() != DateTimeRule::WALL_TIME) {
// Do not try to do more intelligent comparison for now.
- return FALSE;
+ return false;
}
if (dtrule->getDateRuleType() == DateTimeRule::DOW
&& dtrule->getRuleWeekInMonth() == weekInMonth) {
- return TRUE;
+ return true;
}
int32_t ruleDOM = dtrule->getRuleDayOfMonth();
if (dtrule->getDateRuleType() == DateTimeRule::DOW_GEQ_DOM) {
if (ruleDOM%7 == 1 && (ruleDOM + 6)/7 == weekInMonth) {
- return TRUE;
+ return true;
}
if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
&& weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
- return TRUE;
+ return true;
}
}
if (dtrule->getDateRuleType() == DateTimeRule::DOW_LEQ_DOM) {
if (ruleDOM%7 == 0 && ruleDOM/7 == weekInMonth) {
- return TRUE;
+ return true;
}
if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
&& weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*
@@ -893,9 +885,9 @@ public:
~VTZWriter();
void write(const UnicodeString& str);
- void write(UChar ch);
- void write(const UChar* str);
- //void write(const UChar* str, int32_t length);
+ void write(char16_t ch);
+ void write(const char16_t* str);
+ //void write(const char16_t* str, int32_t length);
private:
UnicodeString* out;
};
@@ -913,18 +905,18 @@ VTZWriter::write(const UnicodeString& str) {
}
void
-VTZWriter::write(UChar ch) {
+VTZWriter::write(char16_t ch) {
out->append(ch);
}
void
-VTZWriter::write(const UChar* str) {
+VTZWriter::write(const char16_t* str) {
out->append(str, -1);
}
/*
void
-VTZWriter::write(const UChar* str, int32_t length) {
+VTZWriter::write(const char16_t* str, int32_t length) {
out->append(str, length);
}
*/
@@ -934,7 +926,7 @@ public:
VTZReader(const UnicodeString& input);
~VTZReader();
- UChar read(void);
+ char16_t read();
private:
const UnicodeString* in;
int32_t index;
@@ -948,9 +940,9 @@ VTZReader::VTZReader(const UnicodeString& input) {
VTZReader::~VTZReader() {
}
-UChar
-VTZReader::read(void) {
- UChar ch = 0xFFFF;
+char16_t
+VTZReader::read() {
+ char16_t ch = 0xFFFF;
if (index < in->length()) {
ch = in->charAt(index);
}
@@ -976,22 +968,19 @@ VTimeZone::VTimeZone(const VTimeZone& source)
if (source.vtzlines != nullptr) {
UErrorCode status = U_ZERO_ERROR;
int32_t size = source.vtzlines->size();
- vtzlines = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, size, status);
- if (vtzlines == nullptr) {
+ LocalPointer<UVector> lpVtzLines(
+ new UVector(uprv_deleteUObject, uhash_compareUnicodeString, size, status), status);
+ if (U_FAILURE(status)) {
return;
}
- if (U_SUCCESS(status)) {
- for (int32_t i = 0; i < size; i++) {
- UnicodeString *line = (UnicodeString*)source.vtzlines->elementAt(i);
- vtzlines->addElementX(line->clone(), status);
- if (U_FAILURE(status)) {
- break;
- }
+ for (int32_t i = 0; i < size; i++) {
+ UnicodeString *line = ((UnicodeString*)source.vtzlines->elementAt(i))->clone();
+ lpVtzLines->adoptElement(line, status);
+ if (U_FAILURE(status) || line == nullptr) {
+ return;
}
}
- if (U_FAILURE(status) && vtzlines != nullptr) {
- delete vtzlines;
- }
+ vtzlines = lpVtzLines.orphan();
}
}
@@ -1020,23 +1009,25 @@ VTimeZone::operator=(const VTimeZone& right) {
}
if (vtzlines != nullptr) {
delete vtzlines;
+ vtzlines = nullptr;
}
if (right.vtzlines != nullptr) {
UErrorCode status = U_ZERO_ERROR;
int32_t size = right.vtzlines->size();
- vtzlines = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, size, status);
- if (vtzlines != nullptr && U_SUCCESS(status)) {
+ LocalPointer<UVector> lpVtzLines(
+ new UVector(uprv_deleteUObject, uhash_compareUnicodeString, size, status), status);
+ if (U_SUCCESS(status)) {
for (int32_t i = 0; i < size; i++) {
- UnicodeString *line = (UnicodeString*)right.vtzlines->elementAt(i);
- vtzlines->addElementX(line->clone(), status);
+ LocalPointer<UnicodeString> line(
+ ((UnicodeString*)right.vtzlines->elementAt(i))->clone(), status);
+ lpVtzLines->adoptElement(line.orphan(), status);
if (U_FAILURE(status)) {
break;
}
}
- }
- if (U_FAILURE(status) && vtzlines != nullptr) {
- delete vtzlines;
- vtzlines = nullptr;
+ if (U_SUCCESS(status)) {
+ vtzlines = lpVtzLines.orphan();
+ }
}
}
tzurl = right.tzurl;
@@ -1083,7 +1074,7 @@ VTimeZone::createVTimeZoneByID(const UnicodeString& ID) {
// Set ICU tzdata version
UErrorCode status = U_ZERO_ERROR;
UResourceBundle *bundle = nullptr;
- const UChar* versionStr = nullptr;
+ const char16_t* versionStr = nullptr;
int32_t len = 0;
bundle = ures_openDirect(nullptr, "zoneinfo64", &status);
versionStr = ures_getStringByKey(bundle, "TZVersion", &len, &status);
@@ -1114,7 +1105,7 @@ VTimeZone::createVTimeZoneFromBasicTimeZone(const BasicTimeZone& basic_time_zone
// Set ICU tzdata version
UResourceBundle *bundle = nullptr;
- const UChar* versionStr = nullptr;
+ const char16_t* versionStr = nullptr;
int32_t len = 0;
bundle = ures_openDirect(nullptr, "zoneinfo64", &status);
versionStr = ures_getStringByKey(bundle, "TZVersion", &len, &status);
@@ -1148,9 +1139,9 @@ UBool
VTimeZone::getTZURL(UnicodeString& url) const {
if (tzurl.length() > 0) {
url = tzurl;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void
@@ -1162,9 +1153,9 @@ UBool
VTimeZone::getLastModified(UDate& lastModified) const {
if (lastmod != MAX_MILLIS) {
lastModified = lastmod;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void
@@ -1229,12 +1220,12 @@ VTimeZone::setRawOffset(int32_t offsetMillis) {
}
int32_t
-VTimeZone::getRawOffset(void) const {
+VTimeZone::getRawOffset() const {
return tz->getRawOffset();
}
UBool
-VTimeZone::useDaylightTime(void) const {
+VTimeZone::useDaylightTime() const {
return tz->useDaylightTime();
}
@@ -1272,33 +1263,28 @@ VTimeZone::getTimeZoneRules(const InitialTimeZoneRule*& initial,
void
VTimeZone::load(VTZReader& reader, UErrorCode& status) {
- vtzlines = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, DEFAULT_VTIMEZONE_LINES, status);
- if (vtzlines == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
+ U_ASSERT(vtzlines == nullptr);
+ LocalPointer<UVector> lpVtzLines(
+ new UVector(uprv_deleteUObject, uhash_compareUnicodeString, DEFAULT_VTIMEZONE_LINES, status), status);
if (U_FAILURE(status)) {
return;
}
- UBool eol = FALSE;
- UBool start = FALSE;
- UBool success = FALSE;
+ UBool eol = false;
+ UBool start = false;
+ UBool success = false;
UnicodeString line;
- while (TRUE) {
- UChar ch = reader.read();
+ while (true) {
+ char16_t ch = reader.read();
if (ch == 0xFFFF) {
// end of file
if (start && line.startsWith(ICAL_END_VTIMEZONE, -1)) {
LocalPointer<UnicodeString> element(new UnicodeString(line), status);
+ lpVtzLines->adoptElement(element.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupVtzlines;
- }
- vtzlines->addElementX(element.getAlias(), status);
- if (U_FAILURE(status)) {
- goto cleanupVtzlines;
+ return;
}
- element.orphan(); // on success, vtzlines owns the object.
- success = TRUE;
+ success = true;
}
break;
}
@@ -1312,14 +1298,10 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
if (start) {
if (line.length() > 0) {
LocalPointer<UnicodeString> element(new UnicodeString(line), status);
+ lpVtzLines->adoptElement(element.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupVtzlines;
- }
- vtzlines->addElementX(element.getAlias(), status);
- if (U_FAILURE(status)) {
- goto cleanupVtzlines;
+ return;
}
- element.orphan(); // on success, vtzlines owns the object.
}
}
line.remove();
@@ -1327,39 +1309,31 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
line.append(ch);
}
}
- eol = FALSE;
+ eol = false;
} else {
if (ch == 0x000A) {
// LF
- eol = TRUE;
+ eol = true;
if (start) {
if (line.startsWith(ICAL_END_VTIMEZONE, -1)) {
LocalPointer<UnicodeString> element(new UnicodeString(line), status);
+ lpVtzLines->adoptElement(element.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupVtzlines;
- }
- vtzlines->addElementX(element.getAlias(), status);
- if (U_FAILURE(status)) {
- goto cleanupVtzlines;
+ return;
}
- element.orphan(); // on success, vtzlines owns the object.
- success = TRUE;
+ success = true;
break;
}
} else {
if (line.startsWith(ICAL_BEGIN_VTIMEZONE, -1)) {
LocalPointer<UnicodeString> element(new UnicodeString(line), status);
+ lpVtzLines->adoptElement(element.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupVtzlines;
+ return;
}
- vtzlines->addElementX(element.getAlias(), status);
- if (U_FAILURE(status)) {
- goto cleanupVtzlines;
- }
- element.orphan(); // on success, vtzlines owns the object.
line.remove();
- start = TRUE;
- eol = FALSE;
+ start = true;
+ eol = false;
}
}
} else {
@@ -1371,14 +1345,10 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
if (U_SUCCESS(status)) {
status = U_INVALID_STATE_ERROR;
}
- goto cleanupVtzlines;
+ return;
}
+ vtzlines = lpVtzLines.orphan();
parse(status);
- return;
-
-cleanupVtzlines:
- delete vtzlines;
- vtzlines = nullptr;
}
// parser state
@@ -1398,48 +1368,34 @@ VTimeZone::parse(UErrorCode& status) {
status = U_INVALID_STATE_ERROR;
return;
}
- InitialTimeZoneRule *initialRule = nullptr;
- RuleBasedTimeZone *rbtz = nullptr;
// timezone ID
UnicodeString tzid;
int32_t state = INI;
int32_t n = 0;
- UBool dst = FALSE; // current zone type
+ UBool dst = false; // current zone type
UnicodeString from; // current zone from offset
UnicodeString to; // current zone offset
UnicodeString zonename; // current zone name
UnicodeString dtstart; // current zone starts
- UBool isRRULE = FALSE; // true if the rule is described by RRULE
+ UBool isRRULE = false; // true if the rule is described by RRULE
int32_t initialRawOffset = 0; // initial offset
int32_t initialDSTSavings = 0; // initial offset
UDate firstStart = MAX_MILLIS; // the earliest rule start time
UnicodeString name; // RFC2445 prop name
UnicodeString value; // RFC2445 prop value
- UVector *dates = nullptr; // list of RDATE or RRULE strings
- UVector *rules = nullptr; // list of TimeZoneRule instances
-
int32_t finalRuleIdx = -1;
int32_t finalRuleCount = 0;
- rules = new UVector(status);
- if (rules == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
- if (U_FAILURE(status)) {
- goto cleanupParse;
- }
- // Set the deleter to remove TimeZoneRule vectors to avoid memory leaks due to unowned TimeZoneRules.
- rules->setDeleter(deleteTimeZoneRule);
+ // Set the deleter on rules to remove TimeZoneRule vectors to avoid memory leaks due to unowned TimeZoneRules.
+ UVector rules(uprv_deleteUObject, nullptr, status);
- dates = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status);
- if (dates == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
+ // list of RDATE or RRULE strings
+ UVector dates(uprv_deleteUObject, uhash_compareUnicodeString, status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
for (n = 0; n < vtzlines->size(); n++) {
@@ -1469,20 +1425,20 @@ VTimeZone::parse(UErrorCode& status) {
// can be any value.
lastmod = parseDateTimeString(value, 0, status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
} else if (name.compare(ICAL_BEGIN, -1) == 0) {
UBool isDST = (value.compare(ICAL_DAYLIGHT, -1) == 0);
if (value.compare(ICAL_STANDARD, -1) == 0 || isDST) {
// tzid must be ready at this point
if (tzid.length() == 0) {
- goto cleanupParse;
+ return;
}
// initialize current zone properties
- if (dates->size() != 0) {
- dates->removeAllElements();
+ if (dates.size() != 0) {
+ dates.removeAllElements();
}
- isRRULE = FALSE;
+ isRRULE = false;
from.remove();
to.remove();
zonename.remove();
@@ -1491,7 +1447,7 @@ VTimeZone::parse(UErrorCode& status) {
} else {
// BEGIN property other than STANDARD/DAYLIGHT
// must not be there.
- goto cleanupParse;
+ return;
}
} else if (name.compare(ICAL_END, -1) == 0) {
break;
@@ -1509,50 +1465,42 @@ VTimeZone::parse(UErrorCode& status) {
} else if (name.compare(ICAL_RDATE, -1) == 0) {
// RDATE mixed with RRULE is not supported
if (isRRULE) {
- goto cleanupParse;
+ return;
}
// RDATE value may contain multiple date delimited
// by comma
- UBool nextDate = TRUE;
+ UBool nextDate = true;
int32_t dstart = 0;
- UnicodeString *dstr = nullptr;
+ LocalPointer<UnicodeString> dstr;
while (nextDate) {
int32_t dend = value.indexOf(COMMA, dstart);
if (dend == -1) {
- dstr = new UnicodeString(value, dstart);
- nextDate = FALSE;
- } else {
- dstr = new UnicodeString(value, dstart, dend - dstart);
- }
- if (dstr == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
+ dstr.adoptInsteadAndCheckErrorCode(new UnicodeString(value, dstart), status);
+ nextDate = false;
} else {
- dates->addElementX(dstr, status);
+ dstr.adoptInsteadAndCheckErrorCode(new UnicodeString(value, dstart, dend - dstart), status);
}
+ dates.adoptElement(dstr.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
dstart = dend + 1;
}
} else if (name.compare(ICAL_RRULE, -1) == 0) {
// RRULE mixed with RDATE is not supported
- if (!isRRULE && dates->size() != 0) {
- goto cleanupParse;
+ if (!isRRULE && dates.size() != 0) {
+ return;
}
isRRULE = true;
LocalPointer<UnicodeString> element(new UnicodeString(value), status);
+ dates.adoptElement(element.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
- dates->addElementX(element.getAlias(), status);
- if (U_FAILURE(status)) {
- goto cleanupParse;
- }
- element.orphan(); // on success, dates owns the object.
} else if (name.compare(ICAL_END, -1) == 0) {
// Mandatory properties
if (dtstart.length() == 0 || from.length() == 0 || to.length() == 0) {
- goto cleanupParse;
+ return;
}
// if zonename is not available, create one from tzid
if (zonename.length() == 0) {
@@ -1560,7 +1508,7 @@ VTimeZone::parse(UErrorCode& status) {
}
// create a time zone rule
- TimeZoneRule *rule = nullptr;
+ LocalPointer<TimeZoneRule> rule;
int32_t fromOffset = 0;
int32_t toOffset = 0;
int32_t rawOffset = 0;
@@ -1571,7 +1519,7 @@ VTimeZone::parse(UErrorCode& status) {
fromOffset = offsetStrToMillis(from, status);
toOffset = offsetStrToMillis(to, status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
if (dst) {
@@ -1592,18 +1540,20 @@ VTimeZone::parse(UErrorCode& status) {
// start time
start = parseDateTimeString(dtstart, fromOffset, status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
// Create the rule
UDate actualStart = MAX_MILLIS;
if (isRRULE) {
- rule = createRuleByRRULE(zonename, rawOffset, dstSavings, start, dates, fromOffset, status);
+ rule.adoptInsteadAndCheckErrorCode(
+ createRuleByRRULE(zonename, rawOffset, dstSavings, start, &dates, fromOffset, status), status);
} else {
- rule = createRuleByRDATE(zonename, rawOffset, dstSavings, start, dates, fromOffset, status);
+ rule.adoptInsteadAndCheckErrorCode(
+ createRuleByRDATE(zonename, rawOffset, dstSavings, start, &dates, fromOffset, status), status);
}
- if (U_FAILURE(status) || rule == nullptr) {
- goto cleanupParse;
+ if (U_FAILURE(status)) {
+ return;
} else {
UBool startAvail = rule->getFirstStart(fromOffset, 0, actualStart);
if (startAvail && actualStart < firstStart) {
@@ -1626,9 +1576,9 @@ VTimeZone::parse(UErrorCode& status) {
}
}
}
- rules->addElementX(rule, status);
+ rules.adoptElement(rule.orphan(), status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
state = VTZ;
}
@@ -1636,28 +1586,31 @@ VTimeZone::parse(UErrorCode& status) {
}
}
// Must have at least one rule
- if (rules->size() == 0) {
- goto cleanupParse;
+ if (rules.size() == 0) {
+ return;
}
// Create a initial rule
- getDefaultTZName(tzid, FALSE, zonename);
- initialRule = new InitialTimeZoneRule(zonename, initialRawOffset, initialDSTSavings);
- if (initialRule == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- goto cleanupParse;
+ getDefaultTZName(tzid, false, zonename);
+ LocalPointer<InitialTimeZoneRule> initialRule(
+ new InitialTimeZoneRule(zonename, initialRawOffset, initialDSTSavings), status);
+ if (U_FAILURE(status)) {
+ return;
}
// Finally, create the RuleBasedTimeZone
- rbtz = new RuleBasedTimeZone(tzid, initialRule);
- if (rbtz == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- goto cleanupParse;
+ // C++ awkwardness on memory allocation failure: the constructor wont be run, meaning
+ // that initialRule wont be adopted/deleted, as it normally would be.
+ LocalPointer<RuleBasedTimeZone> rbtz(
+ new RuleBasedTimeZone(tzid, initialRule.getAlias()), status);
+ if (U_SUCCESS(status)) {
+ initialRule.orphan();
+ } else {
+ return;
}
- initialRule = nullptr; // already adopted by RBTZ, no need to delete
- for (n = 0; n < rules->size(); n++) {
- TimeZoneRule *r = (TimeZoneRule*)rules->elementAt(n);
+ for (n = 0; n < rules.size(); n++) {
+ TimeZoneRule *r = (TimeZoneRule*)rules.elementAt(n);
AnnualTimeZoneRule *atzrule = dynamic_cast<AnnualTimeZoneRule *>(r);
if (atzrule != nullptr) {
if (atzrule->getEndYear() == AnnualTimeZoneRule::MAX_YEAR) {
@@ -1669,18 +1622,18 @@ VTimeZone::parse(UErrorCode& status) {
if (finalRuleCount > 2) {
// Too many final rules
status = U_ILLEGAL_ARGUMENT_ERROR;
- goto cleanupParse;
+ return;
}
if (finalRuleCount == 1) {
- if (rules->size() == 1) {
+ if (rules.size() == 1) {
// Only one final rule, only governs the initial rule,
// which is already initialized, thus, we do not need to
// add this transition rule
- rules->removeAllElements();
+ rules.removeAllElements();
} else {
// Normalize the final rule
- AnnualTimeZoneRule *finalRule = (AnnualTimeZoneRule*)rules->elementAt(finalRuleIdx);
+ AnnualTimeZoneRule *finalRule = (AnnualTimeZoneRule*)rules.elementAt(finalRuleIdx);
int32_t tmpRaw = finalRule->getRawOffset();
int32_t tmpDST = finalRule->getDSTSavings();
@@ -1688,94 +1641,74 @@ VTimeZone::parse(UErrorCode& status) {
UDate finalStart, start;
finalRule->getFirstStart(initialRawOffset, initialDSTSavings, finalStart);
start = finalStart;
- for (n = 0; n < rules->size(); n++) {
+ for (n = 0; n < rules.size(); n++) {
if (finalRuleIdx == n) {
continue;
}
- TimeZoneRule *r = (TimeZoneRule*)rules->elementAt(n);
+ TimeZoneRule *r = (TimeZoneRule*)rules.elementAt(n);
UDate lastStart;
r->getFinalStart(tmpRaw, tmpDST, lastStart);
if (lastStart > start) {
finalRule->getNextStart(lastStart,
r->getRawOffset(),
r->getDSTSavings(),
- FALSE,
+ false,
start);
}
}
- TimeZoneRule *newRule = nullptr;
+ LocalPointer<TimeZoneRule> newRule;
UnicodeString tznam;
if (start == finalStart) {
// Transform this into a single transition
- newRule = new TimeArrayTimeZoneRule(
- finalRule->getName(tznam),
- finalRule->getRawOffset(),
- finalRule->getDSTSavings(),
- &finalStart,
- 1,
- DateTimeRule::UTC_TIME);
+ newRule.adoptInsteadAndCheckErrorCode(
+ new TimeArrayTimeZoneRule(
+ finalRule->getName(tznam),
+ finalRule->getRawOffset(),
+ finalRule->getDSTSavings(),
+ &finalStart,
+ 1,
+ DateTimeRule::UTC_TIME),
+ status);
} else {
// Update the end year
int32_t y, m, d, dow, doy, mid;
Grego::timeToFields(start, y, m, d, dow, doy, mid);
- newRule = new AnnualTimeZoneRule(
- finalRule->getName(tznam),
- finalRule->getRawOffset(),
- finalRule->getDSTSavings(),
- *(finalRule->getRule()),
- finalRule->getStartYear(),
- y);
+ newRule.adoptInsteadAndCheckErrorCode(
+ new AnnualTimeZoneRule(
+ finalRule->getName(tznam),
+ finalRule->getRawOffset(),
+ finalRule->getDSTSavings(),
+ *(finalRule->getRule()),
+ finalRule->getStartYear(),
+ y),
+ status);
}
- if (newRule == nullptr) {
- status = U_MEMORY_ALLOCATION_ERROR;
- goto cleanupParse;
+ if (U_FAILURE(status)) {
+ return;
}
- rules->removeElementAt(finalRuleIdx);
- rules->addElementX(newRule, status);
+ rules.removeElementAt(finalRuleIdx);
+ rules.adoptElement(newRule.orphan(), status);
if (U_FAILURE(status)) {
- delete newRule;
- goto cleanupParse;
+ return;
}
}
}
- while (!rules->isEmpty()) {
- TimeZoneRule *tzr = (TimeZoneRule*)rules->orphanElementAt(0);
+ while (!rules.isEmpty()) {
+ TimeZoneRule *tzr = (TimeZoneRule*)rules.orphanElementAt(0);
rbtz->addTransitionRule(tzr, status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
}
rbtz->complete(status);
if (U_FAILURE(status)) {
- goto cleanupParse;
+ return;
}
- delete rules;
- delete dates;
- tz = rbtz;
+ tz = rbtz.orphan();
setID(tzid);
- return;
-
-cleanupParse:
- if (rules != nullptr) {
- while (!rules->isEmpty()) {
- TimeZoneRule *r = (TimeZoneRule*)rules->orphanElementAt(0);
- delete r;
- }
- delete rules;
- }
- if (dates != nullptr) {
- delete dates;
- }
- if (initialRule != nullptr) {
- delete initialRule;
- }
- if (rbtz != nullptr) {
- delete rbtz;
- }
- return;
}
void
@@ -1809,7 +1742,7 @@ VTimeZone::write(VTZWriter& writer, UErrorCode& status) const {
icutzprop.append(u'[');
icutzprop.append(icutzver);
icutzprop.append(u']');
- customProps.addElementX(&icutzprop, status);
+ customProps.addElement(&icutzprop, status);
}
writeZone(writer, *tz, &customProps, status);
}
@@ -1827,58 +1760,48 @@ VTimeZone::write(UDate start, VTZWriter& writer, UErrorCode& status) const {
// Extract rules applicable to dates after the start time
getTimeZoneRulesAfter(start, initial, transitionRules, status);
+ LocalPointer<InitialTimeZoneRule> lpInitial(initial);
+ LocalPointer<UVector> lpTransitionRules(transitionRules);
if (U_FAILURE(status)) {
return;
}
// Create a RuleBasedTimeZone with the subset rule
getID(tzid);
- RuleBasedTimeZone rbtz(tzid, initial);
- if (transitionRules != nullptr) {
- while (!transitionRules->isEmpty()) {
- TimeZoneRule *tr = (TimeZoneRule*)transitionRules->orphanElementAt(0);
+ RuleBasedTimeZone rbtz(tzid, lpInitial.orphan());
+ if (lpTransitionRules.isValid()) {
+ U_ASSERT(transitionRules->hasDeleter()); // Assumed for U_FAILURE early return, below.
+ while (!lpTransitionRules->isEmpty()) {
+ TimeZoneRule *tr = (TimeZoneRule*)lpTransitionRules->orphanElementAt(0);
rbtz.addTransitionRule(tr, status);
if (U_FAILURE(status)) {
- goto cleanupWritePartial;
+ return;
}
}
- delete transitionRules;
- transitionRules = nullptr;
}
rbtz.complete(status);
if (U_FAILURE(status)) {
- goto cleanupWritePartial;
+ return;
}
if (olsonzid.length() > 0 && icutzver.length() > 0) {
UnicodeString *icutzprop = new UnicodeString(ICU_TZINFO_PROP);
if (icutzprop == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- goto cleanupWritePartial;
+ return;
}
icutzprop->append(olsonzid);
- icutzprop->append((UChar)0x005B/*'['*/);
+ icutzprop->append((char16_t)0x005B/*'['*/);
icutzprop->append(icutzver);
icutzprop->append(ICU_TZINFO_PARTIAL, -1);
appendMillis(start, *icutzprop);
- icutzprop->append((UChar)0x005D/*']'*/);
- customProps.addElementX(icutzprop, status);
+ icutzprop->append((char16_t)0x005D/*']'*/);
+ customProps.adoptElement(icutzprop, status);
if (U_FAILURE(status)) {
- delete icutzprop;
- goto cleanupWritePartial;
+ return;
}
}
writeZone(writer, rbtz, &customProps, status);
- return;
-
-cleanupWritePartial:
- if (initial != nullptr) {
- delete initial;
- }
- if (transitionRules != nullptr) {
- U_ASSERT(transitionRules->hasDeleter());
- delete transitionRules;
- }
}
void
@@ -1915,11 +1838,11 @@ VTimeZone::writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) const
return;
}
icutzprop->append(olsonzid);
- icutzprop->append((UChar)0x005B/*'['*/);
+ icutzprop->append((char16_t)0x005B/*'['*/);
icutzprop->append(icutzver);
icutzprop->append(ICU_TZINFO_SIMPLE, -1);
appendMillis(time, *icutzprop);
- icutzprop->append((UChar)0x005D/*']'*/);
+ icutzprop->append((char16_t)0x005D/*']'*/);
customProps.adoptElement(icutzprop.orphan(), status);
}
writeZone(writer, rbtz, &customProps, status);
@@ -1975,19 +1898,19 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
AnnualTimeZoneRule *finalStdRule = nullptr;
int32_t year, month, dom, dow, doy, mid;
- UBool hasTransitions = FALSE;
+ UBool hasTransitions = false;
TimeZoneTransition tzt;
UBool tztAvail;
UnicodeString name;
UBool isDst;
// Going through all transitions
- while (TRUE) {
- tztAvail = basictz.getNextTransition(t, FALSE, tzt);
+ while (true) {
+ tztAvail = basictz.getNextTransition(t, false, tzt);
if (!tztAvail) {
break;
}
- hasTransitions = TRUE;
+ hasTransitions = true;
t = tzt.getTime();
tzt.getTo()->getName(name);
isDst = (tzt.getTo()->getDSTSavings() != 0);
@@ -1996,7 +1919,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
int32_t toOffset = tzt.getTo()->getRawOffset() + tzt.getTo()->getDSTSavings();
Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid);
int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom);
- UBool sameRule = FALSE;
+ UBool sameRule = false;
const AnnualTimeZoneRule *atzrule;
if (isDst) {
if (finalDstRule == nullptr
@@ -2017,14 +1940,14 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
// Update until time
dstUntilTime = t;
dstCount++;
- sameRule = TRUE;
+ sameRule = true;
}
if (!sameRule) {
if (dstCount == 1) {
- writeZonePropsByTime(w, TRUE, dstName, dstFromOffset, dstToOffset, dstStartTime,
- TRUE, status);
+ writeZonePropsByTime(w, true, dstName, dstFromOffset, dstToOffset, dstStartTime,
+ true, status);
} else {
- writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+ writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime, status);
}
if (U_FAILURE(status)) {
@@ -2068,14 +1991,14 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
// Update until time
stdUntilTime = t;
stdCount++;
- sameRule = TRUE;
+ sameRule = true;
}
if (!sameRule) {
if (stdCount == 1) {
- writeZonePropsByTime(w, FALSE, stdName, stdFromOffset, stdToOffset, stdStartTime,
- TRUE, status);
+ writeZonePropsByTime(w, false, stdName, stdFromOffset, stdToOffset, stdStartTime,
+ true, status);
} else {
- writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+ writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime, status);
}
if (U_FAILURE(status)) {
@@ -2105,7 +2028,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
if (!hasTransitions) {
// No transition - put a single non transition RDATE
int32_t raw, dst, offset;
- basictz.getOffset(0.0/*any time*/, FALSE, raw, dst, status);
+ basictz.getOffset(0.0/*any time*/, false, raw, dst, status);
if (U_FAILURE(status)) {
goto cleanupWriteZone;
}
@@ -2115,7 +2038,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
basictz.getID(tzid);
getDefaultTZName(tzid, isDst, name);
writeZonePropsByTime(w, isDst, name,
- offset, offset, DEF_TZSTARTTIME - offset, FALSE, status);
+ offset, offset, DEF_TZSTARTTIME - offset, false, status);
if (U_FAILURE(status)) {
goto cleanupWriteZone;
}
@@ -2123,10 +2046,10 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
if (dstCount > 0) {
if (finalDstRule == nullptr) {
if (dstCount == 1) {
- writeZonePropsByTime(w, TRUE, dstName, dstFromOffset, dstToOffset, dstStartTime,
- TRUE, status);
+ writeZonePropsByTime(w, true, dstName, dstFromOffset, dstToOffset, dstStartTime,
+ true, status);
} else {
- writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+ writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime, status);
}
if (U_FAILURE(status)) {
@@ -2134,16 +2057,16 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
}
} else {
if (dstCount == 1) {
- writeFinalRule(w, TRUE, finalDstRule,
+ writeFinalRule(w, true, finalDstRule,
dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, dstStartTime, status);
} else {
// Use a single rule if possible
if (isEquivalentDateRule(dstMonth, dstWeekInMonth, dstDayOfWeek, finalDstRule->getRule())) {
- writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+ writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, MAX_MILLIS, status);
} else {
// Not equivalent rule - write out two different rules
- writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+ writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime, status);
if (U_FAILURE(status)) {
goto cleanupWriteZone;
@@ -2152,7 +2075,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
UBool nextStartAvail = finalDstRule->getNextStart(dstUntilTime, dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, false, nextStart);
U_ASSERT(nextStartAvail);
if (nextStartAvail) {
- writeFinalRule(w, TRUE, finalDstRule,
+ writeFinalRule(w, true, finalDstRule,
dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, nextStart, status);
}
}
@@ -2165,10 +2088,10 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
if (stdCount > 0) {
if (finalStdRule == nullptr) {
if (stdCount == 1) {
- writeZonePropsByTime(w, FALSE, stdName, stdFromOffset, stdToOffset, stdStartTime,
- TRUE, status);
+ writeZonePropsByTime(w, false, stdName, stdFromOffset, stdToOffset, stdStartTime,
+ true, status);
} else {
- writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+ writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime, status);
}
if (U_FAILURE(status)) {
@@ -2176,16 +2099,16 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
}
} else {
if (stdCount == 1) {
- writeFinalRule(w, FALSE, finalStdRule,
+ writeFinalRule(w, false, finalStdRule,
stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, stdStartTime, status);
} else {
// Use a single rule if possible
if (isEquivalentDateRule(stdMonth, stdWeekInMonth, stdDayOfWeek, finalStdRule->getRule())) {
- writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+ writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, MAX_MILLIS, status);
} else {
// Not equivalent rule - write out two different rules
- writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+ writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime, status);
if (U_FAILURE(status)) {
goto cleanupWriteZone;
@@ -2194,7 +2117,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
UBool nextStartAvail = finalStdRule->getNextStart(stdUntilTime, stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, false, nextStart);
U_ASSERT(nextStartAvail);
if (nextStartAvail) {
- writeFinalRule(w, FALSE, finalStdRule,
+ writeFinalRule(w, false, finalStdRule,
stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, nextStart, status);
}
}
@@ -2524,13 +2447,13 @@ VTimeZone::writeFinalRule(VTZWriter& writer, UBool isDst, const AnnualTimeZoneRu
if (U_FAILURE(status)) {
return;
}
- UBool modifiedRule = TRUE;
+ UBool modifiedRule = true;
const DateTimeRule *dtrule = toWallTimeRule(rule->getRule(), fromRawOffset, fromDSTSavings, status);
if (U_FAILURE(status)) {
return;
}
if (dtrule == nullptr) {
- modifiedRule = FALSE;
+ modifiedRule = false;
dtrule = rule->getRule();
}
diff --git a/contrib/libs/icu/i18n/vzone.cpp b/contrib/libs/icu/i18n/vzone.cpp
index 7e3a5544fd5..5517e5144c0 100644
--- a/contrib/libs/icu/i18n/vzone.cpp
+++ b/contrib/libs/icu/i18n/vzone.cpp
@@ -26,13 +26,13 @@
U_NAMESPACE_USE
U_CAPI VZone* U_EXPORT2
-vzone_openID(const UChar* ID, int32_t idLength){
+vzone_openID(const char16_t* ID, int32_t idLength){
UnicodeString s(idLength==-1, ID, idLength);
return (VZone*) (VTimeZone::createVTimeZoneByID(s));
}
U_CAPI VZone* U_EXPORT2
-vzone_openData(const UChar* vtzdata, int32_t vtzdataLength, UErrorCode& status) {
+vzone_openData(const char16_t* vtzdata, int32_t vtzdataLength, UErrorCode& status) {
UnicodeString s(vtzdataLength==-1, vtzdata, vtzdataLength);
return (VZone*) (VTimeZone::createVTimeZone(s,status));
}
@@ -53,7 +53,7 @@ vzone_equals(const VZone* zone1, const VZone* zone2) {
}
U_CAPI UBool U_EXPORT2
-vzone_getTZURL(VZone* zone, UChar* & url, int32_t & urlLength) {
+vzone_getTZURL(VZone* zone, char16_t* & url, int32_t & urlLength) {
UnicodeString s;
UBool b = ((VTimeZone*)zone)->VTimeZone::getTZURL(s);
@@ -64,7 +64,7 @@ vzone_getTZURL(VZone* zone, UChar* & url, int32_t & urlLength) {
}
U_CAPI void U_EXPORT2
-vzone_setTZURL(VZone* zone, UChar* url, int32_t urlLength) {
+vzone_setTZURL(VZone* zone, char16_t* url, int32_t urlLength) {
UnicodeString s(urlLength==-1, url, urlLength);
((VTimeZone*)zone)->VTimeZone::setTZURL(s);
}
@@ -80,36 +80,36 @@ vzone_setLastModified(VZone* zone, UDate lastModified) {
}
U_CAPI void U_EXPORT2
-vzone_write(VZone* zone, UChar* & result, int32_t & resultLength, UErrorCode& status) {
+vzone_write(VZone* zone, char16_t* & result, int32_t & resultLength, UErrorCode& status) {
UnicodeString s;
((VTimeZone*)zone)->VTimeZone::write(s, status);
resultLength = s.length();
- result = (UChar*)uprv_malloc(resultLength);
+ result = (char16_t*)uprv_malloc(resultLength);
memcpy(result,s.getBuffer(),resultLength);
return;
}
U_CAPI void U_EXPORT2
-vzone_writeFromStart(VZone* zone, UDate start, UChar* & result, int32_t & resultLength, UErrorCode& status) {
+vzone_writeFromStart(VZone* zone, UDate start, char16_t* & result, int32_t & resultLength, UErrorCode& status) {
UnicodeString s;
((VTimeZone*)zone)->VTimeZone::write(start, s, status);
resultLength = s.length();
- result = (UChar*)uprv_malloc(resultLength);
+ result = (char16_t*)uprv_malloc(resultLength);
memcpy(result,s.getBuffer(),resultLength);
return;
}
U_CAPI void U_EXPORT2
-vzone_writeSimple(VZone* zone, UDate time, UChar* & result, int32_t & resultLength, UErrorCode& status) {
+vzone_writeSimple(VZone* zone, UDate time, char16_t* & result, int32_t & resultLength, UErrorCode& status) {
UnicodeString s;
((VTimeZone*)zone)->VTimeZone::writeSimple(time, s, status);
resultLength = s.length();
- result = (UChar*)uprv_malloc(resultLength);
+ result = (char16_t*)uprv_malloc(resultLength);
memcpy(result,s.getBuffer(),resultLength);
return;
diff --git a/contrib/libs/icu/i18n/vzone.h b/contrib/libs/icu/i18n/vzone.h
index d1b6d8d8204..bf9b45ea20d 100644
--- a/contrib/libs/icu/i18n/vzone.h
+++ b/contrib/libs/icu/i18n/vzone.h
@@ -24,14 +24,12 @@
#include "unicode/uobject.h"
#include "ztrans.h"
-#ifndef UCNV_H
struct VZone;
/**
* A UnicodeSet. Use the vzone_* API to manipulate. Create with
* vzone_open*, and destroy with vzone_close.
*/
typedef struct VZone VZone;
-#endif
/*********************************************************************
* VZone API
diff --git a/contrib/libs/icu/i18n/windtfmt.cpp b/contrib/libs/icu/i18n/windtfmt.cpp
index f6a990ea29e..2118f92dceb 100644
--- a/contrib/libs/icu/i18n/windtfmt.cpp
+++ b/contrib/libs/icu/i18n/windtfmt.cpp
@@ -56,13 +56,13 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Win32DateFormat)
UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Locale *locale, UErrorCode &status) const
{
- UnicodeString *result = NULL;
+ UnicodeString *result = nullptr;
const char *type = cal->getType();
const char *base = locale->getBaseName();
UResourceBundle *topBundle = ures_open((char *) 0, base, &status);
- UResourceBundle *calBundle = ures_getByKey(topBundle, "calendar", NULL, &status);
- UResourceBundle *typBundle = ures_getByKeyWithFallback(calBundle, type, NULL, &status);
- UResourceBundle *patBundle = ures_getByKeyWithFallback(typBundle, "DateTimePatterns", NULL, &status);
+ UResourceBundle *calBundle = ures_getByKey(topBundle, "calendar", nullptr, &status);
+ UResourceBundle *typBundle = ures_getByKeyWithFallback(calBundle, type, nullptr, &status);
+ UResourceBundle *patBundle = ures_getByKeyWithFallback(typBundle, "DateTimePatterns", nullptr, &status);
if (status == U_MISSING_RESOURCE_ERROR) {
status = U_ZERO_ERROR;
@@ -71,7 +71,7 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc
}
if (U_FAILURE(status)) {
- static const UChar defaultPattern[] = {0x007B, 0x0031, 0x007D, 0x0020, 0x007B, 0x0030, 0x007D, 0x0000}; // "{1} {0}"
+ static const char16_t defaultPattern[] = {0x007B, 0x0031, 0x007D, 0x0020, 0x007B, 0x0030, 0x007D, 0x0000}; // "{1} {0}"
return new UnicodeString(defaultPattern, UPRV_LENGTHOF(defaultPattern));
}
@@ -82,9 +82,9 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc
// Get proper date time format
glueIndex = (int32_t)(DateFormat::kDateTimeOffset + (fDateStyle - DateFormat::kDateOffset));
}
- const UChar *resStr = ures_getStringByIndex(patBundle, glueIndex, &resStrLen, &status);
+ const char16_t *resStr = ures_getStringByIndex(patBundle, glueIndex, &resStrLen, &status);
- result = new UnicodeString(TRUE, resStr, resStrLen);
+ result = new UnicodeString(true, resStr, resStrLen);
ures_close(patBundle);
ures_close(typBundle);
@@ -102,7 +102,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
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);
+ (void)uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status);
if (U_SUCCESS(status))
{
@@ -160,7 +160,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
// TODO: Range-check timeStyle, dateStyle
Win32DateFormat::Win32DateFormat(DateFormat::EStyle timeStyle, DateFormat::EStyle dateStyle, const Locale &locale, UErrorCode &status)
- : DateFormat(), fDateTimeMsg(NULL), fTimeStyle(timeStyle), fDateStyle(dateStyle), fLocale(locale), fZoneID(), fWindowsLocaleName(nullptr)
+ : DateFormat(), fDateTimeMsg(nullptr), fTimeStyle(timeStyle), fDateStyle(dateStyle), fLocale(locale), fZoneID(), fWindowsLocaleName(nullptr)
{
if (U_SUCCESS(status)) {
GetEquivalentWindowsLocaleName(locale, &fWindowsLocaleName);
@@ -199,7 +199,7 @@ Win32DateFormat &Win32DateFormat::operator=(const Win32DateFormat &other)
// delete fCalendar;
- this->fDateTimeMsg = other.fDateTimeMsg == NULL ? NULL : new UnicodeString(*other.fDateTimeMsg);
+ this->fDateTimeMsg = other.fDateTimeMsg == nullptr ? nullptr : new UnicodeString(*other.fDateTimeMsg);
this->fTimeStyle = other.fTimeStyle;
this->fDateStyle = other.fDateStyle;
this->fLocale = other.fLocale;
@@ -209,7 +209,7 @@ Win32DateFormat &Win32DateFormat::operator=(const Win32DateFormat &other)
this->fTZI = NEW_ARRAY(TIME_ZONE_INFORMATION, 1);
*this->fTZI = *other.fTZI;
- this->fWindowsLocaleName = other.fWindowsLocaleName == NULL ? NULL : new UnicodeString(*other.fWindowsLocaleName);
+ this->fWindowsLocaleName = other.fWindowsLocaleName == nullptr ? nullptr : new UnicodeString(*other.fWindowsLocaleName);
return *this;
}
@@ -271,7 +271,7 @@ void Win32DateFormat::parse(const UnicodeString& /* text */, Calendar& /* cal */
void Win32DateFormat::adoptCalendar(Calendar *newCalendar)
{
- if (fCalendar == NULL || strcmp(fCalendar->getType(), newCalendar->getType()) != 0) {
+ if (fCalendar == nullptr || strcmp(fCalendar->getType(), newCalendar->getType()) != 0) {
UErrorCode status = U_ZERO_ERROR;
if (fDateStyle != DateFormat::kNone && fTimeStyle != DateFormat::kNone) {
@@ -317,19 +317,19 @@ void Win32DateFormat::formatDate(const SYSTEMTIME *st, UnicodeString &appendTo)
localeName = reinterpret_cast<const wchar_t*>(toOldUCharPtr(fWindowsLocaleName->getTerminatedBuffer()));
}
- result = GetDateFormatEx(localeName, dfFlags[fDateStyle - kDateOffset], st, NULL, buffer, STACK_BUFFER_SIZE, NULL);
+ result = GetDateFormatEx(localeName, dfFlags[fDateStyle - kDateOffset], st, nullptr, buffer, STACK_BUFFER_SIZE, nullptr);
if (result == 0) {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
- int newLength = GetDateFormatEx(localeName, dfFlags[fDateStyle - kDateOffset], st, NULL, NULL, 0, NULL);
+ int newLength = GetDateFormatEx(localeName, dfFlags[fDateStyle - kDateOffset], st, nullptr, nullptr, 0, nullptr);
buffer = NEW_ARRAY(wchar_t, newLength);
- GetDateFormatEx(localeName, dfFlags[fDateStyle - kDateOffset], st, NULL, buffer, newLength, NULL);
+ GetDateFormatEx(localeName, dfFlags[fDateStyle - kDateOffset], st, nullptr, buffer, newLength, nullptr);
}
}
- appendTo.append((const UChar *)buffer, (int32_t) wcslen(buffer));
+ appendTo.append((const char16_t *)buffer, (int32_t) wcslen(buffer));
if (buffer != stackBuffer) {
DELETE_ARRAY(buffer);
@@ -350,19 +350,19 @@ void Win32DateFormat::formatTime(const SYSTEMTIME *st, UnicodeString &appendTo)
localeName = reinterpret_cast<const wchar_t*>(toOldUCharPtr(fWindowsLocaleName->getTerminatedBuffer()));
}
- result = GetTimeFormatEx(localeName, tfFlags[fTimeStyle], st, NULL, buffer, STACK_BUFFER_SIZE);
+ result = GetTimeFormatEx(localeName, tfFlags[fTimeStyle], st, nullptr, buffer, STACK_BUFFER_SIZE);
if (result == 0) {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
- int newLength = GetTimeFormatEx(localeName, tfFlags[fTimeStyle], st, NULL, NULL, 0);
+ int newLength = GetTimeFormatEx(localeName, tfFlags[fTimeStyle], st, nullptr, nullptr, 0);
buffer = NEW_ARRAY(wchar_t, newLength);
- GetTimeFormatEx(localeName, tfFlags[fTimeStyle], st, NULL, buffer, newLength);
+ GetTimeFormatEx(localeName, tfFlags[fTimeStyle], st, nullptr, buffer, newLength);
}
}
- appendTo.append((const UChar *)buffer, (int32_t) wcslen(buffer));
+ appendTo.append((const char16_t *)buffer, (int32_t) wcslen(buffer));
if (buffer != stackBuffer) {
DELETE_ARRAY(buffer);
@@ -380,7 +380,7 @@ UnicodeString Win32DateFormat::setTimeZoneInfo(TIME_ZONE_INFORMATION *tzi, const
zone.getID(icuid);
if (! uprv_getWindowsTimeZoneInfo(tzi, icuid.getBuffer(), icuid.length())) {
- UBool found = FALSE;
+ UBool found = false;
int32_t ec = TimeZone::countEquivalentIDs(icuid);
for (int z = 0; z < ec; z += 1) {
diff --git a/contrib/libs/icu/i18n/windtfmt.h b/contrib/libs/icu/i18n/windtfmt.h
index 7fe7f68f450..0c3f5427852 100644
--- a/contrib/libs/icu/i18n/windtfmt.h
+++ b/contrib/libs/icu/i18n/windtfmt.h
@@ -99,7 +99,7 @@ public:
* </pre>
* @return The class ID for all objects of this class.
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
@@ -111,7 +111,7 @@ public:
* given class have the same class ID. Objects of
* other classes have different class IDs.
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID() const;
private:
void formatDate(const SYSTEMTIME *st, UnicodeString &appendTo) const;
diff --git a/contrib/libs/icu/i18n/winnmfmt.cpp b/contrib/libs/icu/i18n/winnmfmt.cpp
index 8b2a9a4f958..6efa9a63d86 100644
--- a/contrib/libs/icu/i18n/winnmfmt.cpp
+++ b/contrib/libs/icu/i18n/winnmfmt.cpp
@@ -101,7 +101,7 @@ static void getNumberFormat(NUMBERFMTW *fmt, const wchar_t *windowsLocaleName)
static void freeNumberFormat(NUMBERFMTW *fmt)
{
- if (fmt != NULL) {
+ if (fmt != nullptr) {
DELETE_ARRAY(fmt->lpThousandSep);
DELETE_ARRAY(fmt->lpDecimalSep);
}
@@ -132,7 +132,7 @@ static void getCurrencyFormat(CURRENCYFMTW *fmt, const wchar_t *windowsLocaleNam
static void freeCurrencyFormat(CURRENCYFMTW *fmt)
{
- if (fmt != NULL) {
+ if (fmt != nullptr) {
DELETE_ARRAY(fmt->lpCurrencySymbol);
DELETE_ARRAY(fmt->lpThousandSep);
DELETE_ARRAY(fmt->lpDecimalSep);
@@ -147,7 +147,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
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);
+ (void) uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status);
if (U_SUCCESS(status))
{
@@ -204,7 +204,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
}
Win32NumberFormat::Win32NumberFormat(const Locale &locale, UBool currency, UErrorCode &status)
- : NumberFormat(), fCurrency(currency), fFormatInfo(NULL), fFractionDigitsSet(FALSE), fWindowsLocaleName(nullptr)
+ : NumberFormat(), fCurrency(currency), fFormatInfo(nullptr), fFractionDigitsSet(false), fWindowsLocaleName(nullptr)
{
if (!U_FAILURE(status)) {
fLCID = locale.getLCID();
@@ -246,7 +246,7 @@ Win32NumberFormat::Win32NumberFormat(const Locale &locale, UBool currency, UErro
Win32NumberFormat::Win32NumberFormat(const Win32NumberFormat &other)
: NumberFormat(other), fFormatInfo((FormatInfo*)uprv_malloc(sizeof(FormatInfo)))
{
- if (fFormatInfo != NULL) {
+ if (fFormatInfo != nullptr) {
uprv_memset(fFormatInfo, 0, sizeof(*fFormatInfo));
}
*this = other;
@@ -254,7 +254,7 @@ Win32NumberFormat::Win32NumberFormat(const Win32NumberFormat &other)
Win32NumberFormat::~Win32NumberFormat()
{
- if (fFormatInfo != NULL) {
+ if (fFormatInfo != nullptr) {
if (fCurrency) {
freeCurrencyFormat(&fFormatInfo->currency);
} else {
@@ -275,7 +275,7 @@ Win32NumberFormat &Win32NumberFormat::operator=(const Win32NumberFormat &other)
this->fLocale = other.fLocale;
this->fLCID = other.fLCID;
this->fFractionDigitsSet = other.fFractionDigitsSet;
- this->fWindowsLocaleName = other.fWindowsLocaleName == NULL ? NULL : new UnicodeString(*other.fWindowsLocaleName);
+ this->fWindowsLocaleName = other.fWindowsLocaleName == nullptr ? nullptr : new UnicodeString(*other.fWindowsLocaleName);
const wchar_t *localeName = nullptr;
@@ -325,13 +325,13 @@ void Win32NumberFormat::parse(const UnicodeString& text, Formattable& result, Pa
}
void Win32NumberFormat::setMaximumFractionDigits(int32_t newValue)
{
- fFractionDigitsSet = TRUE;
+ fFractionDigitsSet = true;
NumberFormat::setMaximumFractionDigits(newValue);
}
void Win32NumberFormat::setMinimumFractionDigits(int32_t newValue)
{
- fFractionDigitsSet = TRUE;
+ fFractionDigitsSet = true;
NumberFormat::setMinimumFractionDigits(newValue);
}
@@ -344,7 +344,7 @@ UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
nBuffer[0] = 0x0000;
- /* Due to the arguments causing a result to be <= 23 characters (+2 for NULL and minus),
+ /* Due to the arguments causing a result to be <= 23 characters (+2 for nullptr and minus),
we don't need to reallocate the buffer. */
va_start(args, fmt);
result = _vsnwprintf(nBuffer, STACK_BUFFER_SIZE, fmt, args);
@@ -360,7 +360,7 @@ UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
newLength = _vscwprintf(fmt, args);
va_end(args);
- nBuffer = NEW_ARRAY(UChar, newLength + 1);
+ nBuffer = NEW_ARRAY(char16_t, newLength + 1);
va_start(args, fmt);
result = _vsnwprintf(nBuffer, newLength + 1, fmt, args);
@@ -412,7 +412,7 @@ UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
DWORD lastError = GetLastError();
if (lastError == ERROR_INSUFFICIENT_BUFFER) {
- int newLength = GetCurrencyFormatEx(localeName, 0, nBuffer, &formatInfo.currency, NULL, 0);
+ int newLength = GetCurrencyFormatEx(localeName, 0, nBuffer, &formatInfo.currency, nullptr, 0);
buffer = NEW_ARRAY(wchar_t, newLength);
buffer[0] = 0x0000;
@@ -432,7 +432,7 @@ UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
if (result == 0) {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
- int newLength = GetNumberFormatEx(localeName, 0, nBuffer, &formatInfo.number, NULL, 0);
+ int newLength = GetNumberFormatEx(localeName, 0, nBuffer, &formatInfo.number, nullptr, 0);
buffer = NEW_ARRAY(wchar_t, newLength);
buffer[0] = 0x0000;
@@ -441,7 +441,7 @@ UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
}
}
- appendTo.append((UChar *)buffer, (int32_t) wcslen(buffer));
+ appendTo.append((char16_t *)buffer, (int32_t) wcslen(buffer));
if (buffer != stackBuffer) {
DELETE_ARRAY(buffer);
diff --git a/contrib/libs/icu/i18n/winnmfmt.h b/contrib/libs/icu/i18n/winnmfmt.h
index 99571d20138..1cf87f4d2c0 100644
--- a/contrib/libs/icu/i18n/winnmfmt.h
+++ b/contrib/libs/icu/i18n/winnmfmt.h
@@ -132,7 +132,7 @@ public:
* </pre>
* @return The class ID for all objects of this class.
*/
- U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
@@ -144,7 +144,7 @@ public:
* given class have the same class ID. Objects of
* other classes have different class IDs.
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID() const;
private:
UnicodeString &format(int32_t numDigits, UnicodeString &appendTo, const wchar_t *format, ...) const;
diff --git a/contrib/libs/icu/i18n/wintzimpl.cpp b/contrib/libs/icu/i18n/wintzimpl.cpp
index a6d93300638..8f2961f8f06 100644
--- a/contrib/libs/icu/i18n/wintzimpl.cpp
+++ b/contrib/libs/icu/i18n/wintzimpl.cpp
@@ -39,14 +39,14 @@ U_NAMESPACE_USE
static UBool getSystemTimeInformation(TimeZone *tz, SYSTEMTIME &daylightDate, SYSTEMTIME &standardDate, int32_t &bias, int32_t &daylightBias, int32_t &standardBias) {
UErrorCode status = U_ZERO_ERROR;
- UBool result = TRUE;
+ UBool result = true;
BasicTimeZone *btz = (BasicTimeZone*)tz; // we should check type
- InitialTimeZoneRule *initial = NULL;
- AnnualTimeZoneRule *std = NULL, *dst = NULL;
+ InitialTimeZoneRule *initial = nullptr;
+ AnnualTimeZoneRule *std = nullptr, *dst = nullptr;
btz->getSimpleRulesNear(uprv_getUTCtime(), initial, std, dst, status);
if (U_SUCCESS(status)) {
- if (std == NULL || dst == NULL) {
+ if (std == nullptr || dst == nullptr) {
bias = -1 * (initial->getRawOffset()/60000);
standardBias = 0;
daylightBias = 0;
@@ -107,7 +107,7 @@ static UBool getSystemTimeInformation(TimeZone *tz, SYSTEMTIME &daylightDate, SY
daylightDate.wMilliseconds = static_cast<WORD>(mil);
}
} else {
- result = FALSE;
+ result = false;
}
delete initial;
@@ -117,12 +117,12 @@ static UBool getSystemTimeInformation(TimeZone *tz, SYSTEMTIME &daylightDate, SY
return result;
}
-static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length) {
- UBool result = FALSE;
+static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const char16_t *icuid, int32_t length) {
+ UBool result = false;
UnicodeString id = UnicodeString(icuid, length);
TimeZone *tz = TimeZone::createTimeZone(id);
- if (tz != NULL) {
+ if (tz != nullptr) {
int32_t bias;
int32_t daylightBias;
int32_t standardBias;
@@ -137,7 +137,7 @@ static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar
zoneInfo->DaylightDate = daylightDate;
zoneInfo->StandardDate = standardDate;
- result = TRUE;
+ result = true;
}
}
@@ -149,12 +149,12 @@ static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar
* information to put into zoneInfo. This includes bias and standard time date and daylight saving date.
*/
U_CAPI UBool U_EXPORT2
-uprv_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length)
+uprv_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const char16_t *icuid, int32_t length)
{
if (getWindowsTimeZoneInfo(zoneInfo, icuid, length)) {
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
diff --git a/contrib/libs/icu/i18n/zonemeta.cpp b/contrib/libs/icu/i18n/zonemeta.cpp
index b8afa4760f1..42051e2f416 100644
--- a/contrib/libs/icu/i18n/zonemeta.cpp
+++ b/contrib/libs/icu/i18n/zonemeta.cpp
@@ -33,85 +33,77 @@
static icu::UMutex gZoneMetaLock;
// CLDR Canonical ID mapping table
-static UHashtable *gCanonicalIDCache = NULL;
-static icu::UInitOnce gCanonicalIDCacheInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable *gCanonicalIDCache = nullptr;
+static icu::UInitOnce gCanonicalIDCacheInitOnce {};
// Metazone mapping table
-static UHashtable *gOlsonToMeta = NULL;
-static icu::UInitOnce gOlsonToMetaInitOnce = U_INITONCE_INITIALIZER;
+static UHashtable *gOlsonToMeta = nullptr;
+static icu::UInitOnce gOlsonToMetaInitOnce {};
// Available metazone IDs vector and table
-static icu::UVector *gMetaZoneIDs = NULL;
-static UHashtable *gMetaZoneIDTable = NULL;
-static icu::UInitOnce gMetaZoneIDsInitOnce = U_INITONCE_INITIALIZER;
+static icu::UVector *gMetaZoneIDs = nullptr;
+static UHashtable *gMetaZoneIDTable = nullptr;
+static icu::UInitOnce gMetaZoneIDsInitOnce {};
// Country info vectors
-static icu::UVector *gSingleZoneCountries = NULL;
-static icu::UVector *gMultiZonesCountries = NULL;
-static icu::UInitOnce gCountryInfoVectorsInitOnce = U_INITONCE_INITIALIZER;
+static icu::UVector *gSingleZoneCountries = nullptr;
+static icu::UVector *gMultiZonesCountries = nullptr;
+static icu::UInitOnce gCountryInfoVectorsInitOnce {};
U_CDECL_BEGIN
/**
* Cleanup callback func
*/
-static UBool U_CALLCONV zoneMeta_cleanup(void)
+static UBool U_CALLCONV zoneMeta_cleanup()
{
- if (gCanonicalIDCache != NULL) {
+ if (gCanonicalIDCache != nullptr) {
uhash_close(gCanonicalIDCache);
- gCanonicalIDCache = NULL;
+ gCanonicalIDCache = nullptr;
}
gCanonicalIDCacheInitOnce.reset();
- if (gOlsonToMeta != NULL) {
+ if (gOlsonToMeta != nullptr) {
uhash_close(gOlsonToMeta);
- gOlsonToMeta = NULL;
+ gOlsonToMeta = nullptr;
}
gOlsonToMetaInitOnce.reset();
- if (gMetaZoneIDTable != NULL) {
+ if (gMetaZoneIDTable != nullptr) {
uhash_close(gMetaZoneIDTable);
- gMetaZoneIDTable = NULL;
+ gMetaZoneIDTable = nullptr;
}
// delete after closing gMetaZoneIDTable, because it holds
// value objects held by the hashtable
delete gMetaZoneIDs;
- gMetaZoneIDs = NULL;
+ gMetaZoneIDs = nullptr;
gMetaZoneIDsInitOnce.reset();
delete gSingleZoneCountries;
- gSingleZoneCountries = NULL;
+ gSingleZoneCountries = nullptr;
delete gMultiZonesCountries;
- gMultiZonesCountries = NULL;
+ gMultiZonesCountries = nullptr;
gCountryInfoVectorsInitOnce.reset();
- return TRUE;
+ return true;
}
/**
- * Deleter for UChar* string
+ * Deleter for char16_t* string
*/
static void U_CALLCONV
deleteUCharString(void *obj) {
- UChar *entry = (UChar*)obj;
+ char16_t *entry = (char16_t*)obj;
uprv_free(entry);
}
/**
- * Deleter for UVector
- */
-static void U_CALLCONV
-deleteUVector(void *obj) {
- delete (icu::UVector*) obj;
-}
-
-/**
* Deleter for OlsonToMetaMappingEntry
*/
static void U_CALLCONV
deleteOlsonToMetaMappingEntry(void *obj) {
icu::OlsonToMetaMappingEntry *entry = (icu::OlsonToMetaMappingEntry*)obj;
- uprv_free(entry);
+ delete entry;
}
U_CDECL_END
@@ -133,14 +125,14 @@ static const char gPrimaryZonesTag[] = "primaryZones";
static const char gWorldTag[] = "001";
-static const UChar gWorld[] = {0x30, 0x30, 0x31, 0x00}; // "001"
+static const char16_t gWorld[] = {0x30, 0x30, 0x31, 0x00}; // "001"
-static const UChar gDefaultFrom[] = {0x31, 0x39, 0x37, 0x30, 0x2D, 0x30, 0x31, 0x2D, 0x30, 0x31,
+static const char16_t gDefaultFrom[] = {0x31, 0x39, 0x37, 0x30, 0x2D, 0x30, 0x31, 0x2D, 0x30, 0x31,
0x20, 0x30, 0x30, 0x3A, 0x30, 0x30, 0x00}; // "1970-01-01 00:00"
-static const UChar gDefaultTo[] = {0x39, 0x39, 0x39, 0x39, 0x2D, 0x31, 0x32, 0x2D, 0x33, 0x31,
+static const char16_t gDefaultTo[] = {0x39, 0x39, 0x39, 0x39, 0x2D, 0x31, 0x32, 0x2D, 0x33, 0x31,
0x20, 0x32, 0x33, 0x3A, 0x35, 0x39, 0x00}; // "9999-12-31 23:59"
-static const UChar gCustomTzPrefix[] = {0x47, 0x4D, 0x54, 0}; // "GMT"
+static const char16_t gCustomTzPrefix[] = {0x47, 0x4D, 0x54, 0}; // "GMT"
#define ASCII_DIGIT(c) (((c)>=0x30 && (c)<=0x39) ? (c)-0x30 : -1)
@@ -149,7 +141,7 @@ static const UChar gCustomTzPrefix[] = {0x47, 0x4D, 0x54, 0}; // "GMT"
* The format used by CLDR metazone mapping is "yyyy-MM-dd HH:mm".
*/
static UDate
-parseDate (const UChar *text, UErrorCode &status) {
+parseDate (const char16_t *text, UErrorCode &status) {
if (U_FAILURE(status)) {
return 0;
}
@@ -220,61 +212,61 @@ parseDate (const UChar *text, UErrorCode &status) {
}
static void U_CALLCONV initCanonicalIDCache(UErrorCode &status) {
- gCanonicalIDCache = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
- if (gCanonicalIDCache == NULL) {
+ gCanonicalIDCache = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
+ if (gCanonicalIDCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(status)) {
- gCanonicalIDCache = NULL;
+ gCanonicalIDCache = nullptr;
}
// No key/value deleters - keys/values are from a resource bundle
ucln_i18n_registerCleanup(UCLN_I18N_ZONEMETA, zoneMeta_cleanup);
}
-const UChar* U_EXPORT2
+const char16_t* U_EXPORT2
ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
if (tzid.isBogus() || tzid.length() > ZID_KEY_MAX) {
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
// Checking the cached results
umtx_initOnce(gCanonicalIDCacheInitOnce, &initCanonicalIDCache, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
- const UChar *canonicalID = NULL;
+ const char16_t *canonicalID = nullptr;
UErrorCode tmpStatus = U_ZERO_ERROR;
- UChar utzid[ZID_KEY_MAX + 1];
+ char16_t utzid[ZID_KEY_MAX + 1];
tzid.extract(utzid, ZID_KEY_MAX + 1, tmpStatus);
U_ASSERT(tmpStatus == U_ZERO_ERROR); // we checked the length of tzid already
if (!uprv_isInvariantUString(utzid, -1)) {
// All of known tz IDs are only containing ASCII invariant characters.
status = U_ILLEGAL_ARGUMENT_ERROR;
- return NULL;
+ return nullptr;
}
// Check if it was already cached
umtx_lock(&gZoneMetaLock);
{
- canonicalID = (const UChar *)uhash_get(gCanonicalIDCache, utzid);
+ canonicalID = (const char16_t *)uhash_get(gCanonicalIDCache, utzid);
}
umtx_unlock(&gZoneMetaLock);
- if (canonicalID != NULL) {
+ if (canonicalID != nullptr) {
return canonicalID;
}
// If not, resolve CLDR canonical ID with resource data
- UBool isInputCanonical = FALSE;
+ UBool isInputCanonical = false;
char id[ZID_KEY_MAX + 1];
tzid.extract(0, 0x7fffffff, id, UPRV_LENGTHOF(id), US_INV);
@@ -286,32 +278,32 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
}
}
- UResourceBundle *top = ures_openDirect(NULL, gKeyTypeData, &tmpStatus);
- UResourceBundle *rb = ures_getByKey(top, gTypeMapTag, NULL, &tmpStatus);
+ UResourceBundle *top = ures_openDirect(nullptr, gKeyTypeData, &tmpStatus);
+ UResourceBundle *rb = ures_getByKey(top, gTypeMapTag, nullptr, &tmpStatus);
ures_getByKey(rb, gTimezoneTag, rb, &tmpStatus);
ures_getByKey(rb, id, rb, &tmpStatus);
if (U_SUCCESS(tmpStatus)) {
// type entry (canonical) found
- // the input is the canonical ID. resolve to const UChar*
+ // the input is the canonical ID. resolve to const char16_t*
canonicalID = TimeZone::findID(tzid);
- isInputCanonical = TRUE;
+ isInputCanonical = true;
}
- if (canonicalID == NULL) {
+ if (canonicalID == nullptr) {
// If a map element not found, then look for an alias
tmpStatus = U_ZERO_ERROR;
ures_getByKey(top, gTypeAliasTag, rb, &tmpStatus);
ures_getByKey(rb, gTimezoneTag, rb, &tmpStatus);
- const UChar *canonical = ures_getStringByKey(rb,id,NULL,&tmpStatus);
+ const char16_t *canonical = ures_getStringByKey(rb,id,nullptr,&tmpStatus);
if (U_SUCCESS(tmpStatus)) {
// canonical map found
canonicalID = canonical;
}
- if (canonicalID == NULL) {
+ if (canonicalID == nullptr) {
// Dereference the input ID using the tz data
- const UChar *derefer = TimeZone::dereferOlsonLink(tzid);
- if (derefer == NULL) {
+ const char16_t *derefer = TimeZone::dereferOlsonLink(tzid);
+ if (derefer == nullptr) {
status = U_ILLEGAL_ARGUMENT_ERROR;
} else {
int32_t len = u_strlen(derefer);
@@ -330,13 +322,13 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
// rb still points to the alias table, so we don't have to go looking
// for it.
tmpStatus = U_ZERO_ERROR;
- canonical = ures_getStringByKey(rb,id,NULL,&tmpStatus);
+ canonical = ures_getStringByKey(rb,id,nullptr,&tmpStatus);
if (U_SUCCESS(tmpStatus)) {
// canonical map for the dereferenced ID found
canonicalID = canonical;
} else {
canonicalID = derefer;
- isInputCanonical = TRUE;
+ isInputCanonical = true;
}
}
}
@@ -345,26 +337,26 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
ures_close(top);
if (U_SUCCESS(status)) {
- U_ASSERT(canonicalID != NULL); // canocanilD must be non-NULL here
+ U_ASSERT(canonicalID != nullptr); // canocanilD must be non-nullptr here
// Put the resolved canonical ID to the cache
umtx_lock(&gZoneMetaLock);
{
- const UChar* idInCache = (const UChar *)uhash_get(gCanonicalIDCache, utzid);
- if (idInCache == NULL) {
- const UChar* key = ZoneMeta::findTimeZoneID(tzid);
- U_ASSERT(key != NULL);
- if (key != NULL) {
- idInCache = (const UChar *)uhash_put(gCanonicalIDCache, (void *)key, (void *)canonicalID, &status);
- U_ASSERT(idInCache == NULL);
+ const char16_t* idInCache = (const char16_t *)uhash_get(gCanonicalIDCache, utzid);
+ if (idInCache == nullptr) {
+ const char16_t* key = ZoneMeta::findTimeZoneID(tzid);
+ U_ASSERT(key != nullptr);
+ if (key != nullptr) {
+ idInCache = (const char16_t *)uhash_put(gCanonicalIDCache, (void *)key, (void *)canonicalID, &status);
+ U_ASSERT(idInCache == nullptr);
}
}
if (U_SUCCESS(status) && isInputCanonical) {
// Also put canonical ID itself into the cache if not exist
- const UChar *canonicalInCache = (const UChar*)uhash_get(gCanonicalIDCache, canonicalID);
- if (canonicalInCache == NULL) {
- canonicalInCache = (const UChar *)uhash_put(gCanonicalIDCache, (void *)canonicalID, (void *)canonicalID, &status);
- U_ASSERT(canonicalInCache == NULL);
+ const char16_t *canonicalInCache = (const char16_t*)uhash_get(gCanonicalIDCache, canonicalID);
+ if (canonicalInCache == nullptr) {
+ canonicalInCache = (const char16_t *)uhash_put(gCanonicalIDCache, (void *)canonicalID, (void *)canonicalID, &status);
+ U_ASSERT(canonicalInCache == nullptr);
}
}
}
@@ -376,18 +368,18 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
UnicodeString& U_EXPORT2
ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UnicodeString &systemID, UErrorCode& status) {
- const UChar *canonicalID = getCanonicalCLDRID(tzid, status);
- if (U_FAILURE(status) || canonicalID == NULL) {
+ const char16_t *canonicalID = getCanonicalCLDRID(tzid, status);
+ if (U_FAILURE(status) || canonicalID == nullptr) {
systemID.setToBogus();
return systemID;
}
- systemID.setTo(TRUE, canonicalID, -1);
+ systemID.setTo(true, canonicalID, -1);
return systemID;
}
-const UChar* U_EXPORT2
+const char16_t* U_EXPORT2
ZoneMeta::getCanonicalCLDRID(const TimeZone& tz) {
- if (dynamic_cast<const OlsonTimeZone *>(&tz) != NULL) {
+ if (dynamic_cast<const OlsonTimeZone *>(&tz) != nullptr) {
// short cut for OlsonTimeZone
const OlsonTimeZone *otz = (const OlsonTimeZone*)&tz;
return otz->getCanonicalID();
@@ -400,40 +392,40 @@ ZoneMeta::getCanonicalCLDRID(const TimeZone& tz) {
static void U_CALLCONV countryInfoVectorsInit(UErrorCode &status) {
// Create empty vectors
// No deleters for these UVectors, it's a reference to a resource bundle string.
- gSingleZoneCountries = new UVector(NULL, uhash_compareUChars, status);
- if (gSingleZoneCountries == NULL) {
+ gSingleZoneCountries = new UVector(nullptr, uhash_compareUChars, status);
+ if (gSingleZoneCountries == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
- gMultiZonesCountries = new UVector(NULL, uhash_compareUChars, status);
- if (gMultiZonesCountries == NULL) {
+ gMultiZonesCountries = new UVector(nullptr, uhash_compareUChars, status);
+ if (gMultiZonesCountries == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(status)) {
delete gSingleZoneCountries;
delete gMultiZonesCountries;
- gSingleZoneCountries = NULL;
- gMultiZonesCountries = NULL;
+ gSingleZoneCountries = nullptr;
+ gMultiZonesCountries = nullptr;
}
ucln_i18n_registerCleanup(UCLN_I18N_ZONEMETA, zoneMeta_cleanup);
}
UnicodeString& U_EXPORT2
-ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country, UBool *isPrimary /* = NULL */) {
- if (isPrimary != NULL) {
- *isPrimary = FALSE;
+ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country, UBool *isPrimary /* = nullptr */) {
+ if (isPrimary != nullptr) {
+ *isPrimary = false;
}
- const UChar *region = TimeZone::getRegion(tzid);
- if (region != NULL && u_strcmp(gWorld, region) != 0) {
+ const char16_t *region = TimeZone::getRegion(tzid);
+ if (region != nullptr && u_strcmp(gWorld, region) != 0) {
country.setTo(region, -1);
} else {
country.setToBogus();
return country;
}
- if (isPrimary != NULL) {
+ if (isPrimary != nullptr) {
char regionBuf[] = {0, 0, 0};
// Checking the cached results
@@ -444,8 +436,8 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
}
// Check if it was already cached
- UBool cached = FALSE;
- UBool singleZone = FALSE;
+ UBool cached = false;
+ UBool singleZone = false;
umtx_lock(&gZoneMetaLock);
{
singleZone = cached = gSingleZoneCountries->contains((void*)region);
@@ -463,11 +455,11 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
u_UCharsToChars(region, regionBuf, 2);
- StringEnumeration *ids = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL_LOCATION, regionBuf, NULL, status);
+ StringEnumeration *ids = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL_LOCATION, regionBuf, nullptr, status);
int32_t idsLen = ids->count(status);
if (U_SUCCESS(status) && idsLen == 1) {
// only the single zone is available for the region
- singleZone = TRUE;
+ singleZone = true;
}
delete ids;
@@ -477,11 +469,11 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
UErrorCode ec = U_ZERO_ERROR;
if (singleZone) {
if (!gSingleZoneCountries->contains((void*)region)) {
- gSingleZoneCountries->addElementX((void*)region, ec);
+ gSingleZoneCountries->addElement((void*)region, ec);
}
} else {
if (!gMultiZonesCountries->contains((void*)region)) {
- gMultiZonesCountries->addElementX((void*)region, ec);
+ gMultiZonesCountries->addElement((void*)region, ec);
}
}
}
@@ -489,7 +481,7 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
}
if (singleZone) {
- *isPrimary = TRUE;
+ *isPrimary = true;
} else {
// Note: We may cache the primary zone map in future.
@@ -500,18 +492,18 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
u_UCharsToChars(region, regionBuf, 2);
}
- UResourceBundle *rb = ures_openDirect(NULL, gMetaZones, &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, gMetaZones, &status);
ures_getByKey(rb, gPrimaryZonesTag, rb, &status);
- const UChar *primaryZone = ures_getStringByKey(rb, regionBuf, &idLen, &status);
+ const char16_t *primaryZone = ures_getStringByKey(rb, regionBuf, &idLen, &status);
if (U_SUCCESS(status)) {
if (tzid.compare(primaryZone, idLen) == 0) {
- *isPrimary = TRUE;
+ *isPrimary = true;
} else {
// The given ID might not be a canonical ID
UnicodeString canonicalID;
TimeZone::getCanonicalID(tzid, canonicalID, status);
if (U_SUCCESS(status) && canonicalID.compare(primaryZone, idLen) == 0) {
- *isPrimary = TRUE;
+ *isPrimary = true;
}
}
}
@@ -524,14 +516,14 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
UnicodeString& U_EXPORT2
ZoneMeta::getMetazoneID(const UnicodeString &tzid, UDate date, UnicodeString &result) {
- UBool isSet = FALSE;
+ UBool isSet = false;
const UVector *mappings = getMetazoneMappings(tzid);
- if (mappings != NULL) {
+ if (mappings != nullptr) {
for (int32_t i = 0; i < mappings->size(); i++) {
OlsonToMetaMappingEntry *mzm = (OlsonToMetaMappingEntry*)mappings->elementAt(i);
if (mzm->from <= date && mzm->to > date) {
result.setTo(mzm->mzid, -1);
- isSet = TRUE;
+ isSet = true;
break;
}
}
@@ -543,14 +535,14 @@ ZoneMeta::getMetazoneID(const UnicodeString &tzid, UDate date, UnicodeString &re
}
static void U_CALLCONV olsonToMetaInit(UErrorCode &status) {
- U_ASSERT(gOlsonToMeta == NULL);
+ U_ASSERT(gOlsonToMeta == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_ZONEMETA, zoneMeta_cleanup);
- gOlsonToMeta = uhash_open(uhash_hashUChars, uhash_compareUChars, NULL, &status);
+ gOlsonToMeta = uhash_open(uhash_hashUChars, uhash_compareUChars, nullptr, &status);
if (U_FAILURE(status)) {
- gOlsonToMeta = NULL;
+ gOlsonToMeta = nullptr;
} else {
uhash_setKeyDeleter(gOlsonToMeta, deleteUCharString);
- uhash_setValueDeleter(gOlsonToMeta, deleteUVector);
+ uhash_setValueDeleter(gOlsonToMeta, uprv_deleteUObject);
}
}
@@ -558,19 +550,19 @@ static void U_CALLCONV olsonToMetaInit(UErrorCode &status) {
const UVector* U_EXPORT2
ZoneMeta::getMetazoneMappings(const UnicodeString &tzid) {
UErrorCode status = U_ZERO_ERROR;
- UChar tzidUChars[ZID_KEY_MAX + 1];
+ char16_t tzidUChars[ZID_KEY_MAX + 1];
tzid.extract(tzidUChars, ZID_KEY_MAX + 1, status);
if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) {
- return NULL;
+ return nullptr;
}
umtx_initOnce(gOlsonToMetaInitOnce, &olsonToMetaInit, status);
if (U_FAILURE(status)) {
- return NULL;
+ return nullptr;
}
// get the mapping from cache
- const UVector *result = NULL;
+ const UVector *result = nullptr;
umtx_lock(&gZoneMetaLock);
{
@@ -578,15 +570,15 @@ ZoneMeta::getMetazoneMappings(const UnicodeString &tzid) {
}
umtx_unlock(&gZoneMetaLock);
- if (result != NULL) {
+ if (result != nullptr) {
return result;
}
// miss the cache - create new one
UVector *tmpResult = createMetazoneMappings(tzid);
- if (tmpResult == NULL) {
+ if (tmpResult == nullptr) {
// not available
- return NULL;
+ return nullptr;
}
// put the new one into the cache
@@ -594,20 +586,20 @@ ZoneMeta::getMetazoneMappings(const UnicodeString &tzid) {
{
// make sure it's already created
result = (UVector*) uhash_get(gOlsonToMeta, tzidUChars);
- if (result == NULL) {
+ if (result == nullptr) {
// add the one just created
int32_t tzidLen = tzid.length() + 1;
- UChar *key = (UChar*)uprv_malloc(tzidLen * sizeof(UChar));
- if (key == NULL) {
- // memory allocation error.. just return NULL
- result = NULL;
+ char16_t *key = (char16_t*)uprv_malloc(tzidLen * sizeof(char16_t));
+ if (key == nullptr) {
+ // memory allocation error.. just return nullptr
+ result = nullptr;
delete tmpResult;
} else {
tzid.extract(key, tzidLen, status);
uhash_put(gOlsonToMeta, key, tmpResult, &status);
if (U_FAILURE(status)) {
// delete the mapping
- result = NULL;
+ result = nullptr;
delete tmpResult;
} else {
result = tmpResult;
@@ -625,11 +617,11 @@ ZoneMeta::getMetazoneMappings(const UnicodeString &tzid) {
UVector*
ZoneMeta::createMetazoneMappings(const UnicodeString &tzid) {
- UVector *mzMappings = NULL;
+ LocalPointer <UVector> mzMappings;
UErrorCode status = U_ZERO_ERROR;
UnicodeString canonicalID;
- UResourceBundle *rb = ures_openDirect(NULL, gMetaZones, &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, gMetaZones, &status);
ures_getByKey(rb, gMetazoneInfo, rb, &status);
getCanonicalCLDRID(tzid, canonicalID, status);
@@ -650,17 +642,17 @@ ZoneMeta::createMetazoneMappings(const UnicodeString &tzid) {
ures_getByKey(rb, tzKey, rb, &status);
if (U_SUCCESS(status)) {
- UResourceBundle *mz = NULL;
+ UResourceBundle *mz = nullptr;
while (ures_hasNext(rb)) {
mz = ures_getNextResource(rb, mz, &status);
- const UChar *mz_name = ures_getStringByIndex(mz, 0, NULL, &status);
- const UChar *mz_from = gDefaultFrom;
- const UChar *mz_to = gDefaultTo;
+ const char16_t *mz_name = ures_getStringByIndex(mz, 0, nullptr, &status);
+ const char16_t *mz_from = gDefaultFrom;
+ const char16_t *mz_to = gDefaultTo;
if (ures_getSize(mz) == 3) {
- mz_from = ures_getStringByIndex(mz, 1, NULL, &status);
- mz_to = ures_getStringByIndex(mz, 2, NULL, &status);
+ mz_from = ures_getStringByIndex(mz, 1, nullptr, &status);
+ mz_to = ures_getStringByIndex(mz, 2, nullptr, &status);
}
if(U_FAILURE(status)){
@@ -677,47 +669,38 @@ ZoneMeta::createMetazoneMappings(const UnicodeString &tzid) {
continue;
}
- OlsonToMetaMappingEntry *entry = (OlsonToMetaMappingEntry*)uprv_malloc(sizeof(OlsonToMetaMappingEntry));
- if (entry == NULL) {
- status = U_MEMORY_ALLOCATION_ERROR;
+ LocalPointer<OlsonToMetaMappingEntry> entry(new OlsonToMetaMappingEntry, status);
+ if (U_FAILURE(status)) {
break;
}
entry->mzid = mz_name;
entry->from = from;
entry->to = to;
- if (mzMappings == NULL) {
- mzMappings = new UVector(deleteOlsonToMetaMappingEntry, NULL, status);
+ if (mzMappings.isNull()) {
+ mzMappings.adoptInsteadAndCheckErrorCode(
+ new UVector(deleteOlsonToMetaMappingEntry, nullptr, status), status);
if (U_FAILURE(status)) {
- delete mzMappings;
- mzMappings = NULL;
- uprv_free(entry);
break;
}
}
- mzMappings->addElementX(entry, status);
+ mzMappings->adoptElement(entry.orphan(), status);
if (U_FAILURE(status)) {
break;
}
}
ures_close(mz);
- if (U_FAILURE(status)) {
- if (mzMappings != NULL) {
- delete mzMappings;
- mzMappings = NULL;
- }
- }
}
}
ures_close(rb);
- return mzMappings;
+ return U_SUCCESS(status) ? mzMappings.orphan() : nullptr;
}
UnicodeString& U_EXPORT2
ZoneMeta::getZoneIdByMetazone(const UnicodeString &mzid, const UnicodeString &region, UnicodeString &result) {
UErrorCode status = U_ZERO_ERROR;
- const UChar *tzid = NULL;
+ const char16_t *tzid = nullptr;
int32_t tzidLen = 0;
char keyBuf[ZID_KEY_MAX + 1];
int32_t keyLen = 0;
@@ -730,7 +713,7 @@ ZoneMeta::getZoneIdByMetazone(const UnicodeString &mzid, const UnicodeString &re
keyLen = mzid.extract(0, mzid.length(), keyBuf, ZID_KEY_MAX + 1, US_INV);
keyBuf[keyLen] = 0;
- UResourceBundle *rb = ures_openDirect(NULL, gMetaZones, &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, gMetaZones, &status);
ures_getByKey(rb, gMapTimezonesTag, rb, &status);
ures_getByKey(rb, keyBuf, rb, &status);
@@ -744,14 +727,14 @@ ZoneMeta::getZoneIdByMetazone(const UnicodeString &mzid, const UnicodeString &re
status = U_ZERO_ERROR;
}
}
- if (U_SUCCESS(status) && tzid == NULL) {
+ if (U_SUCCESS(status) && tzid == nullptr) {
// try "001"
tzid = ures_getStringByKey(rb, gWorldTag, &tzidLen, &status);
}
}
ures_close(rb);
- if (tzid == NULL) {
+ if (tzid == nullptr) {
result.setToBogus();
} else {
result.setTo(tzid, tzidLen);
@@ -761,29 +744,30 @@ ZoneMeta::getZoneIdByMetazone(const UnicodeString &mzid, const UnicodeString &re
}
static void U_CALLCONV initAvailableMetaZoneIDs () {
- U_ASSERT(gMetaZoneIDs == NULL);
- U_ASSERT(gMetaZoneIDTable == NULL);
+ U_ASSERT(gMetaZoneIDs == nullptr);
+ U_ASSERT(gMetaZoneIDTable == nullptr);
ucln_i18n_registerCleanup(UCLN_I18N_ZONEMETA, zoneMeta_cleanup);
UErrorCode status = U_ZERO_ERROR;
- gMetaZoneIDTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, &status);
- if (U_FAILURE(status) || gMetaZoneIDTable == NULL) {
- gMetaZoneIDTable = NULL;
+ gMetaZoneIDTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, nullptr, &status);
+ if (U_FAILURE(status) || gMetaZoneIDTable == nullptr) {
+ gMetaZoneIDTable = nullptr;
return;
}
uhash_setKeyDeleter(gMetaZoneIDTable, uprv_deleteUObject);
// No valueDeleter, because the vector maintain the value objects
- gMetaZoneIDs = new UVector(NULL, uhash_compareUChars, status);
- if (U_FAILURE(status) || gMetaZoneIDs == NULL) {
- gMetaZoneIDs = NULL;
+ gMetaZoneIDs = new UVector(nullptr, uhash_compareUChars, status);
+ if (U_FAILURE(status) || gMetaZoneIDs == nullptr) {
+ delete gMetaZoneIDs;
+ gMetaZoneIDs = nullptr;
uhash_close(gMetaZoneIDTable);
- gMetaZoneIDTable = NULL;
+ gMetaZoneIDTable = nullptr;
return;
}
gMetaZoneIDs->setDeleter(uprv_free);
- UResourceBundle *rb = ures_openDirect(NULL, gMetaZones, &status);
- UResourceBundle *bundle = ures_getByKey(rb, gMapTimezonesTag, NULL, &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, gMetaZones, &status);
+ UResourceBundle *bundle = ures_getByKey(rb, gMapTimezonesTag, nullptr, &status);
StackUResourceBundle res;
while (U_SUCCESS(status) && ures_hasNext(bundle)) {
ures_getNextResource(bundle, res.getAlias(), &status);
@@ -792,20 +776,22 @@ static void U_CALLCONV initAvailableMetaZoneIDs () {
}
const char *mzID = ures_getKey(res.getAlias());
int32_t len = static_cast<int32_t>(uprv_strlen(mzID));
- UChar *uMzID = (UChar*)uprv_malloc(sizeof(UChar) * (len + 1));
- if (uMzID == NULL) {
+ LocalMemory<char16_t> uMzID((char16_t*)uprv_malloc(sizeof(char16_t) * (len + 1)));
+ if (uMzID.isNull()) {
status = U_MEMORY_ALLOCATION_ERROR;
break;
}
- u_charsToUChars(mzID, uMzID, len);
+ u_charsToUChars(mzID, uMzID.getAlias(), len);
uMzID[len] = 0;
- UnicodeString *usMzID = new UnicodeString(uMzID);
- if (uhash_get(gMetaZoneIDTable, usMzID) == NULL) {
- gMetaZoneIDs->addElementX((void *)uMzID, status);
- uhash_put(gMetaZoneIDTable, (void *)usMzID, (void *)uMzID, &status);
- } else {
- uprv_free(uMzID);
- delete usMzID;
+ LocalPointer<UnicodeString> usMzID(new UnicodeString(uMzID.getAlias()), status);
+ if (U_FAILURE(status)) {
+ break;
+ }
+ if (uhash_get(gMetaZoneIDTable, usMzID.getAlias()) == nullptr) {
+ // Note: gMetaZoneIDTable adopts its keys, but not its values.
+ // gMetaZoneIDs adopts its values.
+ uhash_put(gMetaZoneIDTable, usMzID.orphan(), uMzID.getAlias(), &status);
+ gMetaZoneIDs->adoptElement(uMzID.orphan(), status);
}
}
ures_close(bundle);
@@ -814,8 +800,8 @@ static void U_CALLCONV initAvailableMetaZoneIDs () {
if (U_FAILURE(status)) {
uhash_close(gMetaZoneIDTable);
delete gMetaZoneIDs;
- gMetaZoneIDTable = NULL;
- gMetaZoneIDs = NULL;
+ gMetaZoneIDTable = nullptr;
+ gMetaZoneIDs = nullptr;
}
}
@@ -825,16 +811,16 @@ ZoneMeta::getAvailableMetazoneIDs() {
return gMetaZoneIDs;
}
-const UChar*
+const char16_t*
ZoneMeta::findMetaZoneID(const UnicodeString& mzid) {
umtx_initOnce(gMetaZoneIDsInitOnce, &initAvailableMetaZoneIDs);
- if (gMetaZoneIDTable == NULL) {
- return NULL;
+ if (gMetaZoneIDTable == nullptr) {
+ return nullptr;
}
- return (const UChar*)uhash_get(gMetaZoneIDTable, &mzid);
+ return (const char16_t*)uhash_get(gMetaZoneIDTable, &mzid);
}
-const UChar*
+const char16_t*
ZoneMeta::findTimeZoneID(const UnicodeString& tzid) {
return TimeZone::findID(tzid);
}
@@ -842,10 +828,10 @@ ZoneMeta::findTimeZoneID(const UnicodeString& tzid) {
TimeZone*
ZoneMeta::createCustomTimeZone(int32_t offset) {
- UBool negative = FALSE;
+ UBool negative = false;
int32_t tmp = offset;
if (offset < 0) {
- negative = TRUE;
+ negative = true;
tmp = -offset;
}
uint8_t hour, min, sec;
@@ -867,52 +853,52 @@ ZoneMeta::formatCustomID(uint8_t hour, uint8_t min, uint8_t sec, UBool negative,
id.setTo(gCustomTzPrefix, -1);
if (hour != 0 || min != 0) {
if (negative) {
- id.append((UChar)0x2D); // '-'
+ id.append((char16_t)0x2D); // '-'
} else {
- id.append((UChar)0x2B); // '+'
+ id.append((char16_t)0x2B); // '+'
}
// Always use US-ASCII digits
- id.append((UChar)(0x30 + (hour%100)/10));
- id.append((UChar)(0x30 + (hour%10)));
- id.append((UChar)0x3A); // ':'
- id.append((UChar)(0x30 + (min%100)/10));
- id.append((UChar)(0x30 + (min%10)));
+ id.append((char16_t)(0x30 + (hour%100)/10));
+ id.append((char16_t)(0x30 + (hour%10)));
+ id.append((char16_t)0x3A); // ':'
+ id.append((char16_t)(0x30 + (min%100)/10));
+ id.append((char16_t)(0x30 + (min%10)));
if (sec != 0) {
- id.append((UChar)0x3A); // ':'
- id.append((UChar)(0x30 + (sec%100)/10));
- id.append((UChar)(0x30 + (sec%10)));
+ id.append((char16_t)0x3A); // ':'
+ id.append((char16_t)(0x30 + (sec%100)/10));
+ id.append((char16_t)(0x30 + (sec%10)));
}
}
return id;
}
-const UChar*
+const char16_t*
ZoneMeta::getShortID(const TimeZone& tz) {
- const UChar* canonicalID = NULL;
- if (dynamic_cast<const OlsonTimeZone *>(&tz) != NULL) {
+ const char16_t* canonicalID = nullptr;
+ if (dynamic_cast<const OlsonTimeZone *>(&tz) != nullptr) {
// short cut for OlsonTimeZone
const OlsonTimeZone *otz = (const OlsonTimeZone*)&tz;
canonicalID = otz->getCanonicalID();
}
- if (canonicalID == NULL) {
- return NULL;
+ if (canonicalID == nullptr) {
+ return nullptr;
}
return getShortIDFromCanonical(canonicalID);
}
-const UChar*
+const char16_t*
ZoneMeta::getShortID(const UnicodeString& id) {
UErrorCode status = U_ZERO_ERROR;
- const UChar* canonicalID = ZoneMeta::getCanonicalCLDRID(id, status);
- if (U_FAILURE(status) || canonicalID == NULL) {
- return NULL;
+ const char16_t* canonicalID = ZoneMeta::getCanonicalCLDRID(id, status);
+ if (U_FAILURE(status) || canonicalID == nullptr) {
+ return nullptr;
}
return ZoneMeta::getShortIDFromCanonical(canonicalID);
}
-const UChar*
-ZoneMeta::getShortIDFromCanonical(const UChar* canonicalID) {
- const UChar* shortID = NULL;
+const char16_t*
+ZoneMeta::getShortIDFromCanonical(const char16_t* canonicalID) {
+ const char16_t* shortID = nullptr;
int32_t len = u_strlen(canonicalID);
char tzidKey[ZID_KEY_MAX + 1];
@@ -928,10 +914,10 @@ ZoneMeta::getShortIDFromCanonical(const UChar* canonicalID) {
}
UErrorCode status = U_ZERO_ERROR;
- UResourceBundle *rb = ures_openDirect(NULL, gKeyTypeData, &status);
+ UResourceBundle *rb = ures_openDirect(nullptr, gKeyTypeData, &status);
ures_getByKey(rb, gTypeMapTag, rb, &status);
ures_getByKey(rb, gTimezoneTag, rb, &status);
- shortID = ures_getStringByKey(rb, tzidKey, NULL, &status);
+ shortID = ures_getStringByKey(rb, tzidKey, nullptr, &status);
ures_close(rb);
return shortID;
diff --git a/contrib/libs/icu/i18n/zonemeta.h b/contrib/libs/icu/i18n/zonemeta.h
index f21399342b9..8c5840c2659 100644
--- a/contrib/libs/icu/i18n/zonemeta.h
+++ b/contrib/libs/icu/i18n/zonemeta.h
@@ -18,11 +18,11 @@
U_NAMESPACE_BEGIN
-typedef struct OlsonToMetaMappingEntry {
- const UChar *mzid; // const because it's a reference to a resource bundle string.
+struct OlsonToMetaMappingEntry : public UMemory {
+ const char16_t *mzid; // const because it's a reference to a resource bundle string.
UDate from;
UDate to;
-} OlsonToMetaMappingEntry;
+};
class UVector;
class TimeZone;
@@ -40,19 +40,19 @@ public:
/**
* Return the canonical id for this tzid defined by CLDR, which might be the id itself.
- * This overload method returns a persistent const UChar*, which is guaranteed to persist
+ * This overload method returns a persistent const char16_t*, which is guaranteed to persist
* (a pointer to a resource). If the given system tzid is not known, U_ILLEGAL_ARGUMENT_ERROR
* is set in the status.
* @param tzid Zone ID
* @param status Receives the status
* @return The canonical ID for the input time zone ID
*/
- static const UChar* U_EXPORT2 getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status);
+ static const char16_t* U_EXPORT2 getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status);
/*
* Convenient method returning CLDR canonical ID for the given time zone
*/
- static const UChar* U_EXPORT2 getCanonicalCLDRID(const TimeZone& tz);
+ static const char16_t* U_EXPORT2 getCanonicalCLDRID(const TimeZone& tz);
/**
* Return the canonical country code for this tzid. If we have none, or if the time zone
@@ -62,7 +62,7 @@ public:
* @param isPrimary [output] true if the zone is the primary zone for the country
* @return A reference to the result country
*/
- static UnicodeString& U_EXPORT2 getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country, UBool *isPrimary = NULL);
+ static UnicodeString& U_EXPORT2 getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country, UBool *isPrimary = nullptr);
/**
* Returns a CLDR metazone ID for the given Olson tzid and time.
@@ -78,16 +78,16 @@ public:
static const UVector* U_EXPORT2 getAvailableMetazoneIDs();
/**
- * Returns the pointer to the persistent time zone ID string, or NULL if the given tzid is not in the
+ * Returns the pointer to the persistent time zone ID string, or nullptr if the given tzid is not in the
* tz database. This method is useful when you maintain persistent zone IDs without duplication.
*/
- static const UChar* U_EXPORT2 findTimeZoneID(const UnicodeString& tzid);
+ static const char16_t* U_EXPORT2 findTimeZoneID(const UnicodeString& tzid);
/**
- * Returns the pointer to the persistent meta zone ID string, or NULL if the given mzid is not available.
+ * Returns the pointer to the persistent meta zone ID string, or nullptr if the given mzid is not available.
* This method is useful when you maintain persistent meta zone IDs without duplication.
*/
- static const UChar* U_EXPORT2 findMetaZoneID(const UnicodeString& mzid);
+ static const char16_t* U_EXPORT2 findMetaZoneID(const UnicodeString& mzid);
/**
* Creates a custom zone for the offset
@@ -102,7 +102,7 @@ public:
* @param tz the time zone
* @return the short ID of the time zone, or null if the short ID is not available.
*/
- static const UChar* U_EXPORT2 getShortID(const TimeZone& tz);
+ static const char16_t* U_EXPORT2 getShortID(const TimeZone& tz);
/**
* Returns the time zone's short ID (null terminated) for the zone ID.
@@ -110,13 +110,13 @@ public:
* @param tz the time zone ID
* @return the short ID of the time zone ID, or null if the short ID is not available.
*/
- static const UChar* U_EXPORT2 getShortID(const UnicodeString& id);
+ static const char16_t* U_EXPORT2 getShortID(const UnicodeString& id);
private:
- ZoneMeta(); // Prevent construction.
+ ZoneMeta() = delete; // Prevent construction.
static UVector* createMetazoneMappings(const UnicodeString &tzid);
static UnicodeString& formatCustomID(uint8_t hour, uint8_t min, uint8_t sec, UBool negative, UnicodeString& id);
- static const UChar* getShortIDFromCanonical(const UChar* canonicalID);
+ static const char16_t* getShortIDFromCanonical(const char16_t* canonicalID);
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/i18n/zrule.cpp b/contrib/libs/icu/i18n/zrule.cpp
index bdf84965b5f..1ba0c9705e9 100644
--- a/contrib/libs/icu/i18n/zrule.cpp
+++ b/contrib/libs/icu/i18n/zrule.cpp
@@ -40,7 +40,7 @@ zrule_equals(const ZRule* rule1, const ZRule* rule2) {
}
U_CAPI void U_EXPORT2
-zrule_getName(ZRule* rule, UChar* name, int32_t nameLength) {
+zrule_getName(ZRule* rule, char16_t* name, int32_t nameLength) {
UnicodeString s(nameLength==-1, name, nameLength);
s = ((TimeZoneRule*)rule)->TimeZoneRule::getName(s);
nameLength = s.length();
@@ -68,7 +68,7 @@ zrule_isEquivalentTo(ZRule* rule1, ZRule* rule2) {
*********************************************************************/
U_CAPI IZRule* U_EXPORT2
-izrule_open(const UChar* name, int32_t nameLength, int32_t rawOffset, int32_t dstSavings) {
+izrule_open(const char16_t* name, int32_t nameLength, int32_t rawOffset, int32_t dstSavings) {
UnicodeString s(nameLength==-1, name, nameLength);
return (IZRule*) new InitialTimeZoneRule(s, rawOffset, dstSavings);
}
@@ -89,12 +89,12 @@ izrule_equals(const IZRule* rule1, const IZRule* rule2) {
}
U_CAPI void U_EXPORT2
-izrule_getName(IZRule* rule, UChar* & name, int32_t & nameLength) {
+izrule_getName(IZRule* rule, char16_t* & name, int32_t & nameLength) {
// UnicodeString s(nameLength==-1, name, nameLength);
UnicodeString s;
((InitialTimeZoneRule*)rule)->InitialTimeZoneRule::getName(s);
nameLength = s.length();
- name = (UChar*)uprv_malloc(nameLength);
+ name = (char16_t*)uprv_malloc(nameLength);
memcpy(name, s.getBuffer(), nameLength);
return;
}
diff --git a/contrib/libs/icu/i18n/zrule.h b/contrib/libs/icu/i18n/zrule.h
index f395ad4c3f3..2bea64c6d4f 100644
--- a/contrib/libs/icu/i18n/zrule.h
+++ b/contrib/libs/icu/i18n/zrule.h
@@ -20,8 +20,6 @@
#include "unicode/uobject.h"
-#ifndef UCNV_H
-
/**
* A TimeZoneRule. Use the zrule_* API to manipulate. Create with
* zrule_open*, and destroy with zrule_close.
@@ -43,8 +41,6 @@ typedef struct IZRule IZRule;
struct AZRule;
typedef struct AZRule AZRule;
-#endif
-
/*********************************************************************
* ZRule API
*********************************************************************/
diff --git a/contrib/libs/icu/i18n/ztrans.h b/contrib/libs/icu/i18n/ztrans.h
index b23bb4fc706..a1f39100557 100644
--- a/contrib/libs/icu/i18n/ztrans.h
+++ b/contrib/libs/icu/i18n/ztrans.h
@@ -20,8 +20,6 @@
#include "unicode/uobject.h"
-#ifndef UCNV_H
-
/**
* A TimeZoneTransition. Use the ztrans_* API to manipulate. Create with
* ztrans_open*, and destroy with ztrans_close.
@@ -29,8 +27,6 @@
struct ZTrans;
typedef struct ZTrans ZTrans;
-#endif
-
/**
* Constructs a time zone transition with the time and the rules before/after
* the transition.
diff --git a/contrib/libs/icu/icudt70_dat.rodata b/contrib/libs/icu/icudt73_dat.rodata
index e6089ca5b7f..3fe621b7ed2 100644
--- a/contrib/libs/icu/icudt70_dat.rodata
+++ b/contrib/libs/icu/icudt73_dat.rodata
Binary files differ
diff --git a/contrib/libs/icu/include/unicode/alphaindex.h b/contrib/libs/icu/include/unicode/alphaindex.h
index d0cdd817fba..cbce2127176 100644
--- a/contrib/libs/icu/include/unicode/alphaindex.h
+++ b/contrib/libs/icu/include/unicode/alphaindex.h
@@ -277,7 +277,7 @@ public:
int32_t getBucketIndex(const UnicodeString &name, UErrorCode &errorCode) const;
/**
- * Returns the index-th bucket. Returns NULL if the index is out of range.
+ * Returns the index-th bucket. Returns nullptr if the index is out of range.
*
* @param index bucket number
* @return the index-th bucket
@@ -627,7 +627,7 @@ public:
/**
* Return the data pointer of the Record currently being iterated over.
- * Return NULL if the current iteration position before the first item in this Bucket,
+ * Return nullptr if the current iteration position before the first item in this Bucket,
* or after the last.
*
* @return The current Record's data pointer.
@@ -649,7 +649,7 @@ private:
* No Copy constructor.
* @internal (private)
*/
- AlphabeticIndex(const AlphabeticIndex &other);
+ AlphabeticIndex(const AlphabeticIndex &other) = delete;
/**
* No assignment.
@@ -731,7 +731,7 @@ private:
int32_t itemsIterIndex_;
Bucket *currentBucket_; // While an iteration of the index in underway,
// point to the bucket for the current label.
- // NULL when no iteration underway.
+ // nullptr when no iteration underway.
int32_t maxLabelCount_; // Limit on # of labels permitted in the index.
diff --git a/contrib/libs/icu/include/unicode/appendable.h b/contrib/libs/icu/include/unicode/appendable.h
index f77df88e39c..0e37f4562a5 100644
--- a/contrib/libs/icu/include/unicode/appendable.h
+++ b/contrib/libs/icu/include/unicode/appendable.h
@@ -79,7 +79,7 @@ public:
/**
* Appends a string.
* The default implementation calls appendCodeUnit(char16_t) for each code unit.
- * @param s string, must not be NULL if length!=0
+ * @param s string, must not be nullptr if length!=0
* @param length string length, or -1 if NUL-terminated
* @return true if the operation succeeded
* @stable ICU 4.8
@@ -186,7 +186,7 @@ public:
/**
* Appends a string to the UnicodeString.
- * @param s string, must not be NULL if length!=0
+ * @param s string, must not be nullptr if length!=0
* @param length string length, or -1 if NUL-terminated
* @return true if the operation succeeded
* @stable ICU 4.8
diff --git a/contrib/libs/icu/include/unicode/basictz.h b/contrib/libs/icu/include/unicode/basictz.h
index 250ea309279..4f8e4cacb14 100644
--- a/contrib/libs/icu/include/unicode/basictz.h
+++ b/contrib/libs/icu/include/unicode/basictz.h
@@ -107,7 +107,7 @@ public:
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
* which represent time transitions for this time zone. On successful return,
- * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and
+ * the argument initial points to non-nullptr <code>InitialTimeZoneRule</code> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code>
* instances up to the size specified by trscount. The results are referencing the
* rule instance held by this time zone instance. Therefore, after this time zone
@@ -139,30 +139,28 @@ public:
* The time zone rule objects returned by this method is owned by the caller, so the caller is
* responsible for deleting them after use.
* @param date The date used for extracting time zone rules.
- * @param initial Receives the <code>InitialTimeZone</code>, always not NULL.
+ * @param initial Receives the <code>InitialTimeZone</code>, always not nullptr.
* @param std Receives the <code>AnnualTimeZoneRule</code> for standard time transitions.
* When this time time zone does not observe daylight saving times around the
- * specified date, NULL is set.
+ * specified date, nullptr is set.
* @param dst Receives the <code>AnnualTimeZoneRule</code> for daylight saving time
* transitions. When this time zone does not observer daylight saving times
- * around the specified date, NULL is set.
+ * around the specified date, nullptr is set.
* @param status Receives error status code.
* @stable ICU 3.8
*/
virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const;
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
- * @draft ICU 69
+ * @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& status) const;
-#endif /* U_FORCE_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
@@ -188,13 +186,15 @@ protected:
#ifndef U_HIDE_INTERNAL_API
/**
- * The time type option bit masks used by getOffsetFromLocal
+ * A time type option bit mask used by getOffsetFromLocal.
* @internal
*/
- enum {
- kStdDstMask = kDaylight,
- kFormerLatterMask = kLatter
- };
+ static constexpr int32_t kStdDstMask = kDaylight;
+ /**
+ * A time type option bit mask used by getOffsetFromLocal.
+ * @internal
+ */
+ static constexpr int32_t kFormerLatterMask = kLatter;
#endif /* U_HIDE_INTERNAL_API */
/**
diff --git a/contrib/libs/icu/include/unicode/brkiter.h b/contrib/libs/icu/include/unicode/brkiter.h
index 3a121cf703b..108652799e6 100644
--- a/contrib/libs/icu/include/unicode/brkiter.h
+++ b/contrib/libs/icu/include/unicode/brkiter.h
@@ -162,7 +162,7 @@ public:
* access the text without impacting any break iterator operations,
* but the underlying text itself must not be altered.
*
- * @param fillIn A UText to be filled in. If NULL, a new UText will be
+ * @param fillIn A UText to be filled in. If nullptr, a new UText will be
* allocated to hold the result.
* @param status receives any error codes.
* @return The current UText for this break iterator. If an input
@@ -503,7 +503,7 @@ public:
*
* Thread safe client-buffer-based cloning operation
* Do NOT call delete on a safeclone, since 'new' is not used to create it.
- * @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated.
+ * @param stackBuffer user allocated space for the new clone. If nullptr new memory will be allocated.
* If buffer is not large enough, new memory will be allocated.
* @param BufferSize reference to size of allocated space.
* If BufferSize == 0, a sufficient size for use in cloning will
diff --git a/contrib/libs/icu/include/unicode/bytestrie.h b/contrib/libs/icu/include/unicode/bytestrie.h
index 271a81d1b4d..1719a6bb83e 100644
--- a/contrib/libs/icu/include/unicode/bytestrie.h
+++ b/contrib/libs/icu/include/unicode/bytestrie.h
@@ -69,7 +69,7 @@ public:
* @stable ICU 4.8
*/
BytesTrie(const void *trieBytes)
- : ownedArray_(NULL), bytes_(static_cast<const uint8_t *>(trieBytes)),
+ : ownedArray_(nullptr), bytes_(static_cast<const uint8_t *>(trieBytes)),
pos_(bytes_), remainingMatchLength_(-1) {}
/**
@@ -85,7 +85,7 @@ public:
* @stable ICU 4.8
*/
BytesTrie(const BytesTrie &other)
- : ownedArray_(NULL), bytes_(other.bytes_),
+ : ownedArray_(nullptr), bytes_(other.bytes_),
pos_(other.pos_), remainingMatchLength_(other.remainingMatchLength_) {}
/**
@@ -143,7 +143,7 @@ public:
* Constructs an empty State.
* @stable ICU 4.8
*/
- State() { bytes=NULL; }
+ State() { bytes=nullptr; }
private:
friend class BytesTrie;
@@ -177,7 +177,7 @@ public:
* @stable ICU 4.8
*/
BytesTrie &resetToState(const State &state) {
- if(bytes_==state.bytes && bytes_!=NULL) {
+ if(bytes_==state.bytes && bytes_!=nullptr) {
pos_=state.pos;
remainingMatchLength_=state.remainingMatchLength;
}
@@ -227,7 +227,7 @@ public:
* result=next(c);
* return result;
* \endcode
- * @param s A string or byte sequence. Can be NULL if length is 0.
+ * @param s A string or byte sequence. Can be nullptr if length is 0.
* @param length The length of the byte sequence. Can be -1 if NUL-terminated.
* @return The match/value Result.
* @stable ICU 4.8
@@ -262,7 +262,7 @@ public:
inline UBool hasUniqueValue(int32_t &uniqueValue) const {
const uint8_t *pos=pos_;
// Skip the rest of a pending linear-match node.
- return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue);
+ return pos!=nullptr && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue);
}
/**
@@ -394,10 +394,10 @@ private:
pos_(bytes_), remainingMatchLength_(-1) {}
// No assignment operator.
- BytesTrie &operator=(const BytesTrie &other);
+ BytesTrie &operator=(const BytesTrie &other) = delete;
inline void stop() {
- pos_=NULL;
+ pos_=nullptr;
}
// Reads a compact 32-bit integer.
@@ -555,7 +555,7 @@ private:
// Iterator variables.
- // Pointer to next trie byte to read. NULL if no more matches.
+ // Pointer to next trie byte to read. nullptr if no more matches.
const uint8_t *pos_;
// Remaining length of a linear-match node, minus 1. Negative if not in such a node.
int32_t remainingMatchLength_;
diff --git a/contrib/libs/icu/include/unicode/bytestriebuilder.h b/contrib/libs/icu/include/unicode/bytestriebuilder.h
index 382f5e0095f..ec9c625473d 100644
--- a/contrib/libs/icu/include/unicode/bytestriebuilder.h
+++ b/contrib/libs/icu/include/unicode/bytestriebuilder.h
@@ -129,8 +129,8 @@ public:
private:
friend class ::BytesTrieTest;
- BytesTrieBuilder(const BytesTrieBuilder &other); // no copy constructor
- BytesTrieBuilder &operator=(const BytesTrieBuilder &other); // no assignment operator
+ BytesTrieBuilder(const BytesTrieBuilder &other) = delete; // no copy constructor
+ BytesTrieBuilder &operator=(const BytesTrieBuilder &other) = delete; // no assignment operator
void buildBytes(UStringTrieBuildOption buildOption, UErrorCode &errorCode);
diff --git a/contrib/libs/icu/include/unicode/calendar.h b/contrib/libs/icu/include/unicode/calendar.h
index c1bdf928203..aa83866ac9c 100644
--- a/contrib/libs/icu/include/unicode/calendar.h
+++ b/contrib/libs/icu/include/unicode/calendar.h
@@ -302,7 +302,7 @@ public:
* with U_ZERO_ERROR if created successfully, set to a failure result
* otherwise. U_MISSING_RESOURCE_ERROR will be returned if the resource data
* requests a calendar type which has not been installed.
- * @return A Calendar if created successfully. NULL otherwise.
+ * @return A Calendar if created successfully. nullptr otherwise.
* @stable ICU 2.0
*/
static Calendar* U_EXPORT2 createInstance(UErrorCode& success);
@@ -316,7 +316,7 @@ public:
* @param success Indicates the success/failure of Calendar creation. Filled in
* with U_ZERO_ERROR if created successfully, set to a failure result
* otherwise.
- * @return A Calendar if created successfully. NULL otherwise.
+ * @return A Calendar if created successfully. nullptr otherwise.
* @stable ICU 2.0
*/
static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, UErrorCode& success);
@@ -329,7 +329,7 @@ public:
* @param success Indicates the success/failure of Calendar creation. Filled in
* with U_ZERO_ERROR if created successfully, set to a failure result
* otherwise.
- * @return A Calendar if created successfully. NULL otherwise.
+ * @return A Calendar if created successfully. nullptr otherwise.
* @stable ICU 2.0
*/
static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, UErrorCode& success);
@@ -341,7 +341,7 @@ public:
* @param success Indicates the success/failure of Calendar creation. Filled in
* with U_ZERO_ERROR if created successfully, set to a failure result
* otherwise.
- * @return A Calendar if created successfully. NULL otherwise.
+ * @return A Calendar if created successfully. nullptr otherwise.
* @stable ICU 2.0
*/
static Calendar* U_EXPORT2 createInstance(const Locale& aLocale, UErrorCode& success);
@@ -356,7 +356,7 @@ public:
* @param success Indicates the success/failure of Calendar creation. Filled in
* with U_ZERO_ERROR if created successfully, set to a failure result
* otherwise.
- * @return A Calendar if created successfully. NULL otherwise.
+ * @return A Calendar if created successfully. nullptr otherwise.
* @stable ICU 2.0
*/
static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, const Locale& aLocale, UErrorCode& success);
@@ -370,7 +370,7 @@ public:
* @param success Indicates the success/failure of Calendar creation. Filled in
* with U_ZERO_ERROR if created successfully, set to a failure result
* otherwise.
- * @return A Calendar if created successfully. NULL otherwise.
+ * @return A Calendar if created successfully. nullptr otherwise.
* @stable ICU 2.0
*/
static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, const Locale& aLocale, UErrorCode& success);
@@ -826,7 +826,7 @@ public:
/**
* Sets the calendar's time zone to be the one passed in. The Calendar takes ownership
* of the TimeZone; the caller is no longer responsible for deleting it. If the
- * given time zone is NULL, this function has no effect.
+ * given time zone is nullptr, this function has no effect.
*
* @param value The given time zone.
* @stable ICU 2.0
@@ -870,7 +870,7 @@ public:
* false, otherwise.
* @stable ICU 2.0
*/
- virtual UBool inDaylightTime(UErrorCode& status) const = 0;
+ virtual UBool inDaylightTime(UErrorCode& status) const;
/**
* Specifies whether or not date/time interpretation is to be lenient. With lenient
@@ -962,16 +962,6 @@ public:
*/
UCalendarWallTimeOption getSkippedWallTimeOption(void) const;
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
- *
- * @param value The given first day of the week.
- * @deprecated ICU 2.6. Use setFirstDayOfWeek(UCalendarDaysOfWeek value) instead.
- */
- void setFirstDayOfWeek(EDaysOfWeek value);
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
*
@@ -1143,26 +1133,6 @@ public:
*/
virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const;
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Return the maximum value that this field could have, given the current date.
- * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
- * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar,
- * for some years the actual maximum for MONTH is 12, and for others 13.
- *
- * The version of this function on Calendar uses an iterative algorithm to determine the
- * actual maximum value for the field. There is almost always a more efficient way to
- * accomplish this (in most cases, you can simply return getMaximum()). GregorianCalendar
- * overrides this function with a more efficient implementation.
- *
- * @param field the field to determine the maximum of
- * @param status Fill-in parameter which receives the status of this operation.
- * @return the maximum of the given field for the current date of this Calendar
- * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field, UErrorCode& status) instead.
- */
- int32_t getActualMaximum(EDateFields field, UErrorCode& status) const;
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Return the maximum value that this field could have, given the current date.
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
@@ -1181,23 +1151,6 @@ public:
*/
virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const;
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Gets the value for a given time field. Recalculate the current time field values
- * if the time value has been changed by a call to setTime(). Return zero for unset
- * fields if any fields have been explicitly set by a call to set(). To force a
- * recomputation of all fields regardless of the previous state, call complete().
- * This method is semantically const, but may alter the object in memory.
- *
- * @param field The given time field.
- * @param status Fill-in parameter which receives the status of the operation.
- * @return The value for the given time field, or zero if the field is unset,
- * and set() has been called for any other field.
- * @deprecated ICU 2.6. Use get(UCalendarDateFields field, UErrorCode& status) instead.
- */
- int32_t get(EDateFields field, UErrorCode& status) const;
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Gets the value for a given time field. Recalculate the current time field values
* if the time value has been changed by a call to setTime(). Return zero for unset
@@ -1213,18 +1166,6 @@ public:
*/
int32_t get(UCalendarDateFields field, UErrorCode& status) const;
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Determines if the given time field has a value set. This can affect in the
- * resolving of time in Calendar. Unset fields have a value of zero, by definition.
- *
- * @param field The given time field.
- * @return True if the given time field has a value set; false otherwise.
- * @deprecated ICU 2.6. Use isSet(UCalendarDateFields field) instead.
- */
- UBool isSet(EDateFields field) const;
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Determines if the given time field has a value set. This can affect in the
* resolving of time in Calendar. Unset fields have a value of zero, by definition.
@@ -1235,17 +1176,6 @@ public:
*/
UBool isSet(UCalendarDateFields field) const;
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Sets the given time field with the given value.
- *
- * @param field The given time field.
- * @param value The value to be set for the given time field.
- * @deprecated ICU 2.6. Use set(UCalendarDateFields field, int32_t value) instead.
- */
- void set(EDateFields field, int32_t value);
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Sets the given time field with the given value.
*
@@ -1304,18 +1234,6 @@ public:
*/
void clear(void);
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * 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.
- *
- * @param field The time field to be cleared.
- * @deprecated ICU 2.6. Use clear(UCalendarDateFields field) instead.
- */
- void clear(EDateFields field);
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* 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
@@ -1431,6 +1349,66 @@ public:
*/
virtual UBool isWeekend(void) 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().
+ * This method is semantically const, but may alter the object in memory.
+ * A "leap year" is a year that contains more days than other years (for
+ * solar or lunar calendars) or more months than other years (for lunisolar
+ * calendars like Hebrew or Chinese), as defined in the ECMAScript Temporal
+ * proposal.
+ *
+ * @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
+ */
+ virtual bool inTemporalLeapYear(UErrorCode& status) const;
+
+ /**
+ * Gets The Temporal monthCode value corresponding to the month for the date.
+ * The value is a string identifier that starts with the literal grapheme
+ * "M" followed by two graphemes representing the zero-padded month number
+ * of the current month in a normal (non-leap) year and suffixed by an
+ * optional literal grapheme "L" if this is a leap month in a lunisolar
+ * calendar. The 25 possible values are "M01" .. "M13" and "M01L" .. "M12L".
+ * For the Hebrew calendar, the values are "M01" .. "M12" for non-leap year, and
+ * "M01" .. "M05", "M05L", "M06" .. "M12" for leap year.
+ * For the Chinese calendar, the values are "M01" .. "M12" for non-leap year and
+ * in leap year with another monthCode in "M01L" .. "M12L".
+ * For Coptic and Ethiopian calendar, the Temporal monthCode values for any
+ * years are "M01" to "M13".
+ *
+ * @param status ICU Error Code
+ * @return One of 25 possible strings in {"M01".."M13", "M01L".."M12L"}.
+ * @draft ICU 73
+ */
+ virtual const char* getTemporalMonthCode(UErrorCode& status) const;
+
+ /**
+ * Sets The Temporal monthCode which is a string identifier that starts
+ * with the literal grapheme "M" followed by two graphemes representing
+ * the zero-padded month number of the current month in a normal
+ * (non-leap) year and suffixed by an optional literal grapheme "L" if this
+ * is a leap month in a lunisolar calendar. The 25 possible values are
+ * "M01" .. "M13" and "M01L" .. "M12L". For Hebrew calendar, the values are
+ * "M01" .. "M12" for non-leap years, and "M01" .. "M05", "M05L", "M06"
+ * .. "M12" for leap year.
+ * For the Chinese calendar, the values are "M01" .. "M12" for non-leap year and
+ * in leap year with another monthCode in "M01L" .. "M12L".
+ * For Coptic and Ethiopian calendar, the Temporal monthCode values for any
+ * years are "M01" to "M13".
+ *
+ * @param temporalMonth The value to be set for temporal monthCode.
+ * @param status ICU Error Code
+ *
+ * @draft ICU 73
+ */
+ virtual void setTemporalMonthCode(const char* temporalMonth, UErrorCode& status);
+
+#endif // U_FORCE_HIDE_DRAFT_API
+
protected:
/**
@@ -1573,6 +1551,30 @@ protected:
inline int32_t internalGet(UCalendarDateFields field) const {return fFields[field];}
#endif /* U_HIDE_INTERNAL_API */
+ /**
+ * Use this function instead of internalGet(UCAL_MONTH). The implementation
+ * check the timestamp of UCAL_MONTH and UCAL_ORDINAL_MONTH and use the
+ * one set later. The subclass should override it to conver the value of UCAL_ORDINAL_MONTH
+ * to UCAL_MONTH correctly if UCAL_ORDINAL_MONTH has higher priority.
+ *
+ * @return The value for the UCAL_MONTH.
+ * @internal
+ */
+ virtual int32_t internalGetMonth() const;
+
+ /**
+ * Use this function instead of internalGet(UCAL_MONTH, defaultValue). The implementation
+ * check the timestamp of UCAL_MONTH and UCAL_ORDINAL_MONTH and use the
+ * one set later. The subclass should override it to conver the value of UCAL_ORDINAL_MONTH
+ * to UCAL_MONTH correctly if UCAL_ORDINAL_MONTH has higher priority.
+ *
+ * @param defaultValue a default value used if the UCAL_MONTH and
+ * UCAL_ORDINAL are both unset.
+ * @return The value for the UCAL_MONTH.
+ * @internal
+ */
+ virtual int32_t internalGetMonth(int32_t defaultValue) const;
+
#ifndef U_HIDE_DEPRECATED_API
/**
* Sets the value for a given time field. This is a fast internal method for
@@ -1651,7 +1653,6 @@ protected:
*/
virtual int32_t getLimit(UCalendarDateFields field, ELimitType limitType) const;
-
/**
* Return the Julian day number of day before the first day of the
* given month in the given extended year. Subclasses should override
@@ -1766,16 +1767,22 @@ protected:
int32_t newestStamp(UCalendarDateFields start, UCalendarDateFields end, int32_t bestSoFar) const;
/**
- * Values for field resolution tables
+ * Marker for end of resolve set (row or group). Value for field resolution tables.
+ *
* @see #resolveFields
* @internal
*/
- enum {
- /** Marker for end of resolve set (row or group). */
- kResolveSTOP = -1,
- /** Value to be bitwised "ORed" against resolve table field values for remapping. Example: (UCAL_DATE | kResolveRemap) in 1st column will cause 'UCAL_DATE' to be returned, but will not examine the value of UCAL_DATE. */
- kResolveRemap = 32
- };
+ static constexpr int32_t kResolveSTOP = -1;
+ /**
+ * Value to be bitwised "ORed" against resolve table field values for remapping.
+ * Example: (UCAL_DATE | kResolveRemap) in 1st column will cause 'UCAL_DATE' to be returned,
+ * but will not examine the value of UCAL_DATE.
+ * Value for field resolution tables.
+ *
+ * @see #resolveFields
+ * @internal
+ */
+ static constexpr int32_t kResolveRemap = 32;
/**
* Precedence table for Dates
@@ -1799,6 +1806,13 @@ protected:
static const UFieldResolutionTable kDOWPrecedence[];
/**
+ * Precedence table for Months
+ * @see #resolveFields
+ * @internal
+ */
+ static const UFieldResolutionTable kMonthPrecedence[];
+
+ /**
* Given a precedence table, return the newest field combination in
* the table, or UCAL_FIELD_COUNT if none is found.
*
@@ -1825,7 +1839,7 @@ protected:
* match, then UCAL_FIELD_COUNT is returned.
* @internal
*/
- UCalendarDateFields resolveFields(const UFieldResolutionTable *precedenceTable);
+ UCalendarDateFields resolveFields(const UFieldResolutionTable *precedenceTable) const;
#endif /* U_HIDE_INTERNAL_API */
@@ -2168,7 +2182,7 @@ private:
/**
* Time zone affects the time calculation done by Calendar. Calendar subclasses use
- * the time zone data to produce the local time. Always set; never NULL.
+ * the time zone data to produce the local time. Always set; never nullptr.
*/
TimeZone* fZone;
@@ -2450,7 +2464,7 @@ private:
private:
/**
- * Cast TimeZone used by this object to BasicTimeZone, or NULL if the TimeZone
+ * Cast TimeZone used by this object to BasicTimeZone, or nullptr if the TimeZone
* is not an instance of BasicTimeZone.
*/
BasicTimeZone* getBasicTimeZone() const;
diff --git a/contrib/libs/icu/include/unicode/caniter.h b/contrib/libs/icu/include/unicode/caniter.h
index 6e57ef5e3ba..035bd0e64eb 100644
--- a/contrib/libs/icu/include/unicode/caniter.h
+++ b/contrib/libs/icu/include/unicode/caniter.h
@@ -73,7 +73,7 @@ Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMB
* @author C++ port by V. Weinstein
* @stable ICU 2.4
*/
-class U_COMMON_API CanonicalIterator U_FINAL : public UObject {
+class U_COMMON_API CanonicalIterator final : public UObject {
public:
/**
* Construct a CanonicalIterator object
@@ -150,20 +150,20 @@ public:
private:
// ===================== PRIVATES ==============================
// private default constructor
- CanonicalIterator();
+ CanonicalIterator() = delete;
/**
* Copy constructor. Private for now.
* @internal (private)
*/
- CanonicalIterator(const CanonicalIterator& other);
+ CanonicalIterator(const CanonicalIterator& other) = delete;
/**
* Assignment operator. Private for now.
* @internal (private)
*/
- CanonicalIterator& operator=(const CanonicalIterator& other);
+ CanonicalIterator& operator=(const CanonicalIterator& other) = delete;
// fields
UnicodeString source;
diff --git a/contrib/libs/icu/include/unicode/casemap.h b/contrib/libs/icu/include/unicode/casemap.h
index 53af84fa74d..eca7cbf80a9 100644
--- a/contrib/libs/icu/include/unicode/casemap.h
+++ b/contrib/libs/icu/include/unicode/casemap.h
@@ -30,7 +30,7 @@ class Edits;
*
* @stable ICU 59
*/
-class U_COMMON_API CaseMap U_FINAL : public UMemory {
+class U_COMMON_API CaseMap final : public UMemory {
public:
/**
* Lowercases a UTF-16 string and optionally records edits.
@@ -38,7 +38,7 @@ public:
* The result may be longer or shorter than the original.
* The source string and the destination buffer must not overlap.
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src The original string.
* @param srcLength The length of the original string. If -1, then src must be NUL-terminated.
@@ -46,13 +46,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -74,7 +74,7 @@ public:
* The result may be longer or shorter than the original.
* The source string and the destination buffer must not overlap.
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src The original string.
* @param srcLength The length of the original string. If -1, then src must be NUL-terminated.
@@ -82,13 +82,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -116,7 +116,7 @@ public:
* that are to be titlecased. It titlecases those characters and lowercases
* all others. (This can be modified with options bits.)
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET,
* U_TITLECASE_NO_LOWERCASE,
* U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED,
@@ -124,7 +124,7 @@ public:
* @param iter A break iterator to find the first characters of words that are to be titlecased.
* It is set to the source string (setText())
* and used one or more times for iteration (first() and next()).
- * If NULL, then a word break iterator for the locale is used
+ * If nullptr, then a word break iterator for the locale is used
* (or something equivalent).
* @param src The original string.
* @param srcLength The length of the original string. If -1, then src must be NUL-terminated.
@@ -132,13 +132,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -175,13 +175,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of char16_ts). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -202,7 +202,7 @@ public:
* Casing is locale-dependent and context-sensitive.
* The result may be longer or shorter than the original.
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src The original string.
* @param sink A ByteSink to which the result string is written.
@@ -211,7 +211,7 @@ public:
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
*
@@ -228,7 +228,7 @@ public:
* Casing is locale-dependent and context-sensitive.
* The result may be longer or shorter than the original.
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src The original string.
* @param sink A ByteSink to which the result string is written.
@@ -237,7 +237,7 @@ public:
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
*
@@ -260,7 +260,7 @@ public:
* that are to be titlecased. It titlecases those characters and lowercases
* all others. (This can be modified with options bits.)
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET,
* U_TITLECASE_NO_LOWERCASE,
* U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED,
@@ -268,7 +268,7 @@ public:
* @param iter A break iterator to find the first characters of words that are to be titlecased.
* It is set to the source string (setUText())
* and used one or more times for iteration (first() and next()).
- * If NULL, then a word break iterator for the locale is used
+ * If nullptr, then a word break iterator for the locale is used
* (or something equivalent).
* @param src The original string.
* @param sink A ByteSink to which the result string is written.
@@ -277,7 +277,7 @@ public:
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
*
@@ -308,7 +308,7 @@ public:
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
*
@@ -326,7 +326,7 @@ public:
* The result may be longer or shorter than the original.
* The source string and the destination buffer must not overlap.
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src The original string.
* @param srcLength The length of the original string. If -1, then src must be NUL-terminated.
@@ -334,13 +334,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of bytes). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -362,7 +362,7 @@ public:
* The result may be longer or shorter than the original.
* The source string and the destination buffer must not overlap.
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET.
* @param src The original string.
* @param srcLength The length of the original string. If -1, then src must be NUL-terminated.
@@ -370,13 +370,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of bytes). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -404,7 +404,7 @@ public:
* that are to be titlecased. It titlecases those characters and lowercases
* all others. (This can be modified with options bits.)
*
- * @param locale The locale ID. ("" = root locale, NULL = default locale.)
+ * @param locale The locale ID. ("" = root locale, nullptr = default locale.)
* @param options Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET,
* U_TITLECASE_NO_LOWERCASE,
* U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED,
@@ -412,7 +412,7 @@ public:
* @param iter A break iterator to find the first characters of words that are to be titlecased.
* It is set to the source string (setUText())
* and used one or more times for iteration (first() and next()).
- * If NULL, then a word break iterator for the locale is used
+ * If nullptr, then a word break iterator for the locale is used
* (or something equivalent).
* @param src The original string.
* @param srcLength The length of the original string. If -1, then src must be NUL-terminated.
@@ -420,13 +420,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of bytes). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
@@ -462,13 +462,13 @@ public:
* the buffer is large enough.
* The contents is undefined in case of failure.
* @param destCapacity The size of the buffer (number of bytes). If it is 0, then
- * dest may be NULL and the function will only return the length of the result
+ * dest may be nullptr and the function will only return the length of the result
* without writing any of the result string.
* @param edits Records edits for index mapping, working with styled text,
* and getting only changes (if any).
* The Edits contents is undefined if any error occurs.
* This function calls edits->reset() first unless
- * options includes U_EDITS_NO_RESET. edits can be NULL.
+ * options includes U_EDITS_NO_RESET. edits can be nullptr.
* @param errorCode Reference to an in/out error code value
* which must not indicate a failure before the function call.
* @return The length of the result string, if successful.
diff --git a/contrib/libs/icu/include/unicode/char16ptr.h b/contrib/libs/icu/include/unicode/char16ptr.h
index c8a9ae6c35d..de8182c7ada 100644
--- a/contrib/libs/icu/include/unicode/char16ptr.h
+++ b/contrib/libs/icu/include/unicode/char16ptr.h
@@ -39,7 +39,7 @@ U_NAMESPACE_BEGIN
* char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
* @stable ICU 59
*/
-class U_COMMON_API Char16Ptr U_FINAL {
+class U_COMMON_API Char16Ptr final {
public:
/**
* Copies the pointer.
@@ -146,7 +146,7 @@ char16_t *Char16Ptr::get() const { return u_.cp; }
* const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
* @stable ICU 59
*/
-class U_COMMON_API ConstChar16Ptr U_FINAL {
+class U_COMMON_API ConstChar16Ptr final {
public:
/**
* Copies the pointer.
diff --git a/contrib/libs/icu/include/unicode/chariter.h b/contrib/libs/icu/include/unicode/chariter.h
index 4f320b90e2c..45f4d984c74 100644
--- a/contrib/libs/icu/include/unicode/chariter.h
+++ b/contrib/libs/icu/include/unicode/chariter.h
@@ -297,7 +297,7 @@ protected:
* \code
* void traverseForward(CharacterIterator& iter)
* {
- * for(char16_t c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
+ * for(char16_t c = iter.first(); c != CharacterIterator::DONE; c = iter.next()) {
* processChar(c);
* }
* }
@@ -308,7 +308,7 @@ protected:
* \code
* void traverseBackward(CharacterIterator& iter)
* {
- * for(char16_t c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) {
+ * for(char16_t c = iter.last(); c != CharacterIterator::DONE; c = iter.previous()) {
* processChar(c);
* }
* }
@@ -322,11 +322,11 @@ protected:
* {
* char16_t c;
* for (c = iter.setIndex(pos);
- * c != CharacterIterator.DONE && (Unicode::isLetter(c) || Unicode::isDigit(c));
+ * c != CharacterIterator::DONE && (Unicode::isLetter(c) || Unicode::isDigit(c));
* c = iter.next()) {}
* int32_t end = iter.getIndex();
* for (c = iter.setIndex(pos);
- * c != CharacterIterator.DONE && (Unicode::isLetter(c) || Unicode::isDigit(c));
+ * c != CharacterIterator::DONE && (Unicode::isLetter(c) || Unicode::isDigit(c));
* c = iter.previous()) {}
* int32_t start = iter.getIndex() + 1;
*
diff --git a/contrib/libs/icu/include/unicode/choicfmt.h b/contrib/libs/icu/include/unicode/choicfmt.h
index 0e7ae186d4d..429fa0cebd8 100644
--- a/contrib/libs/icu/include/unicode/choicfmt.h
+++ b/contrib/libs/icu/include/unicode/choicfmt.h
@@ -330,31 +330,31 @@ public:
int32_t count);
/**
- * Returns NULL and 0.
+ * Returns nullptr and 0.
* Before ICU 4.8, this used to return the choice limits array.
*
* @param count Will be set to 0.
- * @return NULL
+ * @return nullptr
* @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
*/
virtual const double* getLimits(int32_t& count) const;
/**
- * Returns NULL and 0.
+ * Returns nullptr and 0.
* Before ICU 4.8, this used to return the limit booleans array.
*
* @param count Will be set to 0.
- * @return NULL
+ * @return nullptr
* @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
*/
virtual const UBool* getClosures(int32_t& count) const;
/**
- * Returns NULL and 0.
+ * Returns nullptr and 0.
* Before ICU 4.8, this used to return the array of choice strings.
*
* @param count Will be set to 0.
- * @return NULL
+ * @return nullptr
* @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
*/
virtual const UnicodeString* getFormats(int32_t& count) const;
@@ -478,7 +478,7 @@ private:
*/
static UnicodeString& dtos(double value, UnicodeString& string);
- ChoiceFormat(); // default constructor not implemented
+ ChoiceFormat() = delete; // default constructor not implemented
/**
* Construct a new ChoiceFormat with the limits and the corresponding formats
diff --git a/contrib/libs/icu/include/unicode/coleitr.h b/contrib/libs/icu/include/unicode/coleitr.h
index 4e68c6f1749..bd0c569f35c 100644
--- a/contrib/libs/icu/include/unicode/coleitr.h
+++ b/contrib/libs/icu/include/unicode/coleitr.h
@@ -118,7 +118,7 @@ class UVector32;
* @see RuleBasedCollator
* @version 1.8 Jan 16 2001
*/
-class U_I18N_API CollationElementIterator U_FINAL : public UObject {
+class U_I18N_API CollationElementIterator final : public UObject {
public:
// CollationElementIterator public data member ------------------------------
@@ -351,7 +351,7 @@ private:
const CollationElementIterator&
operator=(const CollationElementIterator& other);
- CollationElementIterator(); // default constructor not implemented
+ CollationElementIterator() = delete; // default constructor not implemented
/** Normalizes dir_=1 (just after setOffset()) to dir_=0 (just after reset()). */
inline int8_t normalizeDir() const { return dir_ == 1 ? 0 : dir_; }
diff --git a/contrib/libs/icu/include/unicode/coll.h b/contrib/libs/icu/include/unicode/coll.h
index 9e0050ba6ce..fc5af953495 100644
--- a/contrib/libs/icu/include/unicode/coll.h
+++ b/contrib/libs/icu/include/unicode/coll.h
@@ -625,7 +625,7 @@ public:
/**
* Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering.
- * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
+ * @param destCapacity The length of dest. If it is 0, then dest may be nullptr and the function
* will only return the length of the result without writing any codes (pre-flighting).
* @param status A reference to an error code value, which must not indicate
* a failure before the function call.
@@ -645,7 +645,7 @@ public:
* Sets the ordering of scripts for this collator.
*
* <p>The reordering codes are a combination of script codes and reorder codes.
- * @param reorderCodes An array of script codes in the new order. This can be NULL if the
+ * @param reorderCodes An array of script codes in the new order. This can be nullptr if the
* length is also set to 0. An empty array will clear any reordering codes on the collator.
* @param reorderCodesLength The length of reorderCodes.
* @param status error code
@@ -668,7 +668,7 @@ public:
*
* @param reorderCode The reorder code to determine equivalence for.
* @param dest The array to fill with the script equivalence reordering codes.
- * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the
+ * @param destCapacity The length of dest. If it is 0, then dest may be nullptr and the
* function will only return the length of the result without writing any codes (pre-flighting).
* @param status A reference to an error code value, which must not indicate
* a failure before the function call.
@@ -750,7 +750,7 @@ public:
* ucol_getKeywords. If any other keyword is passed in, status is set
* to U_ILLEGAL_ARGUMENT_ERROR.
* @param status input-output error code
- * @return a string enumeration over collation keyword values, or NULL
+ * @return a string enumeration over collation keyword values, or nullptr
* upon error. The caller is responsible for deleting the result.
* @stable ICU 3.0
*/
@@ -1008,7 +1008,7 @@ public:
* For more details, see the ICU User Guide.
*
* @param source string to be processed.
- * @param result buffer to store result in. If NULL, number of bytes needed
+ * @param result buffer to store result in. If nullptr, number of bytes needed
* will be returned.
* @param resultLength length of the result buffer. If if not enough the
* buffer will be filled to capacity.
@@ -1031,7 +1031,7 @@ public:
* @param sourceLength length of string to be processed.
* If -1, the string is 0 terminated and length will be decided by the
* function.
- * @param result buffer to store result in. If NULL, number of bytes needed
+ * @param result buffer to store result in. If nullptr, number of bytes needed
* will be returned.
* @param resultLength length of the result buffer. If if not enough the
* buffer will be filled to capacity.
@@ -1145,7 +1145,7 @@ public:
* This is internal, and intended to be used with delegate converters.
*
* @param locale a locale that will appear as a collators locale in the resulting
- * short string definition. If NULL, the locale will be harvested
+ * short string definition. If nullptr, the locale will be harvested
* from the collator.
* @param buffer space to hold the resulting string
* @param capacity capacity of the buffer
@@ -1202,7 +1202,7 @@ private:
/**
* Assignment operator. Private for now.
*/
- Collator& operator=(const Collator& other);
+ Collator& operator=(const Collator& other) = delete;
friend class CFactory;
friend class SimpleCFactory;
@@ -1249,9 +1249,9 @@ public:
/**
* Return a collator for the provided locale. If the locale
- * is not supported, return NULL.
+ * is not supported, return nullptr.
* @param loc the locale identifying the collator to be created.
- * @return a new collator if the locale is supported, otherwise NULL.
+ * @return a new collator if the locale is supported, otherwise nullptr.
* @stable ICU 2.6
*/
virtual Collator* createCollator(const Locale& loc) = 0;
diff --git a/contrib/libs/icu/include/unicode/compactdecimalformat.h b/contrib/libs/icu/include/unicode/compactdecimalformat.h
index 9c1e2009969..0cbf3d4c73a 100644
--- a/contrib/libs/icu/include/unicode/compactdecimalformat.h
+++ b/contrib/libs/icu/include/unicode/compactdecimalformat.h
@@ -88,7 +88,7 @@ public:
* Destructor.
* @stable ICU 51
*/
- ~CompactDecimalFormat() U_OVERRIDE;
+ ~CompactDecimalFormat() override;
/**
* Assignment operator.
@@ -105,7 +105,7 @@ public:
* @return a polymorphic copy of this CompactDecimalFormat.
* @stable ICU 51
*/
- CompactDecimalFormat* clone() const U_OVERRIDE;
+ CompactDecimalFormat* clone() const override;
using DecimalFormat::format;
@@ -119,7 +119,7 @@ public:
* @stable ICU 51
*/
void parse(const UnicodeString& text, Formattable& result,
- ParsePosition& parsePosition) const U_OVERRIDE;
+ ParsePosition& parsePosition) const override;
/**
* CompactDecimalFormat does not support parsing. This implementation
@@ -130,7 +130,7 @@ public:
* @param status Always set to U_UNSUPPORTED_ERROR.
* @stable ICU 51
*/
- void parse(const UnicodeString& text, Formattable& result, UErrorCode& status) const U_OVERRIDE;
+ void parse(const UnicodeString& text, Formattable& result, UErrorCode& status) const override;
#ifndef U_HIDE_INTERNAL_API
/**
@@ -141,7 +141,7 @@ public:
* This method will fail if this format is not a currency format,
* that is, if it does not contain the currency pattern symbol
* (U+00A4) in its prefix or suffix. This implementation always returns
- * NULL.
+ * nullptr.
*
* @param text the string to parse
* @param pos input-output position; on input, the position within text
@@ -150,10 +150,10 @@ public:
* If the parse fails, the position in unchanged upon output.
* @return if parse succeeds, a pointer to a newly-created CurrencyAmount
* object (owned by the caller) containing information about
- * the parsed currency; if parse fails, this is NULL.
+ * the parsed currency; if parse fails, this is nullptr.
* @internal
*/
- CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const U_OVERRIDE;
+ CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const override;
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -180,7 +180,7 @@ public:
* other classes have different class IDs.
* @stable ICU 51
*/
- UClassID getDynamicClassID() const U_OVERRIDE;
+ UClassID getDynamicClassID() const override;
private:
CompactDecimalFormat(const Locale& inLocale, UNumberCompactStyle style, UErrorCode& status);
diff --git a/contrib/libs/icu/include/unicode/curramt.h b/contrib/libs/icu/include/unicode/curramt.h
index 818b11ae5bd..e0f6aa13dd2 100644
--- a/contrib/libs/icu/include/unicode/curramt.h
+++ b/contrib/libs/icu/include/unicode/curramt.h
@@ -43,7 +43,7 @@ class U_I18N_API CurrencyAmount: public Measure {
* ISO currency code.
* @param amount a numeric object; amount.isNumeric() must be true
* @param isoCode the 3-letter ISO 4217 currency code; must not be
- * NULL and must have length 3
+ * nullptr and must have length 3
* @param ec input-output error code. If the amount or the isoCode
* is invalid, then this will be set to a failing value.
* @stable ICU 3.0
@@ -56,7 +56,7 @@ class U_I18N_API CurrencyAmount: public Measure {
* ISO currency code.
* @param amount the amount of the given currency
* @param isoCode the 3-letter ISO 4217 currency code; must not be
- * NULL and must have length 3
+ * nullptr and must have length 3
* @param ec input-output error code. If the isoCode is invalid,
* then this will be set to a failing value.
* @stable ICU 3.0
@@ -111,7 +111,7 @@ class U_I18N_API CurrencyAmount: public Measure {
* Return the currency unit object of this object.
* @stable ICU 3.0
*/
- inline const CurrencyUnit& getCurrency() const;
+ const CurrencyUnit& getCurrency() const;
/**
* Return the ISO currency code of this object.
@@ -120,10 +120,6 @@ class U_I18N_API CurrencyAmount: public Measure {
inline const char16_t* getISOCurrency() const;
};
-inline const CurrencyUnit& CurrencyAmount::getCurrency() const {
- return (const CurrencyUnit&) getUnit();
-}
-
inline const char16_t* CurrencyAmount::getISOCurrency() const {
return getCurrency().getISOCurrency();
}
diff --git a/contrib/libs/icu/include/unicode/currunit.h b/contrib/libs/icu/include/unicode/currunit.h
index 8da3f1ffd87..3b367b052bd 100644
--- a/contrib/libs/icu/include/unicode/currunit.h
+++ b/contrib/libs/icu/include/unicode/currunit.h
@@ -48,7 +48,7 @@ class U_I18N_API CurrencyUnit: public MeasureUnit {
* Construct an object with the given ISO currency code.
*
* @param isoCode the 3-letter ISO 4217 currency code; must have
- * length 3 and need not be NUL-terminated. If NULL, the currency
+ * length 3 and need not be NUL-terminated. If nullptr, the currency
* is initialized to the unknown currency XXX.
* @param ec input-output error code. If the isoCode is invalid,
* then this will be set to a failing value.
diff --git a/contrib/libs/icu/include/unicode/datefmt.h b/contrib/libs/icu/include/unicode/datefmt.h
index 027fb1712f4..27240a4e1c6 100644
--- a/contrib/libs/icu/include/unicode/datefmt.h
+++ b/contrib/libs/icu/include/unicode/datefmt.h
@@ -269,7 +269,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. Field values
- * are defined in UDateFormatField. Can be NULL.
+ * are defined in UDateFormatField. Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -328,7 +328,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. Field values
- * are defined in UDateFormatField. Can be NULL.
+ * are defined in UDateFormatField. Can be nullptr.
* @param status error status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -376,7 +376,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. Field values
- * are defined in UDateFormatField. Can be NULL.
+ * are defined in UDateFormatField. Can be nullptr.
* @param status error status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
diff --git a/contrib/libs/icu/include/unicode/dcfmtsym.h b/contrib/libs/icu/include/unicode/dcfmtsym.h
index c5f7404416f..6b79c99000e 100644
--- a/contrib/libs/icu/include/unicode/dcfmtsym.h
+++ b/contrib/libs/icu/include/unicode/dcfmtsym.h
@@ -305,7 +305,7 @@ public:
*
* @internal
*/
- void setCurrency(const UChar* currency, UErrorCode& status);
+ void setCurrency(const char16_t* currency, UErrorCode& status);
#endif // U_HIDE_INTERNAL_API
/**
@@ -456,6 +456,12 @@ public:
* @internal
*/
inline const char16_t* getCurrencyPattern(void) const;
+
+ /**
+ * Returns the numbering system with which this DecimalFormatSymbols was initialized.
+ * @internal
+ */
+ inline const char* getNumberingSystemName(void) const;
#endif /* U_HIDE_INTERNAL_API */
private:
@@ -500,12 +506,13 @@ private:
char actualLocale[ULOC_FULLNAME_CAPACITY];
char validLocale[ULOC_FULLNAME_CAPACITY];
- const char16_t* currPattern;
+ const char16_t* currPattern = nullptr;
UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT];
UnicodeString currencySpcAfterSym[UNUM_CURRENCY_SPACING_COUNT];
UBool fIsCustomCurrencySymbol;
UBool fIsCustomIntlCurrencySymbol;
+ char nsName[kInternalNumSysNameCapacity+1] = {};
};
// -------------------------------------
@@ -591,6 +598,10 @@ inline const char16_t*
DecimalFormatSymbols::getCurrencyPattern() const {
return currPattern;
}
+inline const char*
+DecimalFormatSymbols::getNumberingSystemName() const {
+ return nsName;
+}
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/decimfmt.h b/contrib/libs/icu/include/unicode/decimfmt.h
index ab6cd14e187..f72ba687258 100644
--- a/contrib/libs/icu/include/unicode/decimfmt.h
+++ b/contrib/libs/icu/include/unicode/decimfmt.h
@@ -803,7 +803,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see getGroupingUsed
* @stable ICU 53
*/
- void setGroupingUsed(UBool newValue) U_OVERRIDE;
+ void setGroupingUsed(UBool newValue) override;
/**
* Sets whether or not numbers should be parsed as integers only.
@@ -812,7 +812,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see isParseIntegerOnly
* @stable ICU 53
*/
- void setParseIntegerOnly(UBool value) U_OVERRIDE;
+ void setParseIntegerOnly(UBool value) override;
/**
* Sets whether lenient parsing should be enabled (it is off by default).
@@ -821,7 +821,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* \c false otherwise.
* @stable ICU 4.8
*/
- void setLenient(UBool enable) U_OVERRIDE;
+ void setLenient(UBool enable) override;
/**
* Create a DecimalFormat from the given pattern and symbols.
@@ -890,7 +890,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Destructor.
* @stable ICU 2.0
*/
- ~DecimalFormat() U_OVERRIDE;
+ ~DecimalFormat() override;
/**
* Clone this Format object polymorphically. The caller owns the
@@ -899,7 +899,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return a polymorphic copy of this DecimalFormat.
* @stable ICU 2.0
*/
- DecimalFormat* clone() const U_OVERRIDE;
+ DecimalFormat* clone() const override;
/**
* Return true if the given Format objects are semantically equal.
@@ -909,7 +909,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return true if the given Format objects are semantically equal.
* @stable ICU 2.0
*/
- bool operator==(const Format& other) const U_OVERRIDE;
+ bool operator==(const Format& other) const override;
using NumberFormat::format;
@@ -925,7 +925,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return Reference to 'appendTo' parameter.
* @stable ICU 2.0
*/
- UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos) const U_OVERRIDE;
+ UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos) const override;
#ifndef U_HIDE_INTERNAL_API
/**
@@ -941,7 +941,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @internal
*/
UnicodeString& format(double number, UnicodeString& appendTo, FieldPosition& pos,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -952,13 +952,13 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
*/
UnicodeString& format(double number, UnicodeString& appendTo, FieldPositionIterator* posIter,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
/**
* Format a long number using base-10 representation.
@@ -971,7 +971,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return Reference to 'appendTo' parameter.
* @stable ICU 2.0
*/
- UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos) const U_OVERRIDE;
+ UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos) const override;
#ifndef U_HIDE_INTERNAL_API
/**
@@ -987,7 +987,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @internal
*/
UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPosition& pos,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -998,13 +998,13 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
*/
UnicodeString& format(int32_t number, UnicodeString& appendTo, FieldPositionIterator* posIter,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
/**
* Format an int64 number using base-10 representation.
@@ -1017,7 +1017,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @return Reference to 'appendTo' parameter.
* @stable ICU 2.8
*/
- UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos) const U_OVERRIDE;
+ UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos) const override;
#ifndef U_HIDE_INTERNAL_API
/**
@@ -1033,7 +1033,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @internal
*/
UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPosition& pos,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -1044,13 +1044,13 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
*/
UnicodeString& format(int64_t number, UnicodeString& appendTo, FieldPositionIterator* posIter,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
/**
* Format a decimal number.
@@ -1063,13 +1063,13 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
*/
UnicodeString& format(StringPiece number, UnicodeString& appendTo, FieldPositionIterator* posIter,
- UErrorCode& status) const U_OVERRIDE;
+ UErrorCode& status) const override;
#ifndef U_HIDE_INTERNAL_API
@@ -1089,7 +1089,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @internal
*/
UnicodeString& format(const number::impl::DecimalQuantity& number, UnicodeString& appendTo,
- FieldPositionIterator* posIter, UErrorCode& status) const U_OVERRIDE;
+ FieldPositionIterator* posIter, UErrorCode& status) const override;
/**
* Format a decimal number.
@@ -1107,7 +1107,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @internal
*/
UnicodeString& format(const number::impl::DecimalQuantity& number, UnicodeString& appendTo,
- FieldPosition& pos, UErrorCode& status) const U_OVERRIDE;
+ FieldPosition& pos, UErrorCode& status) const override;
#endif // U_HIDE_INTERNAL_API
@@ -1116,7 +1116,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
/**
* Parse the given string using this object's choices. The method
* does string comparisons to try to find an optimal match.
- * If no object can be parsed, index is unchanged, and NULL is
+ * If no object can be parsed, index is unchanged, and nullptr is
* returned. The result is returned as the most parsimonious
* type of Formattable that will accommodate all of the
* necessary precision. For example, if the result is exactly 12,
@@ -1133,7 +1133,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @stable ICU 2.0
*/
void parse(const UnicodeString& text, Formattable& result,
- ParsePosition& parsePosition) const U_OVERRIDE;
+ ParsePosition& parsePosition) const override;
/**
* Parses text from the given string as a currency amount. Unlike
@@ -1151,10 +1151,10 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* If the parse fails, the position in unchanged upon output.
* @return if parse succeeds, a pointer to a newly-created CurrencyAmount
* object (owned by the caller) containing information about
- * the parsed currency; if parse fails, this is NULL.
+ * the parsed currency; if parse fails, this is nullptr.
* @stable ICU 49
*/
- CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const U_OVERRIDE;
+ CurrencyAmount* parseCurrency(const UnicodeString& text, ParsePosition& pos) const override;
/**
* Returns the decimal format symbols, which is generally not changed
@@ -1399,7 +1399,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see #setRoundingMode
* @stable ICU 2.0
*/
- virtual ERoundingMode getRoundingMode(void) const U_OVERRIDE;
+ virtual ERoundingMode getRoundingMode(void) const override;
/**
* Set the rounding mode.
@@ -1409,7 +1409,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see #getRoundingMode
* @stable ICU 2.0
*/
- virtual void setRoundingMode(ERoundingMode roundingMode) U_OVERRIDE;
+ virtual void setRoundingMode(ERoundingMode roundingMode) override;
/**
* Get the width to which the output of format() is padded.
@@ -1910,7 +1910,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see NumberFormat#setMaximumIntegerDigits
* @stable ICU 2.0
*/
- void setMaximumIntegerDigits(int32_t newValue) U_OVERRIDE;
+ void setMaximumIntegerDigits(int32_t newValue) override;
/**
* Sets the minimum number of digits allowed in the integer portion of a
@@ -1921,7 +1921,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see NumberFormat#setMinimumIntegerDigits
* @stable ICU 2.0
*/
- void setMinimumIntegerDigits(int32_t newValue) U_OVERRIDE;
+ void setMinimumIntegerDigits(int32_t newValue) override;
/**
* Sets the maximum number of digits allowed in the fraction portion of a
@@ -1932,7 +1932,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see NumberFormat#setMaximumFractionDigits
* @stable ICU 2.0
*/
- void setMaximumFractionDigits(int32_t newValue) U_OVERRIDE;
+ void setMaximumFractionDigits(int32_t newValue) override;
/**
* Sets the minimum number of digits allowed in the fraction portion of a
@@ -1943,7 +1943,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* @see NumberFormat#setMinimumFractionDigits
* @stable ICU 2.0
*/
- void setMinimumFractionDigits(int32_t newValue) U_OVERRIDE;
+ void setMinimumFractionDigits(int32_t newValue) override;
/**
* Returns the minimum number of significant digits that will be
@@ -2014,11 +2014,11 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* currency format through the application of a new pattern.
* @param theCurrency a 3-letter ISO code indicating new currency
* to use. It need not be null-terminated. May be the empty
- * string or NULL to indicate no currency.
+ * string or nullptr to indicate no currency.
* @param ec input-output error code
* @stable ICU 3.0
*/
- void setCurrency(const char16_t* theCurrency, UErrorCode& ec) U_OVERRIDE;
+ void setCurrency(const char16_t* theCurrency, UErrorCode& ec) override;
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -2137,7 +2137,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* other classes have different class IDs.
* @stable ICU 2.0
*/
- UClassID getDynamicClassID(void) const U_OVERRIDE;
+ UClassID getDynamicClassID(void) const override;
private:
diff --git a/contrib/libs/icu/include/unicode/displayoptions.h b/contrib/libs/icu/include/unicode/displayoptions.h
new file mode 100644
index 00000000000..7bc763bbacd
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/displayoptions.h
@@ -0,0 +1,274 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __DISPLAYOPTIONS_H__
+#define __DISPLAYOPTIONS_H__
+
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C++ API: Display options class
+ *
+ * This class is designed as a more modern version of the UDisplayContext mechanism.
+ */
+
+#include "unicode/udisplayoptions.h"
+#include "unicode/uversion.h"
+
+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
+ * types of data. It replaces a DisplayContext[] as a method parameter.
+ *
+ * NOTE: This class is Immutable, and uses a Builder interface.
+ *
+ * For example:
+ * ```
+ * DisplayOptions x =
+ * DisplayOptions::builder().
+ * .setGrammaticalCase(UDISPOPT_GRAMMATICAL_CASE_DATIVE)
+ * .setPluralCategory(UDISPOPT_PLURAL_CATEGORY_FEW)
+ * .build();
+ * ```
+ *
+ * @draft ICU 72
+ */
+class U_I18N_API DisplayOptions {
+public:
+ /**
+ * Responsible for building `DisplayOptions`.
+ *
+ * @draft ICU 72
+ */
+ class U_I18N_API Builder {
+ public:
+ /**
+ * Sets the grammatical case.
+ *
+ * @param grammaticalCase The grammatical case.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setGrammaticalCase(UDisplayOptionsGrammaticalCase grammaticalCase) {
+ this->grammaticalCase = grammaticalCase;
+ return *this;
+ }
+
+ /**
+ * Sets the noun class.
+ *
+ * @param nounClass The noun class.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setNounClass(UDisplayOptionsNounClass nounClass) {
+ this->nounClass = nounClass;
+ return *this;
+ }
+
+ /**
+ * Sets the plural category.
+ *
+ * @param pluralCategory The plural category.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setPluralCategory(UDisplayOptionsPluralCategory pluralCategory) {
+ this->pluralCategory = pluralCategory;
+ return *this;
+ }
+
+ /**
+ * Sets the capitalization.
+ *
+ * @param capitalization The capitalization.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setCapitalization(UDisplayOptionsCapitalization capitalization) {
+ this->capitalization = capitalization;
+ return *this;
+ }
+
+ /**
+ * Sets the dialect handling.
+ *
+ * @param nameStyle The name style.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setNameStyle(UDisplayOptionsNameStyle nameStyle) {
+ this->nameStyle = nameStyle;
+ return *this;
+ }
+
+ /**
+ * Sets the display length.
+ *
+ * @param displayLength The display length.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setDisplayLength(UDisplayOptionsDisplayLength displayLength) {
+ this->displayLength = displayLength;
+ return *this;
+ }
+
+ /**
+ * Sets the substitute handling.
+ *
+ * @param substituteHandling The substitute handling.
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder &setSubstituteHandling(UDisplayOptionsSubstituteHandling substituteHandling) {
+ this->substituteHandling = substituteHandling;
+ return *this;
+ }
+
+ /**
+ * Builds the display options.
+ *
+ * @return DisplayOptions
+ * @draft ICU 72
+ */
+ DisplayOptions build() { return DisplayOptions(*this); }
+
+ private:
+ friend DisplayOptions;
+
+ Builder();
+ Builder(const DisplayOptions &displayOptions);
+
+ UDisplayOptionsGrammaticalCase grammaticalCase;
+ UDisplayOptionsNounClass nounClass;
+ UDisplayOptionsPluralCategory pluralCategory;
+ UDisplayOptionsCapitalization capitalization;
+ UDisplayOptionsNameStyle nameStyle;
+ UDisplayOptionsDisplayLength displayLength;
+ UDisplayOptionsSubstituteHandling substituteHandling;
+ };
+
+ /**
+ * Creates a builder with the `UNDEFINED` values for all the parameters.
+ *
+ * @return Builder
+ * @draft ICU 72
+ */
+ static Builder builder();
+ /**
+ * Creates a builder with the same parameters from this object.
+ *
+ * @return Builder
+ * @draft ICU 72
+ */
+ Builder copyToBuilder() const;
+ /**
+ * Gets the grammatical case.
+ *
+ * @return UDisplayOptionsGrammaticalCase
+ * @draft ICU 72
+ */
+ UDisplayOptionsGrammaticalCase getGrammaticalCase() const { return grammaticalCase; }
+
+ /**
+ * Gets the noun class.
+ *
+ * @return UDisplayOptionsNounClass
+ * @draft ICU 72
+ */
+ UDisplayOptionsNounClass getNounClass() const { return nounClass; }
+
+ /**
+ * Gets the plural category.
+ *
+ * @return UDisplayOptionsPluralCategory
+ * @draft ICU 72
+ */
+ UDisplayOptionsPluralCategory getPluralCategory() const { return pluralCategory; }
+
+ /**
+ * Gets the capitalization.
+ *
+ * @return UDisplayOptionsCapitalization
+ * @draft ICU 72
+ */
+ UDisplayOptionsCapitalization getCapitalization() const { return capitalization; }
+
+ /**
+ * Gets the dialect handling.
+ *
+ * @return UDisplayOptionsNameStyle
+ * @draft ICU 72
+ */
+ UDisplayOptionsNameStyle getNameStyle() const { return nameStyle; }
+
+ /**
+ * Gets the display length.
+ *
+ * @return UDisplayOptionsDisplayLength
+ * @draft ICU 72
+ */
+ UDisplayOptionsDisplayLength getDisplayLength() const { return displayLength; }
+
+ /**
+ * Gets the substitute handling.
+ *
+ * @return UDisplayOptionsSubstituteHandling
+ * @draft ICU 72
+ */
+ UDisplayOptionsSubstituteHandling getSubstituteHandling() const { return substituteHandling; }
+
+ /**
+ * Copies the DisplayOptions.
+ *
+ * @param other The options to copy.
+ * @draft ICU 72
+ */
+ DisplayOptions &operator=(const DisplayOptions &other) = default;
+
+ /**
+ * Moves the DisplayOptions.
+ *
+ * @param other The options to move from.
+ * @draft ICU 72
+ */
+ DisplayOptions &operator=(DisplayOptions &&other) noexcept = default;
+
+ /**
+ * Copies the DisplayOptions.
+ *
+ * @param other The options to copy.
+ * @draft ICU 72
+ */
+ DisplayOptions(const DisplayOptions &other) = default;
+
+private:
+ DisplayOptions(const Builder &builder);
+ UDisplayOptionsGrammaticalCase grammaticalCase;
+ UDisplayOptionsNounClass nounClass;
+ UDisplayOptionsPluralCategory pluralCategory;
+ UDisplayOptionsCapitalization capitalization;
+ UDisplayOptionsNameStyle nameStyle;
+ UDisplayOptionsDisplayLength displayLength;
+ UDisplayOptionsSubstituteHandling substituteHandling;
+};
+
+#endif // U_HIDE_DRAFT_API
+
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
+#endif // __DISPLAYOPTIONS_H__
diff --git a/contrib/libs/icu/include/unicode/dtfmtsym.h b/contrib/libs/icu/include/unicode/dtfmtsym.h
index 200b3a6ef17..3cd54092e0e 100644
--- a/contrib/libs/icu/include/unicode/dtfmtsym.h
+++ b/contrib/libs/icu/include/unicode/dtfmtsym.h
@@ -74,14 +74,14 @@ class Hashtable;
* DateFormatSymbols are not expected to be subclassed. Data for a calendar is
* loaded out of resource bundles. The 'type' parameter indicates the type of
* calendar, for example, "gregorian" or "japanese". If the type is not gregorian
- * (or NULL, or an empty string) then the type is appended to the resource name,
+ * (or nullptr, or an empty string) then the type is appended to the resource name,
* for example, 'Eras_japanese' instead of 'Eras'. If the resource 'Eras_japanese' did
* not exist (even in root), then this class will fall back to just 'Eras', that is,
* Gregorian data. Therefore, the calendar implementor MUST ensure that the root
* locale at least contains any resources that are to be particularized for the
* calendar type.
*/
-class U_I18N_API DateFormatSymbols U_FINAL : public UObject {
+class U_I18N_API DateFormatSymbols final : public UObject {
public:
/**
* Construct a DateFormatSymbols object by loading format data from
@@ -122,7 +122,7 @@ public:
*
* @param type Type of calendar (as returned by Calendar::getType).
* Will be used to access the correct set of strings.
- * (NULL or empty string defaults to "gregorian".)
+ * (nullptr or empty string defaults to "gregorian".)
* @param status Status code. Failure
* results if the resources for the default cannot be
* found or cannot be loaded
@@ -137,7 +137,7 @@ public:
* @param locale Locale to load format data from.
* @param type Type of calendar (as returned by Calendar::getType).
* Will be used to access the correct set of strings.
- * (NULL or empty string defaults to "gregorian".)
+ * (nullptr or empty string defaults to "gregorian".)
* @param status Status code. Failure
* results if the resources for the locale cannot be
* found or cannot be loaded
@@ -524,14 +524,14 @@ public:
/**
* Somewhat temporary function for getting complete set of leap month patterns for all
- * contexts & widths, indexed by EMonthPatternType values. Returns NULL if calendar
+ * contexts & widths, indexed by EMonthPatternType values. Returns nullptr if calendar
* does not have leap month patterns. Note, there is currently no setter for this.
* Eventually we will add full support for different month pattern types (needed for
* other calendars such as Hindu) at which point this approach will be replaced by a
* more complete approach.
* @param count Filled in with length of the array (may be 0).
* @return The leap month patterns (DateFormatSymbols retains ownership).
- * May be NULL if there are no leap month patterns for this calendar.
+ * May be nullptr if there are no leap month patterns for this calendar.
* @internal
*/
const UnicodeString* getLeapMonthPatterns(int32_t& count) const;
@@ -920,7 +920,7 @@ private:
char validLocale[ULOC_FULLNAME_CAPACITY];
char actualLocale[ULOC_FULLNAME_CAPACITY];
- DateFormatSymbols(); // default constructor not implemented
+ DateFormatSymbols() = delete; // default constructor not implemented
/**
* Called by the constructors to actually load data from the resources
diff --git a/contrib/libs/icu/include/unicode/dtintrv.h b/contrib/libs/icu/include/unicode/dtintrv.h
index 46a94ce3495..8c172eb7a59 100644
--- a/contrib/libs/icu/include/unicode/dtintrv.h
+++ b/contrib/libs/icu/include/unicode/dtintrv.h
@@ -131,7 +131,7 @@ private:
/**
* Default constructor, not implemented.
*/
- DateInterval();
+ DateInterval() = delete;
UDate fromDate;
UDate toDate;
diff --git a/contrib/libs/icu/include/unicode/dtitvfmt.h b/contrib/libs/icu/include/unicode/dtitvfmt.h
index 85a1b365d83..b4dc8cabf04 100644
--- a/contrib/libs/icu/include/unicode/dtitvfmt.h
+++ b/contrib/libs/icu/include/unicode/dtitvfmt.h
@@ -68,13 +68,13 @@ class U_I18N_API FormattedDateInterval : public UMemory, public FormattedValue {
* Move constructor: Leaves the source FormattedDateInterval in an undefined state.
* @stable ICU 64
*/
- FormattedDateInterval(FormattedDateInterval&& src) U_NOEXCEPT;
+ FormattedDateInterval(FormattedDateInterval&& src) noexcept;
/**
* Destruct an instance of FormattedDateInterval.
* @stable ICU 64
*/
- virtual ~FormattedDateInterval() U_OVERRIDE;
+ virtual ~FormattedDateInterval() override;
/** Copying not supported; use move constructor instead. */
FormattedDateInterval(const FormattedDateInterval&) = delete;
@@ -86,19 +86,19 @@ class U_I18N_API FormattedDateInterval : public UMemory, public FormattedValue {
* Move assignment: Leaves the source FormattedDateInterval in an undefined state.
* @stable ICU 64
*/
- FormattedDateInterval& operator=(FormattedDateInterval&& src) U_NOEXCEPT;
+ FormattedDateInterval& operator=(FormattedDateInterval&& src) noexcept;
/** @copydoc FormattedValue::toString() */
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toString(UErrorCode& status) const override;
/** @copydoc FormattedValue::toTempString() */
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toTempString(UErrorCode& status) const override;
/** @copydoc FormattedValue::appendTo() */
- Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
+ Appendable &appendTo(Appendable& appendable, UErrorCode& status) const override;
/** @copydoc FormattedValue::nextPosition() */
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
private:
FormattedDateIntervalData *fData;
@@ -588,7 +588,7 @@ public:
* If parse fails, return contents are undefined.
* @param parse_pos The position to start parsing at. Since no parsing
* is supported, upon return this param is unchanged.
- * @return A newly created Formattable* object, or NULL
+ * @return A newly created Formattable* object, or nullptr
* on failure. The caller owns this and should
* delete it when done.
* @internal ICU 4.0
@@ -995,8 +995,8 @@ private:
const UnicodeString* skeleton,
const UnicodeString* bestSkeleton,
int8_t differenceInfo,
- UnicodeString* extendedSkeleton = NULL,
- UnicodeString* extendedBestSkeleton = NULL);
+ UnicodeString* extendedSkeleton = nullptr,
+ UnicodeString* extendedBestSkeleton = nullptr);
/**
* Adjust field width in best match interval pattern to match
diff --git a/contrib/libs/icu/include/unicode/dtitvinf.h b/contrib/libs/icu/include/unicode/dtitvinf.h
index b5afc064678..5b9a45351c2 100644
--- a/contrib/libs/icu/include/unicode/dtitvinf.h
+++ b/contrib/libs/icu/include/unicode/dtitvinf.h
@@ -151,7 +151,7 @@ U_NAMESPACE_BEGIN
* calendar; non-Gregorian calendars are supported from ICU 4.4.1.
* @stable ICU 4.0
**/
-class U_I18N_API DateIntervalInfo U_FINAL : public UObject {
+class U_I18N_API DateIntervalInfo final : public UObject {
public:
/**
* Default constructor.
@@ -343,7 +343,7 @@ private:
/**
* Internal struct used to load resource bundle data.
*/
- struct DateIntervalSink;
+ struct U_HIDDEN DateIntervalSink;
/**
* Following is for saving the interval patterns.
diff --git a/contrib/libs/icu/include/unicode/dtptngen.h b/contrib/libs/icu/include/unicode/dtptngen.h
index 250a0e089fe..8c374a30943 100644
--- a/contrib/libs/icu/include/unicode/dtptngen.h
+++ b/contrib/libs/icu/include/unicode/dtptngen.h
@@ -83,13 +83,6 @@ public:
*/
static DateTimePatternGenerator* U_EXPORT2 createInstanceNoStdPat(const Locale& uLocale, UErrorCode& status);
- /**
- * For ICU use only
- *
- * @internal
- */
- static DateTimePatternGenerator* U_EXPORT2 internalMakeInstance(const Locale& uLocale, UErrorCode& status);
-
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -311,6 +304,11 @@ public:
* for those two skeletons, so the result is put together with this pattern,
* resulting in "d-MMM h:mm".
*
+ * There are four DateTimeFormats in a DateTimePatternGenerator object,
+ * corresponding to date styles UDAT_FULL..UDAT_SHORT. This method sets
+ * all of them to the specified pattern. To set them individually, see
+ * setDateTimeFormat(UDateFormatStyle style, ...).
+ *
* @param dateTimeFormat
* message format pattern, here {1} will be replaced by the date
* pattern and {0} will be replaced by the time pattern.
@@ -320,11 +318,64 @@ public:
/**
* Getter corresponding to setDateTimeFormat.
+ *
+ * There are four DateTimeFormats in a DateTimePatternGenerator object,
+ * corresponding to date styles UDAT_FULL..UDAT_SHORT. This method gets
+ * the style for UDAT_MEDIUM (the default). To get them individually, see
+ * getDateTimeFormat(UDateFormatStyle style).
+ *
* @return DateTimeFormat.
* @stable ICU 3.8
*/
const UnicodeString& getDateTimeFormat() const;
+#if !UCONFIG_NO_FORMATTING
+ /**
+ * dateTimeFormats are message patterns used to compose combinations of date
+ * and time patterns. There are four length styles, corresponding to the
+ * inferred style of the date pattern; these are UDateFormatStyle values:
+ * - UDAT_FULL (for date pattern with weekday and long month), else
+ * - UDAT_LONG (for a date pattern with long month), else
+ * - UDAT_MEDIUM (for a date pattern with abbreviated month), else
+ * - UDAT_SHORT (for any other date pattern).
+ * For details on dateTimeFormats, see
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#dateTimeFormats.
+ * The default pattern in the root locale for all styles is "{1} {0}".
+ *
+ * @param style
+ * one of DateFormat.FULL..DateFormat.SHORT. Error if out of range.
+ * @param dateTimeFormat
+ * the new dateTimeFormat to set for the the specified style
+ * @param status
+ * in/out parameter; if no failure status is already set,
+ * it will be set according to result of the function (e.g.
+ * U_ILLEGAL_ARGUMENT_ERROR for style out of range).
+ * @stable ICU 71
+ */
+ void setDateTimeFormat(UDateFormatStyle style, const UnicodeString& dateTimeFormat,
+ UErrorCode& status);
+
+ /**
+ * Getter corresponding to setDateTimeFormat.
+ *
+ * @param style
+ * one of UDAT_FULL..UDAT_SHORT. Error if out of range.
+ * @param status
+ * in/out parameter; if no failure status is already set,
+ * it will be set according to result of the function (e.g.
+ * U_ILLEGAL_ARGUMENT_ERROR for style out of range).
+ * @return
+ * the current dateTimeFormat for the the specified style, or
+ * empty string in case of error. The UnicodeString reference,
+ * or the contents of the string, may no longer be valid if
+ * setDateTimeFormat is called, or the DateTimePatternGenerator
+ * object is deleted.
+ * @stable ICU 71
+ */
+ const UnicodeString& getDateTimeFormat(UDateFormatStyle style,
+ UErrorCode& status) const;
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
/**
* Return the best pattern matching the input skeleton. It is guaranteed to
* have all of the fields in the skeleton.
@@ -545,8 +596,7 @@ private:
*/
DateTimePatternGenerator& operator=(const DateTimePatternGenerator& other);
- // TODO(ticket:13619): re-enable when UDATPG_NARROW no longer in draft mode.
- // static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1;
+ static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1;
Locale pLocale; // pattern locale
FormatParser *fp;
@@ -554,9 +604,8 @@ private:
DistanceInfo *distanceInfo;
PatternMap *patternMap;
UnicodeString appendItemFormats[UDATPG_FIELD_COUNT];
- // TODO(ticket:13619): [3] -> UDATPG_WIDTH_COUNT
- UnicodeString fieldDisplayNames[UDATPG_FIELD_COUNT][3];
- UnicodeString dateTimeFormat;
+ UnicodeString fieldDisplayNames[UDATPG_FIELD_COUNT][UDATPG_WIDTH_COUNT];
+ UnicodeString dateTimeFormat[4];
UnicodeString decimal;
DateTimeMatcher *skipMatcher;
Hashtable *fAvailableFormatKeyHash;
@@ -607,9 +656,9 @@ private:
static void U_CALLCONV loadAllowedHourFormatsData(UErrorCode &status);
void getAllowedHourFormats(const Locale &locale, UErrorCode &status);
- struct AppendItemFormatsSink;
- struct AppendItemNamesSink;
- struct AvailableFormatsSink;
+ struct U_HIDDEN AppendItemFormatsSink;
+ struct U_HIDDEN AppendItemNamesSink;
+ struct U_HIDDEN AvailableFormatsSink;
} ;// end class DateTimePatternGenerator
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/edits.h b/contrib/libs/icu/include/unicode/edits.h
index bfa07fa6765..dda9d3ca759 100644
--- a/contrib/libs/icu/include/unicode/edits.h
+++ b/contrib/libs/icu/include/unicode/edits.h
@@ -77,7 +77,7 @@ class UnicodeString;
*
* @stable ICU 59
*/
-class U_COMMON_API Edits U_FINAL : public UMemory {
+class U_COMMON_API Edits final : public UMemory {
public:
/**
* Constructs an empty object.
@@ -103,7 +103,7 @@ public:
* @param src source edits
* @stable ICU 60
*/
- Edits(Edits &&src) U_NOEXCEPT :
+ Edits(Edits &&src) noexcept :
array(stackArray), capacity(STACK_CAPACITY), length(src.length),
delta(src.delta), numChanges(src.numChanges),
errorCode_(src.errorCode_) {
@@ -132,13 +132,13 @@ public:
* @return *this
* @stable ICU 60
*/
- Edits &operator=(Edits &&src) U_NOEXCEPT;
+ Edits &operator=(Edits &&src) noexcept;
/**
* Resets the data but may not release memory.
* @stable ICU 59
*/
- void reset() U_NOEXCEPT;
+ void reset() noexcept;
/**
* Adds a no-change edit: a record for an unchanged segment of text.
@@ -200,7 +200,7 @@ public:
* @see getFineIterator
* @stable ICU 59
*/
- struct U_COMMON_API Iterator U_FINAL : public UMemory {
+ struct U_COMMON_API Iterator final : public UMemory {
/**
* Default constructor, empty iterator.
* @stable ICU 60
@@ -504,9 +504,9 @@ public:
Edits &mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode);
private:
- void releaseArray() U_NOEXCEPT;
+ void releaseArray() noexcept;
Edits &copyArray(const Edits &other);
- Edits &moveArray(Edits &src) U_NOEXCEPT;
+ Edits &moveArray(Edits &src) noexcept;
void setLastUnit(int32_t last) { array[length - 1] = (uint16_t)last; }
int32_t lastUnit() const { return length > 0 ? array[length - 1] : 0xffff; }
diff --git a/contrib/libs/icu/include/unicode/fieldpos.h b/contrib/libs/icu/include/unicode/fieldpos.h
index b985f3b2f76..0c092a00522 100644
--- a/contrib/libs/icu/include/unicode/fieldpos.h
+++ b/contrib/libs/icu/include/unicode/fieldpos.h
@@ -177,7 +177,7 @@ public:
/**
* Clone this object.
* Clones can be used concurrently in multiple threads.
- * If an error occurs, then NULL is returned.
+ * If an error occurs, then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
diff --git a/contrib/libs/icu/include/unicode/fmtable.h b/contrib/libs/icu/include/unicode/fmtable.h
index e1c6dec35e4..6bda3576042 100644
--- a/contrib/libs/icu/include/unicode/fmtable.h
+++ b/contrib/libs/icu/include/unicode/fmtable.h
@@ -202,7 +202,7 @@ public:
/**
* Clone this object.
* Clones can be used concurrently in multiple threads.
- * If an error occurs, then NULL is returned.
+ * If an error occurs, then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -446,7 +446,7 @@ public:
/**
* Gets the array value and count of this object. If the type is
* not an array, status is set to U_INVALID_FORMAT_ERROR, count is
- * set to 0, and the result is NULL.
+ * set to 0, and the result is nullptr.
* @param count fill-in with the count of this object.
* @param status the error code.
* @return the array value of this object.
@@ -466,15 +466,15 @@ public:
/**
* Returns a pointer to the UObject contained within this
- * formattable, or NULL if this object does not contain a UObject.
- * @return a UObject pointer, or NULL
+ * formattable, or nullptr if this object does not contain a UObject.
+ * @return a UObject pointer, or nullptr
* @stable ICU 3.0
*/
const UObject* getObject() const;
/**
* Returns a numeric string representation of the number contained within this
- * formattable, or NULL if this object does not contain numeric type.
+ * formattable, or nullptr if this object does not contain numeric type.
* For values obtained by parsing, the returned decimal number retains
* the full precision and range of the original input, unconstrained by
* the limits of a double floating point or a 64 bit int.
diff --git a/contrib/libs/icu/include/unicode/formattednumber.h b/contrib/libs/icu/include/unicode/formattednumber.h
new file mode 100644
index 00000000000..198c9d84782
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/formattednumber.h
@@ -0,0 +1,215 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __FORMATTEDNUMBER_H__
+#define __FORMATTEDNUMBER_H__
+
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/uobject.h"
+#include "unicode/formattedvalue.h"
+#include "unicode/measunit.h"
+#include "unicode/udisplayoptions.h"
+
+/**
+ * \file
+ * \brief C API: Formatted number result from various number formatting functions.
+ *
+ * See also {@link icu::FormattedValue} for additional things you can do with a FormattedNumber.
+ */
+
+U_NAMESPACE_BEGIN
+
+class FieldPositionIteratorHandler;
+
+namespace number { // icu::number
+
+namespace impl {
+class DecimalQuantity;
+class UFormattedNumberData;
+struct UFormattedNumberImpl;
+} // icu::number::impl
+
+
+
+/**
+ * The result of a number formatting operation. This class allows the result to be exported in several data types,
+ * including a UnicodeString and a FieldPositionIterator.
+ *
+ * Instances of this class are immutable and thread-safe.
+ *
+ * @stable ICU 60
+ */
+class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
+ public:
+
+ /**
+ * Default constructor; makes an empty FormattedNumber.
+ * @stable ICU 64
+ */
+ FormattedNumber()
+ : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
+
+ /**
+ * Move constructor: Leaves the source FormattedNumber in an undefined state.
+ * @stable ICU 62
+ */
+ FormattedNumber(FormattedNumber&& src) noexcept;
+
+ /**
+ * Destruct an instance of FormattedNumber.
+ * @stable ICU 60
+ */
+ virtual ~FormattedNumber() override;
+
+ /** Copying not supported; use move constructor instead. */
+ FormattedNumber(const FormattedNumber&) = delete;
+
+ /** Copying not supported; use move assignment instead. */
+ FormattedNumber& operator=(const FormattedNumber&) = delete;
+
+ /**
+ * Move assignment: Leaves the source FormattedNumber in an undefined state.
+ * @stable ICU 62
+ */
+ FormattedNumber& operator=(FormattedNumber&& src) noexcept;
+
+ // Copybrief: this method is older than the parent method
+ /**
+ * @copybrief FormattedValue::toString()
+ *
+ * For more information, see FormattedValue::toString()
+ *
+ * @stable ICU 62
+ */
+ UnicodeString toString(UErrorCode& status) const override;
+
+ // Copydoc: this method is new in ICU 64
+ /** @copydoc FormattedValue::toTempString() */
+ UnicodeString toTempString(UErrorCode& status) const override;
+
+ // Copybrief: this method is older than the parent method
+ /**
+ * @copybrief FormattedValue::appendTo()
+ *
+ * For more information, see FormattedValue::appendTo()
+ *
+ * @stable ICU 62
+ */
+ Appendable &appendTo(Appendable& appendable, UErrorCode& status) const override;
+
+ // Copydoc: this method is new in ICU 64
+ /** @copydoc FormattedValue::nextPosition() */
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
+
+ /**
+ * Export the formatted number as a "numeric string" conforming to the
+ * syntax defined in the Decimal Arithmetic Specification, available at
+ * http://speleotrove.com/decimal
+ *
+ * This endpoint is useful for obtaining the exact number being printed
+ * after scaling and rounding have been applied by the number formatter.
+ *
+ * Example call site:
+ *
+ * auto decimalNumber = fn.toDecimalNumber<std::string>(status);
+ *
+ * @tparam StringClass A string class compatible with StringByteSink;
+ * for example, std::string.
+ * @param status Set if an error occurs.
+ * @return A StringClass containing the numeric string.
+ * @stable ICU 65
+ */
+ template<typename StringClass>
+ inline StringClass toDecimalNumber(UErrorCode& status) const;
+
+ /**
+ * Gets the resolved output unit.
+ *
+ * The output unit is dependent upon the localized preferences for the usage
+ * specified via NumberFormatterSettings::usage(), and may be a unit with
+ * UMEASURE_UNIT_MIXED unit complexity (MeasureUnit::getComplexity()), such
+ * as "foot-and-inch" or "hour-and-minute-and-second".
+ *
+ * @return `MeasureUnit`.
+ * @stable ICU 68
+ */
+ 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
+ */
+ UDisplayOptionsNounClass getNounClass(UErrorCode &status) const;
+
+#endif // U_HIDE_DRAFT_API
+
+#ifndef U_HIDE_INTERNAL_API
+
+ /**
+ * Gets the raw DecimalQuantity for plural rule selection.
+ * @internal
+ */
+ void getDecimalQuantity(impl::DecimalQuantity& output, UErrorCode& status) const;
+
+ /**
+ * Populates the mutable builder type FieldPositionIteratorHandler.
+ * @internal
+ */
+ void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih, UErrorCode& status) const;
+
+#endif /* U_HIDE_INTERNAL_API */
+
+ private:
+ // Can't use LocalPointer because UFormattedNumberData is forward-declared
+ impl::UFormattedNumberData *fData;
+
+ // Error code for the terminal methods
+ UErrorCode fErrorCode;
+
+ /**
+ * Internal constructor from data type. Adopts the data pointer.
+ * @internal (private)
+ */
+ explicit FormattedNumber(impl::UFormattedNumberData *results)
+ : fData(results), fErrorCode(U_ZERO_ERROR) {}
+
+ explicit FormattedNumber(UErrorCode errorCode)
+ : fData(nullptr), fErrorCode(errorCode) {}
+
+ void toDecimalNumber(ByteSink& sink, UErrorCode& status) const;
+
+ // To give LocalizedNumberFormatter format methods access to this class's constructor:
+ friend class LocalizedNumberFormatter;
+ friend class SimpleNumberFormatter;
+
+ // To give C API access to internals
+ friend struct impl::UFormattedNumberImpl;
+};
+
+template<typename StringClass>
+StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
+ StringClass result;
+ StringByteSink<StringClass> sink(&result);
+ toDecimalNumber(sink, status);
+ return result;
+}
+
+} // namespace number
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
+#endif // __FORMATTEDNUMBER_H__
+
diff --git a/contrib/libs/icu/include/unicode/gender.h b/contrib/libs/icu/include/unicode/gender.h
index cf7fee963e1..c81f7c88cc4 100644
--- a/contrib/libs/icu/include/unicode/gender.h
+++ b/contrib/libs/icu/include/unicode/gender.h
@@ -91,12 +91,12 @@ private:
* Copy constructor. One object per locale invariant. Clients
* must never copy GenderInfo objects.
*/
- GenderInfo(const GenderInfo& other);
+ GenderInfo(const GenderInfo& other) = delete;
/**
* Assignment operator. Not applicable to immutable objects.
*/
- GenderInfo& operator=(const GenderInfo&);
+ GenderInfo& operator=(const GenderInfo&) = delete;
GenderInfo();
diff --git a/contrib/libs/icu/include/unicode/gregocal.h b/contrib/libs/icu/include/unicode/gregocal.h
index 4c2be18251f..b85deb5ecfb 100644
--- a/contrib/libs/icu/include/unicode/gregocal.h
+++ b/contrib/libs/icu/include/unicode/gregocal.h
@@ -88,7 +88,7 @@ U_NAMESPACE_BEGIN
* cout << "Current Time" << endl;
*
* // create a Pacific Standard Time time zone
- * SimpleTimeZone* pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids->unext(NULL, success)));
+ * SimpleTimeZone* pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids->unext(nullptr, success)));
*
* // set up rules for daylight savings time
* pdt->setStartRule(UCAL_MARCH, 1, UCAL_SUNDAY, 2 * 60 * 60 * 1000);
@@ -411,19 +411,6 @@ public:
*/
int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const override;
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Return the maximum value that this field could have, given the current date.
- * For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
- * maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar,
- * for some years the actual maximum for MONTH is 12, and for others 13.
- * @param field the time field.
- * @return the maximum value that this field could have, given the current date.
- * @deprecated ICU 2.6. Use getActualMaximum(UCalendarDateFields field) instead.
- */
- int32_t getActualMaximum(EDateFields field) const;
-#endif /* U_HIDE_DEPRECATED_API */
-
/**
* Return the maximum value that this field could have, given the current date.
* For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
@@ -436,17 +423,6 @@ public:
*/
virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const override;
- /**
- * (Overrides Calendar) Return true if the current date for this Calendar is in
- * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
- *
- * @param status Fill-in parameter which receives the status of this operation.
- * @return True if the current date for this Calendar is in Daylight Savings Time,
- * false, otherwise.
- * @stable ICU 2.0
- */
- virtual UBool inDaylightTime(UErrorCode& status) const override;
-
public:
/**
@@ -487,7 +463,7 @@ public:
virtual const char * getType() const override;
private:
- GregorianCalendar(); // default constructor not implemented
+ GregorianCalendar() = delete; // default constructor not implemented
protected:
/**
@@ -716,12 +692,6 @@ public:
int32_t fGregorianCutoverYear;// = 1582;
/**
- * The year of the gregorianCutover, with 0 representing
- * 1 BC, -1 representing 2 BC, etc.
- */
- int32_t fGregorianCutoverJulianDay;// = 2299161;
-
- /**
* Converts time as milliseconds to Julian date. The Julian date used here is not a
* true Julian date, since it is measured from midnight, not noon.
*
diff --git a/contrib/libs/icu/include/unicode/icuplug.h b/contrib/libs/icu/include/unicode/icuplug.h
index 205af360d45..c787fcd4266 100644
--- a/contrib/libs/icu/include/unicode/icuplug.h
+++ b/contrib/libs/icu/include/unicode/icuplug.h
@@ -187,8 +187,12 @@ typedef enum {
/**
* Entrypoint for an ICU plugin.
- * @param plug the UPlugData handle.
- * @param status the plugin's extended status code.
+ * @param plug the UPlugData handle.
+ * @param reason the reason code for the entrypoint's call.
+ * @param status 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 A valid plugin must return UPLUG_TOKEN
* @internal ICU 4.4 Technology Preview
*/
diff --git a/contrib/libs/icu/include/unicode/idna.h b/contrib/libs/icu/include/unicode/idna.h
index 1305dc60484..1c57205bae2 100644
--- a/contrib/libs/icu/include/unicode/idna.h
+++ b/contrib/libs/icu/include/unicode/idna.h
@@ -305,8 +305,8 @@ public:
private:
friend class UTS46;
- IDNAInfo(const IDNAInfo &other); // no copying
- IDNAInfo &operator=(const IDNAInfo &other); // no copying
+ IDNAInfo(const IDNAInfo &other) = delete; // no copying
+ IDNAInfo &operator=(const IDNAInfo &other) = delete; // no copying
void reset() {
errors=labelErrors=0;
diff --git a/contrib/libs/icu/include/unicode/listformatter.h b/contrib/libs/icu/include/unicode/listformatter.h
index d7ab1d20865..37a76dcdd40 100644
--- a/contrib/libs/icu/include/unicode/listformatter.h
+++ b/contrib/libs/icu/include/unicode/listformatter.h
@@ -95,13 +95,13 @@ class U_I18N_API FormattedList : public UMemory, public FormattedValue {
* Move constructor: Leaves the source FormattedList in an undefined state.
* @stable ICU 64
*/
- FormattedList(FormattedList&& src) U_NOEXCEPT;
+ FormattedList(FormattedList&& src) noexcept;
/**
* Destruct an instance of FormattedList.
* @stable ICU 64
*/
- virtual ~FormattedList() U_OVERRIDE;
+ virtual ~FormattedList() override;
/** Copying not supported; use move constructor instead. */
FormattedList(const FormattedList&) = delete;
@@ -113,19 +113,19 @@ class U_I18N_API FormattedList : public UMemory, public FormattedValue {
* Move assignment: Leaves the source FormattedList in an undefined state.
* @stable ICU 64
*/
- FormattedList& operator=(FormattedList&& src) U_NOEXCEPT;
+ FormattedList& operator=(FormattedList&& src) noexcept;
/** @copydoc FormattedValue::toString() */
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toString(UErrorCode& status) const override;
/** @copydoc FormattedValue::toTempString() */
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toTempString(UErrorCode& status) const override;
/** @copydoc FormattedValue::appendTo() */
- Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
+ Appendable &appendTo(Appendable& appendable, UErrorCode& status) const override;
/** @copydoc FormattedValue::nextPosition() */
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
private:
FormattedListData *fData;
@@ -268,14 +268,10 @@ class U_I18N_API ListFormatter : public UObject{
static void initializeHash(UErrorCode& errorCode);
static const ListFormatInternal* getListFormatInternal(const Locale& locale, const char *style, UErrorCode& errorCode);
- struct ListPatternsSink;
+ struct U_HIDDEN ListPatternsSink;
static ListFormatInternal* loadListFormatInternal(const Locale& locale, const char* style, UErrorCode& errorCode);
- UnicodeString& format_(
- const UnicodeString items[], int32_t n_items, UnicodeString& appendTo,
- int32_t index, int32_t &offset, FieldPositionHandler* handler, UErrorCode& errorCode) const;
-
- ListFormatter();
+ ListFormatter() = delete;
ListFormatInternal* owned;
const ListFormatInternal* data;
diff --git a/contrib/libs/icu/include/unicode/localematcher.h b/contrib/libs/icu/include/unicode/localematcher.h
index 252bb7fdc20..603daf7231d 100644
--- a/contrib/libs/icu/include/unicode/localematcher.h
+++ b/contrib/libs/icu/include/unicode/localematcher.h
@@ -198,7 +198,7 @@ public:
* @param src Result to move contents from.
* @stable ICU 65
*/
- Result(Result &&src) U_NOEXCEPT;
+ Result(Result &&src) noexcept;
/**
* Destructor.
@@ -214,7 +214,7 @@ public:
* @param src Result to move contents from.
* @stable ICU 65
*/
- Result &operator=(Result &&src) U_NOEXCEPT;
+ Result &operator=(Result &&src) noexcept;
/**
* Returns the best-matching desired locale.
@@ -313,7 +313,7 @@ public:
* @param src Builder to move contents from.
* @stable ICU 65
*/
- Builder(Builder &&src) U_NOEXCEPT;
+ Builder(Builder &&src) noexcept;
/**
* Destructor.
@@ -329,7 +329,7 @@ public:
* @param src Builder to move contents from.
* @stable ICU 65
*/
- Builder &operator=(Builder &&src) U_NOEXCEPT;
+ Builder &operator=(Builder &&src) noexcept;
/**
* Parses an Accept-Language string
@@ -461,13 +461,13 @@ public:
* Option for whether to include or ignore one-way (fallback) match data.
* By default, they are included.
*
- * @param direction the match direction to set.
+ * @param matchDirection the match direction to set.
* @return this Builder object
* @stable ICU 67
*/
- Builder &setDirection(ULocMatchDirection direction) {
+ Builder &setDirection(ULocMatchDirection matchDirection) {
if (U_SUCCESS(errorCode_)) {
- direction_ = direction;
+ direction_ = matchDirection;
}
return *this;
}
@@ -548,7 +548,7 @@ public:
* @param src source matcher
* @stable ICU 65
*/
- LocaleMatcher(LocaleMatcher &&src) U_NOEXCEPT;
+ LocaleMatcher(LocaleMatcher &&src) noexcept;
/**
* Destructor.
@@ -564,7 +564,7 @@ public:
* @return *this
* @stable ICU 65
*/
- LocaleMatcher &operator=(LocaleMatcher &&src) U_NOEXCEPT;
+ LocaleMatcher &operator=(LocaleMatcher &&src) noexcept;
/**
* Returns the supported locale which best matches the desired locale.
diff --git a/contrib/libs/icu/include/unicode/localpointer.h b/contrib/libs/icu/include/unicode/localpointer.h
index 96c659d10ad..b8be3d7942e 100644
--- a/contrib/libs/icu/include/unicode/localpointer.h
+++ b/contrib/libs/icu/include/unicode/localpointer.h
@@ -79,7 +79,7 @@ public:
* @param p simple pointer to an object that is adopted
* @stable ICU 4.4
*/
- explicit LocalPointerBase(T *p=NULL) : ptr(p) {}
+ explicit LocalPointerBase(T *p=nullptr) : ptr(p) {}
/**
* Destructor deletes the object it owns.
* Subclass must override: Base class does nothing.
@@ -87,20 +87,20 @@ public:
*/
~LocalPointerBase() { /* delete ptr; */ }
/**
- * NULL check.
- * @return true if ==NULL
+ * nullptr check.
+ * @return true if ==nullptr
* @stable ICU 4.4
*/
- UBool isNull() const { return ptr==NULL; }
+ UBool isNull() const { return ptr==nullptr; }
/**
- * NULL check.
- * @return true if !=NULL
+ * nullptr check.
+ * @return true if !=nullptr
* @stable ICU 4.4
*/
- UBool isValid() const { return ptr!=NULL; }
+ UBool isValid() const { return ptr!=nullptr; }
/**
* Comparison with a simple pointer, so that existing code
- * with ==NULL need not be changed.
+ * with ==nullptr need not be changed.
* @param other simple pointer for comparison
* @return true if this pointer value equals other
* @stable ICU 4.4
@@ -108,7 +108,7 @@ public:
bool operator==(const T *other) const { return ptr==other; }
/**
* Comparison with a simple pointer, so that existing code
- * with !=NULL need not be changed.
+ * with !=nullptr need not be changed.
* @param other simple pointer for comparison
* @return true if this pointer value differs from other
* @stable ICU 4.4
@@ -133,14 +133,14 @@ public:
*/
T *operator->() const { return ptr; }
/**
- * Gives up ownership; the internal pointer becomes NULL.
+ * Gives up ownership; the internal pointer becomes nullptr.
* @return the pointer value;
* caller becomes responsible for deleting the object
* @stable ICU 4.4
*/
T *orphan() {
T *p=ptr;
- ptr=NULL;
+ ptr=nullptr;
return p;
}
/**
@@ -197,9 +197,9 @@ public:
* @param p simple pointer to an object that is adopted
* @stable ICU 4.4
*/
- explicit LocalPointer(T *p=NULL) : LocalPointerBase<T>(p) {}
+ explicit LocalPointer(T *p=nullptr) : LocalPointerBase<T>(p) {}
/**
- * Constructor takes ownership and reports an error if NULL.
+ * Constructor takes ownership and reports an error if nullptr.
*
* This constructor is intended to be used with other-class constructors
* that may report a failure UErrorCode,
@@ -208,11 +208,11 @@ public:
*
* @param p simple pointer to an object that is adopted
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
- * if p==NULL and no other failure code had been set
+ * if p==nullptr and no other failure code had been set
* @stable ICU 55
*/
LocalPointer(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) {
- if(p==NULL && U_SUCCESS(errorCode)) {
+ if(p==nullptr && U_SUCCESS(errorCode)) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -221,8 +221,8 @@ public:
* @param src source smart pointer
* @stable ICU 56
*/
- LocalPointer(LocalPointer<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
- src.ptr=NULL;
+ LocalPointer(LocalPointer<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
+ src.ptr=nullptr;
}
/**
@@ -252,10 +252,10 @@ public:
* @return *this
* @stable ICU 56
*/
- LocalPointer<T> &operator=(LocalPointer<T> &&src) U_NOEXCEPT {
+ LocalPointer<T> &operator=(LocalPointer<T> &&src) noexcept {
delete LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=src.ptr;
- src.ptr=NULL;
+ src.ptr=nullptr;
return *this;
}
@@ -267,7 +267,7 @@ public:
* @return *this
* @stable ICU 64
*/
- LocalPointer<T> &operator=(std::unique_ptr<T> &&p) U_NOEXCEPT {
+ LocalPointer<T> &operator=(std::unique_ptr<T> &&p) noexcept {
adoptInstead(p.release());
return *this;
}
@@ -277,7 +277,7 @@ public:
* @param other other smart pointer
* @stable ICU 56
*/
- void swap(LocalPointer<T> &other) U_NOEXCEPT {
+ void swap(LocalPointer<T> &other) noexcept {
T *temp=LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=other.ptr;
other.ptr=temp;
@@ -288,7 +288,7 @@ public:
* @param p2 will get p1's pointer
* @stable ICU 56
*/
- friend inline void swap(LocalPointer<T> &p1, LocalPointer<T> &p2) U_NOEXCEPT {
+ friend inline void swap(LocalPointer<T> &p1, LocalPointer<T> &p2) noexcept {
p1.swap(p2);
}
/**
@@ -307,20 +307,20 @@ public:
*
* If U_FAILURE(errorCode), then the current object is retained and the new one deleted.
*
- * If U_SUCCESS(errorCode) but the input pointer is NULL,
+ * If U_SUCCESS(errorCode) but the input pointer is nullptr,
* then U_MEMORY_ALLOCATION_ERROR is set,
- * the current object is deleted, and NULL is set.
+ * the current object is deleted, and nullptr is set.
*
* @param p simple pointer to an object that is adopted
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
- * if p==NULL and no other failure code had been set
+ * if p==nullptr and no other failure code had been set
* @stable ICU 55
*/
void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) {
if(U_SUCCESS(errorCode)) {
delete LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=p;
- if(p==NULL) {
+ if(p==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
} else {
@@ -372,9 +372,9 @@ public:
* @param p simple pointer to an array of T objects that is adopted
* @stable ICU 4.4
*/
- explicit LocalArray(T *p=NULL) : LocalPointerBase<T>(p) {}
+ explicit LocalArray(T *p=nullptr) : LocalPointerBase<T>(p) {}
/**
- * Constructor takes ownership and reports an error if NULL.
+ * Constructor takes ownership and reports an error if nullptr.
*
* This constructor is intended to be used with other-class constructors
* that may report a failure UErrorCode,
@@ -383,11 +383,11 @@ public:
*
* @param p simple pointer to an array of T objects that is adopted
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
- * if p==NULL and no other failure code had been set
+ * if p==nullptr and no other failure code had been set
* @stable ICU 56
*/
LocalArray(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) {
- if(p==NULL && U_SUCCESS(errorCode)) {
+ if(p==nullptr && U_SUCCESS(errorCode)) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
}
@@ -396,8 +396,8 @@ public:
* @param src source smart pointer
* @stable ICU 56
*/
- LocalArray(LocalArray<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
- src.ptr=NULL;
+ LocalArray(LocalArray<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
+ src.ptr=nullptr;
}
/**
@@ -427,10 +427,10 @@ public:
* @return *this
* @stable ICU 56
*/
- LocalArray<T> &operator=(LocalArray<T> &&src) U_NOEXCEPT {
+ LocalArray<T> &operator=(LocalArray<T> &&src) noexcept {
delete[] LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=src.ptr;
- src.ptr=NULL;
+ src.ptr=nullptr;
return *this;
}
@@ -442,7 +442,7 @@ public:
* @return *this
* @stable ICU 64
*/
- LocalArray<T> &operator=(std::unique_ptr<T[]> &&p) U_NOEXCEPT {
+ LocalArray<T> &operator=(std::unique_ptr<T[]> &&p) noexcept {
adoptInstead(p.release());
return *this;
}
@@ -452,7 +452,7 @@ public:
* @param other other smart pointer
* @stable ICU 56
*/
- void swap(LocalArray<T> &other) U_NOEXCEPT {
+ void swap(LocalArray<T> &other) noexcept {
T *temp=LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=other.ptr;
other.ptr=temp;
@@ -463,7 +463,7 @@ public:
* @param p2 will get p1's pointer
* @stable ICU 56
*/
- friend inline void swap(LocalArray<T> &p1, LocalArray<T> &p2) U_NOEXCEPT {
+ friend inline void swap(LocalArray<T> &p1, LocalArray<T> &p2) noexcept {
p1.swap(p2);
}
/**
@@ -482,20 +482,20 @@ public:
*
* If U_FAILURE(errorCode), then the current array is retained and the new one deleted.
*
- * If U_SUCCESS(errorCode) but the input pointer is NULL,
+ * If U_SUCCESS(errorCode) but the input pointer is nullptr,
* then U_MEMORY_ALLOCATION_ERROR is set,
- * the current array is deleted, and NULL is set.
+ * the current array is deleted, and nullptr is set.
*
* @param p simple pointer to an array of T objects that is adopted
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
- * if p==NULL and no other failure code had been set
+ * if p==nullptr and no other failure code had been set
* @stable ICU 56
*/
void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) {
if(U_SUCCESS(errorCode)) {
delete[] LocalPointerBase<T>::ptr;
LocalPointerBase<T>::ptr=p;
- if(p==NULL) {
+ if(p==nullptr) {
errorCode=U_MEMORY_ALLOCATION_ERROR;
}
} else {
@@ -552,19 +552,19 @@ public:
public: \
using LocalPointerBase<Type>::operator*; \
using LocalPointerBase<Type>::operator->; \
- explicit LocalPointerClassName(Type *p=NULL) : LocalPointerBase<Type>(p) {} \
- LocalPointerClassName(LocalPointerClassName &&src) U_NOEXCEPT \
+ explicit LocalPointerClassName(Type *p=nullptr) : LocalPointerBase<Type>(p) {} \
+ LocalPointerClassName(LocalPointerClassName &&src) noexcept \
: LocalPointerBase<Type>(src.ptr) { \
- src.ptr=NULL; \
+ 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 != NULL) { closeFunction(ptr); } } \
- LocalPointerClassName &operator=(LocalPointerClassName &&src) U_NOEXCEPT { \
- if (ptr != NULL) { closeFunction(ptr); } \
+ ~LocalPointerClassName() { if (ptr != nullptr) { closeFunction(ptr); } } \
+ LocalPointerClassName &operator=(LocalPointerClassName &&src) noexcept { \
+ if (ptr != nullptr) { closeFunction(ptr); } \
LocalPointerBase<Type>::ptr=src.ptr; \
- src.ptr=NULL; \
+ src.ptr=nullptr; \
return *this; \
} \
/* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \
@@ -572,16 +572,16 @@ public:
adoptInstead(p.release()); \
return *this; \
} \
- void swap(LocalPointerClassName &other) U_NOEXCEPT { \
+ 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) U_NOEXCEPT { \
+ friend inline void swap(LocalPointerClassName &p1, LocalPointerClassName &p2) noexcept { \
p1.swap(p2); \
} \
void adoptInstead(Type *p) { \
- if (ptr != NULL) { closeFunction(ptr); } \
+ if (ptr != nullptr) { closeFunction(ptr); } \
ptr=p; \
} \
operator std::unique_ptr<Type, decltype(&closeFunction)> () && { \
diff --git a/contrib/libs/icu/include/unicode/locid.h b/contrib/libs/icu/include/unicode/locid.h
index 2f2b3998a78..a6fbbb70418 100644
--- a/contrib/libs/icu/include/unicode/locid.h
+++ b/contrib/libs/icu/include/unicode/locid.h
@@ -258,7 +258,7 @@ public:
* @param language Lowercase two-letter or three-letter ISO-639 code.
* This parameter can instead be an ICU style C locale (e.g. "en_US"),
* but the other parameters must not be used.
- * This parameter can be NULL; if so,
+ * This parameter can be nullptr; if so,
* the locale is initialized to match the current default locale.
* (This is the same as using the default constructor.)
* Please note: The Java Locale class does NOT accept the form
@@ -294,7 +294,7 @@ public:
* @param other The Locale object being moved in.
* @stable ICU 63
*/
- Locale(Locale&& other) U_NOEXCEPT;
+ Locale(Locale&& other) noexcept;
/**
* Destructor
@@ -320,7 +320,7 @@ public:
* @return *this
* @stable ICU 63
*/
- Locale& operator=(Locale&& other) U_NOEXCEPT;
+ Locale& operator=(Locale&& other) noexcept;
/**
* Checks if two locale keys are the same.
@@ -344,7 +344,7 @@ public:
/**
* Clone this object.
* Clones can be used concurrently in multiple threads.
- * If an error occurs, then NULL is returned.
+ * If an error occurs, then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -378,7 +378,7 @@ public:
* setDefault() only changes ICU's default locale ID, <strong>not</strong>
* the default locale ID of the runtime environment.
*
- * @param newLocale Locale to set to. If NULL, set to the value obtained
+ * @param newLocale Locale to set to. If nullptr, set to the value obtained
* from the runtime environment.
* @param success The error code.
* @system
@@ -453,7 +453,7 @@ public:
/**
* Creates a locale from the given string after canonicalizing
* the string according to CLDR by calling uloc_canonicalize().
- * @param name the locale ID to create from. Must not be NULL.
+ * @param name the locale ID to create from. Must not be nullptr.
* @return a new locale object corresponding to the given name
* @stable ICU 3.0
* @see uloc_canonicalize
@@ -583,7 +583,7 @@ public:
* Gets the list of keywords for the specified locale.
*
* @param status the status code
- * @return pointer to StringEnumeration class, or NULL if there are no keywords.
+ * @return pointer to StringEnumeration class, or nullptr if there are no keywords.
* Client must dispose of it by calling delete.
* @see getKeywords
* @stable ICU 2.8
@@ -594,7 +594,7 @@ public:
* Gets the list of Unicode keywords for the specified locale.
*
* @param status the status code
- * @return pointer to StringEnumeration class, or NULL if there are no keywords.
+ * @return pointer to StringEnumeration class, or nullptr if there are no keywords.
* Client must dispose of it by calling delete.
* @see getUnicodeKeywords
* @stable ICU 63
@@ -722,7 +722,7 @@ public:
*
* @param keywordName name of the keyword to be set. Case insensitive.
* @param keywordValue value of the keyword to be set. If 0-length or
- * NULL, will result in the keyword being removed. No error is given if
+ * nullptr, will result in the keyword being removed. No error is given if
* that keyword does not exist.
* @param status Returns any error information while performing this operation.
*
@@ -743,7 +743,7 @@ public:
*
* @param keywordName name of the keyword to be set.
* @param keywordValue value of the keyword to be set. If 0-length or
- * NULL, will result in the keyword being removed. No error is given if
+ * nullptr, will result in the keyword being removed. No error is given if
* that keyword does not exist.
* @param status Returns any error information while performing this operation.
* @stable ICU 63
@@ -763,7 +763,7 @@ public:
*
* @param keywordName name of the keyword to be set.
* @param keywordValue value of the keyword to be set. If 0-length or
- * NULL, will result in the keyword being removed. No error is given if
+ * nullptr, will result in the keyword being removed. No error is given if
* that keyword does not exist.
* @param status Returns any error information while performing this operation.
* @stable ICU 63
diff --git a/contrib/libs/icu/include/unicode/measfmt.h b/contrib/libs/icu/include/unicode/measfmt.h
index 893076145f5..59bf546a905 100644
--- a/contrib/libs/icu/include/unicode/measfmt.h
+++ b/contrib/libs/icu/include/unicode/measfmt.h
@@ -244,7 +244,7 @@ class U_I18N_API MeasureFormat : public Format {
* {@link icu::number::NumberFormatter} instead of NumberFormat.
* @param locale desired locale
* @param ec input-output error code
- * @return a formatter object, or NULL upon error
+ * @return a formatter object, or nullptr upon error
* @stable ICU 3.0
*/
static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& locale,
@@ -257,7 +257,7 @@ class U_I18N_API MeasureFormat : public Format {
* <strong>NOTE:</strong> New users are strongly encouraged to use
* {@link icu::number::NumberFormatter} instead of NumberFormat.
* @param ec input-output error code
- * @return a formatter object, or NULL upon error
+ * @return a formatter object, or nullptr upon error
* @stable ICU 3.0
*/
static MeasureFormat* U_EXPORT2 createCurrencyFormat(UErrorCode& ec);
diff --git a/contrib/libs/icu/include/unicode/measunit.h b/contrib/libs/icu/include/unicode/measunit.h
index 61da62e71f2..f7acc6990b2 100644
--- a/contrib/libs/icu/include/unicode/measunit.h
+++ b/contrib/libs/icu/include/unicode/measunit.h
@@ -19,6 +19,7 @@
#if !UCONFIG_NO_FORMATTING
+#include <utility>
#include "unicode/unistr.h"
#include "unicode/localpointer.h"
@@ -77,14 +78,13 @@ enum UMeasureUnitComplexity {
};
-#ifndef U_HIDE_DRAFT_API
/**
* Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".
*
* Enum values should be treated as opaque: use umeas_getPrefixPower() and
* umeas_getPrefixBase() to find their corresponding values.
*
- * @draft ICU 69
+ * @stable ICU 69
* @see umeas_getPrefixBase
* @see umeas_getPrefixPower
*/
@@ -96,14 +96,14 @@ typedef enum UMeasurePrefix {
* implementation detail and should not be relied upon: use
* umeas_getPrefixPower() to obtain meaningful values.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_ONE = 30 + 0,
/**
* SI prefix: yotta, 10^24.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24,
@@ -119,133 +119,133 @@ typedef enum UMeasurePrefix {
/**
* SI prefix: zetta, 10^21.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_ZETTA = UMEASURE_PREFIX_ONE + 21,
/**
* SI prefix: exa, 10^18.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_EXA = UMEASURE_PREFIX_ONE + 18,
/**
* SI prefix: peta, 10^15.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_PETA = UMEASURE_PREFIX_ONE + 15,
/**
* SI prefix: tera, 10^12.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_TERA = UMEASURE_PREFIX_ONE + 12,
/**
* SI prefix: giga, 10^9.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_GIGA = UMEASURE_PREFIX_ONE + 9,
/**
* SI prefix: mega, 10^6.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_MEGA = UMEASURE_PREFIX_ONE + 6,
/**
* SI prefix: kilo, 10^3.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_KILO = UMEASURE_PREFIX_ONE + 3,
/**
* SI prefix: hecto, 10^2.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_HECTO = UMEASURE_PREFIX_ONE + 2,
/**
* SI prefix: deka, 10^1.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_DEKA = UMEASURE_PREFIX_ONE + 1,
/**
* SI prefix: deci, 10^-1.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_DECI = UMEASURE_PREFIX_ONE + -1,
/**
* SI prefix: centi, 10^-2.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_CENTI = UMEASURE_PREFIX_ONE + -2,
/**
* SI prefix: milli, 10^-3.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_MILLI = UMEASURE_PREFIX_ONE + -3,
/**
* SI prefix: micro, 10^-6.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_MICRO = UMEASURE_PREFIX_ONE + -6,
/**
* SI prefix: nano, 10^-9.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_NANO = UMEASURE_PREFIX_ONE + -9,
/**
* SI prefix: pico, 10^-12.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_PICO = UMEASURE_PREFIX_ONE + -12,
/**
* SI prefix: femto, 10^-15.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_FEMTO = UMEASURE_PREFIX_ONE + -15,
/**
* SI prefix: atto, 10^-18.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_ATTO = UMEASURE_PREFIX_ONE + -18,
/**
* SI prefix: zepto, 10^-21.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_ZEPTO = UMEASURE_PREFIX_ONE + -21,
/**
* SI prefix: yocto, 10^-24.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24,
@@ -270,7 +270,7 @@ typedef enum UMeasurePrefix {
/**
* Binary prefix: kibi, 1024^1.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_KIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1,
@@ -286,49 +286,49 @@ typedef enum UMeasurePrefix {
/**
* Binary prefix: mebi, 1024^2.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_MEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2,
/**
* Binary prefix: gibi, 1024^3.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_GIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3,
/**
* Binary prefix: tebi, 1024^4.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_TEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4,
/**
* Binary prefix: pebi, 1024^5.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_PEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5,
/**
* Binary prefix: exbi, 1024^6.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_EXBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6,
/**
* Binary prefix: zebi, 1024^7.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_ZEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7,
/**
* Binary prefix: yobi, 1024^8.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UMEASURE_PREFIX_YOBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8,
@@ -347,7 +347,7 @@ typedef enum UMeasurePrefix {
* base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi,
* mebi).
*
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
@@ -355,12 +355,10 @@ U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
* Returns the exponent of the factor associated with the given unit prefix, for
* example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI int32_t U_EXPORT2 umeas_getPrefixPower(UMeasurePrefix unitPrefix);
-#endif // U_HIDE_DRAFT_API
-
/**
* A unit such as length, mass, volume, currency, etc. A unit is
* coupled with a numeric amount to produce a Measure.
@@ -481,7 +479,6 @@ class U_I18N_API MeasureUnit: public UObject {
*/
UMeasureUnitComplexity getComplexity(UErrorCode& status) const;
-#ifndef U_HIDE_DRAFT_API
/**
* Creates a MeasureUnit which is this SINGLE unit augmented with the specified prefix.
* For example, UMEASURE_PREFIX_KILO for "kilo", or UMEASURE_PREFIX_KIBI for "kibi".
@@ -494,7 +491,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @param prefix The prefix, from UMeasurePrefix.
* @param status Set if this is not a SINGLE unit or if another error occurs.
* @return A new SINGLE unit.
- * @draft ICU 69
+ * @stable ICU 69
*/
MeasureUnit withPrefix(UMeasurePrefix prefix, UErrorCode& status) const;
@@ -510,10 +507,9 @@ class U_I18N_API MeasureUnit: public UObject {
* @return The prefix of this SINGLE unit, from UMeasurePrefix.
* @see umeas_getPrefixBase
* @see umeas_getPrefixPower
- * @draft ICU 69
+ * @stable ICU 69
*/
UMeasurePrefix getPrefix(UErrorCode& status) const;
-#endif // U_HIDE_DRAFT_API
/**
* Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality
@@ -955,23 +951,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getSquareYard();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of concentr: item.
* Caller owns returned value and must free it.
* Also see {@link #getItem()}.
* @param status ICU error code.
- * @draft ICU 70
+ * @stable ICU 70
*/
static MeasureUnit *createItem(UErrorCode &status);
/**
* Returns by value, unit of concentr: item.
* Also see {@link #createItem()}.
- * @draft ICU 70
+ * @stable ICU 70
*/
static MeasureUnit getItem();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of concentr: karat.
@@ -989,23 +983,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getKarat();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of concentr: milligram-ofglucose-per-deciliter.
* Caller owns returned value and must free it.
* Also see {@link #getMilligramOfglucosePerDeciliter()}.
* @param status ICU error code.
- * @draft ICU 69
+ * @stable ICU 69
*/
static MeasureUnit *createMilligramOfglucosePerDeciliter(UErrorCode &status);
/**
* Returns by value, unit of concentr: milligram-ofglucose-per-deciliter.
* Also see {@link #createMilligramOfglucosePerDeciliter()}.
- * @draft ICU 69
+ * @stable ICU 69
*/
static MeasureUnit getMilligramOfglucosePerDeciliter();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of concentr: milligram-per-deciliter.
@@ -1535,6 +1527,24 @@ 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
+ */
+ static MeasureUnit *createQuarter(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of duration: quarter.
+ * Also see {@link #createQuarter()}.
+ * @draft ICU 72
+ */
+ static MeasureUnit getQuarter();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of duration: second.
* Caller owns returned value and must free it.
@@ -1823,23 +1833,21 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getThermUs();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns by pointer, unit of force: kilowatt-hour-per-100-kilometer.
* Caller owns returned value and must free it.
* Also see {@link #getKilowattHourPer100Kilometer()}.
* @param status ICU error code.
- * @draft ICU 70
+ * @stable ICU 70
*/
static MeasureUnit *createKilowattHourPer100Kilometer(UErrorCode &status);
/**
* Returns by value, unit of force: kilowatt-hour-per-100-kilometer.
* Also see {@link #createKilowattHourPer100Kilometer()}.
- * @draft ICU 70
+ * @stable ICU 70
*/
static MeasureUnit getKilowattHourPer100Kilometer();
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns by pointer, unit of force: newton.
@@ -2578,17 +2586,25 @@ class U_I18N_API MeasureUnit: public UObject {
static MeasureUnit getKilogram();
/**
- * Returns by pointer, unit of mass: metric-ton.
+ * Returns by pointer, unit of mass: metric-ton
+ * (renamed to tonne in CLDR 42 / ICU 72).
* Caller owns returned value and must free it.
- * Also see {@link #getMetricTon()}.
+ * Note: In ICU 74 this will be deprecated in favor of
+ * createTonne(), which is currently draft but will
+ * become stable in ICU 74, and which uses the preferred naming.
+ * Also see {@link #getMetricTon()} and {@link #createTonne()}.
* @param status ICU error code.
* @stable ICU 54
*/
static MeasureUnit *createMetricTon(UErrorCode &status);
/**
- * Returns by value, unit of mass: metric-ton.
- * Also see {@link #createMetricTon()}.
+ * Returns by value, unit of mass: metric-ton
+ * (renamed to tonne in CLDR 42 / ICU 72).
+ * Note: In ICU 74 this will be deprecated in favor of
+ * getTonne(), which is currently draft but will
+ * become stable in ICU 74, and which uses the preferred naming.
+ * Also see {@link #createMetricTon()} and {@link #getTonne()}.
* @stable ICU 64
*/
static MeasureUnit getMetricTon();
@@ -2721,6 +2737,24 @@ 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
+ */
+ static MeasureUnit *createTonne(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of mass: tonne.
+ * Also see {@link #createTonne()}.
+ * @draft ICU 72
+ */
+ static MeasureUnit getTonne();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of power: gigawatt.
* Caller owns returned value and must free it.
@@ -2977,6 +3011,24 @@ 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
+ */
+ static MeasureUnit *createBeaufort(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of speed: beaufort.
+ * Also see {@link #createBeaufort()}.
+ * @draft ICU 73
+ */
+ static MeasureUnit getBeaufort();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of speed: kilometer-per-hour.
* Caller owns returned value and must free it.
diff --git a/contrib/libs/icu/include/unicode/measure.h b/contrib/libs/icu/include/unicode/measure.h
index 7b118acfcfa..31f931d7d4a 100644
--- a/contrib/libs/icu/include/unicode/measure.h
+++ b/contrib/libs/icu/include/unicode/measure.h
@@ -49,7 +49,7 @@ class U_I18N_API Measure: public UObject {
* unit. After this call, the caller must not delete the given
* unit object.
* @param number a numeric object; amount.isNumeric() must be true
- * @param adoptedUnit the unit object, which must not be NULL
+ * @param adoptedUnit the unit object, which must not be nullptr
* @param ec input-output error code. If the amount or the unit
* is invalid, then this will be set to a failing value.
* @stable ICU 3.0
diff --git a/contrib/libs/icu/include/unicode/messagepattern.h b/contrib/libs/icu/include/unicode/messagepattern.h
index 4c5be13dbc9..55b09bfbd4b 100644
--- a/contrib/libs/icu/include/unicode/messagepattern.h
+++ b/contrib/libs/icu/include/unicode/messagepattern.h
@@ -388,7 +388,7 @@ public:
* @param pattern a MessageFormat pattern string
* @param parseError Struct to receive information on the position
* of an error within the pattern.
- * Can be NULL.
+ * Can be nullptr.
* @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
@@ -428,7 +428,7 @@ public:
* @param pattern a MessageFormat pattern string
* @param parseError Struct to receive information on the position
* of an error within the pattern.
- * Can be NULL.
+ * Can be nullptr.
* @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
@@ -448,7 +448,7 @@ public:
* @param pattern a ChoiceFormat pattern string
* @param parseError Struct to receive information on the position
* of an error within the pattern.
- * Can be NULL.
+ * Can be nullptr.
* @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
@@ -468,7 +468,7 @@ public:
* @param pattern a PluralFormat pattern string
* @param parseError Struct to receive information on the position
* of an error within the pattern.
- * Can be NULL.
+ * Can be nullptr.
* @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
@@ -488,7 +488,7 @@ public:
* @param pattern a SelectFormat pattern string
* @param parseError Struct to receive information on the position
* of an error within the pattern.
- * Can be NULL.
+ * Can be nullptr.
* @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
diff --git a/contrib/libs/icu/include/unicode/msgfmt.h b/contrib/libs/icu/include/unicode/msgfmt.h
index c949132fdae..a8a61f90e3f 100644
--- a/contrib/libs/icu/include/unicode/msgfmt.h
+++ b/contrib/libs/icu/include/unicode/msgfmt.h
@@ -483,7 +483,7 @@ public:
* @param aposMode The new apostrophe mode.
* @param parseError Struct to receive information on the position
* of an error within the pattern.
- * Can be NULL.
+ * Can be nullptr.
* @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code.
* @stable ICU 4.8
@@ -637,8 +637,8 @@ public:
* about format numbering.
*
* @param count output parameter to receive the size of the array
- * @return an array of count Format* objects, or NULL if out of
- * memory. Any or all of the array elements may be NULL.
+ * @return an array of count Format* objects, or nullptr if out of
+ * memory. Any or all of the array elements may be nullptr.
* @stable ICU 2.0
*/
virtual const Format** getFormats(int32_t& count) const;
@@ -768,7 +768,7 @@ public:
* @param status Input/output error code. If the
* pattern cannot be parsed, set to failure code.
* @return an array of parsed arguments. The caller owns both
- * the array and its contents. Returns NULL if status is not U_ZERO_ERROR.
+ * the array and its contents. Returns nullptr if status is not U_ZERO_ERROR.
*
* @stable ICU 2.0
*/
@@ -870,8 +870,8 @@ public:
* Compares two Format objects. This is used for constructing the hash
* tables.
*
- * @param left pointer to a Format object. Must not be NULL.
- * @param right pointer to a Format object. Must not be NULL.
+ * @param left pointer to a Format object. Must not be nullptr.
+ * @param right pointer to a Format object. Must not be nullptr.
*
* @return whether the two objects are the same
* @internal
@@ -886,7 +886,7 @@ private:
Format** formatAliases; // see getFormats
int32_t formatAliasesCapacity;
- MessageFormat(); // default constructor not implemented
+ MessageFormat() = delete; // default constructor not implemented
/**
* This provider helps defer instantiation of a PluralRules object
@@ -946,7 +946,7 @@ private:
PluralSelectorProvider ordinalProvider;
/**
- * Method to retrieve default formats (or NULL on failure).
+ * Method to retrieve default formats (or nullptr on failure).
* These are semantically const, but may modify *this.
*/
const NumberFormat* getDefaultNumberFormat(UErrorCode&) const;
@@ -978,13 +978,13 @@ private:
* AppendableWrapper, updates the field position.
*
* @param msgStart Index to msgPattern part to start formatting from.
- * @param plNumber NULL except when formatting a plural argument sub-message
+ * @param plNumber nullptr except when formatting a plural argument sub-message
* where a '#' is replaced by the format string for this number.
- * @param arguments The formattable objects array. (Must not be NULL.)
- * @param argumentNames NULL if numbered values are used. Otherwise the same
+ * @param arguments The formattable objects array. (Must not be nullptr.)
+ * @param argumentNames nullptr if numbered values are used. Otherwise the same
* length as "arguments", and each entry is the name of the
* corresponding argument in "arguments".
- * @param cnt The length of arguments (and of argumentNames if that is not NULL).
+ * @param cnt The length of arguments (and of argumentNames if that is not nullptr).
* @param appendTo Output parameter to receive the result.
* The result string is appended to existing contents.
* @param pos Field position status.
@@ -1011,8 +1011,6 @@ private:
void cacheExplicitFormats(UErrorCode& status);
- int32_t skipLeadingSpaces(UnicodeString& style);
-
Format* createAppropriateFormat(UnicodeString& type,
UnicodeString& style,
Formattable::Type& formattableType,
@@ -1083,8 +1081,8 @@ private:
void resetPattern();
/**
- * A DummyFormatter that we use solely to store a NULL value. UHash does
- * not support storing NULL values.
+ * A DummyFormatter that we use solely to store a nullptr value. UHash does
+ * not support storing nullptr values.
*/
class U_I18N_API DummyFormat : public Format {
public:
diff --git a/contrib/libs/icu/include/unicode/normalizer2.h b/contrib/libs/icu/include/unicode/normalizer2.h
index 2d355250c29..972894ec42a 100644
--- a/contrib/libs/icu/include/unicode/normalizer2.h
+++ b/contrib/libs/icu/include/unicode/normalizer2.h
@@ -92,7 +92,7 @@ public:
/**
* Returns a Normalizer2 instance for Unicode NFC normalization.
- * Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode).
+ * Same as getInstance(nullptr, "nfc", 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
@@ -106,7 +106,7 @@ public:
/**
* Returns a Normalizer2 instance for Unicode NFD normalization.
- * Same as getInstance(NULL, "nfc", UNORM2_DECOMPOSE, errorCode).
+ * Same as getInstance(nullptr, "nfc", UNORM2_DECOMPOSE, 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
@@ -120,7 +120,7 @@ public:
/**
* Returns a Normalizer2 instance for Unicode NFKC normalization.
- * Same as getInstance(NULL, "nfkc", UNORM2_COMPOSE, errorCode).
+ * Same as getInstance(nullptr, "nfkc", 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
@@ -134,7 +134,7 @@ public:
/**
* Returns a Normalizer2 instance for Unicode NFKD normalization.
- * Same as getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, errorCode).
+ * Same as getInstance(nullptr, "nfkc", UNORM2_DECOMPOSE, 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
@@ -148,7 +148,7 @@ public:
/**
* Returns a Normalizer2 instance for Unicode NFKC_Casefold normalization.
- * Same as getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, errorCode).
+ * 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
* pass the U_SUCCESS() test, or else the function returns
@@ -166,12 +166,12 @@ public:
* and which composes or decomposes text according to the specified mode.
* Returns an unmodifiable singleton instance. Do not delete it.
*
- * Use packageName=NULL for data files that are part of ICU's own data.
+ * Use packageName=nullptr for data files that are part of ICU's own data.
* Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD.
* Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD.
* 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 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 mode normalization mode (compose or decompose etc.)
* @param errorCode Standard ICU error code. Its input value must
@@ -533,7 +533,7 @@ public:
virtual UnicodeString &
normalize(const UnicodeString &src,
UnicodeString &dest,
- UErrorCode &errorCode) const U_OVERRIDE;
+ UErrorCode &errorCode) const override;
/**
* Normalizes a UTF-8 string and optionally records how source substrings
@@ -559,7 +559,7 @@ public:
*/
virtual void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const U_OVERRIDE;
+ Edits *edits, UErrorCode &errorCode) const override;
/**
* Appends the normalized form of the second string to the first string
@@ -578,7 +578,7 @@ public:
virtual UnicodeString &
normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const U_OVERRIDE;
+ UErrorCode &errorCode) const override;
/**
* Appends the second string to the first string
* (merging them at the boundary) and returns the first string.
@@ -596,7 +596,7 @@ public:
virtual UnicodeString &
append(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const U_OVERRIDE;
+ UErrorCode &errorCode) const override;
/**
* Gets the decomposition mapping of c.
@@ -610,7 +610,7 @@ public:
* @stable ICU 4.6
*/
virtual UBool
- getDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE;
+ getDecomposition(UChar32 c, UnicodeString &decomposition) const override;
/**
* Gets the raw decomposition mapping of c.
@@ -624,7 +624,7 @@ public:
* @stable ICU 49
*/
virtual UBool
- getRawDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE;
+ getRawDecomposition(UChar32 c, UnicodeString &decomposition) const override;
/**
* Performs pairwise composition of a & b and returns the composite if there is one.
@@ -637,7 +637,7 @@ public:
* @stable ICU 49
*/
virtual UChar32
- composePair(UChar32 a, UChar32 b) const U_OVERRIDE;
+ composePair(UChar32 a, UChar32 b) const override;
/**
* Gets the combining class of c.
@@ -648,7 +648,7 @@ public:
* @stable ICU 49
*/
virtual uint8_t
- getCombiningClass(UChar32 c) const U_OVERRIDE;
+ getCombiningClass(UChar32 c) const override;
/**
* Tests if the string is normalized.
@@ -662,7 +662,7 @@ public:
* @stable ICU 4.4
*/
virtual UBool
- isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE;
+ isNormalized(const UnicodeString &s, UErrorCode &errorCode) const override;
/**
* Tests if the UTF-8 string is normalized.
* Internally, in cases where the quickCheck() method would return "maybe"
@@ -683,7 +683,7 @@ public:
* @stable ICU 60
*/
virtual UBool
- isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const U_OVERRIDE;
+ isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const override;
/**
* Tests if the string is normalized.
* For details see the Normalizer2 base class documentation.
@@ -696,7 +696,7 @@ public:
* @stable ICU 4.4
*/
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE;
+ quickCheck(const UnicodeString &s, UErrorCode &errorCode) const override;
/**
* Returns the end of the normalized substring of the input string.
* For details see the Normalizer2 base class documentation.
@@ -709,7 +709,7 @@ public:
* @stable ICU 4.4
*/
virtual int32_t
- spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE;
+ spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const override;
/**
* Tests if the character always has a normalization boundary before it,
@@ -719,7 +719,7 @@ public:
* @return true if c has a normalization boundary before it
* @stable ICU 4.4
*/
- virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE;
+ virtual UBool hasBoundaryBefore(UChar32 c) const override;
/**
* Tests if the character always has a normalization boundary after it,
@@ -729,7 +729,7 @@ public:
* @return true if c has a normalization boundary after it
* @stable ICU 4.4
*/
- virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE;
+ virtual UBool hasBoundaryAfter(UChar32 c) const override;
/**
* Tests if the character is normalization-inert.
@@ -738,7 +738,7 @@ public:
* @return true if c is normalization-inert
* @stable ICU 4.4
*/
- virtual UBool isInert(UChar32 c) const U_OVERRIDE;
+ virtual UBool isInert(UChar32 c) const override;
private:
UnicodeString &
normalize(const UnicodeString &src,
diff --git a/contrib/libs/icu/include/unicode/normlzr.h b/contrib/libs/icu/include/unicode/normlzr.h
index 93661990fec..03a7aa080d1 100644
--- a/contrib/libs/icu/include/unicode/normlzr.h
+++ b/contrib/libs/icu/include/unicode/normlzr.h
@@ -740,8 +740,8 @@ private:
// Private functions
//-------------------------------------------------------------------------
- Normalizer(); // default constructor not implemented
- Normalizer &operator=(const Normalizer &that); // assignment operator not implemented
+ Normalizer() = delete; // default constructor not implemented
+ Normalizer &operator=(const Normalizer &that) = delete; // assignment operator not implemented
// Private utility methods for iteration
// For documentation, see the source code
@@ -755,7 +755,7 @@ private:
// Private data
//-------------------------------------------------------------------------
- FilteredNormalizer2*fFilteredNorm2; // owned if not NULL
+ FilteredNormalizer2*fFilteredNorm2; // owned if not nullptr
const Normalizer2 *fNorm2; // not owned; may be equal to fFilteredNorm2
UNormalizationMode fUMode; // deprecated
int32_t fOptions;
diff --git a/contrib/libs/icu/include/unicode/numberformatter.h b/contrib/libs/icu/include/unicode/numberformatter.h
index ece433b55f0..caf98e3dfa6 100644
--- a/contrib/libs/icu/include/unicode/numberformatter.h
+++ b/contrib/libs/icu/include/unicode/numberformatter.h
@@ -14,8 +14,8 @@
#include "unicode/bytestream.h"
#include "unicode/currunit.h"
#include "unicode/dcfmtsym.h"
+#include "unicode/displayoptions.h"
#include "unicode/fieldpos.h"
-#include "unicode/formattedvalue.h"
#include "unicode/fpositer.h"
#include "unicode/measunit.h"
#include "unicode/nounit.h"
@@ -25,6 +25,8 @@
#include "unicode/unum.h"
#include "unicode/unumberformatter.h"
#include "unicode/uobject.h"
+#include "unicode/unumberoptions.h"
+#include "unicode/formattednumber.h"
/**
* \file
@@ -110,6 +112,7 @@ namespace number { // icu::number
// Forward declarations:
class UnlocalizedNumberFormatter;
class LocalizedNumberFormatter;
+class SimpleNumberFormatter;
class FormattedNumber;
class Notation;
class ScientificNotation;
@@ -164,6 +167,8 @@ struct UFormattedNumberImpl;
class MutablePatternModifier;
class ImmutablePatternModifier;
struct DecimalFormatWarehouse;
+struct SimpleMicroProps;
+class AdoptingSignumModifierStore;
/**
* Used for NumberRangeFormatter and implemented in numrange_fluent.cpp.
@@ -641,6 +646,31 @@ class U_I18N_API Precision : public UMemory {
static IncrementPrecision increment(double roundingIncrement);
/**
+ * Version of `Precision::increment()` that takes an integer at a particular power of 10.
+ *
+ * To round to the nearest 0.5 and display 2 fraction digits, with this function, you should write one of the following:
+ *
+ * <pre>
+ * Precision::incrementExact(5, -1).withMinFraction(2)
+ * Precision::incrementExact(50, -2).withMinFraction(2)
+ * Precision::incrementExact(50, -2)
+ * </pre>
+ *
+ * This is analagous to ICU4J `Precision.increment(new BigDecimal("0.50"))`.
+ *
+ * This behavior is modeled after ECMA-402. For more information, see:
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#roundingincrement
+ *
+ * @param mantissa
+ * The increment to which to round numbers.
+ * @param magnitude
+ * The power of 10 of the ones digit of the mantissa.
+ * @return A precision for chaining or passing to the NumberFormatter precision() setter.
+ * @stable ICU 71
+ */
+ static IncrementPrecision incrementExact(uint64_t mantissa, int16_t magnitude);
+
+ /**
* Show numbers rounded and padded according to the rules for the currency unit. The most common
* rounding precision settings for currencies include <code>Precision::fixedFraction(2)</code>,
* <code>Precision::integer()</code>, and <code>Precision::increment(0.05)</code> for cash transactions
@@ -659,16 +689,14 @@ class U_I18N_API Precision : public UMemory {
*/
static CurrencyPrecision currency(UCurrencyUsage currencyUsage);
-#ifndef U_HIDE_DRAFT_API
/**
* Configure how trailing zeros are displayed on numbers. For example, to hide trailing zeros
* when the number is an integer, use UNUM_TRAILING_ZERO_HIDE_IF_WHOLE.
*
* @param trailingZeroDisplay Option to configure the display of trailing zeros.
- * @draft ICU 69
+ * @stable ICU 69
*/
Precision trailingZeroDisplay(UNumberTrailingZeroDisplay trailingZeroDisplay) const;
-#endif // U_HIDE_DRAFT_API
private:
enum PrecisionType {
@@ -707,16 +735,23 @@ class U_I18N_API Precision : public UMemory {
impl::digits_t fMaxSig;
/** @internal (private) */
UNumberRoundingPriority fPriority;
+ /**
+ * Whether to retain trailing zeros based on the looser strategy.
+ * @internal (private)
+ */
+ bool fRetain;
} fracSig;
/** @internal (private) */
struct IncrementSettings {
// For RND_INCREMENT, RND_INCREMENT_ONE, and RND_INCREMENT_FIVE
+ // Note: This is a union, so we shouldn't own memory, since
+ // the default destructor would leak it.
/** @internal (private) */
- double fIncrement;
+ uint64_t fIncrement;
/** @internal (private) */
- impl::digits_t fMinFrac;
+ impl::digits_t fIncrementMagnitude;
/** @internal (private) */
- impl::digits_t fMaxFrac;
+ impl::digits_t fMinFrac;
} increment;
UCurrencyUsage currencyUsage; // For RND_CURRENCY
UErrorCode errorCode; // For RND_ERROR
@@ -759,9 +794,10 @@ class U_I18N_API Precision : public UMemory {
const FractionPrecision &base,
int32_t minSig,
int32_t maxSig,
- UNumberRoundingPriority priority);
+ UNumberRoundingPriority priority,
+ bool retain);
- static IncrementPrecision constructIncrement(double increment, int32_t minFrac);
+ static IncrementPrecision constructIncrement(uint64_t increment, impl::digits_t magnitude);
static CurrencyPrecision constructCurrency(UCurrencyUsage usage);
@@ -801,7 +837,6 @@ class U_I18N_API Precision : public UMemory {
*/
class U_I18N_API FractionPrecision : public Precision {
public:
-#ifndef U_HIDE_DRAFT_API
/**
* Override maximum fraction digits with maximum significant digits depending on the magnitude
* of the number. See UNumberRoundingPriority.
@@ -814,13 +849,12 @@ class U_I18N_API FractionPrecision : public Precision {
* How to disambiguate between fraction digits and significant digits.
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
Precision withSignificantDigits(
int32_t minSignificantDigits,
int32_t maxSignificantDigits,
UNumberRoundingPriority priority) const;
-#endif // U_HIDE_DRAFT_API
/**
* Ensure that no less than this number of significant digits are retained when rounding
@@ -1112,10 +1146,10 @@ class U_I18N_API Scale : public UMemory {
Scale& operator=(const Scale& other);
/** @stable ICU 62 */
- Scale(Scale&& src) U_NOEXCEPT;
+ Scale(Scale&& src) noexcept;
/** @stable ICU 62 */
- Scale& operator=(Scale&& src) U_NOEXCEPT;
+ Scale& operator=(Scale&& src) noexcept;
/** @stable ICU 62 */
~Scale();
@@ -1170,30 +1204,31 @@ class U_I18N_API Scale : public UMemory {
namespace impl {
-// Do not enclose entire StringProp with #ifndef U_HIDE_INTERNAL_API, needed for a protected field
+// Do not enclose entire StringProp with #ifndef U_HIDE_INTERNAL_API, needed for a protected field.
+// And do not enclose its class boilerplate within #ifndef U_HIDE_INTERNAL_API.
/**
* Manages NumberFormatterSettings::usage()'s char* instance on the heap.
* @internal
*/
class U_I18N_API StringProp : public UMemory {
-#ifndef U_HIDE_INTERNAL_API
-
public:
/** @internal */
+ ~StringProp();
+
+ /** @internal */
StringProp(const StringProp &other);
/** @internal */
StringProp &operator=(const StringProp &other);
- /** @internal */
- StringProp(StringProp &&src) U_NOEXCEPT;
+#ifndef U_HIDE_INTERNAL_API
/** @internal */
- StringProp &operator=(StringProp &&src) U_NOEXCEPT;
+ StringProp(StringProp &&src) noexcept;
/** @internal */
- ~StringProp();
+ StringProp &operator=(StringProp &&src) noexcept;
/** @internal */
int16_t length() const {
@@ -1254,10 +1289,10 @@ class U_I18N_API SymbolsWrapper : public UMemory {
SymbolsWrapper &operator=(const SymbolsWrapper &other);
/** @internal */
- SymbolsWrapper(SymbolsWrapper&& src) U_NOEXCEPT;
+ SymbolsWrapper(SymbolsWrapper&& src) noexcept;
/** @internal */
- SymbolsWrapper &operator=(SymbolsWrapper&& src) U_NOEXCEPT;
+ SymbolsWrapper &operator=(SymbolsWrapper&& src) noexcept;
/** @internal */
~SymbolsWrapper();
@@ -1402,9 +1437,11 @@ class U_I18N_API Grouper : public UMemory {
// To allow MacroProps/MicroProps to initialize empty instances:
friend struct MacroProps;
friend struct MicroProps;
+ friend struct SimpleMicroProps;
// To allow NumberFormatterImpl to access isBogus() and perform other operations:
friend class NumberFormatterImpl;
+ friend class ::icu::number::SimpleNumberFormatter;
// To allow NumberParserImpl to perform setLocaleData():
friend class ::icu::numparse::impl::NumberParserImpl;
@@ -2221,23 +2258,50 @@ 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
+ */
+ Derived displayOptions(const DisplayOptions &displayOptions) const &;
+
+ /**
+ * Overload of displayOptions() for use on an rvalue reference.
+ *
+ * @param displayOptions
+ * @return The fluent chain.
+ * @draft ICU 72
+ */
+ Derived displayOptions(const DisplayOptions &displayOptions) &&;
+#endif // U_HIDE_DRAFT_API
+
#ifndef U_HIDE_INTERNAL_API
/**
+ * NOTE: Use `displayOptions` instead. This method was part of
+ * an internal technology preview in ICU 69, but will be removed
+ * in ICU 73, in favor of `displayOptions`
+ *
* Specifies the desired case for a unit formatter's output (e.g.
* accusative, dative, genitive).
*
- * @internal ICU 69 technology preview
+ * @internal
*/
Derived unitDisplayCase(StringPiece unitDisplayCase) const &;
/**
+ * NOTE: Use `displayOptions` instead. This method was part of
+ * an internal technology preview in ICU 69, but will be removed
+ * in ICU 73, in favor of `displayOptions`
+ *
* Overload of unitDisplayCase() for use on an rvalue reference.
*
- * @internal ICU 69 technology preview
+ * @internal
*/
Derived unitDisplayCase(StringPiece unitDisplayCase) &&;
#endif // U_HIDE_INTERNAL_API
-#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_INTERNAL_API
@@ -2352,6 +2416,13 @@ class U_I18N_API NumberFormatterSettings {
friend class impl::NumberRangeFormatterImpl;
};
+// Explicit instantiations in source/i18n/number_fluent.cpp.
+// (MSVC treats imports/exports of explicit instantiations differently.)
+#ifndef _MSC_VER
+extern template class NumberFormatterSettings<UnlocalizedNumberFormatter>;
+extern template class NumberFormatterSettings<LocalizedNumberFormatter>;
+#endif
+
/**
* A NumberFormatter that does not yet have a locale. In order to format numbers, a locale must be specified.
*
@@ -2404,7 +2475,7 @@ class U_I18N_API UnlocalizedNumberFormatter
* The source UnlocalizedNumberFormatter will be left in a valid but undefined state.
* @stable ICU 62
*/
- UnlocalizedNumberFormatter(UnlocalizedNumberFormatter&& src) U_NOEXCEPT;
+ UnlocalizedNumberFormatter(UnlocalizedNumberFormatter&& src) noexcept;
/**
* Copy assignment operator.
@@ -2417,13 +2488,13 @@ class U_I18N_API UnlocalizedNumberFormatter
* The source UnlocalizedNumberFormatter will be left in a valid but undefined state.
* @stable ICU 62
*/
- UnlocalizedNumberFormatter& operator=(UnlocalizedNumberFormatter&& src) U_NOEXCEPT;
+ UnlocalizedNumberFormatter& operator=(UnlocalizedNumberFormatter&& src) noexcept;
private:
explicit UnlocalizedNumberFormatter(const NumberFormatterSettings<UnlocalizedNumberFormatter>& other);
explicit UnlocalizedNumberFormatter(
- NumberFormatterSettings<UnlocalizedNumberFormatter>&& src) U_NOEXCEPT;
+ NumberFormatterSettings<UnlocalizedNumberFormatter>&& src) noexcept;
// To give the fluent setters access to this class's constructor:
friend class NumberFormatterSettings<UnlocalizedNumberFormatter>;
@@ -2550,7 +2621,7 @@ class U_I18N_API LocalizedNumberFormatter
* The source LocalizedNumberFormatter will be left in a valid but undefined state.
* @stable ICU 62
*/
- LocalizedNumberFormatter(LocalizedNumberFormatter&& src) U_NOEXCEPT;
+ LocalizedNumberFormatter(LocalizedNumberFormatter&& src) noexcept;
/**
* Copy assignment operator.
@@ -2563,7 +2634,7 @@ class U_I18N_API LocalizedNumberFormatter
* The source LocalizedNumberFormatter will be left in a valid but undefined state.
* @stable ICU 62
*/
- LocalizedNumberFormatter& operator=(LocalizedNumberFormatter&& src) U_NOEXCEPT;
+ LocalizedNumberFormatter& operator=(LocalizedNumberFormatter&& src) noexcept;
#ifndef U_HIDE_INTERNAL_API
@@ -2601,7 +2672,7 @@ class U_I18N_API LocalizedNumberFormatter
explicit LocalizedNumberFormatter(const NumberFormatterSettings<LocalizedNumberFormatter>& other);
- explicit LocalizedNumberFormatter(NumberFormatterSettings<LocalizedNumberFormatter>&& src) U_NOEXCEPT;
+ explicit LocalizedNumberFormatter(NumberFormatterSettings<LocalizedNumberFormatter>&& src) noexcept;
LocalizedNumberFormatter(const impl::MacroProps &macros, const Locale &locale);
@@ -2632,167 +2703,6 @@ class U_I18N_API LocalizedNumberFormatter
#endif
/**
- * The result of a number formatting operation. This class allows the result to be exported in several data types,
- * including a UnicodeString and a FieldPositionIterator.
- *
- * Instances of this class are immutable and thread-safe.
- *
- * @stable ICU 60
- */
-class U_I18N_API FormattedNumber : public UMemory, public FormattedValue {
- public:
-
- /**
- * Default constructor; makes an empty FormattedNumber.
- * @stable ICU 64
- */
- FormattedNumber()
- : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
-
- /**
- * Move constructor: Leaves the source FormattedNumber in an undefined state.
- * @stable ICU 62
- */
- FormattedNumber(FormattedNumber&& src) U_NOEXCEPT;
-
- /**
- * Destruct an instance of FormattedNumber.
- * @stable ICU 60
- */
- virtual ~FormattedNumber() U_OVERRIDE;
-
- /** Copying not supported; use move constructor instead. */
- FormattedNumber(const FormattedNumber&) = delete;
-
- /** Copying not supported; use move assignment instead. */
- FormattedNumber& operator=(const FormattedNumber&) = delete;
-
- /**
- * Move assignment: Leaves the source FormattedNumber in an undefined state.
- * @stable ICU 62
- */
- FormattedNumber& operator=(FormattedNumber&& src) U_NOEXCEPT;
-
- // Copybrief: this method is older than the parent method
- /**
- * @copybrief FormattedValue::toString()
- *
- * For more information, see FormattedValue::toString()
- *
- * @stable ICU 62
- */
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
-
- // Copydoc: this method is new in ICU 64
- /** @copydoc FormattedValue::toTempString() */
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
-
- // Copybrief: this method is older than the parent method
- /**
- * @copybrief FormattedValue::appendTo()
- *
- * For more information, see FormattedValue::appendTo()
- *
- * @stable ICU 62
- */
- Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
-
- // Copydoc: this method is new in ICU 64
- /** @copydoc FormattedValue::nextPosition() */
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
-
- /**
- * Export the formatted number as a "numeric string" conforming to the
- * syntax defined in the Decimal Arithmetic Specification, available at
- * http://speleotrove.com/decimal
- *
- * This endpoint is useful for obtaining the exact number being printed
- * after scaling and rounding have been applied by the number formatter.
- *
- * Example call site:
- *
- * auto decimalNumber = fn.toDecimalNumber<std::string>(status);
- *
- * @tparam StringClass A string class compatible with StringByteSink;
- * for example, std::string.
- * @param status Set if an error occurs.
- * @return A StringClass containing the numeric string.
- * @stable ICU 65
- */
- template<typename StringClass>
- inline StringClass toDecimalNumber(UErrorCode& status) const;
-
- /**
- * Gets the resolved output unit.
- *
- * The output unit is dependent upon the localized preferences for the usage
- * specified via NumberFormatterSettings::usage(), and may be a unit with
- * UMEASURE_UNIT_MIXED unit complexity (MeasureUnit::getComplexity()), such
- * as "foot-and-inch" or "hour-and-minute-and-second".
- *
- * @return `MeasureUnit`.
- * @stable ICU 68
- */
- MeasureUnit getOutputUnit(UErrorCode& status) const;
-
-#ifndef U_HIDE_INTERNAL_API
- /**
- * Gets the gender of the formatted output. Returns "" when the gender is
- * unknown, or for ungendered languages.
- *
- * @internal ICU 69 technology preview.
- */
- const char *getGender(UErrorCode& status) const;
-
- /**
- * Gets the raw DecimalQuantity for plural rule selection.
- * @internal
- */
- void getDecimalQuantity(impl::DecimalQuantity& output, UErrorCode& status) const;
-
- /**
- * Populates the mutable builder type FieldPositionIteratorHandler.
- * @internal
- */
- void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih, UErrorCode& status) const;
-
-#endif /* U_HIDE_INTERNAL_API */
-
- private:
- // Can't use LocalPointer because UFormattedNumberData is forward-declared
- const impl::UFormattedNumberData *fData;
-
- // Error code for the terminal methods
- UErrorCode fErrorCode;
-
- /**
- * Internal constructor from data type. Adopts the data pointer.
- * @internal (private)
- */
- explicit FormattedNumber(impl::UFormattedNumberData *results)
- : fData(results), fErrorCode(U_ZERO_ERROR) {}
-
- explicit FormattedNumber(UErrorCode errorCode)
- : fData(nullptr), fErrorCode(errorCode) {}
-
- void toDecimalNumber(ByteSink& sink, UErrorCode& status) const;
-
- // To give LocalizedNumberFormatter format methods access to this class's constructor:
- friend class LocalizedNumberFormatter;
-
- // To give C API access to internals
- friend struct impl::UFormattedNumberImpl;
-};
-
-template<typename StringClass>
-StringClass FormattedNumber::toDecimalNumber(UErrorCode& status) const {
- StringClass result;
- StringByteSink<StringClass> sink(&result);
- toDecimalNumber(sink, status);
- return result;
-}
-
-/**
* See the main description in numberformatter.h for documentation and examples.
*
* @stable ICU 60
diff --git a/contrib/libs/icu/include/unicode/numberrangeformatter.h b/contrib/libs/icu/include/unicode/numberrangeformatter.h
index 363f7d48cfe..8ca20f31d71 100644
--- a/contrib/libs/icu/include/unicode/numberrangeformatter.h
+++ b/contrib/libs/icu/include/unicode/numberrangeformatter.h
@@ -381,6 +381,13 @@ class U_I18N_API NumberRangeFormatterSettings {
friend class UnlocalizedNumberRangeFormatter;
};
+// Explicit instantiations in source/i18n/numrange_fluent.cpp.
+// (MSVC treats imports/exports of explicit instantiations differently.)
+#ifndef _MSC_VER
+extern template class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>;
+extern template class NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>;
+#endif
+
/**
* A NumberRangeFormatter that does not yet have a locale. In order to format, a locale must be specified.
*
@@ -433,7 +440,7 @@ class U_I18N_API UnlocalizedNumberRangeFormatter
* The source UnlocalizedNumberRangeFormatter will be left in a valid but undefined state.
* @stable ICU 63
*/
- UnlocalizedNumberRangeFormatter(UnlocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
+ UnlocalizedNumberRangeFormatter(UnlocalizedNumberRangeFormatter&& src) noexcept;
/**
* Copy assignment operator.
@@ -446,14 +453,14 @@ class U_I18N_API UnlocalizedNumberRangeFormatter
* The source UnlocalizedNumberRangeFormatter will be left in a valid but undefined state.
* @stable ICU 63
*/
- UnlocalizedNumberRangeFormatter& operator=(UnlocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
+ UnlocalizedNumberRangeFormatter& operator=(UnlocalizedNumberRangeFormatter&& src) noexcept;
private:
explicit UnlocalizedNumberRangeFormatter(
const NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>& other);
explicit UnlocalizedNumberRangeFormatter(
- NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>&& src) U_NOEXCEPT;
+ NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>&& src) noexcept;
// To give the fluent setters access to this class's constructor:
friend class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>;
@@ -507,7 +514,7 @@ class U_I18N_API LocalizedNumberRangeFormatter
* The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
* @stable ICU 63
*/
- LocalizedNumberRangeFormatter(LocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
+ LocalizedNumberRangeFormatter(LocalizedNumberRangeFormatter&& src) noexcept;
/**
* Copy assignment operator.
@@ -520,7 +527,7 @@ class U_I18N_API LocalizedNumberRangeFormatter
* The source LocalizedNumberRangeFormatter will be left in a valid but undefined state.
* @stable ICU 63
*/
- LocalizedNumberRangeFormatter& operator=(LocalizedNumberRangeFormatter&& src) U_NOEXCEPT;
+ LocalizedNumberRangeFormatter& operator=(LocalizedNumberRangeFormatter&& src) noexcept;
#ifndef U_HIDE_INTERNAL_API
@@ -554,14 +561,12 @@ class U_I18N_API LocalizedNumberRangeFormatter
const NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>& other);
explicit LocalizedNumberRangeFormatter(
- NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>&& src) U_NOEXCEPT;
+ NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>&& src) noexcept;
LocalizedNumberRangeFormatter(const impl::RangeMacroProps &macros, const Locale &locale);
LocalizedNumberRangeFormatter(impl::RangeMacroProps &&macros, const Locale &locale);
- void clear();
-
// To give the fluent setters access to this class's constructor:
friend class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>;
friend class NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>;
@@ -588,11 +593,11 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
*
* @stable ICU 63
*/
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toString(UErrorCode& status) const override;
// Copydoc: this method is new in ICU 64
/** @copydoc FormattedValue::toTempString() */
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toTempString(UErrorCode& status) const override;
// Copybrief: this method is older than the parent method
/**
@@ -602,11 +607,11 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
*
* @stable ICU 63
*/
- Appendable &appendTo(Appendable &appendable, UErrorCode& status) const U_OVERRIDE;
+ Appendable &appendTo(Appendable &appendable, UErrorCode& status) const override;
// Copydoc: this method is new in ICU 64
/** @copydoc FormattedValue::nextPosition() */
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
/**
* Extracts the formatted range as a pair of decimal numbers. This endpoint
@@ -641,14 +646,12 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
*/
UNumberRangeIdentityResult getIdentityResult(UErrorCode& status) const;
-#ifndef U_HIDE_DRAFT_API
/**
* Default constructor; makes an empty FormattedNumberRange.
- * @draft ICU 70
+ * @stable ICU 70
*/
FormattedNumberRange()
: fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
-#endif /* U_HIDE_DRAFT_API */
/**
* Copying not supported; use move constructor instead.
@@ -665,14 +668,14 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
* Leaves the source FormattedNumberRange in an undefined state.
* @stable ICU 63
*/
- FormattedNumberRange(FormattedNumberRange&& src) U_NOEXCEPT;
+ FormattedNumberRange(FormattedNumberRange&& src) noexcept;
/**
* Move assignment:
* Leaves the source FormattedNumberRange in an undefined state.
* @stable ICU 63
*/
- FormattedNumberRange& operator=(FormattedNumberRange&& src) U_NOEXCEPT;
+ FormattedNumberRange& operator=(FormattedNumberRange&& src) noexcept;
/**
* Destruct an instance of FormattedNumberRange, cleaning up any memory it might own.
@@ -696,8 +699,6 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue {
explicit FormattedNumberRange(UErrorCode errorCode)
: fData(nullptr), fErrorCode(errorCode) {}
- void getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih, UErrorCode& status) const;
-
void getDecimalNumbers(ByteSink& sink1, ByteSink& sink2, UErrorCode& status) const;
const impl::UFormattedNumberRangeData* getData(UErrorCode& status) const;
diff --git a/contrib/libs/icu/include/unicode/numfmt.h b/contrib/libs/icu/include/unicode/numfmt.h
index 135fe5b6609..e1aa3092761 100644
--- a/contrib/libs/icu/include/unicode/numfmt.h
+++ b/contrib/libs/icu/include/unicode/numfmt.h
@@ -141,7 +141,7 @@ class StringEnumeration;
* format or parsing, or want to give your users more control, you can
* try dynamic_casting the \c NumberFormat you get from the factory methods to a
* \c DecimalFormat. This will work for the vast majority of
- * countries; just remember to test for NULL in case you
+ * countries; just remember to test for nullptr in case you
* encounter an unusual one.
* <P>
* You can also use forms of the parse and format methods with
@@ -198,7 +198,24 @@ public:
* Return U_FORMAT_INEXACT_ERROR if number does not format exactly.
* @stable ICU 4.8
*/
- kRoundUnnecessary
+ kRoundUnnecessary,
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Rounds ties toward the odd number.
+ * @draft ICU 73
+ */
+ kRoundHalfOdd,
+ /**
+ * Rounds ties toward +∞.
+ * @draft ICU 73
+ */
+ kRoundHalfCeiling,
+ /**
+ * Rounds ties toward -∞.
+ * @draft ICU 73
+ */
+ kRoundHalfFloor,
+#endif /* U_HIDE_DRAFT_API */
};
/**
@@ -310,7 +327,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call. Can be
- * NULL.
+ * nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -343,7 +360,7 @@ public:
* last character successfully parsed. If the
* source is not parsed successfully, this param
* will remain unchanged.
- * @return A newly created Formattable* object, or NULL
+ * @return A newly created Formattable* object, or nullptr
* on failure. The caller owns this and should
* delete it when done.
* @stable ICU 2.0
@@ -433,7 +450,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -485,7 +502,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -538,7 +555,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -559,7 +576,7 @@ public:
* Result is appended to existing contents.
* @param posIter On return, can be used to iterate over positions
* of fields generated by this format call.
- * Can be NULL.
+ * Can be nullptr.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
* @stable ICU 4.4
@@ -621,7 +638,7 @@ public:
* IntegerOnly is set, will stop at a decimal point (or equivalent;
* e.g. for rational numbers "1 2/3", will stop after the 1).
* <P>
- * If no object can be parsed, index is unchanged, and NULL is
+ * If no object can be parsed, index is unchanged, and nullptr is
* returned.
* <P>
* This is a pure virtual which concrete subclasses must implement.
@@ -673,7 +690,7 @@ public:
* If the parse fails, the position in unchanged upon output.
* @return if parse succeeds, a pointer to a newly-created CurrencyAmount
* object (owned by the caller) containing information about
- * the parsed currency; if parse fails, this is NULL.
+ * the parsed currency; if parse fails, this is nullptr.
* @stable ICU 49
*/
virtual CurrencyAmount* parseCurrency(const UnicodeString& text,
@@ -1001,7 +1018,7 @@ public:
* currency format.
* @param theCurrency a 3-letter ISO code indicating new currency
* to use. It need not be null-terminated. May be the empty
- * string or NULL to indicate no currency.
+ * string or nullptr to indicate no currency.
* @param ec input-output error code
* @stable ICU 3.0
*/
@@ -1113,7 +1130,7 @@ protected:
/**
* Creates the specified number format style of the desired locale.
* If mustBeDecimalFormat is true, then the returned pointer is
- * either a DecimalFormat or it is NULL.
+ * either a DecimalFormat or it is nullptr.
* @internal
*/
static NumberFormat* makeInstance(const Locale& desiredLocale,
diff --git a/contrib/libs/icu/include/unicode/numsys.h b/contrib/libs/icu/include/unicode/numsys.h
index 4f839d0f354..51a6e147b10 100644
--- a/contrib/libs/icu/include/unicode/numsys.h
+++ b/contrib/libs/icu/include/unicode/numsys.h
@@ -148,7 +148,7 @@ public:
/**
* Returns the name of this numbering system if it was created using one of the predefined names
- * known to ICU. Otherwise, returns NULL.
+ * known to ICU. Otherwise, returns nullptr.
* The predefined names are identical to the numbering system names as defined by
* the BCP47 definition in Unicode CLDR.
* See also, http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/number.xml
@@ -208,10 +208,6 @@ private:
void setDesc(const UnicodeString &desc);
void setName(const char* name);
-
- static UBool isValidDigitString(const UnicodeString &str);
-
- UBool hasContiguousDecimalDigits() const;
};
U_NAMESPACE_END
diff --git a/contrib/libs/icu/include/unicode/parsepos.h b/contrib/libs/icu/include/unicode/parsepos.h
index 73945f5f97b..d33a812ad0b 100644
--- a/contrib/libs/icu/include/unicode/parsepos.h
+++ b/contrib/libs/icu/include/unicode/parsepos.h
@@ -112,7 +112,7 @@ public:
/**
* Clone this object.
* Clones can be used concurrently in multiple threads.
- * If an error occurs, then NULL is returned.
+ * If an error occurs, then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
diff --git a/contrib/libs/icu/include/unicode/platform.h b/contrib/libs/icu/include/unicode/platform.h
index b7e514442ce..a997843660c 100644
--- a/contrib/libs/icu/include/unicode/platform.h
+++ b/contrib/libs/icu/include/unicode/platform.h
@@ -168,7 +168,7 @@
# define U_PLATFORM U_PF_LINUX
#elif defined(__APPLE__) && defined(__MACH__)
# include <TargetConditionals.h>
-# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */
+# if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) && (defined(TARGET_OS_MACCATALYST) && !TARGET_OS_MACCATALYST) /* variant of TARGET_OS_MAC */
# define U_PLATFORM U_PF_IPHONE
# else
# define U_PLATFORM U_PF_DARWIN
@@ -460,6 +460,13 @@
# define UPRV_HAS_WARNING(x) 0
#endif
+
+#if defined(__clang__)
+#define UPRV_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
+#else
+#define UPRV_NO_SANITIZE_UNDEFINED
+#endif
+
/**
* \def U_MALLOC_ATTR
* Attribute to mark functions as malloc-like
@@ -509,26 +516,6 @@
# define U_CPLUSPLUS_VERSION 1
#endif
-#if (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11)
-// add in std::nullptr_t
-namespace std {
- typedef decltype(nullptr) nullptr_t;
-};
-#endif
-
-/**
- * \def U_NOEXCEPT
- * "noexcept" if supported, otherwise empty.
- * Some code, especially STL containers, uses move semantics of objects only
- * if the move constructor and the move operator are declared as not throwing exceptions.
- * @internal
- */
-#ifdef U_NOEXCEPT
- /* Use the predefined value. */
-#else
-# define U_NOEXCEPT noexcept
-#endif
-
/**
* \def U_FALLTHROUGH
* Annotate intentional fall-through between switch labels.
@@ -757,7 +744,7 @@ namespace std {
* \def U_HAVE_CHAR16_T
* Defines whether the char16_t type is available for UTF-16
* and u"abc" UTF-16 string literals are supported.
- * This is a new standard type and standard string literal syntax in C++0x
+ * This is a new standard type and standard string literal syntax in C++11
* but has been available in some compilers before.
* @internal
*/
@@ -766,12 +753,6 @@ namespace std {
#else
/*
* Notes:
- * Visual Studio 2010 (_MSC_VER==1600) defines char16_t as a typedef
- * and does not support u"abc" string literals.
- * Visual Studio 2015 (_MSC_VER>=1900) and above adds support for
- * both char16_t and u"abc" string literals.
- * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but
- * does not support u"abc" string literals.
* C++11 and C11 require support for UTF-16 literals
* TODO: Fix for plain C. Doesn't work on Mac.
*/
@@ -848,6 +829,21 @@ namespace std {
#endif
/**
+ * \def U_HIDDEN
+ * This is used to mark internal structs declared within external classes,
+ * to prevent the internal structs from having the same visibility as the
+ * class within which they are declared.
+ * @internal
+ */
+#ifdef U_HIDDEN
+ /* Use the predefined value. */
+#elif defined(__GNUC__)
+# define U_HIDDEN __attribute__((visibility("hidden")))
+#else
+# define U_HIDDEN
+#endif
+
+/**
* \def U_CALLCONV
* Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary
* in callback function typedefs to make sure that the calling convention
diff --git a/contrib/libs/icu/include/unicode/plurfmt.h b/contrib/libs/icu/include/unicode/plurfmt.h
index db160546057..8e6cbb44540 100644
--- a/contrib/libs/icu/include/unicode/plurfmt.h
+++ b/contrib/libs/icu/include/unicode/plurfmt.h
@@ -543,7 +543,7 @@ private:
class U_I18N_API PluralSelectorAdapter : public PluralSelector {
public:
- PluralSelectorAdapter() : pluralRules(NULL) {
+ PluralSelectorAdapter() : pluralRules(nullptr) {
}
virtual ~PluralSelectorAdapter();
@@ -561,7 +561,7 @@ private:
double offset;
PluralSelectorAdapter pluralRulesWrapper;
- PluralFormat(); // default constructor not implemented
+ PluralFormat() = delete; // default constructor not implemented
void init(const PluralRules* rules, UPluralType type, UErrorCode& status);
/**
* Copies dynamically allocated values (pointer fields).
diff --git a/contrib/libs/icu/include/unicode/plurrule.h b/contrib/libs/icu/include/unicode/plurrule.h
index e90cd66a7f7..b7d95175f55 100644
--- a/contrib/libs/icu/include/unicode/plurrule.h
+++ b/contrib/libs/icu/include/unicode/plurrule.h
@@ -59,9 +59,15 @@ class FormattedNumber;
class FormattedNumberRange;
namespace impl {
class UFormattedNumberRangeData;
+class DecimalQuantity;
+class DecNum;
}
}
+#ifndef U_HIDE_INTERNAL_API
+using icu::number::impl::DecimalQuantity;
+#endif /* U_HIDE_INTERNAL_API */
+
/**
* Defines rules for mapping non-negative numeric values onto a small set of
* keywords. Rules are constructed from a text description, consisting
@@ -241,12 +247,12 @@ public:
/**
* Creates a PluralRules from a description if it is parsable, otherwise
- * returns NULL.
+ * returns nullptr.
*
* @param description rule description
* @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function call.
- * @return new PluralRules pointer. NULL if there is an error.
+ * @return new PluralRules pointer. nullptr if there is an error.
* @stable ICU 4.0
*/
static PluralRules* U_EXPORT2 createRules(const UnicodeString& description,
@@ -257,7 +263,7 @@ public:
*
* @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function call.
- * @return new PluralRules pointer. NULL if there is an error.
+ * @return new PluralRules pointer. nullptr if there is an error.
* @stable ICU 4.0
*/
static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
@@ -307,14 +313,6 @@ public:
static StringEnumeration* U_EXPORT2 getAvailableLocales(UErrorCode &status);
/**
- * Returns whether or not there are overrides.
- * @param locale the locale to check.
- * @return
- * @internal
- */
- static UBool hasOverride(const Locale &locale);
-
- /**
* For ICU use only.
* creates a SharedPluralRules object
* @internal
@@ -439,7 +437,7 @@ public:
*
* @param keyword The keyword.
* @param dest Array into which to put the returned values. May
- * be NULL if destCapacity is 0.
+ * be nullptr if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code. Deprecated function, always sets U_UNSUPPORTED_ERROR.
* @return The count of values available, or -1. This count
@@ -460,7 +458,7 @@ public:
*
* @param keyword The keyword.
* @param dest Array into which to put the returned values. May
- * be NULL if destCapacity is 0.
+ * be nullptr if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code.
* @return The count of values written.
@@ -476,7 +474,7 @@ public:
#ifndef U_HIDE_INTERNAL_API
/**
- * Internal-only function that returns FixedDecimals instead of doubles.
+ * Internal-only function that returns DecimalQuantitys instead of doubles.
*
* Returns sample values for which select() would return the keyword. If
* the keyword is unknown, returns no values, but this is not an error.
@@ -485,7 +483,7 @@ public:
*
* @param keyword The keyword.
* @param dest Array into which to put the returned values. May
- * be NULL if destCapacity is 0.
+ * be nullptr if destCapacity is 0.
* @param destCapacity The capacity of the array, must be at least 0.
* @param status The error code.
* @return The count of values written.
@@ -496,7 +494,7 @@ public:
* @internal
*/
int32_t getSamples(const UnicodeString &keyword,
- FixedDecimal *dest, int32_t destCapacity,
+ DecimalQuantity *dest, int32_t destCapacity,
UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
@@ -569,9 +567,7 @@ private:
RuleChain *mRules;
StandardPluralRanges *mStandardPluralRanges;
- PluralRules(); // default constructor not implemented
- void parseDescription(const UnicodeString& ruleData, UErrorCode &status);
- int32_t getNumberValue(const UnicodeString& token) const;
+ PluralRules() = delete; // default constructor not implemented
UnicodeString getRuleFromResource(const Locale& locale, UPluralType type, UErrorCode& status);
RuleChain *rulesForKeyword(const UnicodeString &keyword) const;
PluralRules *clone(UErrorCode& status) const;
diff --git a/contrib/libs/icu/include/unicode/rbbi.h b/contrib/libs/icu/include/unicode/rbbi.h
index 0ce93819f54..418b52e41f4 100644
--- a/contrib/libs/icu/include/unicode/rbbi.h
+++ b/contrib/libs/icu/include/unicode/rbbi.h
@@ -54,14 +54,14 @@ class UStack;
*
* <p>This class is not intended to be subclassed.</p>
*/
-class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
+class U_COMMON_API RuleBasedBreakIterator /*final*/ : public BreakIterator {
private:
/**
* The UText through which this BreakIterator accesses the text
* @internal (private)
*/
- UText fText;
+ UText fText = UTEXT_INITIALIZER;
#ifndef U_HIDE_INTERNAL_API
public:
@@ -71,32 +71,38 @@ public:
* Not for general use; Public only for testing purposes.
* @internal
*/
- RBBIDataWrapper *fData;
+ RBBIDataWrapper *fData = nullptr;
+
private:
+ /**
+ * The saved error code associated with this break iterator.
+ * This is the value to be returned by copyErrorTo().
+ */
+ UErrorCode fErrorCode = U_ZERO_ERROR;
/**
* The current position of the iterator. Pinned, 0 < fPosition <= text.length.
* Never has the value UBRK_DONE (-1).
*/
- int32_t fPosition;
+ int32_t fPosition = 0;
/**
* TODO:
*/
- int32_t fRuleStatusIndex;
+ int32_t fRuleStatusIndex = 0;
/**
* Cache of previously determined boundary positions.
*/
class BreakCache;
- BreakCache *fBreakCache;
+ BreakCache *fBreakCache = nullptr;
/**
* Cache of boundary positions within a region of text that has been
* sub-divided by dictionary based breaking.
*/
class DictionaryCache;
- DictionaryCache *fDictionaryCache;
+ DictionaryCache *fDictionaryCache = nullptr;
/**
*
@@ -105,7 +111,7 @@ private:
* handle a given character.
* @internal (private)
*/
- UStack *fLanguageBreakEngines;
+ UStack *fLanguageBreakEngines = nullptr;
/**
*
@@ -114,38 +120,43 @@ private:
* LanguageBreakEngine.
* @internal (private)
*/
- UnhandledEngine *fUnhandledBreakEngine;
+ UnhandledEngine *fUnhandledBreakEngine = nullptr;
/**
* Counter for the number of characters encountered with the "dictionary"
* flag set.
* @internal (private)
*/
- uint32_t fDictionaryCharCount;
+ uint32_t fDictionaryCharCount = 0;
/**
* A character iterator that refers to the same text as the UText, above.
* Only included for compatibility with old API, which was based on CharacterIterators.
* Value may be adopted from outside, or one of fSCharIter or fDCharIter, below.
*/
- CharacterIterator *fCharIter;
+ CharacterIterator *fCharIter = &fSCharIter;
/**
* When the input text is provided by a UnicodeString, this will point to
* a characterIterator that wraps that data. Needed only for the
* implementation of getText(), a backwards compatibility issue.
*/
- StringCharacterIterator fSCharIter;
+ UCharCharacterIterator fSCharIter {u"", 0};
/**
* True when iteration has run off the end, and iterator functions should return UBRK_DONE.
*/
- UBool fDone;
+ bool fDone = false;
/**
* Array of look-ahead tentative results.
*/
- int32_t *fLookAheadMatches;
+ int32_t *fLookAheadMatches = nullptr;
+
+ /**
+ * A flag to indicate if phrase based breaking is enabled.
+ */
+ UBool fIsPhraseBreaking = false;
//=======================================================================
// constructors
@@ -163,15 +174,39 @@ private:
*/
RuleBasedBreakIterator(RBBIDataHeader* data, UErrorCode &status);
+ /**
+ * This constructor uses the udata interface to create a BreakIterator
+ * whose internal tables live in a memory-mapped file. "image" is an
+ * ICU UDataMemory handle for the pre-compiled break iterator tables.
+ * @param image handle to the memory image for the break iterator data.
+ * Ownership of the UDataMemory handle passes to the Break Iterator,
+ * which will be responsible for closing it when it is no longer needed.
+ * @param status Information on any errors encountered.
+ * @param isPhraseBreaking true if phrase based breaking is required, otherwise false.
+ * @see udata_open
+ * @see #getBinaryRules
+ * @internal (private)
+ */
+ RuleBasedBreakIterator(UDataMemory* image, UBool isPhraseBreaking, UErrorCode &status);
+
/** @internal */
friend class RBBIRuleBuilder;
/** @internal */
friend class BreakIterator;
+ /**
+ * Default constructor with an error code parameter.
+ * Aside from error handling, otherwise identical to the default constructor.
+ * Internally, handles common initialization for other constructors.
+ * @internal (private)
+ */
+ RuleBasedBreakIterator(UErrorCode *status);
+
public:
/** Default constructor. Creates an empty shell of an iterator, with no
- * rules or text to iterate over. Object can subsequently be assigned to.
+ * rules or text to iterate over. Object can subsequently be assigned to,
+ * but is otherwise unusable.
* @stable ICU 2.2
*/
RuleBasedBreakIterator();
@@ -269,7 +304,9 @@ public:
* @return true if both BreakIterators are not same.
* @stable ICU 2.0
*/
- inline bool operator!=(const BreakIterator& that) const;
+ inline bool operator!=(const BreakIterator& that) const {
+ return !operator==(that);
+ }
/**
* Returns a newly-constructed RuleBasedBreakIterator with the same
@@ -315,8 +352,7 @@ public:
* </p>
* <p>
* When the break iterator is operating on text supplied via a UText,
- * this function will fail. Lacking any way to signal failures, it
- * returns an CharacterIterator containing no text.
+ * this function will fail, returning a CharacterIterator containing no text.
* The function getUText() provides similar functionality,
* is reliable, and is more efficient.
* </p>
@@ -336,7 +372,7 @@ public:
* access the text without impacting any break iterator operations,
* but the underlying text itself must not be altered.
*
- * @param fillIn A UText to be filled in. If NULL, a new UText will be
+ * @param fillIn A UText to be filled in. If nullptr, a new UText will be
* allocated to hold the result.
* @param status receives any error codes.
* @return The current UText for this break iterator. If an input
@@ -556,7 +592,7 @@ public:
* tricky. Use clone() instead.
*
* @param stackBuffer The pointer to the memory into which the cloned object
- * should be placed. If NULL, allocate heap memory
+ * should be placed. If nullptr, allocate heap memory
* for the cloned object.
* @param BufferSize The size of the buffer. If zero, return the required
* buffer size, but do not clone the object. If the
@@ -629,19 +665,6 @@ private:
// implementation
//=======================================================================
/**
- * Dumps caches and performs other actions associated with a complete change
- * in text or iteration position.
- * @internal (private)
- */
- void reset(void);
-
- /**
- * Common initialization function, used by constructors and bufferClone.
- * @internal (private)
- */
- void init(UErrorCode &status);
-
- /**
* Iterate backwards from an arbitrary position in the input text using the
* synthesized Safe Reverse rules.
* This locates a "Safe Position" from which the forward break rules
@@ -713,16 +736,6 @@ private:
#endif /* U_HIDE_INTERNAL_API */
};
-//------------------------------------------------------------------------------
-//
-// Inline Functions Definitions ...
-//
-//------------------------------------------------------------------------------
-
-inline bool RuleBasedBreakIterator::operator!=(const BreakIterator& that) const {
- return !operator==(that);
-}
-
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 0a5a378e13b..0336ac1f81e 100644
--- a/contrib/libs/icu/include/unicode/rbnf.h
+++ b/contrib/libs/icu/include/unicode/rbnf.h
@@ -54,9 +54,27 @@ class RuleBasedCollator;
* @stable ICU 2.2
*/
enum URBNFRuleSetTag {
+ /**
+ * Requests predefined ruleset for spelling out numeric values in words.
+ * @stable ICU 2.2
+ */
URBNF_SPELLOUT,
+ /**
+ * Requests predefined ruleset for the ordinal form of a number.
+ * @stable ICU 2.2
+ */
URBNF_ORDINAL,
+ /**
+ * Requests predefined ruleset for formatting a value as a duration in hours, minutes, and seconds.
+ * @stable ICU 2.2
+ */
URBNF_DURATION,
+ /**
+ * 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,
#ifndef U_HIDE_DEPRECATED_API
/**
@@ -591,7 +609,7 @@ public:
* rule sets. Each of these is one longer than the initial array,
* with the first String being the ULocale ID, and the remaining
* Strings being the localizations of the rule set names, in the
- * same order as the initial array. Arrays are NULL-terminated.
+ * same order as the initial array. Arrays are nullptr-terminated.
* @param rules A description of the formatter's desired behavior.
* See the class documentation for a complete explanation of the description
* syntax.
@@ -635,7 +653,7 @@ public:
* rule sets. Each of these is one longer than the initial array,
* with the first String being the ULocale ID, and the remaining
* Strings being the localizations of the rule set names, in the
- * same order as the initial array. Arrays are NULL-terminated.
+ * same order as the initial array. Arrays are nullptr-terminated.
* @param rules A description of the formatter's desired behavior.
* See the class documentation for a complete explanation of the description
* syntax.
@@ -662,6 +680,9 @@ public:
* URBNF_DURATION, which formats a duration in seconds as hours, minutes, and seconds always rounding down,
* and URBNF_NUMBERING_SYSTEM, which is used to invoke rules for alternate numbering
* systems such as the Hebrew numbering system, or for Roman Numerals, etc.
+ * NOTE: If you use URBNF_NUMBERING_SYSTEM, you must also call setDefaultRuleSet() to
+ * specify the exact numbering system you want to use. If you want the default numbering system
+ * for the locale, call NumberFormat::createInstance() instead of creating a RuleBasedNumberFormat directly.
* @param locale The locale for the formatter.
* @param status The status indicating whether the constructor succeeded.
* @stable ICU 2.0
@@ -1040,9 +1061,9 @@ public:
virtual void setDecimalFormatSymbols(const DecimalFormatSymbols& symbols);
private:
- RuleBasedNumberFormat(); // default constructor not implemented
+ RuleBasedNumberFormat() = delete; // default constructor not implemented
- // this will ref the localizations if they are not NULL
+ // this will ref the localizations if they are not nullptr
// caller must deref to get adoption
RuleBasedNumberFormat(const UnicodeString& description, LocalizationInfo* localizations,
const Locale& locale, UParseError& perror, UErrorCode& status);
diff --git a/contrib/libs/icu/include/unicode/rbtz.h b/contrib/libs/icu/include/unicode/rbtz.h
index 1eca70c338b..1cc3483ebf2 100644
--- a/contrib/libs/icu/include/unicode/rbtz.h
+++ b/contrib/libs/icu/include/unicode/rbtz.h
@@ -287,7 +287,7 @@ public:
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
* which represent time transitions for this time zone. On successful return,
- * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and
+ * the argument initial points to non-nullptr <code>InitialTimeZoneRule</code> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code>
* instances up to the size specified by trscount. The results are referencing the
* rule instance held by this time zone instance. Therefore, after this time zone
@@ -303,16 +303,14 @@ public:
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const override;
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
- * @draft ICU 69
+ * @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
-#endif /* U_FORCE_HIDE_DRAFT_API */
private:
void deleteRules(void);
diff --git a/contrib/libs/icu/include/unicode/regex.h b/contrib/libs/icu/include/unicode/regex.h
index f8e32922f4e..cc2f9249295 100644
--- a/contrib/libs/icu/include/unicode/regex.h
+++ b/contrib/libs/icu/include/unicode/regex.h
@@ -22,7 +22,7 @@
/**
* \file
- * \brief C++ API: Regular Expressions
+ * \brief C++ API: Regular Expressions
*
* The ICU API for processing regular expressions consists of two classes,
* `RegexPattern` and `RegexMatcher`.
@@ -84,7 +84,7 @@ class UVector64;
*
* @stable ICU 2.4
*/
-class U_I18N_API RegexPattern U_FINAL : public UObject {
+class U_I18N_API RegexPattern final : public UObject {
public:
/**
@@ -361,7 +361,7 @@ private:
*
*/
RegexMatcher *matcher(const char16_t *input,
- UErrorCode &status) const;
+ UErrorCode &status) const = delete;
public:
@@ -545,7 +545,7 @@ public:
* @param input The string to be split into fields. The field delimiters
* match the pattern (in the "this" object)
* @param dest An array of mutable UText structs to receive the results of the split.
- * If a field is NULL, a new UText is allocated to contain the results for
+ * If a field is nullptr, a new UText is allocated to contain the results for
* that field. This new UText is not guaranteed to be mutable.
* @param destCapacity The number of elements in the destination array.
* If the number of fields found is less than destCapacity, the
@@ -656,7 +656,7 @@ private:
*
* @stable ICU 2.4
*/
-class U_I18N_API RegexMatcher U_FINAL : public UObject {
+class U_I18N_API RegexMatcher final : public UObject {
public:
/**
@@ -749,7 +749,7 @@ private:
* `utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);`
*/
RegexMatcher(const UnicodeString &regexp, const char16_t *input,
- uint32_t flags, UErrorCode &status);
+ uint32_t flags, UErrorCode &status) = delete;
public:
@@ -901,13 +901,13 @@ public:
* Returns a shallow clone of the entire live input string with the UText current native index
* set to the beginning of the requested group.
*
- * @param dest The UText into which the input should be cloned, or NULL to create a new UText
+ * @param dest The UText into which the input should be cloned, or nullptr to create a new UText
* @param group_len A reference to receive the length of the desired capture group
* @param status A reference to a UErrorCode to receive any errors.
* Possible errors are U_REGEX_INVALID_STATE if no match
* has been attempted or the last match failed and
* U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number.
- * @return dest if non-NULL, a shallow copy of the input text otherwise
+ * @return dest if non-nullptr, a shallow copy of the input text otherwise
*
* @stable ICU 4.6
*/
@@ -923,13 +923,13 @@ public:
* which returns -1 for non-participating groups.
*
* @param groupNum The capture group number.
- * @param dest The UText into which the input should be cloned, or NULL to create a new UText.
+ * @param dest The UText into which the input should be cloned, or nullptr to create a new UText.
* @param group_len A reference to receive the length of the desired capture group
* @param status A reference to a UErrorCode to receive any errors.
* Possible errors are U_REGEX_INVALID_STATE if no match
* has been attempted or the last match failed and
* U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number.
- * @return dest if non-NULL, a shallow copy of the input text otherwise
+ * @return dest if non-nullptr, a shallow copy of the input text otherwise
*
* @stable ICU 4.6
*/
@@ -1157,7 +1157,7 @@ private:
* `utext_openUChars(UText *ut, const char16_t *text, int64_t textLength, UErrorCode *status);`
*
*/
- RegexMatcher &reset(const char16_t *input);
+ RegexMatcher &reset(const char16_t *input) = delete;
public:
/**
@@ -1183,9 +1183,9 @@ public:
* Returns the input string being matched, either by copying it into the provided
* UText parameter or by returning a shallow clone of the live input. Note that copying
* the entire input may cause significant performance and memory issues.
- * @param dest The UText into which the input should be copied, or NULL to create a new UText
+ * @param dest The UText into which the input should be copied, or nullptr to create a new UText
* @param status error code
- * @return dest if non-NULL, a shallow copy of the input text otherwise
+ * @return dest if non-nullptr, a shallow copy of the input text otherwise
*
* @stable ICU 4.6
*/
@@ -1388,7 +1388,7 @@ public:
*
* @param replacement a string containing the replacement text.
* @param dest a mutable UText in which the results are placed.
- * If NULL, a new UText will be created (which may not be mutable).
+ * If nullptr, a new UText will be created (which may not be mutable).
* @param status a reference to a UErrorCode to receive any errors.
* @return a string containing the results of the find and replace.
* If a pre-allocated UText was provided, it will always be used and returned.
@@ -1438,7 +1438,7 @@ public:
*
* @param replacement a string containing the replacement text.
* @param dest a mutable UText in which the results are placed.
- * If NULL, a new UText will be created (which may not be mutable).
+ * If nullptr, a new UText will be created (which may not be mutable).
* @param status a reference to a UErrorCode to receive any errors.
* @return a string containing the results of the find and replace.
* If a pre-allocated UText was provided, it will always be used and returned.
@@ -1492,7 +1492,7 @@ public:
* operations, see replaceFirst() or replaceAll().
*
* @param dest A mutable UText to which the results of the find-and-replace are appended.
- * Must not be NULL.
+ * Must not be nullptr.
* @param replacement A UText that provides the text to be substituted for
* the input text that matched the regexp pattern. The replacement
* text may contain references to captured text from the input.
@@ -1530,7 +1530,7 @@ public:
* or more invocations of the `RegexMatcher::appendReplacement()`.
*
* @param dest A mutable UText to which the results of the find-and-replace are appended.
- * Must not be NULL.
+ * Must not be nullptr.
* @param status error cod
* @return the destination string.
*
@@ -1578,7 +1578,7 @@ public:
* match the pattern (in the "this" object). This matcher
* will be reset to this input string.
* @param dest An array of mutable UText structs to receive the results of the split.
- * If a field is NULL, a new UText is allocated to contain the results for
+ * If a field is nullptr, a new UText is allocated to contain the results for
* that field. This new UText is not guaranteed to be mutable.
* @param destCapacity The number of elements in the destination array.
* If the number of fields found is less than destCapacity, the
@@ -1751,10 +1751,10 @@ public:
private:
// Constructors and other object boilerplate are private.
// Instances of RegexMatcher can not be assigned, copied, cloned, etc.
- RegexMatcher(); // default constructor not implemented
+ RegexMatcher() = delete; // default constructor not implemented
RegexMatcher(const RegexPattern *pat);
- RegexMatcher(const RegexMatcher &other);
- RegexMatcher &operator =(const RegexMatcher &rhs);
+ RegexMatcher(const RegexMatcher &other) = delete;
+ RegexMatcher &operator =(const RegexMatcher &rhs) = delete;
void init(UErrorCode &status); // Common initialization
void init2(UText *t, UErrorCode &e); // Common initialization, part 2.
@@ -1791,11 +1791,11 @@ private:
UBool isChunkWordBoundary(int32_t pos);
const RegexPattern *fPattern;
- RegexPattern *fPatternOwned; // Non-NULL if this matcher owns the pattern, and
+ RegexPattern *fPatternOwned; // Non-nullptr if this matcher owns the pattern, and
// should delete it when through.
const UnicodeString *fInput; // The string being matched. Only used for input()
- UText *fInputText; // The text being matched. Is never NULL.
+ UText *fInputText; // The text being matched. Is never nullptr.
UText *fAltInputText; // A shallow copy of the text being matched.
// Only created if the pattern contains backreferences.
int64_t fInputLength; // Full length of the input text.
@@ -1855,11 +1855,11 @@ private:
// stack, in bytes. Zero for unlimited.
URegexMatchCallback *fCallbackFn; // Pointer to match progress callback funct.
- // NULL if there is no callback.
+ // nullptr if there is no callback.
const void *fCallbackContext; // User Context ptr for callback function.
URegexFindProgressCallback *fFindProgressCallbackFn; // Pointer to match progress callback funct.
- // NULL if there is no callback.
+ // nullptr if there is no callback.
const void *fFindProgressCallbackContext; // User Context ptr for callback function.
diff --git a/contrib/libs/icu/include/unicode/region.h b/contrib/libs/icu/include/unicode/region.h
index ba4a650f4f9..1e19d66f4a5 100644
--- a/contrib/libs/icu/include/unicode/region.h
+++ b/contrib/libs/icu/include/unicode/region.h
@@ -93,7 +93,7 @@ public:
* Returns a pointer to a Region using the given region code. The region code can be either 2-letter ISO code,
* 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LDML specification.
* The identifier will be canonicalized internally using the supplemental metadata as defined in the CLDR.
- * If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR )
+ * If the region code is nullptr or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR )
* @stable ICU 51
*/
static const Region* U_EXPORT2 getInstance(const char *region_code, UErrorCode &status);
@@ -112,7 +112,7 @@ public:
static StringEnumeration* U_EXPORT2 getAvailable(URegionType type, UErrorCode &status);
/**
- * Returns a pointer to the region that contains this region. Returns NULL if this region is code "001" (World)
+ * Returns a pointer to the region that contains this region. Returns nullptr if this region is code "001" (World)
* or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the
* region "039" (Southern Europe).
* @stable ICU 51
@@ -121,9 +121,9 @@ public:
/**
* Return a pointer to the region that geographically contains this region and matches the given type,
- * moving multiple steps up the containment chain if necessary. Returns NULL if no containing region can be found
+ * moving multiple steps up the containment chain if necessary. Returns nullptr if no containing region can be found
* that matches the given type. Note: The URegionTypes = "URGN_GROUPING", "URGN_DEPRECATED", or "URGN_UNKNOWN"
- * are not appropriate for use in this API. NULL will be returned in this case. For example, calling this method
+ * are not appropriate for use in this API. nullptr will be returned in this case. For example, calling this method
* with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ).
* @stable ICU 51
*/
@@ -132,7 +132,7 @@ public:
/**
* Return an enumeration over the IDs of all the regions that are immediate children of this region in the
* region hierarchy. These returned regions could be either macro regions, territories, or a mixture of the two,
- * depending on the containment data as defined in CLDR. This API may return NULL if this region doesn't have
+ * depending on the containment data as defined in CLDR. This API may return nullptr if this region doesn't have
* any sub-regions. For example, calling this method with region "150" (Europe) returns an enumeration containing
* the various sub regions of Europe - "039" (Southern Europe) - "151" (Eastern Europe) - "154" (Northern Europe)
* and "155" (Western Europe).
diff --git a/contrib/libs/icu/include/unicode/reldatefmt.h b/contrib/libs/icu/include/unicode/reldatefmt.h
index 2a3742fd63c..4123468c652 100644
--- a/contrib/libs/icu/include/unicode/reldatefmt.h
+++ b/contrib/libs/icu/include/unicode/reldatefmt.h
@@ -283,13 +283,13 @@ class U_I18N_API FormattedRelativeDateTime : public UMemory, public FormattedVal
* Move constructor: Leaves the source FormattedRelativeDateTime in an undefined state.
* @stable ICU 64
*/
- FormattedRelativeDateTime(FormattedRelativeDateTime&& src) U_NOEXCEPT;
+ FormattedRelativeDateTime(FormattedRelativeDateTime&& src) noexcept;
/**
* Destruct an instance of FormattedRelativeDateTime.
* @stable ICU 64
*/
- virtual ~FormattedRelativeDateTime() U_OVERRIDE;
+ virtual ~FormattedRelativeDateTime() override;
/** Copying not supported; use move constructor instead. */
FormattedRelativeDateTime(const FormattedRelativeDateTime&) = delete;
@@ -301,19 +301,19 @@ class U_I18N_API FormattedRelativeDateTime : public UMemory, public FormattedVal
* Move assignment: Leaves the source FormattedRelativeDateTime in an undefined state.
* @stable ICU 64
*/
- FormattedRelativeDateTime& operator=(FormattedRelativeDateTime&& src) U_NOEXCEPT;
+ FormattedRelativeDateTime& operator=(FormattedRelativeDateTime&& src) noexcept;
/** @copydoc FormattedValue::toString() */
- UnicodeString toString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toString(UErrorCode& status) const override;
/** @copydoc FormattedValue::toTempString() */
- UnicodeString toTempString(UErrorCode& status) const U_OVERRIDE;
+ UnicodeString toTempString(UErrorCode& status) const override;
/** @copydoc FormattedValue::appendTo() */
- Appendable &appendTo(Appendable& appendable, UErrorCode& status) const U_OVERRIDE;
+ Appendable &appendTo(Appendable& appendable, UErrorCode& status) const override;
/** @copydoc FormattedValue::nextPosition() */
- UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const U_OVERRIDE;
+ UBool nextPosition(ConstrainedFieldPosition& cfpos, UErrorCode& status) const override;
private:
FormattedRelativeDateTimeData *fData;
@@ -428,7 +428,7 @@ public:
* @param locale the locale
* @param nfToAdopt Constructed object takes ownership of this pointer.
* It is an error for caller to delete this pointer or change its
- * contents after calling this constructor. Caller may pass NULL for
+ * contents after calling this constructor. Caller may pass nullptr for
* this argument if they want default number format behavior.
* @param style the format style. The UDAT_RELATIVE bit field has no effect.
* @param capitalizationContext A value from UDisplayContext that pertains to
diff --git a/contrib/libs/icu/include/unicode/rep.h b/contrib/libs/icu/include/unicode/rep.h
index 6dd4530647e..7115c97b829 100644
--- a/contrib/libs/icu/include/unicode/rep.h
+++ b/contrib/libs/icu/include/unicode/rep.h
@@ -192,7 +192,7 @@ public:
* Clone this object, an instance of a subclass of Replaceable.
* Clones can be used concurrently in multiple threads.
* If a subclass does not implement clone(), or if an error occurs,
- * then NULL is returned.
+ * then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
diff --git a/contrib/libs/icu/include/unicode/resbund.h b/contrib/libs/icu/include/unicode/resbund.h
index 7441592a0f2..30fc2ac0ab2 100644
--- a/contrib/libs/icu/include/unicode/resbund.h
+++ b/contrib/libs/icu/include/unicode/resbund.h
@@ -143,7 +143,7 @@ public:
* or equivalent. Typically, packageName will refer to a (.dat) file, or to
* a package registered with udata_setAppData(). Using a full file or directory
* pathname for packageName is deprecated.
- * NULL is used to refer to ICU data.
+ * nullptr is used to refer to ICU data.
* @param locale The locale for which to open a resource bundle.
* @param err A UErrorCode value
* @stable ICU 2.0
@@ -189,7 +189,7 @@ public:
/**
* Clone this object.
* Clones can be used concurrently in multiple threads.
- * If an error occurs, then NULL is returned.
+ * If an error occurs, then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -304,7 +304,7 @@ public:
* Returns the key associated with this resource. Not all the resources have a key - only
* those that are members of a table.
*
- * @return a key associated to this resource, or NULL if it doesn't have a key
+ * @return a key associated to this resource, or nullptr if it doesn't have a key
* @stable ICU 2.0
*/
const char*
@@ -331,7 +331,7 @@ public:
getType(void) const;
/**
- * Returns the next resource in a given resource or NULL if there are no more resources
+ * Returns the next resource in a given resource or nullptr if there are no more resources
*
* @param status fills in the outgoing error code
* @return ResourceBundle object.
@@ -341,7 +341,7 @@ public:
getNext(UErrorCode& status);
/**
- * Returns the next string in a resource or NULL if there are no more resources
+ * Returns the next string in a resource or nullptr if there are no more resources
* to iterate over.
*
* @param status fills in the outgoing error code
@@ -352,7 +352,7 @@ public:
getNextString(UErrorCode& status);
/**
- * Returns the next string in a resource or NULL if there are no more resources
+ * Returns the next string in a resource or nullptr if there are no more resources
* to iterate over.
*
* @param key fill in for key associated with this string
@@ -484,7 +484,7 @@ public:
static UClassID U_EXPORT2 getStaticClassID();
private:
- ResourceBundle(); // default constructor not implemented
+ ResourceBundle() = delete; // default constructor not implemented
UResourceBundle *fResource;
void constructForLocale(const UnicodeString& path, const Locale& locale, UErrorCode& error);
diff --git a/contrib/libs/icu/include/unicode/schriter.h b/contrib/libs/icu/include/unicode/schriter.h
index 9dac0999677..a2ab17982d1 100644
--- a/contrib/libs/icu/include/unicode/schriter.h
+++ b/contrib/libs/icu/include/unicode/schriter.h
@@ -173,14 +173,6 @@ protected:
StringCharacterIterator();
/**
- * Sets the iterator to iterate over the provided string.
- * @param newText The string to be iterated over
- * @param newTextLength The length of the String
- * @stable ICU 2.0
- */
- void setText(const char16_t* newText, int32_t newTextLength);
-
- /**
* Copy of the iterated string object.
* @stable ICU 2.0
*/
diff --git a/contrib/libs/icu/include/unicode/scientificnumberformatter.h b/contrib/libs/icu/include/unicode/scientificnumberformatter.h
index aa7e80543e4..a1dd5436382 100644
--- a/contrib/libs/icu/include/unicode/scientificnumberformatter.h
+++ b/contrib/libs/icu/include/unicode/scientificnumberformatter.h
@@ -196,7 +196,7 @@ public:
UErrorCode &status);
ScientificNumberFormatter(const ScientificNumberFormatter &other);
- ScientificNumberFormatter &operator=(const ScientificNumberFormatter &);
+ ScientificNumberFormatter &operator=(const ScientificNumberFormatter &) = delete;
static void getPreExponent(
const DecimalFormatSymbols &dfs, UnicodeString &preExponent);
diff --git a/contrib/libs/icu/include/unicode/search.h b/contrib/libs/icu/include/unicode/search.h
index 295a3ce67e9..a8004efc431 100644
--- a/contrib/libs/icu/include/unicode/search.h
+++ b/contrib/libs/icu/include/unicode/search.h
@@ -206,7 +206,7 @@ public:
* found, but the match's start or end index is not a
* boundary as determined by the <tt>BreakIterator</tt>,
* the match will be rejected and another will be searched
- * for. If this parameter is <tt>NULL</tt>, no break
+ * for. If this parameter is <tt>nullptr</tt>, no break
* detection is attempted.
* @param status for errors if it occurs
* @see BreakIterator
@@ -218,7 +218,7 @@ public:
* Returns the BreakIterator that is used to restrict the points at
* which matches are detected. This will be the same object that was
* passed to the constructor or to <tt>setBreakIterator</tt>.
- * Note that <tt>NULL</tt> is a legal value; it means that break
+ * Note that <tt>nullptr</tt> is a legal value; it means that break
* detection should not be attempted.
* @return BreakIterator used to restrict matchings.
* @see #setBreakIterator
@@ -452,13 +452,13 @@ protected:
* boundary as determined by the <tt>BreakIterator</tt>,
* the match is rejected and <tt>handleNext</tt> or
* <tt>handlePrev</tt> is called again. If this parameter
- * is <tt>NULL</tt>, no break detection is attempted.
+ * is <tt>nullptr</tt>, no break detection is attempted.
* @see #handleNext
* @see #handlePrev
* @stable ICU 2.0
*/
SearchIterator(const UnicodeString &text,
- BreakIterator *breakiter = NULL);
+ BreakIterator *breakiter = nullptr);
/**
* Constructor for use by subclasses.
@@ -474,12 +474,12 @@ protected:
* boundary as determined by the <tt>BreakIterator</tt>,
* the match is rejected and <tt>handleNext</tt> or
* <tt>handlePrev</tt> is called again. If this parameter
- * is <tt>NULL</tt>, no break detection is attempted.
+ * is <tt>nullptr</tt>, no break detection is attempted.
* @see #handleNext
* @see #handlePrev
* @stable ICU 2.0
*/
- SearchIterator(CharacterIterator &text, BreakIterator *breakiter = NULL);
+ SearchIterator(CharacterIterator &text, BreakIterator *breakiter = nullptr);
// protected methods --------------------------------------------------
diff --git a/contrib/libs/icu/include/unicode/selfmt.h b/contrib/libs/icu/include/unicode/selfmt.h
index bdce00e593e..18023803127 100644
--- a/contrib/libs/icu/include/unicode/selfmt.h
+++ b/contrib/libs/icu/include/unicode/selfmt.h
@@ -348,7 +348,7 @@ public:
private:
friend class MessageFormat;
- SelectFormat(); // default constructor not implemented.
+ SelectFormat() = delete; // default constructor not implemented.
/**
* Finds the SelectFormat sub-message for the given keyword, or the "other" sub-message.
diff --git a/contrib/libs/icu/include/unicode/simpleformatter.h b/contrib/libs/icu/include/unicode/simpleformatter.h
index 6d9c04ace23..7f58106fadb 100644
--- a/contrib/libs/icu/include/unicode/simpleformatter.h
+++ b/contrib/libs/icu/include/unicode/simpleformatter.h
@@ -59,7 +59,7 @@ class SimpleModifier;
* @see UMessagePatternApostropheMode
* @stable ICU 57
*/
-class U_COMMON_API SimpleFormatter U_FINAL : public UMemory {
+class U_COMMON_API SimpleFormatter final : public UMemory {
public:
/**
* Default constructor.
@@ -217,13 +217,13 @@ public:
*
* @param values The argument values.
* An argument value must not be the same object as appendTo.
- * Can be NULL if valuesLength==getArgumentLimit()==0.
+ * Can be nullptr if valuesLength==getArgumentLimit()==0.
* @param valuesLength The length of the values array.
* Must be at least getArgumentLimit().
* @param appendTo Gets the formatted pattern and values appended.
* @param offsets offsets[i] receives the offset of where
* values[i] replaced pattern argument {i}.
- * Can be shorter or longer than values. Can be NULL if offsetsLength==0.
+ * Can be shorter or longer than values. Can be nullptr if offsetsLength==0.
* If there is no {i} in the pattern, then offsets[i] is set to -1.
* @param offsetsLength The length of the offsets array.
* @param errorCode ICU error code in/out parameter.
@@ -243,13 +243,13 @@ public:
*
* @param values The argument values.
* An argument value may be the same object as result.
- * Can be NULL if valuesLength==getArgumentLimit()==0.
+ * Can be nullptr if valuesLength==getArgumentLimit()==0.
* @param valuesLength The length of the values array.
* Must be at least getArgumentLimit().
* @param result Gets its contents replaced by the formatted pattern and values.
* @param offsets offsets[i] receives the offset of where
* values[i] replaced pattern argument {i}.
- * Can be shorter or longer than values. Can be NULL if offsetsLength==0.
+ * Can be shorter or longer than values. Can be nullptr if offsetsLength==0.
* If there is no {i} in the pattern, then offsets[i] is set to -1.
* @param offsetsLength The length of the offsets array.
* @param errorCode ICU error code in/out parameter.
diff --git a/contrib/libs/icu/include/unicode/simplenumberformatter.h b/contrib/libs/icu/include/unicode/simplenumberformatter.h
new file mode 100644
index 00000000000..32b79a94da4
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/simplenumberformatter.h
@@ -0,0 +1,329 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __SIMPLENUMBERFORMATTERH__
+#define __SIMPLENUMBERFORMATTERH__
+
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/dcfmtsym.h"
+#include "unicode/usimplenumberformatter.h"
+#include "unicode/formattednumber.h"
+
+/**
+ * \file
+ * \brief C++ API: Simple number formatting focused on low memory and code size.
+ *
+ * These functions render locale-aware number strings but without the bells and whistles found in
+ * other number formatting APIs such as those in numberformatter.h, like units and currencies.
+ *
+ * <pre>
+ * SimpleNumberFormatter snf = SimpleNumberFormatter::forLocale("de-CH", status);
+ * FormattedNumber result = snf.formatInt64(-1000007, status);
+ * assertEquals("", u"-1’000’007", result.toString(status));
+ * </pre>
+ */
+
+U_NAMESPACE_BEGIN
+
+
+namespace number { // icu::number
+
+
+namespace impl {
+class UFormattedNumberData;
+struct SimpleMicroProps;
+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
+ */
+class U_I18N_API SimpleNumber : public UMemory {
+ public:
+ /**
+ * Creates a SimpleNumber for an integer.
+ *
+ * @draft ICU 73
+ */
+ static SimpleNumber forInt64(int64_t value, UErrorCode& status);
+
+ /**
+ * Changes the value of the SimpleNumber by a power of 10.
+ *
+ * This function immediately mutates the inner value.
+ *
+ * @draft ICU 73
+ */
+ void multiplyByPowerOfTen(int32_t power, UErrorCode& status);
+
+ /**
+ * Rounds the value currently stored in the SimpleNumber to the given power of 10.
+ *
+ * This function immediately mutates the inner value.
+ *
+ * @draft ICU 73
+ */
+ void roundTo(int32_t power, UNumberFormatRoundingMode roundingMode, UErrorCode& status);
+
+ /**
+ * Truncates the most significant digits to the given maximum number of integer digits.
+ *
+ * This function immediately mutates the inner value.
+ *
+ * @draft ICU 73
+ */
+ void truncateStart(uint32_t maximumIntegerDigits, UErrorCode& status);
+
+ /**
+ * 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
+ */
+ 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
+ */
+ void setMinimumFractionDigits(uint32_t minimumFractionDigits, UErrorCode& status);
+
+ /**
+ * Sets the sign of the number: an explicit plus sign, explicit minus sign, or no sign.
+ *
+ * This setting is applied upon formatting the number.
+ *
+ * NOTE: This does not support accounting sign notation.
+ *
+ * @draft ICU 73
+ */
+ void setSign(USimpleNumberSign sign, UErrorCode& status);
+
+ /**
+ * Creates a new, empty SimpleNumber that does not contain a value.
+ *
+ * NOTE: This number will fail to format; use forInt64() to create a SimpleNumber with a value.
+ *
+ * @draft ICU 73
+ */
+ SimpleNumber() = default;
+
+ /**
+ * Destruct this SimpleNumber, cleaning up any memory it might own.
+ *
+ * @draft ICU 73
+ */
+ ~SimpleNumber() {
+ cleanup();
+ }
+
+ /**
+ * SimpleNumber move constructor.
+ *
+ * @draft ICU 73
+ */
+ SimpleNumber(SimpleNumber&& other) noexcept {
+ fData = other.fData;
+ fSign = other.fSign;
+ other.fData = nullptr;
+ }
+
+ /**
+ * SimpleNumber move assignment.
+ *
+ * @draft ICU 73
+ */
+ SimpleNumber& operator=(SimpleNumber&& other) noexcept {
+ cleanup();
+ fData = other.fData;
+ fSign = other.fSign;
+ other.fData = nullptr;
+ return *this;
+ }
+
+ private:
+ SimpleNumber(impl::UFormattedNumberData* data, UErrorCode& status);
+ SimpleNumber(const SimpleNumber&) = delete;
+ SimpleNumber& operator=(const SimpleNumber&) = delete;
+
+ void cleanup();
+
+ impl::UFormattedNumberData* fData = nullptr;
+ USimpleNumberSign fSign = UNUM_SIMPLE_NUMBER_NO_SIGN;
+
+ friend class SimpleNumberFormatter;
+};
+
+
+/**
+ * A special NumberFormatter focused on smaller binary size and memory use.
+ *
+ * SimpleNumberFormatter is capable of basic number formatting, including grouping separators,
+ * sign display, and rounding. It is not capable of currencies, compact notation, or units.
+ *
+ * This class is immutable and not intended for public subclassing. This class is movable but not copyable.
+ *
+ * @draft ICU 73
+ */
+class U_I18N_API SimpleNumberFormatter : public UMemory {
+ public:
+ /**
+ * Creates a new SimpleNumberFormatter with all locale defaults.
+ *
+ * @draft ICU 73
+ */
+ static SimpleNumberFormatter forLocale(
+ const icu::Locale &locale,
+ UErrorCode &status);
+
+ /**
+ * Creates a new SimpleNumberFormatter, overriding the grouping strategy.
+ *
+ * @draft ICU 73
+ */
+ static SimpleNumberFormatter forLocaleAndGroupingStrategy(
+ const icu::Locale &locale,
+ UNumberGroupingStrategy groupingStrategy,
+ UErrorCode &status);
+
+ /**
+ * Creates a new SimpleNumberFormatter, overriding the grouping strategy and symbols.
+ *
+ * IMPORTANT: For efficiency, this function borrows the symbols. The symbols MUST remain valid
+ * for the lifetime of the SimpleNumberFormatter.
+ *
+ * @draft ICU 73
+ */
+ static SimpleNumberFormatter forLocaleAndSymbolsAndGroupingStrategy(
+ const icu::Locale &locale,
+ const DecimalFormatSymbols &symbols,
+ UNumberGroupingStrategy groupingStrategy,
+ UErrorCode &status);
+
+ /**
+ * Formats a value using this SimpleNumberFormatter.
+ *
+ * The SimpleNumber argument is "consumed". A new SimpleNumber object should be created for
+ * every formatting operation.
+ *
+ * @draft ICU 73
+ */
+ FormattedNumber format(SimpleNumber value, UErrorCode &status) const;
+
+ /**
+ * Formats an integer using this SimpleNumberFormatter.
+ *
+ * For more control over the formatting, use SimpleNumber.
+ *
+ * @draft ICU 73
+ */
+ FormattedNumber formatInt64(int64_t value, UErrorCode &status) const {
+ return format(SimpleNumber::forInt64(value, status), status);
+ }
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * Run the formatter with the internal types.
+ * @internal
+ */
+ void formatImpl(impl::UFormattedNumberData* data, USimpleNumberSign sign, UErrorCode& status) const;
+#endif // U_HIDE_INTERNAL_API
+
+ /**
+ * Destruct this SimpleNumberFormatter, cleaning up any memory it might own.
+ *
+ * @draft ICU 73
+ */
+ ~SimpleNumberFormatter() {
+ cleanup();
+ }
+
+ /**
+ * Creates a shell, initialized but non-functional SimpleNumberFormatter.
+ *
+ * @draft ICU 73
+ */
+ SimpleNumberFormatter() = default;
+
+ /**
+ * SimpleNumberFormatter: Move constructor.
+ *
+ * @draft ICU 73
+ */
+ SimpleNumberFormatter(SimpleNumberFormatter&& other) noexcept {
+ fGroupingStrategy = other.fGroupingStrategy;
+ fOwnedSymbols = other.fOwnedSymbols;
+ fMicros = other.fMicros;
+ fPatternModifier = other.fPatternModifier;
+ other.fOwnedSymbols = nullptr;
+ other.fMicros = nullptr;
+ other.fPatternModifier = nullptr;
+ }
+
+ /**
+ * SimpleNumberFormatter: Move assignment.
+ *
+ * @draft ICU 73
+ */
+ SimpleNumberFormatter& operator=(SimpleNumberFormatter&& other) noexcept {
+ cleanup();
+ fGroupingStrategy = other.fGroupingStrategy;
+ fOwnedSymbols = other.fOwnedSymbols;
+ fMicros = other.fMicros;
+ fPatternModifier = other.fPatternModifier;
+ other.fOwnedSymbols = nullptr;
+ other.fMicros = nullptr;
+ other.fPatternModifier = nullptr;
+ return *this;
+ }
+
+ private:
+ void initialize(
+ const icu::Locale &locale,
+ const DecimalFormatSymbols &symbols,
+ UNumberGroupingStrategy groupingStrategy,
+ UErrorCode &status);
+
+ void cleanup();
+
+ SimpleNumberFormatter(const SimpleNumberFormatter&) = delete;
+
+ SimpleNumberFormatter& operator=(const SimpleNumberFormatter&) = delete;
+
+ UNumberGroupingStrategy fGroupingStrategy = UNUM_GROUPING_AUTO;
+
+ // Owned Pointers:
+ DecimalFormatSymbols* fOwnedSymbols = nullptr; // can be empty
+ impl::SimpleMicroProps* fMicros = nullptr;
+ impl::AdoptingSignumModifierStore* fPatternModifier = nullptr;
+};
+
+
+#endif // U_HIDE_DRAFT_API
+
+} // namespace number
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+
+#endif // __SIMPLENUMBERFORMATTERH__
+
diff --git a/contrib/libs/icu/include/unicode/simpletz.h b/contrib/libs/icu/include/unicode/simpletz.h
index f5c155de466..9005c9ccbaf 100644
--- a/contrib/libs/icu/include/unicode/simpletz.h
+++ b/contrib/libs/icu/include/unicode/simpletz.h
@@ -620,16 +620,14 @@ public:
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& ec) const override;
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
- * @draft ICU 69
+ * @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
-#endif /* U_FORCE_HIDE_DRAFT_API */
/**
* Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -746,7 +744,7 @@ public:
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
* which represent time transitions for this time zone. On successful return,
- * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and
+ * the argument initial points to non-nullptr <code>InitialTimeZoneRule</code> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code>
* instances up to the size specified by trscount. The results are referencing the
* rule instance held by this time zone instance. Therefore, after this time zone
@@ -802,7 +800,7 @@ private:
DOW_LE_DOM_MODE
};
- SimpleTimeZone(); // default constructor not implemented
+ SimpleTimeZone() = delete; // default constructor not implemented
/**
* Internal construction method.
diff --git a/contrib/libs/icu/include/unicode/smpdtfmt.h b/contrib/libs/icu/include/unicode/smpdtfmt.h
index 733a1cff13b..4343bfbca53 100644
--- a/contrib/libs/icu/include/unicode/smpdtfmt.h
+++ b/contrib/libs/icu/include/unicode/smpdtfmt.h
@@ -55,6 +55,7 @@ class DateIntervalFormat;
namespace number {
class LocalizedNumberFormatter;
+class SimpleNumberFormatter;
}
/**
@@ -1226,7 +1227,7 @@ private:
void initializeBooleanAttributes(void);
- SimpleDateFormat(); // default constructor not implemented
+ SimpleDateFormat() = delete; // default constructor not implemented
/**
* Used by the DateFormat factory methods to construct a SimpleDateFormat.
@@ -1316,7 +1317,7 @@ private:
/**
* initializes fCalendar from parameters. Returns fCalendar as a convenience.
- * @param adoptZone Zone to be adopted, or NULL for TimeZone::createDefault().
+ * @param adoptZone Zone to be adopted, or nullptr for TimeZone::createDefault().
* @param locale Locale of the calendar
* @param status Error code
* @return the newly constructed fCalendar
@@ -1349,7 +1350,7 @@ private:
* @param field the date field being parsed.
* @param stringArray the string array to parsed.
* @param stringArrayCount the size of the array.
- * @param monthPattern pointer to leap month pattern, or NULL if none.
+ * @param monthPattern pointer to leap month pattern, or nullptr if none.
* @param cal a Calendar set to the date and time to be formatted
* into a date/time string.
* @return the new start position if matching succeeded; a negative number
@@ -1360,6 +1361,22 @@ private:
const UnicodeString* monthPattern, Calendar& cal) const;
/**
+ * Private code-size reduction function used by subParse. Only for UCAL_MONTH
+ * @param text the time text being parsed.
+ * @param start where to start parsing.
+ * @param wideStringArray the wide string array to parsed.
+ * @param shortStringArray the short string array to parsed.
+ * @param stringArrayCount the size of the string arrays.
+ * @param cal a Calendar set to the date and time to be formatted
+ * into a date/time string.
+ * @return the new start position if matching succeeded; a negative number
+ * indicating matching failure, otherwise.
+ */
+ int32_t matchAlphaMonthStrings(const UnicodeString& text, int32_t start,
+ const UnicodeString* wideStringArray, const UnicodeString* shortStringArray,
+ int32_t stringArrayCount, Calendar& cal) const;
+
+ /**
* Private code-size reduction function used by subParse.
* @param text the time text being parsed.
* @param start where to start parsing.
@@ -1416,14 +1433,14 @@ private:
* @param patLoc
* @param numericLeapMonthFormatter If non-null, used to parse numeric leap months.
* @param tzTimeType the type of parsed time zone - standard, daylight or unknown (output).
- * This parameter can be NULL if caller does not need the information.
+ * This parameter can be nullptr if caller does not need the information.
* @return the new start position if matching succeeded; a negative number
* indicating matching failure, otherwise.
*/
int32_t subParse(const UnicodeString& text, int32_t& start, char16_t ch, int32_t count,
UBool obeyCount, UBool allowNegative, UBool ambiguousYear[], int32_t& saveHebrewMonth, Calendar& cal,
int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType,
- int32_t *dayPeriod=NULL) const;
+ int32_t *dayPeriod=nullptr) const;
void parseInt(const UnicodeString& text,
Formattable& number,
@@ -1504,14 +1521,9 @@ private:
int32_t skipUWhiteSpace(const UnicodeString& text, int32_t pos) const;
/**
- * Initialize LocalizedNumberFormatter instances used for speedup.
+ * Initialize SimpleNumberFormat instance
*/
- void initFastNumberFormatters(UErrorCode& status);
-
- /**
- * Delete the LocalizedNumberFormatter instances used for speedup.
- */
- void freeFastNumberFormatters();
+ void initSimpleNumberFormatter(UErrorCode &status);
/**
* Initialize NumberFormat instances used for numbering system overrides.
@@ -1583,12 +1595,12 @@ private:
* A pointer to an object containing the strings to use in formatting (e.g.,
* month and day names, AM and PM strings, time zone names, etc.)
*/
- DateFormatSymbols* fSymbols; // Owned
+ DateFormatSymbols* fSymbols = nullptr; // Owned
/**
* The time zone formatter
*/
- TimeZoneFormat* fTimeZoneFormat;
+ TimeZoneFormat* fTimeZoneFormat = nullptr;
/**
* If dates have ambiguous years, we map them into the century starting
@@ -1619,34 +1631,29 @@ private:
int32_t hash;
NSOverride *next;
void free();
- NSOverride() : snf(NULL), hash(0), next(NULL) {
+ NSOverride() : snf(nullptr), hash(0), next(nullptr) {
}
~NSOverride();
};
/**
- * The number format in use for each date field. NULL means fall back
+ * The number format in use for each date field. nullptr means fall back
* to fNumberFormat in DateFormat.
*/
- const SharedNumberFormat **fSharedNumberFormatters;
-
- enum NumberFormatterKey {
- SMPDTFMT_NF_1x10,
- SMPDTFMT_NF_2x10,
- SMPDTFMT_NF_3x10,
- SMPDTFMT_NF_4x10,
- SMPDTFMT_NF_2x2,
- SMPDTFMT_NF_COUNT
- };
+ const SharedNumberFormat **fSharedNumberFormatters = nullptr;
/**
- * Number formatters pre-allocated for fast performance on the most common integer lengths.
+ * Number formatter pre-allocated for fast performance
+ *
+ * This references the decimal symbols from fNumberFormatter if it is an instance
+ * of DecimalFormat (and is otherwise null). This should always be cleaned up before
+ * destroying fNumberFormatter.
*/
- const number::LocalizedNumberFormatter* fFastNumberFormatters[SMPDTFMT_NF_COUNT] = {};
+ const number::SimpleNumberFormatter* fSimpleNumberFormatter = nullptr;
UBool fHaveDefaultCentury;
- const BreakIterator* fCapitalizationBrkIter;
+ const BreakIterator* fCapitalizationBrkIter = nullptr;
};
inline UDate
diff --git a/contrib/libs/icu/include/unicode/sortkey.h b/contrib/libs/icu/include/unicode/sortkey.h
index b1231f18b78..401b5abad0a 100644
--- a/contrib/libs/icu/include/unicode/sortkey.h
+++ b/contrib/libs/icu/include/unicode/sortkey.h
@@ -249,7 +249,7 @@ private:
/**
* Replaces the current bytes buffer with a new one of newCapacity
* and copies length bytes from the old buffer to the new one.
- * @return the new buffer, or NULL if the allocation failed
+ * @return the new buffer, or nullptr if the allocation failed
*/
uint8_t *reallocate(int32_t newCapacity, int32_t length);
/**
diff --git a/contrib/libs/icu/include/unicode/strenum.h b/contrib/libs/icu/include/unicode/strenum.h
index 1d1b37940a8..fba5c9b8147 100644
--- a/contrib/libs/icu/include/unicode/strenum.h
+++ b/contrib/libs/icu/include/unicode/strenum.h
@@ -70,7 +70,7 @@ public:
* Clone this object, an instance of a subclass of StringEnumeration.
* Clones can be used concurrently in multiple threads.
* If a subclass does not implement clone(), or if an error occurs,
- * then NULL is returned.
+ * then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -101,8 +101,8 @@ public:
/**
* <p>Returns the next element as a NUL-terminated char*. If there
- * are no more elements, returns NULL. If the resultLength pointer
- * is not NULL, the length of the string (not counting the
+ * are no more elements, returns nullptr. If the resultLength pointer
+ * is not nullptr, the length of the string (not counting the
* terminating NUL) is returned at that address. If an error
* status is returned, the value at resultLength is undefined.</p>
*
@@ -111,21 +111,21 @@ public:
* to next, unext, snext, reset, or the enumerator's destructor.</p>
*
* <p>If the iterator is out of sync with its service, status is set
- * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
+ * to U_ENUM_OUT_OF_SYNC_ERROR and nullptr is returned.</p>
*
* <p>If the native service string is a char16_t* string, it is
* converted to char* with the invariant converter. If the
* conversion fails (because a character cannot be converted) then
* status is set to U_INVARIANT_CONVERSION_ERROR and the return
- * value is undefined (though not NULL).</p>
+ * value is undefined (though not nullptr).</p>
*
* Starting with ICU 2.8, the default implementation calls snext()
* and handles the conversion.
* Either next() or snext() must be implemented differently by a subclass.
*
* @param status the error code.
- * @param resultLength a pointer to receive the length, can be NULL.
- * @return a pointer to the string, or NULL.
+ * @param resultLength a pointer to receive the length, can be nullptr.
+ * @return a pointer to the string, or nullptr.
*
* @stable ICU 2.4
*/
@@ -133,8 +133,8 @@ public:
/**
* <p>Returns the next element as a NUL-terminated char16_t*. If there
- * are no more elements, returns NULL. If the resultLength pointer
- * is not NULL, the length of the string (not counting the
+ * are no more elements, returns nullptr. If the resultLength pointer
+ * is not nullptr, the length of the string (not counting the
* terminating NUL) is returned at that address. If an error
* status is returned, the value at resultLength is undefined.</p>
*
@@ -143,14 +143,14 @@ public:
* to next, unext, snext, reset, or the enumerator's destructor.</p>
*
* <p>If the iterator is out of sync with its service, status is set
- * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
+ * to U_ENUM_OUT_OF_SYNC_ERROR and nullptr is returned.</p>
*
* Starting with ICU 2.8, the default implementation calls snext()
* and handles the conversion.
*
* @param status the error code.
- * @param resultLength a pointer to receive the length, can be NULL.
- * @return a pointer to the string, or NULL.
+ * @param resultLength a pointer to receive the length, can be nullptr.
+ * @return a pointer to the string, or nullptr.
*
* @stable ICU 2.4
*/
@@ -158,21 +158,21 @@ public:
/**
* <p>Returns the next element a UnicodeString*. If there are no
- * more elements, returns NULL.</p>
+ * more elements, returns nullptr.</p>
*
* <p>The returned pointer is owned by this iterator and must not be
* deleted by the caller. The pointer is valid until the next call
* to next, unext, snext, reset, or the enumerator's destructor.</p>
*
* <p>If the iterator is out of sync with its service, status is set
- * to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
+ * to U_ENUM_OUT_OF_SYNC_ERROR and nullptr is returned.</p>
*
* Starting with ICU 2.8, the default implementation calls next()
* and handles the conversion.
* Either next() or snext() must be implemented differently by a subclass.
*
* @param status the error code.
- * @return a pointer to the string, or NULL.
+ * @return a pointer to the string, or nullptr.
*
* @stable ICU 2.4
*/
diff --git a/contrib/libs/icu/include/unicode/stringtriebuilder.h b/contrib/libs/icu/include/unicode/stringtriebuilder.h
index b7a9b23d22b..429d7883f15 100644
--- a/contrib/libs/icu/include/unicode/stringtriebuilder.h
+++ b/contrib/libs/icu/include/unicode/stringtriebuilder.h
@@ -152,7 +152,7 @@ protected:
* equivalent to newNode.
* @param newNode Input node. The builder takes ownership.
* @param errorCode ICU in/out UErrorCode.
- Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL.
+ Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==nullptr.
* @return newNode if it is the first of its kind, or
* an equivalent node if newNode is a duplicate.
* @internal
@@ -164,7 +164,7 @@ protected:
* Avoids creating a node if the value is a duplicate.
* @param value A final value.
* @param errorCode ICU in/out UErrorCode.
- Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==NULL.
+ Set to U_MEMORY_ALLOCATION_ERROR if it was success but newNode==nullptr.
* @return A FinalValueNode with the given value.
* @internal
*/
@@ -176,11 +176,11 @@ protected:
* registerNode() and registerFinalValue() take ownership of their input nodes,
* and only return owned nodes.
* If they see a failure UErrorCode, they will delete the input node.
- * If they get a NULL pointer, they will record a U_MEMORY_ALLOCATION_ERROR.
- * If there is a failure, they return NULL.
+ * If they get a nullptr pointer, they will record a U_MEMORY_ALLOCATION_ERROR.
+ * If there is a failure, they return nullptr.
*
- * NULL Node pointers can be safely passed into other Nodes because
- * they call the static Node::hashCode() which checks for a NULL pointer first.
+ * nullptr Node pointers can be safely passed into other Nodes because
+ * they call the static Node::hashCode() which checks for a nullptr pointer first.
*
* Therefore, as long as builder functions register a new node,
* they need to check for failures only before explicitly dereferencing
@@ -201,8 +201,8 @@ protected:
public:
Node(int32_t initialHash) : hash(initialHash), offset(0) {}
inline int32_t hashCode() const { return hash; }
- // Handles node==NULL.
- static inline int32_t hashCode(const Node *node) { return node==NULL ? 0 : node->hashCode(); }
+ // Handles node==nullptr.
+ static inline int32_t hashCode(const Node *node) { return node==nullptr ? 0 : node->hashCode(); }
// Base class operator==() compares the actual class types.
virtual bool operator==(const Node &other) const;
inline bool operator!=(const Node &other) const { return !operator==(other); }
@@ -347,7 +347,7 @@ protected:
// Adds a unit with a final value.
void add(int32_t c, int32_t value) {
units[length]=(char16_t)c;
- equal[length]=NULL;
+ equal[length]=nullptr;
values[length]=value;
++length;
hash=(hash*37u+c)*37u+value;
@@ -361,7 +361,7 @@ protected:
hash=(hash*37u+c)*37u+hashCode(node);
}
protected:
- Node *equal[kMaxBranchLinearSubNodeLength]; // NULL means "has final value".
+ Node *equal[kMaxBranchLinearSubNodeLength]; // nullptr means "has final value".
int32_t length;
int32_t values[kMaxBranchLinearSubNodeLength];
char16_t units[kMaxBranchLinearSubNodeLength];
diff --git a/contrib/libs/icu/include/unicode/stsearch.h b/contrib/libs/icu/include/unicode/stsearch.h
index c23e651d897..b916aebf246 100644
--- a/contrib/libs/icu/include/unicode/stsearch.h
+++ b/contrib/libs/icu/include/unicode/stsearch.h
@@ -116,7 +116,7 @@ U_NAMESPACE_BEGIN
* UnicodeString pattern("fox");
*
* UErrorCode error = U_ZERO_ERROR;
- * StringSearch iter(pattern, target, Locale::getUS(), NULL, status);
+ * StringSearch iter(pattern, target, Locale::getUS(), nullptr, status);
* for (int pos = iter.first(error);
* pos != USEARCH_DONE;
* pos = iter.next(error))
@@ -132,7 +132,7 @@ U_NAMESPACE_BEGIN
* @since ICU 2.0
*/
-class U_I18N_API StringSearch U_FINAL : public SearchIterator
+class U_I18N_API StringSearch final : public SearchIterator
{
public:
@@ -153,8 +153,8 @@ public:
* indices in the target text are not boundaries as
* determined by the <tt>BreakIterator</tt> are
* ignored. If this behavior is not desired,
- * <tt>NULL</tt> can be passed in instead.
- * @param status for errors if any. If pattern or text is NULL, or if
+ * <tt>nullptr</tt> can be passed in instead.
+ * @param status for errors if any. If pattern or text is nullptr, or if
* either the length of pattern or text is 0 then an
* U_ILLEGAL_ARGUMENT_ERROR is returned.
* @stable ICU 2.0
@@ -180,7 +180,7 @@ public:
* indices in the target text are not boundaries as
* determined by the <tt>BreakIterator</tt> are
* ignored. If this behavior is not desired,
- * <tt>NULL</tt> can be passed in instead.
+ * <tt>nullptr</tt> can be passed in instead.
* @param status for errors if any. If either the length of pattern or
* text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned.
* @stable ICU 2.0
@@ -211,7 +211,7 @@ public:
* indices in the target text are not boundaries as
* determined by the <tt>BreakIterator</tt> are
* ignored. If this behavior is not desired,
- * <tt>NULL</tt> can be passed in instead.
+ * <tt>nullptr</tt> can be passed in instead.
* @param status for errors if any. If either the length of pattern or
* text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned.
* @stable ICU 2.0
@@ -241,7 +241,7 @@ public:
* indices in the target text are not boundaries as
* determined by the <tt>BreakIterator</tt> are
* ignored. If this behavior is not desired,
- * <tt>NULL</tt> can be passed in instead.
+ * <tt>nullptr</tt> can be passed in instead.
* @param status for errors if any. If either the length of pattern or
* text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned.
* @stable ICU 2.0
@@ -269,7 +269,7 @@ public:
/**
* Clone this object.
* Clones can be used concurrently in multiple threads.
- * If an error occurs, then NULL is returned.
+ * If an error occurs, then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -482,7 +482,7 @@ protected:
virtual int32_t handlePrev(int32_t position, UErrorCode &status) override;
private :
- StringSearch(); // default constructor not implemented
+ StringSearch() = delete; // default constructor not implemented
// private data members ----------------------------------------------
diff --git a/contrib/libs/icu/include/unicode/symtable.h b/contrib/libs/icu/include/unicode/symtable.h
index b64d877f974..647a3884a00 100644
--- a/contrib/libs/icu/include/unicode/symtable.h
+++ b/contrib/libs/icu/include/unicode/symtable.h
@@ -73,10 +73,10 @@ public:
/**
* Lookup the characters associated with this string and return it.
- * Return <tt>NULL</tt> if no such name exists. The resultant
+ * Return <tt>nullptr</tt> if no such name exists. The resultant
* string may have length zero.
* @param s the symbolic name to lookup
- * @return a string containing the name's value, or <tt>NULL</tt> if
+ * @return a string containing the name's value, or <tt>nullptr</tt> if
* there is no mapping for s.
* @stable ICU 2.8
*/
@@ -84,10 +84,10 @@ public:
/**
* Lookup the UnicodeMatcher associated with the given character, and
- * return it. Return <tt>NULL</tt> if not found.
+ * return it. Return <tt>nullptr</tt> if not found.
* @param ch a 32-bit code point from 0 to 0x10FFFF inclusive.
* @return the UnicodeMatcher object represented by the given
- * character, or NULL if there is no mapping for ch.
+ * character, or nullptr if there is no mapping for ch.
* @stable ICU 2.8
*/
virtual const UnicodeFunctor* lookupMatcher(UChar32 ch) const = 0;
diff --git a/contrib/libs/icu/include/unicode/tblcoll.h b/contrib/libs/icu/include/unicode/tblcoll.h
index 2de1af85392..43cf35d1a81 100644
--- a/contrib/libs/icu/include/unicode/tblcoll.h
+++ b/contrib/libs/icu/include/unicode/tblcoll.h
@@ -112,7 +112,7 @@ class UVector64;
* Note, RuleBasedCollator is not to be subclassed.
* @see Collator
*/
-class U_I18N_API RuleBasedCollator U_FINAL : public Collator {
+class U_I18N_API RuleBasedCollator final : public Collator {
public:
/**
* RuleBasedCollator constructor. This takes the table rules and builds a
@@ -193,7 +193,7 @@ public:
* @param length size of the image. If negative, the API will try to
* figure out the length of the image
* @param base Base collator, for lookup of untailored characters.
- * Must be the root collator, must not be NULL.
+ * Must be the root collator, must not be nullptr.
* The base is required to be present through the lifetime of the collator.
* @param status for catching errors
* @return newly created collator
@@ -626,7 +626,7 @@ public:
* For more details, see the ICU User Guide.
*
* @param source string to be processed.
- * @param result buffer to store result in. If NULL, number of bytes needed
+ * @param result buffer to store result in. If nullptr, number of bytes needed
* will be returned.
* @param resultLength length of the result buffer. If if not enough the
* buffer will be filled to capacity.
@@ -645,7 +645,7 @@ public:
* @param source string to be processed.
* @param sourceLength length of string to be processed. If -1, the string
* is 0 terminated and length will be decided by the function.
- * @param result buffer to store result in. If NULL, number of bytes needed
+ * @param result buffer to store result in. If nullptr, number of bytes needed
* will be returned.
* @param resultLength length of the result buffer. If if not enough the
* buffer will be filled to capacity.
@@ -658,7 +658,7 @@ public:
/**
* Retrieves the reordering codes for this collator.
* @param dest The array to fill with the script ordering.
- * @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
+ * @param destCapacity The length of dest. If it is 0, then dest may be nullptr and the function
* will only return the length of the result without writing any codes (pre-flighting).
* @param status A reference to an error code value, which must not indicate
* a failure before the function call.
@@ -674,7 +674,7 @@ public:
/**
* Sets the ordering of scripts for this collator.
- * @param reorderCodes An array of script codes in the new order. This can be NULL if the
+ * @param reorderCodes An array of script codes in the new order. This can be nullptr if the
* length is also set to 0. An empty array will clear any reordering codes on the collator.
* @param reorderCodesLength The length of reorderCodes.
* @param status error code
@@ -708,7 +708,7 @@ public:
* This is internal, and intended to be used with delegate converters.
*
* @param locale a locale that will appear as a collators locale in the resulting
- * short string definition. If NULL, the locale will be harvested
+ * short string definition. If nullptr, the locale will be harvested
* from the collator.
* @param buffer space to hold the resulting string
* @param capacity capacity of the buffer
@@ -754,8 +754,8 @@ public:
* characters and strings that map to multiple collation elements (expansions).
* If addPrefixes is true, then contractions that are expressed as
* prefix/pre-context rules are included.
- * @param contractions if not NULL, the set to hold the contractions
- * @param expansions if not NULL, the set to hold the expansions
+ * @param contractions if not nullptr, the set to hold the contractions
+ * @param expansions if not nullptr, the set to hold the expansions
* @param addPrefixes include prefix contextual mappings
* @param errorCode in/out ICU error code
* @internal
diff --git a/contrib/libs/icu/include/unicode/timezone.h b/contrib/libs/icu/include/unicode/timezone.h
index 382ad97d5bf..a2c0552c189 100644
--- a/contrib/libs/icu/include/unicode/timezone.h
+++ b/contrib/libs/icu/include/unicode/timezone.h
@@ -171,7 +171,7 @@ public:
* or a custom ID such as "GMT-8:00".
* @return the specified <code>TimeZone</code>, or a mutable clone of getUnknown()
* if the given ID cannot be understood or if the given ID is "Etc/Unknown".
- * The return result is guaranteed to be non-NULL.
+ * The return result is guaranteed to be non-nullptr.
* If you require that the specific zone asked for be returned,
* compare the result with getUnknown() or check the ID of the return result.
* @stable ICU 2.0
@@ -183,11 +183,11 @@ public:
* filter conditions.
* @param zoneType The system time zone type.
* @param region The ISO 3166 two-letter country code or UN M.49
- * three-digit area code. When NULL, no filtering
+ * three-digit area code. When nullptr, no filtering
* done by region.
* @param rawOffset An offset from GMT in milliseconds, ignoring
* the effect of daylight savings time, if any.
- * When NULL, no filtering done by zone offset.
+ * When nullptr, no filtering done by zone offset.
* @param ec Output param to filled in with a success or
* an error.
* @return an enumeration object, owned by the caller.
@@ -267,7 +267,7 @@ public:
* given region. Some zones are affiliated with no region
* (e.g., "UTC"); these may also be retrieved, as a group.
*
- * @param region The ISO 3166 two-letter country code, or NULL to
+ * @param region The ISO 3166 two-letter country code, or nullptr to
* retrieve zones not affiliated with any region.
* @return an enumeration object, owned by the caller
* @deprecated ICU 70 Use createEnumerationForRegion(const char*,UErrorCode&) instead.
@@ -280,7 +280,7 @@ public:
* given region. Some zones are affiliated with no region
* (e.g., "UTC"); these may also be retrieved, as a group.
*
- * @param region The ISO 3166 two-letter country code, or NULL to
+ * @param region The ISO 3166 two-letter country code, or nullptr to
* retrieve zones not affiliated with any region.
* @param status Receives the status.
* @return an enumeration object, owned by the caller
@@ -381,7 +381,7 @@ public:
/**
* Sets the default time zone (i.e., what's returned by createDefault()) to be the
- * specified time zone. If NULL is specified for the time zone, the default time
+ * specified time zone. If nullptr is specified for the time zone, the default time
* zone is set to the default host time zone. This call adopts the TimeZone object
* passed in; the client is no longer responsible for deleting it.
*
@@ -486,7 +486,7 @@ public:
* Updating the Time Zone Data</a>.
*
* @param winid A Windows time zone ID.
- * @param region A null-terminated region code, or <code>NULL</code> if no regional preference.
+ * @param region A NUL-terminated region code, or <code>nullptr</code> if no regional preference.
* @param id Receives a system time zone ID. When the input Windows time zone ID is unknown
* or unmappable to a system time zone ID, then an empty string is set on return.
* @param status Receives the status.
@@ -912,7 +912,7 @@ protected:
* Utility function. For internally loading rule data.
* @param top Top resource bundle for tz data
* @param ruleid ID of rule to load
- * @param oldbundle Old bundle to reuse or NULL
+ * @param oldbundle Old bundle to reuse or nullptr
* @param status Status parameter
* @return either a new bundle or *oldbundle
* @internal
@@ -932,7 +932,7 @@ private:
* for ICU internal implementation and useful for building hashtable using a time zone
* ID as a key.
* @param id zone id string
- * @return the pointer of the ID resource, or NULL.
+ * @return the pointer of the ID resource, or nullptr.
*/
static const char16_t* findID(const UnicodeString& id);
@@ -940,15 +940,15 @@ private:
* Resolve a link in Olson tzdata. When the given id is known and it's not a link,
* the id itself is returned. When the given id is known and it is a link, then
* dereferenced zone id is returned. When the given id is unknown, then it returns
- * NULL.
+ * nullptr.
* @param id zone id string
- * @return the dereferenced zone or NULL
+ * @return the dereferenced zone or nullptr
*/
static const char16_t* dereferOlsonLink(const UnicodeString& id);
/**
* Returns the region code associated with the given zone,
- * or NULL if the zone is not known.
+ * or nullptr if the zone is not known.
* @param id zone id string
* @return the region associated with the given zone
*/
@@ -958,7 +958,7 @@ private:
#ifndef U_HIDE_INTERNAL_API
/**
* Returns the region code associated with the given zone,
- * or NULL if the zone is not known.
+ * or nullptr if the zone is not known.
* @param id zone id string
* @param status Status parameter
* @return the region associated with the given zone
diff --git a/contrib/libs/icu/include/unicode/translit.h b/contrib/libs/icu/include/unicode/translit.h
index 56eb6448ca4..9ae32967fc4 100644
--- a/contrib/libs/icu/include/unicode/translit.h
+++ b/contrib/libs/icu/include/unicode/translit.h
@@ -590,7 +590,7 @@ protected:
* variant.
* @param id a basic ID of the form S-T or S-T/V.
* @param canon canonical ID to assign to the object, or
- * NULL to leave the ID unchanged
+ * nullptr to leave the ID unchanged
* @return a newly created Transliterator or null if the ID is
* invalid.
* @stable ICU 2.4
@@ -1002,20 +1002,20 @@ public:
UnicodeString& result);
/**
- * Returns the filter used by this transliterator, or <tt>NULL</tt>
+ * Returns the filter used by this transliterator, or <tt>nullptr</tt>
* if this transliterator uses no filter.
- * @return the filter used by this transliterator, or <tt>NULL</tt>
+ * @return the filter used by this transliterator, or <tt>nullptr</tt>
* if this transliterator uses no filter.
* @stable ICU 2.0
*/
const UnicodeFilter* getFilter(void) const;
/**
- * Returns the filter used by this transliterator, or <tt>NULL</tt> if this
+ * Returns the filter used by this transliterator, or <tt>nullptr</tt> if this
* transliterator uses no filter. The caller must eventually delete the
* result. After this call, this transliterator's filter is set to
- * <tt>NULL</tt>.
- * @return the filter used by this transliterator, or <tt>NULL</tt> if this
+ * <tt>nullptr</tt>.
+ * @return the filter used by this transliterator, or <tt>nullptr</tt> if this
* transliterator uses no filter.
* @stable ICU 2.4
*/
diff --git a/contrib/libs/icu/include/unicode/tzfmt.h b/contrib/libs/icu/include/unicode/tzfmt.h
index 6db8477026a..4bd80e0e343 100644
--- a/contrib/libs/icu/include/unicode/tzfmt.h
+++ b/contrib/libs/icu/include/unicode/tzfmt.h
@@ -530,14 +530,14 @@ public:
* @param date The date.
* @param name Receives the display name.
* @param timeType the output argument for receiving the time type (standard/daylight/unknown)
- * used for the display name, or NULL if the information is not necessary.
+ * used for the display name, or nullptr if the information is not necessary.
* @return A reference to the result
* @see #UTimeZoneFormatStyle
* @see #UTimeZoneFormatTimeType
* @stable ICU 50
*/
virtual UnicodeString& format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate date,
- UnicodeString& name, UTimeZoneFormatTimeType* timeType = NULL) const;
+ UnicodeString& name, UTimeZoneFormatTimeType* timeType = nullptr) const;
/**
* Returns offset from GMT(UTC) in milliseconds for the given ISO 8601
@@ -592,7 +592,7 @@ public:
* @param pos The position.
* @param parseOptions The parse options represented by bitwise flags of UTimeZoneFormatParseOption.
* @param timeType The output argument for receiving the time type (standard/daylight/unknown),
- * or NULL if the information is not necessary.
+ * or nullptr if the information is not necessary.
* @return A <code>TimeZone</code>, or null if the input could not be parsed.
* @see UTimeZoneFormatStyle
* @see UTimeZoneFormatParseOption
@@ -600,7 +600,7 @@ public:
* @stable ICU 50
*/
virtual TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
- int32_t parseOptions, UTimeZoneFormatTimeType* timeType = NULL) const;
+ int32_t parseOptions, UTimeZoneFormatTimeType* timeType = nullptr) const;
/**
* Returns a <code>TimeZone</code> by parsing the time zone string according to
@@ -610,7 +610,7 @@ public:
* @param style The format style
* @param pos The position.
* @param timeType The output argument for receiving the time type (standard/daylight/unknown),
- * or NULL if the information is not necessary.
+ * or nullptr if the information is not necessary.
* @return A <code>TimeZone</code>, or null if the input could not be parsed.
* @see UTimeZoneFormatStyle
* @see UTimeZoneFormatParseOption
@@ -618,7 +618,7 @@ public:
* @stable ICU 50
*/
TimeZone* parse(UTimeZoneFormatStyle style, const UnicodeString& text, ParsePosition& pos,
- UTimeZoneFormatTimeType* timeType = NULL) const;
+ UTimeZoneFormatTimeType* timeType = nullptr) const;
/* ----------------------------------------------
* Format APIs
@@ -646,7 +646,7 @@ public:
* @param parse_pos The position to start parsing at. Upon return this param is set to the position after the
* last character successfully parsed. If the source is not parsed successfully, this param
* will remain unchanged.
- * @return A newly created Formattable* object, or NULL on failure. The caller owns this and should
+ * @return A newly created Formattable* object, or nullptr on failure. The caller owns this and should
* delete it when done.
* @stable ICU 50
*/
@@ -783,7 +783,7 @@ private:
* @param required the required set of fields, such as FIELDS_HM
* @param status U_ILLEGAL_ARGUMENT is set when the specified pattern does not contain
* pattern letters for the required fields.
- * @return A list of GMTOffsetField objects, or NULL on error.
+ * @return A list of GMTOffsetField objects, or nullptr on error.
*/
static UVector* parseOffsetPattern(const UnicodeString& pattern, OffsetFields required, UErrorCode& status);
@@ -856,7 +856,7 @@ private:
* time zone string.
*/
int32_t parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly,
- UBool* hasDigitOffset = NULL) const;
+ UBool* hasDigitOffset = nullptr) const;
/**
* Appends localized digits to the buffer.
diff --git a/contrib/libs/icu/include/unicode/tznames.h b/contrib/libs/icu/include/unicode/tznames.h
index b32e9562d5e..2b494734b73 100644
--- a/contrib/libs/icu/include/unicode/tznames.h
+++ b/contrib/libs/icu/include/unicode/tznames.h
@@ -402,7 +402,7 @@ public:
* @param types The set of name types represented by bitwise flags of UTimeZoneNameType enums,
* or UTZNM_UNKNOWN for all name types.
* @param status Receives the status.
- * @return A collection of matches (owned by the caller), or NULL if no matches are found.
+ * @return A collection of matches (owned by the caller), or nullptr if no matches are found.
* @see UTimeZoneNameType
* @see MatchInfoCollection
* @internal
diff --git a/contrib/libs/icu/include/unicode/tzrule.h b/contrib/libs/icu/include/unicode/tzrule.h
index ab0b97b6fd2..9ec1e96179c 100644
--- a/contrib/libs/icu/include/unicode/tzrule.h
+++ b/contrib/libs/icu/include/unicode/tzrule.h
@@ -259,20 +259,6 @@ public:
virtual bool operator!=(const TimeZoneRule& that) const override;
/**
- * Gets the time when this rule takes effect in the given year.
- * @param year The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
- * @param prevRawOffset The standard time offset from UTC before this rule
- * takes effect in milliseconds.
- * @param prevDSTSavings The amount of daylight saving offset from the
- * standard time.
- * @param result Receives the start time in the year.
- * @return true if this rule takes effect in the year and the result is set to
- * "result".
- * @stable ICU 3.8
- */
- UBool getStartInYear(int32_t year, int32_t prevRawOffset, int32_t prevDSTSavings, UDate& result) const;
-
- /**
* Returns if this rule represents the same rule and offsets as another.
* When two <code>TimeZoneRule</code> objects differ only its names, this method
* returns true.
diff --git a/contrib/libs/icu/include/unicode/ubiditransform.h b/contrib/libs/icu/include/unicode/ubiditransform.h
index 2dd7564010d..24433aa8aca 100644
--- a/contrib/libs/icu/include/unicode/ubiditransform.h
+++ b/contrib/libs/icu/include/unicode/ubiditransform.h
@@ -28,7 +28,7 @@
/**
* \file
- * \brief Bidi Transformations
+ * \brief C API: Bidi Transformations
*/
/**
diff --git a/contrib/libs/icu/include/unicode/ubrk.h b/contrib/libs/icu/include/unicode/ubrk.h
index c603f7c13f3..2b3dc7aa576 100644
--- a/contrib/libs/icu/include/unicode/ubrk.h
+++ b/contrib/libs/icu/include/unicode/ubrk.h
@@ -312,11 +312,12 @@ ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength,
* If *pBufferSize is not enough for a stack-based safe clone,
* new memory will be allocated.
* @param status to indicate whether the operation went on smoothly or there were errors
- * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary.
+ * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used
+ * if pBufferSize != NULL and any allocations were necessary
* @return pointer to the new clone
* @deprecated ICU 69 Use ubrk_clone() instead.
*/
-U_CAPI UBreakIterator * U_EXPORT2
+U_DEPRECATED UBreakIterator * U_EXPORT2
ubrk_safeClone(
const UBreakIterator *bi,
void *stackBuffer,
@@ -325,21 +326,17 @@ ubrk_safeClone(
#endif /* U_HIDE_DEPRECATED_API */
-#ifndef U_HIDE_DRAFT_API
-
/**
* Thread safe cloning operation.
* @param bi iterator to be cloned
* @param status to indicate whether the operation went on smoothly or there were errors
* @return pointer to the new clone
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI UBreakIterator * U_EXPORT2
ubrk_clone(const UBreakIterator *bi,
UErrorCode *status);
-#endif // U_HIDE_DRAFT_API
-
#ifndef U_HIDE_DEPRECATED_API
/**
diff --git a/contrib/libs/icu/include/unicode/ucal.h b/contrib/libs/icu/include/unicode/ucal.h
index 94abae83919..f428dfcc616 100644
--- a/contrib/libs/icu/include/unicode/ucal.h
+++ b/contrib/libs/icu/include/unicode/ucal.h
@@ -442,6 +442,33 @@ 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
+ * year and range from 0 to 11 or 0 to 12 depending on how many months in a
+ * year, the calendar system has leap month or not, and in leap year or not.
+ * It is the ordinal position of that month in the corresponding year of
+ * the calendar. For Chinese, Dangi, and Hebrew calendar, the range is
+ * 0 to 11 in non-leap years and 0 to 12 in leap years. For Coptic and Ethiopian
+ * calendar, the range is always 0 to 12. For other calendars supported by
+ * ICU now, the range is 0 to 11. When the number of months in a year of the
+ * identified calendar is variable, a different UCAL_ORDINAL_MONTH value can
+ * be used for dates that are part of the same named month in different years.
+ * For example, in the Hebrew calendar, "1 Nisan 5781" is associated with
+ * UCAL_ORDINAL_MONTH value 6 while "1 Nisan 5782" is associated with
+ * UCAL_ORDINAL_MONTH value 7 because 5782 is a leap year and Nisan follows
+ * the insertion of Adar I. In Chinese calendar, "Year 4664 Month 6 Day 2"
+ * is associated with UCAL_ORDINAL_MONTH value 5 while "Year 4665 Month 6 Day 2"
+ * is associated with UCAL_ORDINAL_MONTH value 6 because 4665 is a leap year
+ * 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
+ */
+ 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 */
#ifndef U_FORCE_HIDE_DEPRECATED_API
@@ -449,7 +476,13 @@ enum UCalendarDateFields {
* One more than the highest normal UCalendarDateFields value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UCAL_FIELD_COUNT,
+#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
/**
@@ -1617,25 +1650,23 @@ U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
UChar* id, int32_t idCapacity, UErrorCode* status);
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Options used by ucal_getTimeZoneOffsetFromLocal and BasicTimeZone::getOffsetFromLocal()
* to specify how to interpret an input time when it does not exist, or when it is ambiguous,
* around a time zone transition.
- * @draft ICU 69
+ * @stable ICU 69
*/
enum UTimeZoneLocalOption {
-#ifndef U_HIDE_DRAFT_API
/**
* An input time is always interpreted as local time before
* a time zone transition.
- * @draft ICU 69
+ * @stable ICU 69
*/
UCAL_TZ_LOCAL_FORMER = 0x04,
/**
* An input time is always interpreted as local time after
* a time zone transition.
- * @draft ICU 69
+ * @stable ICU 69
*/
UCAL_TZ_LOCAL_LATTER = 0x0C,
/**
@@ -1644,7 +1675,7 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time before the
* transition is used.
- * @draft ICU 69
+ * @stable ICU 69
*/
UCAL_TZ_LOCAL_STANDARD_FORMER = UCAL_TZ_LOCAL_FORMER | 0x01,
/**
@@ -1653,7 +1684,7 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time after the
* transition is used.
- * @draft ICU 69
+ * @stable ICU 69
*/
UCAL_TZ_LOCAL_STANDARD_LATTER = UCAL_TZ_LOCAL_LATTER | 0x01,
/**
@@ -1662,7 +1693,7 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time before the
* transition is used.
- * @draft ICU 69
+ * @stable ICU 69
*/
UCAL_TZ_LOCAL_DAYLIGHT_FORMER = UCAL_TZ_LOCAL_FORMER | 0x03,
/**
@@ -1671,19 +1702,11 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time after the
* transition is used.
- * @draft ICU 69
+ * @stable ICU 69
*/
UCAL_TZ_LOCAL_DAYLIGHT_LATTER = UCAL_TZ_LOCAL_LATTER | 0x03,
-#else /* U_HIDE_DRAFT_API */
- /**
- * Dummy value to prevent empty enum if U_HIDE_DRAFT_API.
- * This will go away when draft conditionals are removed.
- * @internal
- */
- UCAL_TZ_LOCAL_NONE = 0,
-#endif /* U_HIDE_DRAFT_API */
};
-typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @draft ICU 69 */
+typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @stable ICU 69 */
/**
* Returns the time zone raw and GMT offset for the given moment
@@ -1710,7 +1733,7 @@ typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @draft ICU 69 */
* typically one hour.
* If the status is set to one of the error code, the value set is unspecified.
* @param status A pointer to a UErrorCode to receive any errors.
-* @draft ICU 69
+* @stable ICU 69
*/
U_CAPI void U_EXPORT2
ucal_getTimeZoneOffsetFromLocal(
@@ -1718,7 +1741,6 @@ ucal_getTimeZoneOffsetFromLocal(
UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t* rawOffset, int32_t* dstOffset, UErrorCode* status);
-#endif /* U_FORCE_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/contrib/libs/icu/include/unicode/uchar.h b/contrib/libs/icu/include/unicode/uchar.h
index 253e6db173f..4f82a9fb583 100644
--- a/contrib/libs/icu/include/unicode/uchar.h
+++ b/contrib/libs/icu/include/unicode/uchar.h
@@ -60,7 +60,7 @@ U_CDECL_BEGIN
* @see u_getUnicodeVersion
* @stable ICU 2.0
*/
-#define U_UNICODE_VERSION "14.0"
+#define U_UNICODE_VERSION "15.0"
/**
* \file
@@ -483,57 +483,55 @@ typedef enum UProperty {
* @stable ICU 62
*/
UCHAR_EXTENDED_PICTOGRAPHIC=64,
-#ifndef U_HIDE_DRAFT_API
/**
* Binary property of strings Basic_Emoji.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_BASIC_EMOJI=65,
/**
* Binary property of strings Emoji_Keycap_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_EMOJI_KEYCAP_SEQUENCE=66,
/**
* Binary property of strings RGI_Emoji_Modifier_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE=67,
/**
* Binary property of strings RGI_Emoji_Flag_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_RGI_EMOJI_FLAG_SEQUENCE=68,
/**
* Binary property of strings RGI_Emoji_Tag_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_RGI_EMOJI_TAG_SEQUENCE=69,
/**
* Binary property of strings RGI_Emoji_ZWJ_Sequence.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_RGI_EMOJI_ZWJ_SEQUENCE=70,
/**
* Binary property of strings RGI_Emoji.
* See https://www.unicode.org/reports/tr51/#Emoji_Sets
*
- * @draft ICU 70
+ * @stable ICU 70
*/
UCHAR_RGI_EMOJI=71,
-#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the last constant for binary Unicode properties.
@@ -1885,6 +1883,23 @@ enum UBlockCode {
/** @stable ICU 70 */
UBLOCK_ZNAMENNY_MUSICAL_NOTATION = 320, /*[1CF00]*/
+ // New blocks in Unicode 15.0
+
+ /** @stable ICU 72 */
+ UBLOCK_ARABIC_EXTENDED_C = 321, /*[10EC0]*/
+ /** @stable ICU 72 */
+ UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H = 322, /*[31350]*/
+ /** @stable ICU 72 */
+ UBLOCK_CYRILLIC_EXTENDED_D = 323, /*[1E030]*/
+ /** @stable ICU 72 */
+ UBLOCK_DEVANAGARI_EXTENDED_A = 324, /*[11B00]*/
+ /** @stable ICU 72 */
+ UBLOCK_KAKTOVIK_NUMERALS = 325, /*[1D2C0]*/
+ /** @stable ICU 72 */
+ UBLOCK_KAWI = 326, /*[11F00]*/
+ /** @stable ICU 72 */
+ UBLOCK_NAG_MUNDARI = 327, /*[1E4D0]*/
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UBlockCode value.
@@ -1892,7 +1907,7 @@ enum UBlockCode {
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UBLOCK_COUNT = 321,
+ UBLOCK_COUNT = 328,
#endif // U_HIDE_DEPRECATED_API
/** @stable ICU 2.0 */
@@ -2680,8 +2695,6 @@ typedef enum UVerticalOrientation {
U_CAPI UBool U_EXPORT2
u_hasBinaryProperty(UChar32 c, UProperty which);
-#ifndef U_HIDE_DRAFT_API
-
/**
* Returns true if the property is true for the string.
* Same as u_hasBinaryProperty(single code point, which)
@@ -2704,13 +2717,11 @@ u_hasBinaryProperty(UChar32 c, UProperty which);
* @see u_getBinaryPropertySet
* @see u_getIntPropertyValue
* @see u_getUnicodeVersion
- * @draft ICU 70
+ * @stable ICU 70
*/
U_CAPI UBool U_EXPORT2
u_stringHasBinaryProperty(const UChar *s, int32_t length, UProperty which);
-#endif // U_HIDE_DRAFT_API
-
/**
* Returns a frozen USet for a binary property.
* The library retains ownership over the returned object.
@@ -3825,13 +3836,10 @@ u_getPropertyValueEnum(UProperty property,
const char* alias);
/**
- * Determines if the specified character is permissible as the
- * first character in an identifier according to Unicode
- * (The Unicode Standard, Version 3.0, chapter 5.16 Identifiers).
- * True for characters with general categories "L" (letters) and "Nl" (letter numbers).
+ * Determines if the specified character is permissible as the first character in an identifier
+ * according to UAX #31 Unicode Identifier and Pattern Syntax.
*
- * Same as java.lang.Character.isUnicodeIdentifierStart().
- * Same as UCHAR_ID_START
+ * Same as Unicode ID_Start (UCHAR_ID_START).
*
* @param c the code point to be tested
* @return true if the code point may start an identifier
@@ -3845,20 +3853,13 @@ U_CAPI UBool U_EXPORT2
u_isIDStart(UChar32 c);
/**
- * Determines if the specified character is permissible
- * in an identifier according to Java.
- * True for characters with general categories "L" (letters),
- * "Nl" (letter numbers), "Nd" (decimal digits),
- * "Mc" and "Mn" (combining marks), "Pc" (connecting punctuation), and
- * u_isIDIgnorable(c).
+ * Determines if the specified character is permissible as a non-initial character of an identifier
+ * according to UAX #31 Unicode Identifier and Pattern Syntax.
*
- * Same as java.lang.Character.isUnicodeIdentifierPart().
- * Almost the same as Unicode's ID_Continue (UCHAR_ID_CONTINUE)
- * except that Unicode recommends to ignore Cf which is less than
- * u_isIDIgnorable(c).
+ * Same as Unicode ID_Continue (UCHAR_ID_CONTINUE).
*
* @param c the code point to be tested
- * @return true if the code point may occur in an identifier according to Java
+ * @return true if the code point may occur as a non-initial character of an identifier
*
* @see UCHAR_ID_CONTINUE
* @see u_isIDStart
diff --git a/contrib/libs/icu/include/unicode/ucharstrie.h b/contrib/libs/icu/include/unicode/ucharstrie.h
index b6f9e3e075c..fa1b55616c6 100644
--- a/contrib/libs/icu/include/unicode/ucharstrie.h
+++ b/contrib/libs/icu/include/unicode/ucharstrie.h
@@ -67,7 +67,7 @@ public:
* @stable ICU 4.8
*/
UCharsTrie(ConstChar16Ptr trieUChars)
- : ownedArray_(NULL), uchars_(trieUChars),
+ : ownedArray_(nullptr), uchars_(trieUChars),
pos_(uchars_), remainingMatchLength_(-1) {}
/**
@@ -83,7 +83,7 @@ public:
* @stable ICU 4.8
*/
UCharsTrie(const UCharsTrie &other)
- : ownedArray_(NULL), uchars_(other.uchars_),
+ : ownedArray_(nullptr), uchars_(other.uchars_),
pos_(other.pos_), remainingMatchLength_(other.remainingMatchLength_) {}
/**
@@ -141,7 +141,7 @@ public:
* Constructs an empty State.
* @stable ICU 4.8
*/
- State() { uchars=NULL; }
+ State() { uchars=nullptr; }
private:
friend class UCharsTrie;
@@ -175,7 +175,7 @@ public:
* @stable ICU 4.8
*/
UCharsTrie &resetToState(const State &state) {
- if(uchars_==state.uchars && uchars_!=NULL) {
+ if(uchars_==state.uchars && uchars_!=nullptr) {
pos_=state.pos;
remainingMatchLength_=state.remainingMatchLength;
}
@@ -239,7 +239,7 @@ public:
* result=next(c);
* return result;
* \endcode
- * @param s A string. Can be NULL if length is 0.
+ * @param s A string. Can be nullptr if length is 0.
* @param length The length of the string. Can be -1 if NUL-terminated.
* @return The match/value Result.
* @stable ICU 4.8
@@ -275,7 +275,7 @@ public:
inline UBool hasUniqueValue(int32_t &uniqueValue) const {
const char16_t *pos=pos_;
// Skip the rest of a pending linear-match node.
- return pos!=NULL && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue);
+ return pos!=nullptr && findUniqueValue(pos+remainingMatchLength_+1, false, uniqueValue);
}
/**
@@ -367,7 +367,7 @@ public:
private:
UBool truncateAndStop() {
- pos_=NULL;
+ pos_=nullptr;
value_=-1; // no real value for str
return true;
}
@@ -409,10 +409,10 @@ private:
pos_(uchars_), remainingMatchLength_(-1) {}
// No assignment operator.
- UCharsTrie &operator=(const UCharsTrie &other);
+ UCharsTrie &operator=(const UCharsTrie &other) = delete;
inline void stop() {
- pos_=NULL;
+ pos_=nullptr;
}
// Reads a compact 32-bit integer.
@@ -610,7 +610,7 @@ private:
// Iterator variables.
- // Pointer to next trie unit to read. NULL if no more matches.
+ // Pointer to next trie unit to read. nullptr if no more matches.
const char16_t *pos_;
// Remaining length of a linear-match node, minus 1. Negative if not in such a node.
int32_t remainingMatchLength_;
diff --git a/contrib/libs/icu/include/unicode/ucharstriebuilder.h b/contrib/libs/icu/include/unicode/ucharstriebuilder.h
index e0cb0acdc53..5c8aa33ffb3 100644
--- a/contrib/libs/icu/include/unicode/ucharstriebuilder.h
+++ b/contrib/libs/icu/include/unicode/ucharstriebuilder.h
@@ -133,8 +133,8 @@ public:
}
private:
- UCharsTrieBuilder(const UCharsTrieBuilder &other); // no copy constructor
- UCharsTrieBuilder &operator=(const UCharsTrieBuilder &other); // no assignment operator
+ UCharsTrieBuilder(const UCharsTrieBuilder &other) = delete; // no copy constructor
+ UCharsTrieBuilder &operator=(const UCharsTrieBuilder &other) = delete; // no assignment operator
void buildUChars(UStringTrieBuildOption buildOption, UErrorCode &errorCode);
diff --git a/contrib/libs/icu/include/unicode/uclean.h b/contrib/libs/icu/include/unicode/uclean.h
index c2d920a16ef..f5b0aa088a9 100644
--- a/contrib/libs/icu/include/unicode/uclean.h
+++ b/contrib/libs/icu/include/unicode/uclean.h
@@ -114,7 +114,8 @@ typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size);
/**
* Pointer type for a user supplied memory re-allocation function.
* @param context user supplied value, obtained from u_setMemoryFunctions().
- * @param size The number of bytes to be allocated
+ * @param mem Pointer to the memory block to be resized.
+ * @param size The new size for the block.
* @return Pointer to the newly allocated memory, or NULL if the allocation failed.
* @stable ICU 2.8
* @system
@@ -124,8 +125,7 @@ typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t si
* Pointer type for a user supplied memory free function. Behavior should be
* similar the standard C library free().
* @param context user supplied value, obtained from u_setMemoryFunctions().
- * @param mem Pointer to the memory block to be resized
- * @param size The new size for the block
+ * @param mem Pointer to the memory block to be freed.
* @return Pointer to the resized memory block, or NULL if the resizing failed.
* @stable ICU 2.8
* @system
diff --git a/contrib/libs/icu/include/unicode/ucnv.h b/contrib/libs/icu/include/unicode/ucnv.h
index 2687c984d43..20c173b6628 100644
--- a/contrib/libs/icu/include/unicode/ucnv.h
+++ b/contrib/libs/icu/include/unicode/ucnv.h
@@ -477,7 +477,7 @@ ucnv_openCCSID(int32_t codepage,
*
* <p>The name will NOT be looked up in the alias mechanism, nor will the converter be
* stored in the converter cache or the alias table. The only way to open further converters
- * is call this function multiple times, or use the ucnv_safeClone() function to clone a
+ * is call this function multiple times, or use the ucnv_clone() function to clone a
* 'primary' converter.</p>
*
* <p>A future version of ICU may add alias table lookups and/or caching
@@ -493,7 +493,7 @@ ucnv_openCCSID(int32_t codepage,
* @return the created Unicode converter object, or <TT>NULL</TT> if an error occurred
* @see udata_open
* @see ucnv_open
- * @see ucnv_safeClone
+ * @see ucnv_clone
* @see ucnv_close
* @stable ICU 2.2
*/
@@ -502,6 +502,20 @@ ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode
/**
* Thread safe converter cloning operation.
+ *
+ * You must ucnv_close() the clone.
+ *
+ * @param cnv converter to be cloned
+ * @param status to indicate whether the operation went on smoothly or there were errors
+ * @return pointer to the new clone
+ * @stable ICU 71
+ */
+U_CAPI UConverter* U_EXPORT2 ucnv_clone(const UConverter *cnv, UErrorCode *status);
+
+#ifndef U_HIDE_DEPRECATED_API
+
+/**
+ * Thread safe converter cloning operation.
* For most efficient operation, pass in a stackBuffer (and a *pBufferSize)
* with at least U_CNV_SAFECLONE_BUFFERSIZE bytes of space.
* If the buffer size is sufficient, then the clone will use the stack buffer;
@@ -532,21 +546,19 @@ ucnv_openPackage(const char *packageName, const char *converterName, UErrorCode
* pointer to size of allocated space.
* @param status to indicate whether the operation went on smoothly or there were errors
* An informational status value, U_SAFECLONE_ALLOCATED_WARNING,
- * is used if any allocations were necessary.
+ * is used if pBufferSize != NULL and any allocations were necessary
* However, it is better to check if *pBufferSize grew for checking for
* allocations because warning codes can be overridden by subsequent
* function calls.
* @return pointer to the new clone
- * @stable ICU 2.0
+ * @deprecated ICU 71 Use ucnv_clone() instead.
*/
-U_CAPI UConverter * U_EXPORT2
+U_DEPRECATED UConverter * U_EXPORT2
ucnv_safeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
-#ifndef U_HIDE_DEPRECATED_API
-
/**
* \def U_CNV_SAFECLONE_BUFFERSIZE
* Definition of a buffer size that is designed to be large enough for
diff --git a/contrib/libs/icu/include/unicode/ucnv_cb.h b/contrib/libs/icu/include/unicode/ucnv_cb.h
index 41845d1bcae..b4ef99208b1 100644
--- a/contrib/libs/icu/include/unicode/ucnv_cb.h
+++ b/contrib/libs/icu/include/unicode/ucnv_cb.h
@@ -15,8 +15,8 @@
*/
/**
- * \file
- * \brief C UConverter functions to aid the writers of callbacks
+ * \file
+ * \brief C API: UConverter functions to aid the writers of callbacks
*
* <h2> Callback API for UConverter </h2>
*
diff --git a/contrib/libs/icu/include/unicode/ucnv_err.h b/contrib/libs/icu/include/unicode/ucnv_err.h
index a13d01db099..c743e5614f4 100644
--- a/contrib/libs/icu/include/unicode/ucnv_err.h
+++ b/contrib/libs/icu/include/unicode/ucnv_err.h
@@ -12,7 +12,7 @@
/**
* \file
- * \brief C UConverter predefined error callbacks
+ * \brief C API: UConverter predefined error callbacks
*
* <h2>Error Behaviour Functions</h2>
* Defines some error behaviour functions called by ucnv_{from,to}Unicode
diff --git a/contrib/libs/icu/include/unicode/ucnvsel.h b/contrib/libs/icu/include/unicode/ucnvsel.h
index 3d7d3327f7d..9373ec951bf 100644
--- a/contrib/libs/icu/include/unicode/ucnvsel.h
+++ b/contrib/libs/icu/include/unicode/ucnvsel.h
@@ -36,6 +36,7 @@
/**
* \file
+ * \brief C API: Encoding/charset encoding selector
*
* A converter selector is built with a set of encoding/charset names
* and given an input string returns the set of names of the
diff --git a/contrib/libs/icu/include/unicode/ucol.h b/contrib/libs/icu/include/unicode/ucol.h
index 6d22eb6069e..24963312216 100644
--- a/contrib/libs/icu/include/unicode/ucol.h
+++ b/contrib/libs/icu/include/unicode/ucol.h
@@ -397,7 +397,7 @@ typedef enum {
* @param status A pointer to a UErrorCode to receive any errors
* @return A pointer to a UCollator, or 0 if an error occurred.
* @see ucol_openRules
- * @see ucol_safeClone
+ * @see ucol_clone
* @see ucol_close
* @stable ICU 2.0
*/
@@ -425,7 +425,7 @@ ucol_open(const char *loc, UErrorCode *status);
* @return A pointer to a UCollator. It is not guaranteed that NULL be returned in case
* of error - please use status argument to check for errors.
* @see ucol_open
- * @see ucol_safeClone
+ * @see ucol_clone
* @see ucol_close
* @stable ICU 2.0
*/
@@ -521,7 +521,7 @@ ucol_getContractionsAndExpansions( const UCollator *coll,
* @param coll The UCollator to close.
* @see ucol_open
* @see ucol_openRules
- * @see ucol_safeClone
+ * @see ucol_clone
* @stable ICU 2.0
*/
U_CAPI void U_EXPORT2
@@ -985,7 +985,6 @@ ucol_getShortDefinitionString(const UCollator *coll,
*
* @deprecated ICU 54
*/
-
U_DEPRECATED int32_t U_EXPORT2
ucol_normalizeShortDefinitionString(const char *source,
char *destination,
@@ -1313,6 +1312,20 @@ ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *stat
/**
* Thread safe cloning operation. The result is a clone of a given collator.
* @param coll collator to be cloned
+ * @param status to indicate whether the operation went on smoothly or there were errors
+ * @return pointer to the new clone
+ * @see ucol_open
+ * @see ucol_openRules
+ * @see ucol_close
+ * @stable ICU 71
+ */
+U_CAPI UCollator* U_EXPORT2 ucol_clone(const UCollator *coll, UErrorCode *status);
+
+#ifndef U_HIDE_DEPRECATED_API
+
+/**
+ * Thread safe cloning operation. The result is a clone of a given collator.
+ * @param coll collator to be cloned
* @param stackBuffer <em>Deprecated functionality as of ICU 52, use NULL.</em><br>
* user allocated space for the new clone.
* If NULL new memory will be allocated.
@@ -1325,21 +1338,20 @@ ucol_restoreVariableTop(UCollator *coll, const uint32_t varTop, UErrorCode *stat
* If *pBufferSize is not enough for a stack-based safe clone,
* new memory will be allocated.
* @param status to indicate whether the operation went on smoothly or there were errors
- * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any
- * allocations were necessary.
+ * An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used
+ * if pBufferSize != NULL and any allocations were necessary
* @return pointer to the new clone
* @see ucol_open
* @see ucol_openRules
* @see ucol_close
- * @stable ICU 2.0
+ * @deprecated ICU 71 Use ucol_clone() instead.
*/
-U_CAPI UCollator* U_EXPORT2
+U_DEPRECATED UCollator* U_EXPORT2
ucol_safeClone(const UCollator *coll,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
-#ifndef U_HIDE_DEPRECATED_API
/** default memory size for the new clone.
* @deprecated ICU 52. Do not rely on ucol_safeClone() cloning into any provided buffer.
diff --git a/contrib/libs/icu/include/unicode/uconfig.h b/contrib/libs/icu/include/unicode/uconfig.h
index bbc232d1ed8..3818ca02ef8 100644
--- a/contrib/libs/icu/include/unicode/uconfig.h
+++ b/contrib/libs/icu/include/unicode/uconfig.h
@@ -323,6 +323,16 @@
# define UCONFIG_NO_NORMALIZATION 0
#endif
+/**
+ * \def UCONFIG_USE_ML_PHRASE_BREAKING
+ * This switch turns on BudouX ML phrase-based line breaking, rather than using the dictionary.
+ *
+ * @internal
+ */
+#ifndef UCONFIG_USE_ML_PHRASE_BREAKING
+# define UCONFIG_USE_ML_PHRASE_BREAKING 0
+#endif
+
#if UCONFIG_NO_NORMALIZATION
/* common library */
/* ICU 50 CJK dictionary BreakIterator uses normalization */
diff --git a/contrib/libs/icu/include/unicode/ucpmap.h b/contrib/libs/icu/include/unicode/ucpmap.h
index 31e1365cac8..a740bd160fc 100644
--- a/contrib/libs/icu/include/unicode/ucpmap.h
+++ b/contrib/libs/icu/include/unicode/ucpmap.h
@@ -13,8 +13,7 @@ U_CDECL_BEGIN
/**
* \file
- *
- * This file defines an abstract map from Unicode code points to integer values.
+ * \brief C API: This file defines an abstract map from Unicode code points to integer values.
*
* @see UCPMap
* @see UCPTrie
diff --git a/contrib/libs/icu/include/unicode/ucptrie.h b/contrib/libs/icu/include/unicode/ucptrie.h
index e2547ae2eea..dadef79c512 100644
--- a/contrib/libs/icu/include/unicode/ucptrie.h
+++ b/contrib/libs/icu/include/unicode/ucptrie.h
@@ -19,8 +19,7 @@ U_CDECL_BEGIN
/**
* \file
- *
- * This file defines an immutable Unicode code point trie.
+ * \brief C API: This file defines an immutable Unicode code point trie.
*
* @see UCPTrie
* @see UMutableCPTrie
diff --git a/contrib/libs/icu/include/unicode/udat.h b/contrib/libs/icu/include/unicode/udat.h
index 0e6e6b76daa..3823dc88c4f 100644
--- a/contrib/libs/icu/include/unicode/udat.h
+++ b/contrib/libs/icu/include/unicode/udat.h
@@ -1532,19 +1532,17 @@ typedef enum UDateFormatSymbolType {
*/
UDAT_ZODIAC_NAMES_NARROW,
-#ifndef U_HIDE_DRAFT_API
/**
* The narrow quarter names, for example 1
- * @draft ICU 70
+ * @stable ICU 70
*/
UDAT_NARROW_QUARTERS,
/**
* The narrow standalone quarter names, for example 1
- * @draft ICU 70
+ * @stable ICU 70
*/
UDAT_STANDALONE_NARROW_QUARTERS
-#endif // U_HIDE_DRAFT_API
} UDateFormatSymbolType;
struct UDateFormatSymbols;
diff --git a/contrib/libs/icu/include/unicode/udata.h b/contrib/libs/icu/include/unicode/udata.h
index c5b1adc359c..4cda255010a 100644
--- a/contrib/libs/icu/include/unicode/udata.h
+++ b/contrib/libs/icu/include/unicode/udata.h
@@ -306,7 +306,7 @@ udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
* area in memory.
*
* ICU data must be at least 8-aligned, and should be 16-aligned.
- * See https://unicode-org.github.io/icu/userguide/icudata
+ * See https://unicode-org.github.io/icu/userguide/icu_data
*
* The format of this data is that of the icu common data file, as is
* generated by the pkgdata tool with mode=common or mode=dll.
@@ -353,7 +353,7 @@ udata_setCommonData(const void *data, UErrorCode *err);
* pointer.
*
* ICU data must be at least 8-aligned, and should be 16-aligned.
- * See https://unicode-org.github.io/icu/userguide/icudata
+ * See https://unicode-org.github.io/icu/userguide/icu_data
*
* The format of this data is that of the icu common data file, like 'icudt26l.dat'
* or the corresponding shared library (DLL) file.
diff --git a/contrib/libs/icu/include/unicode/udatpg.h b/contrib/libs/icu/include/unicode/udatpg.h
index efe4357bfee..1d3060350ec 100644
--- a/contrib/libs/icu/include/unicode/udatpg.h
+++ b/contrib/libs/icu/include/unicode/udatpg.h
@@ -492,6 +492,11 @@ udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg,
* for those two skeletons, so the result is put together with this pattern,
* resulting in "d-MMM h:mm".
*
+ * There are four DateTimeFormats in a UDateTimePatternGenerator object,
+ * corresponding to date styles UDAT_FULL..UDAT_SHORT. This method sets
+ * all of them to the specified pattern. To set them individually, see
+ * udatpg_setDateTimeFormatForStyle.
+ *
* @param dtpg a pointer to UDateTimePatternGenerator.
* @param dtFormat
* message format pattern, here {1} will be replaced by the date
@@ -505,6 +510,12 @@ udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg,
/**
* Getter corresponding to setDateTimeFormat.
+ *
+ * There are four DateTimeFormats in a UDateTimePatternGenerator object,
+ * corresponding to date styles UDAT_FULL..UDAT_SHORT. This method gets
+ * the style for UDAT_MEDIUM (the default). To get them individually, see
+ * udatpg_getDateTimeFormatForStyle.
+ *
* @param dtpg a pointer to UDateTimePatternGenerator.
* @param pLength A pointer that will receive the length of the format
* @return dateTimeFormat.
@@ -514,6 +525,68 @@ U_CAPI const UChar * U_EXPORT2
udatpg_getDateTimeFormat(const UDateTimePatternGenerator *dtpg,
int32_t *pLength);
+#if !UCONFIG_NO_FORMATTING
+/**
+ * dateTimeFormats are message patterns used to compose combinations of date
+ * and time patterns. There are four length styles, corresponding to the
+ * inferred style of the date pattern; these are UDateFormatStyle values:
+ * - UDAT_FULL (for date pattern with weekday and long month), else
+ * - UDAT_LONG (for a date pattern with long month), else
+ * - UDAT_MEDIUM (for a date pattern with abbreviated month), else
+ * - UDAT_SHORT (for any other date pattern).
+ * For details on dateTimeFormats, see
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#dateTimeFormats.
+ * The default pattern in the root locale for all styles is "{1} {0}".
+ *
+ * @param udtpg
+ * a pointer to the UDateTimePatternGenerator
+ * @param style
+ * one of UDAT_FULL..UDAT_SHORT. Error if out of range.
+ * @param dateTimeFormat
+ * the new dateTimeFormat to set for the the specified style
+ * @param length
+ * the length of dateTimeFormat, or -1 if unknown and pattern
+ * is null-terminated
+ * @param pErrorCode
+ * a pointer to the UErrorCode (in/out parameter); if no failure
+ * status is already set, it will be set according to result of the
+ * function (e.g. U_ILLEGAL_ARGUMENT_ERROR for style out of range).
+ * @stable ICU 71
+ */
+U_CAPI void U_EXPORT2
+udatpg_setDateTimeFormatForStyle(UDateTimePatternGenerator *udtpg,
+ UDateFormatStyle style,
+ const UChar *dateTimeFormat, int32_t length,
+ UErrorCode *pErrorCode);
+
+/**
+ * Getter corresponding to udatpg_setDateTimeFormatForStyle.
+ *
+ * @param udtpg
+ * a pointer to the UDateTimePatternGenerator
+ * @param style
+ * one of UDAT_FULL..UDAT_SHORT. Error if out of range.
+ * @param pLength
+ * a pointer that will receive the length of the format. May be NULL
+ * if length is not desired.
+ * @param pErrorCode
+ * a pointer to the UErrorCode (in/out parameter); if no failure
+ * status is already set, it will be set according to result of the
+ * function (e.g. U_ILLEGAL_ARGUMENT_ERROR for style out of range).
+ * @return
+ * pointer to the current dateTimeFormat (0 terminated) for the specified
+ * style, or empty string in case of error. The pointer and its contents
+ * may no longer be valid if udatpg_setDateTimeFormat is called, or
+ * udatpg_setDateTimeFormatForStyle for the same style is called, or the
+ * UDateTimePatternGenerator object is closed.
+ * @stable ICU 71
+ */
+U_CAPI const UChar* U_EXPORT2
+udatpg_getDateTimeFormatForStyle(const UDateTimePatternGenerator *udtpg,
+ UDateFormatStyle style, int32_t *pLength,
+ UErrorCode *pErrorCode);
+#endif /* #if !UCONFIG_NO_FORMATTING */
+
/**
* The decimal value is used in formatting fractions of seconds. If the
* skeleton contains fractional seconds, then this is used with the
diff --git a/contrib/libs/icu/include/unicode/udisplayoptions.h b/contrib/libs/icu/include/unicode/udisplayoptions.h
new file mode 100644
index 00000000000..1ecdf1d8e94
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/udisplayoptions.h
@@ -0,0 +1,325 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __UDISPLAYOPTIONS_H__
+#define __UDISPLAYOPTIONS_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C API: Display options (enum types, values, helper functions)
+ *
+ * These display options are designed to be used in class DisplayOptions
+ * as a more modern version of the UDisplayContext mechanism.
+ */
+
+#include "unicode/uversion.h"
+
+#ifndef U_HIDE_DRAFT_API
+
+/**
+ * Represents all the grammatical cases that are supported by CLDR.
+ *
+ * @draft 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
+ */
+ UDISPOPT_GRAMMATICAL_CASE_UNDEFINED = 0,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_ABLATIVE = 1,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_ACCUSATIVE = 2,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_COMITATIVE = 3,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_DATIVE = 4,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_ERGATIVE = 5,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_GENITIVE = 6,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_INSTRUMENTAL = 7,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_LOCATIVE = 8,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_LOCATIVE_COPULATIVE = 9,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_NOMINATIVE = 10,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_OBLIQUE = 11,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_PREPOSITIONAL = 12,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_SOCIATIVE = 13,
+ /** @draft ICU 72 */
+ UDISPOPT_GRAMMATICAL_CASE_VOCATIVE = 14,
+} UDisplayOptionsGrammaticalCase;
+
+/**
+ * @param grammaticalCase The grammatical case.
+ * @return the lowercase CLDR keyword string for the grammatical case.
+ *
+ * @draft ICU 72
+ */
+U_CAPI const char * U_EXPORT2
+udispopt_getGrammaticalCaseIdentifier(UDisplayOptionsGrammaticalCase grammaticalCase);
+
+/**
+ * @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
+ */
+U_CAPI UDisplayOptionsGrammaticalCase U_EXPORT2
+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
+ */
+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
+ */
+ UDISPOPT_PLURAL_CATEGORY_UNDEFINED = 0,
+ /** @draft ICU 72 */
+ UDISPOPT_PLURAL_CATEGORY_ZERO = 1,
+ /** @draft ICU 72 */
+ UDISPOPT_PLURAL_CATEGORY_ONE = 2,
+ /** @draft ICU 72 */
+ UDISPOPT_PLURAL_CATEGORY_TWO = 3,
+ /** @draft ICU 72 */
+ UDISPOPT_PLURAL_CATEGORY_FEW = 4,
+ /** @draft ICU 72 */
+ UDISPOPT_PLURAL_CATEGORY_MANY = 5,
+ /** @draft ICU 72 */
+ UDISPOPT_PLURAL_CATEGORY_OTHER = 6,
+} UDisplayOptionsPluralCategory;
+
+/**
+ * @param pluralCategory The plural category.
+ * @return the lowercase CLDR identifier string for the plural category.
+ *
+ * @draft ICU 72
+ */
+U_CAPI const char * U_EXPORT2
+udispopt_getPluralCategoryIdentifier(UDisplayOptionsPluralCategory pluralCategory);
+
+/**
+ * @param identifier for example "few" or "other"
+ * @return the plural category corresponding to the identifier (plural keyword),
+ * or `UDISPOPT_PLURAL_CATEGORY_UNDEFINED`
+ *
+ * @draft ICU 72
+ */
+U_CAPI UDisplayOptionsPluralCategory U_EXPORT2
+udispopt_fromPluralCategoryIdentifier(const char *identifier);
+
+/**
+ * Represents all the grammatical noun classes that are supported by CLDR.
+ *
+ * @draft 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
+ */
+ UDISPOPT_NOUN_CLASS_UNDEFINED = 0,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_OTHER = 1,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_NEUTER = 2,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_FEMININE = 3,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_MASCULINE = 4,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_ANIMATE = 5,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_INANIMATE = 6,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_PERSONAL = 7,
+ /** ICU 72 */
+ UDISPOPT_NOUN_CLASS_COMMON = 8,
+} UDisplayOptionsNounClass;
+
+/**
+ * @param nounClass The noun class.
+ * @return the lowercase CLDR keyword string for the noun class.
+ *
+ * @draft ICU 72
+ */
+U_CAPI const char * U_EXPORT2
+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
+ */
+U_CAPI UDisplayOptionsNounClass U_EXPORT2
+udispopt_fromNounClassIdentifier(const char *identifier);
+
+/**
+ * Represents all the capitalization options.
+ *
+ * @draft 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
+ */
+ UDISPOPT_CAPITALIZATION_UNDEFINED = 0,
+
+ /**
+ * 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
+ */
+ UDISPOPT_CAPITALIZATION_BEGINNING_OF_SENTENCE = 1,
+
+ /**
+ * 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
+ */
+ UDISPOPT_CAPITALIZATION_MIDDLE_OF_SENTENCE = 2,
+
+ /**
+ * The capitalization context if a date, date symbol or display name is to be
+ * formatted with capitalization appropriate for stand-alone usage such as an
+ * isolated name on a calendar page.
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_CAPITALIZATION_STANDALONE = 3,
+
+ /**
+ * 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
+ */
+ UDISPOPT_CAPITALIZATION_UI_LIST_OR_MENU = 4,
+} UDisplayOptionsCapitalization;
+
+/**
+ * Represents all the dialect handlings.
+ *
+ * @draft 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
+ */
+ UDISPOPT_NAME_STYLE_UNDEFINED = 0,
+
+ /**
+ * Use standard names when generating a locale name,
+ * e.g. en_GB displays as 'English (United Kingdom)'.
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_NAME_STYLE_STANDARD_NAMES = 1,
+
+ /**
+ * Use dialect names, when generating a locale name,
+ * e.g. en_GB displays as 'British English'.
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_NAME_STYLE_DIALECT_NAMES = 2,
+} UDisplayOptionsNameStyle;
+
+/**
+ * Represents all the display lengths.
+ *
+ * @draft 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
+ */
+ UDISPOPT_DISPLAY_LENGTH_UNDEFINED = 0,
+
+ /**
+ * Uses full names when generating a locale name,
+ * e.g. "United States" for US.
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_DISPLAY_LENGTH_FULL = 1,
+
+ /**
+ * Use short names when generating a locale name,
+ * e.g. "U.S." for US.
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_DISPLAY_LENGTH_SHORT = 2,
+} UDisplayOptionsDisplayLength;
+
+/**
+ * Represents all the substitute handling.
+ *
+ * @draft ICU 72
+ */
+typedef enum UDisplayOptionsSubstituteHandling {
+
+ /**
+ * A possible setting for SubstituteHandling.
+ * The SubstituteHandling context to be used is unknown (this is the default value).
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_SUBSTITUTE_HANDLING_UNDEFINED = 0,
+
+ /**
+ * Returns a fallback value (e.g., the input code) when no data is available.
+ * This is the default behaviour.
+ *
+ * @draft ICU 72
+ */
+ UDISPOPT_SUBSTITUTE_HANDLING_SUBSTITUTE = 1,
+
+ /**
+ * Returns a null value when no data is available.
+ *
+ * @draft 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/uformattednumber.h b/contrib/libs/icu/include/unicode/uformattednumber.h
new file mode 100644
index 00000000000..174a040a083
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/uformattednumber.h
@@ -0,0 +1,224 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __UFORMATTEDNUMBER_H__
+#define __UFORMATTEDNUMBER_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/ufieldpositer.h"
+#include "unicode/uformattedvalue.h"
+#include "unicode/umisc.h"
+
+/**
+ * \file
+ * \brief C API: Formatted number result from various number formatting functions.
+ *
+ * Create a `UFormattedNumber` to hold the result of a number formatting operation. The same
+ * `UFormattedNumber` can be reused multiple times.
+ *
+ * <pre>
+ * LocalUFormattedNumberPointer uresult(unumf_openResult(status));
+ *
+ * // pass uresult.getAlias() to your number formatter
+ *
+ * int32_t length;
+ * const UChar* s = ufmtval_getString(unumf_resultAsValue(uresult.getAlias(), status), &length, status));
+ *
+ * // The string result is in `s` with the given `length` (it is also NUL-terminated).
+ * </pre>
+ */
+
+
+struct UFormattedNumber;
+/**
+ * C-compatible version of icu::number::FormattedNumber.
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberformatter.h instead.
+ *
+ * @stable ICU 62
+ */
+typedef struct UFormattedNumber UFormattedNumber;
+
+
+/**
+ * Creates an object to hold the result of a UNumberFormatter
+ * operation. The object can be used repeatedly; it is cleared whenever
+ * passed to a format function.
+ *
+ * @param ec Set if an error occurs.
+ * @stable ICU 62
+ */
+U_CAPI UFormattedNumber* U_EXPORT2
+unumf_openResult(UErrorCode* ec);
+
+
+/**
+ * Returns a representation of a UFormattedNumber as a UFormattedValue,
+ * which can be subsequently passed to any API requiring that type.
+ *
+ * The returned object is owned by the UFormattedNumber and is valid
+ * only as long as the UFormattedNumber is present and unchanged in memory.
+ *
+ * You can think of this method as a cast between types.
+ *
+ * @param uresult The object containing the formatted string.
+ * @param ec Set if an error occurs.
+ * @return A UFormattedValue owned by the input object.
+ * @stable ICU 64
+ */
+U_CAPI const UFormattedValue* U_EXPORT2
+unumf_resultAsValue(const UFormattedNumber* uresult, UErrorCode* ec);
+
+
+/**
+ * Extracts the result number string out of a UFormattedNumber to a UChar buffer if possible.
+ * If bufferCapacity is greater than the required length, a terminating NUL is written.
+ * If bufferCapacity is less than the required length, an error code is set.
+ *
+ * Also see ufmtval_getString, which returns a NUL-terminated string:
+ *
+ * int32_t len;
+ * const UChar* str = ufmtval_getString(unumf_resultAsValue(uresult, &ec), &len, &ec);
+ *
+ * NOTE: This is a C-compatible API; C++ users should build against numberformatter.h instead.
+ *
+ * @param uresult The object containing the formatted number.
+ * @param buffer Where to save the string output.
+ * @param bufferCapacity The number of UChars available in the buffer.
+ * @param ec Set if an error occurs.
+ * @return The required length.
+ * @stable ICU 62
+ */
+U_CAPI int32_t U_EXPORT2
+unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t bufferCapacity,
+ UErrorCode* ec);
+
+
+/**
+ * Determines the start and end indices of the next occurrence of the given <em>field</em> in the
+ * output string. This allows you to determine the locations of, for example, the integer part,
+ * fraction part, or symbols.
+ *
+ * This is a simpler but less powerful alternative to {@link ufmtval_nextPosition}.
+ *
+ * If a field occurs just once, calling this method will find that occurrence and return it. If a
+ * field occurs multiple times, this method may be called repeatedly with the following pattern:
+ *
+ * <pre>
+ * UFieldPosition ufpos = {UNUM_GROUPING_SEPARATOR_FIELD, 0, 0};
+ * while (unumf_resultNextFieldPosition(uresult, ufpos, &ec)) {
+ * // do something with ufpos.
+ * }
+ * </pre>
+ *
+ * This method is useful if you know which field to query. If you want all available field position
+ * information, use unumf_resultGetAllFieldPositions().
+ *
+ * NOTE: All fields of the UFieldPosition must be initialized before calling this method.
+ *
+ * @param uresult The object containing the formatted number.
+ * @param ufpos
+ * Input+output variable. On input, the "field" property determines which field to look up,
+ * and the "endIndex" property determines where to begin the search. On output, the
+ * "beginIndex" field is set to the beginning of the first occurrence of the field after the
+ * input "endIndex", and "endIndex" is set to the end of that occurrence of the field
+ * (exclusive index). If a field position is not found, the FieldPosition is not changed and
+ * the method returns false.
+ * @param ec Set if an error occurs.
+ * @stable ICU 62
+ */
+U_CAPI UBool U_EXPORT2
+unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* ufpos, UErrorCode* ec);
+
+
+/**
+ * Populates the given iterator with all fields in the formatted output string. This allows you to
+ * determine the locations of the integer part, fraction part, and sign.
+ *
+ * This is an alternative to the more powerful {@link ufmtval_nextPosition} API.
+ *
+ * If you need information on only one field, use {@link ufmtval_nextPosition} or
+ * {@link unumf_resultNextFieldPosition}.
+ *
+ * @param uresult The object containing the formatted number.
+ * @param ufpositer
+ * A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open}. Iteration
+ * information already present in the UFieldPositionIterator is deleted, and the iterator is reset
+ * to apply to the fields in the formatted string created by this function call. The field values
+ * and indexes returned by {@link #ufieldpositer_next} represent fields denoted by
+ * the UNumberFormatFields enum. Fields are not returned in a guaranteed order. Fields cannot
+ * overlap, but they may nest. For example, 1234 could format as "1,234" which might consist of a
+ * grouping separator field for ',' and an integer field encompassing the entire string.
+ * @param ec Set if an error occurs.
+ * @stable ICU 62
+ */
+U_CAPI void U_EXPORT2
+unumf_resultGetAllFieldPositions(const UFormattedNumber* uresult, UFieldPositionIterator* ufpositer,
+ UErrorCode* ec);
+
+
+/**
+ * Extracts the formatted number as a "numeric string" conforming to the
+ * syntax defined in the Decimal Arithmetic Specification, available at
+ * http://speleotrove.com/decimal
+ *
+ * This endpoint is useful for obtaining the exact number being printed
+ * after scaling and rounding have been applied by the number formatter.
+ *
+ * @param uresult The input object containing the formatted number.
+ * @param dest the 8-bit char buffer into which the decimal number is placed
+ * @param destCapacity The size, in chars, of the destination buffer. May be zero
+ * for precomputing the required size.
+ * @param ec receives any error status.
+ * If U_BUFFER_OVERFLOW_ERROR: Returns number of chars for
+ * preflighting.
+ * @return Number of chars in the data. Does not include a trailing NUL.
+ * @stable ICU 68
+ */
+U_CAPI int32_t U_EXPORT2
+unumf_resultToDecimalNumber(
+ const UFormattedNumber* uresult,
+ char* dest,
+ int32_t destCapacity,
+ UErrorCode* ec);
+
+
+/**
+ * Releases the UFormattedNumber created by unumf_openResult().
+ *
+ * @param uresult An object created by unumf_openResult().
+ * @stable ICU 62
+ */
+U_CAPI void U_EXPORT2
+unumf_closeResult(UFormattedNumber* uresult);
+
+
+#if U_SHOW_CPLUSPLUS_API
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUFormattedNumberPointer
+ * "Smart pointer" class; closes a UFormattedNumber via unumf_closeResult().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * Usage:
+ * <pre>
+ * LocalUFormattedNumberPointer uformatter(unumf_openResult(...));
+ * // no need to explicitly call unumf_closeResult()
+ * </pre>
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 62
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattedNumberPointer, UFormattedNumber, unumf_closeResult);
+
+U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif //__UFORMATTEDNUMBER_H__
diff --git a/contrib/libs/icu/include/unicode/uformattedvalue.h b/contrib/libs/icu/include/unicode/uformattedvalue.h
index 1a550e87589..af6d18f3bc9 100644
--- a/contrib/libs/icu/include/unicode/uformattedvalue.h
+++ b/contrib/libs/icu/include/unicode/uformattedvalue.h
@@ -93,14 +93,12 @@ typedef enum UFieldCategory {
*/
UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL,
-#ifndef U_HIDE_DRAFT_API
/**
* Category for spans in a number range.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UFIELD_CATEGORY_NUMBER_RANGE_SPAN = 0x1000 + UFIELD_CATEGORY_NUMBER,
-#endif // U_HIDE_DRAFT_API
} UFieldCategory;
diff --git a/contrib/libs/icu/include/unicode/uloc.h b/contrib/libs/icu/include/unicode/uloc.h
index b0bdbe1b87f..21179c1b628 100644
--- a/contrib/libs/icu/include/unicode/uloc.h
+++ b/contrib/libs/icu/include/unicode/uloc.h
@@ -26,9 +26,9 @@
#include "unicode/utypes.h"
#include "unicode/uenum.h"
-/**
+/**
* \file
- * \brief C API: Locale
+ * \brief C API: Locale ID functionality similar to C++ class Locale
*
* <h2> ULoc C API for Locale </h2>
* A <code>Locale</code> represents a specific geographical, political,
diff --git a/contrib/libs/icu/include/unicode/umachine.h b/contrib/libs/icu/include/unicode/umachine.h
index 046927ce732..545abef5956 100644
--- a/contrib/libs/icu/include/unicode/umachine.h
+++ b/contrib/libs/icu/include/unicode/umachine.h
@@ -119,28 +119,6 @@
/** Obsolete/same as U_CAPI; was used to declare a function as an internal ICU C API */
#define U_INTERNAL U_CAPI
-/**
- * \def U_OVERRIDE
- * Defined to the C++11 "override" keyword if available.
- * Denotes a class or member which is an override of the base class.
- * May result in an error if it applied to something not an override.
- * @internal
- */
-#ifndef U_OVERRIDE
-#define U_OVERRIDE override
-#endif
-
-/**
- * \def U_FINAL
- * Defined to the C++11 "final" keyword if available.
- * Denotes a class or member which may not be overridden in subclasses.
- * May result in an error if subclasses attempt to override.
- * @internal
- */
-#if !defined(U_FINAL) || defined(U_IN_DOXYGEN)
-#define U_FINAL final
-#endif
-
// Before ICU 65, function-like, multi-statement ICU macros were just defined as
// series of statements wrapped in { } blocks and the caller could choose to
// either treat them as if they were actual functions and end the invocation
@@ -282,14 +260,8 @@ typedef int8_t UBool;
*/
#ifdef U_DEFINE_FALSE_AND_TRUE
// Use the predefined value.
-#elif defined(U_COMBINED_IMPLEMENTATION) || \
- defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \
- defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \
- defined(U_TOOLUTIL_IMPLEMENTATION)
- // Inside ICU: Keep FALSE & TRUE available.
-# define U_DEFINE_FALSE_AND_TRUE 1
#else
- // Outside ICU: Avoid collision with non-macro definitions of FALSE & TRUE.
+ // Default to avoiding collision with non-macro definitions of FALSE & TRUE.
# define U_DEFINE_FALSE_AND_TRUE 0
#endif
@@ -354,7 +326,7 @@ typedef int8_t UBool;
/* UChar and UChar32 definitions -------------------------------------------- */
-/** Number of bytes in a UChar. @stable ICU 2.0 */
+/** Number of bytes in a UChar (always 2). @stable ICU 2.0 */
#define U_SIZEOF_UCHAR 2
/**
@@ -362,11 +334,7 @@ typedef int8_t UBool;
* If 1, then char16_t is a typedef and not a real type (yet)
* @internal
*/
-#if (U_PLATFORM == U_PF_AIX) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11)
-// for AIX, uchar.h needs to be included
-# error #include <uchar.h>
-# define U_CHAR16_IS_TYPEDEF 1
-#elif defined(_MSC_VER) && (_MSC_VER < 1900)
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
// Versions of Visual Studio/MSVC below 2015 do not support char16_t as a real type,
// and instead use a typedef. https://msdn.microsoft.com/library/bb531344.aspx
# define U_CHAR16_IS_TYPEDEF 1
@@ -414,10 +382,10 @@ typedef int8_t UBool;
typedef char16_t UChar;
#elif defined(UCHAR_TYPE)
typedef UCHAR_TYPE UChar;
-#elif (U_CPLUSPLUS_VERSION >= 11)
- typedef char16_t UChar;
+#elif U_CPLUSPLUS_VERSION != 0
+ typedef char16_t UChar; // C++
#else
- typedef uint16_t UChar;
+ typedef uint16_t UChar; // C
#endif
/**
diff --git a/contrib/libs/icu/include/unicode/umisc.h b/contrib/libs/icu/include/unicode/umisc.h
index 213290b9afa..4e9dda7450b 100644
--- a/contrib/libs/icu/include/unicode/umisc.h
+++ b/contrib/libs/icu/include/unicode/umisc.h
@@ -21,9 +21,9 @@
/**
* \file
- * \brief C API:misc definitions
+ * \brief C API: Miscellaneous definitions
*
- * This file contains miscellaneous definitions for the C APIs.
+ * This file contains miscellaneous definitions for the C APIs.
*/
U_CDECL_BEGIN
diff --git a/contrib/libs/icu/include/unicode/umutablecptrie.h b/contrib/libs/icu/include/unicode/umutablecptrie.h
index 3b950055da7..d60fd618191 100644
--- a/contrib/libs/icu/include/unicode/umutablecptrie.h
+++ b/contrib/libs/icu/include/unicode/umutablecptrie.h
@@ -21,8 +21,7 @@ U_CDECL_BEGIN
/**
* \file
- *
- * This file defines a mutable Unicode code point trie.
+ * \brief C API: This file defines a mutable Unicode code point trie.
*
* @see UCPTrie
* @see UMutableCPTrie
diff --git a/contrib/libs/icu/include/unicode/uniset.h b/contrib/libs/icu/include/unicode/uniset.h
index 730337a3535..84774d9f36e 100644
--- a/contrib/libs/icu/include/unicode/uniset.h
+++ b/contrib/libs/icu/include/unicode/uniset.h
@@ -282,7 +282,7 @@ class RuleCharacterIterator;
* @author Alan Liu
* @stable ICU 2.0
*/
-class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
+class U_COMMON_API UnicodeSet final : public UnicodeFilter {
private:
/**
* Enough for sets with few ranges.
@@ -297,8 +297,8 @@ private:
int32_t len = 1; // length of list used; 1 <= len <= capacity
uint8_t fFlags = 0; // Bit flag (see constants above)
- BMPSet *bmpSet = nullptr; // The set is frozen iff either bmpSet or stringSpan is not NULL.
- UChar32* buffer = nullptr; // internal buffer, may be NULL
+ BMPSet *bmpSet = nullptr; // The set is frozen iff either bmpSet or stringSpan is not nullptr.
+ UChar32* buffer = nullptr; // internal buffer, may be nullptr
int32_t bufferCapacity = 0; // capacity of buffer
/**
@@ -430,9 +430,11 @@ public:
* description for the syntax of the pattern language.
* @param pattern a string specifying what characters are in the set
* @param options bitmask for options to apply to the pattern.
- * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
+ * Valid options are USET_IGNORE_SPACE and
+ * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
* @param symbols a symbol table mapping variable names to values
- * and stand-in characters to UnicodeSets; may be NULL
+ * and stand-in characters to UnicodeSets; may be nullptr
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern
* contains a syntax error.
* @internal
@@ -450,9 +452,11 @@ public:
* @param pos on input, the position in pattern at which to start parsing.
* On output, the position after the last character parsed.
* @param options bitmask for options to apply to the pattern.
- * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
+ * Valid options are USET_IGNORE_SPACE and
+ * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
* @param symbols a symbol table mapping variable names to values
- * and stand-in characters to UnicodeSets; may be NULL
+ * and stand-in characters to UnicodeSets; may be nullptr
* @param status input-output error code
* @stable ICU 2.8
*/
@@ -645,9 +649,11 @@ public:
* A frozen set will not be modified.
* @param pattern a string specifying what characters are in the set
* @param options bitmask for options to apply to the pattern.
- * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
+ * Valid options are USET_IGNORE_SPACE and
+ * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
* @param symbols a symbol table mapping variable names to
- * values and stand-ins to UnicodeSets; may be NULL
+ * values and stand-ins to UnicodeSets; may be nullptr
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern
* contains a syntax error.
*<em> Empties the set passed before applying the pattern.</em>
@@ -683,9 +689,11 @@ public:
* pattern.length() if the closing ']' is the last character of
* the pattern string.
* @param options bitmask for options to apply to the pattern.
- * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
+ * Valid options are USET_IGNORE_SPACE and
+ * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
* @param symbols a symbol table mapping variable names to
- * values and stand-ins to UnicodeSets; may be NULL
+ * values and stand-ins to UnicodeSets; may be nullptr
* @param status returns <code>U_ILLEGAL_ARGUMENT_ERROR</code> if the pattern
* contains a syntax error.
* @return a reference to this
@@ -794,13 +802,11 @@ public:
*/
virtual UBool isEmpty(void) const;
-#ifndef U_HIDE_DRAFT_API
/**
* @return true if this set contains multi-character strings or the empty string.
- * @draft ICU 70
+ * @stable ICU 70
*/
UBool hasStrings() const;
-#endif // U_HIDE_DRAFT_API
/**
* Returns true if this set contains the given character.
@@ -1229,7 +1235,6 @@ public:
*/
UnicodeSet& retain(UChar32 c);
-#ifndef U_HIDE_DRAFT_API
/**
* Retains only the specified string from this set if it is present.
* Upon return this set will be empty if it did not contain s, or
@@ -1238,10 +1243,9 @@ public:
*
* @param s the source string
* @return this object, for chaining
- * @draft ICU 69
+ * @stable ICU 69
*/
UnicodeSet& retain(const UnicodeString &s);
-#endif // U_HIDE_DRAFT_API
/**
* Removes the specified range from this set if it is present.
@@ -1394,7 +1398,7 @@ public:
/**
* Close this set over the given attribute. For the attribute
- * USET_CASE, the result is to modify this set so that:
+ * USET_CASE_INSENSITIVE, the result is to modify this set so that:
*
* 1. For each character or string 'a' in this set, all strings or
* characters 'b' such that foldCase(a) == foldCase(b) are added
@@ -1412,8 +1416,10 @@ public:
* A frozen set will not be modified.
*
* @param attribute bitmask for attributes to close over.
- * Currently only the USET_CASE bit is supported. Any undefined bits
- * are ignored.
+ * Valid options:
+ * At most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
+ * Unrelated options bits are ignored.
* @return a reference to this set.
* @stable ICU 4.2
*/
@@ -1492,7 +1498,7 @@ public:
* bits followed by least significant 16 bits.
*
* @param dest pointer to buffer of destCapacity 16-bit integers.
- * May be NULL only if destCapacity is zero.
+ * May be nullptr only if destCapacity is zero.
* @param destCapacity size of dest, or zero. Must not be negative.
* @param ec error code. Will be set to U_INDEX_OUTOFBOUNDS_ERROR
* if n+2*m > 0x7FFF. Will be set to U_BUFFER_OVERFLOW_ERROR if
@@ -1583,6 +1589,9 @@ private:
int32_t depth,
UErrorCode& ec);
+ void closeOverCaseInsensitive(bool simple);
+ void closeOverAddCaseMappings();
+
//----------------------------------------------------------------
// Implementation: Utility methods
//----------------------------------------------------------------
@@ -1680,8 +1689,6 @@ private:
UnicodeString& rebuiltPat,
UErrorCode& ec);
- static const UnicodeSet* getInclusions(int32_t src, UErrorCode &status);
-
/**
* A filter that returns true if the given code point should be
* included in the UnicodeSet being constructed.
@@ -1702,11 +1709,6 @@ private:
const UnicodeSet* inclusions,
UErrorCode &status);
- // UCPMap is now stable ICU 63
- void applyIntPropertyValue(const UCPMap *map,
- UCPMapValueFilter *filter, const void *context,
- UErrorCode &errorCode);
-
/**
* Set the new pattern to cache.
*/
@@ -1729,7 +1731,7 @@ inline bool UnicodeSet::operator!=(const UnicodeSet& o) const {
}
inline UBool UnicodeSet::isFrozen() const {
- return (UBool)(bmpSet!=NULL || stringSpan!=NULL);
+ return (UBool)(bmpSet!=nullptr || stringSpan!=nullptr);
}
inline UBool UnicodeSet::containsSome(UChar32 start, UChar32 end) const {
diff --git a/contrib/libs/icu/include/unicode/unistr.h b/contrib/libs/icu/include/unicode/unistr.h
index b3c99481079..4074e8d07b2 100644
--- a/contrib/libs/icu/include/unicode/unistr.h
+++ b/contrib/libs/icu/include/unicode/unistr.h
@@ -253,7 +253,7 @@ class UnicodeStringAppendable; // unicode/appendable.h
* target object, e.g., calling str.append(str), an extra copy may take place
* to ensure safety.
* - If primitive string pointer values (e.g., const char16_t * or char *)
- * for input strings are NULL, then those input string parameters are treated
+ * for input strings are nullptr, then those input string parameters are treated
* as if they pointed to an empty string.
* However, this is *not* the case for char * parameters for charset names
* or other IDs.
@@ -1542,7 +1542,7 @@ public:
*
* @param start offset of first character which will be copied
* @param startLength the number of characters to extract
- * @param target the target buffer for extraction, can be NULL
+ * @param target the target buffer for extraction, can be nullptr
* if targetLength is 0
* @param targetCapacity the length of the target buffer
* @param inv Signature-distinguishing parameter, use US_INV.
@@ -1571,7 +1571,7 @@ public:
* @param startLength the number of characters to extract
* @param target the target buffer for extraction
* @param targetLength the length of the target buffer
- * If `target` is NULL, then the number of bytes required for
+ * If `target` is nullptr, then the number of bytes required for
* `target` is returned.
* @return the output string length, not including the terminating NUL
* @stable ICU 2.0
@@ -1604,7 +1604,7 @@ public:
* If `codepage` is an empty string (`""`),
* then a simple conversion is performed on the codepage-invariant
* subset ("invariant characters") of the platform encoding. See utypes.h.
- * If `target` is NULL, then the number of bytes required for
+ * If `target` is nullptr, then the number of bytes required for
* `target` is returned. It is assumed that the target is big enough
* to fit all of the characters.
* @return the output string length, not including the terminating NUL
@@ -1639,7 +1639,7 @@ public:
* If `codepage` is an empty string (`""`),
* then a simple conversion is performed on the codepage-invariant
* subset ("invariant characters") of the platform encoding. See utypes.h.
- * If `target` is NULL, then the number of bytes required for
+ * If `target` is nullptr, then the number of bytes required for
* `target` is returned.
* @return the output string length, not including the terminating NUL
* @stable ICU 2.0
@@ -1657,10 +1657,10 @@ public:
* This function avoids the overhead of opening and closing a converter if
* multiple strings are extracted.
*
- * @param dest destination string buffer, can be NULL if destCapacity==0
+ * @param dest destination string buffer, can be nullptr if destCapacity==0
* @param destCapacity the number of chars available at dest
* @param cnv the converter object to be used (ucnv_resetFromUnicode() will be called),
- * or NULL for the default converter
+ * or nullptr for the default converter
* @param errorCode normal ICU error code
* @return the length of the output string, not counting the terminating NUL;
* if the length is greater than destCapacity, then the string will not fit
@@ -1737,7 +1737,7 @@ public:
* Unpaired surrogates are replaced with U+FFFD.
* Calls u_strToUTF32WithSub().
*
- * @param utf32 destination string buffer, can be NULL if capacity==0
+ * @param utf32 destination string buffer, can be nullptr if capacity==0
* @param capacity the number of UChar32s available at utf32
* @param errorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
@@ -1835,7 +1835,7 @@ public:
* A bogus string has no value. It is different from an empty string,
* although in both cases isEmpty() returns true and length() returns 0.
* setToBogus() and isBogus() can be used to indicate that no string value is available.
- * For a bogus string, getBuffer() and getTerminatedBuffer() return NULL, and
+ * For a bogus string, getBuffer() and getTerminatedBuffer() return nullptr, and
* length() returns 0.
*
* @return true if the string is bogus/invalid, false otherwise
@@ -1906,14 +1906,14 @@ public:
* @return *this
* @stable ICU 56
*/
- UnicodeString &operator=(UnicodeString &&src) U_NOEXCEPT;
+ UnicodeString &operator=(UnicodeString &&src) noexcept;
/**
* Swap strings.
* @param other other string
* @stable ICU 56
*/
- void swap(UnicodeString &other) U_NOEXCEPT;
+ void swap(UnicodeString &other) noexcept;
/**
* Non-member UnicodeString swap function.
@@ -1922,7 +1922,7 @@ public:
* @stable ICU 56
*/
friend inline void U_EXPORT2
- swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT {
+ swap(UnicodeString &s1, UnicodeString &s2) noexcept {
s1.swap(s2);
}
@@ -2072,7 +2072,7 @@ public:
*
* A bogus string has no value. It is different from an empty string.
* It can be used to indicate that no string value is available.
- * getBuffer() and getTerminatedBuffer() return NULL, and
+ * getBuffer() and getTerminatedBuffer() return nullptr, and
* length() returns 0.
*
* This utility function is used throughout the UnicodeString
@@ -2978,7 +2978,7 @@ public:
* `-DUNISTR_FROM_STRING_EXPLICIT=explicit`
* on the compiler command line or similar.
* @param text The characters to place in the UnicodeString. `text`
- * must be NULL (U+0000) terminated.
+ * must be NUL (U+0000) terminated.
* @stable ICU 2.0
*/
UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char16_t *text);
@@ -3245,7 +3245,7 @@ public:
* @param src input codepage string
* @param srcLength length of the input string, can be -1 for NUL-terminated strings
* @param cnv converter object (ucnv_resetToUnicode() will be called),
- * can be NULL for the default converter
+ * can be nullptr for the default converter
* @param errorCode normal ICU error code
* @stable ICU 2.0
*/
@@ -3306,7 +3306,7 @@ public:
* @param src source string
* @stable ICU 56
*/
- UnicodeString(UnicodeString &&src) U_NOEXCEPT;
+ UnicodeString(UnicodeString &&src) noexcept;
/**
* 'Substring' constructor from tail of source string.
@@ -3329,7 +3329,7 @@ public:
* Clone this object, an instance of a subclass of Replaceable.
* Clones can be used concurrently in multiple threads.
* If a subclass does not implement clone(), or if an error occurs,
- * then NULL is returned.
+ * then nullptr is returned.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -3365,7 +3365,7 @@ public:
* Illegal input is replaced with U+FFFD. Otherwise, errors result in a bogus string.
* Calls u_strFromUTF32WithSub().
*
- * @param utf32 UTF-32 input string. Must not be NULL.
+ * @param utf32 UTF-32 input string. Must not be nullptr.
* @param length Length of the input string, or -1 if NUL-terminated.
* @return A UnicodeString with equivalent UTF-16 contents.
* @see toUTF32
@@ -3489,6 +3489,19 @@ private:
*/
UBool doEquals(const UnicodeString &text, int32_t len) const;
+ inline UBool
+ doEqualsSubstring(int32_t start,
+ int32_t length,
+ const UnicodeString& srcText,
+ int32_t srcStart,
+ int32_t srcLength) const;
+
+ UBool doEqualsSubstring(int32_t start,
+ int32_t length,
+ const char16_t *srcChars,
+ int32_t srcStart,
+ int32_t srcLength) const;
+
inline int8_t
doCompare(int32_t start,
int32_t length,
@@ -3618,7 +3631,7 @@ private:
UnicodeString &copyFrom(const UnicodeString &src, UBool fastCopy=false);
// Copies just the fields without memory management.
- void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NOEXCEPT;
+ void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) noexcept;
// Pin start and limit to acceptable values.
inline void pinIndex(int32_t& start) const;
@@ -3706,7 +3719,7 @@ private:
kEmptyHashCode=1, // hash code for empty string
// bit flag values for fLengthAndFlags
- kIsBogus=1, // this string is bogus, i.e., not valid or NULL
+ kIsBogus=1, // this string is bogus, i.e., not valid or nullptr
kUsingStackBuffer=2,// using fUnion.fStackFields instead of fUnion.fFields
kRefCounted=4, // there is a refCount field before the characters in fArray
kBufferIsReadonly=8,// do not write to this buffer
@@ -3946,6 +3959,21 @@ UnicodeString::doCompare(int32_t start,
}
}
+inline UBool
+UnicodeString::doEqualsSubstring(int32_t start,
+ int32_t thisLength,
+ const UnicodeString& srcText,
+ int32_t srcStart,
+ int32_t srcLength) const
+{
+ if(srcText.isBogus()) {
+ return isBogus();
+ } else {
+ srcText.pinIndices(srcStart, srcLength);
+ return !isBogus() && doEqualsSubstring(start, thisLength, srcText.getArrayStart(), srcStart, srcLength);
+ }
+}
+
inline bool
UnicodeString::operator== (const UnicodeString& text) const
{
@@ -4326,20 +4354,20 @@ UnicodeString::lastIndexOf(UChar32 c,
inline UBool
UnicodeString::startsWith(const UnicodeString& text) const
-{ return compare(0, text.length(), text, 0, text.length()) == 0; }
+{ return doEqualsSubstring(0, text.length(), text, 0, text.length()); }
inline UBool
UnicodeString::startsWith(const UnicodeString& srcText,
int32_t srcStart,
int32_t srcLength) const
-{ return doCompare(0, srcLength, srcText, srcStart, srcLength) == 0; }
+{ return doEqualsSubstring(0, srcLength, srcText, srcStart, srcLength); }
inline UBool
UnicodeString::startsWith(ConstChar16Ptr srcChars, int32_t srcLength) const {
if(srcLength < 0) {
srcLength = u_strlen(toUCharPtr(srcChars));
}
- return doCompare(0, srcLength, srcChars, 0, srcLength) == 0;
+ return doEqualsSubstring(0, srcLength, srcChars, 0, srcLength);
}
inline UBool
@@ -4347,21 +4375,21 @@ UnicodeString::startsWith(const char16_t *srcChars, int32_t srcStart, int32_t sr
if(srcLength < 0) {
srcLength = u_strlen(toUCharPtr(srcChars));
}
- return doCompare(0, srcLength, srcChars, srcStart, srcLength) == 0;
+ return doEqualsSubstring(0, srcLength, srcChars, srcStart, srcLength);
}
inline UBool
UnicodeString::endsWith(const UnicodeString& text) const
-{ return doCompare(length() - text.length(), text.length(),
- text, 0, text.length()) == 0; }
+{ return doEqualsSubstring(length() - text.length(), text.length(),
+ text, 0, text.length()); }
inline UBool
UnicodeString::endsWith(const UnicodeString& srcText,
int32_t srcStart,
int32_t srcLength) const {
srcText.pinIndices(srcStart, srcLength);
- return doCompare(length() - srcLength, srcLength,
- srcText, srcStart, srcLength) == 0;
+ return doEqualsSubstring(length() - srcLength, srcLength,
+ srcText, srcStart, srcLength);
}
inline UBool
@@ -4370,8 +4398,7 @@ UnicodeString::endsWith(ConstChar16Ptr srcChars,
if(srcLength < 0) {
srcLength = u_strlen(toUCharPtr(srcChars));
}
- return doCompare(length() - srcLength, srcLength,
- srcChars, 0, srcLength) == 0;
+ return doEqualsSubstring(length() - srcLength, srcLength, srcChars, 0, srcLength);
}
inline UBool
@@ -4381,8 +4408,8 @@ UnicodeString::endsWith(const char16_t *srcChars,
if(srcLength < 0) {
srcLength = u_strlen(toUCharPtr(srcChars + srcStart));
}
- return doCompare(length() - srcLength, srcLength,
- srcChars, srcStart, srcLength) == 0;
+ return doEqualsSubstring(length() - srcLength, srcLength,
+ srcChars, srcStart, srcLength);
}
//========================================
@@ -4712,18 +4739,18 @@ UnicodeString::remove(int32_t start,
// remove(guaranteed everything) of a bogus string makes the string empty and non-bogus
return remove();
}
- return doReplace(start, _length, NULL, 0, 0);
+ return doReplace(start, _length, nullptr, 0, 0);
}
inline UnicodeString&
UnicodeString::removeBetween(int32_t start,
int32_t limit)
-{ return doReplace(start, limit - start, NULL, 0, 0); }
+{ return doReplace(start, limit - start, nullptr, 0, 0); }
inline UnicodeString &
UnicodeString::retainBetween(int32_t start, int32_t limit) {
truncate(limit);
- return doReplace(0, start, NULL, 0, 0);
+ return doReplace(0, start, nullptr, 0, 0);
}
inline UBool
diff --git a/contrib/libs/icu/include/unicode/unum.h b/contrib/libs/icu/include/unicode/unum.h
index 14f76168b61..172ed08964b 100644
--- a/contrib/libs/icu/include/unicode/unum.h
+++ b/contrib/libs/icu/include/unicode/unum.h
@@ -25,6 +25,7 @@
#include "unicode/uformattable.h"
#include "unicode/udisplaycontext.h"
#include "unicode/ufieldpositer.h"
+#include "unicode/unumberoptions.h"
#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
@@ -271,57 +272,6 @@ typedef enum UNumberFormatStyle {
UNUM_IGNORE = UNUM_PATTERN_DECIMAL
} UNumberFormatStyle;
-/** The possible number format rounding modes.
- *
- * <p>
- * For more detail on rounding modes, see:
- * https://unicode-org.github.io/icu/userguide/format_parse/numbers/rounding-modes
- *
- * @stable ICU 2.0
- */
-typedef enum UNumberFormatRoundingMode {
- UNUM_ROUND_CEILING,
- UNUM_ROUND_FLOOR,
- UNUM_ROUND_DOWN,
- UNUM_ROUND_UP,
- /**
- * Half-even rounding
- * @stable, ICU 3.8
- */
- UNUM_ROUND_HALFEVEN,
-#ifndef U_HIDE_DEPRECATED_API
- /**
- * Half-even rounding, misspelled name
- * @deprecated, ICU 3.8
- */
- UNUM_FOUND_HALFEVEN = UNUM_ROUND_HALFEVEN,
-#endif /* U_HIDE_DEPRECATED_API */
- UNUM_ROUND_HALFDOWN = UNUM_ROUND_HALFEVEN + 1,
- UNUM_ROUND_HALFUP,
- /**
- * ROUND_UNNECESSARY reports an error if formatted result is not exact.
- * @stable ICU 4.8
- */
- UNUM_ROUND_UNNECESSARY,
-#ifndef U_HIDE_DRAFT_API
- /**
- * Rounds ties toward the odd number.
- * @draft ICU 69
- */
- UNUM_ROUND_HALF_ODD,
- /**
- * Rounds ties toward +∞.
- * @draft ICU 69
- */
- UNUM_ROUND_HALF_CEILING,
- /**
- * Rounds ties toward -∞.
- * @draft ICU 69
- */
- UNUM_ROUND_HALF_FLOOR,
-#endif // U_HIDE_DRAFT_API
-} UNumberFormatRoundingMode;
-
/** The possible number format pad positions.
* @stable ICU 2.0
*/
@@ -401,13 +351,18 @@ typedef enum UNumberFormatFields {
UNUM_MEASURE_UNIT_FIELD,
/** @stable ICU 64 */
UNUM_COMPACT_FIELD,
+ /**
+ * Approximately sign. In ICU 70, this was categorized under the generic SIGN field.
+ * @stable ICU 71
+ */
+ UNUM_APPROXIMATELY_SIGN_FIELD,
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UNumberFormatFields value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- UNUM_FIELD_COUNT = UNUM_SIGN_FIELD + 3
+ UNUM_FIELD_COUNT
#endif /* U_HIDE_DEPRECATED_API */
} UNumberFormatFields;
@@ -1152,6 +1107,26 @@ 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.
+* @param attr The attribute to query. This can be any value of UNumberFormatterAttribute,
+* regardless of type.
+* @return True if the requested attribute is supported by the formatter; false if not.
+* @see unum_getAttribute
+* @see unum_setAttribute
+* @see unum_getDoubleAttribute
+* @see unum_setDoubleAttribute
+* @see unum_getTextAttribute
+* @see unum_setTextAttribute
+* @draft 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.
* An example of a numeric attribute is the number of integer digits a formatter will produce.
@@ -1161,12 +1136,12 @@ typedef enum UNumberFormatAttribute {
* UNUM_MAX_FRACTION_DIGITS, UNUM_MIN_FRACTION_DIGITS, UNUM_FRACTION_DIGITS, UNUM_MULTIPLIER,
* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_POSITION, UNUM_SECONDARY_GROUPING_SIZE,
* UNUM_SCALE, UNUM_MINIMUM_GROUPING_DIGITS.
-* @return The value of attr.
+* @return The value of attr, or -1 if the formatter doesn't have the requested attribute. The caller should use unum_hasAttribute() to tell if the attribute
+* is available, rather than relaying on this function returning -1.
+* @see unum_hasAttribute
* @see unum_setAttribute
* @see unum_getDoubleAttribute
* @see unum_setDoubleAttribute
-* @see unum_getTextAttribute
-* @see unum_setTextAttribute
* @stable ICU 2.0
*/
U_CAPI int32_t U_EXPORT2
@@ -1177,7 +1152,7 @@ unum_getAttribute(const UNumberFormat* fmt,
* Set a numeric attribute associated with a UNumberFormat.
* An example of a numeric attribute is the number of integer digits a formatter will produce. If the
* formatter does not understand the attribute, the call is ignored. Rule-based formatters only understand
-* the lenient-parse attribute.
+* the lenient-parse attribute. The caller can use unum_hasAttribute() to find out if the formatter supports the attribute.
* @param fmt The formatter to set.
* @param attr The attribute to set; one of UNUM_PARSE_INT_ONLY, UNUM_GROUPING_USED,
* UNUM_DECIMAL_ALWAYS_SHOWN, UNUM_MAX_INTEGER_DIGITS, UNUM_MIN_INTEGER_DIGITS, UNUM_INTEGER_DIGITS,
@@ -1185,6 +1160,7 @@ unum_getAttribute(const UNumberFormat* fmt,
* UNUM_GROUPING_SIZE, UNUM_ROUNDING_MODE, UNUM_FORMAT_WIDTH, UNUM_PADDING_POSITION, UNUM_SECONDARY_GROUPING_SIZE,
* UNUM_LENIENT_PARSE, UNUM_SCALE, UNUM_MINIMUM_GROUPING_DIGITS.
* @param newValue The new value of attr.
+* @see unum_hasAttribute
* @see unum_getAttribute
* @see unum_getDoubleAttribute
* @see unum_setDoubleAttribute
@@ -1201,10 +1177,12 @@ unum_setAttribute( UNumberFormat* fmt,
/**
* Get a numeric attribute associated with a UNumberFormat.
* An example of a numeric attribute is the number of integer digits a formatter will produce.
-* If the formatter does not understand the attribute, -1 is returned.
+* If the formatter does not understand the attribute, -1 is returned. The caller should use unum_hasAttribute()
+* to determine if the attribute is supported, rather than relying on this function returning -1.
* @param fmt The formatter to query.
* @param attr The attribute to query; e.g. UNUM_ROUNDING_INCREMENT.
-* @return The value of attr.
+* @return The value of attr, or -1 if the formatter doesn't understand the attribute.
+* @see unum_hasAttribute
* @see unum_getAttribute
* @see unum_setAttribute
* @see unum_setDoubleAttribute
@@ -1219,10 +1197,12 @@ unum_getDoubleAttribute(const UNumberFormat* fmt,
/**
* Set a numeric attribute associated with a UNumberFormat.
* An example of a numeric attribute is the number of integer digits a formatter will produce.
-* If the formatter does not understand the attribute, this call is ignored.
+* If the formatter does not understand the attribute, this call is ignored. The caller can use
+* unum_hasAttribute() to tell in advance whether the formatter understands the attribute.
* @param fmt The formatter to set.
* @param attr The attribute to set; e.g. UNUM_ROUNDING_INCREMENT.
* @param newValue The new value of attr.
+* @see unum_hasAttribute
* @see unum_getAttribute
* @see unum_setAttribute
* @see unum_getDoubleAttribute
diff --git a/contrib/libs/icu/include/unicode/unumberformatter.h b/contrib/libs/icu/include/unicode/unumberformatter.h
index cb980cd94dd..09fa000b826 100644
--- a/contrib/libs/icu/include/unicode/unumberformatter.h
+++ b/contrib/libs/icu/include/unicode/unumberformatter.h
@@ -9,14 +9,13 @@
#if !UCONFIG_NO_FORMATTING
#include "unicode/parseerr.h"
-#include "unicode/ufieldpositer.h"
-#include "unicode/umisc.h"
-#include "unicode/uformattedvalue.h"
+#include "unicode/unumberoptions.h"
+#include "unicode/uformattednumber.h"
/**
* \file
- * \brief C-compatible API for localized number formatting; not recommended for C++.
+ * \brief C API: Localized number formatting; not recommended for C++.
*
* This is the C-compatible version of the NumberFormatter API introduced in ICU 60. C++ users should
* include unicode/numberformatter.h and use the proper C++ APIs.
@@ -78,7 +77,6 @@
* </pre>
*/
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* An enum declaring how to resolve conflicts between maximum fraction digits and maximum
* significant digits.
@@ -115,24 +113,23 @@
* Here, RELAXED favors Max-Fraction and STRICT favors Max-Significant. Note that this larger
* number caused the two modes to favor the opposite result.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
typedef enum UNumberRoundingPriority {
/**
* Favor greater precision by relaxing one of the rounding constraints.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UNUM_ROUNDING_PRIORITY_RELAXED,
/**
* Favor adherence to all rounding constraints by producing lower precision.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UNUM_ROUNDING_PRIORITY_STRICT,
} UNumberRoundingPriority;
-#endif // U_FORCE_HIDE_DRAFT_API
/**
* An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123
@@ -246,107 +243,6 @@ typedef enum UNumberUnitWidth {
} UNumberUnitWidth;
/**
- * An enum declaring the strategy for when and how to display grouping separators (i.e., the
- * separator, often a comma or period, after every 2-3 powers of ten). The choices are several
- * pre-built strategies for different use cases that employ locale data whenever possible. Example
- * outputs for 1234 and 1234567 in <em>en-IN</em>:
- *
- * <ul>
- * <li>OFF: 1234 and 12345
- * <li>MIN2: 1234 and 12,34,567
- * <li>AUTO: 1,234 and 12,34,567
- * <li>ON_ALIGNED: 1,234 and 12,34,567
- * <li>THOUSANDS: 1,234 and 1,234,567
- * </ul>
- *
- * <p>
- * The default is AUTO, which displays grouping separators unless the locale data says that grouping
- * is not customary. To force grouping for all numbers greater than 1000 consistently across locales,
- * use ON_ALIGNED. On the other hand, to display grouping less frequently than the default, use MIN2
- * or OFF. See the docs of each option for details.
- *
- * <p>
- * Note: This enum specifies the strategy for grouping sizes. To set which character to use as the
- * grouping separator, use the "symbols" setter.
- *
- * @stable ICU 63
- */
-typedef enum UNumberGroupingStrategy {
- /**
- * Do not display grouping separators in any locale.
- *
- * @stable ICU 61
- */
- UNUM_GROUPING_OFF,
-
- /**
- * Display grouping using locale defaults, except do not show grouping on values smaller than
- * 10000 (such that there is a <em>minimum of two digits</em> before the first separator).
- *
- * <p>
- * Note that locales may restrict grouping separators to be displayed only on 1 million or
- * greater (for example, ee and hu) or disable grouping altogether (for example, bg currency).
- *
- * <p>
- * Locale data is used to determine whether to separate larger numbers into groups of 2
- * (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
- *
- * @stable ICU 61
- */
- UNUM_GROUPING_MIN2,
-
- /**
- * Display grouping using the default strategy for all locales. This is the default behavior.
- *
- * <p>
- * Note that locales may restrict grouping separators to be displayed only on 1 million or
- * greater (for example, ee and hu) or disable grouping altogether (for example, bg currency).
- *
- * <p>
- * Locale data is used to determine whether to separate larger numbers into groups of 2
- * (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
- *
- * @stable ICU 61
- */
- UNUM_GROUPING_AUTO,
-
- /**
- * Always display the grouping separator on values of at least 1000.
- *
- * <p>
- * This option ignores the locale data that restricts or disables grouping, described in MIN2 and
- * AUTO. This option may be useful to normalize the alignment of numbers, such as in a
- * spreadsheet.
- *
- * <p>
- * Locale data is used to determine whether to separate larger numbers into groups of 2
- * (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
- *
- * @stable ICU 61
- */
- UNUM_GROUPING_ON_ALIGNED,
-
- /**
- * Use the Western defaults: groups of 3 and enabled for all numbers 1000 or greater. Do not use
- * locale data for determining the grouping strategy.
- *
- * @stable ICU 61
- */
- UNUM_GROUPING_THOUSANDS
-
-#ifndef U_HIDE_INTERNAL_API
- ,
- /**
- * One more than the highest UNumberGroupingStrategy value.
- *
- * @internal ICU 62: The numeric value may change over time; see ICU ticket #12420.
- */
- UNUM_GROUPING_COUNT
-#endif /* U_HIDE_INTERNAL_API */
-
-} UNumberGroupingStrategy;
-
-/**
* An enum declaring how to denote positive and negative numbers. Example outputs when formatting
* 123, 0, and -123 in <em>en-US</em>:
*
@@ -435,21 +331,19 @@ typedef enum UNumberSignDisplay {
*/
UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO,
-#ifndef U_HIDE_DRAFT_API
/**
* Same as AUTO, but do not show the sign on negative zero.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UNUM_SIGN_NEGATIVE,
/**
* Same as ACCOUNTING, but do not show the sign on negative zero.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UNUM_SIGN_ACCOUNTING_NEGATIVE,
-#endif // U_HIDE_DRAFT_API
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// needed for unconditionalized struct MacroProps
@@ -498,31 +392,29 @@ typedef enum UNumberDecimalSeparatorDisplay {
UNUM_DECIMAL_SEPARATOR_COUNT
} UNumberDecimalSeparatorDisplay;
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* An enum declaring how to render trailing zeros.
*
* - UNUM_TRAILING_ZERO_AUTO: 0.90, 1.00, 1.10
* - UNUM_TRAILING_ZERO_HIDE_IF_WHOLE: 0.90, 1, 1.10
*
- * @draft ICU 69
+ * @stable ICU 69
*/
typedef enum UNumberTrailingZeroDisplay {
/**
* Display trailing zeros according to the settings for minimum fraction and significant digits.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UNUM_TRAILING_ZERO_AUTO,
/**
* Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero.
*
- * @draft ICU 69
+ * @stable ICU 69
*/
UNUM_TRAILING_ZERO_HIDE_IF_WHOLE,
} UNumberTrailingZeroDisplay;
-#endif // U_FORCE_HIDE_DRAFT_API
struct UNumberFormatter;
/**
@@ -534,16 +426,6 @@ struct UNumberFormatter;
*/
typedef struct UNumberFormatter UNumberFormatter;
-struct UFormattedNumber;
-/**
- * C-compatible version of icu::number::FormattedNumber.
- *
- * NOTE: This is a C-compatible API; C++ users should build against numberformatter.h instead.
- *
- * @stable ICU 62
- */
-typedef struct UFormattedNumber UFormattedNumber;
-
/**
* Creates a new UNumberFormatter for the given skeleton string and locale. This is currently the only
@@ -590,17 +472,6 @@ unumf_openForSkeletonAndLocaleWithError(
const UChar* skeleton, int32_t skeletonLen, const char* locale, UParseError* perror, UErrorCode* ec);
-/**
- * Creates an object to hold the result of a UNumberFormatter
- * operation. The object can be used repeatedly; it is cleared whenever
- * passed to a format function.
- *
- * @param ec Set if an error occurs.
- * @stable ICU 62
- */
-U_CAPI UFormattedNumber* U_EXPORT2
-unumf_openResult(UErrorCode* ec);
-
/**
* Uses a UNumberFormatter to format an integer to a UFormattedNumber. A string, field position, and other
@@ -665,135 +536,6 @@ U_CAPI void U_EXPORT2
unumf_formatDecimal(const UNumberFormatter* uformatter, const char* value, int32_t valueLen,
UFormattedNumber* uresult, UErrorCode* ec);
-/**
- * Returns a representation of a UFormattedNumber as a UFormattedValue,
- * which can be subsequently passed to any API requiring that type.
- *
- * The returned object is owned by the UFormattedNumber and is valid
- * only as long as the UFormattedNumber is present and unchanged in memory.
- *
- * You can think of this method as a cast between types.
- *
- * @param uresult The object containing the formatted string.
- * @param ec Set if an error occurs.
- * @return A UFormattedValue owned by the input object.
- * @stable ICU 64
- */
-U_CAPI const UFormattedValue* U_EXPORT2
-unumf_resultAsValue(const UFormattedNumber* uresult, UErrorCode* ec);
-
-
-/**
- * Extracts the result number string out of a UFormattedNumber to a UChar buffer if possible.
- * If bufferCapacity is greater than the required length, a terminating NUL is written.
- * If bufferCapacity is less than the required length, an error code is set.
- *
- * Also see ufmtval_getString, which returns a NUL-terminated string:
- *
- * int32_t len;
- * const UChar* str = ufmtval_getString(unumf_resultAsValue(uresult, &ec), &len, &ec);
- *
- * NOTE: This is a C-compatible API; C++ users should build against numberformatter.h instead.
- *
- * @param uresult The object containing the formatted number.
- * @param buffer Where to save the string output.
- * @param bufferCapacity The number of UChars available in the buffer.
- * @param ec Set if an error occurs.
- * @return The required length.
- * @stable ICU 62
- */
-U_CAPI int32_t U_EXPORT2
-unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t bufferCapacity,
- UErrorCode* ec);
-
-
-/**
- * Determines the start and end indices of the next occurrence of the given <em>field</em> in the
- * output string. This allows you to determine the locations of, for example, the integer part,
- * fraction part, or symbols.
- *
- * This is a simpler but less powerful alternative to {@link ufmtval_nextPosition}.
- *
- * If a field occurs just once, calling this method will find that occurrence and return it. If a
- * field occurs multiple times, this method may be called repeatedly with the following pattern:
- *
- * <pre>
- * UFieldPosition ufpos = {UNUM_GROUPING_SEPARATOR_FIELD, 0, 0};
- * while (unumf_resultNextFieldPosition(uresult, ufpos, &ec)) {
- * // do something with ufpos.
- * }
- * </pre>
- *
- * This method is useful if you know which field to query. If you want all available field position
- * information, use unumf_resultGetAllFieldPositions().
- *
- * NOTE: All fields of the UFieldPosition must be initialized before calling this method.
- *
- * @param uresult The object containing the formatted number.
- * @param ufpos
- * Input+output variable. On input, the "field" property determines which field to look up,
- * and the "endIndex" property determines where to begin the search. On output, the
- * "beginIndex" field is set to the beginning of the first occurrence of the field after the
- * input "endIndex", and "endIndex" is set to the end of that occurrence of the field
- * (exclusive index). If a field position is not found, the FieldPosition is not changed and
- * the method returns false.
- * @param ec Set if an error occurs.
- * @stable ICU 62
- */
-U_CAPI UBool U_EXPORT2
-unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* ufpos, UErrorCode* ec);
-
-
-/**
- * Populates the given iterator with all fields in the formatted output string. This allows you to
- * determine the locations of the integer part, fraction part, and sign.
- *
- * This is an alternative to the more powerful {@link ufmtval_nextPosition} API.
- *
- * If you need information on only one field, use {@link ufmtval_nextPosition} or
- * {@link unumf_resultNextFieldPosition}.
- *
- * @param uresult The object containing the formatted number.
- * @param ufpositer
- * A pointer to a UFieldPositionIterator created by {@link #ufieldpositer_open}. Iteration
- * information already present in the UFieldPositionIterator is deleted, and the iterator is reset
- * to apply to the fields in the formatted string created by this function call. The field values
- * and indexes returned by {@link #ufieldpositer_next} represent fields denoted by
- * the UNumberFormatFields enum. Fields are not returned in a guaranteed order. Fields cannot
- * overlap, but they may nest. For example, 1234 could format as "1,234" which might consist of a
- * grouping separator field for ',' and an integer field encompassing the entire string.
- * @param ec Set if an error occurs.
- * @stable ICU 62
- */
-U_CAPI void U_EXPORT2
-unumf_resultGetAllFieldPositions(const UFormattedNumber* uresult, UFieldPositionIterator* ufpositer,
- UErrorCode* ec);
-
-
-/**
- * Extracts the formatted number as a "numeric string" conforming to the
- * syntax defined in the Decimal Arithmetic Specification, available at
- * http://speleotrove.com/decimal
- *
- * This endpoint is useful for obtaining the exact number being printed
- * after scaling and rounding have been applied by the number formatter.
- *
- * @param uresult The input object containing the formatted number.
- * @param dest the 8-bit char buffer into which the decimal number is placed
- * @param destCapacity The size, in chars, of the destination buffer. May be zero
- * for precomputing the required size.
- * @param ec receives any error status.
- * If U_BUFFER_OVERFLOW_ERROR: Returns number of chars for
- * preflighting.
- * @return Number of chars in the data. Does not include a trailing NUL.
- * @stable ICU 68
- */
-U_CAPI int32_t U_EXPORT2
-unumf_resultToDecimalNumber(
- const UFormattedNumber* uresult,
- char* dest,
- int32_t destCapacity,
- UErrorCode* ec);
/**
@@ -806,15 +548,6 @@ U_CAPI void U_EXPORT2
unumf_close(UNumberFormatter* uformatter);
-/**
- * Releases the UFormattedNumber created by unumf_openResult().
- *
- * @param uresult An object created by unumf_openResult().
- * @stable ICU 62
- */
-U_CAPI void U_EXPORT2
-unumf_closeResult(UFormattedNumber* uresult);
-
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
@@ -836,23 +569,6 @@ U_NAMESPACE_BEGIN
*/
U_DEFINE_LOCAL_OPEN_POINTER(LocalUNumberFormatterPointer, UNumberFormatter, unumf_close);
-/**
- * \class LocalUFormattedNumberPointer
- * "Smart pointer" class; closes a UFormattedNumber via unumf_closeResult().
- * For most methods see the LocalPointerBase base class.
- *
- * Usage:
- * <pre>
- * LocalUFormattedNumberPointer uformatter(unumf_openResult(...));
- * // no need to explicitly call unumf_closeResult()
- * </pre>
- *
- * @see LocalPointerBase
- * @see LocalPointer
- * @stable ICU 62
- */
-U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattedNumberPointer, UFormattedNumber, unumf_closeResult);
-
U_NAMESPACE_END
#endif // U_SHOW_CPLUSPLUS_API
diff --git a/contrib/libs/icu/include/unicode/unumberoptions.h b/contrib/libs/icu/include/unicode/unumberoptions.h
new file mode 100644
index 00000000000..3fa8df51d57
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/unumberoptions.h
@@ -0,0 +1,173 @@
+// © 2017 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __UNUMBEROPTIONS_H__
+#define __UNUMBEROPTIONS_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+/**
+ * \file
+ * \brief C API: Header-only input options for various number formatting APIs.
+ *
+ * You do not normally need to include this header file directly, because it is included in all
+ * files that use these enums.
+ */
+
+
+/** The possible number format rounding modes.
+ *
+ * <p>
+ * For more detail on rounding modes, see:
+ * https://unicode-org.github.io/icu/userguide/format_parse/numbers/rounding-modes
+ *
+ * @stable ICU 2.0
+ */
+typedef enum UNumberFormatRoundingMode {
+ UNUM_ROUND_CEILING,
+ UNUM_ROUND_FLOOR,
+ UNUM_ROUND_DOWN,
+ UNUM_ROUND_UP,
+ /**
+ * Half-even rounding
+ * @stable, ICU 3.8
+ */
+ UNUM_ROUND_HALFEVEN,
+#ifndef U_HIDE_DEPRECATED_API
+ /**
+ * Half-even rounding, misspelled name
+ * @deprecated, ICU 3.8
+ */
+ UNUM_FOUND_HALFEVEN = UNUM_ROUND_HALFEVEN,
+#endif /* U_HIDE_DEPRECATED_API */
+ UNUM_ROUND_HALFDOWN = UNUM_ROUND_HALFEVEN + 1,
+ UNUM_ROUND_HALFUP,
+ /**
+ * ROUND_UNNECESSARY reports an error if formatted result is not exact.
+ * @stable ICU 4.8
+ */
+ UNUM_ROUND_UNNECESSARY,
+ /**
+ * Rounds ties toward the odd number.
+ * @stable ICU 69
+ */
+ UNUM_ROUND_HALF_ODD,
+ /**
+ * Rounds ties toward +∞.
+ * @stable ICU 69
+ */
+ UNUM_ROUND_HALF_CEILING,
+ /**
+ * Rounds ties toward -∞.
+ * @stable ICU 69
+ */
+ UNUM_ROUND_HALF_FLOOR,
+} UNumberFormatRoundingMode;
+
+
+/**
+ * An enum declaring the strategy for when and how to display grouping separators (i.e., the
+ * separator, often a comma or period, after every 2-3 powers of ten). The choices are several
+ * pre-built strategies for different use cases that employ locale data whenever possible. Example
+ * outputs for 1234 and 1234567 in <em>en-IN</em>:
+ *
+ * <ul>
+ * <li>OFF: 1234 and 12345
+ * <li>MIN2: 1234 and 12,34,567
+ * <li>AUTO: 1,234 and 12,34,567
+ * <li>ON_ALIGNED: 1,234 and 12,34,567
+ * <li>THOUSANDS: 1,234 and 1,234,567
+ * </ul>
+ *
+ * <p>
+ * The default is AUTO, which displays grouping separators unless the locale data says that grouping
+ * is not customary. To force grouping for all numbers greater than 1000 consistently across locales,
+ * use ON_ALIGNED. On the other hand, to display grouping less frequently than the default, use MIN2
+ * or OFF. See the docs of each option for details.
+ *
+ * <p>
+ * Note: This enum specifies the strategy for grouping sizes. To set which character to use as the
+ * grouping separator, use the "symbols" setter.
+ *
+ * @stable ICU 63
+ */
+typedef enum UNumberGroupingStrategy {
+ /**
+ * Do not display grouping separators in any locale.
+ *
+ * @stable ICU 61
+ */
+ UNUM_GROUPING_OFF,
+
+ /**
+ * Display grouping using locale defaults, except do not show grouping on values smaller than
+ * 10000 (such that there is a <em>minimum of two digits</em> before the first separator).
+ *
+ * <p>
+ * Note that locales may restrict grouping separators to be displayed only on 1 million or
+ * greater (for example, ee and hu) or disable grouping altogether (for example, bg currency).
+ *
+ * <p>
+ * Locale data is used to determine whether to separate larger numbers into groups of 2
+ * (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
+ *
+ * @stable ICU 61
+ */
+ UNUM_GROUPING_MIN2,
+
+ /**
+ * Display grouping using the default strategy for all locales. This is the default behavior.
+ *
+ * <p>
+ * Note that locales may restrict grouping separators to be displayed only on 1 million or
+ * greater (for example, ee and hu) or disable grouping altogether (for example, bg currency).
+ *
+ * <p>
+ * Locale data is used to determine whether to separate larger numbers into groups of 2
+ * (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
+ *
+ * @stable ICU 61
+ */
+ UNUM_GROUPING_AUTO,
+
+ /**
+ * Always display the grouping separator on values of at least 1000.
+ *
+ * <p>
+ * This option ignores the locale data that restricts or disables grouping, described in MIN2 and
+ * AUTO. This option may be useful to normalize the alignment of numbers, such as in a
+ * spreadsheet.
+ *
+ * <p>
+ * Locale data is used to determine whether to separate larger numbers into groups of 2
+ * (customary in South Asia) or groups of 3 (customary in Europe and the Americas).
+ *
+ * @stable ICU 61
+ */
+ UNUM_GROUPING_ON_ALIGNED,
+
+ /**
+ * Use the Western defaults: groups of 3 and enabled for all numbers 1000 or greater. Do not use
+ * locale data for determining the grouping strategy.
+ *
+ * @stable ICU 61
+ */
+ UNUM_GROUPING_THOUSANDS
+
+#ifndef U_HIDE_INTERNAL_API
+ ,
+ /**
+ * One more than the highest UNumberGroupingStrategy value.
+ *
+ * @internal ICU 62: The numeric value may change over time; see ICU ticket #12420.
+ */
+ UNUM_GROUPING_COUNT
+#endif /* U_HIDE_INTERNAL_API */
+
+} UNumberGroupingStrategy;
+
+
+#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif //__UNUMBEROPTIONS_H__
diff --git a/contrib/libs/icu/include/unicode/unumberrangeformatter.h b/contrib/libs/icu/include/unicode/unumberrangeformatter.h
index 4e92fe29e25..106942f25af 100644
--- a/contrib/libs/icu/include/unicode/unumberrangeformatter.h
+++ b/contrib/libs/icu/include/unicode/unumberrangeformatter.h
@@ -17,7 +17,7 @@
/**
* \file
- * \brief C-compatible API for localized number range formatting.
+ * \brief C API: Localized number range formatting
*
* This is the C-compatible version of the NumberRangeFormatter API. C++ users
* should include unicode/numberrangeformatter.h and use the proper C++ APIs.
diff --git a/contrib/libs/icu/include/unicode/uobject.h b/contrib/libs/icu/include/unicode/uobject.h
index 25a8330f9ac..f53ec1d1119 100644
--- a/contrib/libs/icu/include/unicode/uobject.h
+++ b/contrib/libs/icu/include/unicode/uobject.h
@@ -32,21 +32,21 @@
/**
* \def U_NO_THROW
- * Since ICU 64, use U_NOEXCEPT instead.
+ * Since ICU 64, use noexcept instead.
*
* Previously, define this to define the throw() specification so
* certain functions do not throw any exceptions
*
* UMemory operator new methods should have the throw() specification
- * appended to them, so that the compiler adds the additional NULL check
- * before calling constructors. Without, if <code>operator new</code> returns NULL the
+ * appended to them, so that the compiler adds the additional nullptr check
+ * before calling constructors. Without, if <code>operator new</code> returns nullptr the
* constructor is still called, and if the constructor references member
* data, (which it typically does), the result is a segmentation violation.
*
- * @stable ICU 4.2. Since ICU 64, Use U_NOEXCEPT instead. See ICU-20422.
+ * @stable ICU 4.2. Since ICU 64, Use noexcept instead. See ICU-20422.
*/
#ifndef U_NO_THROW
-#define U_NO_THROW U_NOEXCEPT
+#define U_NO_THROW noexcept
#endif
/*===========================================================================*/
@@ -131,14 +131,14 @@ public:
* for ICU4C C++ classes
* @stable ICU 2.4
*/
- static void * U_EXPORT2 operator new(size_t size) U_NOEXCEPT;
+ static void * U_EXPORT2 operator new(size_t size) noexcept;
/**
* Override for ICU4C C++ memory management.
* See new().
* @stable ICU 2.4
*/
- static void * U_EXPORT2 operator new[](size_t size) U_NOEXCEPT;
+ static void * U_EXPORT2 operator new[](size_t size) noexcept;
/**
* Override for ICU4C C++ memory management.
@@ -148,14 +148,14 @@ public:
* for ICU4C C++ classes
* @stable ICU 2.4
*/
- static void U_EXPORT2 operator delete(void *p) U_NOEXCEPT;
+ static void U_EXPORT2 operator delete(void *p) noexcept;
/**
* Override for ICU4C C++ memory management.
* See delete().
* @stable ICU 2.4
*/
- static void U_EXPORT2 operator delete[](void *p) U_NOEXCEPT;
+ static void U_EXPORT2 operator delete[](void *p) noexcept;
#if U_HAVE_PLACEMENT_NEW
/**
@@ -163,14 +163,14 @@ public:
* See new().
* @stable ICU 2.6
*/
- static inline void * U_EXPORT2 operator new(size_t, void *ptr) U_NOEXCEPT { return ptr; }
+ static inline void * U_EXPORT2 operator new(size_t, void *ptr) noexcept { return ptr; }
/**
* Override for ICU4C C++ memory management for STL.
* See delete().
* @stable ICU 2.6
*/
- static inline void U_EXPORT2 operator delete(void *, void *) U_NOEXCEPT {}
+ static inline void U_EXPORT2 operator delete(void *, void *) noexcept {}
#endif /* U_HAVE_PLACEMENT_NEW */
#if U_HAVE_DEBUG_LOCATION_NEW
/**
@@ -180,7 +180,7 @@ public:
* @param file The file where the allocation was requested
* @param line The line where the allocation was requested
*/
- static void * U_EXPORT2 operator new(size_t size, const char* file, int line) U_NOEXCEPT;
+ static void * U_EXPORT2 operator new(size_t size, const char* file, int line) noexcept;
/**
* This method provides a matching delete for the MFC debug new
*
@@ -188,7 +188,7 @@ public:
* @param file The file where the allocation was requested
* @param line The line where the allocation was requested
*/
- static void U_EXPORT2 operator delete(void* p, const char* file, int line) U_NOEXCEPT;
+ static void U_EXPORT2 operator delete(void* p, const char* file, int line) noexcept;
#endif /* U_HAVE_DEBUG_LOCATION_NEW */
#endif /* U_OVERRIDE_CXX_ALLOCATION */
diff --git a/contrib/libs/icu/include/unicode/urename.h b/contrib/libs/icu/include/unicode/urename.h
index 4605f632ea8..b35df453800 100644
--- a/contrib/libs/icu/include/unicode/urename.h
+++ b/contrib/libs/icu/include/unicode/urename.h
@@ -564,9 +564,11 @@
#define ucal_setTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_setTimeZone)
#define ucase_addCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addCaseClosure)
#define ucase_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ucase_addPropertyStarts)
+#define ucase_addSimpleCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addSimpleCaseClosure)
#define ucase_addStringCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addStringCaseClosure)
#define ucase_fold U_ICU_ENTRY_POINT_RENAME(ucase_fold)
#define ucase_getCaseLocale U_ICU_ENTRY_POINT_RENAME(ucase_getCaseLocale)
+#define ucase_getSingleton U_ICU_ENTRY_POINT_RENAME(ucase_getSingleton)
#define ucase_getTrie U_ICU_ENTRY_POINT_RENAME(ucase_getTrie)
#define ucase_getType U_ICU_ENTRY_POINT_RENAME(ucase_getType)
#define ucase_getTypeOrIgnorable U_ICU_ENTRY_POINT_RENAME(ucase_getTypeOrIgnorable)
@@ -630,6 +632,7 @@
#define ucnv_cbFromUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteUChars)
#define ucnv_cbToUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteSub)
#define ucnv_cbToUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteUChars)
+#define ucnv_clone U_ICU_ENTRY_POINT_RENAME(ucnv_clone)
#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close)
#define ucnv_compareNames U_ICU_ENTRY_POINT_RENAME(ucnv_compareNames)
#define ucnv_convert U_ICU_ENTRY_POINT_RENAME(ucnv_convert)
@@ -725,6 +728,7 @@
#define ucnvsel_selectForString U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForString)
#define ucnvsel_selectForUTF8 U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForUTF8)
#define ucnvsel_serialize U_ICU_ENTRY_POINT_RENAME(ucnvsel_serialize)
+#define ucol_clone U_ICU_ENTRY_POINT_RENAME(ucol_clone)
#define ucol_cloneBinary U_ICU_ENTRY_POINT_RENAME(ucol_cloneBinary)
#define ucol_close U_ICU_ENTRY_POINT_RENAME(ucol_close)
#define ucol_closeElements U_ICU_ENTRY_POINT_RENAME(ucol_closeElements)
@@ -904,6 +908,7 @@
#define udatpg_getBestPattern U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPattern)
#define udatpg_getBestPatternWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPatternWithOptions)
#define udatpg_getDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_getDateTimeFormat)
+#define udatpg_getDateTimeFormatForStyle U_ICU_ENTRY_POINT_RENAME(udatpg_getDateTimeFormatForStyle)
#define udatpg_getDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_getDecimal)
#define udatpg_getDefaultHourCycle U_ICU_ENTRY_POINT_RENAME(udatpg_getDefaultHourCycle)
#define udatpg_getFieldDisplayName U_ICU_ENTRY_POINT_RENAME(udatpg_getFieldDisplayName)
@@ -918,8 +923,15 @@
#define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemFormat)
#define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemName)
#define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTimeFormat)
+#define udatpg_setDateTimeFormatForStyle U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTimeFormatForStyle)
#define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal)
#define udict_swap U_ICU_ENTRY_POINT_RENAME(udict_swap)
+#define udispopt_fromGrammaticalCaseIdentifier U_ICU_ENTRY_POINT_RENAME(udispopt_fromGrammaticalCaseIdentifier)
+#define udispopt_fromNounClassIdentifier U_ICU_ENTRY_POINT_RENAME(udispopt_fromNounClassIdentifier)
+#define udispopt_fromPluralCategoryIdentifier U_ICU_ENTRY_POINT_RENAME(udispopt_fromPluralCategoryIdentifier)
+#define udispopt_getGrammaticalCaseIdentifier U_ICU_ENTRY_POINT_RENAME(udispopt_getGrammaticalCaseIdentifier)
+#define udispopt_getNounClassIdentifier U_ICU_ENTRY_POINT_RENAME(udispopt_getNounClassIdentifier)
+#define udispopt_getPluralCategoryIdentifier U_ICU_ENTRY_POINT_RENAME(udispopt_getPluralCategoryIdentifier)
#define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close)
#define udtitvfmt_closeResult U_ICU_ENTRY_POINT_RENAME(udtitvfmt_closeResult)
#define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format)
@@ -1242,6 +1254,7 @@
#define unum_getLocaleByType U_ICU_ENTRY_POINT_RENAME(unum_getLocaleByType)
#define unum_getSymbol U_ICU_ENTRY_POINT_RENAME(unum_getSymbol)
#define unum_getTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_getTextAttribute)
+#define unum_hasAttribute U_ICU_ENTRY_POINT_RENAME(unum_hasAttribute)
#define unum_open U_ICU_ENTRY_POINT_RENAME(unum_open)
#define unum_parse U_ICU_ENTRY_POINT_RENAME(unum_parse)
#define unum_parseDecimal U_ICU_ENTRY_POINT_RENAME(unum_parseDecimal)
@@ -1736,6 +1749,20 @@
#define uset_spanBackUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanBackUTF8)
#define uset_spanUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanUTF8)
#define uset_toPattern U_ICU_ENTRY_POINT_RENAME(uset_toPattern)
+#define usnum_close U_ICU_ENTRY_POINT_RENAME(usnum_close)
+#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_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)
+#define usnum_setToInt64 U_ICU_ENTRY_POINT_RENAME(usnum_setToInt64)
+#define usnum_truncateStart U_ICU_ENTRY_POINT_RENAME(usnum_truncateStart)
+#define usnumf_close U_ICU_ENTRY_POINT_RENAME(usnumf_close)
+#define usnumf_format U_ICU_ENTRY_POINT_RENAME(usnumf_format)
+#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_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)
diff --git a/contrib/libs/icu/include/unicode/ures.h b/contrib/libs/icu/include/unicode/ures.h
index a6c43f9537a..babc01d426a 100644
--- a/contrib/libs/icu/include/unicode/ures.h
+++ b/contrib/libs/icu/include/unicode/ures.h
@@ -25,6 +25,7 @@
#ifndef URES_H
#define URES_H
+#include "unicode/char16ptr.h"
#include "unicode/utypes.h"
#include "unicode/uloc.h"
@@ -812,7 +813,7 @@ inline UnicodeString
ures_getUnicodeString(const UResourceBundle *resB, UErrorCode* status) {
UnicodeString result;
int32_t len = 0;
- const UChar *r = ures_getString(resB, &len, status);
+ const char16_t *r = ConstChar16Ptr(ures_getString(resB, &len, status));
if(U_SUCCESS(*status)) {
result.setTo(true, r, len);
} else {
@@ -837,7 +838,7 @@ inline UnicodeString
ures_getNextUnicodeString(UResourceBundle *resB, const char ** key, UErrorCode* status) {
UnicodeString result;
int32_t len = 0;
- const UChar* r = ures_getNextString(resB, &len, key, status);
+ const char16_t* r = ConstChar16Ptr(ures_getNextString(resB, &len, key, status));
if(U_SUCCESS(*status)) {
result.setTo(true, r, len);
} else {
@@ -859,7 +860,7 @@ inline UnicodeString
ures_getUnicodeStringByIndex(const UResourceBundle *resB, int32_t indexS, UErrorCode* status) {
UnicodeString result;
int32_t len = 0;
- const UChar* r = ures_getStringByIndex(resB, indexS, &len, status);
+ const char16_t* r = ConstChar16Ptr(ures_getStringByIndex(resB, indexS, &len, status));
if(U_SUCCESS(*status)) {
result.setTo(true, r, len);
} else {
@@ -882,7 +883,7 @@ inline UnicodeString
ures_getUnicodeStringByKey(const UResourceBundle *resB, const char* key, UErrorCode* status) {
UnicodeString result;
int32_t len = 0;
- const UChar* r = ures_getStringByKey(resB, key, &len, status);
+ const char16_t* r = ConstChar16Ptr(ures_getStringByKey(resB, key, &len, status));
if(U_SUCCESS(*status)) {
result.setTo(true, r, len);
} else {
diff --git a/contrib/libs/icu/include/unicode/uscript.h b/contrib/libs/icu/include/unicode/uscript.h
index 6cb15328085..dc97ab2ba56 100644
--- a/contrib/libs/icu/include/unicode/uscript.h
+++ b/contrib/libs/icu/include/unicode/uscript.h
@@ -495,6 +495,11 @@ typedef enum UScriptCode {
/** @stable ICU 70 */
USCRIPT_VITHKUQI = 197,/* Vith */
+ /** @stable ICU 72 */
+ USCRIPT_KAWI = 198,/* Kawi */
+ /** @stable ICU 72 */
+ USCRIPT_NAG_MUNDARI = 199,/* Nagm */
+
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UScriptCode value.
@@ -502,7 +507,7 @@ typedef enum UScriptCode {
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
- USCRIPT_CODE_LIMIT = 198
+ USCRIPT_CODE_LIMIT = 200
#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 2ef352ef563..ee4e0036d22 100644
--- a/contrib/libs/icu/include/unicode/uset.h
+++ b/contrib/libs/icu/include/unicode/uset.h
@@ -53,6 +53,12 @@ typedef struct USet USet;
/**
* Bitmask values to be passed to uset_openPatternOptions() or
* uset_applyPattern() taking an option parameter.
+ *
+ * Use at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
+ *
+ * Undefined options bits are ignored, and reserved for future use.
+ *
* @stable ICU 2.4
*/
enum {
@@ -60,13 +66,13 @@ enum {
* Ignore white space within patterns unless quoted or escaped.
* @stable ICU 2.4
*/
- USET_IGNORE_SPACE = 1,
+ USET_IGNORE_SPACE = 1,
/**
* Enable case insensitive matching. E.g., "[ab]" with this flag
* will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will
* match all except 'a', 'A', 'b', and 'B'. This performs a full
- * closure over case mappings, e.g. U+017F for s.
+ * closure over case mappings, e.g. 'ſ' (U+017F long s) for 's'.
*
* The resulting set is a superset of the input for the code points but
* not for the strings.
@@ -88,17 +94,36 @@ enum {
*
* @stable ICU 2.4
*/
- USET_CASE_INSENSITIVE = 2,
+ USET_CASE_INSENSITIVE = 2,
/**
- * Enable case insensitive matching. E.g., "[ab]" with this flag
- * will match 'a', 'A', 'b', and 'B'. "[^ab]" with this flag will
- * match all except 'a', 'A', 'b', and 'B'. This adds the lower-,
- * title-, and uppercase mappings as well as the case folding
+ * Adds all case mappings for each element in the set.
+ * This adds the full lower-, title-, and uppercase mappings as well as the full case folding
* of each existing element in the set.
+ *
+ * Unlike the “case insensitive” options, this does not perform a closure.
+ * For example, it does not add 'ſ' (U+017F long s) for 's',
+ * 'K' (U+212A Kelvin sign) for 'k', or replace set strings by their case-folded versions.
+ *
* @stable ICU 3.2
*/
- USET_ADD_CASE_MAPPINGS = 4
+ 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,
+ * which map each code point to one code point,
+ * not full Case_Folding (cf) mappings, which map some code points to multiple code points.
+ *
+ * This is designed for case-insensitive matches, for example in certain
+ * regular expression implementations where only Simple_Case_Folding mappings are used,
+ * such as in ECMAScript (JavaScript) regular expressions.
+ *
+ * @draft ICU 73
+ */
+ USET_SIMPLE_CASE_INSENSITIVE = 6
+#endif // U_HIDE_DRAFT_API
};
/**
@@ -299,7 +324,9 @@ uset_openPattern(const UChar* pattern, int32_t patternLength,
* @param patternLength the length of the pattern, or -1 if null
* terminated
* @param options bitmask for options to apply to the pattern.
- * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
+ * Valid options are USET_IGNORE_SPACE and
+ * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
* @param ec the error code
* @stable ICU 2.4
*/
@@ -414,7 +441,10 @@ uset_set(USet* set,
* The character at pattern[0] must be a '['.
* @param patternLength The length of the UChar string. -1 if NUL terminated.
* @param options A bitmask for options to apply to the pattern.
- * Valid options are USET_IGNORE_SPACE and USET_CASE_INSENSITIVE.
+ * Valid options are USET_IGNORE_SPACE and
+ * at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS,
+ * USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
* @param status Returns an error if the pattern cannot be parsed.
* @return Upon successful parse, the value is either
* the index of the character after the closing ']'
@@ -628,7 +658,6 @@ uset_removeRange(USet* set, UChar32 start, UChar32 end);
U_CAPI void U_EXPORT2
uset_removeString(USet* set, const UChar* str, int32_t strLen);
-#ifndef U_HIDE_DRAFT_API
/**
* Removes EACH of the characters in this string. Note: "ch" == {"c", "h"}
* A frozen set will not be modified.
@@ -636,11 +665,10 @@ uset_removeString(USet* set, const UChar* str, int32_t strLen);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_removeAllCodePoints(USet *set, const UChar *str, int32_t length);
-#endif // U_HIDE_DRAFT_API
/**
* Removes from this set all of its elements that are contained in the
@@ -671,7 +699,6 @@ uset_removeAll(USet* set, const USet* removeSet);
U_CAPI void U_EXPORT2
uset_retain(USet* set, UChar32 start, UChar32 end);
-#ifndef U_HIDE_DRAFT_API
/**
* Retains only the specified string from this set if it is present.
* Upon return this set will be empty if it did not contain s, or
@@ -681,7 +708,7 @@ uset_retain(USet* set, UChar32 start, UChar32 end);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_retainString(USet *set, const UChar *str, int32_t length);
@@ -693,11 +720,10 @@ uset_retainString(USet *set, const UChar *str, int32_t length);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_retainAllCodePoints(USet *set, const UChar *str, int32_t length);
-#endif // U_HIDE_DRAFT_API
/**
* Retains only the elements in this set that are contained in the
@@ -741,7 +767,6 @@ uset_compact(USet* set);
U_CAPI void U_EXPORT2
uset_complement(USet* set);
-#ifndef U_HIDE_DRAFT_API
/**
* Complements the specified range in this set. Any character in
* the range will be removed if it is in this set, or will be
@@ -753,7 +778,7 @@ uset_complement(USet* set);
* @param set the object to be modified
* @param start first character, inclusive, of range
* @param end last character, inclusive, of range
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_complementRange(USet *set, UChar32 start, UChar32 end);
@@ -766,7 +791,7 @@ uset_complementRange(USet *set, UChar32 start, UChar32 end);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_complementString(USet *set, const UChar *str, int32_t length);
@@ -778,11 +803,10 @@ uset_complementString(USet *set, const UChar *str, int32_t length);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
- * @draft ICU 69
+ * @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_complementAllCodePoints(USet *set, const UChar *str, int32_t length);
-#endif // U_HIDE_DRAFT_API
/**
* Complements in this set all elements contained in the specified
@@ -810,7 +834,7 @@ uset_clear(USet* set);
/**
* Close this set over the given attribute. For the attribute
- * USET_CASE, the result is to modify this set so that:
+ * USET_CASE_INSENSITIVE, the result is to modify this set so that:
*
* 1. For each character or string 'a' in this set, all strings or
* characters 'b' such that foldCase(a) == foldCase(b) are added
@@ -830,8 +854,10 @@ uset_clear(USet* set);
* @param set the set
*
* @param attributes bitmask for attributes to close over.
- * Currently only the USET_CASE bit is supported. Any undefined bits
- * are ignored.
+ * Valid options:
+ * At most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE.
+ * These case options are mutually exclusive.
+ * Unrelated options bits are ignored.
* @stable ICU 4.2
*/
U_CAPI void U_EXPORT2
@@ -856,15 +882,13 @@ uset_removeAllStrings(USet* set);
U_CAPI UBool U_EXPORT2
uset_isEmpty(const USet* set);
-#ifndef U_HIDE_DRAFT_API
/**
* @param set the set
* @return true if this set contains multi-character strings or the empty string.
- * @draft ICU 70
+ * @stable ICU 70
*/
U_CAPI UBool U_EXPORT2
uset_hasStrings(const USet *set);
-#endif // U_HIDE_DRAFT_API
/**
* Returns true if the given USet contains the given character.
@@ -947,18 +971,16 @@ uset_charAt(const USet* set, int32_t charIndex);
U_CAPI int32_t U_EXPORT2
uset_size(const USet* set);
-#ifndef U_HIDE_DRAFT_API
/**
* @param set the set
* @return the number of ranges in this set.
- * @draft ICU 70
+ * @stable ICU 70
* @see uset_getItemCount
* @see uset_getItem
* @see uset_size
*/
U_CAPI int32_t U_EXPORT2
uset_getRangeCount(const USet *set);
-#endif // U_HIDE_DRAFT_API
/**
* Returns the number of items in this set. An item is either a range
diff --git a/contrib/libs/icu/include/unicode/usetiter.h b/contrib/libs/icu/include/unicode/usetiter.h
index 5834c308e41..3168d3b0f6b 100644
--- a/contrib/libs/icu/include/unicode/usetiter.h
+++ b/contrib/libs/icu/include/unicode/usetiter.h
@@ -64,7 +64,7 @@ class UnicodeString;
* @author M. Davis
* @stable ICU 2.4
*/
-class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
+class U_COMMON_API UnicodeSetIterator final : public UObject {
/**
* Value of <tt>codepoint</tt> if the iterator points to a string.
* If <tt>codepoint == IS_STRING</tt>, then examine
@@ -164,14 +164,13 @@ class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
*/
const UnicodeString& getString();
-#ifndef U_HIDE_DRAFT_API
/**
* Skips over the remaining code points/ranges, if any.
* A following call to next() or nextRange() will yield a string, if there is one.
* No-op if next() would return false, or if it would yield a string anyway.
*
* @return *this
- * @draft ICU 70
+ * @stable ICU 70
* @see UnicodeSet#strings()
*/
inline UnicodeSetIterator &skipToStrings() {
@@ -181,7 +180,6 @@ class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
nextElement = 0;
return *this;
}
-#endif // U_HIDE_DRAFT_API
/**
* Advances the iteration position to the next element in the set,
diff --git a/contrib/libs/icu/include/unicode/usimplenumberformatter.h b/contrib/libs/icu/include/unicode/usimplenumberformatter.h
new file mode 100644
index 00000000000..ef89b46b9c5
--- /dev/null
+++ b/contrib/libs/icu/include/unicode/usimplenumberformatter.h
@@ -0,0 +1,305 @@
+// © 2022 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#ifndef __USIMPLENUMBERFORMATTER_H__
+#define __USIMPLENUMBERFORMATTER_H__
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_FORMATTING
+
+#include "unicode/uformattednumber.h"
+#include "unicode/unumberoptions.h"
+
+/**
+ * \file
+ * \brief C API: Simple number formatting focused on low memory and code size.
+ *
+ * These functions render locale-aware number strings but without the bells and whistles found in
+ * other number formatting APIs such as those in unumberformatter.h, like units and currencies.
+ *
+ * Example using C++ helpers:
+ *
+ * <pre>
+ * LocalUSimpleNumberFormatterPointer uformatter(usnumf_openForLocale("de-CH", status));
+ * LocalUFormattedNumberPointer uresult(unumf_openResult(status));
+ * usnumf_formatInt64(uformatter.getAlias(), 55, uresult.getAlias(), status);
+ * assertEquals("",
+ * u"55",
+ * ufmtval_getString(unumf_resultAsValue(uresult.getAlias(), status), nullptr, status));
+ * </pre>
+ *
+ * Example using pure C:
+ *
+ * <pre>
+ * UErrorCode ec = U_ZERO_ERROR;
+ * USimpleNumberFormatter* uformatter = usnumf_openForLocale("bn", &ec);
+ * USimpleNumber* unumber = usnum_openForInt64(1000007, &ec);
+ * UFormattedNumber* uresult = unumf_openResult(&ec);
+ * usnumf_format(uformatter, unumber, uresult, &ec);
+ * int32_t len;
+ * const UChar* str = ufmtval_getString(unumf_resultAsValue(uresult, &ec), &len, &ec);
+ * if (assertSuccess("Formatting end-to-end", &ec)) {
+ * assertUEquals("Should produce a result in Bangla digits", u"১০,০০,০০৭", str);
+ * }
+
+ * // Cleanup:
+ * unumf_closeResult(uresult);
+ * usnum_close(unumber);
+ * usnumf_close(uformatter);
+ * </pre>
+ */
+
+#ifndef U_HIDE_DRAFT_API
+
+
+/**
+ * An explicit sign option for a SimpleNumber.
+ *
+ * @draft ICU 73
+ */
+typedef enum USimpleNumberSign {
+ /**
+ * Render a plus sign.
+ *
+ * @draft ICU 73
+ */
+ UNUM_SIMPLE_NUMBER_PLUS_SIGN,
+ /**
+ * Render no sign.
+ *
+ * @draft ICU 73
+ */
+ UNUM_SIMPLE_NUMBER_NO_SIGN,
+ /**
+ * Render a minus sign.
+ *
+ * @draft ICU 73
+ */
+ UNUM_SIMPLE_NUMBER_MINUS_SIGN,
+} USimpleNumberSign;
+
+
+struct USimpleNumber;
+/**
+ * C-compatible version of icu::number::SimpleNumber.
+ *
+ * @draft ICU 73
+ */
+typedef struct USimpleNumber USimpleNumber;
+
+
+struct USimpleNumberFormatter;
+/**
+ * C-compatible version of icu::number::SimpleNumberFormatter.
+ *
+ * @draft ICU 73
+ */
+typedef struct USimpleNumberFormatter USimpleNumberFormatter;
+
+
+/**
+ * Creates a new USimpleNumber to be formatted with a USimpleNumberFormatter.
+ *
+ * @draft ICU 73
+ */
+U_CAPI USimpleNumber* U_EXPORT2
+usnum_openForInt64(int64_t value, UErrorCode* ec);
+
+
+/**
+ * Overwrites the value in a USimpleNumber to an int64_t.
+ *
+ * This can be used to reset the number value after formatting.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnum_setToInt64(USimpleNumber* unumber, int64_t value, UErrorCode* ec);
+
+
+/**
+ * Changes the value of the USimpleNumber by a power of 10.
+ *
+ * This function immediately mutates the inner value.
+ *
+ * @draft 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.
+ *
+ * This function immediately mutates the inner value.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnum_roundTo(USimpleNumber* unumber, int32_t power, UNumberFormatRoundingMode roundingMode, UErrorCode* ec);
+
+
+/**
+ * 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
+ */
+U_CAPI void U_EXPORT2
+usnum_setMinimumIntegerDigits(USimpleNumber* unumber, int32_t minimumIntegerDigits, UErrorCode* ec);
+
+
+/**
+ * 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
+ */
+U_CAPI void U_EXPORT2
+usnum_setMinimumFractionDigits(USimpleNumber* unumber, int32_t minimumFractionDigits, UErrorCode* ec);
+
+
+/**
+ * Truncates digits from the beginning of the number to the given maximum number of integer digits.
+ *
+ * This function immediately mutates the inner value.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnum_truncateStart(USimpleNumber* unumber, int32_t maximumIntegerDigits, UErrorCode* ec);
+
+
+/**
+ * Sets the sign of the number: an explicit plus sign, explicit minus sign, or no sign.
+ *
+ * This setting is applied upon formatting the number.
+ *
+ * NOTE: This does not support accounting sign notation.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnum_setSign(USimpleNumber* unumber, USimpleNumberSign sign, UErrorCode* ec);
+
+
+/**
+ * Creates a new USimpleNumberFormatter with all locale defaults.
+ *
+ * @draft ICU 73
+ */
+U_CAPI USimpleNumberFormatter* U_EXPORT2
+usnumf_openForLocale(const char* locale, UErrorCode* ec);
+
+
+/**
+ * Creates a new USimpleNumberFormatter, overriding the grouping strategy.
+ *
+ * @draft ICU 73
+ */
+U_CAPI USimpleNumberFormatter* U_EXPORT2
+usnumf_openForLocaleAndGroupingStrategy(
+ const char* locale, UNumberGroupingStrategy groupingStrategy, UErrorCode* ec);
+
+
+/**
+ * Formats a number using this SimpleNumberFormatter.
+ *
+ * The USimpleNumber is cleared after calling this function. It can be re-used via
+ * usnum_setToInt64.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnumf_format(
+ const USimpleNumberFormatter* uformatter,
+ USimpleNumber* unumber,
+ UFormattedNumber* uresult,
+ UErrorCode* ec);
+
+
+/**
+ * Formats an integer using this SimpleNumberFormatter.
+ *
+ * For more control over the formatting, use USimpleNumber.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnumf_formatInt64(
+ const USimpleNumberFormatter* uformatter,
+ int64_t value,
+ UFormattedNumber* uresult,
+ UErrorCode* ec);
+
+
+/**
+ * Frees the memory held by a USimpleNumber.
+ *
+ * NOTE: Normally, a USimpleNumber should be adopted by usnumf_formatAndAdoptNumber.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnum_close(USimpleNumber* unumber);
+
+
+/**
+ * Frees the memory held by a USimpleNumberFormatter.
+ *
+ * @draft ICU 73
+ */
+U_CAPI void U_EXPORT2
+usnumf_close(USimpleNumberFormatter* uformatter);
+
+
+#if U_SHOW_CPLUSPLUS_API
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUSimpleNumberPointer
+ * "Smart pointer" class; closes a USimpleNumber via usnum_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * NOTE: Normally, a USimpleNumber should be adopted by usnumf_formatAndAdoptNumber.
+ * If you use LocalUSimpleNumberPointer, call `.orphan()` when passing to that function.
+ *
+ * Usage:
+ * <pre>
+ * LocalUSimpleNumberPointer uformatter(usnumf_openForInteger(...));
+ * // no need to explicitly call usnum_close()
+ * </pre>
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @draft ICU 73
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUSimpleNumberPointer, USimpleNumber, usnum_close);
+
+/**
+ * \class LocalUSimpleNumberFormatterPointer
+ * "Smart pointer" class; closes a USimpleNumberFormatter via usnumf_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * Usage:
+ * <pre>
+ * LocalUSimpleNumberFormatterPointer uformatter(usnumf_openForLocale(...));
+ * // no need to explicitly call usnumf_close()
+ * </pre>
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @draft 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 b674c91b2c2..442655bb54b 100644
--- a/contrib/libs/icu/include/unicode/uspoof.h
+++ b/contrib/libs/icu/include/unicode/uspoof.h
@@ -35,7 +35,7 @@
/**
* \file
- * \brief Unicode Security and Spoofing Detection, C API.
+ * \brief C API: Unicode Security and Spoofing Detection
*
* <p>
* This class, based on <a href="http://unicode.org/reports/tr36">Unicode Technical Report #36</a> and
@@ -1433,7 +1433,7 @@ uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
* @param position Deprecated in ICU 51. Always returns zero.
* Originally, an out parameter for the index of the first
* string position that failed a check.
- * This parameter may be NULL.
+ * This parameter may be nullptr.
* @param status The error code, set if an error occurred while attempting to
* perform the check.
* Spoofing or security issues detected with the input string are
@@ -1460,7 +1460,7 @@ uspoof_checkUnicodeString(const USpoofChecker *sc,
* @param sc The USpoofChecker
* @param id A identifier to be checked for possible security issues.
* @param checkResult An instance of USpoofCheckResult to be filled with
- * details about the identifier. Can be NULL.
+ * details about the identifier. Can be nullptr.
* @param status The error code, set if an error occurred while attempting to
* perform the check.
* Spoofing or security issues detected with the input string are
diff --git a/contrib/libs/icu/include/unicode/ustring.h b/contrib/libs/icu/include/unicode/ustring.h
index 5452fbe09a8..03c697c7228 100644
--- a/contrib/libs/icu/include/unicode/ustring.h
+++ b/contrib/libs/icu/include/unicode/ustring.h
@@ -931,14 +931,10 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count);
# define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs)
/**@stable ICU 2.0 */
# define U_STRING_INIT(var, cs, length)
-#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16)))
+#elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || defined(U_WCHAR_IS_UTF16))
# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=L ## cs
/**@stable ICU 2.0 */
# define U_STRING_INIT(var, cs, length)
-#elif U_SIZEOF_UCHAR==1 && U_CHARSET_FAMILY==U_ASCII_FAMILY
-# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=cs
- /**@stable ICU 2.0 */
-# define U_STRING_INIT(var, cs, length)
#else
# define U_STRING_DECL(var, cs, length) static UChar var[(length)+1]
/**@stable ICU 2.0 */
diff --git a/contrib/libs/icu/include/unicode/utext.h b/contrib/libs/icu/include/unicode/utext.h
index c6d1e53a8ce..423b281631d 100644
--- a/contrib/libs/icu/include/unicode/utext.h
+++ b/contrib/libs/icu/include/unicode/utext.h
@@ -230,8 +230,8 @@ utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status);
/**
* Open a writable UText for a non-const UnicodeString.
*
- * @param ut Pointer to a UText struct. If NULL, a new UText will be created.
- * If non-NULL, must refer to an initialized UText struct, which will then
+ * @param ut Pointer to a UText struct. If nullptr, a new UText will be created.
+ * If non-nullptr, must refer to an initialized UText struct, which will then
* be reset to reference the specified input string.
* @param s A UnicodeString.
* @param status Errors are returned here.
@@ -246,8 +246,8 @@ utext_openUnicodeString(UText *ut, icu::UnicodeString *s, UErrorCode *status);
/**
* Open a UText for a const UnicodeString. The resulting UText will not be writable.
*
- * @param ut Pointer to a UText struct. If NULL, a new UText will be created.
- * If non-NULL, must refer to an initialized UText struct, which will then
+ * @param ut Pointer to a UText struct. If nullptr, a new UText will be created.
+ * If non-nullptr, must refer to an initialized UText struct, which will then
* be reset to reference the specified input string.
* @param s A const UnicodeString to be wrapped.
* @param status Errors are returned here.
@@ -261,8 +261,8 @@ utext_openConstUnicodeString(UText *ut, const icu::UnicodeString *s, UErrorCode
/**
* Open a writable UText implementation for an ICU Replaceable object.
- * @param ut Pointer to a UText struct. If NULL, a new UText will be created.
- * If non-NULL, must refer to an already existing UText, which will then
+ * @param ut Pointer to a UText struct. If nullptr, a new UText will be created.
+ * If non-nullptr, must refer to an already existing UText, which will then
* be reset to reference the specified replaceable text.
* @param rep A Replaceable text object.
* @param status Errors are returned here.
@@ -276,8 +276,8 @@ utext_openReplaceable(UText *ut, icu::Replaceable *rep, UErrorCode *status);
/**
* Open a UText implementation over an ICU CharacterIterator.
- * @param ut Pointer to a UText struct. If NULL, a new UText will be created.
- * If non-NULL, must refer to an already existing UText, which will then
+ * @param ut Pointer to a UText struct. If nullptr, a new UText will be created.
+ * If non-nullptr, must refer to an already existing UText, which will then
* be reset to reference the specified replaceable text.
* @param ci A Character Iterator.
* @param status Errors are returned here.
diff --git a/contrib/libs/icu/include/unicode/utf_old.h b/contrib/libs/icu/include/unicode/utf_old.h
index 160f5ad0a9f..6b868c72809 100644
--- a/contrib/libs/icu/include/unicode/utf_old.h
+++ b/contrib/libs/icu/include/unicode/utf_old.h
@@ -293,10 +293,10 @@ typedef int32_t UTextOffset;
#ifdef U_UTF8_IMPL
// No forward declaration if compiling utf_impl.cpp, which defines utf8_countTrailBytes.
#elif defined(U_STATIC_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION)
-U_CFUNC const uint8_t utf8_countTrailBytes[];
+U_CAPI const uint8_t utf8_countTrailBytes[];
#else
-U_CFUNC U_IMPORT const uint8_t utf8_countTrailBytes[]; /* U_IMPORT2? */ /*U_IMPORT*/
-#endif
+U_CFUNC U_IMPORT const uint8_t utf8_countTrailBytes[];
+#endif
/**
* Count the trail bytes for a UTF-8 lead byte.
diff --git a/contrib/libs/icu/include/unicode/uvernum.h b/contrib/libs/icu/include/unicode/uvernum.h
index 42e8865d7e3..fc784b2492f 100644
--- a/contrib/libs/icu/include/unicode/uvernum.h
+++ b/contrib/libs/icu/include/unicode/uvernum.h
@@ -31,19 +31,12 @@
* renaming macro, and copyright
*
* The following files need to be updated as well, which can be done
- * by running the UNIX makefile target 'update-windows-makefiles' in icu/source.
+ * by running the UNIX makefile target 'update-windows-makefiles' in icu4c/source.
*
- *
- * source/common/common_uwp.vcxproj
- * source/common/common.vcxproj - update 'Output file name' on the link tab so
- * that it contains the new major/minor combination
- * source/i18n/i18n.vcxproj - same as for the common.vcxproj
- * source/i18n/i18n_uwp.vcxproj - same as for the common_uwp.vcxproj
- * source/layoutex/layoutex.vcproj - same
- * source/stubdata/stubdata.vcproj - same as for the common.vcxproj
- * source/io/io.vcproj - same as for the common.vcxproj
+ * source/allinone/Build.Windows.IcuVersion.props - Update the IcuMajorVersion
* source/data/makedata.mak - change U_ICUDATA_NAME so that it contains
- * the new major/minor combination and the Unicode version.
+ * the new major/minor combination, and UNICODE_VERSION
+ * for the Unicode version.
*/
#ifndef UVERNUM_H
@@ -60,13 +53,13 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
-#define U_ICU_VERSION_MAJOR_NUM 70
+#define U_ICU_VERSION_MAJOR_NUM 73
/** 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 1
+#define U_ICU_VERSION_MINOR_NUM 2
/** The current ICU patchlevel version as an integer.
* This value will change in the subsequent releases of ICU
@@ -86,7 +79,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
-#define U_ICU_VERSION_SUFFIX _70
+#define U_ICU_VERSION_SUFFIX _73
/**
* \def U_DEF2_ICU_ENTRY_POINT_RENAME
@@ -139,7 +132,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
-#define U_ICU_VERSION "70.1"
+#define U_ICU_VERSION "73.2"
/**
* The current ICU library major version number as a string, for library name suffixes.
@@ -152,13 +145,13 @@
*
* @stable ICU 2.6
*/
-#define U_ICU_VERSION_SHORT "70"
+#define U_ICU_VERSION_SHORT "73"
#ifndef U_HIDE_INTERNAL_API
/** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only
**/
-#define U_ICU_DATA_VERSION "70.1"
+#define U_ICU_DATA_VERSION "73.2"
#endif /* U_HIDE_INTERNAL_API */
/*===========================================================================
diff --git a/contrib/libs/icu/include/unicode/vtzone.h b/contrib/libs/icu/include/unicode/vtzone.h
index e7d2f515410..93f4ecb9395 100644
--- a/contrib/libs/icu/include/unicode/vtzone.h
+++ b/contrib/libs/icu/include/unicode/vtzone.h
@@ -88,7 +88,7 @@ public:
* Create a <code>VTimeZone</code> instance by the time zone ID.
* @param ID The time zone ID, such as America/New_York
* @return A <code>VTimeZone</code> object initialized by the time zone ID,
- * or NULL when the ID is unknown.
+ * or nullptr when the ID is unknown.
* @stable ICU 3.8
*/
static VTimeZone* createVTimeZoneByID(const UnicodeString& ID);
@@ -109,7 +109,7 @@ public:
* @param vtzdata The string including VTIMEZONE data block
* @param status Output param to filled in with a success or an error.
* @return A <code>VTimeZone</code> initialized by the VTIMEZONE data or
- * NULL if failed to load the rule from the VTIMEZONE data.
+ * nullptr if failed to load the rule from the VTIMEZONE data.
* @stable ICU 3.8
*/
static VTimeZone* createVTimeZone(const UnicodeString& vtzdata, UErrorCode& status);
@@ -264,16 +264,14 @@ public:
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& ec) const override;
-#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
- * @draft ICU 69
+ * @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
-#endif /* U_FORCE_HIDE_DRAFT_API */
/**
* Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
@@ -361,7 +359,7 @@ public:
/**
* Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
* which represent time transitions for this time zone. On successful return,
- * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and
+ * the argument initial points to non-nullptr <code>InitialTimeZoneRule</code> and
* the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code>
* instances up to the size specified by trscount. The results are referencing the
* rule instance held by this time zone instance. Therefore, after this time zone
@@ -384,7 +382,6 @@ private:
* Default constructor.
*/
VTimeZone();
- static VTimeZone* createVTimeZone(VTZReader* reader);
void write(VTZWriter& writer, UErrorCode& status) const;
void write(UDate start, VTZWriter& writer, UErrorCode& status) const;
void writeSimple(UDate time, VTZWriter& writer, UErrorCode& status) const;
diff --git a/contrib/libs/icu/io/locbund.cpp b/contrib/libs/icu/io/locbund.cpp
index 46c97bc043e..3f6d6309ac0 100644
--- a/contrib/libs/icu/io/locbund.cpp
+++ b/contrib/libs/icu/io/locbund.cpp
@@ -35,13 +35,13 @@
static UNumberFormat *gPosixNumberFormat[ULOCALEBUNDLE_NUMBERFORMAT_COUNT];
U_CDECL_BEGIN
-static UBool U_CALLCONV locbund_cleanup(void) {
+static UBool U_CALLCONV locbund_cleanup() {
int32_t style;
for (style = 0; style < ULOCALEBUNDLE_NUMBERFORMAT_COUNT; style++) {
unum_close(gPosixNumberFormat[style]);
- gPosixNumberFormat[style] = NULL;
+ gPosixNumberFormat[style] = nullptr;
}
- return TRUE;
+ return true;
}
U_CDECL_END
@@ -49,17 +49,17 @@ static inline UNumberFormat * copyInvariantFormatter(ULocaleBundle *result, UNum
U_NAMESPACE_USE
static UMutex gLock;
Mutex lock(&gLock);
- if (result->fNumberFormat[style-1] == NULL) {
- if (gPosixNumberFormat[style-1] == NULL) {
+ if (result->fNumberFormat[style-1] == nullptr) {
+ if (gPosixNumberFormat[style-1] == nullptr) {
UErrorCode status = U_ZERO_ERROR;
- UNumberFormat *formatAlias = unum_open(style, NULL, 0, "en_US_POSIX", NULL, &status);
+ UNumberFormat *formatAlias = unum_open(style, nullptr, 0, "en_US_POSIX", nullptr, &status);
if (U_SUCCESS(status)) {
gPosixNumberFormat[style-1] = formatAlias;
ucln_io_registerCleanup(UCLN_IO_LOCBUND, locbund_cleanup);
}
}
/* Copy the needed formatter. */
- if (gPosixNumberFormat[style-1] != NULL) {
+ if (gPosixNumberFormat[style-1] != nullptr) {
UErrorCode status = U_ZERO_ERROR;
result->fNumberFormat[style-1] = unum_clone(gPosixNumberFormat[style-1], &status);
}
@@ -75,7 +75,7 @@ u_locbund_init(ULocaleBundle *result, const char *loc)
if(result == 0)
return 0;
- if (loc == NULL) {
+ if (loc == nullptr) {
loc = uloc_getDefault();
}
@@ -124,11 +124,11 @@ u_locbund_clone(const ULocaleBundle *bundle)
if (result->fNumberFormat[styleIdx]) {
result->fNumberFormat[styleIdx] = unum_clone(bundle->fNumberFormat[styleIdx], &status);
if (U_FAILURE(status)) {
- result->fNumberFormat[styleIdx] = NULL;
+ result->fNumberFormat[styleIdx] = nullptr;
}
}
else {
- result->fNumberFormat[styleIdx] = NULL;
+ result->fNumberFormat[styleIdx] = nullptr;
}
}
result->fDateFormat = (bundle->fDateFormat == 0 ? 0 :
@@ -159,19 +159,19 @@ u_locbund_close(ULocaleBundle *bundle)
U_CAPI UNumberFormat *
u_locbund_getNumberFormat(ULocaleBundle *bundle, UNumberFormatStyle style)
{
- UNumberFormat *formatAlias = NULL;
+ UNumberFormat *formatAlias = nullptr;
if (style > UNUM_IGNORE) {
formatAlias = bundle->fNumberFormat[style-1];
- if (formatAlias == NULL) {
+ if (formatAlias == nullptr) {
if (bundle->isInvariantLocale) {
formatAlias = copyInvariantFormatter(bundle, style);
}
else {
UErrorCode status = U_ZERO_ERROR;
- formatAlias = unum_open(style, NULL, 0, bundle->fLocale, NULL, &status);
+ formatAlias = unum_open(style, nullptr, 0, bundle->fLocale, nullptr, &status);
if (U_FAILURE(status)) {
unum_close(formatAlias);
- formatAlias = NULL;
+ formatAlias = nullptr;
}
else {
bundle->fNumberFormat[style-1] = formatAlias;
diff --git a/contrib/libs/icu/io/sprintf.cpp b/contrib/libs/icu/io/sprintf.cpp
index 3a593abb480..48d9bcc27c5 100644
--- a/contrib/libs/icu/io/sprintf.cpp
+++ b/contrib/libs/icu/io/sprintf.cpp
@@ -37,10 +37,16 @@
/* u_minstrncpy copies the minimum number of code units of (count or output->available) */
static int32_t
u_sprintf_write(void *context,
- const UChar *str,
+ const char16_t *str,
int32_t count)
{
u_localized_print_string *output = (u_localized_print_string *)context;
+
+ /* just calculating buffer size */
+ if (output->str == 0) {
+ return count;
+ }
+
int32_t size = ufmt_min(count, output->available);
u_strncpy(output->str + (output->len - output->available), str, size);
@@ -51,13 +57,19 @@ u_sprintf_write(void *context,
static int32_t
u_sprintf_pad_and_justify(void *context,
const u_printf_spec_info *info,
- const UChar *result,
+ const char16_t *result,
int32_t resultLen)
{
u_localized_print_string *output = (u_localized_print_string *)context;
int32_t written = 0;
int32_t lengthOfResult = resultLen;
+ /* just calculating buffer size */
+ if (output->str == 0 &&
+ info->fWidth != -1 && resultLen < info->fWidth) {
+ return info->fWidth;
+ }
+
resultLen = ufmt_min(resultLen, output->available);
/* pad and justify, if needed */
@@ -100,7 +112,7 @@ u_sprintf_pad_and_justify(void *context,
}
U_CAPI int32_t U_EXPORT2
-u_sprintf(UChar *buffer,
+u_sprintf(char16_t *buffer,
const char *patternSpecification,
... )
{
@@ -115,8 +127,8 @@ u_sprintf(UChar *buffer,
}
U_CAPI int32_t U_EXPORT2
-u_sprintf_u(UChar *buffer,
- const UChar *patternSpecification,
+u_sprintf_u(char16_t *buffer,
+ const char16_t *patternSpecification,
... )
{
va_list ap;
@@ -130,7 +142,7 @@ u_sprintf_u(UChar *buffer,
}
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_vsprintf(UChar *buffer,
+u_vsprintf(char16_t *buffer,
const char *patternSpecification,
va_list ap)
{
@@ -138,7 +150,7 @@ u_vsprintf(UChar *buffer,
}
U_CAPI int32_t U_EXPORT2
-u_snprintf(UChar *buffer,
+u_snprintf(char16_t *buffer,
int32_t count,
const char *patternSpecification,
... )
@@ -154,9 +166,9 @@ u_snprintf(UChar *buffer,
}
U_CAPI int32_t U_EXPORT2
-u_snprintf_u(UChar *buffer,
+u_snprintf_u(char16_t *buffer,
int32_t count,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
... )
{
va_list ap;
@@ -170,19 +182,19 @@ u_snprintf_u(UChar *buffer,
}
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_vsnprintf(UChar *buffer,
+u_vsnprintf(char16_t *buffer,
int32_t count,
const char *patternSpecification,
va_list ap)
{
int32_t written;
- UChar *pattern;
- UChar patBuffer[UFMT_DEFAULT_BUFFER_SIZE];
+ char16_t *pattern;
+ char16_t patBuffer[UFMT_DEFAULT_BUFFER_SIZE];
int32_t size = (int32_t)strlen(patternSpecification) + 1;
/* convert from the default codepage to Unicode */
if (size >= (int32_t)MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
- pattern = (UChar *)uprv_malloc(size * sizeof(UChar));
+ pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t));
if(pattern == 0) {
return 0;
}
@@ -204,8 +216,8 @@ u_vsnprintf(UChar *buffer,
}
U_CAPI int32_t U_EXPORT2
-u_vsprintf_u(UChar *buffer,
- const UChar *patternSpecification,
+u_vsprintf_u(char16_t *buffer,
+ const char16_t *patternSpecification,
va_list ap)
{
return u_vsnprintf_u(buffer, INT32_MAX, patternSpecification, ap);
@@ -217,9 +229,9 @@ static const u_printf_stream_handler g_sprintf_stream_handler = {
};
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_vsnprintf_u(UChar *buffer,
+u_vsnprintf_u(char16_t *buffer,
int32_t count,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
va_list ap)
{
int32_t written = 0; /* haven't written anything yet */
diff --git a/contrib/libs/icu/io/sscanf.cpp b/contrib/libs/icu/io/sscanf.cpp
index 47c0bace27e..8940127eb1e 100644
--- a/contrib/libs/icu/io/sscanf.cpp
+++ b/contrib/libs/icu/io/sscanf.cpp
@@ -33,7 +33,7 @@
U_CAPI int32_t U_EXPORT2
-u_sscanf(const UChar *buffer,
+u_sscanf(const char16_t *buffer,
const char *patternSpecification,
... )
{
@@ -48,8 +48,8 @@ u_sscanf(const UChar *buffer,
}
U_CAPI int32_t U_EXPORT2
-u_sscanf_u(const UChar *buffer,
- const UChar *patternSpecification,
+u_sscanf_u(const char16_t *buffer,
+ const char16_t *patternSpecification,
... )
{
va_list ap;
@@ -63,18 +63,18 @@ u_sscanf_u(const UChar *buffer,
}
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_vsscanf(const UChar *buffer,
+u_vsscanf(const char16_t *buffer,
const char *patternSpecification,
va_list ap)
{
int32_t converted;
- UChar *pattern;
- UChar patBuffer[UFMT_DEFAULT_BUFFER_SIZE];
+ char16_t *pattern;
+ char16_t patBuffer[UFMT_DEFAULT_BUFFER_SIZE];
int32_t size = (int32_t)uprv_strlen(patternSpecification) + 1;
/* convert from the default codepage to Unicode */
if (size >= (int32_t)MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
- pattern = (UChar *)uprv_malloc(size * sizeof(UChar));
+ pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t));
if(pattern == 0) {
return 0;
}
@@ -96,22 +96,22 @@ u_vsscanf(const UChar *buffer,
}
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_vsscanf_u(const UChar *buffer,
- const UChar *patternSpecification,
+u_vsscanf_u(const char16_t *buffer,
+ const char16_t *patternSpecification,
va_list ap)
{
int32_t converted;
UFILE inStr;
- inStr.fConverter = NULL;
- inStr.fFile = NULL;
- inStr.fOwnFile = FALSE;
+ inStr.fConverter = nullptr;
+ inStr.fFile = nullptr;
+ inStr.fOwnFile = false;
#if !UCONFIG_NO_TRANSLITERATION
- inStr.fTranslit = NULL;
+ inStr.fTranslit = nullptr;
#endif
inStr.fUCBuffer[0] = 0;
- inStr.str.fBuffer = (UChar *)buffer;
- inStr.str.fPos = (UChar *)buffer;
+ inStr.str.fBuffer = (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) {
diff --git a/contrib/libs/icu/io/ucln_io.cpp b/contrib/libs/icu/io/ucln_io.cpp
index c1307b5d97f..e2ddb358700 100644
--- a/contrib/libs/icu/io/ucln_io.cpp
+++ b/contrib/libs/icu/io/ucln_io.cpp
@@ -36,7 +36,7 @@ static const char copyright[] = U_COPYRIGHT_STRING;
static cleanupFunc *gCleanupFunctions[UCLN_IO_COUNT];
-static UBool U_CALLCONV io_cleanup(void)
+static UBool U_CALLCONV io_cleanup()
{
int32_t libType = UCLN_IO_START;
@@ -45,13 +45,13 @@ static UBool U_CALLCONV io_cleanup(void)
if (gCleanupFunctions[libType])
{
gCleanupFunctions[libType]();
- gCleanupFunctions[libType] = NULL;
+ gCleanupFunctions[libType] = nullptr;
}
}
#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
ucln_unRegisterAutomaticCleanup();
#endif
- return TRUE;
+ return true;
}
void ucln_io_registerCleanup(ECleanupIOType type,
diff --git a/contrib/libs/icu/io/ufile.cpp b/contrib/libs/icu/io/ufile.cpp
index 607601935cf..9e87e4058e3 100644
--- a/contrib/libs/icu/io/ufile.cpp
+++ b/contrib/libs/icu/io/ufile.cpp
@@ -21,11 +21,18 @@
*/
#include "unicode/platform.h"
-#if defined(__GNUC__) && !defined(__clang__) && defined(__STRICT_ANSI__)
-// g++, fileno isn't defined if __STRICT_ANSI__ is defined.
-// clang fails to compile the <string> header unless __STRICT_ANSI__ is defined.
-// __GNUC__ is set by both gcc and clang.
-#undef __STRICT_ANSI__
+#if U_PLATFORM == U_PF_CYGWIN && defined(__STRICT_ANSI__)
+/* GCC on cygwin (not msys2) with -std=c++11 or newer has stopped defining fileno,
+ unless gcc extensions are enabled (-std=gnu11).
+ fileno is POSIX, but is not standard ANSI C.
+ It has always been a GCC extension, which everyone used until recently.
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40278#c7
+
+ For cygwin/mingw, the FILE* pointer isn't opaque, so we can just use a simple macro.
+ Suggested fix from: https://github.com/gabime/spdlog/issues/1581#issuecomment-650323251
+*/
+#define _fileno(__F) ((__F)->_file)
+#define fileno(__F) _fileno(__F)
#endif
#include "locmap.h"
@@ -45,7 +52,10 @@
#include "cmemory.h"
#if U_PLATFORM_USES_ONLY_WIN32_API && !defined(fileno)
-/* Windows likes to rename Unix-like functions */
+/* We will just create an alias to Microsoft's implementation,
+ which is prefixed with _ as they deprecated non-ansi-standard POSIX function names.
+ https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/posix-fileno?view=msvc-170
+*/
#define fileno _fileno
#endif
@@ -58,11 +68,11 @@ finit_owner(FILE *f,
{
UErrorCode status = U_ZERO_ERROR;
UFILE *result;
- if(f == NULL) {
+ if(f == nullptr) {
return 0;
}
result = (UFILE*) uprv_malloc(sizeof(UFILE));
- if(result == NULL) {
+ if(result == nullptr) {
return 0;
}
@@ -84,10 +94,10 @@ finit_owner(FILE *f,
#endif
/* If the codepage is not "" use the ucnv_open default behavior */
- if(codepage == NULL || *codepage != '\0') {
+ if(codepage == nullptr || *codepage != '\0') {
result->fConverter = ucnv_open(codepage, &status);
}
- /* else result->fConverter is already memset'd to NULL. */
+ /* else result->fConverter is already memset'd to nullptr. */
if(U_SUCCESS(status)) {
result->fOwnFile = takeOwnership;
@@ -98,7 +108,7 @@ finit_owner(FILE *f,
#endif
/* DO NOT fclose here!!!!!! */
uprv_free(result);
- result = NULL;
+ result = nullptr;
}
return result;
@@ -109,7 +119,7 @@ u_finit(FILE *f,
const char *locale,
const char *codepage)
{
- return finit_owner(f, locale, codepage, FALSE);
+ return finit_owner(f, locale, codepage, false);
}
U_CAPI UFILE* U_EXPORT2
@@ -117,7 +127,7 @@ u_fadopt(FILE *f,
const char *locale,
const char *codepage)
{
- return finit_owner(f, locale, codepage, TRUE);
+ return finit_owner(f, locale, codepage, true);
}
U_CAPI UFILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
@@ -132,7 +142,7 @@ u_fopen(const char *filename,
return 0;
}
- result = finit_owner(systemFile, locale, codepage, TRUE);
+ result = finit_owner(systemFile, locale, codepage, true);
if (!result) {
/* Something bad happened.
@@ -158,7 +168,7 @@ u_fopen(const char *filename,
#endif
U_CAPI UFILE* U_EXPORT2
-u_fopen_u(const UChar *filename,
+u_fopen_u(const char16_t *filename,
const char *perm,
const char *locale,
const char *codepage)
@@ -186,14 +196,14 @@ u_fopen_u(const UChar *filename,
wchar_t wperm[40] = {};
size_t retVal;
mbstowcs_s(&retVal, wperm, UPRV_LENGTHOF(wperm), perm, _TRUNCATE);
- FILE *systemFile = _wfopen(reinterpret_cast<const wchar_t *>(filename), wperm); // may return NULL for long filename
+ FILE *systemFile = _wfopen(reinterpret_cast<const wchar_t *>(filename), wperm); // may return nullptr for long filename
if (systemFile) {
- result = finit_owner(systemFile, locale, codepage, TRUE);
+ result = finit_owner(systemFile, locale, codepage, true);
}
if (!result && systemFile) {
/* Something bad happened.
Maybe the converter couldn't be opened.
- Bu do not fclose(systemFile) if systemFile is NULL. */
+ Bu do not fclose(systemFile) if systemFile is nullptr. */
fclose(systemFile);
}
}
@@ -206,20 +216,20 @@ u_fopen_u(const UChar *filename,
U_CAPI UFILE* U_EXPORT2
-u_fstropen(UChar *stringBuf,
+u_fstropen(char16_t *stringBuf,
int32_t capacity,
const char *locale)
{
UFILE *result;
if (capacity < 0) {
- return NULL;
+ return nullptr;
}
result = (UFILE*) uprv_malloc(sizeof(UFILE));
/* Null pointer test */
- if (result == NULL) {
- return NULL; /* Just get out. */
+ if (result == nullptr) {
+ return nullptr; /* Just get out. */
}
uprv_memset(result, 0, sizeof(UFILE));
result->str.fBuffer = stringBuf;
@@ -242,11 +252,11 @@ U_CAPI UBool U_EXPORT2
u_feof(UFILE *f)
{
UBool endOfBuffer;
- if (f == NULL) {
- return TRUE;
+ if (f == nullptr) {
+ return true;
}
endOfBuffer = (UBool)(f->str.fPos >= f->str.fLimit);
- if (f->fFile != NULL) {
+ if (f->fFile != nullptr) {
return endOfBuffer && feof(f->fFile);
}
return endOfBuffer;
@@ -329,7 +339,7 @@ U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov
u_fgetcodepage(UFILE *file)
{
UErrorCode status = U_ZERO_ERROR;
- const char *codepage = NULL;
+ const char *codepage = nullptr;
if (file->fConverter) {
codepage = ucnv_getName(file->fConverter, &status);
diff --git a/contrib/libs/icu/io/ufmt_cmn.cpp b/contrib/libs/icu/io/ufmt_cmn.cpp
index a475175f378..3d8f6413d8a 100644
--- a/contrib/libs/icu/io/ufmt_cmn.cpp
+++ b/contrib/libs/icu/io/ufmt_cmn.cpp
@@ -38,7 +38,7 @@
#define UPPERCASE_Z 0x005A
int
-ufmt_digitvalue(UChar c)
+ufmt_digitvalue(char16_t c)
{
if( ((c>=DIGIT_0)&&(c<=DIGIT_9)) ||
((c>=LOWERCASE_A)&&(c<=LOWERCASE_Z)) ||
@@ -53,7 +53,7 @@ ufmt_digitvalue(UChar c)
}
UBool
-ufmt_isdigit(UChar c,
+ufmt_isdigit(char16_t c,
int32_t radix)
{
int digitVal = ufmt_digitvalue(c);
@@ -65,7 +65,7 @@ ufmt_isdigit(UChar c,
#define TO_LC_DIGIT(a) a <= 9 ? (DIGIT_0 + a) : (0x0057 + a)
void
-ufmt_64tou(UChar *buffer,
+ufmt_64tou(char16_t *buffer,
int32_t *len,
uint64_t value,
uint8_t radix,
@@ -74,12 +74,12 @@ ufmt_64tou(UChar *buffer,
{
int32_t length = 0;
uint32_t digit;
- UChar *left, *right, temp;
+ char16_t *left, *right, temp;
do {
digit = (uint32_t)(value % radix);
value = value / radix;
- buffer[length++] = (UChar)(uselower ? TO_LC_DIGIT(digit)
+ buffer[length++] = (char16_t)(uselower ? TO_LC_DIGIT(digit)
: TO_UC_DIGIT(digit));
} while(value);
@@ -102,7 +102,7 @@ ufmt_64tou(UChar *buffer,
}
void
-ufmt_ptou(UChar *buffer,
+ufmt_ptou(char16_t *buffer,
int32_t *len,
void *value,
UBool uselower)
@@ -134,11 +134,11 @@ ufmt_ptou(UChar *buffer,
}
int64_t
-ufmt_uto64(const UChar *buffer,
+ufmt_uto64(const char16_t *buffer,
int32_t *len,
int8_t radix)
{
- const UChar *limit;
+ const char16_t *limit;
int32_t count;
uint64_t result;
@@ -165,7 +165,7 @@ ufmt_uto64(const UChar *buffer,
#define NIBBLE_PER_BYTE 2
void *
-ufmt_utop(const UChar *buffer,
+ufmt_utop(const char16_t *buffer,
int32_t *len)
{
int32_t count, resultIdx, incVal, offset;
@@ -178,7 +178,7 @@ ufmt_utop(const UChar *buffer,
/* initialize variables */
count = 0;
offset = 0;
- result.ptr = NULL;
+ result.ptr = nullptr;
/* Skip the leading zeros */
while(buffer[count] == DIGIT_0 || u_isspace(buffer[count])) {
@@ -223,11 +223,11 @@ ufmt_utop(const UChar *buffer,
return result.ptr;
}
-UChar*
+char16_t*
ufmt_defaultCPToUnicode(const char *s, int32_t sSize,
- UChar *target, int32_t tSize)
+ char16_t *target, int32_t tSize)
{
- UChar *alias;
+ char16_t *alias;
UErrorCode status = U_ZERO_ERROR;
UConverter *defConverter = u_getDefaultConverter(&status);
@@ -243,7 +243,7 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize,
alias = target;
ucnv_toUnicode(defConverter, &alias, alias + tSize, &s, s + sSize - 1,
- NULL, TRUE, &status);
+ nullptr, true, &status);
/* add the null terminator */
diff --git a/contrib/libs/icu/io/uprintf.cpp b/contrib/libs/icu/io/uprintf.cpp
index 3c9effaadaf..7effa61993f 100644
--- a/contrib/libs/icu/io/uprintf.cpp
+++ b/contrib/libs/icu/io/uprintf.cpp
@@ -40,22 +40,22 @@
U_NAMESPACE_USE
-static UFILE *gStdOut = NULL;
-static UInitOnce gStdOutInitOnce = U_INITONCE_INITIALIZER;
+static UFILE *gStdOut = nullptr;
+static UInitOnce gStdOutInitOnce {};
-static UBool U_CALLCONV uprintf_cleanup(void)
+static UBool U_CALLCONV uprintf_cleanup()
{
- if (gStdOut != NULL) {
+ if (gStdOut != nullptr) {
u_fclose(gStdOut);
- gStdOut = NULL;
+ gStdOut = nullptr;
}
gStdOutInitOnce.reset();
- return TRUE;
+ return true;
}
static void U_CALLCONV u_stdout_init() {
- U_ASSERT(gStdOut == NULL);
- gStdOut = u_finit(stdout, NULL, NULL);
+ U_ASSERT(gStdOut == nullptr);
+ gStdOut = u_finit(stdout, nullptr, nullptr);
ucln_io_registerCleanup(UCLN_IO_PRINTF, &uprintf_cleanup);
}
@@ -68,7 +68,7 @@ u_get_stdout()
static int32_t U_EXPORT2
u_printf_write(void *context,
- const UChar *str,
+ const char16_t *str,
int32_t count)
{
return u_file_write(str, count, (UFILE *)context);
@@ -77,7 +77,7 @@ u_printf_write(void *context,
static int32_t
u_printf_pad_and_justify(void *context,
const u_printf_spec_info *info,
- const UChar *result,
+ const char16_t *result,
int32_t resultLen)
{
UFILE *output = (UFILE *)context;
@@ -138,7 +138,7 @@ u_printf(const char *patternSpecification,
U_CAPI int32_t U_EXPORT2
u_fprintf_u( UFILE *f,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
... )
{
va_list ap;
@@ -152,7 +152,7 @@ u_fprintf_u( UFILE *f,
}
U_CAPI int32_t U_EXPORT2
-u_printf_u(const UChar *patternSpecification,
+u_printf_u(const char16_t *patternSpecification,
...)
{
va_list ap;
@@ -169,13 +169,13 @@ u_vfprintf( UFILE *f,
va_list ap)
{
int32_t count;
- UChar *pattern;
- UChar buffer[UFMT_DEFAULT_BUFFER_SIZE];
+ char16_t *pattern;
+ char16_t buffer[UFMT_DEFAULT_BUFFER_SIZE];
size_t size = strlen(patternSpecification) + 1;
/* convert from the default codepage to Unicode */
if (size >= MAX_UCHAR_BUFFER_SIZE(buffer)) {
- pattern = (UChar *)uprv_malloc(size * sizeof(UChar));
+ pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t));
if(pattern == 0) {
return 0;
}
@@ -203,13 +203,13 @@ static const u_printf_stream_handler g_stream_handler = {
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
u_vfprintf_u( UFILE *f,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
va_list ap)
{
int32_t written = 0; /* haven't written anything yet */
/* parse and print the whole format string */
- u_printf_parse(&g_stream_handler, patternSpecification, f, NULL, &f->str.fBundle, &written, ap);
+ u_printf_parse(&g_stream_handler, patternSpecification, f, nullptr, &f->str.fBundle, &written, ap);
/* return # of UChars written */
return written;
diff --git a/contrib/libs/icu/io/uprntf_p.cpp b/contrib/libs/icu/io/uprntf_p.cpp
index 1fbaf06c957..399d2dc7511 100644
--- a/contrib/libs/icu/io/uprntf_p.cpp
+++ b/contrib/libs/icu/io/uprntf_p.cpp
@@ -71,7 +71,7 @@
#define UFMT_USTRING {ufmt_ustring, u_printf_ustring_handler}
-#define UFMT_EMPTY {ufmt_empty, NULL}
+#define UFMT_EMPTY {ufmt_empty, nullptr}
/**
* A u_printf handler function.
@@ -115,15 +115,15 @@ typedef struct u_printf_spec {
#define UPRINTF_BUFFER_SIZE 1024
#define UPRINTF_SYMBOL_BUFFER_SIZE 8
-static const UChar gNullStr[] = {0x28, 0x6E, 0x75, 0x6C, 0x6C, 0x29, 0}; /* "(null)" */
-static const UChar gSpaceStr[] = {0x20, 0}; /* " " */
+static const char16_t gNullStr[] = {0x28, 0x6E, 0x75, 0x6C, 0x6C, 0x29, 0}; /* "(null)" */
+static const char16_t gSpaceStr[] = {0x20, 0}; /* " " */
/* Sets the sign of a format based on u_printf_spec_info */
/* TODO: Is setting the prefix symbol to a positive sign a good idea in all locales? */
static void
u_printf_set_sign(UNumberFormat *format,
const u_printf_spec_info *info,
- UChar *prefixBuffer,
+ char16_t *prefixBuffer,
int32_t *prefixBufLen,
UErrorCode *status)
{
@@ -139,7 +139,7 @@ u_printf_set_sign(UNumberFormat *format,
unum_setTextAttribute(format, UNUM_POSITIVE_PREFIX, gSpaceStr, 1, status);
}
else {
- UChar plusSymbol[UPRINTF_SYMBOL_BUFFER_SIZE];
+ char16_t plusSymbol[UPRINTF_SYMBOL_BUFFER_SIZE];
int32_t symbolLen;
symbolLen = unum_getSymbol(format,
@@ -162,7 +162,7 @@ u_printf_set_sign(UNumberFormat *format,
static void
u_printf_reset_sign(UNumberFormat *format,
const u_printf_spec_info *info,
- UChar *prefixBuffer,
+ char16_t *prefixBuffer,
int32_t *prefixBufLen,
UErrorCode *status)
{
@@ -187,7 +187,7 @@ u_printf_simple_percent_handler(const u_printf_stream_handler *handler,
(void)formatBundle;
(void)info;
(void)args;
- static const UChar PERCENT[] = { UP_PERCENT };
+ static const char16_t PERCENT[] = { UP_PERCENT };
/* put a single '%' onto the output */
return handler->write(context, PERCENT, 1);
@@ -202,8 +202,8 @@ u_printf_string_handler(const u_printf_stream_handler *handler,
const ufmt_args *args)
{
(void)formatBundle;
- UChar *s;
- UChar buffer[UFMT_DEFAULT_BUFFER_SIZE];
+ char16_t *s;
+ char16_t buffer[UFMT_DEFAULT_BUFFER_SIZE];
int32_t len, written;
int32_t argSize;
const char *arg = (const char*)(args[0].ptrValue);
@@ -213,9 +213,9 @@ u_printf_string_handler(const u_printf_stream_handler *handler,
argSize = (int32_t)strlen(arg) + 1;
if (argSize >= MAX_UCHAR_BUFFER_SIZE(buffer)) {
s = ufmt_defaultCPToUnicode(arg, argSize,
- (UChar *)uprv_malloc(MAX_UCHAR_BUFFER_NEEDED(argSize)),
+ (char16_t *)uprv_malloc(MAX_UCHAR_BUFFER_NEEDED(argSize)),
MAX_UCHAR_BUFFER_NEEDED(argSize));
- if(s == NULL) {
+ if(s == nullptr) {
return 0;
}
}
@@ -225,7 +225,7 @@ u_printf_string_handler(const u_printf_stream_handler *handler,
}
}
else {
- s = (UChar *)gNullStr;
+ s = (char16_t *)gNullStr;
}
len = u_strlen(s);
@@ -253,7 +253,7 @@ u_printf_char_handler(const u_printf_stream_handler *handler,
const ufmt_args *args)
{
(void)formatBundle;
- UChar s[U16_MAX_LENGTH+1];
+ char16_t s[U16_MAX_LENGTH+1];
int32_t len = 1, written;
unsigned char arg = (unsigned char)(args[0].int64Value);
@@ -283,8 +283,8 @@ u_printf_double_handler(const u_printf_stream_handler *handler,
{
double num = (double) (args[0].doubleValue);
UNumberFormat *format;
- UChar result[UPRINTF_BUFFER_SIZE];
- UChar prefixBuffer[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
+ char16_t prefixBuffer[UPRINTF_BUFFER_SIZE];
int32_t prefixBufferLen = sizeof(prefixBuffer);
int32_t minDecimalDigits;
int32_t maxDecimalDigits;
@@ -359,8 +359,8 @@ u_printf_integer_handler(const u_printf_stream_handler *handler,
{
int64_t num = args[0].int64Value;
UNumberFormat *format;
- UChar result[UPRINTF_BUFFER_SIZE];
- UChar prefixBuffer[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
+ char16_t prefixBuffer[UPRINTF_BUFFER_SIZE];
int32_t prefixBufferLen = sizeof(prefixBuffer);
int32_t minDigits = -1;
int32_t resultLen;
@@ -425,7 +425,7 @@ u_printf_hex_handler(const u_printf_stream_handler *handler,
{
(void)formatBundle;
int64_t num = args[0].int64Value;
- UChar result[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
int32_t len = UPRINTF_BUFFER_SIZE;
@@ -443,7 +443,7 @@ u_printf_hex_handler(const u_printf_stream_handler *handler,
/* convert to alt form, if desired */
if(num != 0 && info->fAlt && len < UPRINTF_BUFFER_SIZE - 2) {
/* shift the formatted string right by 2 chars */
- memmove(result + 2, result, len * sizeof(UChar));
+ memmove(result + 2, result, len * sizeof(char16_t));
result[0] = 0x0030;
result[1] = info->fSpec;
len += 2;
@@ -461,7 +461,7 @@ u_printf_octal_handler(const u_printf_stream_handler *handler,
{
(void)formatBundle;
int64_t num = args[0].int64Value;
- UChar result[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
int32_t len = UPRINTF_BUFFER_SIZE;
@@ -473,13 +473,13 @@ u_printf_octal_handler(const u_printf_stream_handler *handler,
/* format the number, preserving the minimum # of digits */
ufmt_64tou(result, &len, num, 8,
- FALSE, /* doesn't matter for octal */
+ false, /* doesn't matter for octal */
info->fPrecision == -1 && info->fZero ? info->fWidth : info->fPrecision);
/* convert to alt form, if desired */
if(info->fAlt && result[0] != 0x0030 && len < UPRINTF_BUFFER_SIZE - 1) {
/* shift the formatted string right by 1 char */
- memmove(result + 1, result, len * sizeof(UChar));
+ memmove(result + 1, result, len * sizeof(char16_t));
result[0] = 0x0030;
len += 1;
}
@@ -496,7 +496,7 @@ u_printf_uinteger_handler(const u_printf_stream_handler *handler,
{
int64_t num = args[0].int64Value;
UNumberFormat *format;
- UChar result[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
int32_t minDigits = -1;
int32_t resultLen;
UErrorCode status = U_ZERO_ERROR;
@@ -548,11 +548,11 @@ u_printf_pointer_handler(const u_printf_stream_handler *handler,
const ufmt_args *args)
{
(void)formatBundle;
- UChar result[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
int32_t len = UPRINTF_BUFFER_SIZE;
/* format the pointer in hex */
- ufmt_ptou(result, &len, args[0].ptrValue, TRUE/*, info->fPrecision*/);
+ ufmt_ptou(result, &len, args[0].ptrValue, true/*, info->fPrecision*/);
return handler->pad_and_justify(context, info, result, len);
}
@@ -566,16 +566,16 @@ u_printf_scientific_handler(const u_printf_stream_handler *handler,
{
double num = (double) (args[0].doubleValue);
UNumberFormat *format;
- UChar result[UPRINTF_BUFFER_SIZE];
- UChar prefixBuffer[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
+ char16_t prefixBuffer[UPRINTF_BUFFER_SIZE];
int32_t prefixBufferLen = sizeof(prefixBuffer);
int32_t minDecimalDigits;
int32_t maxDecimalDigits;
UErrorCode status = U_ZERO_ERROR;
- UChar srcExpBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
+ char16_t srcExpBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
int32_t srcLen, expLen;
int32_t resultLen;
- UChar expBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
+ char16_t expBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
prefixBuffer[0] = 0;
@@ -599,7 +599,7 @@ u_printf_scientific_handler(const u_printf_stream_handler *handler,
&status);
/* Upper/lower case the e */
- if (info->fSpec == (UChar)0x65 /* e */) {
+ if (info->fSpec == (char16_t)0x65 /* e */) {
expLen = u_strToLower(expBuf, (int32_t)sizeof(expBuf),
srcExpBuf, srcLen,
formatBundle->fLocale,
@@ -625,7 +625,7 @@ u_printf_scientific_handler(const u_printf_stream_handler *handler,
/* set the appropriate flags and number of decimal digits on the formatter */
if(info->fPrecision != -1) {
/* set the # of decimal digits */
- if (info->fOrigSpec == (UChar)0x65 /* e */ || info->fOrigSpec == (UChar)0x45 /* E */) {
+ if (info->fOrigSpec == (char16_t)0x65 /* e */ || info->fOrigSpec == (char16_t)0x45 /* E */) {
unum_setAttribute(format, UNUM_FRACTION_DIGITS, info->fPrecision);
}
else {
@@ -686,8 +686,8 @@ u_printf_percent_handler(const u_printf_stream_handler *handler,
{
double num = (double) (args[0].doubleValue);
UNumberFormat *format;
- UChar result[UPRINTF_BUFFER_SIZE];
- UChar prefixBuffer[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
+ char16_t prefixBuffer[UPRINTF_BUFFER_SIZE];
int32_t prefixBufferLen = sizeof(prefixBuffer);
int32_t minDecimalDigits;
int32_t maxDecimalDigits;
@@ -761,10 +761,10 @@ u_printf_ustring_handler(const u_printf_stream_handler *handler,
{
(void)formatBundle;
int32_t len, written;
- const UChar *arg = (const UChar*)(args[0].ptrValue);
+ const char16_t *arg = (const char16_t*)(args[0].ptrValue);
/* allocate enough space for the buffer */
- if (arg == NULL) {
+ if (arg == nullptr) {
arg = gNullStr;
}
len = u_strlen(arg);
@@ -790,7 +790,7 @@ u_printf_uchar_handler(const u_printf_stream_handler *handler,
{
(void)formatBundle;
int32_t written = 0;
- UChar arg = (UChar)(args[0].int64Value);
+ char16_t arg = (char16_t)(args[0].int64Value);
/* width = minimum # of characters to write */
/* precision = maximum # of characters to write */
@@ -840,7 +840,7 @@ u_printf_scidbl_handler(const u_printf_stream_handler *handler,
else {
format = u_locbund_getNumberFormat(formatBundle, UNUM_DECIMAL);
/* Check for null pointer */
- if (format == NULL) {
+ if (format == nullptr) {
return 0;
}
maxSigDecimalDigits = unum_getAttribute(format, UNUM_MAX_SIGNIFICANT_DIGITS);
@@ -851,12 +851,12 @@ u_printf_scidbl_handler(const u_printf_stream_handler *handler,
if (significantDigits == -1) {
significantDigits = 6;
}
- unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, TRUE);
+ unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, true);
unum_setAttribute(format, UNUM_MAX_SIGNIFICANT_DIGITS, significantDigits);
/* call the double handler */
retVal = u_printf_double_handler(handler, context, formatBundle, &scidbl_info, args);
unum_setAttribute(format, UNUM_MAX_SIGNIFICANT_DIGITS, maxSigDecimalDigits);
- unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, FALSE);
+ unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, false);
}
return retVal;
}
@@ -889,8 +889,8 @@ u_printf_spellout_handler(const u_printf_stream_handler *handler,
{
double num = (double) (args[0].doubleValue);
UNumberFormat *format;
- UChar result[UPRINTF_BUFFER_SIZE];
- UChar prefixBuffer[UPRINTF_BUFFER_SIZE];
+ char16_t result[UPRINTF_BUFFER_SIZE];
+ char16_t prefixBuffer[UPRINTF_BUFFER_SIZE];
int32_t prefixBufferLen = sizeof(prefixBuffer);
int32_t minDecimalDigits;
int32_t maxDecimalDigits;
@@ -1058,15 +1058,15 @@ static const u_printf_info g_u_printf_infos[UPRINTF_NUM_FMT_HANDLERS] = {
(s) == MOD_LOWERL || \
(s) == MOD_L
/* Returns an array of the parsed argument type given in the format string. */
-static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *status) {
- ufmt_args *arglist = NULL;
- ufmt_type_info *typelist = NULL;
- UBool *islonglong = NULL;
+static ufmt_args* parseArguments(const char16_t *alias, va_list ap, UErrorCode *status) {
+ ufmt_args *arglist = nullptr;
+ ufmt_type_info *typelist = nullptr;
+ UBool *islonglong = nullptr;
int32_t size = 0;
int32_t pos = 0;
- UChar type;
+ char16_t type;
uint16_t handlerNum;
- const UChar *aliasStart = alias;
+ const char16_t *aliasStart = alias;
/* get maximum number of arguments */
for(;;) {
@@ -1096,10 +1096,10 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
/* if there is no '$', don't read anything */
if(*alias != SPEC_DOLLARSIGN) {
- return NULL;
+ return nullptr;
}
} else {
- return NULL;
+ return nullptr;
}
if (pos > size) {
@@ -1112,7 +1112,7 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
islonglong = (UBool*)uprv_malloc(sizeof(UBool) * size);
arglist = (ufmt_args*)uprv_malloc(sizeof(ufmt_args) * size);
- /* If malloc failed, return NULL */
+ /* If malloc failed, return nullptr */
if (!typelist || !islonglong || !arglist) {
if (typelist) {
uprv_free(typelist);
@@ -1127,7 +1127,7 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
}
*status = U_MEMORY_ALLOCATION_ERROR;
- return NULL;
+ return nullptr;
}
/* reset alias back to the beginning */
@@ -1160,11 +1160,11 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
/* skip over everything except for the type */
while (ISMOD(*alias) || ISFLAG(*alias) || ISDIGIT(*alias) ||
*alias == SPEC_ASTERISK || *alias == SPEC_PERIOD || *alias == SPEC_DOLLARSIGN) {
- islonglong[pos] = FALSE;
+ islonglong[pos] = false;
if (ISMOD(*alias)) {
alias++;
if (*alias == MOD_LOWERL) {
- islonglong[pos] = TRUE;
+ islonglong[pos] = true;
}
}
alias++;
@@ -1206,7 +1206,7 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
break;
default:
/* else args is ignored */
- arglist[pos].ptrValue = NULL;
+ arglist[pos].ptrValue = nullptr;
break;
}
}
@@ -1220,7 +1220,7 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
/* We parse the argument list in Unicode */
U_CFUNC int32_t
u_printf_parse(const u_printf_stream_handler *streamHandler,
- const UChar *fmt,
+ const char16_t *fmt,
void *context,
u_localized_print_string *locStringContext,
ULocaleBundle *formatBundle,
@@ -1234,12 +1234,12 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
u_printf_spec spec;
u_printf_spec_info *info = &(spec.fInfo);
- const UChar *alias = fmt;
- const UChar *backup;
- const UChar *lastAlias;
- const UChar *orgAlias = fmt;
+ const char16_t *alias = fmt;
+ const char16_t *backup;
+ const char16_t *lastAlias;
+ const char16_t *orgAlias = fmt;
/* parsed argument list */
- ufmt_args *arglist = NULL; /* initialized it to avoid compiler warnings */
+ ufmt_args *arglist = nullptr; /* initialized it to avoid compiler warnings */
UErrorCode status = U_ZERO_ERROR;
if (!locStringContext || locStringContext->available >= 0) {
/* get the parsed list of argument types */
@@ -1315,28 +1315,28 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
/* left justify */
case FLAG_MINUS:
- info->fLeft = TRUE;
+ info->fLeft = true;
break;
/* always show sign */
case FLAG_PLUS:
- info->fShowSign = TRUE;
+ info->fShowSign = true;
break;
/* use space if no sign present */
case FLAG_SPACE:
- info->fShowSign = TRUE;
- info->fSpace = TRUE;
+ info->fShowSign = true;
+ info->fSpace = true;
break;
/* use alternate form */
case FLAG_POUND:
- info->fAlt = TRUE;
+ info->fAlt = true;
break;
/* pad with leading zeroes */
case FLAG_ZERO:
- info->fZero = TRUE;
+ info->fZero = true;
info->fPadChar = 0x0030;
break;
@@ -1345,10 +1345,10 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
/* TODO test that all four are numbers */
/* first four characters are hex values for pad char */
- info->fPadChar = (UChar)ufmt_digitvalue(*alias++);
- info->fPadChar = (UChar)((info->fPadChar * 16) + ufmt_digitvalue(*alias++));
- info->fPadChar = (UChar)((info->fPadChar * 16) + ufmt_digitvalue(*alias++));
- info->fPadChar = (UChar)((info->fPadChar * 16) + ufmt_digitvalue(*alias++));
+ info->fPadChar = (char16_t)ufmt_digitvalue(*alias++);
+ info->fPadChar = (char16_t)((info->fPadChar * 16) + ufmt_digitvalue(*alias++));
+ info->fPadChar = (char16_t)((info->fPadChar * 16) + ufmt_digitvalue(*alias++));
+ info->fPadChar = (char16_t)((info->fPadChar * 16) + ufmt_digitvalue(*alias++));
/* final character is ignored */
alias++;
@@ -1454,23 +1454,23 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
/* short */
case MOD_H:
- info->fIsShort = TRUE;
+ info->fIsShort = true;
break;
/* long or long long */
case MOD_LOWERL:
if(*alias == MOD_LOWERL) {
- info->fIsLongLong = TRUE;
+ info->fIsLongLong = true;
/* skip over the next 'l' */
alias++;
}
else
- info->fIsLong = TRUE;
+ info->fIsLong = true;
break;
/* long double */
case MOD_L:
- info->fIsLongDouble = TRUE;
+ info->fIsLongDouble = true;
break;
}
}
@@ -1492,7 +1492,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
/* if it's negative, take the absolute value and set left alignment */
if(info->fWidth < 0) {
info->fWidth *= -1; /* Make positive */
- info->fLeft = TRUE;
+ info->fLeft = true;
}
}
@@ -1542,7 +1542,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
break;
default:
/* else args is ignored */
- args.ptrValue = NULL;
+ args.ptrValue = nullptr;
break;
}
} else { /* no positional argument specified */
@@ -1575,7 +1575,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
break;
default:
/* else args is ignored */
- args.ptrValue = NULL;
+ args.ptrValue = nullptr;
break;
}
}
@@ -1596,7 +1596,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
}
}
/* delete parsed argument list */
- if (arglist != NULL) {
+ if (arglist != nullptr) {
uprv_free(arglist);
}
/* return # of characters in this format that have been parsed. */
diff --git a/contrib/libs/icu/io/uscanf.cpp b/contrib/libs/icu/io/uscanf.cpp
index ce2e47a5881..2d72ccf5150 100644
--- a/contrib/libs/icu/io/uscanf.cpp
+++ b/contrib/libs/icu/io/uscanf.cpp
@@ -50,7 +50,7 @@ u_fscanf(UFILE *f,
U_CAPI int32_t U_EXPORT2
u_fscanf_u(UFILE *f,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
... )
{
va_list ap;
@@ -69,13 +69,13 @@ u_vfscanf(UFILE *f,
va_list ap)
{
int32_t converted;
- UChar *pattern;
- UChar patBuffer[UFMT_DEFAULT_BUFFER_SIZE];
+ char16_t *pattern;
+ char16_t patBuffer[UFMT_DEFAULT_BUFFER_SIZE];
int32_t size = (int32_t)uprv_strlen(patternSpecification) + 1;
/* convert from the default codepage to Unicode */
if (size >= MAX_UCHAR_BUFFER_SIZE(patBuffer)) {
- pattern = (UChar *)uprv_malloc(size * sizeof(UChar));
+ pattern = (char16_t *)uprv_malloc(size * sizeof(char16_t));
if(pattern == 0) {
return 0;
}
@@ -98,7 +98,7 @@ u_vfscanf(UFILE *f,
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
u_vfscanf_u(UFILE *f,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
va_list ap)
{
return u_scanf_parse(f, patternSpecification, ap);
diff --git a/contrib/libs/icu/io/uscanf_p.cpp b/contrib/libs/icu/io/uscanf_p.cpp
index 5bf3e5b7a84..0a41dfe07d2 100644
--- a/contrib/libs/icu/io/uscanf_p.cpp
+++ b/contrib/libs/icu/io/uscanf_p.cpp
@@ -83,16 +83,16 @@
typedef struct u_scanf_spec_info {
int32_t fWidth; /* Width */
- UChar fSpec; /* Format specification */
+ char16_t fSpec; /* Format specification */
- UChar fPadChar; /* Padding character */
+ char16_t fPadChar; /* Padding character */
- UBool fSkipArg; /* TRUE if arg should be skipped */
+ UBool fSkipArg; /* true if arg should be skipped */
UBool fIsLongDouble; /* L flag */
UBool fIsShort; /* h flag */
UBool fIsLong; /* l flag */
UBool fIsLongLong; /* ll flag */
- UBool fIsString; /* TRUE if this is a NULL-terminated string. */
+ UBool fIsString; /* true if this is a NUL-terminated string. */
} u_scanf_spec_info;
@@ -112,11 +112,11 @@ typedef struct u_scanf_spec {
* @return The number of characters contained in this specifier.
*/
static int32_t
-u_scanf_parse_spec (const UChar *fmt,
+u_scanf_parse_spec (const char16_t *fmt,
u_scanf_spec *spec)
{
- const UChar *s = fmt;
- const UChar *backup;
+ const char16_t *s = fmt;
+ const char16_t *backup;
u_scanf_spec_info *info = &(spec->fInfo);
/* initialize spec to default values */
@@ -125,12 +125,12 @@ u_scanf_parse_spec (const UChar *fmt,
info->fWidth = -1;
info->fSpec = 0x0000;
info->fPadChar = 0x0020;
- info->fSkipArg = FALSE;
- info->fIsLongDouble = FALSE;
- info->fIsShort = FALSE;
- info->fIsLong = FALSE;
- info->fIsLongLong = FALSE;
- info->fIsString = TRUE;
+ info->fSkipArg = false;
+ info->fIsLongDouble = false;
+ info->fIsShort = false;
+ info->fIsLong = false;
+ info->fIsLongLong = false;
+ info->fIsString = true;
/* skip over the initial '%' */
@@ -168,17 +168,17 @@ u_scanf_parse_spec (const UChar *fmt,
/* skip argument */
case FLAG_ASTERISK:
- info->fSkipArg = TRUE;
+ info->fSkipArg = true;
break;
/* pad character specified */
case FLAG_PAREN:
/* first four characters are hex values for pad char */
- info->fPadChar = (UChar)ufmt_digitvalue(*s++);
- info->fPadChar = (UChar)((info->fPadChar * 16) + ufmt_digitvalue(*s++));
- info->fPadChar = (UChar)((info->fPadChar * 16) + ufmt_digitvalue(*s++));
- info->fPadChar = (UChar)((info->fPadChar * 16) + ufmt_digitvalue(*s++));
+ info->fPadChar = (char16_t)ufmt_digitvalue(*s++);
+ info->fPadChar = (char16_t)((info->fPadChar * 16) + ufmt_digitvalue(*s++));
+ info->fPadChar = (char16_t)((info->fPadChar * 16) + ufmt_digitvalue(*s++));
+ info->fPadChar = (char16_t)((info->fPadChar * 16) + ufmt_digitvalue(*s++));
/* final character is ignored */
s++;
@@ -203,23 +203,23 @@ u_scanf_parse_spec (const UChar *fmt,
/* short */
case MOD_H:
- info->fIsShort = TRUE;
+ info->fIsShort = true;
break;
/* long or long long */
case MOD_LOWERL:
if(*s == MOD_LOWERL) {
- info->fIsLongLong = TRUE;
+ info->fIsLongLong = true;
/* skip over the next 'l' */
s++;
}
else
- info->fIsLong = TRUE;
+ info->fIsLong = true;
break;
/* long double */
case MOD_L:
- info->fIsLongDouble = TRUE;
+ info->fIsLongDouble = true;
break;
}
}
@@ -277,7 +277,7 @@ u_scanf_parse_spec (const UChar *fmt,
#define UFMT_USTRING {ufmt_ustring, u_scanf_ustring_handler}
-#define UFMT_EMPTY {ufmt_empty, NULL}
+#define UFMT_EMPTY {ufmt_empty, nullptr}
/**
* A u_scanf handler function.
@@ -298,7 +298,7 @@ u_scanf_parse_spec (const UChar *fmt,
typedef int32_t (*u_scanf_handler) (UFILE *stream,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted);
@@ -316,14 +316,14 @@ typedef struct u_scanf_info {
static int32_t
u_scanf_skip_leading_ws(UFILE *input,
- UChar pad)
+ char16_t pad)
{
- UChar c;
+ char16_t c;
int32_t count = 0;
UBool isNotEOF;
/* skip all leading ws in the input */
- while( ((isNotEOF = ufile_getch(input, &c)) == TRUE) && (c == pad || u_isWhitespace(c)) )
+ while( ((isNotEOF = ufile_getch(input, &c))==(UBool)true) && (c == pad || u_isWhitespace(c)) )
{
count++;
}
@@ -341,10 +341,10 @@ u_scanf_skip_leading_positive_sign(UFILE *input,
UNumberFormat *format,
UErrorCode *status)
{
- UChar c;
+ char16_t c;
int32_t count = 0;
UBool isNotEOF;
- UChar plusSymbol[USCANF_SYMBOL_BUFFER_SIZE];
+ char16_t plusSymbol[USCANF_SYMBOL_BUFFER_SIZE];
int32_t symbolLen;
UErrorCode localStatus = U_ZERO_ERROR;
@@ -357,7 +357,7 @@ u_scanf_skip_leading_positive_sign(UFILE *input,
if (U_SUCCESS(localStatus)) {
/* skip all leading ws in the input */
- while( ((isNotEOF = ufile_getch(input, &c)) == TRUE) && (count < symbolLen && c == plusSymbol[count]) )
+ while( ((isNotEOF = ufile_getch(input, &c))==(UBool)true) && (count < symbolLen && c == plusSymbol[count]) )
{
count++;
}
@@ -376,7 +376,7 @@ static int32_t
u_scanf_simple_percent_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -397,7 +397,7 @@ static int32_t
u_scanf_count_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -425,7 +425,7 @@ static int32_t
u_scanf_double_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -493,7 +493,7 @@ static int32_t
u_scanf_scientific_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -506,9 +506,9 @@ u_scanf_scientific_handler(UFILE *input,
int32_t parsePos = 0;
int32_t skipped;
UErrorCode status = U_ZERO_ERROR;
- UChar srcExpBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
+ char16_t srcExpBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
int32_t srcLen, expLen;
- UChar expBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
+ char16_t expBuf[UPRINTF_SYMBOL_BUFFER_SIZE];
/* skip all ws in the input */
@@ -540,7 +540,7 @@ u_scanf_scientific_handler(UFILE *input,
&status);
/* Upper/lower case the e */
- if (info->fSpec == (UChar)0x65 /* e */) {
+ if (info->fSpec == (char16_t)0x65 /* e */) {
expLen = u_strToLower(expBuf, (int32_t)sizeof(expBuf),
srcExpBuf, srcLen,
input->str.fBundle.fLocale,
@@ -593,7 +593,7 @@ static int32_t
u_scanf_scidbl_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -686,7 +686,7 @@ static int32_t
u_scanf_integer_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -763,7 +763,7 @@ static int32_t
u_scanf_uinteger_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -775,7 +775,7 @@ static int32_t
u_scanf_percent_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -835,14 +835,14 @@ static int32_t
u_scanf_string_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
(void)fmt;
(void)fmtConsumed;
- const UChar *source;
+ const char16_t *source;
UConverter *conv;
char *arg = (char*)(args[0].ptrValue);
char *alias = arg;
@@ -850,8 +850,8 @@ u_scanf_string_handler(UFILE *input,
UErrorCode status = U_ZERO_ERROR;
int32_t count;
int32_t skipped = 0;
- UChar c;
- UBool isNotEOF = FALSE;
+ char16_t c;
+ UBool isNotEOF = false;
/* skip all ws in the input */
if (info->fIsString) {
@@ -868,7 +868,7 @@ u_scanf_string_handler(UFILE *input,
return -1;
while( (info->fWidth == -1 || count < info->fWidth)
- && ((isNotEOF = ufile_getch(input, &c)) == TRUE)
+ && ((isNotEOF = ufile_getch(input, &c))==(UBool)true)
&& (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c))))
{
@@ -885,7 +885,7 @@ u_scanf_string_handler(UFILE *input,
/* convert the character to the default codepage */
ucnv_fromUnicode(conv, &alias, limit, &source, source + 1,
- NULL, TRUE, &status);
+ nullptr, true, &status);
if(U_FAILURE(status)) {
/* clean up */
@@ -921,14 +921,14 @@ static int32_t
u_scanf_char_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
if (info->fWidth < 0) {
info->fWidth = 1;
}
- info->fIsString = FALSE;
+ info->fIsString = false;
return u_scanf_string_handler(input, info, args, fmt, fmtConsumed, argConverted);
}
@@ -936,19 +936,19 @@ static int32_t
u_scanf_ustring_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
(void)fmt;
(void)fmtConsumed;
- UChar *arg = (UChar*)(args[0].ptrValue);
- UChar *alias = arg;
+ char16_t *arg = (char16_t*)(args[0].ptrValue);
+ char16_t *alias = arg;
int32_t count;
int32_t skipped = 0;
- UChar c;
- UBool isNotEOF = FALSE;
+ char16_t c;
+ UBool isNotEOF = false;
/* skip all ws in the input */
if (info->fIsString) {
@@ -959,7 +959,7 @@ u_scanf_ustring_handler(UFILE *input,
count = 0;
while( (info->fWidth == -1 || count < info->fWidth)
- && ((isNotEOF = ufile_getch(input, &c)) == TRUE)
+ && ((isNotEOF = ufile_getch(input, &c))==(UBool)true)
&& (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c))))
{
@@ -993,14 +993,14 @@ static int32_t
u_scanf_uchar_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
if (info->fWidth < 0) {
info->fWidth = 1;
}
- info->fIsString = FALSE;
+ info->fIsString = false;
return u_scanf_ustring_handler(input, info, args, fmt, fmtConsumed, argConverted);
}
@@ -1008,7 +1008,7 @@ static int32_t
u_scanf_spellout_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -1070,7 +1070,7 @@ static int32_t
u_scanf_hex_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -1129,7 +1129,7 @@ static int32_t
u_scanf_octal_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -1179,7 +1179,7 @@ static int32_t
u_scanf_pointer_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -1230,7 +1230,7 @@ static int32_t
u_scanf_scanset_handler(UFILE *input,
u_scanf_spec_info *info,
ufmt_args *args,
- const UChar *fmt,
+ const char16_t *fmt,
int32_t *fmtConsumed,
int32_t *argConverted)
{
@@ -1238,9 +1238,9 @@ u_scanf_scanset_handler(UFILE *input,
UErrorCode status = U_ZERO_ERROR;
int32_t chLeft = INT32_MAX;
UChar32 c;
- UChar *alias = (UChar*) (args[0].ptrValue);
- UBool isNotEOF = FALSE;
- UBool readCharacter = FALSE;
+ char16_t *alias = (char16_t*) (args[0].ptrValue);
+ UBool isNotEOF = false;
+ UBool readCharacter = false;
/* Create an empty set */
scanset = uset_open(0, -1);
@@ -1262,11 +1262,11 @@ u_scanf_scanset_handler(UFILE *input,
/* grab characters one at a time and make sure they are in the scanset */
while(chLeft > 0) {
- if ( ((isNotEOF = ufile_getch32(input, &c)) == TRUE) && uset_contains(scanset, c) ) {
- readCharacter = TRUE;
+ if ( ((isNotEOF = ufile_getch32(input, &c))==(UBool)true) && uset_contains(scanset, c) ) {
+ readCharacter = true;
if (!info->fSkipArg) {
int32_t idx = 0;
- UBool isError = FALSE;
+ UBool isError = false;
U16_APPEND(alias, idx, chLeft, c, isError);
if (isError) {
@@ -1355,10 +1355,10 @@ static const u_scanf_info g_u_scanf_infos[USCANF_NUM_FMT_HANDLERS] = {
U_CFUNC int32_t
u_scanf_parse(UFILE *f,
- const UChar *patternSpecification,
+ const char16_t *patternSpecification,
va_list ap)
{
- const UChar *alias;
+ const char16_t *alias;
int32_t count, converted, argConsumed, cpConsumed;
uint16_t handlerNum;
@@ -1402,7 +1402,7 @@ u_scanf_parse(UFILE *f,
break;
}
else if(spec.fInfo.fSkipArg) {
- args.ptrValue = NULL;
+ args.ptrValue = nullptr;
}
else {
switch(info) {
@@ -1423,7 +1423,7 @@ u_scanf_parse(UFILE *f,
default:
/* else args is ignored */
- args.ptrValue = NULL;
+ args.ptrValue = nullptr;
break;
}
}
diff --git a/contrib/libs/icu/io/ustdio.cpp b/contrib/libs/icu/io/ustdio.cpp
index d6eb5cf9ec9..4130f340442 100644
--- a/contrib/libs/icu/io/ustdio.cpp
+++ b/contrib/libs/icu/io/ustdio.cpp
@@ -43,11 +43,11 @@
/* TODO: is this correct for all codepages? Should we just use \n and let the converter handle it? */
#if U_PLATFORM_USES_ONLY_WIN32_API
-static const UChar DELIMITERS [] = { DELIM_CR, DELIM_LF, 0x0000 };
+static const char16_t DELIMITERS [] = { DELIM_CR, DELIM_LF, 0x0000 };
static const uint32_t DELIMITERS_LEN = 2;
/* TODO: Default newline writing should be detected based upon the converter being used. */
#else
-static const UChar DELIMITERS [] = { DELIM_LF, 0x0000 };
+static const char16_t DELIMITERS [] = { DELIM_LF, 0x0000 };
static const uint32_t DELIMITERS_LEN = 1;
#endif
@@ -67,7 +67,7 @@ U_CAPI UTransliterator* U_EXPORT2
u_fsettransliterator(UFILE *file, UFileDirection direction,
UTransliterator *adopt, UErrorCode *status)
{
- UTransliterator *old = NULL;
+ UTransliterator *old = nullptr;
if(U_FAILURE(*status))
{
@@ -87,21 +87,21 @@ u_fsettransliterator(UFILE *file, UFileDirection direction,
return adopt;
}
- if(adopt == NULL) /* they are clearing it */
+ if(adopt == nullptr) /* they are clearing it */
{
- if(file->fTranslit != NULL)
+ if(file->fTranslit != nullptr)
{
/* TODO: Check side */
old = file->fTranslit->translit;
uprv_free(file->fTranslit->buffer);
- file->fTranslit->buffer=NULL;
+ file->fTranslit->buffer=nullptr;
uprv_free(file->fTranslit);
- file->fTranslit=NULL;
+ file->fTranslit=nullptr;
}
}
else
{
- if(file->fTranslit == NULL)
+ if(file->fTranslit == nullptr)
{
file->fTranslit = (UFILETranslitBuffer*) uprv_malloc(sizeof(UFILETranslitBuffer));
if(!file->fTranslit)
@@ -112,7 +112,7 @@ u_fsettransliterator(UFILE *file, UFileDirection direction,
file->fTranslit->capacity = 0;
file->fTranslit->length = 0;
file->fTranslit->pos = 0;
- file->fTranslit->buffer = NULL;
+ file->fTranslit->buffer = nullptr;
}
else
{
@@ -126,7 +126,7 @@ u_fsettransliterator(UFILE *file, UFileDirection direction,
return old;
}
-static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count, UBool flush)
+static const char16_t * u_file_translit(UFILE *f, const char16_t *src, int32_t *count, UBool flush)
{
int32_t newlen;
int32_t junkCount = 0;
@@ -135,7 +135,7 @@ static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count,
UTransPosition pos;
UErrorCode status = U_ZERO_ERROR;
- if(count == NULL)
+ if(count == nullptr)
{
count = &junkCount;
}
@@ -150,7 +150,7 @@ static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count,
if(f->fTranslit->length > f->fTranslit->pos)
{
memmove(f->fTranslit->buffer, f->fTranslit->buffer + f->fTranslit->pos,
- (f->fTranslit->length - f->fTranslit->pos)*sizeof(UChar));
+ (f->fTranslit->length - f->fTranslit->pos)*sizeof(char16_t));
}
f->fTranslit->length -= f->fTranslit->pos; /* always */
f->fTranslit->pos = 0;
@@ -160,17 +160,17 @@ static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count,
if(newlen > f->fTranslit->capacity)
{
- if(f->fTranslit->buffer == NULL)
+ if(f->fTranslit->buffer == nullptr)
{
- f->fTranslit->buffer = (UChar*)uprv_malloc(newlen * sizeof(UChar));
+ f->fTranslit->buffer = (char16_t*)uprv_malloc(newlen * sizeof(char16_t));
}
else
{
- f->fTranslit->buffer = (UChar*)uprv_realloc(f->fTranslit->buffer, newlen * sizeof(UChar));
+ f->fTranslit->buffer = (char16_t*)uprv_realloc(f->fTranslit->buffer, newlen * sizeof(char16_t));
}
/* Check for malloc/realloc failure. */
- if (f->fTranslit->buffer == NULL) {
- return NULL;
+ if (f->fTranslit->buffer == nullptr) {
+ return nullptr;
}
f->fTranslit->capacity = newlen;
}
@@ -182,7 +182,7 @@ static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count,
f->fTranslit->length += *count;
/* Now, translit in place as much as we can */
- if(flush == FALSE)
+ if(flush == false)
{
textLength = f->fTranslit->length;
pos.contextStart = 0;
@@ -239,7 +239,7 @@ ufile_flush_translit(UFILE *f)
return;
#endif
- u_file_write_flush(NULL, 0, f, FALSE, TRUE);
+ u_file_write_flush(nullptr, 0, f, false, true);
}
@@ -250,7 +250,7 @@ ufile_flush_io(UFILE *f)
return; /* skip if no file */
}
- u_file_write_flush(NULL, 0, f, TRUE, FALSE);
+ u_file_write_flush(nullptr, 0, f, true, false);
}
@@ -274,7 +274,7 @@ ufile_close_translit(UFILE *f)
}
uprv_free(f->fTranslit);
- f->fTranslit = NULL;
+ f->fTranslit = nullptr;
#endif
}
@@ -282,7 +282,7 @@ ufile_close_translit(UFILE *f)
/* Input/output */
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_fputs(const UChar *s,
+u_fputs(const char16_t *s,
UFILE *f)
{
int32_t count = u_file_write(s, u_strlen(s), f);
@@ -294,9 +294,9 @@ U_CAPI UChar32 U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001
u_fputc(UChar32 uc,
UFILE *f)
{
- UChar buf[2];
+ char16_t buf[2];
int32_t idx = 0;
- UBool isError = FALSE;
+ UBool isError = false;
U16_APPEND(buf, idx, UPRV_LENGTHOF(buf), uc, isError);
if (isError) {
@@ -307,7 +307,7 @@ u_fputc(UChar32 uc,
U_CFUNC int32_t U_EXPORT2
-u_file_write_flush(const UChar *chars,
+u_file_write_flush(const char16_t *chars,
int32_t count,
UFILE *f,
UBool flushIO,
@@ -315,9 +315,9 @@ u_file_write_flush(const UChar *chars,
{
/* Set up conversion parameters */
UErrorCode status = U_ZERO_ERROR;
- const UChar *mySource = chars;
- const UChar *mySourceBegin;
- const UChar *mySourceEnd;
+ const char16_t *mySource = chars;
+ const char16_t *mySourceBegin;
+ const char16_t *mySourceEnd;
char charBuffer[UFILE_CHARBUFFER_SIZE];
char *myTarget = charBuffer;
int32_t written = 0;
@@ -353,13 +353,13 @@ u_file_write_flush(const UChar *chars,
do {
mySourceBegin = mySource; /* beginning location for this loop */
status = U_ZERO_ERROR;
- if(f->fConverter != NULL) { /* We have a valid converter */
+ if(f->fConverter != nullptr) { /* We have a valid converter */
ucnv_fromUnicode(f->fConverter,
&myTarget,
charBuffer + UFILE_CHARBUFFER_SIZE,
&mySource,
mySourceEnd,
- NULL,
+ nullptr,
flushIO,
&status);
} else { /*weiv: do the invariant conversion */
@@ -392,11 +392,11 @@ u_file_write_flush(const UChar *chars,
}
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_file_write( const UChar *chars,
+u_file_write( const char16_t *chars,
int32_t count,
UFILE *f)
{
- return u_file_write_flush(chars,count,f,FALSE,FALSE);
+ return u_file_write_flush(chars,count,f,false,false);
}
@@ -407,7 +407,7 @@ ufile_fill_uchar_buffer(UFILE *f)
UErrorCode status;
const char *mySource;
const char *mySourceEnd;
- UChar *myTarget;
+ char16_t *myTarget;
int32_t bufferSize;
int32_t maxCPBytes;
int32_t bytesRead;
@@ -416,7 +416,7 @@ ufile_fill_uchar_buffer(UFILE *f)
char charBuffer[UFILE_CHARBUFFER_SIZE];
u_localized_string *str;
- if (f->fFile == NULL) {
+ if (f->fFile == nullptr) {
/* There is nothing to do. It's a string. */
return;
}
@@ -437,9 +437,9 @@ ufile_fill_uchar_buffer(UFILE *f)
/* record how much buffer space is available */
availLength = UFILE_UCHARBUFFER_SIZE - dataSize;
- /* Determine the # of codepage bytes needed to fill our UChar buffer */
- /* weiv: if converter is NULL, we use invariant converter with charwidth = 1)*/
- maxCPBytes = availLength / (f->fConverter!=NULL?(2*ucnv_getMinCharSize(f->fConverter)):1);
+ /* Determine the # of codepage bytes needed to fill our char16_t buffer */
+ /* weiv: if converter is nullptr, we use invariant converter with charwidth = 1)*/
+ maxCPBytes = availLength / (f->fConverter!=nullptr?(2*ucnv_getMinCharSize(f->fConverter)):1);
/* Read in the data to convert */
if (f->fFileno == 0) {
@@ -462,14 +462,14 @@ ufile_fill_uchar_buffer(UFILE *f)
myTarget = f->fUCBuffer + dataSize;
bufferSize = UFILE_UCHARBUFFER_SIZE;
- if(f->fConverter != NULL) { /* We have a valid converter */
+ if(f->fConverter != nullptr) { /* We have a valid converter */
/* Perform the conversion */
ucnv_toUnicode(f->fConverter,
&myTarget,
f->fUCBuffer + bufferSize,
&mySource,
mySourceEnd,
- NULL,
+ nullptr,
(UBool)(feof(f->fFile) != 0),
&status);
@@ -483,22 +483,22 @@ ufile_fill_uchar_buffer(UFILE *f)
str->fLimit = myTarget;
}
-U_CAPI UChar* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_fgets(UChar *s,
+U_CAPI char16_t* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
+u_fgets(char16_t *s,
int32_t n,
UFILE *f)
{
int32_t dataSize;
int32_t count;
- UChar *alias;
- const UChar *limit;
- UChar *sItr;
- UChar currDelim = 0;
+ char16_t *alias;
+ const char16_t *limit;
+ char16_t *sItr;
+ char16_t currDelim = 0;
u_localized_string *str;
if (n <= 0) {
/* Caller screwed up. We need to write the null terminatior. */
- return NULL;
+ return nullptr;
}
/* fill the buffer if needed */
@@ -515,7 +515,7 @@ u_fgets(UChar *s,
/* if 0 characters were left, return 0 */
if (dataSize == 0)
- return NULL;
+ return nullptr;
/* otherwise, iteratively fill the buffer and copy */
count = 0;
@@ -587,15 +587,15 @@ u_fgets(UChar *s,
}
U_CFUNC UBool U_EXPORT2
-ufile_getch(UFILE *f, UChar *ch)
+ufile_getch(UFILE *f, char16_t *ch)
{
- UBool isValidChar = FALSE;
+ UBool isValidChar = false;
*ch = U_EOF;
/* if we have an available character in the buffer, return it */
if(f->str.fPos < f->str.fLimit){
*ch = *(f->str.fPos)++;
- isValidChar = TRUE;
+ isValidChar = true;
}
else {
/* otherwise, fill the buffer and return the next character */
@@ -604,16 +604,16 @@ ufile_getch(UFILE *f, UChar *ch)
}
if(f->str.fPos < f->str.fLimit) {
*ch = *(f->str.fPos)++;
- isValidChar = TRUE;
+ isValidChar = true;
}
}
return isValidChar;
}
-U_CAPI UChar U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
+U_CAPI char16_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
u_fgetc(UFILE *f)
{
- UChar ch;
+ char16_t ch;
ufile_getch(f, &ch);
return ch;
}
@@ -621,14 +621,14 @@ u_fgetc(UFILE *f)
U_CFUNC UBool U_EXPORT2
ufile_getch32(UFILE *f, UChar32 *c32)
{
- UBool isValidChar = FALSE;
+ UBool isValidChar = false;
u_localized_string *str;
*c32 = U_EOF;
/* Fill the buffer if it is empty */
str = &f->str;
- if (f && str->fPos + 1 >= str->fLimit) {
+ if (str->fPos + 1 >= str->fLimit) {
ufile_fill_uchar_buffer(f);
}
@@ -637,16 +637,16 @@ ufile_getch32(UFILE *f, UChar32 *c32)
*c32 = *(str->fPos)++;
if (U_IS_LEAD(*c32)) {
if (str->fPos < str->fLimit) {
- UChar c16 = *(str->fPos)++;
+ char16_t c16 = *(str->fPos)++;
*c32 = U16_GET_SUPPLEMENTARY(*c32, c16);
- isValidChar = TRUE;
+ isValidChar = true;
}
else {
*c32 = U_EOF;
}
}
else {
- isValidChar = TRUE;
+ isValidChar = true;
}
}
@@ -693,7 +693,7 @@ u_fungetc(UChar32 ch,
}
U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
-u_file_read( UChar *chars,
+u_file_read( char16_t *chars,
int32_t count,
UFILE *f)
{
@@ -717,7 +717,7 @@ u_file_read( UChar *chars,
}
/* copy the current data in the buffer */
- memcpy(chars + read, str->fPos, dataSize * sizeof(UChar));
+ memcpy(chars + read, str->fPos, dataSize * sizeof(char16_t));
/* update number of items read */
read += dataSize;
diff --git a/contrib/libs/icu/io/ustream.cpp b/contrib/libs/icu/io/ustream.cpp
index 51676ea0f54..fd783b3b239 100644
--- a/contrib/libs/icu/io/ustream.cpp
+++ b/contrib/libs/icu/io/ustream.cpp
@@ -47,13 +47,13 @@ operator<<(STD_OSTREAM& stream, const UnicodeString& str)
// use the default converter to convert chunks of text
converter = u_getDefaultConverter(&errorCode);
if(U_SUCCESS(errorCode)) {
- const UChar *us = str.getBuffer();
- const UChar *uLimit = us + str.length();
+ const char16_t *us = str.getBuffer();
+ const char16_t *uLimit = us + str.length();
char *s, *sLimit = buffer + (sizeof(buffer) - 1);
do {
errorCode = U_ZERO_ERROR;
s = buffer;
- ucnv_fromUnicode(converter, &s, sLimit, &us, uLimit, 0, FALSE, &errorCode);
+ ucnv_fromUnicode(converter, &s, sLimit, &us, uLimit, 0, false, &errorCode);
*s = 0;
// write this chunk
@@ -78,7 +78,7 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
}
/* ipfx should eat whitespace when ios::skipws is set */
- UChar uBuffer[16];
+ char16_t uBuffer[16];
char buffer[16];
int32_t idx = 0;
UConverter *converter;
@@ -87,13 +87,13 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
// use the default converter to convert chunks of text
converter = u_getDefaultConverter(&errorCode);
if(U_SUCCESS(errorCode)) {
- UChar *us = uBuffer;
- const UChar *uLimit = uBuffer + UPRV_LENGTHOF(uBuffer);
+ char16_t *us = uBuffer;
+ const char16_t *uLimit = uBuffer + UPRV_LENGTHOF(uBuffer);
const char *s, *sLimit;
char ch;
- UChar ch32;
- UBool initialWhitespace = TRUE;
- UBool continueReading = TRUE;
+ char16_t ch32;
+ UBool initialWhitespace = true;
+ UBool continueReading = true;
/* We need to consume one byte at a time to see what is considered whitespace. */
while (continueReading) {
@@ -103,7 +103,7 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
if (!initialWhitespace) {
stream.clear(stream.eofbit);
}
- continueReading = FALSE;
+ continueReading = false;
}
sLimit = &ch + (int)continueReading;
us = uBuffer;
@@ -140,13 +140,13 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
else {
if (initialWhitespace) {
/*
- When initialWhitespace is TRUE, we haven't appended any
+ When initialWhitespace is true, we haven't appended any
character yet. This is where we truncate the string,
to avoid modifying the string before we know if we can
actually read from the stream.
*/
str.truncate(0);
- initialWhitespace = FALSE;
+ initialWhitespace = false;
}
str.append(ch32);
}
diff --git a/contrib/libs/icu/ya.make b/contrib/libs/icu/ya.make
index 172daf65079..a7f7ec68088 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(70.1)
+VERSION(73.2)
-ORIGINAL_SOURCE(https://github.com/unicode-org/icu/releases/download/release-70-1/icu4c-70_1-src.tgz)
+ORIGINAL_SOURCE(https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz)
ADDINCL(
GLOBAL contrib/libs/icu/include
@@ -89,6 +89,7 @@ SRCS(
common/lsr.cpp
common/lstmbe.cpp
common/messagepattern.cpp
+ common/mlbe.cpp
common/normalizer2.cpp
common/normalizer2impl.cpp
common/normlzr.cpp
@@ -297,6 +298,7 @@ SRCS(
i18n/decContext.cpp
i18n/decNumber.cpp
i18n/decimfmt.cpp
+ i18n/displayoptions.cpp
i18n/double-conversion-bignum-dtoa.cpp
i18n/double-conversion-bignum.cpp
i18n/double-conversion-cached-powers.cpp
@@ -329,6 +331,7 @@ SRCS(
i18n/indiancal.cpp
i18n/inputext.cpp
i18n/islamcal.cpp
+ i18n/iso8601cal.cpp
i18n/japancal.cpp
i18n/listformatter.cpp
i18n/measfmt.cpp
@@ -364,6 +367,7 @@ SRCS(
i18n/number_patternstring.cpp
i18n/number_rounding.cpp
i18n/number_scientific.cpp
+ i18n/number_simple.cpp
i18n/number_skeletons.cpp
i18n/number_symbolswrapper.cpp
i18n/number_usageprefs.cpp
@@ -482,7 +486,7 @@ SRCS(
i18n/zonemeta.cpp
i18n/zrule.cpp
i18n/ztrans.cpp
- icudt70_dat.rodata
+ icudt73_dat.rodata
io/locbund.cpp
io/sprintf.cpp
io/sscanf.cpp