pango 3.2.5-x64-mingw32 → 3.2.6-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING.LIB +502 -0
- data/README.md +25 -0
- data/Rakefile +8 -8
- data/ext/pango/extconf.rb +4 -1
- data/ext/pango/pango.def +1 -0
- data/ext/pango/rb-pango-attr-list.c +3 -3
- data/ext/pango/rb-pango-attribute.c +67 -57
- data/ext/pango/rb-pango-conversions.h +3 -3
- data/ext/pango/rb-pango-private.h +0 -1
- data/ext/pango/rb-pango.c +0 -1
- data/ext/pango/rb-pango.h +2 -1
- data/lib/2.2/pango.so +0 -0
- data/lib/2.3/pango.so +0 -0
- data/lib/2.4/pango.so +0 -0
- data/lib/2.5/pango.so +0 -0
- data/lib/pango/loader.rb +13 -1
- data/lib/pango/rectangle.rb +7 -1
- data/pango.gemspec +43 -0
- data/vendor/local/bin/derb.exe +0 -0
- data/vendor/local/bin/escapesrc.exe +0 -0
- data/vendor/local/bin/fribidi.exe +0 -0
- data/vendor/local/bin/genbrk.exe +0 -0
- data/vendor/local/bin/genccode.exe +0 -0
- data/vendor/local/bin/gencfu.exe +0 -0
- data/vendor/local/bin/gencmn.exe +0 -0
- data/vendor/local/bin/gencnval.exe +0 -0
- data/vendor/local/bin/gendict.exe +0 -0
- data/vendor/local/bin/gennorm2.exe +0 -0
- data/vendor/local/bin/genrb.exe +0 -0
- data/vendor/local/bin/gensprep.exe +0 -0
- data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
- data/vendor/local/bin/hb-shape.exe +0 -0
- data/vendor/local/bin/hb-subset.exe +0 -0
- data/vendor/local/bin/hb-view.exe +0 -0
- data/vendor/local/bin/icu-config +13 -8
- data/vendor/local/bin/icuinfo.exe +0 -0
- data/vendor/local/bin/icupkg.exe +0 -0
- data/vendor/local/bin/libfribidi-0.dll +0 -0
- data/vendor/local/bin/libgraphene-1.0-0.dll +0 -0
- data/vendor/local/bin/libharfbuzz-0.dll +0 -0
- data/vendor/local/bin/libharfbuzz-subset-0.dll +0 -0
- data/vendor/local/bin/libpango-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
- data/vendor/local/bin/makeconv.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/bin/pkgdata.exe +0 -0
- data/vendor/local/bin/uconv.exe +0 -0
- data/vendor/local/include/fribidi/fribidi-config.h +2 -2
- data/vendor/local/include/harfbuzz/hb-blob.h +2 -0
- data/vendor/local/include/harfbuzz/hb-common.h +24 -3
- data/vendor/local/include/harfbuzz/hb-face.h +4 -0
- data/vendor/local/include/harfbuzz/hb-map.h +104 -0
- data/vendor/local/include/harfbuzz/hb-ot-layout.h +1 -1
- data/vendor/local/include/harfbuzz/hb-set.h +0 -2
- data/vendor/local/include/harfbuzz/hb-subset-plan.hh +46 -25
- data/vendor/local/include/harfbuzz/hb-subset.h +4 -1
- data/vendor/local/include/harfbuzz/hb-version.h +3 -3
- data/vendor/local/include/harfbuzz/hb.h +1 -0
- data/vendor/local/include/pango-1.0/pango/pango-features.h +2 -2
- data/vendor/local/include/unicode/alphaindex.h +2 -1
- data/vendor/local/include/unicode/appendable.h +25 -25
- data/vendor/local/include/unicode/basictz.h +1 -1
- data/vendor/local/include/unicode/brkiter.h +19 -24
- data/vendor/local/include/unicode/bytestream.h +26 -13
- data/vendor/local/include/unicode/bytestrie.h +2 -2
- data/vendor/local/include/unicode/bytestriebuilder.h +4 -5
- data/vendor/local/include/unicode/calendar.h +11 -11
- data/vendor/local/include/unicode/caniter.h +3 -3
- data/vendor/local/include/unicode/casemap.h +494 -0
- data/vendor/local/include/unicode/char16ptr.h +302 -0
- data/vendor/local/include/unicode/chariter.h +22 -18
- data/vendor/local/include/unicode/choicfmt.h +1 -1
- data/vendor/local/include/unicode/coleitr.h +2 -1
- data/vendor/local/include/unicode/coll.h +17 -17
- data/vendor/local/include/unicode/compactdecimalformat.h +10 -2
- data/vendor/local/include/unicode/curramt.h +5 -5
- data/vendor/local/include/unicode/currpinf.h +1 -1
- data/vendor/local/include/unicode/currunit.h +24 -6
- data/vendor/local/include/unicode/datefmt.h +3 -2
- data/vendor/local/include/unicode/dbbi.h +1 -1
- data/vendor/local/include/unicode/dcfmtsym.h +89 -13
- data/vendor/local/include/unicode/decimfmt.h +38 -39
- data/vendor/local/include/unicode/docmain.h +7 -2
- data/vendor/local/include/unicode/dtfmtsym.h +7 -6
- data/vendor/local/include/unicode/dtintrv.h +2 -2
- data/vendor/local/include/unicode/dtitvfmt.h +2 -2
- data/vendor/local/include/unicode/dtitvinf.h +1 -3
- data/vendor/local/include/unicode/dtptngen.h +48 -24
- data/vendor/local/include/unicode/dtrule.h +1 -1
- data/vendor/local/include/unicode/edits.h +424 -0
- data/vendor/local/include/unicode/enumset.h +1 -1
- data/vendor/local/include/unicode/errorcode.h +2 -2
- data/vendor/local/include/unicode/fieldpos.h +1 -1
- data/vendor/local/include/unicode/filteredbrk.h +35 -5
- data/vendor/local/include/unicode/fmtable.h +1 -1
- data/vendor/local/include/unicode/format.h +1 -1
- data/vendor/local/include/unicode/fpositer.h +11 -3
- data/vendor/local/include/unicode/gender.h +1 -1
- data/vendor/local/include/unicode/gregocal.h +1 -1
- data/vendor/local/include/unicode/icudataver.h +1 -1
- data/vendor/local/include/unicode/icuplug.h +1 -1
- data/vendor/local/include/unicode/idna.h +2 -2
- data/vendor/local/include/unicode/listformatter.h +4 -2
- data/vendor/local/include/unicode/localpointer.h +6 -43
- data/vendor/local/include/unicode/locdspnm.h +2 -1
- data/vendor/local/include/unicode/locid.h +7 -6
- data/vendor/local/include/unicode/measfmt.h +18 -7
- data/vendor/local/include/unicode/measunit.h +31 -60
- data/vendor/local/include/unicode/measure.h +1 -1
- data/vendor/local/include/unicode/messagepattern.h +2 -2
- data/vendor/local/include/unicode/msgfmt.h +2 -2
- data/vendor/local/include/unicode/normalizer2.h +130 -16
- data/vendor/local/include/unicode/normlzr.h +5 -5
- data/vendor/local/include/unicode/nounit.h +111 -0
- data/vendor/local/include/unicode/numberformatter.h +2194 -0
- data/vendor/local/include/unicode/numfmt.h +81 -7
- data/vendor/local/include/unicode/numsys.h +2 -2
- data/vendor/local/include/unicode/parseerr.h +3 -3
- data/vendor/local/include/unicode/parsepos.h +1 -1
- data/vendor/local/include/unicode/platform.h +66 -63
- data/vendor/local/include/unicode/plurfmt.h +1 -1
- data/vendor/local/include/unicode/plurrule.h +23 -4
- data/vendor/local/include/unicode/ptypes.h +1 -1
- data/vendor/local/include/unicode/putil.h +4 -4
- data/vendor/local/include/unicode/rbbi.h +105 -134
- data/vendor/local/include/unicode/rbnf.h +65 -3
- data/vendor/local/include/unicode/rbtz.h +1 -1
- data/vendor/local/include/unicode/regex.h +17 -17
- data/vendor/local/include/unicode/region.h +1 -1
- data/vendor/local/include/unicode/reldatefmt.h +4 -5
- data/vendor/local/include/unicode/rep.h +4 -4
- data/vendor/local/include/unicode/resbund.h +3 -3
- data/vendor/local/include/unicode/schriter.h +3 -3
- data/vendor/local/include/unicode/scientificnumberformatter.h +1 -1
- data/vendor/local/include/unicode/search.h +1 -1
- data/vendor/local/include/unicode/selfmt.h +1 -1
- data/vendor/local/include/unicode/simpleformatter.h +31 -25
- data/vendor/local/include/unicode/simpletz.h +5 -3
- data/vendor/local/include/unicode/smpdtfmt.h +17 -7
- data/vendor/local/include/unicode/sortkey.h +1 -1
- data/vendor/local/include/unicode/std_string.h +6 -8
- data/vendor/local/include/unicode/strenum.h +5 -5
- data/vendor/local/include/unicode/stringoptions.h +198 -0
- data/vendor/local/include/unicode/stringpiece.h +1 -3
- data/vendor/local/include/unicode/stringtriebuilder.h +19 -19
- data/vendor/local/include/unicode/stsearch.h +1 -1
- data/vendor/local/include/unicode/symtable.h +1 -1
- data/vendor/local/include/unicode/tblcoll.h +13 -13
- data/vendor/local/include/unicode/timezone.h +5 -5
- data/vendor/local/include/unicode/tmunit.h +1 -1
- data/vendor/local/include/unicode/tmutamt.h +1 -1
- data/vendor/local/include/unicode/tmutfmt.h +1 -1
- data/vendor/local/include/unicode/translit.h +2 -2
- data/vendor/local/include/unicode/tzfmt.h +4 -4
- data/vendor/local/include/unicode/tznames.h +3 -5
- data/vendor/local/include/unicode/tzrule.h +1 -1
- data/vendor/local/include/unicode/tztrans.h +1 -1
- data/vendor/local/include/unicode/ubidi.h +11 -8
- data/vendor/local/include/unicode/ubiditransform.h +16 -19
- data/vendor/local/include/unicode/ubrk.h +61 -4
- data/vendor/local/include/unicode/ucal.h +3 -3
- data/vendor/local/include/unicode/ucasemap.h +7 -47
- data/vendor/local/include/unicode/ucat.h +1 -1
- data/vendor/local/include/unicode/uchar.h +62 -37
- data/vendor/local/include/unicode/ucharstrie.h +48 -48
- data/vendor/local/include/unicode/ucharstriebuilder.h +12 -12
- data/vendor/local/include/unicode/uchriter.h +33 -29
- data/vendor/local/include/unicode/uclean.h +15 -13
- data/vendor/local/include/unicode/ucnv.h +11 -11
- data/vendor/local/include/unicode/ucnv_cb.h +1 -1
- data/vendor/local/include/unicode/ucnv_err.h +7 -7
- data/vendor/local/include/unicode/ucnvsel.h +1 -1
- data/vendor/local/include/unicode/ucol.h +6 -6
- data/vendor/local/include/unicode/ucoleitr.h +3 -3
- data/vendor/local/include/unicode/uconfig.h +8 -5
- data/vendor/local/include/unicode/ucsdet.h +7 -3
- data/vendor/local/include/unicode/ucurr.h +14 -1
- data/vendor/local/include/unicode/udat.h +39 -41
- data/vendor/local/include/unicode/udata.h +2 -2
- data/vendor/local/include/unicode/udateintervalformat.h +1 -1
- data/vendor/local/include/unicode/udatpg.h +56 -5
- data/vendor/local/include/unicode/udisplaycontext.h +4 -8
- data/vendor/local/include/unicode/uenum.h +5 -3
- data/vendor/local/include/unicode/ufieldpositer.h +1 -1
- data/vendor/local/include/unicode/uformattable.h +2 -2
- data/vendor/local/include/unicode/ugender.h +1 -1
- data/vendor/local/include/unicode/uidna.h +2 -2
- data/vendor/local/include/unicode/uiter.h +2 -2
- data/vendor/local/include/unicode/uldnames.h +1 -1
- data/vendor/local/include/unicode/ulistformatter.h +4 -4
- data/vendor/local/include/unicode/uloc.h +29 -16
- data/vendor/local/include/unicode/ulocdata.h +5 -5
- data/vendor/local/include/unicode/umachine.h +81 -38
- data/vendor/local/include/unicode/umisc.h +2 -2
- data/vendor/local/include/unicode/umsg.h +2 -2
- data/vendor/local/include/unicode/unifilt.h +2 -2
- data/vendor/local/include/unicode/unifunct.h +1 -1
- data/vendor/local/include/unicode/unimatch.h +1 -1
- data/vendor/local/include/unicode/unirepl.h +1 -1
- data/vendor/local/include/unicode/uniset.h +5 -4
- data/vendor/local/include/unicode/unistr.h +322 -208
- data/vendor/local/include/unicode/unorm.h +9 -9
- data/vendor/local/include/unicode/unorm2.h +3 -26
- data/vendor/local/include/unicode/unum.h +71 -11
- data/vendor/local/include/unicode/unumsys.h +1 -1
- data/vendor/local/include/unicode/uobject.h +2 -2
- data/vendor/local/include/unicode/upluralrules.h +51 -6
- data/vendor/local/include/unicode/uregex.h +2 -2
- data/vendor/local/include/unicode/uregion.h +2 -2
- data/vendor/local/include/unicode/ureldatefmt.h +33 -39
- data/vendor/local/include/unicode/urename.h +18 -17
- data/vendor/local/include/unicode/urep.h +1 -1
- data/vendor/local/include/unicode/ures.h +9 -9
- data/vendor/local/include/unicode/uscript.h +10 -3
- data/vendor/local/include/unicode/usearch.h +3 -3
- data/vendor/local/include/unicode/uset.h +2 -2
- data/vendor/local/include/unicode/usetiter.h +1 -1
- data/vendor/local/include/unicode/ushape.h +3 -3
- data/vendor/local/include/unicode/uspoof.h +24 -29
- data/vendor/local/include/unicode/usprep.h +7 -7
- data/vendor/local/include/unicode/ustdio.h +1 -1
- data/vendor/local/include/unicode/ustream.h +2 -9
- data/vendor/local/include/unicode/ustring.h +3 -13
- data/vendor/local/include/unicode/ustringtrie.h +2 -2
- data/vendor/local/include/unicode/utext.h +16 -16
- data/vendor/local/include/unicode/utf.h +19 -19
- data/vendor/local/include/unicode/utf16.h +128 -8
- data/vendor/local/include/unicode/utf32.h +2 -2
- data/vendor/local/include/unicode/utf8.h +177 -121
- data/vendor/local/include/unicode/utf_old.h +40 -7
- data/vendor/local/include/unicode/utmscale.h +8 -1
- data/vendor/local/include/unicode/utrace.h +4 -4
- data/vendor/local/include/unicode/utrans.h +3 -3
- data/vendor/local/include/unicode/utypes.h +13 -10
- data/vendor/local/include/unicode/uvernum.h +18 -11
- data/vendor/local/include/unicode/uversion.h +10 -4
- data/vendor/local/include/unicode/vtzone.h +1 -1
- data/vendor/local/lib/cmake/harfbuzz/harfbuzz-config.cmake +1 -1
- data/vendor/local/lib/icu/{58.2 → 61.1}/Makefile.inc +7 -7
- data/vendor/local/lib/icu/{58.2 → 61.1}/pkgdata.inc +2 -2
- data/vendor/local/lib/icu/Makefile.inc +7 -7
- data/vendor/local/lib/icu/pkgdata.inc +2 -2
- data/vendor/local/lib/icudt.dll +0 -0
- data/vendor/local/lib/{icudt58.dll → icudt61.dll} +0 -0
- data/vendor/local/lib/icuin.dll +0 -0
- data/vendor/local/lib/icuin61.dll +0 -0
- data/vendor/local/lib/icuio.dll +0 -0
- data/vendor/local/lib/{icuio58.dll → icuio61.dll} +0 -0
- data/vendor/local/lib/icutest.dll +0 -0
- data/vendor/local/lib/{icutest58.dll → icutest61.dll} +0 -0
- data/vendor/local/lib/icutu.dll +0 -0
- data/vendor/local/lib/icutu61.dll +0 -0
- data/vendor/local/lib/icuuc.dll +0 -0
- data/vendor/local/lib/icuuc61.dll +0 -0
- data/vendor/local/lib/libfribidi.dll.a +0 -0
- data/vendor/local/lib/libgraphene-1.0.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz-icu.a +0 -0
- data/vendor/local/lib/libharfbuzz-icu.la +3 -3
- data/vendor/local/lib/libharfbuzz-subset.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz-subset.la +3 -3
- data/vendor/local/lib/libharfbuzz.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz.la +3 -3
- data/vendor/local/lib/libicudt.dll.a +0 -0
- data/vendor/local/lib/libicuin.dll.a +0 -0
- data/vendor/local/lib/libicuio.dll.a +0 -0
- data/vendor/local/lib/libicutest.dll.a +0 -0
- data/vendor/local/lib/libicutu.dll.a +0 -0
- data/vendor/local/lib/libicuuc.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.la +2 -2
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.la +2 -2
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.la +2 -2
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.la +2 -2
- data/vendor/local/lib/pkgconfig/fribidi.pc +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz-subset.pc +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz.pc +1 -1
- data/vendor/local/lib/pkgconfig/icu-i18n.pc +7 -7
- data/vendor/local/lib/pkgconfig/icu-io.pc +7 -7
- data/vendor/local/lib/pkgconfig/icu-uc.pc +7 -7
- data/vendor/local/lib/pkgconfig/pango.pc +2 -2
- data/vendor/local/lib/pkgconfig/pangocairo.pc +2 -2
- data/vendor/local/lib/pkgconfig/pangoft2.pc +2 -2
- data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
- data/vendor/local/libexec/installed-tests/graphene-1.0/box.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/euler.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/frustum.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/matrix.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/plane.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/point.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/point3d.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/quad.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/quaternion.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/ray.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/rect.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/simd.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/size.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/sphere.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/triangle.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/vec2.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/vec3.exe +0 -0
- data/vendor/local/libexec/installed-tests/graphene-1.0/vec4.exe +0 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Buffers.html +5 -3
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +5 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +1 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +2 -2
- data/vendor/local/share/icu/{58.2 → 61.1}/LICENSE +32 -3
- data/vendor/local/share/icu/{58.2 → 61.1}/config/mh-mingw64 +4 -0
- data/vendor/local/share/icu/{58.2 → 61.1}/install-sh +0 -0
- data/vendor/local/share/icu/{58.2 → 61.1}/mkinstalldirs +0 -0
- data/vendor/local/share/man/man1/derb.1 +2 -2
- data/vendor/local/share/man/man1/genbrk.1 +2 -2
- data/vendor/local/share/man/man1/gencfu.1 +1 -1
- data/vendor/local/share/man/man1/gencnval.1 +3 -3
- data/vendor/local/share/man/man1/gendict.1 +2 -2
- data/vendor/local/share/man/man1/genrb.1 +3 -3
- data/vendor/local/share/man/man1/icu-config.1 +2 -2
- data/vendor/local/share/man/man1/makeconv.1 +5 -5
- data/vendor/local/share/man/man1/pkgdata.1 +2 -2
- data/vendor/local/share/man/man1/uconv.1 +9 -9
- data/vendor/local/share/man/man3/fribidi_charset_to_unicode.3 +98 -0
- data/vendor/local/share/man/man3/fribidi_debug_status.3 +44 -0
- data/vendor/local/share/man/man3/fribidi_get_bidi_type.3 +58 -0
- data/vendor/local/share/man/man3/fribidi_get_bidi_type_name.3 +56 -0
- data/vendor/local/share/man/man3/fribidi_get_bidi_types.3 +68 -0
- data/vendor/local/share/man/man3/fribidi_get_bracket.3 +59 -0
- data/vendor/local/share/man/man3/fribidi_get_bracket_types.3 +73 -0
- data/vendor/local/share/man/man3/fribidi_get_joining_type.3 +87 -0
- data/vendor/local/share/man/man3/fribidi_get_joining_type_name.3 +83 -0
- data/vendor/local/share/man/man3/fribidi_get_joining_types.3 +96 -0
- data/vendor/local/share/man/man3/fribidi_get_mirror_char.3 +68 -0
- data/vendor/local/share/man/man3/fribidi_get_par_direction.3 +100 -0
- data/vendor/local/share/man/man3/fribidi_get_par_embedding_levels.3 +98 -0
- data/vendor/local/share/man/man3/fribidi_get_par_embedding_levels_ex.3 +114 -0
- data/vendor/local/share/man/man3/fribidi_get_type.3 +50 -0
- data/vendor/local/share/man/man3/fribidi_get_type_internal.3 +50 -0
- data/vendor/local/share/man/man3/fribidi_join_arabic.3 +92 -0
- data/vendor/local/share/man/man3/fribidi_log2vis.3 +124 -0
- data/vendor/local/share/man/man3/fribidi_log2vis_get_embedding_levels.3 +97 -0
- data/vendor/local/share/man/man3/fribidi_mirroring_status.3 +44 -0
- data/vendor/local/share/man/man3/fribidi_parse_charset.3 +78 -0
- data/vendor/local/share/man/man3/fribidi_remove_bidi_marks.3 +96 -0
- data/vendor/local/share/man/man3/fribidi_reorder_line.3 +146 -0
- data/vendor/local/share/man/man3/fribidi_reorder_nsm_status.3 +44 -0
- data/vendor/local/share/man/man3/fribidi_set_debug.3 +48 -0
- data/vendor/local/share/man/man3/fribidi_set_mirroring.3 +58 -0
- data/vendor/local/share/man/man3/fribidi_set_reorder_nsm.3 +60 -0
- data/vendor/local/share/man/man3/fribidi_shape.3 +89 -0
- data/vendor/local/share/man/man3/fribidi_shape_arabic.3 +95 -0
- data/vendor/local/share/man/man3/fribidi_shape_mirroring.3 +71 -0
- data/vendor/local/share/man/man3/fribidi_unicode_to_charset.3 +99 -0
- data/vendor/local/share/man/man8/genccode.8 +2 -2
- data/vendor/local/share/man/man8/gencmn.8 +3 -3
- data/vendor/local/share/man/man8/gensprep.8 +3 -3
- data/vendor/local/share/man/man8/icupkg.8 +1 -1
- metadata +58 -59
- data/ext/pango/rb-pango-context.c +0 -79
- data/vendor/local/lib/icuin58.dll +0 -0
- data/vendor/local/lib/icutu58.dll +0 -0
- data/vendor/local/lib/icuuc58.dll +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
//
|
1
|
+
// © 2016 and later: Unicode, Inc. and others.
|
2
2
|
// License & terms of use: http://www.unicode.org/copyright.html
|
3
3
|
/*
|
4
4
|
*******************************************************************************
|
@@ -8,7 +8,7 @@
|
|
8
8
|
*
|
9
9
|
*******************************************************************************
|
10
10
|
* file name: utf32.h
|
11
|
-
* encoding:
|
11
|
+
* encoding: UTF-8
|
12
12
|
* tab size: 8 (not used)
|
13
13
|
* indentation:4
|
14
14
|
*
|
@@ -1,4 +1,4 @@
|
|
1
|
-
//
|
1
|
+
// © 2016 and later: Unicode, Inc. and others.
|
2
2
|
// License & terms of use: http://www.unicode.org/copyright.html
|
3
3
|
/*
|
4
4
|
*******************************************************************************
|
@@ -8,7 +8,7 @@
|
|
8
8
|
*
|
9
9
|
*******************************************************************************
|
10
10
|
* file name: utf8.h
|
11
|
-
* encoding:
|
11
|
+
* encoding: UTF-8
|
12
12
|
* tab size: 8 (not used)
|
13
13
|
* indentation:4
|
14
14
|
*
|
@@ -41,52 +41,24 @@
|
|
41
41
|
|
42
42
|
/* internal definitions ----------------------------------------------------- */
|
43
43
|
|
44
|
-
/**
|
45
|
-
* \var utf8_countTrailBytes
|
46
|
-
* Internal array with numbers of trail bytes for any given byte used in
|
47
|
-
* lead byte position.
|
48
|
-
*
|
49
|
-
* This is internal since it is not meant to be called directly by external clients;
|
50
|
-
* however it is called by public macros in this file and thus must remain stable,
|
51
|
-
* and should not be hidden when other internal functions are hidden (otherwise
|
52
|
-
* public macros would fail to compile).
|
53
|
-
* @internal
|
54
|
-
*/
|
55
|
-
#ifdef U_UTF8_IMPL
|
56
|
-
U_EXPORT const uint8_t
|
57
|
-
#elif defined(U_STATIC_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION)
|
58
|
-
U_CFUNC const uint8_t
|
59
|
-
#else
|
60
|
-
U_CFUNC U_IMPORT const uint8_t /* U_IMPORT2? */ /*U_IMPORT*/
|
61
|
-
#endif
|
62
|
-
utf8_countTrailBytes[256];
|
63
|
-
|
64
44
|
/**
|
65
45
|
* Counts the trail bytes for a UTF-8 lead byte.
|
66
|
-
* Returns 0 for 0..
|
46
|
+
* Returns 0 for 0..0xc1 as well as for 0xf5..0xff.
|
47
|
+
* leadByte might be evaluated multiple times.
|
67
48
|
*
|
68
49
|
* This is internal since it is not meant to be called directly by external clients;
|
69
50
|
* however it is called by public macros in this file and thus must remain stable.
|
70
51
|
*
|
71
|
-
* Note: Beginning with ICU 50, the implementation uses a multi-condition expression
|
72
|
-
* which was shown in 2012 (on x86-64) to compile to fast, branch-free code.
|
73
|
-
* leadByte is evaluated multiple times.
|
74
|
-
*
|
75
|
-
* The pre-ICU 50 implementation used the exported array utf8_countTrailBytes:
|
76
|
-
* #define U8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[leadByte])
|
77
|
-
* leadByte was evaluated exactly once.
|
78
|
-
*
|
79
52
|
* @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff.
|
80
53
|
* @internal
|
81
54
|
*/
|
82
55
|
#define U8_COUNT_TRAIL_BYTES(leadByte) \
|
83
|
-
((
|
84
|
-
((uint8_t)(leadByte)>=
|
85
|
-
(uint8_t)(leadByte)<0xfe ? 3+((uint8_t)(leadByte)>=0xf8)+((uint8_t)(leadByte)>=0xfc) : 0)
|
56
|
+
(U8_IS_LEAD(leadByte) ? \
|
57
|
+
((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)+1 : 0)
|
86
58
|
|
87
59
|
/**
|
88
60
|
* Counts the trail bytes for a UTF-8 lead byte of a valid UTF-8 sequence.
|
89
|
-
*
|
61
|
+
* Returns 0 for 0..0xc1. Undefined for 0xf5..0xff.
|
90
62
|
* leadByte might be evaluated multiple times.
|
91
63
|
*
|
92
64
|
* This is internal since it is not meant to be called directly by external clients;
|
@@ -96,7 +68,7 @@ utf8_countTrailBytes[256];
|
|
96
68
|
* @internal
|
97
69
|
*/
|
98
70
|
#define U8_COUNT_TRAIL_BYTES_UNSAFE(leadByte) \
|
99
|
-
(((leadByte)>=
|
71
|
+
(((uint8_t)(leadByte)>=0xc2)+((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0))
|
100
72
|
|
101
73
|
/**
|
102
74
|
* Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value.
|
@@ -107,6 +79,40 @@ utf8_countTrailBytes[256];
|
|
107
79
|
*/
|
108
80
|
#define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1)
|
109
81
|
|
82
|
+
/**
|
83
|
+
* Internal bit vector for 3-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD3_AND_T1.
|
84
|
+
* Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence.
|
85
|
+
* Lead byte E0..EF bits 3..0 are used as byte index,
|
86
|
+
* first trail byte bits 7..5 are used as bit index into that byte.
|
87
|
+
* @see U8_IS_VALID_LEAD3_AND_T1
|
88
|
+
* @internal
|
89
|
+
*/
|
90
|
+
#define U8_LEAD3_T1_BITS "\x20\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x10\x30\x30"
|
91
|
+
|
92
|
+
/**
|
93
|
+
* Internal 3-byte UTF-8 validity check.
|
94
|
+
* Non-zero if lead byte E0..EF and first trail byte 00..FF start a valid sequence.
|
95
|
+
* @internal
|
96
|
+
*/
|
97
|
+
#define U8_IS_VALID_LEAD3_AND_T1(lead, t1) (U8_LEAD3_T1_BITS[(lead)&0xf]&(1<<((uint8_t)(t1)>>5)))
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Internal bit vector for 4-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD4_AND_T1.
|
101
|
+
* Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence.
|
102
|
+
* First trail byte bits 7..4 are used as byte index,
|
103
|
+
* lead byte F0..F4 bits 2..0 are used as bit index into that byte.
|
104
|
+
* @see U8_IS_VALID_LEAD4_AND_T1
|
105
|
+
* @internal
|
106
|
+
*/
|
107
|
+
#define U8_LEAD4_T1_BITS "\x00\x00\x00\x00\x00\x00\x00\x00\x1E\x0F\x0F\x0F\x00\x00\x00\x00"
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Internal 4-byte UTF-8 validity check.
|
111
|
+
* Non-zero if lead byte F0..F4 and first trail byte 00..FF start a valid sequence.
|
112
|
+
* @internal
|
113
|
+
*/
|
114
|
+
#define U8_IS_VALID_LEAD4_AND_T1(lead, t1) (U8_LEAD4_T1_BITS[(uint8_t)(t1)>>4]&(1<<((lead)&7)))
|
115
|
+
|
110
116
|
/**
|
111
117
|
* Function for handling "next code point" with error-checking.
|
112
118
|
*
|
@@ -166,20 +172,21 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
166
172
|
#define U8_IS_SINGLE(c) (((c)&0x80)==0)
|
167
173
|
|
168
174
|
/**
|
169
|
-
* Is this code unit (byte) a UTF-8 lead byte?
|
175
|
+
* Is this code unit (byte) a UTF-8 lead byte? (0xC2..0xF4)
|
170
176
|
* @param c 8-bit code unit (byte)
|
171
177
|
* @return TRUE or FALSE
|
172
178
|
* @stable ICU 2.4
|
173
179
|
*/
|
174
|
-
#define U8_IS_LEAD(c) ((uint8_t)((c)-
|
180
|
+
#define U8_IS_LEAD(c) ((uint8_t)((c)-0xc2)<=0x32)
|
181
|
+
// 0x32=0xf4-0xc2
|
175
182
|
|
176
183
|
/**
|
177
|
-
* Is this code unit (byte) a UTF-8 trail byte?
|
184
|
+
* Is this code unit (byte) a UTF-8 trail byte? (0x80..0xBF)
|
178
185
|
* @param c 8-bit code unit (byte)
|
179
186
|
* @return TRUE or FALSE
|
180
187
|
* @stable ICU 2.4
|
181
188
|
*/
|
182
|
-
#define U8_IS_TRAIL(c) (((c)
|
189
|
+
#define U8_IS_TRAIL(c) ((int8_t)(c)<-0x40)
|
183
190
|
|
184
191
|
/**
|
185
192
|
* How many code units (bytes) are used for the UTF-8 encoding
|
@@ -307,7 +314,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
307
314
|
*/
|
308
315
|
#define U8_NEXT_UNSAFE(s, i, c) { \
|
309
316
|
(c)=(uint8_t)(s)[(i)++]; \
|
310
|
-
if((c)
|
317
|
+
if(!U8_IS_SINGLE(c)) { \
|
311
318
|
if((c)<0xe0) { \
|
312
319
|
(c)=(((c)&0x1f)<<6)|((s)[(i)++]&0x3f); \
|
313
320
|
} else if((c)<0xf0) { \
|
@@ -341,32 +348,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
341
348
|
* @see U8_NEXT_UNSAFE
|
342
349
|
* @stable ICU 2.4
|
343
350
|
*/
|
344
|
-
#define U8_NEXT(s, i, length, c)
|
345
|
-
(c)=(uint8_t)(s)[(i)++]; \
|
346
|
-
if((c)>=0x80) { \
|
347
|
-
uint8_t __t1, __t2; \
|
348
|
-
if( /* handle U+1000..U+CFFF inline */ \
|
349
|
-
(0xe0<(c) && (c)<=0xec) && \
|
350
|
-
(((i)+1)<(length) || (length)<0) && \
|
351
|
-
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f && \
|
352
|
-
(__t2=(uint8_t)((s)[(i)+1]-0x80))<= 0x3f \
|
353
|
-
) { \
|
354
|
-
/* no need for (c&0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */ \
|
355
|
-
(c)=(UChar)(((c)<<12)|(__t1<<6)|__t2); \
|
356
|
-
(i)+=2; \
|
357
|
-
} else if( /* handle U+0080..U+07FF inline */ \
|
358
|
-
((c)<0xe0 && (c)>=0xc2) && \
|
359
|
-
((i)!=(length)) && \
|
360
|
-
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f \
|
361
|
-
) { \
|
362
|
-
(c)=(((c)&0x1f)<<6)|__t1; \
|
363
|
-
++(i); \
|
364
|
-
} else { \
|
365
|
-
/* function call for "complicated" and error cases */ \
|
366
|
-
(c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c, -1); \
|
367
|
-
} \
|
368
|
-
} \
|
369
|
-
}
|
351
|
+
#define U8_NEXT(s, i, length, c) U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, U_SENTINEL)
|
370
352
|
|
371
353
|
/**
|
372
354
|
* Get a code point from a string at a code point boundary offset,
|
@@ -392,29 +374,33 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
392
374
|
* @see U8_NEXT
|
393
375
|
* @stable ICU 51
|
394
376
|
*/
|
395
|
-
#define U8_NEXT_OR_FFFD(s, i, length, c)
|
377
|
+
#define U8_NEXT_OR_FFFD(s, i, length, c) U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, 0xfffd)
|
378
|
+
|
379
|
+
/** @internal */
|
380
|
+
#define U8_INTERNAL_NEXT_OR_SUB(s, i, length, c, sub) { \
|
396
381
|
(c)=(uint8_t)(s)[(i)++]; \
|
397
|
-
if((c)
|
398
|
-
uint8_t
|
399
|
-
if(
|
400
|
-
|
401
|
-
((
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
382
|
+
if(!U8_IS_SINGLE(c)) { \
|
383
|
+
uint8_t __t = 0; \
|
384
|
+
if((i)!=(length) && \
|
385
|
+
/* fetch/validate/assemble all but last trail byte */ \
|
386
|
+
((c)>=0xe0 ? \
|
387
|
+
((c)<0xf0 ? /* U+0800..U+FFFF except surrogates */ \
|
388
|
+
U8_LEAD3_T1_BITS[(c)&=0xf]&(1<<((__t=(s)[i])>>5)) && \
|
389
|
+
(__t&=0x3f, 1) \
|
390
|
+
: /* U+10000..U+10FFFF */ \
|
391
|
+
((c)-=0xf0)<=4 && \
|
392
|
+
U8_LEAD4_T1_BITS[(__t=(s)[i])>>4]&(1<<(c)) && \
|
393
|
+
((c)=((c)<<6)|(__t&0x3f), ++(i)!=(length)) && \
|
394
|
+
(__t=(s)[i]-0x80)<=0x3f) && \
|
395
|
+
/* valid second-to-last trail byte */ \
|
396
|
+
((c)=((c)<<6)|__t, ++(i)!=(length)) \
|
397
|
+
: /* U+0080..U+07FF */ \
|
398
|
+
(c)>=0xc2 && ((c)&=0x1f, 1)) && \
|
399
|
+
/* last trail byte */ \
|
400
|
+
(__t=(s)[i]-0x80)<=0x3f && \
|
401
|
+
((c)=((c)<<6)|__t, ++(i), 1)) { \
|
415
402
|
} else { \
|
416
|
-
/*
|
417
|
-
(c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c, -3); \
|
403
|
+
(c)=(sub); /* ill-formed*/ \
|
418
404
|
} \
|
419
405
|
} \
|
420
406
|
}
|
@@ -433,21 +419,22 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
433
419
|
* @stable ICU 2.4
|
434
420
|
*/
|
435
421
|
#define U8_APPEND_UNSAFE(s, i, c) { \
|
436
|
-
|
437
|
-
|
422
|
+
uint32_t __uc=(c); \
|
423
|
+
if(__uc<=0x7f) { \
|
424
|
+
(s)[(i)++]=(uint8_t)__uc; \
|
438
425
|
} else { \
|
439
|
-
if(
|
440
|
-
(s)[(i)++]=(uint8_t)((
|
426
|
+
if(__uc<=0x7ff) { \
|
427
|
+
(s)[(i)++]=(uint8_t)((__uc>>6)|0xc0); \
|
441
428
|
} else { \
|
442
|
-
if(
|
443
|
-
(s)[(i)++]=(uint8_t)((
|
429
|
+
if(__uc<=0xffff) { \
|
430
|
+
(s)[(i)++]=(uint8_t)((__uc>>12)|0xe0); \
|
444
431
|
} else { \
|
445
|
-
(s)[(i)++]=(uint8_t)((
|
446
|
-
(s)[(i)++]=(uint8_t)(((
|
432
|
+
(s)[(i)++]=(uint8_t)((__uc>>18)|0xf0); \
|
433
|
+
(s)[(i)++]=(uint8_t)(((__uc>>12)&0x3f)|0x80); \
|
447
434
|
} \
|
448
|
-
(s)[(i)++]=(uint8_t)(((
|
435
|
+
(s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \
|
449
436
|
} \
|
450
|
-
(s)[(i)++]=(uint8_t)((
|
437
|
+
(s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \
|
451
438
|
} \
|
452
439
|
}
|
453
440
|
|
@@ -469,17 +456,23 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
469
456
|
* @stable ICU 2.4
|
470
457
|
*/
|
471
458
|
#define U8_APPEND(s, i, capacity, c, isError) { \
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
(s)[(i)++]=(uint8_t)((
|
477
|
-
|
478
|
-
|
479
|
-
(s)[(i)++]=(uint8_t)((
|
480
|
-
(s)[(i)++]=(uint8_t)(((
|
459
|
+
uint32_t __uc=(c); \
|
460
|
+
if(__uc<=0x7f) { \
|
461
|
+
(s)[(i)++]=(uint8_t)__uc; \
|
462
|
+
} else if(__uc<=0x7ff && (i)+1<(capacity)) { \
|
463
|
+
(s)[(i)++]=(uint8_t)((__uc>>6)|0xc0); \
|
464
|
+
(s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \
|
465
|
+
} else if((__uc<=0xd7ff || (0xe000<=__uc && __uc<=0xffff)) && (i)+2<(capacity)) { \
|
466
|
+
(s)[(i)++]=(uint8_t)((__uc>>12)|0xe0); \
|
467
|
+
(s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \
|
468
|
+
(s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \
|
469
|
+
} else if(0xffff<__uc && __uc<=0x10ffff && (i)+3<(capacity)) { \
|
470
|
+
(s)[(i)++]=(uint8_t)((__uc>>18)|0xf0); \
|
471
|
+
(s)[(i)++]=(uint8_t)(((__uc>>12)&0x3f)|0x80); \
|
472
|
+
(s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \
|
473
|
+
(s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \
|
481
474
|
} else { \
|
482
|
-
(
|
475
|
+
(isError)=TRUE; \
|
483
476
|
} \
|
484
477
|
}
|
485
478
|
|
@@ -494,7 +487,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
494
487
|
* @stable ICU 2.4
|
495
488
|
*/
|
496
489
|
#define U8_FWD_1_UNSAFE(s, i) { \
|
497
|
-
(i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((
|
490
|
+
(i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((s)[i]); \
|
498
491
|
}
|
499
492
|
|
500
493
|
/**
|
@@ -511,15 +504,24 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
511
504
|
* @stable ICU 2.4
|
512
505
|
*/
|
513
506
|
#define U8_FWD_1(s, i, length) { \
|
514
|
-
uint8_t __b=(
|
515
|
-
if(U8_IS_LEAD(__b)) { \
|
516
|
-
uint8_t
|
517
|
-
if((
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
507
|
+
uint8_t __b=(s)[(i)++]; \
|
508
|
+
if(U8_IS_LEAD(__b) && (i)!=(length)) { \
|
509
|
+
uint8_t __t1=(s)[i]; \
|
510
|
+
if((0xe0<=__b && __b<0xf0)) { \
|
511
|
+
if(U8_IS_VALID_LEAD3_AND_T1(__b, __t1) && \
|
512
|
+
++(i)!=(length) && U8_IS_TRAIL((s)[i])) { \
|
513
|
+
++(i); \
|
514
|
+
} \
|
515
|
+
} else if(__b<0xe0) { \
|
516
|
+
if(U8_IS_TRAIL(__t1)) { \
|
517
|
+
++(i); \
|
518
|
+
} \
|
519
|
+
} else /* c>=0xf0 */ { \
|
520
|
+
if(U8_IS_VALID_LEAD4_AND_T1(__b, __t1) && \
|
521
|
+
++(i)!=(length) && U8_IS_TRAIL((s)[i]) && \
|
522
|
+
++(i)!=(length) && U8_IS_TRAIL((s)[i])) { \
|
523
|
+
++(i); \
|
524
|
+
} \
|
523
525
|
} \
|
524
526
|
} \
|
525
527
|
}
|
@@ -590,12 +592,15 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
590
592
|
* If the offset points to a UTF-8 trail byte,
|
591
593
|
* then the offset is moved backward to the corresponding lead byte.
|
592
594
|
* Otherwise, it is not modified.
|
595
|
+
*
|
593
596
|
* "Safe" macro, checks for illegal sequences and for string boundaries.
|
597
|
+
* Unlike U8_TRUNCATE_IF_INCOMPLETE(), this macro always reads s[i].
|
594
598
|
*
|
595
599
|
* @param s const uint8_t * string
|
596
600
|
* @param start int32_t starting string offset (usually 0)
|
597
601
|
* @param i int32_t string offset, must be start<=i
|
598
602
|
* @see U8_SET_CP_START_UNSAFE
|
603
|
+
* @see U8_TRUNCATE_IF_INCOMPLETE
|
599
604
|
* @stable ICU 2.4
|
600
605
|
*/
|
601
606
|
#define U8_SET_CP_START(s, start, i) { \
|
@@ -604,6 +609,57 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
604
609
|
} \
|
605
610
|
}
|
606
611
|
|
612
|
+
#ifndef U_HIDE_DRAFT_API
|
613
|
+
/**
|
614
|
+
* If the string ends with a UTF-8 byte sequence that is valid so far
|
615
|
+
* but incomplete, then reduce the length of the string to end before
|
616
|
+
* the lead byte of that incomplete sequence.
|
617
|
+
* For example, if the string ends with E1 80, the length is reduced by 2.
|
618
|
+
*
|
619
|
+
* In all other cases (the string ends with a complete sequence, or it is not
|
620
|
+
* possible for any further trail byte to extend the trailing sequence)
|
621
|
+
* the length remains unchanged.
|
622
|
+
*
|
623
|
+
* Useful for processing text split across multiple buffers
|
624
|
+
* (save the incomplete sequence for later)
|
625
|
+
* and for optimizing iteration
|
626
|
+
* (check for string length only once per character).
|
627
|
+
*
|
628
|
+
* "Safe" macro, checks for illegal sequences and for string boundaries.
|
629
|
+
* Unlike U8_SET_CP_START(), this macro never reads s[length].
|
630
|
+
*
|
631
|
+
* (In UTF-16, simply check for U16_IS_LEAD(last code unit).)
|
632
|
+
*
|
633
|
+
* @param s const uint8_t * string
|
634
|
+
* @param start int32_t starting string offset (usually 0)
|
635
|
+
* @param length int32_t string length (usually start<=length)
|
636
|
+
* @see U8_SET_CP_START
|
637
|
+
* @draft ICU 61
|
638
|
+
*/
|
639
|
+
#define U8_TRUNCATE_IF_INCOMPLETE(s, start, length) \
|
640
|
+
if((length)>(start)) { \
|
641
|
+
uint8_t __b1=s[(length)-1]; \
|
642
|
+
if(U8_IS_SINGLE(__b1)) { \
|
643
|
+
/* common ASCII character */ \
|
644
|
+
} else if(U8_IS_LEAD(__b1)) { \
|
645
|
+
--(length); \
|
646
|
+
} else if(U8_IS_TRAIL(__b1) && ((length)-2)>=(start)) { \
|
647
|
+
uint8_t __b2=s[(length)-2]; \
|
648
|
+
if(0xe0<=__b2 && __b2<=0xf4) { \
|
649
|
+
if(__b2<0xf0 ? U8_IS_VALID_LEAD3_AND_T1(__b2, __b1) : \
|
650
|
+
U8_IS_VALID_LEAD4_AND_T1(__b2, __b1)) { \
|
651
|
+
(length)-=2; \
|
652
|
+
} \
|
653
|
+
} else if(U8_IS_TRAIL(__b2) && ((length)-3)>=(start)) { \
|
654
|
+
uint8_t __b3=s[(length)-3]; \
|
655
|
+
if(0xf0<=__b3 && __b3<=0xf4 && U8_IS_VALID_LEAD4_AND_T1(__b3, __b2)) { \
|
656
|
+
(length)-=3; \
|
657
|
+
} \
|
658
|
+
} \
|
659
|
+
} \
|
660
|
+
}
|
661
|
+
#endif // U_HIDE_DRAFT_API
|
662
|
+
|
607
663
|
/* definitions with backward iteration -------------------------------------- */
|
608
664
|
|
609
665
|
/**
|
@@ -633,7 +689,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
633
689
|
/* c is a trail byte */ \
|
634
690
|
(c)&=0x3f; \
|
635
691
|
for(;;) { \
|
636
|
-
__b=(
|
692
|
+
__b=(s)[--(i)]; \
|
637
693
|
if(__b>=0xc0) { \
|
638
694
|
U8_MASK_LEAD_BYTE(__b, __count); \
|
639
695
|
(c)|=(UChar32)__b<<__shift; \
|
@@ -669,7 +725,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
669
725
|
*/
|
670
726
|
#define U8_PREV(s, start, i, c) { \
|
671
727
|
(c)=(uint8_t)(s)[--(i)]; \
|
672
|
-
if((c)
|
728
|
+
if(!U8_IS_SINGLE(c)) { \
|
673
729
|
(c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -1); \
|
674
730
|
} \
|
675
731
|
}
|
@@ -700,7 +756,7 @@ utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i);
|
|
700
756
|
*/
|
701
757
|
#define U8_PREV_OR_FFFD(s, start, i, c) { \
|
702
758
|
(c)=(uint8_t)(s)[--(i)]; \
|
703
|
-
if((c)
|
759
|
+
if(!U8_IS_SINGLE(c)) { \
|
704
760
|
(c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -3); \
|
705
761
|
} \
|
706
762
|
}
|