mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-06 12:59:45 +01:00
Make conditional directives case insensitive
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
2690243e3c
commit
2ab50e65d7
@ -1897,9 +1897,9 @@ sub process_conditional( $$$$ ) {
|
|||||||
|
|
||||||
print "CD===> $line\n" if $debug;
|
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 ) {
|
if ( supplied $expression ) {
|
||||||
$expression =~ s/#.*//;
|
$expression =~ s/#.*//;
|
||||||
@ -2507,7 +2507,7 @@ sub read_a_line($) {
|
|||||||
#
|
#
|
||||||
# Handle conditionals
|
# Handle conditionals
|
||||||
#
|
#
|
||||||
if ( /^\s*\?(?:IF|ELSE|ELSIF|ENDIF)/ ) {
|
if ( /^\s*\?(?:IF|ELSE|ELSIF|ENDIF)/i ) {
|
||||||
$omitting = process_conditional( $omitting, $_, $currentfilename, $. );
|
$omitting = process_conditional( $omitting, $_, $currentfilename, $. );
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user