mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 03:31:24 +02:00
Revert "Some corrections to conditional inclusion"
This reverts commit 164d2f5d1b1962801025e7d0062724b7a5670e43.
This commit is contained in:
parent
df33587395
commit
6769acc7a7
@ -1574,8 +1574,6 @@ 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> ) {
|
||||||
@ -1603,7 +1601,7 @@ sub copy( $ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless( $ifstack == @ifstack ) {
|
unless( $save_ifstack == @ifstack ) {
|
||||||
my $lastref = $ifstack[-1];
|
my $lastref = $ifstack[-1];
|
||||||
$currentlinenumber = 'EOF';
|
$currentlinenumber = 'EOF';
|
||||||
$currentfilename = $file;
|
$currentfilename = $file;
|
||||||
@ -1627,9 +1625,6 @@ 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 ) {
|
||||||
@ -1727,7 +1722,7 @@ sub copy1( $ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless( $ifstack == @ifstack ) {
|
unless( $save_ifstack == @ifstack ) {
|
||||||
my $lastref = $ifstack[-1];
|
my $lastref = $ifstack[-1];
|
||||||
$currentlinenumber = 'EOF';
|
$currentlinenumber = 'EOF';
|
||||||
$currentfilename = $_[0];
|
$currentfilename = $_[0];
|
||||||
@ -1766,8 +1761,6 @@ 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
|
||||||
@ -1813,7 +1806,7 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless( $ifstack == @ifstack ) {
|
unless( $save_ifstack == @ifstack ) {
|
||||||
my $lastref = $ifstack[-1];
|
my $lastref = $ifstack[-1];
|
||||||
$currentlinenumber = 'EOF';
|
$currentlinenumber = 'EOF';
|
||||||
$currentfilename = $file;
|
$currentfilename = $file;
|
||||||
@ -1842,8 +1835,7 @@ EOF
|
|||||||
#
|
#
|
||||||
sub push_open( $ ) {
|
sub push_open( $ ) {
|
||||||
|
|
||||||
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack ];
|
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack = @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