forked from extern/shorewall_code
Some corrections to conditional inclusion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
1d021e3701
commit
164d2f5d1b
@ -1574,6 +1574,8 @@ sub copy( $ ) {
|
||||
my $file = $_[0];
|
||||
my $save_ifstack = $ifstack;
|
||||
|
||||
$ifstack = @ifstack;
|
||||
|
||||
open IF , $file or fatal_error "Unable to open $file: $!";
|
||||
|
||||
while ( <IF> ) {
|
||||
@ -1601,7 +1603,7 @@ sub copy( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
unless( $save_ifstack == @ifstack ) {
|
||||
unless( $ifstack == @ifstack ) {
|
||||
my $lastref = $ifstack[-1];
|
||||
$currentlinenumber = 'EOF';
|
||||
$currentfilename = $file;
|
||||
@ -1625,6 +1627,9 @@ sub copy1( $ ) {
|
||||
if ( $script || $debug ) {
|
||||
my ( $do_indent, $here_documents ) = ( 1, '');
|
||||
my $save_ifstack = $ifstack;
|
||||
|
||||
$ifstack = @ifstack;
|
||||
|
||||
open_file( $_[0] );
|
||||
|
||||
while ( $currentfile ) {
|
||||
@ -1722,7 +1727,7 @@ sub copy1( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
unless( $save_ifstack == @ifstack ) {
|
||||
unless( $ifstack == @ifstack ) {
|
||||
my $lastref = $ifstack[-1];
|
||||
$currentlinenumber = 'EOF';
|
||||
$currentfilename = $_[0];
|
||||
@ -1761,6 +1766,8 @@ sub copy2( $$ ) {
|
||||
unless ( $empty ) {
|
||||
my $save_ifstack = $ifstack;
|
||||
|
||||
$ifstack = @ifstack;
|
||||
|
||||
emit <<EOF;
|
||||
################################################################################
|
||||
# Functions imported from $file
|
||||
@ -1806,7 +1813,7 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
unless( $save_ifstack == @ifstack ) {
|
||||
unless( $ifstack == @ifstack ) {
|
||||
my $lastref = $ifstack[-1];
|
||||
$currentlinenumber = 'EOF';
|
||||
$currentfilename = $file;
|
||||
@ -1835,7 +1842,8 @@ EOF
|
||||
#
|
||||
sub push_open( $ ) {
|
||||
|
||||
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack = @ifstack ];
|
||||
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack ];
|
||||
$ifstack = @ifstack;
|
||||
my @a = @includestack;
|
||||
push @openstack, \@a;
|
||||
@includestack = ();
|
||||
|
Loading…
Reference in New Issue
Block a user