mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-29 19:13:39 +01:00
Add a routine to split the raw current line image
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
daa2440d9a
commit
6398756647
@ -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 );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user