Update of mhonarc/MHonArc/lib
Modified Files:
iso2022jp.pl
Log Message:
Bug #24247: Applied patch contributed by Takashi P.KATOH.
======================================================================
FILE: mhonarc/MHonArc/lib/iso2022jp.pl
<http://www.mhonarc.org/cgi-bin/viewcvs.cgi/*checkout*/mhonarc/MHonArc/lib/iso2022jp.pl?rev=1.10>
<http://www.mhonarc.org/cgi-bin/viewcvs.cgi/mhonarc/MHonArc/lib/iso2022jp.pl.diff?r1=1.9&r2=1.10&diff_format=h>
--- iso2022jp.pl 4 Dec 2002 20:00:39 -0000 1.9
+++ iso2022jp.pl 3 May 2009 20:38:32 -0000 1.10
@@ -66,4 +66,5 @@
my $i = 0;
foreach (@lines) {
+ my $line = "";
# a trick to process preceding ASCII text
$_ = "\033(B" . $_ unless /^\033/;
@@ -72,5 +73,5 @@
while(1) {
if (s/^(\033\([BJ])//) { # Single Byte Segment
- $ret .= $1;
+ $line .= $1;
while(1) {
if (s/^([^\033]+)//) { # ASCII plain text
@@ -85,9 +86,9 @@
unless $nourl;
- $ret .= $ascii_text;
+ $line .= $ascii_text;
} elsif (s/(\033\.[A-F])//) { # G2 Designate Sequence
- $ret .= $1;
+ $line .= $1;
} elsif (s/(\033N[ -])//) { # Single Shift Sequence
- $ret .= $1;
+ $line .= $1;
} else {
last;
@@ -95,12 +96,12 @@
}
} elsif (s/^(\033\$[\(_at_)AB]|\033\$\([CD])//) { # Double Byte Segment
- $ret .= $1;
+ $line .= $1;
while (1) {
if (s/^([!-~][!-~]+)//) { # Double Char plain text
- $ret .= $1;
+ $line .= $1;
} elsif (s/(\033\.[A-F])//) { # G2 Designate Sequence
- $ret .= $1;
+ $line .= $1;
} elsif (s/(\033N[ -])//) { # Single Shift Sequence
- $ret .= $1;
+ $line .= $1;
} else {
last;
@@ -109,5 +110,5 @@
} else {
# Something wrong in text
- $ret .= $_;
+ $line .= $_;
last;
}
@@ -115,5 +116,7 @@
# remove a `trick'
- $ret =~ s/^\033\(B//;
+ $line =~ s/^\033\(B//;
+
+ $ret .= $line;
# add back eol
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-COMMITS