diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-03-01 15:56:41 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-03-01 15:56:41 +0000 |
commit | e0c5d2c2fe3575bf5ab95c6d5928b04fe4086e1a (patch) | |
tree | 9bc8001d908ae1650a88c98c2763dca71833d74d /ext | |
parent | 2cdc9b22730c34a34c3c15d3c3097510ac4ecd5d (diff) | |
parent | 1af02f2f72003c23e9533d3b518e83e07a16e5f6 (diff) | |
download | perl-e0c5d2c2fe3575bf5ab95c6d5928b04fe4086e1a.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@14926
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B/Deparse.pm | 2 | ||||
-rw-r--r-- | ext/Cwd/t/cwd.t | 4 | ||||
-rw-r--r-- | ext/Encode/Encode.pm | 18 | ||||
-rw-r--r-- | ext/Time/HiRes/HiRes.pm | 4 | ||||
-rw-r--r-- | ext/Unicode/Normalize/Changes | 14 | ||||
-rw-r--r-- | ext/Unicode/Normalize/Normalize.pm | 4 | ||||
-rw-r--r-- | ext/Unicode/Normalize/Normalize.xs | 17 | ||||
-rw-r--r-- | ext/Unicode/Normalize/README | 36 | ||||
-rw-r--r-- | ext/Unicode/Normalize/mkheader | 3 | ||||
-rw-r--r-- | ext/Unicode/Normalize/t/func.t | 4 | ||||
-rw-r--r-- | ext/Unicode/Normalize/t/test.t | 9 |
11 files changed, 82 insertions, 33 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index c8f0eb94d3..ec84a50db4 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -968,6 +968,8 @@ sub AUTOLOAD { } } +sub DESTROY {} # Do not AUTOLOAD + # $root should be the op which represents the root of whatever # we're sequencing here. If it's undefined, then we don't append # any subroutine declarations to the deparsed ops, otherwise we diff --git a/ext/Cwd/t/cwd.t b/ext/Cwd/t/cwd.t index 8fc61b85fa..919cfb1527 100644 --- a/ext/Cwd/t/cwd.t +++ b/ext/Cwd/t/cwd.t @@ -65,9 +65,9 @@ my $Test_Dir = "$Top_Test_Dir/_path_/_to_/_a_/_dir_"; my $want = "t/$Test_Dir"; if( $IsVMS ) { # translate the unixy path to VMSish - $want = uc $want; $want =~ s|/|\.|g; $want .= '\]'; + $want = '((?i)' . $want . ')'; # might be ODS-2 or ODS-5 } mkpath(["$Test_Dir"], 0, 0777); @@ -94,7 +94,7 @@ print "#$ENV{PWD}\n"; rmtree([$Top_Test_Dir], 0, 0); if ($IsVMS) { - like($ENV{PWD}, qr|\bT\]$|); + like($ENV{PWD}, qr|\b((?i)t)\]$|); } else { like($ENV{PWD}, qr|\bt$|); diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 45dafface5..a2325ca987 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -150,13 +150,23 @@ define_alias( 'ascii' => 'US-ascii', ); # At least AIX has IBM-NNN (surprisingly...) instead of cpNNN. -define_alias( qr/^ibm[-_]?(\d\d\d\d?)$/i => '"cp$1"'); +# And Microsoft has their own naming (again, surprisingly). +define_alias( qr/^(?:ibm|ms)[-_]?(\d\d\d\d?)$/i => '"cp$1"'); + +# Sometimes seen with a leading zero. +define_alias( qr/^cp037$/i => '"cp37"'); + +# Ououououou. +define_alias( qr/^macRomanian$/i => '"macRumanian"'); # Standardize on the dashed versions. define_alias( qr/^utf8$/i => 'utf-8' ); define_alias( qr/^koi8r$/i => 'koi8-r' ); define_alias( qr/^koi8u$/i => 'koi8-u' ); +# Seen in some Linuxes. +define_alias( qr/^ujis$/i => 'euc-jp' ); + # TODO: HP-UX '8' encodings arabic8 greek8 hebrew8 kana8 thai8 turkish8 # TODO: HP-UX '15' encodings japanese15 korean15 roi15 # TODO: Cyrillic encoding ISO-IR-111 (useful?) @@ -172,10 +182,8 @@ define_alias( qr/^koi8u$/i => 'koi8-u' ); # Farsi Georgian Gujarati Gurmukhi Hebrew Japanese # Kannada Khmer Korean Laotian Malayalam Mongolian # Oriya Sinhalese Symbol Tamil Telugu Tibetan Vietnamese -# TODO: what is the Japanese 'UJIS' encoding seen in some Linuxes? -# Answer: euc-jp <dankogai@dan.co.jp> -# Map white space and _ to '-' +# Map white space and _ to '-' define_alias( qr/^(\S+)[\s_]+(.*)$/i => '"$1-$2"' ); sub define_encoding @@ -504,7 +512,7 @@ The Mac codepages: MacCentralEuropean MacJapanese MacCroatian MacRoman - MacCyrillic MacRumanian + MacCyrillic MacRomanian MacDingbats MacSami MacGreek MacThai MacIcelandic MacTurkish diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index 4e0f55fd8d..61f93b434f 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -117,7 +117,7 @@ unspecified, resulting in alarm-like behaviour. =item tv_interval -S<tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] )> +C<tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] )> Returns the floating seconds between the two times, which should have been returned by gettimeofday(). If the second argument is omitted, @@ -166,7 +166,7 @@ replacement for the C<alarm> provided with perl, see the EXAMPLES below. =item setitimer -S<setitimer ( $which, $floating_seconds [, $interval_floating_seconds ] )> +C<setitimer ( $which, $floating_seconds [, $interval_floating_seconds ] )> Start up an interval timer: after a certain time, a signal is arrives, and more may keep arriving at certain intervals. To disable a timer, diff --git a/ext/Unicode/Normalize/Changes b/ext/Unicode/Normalize/Changes index 4426648ed3..35c1b9459b 100644 --- a/ext/Unicode/Normalize/Changes +++ b/ext/Unicode/Normalize/Changes @@ -1,5 +1,19 @@ Revision history for Perl extension Unicode::Normalize. +0.14 Sat Feb 02 20:40:14 2002 + - synchronization with bleadperl. + - Change 14128: by Arthur + - Change 14129: by jhi + - Change 14156: + - Change 14199: by Nikola Knezevic + - Change 14308: by Benjamin Goldberg + - Change 14370: by jhi + +0.13 Sat Dec 01 11:42:43 2001 + - modify Makefile.PL to enable rebuild. + (This problem is pointed out by David Dyck.) + - Change 13388: by Jarkko Hietaniemi. + 0.12 Wed Nov 29 22:49:02 2001 - documentation in .pod is appended to .pm and the .pod is removed. (only POD in NON-XS refers to Lingua::KO::Hangul::Util.) diff --git a/ext/Unicode/Normalize/Normalize.pm b/ext/Unicode/Normalize/Normalize.pm index db173c527f..cec5fa70b3 100644 --- a/ext/Unicode/Normalize/Normalize.pm +++ b/ext/Unicode/Normalize/Normalize.pm @@ -11,7 +11,7 @@ use strict; use warnings; use Carp; -our $VERSION = '0.13'; +our $VERSION = '0.14'; our $PACKAGE = __PACKAGE__; require Exporter; @@ -168,7 +168,7 @@ SADAHIRO Tomoyuki, E<lt>SADAHIRO@cpan.orgE<gt> http://homepage1.nifty.com/nomenclator/perl/ - Copyright(C) 2001, SADAHIRO Tomoyuki. Japan. All rights reserved. + Copyright(C) 2001-2002, SADAHIRO Tomoyuki. Japan. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/ext/Unicode/Normalize/Normalize.xs b/ext/Unicode/Normalize/Normalize.xs index 0b0809e50d..7a11095c24 100644 --- a/ext/Unicode/Normalize/Normalize.xs +++ b/ext/Unicode/Normalize/Normalize.xs @@ -16,9 +16,9 @@ #endif /* uvuni_to_utf8 */ /* Perl 5.6.1 ? */ -#ifndef utf8n_to_uvchr -#define utf8n_to_uvchr utf8_to_uv -#endif /* utf8n_to_uvchr */ +#ifndef utf8n_to_uvuni +#define utf8n_to_uvuni utf8_to_uv +#endif /* utf8n_to_uvuni */ /* At present, char > 0x10ffff are unaffected without complaint, right? */ #define VALID_UTF_MAX (0x10ffff) @@ -172,7 +172,7 @@ decompose(arg, compat = &PL_sv_no) s = (U8*)SvPV(src,srclen); e = s + srclen; for(p = s; p < e;){ - uv = utf8n_to_uvchr(p, e - p, &retlen, 0); + uv = utf8n_to_uvuni(p, e - p, &retlen, 0); p += retlen; if(Hangul_IsS(uv)) sv_cat_decompHangul(dst, uv); else { @@ -211,7 +211,7 @@ reorder(arg) U8 *cc_in; STRLEN cc_len, cc_iter, cc_pos; - uv = utf8n_to_uvchr(p, e - p, &retlen, 0); + uv = utf8n_to_uvuni(p, e - p, &retlen, 0); curCC = getCombinClass(uv); p += retlen; @@ -223,7 +223,7 @@ reorder(arg) stk_cc[cc_pos].pos = cc_pos; while(p < e) { - uv = utf8n_to_uvchr(p, e - p, &retlen, 0); + uv = utf8n_to_uvuni(p, e - p, &retlen, 0); curCC = getCombinClass(uv); if(!curCC) break; p += retlen; @@ -288,7 +288,7 @@ compose(arg) for(p = s; p < e;){ if(beginning) { - uvS = utf8n_to_uvchr(p, e - p, &retlen, 0); + uvS = utf8n_to_uvuni(p, e - p, &retlen, 0); p += retlen; if (getCombinClass(uvS)){ /* no Starter found yet */ @@ -304,7 +304,7 @@ compose(arg) /* to the next Starter */ while(p < e) { - uv = utf8n_to_uvchr(p, e - p, &retlen, 0); + uv = utf8n_to_uvuni(p, e - p, &retlen, 0); p += retlen; curCC = getCombinClass(uv); @@ -345,7 +345,6 @@ compose(arg) } uvS = uv; } /* for */ - SvCUR_set(dst, d - (U8*)SvPVX(dst)); RETVAL = dst; OUTPUT: diff --git a/ext/Unicode/Normalize/README b/ext/Unicode/Normalize/README index 96c456a592..2404f2fb1d 100644 --- a/ext/Unicode/Normalize/README +++ b/ext/Unicode/Normalize/README @@ -1,4 +1,4 @@ -Unicode/Normalize version 0.12 +Unicode/Normalize version 0.14 =================================== Unicode::Normalize - normalized forms of Unicode text @@ -40,6 +40,15 @@ type the following: make test make install +If you decide to install the NoXS version after trying to build the XS, +type the following: + + make clean + perl Makefile.PL noxs + make + make test + make install + DEPENDENCIES This module requires these other modules and libraries: @@ -48,12 +57,23 @@ Carp Exporter File::Copy File::Spec -unicore/CombiningClass.pl or unicode/CombiningClass.pl -unicore/Decomposition.pl or unicode/Decomposition.pl -unicore/CompositionExclusions.txt or unicode/CompExcl.txt -and for the Non-XS version, in addition to the above, -Lingua::KO::Hangul::Util 0.06 +unicore/CombiningClass.pl + (or unicode/CombiningClass.pl) +unicore/Decomposition.pl + (or unicode/Decomposition.pl) +unicore/CompositionExclusions.txt + (or unicode/CompExcl.txt) + +# CAVEAT: +# In bleadperl, unicore/CompExcl.txt is renamed +# unicore/CompositionExclusions.txt. + +And for the NoXS version, in addition to the above, + + Lingua::KO::Hangul::Util 0.06 + +is required. COPYRIGHT AND LICENCE @@ -61,8 +81,8 @@ SADAHIRO Tomoyuki, E<lt>SADAHIRO@cpan.orgE<gt> http://homepage1.nifty.com/nomenclator/perl/ - Copyright(C) 2001, SADAHIRO Tomoyuki. Japan. All rights reserved. + Copyright(C) 2001-2002, SADAHIRO Tomoyuki. Japan. All rights reserved. - This program is free software; you can redistribute it and/or + This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/ext/Unicode/Normalize/mkheader b/ext/Unicode/Normalize/mkheader index ddd8cbf14d..12c5aa8fa0 100644 --- a/ext/Unicode/Normalize/mkheader +++ b/ext/Unicode/Normalize/mkheader @@ -239,7 +239,8 @@ EOF next if ! $val{ $p }{ $r }; printf "$type ${head}_%02x_%02x [256] = {\n", $p, $r; for(my $c = 0; $c < 256; $c++){ - print "\t", defined $val{$p}{$r}{$c} ? "($type)".$val{$p}{$r}{$c} : $null; + print "\t", defined $val{$p}{$r}{$c} + ? "($type)".$val{$p}{$r}{$c} : $null; print ',' if $c != 255; print "\n" if $c % 8 == 7; } diff --git a/ext/Unicode/Normalize/t/func.t b/ext/Unicode/Normalize/t/func.t index 6f0ff08120..c436a7c3dd 100644 --- a/ext/Unicode/Normalize/t/func.t +++ b/ext/Unicode/Normalize/t/func.t @@ -66,8 +66,8 @@ print ! defined getComposite( 0, 0) && 0x1E14 == getComposite(0x0112, 0x0300) && 0xAC00 == getComposite(0x1100, 0x1161) && 0xADF8 == getComposite(0x1100, 0x1173) - && ! getComposite(0x1100, 0x11AF) - && ! getComposite(0x1173, 0x11AF) + && ! defined getComposite(0x1100, 0x11AF) + && ! defined getComposite(0x1173, 0x11AF) && 0xAE00 == getComposite(0xADF8, 0x11AF) ? "ok" : "not ok", " 5\n"; diff --git a/ext/Unicode/Normalize/t/test.t b/ext/Unicode/Normalize/t/test.t index 198bf071bb..fe42aae641 100644 --- a/ext/Unicode/Normalize/t/test.t +++ b/ext/Unicode/Normalize/t/test.t @@ -49,5 +49,10 @@ ok(hexNFC("0000 0041 0000 0000"), "0000 0041 0000 0000"); ok(hexNFD("0000 0041 0000 0000"), "0000 0041 0000 0000"); # should be unary. -ok(NFC "\x{41}\x{0302}\x{0301}\x62" eq "\x{1EA4}\x62"); -ok(NFD "\x{E0}\x{AC00}" eq "\x{61}\x{0300}\x{1100}\x{1161}"); +my $str11 = pack('U*', 0x41, 0x0302, 0x0301, 0x62); +my $str12 = pack('U*', 0x1EA4, 0x62); +ok(NFC $str11 eq $str12); + +my $str21 = pack('U*', 0xE0, 0xAC00); +my $str22 = pack('U*', 0x61, 0x0300, 0x1100, 0x1161); +ok(NFD $str21 eq $str22); |