From: Jarkko Hietaniemi Date: Sat, 23 Mar 2002 19:50:02 +0000 (+0000) Subject: Upgrade to Encode 0.97, from Dan Kogai. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=071db25d4bd6237e4ead7e44b9c1420448a117ff;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Encode 0.97, from Dan Kogai. p4raw-id: //depot/perl@15446 --- diff --git a/ext/Encode/AUTHORS b/ext/Encode/AUTHORS index 5b65c8a..ad4064d 100644 --- a/ext/Encode/AUTHORS +++ b/ext/Encode/AUTHORS @@ -12,8 +12,11 @@ Anton Tagunov Autrijus Tang Dan Kogai +Gerrit P. Haase Jarkko Hietaniemi Michael G Schwern +Nicholas Clark Nick Ing-Simmons Paul Marquess SADAHIRO Tomoyuki +Spider Boardman diff --git a/ext/Encode/Byte/Makefile.PL b/ext/Encode/Byte/Makefile.PL index a49b4f1..590a0d0 100644 --- a/ext/Encode/Byte/Makefile.PL +++ b/ext/Encode/Byte/Makefile.PL @@ -4,13 +4,13 @@ use ExtUtils::MakeMaker; my $name = 'Byte'; my %tables = ( - '8bit' => + byte_t => [ - 'ascii.ucm', + # 'ascii.ucm', 'koi8-r.ucm', 'viscii.ucm', ], - Mac => + mac_t => [ qw(macCentEuro.enc macCroatian.enc macCyrillic.enc macDingbats.enc @@ -19,7 +19,6 @@ my %tables = ( macSami.enc macThai.enc macTurkish.enc macUkraine.enc), ], - ); opendir(ENC,'../Encode'); @@ -27,7 +26,7 @@ while (defined(my $file = readdir(ENC))) { if ($file =~ /(8859|ibm).*\.ucm/io) { - push(@{$tables{$1}},$file); + push(@{$tables{$1."_t"}},$file) unless $file eq '8859-1.ucm'; } } closedir(ENC); diff --git a/ext/Encode/CN/CN.pm b/ext/Encode/CN/CN.pm index 9fbe843..51d90bb 100644 --- a/ext/Encode/CN/CN.pm +++ b/ext/Encode/CN/CN.pm @@ -1,5 +1,10 @@ package Encode::CN; -our $VERSION = do { my @r = (q$Revision: 0.96 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +BEGIN { + if (ord("A") == 193) { + die "Encode::CN not supported on EBCDIC\n"; + } +} +our $VERSION = do { my @r = (q$Revision: 0.97 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Encode; use Encode::CN::HZ; diff --git a/ext/Encode/CN/Makefile.PL b/ext/Encode/CN/Makefile.PL index 4dadad4..9fa4d06 100644 --- a/ext/Encode/CN/Makefile.PL +++ b/ext/Encode/CN/Makefile.PL @@ -2,11 +2,11 @@ use 5.7.2; use strict; use ExtUtils::MakeMaker; -my %tables = (EUC_CN => ['euc-cn.enc'], - GB2312 => ['gb2312.enc'], - GB12345 => ['gb12345.enc'], - CP936 => ['cp936.enc'], - 'ISO_IR_165' => ['iso-ir-165.enc'], +my %tables = (euc_cn_t => ['euc-cn.enc'], + '2312_t' => ['gb2312.enc'], + '12345_t' => ['gb12345.enc'], + cp_cn_t => ['cp936.enc'], + ir_165_t => ['iso-ir-165.enc'], ); my $name = 'CN'; diff --git a/ext/Encode/Changes b/ext/Encode/Changes index 2f7ac07..a981280 100644 --- a/ext/Encode/Changes +++ b/ext/Encode/Changes @@ -1,8 +1,60 @@ # Revision history for Perl extension Encode. # -# $Id: Changes,v 0.96 2002/03/22 22:22:53 dankogai Exp dankogai $ +# $Id: Changes,v 0.97 2002/03/23 20:24:42 dankogai Exp dankogai $ # +0.97 Sun Mar 24 2002 +! CN/CN.pm +! KR/KR.pm +! TW/TW.pm + EBCDIC detection mechanism installed as in JP/JP.pm + Message-Id: <20020323211847.G19148@alpha.hut.fi> +! Byte/Makefile.PL +! CN/Makefile.PL +! EBCDIC/Makefile.PL +! JP/Makefile.PL +! KR/Makefile.PL +! Symbol/Makefile.PL +! TW/Makefile.PL + Now all table files used by compile are postfixed '_t' to avoid + namespace collisions in case insensitive file systems once for all! + inspired by: + Message-ID: <58290227735.20020323195659@familiehaase.de> +! t/Aliases.t + Since the Encode::JP is unsupported under EBCDIC we + cannot run this test (aliases as such should work fine) -- jhi + Message-Id: <20020323202119.D19148@alpha.hut.fi> +! Byte/Makefile.PL + duplicate occurance of ascii.ucm and 8859-1.ucm + causes MacOS X dlyd to cloak +! t/CN.t +! t/Encode.t +! t/JP.t +! t/TW.t +! t/Tcl.t + < chdir 't' if -d 't'; + --- + > if (! -d 'blib' and -d 't'){ chdir 't' }; + When you are "make test"-ing on Encode/ directory, you must not + change $ENV{PWD}. t/JP.t has been fixed before but others somehow + remain unchanced. Also the situation detection was made simpler + in t/JP.t, which was originally; + > chdir 't' if -d 't' and $ENV{PWD} !~ m,/Encode[^/]*$,o; +! Encode.pm + "Use of uninitialized value in string eq at Encode.pm line 96." +! Symbol/Makefile.PL +! EBCDIC/Makefile.PL +! AUTHOR + -- Problem on case insensitive file systems + "coexist of ebcdic.c <> EBCDIC.c on Cygwin not possible" + Message-ID: <88254111953.20020323095503@familiehaase.de> +! compile +! AUTHOR + "So I think it's a bug in gcc, not perl. But it still needs to be + worked around." + Message-Id: <20020323145840.GD304@Bagpuss.unfortu.net> + Message-Id: <20020323170509.C96475@plum.flirble.org> + 0.96 Sat Mar 23 2002 ! TW/TW.pm ! lib/Encode/Encoding.pm diff --git a/ext/Encode/EBCDIC/Makefile.PL b/ext/Encode/EBCDIC/Makefile.PL index 607406c..1830a26 100644 --- a/ext/Encode/EBCDIC/Makefile.PL +++ b/ext/Encode/EBCDIC/Makefile.PL @@ -4,7 +4,7 @@ use ExtUtils::MakeMaker; my $name = 'EBCDIC'; my %tables = ( - ebcdic => ['cp1047.ucm','cp37.ucm','posix-bc.ucm'], + ebcdic_t => ['cp1047.ucm','cp37.ucm','posix-bc.ucm'], ); WriteMakefile( diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index be7547f..7886c63 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -1,6 +1,6 @@ package Encode; use strict; -our $VERSION = do { my @r = (q$Revision: 0.96 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +our $VERSION = do { my @r = (q$Revision: 0.97 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; our $DEBUG = 0; require DynaLoader; @@ -93,7 +93,7 @@ for my $k (qw(centeuro croatian cyrillic dingbats greek sub encodings { my $class = shift; - my @modules = ($_[0] eq ":all") ? values %ExtModule : @_; + my @modules = (@_ and $_[0] eq ":all") ? values %ExtModule : @_; for my $m (@modules) { $DEBUG and warn "about to require $m;"; diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index 9bd8a4c..8fb4106 100644 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@ -8,7 +8,7 @@ /* #include "8859.h" */ /* #include "EBCDIC.h" */ /* #include "Symbols.h" */ -#include "defcodes.h" +#include "def_t.h" #define UNIMPLEMENTED(x,y) y x (SV *sv, char *encoding) {dTHX; \ Perl_croak(aTHX_ "panic_unimplemented"); \ @@ -785,5 +785,5 @@ BOOT: /* #include "8859_def.h" */ /* #include "EBCDIC_def.h" */ /* #include "Symbols_def.h" */ -#include "defcodes_def.h" +#include "def_t_def.h" } diff --git a/ext/Encode/JP/Makefile.PL b/ext/Encode/JP/Makefile.PL index cb98de2..75c4125 100644 --- a/ext/Encode/JP/Makefile.PL +++ b/ext/Encode/JP/Makefile.PL @@ -3,10 +3,10 @@ use strict; use ExtUtils::MakeMaker; my %tables = ( - EUC_JP => ['euc-jp.ucm'], - SHIFTJIS => ['shiftjis.enc'], - MACJAPAN => ['macJapan.enc'], - CP932 => ['cp932.enc'], + euc_jp_t => ['euc-jp.ucm'], + sjis_t => ['shiftjis.enc'], + mac_jp_t => ['macJapan.enc'], + cp_jp_t => ['cp932.enc'], ); my $name = 'JP'; diff --git a/ext/Encode/KR/KR.pm b/ext/Encode/KR/KR.pm index e920cf7..7dcafd0 100644 --- a/ext/Encode/KR/KR.pm +++ b/ext/Encode/KR/KR.pm @@ -1,5 +1,10 @@ package Encode::KR; -our $VERSION = do { my @r = (q$Revision: 0.96 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +BEGIN { + if (ord("A") == 193) { + die "Encode::KR not supported on EBCDIC\n"; + } +} +our $VERSION = do { my @r = (q$Revision: 0.97 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Encode; use XSLoader; diff --git a/ext/Encode/KR/Makefile.PL b/ext/Encode/KR/Makefile.PL index 9b8303d..ffe4ae4 100644 --- a/ext/Encode/KR/Makefile.PL +++ b/ext/Encode/KR/Makefile.PL @@ -2,9 +2,9 @@ use 5.7.2; use strict; use ExtUtils::MakeMaker; -my %tables = (EUC_KR => ['euc-kr.enc'], - KSC5601 => ['ksc5601.enc'], - CP949 => ['cp949.enc'], +my %tables = (euc_kr_t => ['euc-kr.enc'], + '5601_t' => ['ksc5601.enc'], + cp_kr_t => ['cp949.enc'], ); my $name = 'KR'; diff --git a/ext/Encode/Makefile.PL b/ext/Encode/Makefile.PL index 1afc725..c2e77b2 100644 --- a/ext/Encode/Makefile.PL +++ b/ext/Encode/Makefile.PL @@ -4,9 +4,9 @@ use ExtUtils::MakeMaker; my %tables = ( - defcodes => ['ascii.ucm', - '8859-1.ucm', - ] + def_t => ['ascii.ucm', + '8859-1.ucm', + ] ); WriteMakefile( diff --git a/ext/Encode/Symbol/Makefile.PL b/ext/Encode/Symbol/Makefile.PL index be99058..79a3d6e 100644 --- a/ext/Encode/Symbol/Makefile.PL +++ b/ext/Encode/Symbol/Makefile.PL @@ -4,7 +4,7 @@ use ExtUtils::MakeMaker; my $name = 'Symbol'; my %tables = ( - symbol => ['symbol.ucm','dingbats.ucm'], + symbol_t => ['symbol.ucm','dingbats.ucm'], ); WriteMakefile( diff --git a/ext/Encode/TW/Makefile.PL b/ext/Encode/TW/Makefile.PL index 003428e..20968b5 100644 --- a/ext/Encode/TW/Makefile.PL +++ b/ext/Encode/TW/Makefile.PL @@ -2,9 +2,9 @@ use 5.7.2; use strict; use ExtUtils::MakeMaker; -my %tables = ('BIG5' => ['big5.enc'], - 'BIG5_HKSCS' => ['big5-hkscs.enc'], - 'CP950' => ['cp950.enc'], +my %tables = (big5_t => ['big5.enc'], + big5_hk_t => ['big5-hkscs.enc'], + cp_tw_t => ['cp950.enc'], ); my $name = 'TW'; diff --git a/ext/Encode/TW/TW.pm b/ext/Encode/TW/TW.pm index 58764ba..b44c8d2 100644 --- a/ext/Encode/TW/TW.pm +++ b/ext/Encode/TW/TW.pm @@ -1,5 +1,10 @@ package Encode::TW; -our $VERSION = do { my @r = (q$Revision: 0.96 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +BEGIN { + if (ord("A") == 193) { + die "Encode::TW not supported on EBCDIC\n"; + } +} +our $VERSION = do { my @r = (q$Revision: 0.97 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Encode; use XSLoader; diff --git a/ext/Encode/compile b/ext/Encode/compile index a76676b..76deee9 100755 --- a/ext/Encode/compile +++ b/ext/Encode/compile @@ -592,7 +592,11 @@ sub outstring { next unless (my $i = index($o,$s)) >= 0; $sym = $strings{$o}; - $sym .= sprintf("+0x%02x",$i) if ($i); + # gcc things that 0x0e+0x10 (anything with e+) starts to look like + # a hexadecimal floating point constant. Silly gcc. Only p + # introduces a floating point constant. Put the space in to stop it + # getting confused. + $sym .= sprintf(" +0x%02x",$i) if ($i); $subsave += length($s); return $strings{$s} = $sym; } diff --git a/ext/Encode/t/CN.t b/ext/Encode/t/CN.t index 671ee05..e995391 100644 --- a/ext/Encode/t/CN.t +++ b/ext/Encode/t/CN.t @@ -1,5 +1,5 @@ BEGIN { - chdir 't' if -d 't'; + if (! -d 'blib' and -d 't'){ chdir 't' }; unshift @INC, '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bEncode\b/) { diff --git a/ext/Encode/t/Encode.t b/ext/Encode/t/Encode.t index 9c21578..4e396e1 100644 --- a/ext/Encode/t/Encode.t +++ b/ext/Encode/t/Encode.t @@ -1,5 +1,5 @@ BEGIN { - chdir 't' if -d 't'; + if (! -d 'blib' and -d 't'){ chdir 't' }; unshift @INC, '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bEncode\b/) { diff --git a/ext/Encode/t/JP.t b/ext/Encode/t/JP.t index 733aeb9..457f204 100644 --- a/ext/Encode/t/JP.t +++ b/ext/Encode/t/JP.t @@ -1,4 +1,5 @@ BEGIN { + if (! -d 'blib' and -d 't'){ chdir 't' }; chdir 't' if -d 't' and $ENV{PWD} !~ m,/Encode[^/]*$,o; unshift @INC, '../lib'; require Config; import Config; diff --git a/ext/Encode/t/TW.t b/ext/Encode/t/TW.t index a902d23..830eb86 100644 --- a/ext/Encode/t/TW.t +++ b/ext/Encode/t/TW.t @@ -1,5 +1,5 @@ BEGIN { - chdir 't' if -d 't'; + if (! -d 'blib' and -d 't'){ chdir 't' }; unshift @INC, '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bEncode\b/) { diff --git a/ext/Encode/t/Tcl.t b/ext/Encode/t/Tcl.t index 96dc214..5de9436 100644 --- a/ext/Encode/t/Tcl.t +++ b/ext/Encode/t/Tcl.t @@ -1,5 +1,5 @@ BEGIN { - chdir 't' if -d 't'; + if (! -d 'blib' and -d 't'){ chdir 't' }; unshift @INC, '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bEncode\b/) {