version 1.2, 2001/05/02 21:35:15
|
version 1.3, 2001/05/02 23:00:05
|
Line 115 sub handler {
|
Line 115 sub handler {
|
my $chunk; |
my $chunk; |
my $line; |
my $line; |
|
|
$r->print('<table border=2><tr><th>Version '.$ENV{'form.versionone'}. |
$r->print('<pre>'); |
'</th><th>Version '.$ENV{'form.versiontwo'}.'</th>'); |
|
foreach $chunk (@$diffs) { |
foreach $chunk (@$diffs) { |
$r->print('</pre></tr><tr><td><pre>'); |
|
my $presign='-'; |
|
foreach $line (@$chunk) { |
foreach $line (@$chunk) { |
my ($sign, $lineno, $text) = @$line; |
my ($sign, $lineno, $text) = @$line; |
if ($sign ne $presign) { |
|
$r->print('</pre></td><td><pre>'); |
|
$presign=$sign; |
|
} |
|
$text=~s/\</\<\;/g; |
$text=~s/\</\<\;/g; |
$text=~s/\>/\>\;/g; |
$text=~s/\>/\>\;/g; |
$lineno=substr($lineno.' ',0,8); |
$lineno=substr($lineno.' ',0,7); |
$r->print($lineno.' '.$text."\n"); |
$r->print('<font color='.(($sign eq '+')?'green':'red').'>'. |
|
$sign.' '.$lineno.' '.$text."</font>\n"); |
} |
} |
|
$r->print("<hr>\n"); |
} |
} |
|
$r->print('</pre>'); |
|
|
$r->print('</tr></table>'); |
|
} else { |
} else { |
$r->print('<h1><font color=red>Binary File</font></h1>'); |
$r->print('<h1><font color=red>Binary File</font></h1>'); |
} |
} |