summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-23 19:50:02 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-23 19:50:02 +0000
commit071db25d4bd6237e4ead7e44b9c1420448a117ff (patch)
treea150089b0a541831d71a182e6f31041f74d18f2f
parent3be065a1e9733344e98c8647d9690fa7c678b5c5 (diff)
downloadperl-071db25d4bd6237e4ead7e44b9c1420448a117ff.tar.gz
Upgrade to Encode 0.97, from Dan Kogai.
p4raw-id: //depot/perl@15446
-rw-r--r--ext/Encode/AUTHORS3
-rw-r--r--ext/Encode/Byte/Makefile.PL9
-rw-r--r--ext/Encode/CN/CN.pm7
-rw-r--r--ext/Encode/CN/Makefile.PL10
-rw-r--r--ext/Encode/Changes54
-rw-r--r--ext/Encode/EBCDIC/Makefile.PL2
-rw-r--r--ext/Encode/Encode.pm4
-rw-r--r--ext/Encode/Encode.xs4
-rw-r--r--ext/Encode/JP/Makefile.PL8
-rw-r--r--ext/Encode/KR/KR.pm7
-rw-r--r--ext/Encode/KR/Makefile.PL6
-rw-r--r--ext/Encode/Makefile.PL6
-rw-r--r--ext/Encode/Symbol/Makefile.PL2
-rw-r--r--ext/Encode/TW/Makefile.PL6
-rw-r--r--ext/Encode/TW/TW.pm7
-rwxr-xr-xext/Encode/compile6
-rw-r--r--ext/Encode/t/CN.t2
-rw-r--r--ext/Encode/t/Encode.t2
-rw-r--r--ext/Encode/t/JP.t1
-rw-r--r--ext/Encode/t/TW.t2
-rw-r--r--ext/Encode/t/Tcl.t2
21 files changed, 112 insertions, 38 deletions
diff --git a/ext/Encode/AUTHORS b/ext/Encode/AUTHORS
index 5b65c8a555..ad4064d1aa 100644
--- a/ext/Encode/AUTHORS
+++ b/ext/Encode/AUTHORS
@@ -12,8 +12,11 @@
Anton Tagunov <tagunov@motor.ru>
Autrijus Tang <autrijus@autrijus.org>
Dan Kogai <dankogai@dan.co.jp>
+Gerrit P. Haase <gp@familiehaase.de>
Jarkko Hietaniemi <jhi@iki.fi>
Michael G Schwern <schwern@pobox.com>
+Nicholas Clark <nick@ccl4.org>
Nick Ing-Simmons <nick@ing-simmons.net>
Paul Marquess <paul_marquess@yahoo.co.uk>
SADAHIRO Tomoyuki <SADAHIRO@cpan.org>
+Spider Boardman <spider@web.zk3.dec.com>
diff --git a/ext/Encode/Byte/Makefile.PL b/ext/Encode/Byte/Makefile.PL
index a49b4f10fc..590a0d0a37 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 9fbe8433ed..51d90bb5ec 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 4dadad4a69..9fa4d067cd 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 2f7ac079d7..a981280638 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 607406c18a..1830a2663c 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 be7547fc9c..7886c63826 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 9bd8a4ce1e..8fb41063aa 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 cb98de2b63..75c4125070 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 e920cf7631..7dcafd0441 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 9b8303d506..ffe4ae4c77 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 1afc7250ef..c2e77b2406 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 be99058ae1..79a3d6e6de 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 003428e6e8..20968b53cd 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 58764ba24b..b44c8d2acb 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 a76676b288..76deee95c9 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 671ee05dd0..e995391180 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 9c21578290..4e396e13e8 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 733aeb9a15..457f20400f 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 a902d23ace..830eb8686a 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 96dc2141f4..5de9436b07 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/) {