integrate version http://download.icu-project.org/files/icu4c/60.2/icu4c-60_2-src.tgz
This commit is contained in:
parent
8af342b040
commit
97ebac6b5d
3689
APIChangeReport.html
3689
APIChangeReport.html
File diff suppressed because it is too large
Load Diff
4
LICENSE
4
LICENSE
@ -1,6 +1,6 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
|
||||
|
||||
Copyright © 1991-2016 Unicode, Inc. All rights reserved.
|
||||
Copyright © 1991-2017 Unicode, Inc. All rights reserved.
|
||||
Distributed under the Terms of Use in http://www.unicode.org/copyright.html
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -131,7 +131,7 @@ property of their respective owners.
|
||||
# ---------COPYING.libtabe ---- BEGIN--------------------
|
||||
#
|
||||
# /*
|
||||
# * Copyrighy (c) 1999 TaBE Project.
|
||||
# * Copyright (c) 1999 TaBE Project.
|
||||
# * Copyright (c) 1999 Pai-Hsiang Hsiao.
|
||||
# * All rights reserved.
|
||||
# *
|
||||
|
@ -1,626 +1,198 @@
|
||||
icu/source/test/thaitest/space.txt
|
||||
icu/source/test/iotest/iotest.vcxproj
|
||||
icu/source/test/iotest/iotest.vcxproj.filters
|
||||
icu/source/test/cintltst/cintltst.vcxproj
|
||||
icu/source/test/cintltst/cintltst.vcxproj.filters
|
||||
icu/source/test/intltest/intltest.vcxproj.filters
|
||||
icu/source/test/intltest/intltest.vcxproj
|
||||
icu/source/io/io.vcxproj.filters
|
||||
icu/source/io/io.vcxproj
|
||||
icu/source/extra/uconv/uconv.vcxproj
|
||||
icu/source/extra/uconv/uconv.vcxproj.filters
|
||||
icu/source/extra/uconv/resources/fr.txt
|
||||
icu/source/extra/uconv/resources/root.txt
|
||||
icu/source/extra/uconv/samples/utf8/korean.txt
|
||||
icu/source/extra/uconv/samples/utf8/chinese-ulysses.txt
|
||||
icu/source/extra/uconv/samples/utf8/danish.txt
|
||||
icu/source/extra/uconv/samples/utf8/banviet.txt
|
||||
icu/source/extra/uconv/samples/utf8/simplechinese.txt
|
||||
icu/source/extra/uconv/samples/utf8/russian.txt
|
||||
icu/source/extra/uconv/samples/utf8/utf-8-demo.txt
|
||||
icu/source/extra/uconv/samples/utf8/hania.txt
|
||||
icu/source/extra/uconv/samples/utf8/many.txt
|
||||
icu/source/extra/uconv/samples/utf8/jap.txt
|
||||
icu/source/extra/uconv/samples/utf8/croat.txt
|
||||
icu/source/extra/uconv/samples/utf8/linji.txt
|
||||
icu/source/extra/uconv/samples/utf8/maopoem.txt
|
||||
icu/source/extra/uconv/samples/utf8/greek.txt
|
||||
icu/source/extra/uconv/samples/utf8/turkish.txt
|
||||
icu/source/extra/uconv/samples/utf8/hangul.txt
|
||||
icu/source/extra/uconv/samples/utf8/armenian.txt
|
||||
icu/source/i18n/i18n_uwp.vcxproj
|
||||
icu/source/i18n/i18n.vcxproj.filters
|
||||
icu/source/i18n/i18n.vcxproj
|
||||
icu/source/test/letest/gendata.vcxproj.filters
|
||||
icu/source/test/letest/gendata.vcxproj
|
||||
icu/source/test/letest/cletest.sln
|
||||
icu/source/test/letest/cletest.vcxproj
|
||||
icu/source/test/letest/gendata.vcxproj
|
||||
icu/source/test/letest/cletest.vcxproj.filters
|
||||
icu/source/test/letest/letest.vcxproj
|
||||
icu/source/test/letest/letest.vcxproj.filters
|
||||
icu/source/test/letest/cletest.vcxproj.filters
|
||||
icu/source/test/perf/convperf/convperf.vcxproj.filters
|
||||
icu/source/test/perf/convperf/convperf.vcxproj
|
||||
icu/source/test/perf/strsrchperf/strsrchperf.vcxproj
|
||||
icu/source/test/perf/strsrchperf/strsrchperf.vcxproj.filters
|
||||
icu/source/test/perf/ucnvavailperf/ucnvavailperf.vcxproj
|
||||
icu/source/test/perf/collperf/collperf.vcxproj.filters
|
||||
icu/source/test/perf/collperf/collperf.vcxproj
|
||||
icu/source/test/perf/ubrkperf/ubrkperf.vcxproj.filters
|
||||
icu/source/test/perf/ubrkperf/ubrkperf.vcxproj
|
||||
icu/source/test/perf/utrie2perf/utrie2perf.vcxproj
|
||||
icu/source/test/perf/charperf/charperf.vcxproj.filters
|
||||
icu/source/test/perf/charperf/charperf.vcxproj
|
||||
icu/source/test/perf/ustrperf/stringperf.vcxproj.filters
|
||||
icu/source/test/perf/ustrperf/stringperf.vcxproj
|
||||
icu/source/test/perf/unisetperf/unisetperf.vcxproj
|
||||
icu/source/test/perf/usetperf/usetperf.vcxproj.filters
|
||||
icu/source/test/perf/usetperf/usetperf.vcxproj
|
||||
icu/source/test/perf/DateFmtPerf/DateFmtPerf.vcxproj.filters
|
||||
icu/source/test/perf/DateFmtPerf/DateFmtPerf.vcxproj
|
||||
icu/source/test/perf/normperf/normperf.vcxproj
|
||||
icu/source/test/perf/normperf/dtfmtrtperf.vcxproj
|
||||
icu/source/test/perf/normperf/dtfmtrtperf.vcxproj.filters
|
||||
icu/source/test/perf/normperf/normperf.vcxproj.filters
|
||||
icu/source/test/perf/collperf2/collperf2.vcxproj.filters
|
||||
icu/source/test/perf/collperf2/collperf2.vcxproj
|
||||
icu/source/test/perf/utfperf/utfperf.vcxproj.filters
|
||||
icu/source/test/perf/utfperf/utfperf.vcxproj
|
||||
icu/source/test/testdata/dcfmtest.txt
|
||||
icu/source/test/testdata/NumberFormatTestCases.txt
|
||||
icu/source/test/testdata/SentenceBreakTest.txt
|
||||
icu/source/test/testdata/numberformattestspecification.txt
|
||||
icu/source/test/testdata/collationtest.txt
|
||||
icu/source/test/testdata/windowsZones.txt
|
||||
icu/source/test/testdata/te_IN.txt
|
||||
icu/source/test/testdata/idna_conf.txt
|
||||
icu/source/test/testdata/metaZones.txt
|
||||
icu/source/test/testdata/LineBreakTest.txt
|
||||
icu/source/test/testdata/ConverterSelectorTestUTF8.txt
|
||||
icu/source/test/testdata/riwords.txt
|
||||
icu/source/test/testdata/WordBreakTest.txt
|
||||
icu/source/test/testdata/regextst.txt
|
||||
icu/source/test/testdata/rbbitst.txt
|
||||
icu/source/test/testdata/casing.txt
|
||||
icu/source/test/testdata/GraphemeBreakTest.txt
|
||||
icu/source/test/testdata/timezoneTypes.txt
|
||||
icu/source/test/testdata/rbbitst.txt
|
||||
icu/source/test/testdata/metaZones.txt
|
||||
icu/source/test/testdata/windowsZones.txt
|
||||
icu/source/test/testdata/collationtest.txt
|
||||
icu/source/test/testdata/dcfmtest.txt
|
||||
icu/source/test/testdata/idna_conf.txt
|
||||
icu/source/test/testdata/format.txt
|
||||
icu/source/test/testdata/break_rules/line_normal.txt
|
||||
icu/source/test/testdata/break_rules/line.txt
|
||||
icu/source/test/testdata/break_rules/grapheme.txt
|
||||
icu/source/test/testdata/te_IN.txt
|
||||
icu/source/test/testdata/NumberFormatTestCases.txt
|
||||
icu/source/test/testdata/casing.txt
|
||||
icu/source/test/testdata/break_rules/sentence.txt
|
||||
icu/source/test/testdata/break_rules/word.txt
|
||||
icu/source/test/testdata/break_rules/readme.txt
|
||||
icu/source/test/testdata/break_rules/line_loose_cj.txt
|
||||
icu/source/test/testdata/break_rules/line_normal_cj.txt
|
||||
icu/source/test/testdata/break_rules/word_POSIX.txt
|
||||
icu/source/test/testdata/break_rules/line.txt
|
||||
icu/source/test/testdata/break_rules/line_normal.txt
|
||||
icu/source/test/testdata/break_rules/grapheme.txt
|
||||
icu/source/test/testdata/break_rules/readme.txt
|
||||
icu/source/test/testdata/break_rules/word.txt
|
||||
icu/source/test/testdata/break_rules/line_loose.txt
|
||||
icu/source/samples/legacy/legacy.vcxproj.filters
|
||||
icu/source/samples/legacy/legacy.vcxproj
|
||||
icu/source/samples/dtitvfmtsample/dtitvfmtsample.vcxproj
|
||||
icu/source/samples/dtitvfmtsample/dtitvfmtsample.vcxproj.filters
|
||||
icu/source/samples/citer/citer.vcxproj.filters
|
||||
icu/source/samples/citer/citer.vcxproj
|
||||
icu/source/samples/msgfmt/msgfmt.vcxproj.filters
|
||||
icu/source/samples/msgfmt/msgfmt.vcxproj
|
||||
icu/source/samples/cal/cal.vcxproj.filters
|
||||
icu/source/samples/cal/cal.vcxproj
|
||||
icu/source/samples/translit/translit.vcxproj
|
||||
icu/source/samples/translit/translit.vcxproj.filters
|
||||
icu/source/samples/ustring/ustring.vcxproj.filters
|
||||
icu/source/samples/ustring/ustring.vcxproj
|
||||
icu/source/test/testdata/break_rules/line_normal_cj.txt
|
||||
icu/source/test/testdata/break_rules/line_loose_cj.txt
|
||||
icu/source/test/cintltst/cintltst.vcxproj.filters
|
||||
icu/source/test/cintltst/cintltst.vcxproj
|
||||
icu/source/test/perf/utrie2perf/utrie2perf.vcxproj
|
||||
icu/source/test/perf/DateFmtPerf/DateFmtPerf.vcxproj.filters
|
||||
icu/source/test/perf/DateFmtPerf/DateFmtPerf.vcxproj
|
||||
icu/source/test/perf/ustrperf/stringperf.vcxproj
|
||||
icu/source/test/perf/ustrperf/stringperf.vcxproj.filters
|
||||
icu/source/test/perf/usetperf/usetperf.vcxproj
|
||||
icu/source/test/perf/usetperf/usetperf.vcxproj.filters
|
||||
icu/source/test/perf/collperf/collperf.vcxproj
|
||||
icu/source/test/perf/collperf/collperf.vcxproj.filters
|
||||
icu/source/test/perf/ucnvavailperf/ucnvavailperf.vcxproj
|
||||
icu/source/test/perf/ubrkperf/ubrkperf.vcxproj.filters
|
||||
icu/source/test/perf/ubrkperf/ubrkperf.vcxproj
|
||||
icu/source/test/perf/collperf2/collperf2.vcxproj
|
||||
icu/source/test/perf/collperf2/collperf2.vcxproj.filters
|
||||
icu/source/test/perf/utfperf/utfperf.vcxproj
|
||||
icu/source/test/perf/utfperf/utfperf.vcxproj.filters
|
||||
icu/source/test/perf/convperf/convperf.vcxproj.filters
|
||||
icu/source/test/perf/convperf/convperf.vcxproj
|
||||
icu/source/test/perf/unisetperf/unisetperf.vcxproj
|
||||
icu/source/test/perf/normperf/dtfmtrtperf.vcxproj.filters
|
||||
icu/source/test/perf/normperf/dtfmtrtperf.vcxproj
|
||||
icu/source/test/perf/normperf/normperf.vcxproj.filters
|
||||
icu/source/test/perf/normperf/normperf.vcxproj
|
||||
icu/source/test/perf/strsrchperf/strsrchperf.vcxproj
|
||||
icu/source/test/perf/strsrchperf/strsrchperf.vcxproj.filters
|
||||
icu/source/test/perf/charperf/charperf.vcxproj
|
||||
icu/source/test/perf/charperf/charperf.vcxproj.filters
|
||||
icu/source/test/intltest/intltest.vcxproj
|
||||
icu/source/test/intltest/intltest.vcxproj.filters
|
||||
icu/source/test/iotest/iotest.vcxproj.filters
|
||||
icu/source/test/iotest/iotest.vcxproj
|
||||
icu/source/test/thaitest/space.txt
|
||||
icu/source/common/common.vcxproj.filters
|
||||
icu/source/common/common_uwp.vcxproj
|
||||
icu/source/common/common.vcxproj
|
||||
icu/source/stubdata/stubdata.vcxproj.filters
|
||||
icu/source/stubdata/stubdata.vcxproj
|
||||
icu/source/samples/plurfmtsample/plurfmtsample.vcxproj.filters
|
||||
icu/source/samples/plurfmtsample/plurfmtsample.vcxproj
|
||||
icu/source/samples/coll/coll.vcxproj.filters
|
||||
icu/source/samples/coll/coll.vcxproj
|
||||
icu/source/samples/ufortune/ufortune.vcxproj.filters
|
||||
icu/source/samples/ufortune/ufortune.vcxproj
|
||||
icu/source/samples/ufortune/resources/es.txt
|
||||
icu/source/samples/ucnv/ucnv.vcxproj.filters
|
||||
icu/source/samples/ucnv/data01.txt
|
||||
icu/source/samples/ucnv/data06.txt
|
||||
icu/source/samples/ucnv/ucnv.vcxproj
|
||||
icu/source/samples/strsrch/strsrch.vcxproj.filters
|
||||
icu/source/samples/strsrch/strsrch.vcxproj
|
||||
icu/source/samples/udata/writer.vcxproj
|
||||
icu/source/samples/udata/reader.vcxproj.filters
|
||||
icu/source/samples/udata/reader.vcxproj
|
||||
icu/source/samples/udata/writer.vcxproj.filters
|
||||
icu/source/samples/dtptngsample/dtptngsample.vcxproj
|
||||
icu/source/samples/dtptngsample/dtptngsample.vcxproj.filters
|
||||
icu/source/samples/ugrep/ugrep.vcxproj.filters
|
||||
icu/source/samples/ugrep/ugrep.vcxproj
|
||||
icu/source/samples/numfmt/numfmt.vcxproj.filters
|
||||
icu/source/samples/numfmt/numfmt.vcxproj
|
||||
icu/source/samples/datefmt/datefmt.vcxproj
|
||||
icu/source/samples/datefmt/datefmt.vcxproj.filters
|
||||
icu/source/samples/csdet/csdet.vcxproj.filters
|
||||
icu/source/samples/csdet/csdet.vcxproj
|
||||
icu/source/samples/date/date.vcxproj.filters
|
||||
icu/source/samples/date/date.vcxproj
|
||||
icu/source/samples/layout/layout.vcxproj
|
||||
icu/source/samples/layout/layout.vcxproj.filters
|
||||
icu/source/samples/layout/Sample.txt
|
||||
icu/source/samples/uresb/resources.vcxproj
|
||||
icu/source/samples/uresb/uresb.vcxproj
|
||||
icu/source/samples/uresb/resources.vcxproj.filters
|
||||
icu/source/samples/uresb/uresb.vcxproj.filters
|
||||
icu/source/samples/uciter8/uciter8.vcxproj.filters
|
||||
icu/source/samples/uciter8/uciter8.vcxproj
|
||||
icu/source/samples/break/break.vcxproj.filters
|
||||
icu/source/samples/break/break.vcxproj
|
||||
icu/source/samples/strsrch/strsrch.vcxproj
|
||||
icu/source/samples/strsrch/strsrch.vcxproj.filters
|
||||
icu/source/samples/citer/citer.vcxproj.filters
|
||||
icu/source/samples/citer/citer.vcxproj
|
||||
icu/source/samples/dtptngsample/dtptngsample.vcxproj.filters
|
||||
icu/source/samples/dtptngsample/dtptngsample.vcxproj
|
||||
icu/source/samples/dtitvfmtsample/dtitvfmtsample.vcxproj
|
||||
icu/source/samples/dtitvfmtsample/dtitvfmtsample.vcxproj.filters
|
||||
icu/source/samples/numfmt/numfmt.vcxproj
|
||||
icu/source/samples/numfmt/numfmt.vcxproj.filters
|
||||
icu/source/samples/case/case.vcxproj.filters
|
||||
icu/source/samples/case/case.vcxproj
|
||||
icu/source/samples/ustring/ustring.vcxproj.filters
|
||||
icu/source/samples/ustring/ustring.vcxproj
|
||||
icu/source/samples/ugrep/ugrep.vcxproj.filters
|
||||
icu/source/samples/ugrep/ugrep.vcxproj
|
||||
icu/source/samples/uresb/resources.vcxproj.filters
|
||||
icu/source/samples/uresb/resources.vcxproj
|
||||
icu/source/samples/uresb/uresb.vcxproj
|
||||
icu/source/samples/uresb/uresb.vcxproj.filters
|
||||
icu/source/samples/udata/reader.vcxproj.filters
|
||||
icu/source/samples/udata/reader.vcxproj
|
||||
icu/source/samples/udata/writer.vcxproj
|
||||
icu/source/samples/udata/writer.vcxproj.filters
|
||||
icu/source/samples/msgfmt/msgfmt.vcxproj.filters
|
||||
icu/source/samples/msgfmt/msgfmt.vcxproj
|
||||
icu/source/samples/date/date.vcxproj.filters
|
||||
icu/source/samples/date/date.vcxproj
|
||||
icu/source/samples/datefmt/datefmt.vcxproj.filters
|
||||
icu/source/samples/datefmt/datefmt.vcxproj
|
||||
icu/source/samples/ufortune/ufortune.vcxproj.filters
|
||||
icu/source/samples/ufortune/ufortune.vcxproj
|
||||
icu/source/samples/ufortune/resources/es.txt
|
||||
icu/source/samples/props/props.vcxproj.filters
|
||||
icu/source/samples/props/props.vcxproj
|
||||
icu/source/samples/plurfmtsample/plurfmtsample.vcxproj
|
||||
icu/source/samples/plurfmtsample/plurfmtsample.vcxproj.filters
|
||||
icu/source/io/io.vcxproj
|
||||
icu/source/io/io.vcxproj.filters
|
||||
icu/source/samples/break/break.vcxproj
|
||||
icu/source/samples/break/break.vcxproj.filters
|
||||
icu/source/samples/ucnv/data01.txt
|
||||
icu/source/samples/ucnv/ucnv.vcxproj.filters
|
||||
icu/source/samples/ucnv/ucnv.vcxproj
|
||||
icu/source/samples/ucnv/data06.txt
|
||||
icu/source/samples/legacy/legacy.vcxproj
|
||||
icu/source/samples/legacy/legacy.vcxproj.filters
|
||||
icu/source/samples/cal/cal.vcxproj
|
||||
icu/source/samples/cal/cal.vcxproj.filters
|
||||
icu/source/samples/uciter8/uciter8.vcxproj
|
||||
icu/source/samples/uciter8/uciter8.vcxproj.filters
|
||||
icu/source/samples/translit/translit.vcxproj
|
||||
icu/source/samples/translit/translit.vcxproj.filters
|
||||
icu/source/samples/csdet/csdet.vcxproj.filters
|
||||
icu/source/samples/csdet/csdet.vcxproj
|
||||
icu/source/layoutex/layoutex.vcxproj.filters
|
||||
icu/source/layoutex/layoutex.vcxproj
|
||||
icu/source/data/makedata.vcxproj.filters
|
||||
icu/source/data/makedata_uwp.vcxproj
|
||||
icu/source/data/makedata.vcxproj
|
||||
icu/source/data/unit/fil_PH.txt
|
||||
icu/source/data/unit/kok.txt
|
||||
icu/source/data/unit/zh_Hans_HK.txt
|
||||
icu/source/data/unit/ga.txt
|
||||
icu/source/data/unit/br.txt
|
||||
icu/source/data/unit/en_VC.txt
|
||||
icu/source/data/unit/en_BS.txt
|
||||
icu/source/data/unit/sr_Latn_YU.txt
|
||||
icu/source/data/unit/th_TH_TRADITIONAL.txt
|
||||
icu/source/data/unit/en_CM.txt
|
||||
icu/source/data/unit/te.txt
|
||||
icu/source/data/unit/ee.txt
|
||||
icu/source/data/unit/sr_Latn_RS.txt
|
||||
icu/source/data/unit/zu.txt
|
||||
icu/source/data/unit/nb_NO.txt
|
||||
icu/source/data/unit/ebu.txt
|
||||
icu/source/data/unit/luo.txt
|
||||
icu/source/data/unit/en_VG.txt
|
||||
icu/source/data/unit/ksh.txt
|
||||
icu/source/data/unit/en_UG.txt
|
||||
icu/source/data/unit/es_CO.txt
|
||||
icu/source/data/unit/en_SS.txt
|
||||
icu/source/data/unit/dua.txt
|
||||
icu/source/data/unit/kam.txt
|
||||
icu/source/data/unit/en_SX.txt
|
||||
icu/source/data/unit/th.txt
|
||||
icu/source/data/unit/en_MT.txt
|
||||
icu/source/data/unit/no_NO_NY.txt
|
||||
icu/source/data/unit/mua.txt
|
||||
icu/source/data/unit/kl.txt
|
||||
icu/source/data/unit/es_BR.txt
|
||||
icu/source/data/unit/hr.txt
|
||||
icu/source/data/unit/en_GI.txt
|
||||
icu/source/data/unit/mas.txt
|
||||
icu/source/data/unit/lg.txt
|
||||
icu/source/data/unit/eo.txt
|
||||
icu/source/data/unit/sk.txt
|
||||
icu/source/data/unit/yo.txt
|
||||
icu/source/data/unit/pa_IN.txt
|
||||
icu/source/data/unit/sr_XK.txt
|
||||
icu/source/data/unit/sh_BA.txt
|
||||
icu/source/data/unit/es_PR.txt
|
||||
icu/source/data/unit/sr_Latn_CS.txt
|
||||
icu/source/data/unit/en_NA.txt
|
||||
icu/source/data/unit/tzm.txt
|
||||
icu/source/data/unit/ca.txt
|
||||
icu/source/data/unit/ru.txt
|
||||
icu/source/data/unit/is.txt
|
||||
icu/source/data/unit/twq.txt
|
||||
icu/source/data/unit/si.txt
|
||||
icu/source/data/unit/chr.txt
|
||||
icu/source/data/unit/bez.txt
|
||||
icu/source/data/unit/en_KE.txt
|
||||
icu/source/data/unit/pt_CH.txt
|
||||
icu/source/data/unit/zh_Hant_HK.txt
|
||||
icu/source/data/unit/en_ZA.txt
|
||||
icu/source/data/unit/en_JE.txt
|
||||
icu/source/data/unit/en_TC.txt
|
||||
icu/source/data/unit/in_ID.txt
|
||||
icu/source/data/unit/jmc.txt
|
||||
icu/source/data/unit/zh_Hant_MO.txt
|
||||
icu/source/data/unit/hu.txt
|
||||
icu/source/data/unit/pa_Arab_PK.txt
|
||||
icu/source/data/unit/pa.txt
|
||||
icu/source/data/unit/en_NH.txt
|
||||
icu/source/data/unit/uz_Arab.txt
|
||||
icu/source/data/unit/zh_Hant.txt
|
||||
icu/source/data/unit/en_TK.txt
|
||||
icu/source/data/unit/qu.txt
|
||||
icu/source/data/unit/sr_BA.txt
|
||||
icu/source/data/unit/in.txt
|
||||
icu/source/data/unit/en_PW.txt
|
||||
icu/source/data/unit/dyo.txt
|
||||
icu/source/data/unit/be.txt
|
||||
icu/source/data/unit/sr_Cyrl_RS.txt
|
||||
icu/source/data/unit/gsw.txt
|
||||
icu/source/data/unit/en_MO.txt
|
||||
icu/source/data/unit/id.txt
|
||||
icu/source/data/unit/shi.txt
|
||||
icu/source/data/unit/ak.txt
|
||||
icu/source/data/unit/yav.txt
|
||||
icu/source/data/unit/shi_Latn.txt
|
||||
icu/source/data/unit/es_VE.txt
|
||||
icu/source/data/unit/sbp.txt
|
||||
icu/source/data/unit/iw_IL.txt
|
||||
icu/source/data/unit/uz_AF.txt
|
||||
icu/source/data/unit/es_UY.txt
|
||||
icu/source/data/unit/ti.txt
|
||||
icu/source/data/unit/xog.txt
|
||||
icu/source/data/unit/guz.txt
|
||||
icu/source/data/unit/shi_Tfng.txt
|
||||
icu/source/data/unit/sah.txt
|
||||
icu/source/data/unit/mo.txt
|
||||
icu/source/data/unit/es_EC.txt
|
||||
icu/source/data/unit/pt_GQ.txt
|
||||
icu/source/data/unit/en_AG.txt
|
||||
icu/source/data/unit/fr.txt
|
||||
icu/source/data/unit/gv.txt
|
||||
icu/source/data/unit/es_PY.txt
|
||||
icu/source/data/unit/th_TH.txt
|
||||
icu/source/data/unit/az.txt
|
||||
icu/source/data/unit/bs_Latn.txt
|
||||
icu/source/data/unit/en_SG.txt
|
||||
icu/source/data/unit/sr_Cyrl_XK.txt
|
||||
icu/source/data/unit/sv.txt
|
||||
icu/source/data/unit/so.txt
|
||||
icu/source/data/unit/en_DG.txt
|
||||
icu/source/data/unit/mgh.txt
|
||||
icu/source/data/unit/gd.txt
|
||||
icu/source/data/unit/en_DK.txt
|
||||
icu/source/data/unit/en_ZW.txt
|
||||
icu/source/data/unit/en_SL.txt
|
||||
icu/source/data/unit/it.txt
|
||||
icu/source/data/unit/luy.txt
|
||||
icu/source/data/unit/sw.txt
|
||||
icu/source/data/unit/ar.txt
|
||||
icu/source/data/unit/fur.txt
|
||||
icu/source/data/unit/en_MG.txt
|
||||
icu/source/data/unit/rwk.txt
|
||||
icu/source/data/unit/es_US.txt
|
||||
icu/source/data/unit/naq.txt
|
||||
icu/source/data/unit/de_CH.txt
|
||||
icu/source/data/unit/sn.txt
|
||||
icu/source/data/unit/en_NR.txt
|
||||
icu/source/data/unit/mk.txt
|
||||
icu/source/data/unit/cgg.txt
|
||||
icu/source/data/unit/lrc.txt
|
||||
icu/source/data/unit/sr_Cyrl_BA.txt
|
||||
icu/source/data/unit/kw.txt
|
||||
icu/source/data/unit/zh_Hans.txt
|
||||
icu/source/data/unit/sh_YU.txt
|
||||
icu/source/data/unit/en_001.txt
|
||||
icu/source/data/unit/en_MS.txt
|
||||
icu/source/data/unit/ast.txt
|
||||
icu/source/data/unit/pa_Guru_IN.txt
|
||||
icu/source/data/unit/ka.txt
|
||||
icu/source/data/unit/wae.txt
|
||||
icu/source/data/unit/lt.txt
|
||||
icu/source/data/unit/en_NF.txt
|
||||
icu/source/data/unit/ig.txt
|
||||
icu/source/data/unit/es_PE.txt
|
||||
icu/source/data/unit/kea.txt
|
||||
icu/source/data/unit/uz.txt
|
||||
icu/source/data/unit/uz_Latn.txt
|
||||
icu/source/data/unit/en_CA.txt
|
||||
icu/source/data/unit/uz_Latn_UZ.txt
|
||||
icu/source/data/unit/pl.txt
|
||||
icu/source/data/unit/sr_Latn_BA.txt
|
||||
icu/source/data/unit/en_KI.txt
|
||||
icu/source/data/unit/uz_Cyrl.txt
|
||||
icu/source/data/unit/en_MY.txt
|
||||
icu/source/data/unit/fr_HT.txt
|
||||
icu/source/data/unit/sh_CS.txt
|
||||
icu/source/data/unit/rw.txt
|
||||
icu/source/data/unit/en_PN.txt
|
||||
icu/source/data/unit/ja.txt
|
||||
icu/source/data/unit/brx.txt
|
||||
icu/source/data/unit/de.txt
|
||||
icu/source/data/unit/en_BZ.txt
|
||||
icu/source/data/unit/cs.txt
|
||||
icu/source/data/unit/mr.txt
|
||||
icu/source/data/unit/en_ZM.txt
|
||||
icu/source/data/unit/es_NI.txt
|
||||
icu/source/data/unit/en_CX.txt
|
||||
icu/source/data/unit/en_BB.txt
|
||||
icu/source/data/unit/en_SZ.txt
|
||||
icu/source/data/unit/saq.txt
|
||||
icu/source/data/unit/en_DM.txt
|
||||
icu/source/data/unit/bem.txt
|
||||
icu/source/data/unit/en_IL.txt
|
||||
icu/source/data/unit/ii.txt
|
||||
icu/source/data/unit/vi.txt
|
||||
icu/source/data/unit/zh_TW.txt
|
||||
icu/source/data/unit/no_NO.txt
|
||||
icu/source/data/unit/kab.txt
|
||||
icu/source/data/unit/yue.txt
|
||||
icu/source/data/unit/en_DE.txt
|
||||
icu/source/data/unit/kk.txt
|
||||
icu/source/data/unit/tr.txt
|
||||
icu/source/data/unit/en_CK.txt
|
||||
icu/source/data/unit/shi_MA.txt
|
||||
icu/source/data/unit/fil.txt
|
||||
icu/source/data/unit/zgh.txt
|
||||
icu/source/data/unit/en.txt
|
||||
icu/source/data/unit/en_KN.txt
|
||||
icu/source/data/unit/en_MW.txt
|
||||
icu/source/data/unit/my.txt
|
||||
icu/source/data/unit/pt_PT.txt
|
||||
icu/source/data/unit/bs.txt
|
||||
icu/source/data/unit/sv_FI.txt
|
||||
icu/source/data/unit/en_GY.txt
|
||||
icu/source/data/unit/fr_CA.txt
|
||||
icu/source/data/unit/sr_Cyrl_YU.txt
|
||||
icu/source/data/unit/pt_LU.txt
|
||||
icu/source/data/unit/fi.txt
|
||||
icu/source/data/unit/en_IE.txt
|
||||
icu/source/data/unit/sr.txt
|
||||
icu/source/data/unit/vai_LR.txt
|
||||
icu/source/data/unit/bg.txt
|
||||
icu/source/data/unit/bs_Cyrl.txt
|
||||
icu/source/data/unit/ky.txt
|
||||
icu/source/data/unit/sr_CS.txt
|
||||
icu/source/data/unit/nyn.txt
|
||||
icu/source/data/unit/sr_ME.txt
|
||||
icu/source/data/unit/en_PK.txt
|
||||
icu/source/data/unit/af.txt
|
||||
icu/source/data/unit/mer.txt
|
||||
icu/source/data/unit/nl.txt
|
||||
icu/source/data/unit/en_IN.txt
|
||||
icu/source/data/unit/en_NL.txt
|
||||
icu/source/data/unit/ne.txt
|
||||
icu/source/data/unit/sr_YU.txt
|
||||
icu/source/data/unit/nus.txt
|
||||
icu/source/data/unit/gu.txt
|
||||
icu/source/data/unit/am.txt
|
||||
icu/source/data/unit/vai_Vaii_LR.txt
|
||||
icu/source/data/unit/en_HK.txt
|
||||
icu/source/data/unit/kn.txt
|
||||
icu/source/data/unit/es_SV.txt
|
||||
icu/source/data/unit/et.txt
|
||||
icu/source/data/unit/pa_Arab.txt
|
||||
icu/source/data/unit/az_AZ.txt
|
||||
icu/source/data/unit/mn.txt
|
||||
icu/source/data/unit/en_TT.txt
|
||||
icu/source/data/unit/en_NU.txt
|
||||
icu/source/data/unit/es.txt
|
||||
icu/source/data/unit/da.txt
|
||||
icu/source/data/unit/en_SH.txt
|
||||
icu/source/data/unit/en_CC.txt
|
||||
icu/source/data/unit/ug.txt
|
||||
icu/source/data/unit/en_GB.txt
|
||||
icu/source/data/unit/pt_AO.txt
|
||||
icu/source/data/unit/es_BO.txt
|
||||
icu/source/data/unit/or.txt
|
||||
icu/source/data/unit/nb.txt
|
||||
icu/source/data/unit/lag.txt
|
||||
icu/source/data/unit/es_GT.txt
|
||||
icu/source/data/unit/sr_RS.txt
|
||||
icu/source/data/unit/en_AU.txt
|
||||
icu/source/data/unit/zh_Hans_SG.txt
|
||||
icu/source/data/unit/vai_Vaii.txt
|
||||
icu/source/data/unit/sr_Cyrl.txt
|
||||
icu/source/data/unit/pa_PK.txt
|
||||
icu/source/data/unit/bn.txt
|
||||
icu/source/data/unit/cy.txt
|
||||
icu/source/data/unit/es_DO.txt
|
||||
icu/source/data/unit/fy.txt
|
||||
icu/source/data/unit/en_VU.txt
|
||||
icu/source/data/unit/en_ER.txt
|
||||
icu/source/data/unit/sq.txt
|
||||
icu/source/data/unit/lv.txt
|
||||
icu/source/data/unit/to.txt
|
||||
icu/source/data/unit/bas.txt
|
||||
icu/source/data/unit/ur.txt
|
||||
icu/source/data/unit/ro_MD.txt
|
||||
icu/source/data/unit/ksf.txt
|
||||
icu/source/data/unit/se.txt
|
||||
icu/source/data/unit/om.txt
|
||||
icu/source/data/unit/rm.txt
|
||||
icu/source/data/unit/en_IM.txt
|
||||
icu/source/data/unit/kde.txt
|
||||
icu/source/data/unit/zh_CN.txt
|
||||
icu/source/data/unit/es_CU.txt
|
||||
icu/source/data/unit/en_GG.txt
|
||||
icu/source/data/unit/en_RW.txt
|
||||
icu/source/data/unit/ro.txt
|
||||
icu/source/data/unit/nmg.txt
|
||||
icu/source/data/unit/dz.txt
|
||||
icu/source/data/unit/en_AT.txt
|
||||
icu/source/data/unit/en_SB.txt
|
||||
icu/source/data/unit/pa_Guru.txt
|
||||
icu/source/data/unit/en_FJ.txt
|
||||
icu/source/data/unit/es_PA.txt
|
||||
icu/source/data/unit/asa.txt
|
||||
icu/source/data/unit/ff.txt
|
||||
icu/source/data/unit/zh_Hans_CN.txt
|
||||
icu/source/data/unit/root.txt
|
||||
icu/source/data/unit/en_BM.txt
|
||||
icu/source/data/unit/en_WS.txt
|
||||
icu/source/data/unit/ja_JP_TRADITIONAL.txt
|
||||
icu/source/data/unit/en_FI.txt
|
||||
icu/source/data/unit/ewo.txt
|
||||
icu/source/data/unit/pt_GW.txt
|
||||
icu/source/data/unit/ln.txt
|
||||
icu/source/data/unit/zh_HK.txt
|
||||
icu/source/data/unit/jgo.txt
|
||||
icu/source/data/unit/dje.txt
|
||||
icu/source/data/unit/en_BW.txt
|
||||
icu/source/data/unit/es_CR.txt
|
||||
icu/source/data/unit/pt_CV.txt
|
||||
icu/source/data/unit/es_419.txt
|
||||
icu/source/data/unit/ms.txt
|
||||
icu/source/data/unit/ja_JP.txt
|
||||
icu/source/data/unit/fa.txt
|
||||
icu/source/data/unit/en_KY.txt
|
||||
icu/source/data/unit/en_CH.txt
|
||||
icu/source/data/unit/en_PG.txt
|
||||
icu/source/data/unit/he_IL.txt
|
||||
icu/source/data/unit/mg.txt
|
||||
icu/source/data/unit/as.txt
|
||||
icu/source/data/unit/smn.txt
|
||||
icu/source/data/unit/bs_BA.txt
|
||||
icu/source/data/unit/lo.txt
|
||||
icu/source/data/unit/en_AI.txt
|
||||
icu/source/data/unit/sg.txt
|
||||
icu/source/data/unit/he.txt
|
||||
icu/source/data/unit/es_MX.txt
|
||||
icu/source/data/unit/no.txt
|
||||
icu/source/data/unit/bo.txt
|
||||
icu/source/data/unit/ml.txt
|
||||
icu/source/data/unit/gl.txt
|
||||
icu/source/data/unit/ps.txt
|
||||
icu/source/data/unit/en_JM.txt
|
||||
icu/source/data/unit/teo.txt
|
||||
icu/source/data/unit/en_LC.txt
|
||||
icu/source/data/unit/nds.txt
|
||||
icu/source/data/unit/sr_Cyrl_CS.txt
|
||||
icu/source/data/unit/agq.txt
|
||||
icu/source/data/unit/pt.txt
|
||||
icu/source/data/unit/es_CL.txt
|
||||
icu/source/data/unit/bs_Latn_BA.txt
|
||||
icu/source/data/unit/bm.txt
|
||||
icu/source/data/unit/nn.txt
|
||||
icu/source/data/unit/nnh.txt
|
||||
icu/source/data/unit/zh.txt
|
||||
icu/source/data/unit/dav.txt
|
||||
icu/source/data/unit/ha.txt
|
||||
icu/source/data/unit/tl_PH.txt
|
||||
icu/source/data/unit/sh.txt
|
||||
icu/source/data/unit/tl.txt
|
||||
icu/source/data/unit/khq.txt
|
||||
icu/source/data/unit/lkt.txt
|
||||
icu/source/data/unit/ks.txt
|
||||
icu/source/data/unit/pt_ST.txt
|
||||
icu/source/data/unit/en_SI.txt
|
||||
icu/source/data/unit/uk.txt
|
||||
icu/source/data/unit/ta.txt
|
||||
icu/source/data/unit/fo.txt
|
||||
icu/source/data/unit/shi_Tfng_MA.txt
|
||||
icu/source/data/unit/os.txt
|
||||
icu/source/data/unit/ur_IN.txt
|
||||
icu/source/data/unit/lb.txt
|
||||
icu/source/data/unit/es_HN.txt
|
||||
icu/source/data/unit/hsb.txt
|
||||
icu/source/data/unit/en_GH.txt
|
||||
icu/source/data/unit/zh_Hans_MO.txt
|
||||
icu/source/data/unit/az_Latn_AZ.txt
|
||||
icu/source/data/unit/en_TZ.txt
|
||||
icu/source/data/unit/mzn.txt
|
||||
icu/source/data/unit/zh_SG.txt
|
||||
icu/source/data/unit/en_150.txt
|
||||
icu/source/data/unit/lu.txt
|
||||
icu/source/data/unit/el.txt
|
||||
icu/source/data/unit/en_CY.txt
|
||||
icu/source/data/unit/uz_Arab_AF.txt
|
||||
icu/source/data/unit/kln.txt
|
||||
icu/source/data/unit/seh.txt
|
||||
icu/source/data/unit/mt.txt
|
||||
icu/source/data/unit/ckb.txt
|
||||
icu/source/data/unit/km.txt
|
||||
icu/source/data/unit/ksb.txt
|
||||
icu/source/data/unit/en_MU.txt
|
||||
icu/source/data/unit/vai_Latn.txt
|
||||
icu/source/data/unit/en_SD.txt
|
||||
icu/source/data/unit/en_NG.txt
|
||||
icu/source/data/unit/en_FM.txt
|
||||
icu/source/data/unit/sr_Latn_ME.txt
|
||||
icu/source/data/unit/haw.txt
|
||||
icu/source/data/unit/yi.txt
|
||||
icu/source/data/unit/en_LR.txt
|
||||
icu/source/data/unit/vun.txt
|
||||
icu/source/data/unit/en_FK.txt
|
||||
icu/source/data/unit/az_Cyrl.txt
|
||||
icu/source/data/unit/mfe.txt
|
||||
icu/source/data/unit/zh_Hant_TW.txt
|
||||
icu/source/data/unit/es_AR.txt
|
||||
icu/source/data/unit/en_PH.txt
|
||||
icu/source/data/unit/pt_MZ.txt
|
||||
icu/source/data/unit/hy.txt
|
||||
icu/source/data/unit/dsb.txt
|
||||
icu/source/data/unit/en_GD.txt
|
||||
icu/source/data/unit/en_SE.txt
|
||||
icu/source/data/unit/ki.txt
|
||||
icu/source/data/unit/ko.txt
|
||||
icu/source/data/unit/en_NZ.txt
|
||||
icu/source/data/unit/iw.txt
|
||||
icu/source/data/unit/rn.txt
|
||||
icu/source/data/unit/en_BE.txt
|
||||
icu/source/data/unit/en_RH.txt
|
||||
icu/source/data/unit/hi.txt
|
||||
icu/source/data/unit/en_TO.txt
|
||||
icu/source/data/unit/id_ID.txt
|
||||
icu/source/data/unit/nd.txt
|
||||
icu/source/data/unit/pt_TL.txt
|
||||
icu/source/data/unit/vai.txt
|
||||
icu/source/data/unit/mgo.txt
|
||||
icu/source/data/unit/en_LS.txt
|
||||
icu/source/data/unit/ses.txt
|
||||
icu/source/data/unit/nn_NO.txt
|
||||
icu/source/data/unit/eu.txt
|
||||
icu/source/data/unit/en_SC.txt
|
||||
icu/source/data/unit/zh_MO.txt
|
||||
icu/source/data/unit/sl.txt
|
||||
icu/source/data/unit/sr_Latn.txt
|
||||
icu/source/data/unit/ce.txt
|
||||
icu/source/data/unit/en_IO.txt
|
||||
icu/source/data/unit/en_GM.txt
|
||||
icu/source/data/unit/en_TV.txt
|
||||
icu/source/data/unit/rof.txt
|
||||
icu/source/data/unit/kkj.txt
|
||||
icu/source/data/unit/pt_MO.txt
|
||||
icu/source/data/unit/az_Latn.txt
|
||||
icu/source/data/unit/uz_UZ.txt
|
||||
icu/source/data/unidata/confusablesWholeScript.txt
|
||||
icu/source/data/unidata/FractionalUCA.txt
|
||||
icu/source/data/unidata/confusables.txt
|
||||
icu/source/data/unidata/changes.txt
|
||||
icu/source/data/unidata/UCARules.txt
|
||||
icu/source/data/misc/windowsZones.txt
|
||||
icu/source/data/misc/keyTypeData.txt
|
||||
icu/source/data/misc/supplementalData.txt
|
||||
icu/source/data/misc/dayPeriods.txt
|
||||
icu/source/data/misc/metaZones.txt
|
||||
icu/source/data/misc/likelySubtags.txt
|
||||
icu/source/data/misc/numberingSystems.txt
|
||||
icu/source/data/misc/metadata.txt
|
||||
icu/source/data/misc/currencyNumericCodes.txt
|
||||
icu/source/data/misc/genderList.txt
|
||||
icu/source/data/misc/timezoneTypes.txt
|
||||
icu/source/data/misc/plurals.txt
|
||||
icu/source/tools/gensprep/gensprep.vcxproj
|
||||
icu/source/tools/gensprep/gensprep.vcxproj.filters
|
||||
icu/source/tools/genbrk/genbrk.vcxproj.filters
|
||||
icu/source/tools/genbrk/genbrk.vcxproj
|
||||
icu/source/tools/genrb/derb.vcxproj.filters
|
||||
icu/source/tools/genrb/genrb.vcxproj
|
||||
icu/source/tools/genrb/genrb.vcxproj.filters
|
||||
icu/source/tools/genrb/derb.vcxproj
|
||||
icu/source/tools/ctestfw/ctestfw.vcxproj
|
||||
icu/source/tools/ctestfw/ctestfw.vcxproj.filters
|
||||
icu/source/tools/icupkg/icupkg.vcxproj
|
||||
icu/source/tools/gennorm2/gennorm2.vcxproj
|
||||
icu/source/tools/pkgdata/pkgdata.vcxproj
|
||||
icu/source/tools/pkgdata/pkgdata.vcxproj.filters
|
||||
icu/source/tools/genccode/genccode.vcxproj
|
||||
icu/source/tools/genccode/genccode.vcxproj.filters
|
||||
icu/source/tools/gentest/gentest.vcxproj.filters
|
||||
icu/source/tools/gentest/gentest.vcxproj
|
||||
icu/source/tools/gendict/gendict.vcxproj
|
||||
icu/source/tools/gendict/gendict.vcxproj.filters
|
||||
icu/source/tools/icuswap/icuswap.vcxproj
|
||||
icu/source/tools/ctestfw/ctestfw.vcxproj.filters
|
||||
icu/source/tools/ctestfw/ctestfw.vcxproj
|
||||
icu/source/tools/icupkg/icupkg.vcxproj
|
||||
icu/source/tools/makeconv/makeconv.vcxproj
|
||||
icu/source/tools/makeconv/makeconv.vcxproj.filters
|
||||
icu/source/tools/pkgdata/pkgdata.vcxproj.filters
|
||||
icu/source/tools/pkgdata/pkgdata.vcxproj
|
||||
icu/source/tools/tzcode/icuzdump.vcxproj.filters
|
||||
icu/source/tools/tzcode/icuzdump.vcxproj
|
||||
icu/source/tools/gencmn/gencmn.vcxproj
|
||||
icu/source/tools/gendict/gendict.vcxproj.filters
|
||||
icu/source/tools/gendict/gendict.vcxproj
|
||||
icu/source/tools/gencmn/gencmn.vcxproj.filters
|
||||
icu/source/tools/gencfu/gencfu.vcxproj.filters
|
||||
icu/source/tools/gencfu/gencfu.vcxproj
|
||||
icu/source/tools/toolutil/toolutil.vcxproj
|
||||
icu/source/tools/icuinfo/icuinfo.vcxproj
|
||||
icu/source/tools/icuinfo/testplug.vcxproj
|
||||
icu/source/tools/icuinfo/testplug.vcxproj.filters
|
||||
icu/source/tools/gencmn/gencmn.vcxproj
|
||||
icu/source/tools/gencnval/gencnval.vcxproj
|
||||
icu/source/tools/gencnval/gencnval.vcxproj.filters
|
||||
icu/source/tools/genccode/genccode.vcxproj.filters
|
||||
icu/source/tools/genccode/genccode.vcxproj
|
||||
icu/source/tools/icuswap/icuswap.vcxproj
|
||||
icu/source/tools/gennorm2/gennorm2.vcxproj
|
||||
icu/source/stubdata/stubdata.vcxproj.filters
|
||||
icu/source/stubdata/stubdata.vcxproj
|
||||
icu/source/i18n/i18n.vcxproj
|
||||
icu/source/i18n/i18n.vcxproj.filters
|
||||
icu/source/common/common.vcxproj.filters
|
||||
icu/source/common/common.vcxproj
|
||||
icu/source/extra/uconv/uconv.vcxproj.filters
|
||||
icu/source/extra/uconv/uconv.vcxproj
|
||||
icu/source/extra/uconv/resources/fr.txt
|
||||
icu/source/extra/uconv/resources/root.txt
|
||||
icu/source/extra/uconv/samples/utf8/danish.txt
|
||||
icu/source/extra/uconv/samples/utf8/korean.txt
|
||||
icu/source/extra/uconv/samples/utf8/utf-8-demo.txt
|
||||
icu/source/extra/uconv/samples/utf8/hangul.txt
|
||||
icu/source/extra/uconv/samples/utf8/jap.txt
|
||||
icu/source/extra/uconv/samples/utf8/russian.txt
|
||||
icu/source/extra/uconv/samples/utf8/greek.txt
|
||||
icu/source/extra/uconv/samples/utf8/turkish.txt
|
||||
icu/source/extra/uconv/samples/utf8/chinese-ulysses.txt
|
||||
icu/source/extra/uconv/samples/utf8/simplechinese.txt
|
||||
icu/source/extra/uconv/samples/utf8/hania.txt
|
||||
icu/source/extra/uconv/samples/utf8/croat.txt
|
||||
icu/source/extra/uconv/samples/utf8/armenian.txt
|
||||
icu/source/extra/uconv/samples/utf8/banviet.txt
|
||||
icu/source/extra/uconv/samples/utf8/linji.txt
|
||||
icu/source/extra/uconv/samples/utf8/maopoem.txt
|
||||
icu/source/extra/uconv/samples/utf8/many.txt
|
||||
icu/source/layoutex/layoutex.vcxproj
|
||||
icu/source/layoutex/layoutex.vcxproj.filters
|
||||
icu/source/tools/tzcode/icuzdump.vcxproj.filters
|
||||
icu/source/tools/tzcode/icuzdump.vcxproj
|
||||
icu/source/tools/gencfu/gencfu.vcxproj.filters
|
||||
icu/source/tools/gencfu/gencfu.vcxproj
|
||||
icu/source/tools/genbrk/genbrk.vcxproj
|
||||
icu/source/tools/genbrk/genbrk.vcxproj.filters
|
||||
icu/source/tools/icuinfo/testplug.vcxproj
|
||||
icu/source/tools/icuinfo/icuinfo.vcxproj
|
||||
icu/source/tools/icuinfo/testplug.vcxproj.filters
|
||||
icu/source/tools/toolutil/toolutil.vcxproj
|
||||
icu/source/tools/gensprep/gensprep.vcxproj.filters
|
||||
icu/source/tools/gensprep/gensprep.vcxproj
|
||||
icu/source/tools/genrb/genrb.vcxproj
|
||||
icu/source/tools/genrb/derb.vcxproj.filters
|
||||
icu/source/tools/genrb/derb.vcxproj
|
||||
icu/source/tools/genrb/genrb.vcxproj.filters
|
||||
|
@ -11,8 +11,8 @@
|
||||
The ICU license is now in plain text format, see <a href="./LICENSE">LICENSE</a>.
|
||||
Update links and software appropriately.
|
||||
</p>
|
||||
<i>Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html</i>
|
||||
<i>Copyright (c) 1995-2016 International Business Machines Corporation and others</i>
|
||||
<i>© 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html</i>
|
||||
<i>© 1995-2016 International Business Machines Corporation and others</i>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
248
readme.html
248
readme.html
@ -3,7 +3,7 @@
|
||||
|
||||
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
|
||||
<head>
|
||||
<title>ReadMe for ICU 58.2</title>
|
||||
<title>ReadMe for ICU 60.2</title>
|
||||
<meta name="COPYRIGHT" content=
|
||||
"Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html"/>
|
||||
<!-- meta name="COPYRIGHT" content=
|
||||
@ -32,7 +32,7 @@
|
||||
International Components for Unicode<br/>
|
||||
<span class="only-rc">Release Candidate</span>
|
||||
<span class="only-milestone">(Milestone Release)</span>
|
||||
<abbr title="International Components for Unicode">ICU</abbr> 58.2 ReadMe
|
||||
<abbr title="International Components for Unicode">ICU</abbr> 60.2 ReadMe
|
||||
</h1>
|
||||
|
||||
<!-- Shouldn't need to comment/uncomment this paragraph, just change the body class -->
|
||||
@ -44,12 +44,15 @@
|
||||
<p class="note only-rc">This is a release candidate version of ICU4C.
|
||||
It is not recommended for production use.</p>
|
||||
|
||||
<p>Last updated: 2016-Dec-8<br/>
|
||||
<p>Last updated: 2017-Dec-07<br/>
|
||||
Copyright © 2016 and later: Unicode, Inc. and others. License & terms of use:
|
||||
<a href="http://www.unicode.org/copyright.html">http://www.unicode.org/copyright.html</a><br/>
|
||||
Copyright © 1997-2016 International Business Machines Corporation and others.
|
||||
All Rights Reserved.</p>
|
||||
<!-- Remember that there is a copyright at the end too -->
|
||||
|
||||
<p class="note">This is a maintenance update of ICU 60,
|
||||
with a small number of bug fixes but no API changes.</p>
|
||||
<hr/>
|
||||
|
||||
<h2 class="TOC">Table of Contents</h2>
|
||||
@ -59,9 +62,7 @@
|
||||
|
||||
<li><a href="#GettingStarted">Getting Started</a></li>
|
||||
|
||||
<li><a href="#News">What Is New In This release?</a></li>
|
||||
|
||||
<li><a href="#RecentPreviousChanges">Changes in recent previous releases</a></li>
|
||||
<li><a href="#News">What Is New In This Release?</a></li>
|
||||
|
||||
<li><a href="#Download">How To Download the Source Code</a></li>
|
||||
|
||||
@ -230,148 +231,24 @@
|
||||
</table>
|
||||
|
||||
<p><strong>Important:</strong> Please make sure you understand the <a href=
|
||||
"http://source.icu-project.org/repos/icu/icu/trunk/LICENSE">Copyright and License Information</a>.</p>
|
||||
"http://source.icu-project.org/repos/icu/trunk/icu4c/LICENSE">Copyright and License Information</a>.</p>
|
||||
|
||||
<h2><a name="News" href="#News" id="News">What is new in this
|
||||
release?</a></h2>
|
||||
|
||||
<h3>New License</h3>
|
||||
<p>This is the first release of ICU since the project
|
||||
<a href="http://blog.unicode.org/2016/05/icu-joins-unicode-consortium.html">joined
|
||||
the Unicode Consortium</a>. The license has changed to the
|
||||
<a href="http://www.unicode.org/copyright.html#License">Unicode license</a>
|
||||
(which is similar to the ICU 1.8.1-57 license).</p>
|
||||
<h2><a name="News" href="#News" id="News">What Is New In This Release?</a></h2>
|
||||
|
||||
<h3>Layout Engine Removed</h3>
|
||||
<p>The LayoutEngine was deprecated in ICU 54 and has now been removed.
|
||||
see <a href='http://userguide.icu-project.org/layoutengine'>the
|
||||
User's Guide</a> for more details and migration recommendations.
|
||||
</p>
|
||||
<p>
|
||||
Note that the ParagraphLayout (layoutex) library is not deprecated.
|
||||
There is a new option, <tt>--enable-layoutex</tt> which will build
|
||||
the ParagraphLayout library using <a href="http://harfbuzz.org">HarfBuzz</a>
|
||||
instead of ICU as the layout engine. See <a href="http://userguide.icu-project.org/layoutengine">
|
||||
the users' guide</a> for more information about how to build.
|
||||
</p>
|
||||
<p>
|
||||
The options <tt>--disable-layout</tt>
|
||||
or <tt>--with-layout=false</tt> are being retained for
|
||||
compatibility, but have no effect.
|
||||
</p>
|
||||
<p>See the <a href="http://site.icu-project.org/download/60">ICU 60 download page</a>
|
||||
for an overview of this release, important changes, new features, bug fixes, known issues,
|
||||
changes to supported platforms and build environments,
|
||||
and migration issues for existing applications migrating from previous ICU releases.</p>
|
||||
|
||||
<h3>Changes in CLDR 30 data</h3>
|
||||
<ul>
|
||||
<li>For some combinations of numbering system (arab, arabext, latn) and/or locale
|
||||
(ar, fa, he), there were changes to the bidirectional control characters used
|
||||
with certain symbols (percent, minus, plus), and changes to number patterns
|
||||
(currency and/or percent, including addition of bidirectional control
|
||||
characters in some cases).</li>
|
||||
<li>The bidirectional controls used for such purposes now include U+061C ARABIC
|
||||
LETTER MARK (ALM), which requires use of the bidirectional algorithm from
|
||||
Unicode 6.3 or later.</li>
|
||||
<li>The time separator for Norwegian locales (nb, nn) was changed to be ‘:’
|
||||
throughout.</li>
|
||||
<li>For more information on CLDR 30 changes, see
|
||||
<a href="http://cldr.unicode.org/index/downloads/cldr-30">CLDR 30 download
|
||||
page</a>.</li>
|
||||
</ul>
|
||||
<p>See the <a href="APIChangeReport.html">API Change Report</a> for a complete list of
|
||||
APIs added, removed, or changed in this release.</p>
|
||||
|
||||
<h3>Windows build changes</h3>
|
||||
<p>Windows builds using Visual Studio now require Visual Studio 2015; otherwise you can
|
||||
use cygwin or similar to build for Windows.</p>
|
||||
<p><a name="RecentPreviousChanges" id="RecentPreviousChanges"></a>For
|
||||
changes in previous releases, see the
|
||||
main <a href="http://site.icu-project.org/download">ICU download page</a>
|
||||
with its version-specific subpages.</p>
|
||||
|
||||
<h3>API Changes</h3>
|
||||
<p>See the <a href="APIChangeReport.html">API Change Report</a> for a complete
|
||||
list of APIs added, removed, or changed in this release.</p>
|
||||
|
||||
<!-- standing item -->
|
||||
<h3>Full release notes and the latest updates</h3>
|
||||
<p>The previous list concentrates on <em>changes that affect existing
|
||||
applications migrating from previous ICU releases</em>.
|
||||
For more news about this release, as well as late-breaking news, see the
|
||||
<a href="http://site.icu-project.org/download/57">ICU download page</a>.</p>
|
||||
|
||||
<h3>Upcoming changes</h3>
|
||||
<p>Please note the following changes planned for an upcoming ICU4C release (likely ICU 59):</p>
|
||||
<ul>
|
||||
<li>Compiler support for C++11 will be required.</li>
|
||||
<li>Support for Windows XP will be removed.</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="RecentPreviousChanges" href="#RecentPreviousChanges" id="RecentPreviousChanges">Changes in recent
|
||||
previous releases</a></h2>
|
||||
|
||||
<!-- ICU 57 items -->
|
||||
<h3>ICU 57: Changes related to new CLDR data and specifications</h3>
|
||||
<ul>
|
||||
<li>Time formats may include the new day period characters b, B, and
|
||||
these may produced in response to the new skeleton character C used
|
||||
with DateTimePatternGenerator.</li>
|
||||
<li>In day period rules, the use of "after" has been deprecated.</li>
|
||||
<li>The measurement unit "proportion-karat" has been renamed to
|
||||
"concentr-karat".</li>
|
||||
</ul>
|
||||
|
||||
<!-- ICU 56 items -->
|
||||
<h3>ICU 56: COLON withdrawn as date/time pattern character</h3>
|
||||
<p>In ICU 55, COLON was introduced as a date/time pattern character
|
||||
to be replaced by the value of the timeSeparator for the number
|
||||
system being used; a corresponding new UDateFormatField
|
||||
UDAT_TIME_SEPARATOR_FIELD was added. Use of COLON caused some
|
||||
backwards compatibility problems, so it is being withdrawn as a
|
||||
pattern character. However, UDAT_TIME_SEPARATOR_FIELD remains
|
||||
as does the mechanism for replacing a pattern character with the
|
||||
value of the timeSeparator; a new pattern character may be
|
||||
assigned in the future.</p>
|
||||
|
||||
<h3>ICU 56: ICU Plugins are disabled by default</h3>
|
||||
<p>ICU Plugins are now disabled by default. They may be enabled
|
||||
with the configure option
|
||||
<tt>--enable-plugins</tt> or by means of
|
||||
<tt>#define UCONFIG_ENABLE_PLUGINS</tt>.
|
||||
</p>
|
||||
|
||||
<h3>ICU 55: Deprecations in PluralRules (plurrule.h)</h3>
|
||||
<p>The following PluralRules methods never had an implementation
|
||||
but were inadvertently marked @stable; they have now been
|
||||
deprecated. [#<a href="http://bugs.icu-project.org/trac/ticket/10759">10759</a>]</p>
|
||||
<ul>
|
||||
<li><tt>double icu::PluralRules::getUniqueKeywordValue(const UnicodeString&)</tt></li>
|
||||
<li><tt>int32_t icu::PluralRules::getAllKeywordValues(const UnicodeString&, double*, int32_t, UErrorCode&)</tt></li>
|
||||
</ul>
|
||||
|
||||
<h3>ICU 55: Deprecate uidna.h functions for IDNA2003 support</h3>
|
||||
<p>The IDNA2003 API has been deprecated; use the API for IDNA2008 / UTS #46 instead via
|
||||
uidna_openUTS46() or class IDNA [#<a href="http://bugs.icu-project.org/trac/ticket/8477">8477</a>].
|
||||
This applies to the following:</p>
|
||||
<ul>
|
||||
<li><tt>enum value UIDNA_ALLOW_UNASSIGNED</tt></li>
|
||||
<li><tt>uidna_IDNToASCII</tt></li>
|
||||
<li><tt>uidna_IDNToUnicode</tt></li>
|
||||
<li><tt>uidna_compare</tt></li>
|
||||
<li><tt>uidna_toASCII</tt></li>
|
||||
<li><tt>uidna_toUnicode</tt></li>
|
||||
</ul>
|
||||
|
||||
<h3>ICU 54: Deprecation of Collation Short Strings</h3>
|
||||
<p>The collation short naming scheme and its API functions are deprecated.
|
||||
Use ucol_open() with language tag collation keywords instead (see <a href="http://userguide.icu-project.org/collation/api">Collation API Details</a>). For example, <code>ucol_open("de-u-co-phonebk-ka-shifted", &errorCode)</code>
|
||||
for German Phonebook order with "ignore punctuation" mode.</p>
|
||||
|
||||
<h3>ICU 54: Deprecation of UCOL_TAILORINGS_VERSION</h3>
|
||||
<p>This was originally intended to be the version of collation tailorings,
|
||||
but that information is actually in the tailorings data and this
|
||||
constant has always been (and now will continue to be) 1.</p>
|
||||
|
||||
<!-- ICU 53 items -->
|
||||
<h3>ICU 53: Deprecation of TimeUnitFormat</h3>
|
||||
<p>The TimeUnitFormat and its methods were actually deprecated in ICU 53 and the
|
||||
class as a whole was tagged as deprecated in that release, but the status tags for
|
||||
the individual methods did not correctly indicate the deprecated status; they
|
||||
do as of ICU 54. Use the MeasureFormat class and its methods instead.</p>
|
||||
|
||||
<!-- end of What's New items -->
|
||||
|
||||
<h2><a name="Download" href="#Download" id="Download">How To Download the
|
||||
Source Code</a></h2>
|
||||
@ -505,12 +382,31 @@
|
||||
<li><b>brkitr/</b> Data files for character, word, sentence, title
|
||||
casing and line boundary analysis.</li>
|
||||
|
||||
<li><b>coll/</b> Data for collation tailorings. The makefile
|
||||
<b>colfiles.mk</b> contains the list of resource bundle files.</li>
|
||||
|
||||
<li><b>locales/</b> These .txt files contain ICU language and
|
||||
culture-specific localization data. Two special bundles are
|
||||
<b>root</b>, which is the fallback data and parent of other bundles,
|
||||
and <b>index</b>, which contains a list of installed bundles. The
|
||||
makefile <b>resfiles.mk</b> contains the list of resource bundle
|
||||
files.</li>
|
||||
files. Some of the locale data is split out into the type-specific
|
||||
directories curr, lang, region, unit, and zone, described below.</li>
|
||||
|
||||
<li><b>curr/</b> Locale data for currency symbols and names (including
|
||||
plural forms), with its own makefile <b>resfiles.mk</b>.</li>
|
||||
|
||||
<li><b>lang/</b> Locale data for names of languages, scripts, and locale
|
||||
key names and values, with its own makefile <b>resfiles.mk</b>.</li>
|
||||
|
||||
<li><b>region/</b> Locale data for names of regions, with its own
|
||||
makefile <b>resfiles.mk</b>.</li>
|
||||
|
||||
<li><b>unit/</b> Locale data for measurement unit patterns and names,
|
||||
with its own makefile <b>resfiles.mk</b>.</li>
|
||||
|
||||
<li><b>zone/</b> Locale data for time zone names, with its own
|
||||
makefile <b>resfiles.mk</b>.</li>
|
||||
|
||||
<li><b>mappings/</b> Here are the code page converter tables. These
|
||||
.ucm files contain mappings to and from Unicode. These are compiled
|
||||
@ -532,9 +428,9 @@
|
||||
information.</li>
|
||||
|
||||
<li><b>misc/</b> The misc directory contains other data files which
|
||||
did not fit into the above categories. Currently it only contains
|
||||
time zone information, and a name preperation file for <a href=
|
||||
"http://www.ietf.org/rfc/rfc3490.txt">IDNA</a>.</li>
|
||||
did not fit into the above categories, including time zone
|
||||
information, region-specific data, and other data derived from CLDR
|
||||
supplemental data.</li>
|
||||
|
||||
<li><b>out/</b> This directory contains the assembled memory mapped
|
||||
files.</li>
|
||||
@ -690,7 +586,7 @@
|
||||
we recommend hardcoding ICU's default charset to UTF-8.
|
||||
This means that some implementation code becomes simpler and faster,
|
||||
and statically linked ICU libraries become smaller.
|
||||
(See the <a href="http://icu-project.org/apiref/icu4c/utypes_8h.html#0a33e1edf3cd23d9e9c972b63c9f7943">U_CHARSET_IS_UTF8</a>
|
||||
(See the <a href="http://icu-project.org/apiref/icu4c/platform_8h.html#a0a33e1edf3cd23d9e9c972b63c9f7943">U_CHARSET_IS_UTF8</a>
|
||||
API documentation for more details.)<br />
|
||||
You can <code>-DU_CHARSET_IS_UTF8=1</code> or
|
||||
modify unicode/utypes.h (in ICU 4.8 and below)
|
||||
@ -737,6 +633,14 @@
|
||||
(via -D or uconfig.h, as above)
|
||||
and include those header files explicitly that you actually need.<br />
|
||||
Note: The ICU test suites cannot be compiled with this setting.</li>
|
||||
<li><b>utf_old.h:</b>
|
||||
All of utf_old.h is deprecated or obsolete.<br />
|
||||
Beginning with ICU 60,
|
||||
you should define <code>U_HIDE_OBSOLETE_UTF_OLD_H</code> to 1
|
||||
(via -D or uconfig.h, as above).
|
||||
Use of any of these macros should be replaced as noted
|
||||
in the comments for the obsolete macro.<br />
|
||||
Note: The ICU test suites <i>can</i> be compiled with this setting.</li>
|
||||
<li><b>.dat file:</b> By default, the ICU data is built into
|
||||
a shared library (DLL). This is convenient because it requires no
|
||||
install-time or runtime configuration,
|
||||
@ -779,7 +683,7 @@
|
||||
source file tree clean and have build output files written to
|
||||
a different location. This is called an "out-of-source build".
|
||||
Simply invoke the configure script from the target location:
|
||||
<pre>~/icu$ svn export http://source.icu-project.org/repos/icu/icu/trunk
|
||||
<pre>~/icu$ svn export http://source.icu-project.org/repos/icu/trunk/icu4c
|
||||
~/icu$ mkdir trunk-dev
|
||||
~/icu$ cd trunk-dev
|
||||
~/icu/trunk-dev$ ../trunk/source/runConfigureICU Linux
|
||||
@ -851,7 +755,9 @@
|
||||
<ul>
|
||||
<li>Microsoft Windows</li>
|
||||
|
||||
<li>Microsoft Visual C++ (see the ICU download page for the currently compatible version)</li>
|
||||
<li>Microsoft Visual C++ (part of <a href="https://www.visualstudio.com/">Visual Studio</a>) (see the ICU download page for the currently compatible version)</li>
|
||||
|
||||
<li><i><b>Optional:</b></i> A version of the <a href="https://developer.microsoft.com/windows/downloads">Windows 10 SDK</a> (if you want to build the UWP projects)</li>
|
||||
</ul>
|
||||
<p class="note"><a href="#HowToBuildCygwin">Cygwin</a> is required if using a version of MSVC other than the one
|
||||
compatible with the supplied project files or if other compilers are used to build ICU. (e.g. GCC)</p>
|
||||
@ -874,6 +780,11 @@
|
||||
"#HowToBuildWindowsCommandLine">command line note below</a> if you want to
|
||||
build from the command line instead.</li>
|
||||
|
||||
<li>You may need to re-target the UWP projects to the version of the SDK that you have installed. In Visual Studio you can
|
||||
right-click on the UWP projects and select the option 'Retarget SDK Version'. Note: You do not need to have a copy of
|
||||
the Windows 10 SDK installed in order to build the non-UWP projects in Visual Studio. If the SDK is not installed then the
|
||||
UWP projects will simply not be loaded.</li>
|
||||
|
||||
<li>Set the active platform to "Win32" or "x64" (See <a href="#HowToBuildWindowsPlatform">Windows platform note</a> below)
|
||||
and configuration to "Debug" or "Release" (See <a href="#HowToBuildWindowsConfig">Windows configuration note</a> below).</li>
|
||||
|
||||
@ -932,9 +843,11 @@
|
||||
"HowToBuildWindowsCommandLine"><strong>Using MSDEV At The Command Line
|
||||
Note:</strong></a> You can build ICU from the command line. Assuming that you
|
||||
have properly installed Microsoft Visual C++ to support command line
|
||||
execution, you can run the following command, 'devenv.com
|
||||
<i><ICU></i>\source\allinone\allinone.sln /build "Win32|Release"'. You can also
|
||||
use Cygwin with this compiler to build ICU, and you can refer to the <a href=
|
||||
execution, you can run the following command to build the 32-bit Release version:
|
||||
<code>'devenv.com <i><ICU></i>\source\allinone\allinone.sln /build "Release|Win32"'</code>.
|
||||
Or to build the 64-bit Release version from the command line:
|
||||
<code>'devenv.com <i><ICU></i>\source\allinone\allinone.sln /build "Release|x64"'</code>.
|
||||
<br />You can also use Cygwin with this compiler to build ICU, and you can refer to the <a href=
|
||||
"#HowToBuildCygwin">How To Build And Install On Windows with Cygwin</a>
|
||||
section for more details.</p>
|
||||
|
||||
@ -981,7 +894,7 @@
|
||||
<ul>
|
||||
<li>Microsoft Windows</li>
|
||||
|
||||
<li>Microsoft Visual C++ (when gcc isn't used).</li>
|
||||
<li>Microsoft Visual C++ (from Visual Studio 2015 or newer, when gcc isn't used).</li>
|
||||
|
||||
<li>
|
||||
Cygwin with the following installed:
|
||||
@ -1016,11 +929,11 @@
|
||||
Visual C++ compiler will not work with a bash command prompt.</li>
|
||||
|
||||
<li>If the computer isn't set up to use Visual C++ from the command line,
|
||||
you need to run vcvars32.bat.<br />For example:<br />"<tt>C:\Program Files\Microsoft
|
||||
Visual Studio 8\VC\bin\vcvars32.bat</tt>" can be used for 32-bit builds
|
||||
<strong>or</strong> <br />"<tt>C:\Program Files (x86)\Microsoft Visual Studio
|
||||
8\VC\bin\amd64\vcvarsamd64.bat</tt>" can be used for 64-bit builds on
|
||||
Windows x64.</li>
|
||||
you need to run vcvars32.bat.<br />For example:<br />
|
||||
"<tt>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat</tt>"
|
||||
can be used for 32-bit builds <strong>or</strong> <br />
|
||||
"<tt>C:\Program Files (x86)\Microsoft Visual Studio 14\VC\bin\x86_amd64\vcvarsx86_amd64.bat</tt>"
|
||||
can be used for 64-bit builds on Windows x64.</li>
|
||||
|
||||
<li>Unzip the icu-XXXX.zip file into any convenient location. Using command
|
||||
line zip, type "unzip -a icu-XXXX.zip -d drive:\directory", or just use
|
||||
@ -1229,9 +1142,9 @@
|
||||
configure option.</li>
|
||||
|
||||
<li>The latest versions of z/OS use <a
|
||||
href="http://www.ibm.com/support/docview.wss?uid=swg2120240">XPLINK
|
||||
href="https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.cbcux01/oebind6.htm">XPLINK
|
||||
version (C128) of the C++ standard library</a> by default. You may see <a
|
||||
href="http://www.ibm.com/support/docview.wss?uid=swg21376279">an
|
||||
href="https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.cbcux01/oebind5.htm">an
|
||||
error</a> when running with XPLINK disabled. To avoid this error,
|
||||
set the following environment variable or similar:
|
||||
|
||||
@ -1405,7 +1318,7 @@ cd ../../..</samp></pre>
|
||||
<li>Test ICU. <pre><samp>gmake check</samp></pre>
|
||||
(The <tt> QIBM_MULTI_THREADED=Y</tt> flag will be automatically applied to intltest -
|
||||
you can look at the <a href=
|
||||
"http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/concept4.htm">
|
||||
"https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzahw/rzahwceeco.htm">
|
||||
iSeries Information Center</a> for more details regarding the running of multiple threads
|
||||
on IBM i.)</li>
|
||||
</ol>
|
||||
@ -1657,7 +1570,7 @@ gnumake</pre>
|
||||
<p>In order to avoid synchronization and threading issues, developers are
|
||||
<strong>suggested</strong> to strictly follow the compiling and linking
|
||||
guidelines for multithreaded applications, specified in the following
|
||||
document from Sun Microsystems. Most notably, pay strict attention to the
|
||||
SUn Solaris document available from Oracle. Most notably, pay strict attention to the
|
||||
following statements from Sun:</p>
|
||||
|
||||
<blockquote>
|
||||
@ -1671,10 +1584,15 @@ gnumake</pre>
|
||||
<p>Failure to do this may cause spurious lock conflicts, recursive mutex
|
||||
failure, and deadlock.</p>
|
||||
|
||||
<p>Source: "<i>Solaris Multithreaded Programming Guide, Compiling and
|
||||
Debugging</i>", Sun Microsystems, Inc., Apr 2004<br />
|
||||
<p>Source: "<i>Multithreaded Programming Guide, Compiling and
|
||||
Debugging</i>", Sun Microsystems, 2002 <br />
|
||||
<a href=
|
||||
"http://docs.sun.com/app/docs/doc/816-5137/6mba5vpke?a=view">http://docs.sun.com/app/docs/doc/816-5137/6mba5vpke?a=view</a></p>
|
||||
"https://docs.oracle.com/cd/E19683-01/806-6867/compile-74765/index.html">https://docs.oracle.com/cd/E19683-01/806-6867/compile-74765/index.html</a></p>
|
||||
|
||||
<p>Note, a version of that chapter from a 2008 document update covering both Solaris 9
|
||||
and Solaris 10 is available here:<br />
|
||||
<a href=
|
||||
"http://docs.oracle.com/cd/E19253-01/816-5137/compile-94179/index.html">http://docs.oracle.com/cd/E19253-01/816-5137/compile-94179/index.html</a></p>
|
||||
|
||||
<h3><a name="ImportantNotesWindows" href="#ImportantNotesWindows" id=
|
||||
"ImportantNotesWindows">Windows Platform</a></h3>
|
||||
|
@ -194,7 +194,7 @@ EXPAND_ONLY_PREDEF = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = U_EXPORT2= U_STABLE= U_DRAFT= U_INTERNAL= U_SYSTEM= U_DEPRECATED= U_OBSOLETE= U_CALLCONV= U_CDECL_BEGIN= U_CDECL_END= U_NO_THROW=\ "U_NAMESPACE_BEGIN=namespace icu{" "U_NAMESPACE_END=}" U_HAVE_STD_STRING=1 U_SHOW_CPLUSPLUS_API=1 U_DEFINE_LOCAL_OPEN_POINTER()= U_IN_DOXYGEN=1 U_OVERRIDE= U_FINAL= UCONFIG_ENABLE_PLUGINS=1
|
||||
PREDEFINED = U_EXPORT2= U_STABLE= U_DRAFT= U_INTERNAL= U_SYSTEM= U_DEPRECATED= U_OBSOLETE= U_CALLCONV_FPTR= U_CALLCONV= U_CDECL_BEGIN= U_CDECL_END= U_NO_THROW=\ "U_NAMESPACE_BEGIN=namespace icu{" "U_NAMESPACE_END=}" U_SHOW_CPLUSPLUS_API=1 U_DEFINE_LOCAL_OPEN_POINTER()= U_IN_DOXYGEN=1 U_OVERRIDE= U_FINAL=final UCONFIG_ENABLE_PLUGINS=1 U_CHAR16_IS_TYPEDEF=0 U_CPLUSPLUS_VERSION=11 U_WCHAR_IS_UTF16 U_NOEXCEPT=
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -34,9 +34,11 @@ subdir = .
|
||||
@LAYOUTEX_TRUE@LAYOUTEX = layoutex
|
||||
@ICUIO_TRUE@ICUIO = io
|
||||
@EXTRAS_TRUE@EXTRA = extra
|
||||
@TESTS_TRUE@TEST = test
|
||||
# need tools for tests
|
||||
@TOOLS_TRUE@@TESTS_TRUE@TEST = test
|
||||
@SAMPLES_TRUE@SAMPLE = samples
|
||||
@TOOLS_TRUE@TOOLS = tools
|
||||
@TOOLS_TRUE@DATASUBDIR = data
|
||||
|
||||
## pkgconfig setup. Always have uc and i18n. Others are optional.
|
||||
ALL_PKGCONFIG_SUFFIX=uc i18n
|
||||
@ -58,7 +60,7 @@ INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/conf
|
||||
LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk config/icucross.inc
|
||||
|
||||
DOCDIRS = common i18n
|
||||
SUBDIRS = stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) data $(EXTRA) $(SAMPLE) $(TEST)
|
||||
SUBDIRS = stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) $(DATASUBDIR) $(EXTRA) $(SAMPLE) $(TEST)
|
||||
|
||||
SECTION = 1
|
||||
|
||||
@ -85,7 +87,7 @@ all: all-local all-recursive
|
||||
install: install-recursive install-local
|
||||
clean: clean-recursive-with-twist clean-local
|
||||
distclean : distclean-recursive distclean-local
|
||||
dist: dist-recursive dist-local
|
||||
dist: dist-recursive
|
||||
check: all check-recursive
|
||||
check-recursive: all
|
||||
xcheck: all xcheck-recursive
|
||||
@ -140,6 +142,10 @@ $(LIBDIR) $(BINDIR):
|
||||
|
||||
## Recursive targets
|
||||
all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive: $(LIBDIR) $(BINDIR)
|
||||
ifneq ($(NEED_ESCAPING),)
|
||||
@echo "building tools/escapesrc (Needed for this platform with NEED_ESCAPING)"
|
||||
@(cd tools/escapesrc && $(MAKE) RECURSIVE=YES $$local_target) || exit
|
||||
endif
|
||||
@dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
|
||||
@ -323,9 +329,10 @@ $(top_builddir)/config/icu-config: $(top_builddir)/Makefile $(top_srcdir)/config
|
||||
-$(RMV) $@
|
||||
$(INSTALL_SCRIPT) $(top_srcdir)/config/icu-config-top $@
|
||||
chmod u+w $@
|
||||
@echo "# Following from icu/icu4c/source/config/Makefile.inc" >> $@
|
||||
LC_ALL=C $(SED) -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
|
||||
@echo "# Following from @platform_make_fragment@" >> $@
|
||||
LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
|
||||
LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
|
||||
LC_ALL=C $(SED) -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
|
||||
cat $(top_srcdir)/config/icu-config-bottom >> $@
|
||||
chmod u-w $@
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cal", "..\samples\cal\cal.vcxproj", "{F7659D77-09CF-4FE9-ACEE-927287AA9509}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cintltst", "..\test\cintltst\cintltst.vcxproj", "{3D1246AE-1B32-479B-BECA-AEFA97BE2321}"
|
||||
@ -61,268 +63,354 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icuinfo", "..\tools\icuinfo
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplug", "..\tools\icuinfo\testplug.vcxproj", "{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makedata_uwp", "..\data\makedata_uwp.vcxproj", "{B1D53358-37BD-48BC-B27C-68BAF1E78508}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "i18n_uwp", "..\i18n\i18n_uwp.vcxproj", "{6786C051-383B-47E0-9E82-B8B994E06A25}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common_uwp", "..\common\common_uwp.vcxproj", "{C10CF34B-3F79-430E-AD38-5A32DC0589C2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|ARM = Release|ARM
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release|Win32.Build.0 = Release|Win32
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7659D77-09CF-4FE9-ACEE-927287AA9509}.Release|x64.Build.0 = Release|x64
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|x64.Build.0 = Debug|x64
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|Win32.Build.0 = Release|Win32
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|x64.ActiveCfg = Release|x64
|
||||
{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|x64.Build.0 = Release|x64
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|x64.Build.0 = Debug|x64
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|Win32.Build.0 = Release|Win32
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|x64.ActiveCfg = Release|x64
|
||||
{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|x64.Build.0 = Release|x64
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|x64.Build.0 = Debug|x64
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|Win32.Build.0 = Release|Win32
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|x64.ActiveCfg = Release|x64
|
||||
{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|x64.Build.0 = Release|x64
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Debug|x64.Build.0 = Debug|x64
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release|Win32.Build.0 = Release|Win32
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release|x64.ActiveCfg = Release|x64
|
||||
{38B5751A-C6F9-4409-950C-F4F9DA17275F}.Release|x64.Build.0 = Release|x64
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|x64.Build.0 = Debug|x64
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|Win32.Build.0 = Release|Win32
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|x64.ActiveCfg = Release|x64
|
||||
{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|x64.Build.0 = Release|x64
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|x64.Build.0 = Debug|x64
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|Win32.Build.0 = Release|Win32
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|x64.ActiveCfg = Release|x64
|
||||
{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|x64.Build.0 = Release|x64
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|x64.Build.0 = Debug|x64
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|Win32.Build.0 = Release|Win32
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|x64.ActiveCfg = Release|x64
|
||||
{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|x64.Build.0 = Release|x64
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|x64.Build.0 = Debug|x64
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|Win32.Build.0 = Release|Win32
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|x64.ActiveCfg = Release|x64
|
||||
{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|x64.Build.0 = Release|x64
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|x64.Build.0 = Debug|x64
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|Win32.Build.0 = Release|Win32
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|x64.ActiveCfg = Release|x64
|
||||
{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|x64.Build.0 = Release|x64
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|x64.Build.0 = Debug|x64
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|Win32.Build.0 = Release|Win32
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|x64.ActiveCfg = Release|x64
|
||||
{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|x64.Build.0 = Release|x64
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|x64.Build.0 = Debug|x64
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|Win32.Build.0 = Release|Win32
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|x64.ActiveCfg = Release|x64
|
||||
{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|x64.Build.0 = Release|x64
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Debug|x64.Build.0 = Debug|x64
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Release|Win32.Build.0 = Release|Win32
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Release|x64.ActiveCfg = Release|x64
|
||||
{0178B127-6269-407D-B112-93877BB62776}.Release|x64.Build.0 = Release|x64
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|x64.Build.0 = Debug|x64
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|Win32.Build.0 = Release|Win32
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|x64.ActiveCfg = Release|x64
|
||||
{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|x64.Build.0 = Release|x64
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Debug|x64.Build.0 = Debug|x64
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Release|Win32.Build.0 = Release|Win32
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Release|x64.ActiveCfg = Release|x64
|
||||
{C920062A-0647-4553-A3B2-37C58065664B}.Release|x64.Build.0 = Release|x64
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Debug|x64.Build.0 = Debug|x64
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Release|Win32.Build.0 = Release|Win32
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Release|x64.ActiveCfg = Release|x64
|
||||
{37FC2C7F-1904-4811-8955-2F478830EAD1}.Release|x64.Build.0 = Release|x64
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|x64.Build.0 = Debug|x64
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|Win32.Build.0 = Release|Win32
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|x64.ActiveCfg = Release|x64
|
||||
{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|x64.Build.0 = Release|x64
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|x64.Build.0 = Debug|x64
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|Win32.Build.0 = Release|Win32
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|x64.ActiveCfg = Release|x64
|
||||
{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|x64.Build.0 = Release|x64
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|x64.Build.0 = Debug|x64
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|Win32.Build.0 = Release|Win32
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|x64.ActiveCfg = Release|x64
|
||||
{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|x64.Build.0 = Release|x64
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Debug|x64.Build.0 = Debug|x64
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Release|Win32.Build.0 = Release|Win32
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Release|x64.ActiveCfg = Release|x64
|
||||
{203EC78A-0531-43F0-A636-285439BDE025}.Release|x64.Build.0 = Release|x64
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|x64.Build.0 = Debug|x64
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|Win32.Build.0 = Release|Win32
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|x64.ActiveCfg = Release|x64
|
||||
{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|x64.Build.0 = Release|x64
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|x64.Build.0 = Debug|x64
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|Win32.Build.0 = Release|Win32
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|x64.ActiveCfg = Release|x64
|
||||
{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|x64.Build.0 = Release|x64
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|x64.Build.0 = Debug|x64
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|Win32.Build.0 = Release|Win32
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|x64.ActiveCfg = Release|x64
|
||||
{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|x64.Build.0 = Release|x64
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|x64.Build.0 = Debug|x64
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|Win32.Build.0 = Release|Win32
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|x64.ActiveCfg = Release|x64
|
||||
{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|x64.Build.0 = Release|x64
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|x64.Build.0 = Debug|x64
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|Win32.Build.0 = Release|Win32
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|x64.ActiveCfg = Release|x64
|
||||
{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|x64.Build.0 = Release|x64
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|x64.Build.0 = Debug|x64
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|Win32.Build.0 = Release|Win32
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|x64.ActiveCfg = Release|x64
|
||||
{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|x64.Build.0 = Release|x64
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|x64.Build.0 = Debug|x64
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|Win32.Build.0 = Release|Win32
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|x64.ActiveCfg = Release|x64
|
||||
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|x64.Build.0 = Release|x64
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|x64.Build.0 = Debug|x64
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Release|Win32.Build.0 = Release|Win32
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Release|x64.ActiveCfg = Release|x64
|
||||
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Release|x64.Build.0 = Release|x64
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Debug|x64.Build.0 = Debug|x64
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Release|Win32.Build.0 = Release|Win32
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Release|x64.ActiveCfg = Release|x64
|
||||
{C7891A65-80AB-4245-912E-5F1E17B0E6C4}.Release|x64.Build.0 = Release|x64
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Debug|x64.Build.0 = Debug|x64
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Release|x64.ActiveCfg = Release|x64
|
||||
{E7611F49-F088-4175-9446-6111444E72C8}.Release|x64.Build.0 = Release|x64
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Debug|x64.Build.0 = Debug|x64
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Release|Win32.Build.0 = Release|Win32
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Release|x64.ActiveCfg = Release|x64
|
||||
{659D0C08-D4ED-4BF3-B02B-2D8D4B5A7A7A}.Release|x64.Build.0 = Release|x64
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Debug|x64.Build.0 = Debug|x64
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Release|ARM.Build.0 = Release|ARM
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Release|Win32.Build.0 = Release|Win32
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Release|x64.ActiveCfg = Release|x64
|
||||
{B1D53358-37BD-48BC-B27C-68BAF1E78508}.Release|x64.Build.0 = Release|x64
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Debug|x64.Build.0 = Debug|x64
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Release|ARM.Build.0 = Release|ARM
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Release|Win32.Build.0 = Release|Win32
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Release|x64.ActiveCfg = Release|x64
|
||||
{6786C051-383B-47E0-9E82-B8B994E06A25}.Release|x64.Build.0 = Release|x64
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Debug|x64.Build.0 = Debug|x64
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Release|ARM.Build.0 = Release|ARM
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Release|Win32.Build.0 = Release|Win32
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Release|x64.ActiveCfg = Release|x64
|
||||
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -1,131 +1,131 @@
|
||||
@echo off
|
||||
REM Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
REM License & terms of use: http://www.unicode.org/copyright.html
|
||||
REM ********************************************************************
|
||||
REM * COPYRIGHT:
|
||||
REM * Copyright (c) 2010-2014, International Business Machines Corporation
|
||||
REM * and others. All Rights Reserved.
|
||||
REM ********************************************************************
|
||||
|
||||
set ICU_ARCH=%1
|
||||
set ICU_DBRL=%2
|
||||
|
||||
if "%1" == "" (
|
||||
echo Usage: %0 "x86 or x64" "Debug or Release"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%2" == "" (
|
||||
echo Usage: %0 %1 "Debug or Release"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set ICU_OPATH=%PATH%
|
||||
|
||||
set ICU_ICUDIR="%~dp0"\..\..
|
||||
|
||||
if "%ICU_ARCH%" == "x64" (
|
||||
set ICU_BINDIR=%~dp0\..\..\bin64
|
||||
) else (
|
||||
set ICU_BINDIR=%~dp0\..\..\bin
|
||||
)
|
||||
|
||||
set PATH=%ICU_BINDIR%;%PATH%
|
||||
|
||||
echo testing ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL%
|
||||
pushd %ICU_ICUDIR%
|
||||
|
||||
@rem factor these out
|
||||
set ICUINFO_CMD=%ICU_ICUDIR%\source\tools\icuinfo\%ICU_ARCH%\%ICU_DBRL%\icuinfo.exe
|
||||
set INTLTEST_CMD=%ICU_ICUDIR%\source\test\intltest\%ICU_ARCH%\%ICU_DBRL%\intltest.exe
|
||||
set IOTEST_CMD=%ICU_ICUDIR%\source\test\iotest\%ICU_ARCH%\%ICU_DBRL%\iotest.exe
|
||||
set CINTLTST_CMD=%ICU_ICUDIR%\source\test\cintltst\%ICU_ARCH%\%ICU_DBRL%\cintltst.exe
|
||||
set LETEST_CMD=%ICU_ICUDIR%\source\test\letest\%ICU_ARCH%\%ICU_DBRL%\letest.exe
|
||||
|
||||
set ICUFAILED=
|
||||
set ICURUN=
|
||||
set ICUFAILCNT=0
|
||||
|
||||
@echo on
|
||||
|
||||
@set THT=icuinfo
|
||||
@echo ==== %THT% =========================================================================
|
||||
%ICUINFO_CMD% %ICUINFO_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_icuinfo
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@set THT=intltest
|
||||
@echo ==== %THT% =========================================================================
|
||||
@cd %ICU_ICUDIR%\source\test\intltest
|
||||
%INTLTEST_CMD% %INTLTEST_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_intltest
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@set THT=iotest
|
||||
@echo ==== %THT% =========================================================================
|
||||
@cd %ICU_ICUDIR%\source\test\iotest
|
||||
%IOTEST_CMD% %IOTEST_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_IOTEST
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@set THT=cintltst
|
||||
@echo ==== %THT% =========================================================================
|
||||
@cd %ICU_ICUDIR%\source\test\cintltst
|
||||
%CINTLTST_CMD% %CINTLTST_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_cintltst
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@REM (Layout is deprecated - this would require HarfBuzz)
|
||||
@REM @set THT=letest
|
||||
@REM @echo ==== %THT% =========================================================================
|
||||
@REM @cd %ICU_ICUDIR%\source\test\letest
|
||||
@REM %LETST_CMD% %LETEST_OPTS%
|
||||
|
||||
@REM @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@REM @set ICUFAILED=%ICUFAILED% %THT%
|
||||
@REM @set ICUFAILCNT=1
|
||||
@REM :OK_letest
|
||||
@REM @set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@echo off
|
||||
|
||||
REM clean up
|
||||
set PATH=%ICU_OPATH%
|
||||
REM unset ICU_OPATH
|
||||
popd
|
||||
|
||||
@REM done
|
||||
|
||||
echo -
|
||||
echo -
|
||||
echo -
|
||||
echo ============================================================
|
||||
echo Summary: ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL%
|
||||
echo -
|
||||
echo Tests Run : %ICURUN%
|
||||
|
||||
if %ICUFAILCNT% == 0 (
|
||||
echo " - All Passed!"
|
||||
exit /b 0
|
||||
)
|
||||
echo Failing Tests: %ICUFAILED%
|
||||
echo -
|
||||
echo FAILED!
|
||||
|
||||
exit /b 1
|
||||
@echo off
|
||||
REM Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
REM License & terms of use: http://www.unicode.org/copyright.html
|
||||
REM ********************************************************************
|
||||
REM * COPYRIGHT:
|
||||
REM * Copyright (c) 2010-2014, International Business Machines Corporation
|
||||
REM * and others. All Rights Reserved.
|
||||
REM ********************************************************************
|
||||
|
||||
set ICU_ARCH=%1
|
||||
set ICU_DBRL=%2
|
||||
|
||||
if "%1" == "" (
|
||||
echo Usage: %0 "x86 or x64" "Debug or Release"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%2" == "" (
|
||||
echo Usage: %0 %1 "Debug or Release"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set ICU_OPATH=%PATH%
|
||||
|
||||
set ICU_ICUDIR="%~dp0"\..\..
|
||||
|
||||
if "%ICU_ARCH%" == "x64" (
|
||||
set ICU_BINDIR=%~dp0\..\..\bin64
|
||||
) else (
|
||||
set ICU_BINDIR=%~dp0\..\..\bin
|
||||
)
|
||||
|
||||
set PATH=%ICU_BINDIR%;%PATH%
|
||||
|
||||
echo testing ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL%
|
||||
pushd %ICU_ICUDIR%
|
||||
|
||||
@rem factor these out
|
||||
set ICUINFO_CMD=%ICU_ICUDIR%\source\tools\icuinfo\%ICU_ARCH%\%ICU_DBRL%\icuinfo.exe
|
||||
set INTLTEST_CMD=%ICU_ICUDIR%\source\test\intltest\%ICU_ARCH%\%ICU_DBRL%\intltest.exe
|
||||
set IOTEST_CMD=%ICU_ICUDIR%\source\test\iotest\%ICU_ARCH%\%ICU_DBRL%\iotest.exe
|
||||
set CINTLTST_CMD=%ICU_ICUDIR%\source\test\cintltst\%ICU_ARCH%\%ICU_DBRL%\cintltst.exe
|
||||
set LETEST_CMD=%ICU_ICUDIR%\source\test\letest\%ICU_ARCH%\%ICU_DBRL%\letest.exe
|
||||
|
||||
set ICUFAILED=
|
||||
set ICURUN=
|
||||
set ICUFAILCNT=0
|
||||
|
||||
@echo on
|
||||
|
||||
@set THT=icuinfo
|
||||
@echo ==== %THT% =========================================================================
|
||||
%ICUINFO_CMD% %ICUINFO_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_icuinfo
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@set THT=intltest
|
||||
@echo ==== %THT% =========================================================================
|
||||
@cd %ICU_ICUDIR%\source\test\intltest
|
||||
%INTLTEST_CMD% %INTLTEST_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_intltest
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@set THT=iotest
|
||||
@echo ==== %THT% =========================================================================
|
||||
@cd %ICU_ICUDIR%\source\test\iotest
|
||||
%IOTEST_CMD% %IOTEST_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_IOTEST
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@set THT=cintltst
|
||||
@echo ==== %THT% =========================================================================
|
||||
@cd %ICU_ICUDIR%\source\test\cintltst
|
||||
%CINTLTST_CMD% %CINTLTST_OPTS%
|
||||
|
||||
@IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@set ICUFAILED=%ICUFAILED% %THT%
|
||||
@set ICUFAILCNT=1
|
||||
:OK_cintltst
|
||||
@set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@REM (Layout is deprecated - this would require HarfBuzz)
|
||||
@REM @set THT=letest
|
||||
@REM @echo ==== %THT% =========================================================================
|
||||
@REM @cd %ICU_ICUDIR%\source\test\letest
|
||||
@REM %LETST_CMD% %LETEST_OPTS%
|
||||
|
||||
@REM @IF NOT ERRORLEVEL 1 GOTO OK_%THT%
|
||||
@REM @set ICUFAILED=%ICUFAILED% %THT%
|
||||
@REM @set ICUFAILCNT=1
|
||||
@REM :OK_letest
|
||||
@REM @set ICURUN=%ICURUN% %THT%
|
||||
|
||||
@echo off
|
||||
|
||||
REM clean up
|
||||
set PATH=%ICU_OPATH%
|
||||
REM unset ICU_OPATH
|
||||
popd
|
||||
|
||||
@REM done
|
||||
|
||||
echo -
|
||||
echo -
|
||||
echo -
|
||||
echo ============================================================
|
||||
echo Summary: ICU in %ICU_ICUDIR% arch=%ICU_ARCH% type=%ICU_DBRL%
|
||||
echo -
|
||||
echo Tests Run : %ICURUN%
|
||||
|
||||
if %ICUFAILCNT% == 0 (
|
||||
echo " - All Passed!"
|
||||
exit /b 0
|
||||
)
|
||||
echo Failing Tests: %ICUFAILED%
|
||||
echo -
|
||||
echo FAILED!
|
||||
|
||||
exit /b 1
|
||||
|
@ -89,11 +89,12 @@ ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_
|
||||
resource.o uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
|
||||
ucurr.o \
|
||||
messagepattern.o ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o locdspnm.o loclikely.o locresdata.o \
|
||||
bytestream.o stringpiece.o \
|
||||
bytestream.o stringpiece.o bytesinkutil.o \
|
||||
stringtriebuilder.o bytestriebuilder.o \
|
||||
bytestrie.o bytestrieiterator.o \
|
||||
ucharstrie.o ucharstriebuilder.o ucharstrieiterator.o \
|
||||
dictionarydata.o \
|
||||
edits.o \
|
||||
appendable.o ustr_cnv.o unistr_cnv.o unistr.o unistr_case.o unistr_props.o \
|
||||
utf_impl.o ustring.o ustrcase.o ucasemap.o ucasemap_titlecase_brkiter.o cstring.o ustrfmt.o ustrtrns.o ustr_wcs.o utext.o \
|
||||
unistr_case_locale.o ustrcase_locale.o unistr_titlecase_brkiter.o ustr_titlecase_brkiter.o \
|
||||
@ -103,7 +104,7 @@ patternprops.o uchar.o uprops.o ucase.o propname.o ubidi_props.o ubidi.o ubidiwr
|
||||
uscript.o uscript_props.o usc_impl.o unames.o \
|
||||
utrie.o utrie2.o utrie2_builder.o bmpset.o unisetspan.o uset_props.o uniset_props.o uniset_closure.o uset.o uniset.o usetiter.o ruleiter.o caniter.o unifilt.o unifunct.o \
|
||||
uarrsort.o brkiter.o ubrk.o brkeng.o dictbe.o filteredbrk.o \
|
||||
rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o \
|
||||
rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o rbbi_cache.o \
|
||||
serv.o servnotf.o servls.o servlk.o servlkf.o servrbf.o servslkf.o \
|
||||
uidna.o usprep.o uts46.o punycode.o \
|
||||
util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o dtintrv.o ucnvsel.o propsvec.o \
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: appendable.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
* file name: bmpset.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -28,7 +28,7 @@ U_NAMESPACE_BEGIN
|
||||
|
||||
BMPSet::BMPSet(const int32_t *parentList, int32_t parentListLength) :
|
||||
list(parentList), listLength(parentListLength) {
|
||||
uprv_memset(asciiBytes, 0, sizeof(asciiBytes));
|
||||
uprv_memset(latin1Contains, 0, sizeof(latin1Contains));
|
||||
uprv_memset(table7FF, 0, sizeof(table7FF));
|
||||
uprv_memset(bmpBlockBits, 0, sizeof(bmpBlockBits));
|
||||
|
||||
@ -45,14 +45,16 @@ BMPSet::BMPSet(const int32_t *parentList, int32_t parentListLength) :
|
||||
list4kStarts[i]=findCodePoint(i<<12, list4kStarts[i-1], listLength-1);
|
||||
}
|
||||
list4kStarts[0x11]=listLength-1;
|
||||
containsFFFD=containsSlow(0xfffd, list4kStarts[0xf], list4kStarts[0x10]);
|
||||
|
||||
initBits();
|
||||
overrideIllegal();
|
||||
}
|
||||
|
||||
BMPSet::BMPSet(const BMPSet &otherBMPSet, const int32_t *newParentList, int32_t newParentListLength) :
|
||||
containsFFFD(otherBMPSet.containsFFFD),
|
||||
list(newParentList), listLength(newParentListLength) {
|
||||
uprv_memcpy(asciiBytes, otherBMPSet.asciiBytes, sizeof(asciiBytes));
|
||||
uprv_memcpy(latin1Contains, otherBMPSet.latin1Contains, sizeof(latin1Contains));
|
||||
uprv_memcpy(table7FF, otherBMPSet.table7FF, sizeof(table7FF));
|
||||
uprv_memcpy(bmpBlockBits, otherBMPSet.bmpBlockBits, sizeof(bmpBlockBits));
|
||||
uprv_memcpy(list4kStarts, otherBMPSet.list4kStarts, sizeof(list4kStarts));
|
||||
@ -120,7 +122,7 @@ void BMPSet::initBits() {
|
||||
UChar32 start, limit;
|
||||
int32_t listIndex=0;
|
||||
|
||||
// Set asciiBytes[].
|
||||
// Set latin1Contains[].
|
||||
do {
|
||||
start=list[listIndex++];
|
||||
if(listIndex<listLength) {
|
||||
@ -128,13 +130,30 @@ void BMPSet::initBits() {
|
||||
} else {
|
||||
limit=0x110000;
|
||||
}
|
||||
if(start>=0x80) {
|
||||
if(start>=0x100) {
|
||||
break;
|
||||
}
|
||||
do {
|
||||
asciiBytes[start++]=1;
|
||||
} while(start<limit && start<0x80);
|
||||
} while(limit<=0x80);
|
||||
latin1Contains[start++]=1;
|
||||
} while(start<limit && start<0x100);
|
||||
} while(limit<=0x100);
|
||||
|
||||
// Find the first range overlapping with (or after) 80..FF again,
|
||||
// to include them in table7FF as well.
|
||||
for(listIndex=0;;) {
|
||||
start=list[listIndex++];
|
||||
if(listIndex<listLength) {
|
||||
limit=list[listIndex++];
|
||||
} else {
|
||||
limit=0x110000;
|
||||
}
|
||||
if(limit>0x80) {
|
||||
if(start<0x80) {
|
||||
start=0x80;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Set table7FF[].
|
||||
while(start<0x800) {
|
||||
@ -204,19 +223,14 @@ void BMPSet::initBits() {
|
||||
* for faster validity checking at runtime.
|
||||
* No need to set 0 values where they were reset to 0 in the constructor
|
||||
* and not modified by initBits().
|
||||
* (asciiBytes[] trail bytes, table7FF[] 0..7F, bmpBlockBits[] 0..7FF)
|
||||
* (table7FF[] 0..7F, bmpBlockBits[] 0..7FF)
|
||||
* Need to set 0 values for surrogates D800..DFFF.
|
||||
*/
|
||||
void BMPSet::overrideIllegal() {
|
||||
uint32_t bits, mask;
|
||||
int32_t i;
|
||||
|
||||
if(containsSlow(0xfffd, list4kStarts[0xf], list4kStarts[0x10])) {
|
||||
// contains(FFFD)==TRUE
|
||||
for(i=0x80; i<0xc0; ++i) {
|
||||
asciiBytes[i]=1;
|
||||
}
|
||||
|
||||
if(containsFFFD) {
|
||||
bits=3; // Lead bytes 0xC0 and 0xC1.
|
||||
for(i=0; i<64; ++i) {
|
||||
table7FF[i]|=bits;
|
||||
@ -233,7 +247,6 @@ void BMPSet::overrideIllegal() {
|
||||
bmpBlockBits[i]=(bmpBlockBits[i]&mask)|bits;
|
||||
}
|
||||
} else {
|
||||
// contains(FFFD)==FALSE
|
||||
mask=~(0x10001<<0xd); // Lead byte 0xED.
|
||||
for(i=32; i<64; ++i) { // Second half of 4k block.
|
||||
bmpBlockBits[i]&=mask;
|
||||
@ -277,8 +290,8 @@ int32_t BMPSet::findCodePoint(UChar32 c, int32_t lo, int32_t hi) const {
|
||||
|
||||
UBool
|
||||
BMPSet::contains(UChar32 c) const {
|
||||
if((uint32_t)c<=0x7f) {
|
||||
return (UBool)asciiBytes[c];
|
||||
if((uint32_t)c<=0xff) {
|
||||
return (UBool)latin1Contains[c];
|
||||
} else if((uint32_t)c<=0x7ff) {
|
||||
return (UBool)((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0);
|
||||
} else if((uint32_t)c<0xd800 || (c>=0xe000 && c<=0xffff)) {
|
||||
@ -314,8 +327,8 @@ BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition
|
||||
// span
|
||||
do {
|
||||
c=*s;
|
||||
if(c<=0x7f) {
|
||||
if(!asciiBytes[c]) {
|
||||
if(c<=0xff) {
|
||||
if(!latin1Contains[c]) {
|
||||
break;
|
||||
}
|
||||
} else if(c<=0x7ff) {
|
||||
@ -354,8 +367,8 @@ BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition
|
||||
// span not
|
||||
do {
|
||||
c=*s;
|
||||
if(c<=0x7f) {
|
||||
if(asciiBytes[c]) {
|
||||
if(c<=0xff) {
|
||||
if(latin1Contains[c]) {
|
||||
break;
|
||||
}
|
||||
} else if(c<=0x7ff) {
|
||||
@ -403,8 +416,8 @@ BMPSet::spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondi
|
||||
// span
|
||||
for(;;) {
|
||||
c=*(--limit);
|
||||
if(c<=0x7f) {
|
||||
if(!asciiBytes[c]) {
|
||||
if(c<=0xff) {
|
||||
if(!latin1Contains[c]) {
|
||||
break;
|
||||
}
|
||||
} else if(c<=0x7ff) {
|
||||
@ -446,8 +459,8 @@ BMPSet::spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondi
|
||||
// span not
|
||||
for(;;) {
|
||||
c=*(--limit);
|
||||
if(c<=0x7f) {
|
||||
if(asciiBytes[c]) {
|
||||
if(c<=0xff) {
|
||||
if(latin1Contains[c]) {
|
||||
break;
|
||||
}
|
||||
} else if(c<=0x7ff) {
|
||||
@ -497,22 +510,22 @@ const uint8_t *
|
||||
BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const {
|
||||
const uint8_t *limit=s+length;
|
||||
uint8_t b=*s;
|
||||
if((int8_t)b>=0) {
|
||||
if(U8_IS_SINGLE(b)) {
|
||||
// Initial all-ASCII span.
|
||||
if(spanCondition) {
|
||||
do {
|
||||
if(!asciiBytes[b] || ++s==limit) {
|
||||
if(!latin1Contains[b] || ++s==limit) {
|
||||
return s;
|
||||
}
|
||||
b=*s;
|
||||
} while((int8_t)b>=0);
|
||||
} while(U8_IS_SINGLE(b));
|
||||
} else {
|
||||
do {
|
||||
if(asciiBytes[b] || ++s==limit) {
|
||||
if(latin1Contains[b] || ++s==limit) {
|
||||
return s;
|
||||
}
|
||||
b=*s;
|
||||
} while((int8_t)b>=0);
|
||||
} while(U8_IS_SINGLE(b));
|
||||
}
|
||||
length=(int32_t)(limit-s);
|
||||
}
|
||||
@ -540,20 +553,20 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi
|
||||
// single trail byte, check for preceding 3- or 4-byte lead byte
|
||||
if(length>=2 && (b=*(limit-2))>=0xe0) {
|
||||
limit-=2;
|
||||
if(asciiBytes[0x80]!=spanCondition) {
|
||||
if(containsFFFD!=spanCondition) {
|
||||
limit0=limit;
|
||||
}
|
||||
} else if(b<0xc0 && b>=0x80 && length>=3 && (b=*(limit-3))>=0xf0) {
|
||||
// 4-byte lead byte with only two trail bytes
|
||||
limit-=3;
|
||||
if(asciiBytes[0x80]!=spanCondition) {
|
||||
if(containsFFFD!=spanCondition) {
|
||||
limit0=limit;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// lead byte with no trail bytes
|
||||
--limit;
|
||||
if(asciiBytes[0x80]!=spanCondition) {
|
||||
if(containsFFFD!=spanCondition) {
|
||||
limit0=limit;
|
||||
}
|
||||
}
|
||||
@ -563,26 +576,26 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi
|
||||
|
||||
while(s<limit) {
|
||||
b=*s;
|
||||
if(b<0xc0) {
|
||||
// ASCII; or trail bytes with the result of contains(FFFD).
|
||||
if(U8_IS_SINGLE(b)) {
|
||||
// ASCII
|
||||
if(spanCondition) {
|
||||
do {
|
||||
if(!asciiBytes[b]) {
|
||||
if(!latin1Contains[b]) {
|
||||
return s;
|
||||
} else if(++s==limit) {
|
||||
return limit0;
|
||||
}
|
||||
b=*s;
|
||||
} while(b<0xc0);
|
||||
} while(U8_IS_SINGLE(b));
|
||||
} else {
|
||||
do {
|
||||
if(asciiBytes[b]) {
|
||||
if(latin1Contains[b]) {
|
||||
return s;
|
||||
} else if(++s==limit) {
|
||||
return limit0;
|
||||
}
|
||||
b=*s;
|
||||
} while(b<0xc0);
|
||||
} while(U8_IS_SINGLE(b));
|
||||
}
|
||||
}
|
||||
++s; // Advance past the lead byte.
|
||||
@ -619,7 +632,7 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi
|
||||
UChar32 c=((UChar32)(b-0xf0)<<18)|((UChar32)t1<<12)|(t2<<6)|t3;
|
||||
if( ( (0x10000<=c && c<=0x10ffff) ?
|
||||
containsSlow(c, list4kStarts[0x10], list4kStarts[0x11]) :
|
||||
asciiBytes[0x80]
|
||||
containsFFFD
|
||||
) != spanCondition
|
||||
) {
|
||||
return s-1;
|
||||
@ -627,8 +640,9 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi
|
||||
s+=3;
|
||||
continue;
|
||||
}
|
||||
} else /* 0xc0<=b<0xe0 */ {
|
||||
} else {
|
||||
if( /* handle U+0000..U+07FF inline */
|
||||
b>=0xc0 &&
|
||||
(t1=(uint8_t)(*s-0x80)) <= 0x3f
|
||||
) {
|
||||
if((USetSpanCondition)((table7FF[t1]&((uint32_t)1<<(b&0x1f)))!=0) != spanCondition) {
|
||||
@ -642,7 +656,7 @@ BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanConditi
|
||||
// Give an illegal sequence the same value as the result of contains(FFFD).
|
||||
// Handle each byte of an illegal sequence separately to simplify the code;
|
||||
// no need to optimize error handling.
|
||||
if(asciiBytes[0x80]!=spanCondition) {
|
||||
if(containsFFFD!=spanCondition) {
|
||||
return s-1;
|
||||
}
|
||||
}
|
||||
@ -667,26 +681,26 @@ BMPSet::spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCon
|
||||
|
||||
do {
|
||||
b=s[--length];
|
||||
if((int8_t)b>=0) {
|
||||
if(U8_IS_SINGLE(b)) {
|
||||
// ASCII sub-span
|
||||
if(spanCondition) {
|
||||
do {
|
||||
if(!asciiBytes[b]) {
|
||||
if(!latin1Contains[b]) {
|
||||
return length+1;
|
||||
} else if(length==0) {
|
||||
return 0;
|
||||
}
|
||||
b=s[--length];
|
||||
} while((int8_t)b>=0);
|
||||
} while(U8_IS_SINGLE(b));
|
||||
} else {
|
||||
do {
|
||||
if(asciiBytes[b]) {
|
||||
if(latin1Contains[b]) {
|
||||
return length+1;
|
||||
} else if(length==0) {
|
||||
return 0;
|
||||
}
|
||||
b=s[--length];
|
||||
} while((int8_t)b>=0);
|
||||
} while(U8_IS_SINGLE(b));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
* file name: bmpset.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -28,11 +28,12 @@ U_NAMESPACE_BEGIN
|
||||
* Helper class for frozen UnicodeSets, implements contains() and span()
|
||||
* optimized for BMP code points. Structured to be UTF-8-friendly.
|
||||
*
|
||||
* ASCII: Look up bytes.
|
||||
* Latin-1: Look up bytes.
|
||||
* 2-byte characters: Bits organized vertically.
|
||||
* 3-byte characters: Use zero/one/mixed data per 64-block in U+0000..U+FFFF,
|
||||
* with mixed for illegal ranges.
|
||||
* Supplementary characters: Call contains() on the parent set.
|
||||
* Supplementary characters: Binary search over
|
||||
* the supplementary part of the parent set's inversion list.
|
||||
*/
|
||||
class BMPSet : public UMemory {
|
||||
public:
|
||||
@ -96,12 +97,12 @@ private:
|
||||
inline UBool containsSlow(UChar32 c, int32_t lo, int32_t hi) const;
|
||||
|
||||
/*
|
||||
* One byte per ASCII character, or trail byte in lead position.
|
||||
* 0 or 1 for ASCII characters.
|
||||
* The value for trail bytes is the result of contains(FFFD)
|
||||
* for faster validity checking at runtime.
|
||||
* One byte 0 or 1 per Latin-1 character.
|
||||
*/
|
||||
UBool asciiBytes[0xc0];
|
||||
UBool latin1Contains[0x100];
|
||||
|
||||
/* TRUE if contains(U+FFFD). */
|
||||
UBool containsFFFD;
|
||||
|
||||
/*
|
||||
* One bit per code point from U+0000..U+07FF.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
************************************************************************************
|
||||
@ -11,9 +11,6 @@
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "brkeng.h"
|
||||
#include "cmemory.h"
|
||||
#include "dictbe.h"
|
||||
#include "unicode/uchar.h"
|
||||
#include "unicode/uniset.h"
|
||||
#include "unicode/chariter.h"
|
||||
@ -24,6 +21,10 @@
|
||||
#include "unicode/uscript.h"
|
||||
#include "unicode/ucharstrie.h"
|
||||
#include "unicode/bytestrie.h"
|
||||
|
||||
#include "brkeng.h"
|
||||
#include "cmemory.h"
|
||||
#include "dictbe.h"
|
||||
#include "charstr.h"
|
||||
#include "dictionarydata.h"
|
||||
#include "mutex.h"
|
||||
@ -80,23 +81,15 @@ UnhandledEngine::handles(UChar32 c, int32_t breakType) const {
|
||||
|
||||
int32_t
|
||||
UnhandledEngine::findBreaks( UText *text,
|
||||
int32_t startPos,
|
||||
int32_t endPos,
|
||||
UBool reverse,
|
||||
int32_t breakType,
|
||||
UStack &/*foundBreaks*/ ) const {
|
||||
int32_t /* startPos */,
|
||||
int32_t endPos,
|
||||
int32_t breakType,
|
||||
UVector32 &/*foundBreaks*/ ) const {
|
||||
if (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)) {
|
||||
UChar32 c = utext_current32(text);
|
||||
if (reverse) {
|
||||
while((int32_t)utext_getNativeIndex(text) > startPos && fHandled[breakType]->contains(c)) {
|
||||
c = utext_previous32(text);
|
||||
}
|
||||
}
|
||||
else {
|
||||
while((int32_t)utext_getNativeIndex(text) < endPos && fHandled[breakType]->contains(c)) {
|
||||
utext_next32(text); // TODO: recast loop to work with post-increment operations.
|
||||
c = utext_current32(text);
|
||||
}
|
||||
while((int32_t)utext_getNativeIndex(text) < endPos && fHandled[breakType]->contains(c)) {
|
||||
utext_next32(text); // TODO: recast loop to work with post-increment operations.
|
||||
c = utext_current32(text);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/**
|
||||
************************************************************************************
|
||||
@ -19,6 +19,7 @@ U_NAMESPACE_BEGIN
|
||||
|
||||
class UnicodeSet;
|
||||
class UStack;
|
||||
class UVector32;
|
||||
class DictionaryMatcher;
|
||||
|
||||
/*******************************************************************
|
||||
@ -67,18 +68,15 @@ class LanguageBreakEngine : public UMemory {
|
||||
* is capable of handling.
|
||||
* @param startPos The start of the run within the supplied text.
|
||||
* @param endPos The end of the run within the supplied text.
|
||||
* @param reverse Whether the caller is looking for breaks in a reverse
|
||||
* direction.
|
||||
* @param breakType The type of break desired, or -1.
|
||||
* @param foundBreaks An allocated C array of the breaks found, if any
|
||||
* @param foundBreaks A Vector of int32_t to receive the breaks.
|
||||
* @return The number of breaks found.
|
||||
*/
|
||||
virtual int32_t findBreaks( UText *text,
|
||||
int32_t startPos,
|
||||
int32_t endPos,
|
||||
UBool reverse,
|
||||
int32_t breakType,
|
||||
UStack &foundBreaks ) const = 0;
|
||||
UVector32 &foundBreaks ) const = 0;
|
||||
|
||||
};
|
||||
|
||||
@ -192,8 +190,6 @@ class UnhandledEngine : public LanguageBreakEngine {
|
||||
* is capable of handling.
|
||||
* @param startPos The start of the run within the supplied text.
|
||||
* @param endPos The end of the run within the supplied text.
|
||||
* @param reverse Whether the caller is looking for breaks in a reverse
|
||||
* direction.
|
||||
* @param breakType The type of break desired, or -1.
|
||||
* @param foundBreaks An allocated C array of the breaks found, if any
|
||||
* @return The number of breaks found.
|
||||
@ -201,9 +197,8 @@ class UnhandledEngine : public LanguageBreakEngine {
|
||||
virtual int32_t findBreaks( UText *text,
|
||||
int32_t startPos,
|
||||
int32_t endPos,
|
||||
UBool reverse,
|
||||
int32_t breakType,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
/**
|
||||
* <p>Tell the engine to handle a particular character and break type.</p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -195,7 +195,7 @@ BreakIterator::getAvailableLocales(int32_t& count)
|
||||
|
||||
// ------------------------------------------
|
||||
//
|
||||
// Default constructor and destructor
|
||||
// Constructors, destructor and assignment operator
|
||||
//
|
||||
//-------------------------------------------
|
||||
|
||||
@ -204,6 +204,19 @@ BreakIterator::BreakIterator()
|
||||
*validLocale = *actualLocale = 0;
|
||||
}
|
||||
|
||||
BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) {
|
||||
uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
|
||||
uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
|
||||
}
|
||||
|
||||
BreakIterator &BreakIterator::operator =(const BreakIterator &other) {
|
||||
if (this != &other) {
|
||||
uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale));
|
||||
uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
BreakIterator::~BreakIterator()
|
||||
{
|
||||
}
|
||||
@ -265,7 +278,7 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {}
|
||||
// defined in ucln_cmn.h
|
||||
U_NAMESPACE_END
|
||||
|
||||
static icu::UInitOnce gInitOnce;
|
||||
static icu::UInitOnce gInitOnceBrkiter;
|
||||
static icu::ICULocaleService* gService = NULL;
|
||||
|
||||
|
||||
@ -280,7 +293,7 @@ static UBool U_CALLCONV breakiterator_cleanup(void) {
|
||||
delete gService;
|
||||
gService = NULL;
|
||||
}
|
||||
gInitOnce.reset();
|
||||
gInitOnceBrkiter.reset();
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
@ -296,7 +309,7 @@ initService(void) {
|
||||
static ICULocaleService*
|
||||
getService(void)
|
||||
{
|
||||
umtx_initOnce(gInitOnce, &initService);
|
||||
umtx_initOnce(gInitOnceBrkiter, &initService);
|
||||
return gService;
|
||||
}
|
||||
|
||||
@ -306,7 +319,7 @@ getService(void)
|
||||
static inline UBool
|
||||
hasService(void)
|
||||
{
|
||||
return !gInitOnce.isReset() && getService() != NULL;
|
||||
return !gInitOnceBrkiter.isReset() && getService() != NULL;
|
||||
}
|
||||
|
||||
// -------------------------------------
|
||||
|
123
source/common/bytesinkutil.cpp
Normal file
123
source/common/bytesinkutil.cpp
Normal file
@ -0,0 +1,123 @@
|
||||
// © 2017 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
// bytesinkutil.cpp
|
||||
// created: 2017sep14 Markus W. Scherer
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/bytestream.h"
|
||||
#include "unicode/edits.h"
|
||||
#include "unicode/stringoptions.h"
|
||||
#include "unicode/utf8.h"
|
||||
#include "unicode/utf16.h"
|
||||
#include "bytesinkutil.h"
|
||||
#include "cmemory.h"
|
||||
#include "uassert.h"
|
||||
|
||||
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; }
|
||||
char scratch[200];
|
||||
int32_t s8Length = 0;
|
||||
for (int32_t i = 0; i < s16Length;) {
|
||||
int32_t capacity;
|
||||
int32_t desiredCapacity = s16Length - i;
|
||||
if (desiredCapacity < (INT32_MAX / 3)) {
|
||||
desiredCapacity *= 3; // max 3 UTF-8 bytes per UTF-16 code unit
|
||||
} else if (desiredCapacity < (INT32_MAX / 2)) {
|
||||
desiredCapacity *= 2;
|
||||
} else {
|
||||
desiredCapacity = INT32_MAX;
|
||||
}
|
||||
char *buffer = sink.GetAppendBuffer(U8_MAX_LENGTH, desiredCapacity,
|
||||
scratch, UPRV_LENGTHOF(scratch), &capacity);
|
||||
capacity -= U8_MAX_LENGTH - 1;
|
||||
int32_t j = 0;
|
||||
for (; i < s16Length && j < capacity;) {
|
||||
UChar32 c;
|
||||
U16_NEXT_UNSAFE(s16, i, c);
|
||||
U8_APPEND_UNSAFE(buffer, j, c);
|
||||
}
|
||||
if (j > (INT32_MAX - s8Length)) {
|
||||
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
|
||||
return FALSE;
|
||||
}
|
||||
sink.Append(buffer, j);
|
||||
s8Length += j;
|
||||
}
|
||||
if (edits != nullptr) {
|
||||
edits->addReplace(length, s8Length);
|
||||
}
|
||||
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 ((limit - s) > INT32_MAX) {
|
||||
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
|
||||
return FALSE;
|
||||
}
|
||||
return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode);
|
||||
}
|
||||
|
||||
void
|
||||
ByteSinkUtil::appendCodePoint(int32_t length, UChar32 c, ByteSink &sink, Edits *edits) {
|
||||
char s8[U8_MAX_LENGTH];
|
||||
int32_t s8Length = 0;
|
||||
U8_APPEND_UNSAFE(s8, s8Length, c);
|
||||
if (edits != nullptr) {
|
||||
edits->addReplace(length, s8Length);
|
||||
}
|
||||
sink.Append(s8, s8Length);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// See unicode/utf8.h U8_APPEND_UNSAFE().
|
||||
inline uint8_t getTwoByteLead(UChar32 c) { return (uint8_t)((c >> 6) | 0xc0); }
|
||||
inline uint8_t getTwoByteTrail(UChar32 c) { return (uint8_t)((c & 0x3f) | 0x80); }
|
||||
|
||||
} // namespace
|
||||
|
||||
void
|
||||
ByteSinkUtil::appendTwoBytes(UChar32 c, ByteSink &sink) {
|
||||
U_ASSERT(0x80 <= c && c <= 0x7ff); // 2-byte UTF-8
|
||||
char s8[2] = { (char)getTwoByteLead(c), (char)getTwoByteTrail(c) };
|
||||
sink.Append(s8, 2);
|
||||
}
|
||||
|
||||
UBool
|
||||
ByteSinkUtil::appendUnchanged(const uint8_t *s, int32_t length,
|
||||
ByteSink &sink, uint32_t options, Edits *edits,
|
||||
UErrorCode &errorCode) {
|
||||
if (U_FAILURE(errorCode)) { return FALSE; }
|
||||
if (length > 0) {
|
||||
if (edits != nullptr) {
|
||||
edits->addUnchanged(length);
|
||||
}
|
||||
if ((options & U_OMIT_UNCHANGED_TEXT) == 0) {
|
||||
sink.Append(reinterpret_cast<const char *>(s), length);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
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 ((limit - s) > INT32_MAX) {
|
||||
errorCode = U_INDEX_OUTOFBOUNDS_ERROR;
|
||||
return FALSE;
|
||||
}
|
||||
return appendUnchanged(s, (int32_t)(limit - s), sink, options, edits, errorCode);
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
53
source/common/bytesinkutil.h
Normal file
53
source/common/bytesinkutil.h
Normal file
@ -0,0 +1,53 @@
|
||||
// © 2017 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
// bytesinkutil.h
|
||||
// created: 2017sep14 Markus W. Scherer
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/bytestream.h"
|
||||
#include "unicode/edits.h"
|
||||
#include "cmemory.h"
|
||||
#include "uassert.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class ByteSink;
|
||||
class Edits;
|
||||
|
||||
class U_COMMON_API ByteSinkUtil {
|
||||
public:
|
||||
ByteSinkUtil() = delete; // all static
|
||||
|
||||
/** (length) bytes were mapped to valid (s16, s16Length). */
|
||||
static UBool appendChange(int32_t length,
|
||||
const char16_t *s16, int32_t s16Length,
|
||||
ByteSink &sink, Edits *edits, UErrorCode &errorCode);
|
||||
|
||||
/** The bytes at [s, limit[ were mapped to valid (s16, s16Length). */
|
||||
static UBool appendChange(const uint8_t *s, const uint8_t *limit,
|
||||
const char16_t *s16, int32_t s16Length,
|
||||
ByteSink &sink, Edits *edits, UErrorCode &errorCode);
|
||||
|
||||
/** (length) bytes were mapped/changed to valid code point c. */
|
||||
static void appendCodePoint(int32_t length, UChar32 c, ByteSink &sink, Edits *edits = nullptr);
|
||||
|
||||
/** The few bytes at [src, nextSrc[ were mapped/changed to valid code point c. */
|
||||
static inline void appendCodePoint(const uint8_t *src, const uint8_t *nextSrc, UChar32 c,
|
||||
ByteSink &sink, Edits *edits = nullptr) {
|
||||
appendCodePoint((int32_t)(nextSrc - src), c, sink, edits);
|
||||
}
|
||||
|
||||
/** Append the two-byte character (U+0080..U+07FF). */
|
||||
static void appendTwoBytes(UChar32 c, ByteSink &sink);
|
||||
|
||||
static UBool appendUnchanged(const uint8_t *s, int32_t length,
|
||||
ByteSink &sink, uint32_t options, Edits *edits,
|
||||
UErrorCode &errorCode);
|
||||
|
||||
static UBool appendUnchanged(const uint8_t *s, const uint8_t *limit,
|
||||
ByteSink &sink, uint32_t options, Edits *edits,
|
||||
UErrorCode &errorCode);
|
||||
};
|
||||
|
||||
U_NAMESPACE_END
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
// Copyright (C) 2009-2011, International Business Machines
|
||||
// Corporation and others. All Rights Reserved.
|
||||
@ -45,6 +45,12 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) {
|
||||
if (n <= 0) {
|
||||
return;
|
||||
}
|
||||
if (n > (INT32_MAX - appended_)) {
|
||||
// TODO: Report as integer overflow, not merely buffer overflow.
|
||||
appended_ = INT32_MAX;
|
||||
overflowed_ = TRUE;
|
||||
return;
|
||||
}
|
||||
appended_ += n;
|
||||
int32_t available = capacity_ - size_;
|
||||
if (n > available) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: bytestrie.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: bytestriebuilder.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: bytestrieiterator.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*****************************************************************************
|
||||
@ -311,12 +311,12 @@ void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros
|
||||
|
||||
// see what the permutations of the characters before and after this one are
|
||||
//Hashtable *subpermute = permute(source.substring(0,i) + source.substring(i + UTF16.getCharCount(cp)));
|
||||
permute(subPermuteString.replace(i, U16_LENGTH(cp), NULL, 0), skipZeros, &subpermute, status);
|
||||
permute(subPermuteString.remove(i, U16_LENGTH(cp)), skipZeros, &subpermute, status);
|
||||
/* Test for buffer overflows */
|
||||
if(U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
// The upper replace is destructive. The question is do we have to make a copy, or we don't care about the contents
|
||||
// The upper remove is destructive. The question is do we have to make a copy, or we don't care about the contents
|
||||
// of source at this point.
|
||||
|
||||
// prefix this character to all of them
|
||||
@ -405,7 +405,7 @@ UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, i
|
||||
//String[] finalResult = new String[result.size()];
|
||||
UnicodeString *finalResult = NULL;
|
||||
int32_t resultCount;
|
||||
if((resultCount = result.count())) {
|
||||
if((resultCount = result.count()) != 0) {
|
||||
finalResult = new UnicodeString[resultCount];
|
||||
if (finalResult == 0) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: charstr.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/putil.h"
|
||||
#include "charstr.h"
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -162,7 +162,6 @@ public:
|
||||
* @param p simple pointer to an array of T items that is adopted
|
||||
*/
|
||||
explicit LocalMemory(T *p=NULL) : LocalPointerBase<T>(p) {}
|
||||
#if U_HAVE_RVALUE_REFERENCES
|
||||
/**
|
||||
* Move constructor, leaves src with isNull().
|
||||
* @param src source smart pointer
|
||||
@ -170,14 +169,12 @@ public:
|
||||
LocalMemory(LocalMemory<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
|
||||
src.ptr=NULL;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* Destructor deletes the memory it owns.
|
||||
*/
|
||||
~LocalMemory() {
|
||||
uprv_free(LocalPointerBase<T>::ptr);
|
||||
}
|
||||
#if U_HAVE_RVALUE_REFERENCES
|
||||
/**
|
||||
* Move assignment operator, leaves src with isNull().
|
||||
* The behavior is undefined if *this and src are the same object.
|
||||
@ -187,7 +184,6 @@ public:
|
||||
LocalMemory<T> &operator=(LocalMemory<T> &&src) U_NOEXCEPT {
|
||||
return moveFrom(src);
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* Move assignment, leaves src with isNull().
|
||||
* The behavior is undefined if *this and src are the same object.
|
||||
@ -312,6 +308,14 @@ public:
|
||||
* Default constructor initializes with internal T[stackCapacity] buffer.
|
||||
*/
|
||||
MaybeStackArray() : ptr(stackArray), capacity(stackCapacity), needToRelease(FALSE) {}
|
||||
/**
|
||||
* Automatically allocates the heap array if the argument is larger than the stack capacity.
|
||||
* Intended for use when an approximate capacity is known at compile time but the true
|
||||
* capacity is not known until runtime.
|
||||
*/
|
||||
MaybeStackArray(int32_t newCapacity) : MaybeStackArray() {
|
||||
if (capacity < newCapacity) { resize(newCapacity); }
|
||||
};
|
||||
/**
|
||||
* Destructor deletes the array (if owned).
|
||||
*/
|
||||
|
@ -20,6 +20,7 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@ -102,13 +103,14 @@
|
||||
<ProgramDataBaseFileName>.\x86\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin\icuuc58.dll</OutputFile>
|
||||
<OutputFile>..\..\bin\icuuc60.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>.\..\..\lib\icuuc.pdb</ProgramDatabaseFile>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
@ -143,13 +145,14 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin\icuuc58d.dll</OutputFile>
|
||||
<OutputFile>..\..\bin\icuuc60d.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\lib\icuucd.pdb</ProgramDatabaseFile>
|
||||
@ -181,13 +184,14 @@
|
||||
<ProgramDataBaseFileName>.\x64\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin64\icuuc58.dll</OutputFile>
|
||||
<OutputFile>..\..\bin64\icuuc60.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>.\..\..\lib64\icuuc.pdb</ProgramDatabaseFile>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
@ -220,13 +224,14 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin64\icuuc58d.dll</OutputFile>
|
||||
<OutputFile>..\..\bin64\icuuc60d.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\..\..\lib64\icuucd.pdb</ProgramDatabaseFile>
|
||||
@ -237,11 +242,11 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="filteredbrk.cpp" />
|
||||
<ClCompile Include="ubidi.c" />
|
||||
<ClCompile Include="ubiditransform.c" />
|
||||
<ClCompile Include="ubidi_props.c" />
|
||||
<ClCompile Include="ubidiln.c" />
|
||||
<ClCompile Include="ubidiwrt.c" />
|
||||
<ClCompile Include="ubidi.cpp" />
|
||||
<ClCompile Include="ubiditransform.cpp" />
|
||||
<ClCompile Include="ubidi_props.cpp" />
|
||||
<ClCompile Include="ubidiln.cpp" />
|
||||
<ClCompile Include="ubidiwrt.cpp" />
|
||||
<ClCompile Include="uloc_keytype.cpp" />
|
||||
<ClCompile Include="ushape.cpp" />
|
||||
<ClCompile Include="brkeng.cpp">
|
||||
@ -263,6 +268,8 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="rbbitblb.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="rbbi_cache.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="dictionarydata.cpp" />
|
||||
<ClCompile Include="ubrk.cpp" />
|
||||
<ClCompile Include="ucol_swp.cpp">
|
||||
@ -271,12 +278,12 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\i18n;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\i18n;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="propsvec.c" />
|
||||
<ClCompile Include="uarrsort.c" />
|
||||
<ClCompile Include="uenum.c" />
|
||||
<ClCompile Include="uhash.c" />
|
||||
<ClCompile Include="propsvec.cpp" />
|
||||
<ClCompile Include="uarrsort.cpp" />
|
||||
<ClCompile Include="uenum.cpp" />
|
||||
<ClCompile Include="uhash.cpp" />
|
||||
<ClCompile Include="uhash_us.cpp" />
|
||||
<ClCompile Include="ulist.c" />
|
||||
<ClCompile Include="ulist.cpp" />
|
||||
<ClCompile Include="ustack.cpp" />
|
||||
<ClCompile Include="ustrenum.cpp" />
|
||||
<ClCompile Include="utrie.cpp" />
|
||||
@ -286,8 +293,8 @@
|
||||
<ClCompile Include="uvectr32.cpp" />
|
||||
<ClCompile Include="uvectr64.cpp" />
|
||||
<ClCompile Include="errorcode.cpp" />
|
||||
<ClCompile Include="icudataver.c" />
|
||||
<ClCompile Include="locmap.c">
|
||||
<ClCompile Include="icudataver.cpp" />
|
||||
<ClCompile Include="locmap.cpp">
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
|
||||
@ -299,59 +306,59 @@
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="umath.c" />
|
||||
<ClCompile Include="umath.cpp" />
|
||||
<ClCompile Include="umutex.cpp">
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utrace.c" />
|
||||
<ClCompile Include="utypes.c" />
|
||||
<ClCompile Include="wintz.c">
|
||||
<ClCompile Include="utrace.cpp" />
|
||||
<ClCompile Include="utypes.cpp" />
|
||||
<ClCompile Include="wintz.cpp">
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv.c" />
|
||||
<ClCompile Include="ucnv.cpp" />
|
||||
<ClCompile Include="ucnv2022.cpp" />
|
||||
<ClCompile Include="ucnv_bld.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_cb.c" />
|
||||
<ClCompile Include="ucnv_cnv.c" />
|
||||
<ClCompile Include="ucnv_ct.c" />
|
||||
<ClCompile Include="ucnv_err.c" />
|
||||
<ClCompile Include="ucnv_cb.cpp" />
|
||||
<ClCompile Include="ucnv_cnv.cpp" />
|
||||
<ClCompile Include="ucnv_ct.cpp" />
|
||||
<ClCompile Include="ucnv_err.cpp" />
|
||||
<ClCompile Include="ucnv_ext.cpp" />
|
||||
<ClCompile Include="ucnv_io.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_lmb.c" />
|
||||
<ClCompile Include="ucnv_set.c" />
|
||||
<ClCompile Include="ucnv_u16.c" />
|
||||
<ClCompile Include="ucnv_u32.c" />
|
||||
<ClCompile Include="ucnv_u7.c" />
|
||||
<ClCompile Include="ucnv_u8.c" />
|
||||
<ClCompile Include="ucnv_lmb.cpp" />
|
||||
<ClCompile Include="ucnv_set.cpp" />
|
||||
<ClCompile Include="ucnv_u16.cpp" />
|
||||
<ClCompile Include="ucnv_u32.cpp" />
|
||||
<ClCompile Include="ucnv_u7.cpp" />
|
||||
<ClCompile Include="ucnv_u8.cpp" />
|
||||
<ClCompile Include="ucnvbocu.cpp" />
|
||||
<ClCompile Include="ucnvdisp.c" />
|
||||
<ClCompile Include="ucnvhz.c" />
|
||||
<ClCompile Include="ucnvisci.c" />
|
||||
<ClCompile Include="ucnvlat1.c" />
|
||||
<ClCompile Include="ucnvdisp.cpp" />
|
||||
<ClCompile Include="ucnvhz.cpp" />
|
||||
<ClCompile Include="ucnvisci.cpp" />
|
||||
<ClCompile Include="ucnvlat1.cpp" />
|
||||
<ClCompile Include="ucnvmbcs.cpp" />
|
||||
<ClCompile Include="ucnvscsu.c" />
|
||||
<ClCompile Include="ucnvscsu.cpp" />
|
||||
<ClCompile Include="ucnvsel.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="cmemory.c" />
|
||||
<ClCompile Include="cmemory.cpp" />
|
||||
<ClCompile Include="ucln_cmn.cpp">
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucmndata.c" />
|
||||
<ClCompile Include="ucmndata.cpp" />
|
||||
<ClCompile Include="udata.cpp" />
|
||||
<ClCompile Include="udatamem.c" />
|
||||
<ClCompile Include="udataswp.c" />
|
||||
<ClCompile Include="udatamem.cpp" />
|
||||
<ClCompile Include="udataswp.cpp" />
|
||||
<ClCompile Include="uinit.cpp">
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="umapfile.c">
|
||||
<ClCompile Include="umapfile.cpp">
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
|
||||
<DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
|
||||
@ -360,7 +367,7 @@
|
||||
<ClCompile Include="uobject.cpp" />
|
||||
<ClCompile Include="dtintrv.cpp" />
|
||||
<ClCompile Include="parsepos.cpp" />
|
||||
<ClCompile Include="ustrfmt.c" />
|
||||
<ClCompile Include="ustrfmt.cpp" />
|
||||
<ClCompile Include="util.cpp" />
|
||||
<ClCompile Include="util_props.cpp" />
|
||||
<ClCompile Include="punycode.cpp" />
|
||||
@ -380,10 +387,10 @@
|
||||
<ClCompile Include="resbund.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="resbund_cnv.cpp" />
|
||||
<ClCompile Include="ucat.c" />
|
||||
<ClCompile Include="ucat.cpp" />
|
||||
<ClCompile Include="uloc.cpp" />
|
||||
<ClCompile Include="uloc_tag.c" />
|
||||
<ClCompile Include="ures_cnv.c" />
|
||||
<ClCompile Include="uloc_tag.cpp" />
|
||||
<ClCompile Include="ures_cnv.cpp" />
|
||||
<ClCompile Include="uresbund.cpp" />
|
||||
<ClCompile Include="uresdata.cpp" />
|
||||
<ClCompile Include="resource.cpp" />
|
||||
@ -405,7 +412,7 @@
|
||||
<ClCompile Include="ruleiter.cpp" />
|
||||
<ClCompile Include="ucase.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="uchar.c" />
|
||||
<ClCompile Include="uchar.cpp" />
|
||||
<ClCompile Include="unames.cpp" />
|
||||
<ClCompile Include="unifiedcache.cpp">
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
@ -417,8 +424,8 @@
|
||||
<ClCompile Include="uniset_props.cpp" />
|
||||
<ClCompile Include="unisetspan.cpp" />
|
||||
<ClCompile Include="uprops.cpp" />
|
||||
<ClCompile Include="usc_impl.c" />
|
||||
<ClCompile Include="uscript.c" />
|
||||
<ClCompile Include="usc_impl.cpp" />
|
||||
<ClCompile Include="uscript.cpp" />
|
||||
<ClCompile Include="uscript_props.cpp" />
|
||||
<ClCompile Include="uset.cpp" />
|
||||
<ClCompile Include="uset_props.cpp" />
|
||||
@ -440,15 +447,17 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="usprep.cpp" />
|
||||
<ClCompile Include="appendable.cpp" />
|
||||
<ClCompile Include="bytesinkutil.cpp" />
|
||||
<ClCompile Include="bytestream.cpp" />
|
||||
<ClCompile Include="bytestrie.cpp" />
|
||||
<ClCompile Include="bytestriebuilder.cpp" />
|
||||
<ClCompile Include="bytestrieiterator.cpp" />
|
||||
<ClCompile Include="chariter.cpp" />
|
||||
<ClCompile Include="charstr.cpp" />
|
||||
<ClCompile Include="cstring.c" />
|
||||
<ClCompile Include="cstring.cpp" />
|
||||
<ClCompile Include="cstr.cpp" />
|
||||
<ClCompile Include="cwchar.c" />
|
||||
<ClCompile Include="cwchar.cpp" />
|
||||
<ClCompile Include="edits.cpp" />
|
||||
<ClCompile Include="messagepattern.cpp" />
|
||||
<ClCompile Include="schriter.cpp" />
|
||||
<ClCompile Include="stringpiece.cpp" />
|
||||
@ -460,7 +469,7 @@
|
||||
<ClCompile Include="ucharstriebuilder.cpp" />
|
||||
<ClCompile Include="ucharstrieiterator.cpp" />
|
||||
<ClCompile Include="uchriter.cpp" />
|
||||
<ClCompile Include="uinvchar.c" />
|
||||
<ClCompile Include="uinvchar.cpp" />
|
||||
<ClCompile Include="uiter.cpp" />
|
||||
<ClCompile Include="unistr.cpp" />
|
||||
<ClCompile Include="unistr_case.cpp" />
|
||||
@ -476,7 +485,7 @@
|
||||
<ClCompile Include="ustring.cpp" />
|
||||
<ClCompile Include="ustrtrns.cpp" />
|
||||
<ClCompile Include="utext.cpp" />
|
||||
<ClCompile Include="utf_impl.c" />
|
||||
<ClCompile Include="utf_impl.cpp" />
|
||||
<ClCompile Include="listformatter.cpp" />
|
||||
<ClCompile Include="ulistformatter.cpp" />
|
||||
</ItemGroup>
|
||||
@ -566,6 +575,7 @@
|
||||
<ClInclude Include="rbbiscan.h" />
|
||||
<ClInclude Include="rbbisetb.h" />
|
||||
<ClInclude Include="rbbitblb.h" />
|
||||
<ClInclude Include="rbbi_cache.h" />
|
||||
<ClInclude Include="dictionarydata.h" />
|
||||
<CustomBuild Include="unicode\ubrk.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
@ -1472,6 +1482,7 @@
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="bytesinkutil.h" />
|
||||
<CustomBuild Include="unicode\bytestream.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
@ -1511,6 +1522,34 @@
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\casemap.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\char16ptr.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
@ -1532,6 +1571,20 @@
|
||||
<ClInclude Include="cstring.h" />
|
||||
<ClInclude Include="cstr.h" />
|
||||
<ClInclude Include="cwchar.h" />
|
||||
<CustomBuild Include="unicode\edits.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\messagepattern.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
@ -1616,6 +1669,7 @@
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucasemap_imp.h" />
|
||||
<CustomBuild Include="unicode\ucharstrie.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
@ -1840,6 +1894,20 @@
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\stringoptions.h">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
@ -1856,4 +1924,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -49,16 +49,16 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ubidi.c">
|
||||
<ClCompile Include="ubidi.cpp">
|
||||
<Filter>bidi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ubidi_props.c">
|
||||
<ClCompile Include="ubidi_props.cpp">
|
||||
<Filter>bidi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ubidiln.c">
|
||||
<ClCompile Include="ubidiln.cpp">
|
||||
<Filter>bidi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ubidiwrt.c">
|
||||
<ClCompile Include="ubidiwrt.cpp">
|
||||
<Filter>bidi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ushape.cpp">
|
||||
@ -97,6 +97,9 @@
|
||||
<ClCompile Include="rbbitblb.cpp">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rbbi_cache.cpp">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ubrk.cpp">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClCompile>
|
||||
@ -106,22 +109,22 @@
|
||||
<ClCompile Include="pluralmap.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="propsvec.c">
|
||||
<ClCompile Include="propsvec.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uarrsort.c">
|
||||
<ClCompile Include="uarrsort.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uenum.c">
|
||||
<ClCompile Include="uenum.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uhash.c">
|
||||
<ClCompile Include="uhash.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uhash_us.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ulist.c">
|
||||
<ClCompile Include="ulist.cpp">
|
||||
<Filter>collections</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="unifiedcache.cpp">
|
||||
@ -154,31 +157,31 @@
|
||||
<ClCompile Include="errorcode.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="icudataver.c">
|
||||
<ClCompile Include="icudataver.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="locmap.c">
|
||||
<ClCompile Include="locmap.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="putil.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="umath.c">
|
||||
<ClCompile Include="umath.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="umutex.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utrace.c">
|
||||
<ClCompile Include="utrace.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utypes.c">
|
||||
<ClCompile Include="utypes.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wintz.c">
|
||||
<ClCompile Include="wintz.cpp">
|
||||
<Filter>configuration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv.c">
|
||||
<ClCompile Include="ucnv.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv2022.cpp">
|
||||
@ -187,13 +190,13 @@
|
||||
<ClCompile Include="ucnv_bld.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_cb.c">
|
||||
<ClCompile Include="ucnv_cb.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_cnv.c">
|
||||
<ClCompile Include="ucnv_cnv.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_err.c">
|
||||
<ClCompile Include="ucnv_err.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_ext.cpp">
|
||||
@ -202,49 +205,49 @@
|
||||
<ClCompile Include="ucnv_io.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_lmb.c">
|
||||
<ClCompile Include="ucnv_lmb.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_set.c">
|
||||
<ClCompile Include="ucnv_set.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_u16.c">
|
||||
<ClCompile Include="ucnv_u16.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_u32.c">
|
||||
<ClCompile Include="ucnv_u32.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_u7.c">
|
||||
<ClCompile Include="ucnv_u7.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_u8.c">
|
||||
<ClCompile Include="ucnv_u8.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvbocu.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvdisp.c">
|
||||
<ClCompile Include="ucnvdisp.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvhz.c">
|
||||
<ClCompile Include="ucnvhz.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvisci.c">
|
||||
<ClCompile Include="ucnvisci.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvlat1.c">
|
||||
<ClCompile Include="ucnvlat1.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvmbcs.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvscsu.c">
|
||||
<ClCompile Include="ucnvscsu.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnvsel.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cmemory.c">
|
||||
<ClCompile Include="cmemory.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sharedobject.cpp">
|
||||
@ -253,22 +256,22 @@
|
||||
<ClCompile Include="ucln_cmn.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucmndata.c">
|
||||
<ClCompile Include="ucmndata.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="udata.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="udatamem.c">
|
||||
<ClCompile Include="udatamem.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="udataswp.c">
|
||||
<ClCompile Include="udataswp.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uinit.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="umapfile.c">
|
||||
<ClCompile Include="umapfile.cpp">
|
||||
<Filter>data & memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uobject.cpp">
|
||||
@ -289,7 +292,7 @@
|
||||
<ClCompile Include="ucurr.cpp">
|
||||
<Filter>formatting</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ustrfmt.c">
|
||||
<ClCompile Include="ustrfmt.cpp">
|
||||
<Filter>formatting</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="util.cpp">
|
||||
@ -334,16 +337,16 @@
|
||||
<ClCompile Include="resbund_cnv.cpp">
|
||||
<Filter>locales & resources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucat.c">
|
||||
<ClCompile Include="ucat.cpp">
|
||||
<Filter>locales & resources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uloc.cpp">
|
||||
<Filter>locales & resources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uloc_tag.c">
|
||||
<ClCompile Include="uloc_tag.cpp">
|
||||
<Filter>locales & resources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ures_cnv.c">
|
||||
<ClCompile Include="ures_cnv.cpp">
|
||||
<Filter>locales & resources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uresbund.cpp">
|
||||
@ -391,7 +394,7 @@
|
||||
<ClCompile Include="ucase.cpp">
|
||||
<Filter>properties & sets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uchar.c">
|
||||
<ClCompile Include="uchar.cpp">
|
||||
<Filter>properties & sets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="unames.cpp">
|
||||
@ -418,10 +421,10 @@
|
||||
<ClCompile Include="uprops.cpp">
|
||||
<Filter>properties & sets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="usc_impl.c">
|
||||
<ClCompile Include="usc_impl.cpp">
|
||||
<Filter>properties & sets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uscript.c">
|
||||
<ClCompile Include="uscript.cpp">
|
||||
<Filter>properties & sets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uscript_props.cpp">
|
||||
@ -460,6 +463,9 @@
|
||||
<ClCompile Include="usprep.cpp">
|
||||
<Filter>sprep</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bytesinkutil.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bytestream.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
@ -469,13 +475,16 @@
|
||||
<ClCompile Include="charstr.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cstring.c">
|
||||
<ClCompile Include="cstring.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cstr.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cwchar.c">
|
||||
<ClCompile Include="cwchar.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="edits.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="schriter.cpp">
|
||||
@ -493,7 +502,7 @@
|
||||
<ClCompile Include="uchriter.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uinvchar.c">
|
||||
<ClCompile Include="uinvchar.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="uiter.cpp">
|
||||
@ -541,7 +550,7 @@
|
||||
<ClCompile Include="utext.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utf_impl.c">
|
||||
<ClCompile Include="utf_impl.cpp">
|
||||
<Filter>strings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="bytestrie.cpp">
|
||||
@ -568,7 +577,7 @@
|
||||
<ClCompile Include="dictionarydata.cpp">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv_ct.c">
|
||||
<ClCompile Include="ucnv_ct.cpp">
|
||||
<Filter>conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucharstrie.cpp">
|
||||
@ -595,7 +604,7 @@
|
||||
<ClCompile Include="icuplug.cpp">
|
||||
<Filter>registration</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ubiditransform.c">
|
||||
<ClCompile Include="ubiditransform.cpp">
|
||||
<Filter>bidi</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
@ -633,6 +642,9 @@
|
||||
<ClInclude Include="rbbitblb.h">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rbbi_cache.h">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ubrkimpl.h">
|
||||
<Filter>break iteration</Filter>
|
||||
</ClInclude>
|
||||
@ -858,6 +870,9 @@
|
||||
<ClInclude Include="sprpimpl.h">
|
||||
<Filter>sprep</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bytesinkutil.h">
|
||||
<Filter>strings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="charstr.h">
|
||||
<Filter>strings</Filter>
|
||||
</ClInclude>
|
||||
@ -870,6 +885,9 @@
|
||||
<ClInclude Include="cwchar.h">
|
||||
<Filter>strings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ucasemap_imp.h">
|
||||
<Filter>strings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="uinvchar.h">
|
||||
<Filter>strings</Filter>
|
||||
</ClInclude>
|
||||
@ -1096,9 +1114,18 @@
|
||||
<CustomBuild Include="unicode\bytestream.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\casemap.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\char16ptr.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\chariter.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\edits.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\rep.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
@ -1180,5 +1207,8 @@
|
||||
<CustomBuild Include="unicode\stringtriebuilder.h">
|
||||
<Filter>collections</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\stringoptions.h">
|
||||
<Filter>strings</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
949
source/common/common_uwp.vcxproj
Normal file
949
source/common/common_uwp.vcxproj
Normal file
@ -0,0 +1,949 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C10CF34B-3F79-430E-AD38-5A32DC0589C2}</ProjectGuid>
|
||||
<Keyword>DynamicLibrary</Keyword>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
|
||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\x86\ReleaseUWP\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\x86\ReleaseUWP\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\x86\DebugUWP\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\x86\DebugUWP\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\x64\ReleaseUWP\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\x64\ReleaseUWP\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\x64\DebugUWP\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\x64\DebugUWP\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">.\arm\ReleaseUWP\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">.\arm\ReleaseUWP\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">.\arm\DebugUWP\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">.\arm\DebugUWP\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)'=='Release'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)'=='Debug'">true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<!-- Options that are common to *all* configurations -->
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>U_PLATFORM_HAS_WINUWP_API=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<!-- U_DISABLE_RENAMING -->
|
||||
<!-- U_HIDE_DRAFT_API & U_HIDE_DEPRECATED_API -->
|
||||
<PreprocessorDefinitions>U_PLATFORM_HAS_WINUWP_API=1;U_ATTRIBUTE_DEPRECATED=;_CRT_SECURE_NO_DEPRECATE;U_COMMON_IMPLEMENTATION;U_PLATFORM_USES_ONLY_WIN32_API=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>U_PLATFORM_HAS_WINUWP_API=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>../common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TurnOffAssemblyGeneration>true</TurnOffAssemblyGeneration>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<!-- Options that are common to all 'Release' configurations -->
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<AdditionalDependencies>vccorlib.lib;WindowsApp.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<!-- Options that are common to all 'Debug' configurations -->
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>vccorlibd.lib;WindowsApp.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
|
||||
<!-- Options that are common to all 32-bit configurations -->
|
||||
<Midl>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
|
||||
<!-- Options that are common to all 64-bit configurations -->
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN64;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM'">
|
||||
<!-- Options that are common to all ARM configurations -->
|
||||
<Midl>
|
||||
<TargetEnvironment>ARM</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ARM;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineARM</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- Options that are specific to a particular configuration -->
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\..\..\lib32uwp\icuuc.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderOutputFile>.\x86\ReleaseUWP/common.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x86\ReleaseUWP/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x86\ReleaseUWP/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x86\ReleaseUWP/</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin32uwp\icuuc60.dll</OutputFile>
|
||||
<ProgramDatabaseFile>.\..\..\lib32uwp\icuuc.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>..\..\lib32uwp\icuuc.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\..\..\lib32uwp\icuucd.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderOutputFile>.\x86\DebugUWP/common.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x86\DebugUWP/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x86\DebugUWP/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x86\DebugUWP/</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin32uwp\icuuc60d.dll</OutputFile>
|
||||
<ProgramDatabaseFile>.\..\..\lib32uwp\icuucd.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>..\..\lib32uwp\icuucd.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\..\..\lib64uwp\icuuc.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderOutputFile>.\x64\ReleaseUWP/common.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x64\ReleaseUWP/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x64\ReleaseUWP/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x64\ReleaseUWP/</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin64uwp\icuuc60.dll</OutputFile>
|
||||
<ProgramDatabaseFile>.\..\..\lib64uwp\icuuc.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>..\..\lib64uwp\icuuc.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\..\..\lib64uwp\icuucd.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderOutputFile>.\x64\DebugUWP/common.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\x64\DebugUWP/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\x64\DebugUWP/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\x64\DebugUWP/</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\bin64uwp\icuuc60d.dll</OutputFile>
|
||||
<ProgramDatabaseFile>.\..\..\lib64uwp\icuucd.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>..\..\lib64uwp\icuucd.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\..\..\libARMuwp\icuuc.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderOutputFile>.\ARM\ReleaseUWP/common.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\ARM\ReleaseUWP/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\ARM\ReleaseUWP/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\ARM\ReleaseUWP/</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\binARMuwp\icuuc60.dll</OutputFile>
|
||||
<ProgramDatabaseFile>.\..\..\libARMuwp\icuuc.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>..\..\libARMuwp\icuuc.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\..\..\libARMuwp\icuucd.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderOutputFile>.\ARM\DebugUWP/common.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\ARM\DebugUWP/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\ARM\DebugUWP/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\ARM\DebugUWP/</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>..\..\binARMuwp\icuuc60d.dll</OutputFile>
|
||||
<ProgramDatabaseFile>.\..\..\libARMuwp\icuucd.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>..\..\libARMuwp\icuucd.lib</ImportLibrary>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="edits.cpp" />
|
||||
<ClCompile Include="filteredbrk.cpp" />
|
||||
<ClCompile Include="ubidi.cpp" />
|
||||
<ClCompile Include="ubidi_props.cpp" />
|
||||
<ClCompile Include="ubiditransform.cpp" />
|
||||
<ClCompile Include="ubidiln.cpp" />
|
||||
<ClCompile Include="ubidiwrt.cpp" />
|
||||
<ClCompile Include="uloc_keytype.cpp" />
|
||||
<ClCompile Include="ushape.cpp" />
|
||||
<ClCompile Include="brkeng.cpp" />
|
||||
<ClCompile Include="brkiter.cpp" />
|
||||
<ClCompile Include="dictbe.cpp" />
|
||||
<ClCompile Include="pluralmap.cpp" />
|
||||
<ClCompile Include="rbbi.cpp" />
|
||||
<ClCompile Include="rbbidata.cpp" />
|
||||
<ClCompile Include="rbbinode.cpp" />
|
||||
<ClCompile Include="rbbirb.cpp" />
|
||||
<ClCompile Include="rbbiscan.cpp" />
|
||||
<ClCompile Include="rbbisetb.cpp" />
|
||||
<ClCompile Include="rbbistbl.cpp" />
|
||||
<ClCompile Include="rbbitblb.cpp" />
|
||||
<ClCompile Include="rbbi_cache.cpp" />
|
||||
<ClCompile Include="dictionarydata.cpp" />
|
||||
<ClCompile Include="ubrk.cpp" />
|
||||
<ClCompile Include="ucol_swp.cpp">
|
||||
<AdditionalIncludeDirectories>..\i18n;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="propsvec.cpp" />
|
||||
<ClCompile Include="uarrsort.cpp" />
|
||||
<ClCompile Include="uenum.cpp" />
|
||||
<ClCompile Include="uhash.cpp" />
|
||||
<ClCompile Include="uhash_us.cpp" />
|
||||
<ClCompile Include="ulist.cpp" />
|
||||
<ClCompile Include="ustack.cpp" />
|
||||
<ClCompile Include="ustrenum.cpp" />
|
||||
<ClCompile Include="utrie.cpp" />
|
||||
<ClCompile Include="utrie2.cpp" />
|
||||
<ClCompile Include="utrie2_builder.cpp" />
|
||||
<ClCompile Include="uvector.cpp" />
|
||||
<ClCompile Include="uvectr32.cpp" />
|
||||
<ClCompile Include="uvectr64.cpp" />
|
||||
<ClCompile Include="errorcode.cpp" />
|
||||
<ClCompile Include="icudataver.cpp" />
|
||||
<ClCompile Include="locmap.cpp" />
|
||||
<ClCompile Include="putil.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="umath.cpp" />
|
||||
<ClCompile Include="umutex.cpp" />
|
||||
<ClCompile Include="utrace.cpp" />
|
||||
<ClCompile Include="utypes.cpp" />
|
||||
<ClCompile Include="wintz.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucnv.cpp" />
|
||||
<ClCompile Include="ucnv2022.cpp" />
|
||||
<ClCompile Include="ucnv_bld.cpp" />
|
||||
<ClCompile Include="ucnv_cb.cpp" />
|
||||
<ClCompile Include="ucnv_cnv.cpp" />
|
||||
<ClCompile Include="ucnv_ct.cpp" />
|
||||
<ClCompile Include="ucnv_err.cpp" />
|
||||
<ClCompile Include="ucnv_ext.cpp" />
|
||||
<ClCompile Include="ucnv_io.cpp" />
|
||||
<ClCompile Include="ucnv_lmb.cpp" />
|
||||
<ClCompile Include="ucnv_set.cpp" />
|
||||
<ClCompile Include="ucnv_u16.cpp" />
|
||||
<ClCompile Include="ucnv_u32.cpp" />
|
||||
<ClCompile Include="ucnv_u7.cpp" />
|
||||
<ClCompile Include="ucnv_u8.cpp" />
|
||||
<ClCompile Include="ucnvbocu.cpp" />
|
||||
<ClCompile Include="ucnvdisp.cpp" />
|
||||
<ClCompile Include="ucnvhz.cpp" />
|
||||
<ClCompile Include="ucnvisci.cpp" />
|
||||
<ClCompile Include="ucnvlat1.cpp" />
|
||||
<ClCompile Include="ucnvmbcs.cpp" />
|
||||
<ClCompile Include="ucnvscsu.cpp" />
|
||||
<ClCompile Include="ucnvsel.cpp" />
|
||||
<ClCompile Include="cmemory.cpp" />
|
||||
<ClCompile Include="ucln_cmn.cpp" />
|
||||
<ClCompile Include="ucmndata.cpp" />
|
||||
<ClCompile Include="udata.cpp" />
|
||||
<ClCompile Include="udatamem.cpp" />
|
||||
<ClCompile Include="udataswp.cpp" />
|
||||
<ClCompile Include="uinit.cpp" />
|
||||
<ClCompile Include="umapfile.cpp" />
|
||||
<ClCompile Include="uobject.cpp" />
|
||||
<ClCompile Include="dtintrv.cpp" />
|
||||
<ClCompile Include="parsepos.cpp" />
|
||||
<ClCompile Include="ustrfmt.cpp" />
|
||||
<ClCompile Include="util.cpp" />
|
||||
<ClCompile Include="util_props.cpp" />
|
||||
<ClCompile Include="punycode.cpp" />
|
||||
<ClCompile Include="uidna.cpp" />
|
||||
<ClCompile Include="uts46.cpp" />
|
||||
<ClCompile Include="locavailable.cpp" />
|
||||
<ClCompile Include="locbased.cpp" />
|
||||
<ClCompile Include="locdispnames.cpp" />
|
||||
<ClCompile Include="locdspnm.cpp" />
|
||||
<ClCompile Include="locid.cpp" />
|
||||
<ClCompile Include="loclikely.cpp" />
|
||||
<ClCompile Include="locresdata.cpp" />
|
||||
<ClCompile Include="locutil.cpp" />
|
||||
<ClCompile Include="resbund.cpp" />
|
||||
<ClCompile Include="resbund_cnv.cpp" />
|
||||
<ClCompile Include="ucat.cpp" />
|
||||
<ClCompile Include="uloc.cpp" />
|
||||
<ClCompile Include="uloc_tag.cpp" />
|
||||
<ClCompile Include="ures_cnv.cpp" />
|
||||
<ClCompile Include="uresbund.cpp" />
|
||||
<ClCompile Include="uresdata.cpp" />
|
||||
<ClCompile Include="resource.cpp" />
|
||||
<ClCompile Include="ucurr.cpp" />
|
||||
<ClCompile Include="caniter.cpp" />
|
||||
<ClCompile Include="filterednormalizer2.cpp" />
|
||||
<ClCompile Include="loadednormalizer2impl.cpp" />
|
||||
<ClCompile Include="normalizer2.cpp" />
|
||||
<ClCompile Include="normalizer2impl.cpp" />
|
||||
<ClCompile Include="normlzr.cpp" />
|
||||
<ClCompile Include="unorm.cpp" />
|
||||
<ClCompile Include="unormcmp.cpp" />
|
||||
<ClCompile Include="bmpset.cpp" />
|
||||
<ClCompile Include="patternprops.cpp" />
|
||||
<ClCompile Include="propname.cpp" />
|
||||
<ClCompile Include="ruleiter.cpp" />
|
||||
<ClCompile Include="ucase.cpp" />
|
||||
<ClCompile Include="uchar.cpp" />
|
||||
<ClCompile Include="unames.cpp" />
|
||||
<ClCompile Include="unifiedcache.cpp" />
|
||||
<ClCompile Include="unifilt.cpp" />
|
||||
<ClCompile Include="unifunct.cpp" />
|
||||
<ClCompile Include="uniset.cpp" />
|
||||
<ClCompile Include="uniset_closure.cpp" />
|
||||
<ClCompile Include="uniset_props.cpp" />
|
||||
<ClCompile Include="unisetspan.cpp" />
|
||||
<ClCompile Include="uprops.cpp" />
|
||||
<ClCompile Include="usc_impl.cpp" />
|
||||
<ClCompile Include="uscript.cpp" />
|
||||
<ClCompile Include="uscript_props.cpp" />
|
||||
<ClCompile Include="uset.cpp" />
|
||||
<ClCompile Include="uset_props.cpp" />
|
||||
<ClCompile Include="usetiter.cpp" />
|
||||
<ClCompile Include="icuplug.cpp" />
|
||||
<ClCompile Include="serv.cpp" />
|
||||
<ClCompile Include="servlk.cpp" />
|
||||
<ClCompile Include="servlkf.cpp" />
|
||||
<ClCompile Include="servls.cpp" />
|
||||
<ClCompile Include="servnotf.cpp" />
|
||||
<ClCompile Include="servrbf.cpp" />
|
||||
<ClCompile Include="servslkf.cpp" />
|
||||
<ClCompile Include="usprep.cpp" />
|
||||
<ClCompile Include="appendable.cpp" />
|
||||
<ClCompile Include="bytesinkutil.cpp" />
|
||||
<ClCompile Include="bytestream.cpp" />
|
||||
<ClCompile Include="bytestrie.cpp" />
|
||||
<ClCompile Include="bytestriebuilder.cpp" />
|
||||
<ClCompile Include="bytestrieiterator.cpp" />
|
||||
<ClCompile Include="chariter.cpp" />
|
||||
<ClCompile Include="charstr.cpp" />
|
||||
<ClCompile Include="cstring.cpp" />
|
||||
<ClCompile Include="cstr.cpp" />
|
||||
<ClCompile Include="cwchar.cpp" />
|
||||
<ClCompile Include="messagepattern.cpp" />
|
||||
<ClCompile Include="schriter.cpp" />
|
||||
<ClCompile Include="stringpiece.cpp" />
|
||||
<ClCompile Include="stringtriebuilder.cpp" />
|
||||
<ClCompile Include="simpleformatter.cpp" />
|
||||
<ClCompile Include="ucasemap.cpp" />
|
||||
<ClCompile Include="ucasemap_titlecase_brkiter.cpp" />
|
||||
<ClCompile Include="ucharstrie.cpp" />
|
||||
<ClCompile Include="ucharstriebuilder.cpp" />
|
||||
<ClCompile Include="ucharstrieiterator.cpp" />
|
||||
<ClCompile Include="uchriter.cpp" />
|
||||
<ClCompile Include="uinvchar.cpp" />
|
||||
<ClCompile Include="uiter.cpp" />
|
||||
<ClCompile Include="unistr.cpp" />
|
||||
<ClCompile Include="unistr_case.cpp" />
|
||||
<ClCompile Include="unistr_case_locale.cpp" />
|
||||
<ClCompile Include="unistr_cnv.cpp" />
|
||||
<ClCompile Include="unistr_props.cpp" />
|
||||
<ClCompile Include="unistr_titlecase_brkiter.cpp" />
|
||||
<ClCompile Include="ustr_cnv.cpp" />
|
||||
<ClCompile Include="ustr_titlecase_brkiter.cpp" />
|
||||
<ClCompile Include="ustr_wcs.cpp" />
|
||||
<ClCompile Include="ustrcase.cpp" />
|
||||
<ClCompile Include="ustrcase_locale.cpp" />
|
||||
<ClCompile Include="ustring.cpp" />
|
||||
<ClCompile Include="ustrtrns.cpp" />
|
||||
<ClCompile Include="utext.cpp" />
|
||||
<ClCompile Include="utf_impl.cpp" />
|
||||
<ClCompile Include="listformatter.cpp" />
|
||||
<ClCompile Include="ulistformatter.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="unicode\ubidi.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="localsvc.h" />
|
||||
<ClInclude Include="msvcres.h" />
|
||||
<ClInclude Include="pluralmap.h" />
|
||||
<ClInclude Include="propname_data.h" />
|
||||
<ClInclude Include="ubidi_props.h" />
|
||||
<ClInclude Include="ubidiimp.h" />
|
||||
<CustomBuild Include="unicode\ushape.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="brkeng.h" />
|
||||
<CustomBuild Include="unicode\brkiter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\dbbi.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="dictbe.h" />
|
||||
<CustomBuild Include="unicode\rbbi.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="rbbidata.h" />
|
||||
<ClInclude Include="rbbinode.h" />
|
||||
<ClInclude Include="rbbirb.h" />
|
||||
<ClInclude Include="rbbirpt.h" />
|
||||
<ClInclude Include="rbbiscan.h" />
|
||||
<ClInclude Include="rbbisetb.h" />
|
||||
<ClInclude Include="rbbitblb.h" />
|
||||
<ClInclude Include="rbbi_cache.h" />
|
||||
<ClInclude Include="dictionarydata.h" />
|
||||
<CustomBuild Include="unicode\ubrk.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ubidi_props_data.h" />
|
||||
<ClInclude Include="ubrkimpl.h" />
|
||||
<ClInclude Include="ucase_props_data.h" />
|
||||
<ClInclude Include="uchar_props_data.h" />
|
||||
<ClInclude Include="ucol_data.h" />
|
||||
<ClInclude Include="ucol_swp.h" />
|
||||
<ClInclude Include="unicode\ubiditransform.h" />
|
||||
<ClInclude Include="unistrappender.h" />
|
||||
<ClInclude Include="hash.h" />
|
||||
<ClInclude Include="propsvec.h" />
|
||||
<CustomBuild Include="unicode\strenum.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="uarrsort.h" />
|
||||
<CustomBuild Include="unicode\uenum.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="uelement.h" />
|
||||
<ClInclude Include="uenumimp.h" />
|
||||
<ClInclude Include="uhash.h" />
|
||||
<ClInclude Include="ulist.h" />
|
||||
<CustomBuild Include="unicode\enumset.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="unicode\filteredbrk.h" />
|
||||
<ClInclude Include="ustrenum.h" />
|
||||
<ClInclude Include="utrie.h" />
|
||||
<ClInclude Include="utrie2.h" />
|
||||
<ClInclude Include="utrie2_impl.h" />
|
||||
<ClInclude Include="utypeinfo.h" />
|
||||
<ClInclude Include="uvector.h" />
|
||||
<ClInclude Include="uvectr32.h" />
|
||||
<ClInclude Include="uvectr64.h" />
|
||||
<ClInclude Include="cpputils.h" />
|
||||
<CustomBuild Include="unicode\docmain.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\errorcode.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\icudataver.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="locmap.h" />
|
||||
<ClInclude Include="mutex.h" />
|
||||
<CustomBuild Include="unicode\platform.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ptypes.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\putil.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="putilimp.h" />
|
||||
<CustomBuild Include="unicode\std_string.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="uassert.h" />
|
||||
<CustomBuild Include="unicode\uconfig.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\umachine.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="umutex.h" />
|
||||
<ClInclude Include="uposixdefs.h" />
|
||||
<CustomBuild Include="unicode\urename.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utrace.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="utracimp.h" />
|
||||
<CustomBuild Include="unicode\utypes.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uvernum.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uversion.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="wintz.h" />
|
||||
<CustomBuild Include="unicode\ucnv.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucnv_bld.h" />
|
||||
<CustomBuild Include="unicode\ucnv_cb.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucnv_cnv.h" />
|
||||
<CustomBuild Include="unicode\ucnv_err.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucnv_ext.h" />
|
||||
<ClInclude Include="ucnv_imp.h" />
|
||||
<ClInclude Include="ucnv_io.h" />
|
||||
<ClInclude Include="ucnvmbcs.h" />
|
||||
<CustomBuild Include="unicode\ucnvsel.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="cmemory.h" />
|
||||
<CustomBuild Include="unicode\localpointer.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uclean.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucln.h" />
|
||||
<ClInclude Include="ucln_cmn.h" />
|
||||
<ClInclude Include="ucln_imp.h" />
|
||||
<ClInclude Include="ucmndata.h" />
|
||||
<CustomBuild Include="unicode\udata.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="udatamem.h" />
|
||||
<ClInclude Include="udataswp.h" />
|
||||
<ClInclude Include="umapfile.h" />
|
||||
<CustomBuild Include="unicode\uobject.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\dtintrv.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\parseerr.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\parsepos.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\umisc.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ustrfmt.h" />
|
||||
<ClInclude Include="util.h" />
|
||||
<CustomBuild Include="unicode\idna.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="punycode.h" />
|
||||
<CustomBuild Include="unicode\uidna.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="locbased.h" />
|
||||
<CustomBuild Include="unicode\locid.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="locutil.h" />
|
||||
<CustomBuild Include="unicode\resbund.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="sharedobject.h" />
|
||||
<ClCompile Include="sharedobject.cpp" />
|
||||
<CustomBuild Include="unicode\locdspnm.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\simpleformatter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ucat.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\udisplaycontext.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uldnames.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uloc.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ulocimp.h" />
|
||||
<CustomBuild Include="unicode\ures.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="unifiedcache.h" />
|
||||
<ClInclude Include="uresdata.h" />
|
||||
<ClInclude Include="uresimp.h" />
|
||||
<ClInclude Include="ureslocs.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<CustomBuild Include="unicode\ucurr.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucurrimp.h" />
|
||||
<CustomBuild Include="unicode\caniter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="norm2allmodes.h" />
|
||||
<CustomBuild Include="unicode\normalizer2.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="normalizer2impl.h" />
|
||||
<CustomBuild Include="unicode\normlzr.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\unorm.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\unorm2.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="unormimp.h" />
|
||||
<ClInclude Include="bmpset.h" />
|
||||
<ClInclude Include="messageimpl.h" />
|
||||
<ClInclude Include="patternprops.h" />
|
||||
<ClInclude Include="propname.h" />
|
||||
<ClInclude Include="ruleiter.h" />
|
||||
<CustomBuild Include="unicode\symtable.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ucase.h" />
|
||||
<CustomBuild Include="unicode\uchar.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\unifilt.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\unifunct.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\unimatch.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uniset.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="unisetspan.h" />
|
||||
<ClInclude Include="uprops.h" />
|
||||
<ClInclude Include="usc_impl.h" />
|
||||
<CustomBuild Include="unicode\uscript.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uset.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="uset_imp.h" />
|
||||
<CustomBuild Include="unicode\usetiter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\icuplug.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="icuplugimp.h" />
|
||||
<ClInclude Include="serv.h" />
|
||||
<ClInclude Include="servloc.h" />
|
||||
<ClInclude Include="servnotf.h" />
|
||||
<ClInclude Include="sprpimpl.h" />
|
||||
<CustomBuild Include="unicode\usprep.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\appendable.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="bytesinkutil.h" />
|
||||
<CustomBuild Include="unicode\bytestream.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\bytestrie.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\bytestriebuilder.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\chariter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="charstr.h" />
|
||||
<ClInclude Include="cstring.h" />
|
||||
<ClInclude Include="cstr.h" />
|
||||
<ClInclude Include="cwchar.h" />
|
||||
<CustomBuild Include="unicode\messagepattern.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\rep.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\schriter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\stringpiece.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\stringtriebuilder.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ucasemap.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ucharstrie.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ucharstriebuilder.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\uchriter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="uinvchar.h" />
|
||||
<CustomBuild Include="unicode\uiter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\unistr.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\urep.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ustr_cnv.h" />
|
||||
<ClInclude Include="ustr_imp.h" />
|
||||
<CustomBuild Include="unicode\ustring.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ustringtrie.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utext.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utf.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utf16.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utf32.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utf8.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\utf_old.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\listformatter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\ulistformatter.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode</Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="unicode\stringoptions.h">
|
||||
<Command>copy "%(FullPath)" ..\..\include\unicode </Command>
|
||||
<Outputs>..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="common.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
* file name: cpputils.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
* file name: cwchar.c
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
* file name: cwchar.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/**
|
||||
*******************************************************************************
|
||||
@ -46,9 +46,9 @@ int32_t
|
||||
DictionaryBreakEngine::findBreaks( UText *text,
|
||||
int32_t startPos,
|
||||
int32_t endPos,
|
||||
UBool reverse,
|
||||
int32_t breakType,
|
||||
UStack &foundBreaks ) const {
|
||||
UVector32 &foundBreaks ) const {
|
||||
(void)startPos; // TODO: remove this param?
|
||||
int32_t result = 0;
|
||||
|
||||
// Find the span of characters included in the set.
|
||||
@ -60,34 +60,12 @@ DictionaryBreakEngine::findBreaks( UText *text,
|
||||
int32_t rangeStart;
|
||||
int32_t rangeEnd;
|
||||
UChar32 c = utext_current32(text);
|
||||
if (reverse) {
|
||||
UBool isDict = fSet.contains(c);
|
||||
while((current = (int32_t)utext_getNativeIndex(text)) > startPos && isDict) {
|
||||
c = utext_previous32(text);
|
||||
isDict = fSet.contains(c);
|
||||
}
|
||||
if (current < startPos) {
|
||||
rangeStart = startPos;
|
||||
} else {
|
||||
rangeStart = current;
|
||||
if (!isDict) {
|
||||
utext_next32(text);
|
||||
rangeStart = (int32_t)utext_getNativeIndex(text);
|
||||
}
|
||||
}
|
||||
// rangeEnd = start + 1;
|
||||
utext_setNativeIndex(text, start);
|
||||
utext_next32(text);
|
||||
rangeEnd = (int32_t)utext_getNativeIndex(text);
|
||||
}
|
||||
else {
|
||||
while((current = (int32_t)utext_getNativeIndex(text)) < endPos && fSet.contains(c)) {
|
||||
utext_next32(text); // TODO: recast loop for postincrement
|
||||
c = utext_current32(text);
|
||||
}
|
||||
rangeStart = start;
|
||||
rangeEnd = current;
|
||||
while((current = (int32_t)utext_getNativeIndex(text)) < endPos && fSet.contains(c)) {
|
||||
utext_next32(text); // TODO: recast loop for postincrement
|
||||
c = utext_current32(text);
|
||||
}
|
||||
rangeStart = start;
|
||||
rangeEnd = current;
|
||||
if (breakType >= 0 && breakType < 32 && (((uint32_t)1 << breakType) & fTypes)) {
|
||||
result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks);
|
||||
utext_setNativeIndex(text, current);
|
||||
@ -248,7 +226,7 @@ int32_t
|
||||
ThaiBreakEngine::divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const {
|
||||
UVector32 &foundBreaks ) const {
|
||||
utext_setNativeIndex(text, rangeStart);
|
||||
utext_moveIndex32(text, THAI_MIN_WORD_SPAN);
|
||||
if (utext_getNativeIndex(text) >= rangeEnd) {
|
||||
@ -487,7 +465,7 @@ int32_t
|
||||
LaoBreakEngine::divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const {
|
||||
UVector32 &foundBreaks ) const {
|
||||
if ((rangeEnd - rangeStart) < LAO_MIN_WORD_SPAN) {
|
||||
return 0; // Not enough characters for two words
|
||||
}
|
||||
@ -680,7 +658,7 @@ int32_t
|
||||
BurmeseBreakEngine::divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const {
|
||||
UVector32 &foundBreaks ) const {
|
||||
if ((rangeEnd - rangeStart) < BURMESE_MIN_WORD_SPAN) {
|
||||
return 0; // Not enough characters for two words
|
||||
}
|
||||
@ -885,7 +863,7 @@ int32_t
|
||||
KhmerBreakEngine::divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const {
|
||||
UVector32 &foundBreaks ) const {
|
||||
if ((rangeEnd - rangeStart) < KHMER_MIN_WORD_SPAN) {
|
||||
return 0; // Not enough characters for two words
|
||||
}
|
||||
@ -1110,9 +1088,9 @@ static inline uint32_t getKatakanaCost(int32_t wordLength){
|
||||
return (wordLength > kMaxKatakanaLength) ? 8192 : katakanaCost[wordLength];
|
||||
}
|
||||
|
||||
static inline bool isKatakana(uint16_t value) {
|
||||
return (value >= 0x30A1u && value <= 0x30FEu && value != 0x30FBu) ||
|
||||
(value >= 0xFF66u && value <= 0xFF9fu);
|
||||
static inline bool isKatakana(UChar32 value) {
|
||||
return (value >= 0x30A1 && value <= 0x30FE && value != 0x30FB) ||
|
||||
(value >= 0xFF66 && value <= 0xFF9f);
|
||||
}
|
||||
|
||||
|
||||
@ -1128,14 +1106,14 @@ static inline int32_t utext_i32_flag(int32_t bitIndex) {
|
||||
* @param text A UText representing the text
|
||||
* @param rangeStart The start of the range of dictionary characters
|
||||
* @param rangeEnd The end of the range of dictionary characters
|
||||
* @param foundBreaks Output of C array of int32_t break positions, or 0
|
||||
* @param foundBreaks vector<int32> to receive the break positions
|
||||
* @return The number of breaks found
|
||||
*/
|
||||
int32_t
|
||||
CjkBreakEngine::divideUpDictionaryRange( UText *inText,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const {
|
||||
UVector32 &foundBreaks ) const {
|
||||
if (rangeStart >= rangeEnd) {
|
||||
return 0;
|
||||
}
|
||||
@ -1385,13 +1363,27 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
|
||||
// Now that we're done, convert positions in t_boundary[] (indices in
|
||||
// the normalized input string) back to indices in the original input UText
|
||||
// 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 cpPos = t_boundary.elementAti(i);
|
||||
U_ASSERT(cpPos > prevCPPos);
|
||||
int32_t utextPos = inputMap.isValid() ? inputMap->elementAti(cpPos) : cpPos + rangeStart;
|
||||
// Boundaries are added to foundBreaks output in ascending order.
|
||||
U_ASSERT(foundBreaks.size() == 0 ||foundBreaks.peeki() < utextPos);
|
||||
foundBreaks.push(utextPos, status);
|
||||
U_ASSERT(utextPos >= prevUTextPos);
|
||||
if (utextPos > prevUTextPos) {
|
||||
// Boundaries are added to foundBreaks output in ascending order.
|
||||
U_ASSERT(foundBreaks.size() == 0 || foundBreaks.peeki() < utextPos);
|
||||
foundBreaks.push(utextPos, status);
|
||||
} 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
|
||||
|
||||
// inString goes out of scope
|
||||
// inputMap goes out of scope
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/**
|
||||
*******************************************************************************
|
||||
@ -15,6 +15,7 @@
|
||||
#include "unicode/utext.h"
|
||||
|
||||
#include "brkeng.h"
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
@ -84,21 +85,18 @@ class DictionaryBreakEngine : public LanguageBreakEngine {
|
||||
*
|
||||
* @param text A UText representing the text. The iterator is left at
|
||||
* the end of the run of characters which the engine is capable of handling
|
||||
* that starts from the first (or last) character in the range.
|
||||
* that starts from the first character in the range.
|
||||
* @param startPos The start of the run within the supplied text.
|
||||
* @param endPos The end of the run within the supplied text.
|
||||
* @param reverse Whether the caller is looking for breaks in a reverse
|
||||
* direction.
|
||||
* @param breakType The type of break desired, or -1.
|
||||
* @param foundBreaks An allocated C array of the breaks found, if any
|
||||
* @param foundBreaks vector of int32_t to receive the break positions
|
||||
* @return The number of breaks found.
|
||||
*/
|
||||
virtual int32_t findBreaks( UText *text,
|
||||
int32_t startPos,
|
||||
int32_t endPos,
|
||||
UBool reverse,
|
||||
int32_t breakType,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
protected:
|
||||
|
||||
@ -128,7 +126,7 @@ class DictionaryBreakEngine : public LanguageBreakEngine {
|
||||
virtual int32_t divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const = 0;
|
||||
UVector32 &foundBreaks ) const = 0;
|
||||
|
||||
};
|
||||
|
||||
@ -185,7 +183,7 @@ class ThaiBreakEngine : public DictionaryBreakEngine {
|
||||
virtual int32_t divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
};
|
||||
|
||||
@ -241,7 +239,7 @@ class LaoBreakEngine : public DictionaryBreakEngine {
|
||||
virtual int32_t divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
};
|
||||
|
||||
@ -297,7 +295,7 @@ class BurmeseBreakEngine : public DictionaryBreakEngine {
|
||||
virtual int32_t divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
};
|
||||
|
||||
@ -353,7 +351,7 @@ class KhmerBreakEngine : public DictionaryBreakEngine {
|
||||
virtual int32_t divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
};
|
||||
|
||||
@ -417,7 +415,7 @@ class CjkBreakEngine : public DictionaryBreakEngine {
|
||||
virtual int32_t divideUpDictionaryRange( UText *text,
|
||||
int32_t rangeStart,
|
||||
int32_t rangeEnd,
|
||||
UStack &foundBreaks ) const;
|
||||
UVector32 &foundBreaks ) const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2008, International Business Machines Corporation and
|
||||
|
776
source/common/edits.cpp
Normal file
776
source/common/edits.cpp
Normal file
@ -0,0 +1,776 @@
|
||||
// © 2017 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
// edits.cpp
|
||||
// created: 2017feb08 Markus W. Scherer
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/edits.h"
|
||||
#include "cmemory.h"
|
||||
#include "uassert.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
namespace {
|
||||
|
||||
// 0000uuuuuuuuuuuu records u+1 unchanged text units.
|
||||
const int32_t MAX_UNCHANGED_LENGTH = 0x1000;
|
||||
const int32_t MAX_UNCHANGED = MAX_UNCHANGED_LENGTH - 1;
|
||||
|
||||
// 0mmmnnnccccccccc with m=1..6 records ccc+1 replacements of m:n text units.
|
||||
const int32_t MAX_SHORT_CHANGE_OLD_LENGTH = 6;
|
||||
const int32_t MAX_SHORT_CHANGE_NEW_LENGTH = 7;
|
||||
const int32_t SHORT_CHANGE_NUM_MASK = 0x1ff;
|
||||
const int32_t MAX_SHORT_CHANGE = 0x6fff;
|
||||
|
||||
// 0111mmmmmmnnnnnn records a replacement of m text units with n.
|
||||
// m or n = 61: actual length follows in the next edits array unit.
|
||||
// m or n = 62..63: actual length follows in the next two edits array units.
|
||||
// Bit 30 of the actual length is in the head unit.
|
||||
// Trailing units have bit 15 set.
|
||||
const int32_t LENGTH_IN_1TRAIL = 61;
|
||||
const int32_t LENGTH_IN_2TRAIL = 62;
|
||||
|
||||
} // namespace
|
||||
|
||||
void Edits::releaseArray() U_NOEXCEPT {
|
||||
if (array != stackArray) {
|
||||
uprv_free(array);
|
||||
}
|
||||
}
|
||||
|
||||
Edits &Edits::copyArray(const Edits &other) {
|
||||
if (U_FAILURE(errorCode_)) {
|
||||
length = delta = numChanges = 0;
|
||||
return *this;
|
||||
}
|
||||
if (length > capacity) {
|
||||
uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)length * 2);
|
||||
if (newArray == nullptr) {
|
||||
length = delta = numChanges = 0;
|
||||
errorCode_ = U_MEMORY_ALLOCATION_ERROR;
|
||||
return *this;
|
||||
}
|
||||
releaseArray();
|
||||
array = newArray;
|
||||
capacity = length;
|
||||
}
|
||||
if (length > 0) {
|
||||
uprv_memcpy(array, other.array, (size_t)length * 2);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Edits &Edits::moveArray(Edits &src) U_NOEXCEPT {
|
||||
if (U_FAILURE(errorCode_)) {
|
||||
length = delta = numChanges = 0;
|
||||
return *this;
|
||||
}
|
||||
releaseArray();
|
||||
if (length > STACK_CAPACITY) {
|
||||
array = src.array;
|
||||
capacity = src.capacity;
|
||||
src.array = src.stackArray;
|
||||
src.capacity = STACK_CAPACITY;
|
||||
src.reset();
|
||||
return *this;
|
||||
}
|
||||
array = stackArray;
|
||||
capacity = STACK_CAPACITY;
|
||||
if (length > 0) {
|
||||
uprv_memcpy(array, src.array, (size_t)length * 2);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Edits &Edits::operator=(const Edits &other) {
|
||||
length = other.length;
|
||||
delta = other.delta;
|
||||
numChanges = other.numChanges;
|
||||
errorCode_ = other.errorCode_;
|
||||
return copyArray(other);
|
||||
}
|
||||
|
||||
Edits &Edits::operator=(Edits &&src) U_NOEXCEPT {
|
||||
length = src.length;
|
||||
delta = src.delta;
|
||||
numChanges = src.numChanges;
|
||||
errorCode_ = src.errorCode_;
|
||||
return moveArray(src);
|
||||
}
|
||||
|
||||
Edits::~Edits() {
|
||||
releaseArray();
|
||||
}
|
||||
|
||||
void Edits::reset() U_NOEXCEPT {
|
||||
length = delta = numChanges = 0;
|
||||
errorCode_ = U_ZERO_ERROR;
|
||||
}
|
||||
|
||||
void Edits::addUnchanged(int32_t unchangedLength) {
|
||||
if(U_FAILURE(errorCode_) || unchangedLength == 0) { return; }
|
||||
if(unchangedLength < 0) {
|
||||
errorCode_ = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
}
|
||||
// Merge into previous unchanged-text record, if any.
|
||||
int32_t last = lastUnit();
|
||||
if(last < MAX_UNCHANGED) {
|
||||
int32_t remaining = MAX_UNCHANGED - last;
|
||||
if (remaining >= unchangedLength) {
|
||||
setLastUnit(last + unchangedLength);
|
||||
return;
|
||||
}
|
||||
setLastUnit(MAX_UNCHANGED);
|
||||
unchangedLength -= remaining;
|
||||
}
|
||||
// Split large lengths into multiple units.
|
||||
while(unchangedLength >= MAX_UNCHANGED_LENGTH) {
|
||||
append(MAX_UNCHANGED);
|
||||
unchangedLength -= MAX_UNCHANGED_LENGTH;
|
||||
}
|
||||
// Write a small (remaining) length.
|
||||
if(unchangedLength > 0) {
|
||||
append(unchangedLength - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void Edits::addReplace(int32_t oldLength, int32_t newLength) {
|
||||
if(U_FAILURE(errorCode_)) { return; }
|
||||
if(oldLength < 0 || newLength < 0) {
|
||||
errorCode_ = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
}
|
||||
if (oldLength == 0 && newLength == 0) {
|
||||
return;
|
||||
}
|
||||
++numChanges;
|
||||
int32_t newDelta = newLength - oldLength;
|
||||
if (newDelta != 0) {
|
||||
if ((newDelta > 0 && delta >= 0 && newDelta > (INT32_MAX - delta)) ||
|
||||
(newDelta < 0 && delta < 0 && newDelta < (INT32_MIN - delta))) {
|
||||
// Integer overflow or underflow.
|
||||
errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR;
|
||||
return;
|
||||
}
|
||||
delta += newDelta;
|
||||
}
|
||||
|
||||
if(0 < oldLength && oldLength <= MAX_SHORT_CHANGE_OLD_LENGTH &&
|
||||
newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) {
|
||||
// Merge into previous same-lengths short-replacement record, if any.
|
||||
int32_t u = (oldLength << 12) | (newLength << 9);
|
||||
int32_t last = lastUnit();
|
||||
if(MAX_UNCHANGED < last && last < MAX_SHORT_CHANGE &&
|
||||
(last & ~SHORT_CHANGE_NUM_MASK) == u &&
|
||||
(last & SHORT_CHANGE_NUM_MASK) < SHORT_CHANGE_NUM_MASK) {
|
||||
setLastUnit(last + 1);
|
||||
return;
|
||||
}
|
||||
append(u);
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t head = 0x7000;
|
||||
if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) {
|
||||
head |= oldLength << 6;
|
||||
head |= newLength;
|
||||
append(head);
|
||||
} else if ((capacity - length) >= 5 || growArray()) {
|
||||
int32_t limit = length + 1;
|
||||
if(oldLength < LENGTH_IN_1TRAIL) {
|
||||
head |= oldLength << 6;
|
||||
} else if(oldLength <= 0x7fff) {
|
||||
head |= LENGTH_IN_1TRAIL << 6;
|
||||
array[limit++] = (uint16_t)(0x8000 | oldLength);
|
||||
} else {
|
||||
head |= (LENGTH_IN_2TRAIL + (oldLength >> 30)) << 6;
|
||||
array[limit++] = (uint16_t)(0x8000 | (oldLength >> 15));
|
||||
array[limit++] = (uint16_t)(0x8000 | oldLength);
|
||||
}
|
||||
if(newLength < LENGTH_IN_1TRAIL) {
|
||||
head |= newLength;
|
||||
} else if(newLength <= 0x7fff) {
|
||||
head |= LENGTH_IN_1TRAIL;
|
||||
array[limit++] = (uint16_t)(0x8000 | newLength);
|
||||
} else {
|
||||
head |= LENGTH_IN_2TRAIL + (newLength >> 30);
|
||||
array[limit++] = (uint16_t)(0x8000 | (newLength >> 15));
|
||||
array[limit++] = (uint16_t)(0x8000 | newLength);
|
||||
}
|
||||
array[length] = (uint16_t)head;
|
||||
length = limit;
|
||||
}
|
||||
}
|
||||
|
||||
void Edits::append(int32_t r) {
|
||||
if(length < capacity || growArray()) {
|
||||
array[length++] = (uint16_t)r;
|
||||
}
|
||||
}
|
||||
|
||||
UBool Edits::growArray() {
|
||||
int32_t newCapacity;
|
||||
if (array == stackArray) {
|
||||
newCapacity = 2000;
|
||||
} else if (capacity == INT32_MAX) {
|
||||
// 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;
|
||||
} else if (capacity >= (INT32_MAX / 2)) {
|
||||
newCapacity = INT32_MAX;
|
||||
} else {
|
||||
newCapacity = 2 * capacity;
|
||||
}
|
||||
// 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;
|
||||
}
|
||||
uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2);
|
||||
if (newArray == NULL) {
|
||||
errorCode_ = U_MEMORY_ALLOCATION_ERROR;
|
||||
return FALSE;
|
||||
}
|
||||
uprv_memcpy(newArray, array, (size_t)length * 2);
|
||||
releaseArray();
|
||||
array = newArray;
|
||||
capacity = newCapacity;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
UBool Edits::copyErrorTo(UErrorCode &outErrorCode) {
|
||||
if (U_FAILURE(outErrorCode)) { return TRUE; }
|
||||
if (U_SUCCESS(errorCode_)) { return FALSE; }
|
||||
outErrorCode = errorCode_;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode) {
|
||||
if (copyErrorTo(errorCode)) { return *this; }
|
||||
// Picture string a --(Edits ab)--> string b --(Edits bc)--> string c.
|
||||
// Parallel iteration over both Edits.
|
||||
Iterator abIter = ab.getFineIterator();
|
||||
Iterator bcIter = bc.getFineIterator();
|
||||
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;
|
||||
// When we have different-intermediate-length changes, we accumulate a larger change.
|
||||
int32_t pending_aLength = 0, pending_cLength = 0;
|
||||
for (;;) {
|
||||
// At this point, for each of the two iterators:
|
||||
// Either we are done with the locally cached current edit,
|
||||
// and its intermediate-string length has been reset,
|
||||
// or we will continue to work with a truncated remainder of this edit.
|
||||
//
|
||||
// If the current edit is done, and the iterator has not yet reached the end,
|
||||
// then we fetch the next edit. This is true for at least one of the iterators.
|
||||
//
|
||||
// Normally it does not matter whether we fetch from ab and then bc or vice versa.
|
||||
// However, the result is observably different when
|
||||
// ab deletions meet bc insertions at the same intermediate-string index.
|
||||
// Some users expect the bc insertions to come first, so we fetch from bc first.
|
||||
if (bc_bLength == 0) {
|
||||
if (bcHasNext && (bcHasNext = bcIter.next(errorCode))) {
|
||||
bc_bLength = bcIter.oldLength();
|
||||
cLength = bcIter.newLength();
|
||||
if (bc_bLength == 0) {
|
||||
// insertion
|
||||
if (ab_bLength == 0 || !abIter.hasChange()) {
|
||||
addReplace(pending_aLength, pending_cLength + cLength);
|
||||
pending_aLength = pending_cLength = 0;
|
||||
} else {
|
||||
pending_cLength += cLength;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// else see if the other iterator is done, too.
|
||||
}
|
||||
if (ab_bLength == 0) {
|
||||
if (abHasNext && (abHasNext = abIter.next(errorCode))) {
|
||||
aLength = abIter.oldLength();
|
||||
ab_bLength = abIter.newLength();
|
||||
if (ab_bLength == 0) {
|
||||
// deletion
|
||||
if (bc_bLength == bcIter.oldLength() || !bcIter.hasChange()) {
|
||||
addReplace(pending_aLength + aLength, pending_cLength);
|
||||
pending_aLength = pending_cLength = 0;
|
||||
} else {
|
||||
pending_aLength += aLength;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
} else if (bc_bLength == 0) {
|
||||
// Both iterators are done at the same time:
|
||||
// The intermediate-string lengths match.
|
||||
break;
|
||||
} else {
|
||||
// The ab output string is shorter than the bc input string.
|
||||
if (!copyErrorTo(errorCode)) {
|
||||
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
if (bc_bLength == 0) {
|
||||
// The bc input string is shorter than the ab output string.
|
||||
if (!copyErrorTo(errorCode)) {
|
||||
errorCode = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
// Done fetching: ab_bLength > 0 && bc_bLength > 0
|
||||
|
||||
// The current state has two parts:
|
||||
// - Past: We accumulate a longer ac edit in the "pending" variables.
|
||||
// - Current: We have copies of the current ab/bc edits in local variables.
|
||||
// At least one side is newly fetched.
|
||||
// One side might be a truncated remainder of an edit we fetched earlier.
|
||||
|
||||
if (!abIter.hasChange() && !bcIter.hasChange()) {
|
||||
// An unchanged span all the way from string a to string c.
|
||||
if (pending_aLength != 0 || pending_cLength != 0) {
|
||||
addReplace(pending_aLength, pending_cLength);
|
||||
pending_aLength = pending_cLength = 0;
|
||||
}
|
||||
int32_t unchangedLength = aLength <= cLength ? aLength : cLength;
|
||||
addUnchanged(unchangedLength);
|
||||
ab_bLength = aLength -= unchangedLength;
|
||||
bc_bLength = cLength -= unchangedLength;
|
||||
// At least one of the unchanged spans is now empty.
|
||||
continue;
|
||||
}
|
||||
if (!abIter.hasChange() && bcIter.hasChange()) {
|
||||
// Unchanged a->b but changed b->c.
|
||||
if (ab_bLength >= bc_bLength) {
|
||||
// Split the longer unchanged span into change + remainder.
|
||||
addReplace(pending_aLength + bc_bLength, pending_cLength + cLength);
|
||||
pending_aLength = pending_cLength = 0;
|
||||
aLength = ab_bLength -= bc_bLength;
|
||||
bc_bLength = 0;
|
||||
continue;
|
||||
}
|
||||
// Handle the shorter unchanged span below like a change.
|
||||
} else if (abIter.hasChange() && !bcIter.hasChange()) {
|
||||
// Changed a->b and then unchanged b->c.
|
||||
if (ab_bLength <= bc_bLength) {
|
||||
// Split the longer unchanged span into change + remainder.
|
||||
addReplace(pending_aLength + aLength, pending_cLength + ab_bLength);
|
||||
pending_aLength = pending_cLength = 0;
|
||||
cLength = bc_bLength -= ab_bLength;
|
||||
ab_bLength = 0;
|
||||
continue;
|
||||
}
|
||||
// Handle the shorter unchanged span below like a change.
|
||||
} else { // both abIter.hasChange() && bcIter.hasChange()
|
||||
if (ab_bLength == bc_bLength) {
|
||||
// Changes on both sides up to the same position. Emit & reset.
|
||||
addReplace(pending_aLength + aLength, pending_cLength + cLength);
|
||||
pending_aLength = pending_cLength = 0;
|
||||
ab_bLength = bc_bLength = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Accumulate the a->c change, reset the shorter side,
|
||||
// keep a remainder of the longer one.
|
||||
pending_aLength += aLength;
|
||||
pending_cLength += cLength;
|
||||
if (ab_bLength < bc_bLength) {
|
||||
bc_bLength -= ab_bLength;
|
||||
cLength = ab_bLength = 0;
|
||||
} else { // ab_bLength > bc_bLength
|
||||
ab_bLength -= bc_bLength;
|
||||
aLength = bc_bLength = 0;
|
||||
}
|
||||
}
|
||||
if (pending_aLength != 0 || pending_cLength != 0) {
|
||||
addReplace(pending_aLength, pending_cLength);
|
||||
}
|
||||
copyErrorTo(errorCode);
|
||||
return *this;
|
||||
}
|
||||
|
||||
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),
|
||||
srcIndex(0), replIndex(0), destIndex(0) {}
|
||||
|
||||
int32_t Edits::Iterator::readLength(int32_t head) {
|
||||
if (head < LENGTH_IN_1TRAIL) {
|
||||
return head;
|
||||
} else if (head < LENGTH_IN_2TRAIL) {
|
||||
U_ASSERT(index < length);
|
||||
U_ASSERT(array[index] >= 0x8000);
|
||||
return array[index++] & 0x7fff;
|
||||
} else {
|
||||
U_ASSERT((index + 2) <= length);
|
||||
U_ASSERT(array[index] >= 0x8000);
|
||||
U_ASSERT(array[index + 1] >= 0x8000);
|
||||
int32_t len = ((head & 1) << 30) |
|
||||
((int32_t)(array[index] & 0x7fff) << 15) |
|
||||
(array[index + 1] & 0x7fff);
|
||||
index += 2;
|
||||
return len;
|
||||
}
|
||||
}
|
||||
|
||||
void Edits::Iterator::updateNextIndexes() {
|
||||
srcIndex += oldLength_;
|
||||
if (changed) {
|
||||
replIndex += newLength_;
|
||||
}
|
||||
destIndex += newLength_;
|
||||
}
|
||||
|
||||
void Edits::Iterator::updatePreviousIndexes() {
|
||||
srcIndex -= oldLength_;
|
||||
if (changed) {
|
||||
replIndex -= newLength_;
|
||||
}
|
||||
destIndex -= newLength_;
|
||||
}
|
||||
|
||||
UBool Edits::Iterator::noNext() {
|
||||
// No change before or beyond the string.
|
||||
dir = 0;
|
||||
changed = FALSE;
|
||||
oldLength_ = newLength_ = 0;
|
||||
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; }
|
||||
// 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) {
|
||||
updateNextIndexes();
|
||||
} else {
|
||||
if (dir < 0) {
|
||||
// Turn around from previous() to next().
|
||||
// Post-increment-read the same span again.
|
||||
if (remaining > 0) {
|
||||
// Fine-grained iterator:
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
dir = 1;
|
||||
}
|
||||
if (remaining >= 1) {
|
||||
// Fine-grained iterator: Continue a sequence of compressed changes.
|
||||
if (remaining > 1) {
|
||||
--remaining;
|
||||
return TRUE;
|
||||
}
|
||||
remaining = 0;
|
||||
}
|
||||
if (index >= length) {
|
||||
return noNext();
|
||||
}
|
||||
int32_t u = array[index++];
|
||||
if (u <= MAX_UNCHANGED) {
|
||||
// Combine adjacent unchanged ranges.
|
||||
changed = FALSE;
|
||||
oldLength_ = u + 1;
|
||||
while (index < length && (u = array[index]) <= MAX_UNCHANGED) {
|
||||
++index;
|
||||
oldLength_ += u + 1;
|
||||
}
|
||||
newLength_ = oldLength_;
|
||||
if (onlyChanges) {
|
||||
updateNextIndexes();
|
||||
if (index >= length) {
|
||||
return noNext();
|
||||
}
|
||||
// already fetched u > MAX_UNCHANGED at index
|
||||
++index;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
changed = TRUE;
|
||||
if (u <= MAX_SHORT_CHANGE) {
|
||||
int32_t oldLen = u >> 12;
|
||||
int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH;
|
||||
int32_t num = (u & SHORT_CHANGE_NUM_MASK) + 1;
|
||||
if (coarse) {
|
||||
oldLength_ = num * oldLen;
|
||||
newLength_ = num * newLen;
|
||||
} else {
|
||||
// Split a sequence of changes that was compressed into one unit.
|
||||
oldLength_ = oldLen;
|
||||
newLength_ = newLen;
|
||||
if (num > 1) {
|
||||
remaining = num; // This is the first of two or more changes.
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
U_ASSERT(u <= 0x7fff);
|
||||
oldLength_ = readLength((u >> 6) & 0x3f);
|
||||
newLength_ = readLength(u & 0x3f);
|
||||
if (!coarse) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
// Combine adjacent changes.
|
||||
while (index < length && (u = array[index]) > MAX_UNCHANGED) {
|
||||
++index;
|
||||
if (u <= MAX_SHORT_CHANGE) {
|
||||
int32_t num = (u & SHORT_CHANGE_NUM_MASK) + 1;
|
||||
oldLength_ += (u >> 12) * num;
|
||||
newLength_ += ((u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH) * num;
|
||||
} else {
|
||||
U_ASSERT(u <= 0x7fff);
|
||||
oldLength_ += readLength((u >> 6) & 0x3f);
|
||||
newLength_ += readLength(u & 0x3f);
|
||||
}
|
||||
}
|
||||
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; }
|
||||
// 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) {
|
||||
if (dir > 0) {
|
||||
// Turn around from next() to previous().
|
||||
// Set the string indexes to the span limit and
|
||||
// pre-decrement-read the same span again.
|
||||
if (remaining > 0) {
|
||||
// Fine-grained iterator:
|
||||
// Stay on the current one of a sequence of compressed changes.
|
||||
--index; // previous() rests on the sequence unit.
|
||||
dir = -1;
|
||||
return TRUE;
|
||||
}
|
||||
updateNextIndexes();
|
||||
}
|
||||
dir = -1;
|
||||
}
|
||||
if (remaining > 0) {
|
||||
// Fine-grained iterator: Continue a sequence of compressed changes.
|
||||
int32_t u = array[index];
|
||||
U_ASSERT(MAX_UNCHANGED < u && u <= MAX_SHORT_CHANGE);
|
||||
if (remaining <= (u & SHORT_CHANGE_NUM_MASK)) {
|
||||
++remaining;
|
||||
updatePreviousIndexes();
|
||||
return TRUE;
|
||||
}
|
||||
remaining = 0;
|
||||
}
|
||||
if (index <= 0) {
|
||||
return noNext();
|
||||
}
|
||||
int32_t u = array[--index];
|
||||
if (u <= MAX_UNCHANGED) {
|
||||
// Combine adjacent unchanged ranges.
|
||||
changed = FALSE;
|
||||
oldLength_ = u + 1;
|
||||
while (index > 0 && (u = array[index - 1]) <= MAX_UNCHANGED) {
|
||||
--index;
|
||||
oldLength_ += u + 1;
|
||||
}
|
||||
newLength_ = oldLength_;
|
||||
// No need to handle onlyChanges as long as previous() is called only from findIndex().
|
||||
updatePreviousIndexes();
|
||||
return TRUE;
|
||||
}
|
||||
changed = TRUE;
|
||||
if (u <= MAX_SHORT_CHANGE) {
|
||||
int32_t oldLen = u >> 12;
|
||||
int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH;
|
||||
int32_t num = (u & SHORT_CHANGE_NUM_MASK) + 1;
|
||||
if (coarse) {
|
||||
oldLength_ = num * oldLen;
|
||||
newLength_ = num * newLen;
|
||||
} else {
|
||||
// Split a sequence of changes that was compressed into one unit.
|
||||
oldLength_ = oldLen;
|
||||
newLength_ = newLen;
|
||||
if (num > 1) {
|
||||
remaining = 1; // This is the last of two or more changes.
|
||||
}
|
||||
updatePreviousIndexes();
|
||||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
if (u <= 0x7fff) {
|
||||
// The change is encoded in u alone.
|
||||
oldLength_ = readLength((u >> 6) & 0x3f);
|
||||
newLength_ = readLength(u & 0x3f);
|
||||
} else {
|
||||
// Back up to the head of the change, read the lengths,
|
||||
// and reset the index to the head again.
|
||||
U_ASSERT(index > 0);
|
||||
while ((u = array[--index]) > 0x7fff) {}
|
||||
U_ASSERT(u > MAX_SHORT_CHANGE);
|
||||
int32_t headIndex = index++;
|
||||
oldLength_ = readLength((u >> 6) & 0x3f);
|
||||
newLength_ = readLength(u & 0x3f);
|
||||
index = headIndex;
|
||||
}
|
||||
if (!coarse) {
|
||||
updatePreviousIndexes();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
// Combine adjacent changes.
|
||||
while (index > 0 && (u = array[index - 1]) > MAX_UNCHANGED) {
|
||||
--index;
|
||||
if (u <= MAX_SHORT_CHANGE) {
|
||||
int32_t num = (u & SHORT_CHANGE_NUM_MASK) + 1;
|
||||
oldLength_ += (u >> 12) * num;
|
||||
newLength_ += ((u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH) * num;
|
||||
} else if (u <= 0x7fff) {
|
||||
// Read the lengths, and reset the index to the head again.
|
||||
int32_t headIndex = index++;
|
||||
oldLength_ += readLength((u >> 6) & 0x3f);
|
||||
newLength_ += readLength(u & 0x3f);
|
||||
index = headIndex;
|
||||
}
|
||||
}
|
||||
updatePreviousIndexes();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &errorCode) {
|
||||
if (U_FAILURE(errorCode) || i < 0) { return -1; }
|
||||
int32_t spanStart, spanLength;
|
||||
if (findSource) { // find source index
|
||||
spanStart = srcIndex;
|
||||
spanLength = oldLength_;
|
||||
} else { // find destination index
|
||||
spanStart = destIndex;
|
||||
spanLength = newLength_;
|
||||
}
|
||||
if (i < spanStart) {
|
||||
if (i >= (spanStart / 2)) {
|
||||
// Search backwards.
|
||||
for (;;) {
|
||||
UBool hasPrevious = previous(errorCode);
|
||||
U_ASSERT(hasPrevious); // because i>=0 and the first span starts at 0
|
||||
(void)hasPrevious; // avoid unused-variable warning
|
||||
spanStart = findSource ? srcIndex : destIndex;
|
||||
if (i >= spanStart) {
|
||||
// The index is in the current span.
|
||||
return 0;
|
||||
}
|
||||
if (remaining > 0) {
|
||||
// Is the index in one of the remaining compressed edits?
|
||||
// spanStart is the start of the current span, first of the remaining ones.
|
||||
spanLength = findSource ? oldLength_ : newLength_;
|
||||
int32_t u = array[index];
|
||||
U_ASSERT(MAX_UNCHANGED < u && u <= MAX_SHORT_CHANGE);
|
||||
int32_t num = (u & SHORT_CHANGE_NUM_MASK) + 1 - remaining;
|
||||
int32_t len = num * spanLength;
|
||||
if (i >= (spanStart - len)) {
|
||||
int32_t n = ((spanStart - i - 1) / spanLength) + 1;
|
||||
// 1 <= n <= num
|
||||
srcIndex -= n * oldLength_;
|
||||
replIndex -= n * newLength_;
|
||||
destIndex -= n * newLength_;
|
||||
remaining += n;
|
||||
return 0;
|
||||
}
|
||||
// Skip all of these edits at once.
|
||||
srcIndex -= num * oldLength_;
|
||||
replIndex -= num * newLength_;
|
||||
destIndex -= num * newLength_;
|
||||
remaining = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reset the iterator to the start.
|
||||
dir = 0;
|
||||
index = remaining = oldLength_ = newLength_ = srcIndex = replIndex = destIndex = 0;
|
||||
} else if (i < (spanStart + spanLength)) {
|
||||
// The index is in the current span.
|
||||
return 0;
|
||||
}
|
||||
while (next(FALSE, errorCode)) {
|
||||
if (findSource) {
|
||||
spanStart = srcIndex;
|
||||
spanLength = oldLength_;
|
||||
} else {
|
||||
spanStart = destIndex;
|
||||
spanLength = newLength_;
|
||||
}
|
||||
if (i < (spanStart + spanLength)) {
|
||||
// The index is in the current span.
|
||||
return 0;
|
||||
}
|
||||
if (remaining > 1) {
|
||||
// Is the index in one of the remaining compressed edits?
|
||||
// spanStart is the start of the current span, first of the remaining ones.
|
||||
int32_t len = remaining * spanLength;
|
||||
if (i < (spanStart + len)) {
|
||||
int32_t n = (i - spanStart) / spanLength; // 1 <= n <= remaining - 1
|
||||
srcIndex += n * oldLength_;
|
||||
replIndex += n * newLength_;
|
||||
destIndex += n * newLength_;
|
||||
remaining -= n;
|
||||
return 0;
|
||||
}
|
||||
// Make next() skip all of these edits at once.
|
||||
oldLength_ *= remaining;
|
||||
newLength_ *= remaining;
|
||||
remaining = 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode &errorCode) {
|
||||
int32_t where = findIndex(i, TRUE, errorCode);
|
||||
if (where < 0) {
|
||||
// Error or before the string.
|
||||
return 0;
|
||||
}
|
||||
if (where > 0 || i == srcIndex) {
|
||||
// At or after string length, or at start of the found span.
|
||||
return destIndex;
|
||||
}
|
||||
if (changed) {
|
||||
// In a change span, map to its end.
|
||||
return destIndex + newLength_;
|
||||
} else {
|
||||
// In an unchanged span, offset 1:1 within it.
|
||||
return destIndex + (i - srcIndex);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t Edits::Iterator::sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode) {
|
||||
int32_t where = findIndex(i, FALSE, errorCode);
|
||||
if (where < 0) {
|
||||
// Error or before the string.
|
||||
return 0;
|
||||
}
|
||||
if (where > 0 || i == destIndex) {
|
||||
// At or after string length, or at start of the found span.
|
||||
return srcIndex;
|
||||
}
|
||||
if (changed) {
|
||||
// In a change span, map to its end.
|
||||
return srcIndex + oldLength_;
|
||||
} else {
|
||||
// In an unchanged span, offset within it.
|
||||
return srcIndex + (i - destIndex);
|
||||
}
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: errorcode.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -694,7 +694,7 @@ FilteredBreakIteratorBuilder::createInstance(const Locale& where, UErrorCode& st
|
||||
}
|
||||
|
||||
FilteredBreakIteratorBuilder *
|
||||
FilteredBreakIteratorBuilder::createInstance(UErrorCode& status) {
|
||||
FilteredBreakIteratorBuilder::createEmptyInstance(UErrorCode& status) {
|
||||
if(U_FAILURE(status)) return NULL;
|
||||
LocalPointer<FilteredBreakIteratorBuilder> ret(new SimpleFilteredBreakIteratorBuilder(status), status);
|
||||
return (U_SUCCESS(status))? ret.orphan(): NULL;
|
||||
@ -702,4 +702,4 @@ FilteredBreakIteratorBuilder::createInstance(UErrorCode& status) {
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif //#if !UCONFIG_NO_BREAK_ITERATION && U_HAVE_STD_STRING && !UCONFIG_NO_FILTERED_BREAK_ITERATION
|
||||
#endif //#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: filterednormalizer2.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -20,7 +20,9 @@
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
|
||||
#include "unicode/edits.h"
|
||||
#include "unicode/normalizer2.h"
|
||||
#include "unicode/stringoptions.h"
|
||||
#include "unicode/uniset.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/unorm.h"
|
||||
@ -85,6 +87,52 @@ FilteredNormalizer2::normalize(const UnicodeString &src,
|
||||
return dest;
|
||||
}
|
||||
|
||||
void
|
||||
FilteredNormalizer2::normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
|
||||
Edits *edits, UErrorCode &errorCode) const {
|
||||
if (U_FAILURE(errorCode)) {
|
||||
return;
|
||||
}
|
||||
if (edits != nullptr && (options & U_EDITS_NO_RESET) == 0) {
|
||||
edits->reset();
|
||||
}
|
||||
options |= U_EDITS_NO_RESET; // Do not reset for each span.
|
||||
normalizeUTF8(options, src.data(), src.length(), sink, edits, USET_SPAN_SIMPLE, errorCode);
|
||||
}
|
||||
|
||||
void
|
||||
FilteredNormalizer2::normalizeUTF8(uint32_t options, const char *src, int32_t length,
|
||||
ByteSink &sink, Edits *edits,
|
||||
USetSpanCondition spanCondition,
|
||||
UErrorCode &errorCode) const {
|
||||
while (length > 0) {
|
||||
int32_t spanLength = set.spanUTF8(src, length, spanCondition);
|
||||
if (spanCondition == USET_SPAN_NOT_CONTAINED) {
|
||||
if (spanLength != 0) {
|
||||
if (edits != nullptr) {
|
||||
edits->addUnchanged(spanLength);
|
||||
}
|
||||
if ((options & U_OMIT_UNCHANGED_TEXT) == 0) {
|
||||
sink.Append(src, spanLength);
|
||||
}
|
||||
}
|
||||
spanCondition = USET_SPAN_SIMPLE;
|
||||
} else {
|
||||
if (spanLength != 0) {
|
||||
// Not norm2.normalizeSecondAndAppend() because we do not want
|
||||
// to modify the non-filter part of dest.
|
||||
norm2.normalizeUTF8(options, StringPiece(src, spanLength), sink, edits, errorCode);
|
||||
if (U_FAILURE(errorCode)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
spanCondition = USET_SPAN_NOT_CONTAINED;
|
||||
}
|
||||
src += spanLength;
|
||||
length -= spanLength;
|
||||
}
|
||||
}
|
||||
|
||||
UnicodeString &
|
||||
FilteredNormalizer2::normalizeSecondAndAppend(UnicodeString &first,
|
||||
const UnicodeString &second,
|
||||
@ -196,6 +244,31 @@ FilteredNormalizer2::isNormalized(const UnicodeString &s, UErrorCode &errorCode)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
UBool
|
||||
FilteredNormalizer2::isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const {
|
||||
if(U_FAILURE(errorCode)) {
|
||||
return FALSE;
|
||||
}
|
||||
const char *s = sp.data();
|
||||
int32_t length = sp.length();
|
||||
USetSpanCondition spanCondition = USET_SPAN_SIMPLE;
|
||||
while (length > 0) {
|
||||
int32_t spanLength = set.spanUTF8(s, length, spanCondition);
|
||||
if (spanCondition == USET_SPAN_NOT_CONTAINED) {
|
||||
spanCondition = USET_SPAN_SIMPLE;
|
||||
} else {
|
||||
if (!norm2.isNormalizedUTF8(StringPiece(s, spanLength), errorCode) ||
|
||||
U_FAILURE(errorCode)) {
|
||||
return FALSE;
|
||||
}
|
||||
spanCondition = USET_SPAN_NOT_CONTAINED;
|
||||
}
|
||||
s += spanLength;
|
||||
length -= spanLength;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
UNormalizationCheckResult
|
||||
FilteredNormalizer2::quickCheck(const UnicodeString &s, UErrorCode &errorCode) const {
|
||||
uprv_checkCanGetBuffer(s, errorCode);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -33,6 +33,8 @@ class U_COMMON_API Hashtable : public UMemory {
|
||||
|
||||
inline void init(UHashFunction *keyHash, UKeyComparator *keyComp, UValueComparator *valueComp, UErrorCode& status);
|
||||
|
||||
inline void initSize(UHashFunction *keyHash, UKeyComparator *keyComp, UValueComparator *valueComp, int32_t size, UErrorCode& status);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Construct a hashtable
|
||||
@ -41,6 +43,14 @@ public:
|
||||
*/
|
||||
Hashtable(UBool ignoreKeyCase, UErrorCode& status);
|
||||
|
||||
/**
|
||||
* Construct a hashtable
|
||||
* @param ignoreKeyCase If true, keys are case insensitive.
|
||||
* @param size initial size allocation
|
||||
* @param status Error code
|
||||
*/
|
||||
Hashtable(UBool ignoreKeyCase, int32_t size, UErrorCode& status);
|
||||
|
||||
/**
|
||||
* Construct a hashtable
|
||||
* @param keyComp Comparator for comparing the keys
|
||||
@ -76,9 +86,9 @@ public:
|
||||
int32_t puti(const UnicodeString& key, int32_t value, UErrorCode& status);
|
||||
|
||||
void* get(const UnicodeString& key) const;
|
||||
|
||||
|
||||
int32_t geti(const UnicodeString& key) const;
|
||||
|
||||
|
||||
void* remove(const UnicodeString& key);
|
||||
|
||||
int32_t removei(const UnicodeString& key);
|
||||
@ -92,9 +102,9 @@ public:
|
||||
* @see uhash_nextElement
|
||||
*/
|
||||
const UHashElement* nextElement(int32_t& pos) const;
|
||||
|
||||
|
||||
UKeyComparator* setKeyComparator(UKeyComparator*keyComp);
|
||||
|
||||
|
||||
UValueComparator* setValueComparator(UValueComparator* valueComp);
|
||||
|
||||
UBool equals(const Hashtable& that) const;
|
||||
@ -107,7 +117,7 @@ private:
|
||||
* Implementation
|
||||
********************************************************************/
|
||||
|
||||
inline void Hashtable::init(UHashFunction *keyHash, UKeyComparator *keyComp,
|
||||
inline void Hashtable::init(UHashFunction *keyHash, UKeyComparator *keyComp,
|
||||
UValueComparator *valueComp, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
@ -119,10 +129,23 @@ inline void Hashtable::init(UHashFunction *keyHash, UKeyComparator *keyComp,
|
||||
}
|
||||
}
|
||||
|
||||
inline Hashtable::Hashtable(UKeyComparator *keyComp, UValueComparator *valueComp,
|
||||
inline void Hashtable::initSize(UHashFunction *keyHash, UKeyComparator *keyComp,
|
||||
UValueComparator *valueComp, int32_t size, UErrorCode& status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
uhash_initSize(&hashObj, keyHash, keyComp, valueComp, size, &status);
|
||||
if (U_SUCCESS(status)) {
|
||||
hash = &hashObj;
|
||||
uhash_setKeyDeleter(hash, uprv_deleteUObject);
|
||||
}
|
||||
}
|
||||
|
||||
inline Hashtable::Hashtable(UKeyComparator *keyComp, UValueComparator *valueComp,
|
||||
UErrorCode& status) : hash(0) {
|
||||
init( uhash_hashUnicodeString, keyComp, valueComp, status);
|
||||
}
|
||||
|
||||
inline Hashtable::Hashtable(UBool ignoreKeyCase, UErrorCode& status)
|
||||
: hash(0)
|
||||
{
|
||||
@ -134,6 +157,17 @@ inline Hashtable::Hashtable(UBool ignoreKeyCase, UErrorCode& status)
|
||||
status);
|
||||
}
|
||||
|
||||
inline Hashtable::Hashtable(UBool ignoreKeyCase, int32_t size, UErrorCode& status)
|
||||
: hash(0)
|
||||
{
|
||||
initSize(ignoreKeyCase ? uhash_hashCaselessUnicodeString
|
||||
: uhash_hashUnicodeString,
|
||||
ignoreKeyCase ? uhash_compareCaselessUnicodeString
|
||||
: uhash_compareUnicodeString,
|
||||
NULL, size,
|
||||
status);
|
||||
}
|
||||
|
||||
inline Hashtable::Hashtable(UErrorCode& status)
|
||||
: hash(0)
|
||||
{
|
||||
@ -200,7 +234,7 @@ inline void Hashtable::removeAll(void) {
|
||||
inline UKeyComparator* Hashtable::setKeyComparator(UKeyComparator*keyComp){
|
||||
return uhash_setKeyComparator(hash, keyComp);
|
||||
}
|
||||
|
||||
|
||||
inline UValueComparator* Hashtable::setValueComparator(UValueComparator* valueComp){
|
||||
return uhash_setValueComparator(hash, valueComp);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: listformatter.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -25,6 +25,7 @@
|
||||
#include "charstr.h"
|
||||
#include "ucln_cmn.h"
|
||||
#include "uresimp.h"
|
||||
#include "resource.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
@ -62,7 +63,7 @@ ListFormatInternal(const ListFormatInternal &other) :
|
||||
|
||||
static Hashtable* listPatternHash = NULL;
|
||||
static UMutex listFormatterMutex = U_MUTEX_INITIALIZER;
|
||||
static const char *STANDARD_STYLE = "standard";
|
||||
static const char STANDARD_STYLE[] = "standard";
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static UBool U_CALLCONV uprv_listformatter_cleanup() {
|
||||
@ -78,17 +79,6 @@ uprv_deleteListFormatInternal(void *obj) {
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
static ListFormatInternal* loadListFormatInternal(
|
||||
const Locale& locale,
|
||||
const char* style,
|
||||
UErrorCode& errorCode);
|
||||
|
||||
static void getStringByKey(
|
||||
const UResourceBundle* rb,
|
||||
const char* key,
|
||||
UnicodeString& result,
|
||||
UErrorCode& errorCode);
|
||||
|
||||
ListFormatter::ListFormatter(const ListFormatter& other) :
|
||||
owned(other.owned), data(other.data) {
|
||||
if (other.owned != NULL) {
|
||||
@ -171,30 +161,107 @@ const ListFormatInternal* ListFormatter::getListFormatInternal(
|
||||
return result;
|
||||
}
|
||||
|
||||
static ListFormatInternal* loadListFormatInternal(
|
||||
static const UChar solidus = 0x2F;
|
||||
static const UChar 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
|
||||
};
|
||||
|
||||
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) {
|
||||
int32_t startIndex = alias.indexOf(aliasPrefix, kAliasPrefixLen, 0);
|
||||
if (startIndex < 0) {
|
||||
return;
|
||||
}
|
||||
startIndex += kAliasPrefixLen;
|
||||
int32_t endIndex = alias.indexOf(solidus, startIndex);
|
||||
if (endIndex < 0) {
|
||||
endIndex = alias.length();
|
||||
}
|
||||
alias.extract(startIndex, endIndex-startIndex, aliasedStyle, kStyleLenMax+1, US_INV);
|
||||
aliasedStyle[kStyleLenMax] = 0;
|
||||
}
|
||||
|
||||
void handleValueForPattern(ResourceValue &value, UnicodeString &pattern, UErrorCode &errorCode) {
|
||||
if (pattern.isEmpty()) {
|
||||
if (value.getType() == URES_ALIAS) {
|
||||
if (aliasedStyle[0] == 0) {
|
||||
setAliasedStyle(value.getAliasUnicodeString(errorCode));
|
||||
}
|
||||
} else {
|
||||
pattern = value.getUnicodeString(errorCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
|
||||
UErrorCode &errorCode) {
|
||||
aliasedStyle[0] = 0;
|
||||
if (value.getType() == URES_ALIAS) {
|
||||
setAliasedStyle(value.getAliasUnicodeString(errorCode));
|
||||
return;
|
||||
}
|
||||
ResourceTable listPatterns = value.getTable(errorCode);
|
||||
for (int i = 0; U_SUCCESS(errorCode) && listPatterns.getKeyAndValue(i, key, value); ++i) {
|
||||
if (uprv_strcmp(key, "2") == 0) {
|
||||
handleValueForPattern(value, two, errorCode);
|
||||
} else if (uprv_strcmp(key, "end") == 0) {
|
||||
handleValueForPattern(value, end, errorCode);
|
||||
} else if (uprv_strcmp(key, "middle") == 0) {
|
||||
handleValueForPattern(value, middle, errorCode);
|
||||
} else if (uprv_strcmp(key, "start") == 0) {
|
||||
handleValueForPattern(value, start, errorCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Virtual destructors must be defined out of line.
|
||||
ListFormatter::ListPatternsSink::~ListPatternsSink() {}
|
||||
|
||||
ListFormatInternal* ListFormatter::loadListFormatInternal(
|
||||
const Locale& locale, const char * style, UErrorCode& errorCode) {
|
||||
UResourceBundle* rb = ures_open(NULL, locale.getName(), &errorCode);
|
||||
if (U_FAILURE(errorCode)) {
|
||||
ures_close(rb);
|
||||
return NULL;
|
||||
}
|
||||
rb = ures_getByKeyWithFallback(rb, "listPattern", rb, &errorCode);
|
||||
rb = ures_getByKeyWithFallback(rb, style, rb, &errorCode);
|
||||
|
||||
if (U_FAILURE(errorCode)) {
|
||||
ures_close(rb);
|
||||
return NULL;
|
||||
}
|
||||
UnicodeString two, start, middle, end;
|
||||
getStringByKey(rb, "2", two, errorCode);
|
||||
getStringByKey(rb, "start", start, errorCode);
|
||||
getStringByKey(rb, "middle", middle, errorCode);
|
||||
getStringByKey(rb, "end", end, errorCode);
|
||||
ListFormatter::ListPatternsSink sink;
|
||||
char currentStyle[kStyleLenMax+1];
|
||||
uprv_strncpy(currentStyle, style, kStyleLenMax);
|
||||
currentStyle[kStyleLenMax] = 0;
|
||||
|
||||
for (;;) {
|
||||
ures_getAllItemsWithFallback(rb, currentStyle, sink, errorCode);
|
||||
if (U_FAILURE(errorCode) || sink.aliasedStyle[0] == 0 || uprv_strcmp(currentStyle, sink.aliasedStyle) == 0) {
|
||||
break;
|
||||
}
|
||||
uprv_strcpy(currentStyle, sink.aliasedStyle);
|
||||
}
|
||||
ures_close(rb);
|
||||
if (U_FAILURE(errorCode)) {
|
||||
return NULL;
|
||||
}
|
||||
ListFormatInternal* result = new ListFormatInternal(two, start, middle, end, errorCode);
|
||||
if (sink.two.isEmpty() || sink.start.isEmpty() || sink.middle.isEmpty() || sink.end.isEmpty()) {
|
||||
errorCode = U_MISSING_RESOURCE_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
ListFormatInternal* result = new ListFormatInternal(sink.two, sink.start, sink.middle, sink.end, errorCode);
|
||||
if (result == NULL) {
|
||||
errorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
@ -206,15 +273,6 @@ static ListFormatInternal* loadListFormatInternal(
|
||||
return result;
|
||||
}
|
||||
|
||||
static void getStringByKey(const UResourceBundle* rb, const char* key, UnicodeString& result, UErrorCode& errorCode) {
|
||||
int32_t len;
|
||||
const UChar* ustr = ures_getStringByKeyWithFallback(rb, key, &len, &errorCode);
|
||||
if (U_FAILURE(errorCode)) {
|
||||
return;
|
||||
}
|
||||
result.setTo(ustr, len);
|
||||
}
|
||||
|
||||
ListFormatter* ListFormatter::createInstance(UErrorCode& errorCode) {
|
||||
Locale locale; // The default locale.
|
||||
return createInstance(locale, errorCode);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -62,7 +62,7 @@ LoadedNormalizer2Impl::isAcceptable(void * /*context*/,
|
||||
pInfo->dataFormat[1]==0x72 &&
|
||||
pInfo->dataFormat[2]==0x6d &&
|
||||
pInfo->dataFormat[3]==0x32 &&
|
||||
pInfo->formatVersion[0]==2
|
||||
pInfo->formatVersion[0]==3
|
||||
) {
|
||||
// Normalizer2Impl *me=(Normalizer2Impl *)context;
|
||||
// uprv_memcpy(me->dataVersion, pInfo->dataVersion, 4);
|
||||
@ -84,7 +84,7 @@ LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCod
|
||||
const uint8_t *inBytes=(const uint8_t *)udata_getMemory(memory);
|
||||
const int32_t *inIndexes=(const int32_t *)inBytes;
|
||||
int32_t indexesLength=inIndexes[IX_NORM_TRIE_OFFSET]/4;
|
||||
if(indexesLength<=IX_MIN_MAYBE_YES) {
|
||||
if(indexesLength<=IX_MIN_LCCC_CP) {
|
||||
errorCode=U_INVALID_FORMAT_ERROR; // Not enough indexes.
|
||||
return;
|
||||
}
|
||||
@ -232,6 +232,7 @@ Normalizer2::getInstance(const char *packageName,
|
||||
}
|
||||
}
|
||||
if(allModes==NULL) {
|
||||
ucln_common_registerCleanup(UCLN_COMMON_LOADED_NORMALIZER2, uprv_loaded_normalizer2_cleanup);
|
||||
LocalPointer<Norm2AllModes> localAllModes(
|
||||
Norm2AllModes::createInstance(packageName, name, errorCode));
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
***************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: locavailable.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -35,7 +35,7 @@ U_NAMESPACE_BEGIN
|
||||
|
||||
static icu::Locale* availableLocaleList = NULL;
|
||||
static int32_t availableLocaleListCount;
|
||||
static icu::UInitOnce gInitOnce = U_INITONCE_INITIALIZER;
|
||||
static icu::UInitOnce gInitOnceLocale = U_INITONCE_INITIALIZER;
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
@ -50,7 +50,7 @@ static UBool U_CALLCONV locale_available_cleanup(void)
|
||||
availableLocaleList = NULL;
|
||||
}
|
||||
availableLocaleListCount = 0;
|
||||
gInitOnce.reset();
|
||||
gInitOnceLocale.reset();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -81,7 +81,7 @@ void U_CALLCONV locale_available_init() {
|
||||
const Locale* U_EXPORT2
|
||||
Locale::getAvailableLocales(int32_t& count)
|
||||
{
|
||||
umtx_initOnce(gInitOnce, &locale_available_init);
|
||||
umtx_initOnce(gInitOnceLocale, &locale_available_init);
|
||||
count = availableLocaleListCount;
|
||||
return availableLocaleList;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: locdispnames.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -542,7 +542,7 @@ uloc_getDisplayName(const char *locale,
|
||||
return 0;
|
||||
}
|
||||
separator = (const UChar *)p0 + subLen;
|
||||
sepLen = p1 - separator;
|
||||
sepLen = static_cast<int32_t>(p1 - separator);
|
||||
}
|
||||
|
||||
if(patLen==0 || (patLen==defaultPatLen && !u_strncmp(pattern, defaultPattern, patLen))) {
|
||||
@ -558,8 +558,8 @@ uloc_getDisplayName(const char *locale,
|
||||
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
}
|
||||
sub0Pos=p0-pattern;
|
||||
sub1Pos=p1-pattern;
|
||||
sub0Pos = static_cast<int32_t>(p0-pattern);
|
||||
sub1Pos = static_cast<int32_t>(p1-pattern);
|
||||
if (sub1Pos < sub0Pos) { /* a very odd pattern */
|
||||
int32_t t=sub0Pos; sub0Pos=sub1Pos; sub1Pos=t;
|
||||
langi=1;
|
||||
@ -821,6 +821,8 @@ uloc_getDisplayKeywordValue( const char* locale,
|
||||
/* get the keyword value */
|
||||
keywordValue[0]=0;
|
||||
keywordValueLen = uloc_getKeywordValue(locale, keyword, keywordValue, capacity, status);
|
||||
if (*status == U_STRING_NOT_TERMINATED_WARNING)
|
||||
*status = U_BUFFER_OVERFLOW_ERROR;
|
||||
|
||||
/*
|
||||
* if the keyword is equal to currency .. then to get the display name
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
#include "unicode/locdspnm.h"
|
||||
#include "unicode/simpleformatter.h"
|
||||
#include "unicode/ucasemap.h"
|
||||
#include "unicode/ures.h"
|
||||
#include "unicode/udisplaycontext.h"
|
||||
#include "unicode/brkiter.h"
|
||||
@ -53,7 +54,7 @@ static int32_t ncat(char *buffer, uint32_t buflen, ...) {
|
||||
*p = 0;
|
||||
va_end(args);
|
||||
|
||||
return p - buffer;
|
||||
return static_cast<int32_t>(p - buffer);
|
||||
}
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
@ -635,8 +636,9 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& locale,
|
||||
char value[ULOC_KEYWORD_AND_VALUES_CAPACITY]; // sigh, no ULOC_VALUE_CAPACITY
|
||||
const char* key;
|
||||
while ((key = e->next((int32_t *)0, status)) != NULL) {
|
||||
value[0] = 0;
|
||||
locale.getKeywordValue(key, value, ULOC_KEYWORD_AND_VALUES_CAPACITY, status);
|
||||
if (U_FAILURE(status)) {
|
||||
if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) {
|
||||
return result;
|
||||
}
|
||||
keyDisplayName(key, temp, TRUE);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
@ -33,6 +33,7 @@
|
||||
|
||||
|
||||
#include "unicode/locid.h"
|
||||
#include "unicode/strenum.h"
|
||||
#include "unicode/uloc.h"
|
||||
#include "putilimp.h"
|
||||
#include "mutex.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: loclikely.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -22,6 +22,7 @@
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/locid.h"
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/uchar.h"
|
||||
#include "unicode/uloc.h"
|
||||
#include "unicode/ures.h"
|
||||
#include "unicode/uscript.h"
|
||||
@ -510,7 +511,7 @@ parseTagString(
|
||||
unknownLanguage);
|
||||
*langLength = (int32_t)uprv_strlen(lang);
|
||||
}
|
||||
else if (_isIDSeparator(*position)) {
|
||||
if (_isIDSeparator(*position)) {
|
||||
++position;
|
||||
}
|
||||
|
||||
@ -1280,7 +1281,7 @@ uloc_minimizeSubtags(const char* localeID,
|
||||
|
||||
// Pairs of (language subtag, + or -) for finding out fast if common languages
|
||||
// are LTR (minus) or RTL (plus).
|
||||
static const char* LANG_DIR_STRING =
|
||||
static const char LANG_DIR_STRING[] =
|
||||
"root-en-es-pt-zh-ja-ko-de-fr-it-ar+he+fa+ru-nl-pl-th-tr-";
|
||||
|
||||
// Implemented here because this calls uloc_addLikelySubtags().
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
@ -30,6 +30,7 @@
|
||||
#include "locmap.h"
|
||||
#include "cstring.h"
|
||||
#include "cmemory.h"
|
||||
#include "unicode/uloc.h"
|
||||
|
||||
#if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
/*
|
||||
@ -40,10 +41,7 @@
|
||||
* We might need to #include some Windows header and test for some version macro from there.
|
||||
* Or call some Windows function and see what it returns.
|
||||
*/
|
||||
#define USE_WINDOWS_LOCALE_API
|
||||
#endif
|
||||
|
||||
#ifdef USE_WINDOWS_LOCALE_API
|
||||
#define USE_WINDOWS_LCID_MAPPING_API
|
||||
#include <windows.h>
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
@ -53,8 +51,8 @@
|
||||
* The mapping from Win32 locale ID numbers to POSIX locale strings should
|
||||
* be the faster one.
|
||||
*
|
||||
* Many LCID values come from winnt.h
|
||||
* Some also come from http://www.microsoft.com/globaldev/reference/lcid-all.mspx
|
||||
* Windows LCIDs are defined at https://msdn.microsoft.com/en-us/library/cc233965.aspx
|
||||
* [MS-LCID] Windows Language Code Identifier (LCID) Reference
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -126,7 +124,9 @@ static const ILcidPosixElement locmap_ ## id [] =
|
||||
// Keep static locale variables inside the function so that
|
||||
// it can be created properly during static init.
|
||||
//
|
||||
// Note: This table should be updated periodically. Check the National Lanaguage Support API Reference Website.
|
||||
// Note: This table should be updated periodically. Check the [MS-LCID] Windows Language Code Identifier
|
||||
// (LCID) Reference defined at https://msdn.microsoft.com/en-us/library/cc233965.aspx
|
||||
//
|
||||
// Microsoft is moving away from LCID in favor of locale name as of Vista. This table needs to be
|
||||
// maintained for support of older Windows version.
|
||||
// Update: Windows 7 (091130)
|
||||
@ -138,6 +138,9 @@ static const ILcidPosixElement locmap_ ## id [] =
|
||||
////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
// TODO: For Windows ideally this table would be a list of exceptions rather than a complete list as
|
||||
// LocaleNameToLCID and LCIDToLocaleName provide 90% of these.
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0436, af, af_ZA)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(ar) {
|
||||
@ -187,7 +190,10 @@ ILCID_POSIX_ELEMENT_ARRAY(0x0423, be, be_BY)
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0402, bg, bg_BG)
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0466, bin, bin_NG)
|
||||
ILCID_POSIX_SUBTABLE(bin) {
|
||||
{0x66, "bin"},
|
||||
{0x0466, "bin_NG"}
|
||||
};
|
||||
|
||||
ILCID_POSIX_SUBTABLE(bn) {
|
||||
{0x45, "bn"},
|
||||
@ -211,8 +217,15 @@ ILCID_POSIX_SUBTABLE(ca) {
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0483, co, co_FR)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x045c, chr,chr_US)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(chr) {
|
||||
{0x05c, "chr"},
|
||||
{0x7c5c, "chr_Cher"},
|
||||
{0x045c, "chr_Cher_US"},
|
||||
{0x045c, "chr_US"}
|
||||
};
|
||||
|
||||
// ICU has chosen different names for these.
|
||||
ILCID_POSIX_SUBTABLE(ckb) {
|
||||
{0x92, "ckb"},
|
||||
{0x7c92, "ckb_Arab"},
|
||||
@ -225,6 +238,7 @@ ILCID_POSIX_ELEMENT_ARRAY(0x0405, cs, cs_CZ)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0452, cy, cy_GB)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0406, da, da_DK)
|
||||
|
||||
// Windows doesn't know POSIX or BCP47 Unicode phonebook sort names
|
||||
ILCID_POSIX_SUBTABLE(de) {
|
||||
{0x07, "de"},
|
||||
{0x0c07, "de_AT"},
|
||||
@ -239,6 +253,7 @@ ILCID_POSIX_SUBTABLE(de) {
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0465, dv, dv_MV)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0408, el, el_GR)
|
||||
|
||||
// Windows uses an empty string for 'invariant'
|
||||
ILCID_POSIX_SUBTABLE(en) {
|
||||
{0x09, "en"},
|
||||
{0x0c09, "en_AU"},
|
||||
@ -256,22 +271,23 @@ ILCID_POSIX_SUBTABLE(en) {
|
||||
{0x4809, "en_SG"},
|
||||
{0x2C09, "en_TT"},
|
||||
{0x0409, "en_US"},
|
||||
{0x007f, "en_US_POSIX"}, /* duplicate for roundtripping */
|
||||
{0x2409, "en_VI"}, /* Virgin Islands AKA Caribbean Islands (en_CB). */
|
||||
{0x007f, "en_US_POSIX"}, /* duplicate for round-tripping */
|
||||
{0x2409, "en_029"},
|
||||
{0x1c09, "en_ZA"},
|
||||
{0x3009, "en_ZW"},
|
||||
{0x2409, "en_029"},
|
||||
{0x0409, "en_AS"}, /* Alias for en_US. Leave last. */
|
||||
{0x0409, "en_GU"}, /* Alias for en_US. Leave last. */
|
||||
{0x0409, "en_MH"}, /* Alias for en_US. Leave last. */
|
||||
{0x0409, "en_MP"}, /* Alias for en_US. Leave last. */
|
||||
{0x0409, "en_UM"} /* Alias for en_US. Leave last. */
|
||||
{0x2409, "en_VI"}, /* Virgin Islands AKA Caribbean Islands (en_CB). On Windows8+ This is 0x1000 or dynamically assigned */
|
||||
{0x0409, "en_AS"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
|
||||
{0x0409, "en_GU"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
|
||||
{0x0409, "en_MH"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
|
||||
{0x0409, "en_MP"}, /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
|
||||
{0x0409, "en_UM"} /* Alias for en_US. Leave last. On Windows8+ This is 0x1000 or dynamically assigned */
|
||||
};
|
||||
|
||||
ILCID_POSIX_SUBTABLE(en_US_POSIX) {
|
||||
{0x007f, "en_US_POSIX"} /* duplicate for roundtripping */
|
||||
};
|
||||
|
||||
// Windows doesn't know POSIX or BCP47 Unicode traditional sort names
|
||||
ILCID_POSIX_SUBTABLE(es) {
|
||||
{0x0a, "es"},
|
||||
{0x2c0a, "es_AR"},
|
||||
@ -297,7 +313,7 @@ ILCID_POSIX_SUBTABLE(es) {
|
||||
{0x200a, "es_VE"},
|
||||
{0x580a, "es_419"},
|
||||
{0x040a, "es_ES@collation=traditional"},
|
||||
{0x040a, "es@collation=traditional"}
|
||||
{0x040a, "es@collation=traditional"} // Windows will treat this as es-ES@collation=traditional
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0425, et, et_EE)
|
||||
@ -310,6 +326,7 @@ ILCID_POSIX_SUBTABLE(fa) {
|
||||
{0x048c, "fa_AF"} /* Persian/Dari (Afghanistan) */
|
||||
};
|
||||
|
||||
|
||||
/* duplicate for roundtripping */
|
||||
ILCID_POSIX_SUBTABLE(fa_AF) {
|
||||
{0x8c, "fa_AF"}, /* Persian/Dari (Afghanistan) */
|
||||
@ -411,7 +428,12 @@ ILCID_POSIX_SUBTABLE(hsb) {
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x040e, hu, hu_HU)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x042b, hy, hy_AM)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0469, ibb, ibb_NG)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(ibb) {
|
||||
{0x69, "ibb"},
|
||||
{0x0469, "ibb_NG"}
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0421, id, id_ID)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0470, ig, ig_NG)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0478, ii, ii_CN)
|
||||
@ -450,13 +472,18 @@ ILCID_POSIX_ELEMENT_ARRAY(0x0471, kr, kr_NG)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(ks) { /* We could add PK and CN too */
|
||||
{0x60, "ks"},
|
||||
{0x0860, "ks_IN"}, /* Documentation doesn't mention script */
|
||||
{0x0460, "ks_Arab_IN"},
|
||||
{0x0860, "ks_Deva_IN"}
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0440, ky, ky_KG) /* Kyrgyz is spoken in Kyrgyzstan */
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0476, la, la_IT) /* TODO: Verify the country */
|
||||
|
||||
ILCID_POSIX_SUBTABLE(la) {
|
||||
{0x76, "la"},
|
||||
{0x0476, "la_001"},
|
||||
{0x0476, "la_IT"} /*Left in for compatibility*/
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x046e, lb, lb_LU)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0454, lo, lo_LA)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0427, lt, lt_LT)
|
||||
@ -501,8 +528,9 @@ ILCID_POSIX_SUBTABLE(nl) {
|
||||
};
|
||||
|
||||
/* The "no" locale split into nb and nn. By default in ICU, "no" is nb.*/
|
||||
// TODO: Not all of these are needed on Windows, but I don't know how ICU treats preferred ones here.
|
||||
ILCID_POSIX_SUBTABLE(no) {
|
||||
{0x14, "no"}, /* really nb_NO */
|
||||
{0x14, "no"}, /* really nb_NO - actually Windows differentiates between neutral (no region) and specific (with region) */
|
||||
{0x7c14, "nb"}, /* really nb */
|
||||
{0x0414, "nb_NO"}, /* really nb_NO. Keep first in the 414 list. */
|
||||
{0x0414, "no_NO"}, /* really nb_NO */
|
||||
@ -526,15 +554,19 @@ ILCID_POSIX_SUBTABLE(or_IN) {
|
||||
{0x0448, "or_IN"},
|
||||
};
|
||||
|
||||
|
||||
ILCID_POSIX_SUBTABLE(pa) {
|
||||
{0x46, "pa"},
|
||||
{0x0446, "pa_IN"},
|
||||
{0x0846, "pa_PK"},
|
||||
{0x0846, "pa_Arab_PK"}
|
||||
{0x0846, "pa_Arab_PK"},
|
||||
{0x0846, "pa_PK"}
|
||||
};
|
||||
|
||||
ILCID_POSIX_SUBTABLE(pap) {
|
||||
{0x79, "pap"},
|
||||
{0x0479, "pap_029"},
|
||||
{0x0479, "pap_AN"} /*Left in for compatibility*/
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0479, pap, pap_AN)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0415, pl, pl_PL)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0463, ps, ps_AF)
|
||||
|
||||
@ -591,6 +623,9 @@ ILCID_POSIX_SUBTABLE(ro) {
|
||||
{0x0818, "ro_MD"}
|
||||
};
|
||||
|
||||
// TODO: This is almost certainly 'wrong'. 0 in Windows is a synonym for LOCALE_USER_DEFAULT.
|
||||
// More likely this is a similar concept to the Windows 0x7f Invariant locale ""
|
||||
// (Except that it's not invariant in ICU)
|
||||
ILCID_POSIX_SUBTABLE(root) {
|
||||
{0x00, "root"}
|
||||
};
|
||||
@ -607,9 +642,11 @@ ILCID_POSIX_ELEMENT_ARRAY(0x0485, sah,sah_RU)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(sd) {
|
||||
{0x59, "sd"},
|
||||
{0x0459, "sd_IN"},
|
||||
{0x0459, "sd_Deva_IN"},
|
||||
{0x0859, "sd_PK"}
|
||||
{0x0459, "sd_IN"},
|
||||
{0x0859, "sd_Arab_PK"},
|
||||
{0x0859, "sd_PK"},
|
||||
{0x7c59, "sd_Arab"}
|
||||
};
|
||||
|
||||
ILCID_POSIX_SUBTABLE(se) {
|
||||
@ -633,9 +670,8 @@ ILCID_POSIX_ELEMENT_ARRAY(0x045b, si, si_LK)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x041b, sk, sk_SK)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0424, sl, sl_SI)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(so) { /* TODO: Verify the country */
|
||||
ILCID_POSIX_SUBTABLE(so) {
|
||||
{0x77, "so"},
|
||||
{0x0477, "so_ET"},
|
||||
{0x0477, "so_SO"}
|
||||
};
|
||||
|
||||
@ -727,9 +763,16 @@ ILCID_POSIX_SUBTABLE(ve) { /* TODO: Verify the country */
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x042a, vi, vi_VN)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0488, wo, wo_SN)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0434, xh, xh_ZA)
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x043d, yi, yi)
|
||||
|
||||
ILCID_POSIX_SUBTABLE(yi) {
|
||||
{0x003d, "yi"},
|
||||
{0x043d, "yi_001"}
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x046a, yo, yo_NG)
|
||||
|
||||
// Windows & ICU tend to different names for some of these
|
||||
// TODO: Windows probably does not need all of these entries, but I don't know how the precedence works.
|
||||
ILCID_POSIX_SUBTABLE(zh) {
|
||||
{0x0004, "zh_Hans"},
|
||||
{0x7804, "zh"},
|
||||
@ -753,6 +796,7 @@ ILCID_POSIX_SUBTABLE(zh) {
|
||||
{0x20804,"zh_Hans@collation=stroke"},
|
||||
{0x20804,"zh_Hans_CN@collation=stroke"},
|
||||
{0x20804,"zh_CN@collation=stroke"}
|
||||
// TODO: Alternate collations for other LCIDs are missing, eg: 0x50804
|
||||
};
|
||||
|
||||
ILCID_POSIX_ELEMENT_ARRAY(0x0435, zu, zu_ZA)
|
||||
@ -991,7 +1035,7 @@ getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
|
||||
//
|
||||
/////////////////////////////////////
|
||||
*/
|
||||
#ifdef USE_WINDOWS_LOCALE_API
|
||||
#ifdef USE_WINDOWS_LCID_MAPPING_API
|
||||
/*
|
||||
* Various language tags needs to be changed:
|
||||
* quz -> qu
|
||||
@ -1017,43 +1061,57 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
|
||||
UBool bLookup = TRUE;
|
||||
const char *pPosixID = NULL;
|
||||
|
||||
#ifdef USE_WINDOWS_LOCALE_API
|
||||
#ifdef USE_WINDOWS_LCID_MAPPING_API
|
||||
char locName[LOCALE_NAME_MAX_LENGTH] = {}; // ICU name can't be longer than Windows name
|
||||
|
||||
// Note: Windows primary lang ID 0x92 in LCID is used for Central Kurdish and
|
||||
// GetLocaleInfo() maps such LCID to "ku". However, CLDR uses "ku" for
|
||||
// Northern Kurdish and "ckb" for Central Kurdish. For this reason, we cannot
|
||||
// use the Windows API to resolve locale ID for this specific case.
|
||||
if ((hostid & 0x3FF) != 0x92) {
|
||||
int32_t tmpLen = 0;
|
||||
char locName[157]; /* ULOC_FULLNAME_CAPACITY */
|
||||
UChar windowsLocaleName[LOCALE_NAME_MAX_LENGTH]; // ULOC_FULLNAME_CAPACITY > LOCALE_NAME_MAX_LENGTH
|
||||
|
||||
tmpLen = GetLocaleInfoA(hostid, LOCALE_SNAME, (LPSTR)locName, UPRV_LENGTHOF(locName));
|
||||
// Note: LOCALE_ALLOW_NEUTRAL_NAMES was enabled in Windows7+, prior versions did not handle neutral (no-region) locale names.
|
||||
tmpLen = LCIDToLocaleName(hostid, (PWSTR)windowsLocaleName, UPRV_LENGTHOF(windowsLocaleName), LOCALE_ALLOW_NEUTRAL_NAMES);
|
||||
if (tmpLen > 1) {
|
||||
/* Windows locale name may contain sorting variant, such as "es-ES_tradnl".
|
||||
In such case, we need special mapping data found in the hardcoded table
|
||||
in this source file. */
|
||||
char *p = uprv_strchr(locName, '_');
|
||||
if (p) {
|
||||
/* Keep the base locale, without variant */
|
||||
*p = 0;
|
||||
tmpLen = uprv_strlen(locName);
|
||||
}
|
||||
else {
|
||||
/* No hardcoded table lookup necessary */
|
||||
bLookup = FALSE;
|
||||
}
|
||||
/* Change the tag separator from '-' to '_' */
|
||||
p = locName;
|
||||
while (*p) {
|
||||
if (*p == '-') {
|
||||
*p = '_';
|
||||
int32_t i = 0;
|
||||
// Only need to look up in table if have _, eg for de-de_phoneb type alternate sort.
|
||||
bLookup = FALSE;
|
||||
for (i = 0; i < UPRV_LENGTHOF(locName); i++)
|
||||
{
|
||||
locName[i] = (char)(windowsLocaleName[i]);
|
||||
|
||||
// Windows locale name may contain sorting variant, such as "es-ES_tradnl".
|
||||
// In such cases, we need special mapping data found in the hardcoded table
|
||||
// in this source file.
|
||||
if (windowsLocaleName[i] == L'_')
|
||||
{
|
||||
// Keep the base locale, without variant
|
||||
// TODO: Should these be mapped from _phoneb to @collation=phonebook, etc.?
|
||||
locName[i] = '\0';
|
||||
tmpLen = i;
|
||||
bLookup = TRUE;
|
||||
break;
|
||||
}
|
||||
else if (windowsLocaleName[i] == L'-')
|
||||
{
|
||||
// Windows names use -, ICU uses _
|
||||
locName[i] = '_';
|
||||
}
|
||||
else if (windowsLocaleName[i] == L'\0')
|
||||
{
|
||||
// No point in doing more work than necessary
|
||||
break;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
// TODO: Need to understand this better, why isn't it an alias?
|
||||
FIX_LANGUAGE_ID_TAG(locName, tmpLen);
|
||||
pPosixID = locName;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // USE_WINDOWS_LCID_MAPPING_API
|
||||
|
||||
if (bLookup) {
|
||||
const char *pCandidate = NULL;
|
||||
langID = LANGUAGE_LCID(hostid);
|
||||
@ -1074,7 +1132,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
|
||||
}
|
||||
|
||||
if (pPosixID) {
|
||||
int32_t resLen = uprv_strlen(pPosixID);
|
||||
int32_t resLen = static_cast<int32_t>(uprv_strlen(pPosixID));
|
||||
int32_t copyLen = resLen <= posixIDCapacity ? resLen : posixIDCapacity;
|
||||
uprv_memcpy(posixID, pPosixID, copyLen);
|
||||
if (resLen < posixIDCapacity) {
|
||||
@ -1101,15 +1159,103 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr
|
||||
// POSIX --> LCID
|
||||
// This should only be called from uloc_getLCID.
|
||||
// The locale ID must be in canonical form.
|
||||
// langID is separate so that this file doesn't depend on the uloc_* API.
|
||||
//
|
||||
/////////////////////////////////////
|
||||
*/
|
||||
U_CAPI uint32_t
|
||||
uprv_convertToLCIDPlatform(const char* localeID)
|
||||
{
|
||||
// The purpose of this function is to leverage native platform name->lcid
|
||||
// conversion functionality when available.
|
||||
#ifdef USE_WINDOWS_LCID_MAPPING_API
|
||||
DWORD nameLCIDFlags = 0;
|
||||
UErrorCode myStatus = U_ZERO_ERROR;
|
||||
|
||||
// First check for a Windows name->LCID match, fall through to catch
|
||||
// ICU special cases, but Windows may know it already.
|
||||
#if LOCALE_ALLOW_NEUTRAL_NAMES
|
||||
nameLCIDFlags = LOCALE_ALLOW_NEUTRAL_NAMES;
|
||||
#endif /* LOCALE_ALLOW_NEUTRAL_NAMES */
|
||||
|
||||
int32_t len;
|
||||
char collVal[ULOC_KEYWORDS_CAPACITY] = {};
|
||||
char baseName[ULOC_FULLNAME_CAPACITY] = {};
|
||||
const char * mylocaleID = localeID;
|
||||
|
||||
// Check any for keywords.
|
||||
if (uprv_strchr(localeID, '@'))
|
||||
{
|
||||
len = uloc_getKeywordValue(localeID, "collation", collVal, UPRV_LENGTHOF(collVal) - 1, &myStatus);
|
||||
if (U_SUCCESS(myStatus) && len > 0)
|
||||
{
|
||||
// If it contains the keyword collation, return 0 so that the LCID lookup table will be used.
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the locale ID contains keywords other than collation, just use the base name.
|
||||
len = uloc_getBaseName(localeID, baseName, UPRV_LENGTHOF(baseName) - 1, &myStatus);
|
||||
|
||||
if (U_SUCCESS(myStatus) && len > 0)
|
||||
{
|
||||
baseName[len] = 0;
|
||||
mylocaleID = baseName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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, &myStatus);
|
||||
|
||||
if (U_SUCCESS(myStatus))
|
||||
{
|
||||
// Need it to be UTF-16, not 8-bit
|
||||
wchar_t bcp47Tag[LOCALE_NAME_MAX_LENGTH] = {};
|
||||
int32_t i;
|
||||
for (i = 0; i < UPRV_LENGTHOF(bcp47Tag); i++)
|
||||
{
|
||||
if (asciiBCP47Tag[i] == '\0')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Copy the character
|
||||
bcp47Tag[i] = static_cast<wchar_t>(asciiBCP47Tag[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (i < (UPRV_LENGTHOF(bcp47Tag) - 1))
|
||||
{
|
||||
// Ensure it's null terminated
|
||||
bcp47Tag[i] = L'\0';
|
||||
LCID lcid = LocaleNameToLCID(bcp47Tag, nameLCIDFlags);
|
||||
if (lcid > 0)
|
||||
{
|
||||
// Found LCID from windows, return that one, unless its completely ambiguous
|
||||
// LOCALE_USER_DEFAULT and transients are OK because they will round trip
|
||||
// for this process.
|
||||
if (lcid != LOCALE_CUSTOM_UNSPECIFIED)
|
||||
{
|
||||
return lcid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)localeID; // Suppress unused variable warning.
|
||||
#endif /* USE_WINDOWS_LCID_MAPPING_API */
|
||||
|
||||
// No found, or not implemented on platforms without native name->lcid conversion
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_CAPI uint32_t
|
||||
uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status)
|
||||
{
|
||||
|
||||
// This function does the table lookup when native platform name->lcid conversion isn't available,
|
||||
// or for locales that don't follow patterns the platform expects.
|
||||
uint32_t low = 0;
|
||||
uint32_t high = gLocaleCount;
|
||||
uint32_t mid;
|
||||
@ -1172,4 +1318,3 @@ uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status)
|
||||
*status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0; /* return international (root) */
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -32,7 +32,8 @@
|
||||
|
||||
U_CAPI int32_t uprv_convertToPosix(uint32_t hostid, char* posixID, int32_t posixIDCapacity, UErrorCode* status);
|
||||
|
||||
/* Don't call this function directly. Use uloc_getLCID instead. */
|
||||
/* Don't call these functions directly. Use uloc_getLCID instead. */
|
||||
U_CAPI uint32_t uprv_convertToLCIDPlatform(const char *localeID); // Leverage platform conversion if possible
|
||||
U_CAPI uint32_t uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status);
|
||||
|
||||
#endif /* LOCMAP_H */
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: loclikely.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/**
|
||||
*******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: messageimpl.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: messagepattern.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Copyright (c) 2003-2010 International Business Machines
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2014, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* loadednormalizer2impl.h
|
||||
* norm2allmodes.h
|
||||
*
|
||||
* created on: 2014sep07
|
||||
* created by: Markus W. Scherer
|
||||
@ -18,7 +18,9 @@
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
|
||||
#include "unicode/edits.h"
|
||||
#include "unicode/normalizer2.h"
|
||||
#include "unicode/stringoptions.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "cpputils.h"
|
||||
#include "normalizer2impl.h"
|
||||
@ -210,8 +212,8 @@ private:
|
||||
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
|
||||
return impl.isDecompYes(impl.getNorm16(c)) ? UNORM_YES : UNORM_NO;
|
||||
}
|
||||
virtual UBool hasBoundaryBefore(UChar32 c) const { return impl.hasDecompBoundary(c, TRUE); }
|
||||
virtual UBool hasBoundaryAfter(UChar32 c) const { return impl.hasDecompBoundary(c, FALSE); }
|
||||
virtual UBool hasBoundaryBefore(UChar32 c) const { return impl.hasDecompBoundaryBefore(c); }
|
||||
virtual UBool hasBoundaryAfter(UChar32 c) const { return impl.hasDecompBoundaryAfter(c); }
|
||||
virtual UBool isInert(UChar32 c) const { return impl.isDecompInert(c); }
|
||||
};
|
||||
|
||||
@ -224,19 +226,35 @@ public:
|
||||
private:
|
||||
virtual void
|
||||
normalize(const UChar *src, const UChar *limit,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const U_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 {
|
||||
if (U_FAILURE(errorCode)) {
|
||||
return;
|
||||
}
|
||||
if (edits != nullptr && (options & U_EDITS_NO_RESET) == 0) {
|
||||
edits->reset();
|
||||
}
|
||||
const uint8_t *s = reinterpret_cast<const uint8_t *>(src.data());
|
||||
impl.composeUTF8(options, onlyContiguous, s, s + src.length(),
|
||||
&sink, edits, errorCode);
|
||||
sink.Flush();
|
||||
}
|
||||
|
||||
virtual void
|
||||
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
|
||||
UnicodeString &safeMiddle,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
impl.composeAndAppend(src, limit, doNormalize, onlyContiguous, safeMiddle, buffer, errorCode);
|
||||
}
|
||||
|
||||
virtual UBool
|
||||
isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
|
||||
isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_FAILURE(errorCode)) {
|
||||
return FALSE;
|
||||
}
|
||||
@ -252,8 +270,16 @@ private:
|
||||
}
|
||||
return impl.compose(sArray, sArray+s.length(), onlyContiguous, FALSE, buffer, errorCode);
|
||||
}
|
||||
virtual UBool
|
||||
isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_FAILURE(errorCode)) {
|
||||
return FALSE;
|
||||
}
|
||||
const uint8_t *s = reinterpret_cast<const uint8_t *>(sp.data());
|
||||
return impl.composeUTF8(0, onlyContiguous, s, s + sp.length(), nullptr, nullptr, errorCode);
|
||||
}
|
||||
virtual UNormalizationCheckResult
|
||||
quickCheck(const UnicodeString &s, UErrorCode &errorCode) const {
|
||||
quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_FAILURE(errorCode)) {
|
||||
return UNORM_MAYBE;
|
||||
}
|
||||
@ -267,21 +293,21 @@ private:
|
||||
return qcResult;
|
||||
}
|
||||
virtual const UChar *
|
||||
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const {
|
||||
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const U_OVERRIDE {
|
||||
return impl.composeQuickCheck(src, limit, onlyContiguous, NULL);
|
||||
}
|
||||
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
|
||||
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const U_OVERRIDE {
|
||||
return impl.getCompQuickCheck(impl.getNorm16(c));
|
||||
}
|
||||
virtual UBool hasBoundaryBefore(UChar32 c) const {
|
||||
virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE {
|
||||
return impl.hasCompBoundaryBefore(c);
|
||||
}
|
||||
virtual UBool hasBoundaryAfter(UChar32 c) const {
|
||||
return impl.hasCompBoundaryAfter(c, onlyContiguous, FALSE);
|
||||
virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE {
|
||||
return impl.hasCompBoundaryAfter(c, onlyContiguous);
|
||||
}
|
||||
virtual UBool isInert(UChar32 c) const {
|
||||
return impl.hasCompBoundaryAfter(c, onlyContiguous, TRUE);
|
||||
virtual UBool isInert(UChar32 c) const U_OVERRIDE {
|
||||
return impl.isCompInert(c, onlyContiguous);
|
||||
}
|
||||
|
||||
const UBool onlyContiguous;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: normalizer2.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -20,7 +20,9 @@
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
|
||||
#include "unicode/edits.h"
|
||||
#include "unicode/normalizer2.h"
|
||||
#include "unicode/stringoptions.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/unorm.h"
|
||||
#include "cstring.h"
|
||||
@ -42,6 +44,20 @@ U_NAMESPACE_BEGIN
|
||||
|
||||
Normalizer2::~Normalizer2() {}
|
||||
|
||||
void
|
||||
Normalizer2::normalizeUTF8(uint32_t /*options*/, StringPiece src, ByteSink &sink,
|
||||
Edits *edits, UErrorCode &errorCode) const {
|
||||
if (U_FAILURE(errorCode)) {
|
||||
return;
|
||||
}
|
||||
if (edits != nullptr) {
|
||||
errorCode = U_UNSUPPORTED_ERROR;
|
||||
return;
|
||||
}
|
||||
UnicodeString src16 = UnicodeString::fromUTF8(src);
|
||||
normalize(src16, errorCode).toUTF8(sink);
|
||||
}
|
||||
|
||||
UBool
|
||||
Normalizer2::getRawDecomposition(UChar32, UnicodeString &) const {
|
||||
return FALSE;
|
||||
@ -57,6 +73,11 @@ Normalizer2::getCombiningClass(UChar32 /*c*/) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
UBool
|
||||
Normalizer2::isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const {
|
||||
return U_SUCCESS(errorCode) && isNormalized(UnicodeString::fromUTF8(s), errorCode);
|
||||
}
|
||||
|
||||
// Normalizer2 implementation for the old UNORM_NONE.
|
||||
class NoopNormalizer2 : public Normalizer2 {
|
||||
virtual ~NoopNormalizer2();
|
||||
@ -64,7 +85,7 @@ class NoopNormalizer2 : public Normalizer2 {
|
||||
virtual UnicodeString &
|
||||
normalize(const UnicodeString &src,
|
||||
UnicodeString &dest,
|
||||
UErrorCode &errorCode) const {
|
||||
UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
if(&dest!=&src) {
|
||||
dest=src;
|
||||
@ -74,10 +95,27 @@ class NoopNormalizer2 : public Normalizer2 {
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
virtual void
|
||||
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
|
||||
Edits *edits, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
if (edits != nullptr) {
|
||||
if ((options & U_EDITS_NO_RESET) == 0) {
|
||||
edits->reset();
|
||||
}
|
||||
edits->addUnchanged(src.length());
|
||||
}
|
||||
if ((options & U_OMIT_UNCHANGED_TEXT) == 0) {
|
||||
sink.Append(src.data(), src.length());
|
||||
}
|
||||
sink.Flush();
|
||||
}
|
||||
}
|
||||
|
||||
virtual UnicodeString &
|
||||
normalizeSecondAndAppend(UnicodeString &first,
|
||||
const UnicodeString &second,
|
||||
UErrorCode &errorCode) const {
|
||||
UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
if(&first!=&second) {
|
||||
first.append(second);
|
||||
@ -90,7 +128,7 @@ class NoopNormalizer2 : public Normalizer2 {
|
||||
virtual UnicodeString &
|
||||
append(UnicodeString &first,
|
||||
const UnicodeString &second,
|
||||
UErrorCode &errorCode) const {
|
||||
UErrorCode &errorCode) const U_OVERRIDE {
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
if(&first!=&second) {
|
||||
first.append(second);
|
||||
@ -101,25 +139,29 @@ class NoopNormalizer2 : public Normalizer2 {
|
||||
return first;
|
||||
}
|
||||
virtual UBool
|
||||
getDecomposition(UChar32, UnicodeString &) const {
|
||||
getDecomposition(UChar32, UnicodeString &) const U_OVERRIDE {
|
||||
return FALSE;
|
||||
}
|
||||
// No need to override the default getRawDecomposition().
|
||||
// No need to U_OVERRIDE the default getRawDecomposition().
|
||||
virtual UBool
|
||||
isNormalized(const UnicodeString &, UErrorCode &) const {
|
||||
return TRUE;
|
||||
isNormalized(const UnicodeString &, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
return U_SUCCESS(errorCode);
|
||||
}
|
||||
virtual UBool
|
||||
isNormalizedUTF8(StringPiece, UErrorCode &errorCode) const U_OVERRIDE {
|
||||
return U_SUCCESS(errorCode);
|
||||
}
|
||||
virtual UNormalizationCheckResult
|
||||
quickCheck(const UnicodeString &, UErrorCode &) const {
|
||||
quickCheck(const UnicodeString &, UErrorCode &) const U_OVERRIDE {
|
||||
return UNORM_YES;
|
||||
}
|
||||
virtual int32_t
|
||||
spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const {
|
||||
spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const U_OVERRIDE {
|
||||
return s.length();
|
||||
}
|
||||
virtual UBool hasBoundaryBefore(UChar32) const { return TRUE; }
|
||||
virtual UBool hasBoundaryAfter(UChar32) const { return TRUE; }
|
||||
virtual UBool isInert(UChar32) const { return TRUE; }
|
||||
virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return TRUE; }
|
||||
virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return TRUE; }
|
||||
virtual UBool isInert(UChar32) const U_OVERRIDE { return TRUE; }
|
||||
};
|
||||
|
||||
NoopNormalizer2::~NoopNormalizer2() {}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: normalizer2impl.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -35,6 +35,11 @@ U_NAMESPACE_BEGIN
|
||||
|
||||
struct CanonIterData;
|
||||
|
||||
class ByteSink;
|
||||
class Edits;
|
||||
class InitCanonIterData;
|
||||
class LcccContext;
|
||||
|
||||
class U_COMMON_API Hangul {
|
||||
public:
|
||||
/* Korean Hangul and Jamo constants */
|
||||
@ -63,9 +68,9 @@ public:
|
||||
return HANGUL_BASE<=c && c<HANGUL_LIMIT;
|
||||
}
|
||||
static inline UBool
|
||||
isHangulWithoutJamoT(UChar c) {
|
||||
isHangulLV(UChar32 c) {
|
||||
c-=HANGUL_BASE;
|
||||
return c<HANGUL_COUNT && c%JAMO_T_COUNT==0;
|
||||
return 0<=c && c<HANGUL_COUNT && c%JAMO_T_COUNT==0;
|
||||
}
|
||||
static inline UBool isJamoL(UChar32 c) {
|
||||
return (uint32_t)(c-JAMO_L_BASE)<JAMO_L_COUNT;
|
||||
@ -73,6 +78,14 @@ public:
|
||||
static inline UBool isJamoV(UChar32 c) {
|
||||
return (uint32_t)(c-JAMO_V_BASE)<JAMO_V_COUNT;
|
||||
}
|
||||
static inline UBool isJamoT(UChar32 c) {
|
||||
int32_t t=c-JAMO_T_BASE;
|
||||
return 0<t && t<JAMO_T_COUNT; // not JAMO_T_BASE itself
|
||||
}
|
||||
static UBool isJamo(UChar32 c) {
|
||||
return JAMO_L_BASE<=c && c<=JAMO_T_END &&
|
||||
(c<=JAMO_L_END || (JAMO_V_BASE<=c && c<=JAMO_V_END) || JAMO_T_BASE<c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decomposes c, which must be a Hangul syllable, into buffer
|
||||
@ -117,10 +130,13 @@ class Normalizer2Impl;
|
||||
|
||||
class U_COMMON_API ReorderingBuffer : public UMemory {
|
||||
public:
|
||||
/** Constructs only; init() should be called. */
|
||||
ReorderingBuffer(const Normalizer2Impl &ni, UnicodeString &dest) :
|
||||
impl(ni), str(dest),
|
||||
start(NULL), reorderStart(NULL), limit(NULL),
|
||||
remainingCapacity(0), lastCC(0) {}
|
||||
/** Constructs, removes the string contents, and initializes for a small initial capacity. */
|
||||
ReorderingBuffer(const Normalizer2Impl &ni, UnicodeString &dest, UErrorCode &errorCode);
|
||||
~ReorderingBuffer() {
|
||||
if(start!=NULL) {
|
||||
str.releaseBuffer((int32_t)(limit-start));
|
||||
@ -135,11 +151,7 @@ public:
|
||||
uint8_t getLastCC() const { return lastCC; }
|
||||
|
||||
UBool equals(const UChar *start, const UChar *limit) const;
|
||||
|
||||
// For Hangul composition, replacing the Leading consonant Jamo with the syllable.
|
||||
void setLastChar(UChar c) {
|
||||
*(limit-1)=c;
|
||||
}
|
||||
UBool equals(const uint8_t *otherStart, const uint8_t *otherLimit) const;
|
||||
|
||||
UBool append(UChar32 c, uint8_t cc, UErrorCode &errorCode) {
|
||||
return (c<=0xffff) ?
|
||||
@ -176,7 +188,7 @@ public:
|
||||
lastCC=0;
|
||||
}
|
||||
void copyReorderableSuffixTo(UnicodeString &s) const {
|
||||
s.setTo(reorderStart, (int32_t)(limit-reorderStart));
|
||||
s.setTo(ConstChar16Ptr(reorderStart), (int32_t)(limit-reorderStart));
|
||||
}
|
||||
private:
|
||||
/*
|
||||
@ -218,6 +230,12 @@ private:
|
||||
UChar *codePointStart, *codePointLimit;
|
||||
};
|
||||
|
||||
/**
|
||||
* Low-level implementation of the Unicode Normalization Algorithm.
|
||||
* For the data structure and details see the documentation at the end of
|
||||
* this normalizer2impl.h and in the design doc at
|
||||
* http://site.icu-project.org/design/normalization/custom
|
||||
*/
|
||||
class U_COMMON_API Normalizer2Impl : public UObject {
|
||||
public:
|
||||
Normalizer2Impl() : normTrie(NULL), fCanonIterData(NULL) {
|
||||
@ -234,8 +252,6 @@ public:
|
||||
|
||||
// low-level properties ------------------------------------------------ ***
|
||||
|
||||
const UTrie2 *getNormTrie() const { return normTrie; }
|
||||
|
||||
UBool ensureCanonIterData(UErrorCode &errorCode) const;
|
||||
|
||||
uint16_t getNorm16(UChar32 c) const { return UTRIE2_GET16(normTrie, c); }
|
||||
@ -255,15 +271,22 @@ public:
|
||||
|
||||
uint8_t getCC(uint16_t norm16) const {
|
||||
if(norm16>=MIN_NORMAL_MAYBE_YES) {
|
||||
return (uint8_t)norm16;
|
||||
return getCCFromNormalYesOrMaybe(norm16);
|
||||
}
|
||||
if(norm16<minNoNo || limitNoNo<=norm16) {
|
||||
return 0;
|
||||
}
|
||||
return getCCFromNoNo(norm16);
|
||||
}
|
||||
static uint8_t getCCFromNormalYesOrMaybe(uint16_t norm16) {
|
||||
return (uint8_t)(norm16 >> OFFSET_SHIFT);
|
||||
}
|
||||
static uint8_t getCCFromYesOrMaybe(uint16_t norm16) {
|
||||
return norm16>=MIN_NORMAL_MAYBE_YES ? (uint8_t)norm16 : 0;
|
||||
return norm16>=MIN_NORMAL_MAYBE_YES ? getCCFromNormalYesOrMaybe(norm16) : 0;
|
||||
}
|
||||
uint8_t getCCFromYesOrMaybeCP(UChar32 c) const {
|
||||
if (c < minCompNoMaybeCP) { return 0; }
|
||||
return getCCFromYesOrMaybe(getNorm16(c));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -272,10 +295,8 @@ public:
|
||||
* @return The lccc(c) in bits 15..8 and tccc(c) in bits 7..0.
|
||||
*/
|
||||
uint16_t getFCD16(UChar32 c) const {
|
||||
if(c<0) {
|
||||
if(c<minDecompNoCP) {
|
||||
return 0;
|
||||
} else if(c<0x180) {
|
||||
return tccc180[c];
|
||||
} else if(c<=0xffff) {
|
||||
if(!singleLeadMightHaveNonZeroFCD16(c)) { return 0; }
|
||||
}
|
||||
@ -291,9 +312,7 @@ public:
|
||||
*/
|
||||
uint16_t nextFCD16(const UChar *&s, const UChar *limit) const {
|
||||
UChar32 c=*s++;
|
||||
if(c<0x180) {
|
||||
return tccc180[c];
|
||||
} else if(!singleLeadMightHaveNonZeroFCD16(c)) {
|
||||
if(c<minDecompNoCP || !singleLeadMightHaveNonZeroFCD16(c)) {
|
||||
return 0;
|
||||
}
|
||||
UChar c2;
|
||||
@ -311,8 +330,8 @@ public:
|
||||
*/
|
||||
uint16_t previousFCD16(const UChar *start, const UChar *&s) const {
|
||||
UChar32 c=*--s;
|
||||
if(c<0x180) {
|
||||
return tccc180[c];
|
||||
if(c<minDecompNoCP) {
|
||||
return 0;
|
||||
}
|
||||
if(!U16_IS_TRAIL(c)) {
|
||||
if(!singleLeadMightHaveNonZeroFCD16(c)) {
|
||||
@ -328,8 +347,6 @@ public:
|
||||
return getFCD16FromNormData(c);
|
||||
}
|
||||
|
||||
/** Returns the FCD data for U+0000<=c<U+0180. */
|
||||
uint16_t getFCD16FromBelow180(UChar32 c) const { return tccc180[c]; }
|
||||
/** Returns TRUE if the single-or-lead code unit c might have non-zero FCD data. */
|
||||
UBool singleLeadMightHaveNonZeroFCD16(UChar32 lead) const {
|
||||
// 0<=lead<=0xffff
|
||||
@ -340,9 +357,6 @@ public:
|
||||
/** Returns the FCD value from the regular normalization data. */
|
||||
uint16_t getFCD16FromNormData(UChar32 c) const;
|
||||
|
||||
void makeCanonIterDataFromNorm16(UChar32 start, UChar32 end, uint16_t norm16,
|
||||
CanonIterData &newData, UErrorCode &errorCode) const;
|
||||
|
||||
/**
|
||||
* Gets the decomposition for one code point.
|
||||
* @param c code point
|
||||
@ -367,14 +381,25 @@ public:
|
||||
UBool getCanonStartSet(UChar32 c, UnicodeSet &set) const;
|
||||
|
||||
enum {
|
||||
MIN_CCC_LCCC_CP=0x300
|
||||
};
|
||||
// Fixed norm16 values.
|
||||
MIN_YES_YES_WITH_CC=0xfe02,
|
||||
JAMO_VT=0xfe00,
|
||||
MIN_NORMAL_MAYBE_YES=0xfc00,
|
||||
JAMO_L=2, // offset=1 hasCompBoundaryAfter=FALSE
|
||||
INERT=1, // offset=0 hasCompBoundaryAfter=TRUE
|
||||
|
||||
// norm16 bit 0 is comp-boundary-after.
|
||||
HAS_COMP_BOUNDARY_AFTER=1,
|
||||
OFFSET_SHIFT=1,
|
||||
|
||||
// For algorithmic one-way mappings, norm16 bits 2..1 indicate the
|
||||
// tccc (0, 1, >1) for quick FCC boundary-after tests.
|
||||
DELTA_TCCC_0=0,
|
||||
DELTA_TCCC_1=2,
|
||||
DELTA_TCCC_GT_1=4,
|
||||
DELTA_TCCC_MASK=6,
|
||||
DELTA_SHIFT=3,
|
||||
|
||||
enum {
|
||||
MIN_YES_YES_WITH_CC=0xff01,
|
||||
JAMO_VT=0xff00,
|
||||
MIN_NORMAL_MAYBE_YES=0xfe00,
|
||||
JAMO_L=1,
|
||||
MAX_DELTA=0x40
|
||||
};
|
||||
|
||||
@ -394,21 +419,32 @@ public:
|
||||
IX_MIN_COMP_NO_MAYBE_CP,
|
||||
|
||||
// Norm16 value thresholds for quick check combinations and types of extra data.
|
||||
IX_MIN_YES_NO, // Mappings & compositions in [minYesNo..minYesNoMappingsOnly[.
|
||||
|
||||
/** Mappings & compositions in [minYesNo..minYesNoMappingsOnly[. */
|
||||
IX_MIN_YES_NO,
|
||||
/** Mappings are comp-normalized. */
|
||||
IX_MIN_NO_NO,
|
||||
IX_LIMIT_NO_NO,
|
||||
IX_MIN_MAYBE_YES,
|
||||
|
||||
IX_MIN_YES_NO_MAPPINGS_ONLY, // Mappings only in [minYesNoMappingsOnly..minNoNo[.
|
||||
/** Mappings only in [minYesNoMappingsOnly..minNoNo[. */
|
||||
IX_MIN_YES_NO_MAPPINGS_ONLY,
|
||||
/** Mappings are not comp-normalized but have a comp boundary before. */
|
||||
IX_MIN_NO_NO_COMP_BOUNDARY_BEFORE,
|
||||
/** Mappings do not have a comp boundary before. */
|
||||
IX_MIN_NO_NO_COMP_NO_MAYBE_CC,
|
||||
/** Mappings to the empty string. */
|
||||
IX_MIN_NO_NO_EMPTY,
|
||||
|
||||
IX_RESERVED15,
|
||||
IX_MIN_LCCC_CP,
|
||||
IX_RESERVED19,
|
||||
IX_COUNT
|
||||
};
|
||||
|
||||
enum {
|
||||
MAPPING_HAS_CCC_LCCC_WORD=0x80,
|
||||
MAPPING_HAS_RAW_MAPPING=0x40,
|
||||
MAPPING_NO_COMP_BOUNDARY_AFTER=0x20,
|
||||
// unused bit 0x20,
|
||||
MAPPING_LENGTH_MASK=0x1f
|
||||
};
|
||||
|
||||
@ -457,6 +493,12 @@ public:
|
||||
UnicodeString &safeMiddle,
|
||||
ReorderingBuffer &buffer,
|
||||
UErrorCode &errorCode) const;
|
||||
|
||||
/** sink==nullptr: isNormalized() */
|
||||
UBool composeUTF8(uint32_t options, UBool onlyContiguous,
|
||||
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,
|
||||
ReorderingBuffer *buffer, UErrorCode &errorCode) const;
|
||||
void makeFCDAndAppend(const UChar *src, const UChar *limit,
|
||||
@ -465,27 +507,42 @@ public:
|
||||
ReorderingBuffer &buffer,
|
||||
UErrorCode &errorCode) const;
|
||||
|
||||
UBool hasDecompBoundary(UChar32 c, UBool before) const;
|
||||
UBool hasDecompBoundaryBefore(UChar32 c) const;
|
||||
UBool norm16HasDecompBoundaryBefore(uint16_t norm16) const;
|
||||
UBool hasDecompBoundaryAfter(UChar32 c) const;
|
||||
UBool norm16HasDecompBoundaryAfter(uint16_t norm16) const;
|
||||
UBool isDecompInert(UChar32 c) const { return isDecompYesAndZeroCC(getNorm16(c)); }
|
||||
|
||||
UBool hasCompBoundaryBefore(UChar32 c) const {
|
||||
return c<minCompNoMaybeCP || hasCompBoundaryBefore(c, getNorm16(c));
|
||||
return c<minCompNoMaybeCP || norm16HasCompBoundaryBefore(getNorm16(c));
|
||||
}
|
||||
UBool hasCompBoundaryAfter(UChar32 c, UBool onlyContiguous) const {
|
||||
return norm16HasCompBoundaryAfter(getNorm16(c), onlyContiguous);
|
||||
}
|
||||
UBool isCompInert(UChar32 c, UBool onlyContiguous) const {
|
||||
uint16_t norm16=getNorm16(c);
|
||||
return isCompYesAndZeroCC(norm16) &&
|
||||
(norm16 & HAS_COMP_BOUNDARY_AFTER) != 0 &&
|
||||
(!onlyContiguous || isInert(norm16) || *getMapping(norm16) <= 0x1ff);
|
||||
}
|
||||
UBool hasCompBoundaryAfter(UChar32 c, UBool onlyContiguous, UBool testInert) const;
|
||||
|
||||
UBool hasFCDBoundaryBefore(UChar32 c) const { return c<MIN_CCC_LCCC_CP || getFCD16(c)<=0xff; }
|
||||
UBool hasFCDBoundaryAfter(UChar32 c) const {
|
||||
uint16_t fcd16=getFCD16(c);
|
||||
return fcd16<=1 || (fcd16&0xff)==0;
|
||||
}
|
||||
UBool hasFCDBoundaryBefore(UChar32 c) const { return hasDecompBoundaryBefore(c); }
|
||||
UBool hasFCDBoundaryAfter(UChar32 c) const { return hasDecompBoundaryAfter(c); }
|
||||
UBool isFCDInert(UChar32 c) const { return getFCD16(c)<=1; }
|
||||
private:
|
||||
friend class InitCanonIterData;
|
||||
friend class LcccContext;
|
||||
|
||||
UBool isMaybe(uint16_t norm16) const { return minMaybeYes<=norm16 && norm16<=JAMO_VT; }
|
||||
UBool isMaybeOrNonZeroCC(uint16_t norm16) const { return norm16>=minMaybeYes; }
|
||||
static UBool isInert(uint16_t norm16) { return norm16==0; }
|
||||
static UBool isJamoL(uint16_t norm16) { return norm16==1; }
|
||||
static UBool isInert(uint16_t norm16) { return norm16==INERT; }
|
||||
static UBool isJamoL(uint16_t norm16) { return norm16==JAMO_L; }
|
||||
static UBool isJamoVT(uint16_t norm16) { return norm16==JAMO_VT; }
|
||||
UBool isHangul(uint16_t norm16) const { return norm16==minYesNo; }
|
||||
uint16_t hangulLVT() const { return minYesNoMappingsOnly|HAS_COMP_BOUNDARY_AFTER; }
|
||||
UBool isHangulLV(uint16_t norm16) const { return norm16==minYesNo; }
|
||||
UBool isHangulLVT(uint16_t norm16) const {
|
||||
return norm16==hangulLVT();
|
||||
}
|
||||
UBool isCompYesAndZeroCC(uint16_t norm16) const { return norm16<minNoNo; }
|
||||
// UBool isCompYes(uint16_t norm16) const {
|
||||
// return norm16>=MIN_YES_YES_WITH_CC || norm16<minNoNo;
|
||||
@ -504,7 +561,7 @@ private:
|
||||
/**
|
||||
* A little faster and simpler than isDecompYesAndZeroCC() but does not include
|
||||
* the MaybeYes which combine-forward and have ccc=0.
|
||||
* (Standard Unicode 5.2 normalization does not have such characters.)
|
||||
* (Standard Unicode 10 normalization does not have such characters.)
|
||||
*/
|
||||
UBool isMostDecompYesAndZeroCC(uint16_t norm16) const {
|
||||
return norm16<minYesNo || norm16==MIN_NORMAL_MAYBE_YES || norm16==JAMO_VT;
|
||||
@ -514,7 +571,7 @@ private:
|
||||
// For use with isCompYes().
|
||||
// Perhaps the compiler can combine the two tests for MIN_YES_YES_WITH_CC.
|
||||
// static uint8_t getCCFromYes(uint16_t norm16) {
|
||||
// return norm16>=MIN_YES_YES_WITH_CC ? (uint8_t)norm16 : 0;
|
||||
// return norm16>=MIN_YES_YES_WITH_CC ? getCCFromNormalYesOrMaybe(norm16) : 0;
|
||||
// }
|
||||
uint8_t getCCFromNoNo(uint16_t norm16) const {
|
||||
const uint16_t *mapping=getMapping(norm16);
|
||||
@ -525,30 +582,47 @@ private:
|
||||
}
|
||||
}
|
||||
// requires that the [cpStart..cpLimit[ character passes isCompYesAndZeroCC()
|
||||
uint8_t getTrailCCFromCompYesAndZeroCC(const UChar *cpStart, const UChar *cpLimit) const;
|
||||
uint8_t getTrailCCFromCompYesAndZeroCC(uint16_t norm16) const {
|
||||
if(norm16<=minYesNo) {
|
||||
return 0; // yesYes and Hangul LV have ccc=tccc=0
|
||||
} else {
|
||||
// For Hangul LVT we harmlessly fetch a firstUnit with tccc=0 here.
|
||||
return (uint8_t)(*getMapping(norm16)>>8); // tccc from yesNo
|
||||
}
|
||||
}
|
||||
uint8_t getPreviousTrailCC(const UChar *start, const UChar *p) const;
|
||||
uint8_t getPreviousTrailCC(const uint8_t *start, const uint8_t *p) const;
|
||||
|
||||
// Requires algorithmic-NoNo.
|
||||
UChar32 mapAlgorithmic(UChar32 c, uint16_t norm16) const {
|
||||
return c+norm16-(minMaybeYes-MAX_DELTA-1);
|
||||
return c+(norm16>>DELTA_SHIFT)-centerNoNoDelta;
|
||||
}
|
||||
UChar32 getAlgorithmicDelta(uint16_t norm16) const {
|
||||
return (norm16>>DELTA_SHIFT)-centerNoNoDelta;
|
||||
}
|
||||
|
||||
// Requires minYesNo<norm16<limitNoNo.
|
||||
const uint16_t *getMapping(uint16_t norm16) const { return extraData+norm16; }
|
||||
const uint16_t *getMapping(uint16_t norm16) const { return extraData+(norm16>>OFFSET_SHIFT); }
|
||||
const uint16_t *getCompositionsListForDecompYes(uint16_t norm16) const {
|
||||
if(norm16==0 || MIN_NORMAL_MAYBE_YES<=norm16) {
|
||||
if(norm16<JAMO_L || MIN_NORMAL_MAYBE_YES<=norm16) {
|
||||
return NULL;
|
||||
} else if(norm16<minMaybeYes) {
|
||||
return extraData+norm16; // for yesYes; if Jamo L: harmless empty list
|
||||
return getMapping(norm16); // for yesYes; if Jamo L: harmless empty list
|
||||
} else {
|
||||
return maybeYesCompositions+norm16-minMaybeYes;
|
||||
}
|
||||
}
|
||||
const uint16_t *getCompositionsListForComposite(uint16_t norm16) const {
|
||||
const uint16_t *list=extraData+norm16; // composite has both mapping & compositions list
|
||||
// A composite has both mapping & compositions list.
|
||||
const uint16_t *list=getMapping(norm16);
|
||||
return list+ // mapping pointer
|
||||
1+ // +1 to skip the first unit with the mapping lenth
|
||||
1+ // +1 to skip the first unit with the mapping length
|
||||
(*list&MAPPING_LENGTH_MASK); // + mapping length
|
||||
}
|
||||
const uint16_t *getCompositionsListForMaybe(uint16_t norm16) const {
|
||||
// minMaybeYes<=norm16<MIN_NORMAL_MAYBE_YES
|
||||
return maybeYesCompositions+((norm16-minMaybeYes)>>OFFSET_SHIFT);
|
||||
}
|
||||
/**
|
||||
* @param c code point must have compositions
|
||||
* @return compositions list pointer
|
||||
@ -563,46 +637,78 @@ private:
|
||||
UChar32 minNeedDataCP,
|
||||
ReorderingBuffer *buffer,
|
||||
UErrorCode &errorCode) const;
|
||||
UBool decomposeShort(const UChar *src, const UChar *limit,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const;
|
||||
const UChar *decomposeShort(const UChar *src, const UChar *limit,
|
||||
UBool stopAtCompBoundary, UBool onlyContiguous,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const;
|
||||
UBool decompose(UChar32 c, uint16_t norm16,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const;
|
||||
|
||||
const uint8_t *decomposeShort(const uint8_t *src, const uint8_t *limit,
|
||||
UBool stopAtCompBoundary, UBool onlyContiguous,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const;
|
||||
|
||||
static int32_t combine(const uint16_t *list, UChar32 trail);
|
||||
void addComposites(const uint16_t *list, UnicodeSet &set) const;
|
||||
void recompose(ReorderingBuffer &buffer, int32_t recomposeStartIndex,
|
||||
UBool onlyContiguous) const;
|
||||
|
||||
UBool hasCompBoundaryBefore(UChar32 c, uint16_t norm16) const;
|
||||
const UChar *findPreviousCompBoundary(const UChar *start, const UChar *p) const;
|
||||
const UChar *findNextCompBoundary(const UChar *p, const UChar *limit) const;
|
||||
UBool hasCompBoundaryBefore(UChar32 c, uint16_t norm16) const {
|
||||
return c<minCompNoMaybeCP || norm16HasCompBoundaryBefore(norm16);
|
||||
}
|
||||
UBool norm16HasCompBoundaryBefore(uint16_t norm16) const {
|
||||
return norm16 < minNoNoCompNoMaybeCC || isAlgorithmicNoNo(norm16);
|
||||
}
|
||||
UBool hasCompBoundaryBefore(const UChar *src, const UChar *limit) const;
|
||||
UBool hasCompBoundaryBefore(const uint8_t *src, const uint8_t *limit) const;
|
||||
UBool hasCompBoundaryAfter(const UChar *start, const UChar *p,
|
||||
UBool onlyContiguous) const;
|
||||
UBool hasCompBoundaryAfter(const uint8_t *start, const uint8_t *p,
|
||||
UBool onlyContiguous) const;
|
||||
UBool norm16HasCompBoundaryAfter(uint16_t norm16, UBool onlyContiguous) const {
|
||||
return (norm16 & HAS_COMP_BOUNDARY_AFTER) != 0 &&
|
||||
(!onlyContiguous || isTrailCC01ForCompBoundaryAfter(norm16));
|
||||
}
|
||||
/** For FCC: Given norm16 HAS_COMP_BOUNDARY_AFTER, does it have tccc<=1? */
|
||||
UBool isTrailCC01ForCompBoundaryAfter(uint16_t norm16) const {
|
||||
return isInert(norm16) || (isDecompNoAlgorithmic(norm16) ?
|
||||
(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 UChar *findPreviousFCDBoundary(const UChar *start, const UChar *p) const;
|
||||
const UChar *findNextFCDBoundary(const UChar *p, const UChar *limit) const;
|
||||
|
||||
void makeCanonIterDataFromNorm16(UChar32 start, UChar32 end, const uint16_t norm16,
|
||||
CanonIterData &newData, UErrorCode &errorCode) const;
|
||||
|
||||
int32_t getCanonValue(UChar32 c) const;
|
||||
const UnicodeSet &getCanonStartSet(int32_t n) const;
|
||||
|
||||
// UVersionInfo dataVersion;
|
||||
|
||||
// Code point thresholds for quick check codes.
|
||||
UChar32 minDecompNoCP;
|
||||
UChar32 minCompNoMaybeCP;
|
||||
// BMP code point thresholds for quick check loops looking at single UTF-16 code units.
|
||||
UChar minDecompNoCP;
|
||||
UChar minCompNoMaybeCP;
|
||||
UChar minLcccCP;
|
||||
|
||||
// Norm16 value thresholds for quick check combinations and types of extra data.
|
||||
uint16_t minYesNo;
|
||||
uint16_t minYesNoMappingsOnly;
|
||||
uint16_t minNoNo;
|
||||
uint16_t minNoNoCompBoundaryBefore;
|
||||
uint16_t minNoNoCompNoMaybeCC;
|
||||
uint16_t minNoNoEmpty;
|
||||
uint16_t limitNoNo;
|
||||
uint16_t centerNoNoDelta;
|
||||
uint16_t minMaybeYes;
|
||||
|
||||
const UTrie2 *normTrie;
|
||||
const uint16_t *maybeYesCompositions;
|
||||
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
|
||||
uint8_t tccc180[0x180]; // tccc values for U+0000..U+017F
|
||||
|
||||
public: // CanonIterData is public to allow access from C callback functions.
|
||||
UInitOnce fCanonIterDataInitOnce;
|
||||
CanonIterData *fCanonIterData;
|
||||
};
|
||||
@ -658,13 +764,14 @@ unorm_getFCD16(UChar32 c);
|
||||
|
||||
/**
|
||||
* Format of Normalizer2 .nrm data files.
|
||||
* Format version 2.0.
|
||||
* Format version 3.0.
|
||||
*
|
||||
* Normalizer2 .nrm data files provide data for the Unicode Normalization algorithms.
|
||||
* ICU ships with data files for standard Unicode Normalization Forms
|
||||
* NFC and NFD (nfc.nrm), NFKC and NFKD (nfkc.nrm) and NFKC_Casefold (nfkc_cf.nrm).
|
||||
* Custom (application-specific) data can be built into additional .nrm files
|
||||
* with the gennorm2 build tool.
|
||||
* ICU ships with one such file, uts46.nrm, for the implementation of UTS #46.
|
||||
*
|
||||
* Normalizer2.getInstance() causes a .nrm file to be loaded, unless it has been
|
||||
* cached already. Internally, Normalizer2Impl.load() reads the .nrm file.
|
||||
@ -695,14 +802,20 @@ unorm_getFCD16(UChar32 c);
|
||||
* with a decomposition mapping, that is, with NF*D_QC=No.
|
||||
* minCompNoMaybeCP=indexes[IX_MIN_COMP_NO_MAYBE_CP] is the lowest code point
|
||||
* with NF*C_QC=No (has a one-way mapping) or Maybe (combines backward).
|
||||
* minLcccCP=indexes[IX_MIN_LCCC_CP] (index 18, new in formatVersion 3)
|
||||
* is the lowest code point with lccc!=0.
|
||||
*
|
||||
* The next five indexes are thresholds of 16-bit trie values for ranges of
|
||||
* The next eight indexes are thresholds of 16-bit trie values for ranges of
|
||||
* values indicating multiple normalization properties.
|
||||
* They are listed here in threshold order, not in the order they are stored in the indexes.
|
||||
* minYesNo=indexes[IX_MIN_YES_NO];
|
||||
* minYesNoMappingsOnly=indexes[IX_MIN_YES_NO_MAPPINGS_ONLY];
|
||||
* minNoNo=indexes[IX_MIN_NO_NO];
|
||||
* minNoNoCompBoundaryBefore=indexes[IX_MIN_NO_NO_COMP_BOUNDARY_BEFORE];
|
||||
* minNoNoCompNoMaybeCC=indexes[IX_MIN_NO_NO_COMP_NO_MAYBE_CC];
|
||||
* minNoNoEmpty=indexes[IX_MIN_NO_NO_EMPTY];
|
||||
* limitNoNo=indexes[IX_LIMIT_NO_NO];
|
||||
* minMaybeYes=indexes[IX_MIN_MAYBE_YES];
|
||||
* minYesNoMappingsOnly=indexes[IX_MIN_YES_NO_MAPPINGS_ONLY];
|
||||
* See the normTrie description below and the design doc for details.
|
||||
*
|
||||
* UTrie2 normTrie; -- see utrie2_impl.h and utrie2.h
|
||||
@ -710,12 +823,14 @@ unorm_getFCD16(UChar32 c);
|
||||
* The trie holds the main normalization data. Each code point is mapped to a 16-bit value.
|
||||
* Rather than using independent bits in the value (which would require more than 16 bits),
|
||||
* information is extracted primarily via range checks.
|
||||
* Except, format version 3 uses bit 0 for hasCompBoundaryAfter().
|
||||
* For example, a 16-bit value norm16 in the range minYesNo<=norm16<minNoNo
|
||||
* means that the character has NF*C_QC=Yes and NF*D_QC=No properties,
|
||||
* which means it has a two-way (round-trip) decomposition mapping.
|
||||
* Values in the range 2<=norm16<limitNoNo are also directly indexes into the extraData
|
||||
* pointing to mappings, compositions lists, or both.
|
||||
* Value norm16==0 means that the character is normalization-inert, that is,
|
||||
* Value norm16==INERT (0 in versions 1 & 2, 1 in version 3)
|
||||
* means that the character is normalization-inert, that is,
|
||||
* it does not have a mapping, does not participate in composition, has a zero
|
||||
* canonical combining class, and forms a boundary where text before it and after it
|
||||
* can be normalized independently.
|
||||
@ -729,7 +844,7 @@ unorm_getFCD16(UChar32 c);
|
||||
* The trie has a value for each lead surrogate code unit representing the "worst case"
|
||||
* properties of the 1024 supplementary characters whose UTF-16 form starts with
|
||||
* the lead surrogate. If all of the 1024 supplementary characters are normalization-inert,
|
||||
* then their lead surrogate code unit has the trie value 0.
|
||||
* then their lead surrogate code unit has the trie value INERT.
|
||||
* When the lead surrogate unit's value exceeds the quick check minimum during processing,
|
||||
* the properties for the full supplementary code point need to be looked up.
|
||||
*
|
||||
@ -738,6 +853,7 @@ unorm_getFCD16(UChar32 c);
|
||||
*
|
||||
* There is only one byte offset for the end of these two arrays.
|
||||
* The split between them is given by the constant and variable mentioned above.
|
||||
* In version 3, the difference must be shifted right by OFFSET_SHIFT.
|
||||
*
|
||||
* The maybeYesCompositions array contains compositions lists for characters that
|
||||
* combine both forward (as starters in composition pairs)
|
||||
@ -754,6 +870,8 @@ unorm_getFCD16(UChar32 c);
|
||||
* followed by only mappings for "NoNo" characters.
|
||||
* (Referring to pairs of NFC/NFD quick check values.)
|
||||
* The norm16 values of those characters are directly indexes into the extraData array.
|
||||
* In version 3, the norm16 values must be shifted right by OFFSET_SHIFT
|
||||
* for accessing extraData.
|
||||
*
|
||||
* The data structures for compositions lists and mappings are described in the design doc.
|
||||
*
|
||||
@ -784,6 +902,50 @@ unorm_getFCD16(UChar32 c);
|
||||
* This is fully equivalent with formatVersion 1's MAPPING_PLUS_COMPOSITION_LIST flag.
|
||||
* It is needed for the new (in ICU 49) composePair(), not for other normalization.
|
||||
* - Addition of the smallFCD[] bit set.
|
||||
*
|
||||
* Changes from format version 2 to format version 3 (ICU 60) ------------------
|
||||
*
|
||||
* - norm16 bit 0 indicates hasCompBoundaryAfter(),
|
||||
* except that for contiguous composition (FCC) the tccc must be checked as well.
|
||||
* Data indexes and ccc values are shifted left by one (OFFSET_SHIFT).
|
||||
* Thresholds like minNoNo are tested before shifting.
|
||||
*
|
||||
* - Algorithmic mapping deltas are shifted left by two more bits (total DELTA_SHIFT),
|
||||
* to make room for two bits (three values) indicating whether the tccc is 0, 1, or greater.
|
||||
* See DELTA_TCCC_MASK etc.
|
||||
* This helps with fetching tccc/FCD values and FCC hasCompBoundaryAfter().
|
||||
* minMaybeYes is 8-aligned so that the DELTA_TCCC_MASK bits can be tested directly.
|
||||
*
|
||||
* - Algorithmic mappings are only used for mapping to "comp yes and ccc=0" characters,
|
||||
* and ASCII characters are mapped algorithmically only to other ASCII characters.
|
||||
* This helps with hasCompBoundaryBefore() and compose() fast paths.
|
||||
* It is never necessary any more to loop for algorithmic mappings.
|
||||
*
|
||||
* - Addition of indexes[IX_MIN_NO_NO_COMP_BOUNDARY_BEFORE],
|
||||
* indexes[IX_MIN_NO_NO_COMP_NO_MAYBE_CC], and indexes[IX_MIN_NO_NO_EMPTY],
|
||||
* and separation of the noNo extraData into distinct ranges.
|
||||
* With this, the noNo norm16 value indicates whether the mapping is
|
||||
* compose-normalized, not normalized but hasCompBoundaryBefore(),
|
||||
* not even that, or maps to an empty string.
|
||||
* hasCompBoundaryBefore() can be determined solely from the norm16 value.
|
||||
*
|
||||
* - The norm16 value for Hangul LVT is now different from that for Hangul LV,
|
||||
* so that hasCompBoundaryAfter() need not check for the syllable type.
|
||||
* For Hangul LV, minYesNo continues to be used (no comp-boundary-after).
|
||||
* For Hangul LVT, minYesNoMappingsOnly|HAS_COMP_BOUNDARY_AFTER is used.
|
||||
* The extraData units at these indexes are set to firstUnit=2 and firstUnit=3, respectively,
|
||||
* to simplify some code.
|
||||
*
|
||||
* - The extraData firstUnit bit 5 is no longer necessary
|
||||
* (norm16 bit 0 used instead of firstUnit MAPPING_NO_COMP_BOUNDARY_AFTER),
|
||||
* is reserved again, and always set to 0.
|
||||
*
|
||||
* - Addition of indexes[IX_MIN_LCCC_CP], the first code point where lccc!=0.
|
||||
* This used to be hardcoded to U+0300, but in data like NFKC_Casefold it is lower:
|
||||
* U+00AD Soft Hyphen maps to an empty string,
|
||||
* which is artificially assigned "worst case" values lccc=1 and tccc=255.
|
||||
*
|
||||
* - A mapping to an empty string has explicit lccc=1 and tccc=255 values.
|
||||
*/
|
||||
|
||||
#endif /* !UCONFIG_NO_NORMALIZATION */
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*************************************************************************
|
||||
@ -23,6 +23,12 @@
|
||||
#include "normalizer2impl.h"
|
||||
#include "uprops.h" // for uniset_getUnicode32Instance()
|
||||
|
||||
#if defined(_ARM64_) && defined(move32)
|
||||
// System can define move32 intrinsics, but the char iters define move32 method
|
||||
// using same undef trick in headers, so undef here to re-enable the method.
|
||||
#undef move32
|
||||
#endif
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Normalizer)
|
||||
@ -40,7 +46,7 @@ Normalizer::Normalizer(const UnicodeString& str, UNormalizationMode mode) :
|
||||
init();
|
||||
}
|
||||
|
||||
Normalizer::Normalizer(const UChar *str, int32_t length, UNormalizationMode mode) :
|
||||
Normalizer::Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode) :
|
||||
UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0),
|
||||
text(new UCharCharacterIterator(str, length)),
|
||||
currentIndex(0), nextIndex(0),
|
||||
@ -435,7 +441,7 @@ Normalizer::setText(const CharacterIterator& newText,
|
||||
}
|
||||
|
||||
void
|
||||
Normalizer::setText(const UChar* newText,
|
||||
Normalizer::setText(ConstChar16Ptr newText,
|
||||
int32_t length,
|
||||
UErrorCode &status)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: patternprops.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -6,7 +6,7 @@
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
* file name: patternprops.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
* Copyright (C) 2015, International Business Machines Corporation and
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: propsvec.c
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -499,6 +499,8 @@ upvec_compactToUTrie2Handler(void *context,
|
||||
UChar32 start, UChar32 end,
|
||||
int32_t rowIndex, uint32_t *row, int32_t columns,
|
||||
UErrorCode *pErrorCode) {
|
||||
(void)row;
|
||||
(void)columns;
|
||||
UPVecToUTrie2Context *toUTrie2=(UPVecToUTrie2Context *)context;
|
||||
if(start<UPVEC_FIRST_SPECIAL_CP) {
|
||||
utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, TRUE, pErrorCode);
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: propsvec.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: punycode.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: punycode.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -43,8 +43,24 @@
|
||||
// Must be before any other #includes.
|
||||
#include "uposixdefs.h"
|
||||
|
||||
/* include ICU headers */
|
||||
#include "unicode/utypes.h"
|
||||
// First, the platform type. Need this for U_PLATFORM.
|
||||
#include "unicode/platform.h"
|
||||
|
||||
#if U_PLATFORM == U_PF_MINGW && defined __STRICT_ANSI__
|
||||
/* tzset isn't defined in strict ANSI on MinGW. */
|
||||
#undef __STRICT_ANSI__
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
#if !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* include the rest of the ICU headers */
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/ustring.h"
|
||||
#include "putilimp.h"
|
||||
@ -76,14 +92,29 @@
|
||||
* Should Cygwin be included as well (U_PLATFORM_HAS_WIN32_API)
|
||||
* to use native APIs as much as possible?
|
||||
*/
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
# define VC_EXTRALEAN
|
||||
# define NOUSER
|
||||
# define NOSERVICE
|
||||
# define NOIME
|
||||
# define NOMCX
|
||||
# include <windows.h>
|
||||
# include "unicode/uloc.h"
|
||||
#if U_PLATFORM_HAS_WINUWP_API == 0
|
||||
# include "wintz.h"
|
||||
#else // U_PLATFORM_HAS_WINUWP_API
|
||||
typedef PVOID LPMSG; // TODO: figure out how to get rid of this typedef
|
||||
#include <Windows.Globalization.h>
|
||||
#include <windows.system.userprofile.h>
|
||||
#include <wrl/wrappers/corewrappers.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
using namespace ABI::Windows::Foundation;
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
#endif
|
||||
#elif U_PLATFORM == U_PF_OS400
|
||||
# include <float.h>
|
||||
# include <qusec.h> /* error code structure */
|
||||
@ -104,20 +135,6 @@
|
||||
# include <sys/neutrino.h>
|
||||
#endif
|
||||
|
||||
#if (U_PF_MINGW <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__)
|
||||
/* tzset isn't defined in strict ANSI on Cygwin and MinGW. */
|
||||
#undef __STRICT_ANSI__
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
#if !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Only include langinfo.h if we have a way to get the codeset. If we later
|
||||
* depend on more feature, we can test on U_HAVE_NL_LANGINFO.
|
||||
@ -651,13 +668,23 @@ uprv_timezone()
|
||||
/* Note that U_TZNAME does *not* have to be tzname, but if it is,
|
||||
some platforms need to have it declared here. */
|
||||
|
||||
#if defined(U_TZNAME) && (U_PLATFORM == U_PF_IRIX || U_PLATFORM_IS_DARWIN_BASED || (U_PLATFORM == U_PF_CYGWIN && !U_PLATFORM_USES_ONLY_WIN32_API))
|
||||
#if defined(U_TZNAME) && (U_PLATFORM == U_PF_IRIX || U_PLATFORM_IS_DARWIN_BASED)
|
||||
/* RS6000 and others reject char **tzname. */
|
||||
extern U_IMPORT char *U_TZNAME[];
|
||||
#endif
|
||||
|
||||
#if !UCONFIG_NO_FILE_IO && ((U_PLATFORM_IS_DARWIN_BASED && (U_PLATFORM != U_PF_IPHONE || defined(U_TIMEZONE))) || U_PLATFORM_IS_LINUX_BASED || U_PLATFORM == U_PF_BSD || U_PLATFORM == U_PF_SOLARIS)
|
||||
/* These platforms are likely to use Olson timezone IDs. */
|
||||
/* common targets of the symbolic link at TZDEFAULT are:
|
||||
* "/usr/share/zoneinfo/<olsonID>" default, older Linux distros, macOS to 10.12
|
||||
* "../usr/share/zoneinfo/<olsonID>" newer Linux distros: Red Hat Enterprise Linux 7, Ubuntu 16, SuSe Linux 12
|
||||
* "/usr/share/lib/zoneinfo/<olsonID>" Solaris
|
||||
* "../usr/share/lib/zoneinfo/<olsonID>" Solaris
|
||||
* "/var/db/timezone/zoneinfo/<olsonID>" macOS 10.13
|
||||
* To avoid checking lots of paths, just check that the target path
|
||||
* before the <olsonID> ends with "/zoneinfo/", and the <olsonID> is valid.
|
||||
*/
|
||||
|
||||
#define CHECK_LOCALTIME_LINK 1
|
||||
#if U_PLATFORM_IS_DARWIN_BASED
|
||||
#include <tzfile.h>
|
||||
@ -665,12 +692,12 @@ extern U_IMPORT char *U_TZNAME[];
|
||||
#elif U_PLATFORM == U_PF_SOLARIS
|
||||
#define TZDEFAULT "/etc/localtime"
|
||||
#define TZZONEINFO "/usr/share/lib/zoneinfo/"
|
||||
#define TZZONEINFO2 "../usr/share/lib/zoneinfo/"
|
||||
#define TZ_ENV_CHECK "localtime"
|
||||
#else
|
||||
#define TZDEFAULT "/etc/localtime"
|
||||
#define TZZONEINFO "/usr/share/zoneinfo/"
|
||||
#endif
|
||||
#define TZZONEINFOTAIL "/zoneinfo/"
|
||||
#if U_HAVE_DIRENT_H
|
||||
#define TZFILE_SKIP "posixrules" /* tz file to skip when searching. */
|
||||
/* Some Linux distributions have 'localtime' in /usr/share/zoneinfo
|
||||
@ -922,30 +949,30 @@ static CharString *gSearchTZFileResult = NULL;
|
||||
* 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 = opendir(path);
|
||||
DIR* subDirp = NULL;
|
||||
DIR* dirp = NULL;
|
||||
struct dirent* dirEntry = NULL;
|
||||
|
||||
char* result = NULL;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
/* Save the current path */
|
||||
CharString curpath(path, -1, status);
|
||||
if (U_FAILURE(status)) {
|
||||
goto cleanupAndReturn;
|
||||
}
|
||||
|
||||
dirp = opendir(path);
|
||||
if (dirp == NULL) {
|
||||
return result;
|
||||
goto cleanupAndReturn;
|
||||
}
|
||||
|
||||
if (gSearchTZFileResult == NULL) {
|
||||
gSearchTZFileResult = new CharString;
|
||||
if (gSearchTZFileResult == NULL) {
|
||||
return NULL;
|
||||
goto cleanupAndReturn;
|
||||
}
|
||||
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
|
||||
}
|
||||
|
||||
/* Save the current path */
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
CharString curpath(path, -1, status);
|
||||
if (U_FAILURE(status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Check each entry in the directory. */
|
||||
while((dirEntry = readdir(dirp)) != NULL) {
|
||||
const char* dirName = dirEntry->d_name;
|
||||
@ -954,15 +981,16 @@ static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
|
||||
CharString newpath(curpath, status);
|
||||
newpath.append(dirName, -1, status);
|
||||
if (U_FAILURE(status)) {
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
DIR* subDirp = NULL;
|
||||
if ((subDirp = opendir(newpath.data())) != NULL) {
|
||||
/* If this new path is a directory, make a recursive call with the newpath. */
|
||||
closedir(subDirp);
|
||||
newpath.append('/', status);
|
||||
if (U_FAILURE(status)) {
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
result = searchForTZFile(newpath.data(), tzInfo);
|
||||
/*
|
||||
@ -986,7 +1014,7 @@ static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
|
||||
gSearchTZFileResult->clear();
|
||||
gSearchTZFileResult->append(zoneid, -1, status);
|
||||
if (U_FAILURE(status)) {
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
result = gSearchTZFileResult->data();
|
||||
/* Get out after the first one found. */
|
||||
@ -995,7 +1023,11 @@ static char* searchForTZFile(const char* path, DefaultTZInfo* tzInfo) {
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dirp);
|
||||
|
||||
cleanupAndReturn:
|
||||
if (dirp) {
|
||||
closedir(dirp);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
@ -1008,16 +1040,66 @@ uprv_tzname_clear_cache()
|
||||
#endif
|
||||
}
|
||||
|
||||
// With the Universal Windows Platform we can just ask Windows for the name
|
||||
#if U_PLATFORM_HAS_WINUWP_API
|
||||
U_CAPI const char* U_EXPORT2
|
||||
uprv_getWindowsTimeZone()
|
||||
{
|
||||
// Get default Windows timezone.
|
||||
ComPtr<IInspectable> calendar;
|
||||
HRESULT hr = RoActivateInstance(
|
||||
HStringReference(RuntimeClass_Windows_Globalization_Calendar).Get(),
|
||||
&calendar);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
ComPtr<ABI::Windows::Globalization::ITimeZoneOnCalendar> timezone;
|
||||
hr = calendar.As(&timezone);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
HString timezoneString;
|
||||
hr = timezone->GetTimeZone(timezoneString.GetAddressOf());
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
int32_t length = static_cast<int32_t>(wcslen(timezoneString.GetRawBuffer(NULL)));
|
||||
char* asciiId = (char*)uprv_calloc(length + 1, sizeof(char));
|
||||
if (asciiId != nullptr)
|
||||
{
|
||||
u_UCharsToChars((UChar*)timezoneString.GetRawBuffer(NULL), asciiId, length);
|
||||
return asciiId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Failed
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
U_CAPI const char* U_EXPORT2
|
||||
uprv_tzname(int n)
|
||||
{
|
||||
(void)n; // Avoid unreferenced parameter warning.
|
||||
const char *tzid = NULL;
|
||||
#if U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#if U_PLATFORM_HAS_WINUWP_API > 0
|
||||
tzid = uprv_getWindowsTimeZone();
|
||||
#else
|
||||
tzid = uprv_detectWindowsTimeZone();
|
||||
#endif
|
||||
|
||||
if (tzid != NULL) {
|
||||
return tzid;
|
||||
}
|
||||
|
||||
#ifndef U_TZNAME
|
||||
// The return value is free'd in timezone.cpp on Windows because
|
||||
// the other code path returns a pointer to a heap location.
|
||||
// If we don't have a name already, then tzname wouldn't be any
|
||||
// better, so just fall back.
|
||||
return uprv_strdup("Etc/UTC");
|
||||
#endif // !U_TZNAME
|
||||
|
||||
#else
|
||||
|
||||
/*#if U_PLATFORM_IS_DARWIN_BASED
|
||||
@ -1059,24 +1141,15 @@ uprv_tzname(int n)
|
||||
*/
|
||||
int32_t ret = (int32_t)readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1);
|
||||
if (0 < ret) {
|
||||
int32_t tzZoneInfoLen = uprv_strlen(TZZONEINFO);
|
||||
int32_t tzZoneInfoTailLen = uprv_strlen(TZZONEINFOTAIL);
|
||||
gTimeZoneBuffer[ret] = 0;
|
||||
if (uprv_strncmp(gTimeZoneBuffer, TZZONEINFO, tzZoneInfoLen) == 0
|
||||
&& isValidOlsonID(gTimeZoneBuffer + tzZoneInfoLen))
|
||||
char * tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL);
|
||||
|
||||
if (tzZoneInfoTailPtr != NULL
|
||||
&& isValidOlsonID(tzZoneInfoTailPtr + tzZoneInfoTailLen))
|
||||
{
|
||||
return (gTimeZoneBufferPtr = gTimeZoneBuffer + tzZoneInfoLen);
|
||||
return (gTimeZoneBufferPtr = tzZoneInfoTailPtr + tzZoneInfoTailLen);
|
||||
}
|
||||
#if U_PLATFORM == U_PF_SOLARIS
|
||||
else
|
||||
{
|
||||
tzZoneInfoLen = uprv_strlen(TZZONEINFO2);
|
||||
if (uprv_strncmp(gTimeZoneBuffer, TZZONEINFO2, tzZoneInfoLen) == 0
|
||||
&& isValidOlsonID(gTimeZoneBuffer + tzZoneInfoLen))
|
||||
{
|
||||
return (gTimeZoneBufferPtr = gTimeZoneBuffer + tzZoneInfoLen);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
#if defined(SEARCH_TZFILE)
|
||||
DefaultTZInfo* tzInfo = (DefaultTZInfo*)uprv_malloc(sizeof(DefaultTZInfo));
|
||||
@ -1162,7 +1235,8 @@ UInitOnce gTimeZoneFilesInitOnce = U_INITONCE_INITIALIZER;
|
||||
static CharString *gTimeZoneFilesDirectory = NULL;
|
||||
|
||||
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
|
||||
static char *gCorrectedPOSIXLocale = NULL; /* Heap allocated */
|
||||
static const char *gCorrectedPOSIXLocale = NULL; /* Sometimes heap allocated */
|
||||
static bool gCorrectedPOSIXLocaleHeapAllocated = false;
|
||||
#endif
|
||||
|
||||
static UBool U_CALLCONV putil_cleanup(void)
|
||||
@ -1183,9 +1257,10 @@ static UBool U_CALLCONV putil_cleanup(void)
|
||||
#endif
|
||||
|
||||
#if U_POSIX_LOCALE || U_PLATFORM_USES_ONLY_WIN32_API
|
||||
if (gCorrectedPOSIXLocale) {
|
||||
uprv_free(gCorrectedPOSIXLocale);
|
||||
if (gCorrectedPOSIXLocale && gCorrectedPOSIXLocaleHeapAllocated) {
|
||||
uprv_free(const_cast<char *>(gCorrectedPOSIXLocale));
|
||||
gCorrectedPOSIXLocale = NULL;
|
||||
gCorrectedPOSIXLocaleHeapAllocated = false;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
@ -1219,7 +1294,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)) {
|
||||
while((p = uprv_strchr(newDataDir, U_FILE_ALT_SEP_CHAR)) != NULL) {
|
||||
*p = U_FILE_SEP_CHAR;
|
||||
}
|
||||
}
|
||||
@ -1297,7 +1372,9 @@ static void U_CALLCONV dataDirectoryInitFn() {
|
||||
*/
|
||||
# if !defined(ICU_NO_USER_DATA_OVERRIDE) && !UCONFIG_NO_FILE_IO
|
||||
/* First try to get the environment variable */
|
||||
path=getenv("ICU_DATA");
|
||||
# if U_PLATFORM_HAS_WINUWP_API == 0 // Windows UWP does not support getenv
|
||||
path=getenv("ICU_DATA");
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* ICU_DATA_DIR may be set as a compile option.
|
||||
@ -1326,9 +1403,35 @@ static void U_CALLCONV dataDirectoryInitFn() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ICU_DATA_DIR_WINDOWS) && U_PLATFORM_HAS_WINUWP_API != 0
|
||||
// Use data from the %windir%\globalization\icu directory
|
||||
// This is only available if ICU is built as a system component
|
||||
char datadir_path_buffer[MAX_PATH];
|
||||
UINT length = GetWindowsDirectoryA(datadir_path_buffer, UPRV_LENGTHOF(datadir_path_buffer));
|
||||
if (length > 0 && length < (UPRV_LENGTHOF(datadir_path_buffer) - sizeof(ICU_DATA_DIR_WINDOWS) - 1))
|
||||
{
|
||||
if (datadir_path_buffer[length - 1] != '\\')
|
||||
{
|
||||
datadir_path_buffer[length++] = '\\';
|
||||
datadir_path_buffer[length] = '\0';
|
||||
}
|
||||
|
||||
if ((length + 1 + sizeof(ICU_DATA_DIR_WINDOWS)) < UPRV_LENGTHOF(datadir_path_buffer))
|
||||
{
|
||||
uprv_strcat(datadir_path_buffer, ICU_DATA_DIR_WINDOWS);
|
||||
path = datadir_path_buffer;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(path==NULL) {
|
||||
/* It looks really bad, set it to something. */
|
||||
#if U_PLATFORM_HAS_WIN32_API
|
||||
// Windows UWP will require icudtl.dat file in same directory as icuuc.dll
|
||||
path = ".\\";
|
||||
#else
|
||||
path = "";
|
||||
#endif
|
||||
}
|
||||
|
||||
u_setDataDirectory(path);
|
||||
@ -1349,7 +1452,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)) {
|
||||
while ((p = uprv_strchr(p, U_FILE_ALT_SEP_CHAR)) != NULL) {
|
||||
*p = U_FILE_SEP_CHAR;
|
||||
}
|
||||
#endif
|
||||
@ -1366,7 +1469,12 @@ static void U_CALLCONV TimeZoneDataDirInitFn(UErrorCode &status) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
#if U_PLATFORM_HAS_WINUWP_API == 0
|
||||
const char *dir = getenv("ICU_TIMEZONE_FILES_DIR");
|
||||
#else
|
||||
// TODO: UWP does not support alternate timezone data directories at this time
|
||||
const char *dir = "";
|
||||
#endif // U_PLATFORM_HAS_WINUWP_API
|
||||
#if defined(U_TIMEZONE_FILES_DIR)
|
||||
if (dir == NULL) {
|
||||
dir = TO_STRING(U_TIMEZONE_FILES_DIR);
|
||||
@ -1603,6 +1711,7 @@ The leftmost codepage (.xxx) wins.
|
||||
|
||||
if (gCorrectedPOSIXLocale == NULL) {
|
||||
gCorrectedPOSIXLocale = correctedPOSIXLocale;
|
||||
gCorrectedPOSIXLocaleHeapAllocated = true;
|
||||
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
|
||||
correctedPOSIXLocale = NULL;
|
||||
}
|
||||
@ -1618,25 +1727,117 @@ The leftmost codepage (.xxx) wins.
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
char *correctedPOSIXLocale = 0;
|
||||
|
||||
// If we have already figured this out just use the cached value
|
||||
if (gCorrectedPOSIXLocale != NULL) {
|
||||
return gCorrectedPOSIXLocale;
|
||||
}
|
||||
|
||||
LCID id = GetThreadLocale();
|
||||
correctedPOSIXLocale = static_cast<char *>(uprv_malloc(POSIX_LOCALE_CAPACITY + 1));
|
||||
if (correctedPOSIXLocale) {
|
||||
int32_t posixLen = uprv_convertToPosix(id, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status);
|
||||
if (U_SUCCESS(status)) {
|
||||
*(correctedPOSIXLocale + posixLen) = 0;
|
||||
gCorrectedPOSIXLocale = correctedPOSIXLocale;
|
||||
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
|
||||
} else {
|
||||
uprv_free(correctedPOSIXLocale);
|
||||
// No cached value, need to determine the current value
|
||||
static WCHAR windowsLocale[LOCALE_NAME_MAX_LENGTH];
|
||||
#if U_PLATFORM_HAS_WINUWP_API == 0
|
||||
// If not a Universal Windows App, we'll need user default language.
|
||||
// Vista and above should use Locale Names instead of LCIDs
|
||||
int length = GetUserDefaultLocaleName(windowsLocale, UPRV_LENGTHOF(windowsLocale));
|
||||
#else
|
||||
// In a UWP app, we want the top language that the application and user agreed upon
|
||||
ComPtr<ABI::Windows::Foundation::Collections::IVectorView<HSTRING>> languageList;
|
||||
|
||||
ComPtr<ABI::Windows::Globalization::IApplicationLanguagesStatics> applicationLanguagesStatics;
|
||||
HRESULT hr = GetActivationFactory(
|
||||
HStringReference(RuntimeClass_Windows_Globalization_ApplicationLanguages).Get(),
|
||||
&applicationLanguagesStatics);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = applicationLanguagesStatics->get_Languages(&languageList);
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// If there is no application context, then use the top language from the user language profile
|
||||
ComPtr<ABI::Windows::System::UserProfile::IGlobalizationPreferencesStatics> globalizationPreferencesStatics;
|
||||
hr = GetActivationFactory(
|
||||
HStringReference(RuntimeClass_Windows_System_UserProfile_GlobalizationPreferences).Get(),
|
||||
&globalizationPreferencesStatics);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = globalizationPreferencesStatics->get_Languages(&languageList);
|
||||
}
|
||||
}
|
||||
|
||||
// We have a list of languages, ICU knows one, so use the top one for our locale
|
||||
HString topLanguage;
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = languageList->GetAt(0, topLanguage.GetAddressOf());
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// Unexpected, use en-US by default
|
||||
if (gCorrectedPOSIXLocale == NULL) {
|
||||
gCorrectedPOSIXLocale = "en_US";
|
||||
}
|
||||
|
||||
return gCorrectedPOSIXLocale;
|
||||
}
|
||||
|
||||
// ResolveLocaleName will get a likely subtags form consistent with Windows behavior.
|
||||
int length = ResolveLocaleName(topLanguage.GetRawBuffer(NULL), windowsLocale, UPRV_LENGTHOF(windowsLocale));
|
||||
#endif
|
||||
// Now we should have a Windows locale name that needs converted to the POSIX style,
|
||||
if (length > 0)
|
||||
{
|
||||
// First we need to go from UTF-16 to char (and also convert from _ to - while we're at it.)
|
||||
char modifiedWindowsLocale[LOCALE_NAME_MAX_LENGTH];
|
||||
|
||||
int32_t i;
|
||||
for (i = 0; i < UPRV_LENGTHOF(modifiedWindowsLocale); i++)
|
||||
{
|
||||
if (windowsLocale[i] == '_')
|
||||
{
|
||||
modifiedWindowsLocale[i] = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
modifiedWindowsLocale[i] = static_cast<char>(windowsLocale[i]);
|
||||
}
|
||||
|
||||
if (modifiedWindowsLocale[i] == '\0')
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= UPRV_LENGTHOF(modifiedWindowsLocale))
|
||||
{
|
||||
// Ran out of room, can't really happen, maybe we'll be lucky about a matching
|
||||
// locale when tags are dropped
|
||||
modifiedWindowsLocale[UPRV_LENGTHOF(modifiedWindowsLocale) - 1] = '\0';
|
||||
}
|
||||
|
||||
// Now normalize the resulting name
|
||||
correctedPOSIXLocale = static_cast<char *>(uprv_malloc(POSIX_LOCALE_CAPACITY + 1));
|
||||
/* TODO: Should we just exit on memory allocation failure? */
|
||||
if (correctedPOSIXLocale)
|
||||
{
|
||||
int32_t posixLen = uloc_canonicalize(modifiedWindowsLocale, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status);
|
||||
if (U_SUCCESS(status))
|
||||
{
|
||||
*(correctedPOSIXLocale + posixLen) = 0;
|
||||
gCorrectedPOSIXLocale = correctedPOSIXLocale;
|
||||
gCorrectedPOSIXLocaleHeapAllocated = true;
|
||||
ucln_common_registerCleanup(UCLN_COMMON_PUTIL, putil_cleanup);
|
||||
}
|
||||
else
|
||||
{
|
||||
uprv_free(correctedPOSIXLocale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If unable to find a locale we can agree upon, use en-US by default
|
||||
if (gCorrectedPOSIXLocale == NULL) {
|
||||
return "en_US";
|
||||
gCorrectedPOSIXLocale = "en_US";
|
||||
}
|
||||
return gCorrectedPOSIXLocale;
|
||||
|
||||
@ -1923,8 +2124,34 @@ int_getDefaultCodepage()
|
||||
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API
|
||||
static char codepage[64];
|
||||
sprintf(codepage, "windows-%d", GetACP());
|
||||
return codepage;
|
||||
DWORD codepageNumber = 0;
|
||||
|
||||
#if U_PLATFORM_HAS_WINUWP_API > 0
|
||||
// UWP doesn't have a direct API to get the default ACP as Microsoft would rather
|
||||
// have folks use Unicode than a "system" code page, however this is the same
|
||||
// codepage as the system default locale codepage. (FWIW, the system locale is
|
||||
// ONLY used for codepage, it should never be used for anything else)
|
||||
GetLocaleInfoEx(LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
|
||||
(LPWSTR)&codepageNumber, sizeof(codepageNumber) / sizeof(WCHAR));
|
||||
#else
|
||||
// Win32 apps can call GetACP
|
||||
codepageNumber = GetACP();
|
||||
#endif
|
||||
// Special case for UTF-8
|
||||
if (codepageNumber == 65001)
|
||||
{
|
||||
return "UTF-8";
|
||||
}
|
||||
// Windows codepages can look like windows-1252, so format the found number
|
||||
// the numbers are eclectic, however all valid system code pages, besides UTF-8
|
||||
// are between 3 and 19999
|
||||
if (codepageNumber > 0 && codepageNumber < 20000)
|
||||
{
|
||||
sprintf(codepage, "windows-%ld", codepageNumber);
|
||||
return codepage;
|
||||
}
|
||||
// If the codepage number call failed then return UTF-8
|
||||
return "UTF-8";
|
||||
|
||||
#elif U_POSIX_LOCALE
|
||||
static char codesetName[100];
|
||||
@ -2108,19 +2335,16 @@ u_getVersion(UVersionInfo versionArray) {
|
||||
* icucfg.h dependent code
|
||||
*/
|
||||
|
||||
#if U_ENABLE_DYLOAD
|
||||
|
||||
#if HAVE_DLOPEN && !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#if U_ENABLE_DYLOAD && HAVE_DLOPEN && !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
||||
#ifdef __MVS__
|
||||
#ifndef __SUSV3
|
||||
#define __SUSV3 1
|
||||
#endif
|
||||
#endif
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#endif /* HAVE_DLFCN_H */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
@ -2160,38 +2384,10 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
return uret.fp;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif U_ENABLE_DYLOAD && U_PLATFORM_USES_ONLY_WIN32_API && !U_PLATFORM_HAS_WINUWP_API
|
||||
|
||||
/* null (nonexistent) implementation. */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
if(U_FAILURE(*status)) return NULL;
|
||||
*status = U_UNSUPPORTED_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
U_INTERNAL void U_EXPORT2
|
||||
uprv_dl_close(void *lib, UErrorCode *status) {
|
||||
if(U_FAILURE(*status)) return;
|
||||
*status = U_UNSUPPORTED_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
U_INTERNAL UVoidFunction* U_EXPORT2
|
||||
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
if(U_SUCCESS(*status)) {
|
||||
*status = U_UNSUPPORTED_ERROR;
|
||||
}
|
||||
return (UVoidFunction*)NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API
|
||||
/* Windows API implementation. */
|
||||
// Note: UWP does not expose/allow these APIs, so the UWP version gets the null implementation. */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
@ -2218,7 +2414,6 @@ uprv_dl_close(void *lib, UErrorCode *status) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
U_INTERNAL UVoidFunction* U_EXPORT2
|
||||
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
HMODULE handle = (HMODULE)lib;
|
||||
@ -2240,10 +2435,9 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* No dynamic loading set. */
|
||||
/* No dynamic loading, null (nonexistent) implementation. */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
@ -2261,7 +2455,6 @@ uprv_dl_close(void *lib, UErrorCode *status) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
U_INTERNAL UVoidFunction* U_EXPORT2
|
||||
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
(void)lib;
|
||||
@ -2272,7 +2465,7 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
return (UVoidFunction*)NULL;
|
||||
}
|
||||
|
||||
#endif /* U_ENABLE_DYLOAD */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey, Emacs, please set the following:
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
******************************************************************************
|
||||
@ -72,22 +72,13 @@
|
||||
typedef size_t uintptr_t;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def U_HAVE_MSVC_2003_OR_EARLIER
|
||||
* Flag for workaround of MSVC 2003 optimization bugs
|
||||
* @internal
|
||||
*/
|
||||
#if !defined(U_HAVE_MSVC_2003_OR_EARLIER) && defined(_MSC_VER) && (_MSC_VER < 1400)
|
||||
#define U_HAVE_MSVC_2003_OR_EARLIER
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/** @{ Information about POSIX support */
|
||||
/*===========================================================================*/
|
||||
|
||||
#ifdef U_HAVE_NL_LANGINFO_CODESET
|
||||
/* Use the predefined value. */
|
||||
#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_ANDROID || U_PLATFORM == U_PF_QNX
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_ANDROID || U_PLATFORM == U_PF_QNX
|
||||
# define U_HAVE_NL_LANGINFO_CODESET 0
|
||||
#else
|
||||
# define U_HAVE_NL_LANGINFO_CODESET 1
|
||||
@ -106,7 +97,10 @@ typedef size_t uintptr_t;
|
||||
#ifdef U_TZSET
|
||||
/* Use the predefined value. */
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API
|
||||
// UWP doesn't support tzset or environment variables for tz
|
||||
#if U_PLATFORM_HAS_WINUWP_API == 0
|
||||
# define U_TZSET _tzset
|
||||
#endif
|
||||
#elif U_PLATFORM == U_PF_OS400
|
||||
/* not defined */
|
||||
#else
|
||||
@ -117,15 +111,15 @@ typedef size_t uintptr_t;
|
||||
/* Use the predefined value. */
|
||||
#elif U_PLATFORM == U_PF_ANDROID
|
||||
# define U_TIMEZONE timezone
|
||||
#elif defined(__UCLIBC__)
|
||||
// uClibc does not have __timezone or _timezone.
|
||||
#elif defined(_NEWLIB_VERSION)
|
||||
# define U_TIMEZONE _timezone
|
||||
#elif defined(__GLIBC__)
|
||||
// glibc
|
||||
# define U_TIMEZONE __timezone
|
||||
#elif U_PLATFORM_IS_LINUX_BASED
|
||||
# if defined(__UCLIBC__)
|
||||
/* uClibc does not have __timezone or _timezone. */
|
||||
# elif defined(_NEWLIB_VERSION)
|
||||
# define U_TIMEZONE _timezone
|
||||
# elif defined(__GLIBC__)
|
||||
/* glibc */
|
||||
# define U_TIMEZONE __timezone
|
||||
# endif
|
||||
// not defined
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API
|
||||
# define U_TIMEZONE _timezone
|
||||
#elif U_PLATFORM == U_PF_BSD && !defined(__NetBSD__)
|
||||
@ -141,7 +135,10 @@ typedef size_t uintptr_t;
|
||||
#ifdef U_TZNAME
|
||||
/* Use the predefined value. */
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API
|
||||
/* not usable on all windows platforms */
|
||||
#if U_PLATFORM_HAS_WINUWP_API == 0
|
||||
# define U_TZNAME _tzname
|
||||
#endif
|
||||
#elif U_PLATFORM == U_PF_OS400
|
||||
/* not defined */
|
||||
#else
|
||||
@ -208,7 +205,7 @@ typedef size_t uintptr_t;
|
||||
/**
|
||||
* \def U_HAVE_STD_ATOMICS
|
||||
* Defines whether the standard C++11 <atomic> is available.
|
||||
* ICU will use this when avialable,
|
||||
* ICU will use this when available,
|
||||
* otherwise will fall back to compiler or platform specific alternatives.
|
||||
* @internal
|
||||
*/
|
||||
@ -233,7 +230,7 @@ typedef size_t uintptr_t;
|
||||
|
||||
/**
|
||||
* \def U_HAVE_CLANG_ATOMICS
|
||||
* Defines whether Clang c11 style built-in atomics are avaialable.
|
||||
* Defines whether Clang c11 style built-in atomics are available.
|
||||
* These are used in preference to gcc atomics when both are available.
|
||||
*/
|
||||
#ifdef U_HAVE_CLANG_ATOMICS
|
||||
@ -271,7 +268,7 @@ typedef size_t uintptr_t;
|
||||
|
||||
/**
|
||||
* Platform utilities isolates the platform dependencies of the
|
||||
* libarary. For each platform which this code is ported to, these
|
||||
* library. For each platform which this code is ported to, these
|
||||
* functions may have to be re-implemented.
|
||||
*/
|
||||
|
||||
@ -419,7 +416,7 @@ U_INTERNAL const char* U_EXPORT2 uprv_getDefaultCodepage(void);
|
||||
|
||||
/**
|
||||
* Please use uloc_getDefault() instead.
|
||||
* Return the default locale ID string by querying ths system, or
|
||||
* Return the default locale ID string by querying the system, or
|
||||
* zero if one cannot be found.
|
||||
* This function can call setlocale() on Unix platforms. Please read the
|
||||
* platform documentation on setlocale() before calling this function.
|
||||
|
File diff suppressed because it is too large
Load Diff
630
source/common/rbbi_cache.cpp
Normal file
630
source/common/rbbi_cache.cpp
Normal file
@ -0,0 +1,630 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
// file: rbbi_cache.cpp
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "unicode/ubrk.h"
|
||||
#include "unicode/rbbi.h"
|
||||
|
||||
#include "rbbi_cache.h"
|
||||
|
||||
#include "brkeng.h"
|
||||
#include "cmemory.h"
|
||||
#include "rbbidata.h"
|
||||
#include "rbbirb.h"
|
||||
#include "uassert.h"
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/*
|
||||
* DictionaryCache implementation
|
||||
*/
|
||||
|
||||
RuleBasedBreakIterator::DictionaryCache::DictionaryCache(RuleBasedBreakIterator *bi, UErrorCode &status) :
|
||||
fBI(bi), fBreaks(NULL), fPositionInCache(-1),
|
||||
fStart(0), fLimit(0), fFirstRuleStatusIndex(0), fOtherRuleStatusIndex(0) {
|
||||
fBreaks = new UVector32(status);
|
||||
}
|
||||
|
||||
RuleBasedBreakIterator::DictionaryCache::~DictionaryCache() {
|
||||
delete fBreaks;
|
||||
fBreaks = NULL;
|
||||
}
|
||||
|
||||
void RuleBasedBreakIterator::DictionaryCache::reset() {
|
||||
fPositionInCache = -1;
|
||||
fStart = 0;
|
||||
fLimit = 0;
|
||||
fFirstRuleStatusIndex = 0;
|
||||
fOtherRuleStatusIndex = 0;
|
||||
fBreaks->removeAllElements();
|
||||
}
|
||||
|
||||
UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_t *result, int32_t *statusIndex) {
|
||||
if (fromPos >= fLimit || fromPos < fStart) {
|
||||
fPositionInCache = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Sequential iteration, move from previous boundary to the following
|
||||
|
||||
int32_t r = 0;
|
||||
if (fPositionInCache >= 0 && fPositionInCache < fBreaks->size() && fBreaks->elementAti(fPositionInCache) == fromPos) {
|
||||
++fPositionInCache;
|
||||
if (fPositionInCache >= fBreaks->size()) {
|
||||
fPositionInCache = -1;
|
||||
return FALSE;
|
||||
}
|
||||
r = fBreaks->elementAti(fPositionInCache);
|
||||
U_ASSERT(r > fromPos);
|
||||
*result = r;
|
||||
*statusIndex = fOtherRuleStatusIndex;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Random indexing. Linear search for the boundary following the given position.
|
||||
|
||||
for (fPositionInCache = 0; fPositionInCache < fBreaks->size(); ++fPositionInCache) {
|
||||
r= fBreaks->elementAti(fPositionInCache);
|
||||
if (r > fromPos) {
|
||||
*result = r;
|
||||
*statusIndex = fOtherRuleStatusIndex;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
U_ASSERT(FALSE);
|
||||
fPositionInCache = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_t *result, int32_t *statusIndex) {
|
||||
if (fromPos <= fStart || fromPos > fLimit) {
|
||||
fPositionInCache = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fromPos == fLimit) {
|
||||
fPositionInCache = fBreaks->size() - 1;
|
||||
if (fPositionInCache >= 0) {
|
||||
U_ASSERT(fBreaks->elementAti(fPositionInCache) == fromPos);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t r;
|
||||
if (fPositionInCache > 0 && fPositionInCache < fBreaks->size() && fBreaks->elementAti(fPositionInCache) == fromPos) {
|
||||
--fPositionInCache;
|
||||
r = fBreaks->elementAti(fPositionInCache);
|
||||
U_ASSERT(r < fromPos);
|
||||
*result = r;
|
||||
*statusIndex = ( r== fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (fPositionInCache == 0) {
|
||||
fPositionInCache = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (fPositionInCache = fBreaks->size()-1; fPositionInCache >= 0; --fPositionInCache) {
|
||||
r = fBreaks->elementAti(fPositionInCache);
|
||||
if (r < fromPos) {
|
||||
*result = r;
|
||||
*statusIndex = ( r == fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
U_ASSERT(FALSE);
|
||||
fPositionInCache = -1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPos, int32_t endPos,
|
||||
int32_t firstRuleStatus, int32_t otherRuleStatus) {
|
||||
if ((endPos - startPos) <= 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
reset();
|
||||
fFirstRuleStatusIndex = firstRuleStatus;
|
||||
fOtherRuleStatusIndex = otherRuleStatus;
|
||||
|
||||
int32_t rangeStart = startPos;
|
||||
int32_t rangeEnd = endPos;
|
||||
|
||||
uint16_t category;
|
||||
int32_t current;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
int32_t foundBreakCount = 0;
|
||||
UText *text = fBI->fText;
|
||||
|
||||
// Loop through the text, looking for ranges of dictionary characters.
|
||||
// For each span, find the appropriate break engine, and ask it to find
|
||||
// any breaks within the span.
|
||||
|
||||
utext_setNativeIndex(text, rangeStart);
|
||||
UChar32 c = utext_current32(text);
|
||||
category = UTRIE2_GET16(fBI->fData->fTrie, c);
|
||||
|
||||
while(U_SUCCESS(status)) {
|
||||
while((current = (int32_t)UTEXT_GETNATIVEINDEX(text)) < rangeEnd && (category & 0x4000) == 0) {
|
||||
utext_next32(text); // TODO: cleaner loop structure.
|
||||
c = utext_current32(text);
|
||||
category = UTRIE2_GET16(fBI->fData->fTrie, c);
|
||||
}
|
||||
if (current >= rangeEnd) {
|
||||
break;
|
||||
}
|
||||
|
||||
// We now have a dictionary character. Get the appropriate language object
|
||||
// to deal with it.
|
||||
const LanguageBreakEngine *lbe = fBI->getLanguageBreakEngine(c);
|
||||
|
||||
// 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, fBI->fBreakType, *fBreaks);
|
||||
}
|
||||
|
||||
// Reload the loop variables for the next go-round
|
||||
c = utext_current32(text);
|
||||
category = UTRIE2_GET16(fBI->fData->fTrie, c);
|
||||
}
|
||||
|
||||
// If we found breaks, ensure that the first and last entries are
|
||||
// the original starting and ending position. And initialize the
|
||||
// cache iteration position to the first entry.
|
||||
|
||||
// printf("foundBreakCount = %d\n", foundBreakCount);
|
||||
if (foundBreakCount > 0) {
|
||||
U_ASSERT(foundBreakCount == fBreaks->size());
|
||||
if (startPos < fBreaks->elementAti(0)) {
|
||||
// The dictionary did not place a boundary at the start of the segment of text.
|
||||
// Add one now. This should not commonly happen, but it would be easy for interactions
|
||||
// of the rules for dictionary segments and the break engine implementations to
|
||||
// inadvertently cause it. Cover it here, just in case.
|
||||
fBreaks->insertElementAt(startPos, 0, status);
|
||||
}
|
||||
if (endPos > fBreaks->peeki()) {
|
||||
fBreaks->push(endPos, status);
|
||||
}
|
||||
fPositionInCache = 0;
|
||||
// Note: Dictionary matching may extend beyond the original limit.
|
||||
fStart = fBreaks->elementAti(0);
|
||||
fLimit = fBreaks->peeki();
|
||||
} else {
|
||||
// there were no language-based breaks, even though the segment contained
|
||||
// dictionary characters. Subsequent attempts to fetch boundaries from the dictionary cache
|
||||
// for this range will fail, and the calling code will fall back to the rule based boundaries.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* BreakCache implemetation
|
||||
*/
|
||||
|
||||
RuleBasedBreakIterator::BreakCache::BreakCache(RuleBasedBreakIterator *bi, UErrorCode &status) :
|
||||
fBI(bi), fSideBuffer(status) {
|
||||
reset();
|
||||
}
|
||||
|
||||
|
||||
RuleBasedBreakIterator::BreakCache::~BreakCache() {
|
||||
}
|
||||
|
||||
|
||||
void RuleBasedBreakIterator::BreakCache::reset(int32_t pos, int32_t ruleStatus) {
|
||||
fStartBufIdx = 0;
|
||||
fEndBufIdx = 0;
|
||||
fTextIdx = pos;
|
||||
fBufIdx = 0;
|
||||
fBoundaries[0] = pos;
|
||||
fStatuses[0] = (uint16_t)ruleStatus;
|
||||
}
|
||||
|
||||
|
||||
int32_t RuleBasedBreakIterator::BreakCache::current() {
|
||||
fBI->fPosition = fTextIdx;
|
||||
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
|
||||
fBI->fDone = FALSE;
|
||||
return fTextIdx;
|
||||
}
|
||||
|
||||
|
||||
void RuleBasedBreakIterator::BreakCache::following(int32_t startPos, UErrorCode &status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
if (startPos == fTextIdx || seek(startPos) || populateNear(startPos, status)) {
|
||||
// startPos is in the cache. Do a next() from that position.
|
||||
// TODO: an awkward set of interactions with bi->fDone
|
||||
// seek() does not clear it; it can't because of interactions with populateNear().
|
||||
// next() does not clear it in the fast-path case, where everything matters. Maybe it should.
|
||||
// So clear it here, for the case where seek() succeeded on an iterator that had previously run off the end.
|
||||
fBI->fDone = false;
|
||||
next();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RuleBasedBreakIterator::BreakCache::preceding(int32_t startPos, UErrorCode &status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
if (startPos == fTextIdx || seek(startPos) || populateNear(startPos, status)) {
|
||||
if (startPos == fTextIdx) {
|
||||
previous(status);
|
||||
} else {
|
||||
// seek() leaves the BreakCache positioned at the preceding boundary
|
||||
// if the requested position is between two bounaries.
|
||||
// current() pushes the BreakCache position out to the BreakIterator itself.
|
||||
U_ASSERT(startPos > fTextIdx);
|
||||
current();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Out-of-line code for BreakCache::next().
|
||||
* Cache does not already contain the boundary
|
||||
*/
|
||||
void RuleBasedBreakIterator::BreakCache::nextOL() {
|
||||
fBI->fDone = !populateFollowing();
|
||||
fBI->fPosition = fTextIdx;
|
||||
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void RuleBasedBreakIterator::BreakCache::previous(UErrorCode &status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
int32_t initialBufIdx = fBufIdx;
|
||||
if (fBufIdx == fStartBufIdx) {
|
||||
// At start of cache. Prepend to it.
|
||||
populatePreceding(status);
|
||||
} else {
|
||||
// Cache already holds the next boundary
|
||||
fBufIdx = modChunkSize(fBufIdx - 1);
|
||||
fTextIdx = fBoundaries[fBufIdx];
|
||||
}
|
||||
fBI->fDone = (fBufIdx == initialBufIdx);
|
||||
fBI->fPosition = fTextIdx;
|
||||
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) {
|
||||
if (pos < fBoundaries[fStartBufIdx] || pos > fBoundaries[fEndBufIdx]) {
|
||||
return FALSE;
|
||||
}
|
||||
if (pos == fBoundaries[fStartBufIdx]) {
|
||||
// Common case: seek(0), from BreakIterator::first()
|
||||
fBufIdx = fStartBufIdx;
|
||||
fTextIdx = fBoundaries[fBufIdx];
|
||||
return TRUE;
|
||||
}
|
||||
if (pos == fBoundaries[fEndBufIdx]) {
|
||||
fBufIdx = fEndBufIdx;
|
||||
fTextIdx = fBoundaries[fBufIdx];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int32_t min = fStartBufIdx;
|
||||
int32_t max = fEndBufIdx;
|
||||
while (min != max) {
|
||||
int32_t probe = (min + max + (min>max ? CACHE_SIZE : 0)) / 2;
|
||||
probe = modChunkSize(probe);
|
||||
if (fBoundaries[probe] > pos) {
|
||||
max = probe;
|
||||
} else {
|
||||
min = modChunkSize(probe + 1);
|
||||
}
|
||||
}
|
||||
U_ASSERT(fBoundaries[max] > pos);
|
||||
fBufIdx = modChunkSize(max - 1);
|
||||
fTextIdx = fBoundaries[fBufIdx];
|
||||
U_ASSERT(fTextIdx <= pos);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
UBool RuleBasedBreakIterator::BreakCache::populateNear(int32_t position, UErrorCode &status) {
|
||||
if (U_FAILURE(status)) {
|
||||
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.
|
||||
|
||||
|
||||
// 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;
|
||||
// TODO: check for position == length of text. Although may still need to back up to get rule status.
|
||||
if (position > 20) {
|
||||
int32_t backupPos = fBI->handlePrevious(position);
|
||||
fBI->fPosition = backupPos;
|
||||
aBoundary = fBI->handleNext(); // Ignore dictionary, just finding a rule based boundary.
|
||||
ruleStatusIndex = fBI->fRuleStatusIndex;
|
||||
}
|
||||
reset(aBoundary, ruleStatusIndex); // Reset cache to hold aBoundary as a single starting point.
|
||||
}
|
||||
|
||||
// Fill in boundaries between existing cache content and the new requested position.
|
||||
|
||||
if (fBoundaries[fEndBufIdx] < position) {
|
||||
// The last position in the cache precedes the requested position.
|
||||
// Add following position(s) to the cache.
|
||||
while (fBoundaries[fEndBufIdx] < position) {
|
||||
if (!populateFollowing()) {
|
||||
U_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
fBufIdx = fEndBufIdx; // Set iterator position to the end of the buffer.
|
||||
fTextIdx = fBoundaries[fBufIdx]; // Required because populateFollowing may add extra boundaries.
|
||||
while (fTextIdx > position) { // Move backwards to a position at or preceding the requested pos.
|
||||
previous(status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fBoundaries[fStartBufIdx] > position) {
|
||||
// The first position in the cache is beyond the requested position.
|
||||
// back up more until we get a boundary <= the requested position.
|
||||
while (fBoundaries[fStartBufIdx] > position) {
|
||||
populatePreceding(status);
|
||||
}
|
||||
fBufIdx = fStartBufIdx; // Set iterator position to the start of the buffer.
|
||||
fTextIdx = fBoundaries[fBufIdx]; // Required because populatePreceding may add extra boundaries.
|
||||
while (fTextIdx < position) { // Move forwards to a position at or following the requested pos.
|
||||
next();
|
||||
}
|
||||
if (fTextIdx > position) {
|
||||
// If position is not itself a boundary, the next() loop above will overshoot.
|
||||
// Back up one, leaving cache position at the boundary preceding the requested position.
|
||||
previous(status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
U_ASSERT(fTextIdx == position);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
UBool RuleBasedBreakIterator::BreakCache::populateFollowing() {
|
||||
int32_t fromPosition = fBoundaries[fEndBufIdx];
|
||||
int32_t fromRuleStatusIdx = fStatuses[fEndBufIdx];
|
||||
int32_t pos = 0;
|
||||
int32_t ruleStatusIdx = 0;
|
||||
|
||||
if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) {
|
||||
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
fBI->fPosition = fromPosition;
|
||||
pos = fBI->handleNext();
|
||||
if (pos == UBRK_DONE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ruleStatusIdx = fBI->fRuleStatusIndex;
|
||||
if (fBI->fDictionaryCharCount > 0) {
|
||||
// The text segment obtained from the rules includes dictionary characters.
|
||||
// Subdivide it, with subdivided results going into the dictionary cache.
|
||||
fBI->fDictionaryCache->populateDictionary(fromPosition, pos, fromRuleStatusIdx, ruleStatusIdx);
|
||||
if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) {
|
||||
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
|
||||
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().
|
||||
}
|
||||
}
|
||||
|
||||
// Rule based segment did not include dictionary characters.
|
||||
// Or, it did contain dictionary chars, but the dictionary segmenter didn't handle them,
|
||||
// meaning that we didn't take the return, above.
|
||||
// Add its end point to the cache.
|
||||
addFollowing(pos, ruleStatusIdx, UpdateCachePosition);
|
||||
|
||||
// Add several non-dictionary boundaries at this point, to optimize straight forward iteration.
|
||||
// (subsequent calls to BreakIterator::next() will take the fast path, getting cached results.
|
||||
//
|
||||
for (int count=0; count<6; ++count) {
|
||||
pos = fBI->handleNext();
|
||||
if (pos == UBRK_DONE || fBI->fDictionaryCharCount > 0) {
|
||||
break;
|
||||
}
|
||||
addFollowing(pos, fBI->fRuleStatusIndex, RetainCachePosition);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) {
|
||||
if (U_FAILURE(status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int32_t fromPosition = fBoundaries[fStartBufIdx];
|
||||
if (fromPosition == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int32_t position = 0;
|
||||
int32_t positionStatusIdx = 0;
|
||||
|
||||
if (fBI->fDictionaryCache->preceding(fromPosition, &position, &positionStatusIdx)) {
|
||||
addPreceding(position, positionStatusIdx, UpdateCachePosition);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int32_t backupPosition = fromPosition;
|
||||
|
||||
// Find a boundary somewhere preceding the first already-cached boundary
|
||||
do {
|
||||
backupPosition = backupPosition - 30;
|
||||
if (backupPosition <= 0) {
|
||||
backupPosition = 0;
|
||||
} else {
|
||||
backupPosition = fBI->handlePrevious(backupPosition);
|
||||
}
|
||||
if (backupPosition == UBRK_DONE || backupPosition == 0) {
|
||||
position = 0;
|
||||
positionStatusIdx = 0;
|
||||
} else {
|
||||
fBI->fPosition = backupPosition; // TODO: pass starting position in a clearer way.
|
||||
position = fBI->handleNext();
|
||||
positionStatusIdx = fBI->fRuleStatusIndex;
|
||||
|
||||
}
|
||||
} while (position >= fromPosition);
|
||||
|
||||
// Find boundaries between the one we just located and the first already-cached boundary
|
||||
// Put them in a side buffer, because we don't yet know where they will fall in the circular cache buffer..
|
||||
|
||||
fSideBuffer.removeAllElements();
|
||||
fSideBuffer.addElement(position, status);
|
||||
fSideBuffer.addElement(positionStatusIdx, status);
|
||||
|
||||
do {
|
||||
int32_t prevPosition = fBI->fPosition = position;
|
||||
int32_t prevStatusIdx = positionStatusIdx;
|
||||
position = fBI->handleNext();
|
||||
positionStatusIdx = fBI->fRuleStatusIndex;
|
||||
if (position == UBRK_DONE) {
|
||||
break;
|
||||
}
|
||||
|
||||
UBool segmentHandledByDictionary = FALSE;
|
||||
if (fBI->fDictionaryCharCount != 0) {
|
||||
// Segment from the rules includes dictionary characters.
|
||||
// Subdivide it, with subdivided results going into the dictionary cache.
|
||||
int32_t dictSegEndPosition = position;
|
||||
fBI->fDictionaryCache->populateDictionary(prevPosition, dictSegEndPosition, prevStatusIdx, positionStatusIdx);
|
||||
while (fBI->fDictionaryCache->following(prevPosition, &position, &positionStatusIdx)) {
|
||||
segmentHandledByDictionary = true;
|
||||
U_ASSERT(position > prevPosition);
|
||||
if (position >= fromPosition) {
|
||||
break;
|
||||
}
|
||||
U_ASSERT(position <= dictSegEndPosition);
|
||||
fSideBuffer.addElement(position, status);
|
||||
fSideBuffer.addElement(positionStatusIdx, status);
|
||||
prevPosition = position;
|
||||
}
|
||||
U_ASSERT(position==dictSegEndPosition || position>=fromPosition);
|
||||
}
|
||||
|
||||
if (!segmentHandledByDictionary && position < fromPosition) {
|
||||
fSideBuffer.addElement(position, status);
|
||||
fSideBuffer.addElement(positionStatusIdx, status);
|
||||
}
|
||||
} while (position < fromPosition);
|
||||
|
||||
// Move boundaries from the side buffer to the main circular buffer.
|
||||
UBool success = FALSE;
|
||||
if (!fSideBuffer.isEmpty()) {
|
||||
positionStatusIdx = fSideBuffer.popi();
|
||||
position = fSideBuffer.popi();
|
||||
addPreceding(position, positionStatusIdx, UpdateCachePosition);
|
||||
success = TRUE;
|
||||
}
|
||||
|
||||
while (!fSideBuffer.isEmpty()) {
|
||||
positionStatusIdx = fSideBuffer.popi();
|
||||
position = fSideBuffer.popi();
|
||||
if (!addPreceding(position, positionStatusIdx, RetainCachePosition)) {
|
||||
// No space in circular buffer to hold a new preceding result while
|
||||
// also retaining the current cache (iteration) position.
|
||||
// Bailing out is safe; the cache will refill again if needed.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
void RuleBasedBreakIterator::BreakCache::addFollowing(int32_t position, int32_t ruleStatusIdx, UpdatePositionValues update) {
|
||||
U_ASSERT(position > fBoundaries[fEndBufIdx]);
|
||||
U_ASSERT(ruleStatusIdx <= UINT16_MAX);
|
||||
int32_t nextIdx = modChunkSize(fEndBufIdx + 1);
|
||||
if (nextIdx == fStartBufIdx) {
|
||||
fStartBufIdx = modChunkSize(fStartBufIdx + 6); // TODO: experiment. Probably revert to 1.
|
||||
}
|
||||
fBoundaries[nextIdx] = position;
|
||||
fStatuses[nextIdx] = ruleStatusIdx;
|
||||
fEndBufIdx = nextIdx;
|
||||
if (update == UpdateCachePosition) {
|
||||
// Set current position to the newly added boundary.
|
||||
fBufIdx = nextIdx;
|
||||
fTextIdx = position;
|
||||
} else {
|
||||
// Retaining the original cache position.
|
||||
// Check if the added boundary wraps around the buffer, and would over-write the original position.
|
||||
// It's the responsibility of callers of this function to not add too many.
|
||||
U_ASSERT(nextIdx != fBufIdx);
|
||||
}
|
||||
}
|
||||
|
||||
bool RuleBasedBreakIterator::BreakCache::addPreceding(int32_t position, int32_t ruleStatusIdx, UpdatePositionValues update) {
|
||||
U_ASSERT(position < fBoundaries[fStartBufIdx]);
|
||||
U_ASSERT(ruleStatusIdx <= UINT16_MAX);
|
||||
int32_t nextIdx = modChunkSize(fStartBufIdx - 1);
|
||||
if (nextIdx == fEndBufIdx) {
|
||||
if (fBufIdx == fEndBufIdx && update == RetainCachePosition) {
|
||||
// Failure. The insertion of the new boundary would claim the buffer position that is the
|
||||
// current iteration position. And we also want to retain the current iteration position.
|
||||
// (The buffer is already completely full of entries that precede the iteration position.)
|
||||
return false;
|
||||
}
|
||||
fEndBufIdx = modChunkSize(fEndBufIdx - 1);
|
||||
}
|
||||
fBoundaries[nextIdx] = position;
|
||||
fStatuses[nextIdx] = ruleStatusIdx;
|
||||
fStartBufIdx = nextIdx;
|
||||
if (update == UpdateCachePosition) {
|
||||
fBufIdx = nextIdx;
|
||||
fTextIdx = position;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void RuleBasedBreakIterator::BreakCache::dumpCache() {
|
||||
#ifdef RBBI_DEBUG
|
||||
RBBIDebugPrintf("fTextIdx:%d fBufIdx:%d\n", fTextIdx, fBufIdx);
|
||||
for (int32_t i=fStartBufIdx; ; i=modChunkSize(i+1)) {
|
||||
RBBIDebugPrintf("%d %d\n", i, fBoundaries[i]);
|
||||
if (i == fEndBufIdx) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // #if !UCONFIG_NO_BREAK_ITERATION
|
203
source/common/rbbi_cache.h
Normal file
203
source/common/rbbi_cache.h
Normal file
@ -0,0 +1,203 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
// file: rbbi_cache.h
|
||||
//
|
||||
#ifndef RBBI_CACHE_H
|
||||
#define RBBI_CACHE_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "unicode/rbbi.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
/* DictionaryCache stores the boundaries obtained from a run of dictionary characters.
|
||||
* Dictionary boundaries are moved first to this cache, then from here
|
||||
* to the main BreakCache, where they may inter-leave with non-dictionary
|
||||
* boundaries. The public BreakIterator API always fetches directly
|
||||
* from the main BreakCache, not from here.
|
||||
*
|
||||
* In common situations, the number of boundaries in a single dictionary run
|
||||
* should be quite small, it will be terminated by punctuation, spaces,
|
||||
* or any other non-dictionary characters. The main BreakCache may end
|
||||
* up with boundaries from multiple dictionary based runs.
|
||||
*
|
||||
* The boundaries are stored in a simple ArrayList (vector), with the
|
||||
* assumption that they will be accessed sequentially.
|
||||
*/
|
||||
class RuleBasedBreakIterator::DictionaryCache: public UMemory {
|
||||
public:
|
||||
DictionaryCache(RuleBasedBreakIterator *bi, UErrorCode &status);
|
||||
~DictionaryCache();
|
||||
|
||||
void reset();
|
||||
|
||||
UBool following(int32_t fromPos, int32_t *pos, int32_t *statusIndex);
|
||||
UBool preceding(int32_t fromPos, int32_t *pos, int32_t *statusIndex);
|
||||
|
||||
/**
|
||||
* Populate the cache with the dictionary based boundaries within a region of text.
|
||||
* @param startPos The start position of a range of text
|
||||
* @param endPos The end position of a range of text
|
||||
* @param firstRuleStatus The rule status index that applies to the break at startPos
|
||||
* @param otherRuleStatus The rule status index that applies to boundaries other than startPos
|
||||
* @internal
|
||||
*/
|
||||
void populateDictionary(int32_t startPos, int32_t endPos,
|
||||
int32_t firstRuleStatus, int32_t otherRuleStatus);
|
||||
|
||||
|
||||
|
||||
RuleBasedBreakIterator *fBI;
|
||||
|
||||
UVector32 *fBreaks; // A vector containing the boundaries.
|
||||
int32_t fPositionInCache; // Index in fBreaks of last boundary returned by following()
|
||||
// or preceding(). Optimizes sequential access.
|
||||
int32_t fStart; // Text position of first boundary in cache.
|
||||
int32_t fLimit; // Last boundary in cache. Which is the limit of the
|
||||
// text segment being handled by the dictionary.
|
||||
int32_t fFirstRuleStatusIndex; // Rule status info for first boundary.
|
||||
int32_t fOtherRuleStatusIndex; // Rule status info for 2nd through last boundaries.
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* class BreakCache
|
||||
*
|
||||
* Cache of break boundary positions and rule status values.
|
||||
* Break iterator API functions, next(), previous(), etc., will use cached results
|
||||
* when possible, and otherwise cache new results as they are obtained.
|
||||
*
|
||||
* Uniformly caches both dictionary and rule based (non-dictionary) boundaries.
|
||||
*
|
||||
* The cache is implemented as a single circular buffer.
|
||||
*/
|
||||
|
||||
/*
|
||||
* size of the circular cache buffer.
|
||||
*/
|
||||
|
||||
class RuleBasedBreakIterator::BreakCache: public UMemory {
|
||||
public:
|
||||
BreakCache(RuleBasedBreakIterator *bi, UErrorCode &status);
|
||||
virtual ~BreakCache();
|
||||
void reset(int32_t pos = 0, int32_t ruleStatus = 0);
|
||||
void next() { if (fBufIdx == fEndBufIdx) {
|
||||
nextOL();
|
||||
} else {
|
||||
fBufIdx = modChunkSize(fBufIdx + 1);
|
||||
fTextIdx = fBI->fPosition = fBoundaries[fBufIdx];
|
||||
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void nextOL();
|
||||
void previous(UErrorCode &status);
|
||||
|
||||
// Move the iteration state to the position following the startPosition.
|
||||
// Input position must be pinned to the input length.
|
||||
void following(int32_t startPosition, UErrorCode &status);
|
||||
|
||||
void preceding(int32_t startPosition, UErrorCode &status);
|
||||
|
||||
/*
|
||||
* Update the state of the public BreakIterator (fBI) to reflect the
|
||||
* current state of the break iterator cache (this).
|
||||
*/
|
||||
int32_t current();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* Return FALSE if the operation failed.
|
||||
*/
|
||||
UBool populateNear(int32_t position, UErrorCode &status);
|
||||
|
||||
/**
|
||||
* Add boundary(s) to the cache following the current last boundary.
|
||||
* Return FALSE if at the end of the text, and no more boundaries can be added.
|
||||
* Leave iteration position at the first newly added boundary, or unchanged if no boundary was added.
|
||||
*/
|
||||
UBool populateFollowing();
|
||||
|
||||
/**
|
||||
* Add one or more boundaries to the cache preceding the first currently cached boundary.
|
||||
* Leave the iteration position on the first added boundary.
|
||||
* Return false if no boundaries could be added (if at the start of the text.)
|
||||
*/
|
||||
UBool populatePreceding(UErrorCode &status);
|
||||
|
||||
enum UpdatePositionValues {
|
||||
RetainCachePosition = 0,
|
||||
UpdateCachePosition = 1
|
||||
};
|
||||
|
||||
/*
|
||||
* Add the boundary following the current position.
|
||||
* The current position can be left as it was, or changed to the newly added boundary,
|
||||
* as specified by the update parameter.
|
||||
*/
|
||||
void addFollowing(int32_t position, int32_t ruleStatusIdx, UpdatePositionValues update);
|
||||
|
||||
|
||||
/*
|
||||
* Add the boundary preceding the current position.
|
||||
* The current position can be left as it was, or changed to the newly added boundary,
|
||||
* as specified by the update parameter.
|
||||
*/
|
||||
bool addPreceding(int32_t position, int32_t ruleStatusIdx, UpdatePositionValues update);
|
||||
|
||||
/**
|
||||
* Set the cache position to the specified position, or, if the position
|
||||
* falls between to cached boundaries, to the preceding boundary.
|
||||
* Fails if the requested position is outside of the range of boundaries currently held by the cache.
|
||||
* The startPosition must be on a code point boundary.
|
||||
*
|
||||
* Return TRUE if successful, FALSE if the specified position is after
|
||||
* the last cached boundary or before the first.
|
||||
*/
|
||||
UBool seek(int32_t startPosition);
|
||||
|
||||
void dumpCache();
|
||||
|
||||
private:
|
||||
static inline int32_t modChunkSize(int index) { return index & (CACHE_SIZE - 1); };
|
||||
|
||||
static constexpr int32_t CACHE_SIZE = 128;
|
||||
static_assert((CACHE_SIZE & (CACHE_SIZE-1)) == 0, "CACHE_SIZE must be power of two.");
|
||||
|
||||
RuleBasedBreakIterator *fBI;
|
||||
int32_t fStartBufIdx;
|
||||
int32_t fEndBufIdx; // inclusive
|
||||
|
||||
int32_t fTextIdx;
|
||||
int32_t fBufIdx;
|
||||
|
||||
int32_t fBoundaries[CACHE_SIZE];
|
||||
uint16_t fStatuses[CACHE_SIZE];
|
||||
|
||||
UVector32 fSideBuffer;
|
||||
};
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // #if !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#endif // RBBI_CACHE_H
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
***************************************************************************
|
||||
@ -14,7 +14,7 @@
|
||||
#include "unicode/utypes.h"
|
||||
#include "rbbidata.h"
|
||||
#include "rbbirb.h"
|
||||
#include "utrie.h"
|
||||
#include "utrie2.h"
|
||||
#include "udatamem.h"
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
@ -23,23 +23,6 @@
|
||||
#include "uassert.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
//
|
||||
// Trie access folding function. Copied as-is from properties code in uchar.c
|
||||
//
|
||||
//-----------------------------------------------------------------------------------
|
||||
U_CDECL_BEGIN
|
||||
static int32_t U_CALLCONV
|
||||
getFoldingOffset(uint32_t data) {
|
||||
/* if bit 15 is set, then the folding offset is in bits 14..0 of the 16-bit trie result */
|
||||
if(data&0x8000) {
|
||||
return (int32_t)(data&0x7fff);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -71,9 +54,8 @@ RBBIDataWrapper::RBBIDataWrapper(UDataMemory* udm, UErrorCode &status) {
|
||||
dh->info.dataFormat[0] == 0x42 && // dataFormat="Brk "
|
||||
dh->info.dataFormat[1] == 0x72 &&
|
||||
dh->info.dataFormat[2] == 0x6b &&
|
||||
dh->info.dataFormat[3] == 0x20)
|
||||
// Note: info.fFormatVersion is duplicated in the RBBIDataHeader, and is
|
||||
// validated when checking that.
|
||||
dh->info.dataFormat[3] == 0x20 &&
|
||||
isDataVersionAcceptable(dh->info.formatVersion))
|
||||
) {
|
||||
status = U_INVALID_FORMAT_ERROR;
|
||||
return;
|
||||
@ -84,6 +66,11 @@ RBBIDataWrapper::RBBIDataWrapper(UDataMemory* udm, UErrorCode &status) {
|
||||
fUDataMem = udm;
|
||||
}
|
||||
|
||||
UBool RBBIDataWrapper::isDataVersionAcceptable(const UVersionInfo version) {
|
||||
return RBBI_DATA_FORMAT_VERSION[0] == version[0];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// init(). Does most of the work of construction, shared between the
|
||||
@ -96,10 +83,11 @@ void RBBIDataWrapper::init0() {
|
||||
fReverseTable = NULL;
|
||||
fSafeFwdTable = NULL;
|
||||
fSafeRevTable = NULL;
|
||||
fRuleSource = NULL;
|
||||
fRuleSource = NULL;
|
||||
fRuleStatusTable = NULL;
|
||||
fUDataMem = NULL;
|
||||
fRefCount = 0;
|
||||
fTrie = NULL;
|
||||
fUDataMem = NULL;
|
||||
fRefCount = 0;
|
||||
fDontFreeData = TRUE;
|
||||
}
|
||||
|
||||
@ -108,8 +96,7 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
|
||||
return;
|
||||
}
|
||||
fHeader = data;
|
||||
if (fHeader->fMagic != 0xb1a0 || fHeader->fFormatVersion[0] != 3)
|
||||
{
|
||||
if (fHeader->fMagic != 0xb1a0 || !isDataVersionAcceptable(fHeader->fFormatVersion)) {
|
||||
status = U_INVALID_FORMAT_ERROR;
|
||||
return;
|
||||
}
|
||||
@ -131,16 +118,23 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
|
||||
fSafeRevTable = (RBBIStateTable *)((char *)data + fHeader->fSRTable);
|
||||
}
|
||||
|
||||
// Rule Compatibility Hacks
|
||||
// If a rule set includes reverse rules but does not explicitly include safe reverse rules,
|
||||
// the reverse rules are to be treated as safe reverse rules.
|
||||
|
||||
utrie_unserialize(&fTrie,
|
||||
(uint8_t *)data + fHeader->fTrie,
|
||||
fHeader->fTrieLen,
|
||||
&status);
|
||||
if (fSafeRevTable == NULL && fReverseTable != NULL) {
|
||||
fSafeRevTable = fReverseTable;
|
||||
fReverseTable = NULL;
|
||||
}
|
||||
|
||||
fTrie = utrie2_openFromSerialized(UTRIE2_16_VALUE_BITS,
|
||||
(uint8_t *)data + fHeader->fTrie,
|
||||
fHeader->fTrieLen,
|
||||
NULL, // *actual length
|
||||
&status);
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
fTrie.getFoldingOffset=getFoldingOffset;
|
||||
|
||||
|
||||
fRuleSource = (UChar *)((char *)data + fHeader->fRuleSource);
|
||||
fRuleString.setTo(TRUE, fRuleSource, -1);
|
||||
@ -165,6 +159,8 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) {
|
||||
//-----------------------------------------------------------------------------
|
||||
RBBIDataWrapper::~RBBIDataWrapper() {
|
||||
U_ASSERT(fRefCount == 0);
|
||||
utrie2_close(fTrie);
|
||||
fTrie = NULL;
|
||||
if (fUDataMem) {
|
||||
udata_close(fUDataMem);
|
||||
} else if (!fDontFreeData) {
|
||||
@ -323,7 +319,7 @@ ubrk_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outD
|
||||
pInfo->dataFormat[1]==0x72 &&
|
||||
pInfo->dataFormat[2]==0x6b &&
|
||||
pInfo->dataFormat[3]==0x20 &&
|
||||
pInfo->formatVersion[0]==3 )) {
|
||||
RBBIDataWrapper::isDataVersionAcceptable(pInfo->formatVersion) )) {
|
||||
udata_printError(ds, "ubrk_swap(): data format %02x.%02x.%02x.%02x (format version %02x) is not recognized\n",
|
||||
pInfo->dataFormat[0], pInfo->dataFormat[1],
|
||||
pInfo->dataFormat[2], pInfo->dataFormat[3],
|
||||
@ -344,17 +340,11 @@ ubrk_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outD
|
||||
//
|
||||
// Get the RRBI Data Header, and check that it appears to be OK.
|
||||
//
|
||||
// Note: ICU 3.2 and earlier, RBBIDataHeader::fDataFormat was actually
|
||||
// an int32_t with a value of 1. Starting with ICU 3.4,
|
||||
// RBBI's fDataFormat matches the dataFormat field from the
|
||||
// UDataInfo header, four int8_t bytes. The value is {3,1,0,0}
|
||||
//
|
||||
const uint8_t *inBytes =(const uint8_t *)inData+headerSize;
|
||||
RBBIDataHeader *rbbiDH = (RBBIDataHeader *)inBytes;
|
||||
if (ds->readUInt32(rbbiDH->fMagic) != 0xb1a0 ||
|
||||
rbbiDH->fFormatVersion[0] != 3 ||
|
||||
ds->readUInt32(rbbiDH->fLength) < sizeof(RBBIDataHeader))
|
||||
{
|
||||
!RBBIDataWrapper::isDataVersionAcceptable(rbbiDH->fFormatVersion) ||
|
||||
ds->readUInt32(rbbiDH->fLength) < sizeof(RBBIDataHeader)) {
|
||||
udata_printError(ds, "ubrk_swap(): RBBI Data header is invalid.\n");
|
||||
*status=U_UNSUPPORTED_ERROR;
|
||||
return 0;
|
||||
@ -451,8 +441,8 @@ ubrk_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outD
|
||||
}
|
||||
|
||||
// Trie table for character categories
|
||||
utrie_swap(ds, inBytes+ds->readUInt32(rbbiDH->fTrie), ds->readUInt32(rbbiDH->fTrieLen),
|
||||
outBytes+ds->readUInt32(rbbiDH->fTrie), status);
|
||||
utrie2_swap(ds, inBytes+ds->readUInt32(rbbiDH->fTrie), ds->readUInt32(rbbiDH->fTrieLen),
|
||||
outBytes+ds->readUInt32(rbbiDH->fTrie), status);
|
||||
|
||||
// Source Rules Text. It's UChar data
|
||||
ds->swapArray16(ds, inBytes+ds->readUInt32(rbbiDH->fRuleSource), ds->readUInt32(rbbiDH->fRuleSourceLen),
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
@ -8,7 +8,7 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: rbbidata.h
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
@ -51,22 +51,23 @@ ubrk_swap(const UDataSwapper *ds,
|
||||
|
||||
#include "unicode/uobject.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/uversion.h"
|
||||
#include "umutex.h"
|
||||
#include "utrie.h"
|
||||
#include "utrie2.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
// The current RBBI data format version.
|
||||
static const uint8_t RBBI_DATA_FORMAT_VERSION[] = {4, 0, 0, 0};
|
||||
|
||||
/*
|
||||
* The following structs map exactly onto the raw data from ICU common data file.
|
||||
*/
|
||||
struct RBBIDataHeader {
|
||||
uint32_t fMagic; /* == 0xbla0 */
|
||||
uint8_t fFormatVersion[4]; /* Data Format. Same as the value in struct UDataInfo */
|
||||
UVersionInfo fFormatVersion; /* Data Format. Same as the value in struct UDataInfo */
|
||||
/* if there is one associated with this data. */
|
||||
/* (version originates in rbbi, is copied to UDataInfo) */
|
||||
/* For ICU 3.2 and earlier, this field was */
|
||||
/* uint32_t fVersion */
|
||||
/* with a value of 1. */
|
||||
uint32_t fLength; /* Total length in bytes of this RBBI Data, */
|
||||
/* including all sections, not just the header. */
|
||||
uint32_t fCatCount; /* Number of character categories. */
|
||||
@ -152,6 +153,8 @@ public:
|
||||
RBBIDataWrapper(UDataMemory* udm, UErrorCode &status);
|
||||
~RBBIDataWrapper();
|
||||
|
||||
static UBool isDataVersionAcceptable(const UVersionInfo version);
|
||||
|
||||
void init0();
|
||||
void init(const RBBIDataHeader *data, UErrorCode &status);
|
||||
RBBIDataWrapper *addReference();
|
||||
@ -181,11 +184,11 @@ public:
|
||||
/* number of int32_t values in the rule status table. Used to sanity check indexing */
|
||||
int32_t fStatusMaxIdx;
|
||||
|
||||
UTrie fTrie;
|
||||
UTrie2 *fTrie;
|
||||
|
||||
private:
|
||||
u_atomic_int32_t fRefCount;
|
||||
UDataMemory *fUDataMem;
|
||||
UDataMemory *fUDataMem;
|
||||
UnicodeString fRuleString;
|
||||
UBool fDontFreeData;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
***************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
//
|
||||
// file: rbbirb.cpp
|
||||
@ -24,16 +24,16 @@
|
||||
#include "unicode/uchriter.h"
|
||||
#include "unicode/parsepos.h"
|
||||
#include "unicode/parseerr.h"
|
||||
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
|
||||
#include "rbbirb.h"
|
||||
#include "rbbinode.h"
|
||||
|
||||
#include "rbbiscan.h"
|
||||
#include "rbbisetb.h"
|
||||
#include "rbbitblb.h"
|
||||
#include "rbbidata.h"
|
||||
#include "uassert.h"
|
||||
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
@ -164,8 +164,13 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() {
|
||||
int32_t statusTableSize = align8(fRuleStatusVals->size() * sizeof(int32_t));
|
||||
int32_t rulesSize = align8((strippedRules.length()+1) * sizeof(UChar));
|
||||
|
||||
int32_t totalSize = headerSize + forwardTableSize + reverseTableSize
|
||||
+ safeFwdTableSize + safeRevTableSize
|
||||
(void)safeFwdTableSize;
|
||||
|
||||
int32_t totalSize = headerSize
|
||||
+ forwardTableSize
|
||||
+ /* reverseTableSize */ 0
|
||||
+ /* safeFwdTableSize */ 0
|
||||
+ (safeRevTableSize ? safeRevTableSize : reverseTableSize)
|
||||
+ statusTableSize + trieSize + rulesSize;
|
||||
|
||||
RBBIDataHeader *data = (RBBIDataHeader *)uprv_malloc(totalSize);
|
||||
@ -177,23 +182,45 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() {
|
||||
|
||||
|
||||
data->fMagic = 0xb1a0;
|
||||
data->fFormatVersion[0] = 3;
|
||||
data->fFormatVersion[1] = 1;
|
||||
data->fFormatVersion[2] = 0;
|
||||
data->fFormatVersion[3] = 0;
|
||||
data->fFormatVersion[0] = RBBI_DATA_FORMAT_VERSION[0];
|
||||
data->fFormatVersion[1] = RBBI_DATA_FORMAT_VERSION[1];
|
||||
data->fFormatVersion[2] = RBBI_DATA_FORMAT_VERSION[2];
|
||||
data->fFormatVersion[3] = RBBI_DATA_FORMAT_VERSION[3];
|
||||
data->fLength = totalSize;
|
||||
data->fCatCount = fSetBuilder->getNumCharCategories();
|
||||
|
||||
// Only save the forward table and the safe reverse table,
|
||||
// because these are the only ones used at run-time.
|
||||
//
|
||||
// For the moment, we still build the other tables if they are present in the rule source files,
|
||||
// for backwards compatibility. Old rule files need to work, and this is the simplest approach.
|
||||
//
|
||||
// Additional backwards compatibility consideration: if no safe rules are provided, consider the
|
||||
// reverse rules to actually be the safe reverse rules.
|
||||
|
||||
data->fFTable = headerSize;
|
||||
data->fFTableLen = forwardTableSize;
|
||||
data->fRTable = data->fFTable + forwardTableSize;
|
||||
data->fRTableLen = reverseTableSize;
|
||||
data->fSFTable = data->fRTable + reverseTableSize;
|
||||
data->fSFTableLen = safeFwdTableSize;
|
||||
data->fSRTable = data->fSFTable + safeFwdTableSize;
|
||||
data->fSRTableLen = safeRevTableSize;
|
||||
|
||||
data->fTrie = data->fSRTable + safeRevTableSize;
|
||||
// Do not save Reverse Table.
|
||||
data->fRTable = data->fFTable + forwardTableSize;
|
||||
data->fRTableLen = 0;
|
||||
|
||||
// Do not save the Safe Forward table.
|
||||
data->fSFTable = data->fRTable + 0;
|
||||
data->fSFTableLen = 0;
|
||||
|
||||
data->fSRTable = data->fSFTable + 0;
|
||||
if (safeRevTableSize > 0) {
|
||||
data->fSRTableLen = safeRevTableSize;
|
||||
} else if (reverseTableSize > 0) {
|
||||
data->fSRTableLen = reverseTableSize;
|
||||
} else {
|
||||
U_ASSERT(FALSE); // Rule build should have failed for lack of a reverse table
|
||||
// before reaching this point.
|
||||
}
|
||||
|
||||
|
||||
data->fTrie = data->fSRTable + data->fSRTableLen;
|
||||
data->fTrieLen = fSetBuilder->getTrieSize();
|
||||
data->fStatusTable = data->fTrie + trieSize;
|
||||
data->fStatusTableLen= statusTableSize;
|
||||
@ -203,9 +230,14 @@ RBBIDataHeader *RBBIRuleBuilder::flattenData() {
|
||||
uprv_memset(data->fReserved, 0, sizeof(data->fReserved));
|
||||
|
||||
fForwardTables->exportTable((uint8_t *)data + data->fFTable);
|
||||
fReverseTables->exportTable((uint8_t *)data + data->fRTable);
|
||||
fSafeFwdTables->exportTable((uint8_t *)data + data->fSFTable);
|
||||
fSafeRevTables->exportTable((uint8_t *)data + data->fSRTable);
|
||||
// fReverseTables->exportTable((uint8_t *)data + data->fRTable);
|
||||
// fSafeFwdTables->exportTable((uint8_t *)data + data->fSFTable);
|
||||
if (safeRevTableSize > 0) {
|
||||
fSafeRevTables->exportTable((uint8_t *)data + data->fSRTable);
|
||||
} else {
|
||||
fReverseTables->exportTable((uint8_t *)data + data->fSRTable);
|
||||
}
|
||||
|
||||
fSetBuilder->serializeTrie ((uint8_t *)data + data->fTrie);
|
||||
|
||||
int32_t *ruleStatusTable = (int32_t *)((uint8_t *)data + data->fStatusTable);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
//
|
||||
// rbbirb.h
|
||||
@ -15,6 +15,9 @@
|
||||
#define RBBIRB_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "unicode/uobject.h"
|
||||
#include "unicode/rbbi.h"
|
||||
#include "unicode/uniset.h"
|
||||
@ -207,6 +210,9 @@ struct RBBISetTableEl {
|
||||
#endif
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user