Better solution to line image beautification

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5765 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-30 23:29:13 +00:00
parent d4ec028a7e
commit e3aa8fd449
2 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,9 @@ sub timestamp() {
sub progress_message { sub progress_message {
if ( $verbose > 1 ) { if ( $verbose > 1 ) {
timestamp if $ENV{TIMESTAMP}; timestamp if $ENV{TIMESTAMP};
print "@_\n"; my $line = join( ' ', @_ );
$line =~ s/\s+/ /g;
print "$line\n";
} }
} }

View File

@ -353,7 +353,6 @@ sub pop_open() {
# #
# - Ignore blank or comment-only lines. # - Ignore blank or comment-only lines.
# - Remove trailing comments. # - Remove trailing comments.
# - Compress out extra whitespace.
# - Handle Line Continuation (We don't continue comment lines, thus avoiding user frustration # - Handle Line Continuation (We don't continue comment lines, thus avoiding user frustration
# when the last line of a comment inadvertently ends with '\'). # when the last line of a comment inadvertently ends with '\').
# - Expand shell variables from $ENV. # - Expand shell variables from $ENV.
@ -373,7 +372,6 @@ sub read_a_line {
$nextline =~ s/#.*$//; $nextline =~ s/#.*$//;
chomp $nextline; chomp $nextline;
$nextline =~ s/\s+/ /g if $verbose >= 2;
if ( substr( $nextline, -1, 1 ) eq '\\' ) { if ( substr( $nextline, -1, 1 ) eq '\\' ) {
$line .= substr( $nextline, 0, -1 ); $line .= substr( $nextline, 0, -1 );
@ -511,7 +509,7 @@ sub get_configuration() {
next if $line =~ /^\s*#/; next if $line =~ /^\s*#/;
next if $line =~ /^\s*$/; next if $line =~ /^\s*$/;
if ( $line =~ /^([a-zA-Z]\w*)=(.*)$/ ) { if ( $line =~ /^([a-zA-Z]\w*)=(.*?)\s*$/ ) {
my ($var, $val) = ($1, $2); my ($var, $val) = ($1, $2);
unless ( exists $capabilities{$var} ) { unless ( exists $capabilities{$var} ) {
warning_message "Unknown capability \"$var\" ignored"; warning_message "Unknown capability \"$var\" ignored";