forked from extern/shorewall_code
Revert "Allow ?IF, ?ELSE and ?ENDIF in copied files"
This reverts commit 29dd342118
.
This commit is contained in:
parent
c7237e5c8e
commit
d4a1e7dba9
@ -1601,15 +1601,6 @@ sub copy( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
unless( $save_ifstack == @ifstack ) {
|
||||
my $lastref = $ifstack[-1];
|
||||
$currentlinenumber = 'EOF';
|
||||
$currentfilename = $file;
|
||||
fatal_error qq(Missing "?END" to match ?IF at line number $lastref->[2])
|
||||
}
|
||||
|
||||
$ifstack = $save_ifstack;
|
||||
|
||||
close IF;
|
||||
}
|
||||
}
|
||||
@ -1624,7 +1615,7 @@ sub copy1( $ ) {
|
||||
|
||||
if ( $script || $debug ) {
|
||||
my ( $do_indent, $here_documents ) = ( 1, '');
|
||||
my $save_ifstack = $ifstack;
|
||||
|
||||
open_file( $_[0] );
|
||||
|
||||
while ( $currentfile ) {
|
||||
@ -1633,13 +1624,6 @@ sub copy1( $ ) {
|
||||
|
||||
chomp;
|
||||
|
||||
if ( /^\s*\?(IF\s+|ELSE|ENDIF)(.*)$/ ) {
|
||||
$omitting = process_conditional( $omitting, $1, $2 );
|
||||
next;
|
||||
}
|
||||
|
||||
next if $omitting;
|
||||
|
||||
if ( /^${here_documents}\s*$/ ) {
|
||||
if ( $script ) {
|
||||
print $script $here_documents if $here_documents;
|
||||
@ -1722,15 +1706,6 @@ sub copy1( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
unless( $save_ifstack == @ifstack ) {
|
||||
my $lastref = $ifstack[-1];
|
||||
$currentlinenumber = 'EOF';
|
||||
$currentfilename = $_[0];
|
||||
fatal_error qq(Missing "?END" to match ?IF at line number $lastref->[2])
|
||||
}
|
||||
|
||||
$ifstack = $save_ifstack;
|
||||
|
||||
close_file;
|
||||
}
|
||||
}
|
||||
@ -1759,8 +1734,6 @@ sub copy2( $$ ) {
|
||||
}
|
||||
|
||||
unless ( $empty ) {
|
||||
my $save_ifstack = $ifstack;
|
||||
|
||||
emit <<EOF;
|
||||
################################################################################
|
||||
# Functions imported from $file
|
||||
@ -1770,15 +1743,7 @@ EOF
|
||||
emit( $_ ) unless /^\s*$/;
|
||||
|
||||
while ( <IF> ) {
|
||||
if ( /^\s*\?(IF\s+|ELSE|ENDIF)(.*)$/ ) {
|
||||
$omitting = process_conditional( $omitting, $1, $2 );
|
||||
next;
|
||||
}
|
||||
|
||||
next if $omitting;
|
||||
|
||||
chomp;
|
||||
|
||||
if ( /^\s*$/ ) {
|
||||
unless ( $lastlineblank ) {
|
||||
print $script "\n" if $script;
|
||||
@ -1806,15 +1771,6 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
unless( $save_ifstack == @ifstack ) {
|
||||
my $lastref = $ifstack[-1];
|
||||
$currentlinenumber = 'EOF';
|
||||
$currentfilename = $file;
|
||||
fatal_error qq(Missing "?END" to match ?IF at line number $lastref->[2])
|
||||
}
|
||||
|
||||
$ifstack = $save_ifstack;
|
||||
|
||||
close IF;
|
||||
|
||||
unless ( $lastlineblank ) {
|
||||
|
Loading…
Reference in New Issue
Block a user