version 1.1, 2001/10/02 11:17:00 |
version 1.2, 2002/09/11 07:26:46 |
|
|
local($h1,$l1,$b1,$sp1,$str1)=split(/,/,$_[0],5); |
local($h1,$l1,$b1,$sp1,$str1)=split(/,/,$_[0],5); |
$h1 || $h1++; |
$h1 || $h1++; |
if (($left=$len-$l1)<=0) {return $_[0];} |
if (($left=$len-$l1)<=0) {return $_[0];} |
$left=int($left/2); |
local($LHS,$RHS); |
|
$LHS = int($left/2); $RHS = $left - $LHS; |
local($out,$first)=("",1); |
local($out,$first)=("",1); |
for (split(/\n/,$str1,$h1)) { |
for (split(/\n/,$str1,$h1)) { |
if ($first) {$first=0;} |
if ($first) {$first=0;} |
else {$out .= "\n";} |
else {$out .= "\n";} |
$out .= " " x $left . $_; |
$out .= " " x $LHS. $_ . " " x $RHS; |
} |
} |
return "$h1,$len,$b1,0,$out"; |
return "$h1,$len,$b1,0,$out"; |
} |
} |