forked from extern/shorewall_code
Make buildports.pl a little more bulletproof
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6637 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
60857f0518
commit
a649be0f53
@ -41,10 +41,12 @@ sub print_it( $$ ) {
|
|||||||
my $length = length $name;
|
my $length = length $name;
|
||||||
|
|
||||||
if ( $name =~ /\W/ || $name =~ /^\d/ ) {
|
if ( $name =~ /\W/ || $name =~ /^\d/ ) {
|
||||||
$tabs = "\t" x int ( ( 27 - $length ) / 8 );
|
my $repeat = int ( ( 27 - $length ) / 8 );
|
||||||
|
$tabs = $repeat > 0 ? "\t" x $repeat : ' ';
|
||||||
print "${offset}'${name}'${tabs}=> $number,\n";
|
print "${offset}'${name}'${tabs}=> $number,\n";
|
||||||
} else {
|
} else {
|
||||||
$tabs = "\t" x int ( ( 29 - $length ) / 8 );
|
my $repeat = int ( ( 29 - $length ) / 8 );
|
||||||
|
$tabs = $repeat > 0 ? "\t" x $repeat : ' ';
|
||||||
print "${offset}${name}${tabs}=> $number,\n";
|
print "${offset}${name}${tabs}=> $number,\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user