Fix preprocessor directive recognition in list-enum-consts.pl

This commit is contained in:
Christoph M. Wintersteiger 2018-12-14 13:18:52 +00:00 committed by Janos Follath
parent 62dddd08fd
commit 7cc4c68eb6

View File

@ -22,7 +22,7 @@ while (<>)
$state = 'in'; $state = 'in';
} elsif( $state eq 'in' and /}/ ) { } elsif( $state eq 'in' and /}/ ) {
$state = 'out'; $state = 'out';
} elsif( $state eq 'in' and not (/^#if/ or /#endif/)) { } elsif( $state eq 'in' and not /^#/) {
s/=.*//; s!/\*.*!!; s/,.*//; s/\s+//g; chomp; s/=.*//; s!/\*.*!!; s/,.*//; s/\s+//g; chomp;
push @consts, $_ if $_; push @consts, $_ if $_;
} }