forked from extern/shorewall_code
Make conditional directives case insensitive
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4d3fbd1dfa
commit
e6ef32ebc2
@ -1898,9 +1898,9 @@ sub process_conditional( $$$$ ) {
|
||||
|
||||
print "CD===> $line\n" if $debug;
|
||||
|
||||
cond_error( "Invalid compiler directive ($line)" , $filename, $linenumber ) unless $line =~ /^\s*\?(IF\s+|ELSE|ELSIF\s+|ENDIF)(.*)$/;
|
||||
cond_error( "Invalid compiler directive ($line)" , $filename, $linenumber ) unless $line =~ /^\s*\?(IF\s+|ELSE|ELSIF\s+|ENDIF)(.*)$/i;
|
||||
|
||||
my ($keyword, $expression) = ( $1, $2 );
|
||||
my ($keyword, $expression) = ( uc $1, $2 );
|
||||
|
||||
if ( supplied $expression ) {
|
||||
$expression =~ s/#.*//;
|
||||
@ -2508,7 +2508,7 @@ sub read_a_line($) {
|
||||
#
|
||||
# Handle conditionals
|
||||
#
|
||||
if ( /^\s*\?(?:IF|ELSE|ELSIF|ENDIF)/ ) {
|
||||
if ( /^\s*\?(?:IF|ELSE|ELSIF|ENDIF)/i ) {
|
||||
$omitting = process_conditional( $omitting, $_, $currentfilename, $. );
|
||||
next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user