mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-23 19:21:21 +02:00
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 $file = $_[0];
|
||||||
my $save_ifstack = $ifstack;
|
my $save_ifstack = $ifstack;
|
||||||
|
|
||||||
|
$ifstack = @ifstack;
|
||||||
|
|
||||||
open IF , $file or fatal_error "Unable to open $file: $!";
|
open IF , $file or fatal_error "Unable to open $file: $!";
|
||||||
|
|
||||||
while ( <IF> ) {
|
while ( <IF> ) {
|
||||||
@ -1601,7 +1603,7 @@ sub copy( $ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless( $save_ifstack == @ifstack ) {
|
unless( $ifstack == @ifstack ) {
|
||||||
my $lastref = $ifstack[-1];
|
my $lastref = $ifstack[-1];
|
||||||
$currentlinenumber = 'EOF';
|
$currentlinenumber = 'EOF';
|
||||||
$currentfilename = $file;
|
$currentfilename = $file;
|
||||||
@ -1625,6 +1627,9 @@ sub copy1( $ ) {
|
|||||||
if ( $script || $debug ) {
|
if ( $script || $debug ) {
|
||||||
my ( $do_indent, $here_documents ) = ( 1, '');
|
my ( $do_indent, $here_documents ) = ( 1, '');
|
||||||
my $save_ifstack = $ifstack;
|
my $save_ifstack = $ifstack;
|
||||||
|
|
||||||
|
$ifstack = @ifstack;
|
||||||
|
|
||||||
open_file( $_[0] );
|
open_file( $_[0] );
|
||||||
|
|
||||||
while ( $currentfile ) {
|
while ( $currentfile ) {
|
||||||
@ -1722,7 +1727,7 @@ sub copy1( $ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless( $save_ifstack == @ifstack ) {
|
unless( $ifstack == @ifstack ) {
|
||||||
my $lastref = $ifstack[-1];
|
my $lastref = $ifstack[-1];
|
||||||
$currentlinenumber = 'EOF';
|
$currentlinenumber = 'EOF';
|
||||||
$currentfilename = $_[0];
|
$currentfilename = $_[0];
|
||||||
@ -1761,6 +1766,8 @@ sub copy2( $$ ) {
|
|||||||
unless ( $empty ) {
|
unless ( $empty ) {
|
||||||
my $save_ifstack = $ifstack;
|
my $save_ifstack = $ifstack;
|
||||||
|
|
||||||
|
$ifstack = @ifstack;
|
||||||
|
|
||||||
emit <<EOF;
|
emit <<EOF;
|
||||||
################################################################################
|
################################################################################
|
||||||
# Functions imported from $file
|
# Functions imported from $file
|
||||||
@ -1806,7 +1813,7 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless( $save_ifstack == @ifstack ) {
|
unless( $ifstack == @ifstack ) {
|
||||||
my $lastref = $ifstack[-1];
|
my $lastref = $ifstack[-1];
|
||||||
$currentlinenumber = 'EOF';
|
$currentlinenumber = 'EOF';
|
||||||
$currentfilename = $file;
|
$currentfilename = $file;
|
||||||
@ -1835,7 +1842,8 @@ EOF
|
|||||||
#
|
#
|
||||||
sub push_open( $ ) {
|
sub push_open( $ ) {
|
||||||
|
|
||||||
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack = @ifstack ];
|
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack ];
|
||||||
|
$ifstack = @ifstack;
|
||||||
my @a = @includestack;
|
my @a = @includestack;
|
||||||
push @openstack, \@a;
|
push @openstack, \@a;
|
||||||
@includestack = ();
|
@includestack = ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user