mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-30 11:33:28 +01:00
Allow both {...} and ';' with INLINE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b33bdeaa02
commit
c34cf333ba
@ -1904,6 +1904,8 @@ sub split_line1( $$;$$ ) {
|
|||||||
my @maxcolumns = ( keys %$columnsref );
|
my @maxcolumns = ( keys %$columnsref );
|
||||||
$maxcolumns = @maxcolumns;
|
$maxcolumns = @maxcolumns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$inline_matches = '';
|
||||||
#
|
#
|
||||||
# First see if there is a semicolon on the line; what follows will be column/value paris
|
# First see if there is a semicolon on the line; what follows will be column/value paris
|
||||||
#
|
#
|
||||||
@ -1914,6 +1916,20 @@ sub split_line1( $$;$$ ) {
|
|||||||
# Found it -- be sure there wasn't more than one.
|
# Found it -- be sure there wasn't more than one.
|
||||||
#
|
#
|
||||||
fatal_error "Only one semicolon (';') allowed on a line" if defined $rest;
|
fatal_error "Only one semicolon (';') allowed on a line" if defined $rest;
|
||||||
|
|
||||||
|
if ( $currentline =~ /^\s*INLINE(?:\(.*\))?\s/) {
|
||||||
|
$inline_matches = $pairs;
|
||||||
|
|
||||||
|
if ( $columns =~ /^(\s*|.*[^&@%]){(.*)}\s*$/ ) {
|
||||||
|
#
|
||||||
|
# Pairs are enclosed in curly brackets.
|
||||||
|
#
|
||||||
|
$columns = $1;
|
||||||
|
$pairs = $2;
|
||||||
|
} else {
|
||||||
|
$pairs = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
} elsif ( $currentline =~ /^(\s*|.*[^&@%]){(.*)}$/ ) {
|
} elsif ( $currentline =~ /^(\s*|.*[^&@%]){(.*)}$/ ) {
|
||||||
#
|
#
|
||||||
# Pairs are enclosed in curly brackets.
|
# Pairs are enclosed in curly brackets.
|
||||||
@ -1949,15 +1965,10 @@ sub split_line1( $$;$$ ) {
|
|||||||
|
|
||||||
push @line, '-' while @line < $maxcolumns;
|
push @line, '-' while @line < $maxcolumns;
|
||||||
|
|
||||||
$inline_matches = '';
|
|
||||||
|
|
||||||
if ( supplied $pairs ) {
|
if ( supplied $pairs ) {
|
||||||
$pairs =~ s/^\s*//;
|
$pairs =~ s/^\s*//;
|
||||||
$pairs =~ s/\s*$//;
|
$pairs =~ s/\s*$//;
|
||||||
|
|
||||||
if ( $first =~ /^INLINE(?:\(.*\))?$/) {
|
|
||||||
$inline_matches = $pairs;
|
|
||||||
} else {
|
|
||||||
my @pairs = split( /,?\s+/, $pairs );
|
my @pairs = split( /,?\s+/, $pairs );
|
||||||
|
|
||||||
for ( @pairs ) {
|
for ( @pairs ) {
|
||||||
@ -1972,7 +1983,6 @@ sub split_line1( $$;$$ ) {
|
|||||||
$line[$column] = $value;
|
$line[$column] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@line;
|
@line;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user