Revert "Some corrections to conditional inclusion"

This reverts commit 164d2f5d1b.
This commit is contained in:
Tom Eastep 2012-03-19 07:22:07 -07:00
parent df33587395
commit 6769acc7a7

View File

@ -1574,8 +1574,6 @@ sub copy( $ ) {
my $file = $_[0];
my $save_ifstack = $ifstack;
$ifstack = @ifstack;
open IF , $file or fatal_error "Unable to open $file: $!";
while ( <IF> ) {
@ -1603,7 +1601,7 @@ sub copy( $ ) {
}
}
unless( $ifstack == @ifstack ) {
unless( $save_ifstack == @ifstack ) {
my $lastref = $ifstack[-1];
$currentlinenumber = 'EOF';
$currentfilename = $file;
@ -1627,9 +1625,6 @@ sub copy1( $ ) {
if ( $script || $debug ) {
my ( $do_indent, $here_documents ) = ( 1, '');
my $save_ifstack = $ifstack;
$ifstack = @ifstack;
open_file( $_[0] );
while ( $currentfile ) {
@ -1727,7 +1722,7 @@ sub copy1( $ ) {
}
}
unless( $ifstack == @ifstack ) {
unless( $save_ifstack == @ifstack ) {
my $lastref = $ifstack[-1];
$currentlinenumber = 'EOF';
$currentfilename = $_[0];
@ -1766,8 +1761,6 @@ sub copy2( $$ ) {
unless ( $empty ) {
my $save_ifstack = $ifstack;
$ifstack = @ifstack;
emit <<EOF;
################################################################################
# Functions imported from $file
@ -1813,7 +1806,7 @@ EOF
}
}
unless( $ifstack == @ifstack ) {
unless( $save_ifstack == @ifstack ) {
my $lastref = $ifstack[-1];
$currentlinenumber = 'EOF';
$currentfilename = $file;
@ -1842,8 +1835,7 @@ EOF
#
sub push_open( $ ) {
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack ];
$ifstack = @ifstack;
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack = @ifstack ];
my @a = @includestack;
push @openstack, \@a;
@includestack = ();