--- Begin Message ---
- From: fumiya@xxxxxxxxxxxxxxxx
 
- Date: Mon, 26 Nov 2001 18:39:04 +0900 (JST)
 
Update of /storage/cvsroot/CVSROOT
In directory karin:/tmp/cvs-serv6131
Modified Files:
	cvsloginfo2mail 
Log Message:
Use jcode.pl if Jcode.pm is not available.
CVSROOT/cvsloginfo2mail 1.2 -> 1.3 (modified)
http://cvs.namazu.org/CVSROOT/cvsloginfo2mail.diff?r1=1.2&r2=1.3
===================================================================
RCS file: CVSROOT/cvsloginfo2mail,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cvsloginfo2mail	2001/11/26 09:10:38	1.2
+++ cvsloginfo2mail	2001/11/26 09:39:04	1.3
@@ -25,7 +25,7 @@
 $ENV{'PATH'} = "/usr/bin:/usr/sbin:/usr/lib:$ENV{'PATH'}";
 
 my $NAME ="cvsloginfo2mail";
-my $VERSION = "0.1.4";
+my $VERSION = "0.1.5";
 
 # Options
 # ======================================================================
@@ -82,10 +82,17 @@
 # Language specific?
 # ======================================================================
 
+my $ja_convert = undef;
 if ($lang eq 'ja') {
     eval('use Jcode');
     if ($@) {
-	die "Jcode.pm required to process Japanese code. Aborted.\n";
+	eval('require "jcode.pl"');
+	if ($@) {
+	    die "Jcode.pm or jcode.pl required to process Japanese.\n";
+	}
+	$ja_convert = \&jcode::convert;
+    } else {
+	$ja_convert = \&Jcode::convert;
     }
 }
 
@@ -163,7 +170,7 @@
 $fh_sendmail->print("\n");
 while (defined(my $line = STDIN->getline())) {
     if ($opt_L eq 'ja') {
-	$line = Jcode->new($line)->jis();
+	&$ja_convert(\$line, 'jis');
     }
     $fh_sendmail->print($line);
 }
@@ -235,7 +242,7 @@
 
     while (defined(my $line = $fh_rcsdiff->getline())) {
 	if ($opt_L eq 'ja') {
-	    $line = Jcode->new($line)->jis();
+	    &$ja_convert(\$line, 'jis');
 	}
 	$fh_sendmail->print($line);
     }
--- End Message ---