mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
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:
parent
d4ec028a7e
commit
e3aa8fd449
@ -181,7 +181,9 @@ sub timestamp() {
|
||||
sub progress_message {
|
||||
if ( $verbose > 1 ) {
|
||||
timestamp if $ENV{TIMESTAMP};
|
||||
print "@_\n";
|
||||
my $line = join( ' ', @_ );
|
||||
$line =~ s/\s+/ /g;
|
||||
print "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,6 @@ sub pop_open() {
|
||||
#
|
||||
# - Ignore blank or comment-only lines.
|
||||
# - Remove trailing comments.
|
||||
# - Compress out extra whitespace.
|
||||
# - Handle Line Continuation (We don't continue comment lines, thus avoiding user frustration
|
||||
# when the last line of a comment inadvertently ends with '\').
|
||||
# - Expand shell variables from $ENV.
|
||||
@ -373,7 +372,6 @@ sub read_a_line {
|
||||
|
||||
$nextline =~ s/#.*$//;
|
||||
chomp $nextline;
|
||||
$nextline =~ s/\s+/ /g if $verbose >= 2;
|
||||
|
||||
if ( substr( $nextline, -1, 1 ) eq '\\' ) {
|
||||
$line .= substr( $nextline, 0, -1 );
|
||||
@ -511,7 +509,7 @@ sub get_configuration() {
|
||||
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);
|
||||
unless ( exists $capabilities{$var} ) {
|
||||
warning_message "Unknown capability \"$var\" ignored";
|
||||
|
Loading…
Reference in New Issue
Block a user