./PaxHeaders/Term-Choose-LineFold-XS-0.0010000644000000000000000000000013215003451132015011 xustar0030 mtime=1745769050.213180628 30 atime=1745769050.073183298 30 ctime=1745769050.213180628 Term-Choose-LineFold-XS-0.001/0000755000175000001440000000000015003451132015503 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/PaxHeaders/README0000644000000000000000000000013215003107622015613 xustar0030 mtime=1745653650.355437972 30 atime=1745769046.981242264 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/README0000644000175000001440000000116015003107622016363 0ustar00mmusers00000000000000Term-Choose-LineFold-XS ======================= INFO XS acceleration for Term-Choose-LineFold. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Term::Choose::LineFold::XS LICENSE AND COPYRIGHT Copyright (C) 2025 Matthäus Kiem This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For details, see the full text of the licenses in the file LICENSE. Term-Choose-LineFold-XS-0.001/PaxHeaders/t0000644000000000000000000000013215003451132015117 xustar0030 mtime=1745769050.077183221 30 atime=1745769050.073183298 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/t/0000755000175000001440000000000015003451132015746 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/t/PaxHeaders/02-cut.t0000644000000000000000000000013215001760114016374 xustar0030 mtime=1745346636.607746821 30 atime=1745769047.285236467 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/t/02-cut.t0000644000175000001440000000737015001760114017155 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use open qw(:std :utf8); use Test::More; use Term::Choose::LineFold::XS; #my $wide = $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE}; my $wide; # 24.03.2025 if ( exists $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE} ) { # $wide = $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE}; # } # else { # $wide = $ENV{TC_AMBIGUOUS_WIDE}; # } # my @cut_tests = ( [ "\x{61}\x{ff41}\x{4e2d}\x{b7}\x{1f44d}", $wide ? 7 : 6, [ "\x{61}\x{ff41}\x{4e2d}\x{b7}", "\x{1f44d}" ] ], [ "\x{68}\x{65}\x{6c}\x{6c}\x{6f}", 2, [ "\x{68}\x{65}", "\x{6c}\x{6c}\x{6f}" ] ], # "hello" [ "\x{68}\x{e9}\x{6c}\x{6c}\x{6f}", $wide ? 3 : 2, [ "\x{68}\x{e9}", "\x{6c}\x{6c}\x{6f}" ] ], # "héllo" [ "\x{61}\x{3042}\x{62}\x{3044}\x{63}\x{3046}", 2, [ "\x{61}\x{20}", "\x{3042}\x{62}\x{3044}\x{63}\x{3046}" ] ], # "aあbいcう" [ "\x{61}\x{ff}\x{62}\x{63}\x{64}", 2, [ "\x{61}\x{ff}", "\x{62}\x{63}\x{64}" ] ], # "a\x{ff}bcd" [ "\x{0e2a}\x{0e27}\x{0e31}\x{0e2a}\x{0e14}\x{0e35}", 2, [ "\x{0e2a}\x{0e27}\x{0e31}", "\x{0e2a}\x{0e14}\x{0e35}" ] ], # "สวัสดี" [ "\x{61}\x{1f60a}\x{1f60a}\x{1f60a}\x{1f60a}", 4, [ "\x{61}\x{1f60a}\x{20}", "\x{1f60a}\x{1f60a}\x{1f60a}" ] ], # "a😊😊😊😊" [ "\x{61}\x{1f60a}\x{1f60a}\x{1f60a}\x{1f60a}", 5, [ "\x{61}\x{1f60a}\x{1f60a}", "\x{1f60a}\x{1f60a}" ] ], # "a😊😊😊😊" [ "\x{1f60a}\x{1f60a}\x{1f60a}\x{1f60a}", 4, [ "\x{1f60a}\x{1f60a}", "\x{1f60a}\x{1f60a}" ] ], # "😊😊😊😊" [ "\x{1f60a}\x{1f60a}\x{1f60a}\x{1f60a}", 5, [ "\x{1f60a}\x{1f60a}\x{20}", "\x{1f60a}\x{1f60a}" ] ], # "😊😊😊😊" ); for my $d ( @cut_tests ) { my ( $str, $w, $ret ) = @$d; my ( $first, $rem ) = Term::Choose::LineFold::XS::cut_to_printwidth( $str, $w ); is_deeply( [ $first, $rem ], $ret, "cut_to_printwidth( $str, $w ): [ |$first|, |$rem| ] -> [ |$ret->[0]|, |$ret->[0]| ]" ); } for my $d ( @cut_tests ) { my ( $str, $w, $ret ) = @$d; my $cut = Term::Choose::LineFold::XS::cut_to_printwidth( $str, $w ); is( $cut, $ret->[0], "scalar cut_to_printwidth( $str, $w ): |$cut| -> |$ret->[0]|" ); } for my $d ( @cut_tests ) { my ( $str, $w, $ret ) = @$d; my $expected = $ret->[0]; my $adjusted = Term::Choose::LineFold::XS::adjust_to_printwidth( $str, $w ); is( $adjusted, $expected, "adjust_to_printwidth( $str, $w ): |$adjusted| -> |$expected|" ); } my $w = 10; my @pad_tests = ( [ "\x{61}\x{ff41}\x{4e2d}\x{b7}\x{1f44d}", $wide ? 1 : 2 ], [ "\x{68}\x{e9}\x{6c}\x{6c}\x{6f}", $wide ? 4 : 5 ], # "héllo" [ "\x{61}\x{ff}\x{62}\x{63}\x{64}", 5 ], # "a\x{ff}bcd" [ "\x{0e2a}\x{0e27}\x{0e31}\x{0e2a}\x{0e14}\x{0e35}", 6 ], # "สวัสดี" [ "\x{61}\x{1f60a}\x{1f60a}\x{1f60a}\x{1f60a}", 1 ], # "a😊😊😊😊" [ "\x{1f60a}\x{1f60a}\x{1f60a}\x{1f60a}", 2 ], # "😊😊😊😊" [ "", 10 ], ); for my $d ( @pad_tests ) { my ( $str, $trailing_saces ) = @$d; my $expected = $str . ( "\x{20}" x $trailing_saces ); my $adjusted = Term::Choose::LineFold::XS::adjust_to_printwidth( $str, $w ); is( $adjusted, $expected, "adjust_to_printwidth( $str, $w ): |$adjusted| -> |$expected|" ); } done_testing(); Term-Choose-LineFold-XS-0.001/t/PaxHeaders/01-width.t0000644000000000000000000000013215003200065016713 xustar0030 mtime=1745682485.646470972 30 atime=1745769047.241237306 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/t/01-width.t0000644000175000001440000000527515003200065017476 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; #use utf8; use open qw(:std :utf8); use Test::More; use Term::Choose::LineFold::XS; #my $wide = $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE}; my $wide; # 24.03.2025 if ( exists $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE} ) { # $wide = $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE}; # } # else { # $wide = $ENV{TC_AMBIGUOUS_WIDE}; # } # my @char_tests = ( [ "\x{61}", 1 ], # a [ "\x{ff41}", 2 ], # Full-width a [ "\x{4e2d}", 2 ], # CJK character 中, [ "\x{b7}", $wide ? 2 : 1 ], # Middle dot ·, ambiguous width [ "\x{1f44d}", 2 ], # 👍 [ "\x{20}", 1 ], [ "\x{ff71}", 1 ], # Half-width Katakana ア [ "\x{1f600}", 2 ], # 😀 [ "\x0", 1 ], # Null character, default to 1 [ "\x{11000}", 1 ], # Above Unicode range, defaults to 1 [ "\x{ffe9}", 1 ], # Yen sign ¥ [ "\x{ffe5}", 2 ], # Fullwidth Yen sign ¥ ); for my $d ( @char_tests ) { my ( $char, $expected_w ) = @$d; my $w = Term::Choose::LineFold::XS::char_width( ord $char ); ok( $w == $expected_w, "char_width( ord $char ): $w -> $expected_w" ); } my @str_tests = ( [ "\x{61}\x{ff41}\x{4e2d}\x{b7}\x{1f44d}\x{20}\x{ff71}\x{3042}", $wide ? 13 : 12 ], [ "\x{68}\x{65}\x{6c}\x{6c}\x{6f}", 5 ], # "hello" [ "\x{68}\x{e9}\x{6c}\x{6c}\x{6f}", $wide ? 6 : 5 ], # "héllo" [ "\x{61}\x{3042}\x{62}\x{3044}\x{63}\x{3046}", 9 ], # "aあbいcう", 9], [ "\x{1d11e}\x{1d122}\x{1d12b}", 3 ], # musical symbols [ "\x{61}\x{ff}\x{62}\x{63}\x{64}", 5 ], # "a\x{ff}bcd" malformed UTF-8 [ "\x{ff21}\x{ff22}\x{ff23}\x{ff24}\x{ff25}", 10 ], # "ABCDE" [ "\x{3053}\x{3093}\x{306b}\x{3061}\x{306f}", 10 ], # "こんにちは" [ "\x{c548}\x{b155}\x{d558}\x{c138}\x{c694}", 10 ], # "안녕하세요" [ "\x{0e2a}\x{0e27}\x{0e31}\x{0e2a}\x{0e14}\x{0e35}", 4 ], # "สวัสดี" [ "\x{48}\x{65}\x{6c}\x{6c}\x{6f}\x{20}\x{1f60a}\x{20}", 9 ], # "Hello 😊 " [ "\x{77}\x{6f}\x{72}\x{6c}\x{64}\x{20}\x{1f389}", 8 ], # "world 🎉" ); for my $d (@str_tests) { my ( $str, $expected_w ) = @$d; my $w = Term::Choose::LineFold::XS::print_columns( $str ); ok( $w == $expected_w, "print_columns( $str ): $w -> $expected_w" ); } done_testing(); Term-Choose-LineFold-XS-0.001/t/PaxHeaders/00-load.t0000644000000000000000000000013215001227642016522 xustar0030 mtime=1745170338.883608361 30 atime=1745769047.193238222 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/t/00-load.t0000644000175000001440000000041715001227642017276 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('Term::Choose::LineFold::XS') or BAIL_OUT("Can't load Term::Choose::LineFold::XS");; } diag( "Testing Term::Choose::LineFold::XS $Term::Choose::LineFold::XS::VERSION, Perl $], $^X" ); Term-Choose-LineFold-XS-0.001/PaxHeaders/MANIFEST0000644000000000000000000000012715003451132016066 xustar0029 mtime=1745769050.25717979 29 atime=1745769050.25717979 29 ctime=1745769050.25717979 Term-Choose-LineFold-XS-0.001/MANIFEST0000644000175000001440000000105315003451132016633 0ustar00mmusers00000000000000Changes charwidth_ambiguous_is_wide.h charwidth_default.h lib/Term/Choose/LineFold/XS.pm LICENSE Makefile.PL MANIFEST This list of files README t/00-load.t t/01-width.t t/02-cut.t XS.bs XS.c XS.o XS.xs xt/manifest.t xt/perl_minimum_version.t xt/pod-coverage.t xt/pod.t xt/prereqs.t xt/spelling.t xt/synopsis.t xt/vars.t xt/version1.t xt/version2.t xt/whitespaces.t xt/year_copyright.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Term-Choose-LineFold-XS-0.001/PaxHeaders/META.yml0000644000000000000000000000013215003451132016202 xustar0030 mtime=1745769050.125182307 30 atime=1745769050.077183221 30 ctime=1745769050.125182307 Term-Choose-LineFold-XS-0.001/META.yml0000644000175000001440000000143715003451132016761 0ustar00mmusers00000000000000--- abstract: 'XS acceleration for Term-Choose-LineFold' author: - 'Matthaeus Kiem ' build_requires: Test::More: '0' open: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.74, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Term-Choose-LineFold-XS no_index: directory: - t - inc requires: Exporter: '0' XSLoader: '0' perl: '5.016000' strict: '0' warnings: '0' resources: bugtracker: https://github.com/kuerbis/Term-Choose-LineFold-XS/issues repository: https://github.com/kuerbis/Term-Choose-LineFold-XS.git version: '0.001' x_serialization_backend: 'CPAN::Meta::YAML version 0.020' Term-Choose-LineFold-XS-0.001/PaxHeaders/xt0000644000000000000000000000013215003451132015307 xustar0030 mtime=1745769050.077183221 30 atime=1745769050.073183298 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/0000755000175000001440000000000015003451132016136 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/pod-coverage.t0000644000000000000000000000013115003173317020131 xustar0029 mtime=1745680079.38220455 30 atime=1745768581.329366925 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/pod-coverage.t0000644000175000001440000000037615003173317020712 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::More; use Test::Pod::Coverage::TrustMe; use Pod::Coverage::TrustMe; use lib 'lib'; use Term::Choose::LineFold::XS; plan tests => 1; pod_coverage_ok( 'Term::Choose::LineFold::XS', { export_only => 1 } ); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/version2.t0000644000000000000000000000013115003114073017317 xustar0030 mtime=1745655867.856681582 29 atime=1745768581.33336686 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/xt/version2.t0000644000175000001440000000171615003114073020077 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Time::Piece; use Test::More tests => 3; my $v = -1; my $v_pod = -1; open my $fh, '<', 'lib/Term/Choose/LineFold/XS.pm' or die $!; while ( my $line = <$fh> ) { if ( $line =~ /^our\s\$VERSION\s=\s'(\d\.\d\d\d(?:_\d\d)?)';/ ) { $v = $1; } if ( $line =~ /^=pod/ .. $line =~ /^=cut/ ) { if ( $line =~ /^\s*Version\s+(\S+)/ ) { $v_pod = $1; } } } close $fh; is( $v, $v_pod, 'Version in POD Term::Choose::LineFold::XS OK' ); my $release_date = -1; my $v_changes = -1; open my $fh_ch, '<', 'Changes' or die $!; while ( my $line = <$fh_ch> ) { if ( $line =~ /^\s*(\d+\.\d\d\d(?:_\d\d)?)\s+(\d\d\d\d-\d\d-\d\d)\s*\z/ ) { $v_changes = $1; $release_date = $2; last; } } close $fh_ch; is( $v, $v_changes, 'Version in "Changes" OK' ); my $t = localtime; my $today = $t->ymd; is( $release_date, $today, 'Release date in Changes is date from today' ); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/manifest.t0000644000000000000000000000013215003115163017360 xustar0030 mtime=1745656435.383562693 30 atime=1745768581.345366664 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/manifest.t0000644000175000001440000000014015003115163020125 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::More; use Test::CheckManifest; ok_manifest(); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/vars.t0000644000000000000000000000013215003114550016524 xustar0030 mtime=1745656168.257748685 30 atime=1745768581.349366598 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/vars.t0000644000175000001440000000010615003114550017273 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::Vars; all_vars_ok(); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/whitespaces.t0000644000000000000000000000013215003114576020100 xustar0030 mtime=1745656190.589231555 30 atime=1745768633.792514505 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/whitespaces.t0000644000175000001440000000033015003114576020646 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::Whitespaces { dirs => [ 'lib', 't', 'xt', ], files => [ 'README', 'Makefile.PL', 'Changes', ], }; Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/synopsis.t0000644000000000000000000000013115003114537017444 xustar0030 mtime=1745656159.389954041 29 atime=1745768633.78851457 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/synopsis.t0000644000175000001440000000017715003114537020224 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::Synopsis; use lib 'lib'; use Term::Choose::LineFold::XS; all_synopsis_ok(); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/perl_minimum_version.t0000644000000000000000000000013115003114455022016 xustar0030 mtime=1745656109.871100791 29 atime=1745768633.78851457 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/perl_minimum_version.t0000644000175000001440000000330215003114455022567 0ustar00mmusers00000000000000use 5.16.0; use warnings; use strict; use Perl::MinimumVersion; use Perl::Version; use File::Find; use Test::More tests => 2; my $make_minimum; open my $fh_m, '<', 'Makefile.PL' or die $!; while ( my $line = <$fh_m> ) { if ( $line =~ /^\s*MIN_PERL_VERSION\s*=>\s*'([^']+)',/ ) { my $version = Perl::Version->new( $1 ); my $numified = $version->numify; $make_minimum = $numified; last; } } close $fh_m or die $!; my $pod_minimum; open my $fh_p, '<', 'lib/Term/Choose/LineFold/XS.pm' or die $!; while ( my $line = <$fh_p> ) { if ( $line =~ /^=head2\s+Perl\s+version/ .. $line =~ /^=head2\s+Modules/ ) { if ( $line =~ /Perl\sversion\s(5\.\d\d?\.\d+)\s/ ) { my $version = Perl::Version->new( $1 ); my $numified = $version->numify; $pod_minimum = $numified; last; } } } close $fh_p or die $!; my @files; for my $dir ( 'lib', 't' ) { find( { wanted => sub { my $file = $File::Find::name; return if ! -f $file; push @files, $file; }, no_chdir => 1, }, $dir ); } my %explicit_minimum; for my $file ( @files ) { my $object = Perl::MinimumVersion->new( $file ); my $min_exp_v = $object->minimum_explicit_version; my $version = Perl::Version->new( $min_exp_v ); my $numified = $version->numify; $explicit_minimum{$numified}++; } my ( $explicit_minimum ) = keys %explicit_minimum; cmp_ok( $make_minimum, '==', $explicit_minimum, 'perl minimum version in Makefile.PL == explicit perl minimum version' ); cmp_ok( $make_minimum, '==', $pod_minimum, 'perl minimum version in Makefile.PL == pod perl minimum version' ); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/version1.t0000644000000000000000000000013115003114562017321 xustar0030 mtime=1745656178.549510356 29 atime=1745768633.78851457 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/version1.t0000644000175000001440000000035115003114562020073 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::More; use Test::Version qw( version_ok ), { # is_strict => 1, has_version => 1, }; #version_all_ok( 'lib' ); version_ok( 'lib/Term/Choose/LineFold/XS.pm' ); done_testing; Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/spelling.t0000644000000000000000000000013115003114521017363 xustar0030 mtime=1745656145.774269347 29 atime=1745768633.78851457 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/spelling.t0000644000175000001440000000032615003114521020137 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::More; use Test::Spelling; set_spell_cmd('aspell list -l en -p /dev/null'); add_stopwords(); all_pod_files_spelling_ok(); __DATA__ Kiem LineFold Matthäus Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/year_copyright.t0000644000000000000000000000013115003115571020604 xustar0029 mtime=1745656697.20952007 30 atime=1745768633.792514505 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/year_copyright.t0000644000175000001440000000142415003115571021360 0ustar00mmusers00000000000000use 5.16.0; use warnings; use strict; use Test::More tests => 1; use Time::Piece; my $t = localtime; my $this_year = $t->year; my @files = ( 'README', 'LICENSE', 'lib/Term/Choose/LineFold/XS.pm', ); my $author = 'Matth..?us Kiem'; my $error = 0; my $diag = ''; for my $file ( @files ) { open my $fh, '<', $file or die $!; while ( my $line = <$fh> ) { if ( $line =~ /copyright(?: \(c\))? .*$author/i ) { if ( $line !~ /copyright(?: \(c\))? 20\d\d-\Q$this_year\E /i && $line !~ /copyright(?: \(c\))? \Q$this_year\E /i ) { $diag .= sprintf( "%15s - line %d: %s\n", $file, $., $line ); $error++; } } } close $fh; } ok( $error == 0, "Copyright year" ) or diag( $diag ); diag( "\n" ); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/prereqs.t0000644000000000000000000000013115003113661017233 xustar0030 mtime=1745655729.607868129 29 atime=1745768633.78851457 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/xt/prereqs.t0000644000175000001440000000012715003113661020006 0ustar00mmusers00000000000000use 5.22.0; use warnings; use strict; use Test::More; use Test::Prereq; prereq_ok(); Term-Choose-LineFold-XS-0.001/xt/PaxHeaders/pod.t0000644000000000000000000000013015003114501016325 xustar0029 mtime=1745656129.46264709 29 atime=1745768633.78851457 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/xt/pod.t0000644000175000001440000000013315003114501017076 0ustar00mmusers00000000000000use 5.16.0; use strict; use warnings; use Test::More; use Test::Pod; all_pod_files_ok(); Term-Choose-LineFold-XS-0.001/PaxHeaders/Makefile.PL0000644000000000000000000000013115003446504016711 xustar0030 mtime=1745767748.971040547 29 atime=1745769046.41725302 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/Makefile.PL0000644000175000001440000000231015003446504017460 0ustar00mmusers00000000000000use 5.16.0; use warnings; use strict; use ExtUtils::MakeMaker; my $define = $ENV{TC_AMBIGUOUS_WIDTH_IS_WIDE} ? '-DAMBIGUOUS_WIDTH_IS_WIDE' : ''; WriteMakefile( MIN_PERL_VERSION => '5.16.0', LICENSE => 'perl', META_MERGE => { 'meta-spec' => { version => 2 }, resources => { bugtracker => { web => "https://github.com/kuerbis/Term-Choose-LineFold-XS/issues", }, repository => { type => 'git', web => 'https://github.com/kuerbis/Term-Choose-LineFold-XS', url => 'https://github.com/kuerbis/Term-Choose-LineFold-XS.git', }, }, }, AUTHOR => 'Matthaeus Kiem ', NAME => 'Term::Choose::LineFold::XS', ABSTRACT_FROM => 'lib/Term/Choose/LineFold/XS.pm', VERSION_FROM => 'lib/Term/Choose/LineFold/XS.pm', BUILD_REQUIRES => { 'Test::More' => 0, 'open' => 0, }, PREREQ_PM => { 'strict' => 0, 'warnings' => 0, 'Exporter' => 0, 'XSLoader' => 0, }, LIBS => [''], DEFINE => $define, INC => '-I.', XS => { 'XS.xs' => 'XS.c' }, ); Term-Choose-LineFold-XS-0.001/PaxHeaders/META.json0000644000000000000000000000013115003451132016351 xustar0030 mtime=1745769050.209180704 29 atime=1745769050.12918223 30 ctime=1745769050.213180628 Term-Choose-LineFold-XS-0.001/META.json0000644000175000001440000000262215003451132017126 0ustar00mmusers00000000000000{ "abstract" : "XS acceleration for Term-Choose-LineFold", "author" : [ "Matthaeus Kiem " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.74, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Term-Choose-LineFold-XS", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "Test::More" : "0", "open" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Exporter" : "0", "XSLoader" : "0", "perl" : "5.016000", "strict" : "0", "warnings" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/kuerbis/Term-Choose-LineFold-XS/issues" }, "repository" : { "type" : "git", "url" : "https://github.com/kuerbis/Term-Choose-LineFold-XS.git", "web" : "https://github.com/kuerbis/Term-Choose-LineFold-XS" } }, "version" : "0.001", "x_serialization_backend" : "JSON::PP version 4.16" } Term-Choose-LineFold-XS-0.001/PaxHeaders/lib0000644000000000000000000000013215003451132015422 xustar0030 mtime=1745769050.077183221 30 atime=1745769050.077183221 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/lib/0000755000175000001440000000000015003451132016251 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/lib/PaxHeaders/Term0000644000000000000000000000013215003451132016331 xustar0030 mtime=1745769050.077183221 30 atime=1745769050.077183221 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/lib/Term/0000755000175000001440000000000015003451132017160 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/lib/Term/PaxHeaders/Choose0000644000000000000000000000013215003451132017551 xustar0030 mtime=1745769050.077183221 30 atime=1745769050.077183221 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/lib/Term/Choose/0000755000175000001440000000000015003451132020400 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/lib/Term/Choose/PaxHeaders/LineFold0000644000000000000000000000013215003451132021245 xustar0030 mtime=1745769050.077183221 30 atime=1745769050.077183221 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/lib/Term/Choose/LineFold/0000755000175000001440000000000015003451132022074 5ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/lib/Term/Choose/LineFold/PaxHeaders/XS.pm0000644000000000000000000000013215003444114022214 xustar0030 mtime=1745766476.966608866 30 atime=1745769046.493251571 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/lib/Term/Choose/LineFold/XS.pm0000644000175000001440000000271115003444114022767 0ustar00mmusers00000000000000package Term::Choose::LineFold::XS; use strict; use warnings; use 5.16.0; our $VERSION = '0.001'; use Exporter 'import'; our @EXPORT_OK = qw( print_columns ); require XSLoader; XSLoader::load( 'Term::Choose::LineFold::XS', $VERSION ); 1; __END__ =pod =encoding UTF-8 =head1 NAME Term::Choose::LineFold::XS - XS acceleration for Term-Choose-LineFold =head1 VERSION Version 0.001 =cut =head1 DESCRIPTION I in this context refers to the number of occupied columns of a character string on a terminal with a monospaced font. By default ambiguous width characters are treated as half width. If the environment variable C is set to a true value, ambiguous width characters are treated as full width. =head2 Perl version Requires Perl version 5.16.0 or greater. =head1 EXPORT Nothing by default. use Term::Choose::LineFold::XS qw( print_columns ); =head1 FUNCTIONS =head2 print_columns Get the number of occupied columns of a character string on a terminal. The string passed to this function is a decoded string, free of control characters, non-characters, and surrogates. $print_width = print_columns( $string ); =head1 AUTHOR Matthäus Kiem =head1 LICENSE AND COPYRIGHT Copyright (C) 2025 Matthäus Kiem. This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For details, see the full text of the licenses in the file LICENSE. =cut Term-Choose-LineFold-XS-0.001/PaxHeaders/charwidth_ambiguous_is_wide.h0000644000000000000000000000013215000743421022637 xustar0030 mtime=1745078033.201977529 30 atime=1745768573.353497155 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/charwidth_ambiguous_is_wide.h0000644000175000001440000010434515000743421023420 0ustar00mmusers00000000000000#ifndef CHARWIDTH_AMBIGUOUS_IS_WIDE_H #define CHARWIDTH_AMBIGUOUS_IS_WIDE_H typedef struct { unsigned int start; unsigned int end; int width; } WidthRange; static const WidthRange width_table[] = { // { 0x0, 0x1f, -1 }, { 0x20, 0x7e, 1 }, // { 0x7f, 0x9f, -1 }, { 0xa0, 0xa0, 1 }, { 0xa1, 0xa1, 2 }, { 0xa2, 0xa3, 1 }, { 0xa4, 0xa4, 2 }, { 0xa5, 0xa6, 1 }, { 0xa7, 0xa8, 2 }, { 0xa9, 0xa9, 1 }, { 0xaa, 0xaa, 2 }, { 0xab, 0xac, 1 }, { 0xad, 0xae, 2 }, { 0xaf, 0xaf, 1 }, { 0xb0, 0xb4, 2 }, { 0xb5, 0xb5, 1 }, { 0xb6, 0xba, 2 }, { 0xbb, 0xbb, 1 }, { 0xbc, 0xbf, 2 }, { 0xc0, 0xc5, 1 }, { 0xc6, 0xc6, 2 }, { 0xc7, 0xcf, 1 }, { 0xd0, 0xd0, 2 }, { 0xd1, 0xd6, 1 }, { 0xd7, 0xd8, 2 }, { 0xd9, 0xdd, 1 }, { 0xde, 0xe1, 2 }, { 0xe2, 0xe5, 1 }, { 0xe6, 0xe6, 2 }, { 0xe7, 0xe7, 1 }, { 0xe8, 0xea, 2 }, { 0xeb, 0xeb, 1 }, { 0xec, 0xed, 2 }, { 0xee, 0xef, 1 }, { 0xf0, 0xf0, 2 }, { 0xf1, 0xf1, 1 }, { 0xf2, 0xf3, 2 }, { 0xf4, 0xf6, 1 }, { 0xf7, 0xfa, 2 }, { 0xfb, 0xfb, 1 }, { 0xfc, 0xfc, 2 }, { 0xfd, 0xfd, 1 }, { 0xfe, 0xfe, 2 }, { 0xff, 0x100, 1 }, { 0x101, 0x101, 2 }, { 0x102, 0x110, 1 }, { 0x111, 0x111, 2 }, { 0x112, 0x112, 1 }, { 0x113, 0x113, 2 }, { 0x114, 0x11a, 1 }, { 0x11b, 0x11b, 2 }, { 0x11c, 0x125, 1 }, { 0x126, 0x127, 2 }, { 0x128, 0x12a, 1 }, { 0x12b, 0x12b, 2 }, { 0x12c, 0x130, 1 }, { 0x131, 0x133, 2 }, { 0x134, 0x137, 1 }, { 0x138, 0x138, 2 }, { 0x139, 0x13e, 1 }, { 0x13f, 0x142, 2 }, { 0x143, 0x143, 1 }, { 0x144, 0x144, 2 }, { 0x145, 0x147, 1 }, { 0x148, 0x14b, 2 }, { 0x14c, 0x14c, 1 }, { 0x14d, 0x14d, 2 }, { 0x14e, 0x151, 1 }, { 0x152, 0x153, 2 }, { 0x154, 0x165, 1 }, { 0x166, 0x167, 2 }, { 0x168, 0x16a, 1 }, { 0x16b, 0x16b, 2 }, { 0x16c, 0x1cd, 1 }, { 0x1ce, 0x1ce, 2 }, { 0x1cf, 0x1cf, 1 }, { 0x1d0, 0x1d0, 2 }, { 0x1d1, 0x1d1, 1 }, { 0x1d2, 0x1d2, 2 }, { 0x1d3, 0x1d3, 1 }, { 0x1d4, 0x1d4, 2 }, { 0x1d5, 0x1d5, 1 }, { 0x1d6, 0x1d6, 2 }, { 0x1d7, 0x1d7, 1 }, { 0x1d8, 0x1d8, 2 }, { 0x1d9, 0x1d9, 1 }, { 0x1da, 0x1da, 2 }, { 0x1db, 0x1db, 1 }, { 0x1dc, 0x1dc, 2 }, { 0x1dd, 0x250, 1 }, { 0x251, 0x251, 2 }, { 0x252, 0x260, 1 }, { 0x261, 0x261, 2 }, { 0x262, 0x2c3, 1 }, { 0x2c4, 0x2c4, 2 }, { 0x2c5, 0x2c6, 1 }, { 0x2c7, 0x2c7, 2 }, { 0x2c8, 0x2c8, 1 }, { 0x2c9, 0x2cb, 2 }, { 0x2cc, 0x2cc, 1 }, { 0x2cd, 0x2cd, 2 }, { 0x2ce, 0x2cf, 1 }, { 0x2d0, 0x2d0, 2 }, { 0x2d1, 0x2d7, 1 }, { 0x2d8, 0x2db, 2 }, { 0x2dc, 0x2dc, 1 }, { 0x2dd, 0x2dd, 2 }, { 0x2de, 0x2de, 1 }, { 0x2df, 0x2df, 2 }, { 0x2e0, 0x2ff, 1 }, { 0x300, 0x36f, 0 }, { 0x370, 0x390, 1 }, { 0x391, 0x3a1, 2 }, { 0x3a2, 0x3a2, 1 }, { 0x3a3, 0x3a9, 2 }, { 0x3aa, 0x3b0, 1 }, { 0x3b1, 0x3c1, 2 }, { 0x3c2, 0x3c2, 1 }, { 0x3c3, 0x3c9, 2 }, { 0x3ca, 0x400, 1 }, { 0x401, 0x401, 2 }, { 0x402, 0x40f, 1 }, { 0x410, 0x44f, 2 }, { 0x450, 0x450, 1 }, { 0x451, 0x451, 2 }, { 0x452, 0x482, 1 }, { 0x483, 0x489, 0 }, { 0x48a, 0x590, 1 }, { 0x591, 0x5bd, 0 }, { 0x5be, 0x5be, 1 }, { 0x5bf, 0x5bf, 0 }, { 0x5c0, 0x5c0, 1 }, { 0x5c1, 0x5c2, 0 }, { 0x5c3, 0x5c3, 1 }, { 0x5c4, 0x5c5, 0 }, { 0x5c6, 0x5c6, 1 }, { 0x5c7, 0x5c7, 0 }, { 0x5c8, 0x60f, 1 }, { 0x610, 0x61a, 0 }, { 0x61b, 0x61b, 1 }, { 0x61c, 0x61c, 0 }, { 0x61d, 0x64a, 1 }, { 0x64b, 0x65f, 0 }, { 0x660, 0x66f, 1 }, { 0x670, 0x670, 0 }, { 0x671, 0x6d5, 1 }, { 0x6d6, 0x6dc, 0 }, { 0x6dd, 0x6de, 1 }, { 0x6df, 0x6e4, 0 }, { 0x6e5, 0x6e6, 1 }, { 0x6e7, 0x6e8, 0 }, { 0x6e9, 0x6e9, 1 }, { 0x6ea, 0x6ed, 0 }, { 0x6ee, 0x70e, 1 }, { 0x70f, 0x70f, 0 }, { 0x710, 0x710, 1 }, { 0x711, 0x711, 0 }, { 0x712, 0x72f, 1 }, { 0x730, 0x74a, 0 }, { 0x74b, 0x7a5, 1 }, { 0x7a6, 0x7b0, 0 }, { 0x7b1, 0x7ea, 1 }, { 0x7eb, 0x7f3, 0 }, { 0x7f4, 0x7fc, 1 }, { 0x7fd, 0x7fd, 0 }, { 0x7fe, 0x815, 1 }, { 0x816, 0x819, 0 }, { 0x81a, 0x81a, 1 }, { 0x81b, 0x823, 0 }, { 0x824, 0x824, 1 }, { 0x825, 0x827, 0 }, { 0x828, 0x828, 1 }, { 0x829, 0x82d, 0 }, { 0x82e, 0x858, 1 }, { 0x859, 0x85b, 0 }, { 0x85c, 0x896, 1 }, { 0x897, 0x89f, 0 }, { 0x8a0, 0x8c9, 1 }, { 0x8ca, 0x8e1, 0 }, { 0x8e2, 0x8e2, 1 }, { 0x8e3, 0x902, 0 }, { 0x903, 0x939, 1 }, { 0x93a, 0x93a, 0 }, { 0x93b, 0x93b, 1 }, { 0x93c, 0x93c, 0 }, { 0x93d, 0x940, 1 }, { 0x941, 0x948, 0 }, { 0x949, 0x94c, 1 }, { 0x94d, 0x94d, 0 }, { 0x94e, 0x950, 1 }, { 0x951, 0x957, 0 }, { 0x958, 0x961, 1 }, { 0x962, 0x963, 0 }, { 0x964, 0x980, 1 }, { 0x981, 0x981, 0 }, { 0x982, 0x9bb, 1 }, { 0x9bc, 0x9bc, 0 }, { 0x9bd, 0x9c0, 1 }, { 0x9c1, 0x9c4, 0 }, { 0x9c5, 0x9cc, 1 }, { 0x9cd, 0x9cd, 0 }, { 0x9ce, 0x9e1, 1 }, { 0x9e2, 0x9e3, 0 }, { 0x9e4, 0x9fd, 1 }, { 0x9fe, 0x9fe, 0 }, { 0x9ff, 0xa00, 1 }, { 0xa01, 0xa02, 0 }, { 0xa03, 0xa3b, 1 }, { 0xa3c, 0xa3c, 0 }, { 0xa3d, 0xa40, 1 }, { 0xa41, 0xa42, 0 }, { 0xa43, 0xa46, 1 }, { 0xa47, 0xa48, 0 }, { 0xa49, 0xa4a, 1 }, { 0xa4b, 0xa4d, 0 }, { 0xa4e, 0xa50, 1 }, { 0xa51, 0xa51, 0 }, { 0xa52, 0xa6f, 1 }, { 0xa70, 0xa71, 0 }, { 0xa72, 0xa74, 1 }, { 0xa75, 0xa75, 0 }, { 0xa76, 0xa80, 1 }, { 0xa81, 0xa82, 0 }, { 0xa83, 0xabb, 1 }, { 0xabc, 0xabc, 0 }, { 0xabd, 0xac0, 1 }, { 0xac1, 0xac5, 0 }, { 0xac6, 0xac6, 1 }, { 0xac7, 0xac8, 0 }, { 0xac9, 0xacc, 1 }, { 0xacd, 0xacd, 0 }, { 0xace, 0xae1, 1 }, { 0xae2, 0xae3, 0 }, { 0xae4, 0xaf9, 1 }, { 0xafa, 0xaff, 0 }, { 0xb00, 0xb00, 1 }, { 0xb01, 0xb01, 0 }, { 0xb02, 0xb3b, 1 }, { 0xb3c, 0xb3c, 0 }, { 0xb3d, 0xb3e, 1 }, { 0xb3f, 0xb3f, 0 }, { 0xb40, 0xb40, 1 }, { 0xb41, 0xb44, 0 }, { 0xb45, 0xb4c, 1 }, { 0xb4d, 0xb4d, 0 }, { 0xb4e, 0xb54, 1 }, { 0xb55, 0xb56, 0 }, { 0xb57, 0xb61, 1 }, { 0xb62, 0xb63, 0 }, { 0xb64, 0xb81, 1 }, { 0xb82, 0xb82, 0 }, { 0xb83, 0xbbf, 1 }, { 0xbc0, 0xbc0, 0 }, { 0xbc1, 0xbcc, 1 }, { 0xbcd, 0xbcd, 0 }, { 0xbce, 0xbff, 1 }, { 0xc00, 0xc00, 0 }, { 0xc01, 0xc03, 1 }, { 0xc04, 0xc04, 0 }, { 0xc05, 0xc3b, 1 }, { 0xc3c, 0xc3c, 0 }, { 0xc3d, 0xc3d, 1 }, { 0xc3e, 0xc40, 0 }, { 0xc41, 0xc45, 1 }, { 0xc46, 0xc48, 0 }, { 0xc49, 0xc49, 1 }, { 0xc4a, 0xc4d, 0 }, { 0xc4e, 0xc54, 1 }, { 0xc55, 0xc56, 0 }, { 0xc57, 0xc61, 1 }, { 0xc62, 0xc63, 0 }, { 0xc64, 0xc80, 1 }, { 0xc81, 0xc81, 0 }, { 0xc82, 0xcbb, 1 }, { 0xcbc, 0xcbc, 0 }, { 0xcbd, 0xcbe, 1 }, { 0xcbf, 0xcbf, 0 }, { 0xcc0, 0xcc5, 1 }, { 0xcc6, 0xcc6, 0 }, { 0xcc7, 0xccb, 1 }, { 0xccc, 0xccd, 0 }, { 0xcce, 0xce1, 1 }, { 0xce2, 0xce3, 0 }, { 0xce4, 0xcff, 1 }, { 0xd00, 0xd01, 0 }, { 0xd02, 0xd3a, 1 }, { 0xd3b, 0xd3c, 0 }, { 0xd3d, 0xd40, 1 }, { 0xd41, 0xd44, 0 }, { 0xd45, 0xd4c, 1 }, { 0xd4d, 0xd4d, 0 }, { 0xd4e, 0xd61, 1 }, { 0xd62, 0xd63, 0 }, { 0xd64, 0xd80, 1 }, { 0xd81, 0xd81, 0 }, { 0xd82, 0xdc9, 1 }, { 0xdca, 0xdca, 0 }, { 0xdcb, 0xdd1, 1 }, { 0xdd2, 0xdd4, 0 }, { 0xdd5, 0xdd5, 1 }, { 0xdd6, 0xdd6, 0 }, { 0xdd7, 0xe30, 1 }, { 0xe31, 0xe31, 0 }, { 0xe32, 0xe33, 1 }, { 0xe34, 0xe3a, 0 }, { 0xe3b, 0xe46, 1 }, { 0xe47, 0xe4e, 0 }, { 0xe4f, 0xeb0, 1 }, { 0xeb1, 0xeb1, 0 }, { 0xeb2, 0xeb3, 1 }, { 0xeb4, 0xebc, 0 }, { 0xebd, 0xec7, 1 }, { 0xec8, 0xece, 0 }, { 0xecf, 0xf17, 1 }, { 0xf18, 0xf19, 0 }, { 0xf1a, 0xf34, 1 }, { 0xf35, 0xf35, 0 }, { 0xf36, 0xf36, 1 }, { 0xf37, 0xf37, 0 }, { 0xf38, 0xf38, 1 }, { 0xf39, 0xf39, 0 }, { 0xf3a, 0xf70, 1 }, { 0xf71, 0xf7e, 0 }, { 0xf7f, 0xf7f, 1 }, { 0xf80, 0xf84, 0 }, { 0xf85, 0xf85, 1 }, { 0xf86, 0xf87, 0 }, { 0xf88, 0xf8c, 1 }, { 0xf8d, 0xf97, 0 }, { 0xf98, 0xf98, 1 }, { 0xf99, 0xfbc, 0 }, { 0xfbd, 0xfc5, 1 }, { 0xfc6, 0xfc6, 0 }, { 0xfc7, 0x102c, 1 }, { 0x102d, 0x1030, 0 }, { 0x1031, 0x1031, 1 }, { 0x1032, 0x1037, 0 }, { 0x1038, 0x1038, 1 }, { 0x1039, 0x103a, 0 }, { 0x103b, 0x103c, 1 }, { 0x103d, 0x103e, 0 }, { 0x103f, 0x1057, 1 }, { 0x1058, 0x1059, 0 }, { 0x105a, 0x105d, 1 }, { 0x105e, 0x1060, 0 }, { 0x1061, 0x1070, 1 }, { 0x1071, 0x1074, 0 }, { 0x1075, 0x1081, 1 }, { 0x1082, 0x1082, 0 }, { 0x1083, 0x1084, 1 }, { 0x1085, 0x1086, 0 }, { 0x1087, 0x108c, 1 }, { 0x108d, 0x108d, 0 }, { 0x108e, 0x109c, 1 }, { 0x109d, 0x109d, 0 }, { 0x109e, 0x10ff, 1 }, { 0x1100, 0x115f, 2 }, { 0x1160, 0x11ff, 0 }, { 0x1200, 0x135c, 1 }, { 0x135d, 0x135f, 0 }, { 0x1360, 0x1711, 1 }, { 0x1712, 0x1714, 0 }, { 0x1715, 0x1731, 1 }, { 0x1732, 0x1733, 0 }, { 0x1734, 0x1751, 1 }, { 0x1752, 0x1753, 0 }, { 0x1754, 0x1771, 1 }, { 0x1772, 0x1773, 0 }, { 0x1774, 0x17b3, 1 }, { 0x17b4, 0x17b5, 0 }, { 0x17b6, 0x17b6, 1 }, { 0x17b7, 0x17bd, 0 }, { 0x17be, 0x17c5, 1 }, { 0x17c6, 0x17c6, 0 }, { 0x17c7, 0x17c8, 1 }, { 0x17c9, 0x17d3, 0 }, { 0x17d4, 0x17dc, 1 }, { 0x17dd, 0x17dd, 0 }, { 0x17de, 0x180a, 1 }, { 0x180b, 0x180f, 0 }, { 0x1810, 0x1884, 1 }, { 0x1885, 0x1886, 0 }, { 0x1887, 0x18a8, 1 }, { 0x18a9, 0x18a9, 0 }, { 0x18aa, 0x191f, 1 }, { 0x1920, 0x1922, 0 }, { 0x1923, 0x1926, 1 }, { 0x1927, 0x1928, 0 }, { 0x1929, 0x1931, 1 }, { 0x1932, 0x1932, 0 }, { 0x1933, 0x1938, 1 }, { 0x1939, 0x193b, 0 }, { 0x193c, 0x1a16, 1 }, { 0x1a17, 0x1a18, 0 }, { 0x1a19, 0x1a1a, 1 }, { 0x1a1b, 0x1a1b, 0 }, { 0x1a1c, 0x1a55, 1 }, { 0x1a56, 0x1a56, 0 }, { 0x1a57, 0x1a57, 1 }, { 0x1a58, 0x1a5e, 0 }, { 0x1a5f, 0x1a5f, 1 }, { 0x1a60, 0x1a60, 0 }, { 0x1a61, 0x1a61, 1 }, { 0x1a62, 0x1a62, 0 }, { 0x1a63, 0x1a64, 1 }, { 0x1a65, 0x1a6c, 0 }, { 0x1a6d, 0x1a72, 1 }, { 0x1a73, 0x1a7c, 0 }, { 0x1a7d, 0x1a7e, 1 }, { 0x1a7f, 0x1a7f, 0 }, { 0x1a80, 0x1aaf, 1 }, { 0x1ab0, 0x1ace, 0 }, { 0x1acf, 0x1aff, 1 }, { 0x1b00, 0x1b03, 0 }, { 0x1b04, 0x1b33, 1 }, { 0x1b34, 0x1b34, 0 }, { 0x1b35, 0x1b35, 1 }, { 0x1b36, 0x1b3a, 0 }, { 0x1b3b, 0x1b3b, 1 }, { 0x1b3c, 0x1b3c, 0 }, { 0x1b3d, 0x1b41, 1 }, { 0x1b42, 0x1b42, 0 }, { 0x1b43, 0x1b6a, 1 }, { 0x1b6b, 0x1b73, 0 }, { 0x1b74, 0x1b7f, 1 }, { 0x1b80, 0x1b81, 0 }, { 0x1b82, 0x1ba1, 1 }, { 0x1ba2, 0x1ba5, 0 }, { 0x1ba6, 0x1ba7, 1 }, { 0x1ba8, 0x1ba9, 0 }, { 0x1baa, 0x1baa, 1 }, { 0x1bab, 0x1bad, 0 }, { 0x1bae, 0x1be5, 1 }, { 0x1be6, 0x1be6, 0 }, { 0x1be7, 0x1be7, 1 }, { 0x1be8, 0x1be9, 0 }, { 0x1bea, 0x1bec, 1 }, { 0x1bed, 0x1bed, 0 }, { 0x1bee, 0x1bee, 1 }, { 0x1bef, 0x1bf1, 0 }, { 0x1bf2, 0x1c2b, 1 }, { 0x1c2c, 0x1c33, 0 }, { 0x1c34, 0x1c35, 1 }, { 0x1c36, 0x1c37, 0 }, { 0x1c38, 0x1ccf, 1 }, { 0x1cd0, 0x1cd2, 0 }, { 0x1cd3, 0x1cd3, 1 }, { 0x1cd4, 0x1ce0, 0 }, { 0x1ce1, 0x1ce1, 1 }, { 0x1ce2, 0x1ce8, 0 }, { 0x1ce9, 0x1cec, 1 }, { 0x1ced, 0x1ced, 0 }, { 0x1cee, 0x1cf3, 1 }, { 0x1cf4, 0x1cf4, 0 }, { 0x1cf5, 0x1cf7, 1 }, { 0x1cf8, 0x1cf9, 0 }, { 0x1cfa, 0x1dbf, 1 }, { 0x1dc0, 0x1dff, 0 }, { 0x1e00, 0x200a, 1 }, { 0x200b, 0x200f, 0 }, { 0x2010, 0x2010, 2 }, { 0x2011, 0x2012, 1 }, { 0x2013, 0x2016, 2 }, { 0x2017, 0x2017, 1 }, { 0x2018, 0x2019, 2 }, { 0x201a, 0x201b, 1 }, { 0x201c, 0x201d, 2 }, { 0x201e, 0x201f, 1 }, { 0x2020, 0x2022, 2 }, { 0x2023, 0x2023, 1 }, { 0x2024, 0x2027, 2 }, { 0x2028, 0x2029, 1 }, { 0x202a, 0x202e, 0 }, { 0x202f, 0x202f, 1 }, { 0x2030, 0x2030, 2 }, { 0x2031, 0x2031, 1 }, { 0x2032, 0x2033, 2 }, { 0x2034, 0x2034, 1 }, { 0x2035, 0x2035, 2 }, { 0x2036, 0x203a, 1 }, { 0x203b, 0x203b, 2 }, { 0x203c, 0x203d, 1 }, { 0x203e, 0x203e, 2 }, { 0x203f, 0x205f, 1 }, { 0x2060, 0x2064, 0 }, { 0x2065, 0x2065, 1 }, { 0x2066, 0x206f, 0 }, { 0x2070, 0x2073, 1 }, { 0x2074, 0x2074, 2 }, { 0x2075, 0x207e, 1 }, { 0x207f, 0x207f, 2 }, { 0x2080, 0x2080, 1 }, { 0x2081, 0x2084, 2 }, { 0x2085, 0x20ab, 1 }, { 0x20ac, 0x20ac, 2 }, { 0x20ad, 0x20cf, 1 }, { 0x20d0, 0x20f0, 0 }, { 0x20f1, 0x2102, 1 }, { 0x2103, 0x2103, 2 }, { 0x2104, 0x2104, 1 }, { 0x2105, 0x2105, 2 }, { 0x2106, 0x2108, 1 }, { 0x2109, 0x2109, 2 }, { 0x210a, 0x2112, 1 }, { 0x2113, 0x2113, 2 }, { 0x2114, 0x2115, 1 }, { 0x2116, 0x2116, 2 }, { 0x2117, 0x2120, 1 }, { 0x2121, 0x2122, 2 }, { 0x2123, 0x2125, 1 }, { 0x2126, 0x2126, 2 }, { 0x2127, 0x212a, 1 }, { 0x212b, 0x212b, 2 }, { 0x212c, 0x2152, 1 }, { 0x2153, 0x2154, 2 }, { 0x2155, 0x215a, 1 }, { 0x215b, 0x215e, 2 }, { 0x215f, 0x215f, 1 }, { 0x2160, 0x216b, 2 }, { 0x216c, 0x216f, 1 }, { 0x2170, 0x2179, 2 }, { 0x217a, 0x2188, 1 }, { 0x2189, 0x2189, 2 }, { 0x218a, 0x218f, 1 }, { 0x2190, 0x2199, 2 }, { 0x219a, 0x21b7, 1 }, { 0x21b8, 0x21b9, 2 }, { 0x21ba, 0x21d1, 1 }, { 0x21d2, 0x21d2, 2 }, { 0x21d3, 0x21d3, 1 }, { 0x21d4, 0x21d4, 2 }, { 0x21d5, 0x21e6, 1 }, { 0x21e7, 0x21e7, 2 }, { 0x21e8, 0x21ff, 1 }, { 0x2200, 0x2200, 2 }, { 0x2201, 0x2201, 1 }, { 0x2202, 0x2203, 2 }, { 0x2204, 0x2206, 1 }, { 0x2207, 0x2208, 2 }, { 0x2209, 0x220a, 1 }, { 0x220b, 0x220b, 2 }, { 0x220c, 0x220e, 1 }, { 0x220f, 0x220f, 2 }, { 0x2210, 0x2210, 1 }, { 0x2211, 0x2211, 2 }, { 0x2212, 0x2214, 1 }, { 0x2215, 0x2215, 2 }, { 0x2216, 0x2219, 1 }, { 0x221a, 0x221a, 2 }, { 0x221b, 0x221c, 1 }, { 0x221d, 0x2220, 2 }, { 0x2221, 0x2222, 1 }, { 0x2223, 0x2223, 2 }, { 0x2224, 0x2224, 1 }, { 0x2225, 0x2225, 2 }, { 0x2226, 0x2226, 1 }, { 0x2227, 0x222c, 2 }, { 0x222d, 0x222d, 1 }, { 0x222e, 0x222e, 2 }, { 0x222f, 0x2233, 1 }, { 0x2234, 0x2237, 2 }, { 0x2238, 0x223b, 1 }, { 0x223c, 0x223d, 2 }, { 0x223e, 0x2247, 1 }, { 0x2248, 0x2248, 2 }, { 0x2249, 0x224b, 1 }, { 0x224c, 0x224c, 2 }, { 0x224d, 0x2251, 1 }, { 0x2252, 0x2252, 2 }, { 0x2253, 0x225f, 1 }, { 0x2260, 0x2261, 2 }, { 0x2262, 0x2263, 1 }, { 0x2264, 0x2267, 2 }, { 0x2268, 0x2269, 1 }, { 0x226a, 0x226b, 2 }, { 0x226c, 0x226d, 1 }, { 0x226e, 0x226f, 2 }, { 0x2270, 0x2281, 1 }, { 0x2282, 0x2283, 2 }, { 0x2284, 0x2285, 1 }, { 0x2286, 0x2287, 2 }, { 0x2288, 0x2294, 1 }, { 0x2295, 0x2295, 2 }, { 0x2296, 0x2298, 1 }, { 0x2299, 0x2299, 2 }, { 0x229a, 0x22a4, 1 }, { 0x22a5, 0x22a5, 2 }, { 0x22a6, 0x22be, 1 }, { 0x22bf, 0x22bf, 2 }, { 0x22c0, 0x2311, 1 }, { 0x2312, 0x2312, 2 }, { 0x2313, 0x2319, 1 }, { 0x231a, 0x231b, 2 }, { 0x231c, 0x2328, 1 }, { 0x2329, 0x232a, 2 }, { 0x232b, 0x23e8, 1 }, { 0x23e9, 0x23ec, 2 }, { 0x23ed, 0x23ef, 1 }, { 0x23f0, 0x23f0, 2 }, { 0x23f1, 0x23f2, 1 }, { 0x23f3, 0x23f3, 2 }, { 0x23f4, 0x245f, 1 }, { 0x2460, 0x24e9, 2 }, { 0x24ea, 0x24ea, 1 }, { 0x24eb, 0x254b, 2 }, { 0x254c, 0x254f, 1 }, { 0x2550, 0x2573, 2 }, { 0x2574, 0x257f, 1 }, { 0x2580, 0x258f, 2 }, { 0x2590, 0x2591, 1 }, { 0x2592, 0x2595, 2 }, { 0x2596, 0x259f, 1 }, { 0x25a0, 0x25a1, 2 }, { 0x25a2, 0x25a2, 1 }, { 0x25a3, 0x25a9, 2 }, { 0x25aa, 0x25b1, 1 }, { 0x25b2, 0x25b3, 2 }, { 0x25b4, 0x25b5, 1 }, { 0x25b6, 0x25b7, 2 }, { 0x25b8, 0x25bb, 1 }, { 0x25bc, 0x25bd, 2 }, { 0x25be, 0x25bf, 1 }, { 0x25c0, 0x25c1, 2 }, { 0x25c2, 0x25c5, 1 }, { 0x25c6, 0x25c8, 2 }, { 0x25c9, 0x25ca, 1 }, { 0x25cb, 0x25cb, 2 }, { 0x25cc, 0x25cd, 1 }, { 0x25ce, 0x25d1, 2 }, { 0x25d2, 0x25e1, 1 }, { 0x25e2, 0x25e5, 2 }, { 0x25e6, 0x25ee, 1 }, { 0x25ef, 0x25ef, 2 }, { 0x25f0, 0x25fc, 1 }, { 0x25fd, 0x25fe, 2 }, { 0x25ff, 0x2604, 1 }, { 0x2605, 0x2606, 2 }, { 0x2607, 0x2608, 1 }, { 0x2609, 0x2609, 2 }, { 0x260a, 0x260d, 1 }, { 0x260e, 0x260f, 2 }, { 0x2610, 0x2613, 1 }, { 0x2614, 0x2615, 2 }, { 0x2616, 0x261b, 1 }, { 0x261c, 0x261c, 2 }, { 0x261d, 0x261d, 1 }, { 0x261e, 0x261e, 2 }, { 0x261f, 0x262f, 1 }, { 0x2630, 0x2637, 2 }, { 0x2638, 0x263f, 1 }, { 0x2640, 0x2640, 2 }, { 0x2641, 0x2641, 1 }, { 0x2642, 0x2642, 2 }, { 0x2643, 0x2647, 1 }, { 0x2648, 0x2653, 2 }, { 0x2654, 0x265f, 1 }, { 0x2660, 0x2661, 2 }, { 0x2662, 0x2662, 1 }, { 0x2663, 0x2665, 2 }, { 0x2666, 0x2666, 1 }, { 0x2667, 0x266a, 2 }, { 0x266b, 0x266b, 1 }, { 0x266c, 0x266d, 2 }, { 0x266e, 0x266e, 1 }, { 0x266f, 0x266f, 2 }, { 0x2670, 0x267e, 1 }, { 0x267f, 0x267f, 2 }, { 0x2680, 0x2689, 1 }, { 0x268a, 0x268f, 2 }, { 0x2690, 0x2692, 1 }, { 0x2693, 0x2693, 2 }, { 0x2694, 0x269d, 1 }, { 0x269e, 0x269f, 2 }, { 0x26a0, 0x26a0, 1 }, { 0x26a1, 0x26a1, 2 }, { 0x26a2, 0x26a9, 1 }, { 0x26aa, 0x26ab, 2 }, { 0x26ac, 0x26bc, 1 }, { 0x26bd, 0x26bf, 2 }, { 0x26c0, 0x26c3, 1 }, { 0x26c4, 0x26e1, 2 }, { 0x26e2, 0x26e2, 1 }, { 0x26e3, 0x26e3, 2 }, { 0x26e4, 0x26e7, 1 }, { 0x26e8, 0x26ff, 2 }, { 0x2700, 0x2704, 1 }, { 0x2705, 0x2705, 2 }, { 0x2706, 0x2709, 1 }, { 0x270a, 0x270b, 2 }, { 0x270c, 0x2727, 1 }, { 0x2728, 0x2728, 2 }, { 0x2729, 0x273c, 1 }, { 0x273d, 0x273d, 2 }, { 0x273e, 0x274b, 1 }, { 0x274c, 0x274c, 2 }, { 0x274d, 0x274d, 1 }, { 0x274e, 0x274e, 2 }, { 0x274f, 0x2752, 1 }, { 0x2753, 0x2755, 2 }, { 0x2756, 0x2756, 1 }, { 0x2757, 0x2757, 2 }, { 0x2758, 0x2775, 1 }, { 0x2776, 0x277f, 2 }, { 0x2780, 0x2794, 1 }, { 0x2795, 0x2797, 2 }, { 0x2798, 0x27af, 1 }, { 0x27b0, 0x27b0, 2 }, { 0x27b1, 0x27be, 1 }, { 0x27bf, 0x27bf, 2 }, { 0x27c0, 0x2b1a, 1 }, { 0x2b1b, 0x2b1c, 2 }, { 0x2b1d, 0x2b4f, 1 }, { 0x2b50, 0x2b50, 2 }, { 0x2b51, 0x2b54, 1 }, { 0x2b55, 0x2b59, 2 }, { 0x2b5a, 0x2cee, 1 }, { 0x2cef, 0x2cf1, 0 }, { 0x2cf2, 0x2d7e, 1 }, { 0x2d7f, 0x2d7f, 0 }, { 0x2d80, 0x2ddf, 1 }, { 0x2de0, 0x2dff, 0 }, { 0x2e00, 0x2e7f, 1 }, { 0x2e80, 0x2e99, 2 }, { 0x2e9a, 0x2e9a, 1 }, { 0x2e9b, 0x2ef3, 2 }, { 0x2ef4, 0x2eff, 1 }, { 0x2f00, 0x2fd5, 2 }, { 0x2fd6, 0x2fef, 1 }, { 0x2ff0, 0x3029, 2 }, { 0x302a, 0x302d, 0 }, { 0x302e, 0x303e, 2 }, { 0x303f, 0x3040, 1 }, { 0x3041, 0x3096, 2 }, { 0x3097, 0x3098, 1 }, { 0x3099, 0x309a, 0 }, { 0x309b, 0x30ff, 2 }, { 0x3100, 0x3104, 1 }, { 0x3105, 0x312f, 2 }, { 0x3130, 0x3130, 1 }, { 0x3131, 0x318e, 2 }, { 0x318f, 0x318f, 1 }, { 0x3190, 0x31e5, 2 }, { 0x31e6, 0x31ee, 1 }, { 0x31ef, 0x321e, 2 }, { 0x321f, 0x321f, 1 }, { 0x3220, 0xa48c, 2 }, { 0xa48d, 0xa48f, 1 }, { 0xa490, 0xa4c6, 2 }, { 0xa4c7, 0xa66e, 1 }, { 0xa66f, 0xa672, 0 }, { 0xa673, 0xa673, 1 }, { 0xa674, 0xa67d, 0 }, { 0xa67e, 0xa69d, 1 }, { 0xa69e, 0xa69f, 0 }, { 0xa6a0, 0xa6ef, 1 }, { 0xa6f0, 0xa6f1, 0 }, { 0xa6f2, 0xa801, 1 }, { 0xa802, 0xa802, 0 }, { 0xa803, 0xa805, 1 }, { 0xa806, 0xa806, 0 }, { 0xa807, 0xa80a, 1 }, { 0xa80b, 0xa80b, 0 }, { 0xa80c, 0xa824, 1 }, { 0xa825, 0xa826, 0 }, { 0xa827, 0xa82b, 1 }, { 0xa82c, 0xa82c, 0 }, { 0xa82d, 0xa8c3, 1 }, { 0xa8c4, 0xa8c5, 0 }, { 0xa8c6, 0xa8df, 1 }, { 0xa8e0, 0xa8f1, 0 }, { 0xa8f2, 0xa8fe, 1 }, { 0xa8ff, 0xa8ff, 0 }, { 0xa900, 0xa925, 1 }, { 0xa926, 0xa92d, 0 }, { 0xa92e, 0xa946, 1 }, { 0xa947, 0xa951, 0 }, { 0xa952, 0xa95f, 1 }, { 0xa960, 0xa97c, 2 }, { 0xa97d, 0xa97f, 1 }, { 0xa980, 0xa982, 0 }, { 0xa983, 0xa9b2, 1 }, { 0xa9b3, 0xa9b3, 0 }, { 0xa9b4, 0xa9b5, 1 }, { 0xa9b6, 0xa9b9, 0 }, { 0xa9ba, 0xa9bb, 1 }, { 0xa9bc, 0xa9bd, 0 }, { 0xa9be, 0xa9e4, 1 }, { 0xa9e5, 0xa9e5, 0 }, { 0xa9e6, 0xaa28, 1 }, { 0xaa29, 0xaa2e, 0 }, { 0xaa2f, 0xaa30, 1 }, { 0xaa31, 0xaa32, 0 }, { 0xaa33, 0xaa34, 1 }, { 0xaa35, 0xaa36, 0 }, { 0xaa37, 0xaa42, 1 }, { 0xaa43, 0xaa43, 0 }, { 0xaa44, 0xaa4b, 1 }, { 0xaa4c, 0xaa4c, 0 }, { 0xaa4d, 0xaa7b, 1 }, { 0xaa7c, 0xaa7c, 0 }, { 0xaa7d, 0xaaaf, 1 }, { 0xaab0, 0xaab0, 0 }, { 0xaab1, 0xaab1, 1 }, { 0xaab2, 0xaab4, 0 }, { 0xaab5, 0xaab6, 1 }, { 0xaab7, 0xaab8, 0 }, { 0xaab9, 0xaabd, 1 }, { 0xaabe, 0xaabf, 0 }, { 0xaac0, 0xaac0, 1 }, { 0xaac1, 0xaac1, 0 }, { 0xaac2, 0xaaeb, 1 }, { 0xaaec, 0xaaed, 0 }, { 0xaaee, 0xaaf5, 1 }, { 0xaaf6, 0xaaf6, 0 }, { 0xaaf7, 0xabe4, 1 }, { 0xabe5, 0xabe5, 0 }, { 0xabe6, 0xabe7, 1 }, { 0xabe8, 0xabe8, 0 }, { 0xabe9, 0xabec, 1 }, { 0xabed, 0xabed, 0 }, { 0xabee, 0xabff, 1 }, { 0xac00, 0xd7a3, 2 }, { 0xd7a4, 0xd7af, 1 }, { 0xd7b0, 0xd7ff, 0 }, // { 0xd800, 0xdfff, -1 }, { 0xe000, 0xfaff, 2 }, { 0xfb00, 0xfb1d, 1 }, { 0xfb1e, 0xfb1e, 0 }, { 0xfb1f, 0xfdff, 1 }, { 0xfe00, 0xfe0f, 0 }, { 0xfe10, 0xfe19, 2 }, { 0xfe1a, 0xfe1f, 1 }, { 0xfe20, 0xfe2f, 0 }, { 0xfe30, 0xfe52, 2 }, { 0xfe53, 0xfe53, 1 }, { 0xfe54, 0xfe66, 2 }, { 0xfe67, 0xfe67, 1 }, { 0xfe68, 0xfe6b, 2 }, { 0xfe6c, 0xfefe, 1 }, { 0xfeff, 0xfeff, 0 }, { 0xff00, 0xff00, 1 }, { 0xff01, 0xff60, 2 }, { 0xff61, 0xffdf, 1 }, { 0xffe0, 0xffe6, 2 }, { 0xffe7, 0xfff8, 1 }, { 0xfff9, 0xfffb, 0 }, { 0xfffc, 0xfffc, 1 }, { 0xfffd, 0xfffd, 2 }, { 0xfffe, 0x101fc, 1 }, { 0x101fd, 0x101fd, 0 }, { 0x101fe, 0x102df, 1 }, { 0x102e0, 0x102e0, 0 }, { 0x102e1, 0x10375, 1 }, { 0x10376, 0x1037a, 0 }, { 0x1037b, 0x10a00, 1 }, { 0x10a01, 0x10a03, 0 }, { 0x10a04, 0x10a04, 1 }, { 0x10a05, 0x10a06, 0 }, { 0x10a07, 0x10a0b, 1 }, { 0x10a0c, 0x10a0f, 0 }, { 0x10a10, 0x10a37, 1 }, { 0x10a38, 0x10a3a, 0 }, { 0x10a3b, 0x10a3e, 1 }, { 0x10a3f, 0x10a3f, 0 }, { 0x10a40, 0x10ae4, 1 }, { 0x10ae5, 0x10ae6, 0 }, { 0x10ae7, 0x10d23, 1 }, { 0x10d24, 0x10d27, 0 }, { 0x10d28, 0x10d68, 1 }, { 0x10d69, 0x10d6d, 0 }, { 0x10d6e, 0x10eaa, 1 }, { 0x10eab, 0x10eac, 0 }, { 0x10ead, 0x10efb, 1 }, { 0x10efc, 0x10eff, 0 }, { 0x10f00, 0x10f45, 1 }, { 0x10f46, 0x10f50, 0 }, { 0x10f51, 0x10f81, 1 }, { 0x10f82, 0x10f85, 0 }, { 0x10f86, 0x11000, 1 }, { 0x11001, 0x11001, 0 }, { 0x11002, 0x11037, 1 }, { 0x11038, 0x11046, 0 }, { 0x11047, 0x1106f, 1 }, { 0x11070, 0x11070, 0 }, { 0x11071, 0x11072, 1 }, { 0x11073, 0x11074, 0 }, { 0x11075, 0x1107e, 1 }, { 0x1107f, 0x11081, 0 }, { 0x11082, 0x110b2, 1 }, { 0x110b3, 0x110b6, 0 }, { 0x110b7, 0x110b8, 1 }, { 0x110b9, 0x110ba, 0 }, { 0x110bb, 0x110bc, 1 }, { 0x110bd, 0x110bd, 0 }, { 0x110be, 0x110c1, 1 }, { 0x110c2, 0x110c2, 0 }, { 0x110c3, 0x110cc, 1 }, { 0x110cd, 0x110cd, 0 }, { 0x110ce, 0x110ff, 1 }, { 0x11100, 0x11102, 0 }, { 0x11103, 0x11126, 1 }, { 0x11127, 0x1112b, 0 }, { 0x1112c, 0x1112c, 1 }, { 0x1112d, 0x11134, 0 }, { 0x11135, 0x11172, 1 }, { 0x11173, 0x11173, 0 }, { 0x11174, 0x1117f, 1 }, { 0x11180, 0x11181, 0 }, { 0x11182, 0x111b5, 1 }, { 0x111b6, 0x111be, 0 }, { 0x111bf, 0x111c8, 1 }, { 0x111c9, 0x111cc, 0 }, { 0x111cd, 0x111ce, 1 }, { 0x111cf, 0x111cf, 0 }, { 0x111d0, 0x1122e, 1 }, { 0x1122f, 0x11231, 0 }, { 0x11232, 0x11233, 1 }, { 0x11234, 0x11234, 0 }, { 0x11235, 0x11235, 1 }, { 0x11236, 0x11237, 0 }, { 0x11238, 0x1123d, 1 }, { 0x1123e, 0x1123e, 0 }, { 0x1123f, 0x11240, 1 }, { 0x11241, 0x11241, 0 }, { 0x11242, 0x112de, 1 }, { 0x112df, 0x112df, 0 }, { 0x112e0, 0x112e2, 1 }, { 0x112e3, 0x112ea, 0 }, { 0x112eb, 0x112ff, 1 }, { 0x11300, 0x11301, 0 }, { 0x11302, 0x1133a, 1 }, { 0x1133b, 0x1133c, 0 }, { 0x1133d, 0x1133f, 1 }, { 0x11340, 0x11340, 0 }, { 0x11341, 0x11365, 1 }, { 0x11366, 0x1136c, 0 }, { 0x1136d, 0x1136f, 1 }, { 0x11370, 0x11374, 0 }, { 0x11375, 0x113ba, 1 }, { 0x113bb, 0x113c0, 0 }, { 0x113c1, 0x113cd, 1 }, { 0x113ce, 0x113ce, 0 }, { 0x113cf, 0x113cf, 1 }, { 0x113d0, 0x113d0, 0 }, { 0x113d1, 0x113d1, 1 }, { 0x113d2, 0x113d2, 0 }, { 0x113d3, 0x113e0, 1 }, { 0x113e1, 0x113e2, 0 }, { 0x113e3, 0x11437, 1 }, { 0x11438, 0x1143f, 0 }, { 0x11440, 0x11441, 1 }, { 0x11442, 0x11444, 0 }, { 0x11445, 0x11445, 1 }, { 0x11446, 0x11446, 0 }, { 0x11447, 0x1145d, 1 }, { 0x1145e, 0x1145e, 0 }, { 0x1145f, 0x114b2, 1 }, { 0x114b3, 0x114b8, 0 }, { 0x114b9, 0x114b9, 1 }, { 0x114ba, 0x114ba, 0 }, { 0x114bb, 0x114be, 1 }, { 0x114bf, 0x114c0, 0 }, { 0x114c1, 0x114c1, 1 }, { 0x114c2, 0x114c3, 0 }, { 0x114c4, 0x115b1, 1 }, { 0x115b2, 0x115b5, 0 }, { 0x115b6, 0x115bb, 1 }, { 0x115bc, 0x115bd, 0 }, { 0x115be, 0x115be, 1 }, { 0x115bf, 0x115c0, 0 }, { 0x115c1, 0x115db, 1 }, { 0x115dc, 0x115dd, 0 }, { 0x115de, 0x11632, 1 }, { 0x11633, 0x1163a, 0 }, { 0x1163b, 0x1163c, 1 }, { 0x1163d, 0x1163d, 0 }, { 0x1163e, 0x1163e, 1 }, { 0x1163f, 0x11640, 0 }, { 0x11641, 0x116aa, 1 }, { 0x116ab, 0x116ab, 0 }, { 0x116ac, 0x116ac, 1 }, { 0x116ad, 0x116ad, 0 }, { 0x116ae, 0x116af, 1 }, { 0x116b0, 0x116b5, 0 }, { 0x116b6, 0x116b6, 1 }, { 0x116b7, 0x116b7, 0 }, { 0x116b8, 0x1171c, 1 }, { 0x1171d, 0x1171d, 0 }, { 0x1171e, 0x1171e, 1 }, { 0x1171f, 0x1171f, 0 }, { 0x11720, 0x11721, 1 }, { 0x11722, 0x11725, 0 }, { 0x11726, 0x11726, 1 }, { 0x11727, 0x1172b, 0 }, { 0x1172c, 0x1182e, 1 }, { 0x1182f, 0x11837, 0 }, { 0x11838, 0x11838, 1 }, { 0x11839, 0x1183a, 0 }, { 0x1183b, 0x1193a, 1 }, { 0x1193b, 0x1193c, 0 }, { 0x1193d, 0x1193d, 1 }, { 0x1193e, 0x1193e, 0 }, { 0x1193f, 0x11942, 1 }, { 0x11943, 0x11943, 0 }, { 0x11944, 0x119d3, 1 }, { 0x119d4, 0x119d7, 0 }, { 0x119d8, 0x119d9, 1 }, { 0x119da, 0x119db, 0 }, { 0x119dc, 0x119df, 1 }, { 0x119e0, 0x119e0, 0 }, { 0x119e1, 0x11a00, 1 }, { 0x11a01, 0x11a0a, 0 }, { 0x11a0b, 0x11a32, 1 }, { 0x11a33, 0x11a38, 0 }, { 0x11a39, 0x11a3a, 1 }, { 0x11a3b, 0x11a3e, 0 }, { 0x11a3f, 0x11a46, 1 }, { 0x11a47, 0x11a47, 0 }, { 0x11a48, 0x11a50, 1 }, { 0x11a51, 0x11a56, 0 }, { 0x11a57, 0x11a58, 1 }, { 0x11a59, 0x11a5b, 0 }, { 0x11a5c, 0x11a89, 1 }, { 0x11a8a, 0x11a96, 0 }, { 0x11a97, 0x11a97, 1 }, { 0x11a98, 0x11a99, 0 }, { 0x11a9a, 0x11c2f, 1 }, { 0x11c30, 0x11c36, 0 }, { 0x11c37, 0x11c37, 1 }, { 0x11c38, 0x11c3d, 0 }, { 0x11c3e, 0x11c3e, 1 }, { 0x11c3f, 0x11c3f, 0 }, { 0x11c40, 0x11c91, 1 }, { 0x11c92, 0x11ca7, 0 }, { 0x11ca8, 0x11ca9, 1 }, { 0x11caa, 0x11cb0, 0 }, { 0x11cb1, 0x11cb1, 1 }, { 0x11cb2, 0x11cb3, 0 }, { 0x11cb4, 0x11cb4, 1 }, { 0x11cb5, 0x11cb6, 0 }, { 0x11cb7, 0x11d30, 1 }, { 0x11d31, 0x11d36, 0 }, { 0x11d37, 0x11d39, 1 }, { 0x11d3a, 0x11d3a, 0 }, { 0x11d3b, 0x11d3b, 1 }, { 0x11d3c, 0x11d3d, 0 }, { 0x11d3e, 0x11d3e, 1 }, { 0x11d3f, 0x11d45, 0 }, { 0x11d46, 0x11d46, 1 }, { 0x11d47, 0x11d47, 0 }, { 0x11d48, 0x11d8f, 1 }, { 0x11d90, 0x11d91, 0 }, { 0x11d92, 0x11d94, 1 }, { 0x11d95, 0x11d95, 0 }, { 0x11d96, 0x11d96, 1 }, { 0x11d97, 0x11d97, 0 }, { 0x11d98, 0x11ef2, 1 }, { 0x11ef3, 0x11ef4, 0 }, { 0x11ef5, 0x11eff, 1 }, { 0x11f00, 0x11f01, 0 }, { 0x11f02, 0x11f35, 1 }, { 0x11f36, 0x11f3a, 0 }, { 0x11f3b, 0x11f3f, 1 }, { 0x11f40, 0x11f40, 0 }, { 0x11f41, 0x11f41, 1 }, { 0x11f42, 0x11f42, 0 }, { 0x11f43, 0x11f59, 1 }, { 0x11f5a, 0x11f5a, 0 }, { 0x11f5b, 0x1342f, 1 }, { 0x13430, 0x13440, 0 }, { 0x13441, 0x13446, 1 }, { 0x13447, 0x13455, 0 }, { 0x13456, 0x1611d, 1 }, { 0x1611e, 0x16129, 0 }, { 0x1612a, 0x1612c, 1 }, { 0x1612d, 0x1612f, 0 }, { 0x16130, 0x16aef, 1 }, { 0x16af0, 0x16af4, 0 }, { 0x16af5, 0x16b2f, 1 }, { 0x16b30, 0x16b36, 0 }, { 0x16b37, 0x16f4e, 1 }, { 0x16f4f, 0x16f4f, 0 }, { 0x16f50, 0x16f8e, 1 }, { 0x16f8f, 0x16f92, 0 }, { 0x16f93, 0x16fdf, 1 }, { 0x16fe0, 0x16fe3, 2 }, { 0x16fe4, 0x16fe4, 0 }, { 0x16fe5, 0x16fef, 1 }, { 0x16ff0, 0x16ff1, 2 }, { 0x16ff2, 0x16fff, 1 }, { 0x17000, 0x187f7, 2 }, { 0x187f8, 0x187ff, 1 }, { 0x18800, 0x18cd5, 2 }, { 0x18cd6, 0x18cfe, 1 }, { 0x18cff, 0x18d08, 2 }, { 0x18d09, 0x1afef, 1 }, { 0x1aff0, 0x1aff3, 2 }, { 0x1aff4, 0x1aff4, 1 }, { 0x1aff5, 0x1affb, 2 }, { 0x1affc, 0x1affc, 1 }, { 0x1affd, 0x1affe, 2 }, { 0x1afff, 0x1afff, 1 }, { 0x1b000, 0x1b122, 2 }, { 0x1b123, 0x1b131, 1 }, { 0x1b132, 0x1b132, 2 }, { 0x1b133, 0x1b14f, 1 }, { 0x1b150, 0x1b152, 2 }, { 0x1b153, 0x1b154, 1 }, { 0x1b155, 0x1b155, 2 }, { 0x1b156, 0x1b163, 1 }, { 0x1b164, 0x1b167, 2 }, { 0x1b168, 0x1b16f, 1 }, { 0x1b170, 0x1b2fb, 2 }, { 0x1b2fc, 0x1bc9c, 1 }, { 0x1bc9d, 0x1bc9e, 0 }, { 0x1bc9f, 0x1bc9f, 1 }, { 0x1bca0, 0x1bca3, 0 }, { 0x1bca4, 0x1ceff, 1 }, { 0x1cf00, 0x1cf2d, 0 }, { 0x1cf2e, 0x1cf2f, 1 }, { 0x1cf30, 0x1cf46, 0 }, { 0x1cf47, 0x1d166, 1 }, { 0x1d167, 0x1d169, 0 }, { 0x1d16a, 0x1d172, 1 }, { 0x1d173, 0x1d182, 0 }, { 0x1d183, 0x1d184, 1 }, { 0x1d185, 0x1d18b, 0 }, { 0x1d18c, 0x1d1a9, 1 }, { 0x1d1aa, 0x1d1ad, 0 }, { 0x1d1ae, 0x1d241, 1 }, { 0x1d242, 0x1d244, 0 }, { 0x1d245, 0x1d2ff, 1 }, { 0x1d300, 0x1d356, 2 }, { 0x1d357, 0x1d35f, 1 }, { 0x1d360, 0x1d376, 2 }, { 0x1d377, 0x1d9ff, 1 }, { 0x1da00, 0x1da36, 0 }, { 0x1da37, 0x1da3a, 1 }, { 0x1da3b, 0x1da6c, 0 }, { 0x1da6d, 0x1da74, 1 }, { 0x1da75, 0x1da75, 0 }, { 0x1da76, 0x1da83, 1 }, { 0x1da84, 0x1da84, 0 }, { 0x1da85, 0x1da9a, 1 }, { 0x1da9b, 0x1da9f, 0 }, { 0x1daa0, 0x1daa0, 1 }, { 0x1daa1, 0x1daaf, 0 }, { 0x1dab0, 0x1dfff, 1 }, { 0x1e000, 0x1e006, 0 }, { 0x1e007, 0x1e007, 1 }, { 0x1e008, 0x1e018, 0 }, { 0x1e019, 0x1e01a, 1 }, { 0x1e01b, 0x1e021, 0 }, { 0x1e022, 0x1e022, 1 }, { 0x1e023, 0x1e024, 0 }, { 0x1e025, 0x1e025, 1 }, { 0x1e026, 0x1e02a, 0 }, { 0x1e02b, 0x1e08e, 1 }, { 0x1e08f, 0x1e08f, 0 }, { 0x1e090, 0x1e12f, 1 }, { 0x1e130, 0x1e136, 0 }, { 0x1e137, 0x1e2ad, 1 }, { 0x1e2ae, 0x1e2ae, 0 }, { 0x1e2af, 0x1e2eb, 1 }, { 0x1e2ec, 0x1e2ef, 0 }, { 0x1e2f0, 0x1e4eb, 1 }, { 0x1e4ec, 0x1e4ef, 0 }, { 0x1e4f0, 0x1e5ed, 1 }, { 0x1e5ee, 0x1e5ef, 0 }, { 0x1e5f0, 0x1e8cf, 1 }, { 0x1e8d0, 0x1e8d6, 0 }, { 0x1e8d7, 0x1e943, 1 }, { 0x1e944, 0x1e94a, 0 }, { 0x1e94b, 0x1f003, 1 }, { 0x1f004, 0x1f004, 2 }, { 0x1f005, 0x1f0ce, 1 }, { 0x1f0cf, 0x1f0cf, 2 }, { 0x1f0d0, 0x1f0ff, 1 }, { 0x1f100, 0x1f10a, 2 }, { 0x1f10b, 0x1f10f, 1 }, { 0x1f110, 0x1f12d, 2 }, { 0x1f12e, 0x1f12f, 1 }, { 0x1f130, 0x1f169, 2 }, { 0x1f16a, 0x1f16f, 1 }, { 0x1f170, 0x1f1ac, 2 }, { 0x1f1ad, 0x1f1ff, 1 }, { 0x1f200, 0x1f202, 2 }, { 0x1f203, 0x1f20f, 1 }, { 0x1f210, 0x1f23b, 2 }, { 0x1f23c, 0x1f23f, 1 }, { 0x1f240, 0x1f248, 2 }, { 0x1f249, 0x1f24f, 1 }, { 0x1f250, 0x1f251, 2 }, { 0x1f252, 0x1f25f, 1 }, { 0x1f260, 0x1f265, 2 }, { 0x1f266, 0x1f2ff, 1 }, { 0x1f300, 0x1f320, 2 }, { 0x1f321, 0x1f32c, 1 }, { 0x1f32d, 0x1f335, 2 }, { 0x1f336, 0x1f336, 1 }, { 0x1f337, 0x1f37c, 2 }, { 0x1f37d, 0x1f37d, 1 }, { 0x1f37e, 0x1f393, 2 }, { 0x1f394, 0x1f39f, 1 }, { 0x1f3a0, 0x1f3ca, 2 }, { 0x1f3cb, 0x1f3ce, 1 }, { 0x1f3cf, 0x1f3d3, 2 }, { 0x1f3d4, 0x1f3df, 1 }, { 0x1f3e0, 0x1f3f0, 2 }, { 0x1f3f1, 0x1f3f3, 1 }, { 0x1f3f4, 0x1f3f4, 2 }, { 0x1f3f5, 0x1f3f7, 1 }, { 0x1f3f8, 0x1f43e, 2 }, { 0x1f43f, 0x1f43f, 1 }, { 0x1f440, 0x1f440, 2 }, { 0x1f441, 0x1f441, 1 }, { 0x1f442, 0x1f4fc, 2 }, { 0x1f4fd, 0x1f4fe, 1 }, { 0x1f4ff, 0x1f53d, 2 }, { 0x1f53e, 0x1f54a, 1 }, { 0x1f54b, 0x1f54e, 2 }, { 0x1f54f, 0x1f54f, 1 }, { 0x1f550, 0x1f567, 2 }, { 0x1f568, 0x1f579, 1 }, { 0x1f57a, 0x1f57a, 2 }, { 0x1f57b, 0x1f594, 1 }, { 0x1f595, 0x1f596, 2 }, { 0x1f597, 0x1f5a3, 1 }, { 0x1f5a4, 0x1f5a4, 2 }, { 0x1f5a5, 0x1f5fa, 1 }, { 0x1f5fb, 0x1f64f, 2 }, { 0x1f650, 0x1f67f, 1 }, { 0x1f680, 0x1f6c5, 2 }, { 0x1f6c6, 0x1f6cb, 1 }, { 0x1f6cc, 0x1f6cc, 2 }, { 0x1f6cd, 0x1f6cf, 1 }, { 0x1f6d0, 0x1f6d2, 2 }, { 0x1f6d3, 0x1f6d4, 1 }, { 0x1f6d5, 0x1f6d7, 2 }, { 0x1f6d8, 0x1f6db, 1 }, { 0x1f6dc, 0x1f6df, 2 }, { 0x1f6e0, 0x1f6ea, 1 }, { 0x1f6eb, 0x1f6ec, 2 }, { 0x1f6ed, 0x1f6f3, 1 }, { 0x1f6f4, 0x1f6fc, 2 }, { 0x1f6fd, 0x1f7df, 1 }, { 0x1f7e0, 0x1f7eb, 2 }, { 0x1f7ec, 0x1f7ef, 1 }, { 0x1f7f0, 0x1f7f0, 2 }, { 0x1f7f1, 0x1f90b, 1 }, { 0x1f90c, 0x1f93a, 2 }, { 0x1f93b, 0x1f93b, 1 }, { 0x1f93c, 0x1f945, 2 }, { 0x1f946, 0x1f946, 1 }, { 0x1f947, 0x1f9ff, 2 }, { 0x1fa00, 0x1fa6f, 1 }, { 0x1fa70, 0x1fa7c, 2 }, { 0x1fa7d, 0x1fa7f, 1 }, { 0x1fa80, 0x1fa89, 2 }, { 0x1fa8a, 0x1fa8e, 1 }, { 0x1fa8f, 0x1fac6, 2 }, { 0x1fac7, 0x1facd, 1 }, { 0x1face, 0x1fadc, 2 }, { 0x1fadd, 0x1fade, 1 }, { 0x1fadf, 0x1fae9, 2 }, { 0x1faea, 0x1faef, 1 }, { 0x1faf0, 0x1faf8, 2 }, { 0x1faf9, 0x1ffff, 1 }, { 0x20000, 0x2fffd, 2 }, { 0x2fffe, 0x2ffff, 1 }, { 0x30000, 0x3fffd, 2 }, { 0x3fffe, 0xe0000, 1 }, { 0xe0001, 0xe0001, 0 }, { 0xe0002, 0xe001f, 1 }, { 0xe0020, 0xe007f, 0 }, { 0xe0080, 0xe00ff, 1 }, { 0xe0100, 0xe01ef, 0 }, { 0xe01f0, 0xeffff, 1 }, { 0xf0000, 0xffffd, 2 }, { 0xffffe, 0xfffff, 1 }, { 0x100000, 0x10fffd, 2 }, { 0x10fffe, 0x10ffff, 1 }, }; static const int width_table_len = sizeof(width_table) / sizeof(width_table[0]); #endif Term-Choose-LineFold-XS-0.001/PaxHeaders/XS.c0000644000000000000000000000013215003451110015423 xustar0030 mtime=1745769032.649515592 30 atime=1745769046.737246919 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/XS.c0000644000175000001440000003140515003451110016200 0ustar00mmusers00000000000000/* * This file was generated automatically by ExtUtils::ParseXS version 3.51 from the * contents of XS.xs. Do not edit this file, edit XS.xs instead. * * ANY CHANGES MADE HERE WILL BE LOST! * */ #line 1 "XS.xs" #define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef AMBIGUOUS_WIDTH_IS_WIDE #include "charwidth_ambiguous_is_wide.h" #else #include "charwidth_default.h" #endif static int _char_width(UV codepoint) { int min = 0; int max = width_table_len - 1; int mid; if (codepoint < width_table[0].start || codepoint > width_table[max].end) { return 1; } else { while (max >= min) { mid = (min + max) / 2; if (codepoint > width_table[mid].end) { min = mid + 1; } else if (codepoint < width_table[mid].start) { max = mid - 1; } else { return width_table[mid].width; } } return 1; } } #line 46 "XS.c" #ifndef PERL_UNUSED_VAR # define PERL_UNUSED_VAR(var) if (0) var = var #endif #ifndef dVAR # define dVAR dNOOP #endif /* This stuff is not part of the API! You have been warned. */ #ifndef PERL_VERSION_DECIMAL # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) #endif #ifndef PERL_DECIMAL_VERSION # define PERL_DECIMAL_VERSION \ PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) #endif #ifndef PERL_VERSION_GE # define PERL_VERSION_GE(r,v,s) \ (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) #endif #ifndef PERL_VERSION_LE # define PERL_VERSION_LE(r,v,s) \ (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) #endif /* XS_INTERNAL is the explicit static-linkage variant of the default * XS macro. * * XS_EXTERNAL is the same as XS_INTERNAL except it does not include * "STATIC", ie. it exports XSUB symbols. You probably don't want that * for anything but the BOOT XSUB. * * See XSUB.h in core! */ /* TODO: This might be compatible further back than 5.10.0. */ #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) # undef XS_EXTERNAL # undef XS_INTERNAL # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) # define XS_INTERNAL(name) STATIC XSPROTO(name) # endif # if defined(__SYMBIAN32__) # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) # define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) # endif # ifndef XS_EXTERNAL # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) # define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) # else # ifdef __cplusplus # define XS_EXTERNAL(name) extern "C" XSPROTO(name) # define XS_INTERNAL(name) static XSPROTO(name) # else # define XS_EXTERNAL(name) XSPROTO(name) # define XS_INTERNAL(name) STATIC XSPROTO(name) # endif # endif # endif #endif /* perl >= 5.10.0 && perl <= 5.15.1 */ /* The XS_EXTERNAL macro is used for functions that must not be static * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL * macro defined, the best we can do is assume XS is the same. * Dito for XS_INTERNAL. */ #ifndef XS_EXTERNAL # define XS_EXTERNAL(name) XS(name) #endif #ifndef XS_INTERNAL # define XS_INTERNAL(name) XS(name) #endif /* Now, finally, after all this mess, we want an ExtUtils::ParseXS * internal macro that we're free to redefine for varying linkage due * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! */ #undef XS_EUPXS #if defined(PERL_EUPXS_ALWAYS_EXPORT) # define XS_EUPXS(name) XS_EXTERNAL(name) #else /* default to internal */ # define XS_EUPXS(name) XS_INTERNAL(name) #endif #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) /* prototype to pass -Wmissing-prototypes */ STATIC void S_croak_xs_usage(const CV *const cv, const char *const params); STATIC void S_croak_xs_usage(const CV *const cv, const char *const params) { const GV *const gv = CvGV(cv); PERL_ARGS_ASSERT_CROAK_XS_USAGE; if (gv) { const char *const gvname = GvNAME(gv); const HV *const stash = GvSTASH(gv); const char *const hvname = stash ? HvNAME(stash) : NULL; if (hvname) Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); else Perl_croak_nocontext("Usage: %s(%s)", gvname, params); } else { /* Pants. I don't think that it should be possible to get here. */ Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); } } #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE #define croak_xs_usage S_croak_xs_usage #endif /* NOTE: the prototype of newXSproto() is different in versions of perls, * so we define a portable version of newXSproto() */ #ifdef newXS_flags #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) #else #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) #endif /* !defined(newXS_flags) */ #if PERL_VERSION_LE(5, 21, 5) # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) #else # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) #endif #line 190 "XS.c" XS_EUPXS(XS_Term__Choose__LineFold__XS_char_width); /* prototype to pass -Wmissing-prototypes */ XS_EUPXS(XS_Term__Choose__LineFold__XS_char_width) { dVAR; dXSARGS; if (items != 1) croak_xs_usage(cv, "codepoint"); { int RETVAL; dXSTARG; UV codepoint = (UV)SvUV(ST(0)) ; #line 44 "XS.xs" RETVAL = _char_width(codepoint); #line 205 "XS.c" XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } XS_EUPXS(XS_Term__Choose__LineFold__XS_print_columns); /* prototype to pass -Wmissing-prototypes */ XS_EUPXS(XS_Term__Choose__LineFold__XS_print_columns) { dVAR; dXSARGS; if (items != 1) croak_xs_usage(cv, "input"); { #line 53 "XS.xs" STRLEN len; const U8 *p, *end; UV codepoint; int width = 0; STRLEN clen; #line 226 "XS.c" SV * RETVAL; SV * input = ST(0) ; #line 59 "XS.xs" if (!SvOK(input)) { XSRETURN_UNDEF; } if (!SvPOK(input)) { input = sv_mortalcopy(input); // Ensure string SvPV_force(input, len); } p = (const U8 *) SvPVutf8(input, len); end = p + len; while (p < end) { codepoint = utf8_to_uvchr_buf(p, end, &clen); if (clen == -1 ) { codepoint = *p; // Interpret the invalid byte as a single character clen = 1; // Advance by 1 byte // Option B: Stop processing on error // Perl_warn(aTHX_ "Malformed UTF-8 at byte offset %ld", (long)(p - (const U8 *)SvPVX(input))); // break; // Option C: Malformed UTF-8. Skip bad byte and keep going // p++; // continue; } p += clen; width += _char_width(codepoint); } RETVAL = newSViv(width); #line 260 "XS.c" RETVAL = sv_2mortal(RETVAL); ST(0) = RETVAL; } XSRETURN(1); } XS_EUPXS(XS_Term__Choose__LineFold__XS_cut_to_printwidth); /* prototype to pass -Wmissing-prototypes */ XS_EUPXS(XS_Term__Choose__LineFold__XS_cut_to_printwidth) { dVAR; dXSARGS; if (items != 2) croak_xs_usage(cv, "input, max_width"); PERL_UNUSED_VAR(ax); /* -Wall */ SP -= items; { #line 96 "XS.xs" STRLEN len; const U8 *p, *end; const U8 *split_point = NULL; const U8 *char_start; UV codepoint; int str_w = 0, this_w; STRLEN clen; // bool skip_padding; #line 286 "XS.c" SV * RETVAL; SV * input = ST(0) ; int max_width = (int)SvIV(ST(1)) ; #line 105 "XS.xs" if (!SvOK(input)) { XSRETURN_UNDEF; } if (!SvPOK(input)) { input = sv_mortalcopy(input); SvPV_force(input, len); } const U8 *start = (const U8 *) SvPVutf8(input, len); p = start; end = p + len; while (p < end) { char_start = p; codepoint = utf8_to_uvchr_buf(p, end, &clen); if (clen == -1) { codepoint = *p; clen = 1; } this_w = _char_width(codepoint); if (str_w + this_w > max_width) { split_point = char_start; break; } //if (str_w + this_w == max_width) { // p += clen; // str_w += this_w; // split_point = p; // break; //} str_w += this_w; p += clen; } if (!split_point) { // Whole string fits if (GIMME_V == G_ARRAY) { XPUSHs(sv_2mortal(newSVsv(input))); XPUSHs(sv_2mortal(newSVpvn("", 0))); } else { XPUSHs(sv_2mortal(newSVsv(input))); } } else { STRLEN first_len = split_point - start; SV *first_part = newSVpvn((const char *)start, first_len); SvUTF8_on(first_part); if (str_w == max_width - 1) { sv_catpv(first_part, " "); str_w += 1; } if (GIMME_V == G_ARRAY) { STRLEN rest_len = end - split_point; SV *rest_part = newSVpvn((const char *)split_point, rest_len); SvUTF8_on(rest_part); XPUSHs(sv_2mortal(first_part)); XPUSHs(sv_2mortal(rest_part)); } else { XPUSHs(sv_2mortal(first_part)); } } #line 362 "XS.c" PUTBACK; return; } } XS_EUPXS(XS_Term__Choose__LineFold__XS_adjust_to_printwidth); /* prototype to pass -Wmissing-prototypes */ XS_EUPXS(XS_Term__Choose__LineFold__XS_adjust_to_printwidth) { dVAR; dXSARGS; if (items != 2) croak_xs_usage(cv, "input, width"); { #line 180 "XS.xs" STRLEN len; const U8 *p, *end; UV codepoint; int str_w = 0, this_w; STRLEN clen; SV *result; const U8 *start; #line 384 "XS.c" SV * RETVAL; SV * input = ST(0) ; int width = (int)SvIV(ST(1)) ; #line 188 "XS.xs" if (!SvOK(input)) { XSRETURN_UNDEF; } if (!SvPOK(input)) { input = sv_mortalcopy(input); SvPV_force(input, len); } p = (const U8 *) SvPVutf8(input, len); // len is char length end = p + len; start = p; while (p < end) { codepoint = utf8_to_uvchr_buf(p, end, &clen); if (clen == (STRLEN)-1) { codepoint = *p; clen = 1; } this_w = _char_width(codepoint); if (str_w + this_w > width) { break; } str_w += this_w; p += clen; } len = (STRLEN)(p - start); // Final cutoff length: now len is bytes length if (str_w == width) { RETVAL = newSVpvn((const char *)start, len); } else { result = newSVpvn((const char *)start, len); sv_catpvf(result, "%*s", width - str_w, ""); RETVAL = result; } SvUTF8_on(RETVAL); #line 431 "XS.c" RETVAL = sv_2mortal(RETVAL); ST(0) = RETVAL; } XSRETURN(1); } #ifdef __cplusplus extern "C" { #endif XS_EXTERNAL(boot_Term__Choose__LineFold__XS); /* prototype to pass -Wmissing-prototypes */ XS_EXTERNAL(boot_Term__Choose__LineFold__XS) { #if PERL_VERSION_LE(5, 21, 5) dVAR; dXSARGS; #else dVAR; dXSBOOTARGSXSAPIVERCHK; #endif #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ char* file = __FILE__; #else const char* file = __FILE__; #endif PERL_UNUSED_VAR(file); PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(items); /* -W */ #if PERL_VERSION_LE(5, 21, 5) XS_VERSION_BOOTCHECK; # ifdef XS_APIVERSION_BOOTCHECK XS_APIVERSION_BOOTCHECK; # endif #endif newXS_deffile("Term::Choose::LineFold::XS::char_width", XS_Term__Choose__LineFold__XS_char_width); newXS_deffile("Term::Choose::LineFold::XS::print_columns", XS_Term__Choose__LineFold__XS_print_columns); newXS_deffile("Term::Choose::LineFold::XS::cut_to_printwidth", XS_Term__Choose__LineFold__XS_cut_to_printwidth); newXS_deffile("Term::Choose::LineFold::XS::adjust_to_printwidth", XS_Term__Choose__LineFold__XS_adjust_to_printwidth); #if PERL_VERSION_LE(5, 21, 5) # if PERL_VERSION_GE(5, 9, 0) if (PL_unitcheckav) call_list(PL_scopestack_ix, PL_unitcheckav); # endif XSRETURN_YES; #else Perl_xs_boot_epilog(aTHX_ ax); #endif } #ifdef __cplusplus } #endif Term-Choose-LineFold-XS-0.001/PaxHeaders/charwidth_default.h0000644000000000000000000000013215000743400020562 xustar0030 mtime=1745078016.150325699 30 atime=1745769046.937243103 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/charwidth_default.h0000644000175000001440000006504415000743400021345 0ustar00mmusers00000000000000#ifndef CHARWIDTH_DEFAULT_H #define CHARWIDTH_DEFAULT_H typedef struct { unsigned int start; unsigned int end; int width; } WidthRange; static const WidthRange width_table[] = { // { 0x0, 0x1f, -1 }, { 0x20, 0x7e, 1 }, // { 0x7f, 0x9f, -1 }, { 0xa0, 0x2ff, 1 }, { 0x300, 0x36f, 0 }, { 0x370, 0x482, 1 }, { 0x483, 0x489, 0 }, { 0x48a, 0x590, 1 }, { 0x591, 0x5bd, 0 }, { 0x5be, 0x5be, 1 }, { 0x5bf, 0x5bf, 0 }, { 0x5c0, 0x5c0, 1 }, { 0x5c1, 0x5c2, 0 }, { 0x5c3, 0x5c3, 1 }, { 0x5c4, 0x5c5, 0 }, { 0x5c6, 0x5c6, 1 }, { 0x5c7, 0x5c7, 0 }, { 0x5c8, 0x60f, 1 }, { 0x610, 0x61a, 0 }, { 0x61b, 0x61b, 1 }, { 0x61c, 0x61c, 0 }, { 0x61d, 0x64a, 1 }, { 0x64b, 0x65f, 0 }, { 0x660, 0x66f, 1 }, { 0x670, 0x670, 0 }, { 0x671, 0x6d5, 1 }, { 0x6d6, 0x6dc, 0 }, { 0x6dd, 0x6de, 1 }, { 0x6df, 0x6e4, 0 }, { 0x6e5, 0x6e6, 1 }, { 0x6e7, 0x6e8, 0 }, { 0x6e9, 0x6e9, 1 }, { 0x6ea, 0x6ed, 0 }, { 0x6ee, 0x70e, 1 }, { 0x70f, 0x70f, 0 }, { 0x710, 0x710, 1 }, { 0x711, 0x711, 0 }, { 0x712, 0x72f, 1 }, { 0x730, 0x74a, 0 }, { 0x74b, 0x7a5, 1 }, { 0x7a6, 0x7b0, 0 }, { 0x7b1, 0x7ea, 1 }, { 0x7eb, 0x7f3, 0 }, { 0x7f4, 0x7fc, 1 }, { 0x7fd, 0x7fd, 0 }, { 0x7fe, 0x815, 1 }, { 0x816, 0x819, 0 }, { 0x81a, 0x81a, 1 }, { 0x81b, 0x823, 0 }, { 0x824, 0x824, 1 }, { 0x825, 0x827, 0 }, { 0x828, 0x828, 1 }, { 0x829, 0x82d, 0 }, { 0x82e, 0x858, 1 }, { 0x859, 0x85b, 0 }, { 0x85c, 0x896, 1 }, { 0x897, 0x89f, 0 }, { 0x8a0, 0x8c9, 1 }, { 0x8ca, 0x8e1, 0 }, { 0x8e2, 0x8e2, 1 }, { 0x8e3, 0x902, 0 }, { 0x903, 0x939, 1 }, { 0x93a, 0x93a, 0 }, { 0x93b, 0x93b, 1 }, { 0x93c, 0x93c, 0 }, { 0x93d, 0x940, 1 }, { 0x941, 0x948, 0 }, { 0x949, 0x94c, 1 }, { 0x94d, 0x94d, 0 }, { 0x94e, 0x950, 1 }, { 0x951, 0x957, 0 }, { 0x958, 0x961, 1 }, { 0x962, 0x963, 0 }, { 0x964, 0x980, 1 }, { 0x981, 0x981, 0 }, { 0x982, 0x9bb, 1 }, { 0x9bc, 0x9bc, 0 }, { 0x9bd, 0x9c0, 1 }, { 0x9c1, 0x9c4, 0 }, { 0x9c5, 0x9cc, 1 }, { 0x9cd, 0x9cd, 0 }, { 0x9ce, 0x9e1, 1 }, { 0x9e2, 0x9e3, 0 }, { 0x9e4, 0x9fd, 1 }, { 0x9fe, 0x9fe, 0 }, { 0x9ff, 0xa00, 1 }, { 0xa01, 0xa02, 0 }, { 0xa03, 0xa3b, 1 }, { 0xa3c, 0xa3c, 0 }, { 0xa3d, 0xa40, 1 }, { 0xa41, 0xa42, 0 }, { 0xa43, 0xa46, 1 }, { 0xa47, 0xa48, 0 }, { 0xa49, 0xa4a, 1 }, { 0xa4b, 0xa4d, 0 }, { 0xa4e, 0xa50, 1 }, { 0xa51, 0xa51, 0 }, { 0xa52, 0xa6f, 1 }, { 0xa70, 0xa71, 0 }, { 0xa72, 0xa74, 1 }, { 0xa75, 0xa75, 0 }, { 0xa76, 0xa80, 1 }, { 0xa81, 0xa82, 0 }, { 0xa83, 0xabb, 1 }, { 0xabc, 0xabc, 0 }, { 0xabd, 0xac0, 1 }, { 0xac1, 0xac5, 0 }, { 0xac6, 0xac6, 1 }, { 0xac7, 0xac8, 0 }, { 0xac9, 0xacc, 1 }, { 0xacd, 0xacd, 0 }, { 0xace, 0xae1, 1 }, { 0xae2, 0xae3, 0 }, { 0xae4, 0xaf9, 1 }, { 0xafa, 0xaff, 0 }, { 0xb00, 0xb00, 1 }, { 0xb01, 0xb01, 0 }, { 0xb02, 0xb3b, 1 }, { 0xb3c, 0xb3c, 0 }, { 0xb3d, 0xb3e, 1 }, { 0xb3f, 0xb3f, 0 }, { 0xb40, 0xb40, 1 }, { 0xb41, 0xb44, 0 }, { 0xb45, 0xb4c, 1 }, { 0xb4d, 0xb4d, 0 }, { 0xb4e, 0xb54, 1 }, { 0xb55, 0xb56, 0 }, { 0xb57, 0xb61, 1 }, { 0xb62, 0xb63, 0 }, { 0xb64, 0xb81, 1 }, { 0xb82, 0xb82, 0 }, { 0xb83, 0xbbf, 1 }, { 0xbc0, 0xbc0, 0 }, { 0xbc1, 0xbcc, 1 }, { 0xbcd, 0xbcd, 0 }, { 0xbce, 0xbff, 1 }, { 0xc00, 0xc00, 0 }, { 0xc01, 0xc03, 1 }, { 0xc04, 0xc04, 0 }, { 0xc05, 0xc3b, 1 }, { 0xc3c, 0xc3c, 0 }, { 0xc3d, 0xc3d, 1 }, { 0xc3e, 0xc40, 0 }, { 0xc41, 0xc45, 1 }, { 0xc46, 0xc48, 0 }, { 0xc49, 0xc49, 1 }, { 0xc4a, 0xc4d, 0 }, { 0xc4e, 0xc54, 1 }, { 0xc55, 0xc56, 0 }, { 0xc57, 0xc61, 1 }, { 0xc62, 0xc63, 0 }, { 0xc64, 0xc80, 1 }, { 0xc81, 0xc81, 0 }, { 0xc82, 0xcbb, 1 }, { 0xcbc, 0xcbc, 0 }, { 0xcbd, 0xcbe, 1 }, { 0xcbf, 0xcbf, 0 }, { 0xcc0, 0xcc5, 1 }, { 0xcc6, 0xcc6, 0 }, { 0xcc7, 0xccb, 1 }, { 0xccc, 0xccd, 0 }, { 0xcce, 0xce1, 1 }, { 0xce2, 0xce3, 0 }, { 0xce4, 0xcff, 1 }, { 0xd00, 0xd01, 0 }, { 0xd02, 0xd3a, 1 }, { 0xd3b, 0xd3c, 0 }, { 0xd3d, 0xd40, 1 }, { 0xd41, 0xd44, 0 }, { 0xd45, 0xd4c, 1 }, { 0xd4d, 0xd4d, 0 }, { 0xd4e, 0xd61, 1 }, { 0xd62, 0xd63, 0 }, { 0xd64, 0xd80, 1 }, { 0xd81, 0xd81, 0 }, { 0xd82, 0xdc9, 1 }, { 0xdca, 0xdca, 0 }, { 0xdcb, 0xdd1, 1 }, { 0xdd2, 0xdd4, 0 }, { 0xdd5, 0xdd5, 1 }, { 0xdd6, 0xdd6, 0 }, { 0xdd7, 0xe30, 1 }, { 0xe31, 0xe31, 0 }, { 0xe32, 0xe33, 1 }, { 0xe34, 0xe3a, 0 }, { 0xe3b, 0xe46, 1 }, { 0xe47, 0xe4e, 0 }, { 0xe4f, 0xeb0, 1 }, { 0xeb1, 0xeb1, 0 }, { 0xeb2, 0xeb3, 1 }, { 0xeb4, 0xebc, 0 }, { 0xebd, 0xec7, 1 }, { 0xec8, 0xece, 0 }, { 0xecf, 0xf17, 1 }, { 0xf18, 0xf19, 0 }, { 0xf1a, 0xf34, 1 }, { 0xf35, 0xf35, 0 }, { 0xf36, 0xf36, 1 }, { 0xf37, 0xf37, 0 }, { 0xf38, 0xf38, 1 }, { 0xf39, 0xf39, 0 }, { 0xf3a, 0xf70, 1 }, { 0xf71, 0xf7e, 0 }, { 0xf7f, 0xf7f, 1 }, { 0xf80, 0xf84, 0 }, { 0xf85, 0xf85, 1 }, { 0xf86, 0xf87, 0 }, { 0xf88, 0xf8c, 1 }, { 0xf8d, 0xf97, 0 }, { 0xf98, 0xf98, 1 }, { 0xf99, 0xfbc, 0 }, { 0xfbd, 0xfc5, 1 }, { 0xfc6, 0xfc6, 0 }, { 0xfc7, 0x102c, 1 }, { 0x102d, 0x1030, 0 }, { 0x1031, 0x1031, 1 }, { 0x1032, 0x1037, 0 }, { 0x1038, 0x1038, 1 }, { 0x1039, 0x103a, 0 }, { 0x103b, 0x103c, 1 }, { 0x103d, 0x103e, 0 }, { 0x103f, 0x1057, 1 }, { 0x1058, 0x1059, 0 }, { 0x105a, 0x105d, 1 }, { 0x105e, 0x1060, 0 }, { 0x1061, 0x1070, 1 }, { 0x1071, 0x1074, 0 }, { 0x1075, 0x1081, 1 }, { 0x1082, 0x1082, 0 }, { 0x1083, 0x1084, 1 }, { 0x1085, 0x1086, 0 }, { 0x1087, 0x108c, 1 }, { 0x108d, 0x108d, 0 }, { 0x108e, 0x109c, 1 }, { 0x109d, 0x109d, 0 }, { 0x109e, 0x10ff, 1 }, { 0x1100, 0x115f, 2 }, { 0x1160, 0x11ff, 0 }, { 0x1200, 0x135c, 1 }, { 0x135d, 0x135f, 0 }, { 0x1360, 0x1711, 1 }, { 0x1712, 0x1714, 0 }, { 0x1715, 0x1731, 1 }, { 0x1732, 0x1733, 0 }, { 0x1734, 0x1751, 1 }, { 0x1752, 0x1753, 0 }, { 0x1754, 0x1771, 1 }, { 0x1772, 0x1773, 0 }, { 0x1774, 0x17b3, 1 }, { 0x17b4, 0x17b5, 0 }, { 0x17b6, 0x17b6, 1 }, { 0x17b7, 0x17bd, 0 }, { 0x17be, 0x17c5, 1 }, { 0x17c6, 0x17c6, 0 }, { 0x17c7, 0x17c8, 1 }, { 0x17c9, 0x17d3, 0 }, { 0x17d4, 0x17dc, 1 }, { 0x17dd, 0x17dd, 0 }, { 0x17de, 0x180a, 1 }, { 0x180b, 0x180f, 0 }, { 0x1810, 0x1884, 1 }, { 0x1885, 0x1886, 0 }, { 0x1887, 0x18a8, 1 }, { 0x18a9, 0x18a9, 0 }, { 0x18aa, 0x191f, 1 }, { 0x1920, 0x1922, 0 }, { 0x1923, 0x1926, 1 }, { 0x1927, 0x1928, 0 }, { 0x1929, 0x1931, 1 }, { 0x1932, 0x1932, 0 }, { 0x1933, 0x1938, 1 }, { 0x1939, 0x193b, 0 }, { 0x193c, 0x1a16, 1 }, { 0x1a17, 0x1a18, 0 }, { 0x1a19, 0x1a1a, 1 }, { 0x1a1b, 0x1a1b, 0 }, { 0x1a1c, 0x1a55, 1 }, { 0x1a56, 0x1a56, 0 }, { 0x1a57, 0x1a57, 1 }, { 0x1a58, 0x1a5e, 0 }, { 0x1a5f, 0x1a5f, 1 }, { 0x1a60, 0x1a60, 0 }, { 0x1a61, 0x1a61, 1 }, { 0x1a62, 0x1a62, 0 }, { 0x1a63, 0x1a64, 1 }, { 0x1a65, 0x1a6c, 0 }, { 0x1a6d, 0x1a72, 1 }, { 0x1a73, 0x1a7c, 0 }, { 0x1a7d, 0x1a7e, 1 }, { 0x1a7f, 0x1a7f, 0 }, { 0x1a80, 0x1aaf, 1 }, { 0x1ab0, 0x1ace, 0 }, { 0x1acf, 0x1aff, 1 }, { 0x1b00, 0x1b03, 0 }, { 0x1b04, 0x1b33, 1 }, { 0x1b34, 0x1b34, 0 }, { 0x1b35, 0x1b35, 1 }, { 0x1b36, 0x1b3a, 0 }, { 0x1b3b, 0x1b3b, 1 }, { 0x1b3c, 0x1b3c, 0 }, { 0x1b3d, 0x1b41, 1 }, { 0x1b42, 0x1b42, 0 }, { 0x1b43, 0x1b6a, 1 }, { 0x1b6b, 0x1b73, 0 }, { 0x1b74, 0x1b7f, 1 }, { 0x1b80, 0x1b81, 0 }, { 0x1b82, 0x1ba1, 1 }, { 0x1ba2, 0x1ba5, 0 }, { 0x1ba6, 0x1ba7, 1 }, { 0x1ba8, 0x1ba9, 0 }, { 0x1baa, 0x1baa, 1 }, { 0x1bab, 0x1bad, 0 }, { 0x1bae, 0x1be5, 1 }, { 0x1be6, 0x1be6, 0 }, { 0x1be7, 0x1be7, 1 }, { 0x1be8, 0x1be9, 0 }, { 0x1bea, 0x1bec, 1 }, { 0x1bed, 0x1bed, 0 }, { 0x1bee, 0x1bee, 1 }, { 0x1bef, 0x1bf1, 0 }, { 0x1bf2, 0x1c2b, 1 }, { 0x1c2c, 0x1c33, 0 }, { 0x1c34, 0x1c35, 1 }, { 0x1c36, 0x1c37, 0 }, { 0x1c38, 0x1ccf, 1 }, { 0x1cd0, 0x1cd2, 0 }, { 0x1cd3, 0x1cd3, 1 }, { 0x1cd4, 0x1ce0, 0 }, { 0x1ce1, 0x1ce1, 1 }, { 0x1ce2, 0x1ce8, 0 }, { 0x1ce9, 0x1cec, 1 }, { 0x1ced, 0x1ced, 0 }, { 0x1cee, 0x1cf3, 1 }, { 0x1cf4, 0x1cf4, 0 }, { 0x1cf5, 0x1cf7, 1 }, { 0x1cf8, 0x1cf9, 0 }, { 0x1cfa, 0x1dbf, 1 }, { 0x1dc0, 0x1dff, 0 }, { 0x1e00, 0x200a, 1 }, { 0x200b, 0x200f, 0 }, { 0x2010, 0x2029, 1 }, { 0x202a, 0x202e, 0 }, { 0x202f, 0x205f, 1 }, { 0x2060, 0x2064, 0 }, { 0x2065, 0x2065, 1 }, { 0x2066, 0x206f, 0 }, { 0x2070, 0x20cf, 1 }, { 0x20d0, 0x20f0, 0 }, { 0x20f1, 0x2319, 1 }, { 0x231a, 0x231b, 2 }, { 0x231c, 0x2328, 1 }, { 0x2329, 0x232a, 2 }, { 0x232b, 0x23e8, 1 }, { 0x23e9, 0x23ec, 2 }, { 0x23ed, 0x23ef, 1 }, { 0x23f0, 0x23f0, 2 }, { 0x23f1, 0x23f2, 1 }, { 0x23f3, 0x23f3, 2 }, { 0x23f4, 0x25fc, 1 }, { 0x25fd, 0x25fe, 2 }, { 0x25ff, 0x2613, 1 }, { 0x2614, 0x2615, 2 }, { 0x2616, 0x262f, 1 }, { 0x2630, 0x2637, 2 }, { 0x2638, 0x2647, 1 }, { 0x2648, 0x2653, 2 }, { 0x2654, 0x267e, 1 }, { 0x267f, 0x267f, 2 }, { 0x2680, 0x2689, 1 }, { 0x268a, 0x268f, 2 }, { 0x2690, 0x2692, 1 }, { 0x2693, 0x2693, 2 }, { 0x2694, 0x26a0, 1 }, { 0x26a1, 0x26a1, 2 }, { 0x26a2, 0x26a9, 1 }, { 0x26aa, 0x26ab, 2 }, { 0x26ac, 0x26bc, 1 }, { 0x26bd, 0x26be, 2 }, { 0x26bf, 0x26c3, 1 }, { 0x26c4, 0x26c5, 2 }, { 0x26c6, 0x26cd, 1 }, { 0x26ce, 0x26ce, 2 }, { 0x26cf, 0x26d3, 1 }, { 0x26d4, 0x26d4, 2 }, { 0x26d5, 0x26e9, 1 }, { 0x26ea, 0x26ea, 2 }, { 0x26eb, 0x26f1, 1 }, { 0x26f2, 0x26f3, 2 }, { 0x26f4, 0x26f4, 1 }, { 0x26f5, 0x26f5, 2 }, { 0x26f6, 0x26f9, 1 }, { 0x26fa, 0x26fa, 2 }, { 0x26fb, 0x26fc, 1 }, { 0x26fd, 0x26fd, 2 }, { 0x26fe, 0x2704, 1 }, { 0x2705, 0x2705, 2 }, { 0x2706, 0x2709, 1 }, { 0x270a, 0x270b, 2 }, { 0x270c, 0x2727, 1 }, { 0x2728, 0x2728, 2 }, { 0x2729, 0x274b, 1 }, { 0x274c, 0x274c, 2 }, { 0x274d, 0x274d, 1 }, { 0x274e, 0x274e, 2 }, { 0x274f, 0x2752, 1 }, { 0x2753, 0x2755, 2 }, { 0x2756, 0x2756, 1 }, { 0x2757, 0x2757, 2 }, { 0x2758, 0x2794, 1 }, { 0x2795, 0x2797, 2 }, { 0x2798, 0x27af, 1 }, { 0x27b0, 0x27b0, 2 }, { 0x27b1, 0x27be, 1 }, { 0x27bf, 0x27bf, 2 }, { 0x27c0, 0x2b1a, 1 }, { 0x2b1b, 0x2b1c, 2 }, { 0x2b1d, 0x2b4f, 1 }, { 0x2b50, 0x2b50, 2 }, { 0x2b51, 0x2b54, 1 }, { 0x2b55, 0x2b55, 2 }, { 0x2b56, 0x2cee, 1 }, { 0x2cef, 0x2cf1, 0 }, { 0x2cf2, 0x2d7e, 1 }, { 0x2d7f, 0x2d7f, 0 }, { 0x2d80, 0x2ddf, 1 }, { 0x2de0, 0x2dff, 0 }, { 0x2e00, 0x2e7f, 1 }, { 0x2e80, 0x2e99, 2 }, { 0x2e9a, 0x2e9a, 1 }, { 0x2e9b, 0x2ef3, 2 }, { 0x2ef4, 0x2eff, 1 }, { 0x2f00, 0x2fd5, 2 }, { 0x2fd6, 0x2fef, 1 }, { 0x2ff0, 0x3029, 2 }, { 0x302a, 0x302d, 0 }, { 0x302e, 0x303e, 2 }, { 0x303f, 0x3040, 1 }, { 0x3041, 0x3096, 2 }, { 0x3097, 0x3098, 1 }, { 0x3099, 0x309a, 0 }, { 0x309b, 0x30ff, 2 }, { 0x3100, 0x3104, 1 }, { 0x3105, 0x312f, 2 }, { 0x3130, 0x3130, 1 }, { 0x3131, 0x318e, 2 }, { 0x318f, 0x318f, 1 }, { 0x3190, 0x31e5, 2 }, { 0x31e6, 0x31ee, 1 }, { 0x31ef, 0x321e, 2 }, { 0x321f, 0x321f, 1 }, { 0x3220, 0x3247, 2 }, { 0x3248, 0x324f, 1 }, { 0x3250, 0xa48c, 2 }, { 0xa48d, 0xa48f, 1 }, { 0xa490, 0xa4c6, 2 }, { 0xa4c7, 0xa66e, 1 }, { 0xa66f, 0xa672, 0 }, { 0xa673, 0xa673, 1 }, { 0xa674, 0xa67d, 0 }, { 0xa67e, 0xa69d, 1 }, { 0xa69e, 0xa69f, 0 }, { 0xa6a0, 0xa6ef, 1 }, { 0xa6f0, 0xa6f1, 0 }, { 0xa6f2, 0xa801, 1 }, { 0xa802, 0xa802, 0 }, { 0xa803, 0xa805, 1 }, { 0xa806, 0xa806, 0 }, { 0xa807, 0xa80a, 1 }, { 0xa80b, 0xa80b, 0 }, { 0xa80c, 0xa824, 1 }, { 0xa825, 0xa826, 0 }, { 0xa827, 0xa82b, 1 }, { 0xa82c, 0xa82c, 0 }, { 0xa82d, 0xa8c3, 1 }, { 0xa8c4, 0xa8c5, 0 }, { 0xa8c6, 0xa8df, 1 }, { 0xa8e0, 0xa8f1, 0 }, { 0xa8f2, 0xa8fe, 1 }, { 0xa8ff, 0xa8ff, 0 }, { 0xa900, 0xa925, 1 }, { 0xa926, 0xa92d, 0 }, { 0xa92e, 0xa946, 1 }, { 0xa947, 0xa951, 0 }, { 0xa952, 0xa95f, 1 }, { 0xa960, 0xa97c, 2 }, { 0xa97d, 0xa97f, 1 }, { 0xa980, 0xa982, 0 }, { 0xa983, 0xa9b2, 1 }, { 0xa9b3, 0xa9b3, 0 }, { 0xa9b4, 0xa9b5, 1 }, { 0xa9b6, 0xa9b9, 0 }, { 0xa9ba, 0xa9bb, 1 }, { 0xa9bc, 0xa9bd, 0 }, { 0xa9be, 0xa9e4, 1 }, { 0xa9e5, 0xa9e5, 0 }, { 0xa9e6, 0xaa28, 1 }, { 0xaa29, 0xaa2e, 0 }, { 0xaa2f, 0xaa30, 1 }, { 0xaa31, 0xaa32, 0 }, { 0xaa33, 0xaa34, 1 }, { 0xaa35, 0xaa36, 0 }, { 0xaa37, 0xaa42, 1 }, { 0xaa43, 0xaa43, 0 }, { 0xaa44, 0xaa4b, 1 }, { 0xaa4c, 0xaa4c, 0 }, { 0xaa4d, 0xaa7b, 1 }, { 0xaa7c, 0xaa7c, 0 }, { 0xaa7d, 0xaaaf, 1 }, { 0xaab0, 0xaab0, 0 }, { 0xaab1, 0xaab1, 1 }, { 0xaab2, 0xaab4, 0 }, { 0xaab5, 0xaab6, 1 }, { 0xaab7, 0xaab8, 0 }, { 0xaab9, 0xaabd, 1 }, { 0xaabe, 0xaabf, 0 }, { 0xaac0, 0xaac0, 1 }, { 0xaac1, 0xaac1, 0 }, { 0xaac2, 0xaaeb, 1 }, { 0xaaec, 0xaaed, 0 }, { 0xaaee, 0xaaf5, 1 }, { 0xaaf6, 0xaaf6, 0 }, { 0xaaf7, 0xabe4, 1 }, { 0xabe5, 0xabe5, 0 }, { 0xabe6, 0xabe7, 1 }, { 0xabe8, 0xabe8, 0 }, { 0xabe9, 0xabec, 1 }, { 0xabed, 0xabed, 0 }, { 0xabee, 0xabff, 1 }, { 0xac00, 0xd7a3, 2 }, { 0xd7a4, 0xd7af, 1 }, { 0xd7b0, 0xd7ff, 0 }, // { 0xd800, 0xdfff, -1 }, { 0xe000, 0xf8ff, 1 }, { 0xf900, 0xfaff, 2 }, { 0xfb00, 0xfb1d, 1 }, { 0xfb1e, 0xfb1e, 0 }, { 0xfb1f, 0xfdff, 1 }, { 0xfe00, 0xfe0f, 0 }, { 0xfe10, 0xfe19, 2 }, { 0xfe1a, 0xfe1f, 1 }, { 0xfe20, 0xfe2f, 0 }, { 0xfe30, 0xfe52, 2 }, { 0xfe53, 0xfe53, 1 }, { 0xfe54, 0xfe66, 2 }, { 0xfe67, 0xfe67, 1 }, { 0xfe68, 0xfe6b, 2 }, { 0xfe6c, 0xfefe, 1 }, { 0xfeff, 0xfeff, 0 }, { 0xff00, 0xff00, 1 }, { 0xff01, 0xff60, 2 }, { 0xff61, 0xffdf, 1 }, { 0xffe0, 0xffe6, 2 }, { 0xffe7, 0xfff8, 1 }, { 0xfff9, 0xfffb, 0 }, { 0xfffc, 0x101fc, 1 }, { 0x101fd, 0x101fd, 0 }, { 0x101fe, 0x102df, 1 }, { 0x102e0, 0x102e0, 0 }, { 0x102e1, 0x10375, 1 }, { 0x10376, 0x1037a, 0 }, { 0x1037b, 0x10a00, 1 }, { 0x10a01, 0x10a03, 0 }, { 0x10a04, 0x10a04, 1 }, { 0x10a05, 0x10a06, 0 }, { 0x10a07, 0x10a0b, 1 }, { 0x10a0c, 0x10a0f, 0 }, { 0x10a10, 0x10a37, 1 }, { 0x10a38, 0x10a3a, 0 }, { 0x10a3b, 0x10a3e, 1 }, { 0x10a3f, 0x10a3f, 0 }, { 0x10a40, 0x10ae4, 1 }, { 0x10ae5, 0x10ae6, 0 }, { 0x10ae7, 0x10d23, 1 }, { 0x10d24, 0x10d27, 0 }, { 0x10d28, 0x10d68, 1 }, { 0x10d69, 0x10d6d, 0 }, { 0x10d6e, 0x10eaa, 1 }, { 0x10eab, 0x10eac, 0 }, { 0x10ead, 0x10efb, 1 }, { 0x10efc, 0x10eff, 0 }, { 0x10f00, 0x10f45, 1 }, { 0x10f46, 0x10f50, 0 }, { 0x10f51, 0x10f81, 1 }, { 0x10f82, 0x10f85, 0 }, { 0x10f86, 0x11000, 1 }, { 0x11001, 0x11001, 0 }, { 0x11002, 0x11037, 1 }, { 0x11038, 0x11046, 0 }, { 0x11047, 0x1106f, 1 }, { 0x11070, 0x11070, 0 }, { 0x11071, 0x11072, 1 }, { 0x11073, 0x11074, 0 }, { 0x11075, 0x1107e, 1 }, { 0x1107f, 0x11081, 0 }, { 0x11082, 0x110b2, 1 }, { 0x110b3, 0x110b6, 0 }, { 0x110b7, 0x110b8, 1 }, { 0x110b9, 0x110ba, 0 }, { 0x110bb, 0x110bc, 1 }, { 0x110bd, 0x110bd, 0 }, { 0x110be, 0x110c1, 1 }, { 0x110c2, 0x110c2, 0 }, { 0x110c3, 0x110cc, 1 }, { 0x110cd, 0x110cd, 0 }, { 0x110ce, 0x110ff, 1 }, { 0x11100, 0x11102, 0 }, { 0x11103, 0x11126, 1 }, { 0x11127, 0x1112b, 0 }, { 0x1112c, 0x1112c, 1 }, { 0x1112d, 0x11134, 0 }, { 0x11135, 0x11172, 1 }, { 0x11173, 0x11173, 0 }, { 0x11174, 0x1117f, 1 }, { 0x11180, 0x11181, 0 }, { 0x11182, 0x111b5, 1 }, { 0x111b6, 0x111be, 0 }, { 0x111bf, 0x111c8, 1 }, { 0x111c9, 0x111cc, 0 }, { 0x111cd, 0x111ce, 1 }, { 0x111cf, 0x111cf, 0 }, { 0x111d0, 0x1122e, 1 }, { 0x1122f, 0x11231, 0 }, { 0x11232, 0x11233, 1 }, { 0x11234, 0x11234, 0 }, { 0x11235, 0x11235, 1 }, { 0x11236, 0x11237, 0 }, { 0x11238, 0x1123d, 1 }, { 0x1123e, 0x1123e, 0 }, { 0x1123f, 0x11240, 1 }, { 0x11241, 0x11241, 0 }, { 0x11242, 0x112de, 1 }, { 0x112df, 0x112df, 0 }, { 0x112e0, 0x112e2, 1 }, { 0x112e3, 0x112ea, 0 }, { 0x112eb, 0x112ff, 1 }, { 0x11300, 0x11301, 0 }, { 0x11302, 0x1133a, 1 }, { 0x1133b, 0x1133c, 0 }, { 0x1133d, 0x1133f, 1 }, { 0x11340, 0x11340, 0 }, { 0x11341, 0x11365, 1 }, { 0x11366, 0x1136c, 0 }, { 0x1136d, 0x1136f, 1 }, { 0x11370, 0x11374, 0 }, { 0x11375, 0x113ba, 1 }, { 0x113bb, 0x113c0, 0 }, { 0x113c1, 0x113cd, 1 }, { 0x113ce, 0x113ce, 0 }, { 0x113cf, 0x113cf, 1 }, { 0x113d0, 0x113d0, 0 }, { 0x113d1, 0x113d1, 1 }, { 0x113d2, 0x113d2, 0 }, { 0x113d3, 0x113e0, 1 }, { 0x113e1, 0x113e2, 0 }, { 0x113e3, 0x11437, 1 }, { 0x11438, 0x1143f, 0 }, { 0x11440, 0x11441, 1 }, { 0x11442, 0x11444, 0 }, { 0x11445, 0x11445, 1 }, { 0x11446, 0x11446, 0 }, { 0x11447, 0x1145d, 1 }, { 0x1145e, 0x1145e, 0 }, { 0x1145f, 0x114b2, 1 }, { 0x114b3, 0x114b8, 0 }, { 0x114b9, 0x114b9, 1 }, { 0x114ba, 0x114ba, 0 }, { 0x114bb, 0x114be, 1 }, { 0x114bf, 0x114c0, 0 }, { 0x114c1, 0x114c1, 1 }, { 0x114c2, 0x114c3, 0 }, { 0x114c4, 0x115b1, 1 }, { 0x115b2, 0x115b5, 0 }, { 0x115b6, 0x115bb, 1 }, { 0x115bc, 0x115bd, 0 }, { 0x115be, 0x115be, 1 }, { 0x115bf, 0x115c0, 0 }, { 0x115c1, 0x115db, 1 }, { 0x115dc, 0x115dd, 0 }, { 0x115de, 0x11632, 1 }, { 0x11633, 0x1163a, 0 }, { 0x1163b, 0x1163c, 1 }, { 0x1163d, 0x1163d, 0 }, { 0x1163e, 0x1163e, 1 }, { 0x1163f, 0x11640, 0 }, { 0x11641, 0x116aa, 1 }, { 0x116ab, 0x116ab, 0 }, { 0x116ac, 0x116ac, 1 }, { 0x116ad, 0x116ad, 0 }, { 0x116ae, 0x116af, 1 }, { 0x116b0, 0x116b5, 0 }, { 0x116b6, 0x116b6, 1 }, { 0x116b7, 0x116b7, 0 }, { 0x116b8, 0x1171c, 1 }, { 0x1171d, 0x1171d, 0 }, { 0x1171e, 0x1171e, 1 }, { 0x1171f, 0x1171f, 0 }, { 0x11720, 0x11721, 1 }, { 0x11722, 0x11725, 0 }, { 0x11726, 0x11726, 1 }, { 0x11727, 0x1172b, 0 }, { 0x1172c, 0x1182e, 1 }, { 0x1182f, 0x11837, 0 }, { 0x11838, 0x11838, 1 }, { 0x11839, 0x1183a, 0 }, { 0x1183b, 0x1193a, 1 }, { 0x1193b, 0x1193c, 0 }, { 0x1193d, 0x1193d, 1 }, { 0x1193e, 0x1193e, 0 }, { 0x1193f, 0x11942, 1 }, { 0x11943, 0x11943, 0 }, { 0x11944, 0x119d3, 1 }, { 0x119d4, 0x119d7, 0 }, { 0x119d8, 0x119d9, 1 }, { 0x119da, 0x119db, 0 }, { 0x119dc, 0x119df, 1 }, { 0x119e0, 0x119e0, 0 }, { 0x119e1, 0x11a00, 1 }, { 0x11a01, 0x11a0a, 0 }, { 0x11a0b, 0x11a32, 1 }, { 0x11a33, 0x11a38, 0 }, { 0x11a39, 0x11a3a, 1 }, { 0x11a3b, 0x11a3e, 0 }, { 0x11a3f, 0x11a46, 1 }, { 0x11a47, 0x11a47, 0 }, { 0x11a48, 0x11a50, 1 }, { 0x11a51, 0x11a56, 0 }, { 0x11a57, 0x11a58, 1 }, { 0x11a59, 0x11a5b, 0 }, { 0x11a5c, 0x11a89, 1 }, { 0x11a8a, 0x11a96, 0 }, { 0x11a97, 0x11a97, 1 }, { 0x11a98, 0x11a99, 0 }, { 0x11a9a, 0x11c2f, 1 }, { 0x11c30, 0x11c36, 0 }, { 0x11c37, 0x11c37, 1 }, { 0x11c38, 0x11c3d, 0 }, { 0x11c3e, 0x11c3e, 1 }, { 0x11c3f, 0x11c3f, 0 }, { 0x11c40, 0x11c91, 1 }, { 0x11c92, 0x11ca7, 0 }, { 0x11ca8, 0x11ca9, 1 }, { 0x11caa, 0x11cb0, 0 }, { 0x11cb1, 0x11cb1, 1 }, { 0x11cb2, 0x11cb3, 0 }, { 0x11cb4, 0x11cb4, 1 }, { 0x11cb5, 0x11cb6, 0 }, { 0x11cb7, 0x11d30, 1 }, { 0x11d31, 0x11d36, 0 }, { 0x11d37, 0x11d39, 1 }, { 0x11d3a, 0x11d3a, 0 }, { 0x11d3b, 0x11d3b, 1 }, { 0x11d3c, 0x11d3d, 0 }, { 0x11d3e, 0x11d3e, 1 }, { 0x11d3f, 0x11d45, 0 }, { 0x11d46, 0x11d46, 1 }, { 0x11d47, 0x11d47, 0 }, { 0x11d48, 0x11d8f, 1 }, { 0x11d90, 0x11d91, 0 }, { 0x11d92, 0x11d94, 1 }, { 0x11d95, 0x11d95, 0 }, { 0x11d96, 0x11d96, 1 }, { 0x11d97, 0x11d97, 0 }, { 0x11d98, 0x11ef2, 1 }, { 0x11ef3, 0x11ef4, 0 }, { 0x11ef5, 0x11eff, 1 }, { 0x11f00, 0x11f01, 0 }, { 0x11f02, 0x11f35, 1 }, { 0x11f36, 0x11f3a, 0 }, { 0x11f3b, 0x11f3f, 1 }, { 0x11f40, 0x11f40, 0 }, { 0x11f41, 0x11f41, 1 }, { 0x11f42, 0x11f42, 0 }, { 0x11f43, 0x11f59, 1 }, { 0x11f5a, 0x11f5a, 0 }, { 0x11f5b, 0x1342f, 1 }, { 0x13430, 0x13440, 0 }, { 0x13441, 0x13446, 1 }, { 0x13447, 0x13455, 0 }, { 0x13456, 0x1611d, 1 }, { 0x1611e, 0x16129, 0 }, { 0x1612a, 0x1612c, 1 }, { 0x1612d, 0x1612f, 0 }, { 0x16130, 0x16aef, 1 }, { 0x16af0, 0x16af4, 0 }, { 0x16af5, 0x16b2f, 1 }, { 0x16b30, 0x16b36, 0 }, { 0x16b37, 0x16f4e, 1 }, { 0x16f4f, 0x16f4f, 0 }, { 0x16f50, 0x16f8e, 1 }, { 0x16f8f, 0x16f92, 0 }, { 0x16f93, 0x16fdf, 1 }, { 0x16fe0, 0x16fe3, 2 }, { 0x16fe4, 0x16fe4, 0 }, { 0x16fe5, 0x16fef, 1 }, { 0x16ff0, 0x16ff1, 2 }, { 0x16ff2, 0x16fff, 1 }, { 0x17000, 0x187f7, 2 }, { 0x187f8, 0x187ff, 1 }, { 0x18800, 0x18cd5, 2 }, { 0x18cd6, 0x18cfe, 1 }, { 0x18cff, 0x18d08, 2 }, { 0x18d09, 0x1afef, 1 }, { 0x1aff0, 0x1aff3, 2 }, { 0x1aff4, 0x1aff4, 1 }, { 0x1aff5, 0x1affb, 2 }, { 0x1affc, 0x1affc, 1 }, { 0x1affd, 0x1affe, 2 }, { 0x1afff, 0x1afff, 1 }, { 0x1b000, 0x1b122, 2 }, { 0x1b123, 0x1b131, 1 }, { 0x1b132, 0x1b132, 2 }, { 0x1b133, 0x1b14f, 1 }, { 0x1b150, 0x1b152, 2 }, { 0x1b153, 0x1b154, 1 }, { 0x1b155, 0x1b155, 2 }, { 0x1b156, 0x1b163, 1 }, { 0x1b164, 0x1b167, 2 }, { 0x1b168, 0x1b16f, 1 }, { 0x1b170, 0x1b2fb, 2 }, { 0x1b2fc, 0x1bc9c, 1 }, { 0x1bc9d, 0x1bc9e, 0 }, { 0x1bc9f, 0x1bc9f, 1 }, { 0x1bca0, 0x1bca3, 0 }, { 0x1bca4, 0x1ceff, 1 }, { 0x1cf00, 0x1cf2d, 0 }, { 0x1cf2e, 0x1cf2f, 1 }, { 0x1cf30, 0x1cf46, 0 }, { 0x1cf47, 0x1d166, 1 }, { 0x1d167, 0x1d169, 0 }, { 0x1d16a, 0x1d172, 1 }, { 0x1d173, 0x1d182, 0 }, { 0x1d183, 0x1d184, 1 }, { 0x1d185, 0x1d18b, 0 }, { 0x1d18c, 0x1d1a9, 1 }, { 0x1d1aa, 0x1d1ad, 0 }, { 0x1d1ae, 0x1d241, 1 }, { 0x1d242, 0x1d244, 0 }, { 0x1d245, 0x1d2ff, 1 }, { 0x1d300, 0x1d356, 2 }, { 0x1d357, 0x1d35f, 1 }, { 0x1d360, 0x1d376, 2 }, { 0x1d377, 0x1d9ff, 1 }, { 0x1da00, 0x1da36, 0 }, { 0x1da37, 0x1da3a, 1 }, { 0x1da3b, 0x1da6c, 0 }, { 0x1da6d, 0x1da74, 1 }, { 0x1da75, 0x1da75, 0 }, { 0x1da76, 0x1da83, 1 }, { 0x1da84, 0x1da84, 0 }, { 0x1da85, 0x1da9a, 1 }, { 0x1da9b, 0x1da9f, 0 }, { 0x1daa0, 0x1daa0, 1 }, { 0x1daa1, 0x1daaf, 0 }, { 0x1dab0, 0x1dfff, 1 }, { 0x1e000, 0x1e006, 0 }, { 0x1e007, 0x1e007, 1 }, { 0x1e008, 0x1e018, 0 }, { 0x1e019, 0x1e01a, 1 }, { 0x1e01b, 0x1e021, 0 }, { 0x1e022, 0x1e022, 1 }, { 0x1e023, 0x1e024, 0 }, { 0x1e025, 0x1e025, 1 }, { 0x1e026, 0x1e02a, 0 }, { 0x1e02b, 0x1e08e, 1 }, { 0x1e08f, 0x1e08f, 0 }, { 0x1e090, 0x1e12f, 1 }, { 0x1e130, 0x1e136, 0 }, { 0x1e137, 0x1e2ad, 1 }, { 0x1e2ae, 0x1e2ae, 0 }, { 0x1e2af, 0x1e2eb, 1 }, { 0x1e2ec, 0x1e2ef, 0 }, { 0x1e2f0, 0x1e4eb, 1 }, { 0x1e4ec, 0x1e4ef, 0 }, { 0x1e4f0, 0x1e5ed, 1 }, { 0x1e5ee, 0x1e5ef, 0 }, { 0x1e5f0, 0x1e8cf, 1 }, { 0x1e8d0, 0x1e8d6, 0 }, { 0x1e8d7, 0x1e943, 1 }, { 0x1e944, 0x1e94a, 0 }, { 0x1e94b, 0x1f003, 1 }, { 0x1f004, 0x1f004, 2 }, { 0x1f005, 0x1f0ce, 1 }, { 0x1f0cf, 0x1f0cf, 2 }, { 0x1f0d0, 0x1f18d, 1 }, { 0x1f18e, 0x1f18e, 2 }, { 0x1f18f, 0x1f190, 1 }, { 0x1f191, 0x1f19a, 2 }, { 0x1f19b, 0x1f1ff, 1 }, { 0x1f200, 0x1f202, 2 }, { 0x1f203, 0x1f20f, 1 }, { 0x1f210, 0x1f23b, 2 }, { 0x1f23c, 0x1f23f, 1 }, { 0x1f240, 0x1f248, 2 }, { 0x1f249, 0x1f24f, 1 }, { 0x1f250, 0x1f251, 2 }, { 0x1f252, 0x1f25f, 1 }, { 0x1f260, 0x1f265, 2 }, { 0x1f266, 0x1f2ff, 1 }, { 0x1f300, 0x1f320, 2 }, { 0x1f321, 0x1f32c, 1 }, { 0x1f32d, 0x1f335, 2 }, { 0x1f336, 0x1f336, 1 }, { 0x1f337, 0x1f37c, 2 }, { 0x1f37d, 0x1f37d, 1 }, { 0x1f37e, 0x1f393, 2 }, { 0x1f394, 0x1f39f, 1 }, { 0x1f3a0, 0x1f3ca, 2 }, { 0x1f3cb, 0x1f3ce, 1 }, { 0x1f3cf, 0x1f3d3, 2 }, { 0x1f3d4, 0x1f3df, 1 }, { 0x1f3e0, 0x1f3f0, 2 }, { 0x1f3f1, 0x1f3f3, 1 }, { 0x1f3f4, 0x1f3f4, 2 }, { 0x1f3f5, 0x1f3f7, 1 }, { 0x1f3f8, 0x1f43e, 2 }, { 0x1f43f, 0x1f43f, 1 }, { 0x1f440, 0x1f440, 2 }, { 0x1f441, 0x1f441, 1 }, { 0x1f442, 0x1f4fc, 2 }, { 0x1f4fd, 0x1f4fe, 1 }, { 0x1f4ff, 0x1f53d, 2 }, { 0x1f53e, 0x1f54a, 1 }, { 0x1f54b, 0x1f54e, 2 }, { 0x1f54f, 0x1f54f, 1 }, { 0x1f550, 0x1f567, 2 }, { 0x1f568, 0x1f579, 1 }, { 0x1f57a, 0x1f57a, 2 }, { 0x1f57b, 0x1f594, 1 }, { 0x1f595, 0x1f596, 2 }, { 0x1f597, 0x1f5a3, 1 }, { 0x1f5a4, 0x1f5a4, 2 }, { 0x1f5a5, 0x1f5fa, 1 }, { 0x1f5fb, 0x1f64f, 2 }, { 0x1f650, 0x1f67f, 1 }, { 0x1f680, 0x1f6c5, 2 }, { 0x1f6c6, 0x1f6cb, 1 }, { 0x1f6cc, 0x1f6cc, 2 }, { 0x1f6cd, 0x1f6cf, 1 }, { 0x1f6d0, 0x1f6d2, 2 }, { 0x1f6d3, 0x1f6d4, 1 }, { 0x1f6d5, 0x1f6d7, 2 }, { 0x1f6d8, 0x1f6db, 1 }, { 0x1f6dc, 0x1f6df, 2 }, { 0x1f6e0, 0x1f6ea, 1 }, { 0x1f6eb, 0x1f6ec, 2 }, { 0x1f6ed, 0x1f6f3, 1 }, { 0x1f6f4, 0x1f6fc, 2 }, { 0x1f6fd, 0x1f7df, 1 }, { 0x1f7e0, 0x1f7eb, 2 }, { 0x1f7ec, 0x1f7ef, 1 }, { 0x1f7f0, 0x1f7f0, 2 }, { 0x1f7f1, 0x1f90b, 1 }, { 0x1f90c, 0x1f93a, 2 }, { 0x1f93b, 0x1f93b, 1 }, { 0x1f93c, 0x1f945, 2 }, { 0x1f946, 0x1f946, 1 }, { 0x1f947, 0x1f9ff, 2 }, { 0x1fa00, 0x1fa6f, 1 }, { 0x1fa70, 0x1fa7c, 2 }, { 0x1fa7d, 0x1fa7f, 1 }, { 0x1fa80, 0x1fa89, 2 }, { 0x1fa8a, 0x1fa8e, 1 }, { 0x1fa8f, 0x1fac6, 2 }, { 0x1fac7, 0x1facd, 1 }, { 0x1face, 0x1fadc, 2 }, { 0x1fadd, 0x1fade, 1 }, { 0x1fadf, 0x1fae9, 2 }, { 0x1faea, 0x1faef, 1 }, { 0x1faf0, 0x1faf8, 2 }, { 0x1faf9, 0x1ffff, 1 }, { 0x20000, 0x2fffd, 2 }, { 0x2fffe, 0x2ffff, 1 }, { 0x30000, 0x3fffd, 2 }, { 0x3fffe, 0xe0000, 1 }, { 0xe0001, 0xe0001, 0 }, { 0xe0002, 0xe001f, 1 }, { 0xe0020, 0xe007f, 0 }, { 0xe0080, 0xe00ff, 1 }, { 0xe0100, 0xe01ef, 0 }, { 0xe01f0, 0x10ffff, 1 }, }; static const int width_table_len = sizeof(width_table) / sizeof(width_table[0]); #endif Term-Choose-LineFold-XS-0.001/PaxHeaders/XS.bs0000644000000000000000000000013215003451126015614 xustar0030 mtime=1745769046.717247299 30 atime=1745769046.973242417 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/XS.bs0000644000175000001440000000000015003451126016354 0ustar00mmusers00000000000000Term-Choose-LineFold-XS-0.001/PaxHeaders/XS.o0000644000000000000000000000013215003451110015437 xustar0030 mtime=1745769032.945509947 30 atime=1745769032.953509794 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/XS.o0000644000175000001440000005574015003451110016224 0ustar00mmusers00000000000000ELF> X@@1ɸL fDH9|3HcHRATH9rHcHRI2H9s p9}͸ËBff.HAVAUATUSHH-HHHLMH HcH D`IH)HHHH@#HPHHL,IcI?H HHuHT$E1E11LLM!HcǐIL9v/A8HHH<>?H HHuHT$E1E1LLHT$0HT$E1E111LI@AAF HHEHHL}HL8HD$8dH3%(HH[]A\A]A^A_fHT$E1E11LHT$0Y@HH-HHUH+T$@"u)HHHcA(xH4@HHqH@<HLH\$HHkHC@H|$0HD$0fDLIƋ@ IHRHT$(PHsLLt$HIFHEI^H)H)H=1HkHHCfLLH-H IHEH+D$H"L|$HIGHEMgL)HLIl$ID$dfDM)IP@M)IPHT$0|Ht$(LAF 5DH5HH|$HHD$H|$HHD$HHߺHH|$HHD$qLLIH|$HHD$H5SLH HH1gH54H=H5oH=H5lH=H=H5r[codepointinputinput, width%*sinput, max_width 0.001v5.36.0XS.cTerm::Choose::LineFold::XS::char_widthTerm::Choose::LineFold::XS::print_columnsTerm::Choose::LineFold::XS::cut_to_printwidthTerm::Choose::LineFold::XS::adjust_to_printwidth ~opJK_`oppq/0JK#$$%'(()-.XY[\  9 : : ; ; < < = @ A H I L M M N P Q W X a b c d          ; < < = @ A B C F G H I J K M N P Q Q R o p q r t u u v           ; < < = > ? ? @ @ A D E L M M N T U V W a b c d          ; < < = = > @ A E F H I I J M N T U V W a b c d          : ; < = @ A D E L M M N a b c d     011234:;FGNO45566778899:pq~,-01127889:;<=>?WXYZ]^`apqtu_`\]_`1234QRSTqrst   "#&'()122389;<UVVWWX^__``aabbcdelmrs|}~344556:;;<<=ABBCjkst+,345678    ) * . / _ ` d e e f o p  ####(#)#*#+#############%%%%&&&&/&0&7&8&G&H&S&T&~&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'''' ' ' ' '''('(')'K'L'L'M'M'N'N'O'R'S'U'V'V'W'W'X'''''''''''''++++O+P+P+Q+T+U+U+V+,,,,~-------........../////)0*0-0.0>0?0@0A00000000111/101011111111111222 2G2H2O2P2ƤǤnorsst}~  $%&'+,,-èĨŨƨߨ%&-.FGQR_`|}()./01234567BCCDKLLM{||}ª /0RSSTfgghkl`auvz{            7 8 : ; > ? ? @     # $ ' ( h i m n EFPQ78FGoppqrstu~&'+,,-45rsst./1234455678=>>?@AAB:;<=?@@Aeflmoptu78?@ABDEEFFG]^^_23:;<==>>?@A !"%&&'+,./7889:;:;<==>>?BCCD  2389:;>?FGGHPQVWXY[\/06778=>>??@01679::;;<=>>?EFFGGH56:;?@@AABBCYZZ[/404@4A4F4G4U4V4aa)a*a,a-a/a0ajjjj/k0k6k7kNoOoOoPoooooooooooooooopՌ֌ "#1223OPRSTUUVcdghop-./0FGfgijrsABDEVW_`vw67:;lmtuuv!""#$%%&*+/067CDJK;<?@HIOPQR_`ef !,-5667|}}~>??@@AAB=>JKNOOPghyzz{OP  :;;<EFFGop|} GCC: (SUSE Linux) 7.5.0zRx d<0BIBB A(A0 (A BBBI Hp/BBB B(A0A8Dp= 8A0A(B BBBK HBBB B(A0A8Dpo 8A0A(B BBBI L=BBB B(A0A8D5 8A0A(B BBBC X{Aud-%pBN/z = 3"5; C(X!'=N\hnx$EUn{4FYXS.c_char_width.part.1width_tableXS_Term__Choose__LineFold__XS_char_widthXS_Term__Choose__LineFold__XS_print_columnsXS_Term__Choose__LineFold__XS_adjust_to_printwidthXS_Term__Choose__LineFold__XS_cut_to_printwidth.LC0.LC1.LC3.LC4.LC2.LC6.LC5.LC7.LC8.LC9.LC10.LC11.LC12.LC13_GLOBAL_OFFSET_TABLE_PL_markstack_ptrPL_stack_basePL_stack_spPL_opPL_curpadPL_taintedPerl_sv_2uv_flagsPerl_sv_newmortalPerl_sv_setiv_mgPerl_croak_xs_usagePL_strict_utf8_dfa_tabPerl_ckwarn_dPerl_newSVivPerl_sv_2mortalPerl_sv_2pvutf8_flagsPerl__utf8n_to_uvchr_msgs_helperPL_sv_immortalsPerl_sv_mortalcopy_flagsPerl_sv_pvn_force_flags__stack_chk_failPerl_newSVpvnPerl_sv_catpvfPerl_sv_2iv_flagsPL_curstackinfoPL_stack_maxPerl_newSVsv_flagsPerl_sv_catpvPerl_stack_growboot_Term__Choose__LineFold__XSPerl_xs_handshakePerl_newXS_deffilePerl_xs_boot_epilog s*****1*fq ! "****#$6*#%&*':((*)*I*+ ",****#$*#-  '.6&=*N*' ( ( / * *) * *! *Q - +  " , * * * *#a $ *# - * *04 *1R &a *~ '(((/*)*6(K*R*1n*02&*B2O&n y-&-*1&&6+KS3j444444" ,"16?F7TY7gl7s78 4pt  \.symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @@L &,12H@2O- W0A`AuApp@W 8CX  HmWTerm-Choose-LineFold-XS-0.001/PaxHeaders/XS.xs0000644000000000000000000000013215001760033015640 xustar0030 mtime=1745346587.276653617 30 atime=1745768573.313497809 30 ctime=1745769050.077183221 Term-Choose-LineFold-XS-0.001/XS.xs0000644000175000001440000001306615001760033016420 0ustar00mmusers00000000000000#define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef AMBIGUOUS_WIDTH_IS_WIDE #include "charwidth_ambiguous_is_wide.h" #else #include "charwidth_default.h" #endif static int _char_width(UV codepoint) { int min = 0; int max = width_table_len - 1; int mid; if (codepoint < width_table[0].start || codepoint > width_table[max].end) { return 1; } else { while (max >= min) { mid = (min + max) / 2; if (codepoint > width_table[mid].end) { min = mid + 1; } else if (codepoint < width_table[mid].start) { max = mid - 1; } else { return width_table[mid].width; } } return 1; } } MODULE = Term::Choose::LineFold::XS PACKAGE = Term::Choose::LineFold::XS PROTOTYPES: DISABLE int char_width(UV codepoint) CODE: RETVAL = _char_width(codepoint); OUTPUT: RETVAL SV * print_columns(SV *input) PREINIT: STRLEN len; const U8 *p, *end; UV codepoint; int width = 0; STRLEN clen; CODE: if (!SvOK(input)) { XSRETURN_UNDEF; } if (!SvPOK(input)) { input = sv_mortalcopy(input); // Ensure string SvPV_force(input, len); } p = (const U8 *) SvPVutf8(input, len); end = p + len; while (p < end) { codepoint = utf8_to_uvchr_buf(p, end, &clen); if (clen == -1 ) { codepoint = *p; // Interpret the invalid byte as a single character clen = 1; // Advance by 1 byte // Option B: Stop processing on error // Perl_warn(aTHX_ "Malformed UTF-8 at byte offset %ld", (long)(p - (const U8 *)SvPVX(input))); // break; // Option C: Malformed UTF-8. Skip bad byte and keep going // p++; // continue; } p += clen; width += _char_width(codepoint); } RETVAL = newSViv(width); OUTPUT: RETVAL SV* cut_to_printwidth(SV *input, int max_width) PREINIT: STRLEN len; const U8 *p, *end; const U8 *split_point = NULL; const U8 *char_start; UV codepoint; int str_w = 0, this_w; STRLEN clen; // bool skip_padding; PPCODE: if (!SvOK(input)) { XSRETURN_UNDEF; } if (!SvPOK(input)) { input = sv_mortalcopy(input); SvPV_force(input, len); } const U8 *start = (const U8 *) SvPVutf8(input, len); p = start; end = p + len; while (p < end) { char_start = p; codepoint = utf8_to_uvchr_buf(p, end, &clen); if (clen == -1) { codepoint = *p; clen = 1; } this_w = _char_width(codepoint); if (str_w + this_w > max_width) { split_point = char_start; break; } //if (str_w + this_w == max_width) { // p += clen; // str_w += this_w; // split_point = p; // break; //} str_w += this_w; p += clen; } if (!split_point) { // Whole string fits if (GIMME_V == G_ARRAY) { XPUSHs(sv_2mortal(newSVsv(input))); XPUSHs(sv_2mortal(newSVpvn("", 0))); } else { XPUSHs(sv_2mortal(newSVsv(input))); } } else { STRLEN first_len = split_point - start; SV *first_part = newSVpvn((const char *)start, first_len); SvUTF8_on(first_part); if (str_w == max_width - 1) { sv_catpv(first_part, " "); str_w += 1; } if (GIMME_V == G_ARRAY) { STRLEN rest_len = end - split_point; SV *rest_part = newSVpvn((const char *)split_point, rest_len); SvUTF8_on(rest_part); XPUSHs(sv_2mortal(first_part)); XPUSHs(sv_2mortal(rest_part)); } else { XPUSHs(sv_2mortal(first_part)); } } SV * adjust_to_printwidth(SV *input, int width) PREINIT: STRLEN len; const U8 *p, *end; UV codepoint; int str_w = 0, this_w; STRLEN clen; SV *result; const U8 *start; CODE: if (!SvOK(input)) { XSRETURN_UNDEF; } if (!SvPOK(input)) { input = sv_mortalcopy(input); SvPV_force(input, len); } p = (const U8 *) SvPVutf8(input, len); // len is char length end = p + len; start = p; while (p < end) { codepoint = utf8_to_uvchr_buf(p, end, &clen); if (clen == (STRLEN)-1) { codepoint = *p; clen = 1; } this_w = _char_width(codepoint); if (str_w + this_w > width) { break; } str_w += this_w; p += clen; } len = (STRLEN)(p - start); // Final cutoff length: now len is bytes length if (str_w == width) { RETVAL = newSVpvn((const char *)start, len); } else { result = newSVpvn((const char *)start, len); sv_catpvf(result, "%*s", width - str_w, ""); RETVAL = result; } SvUTF8_on(RETVAL); OUTPUT: RETVAL Term-Choose-LineFold-XS-0.001/PaxHeaders/Changes0000644000000000000000000000013215003361754016236 xustar0030 mtime=1745740780.154227846 30 atime=1745768573.309497875 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/Changes0000644000175000001440000000014215003361754017005 0ustar00mmusers00000000000000Revision history for Term::Choose::LineFold::XS 0.001 2025-04-27 - First release on cpan. Term-Choose-LineFold-XS-0.001/PaxHeaders/LICENSE0000644000000000000000000000013214737502617015760 xustar0030 mtime=1736344975.826057831 30 atime=1745768573.309497875 30 ctime=1745769050.073183298 Term-Choose-LineFold-XS-0.001/LICENSE0000644000175000001440000004366114737502617016544 0ustar00mmusers00000000000000This software is copyright (c) 2025 by Matthäus Kiem. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2025 by Matthäus Kiem. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2025 by Matthäus Kiem. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End