Add a routine to split the raw current line image

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-11-06 08:44:24 -08:00
parent daa2440d9a
commit 6398756647
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -133,6 +133,7 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script
split_line split_line
split_line1 split_line1
split_line2 split_line2
split_rawline2
first_entry first_entry
open_file open_file
close_file close_file
@ -2443,6 +2444,25 @@ sub split_line2( $$;$$$ ) {
@line; @line;
} }
#
# Same as above, only it splits the raw current line
#
sub split_rawline2( $$;$$$ ) {
my $savecurrentline = $currentline;
$currentline = $rawcurrentline;
#
# Delete trailing comment
#
$currentline =~ s/\s*#.*//;
my @result = &split_line2( @_ );
$currentline = $savecurrentline;
@result;
}
sub split_line1( $$;$$ ) { sub split_line1( $$;$$ ) {
&split_line2( @_, undef ); &split_line2( @_, undef );
} }