Subject: | Single constant skipped in extract_constants_from() |
When running extract_constants_from() on the attached header file (linux
input.h), the constant "KEY_H" ( found on line 148 of the input.h file
attached) is not returned when running extract_constants_from() on the
header.
All the other KEY_* defines seem to be there, certainly the define
before it, and the defines after. (KEY_A..KEY_G, KEY_I..KEY_Z).
The version I am running is 1.017, I don't know if the same behavior is
exhibited in earlier versions.
Thanks,
-Lee
xxx@phobos:~/$ uname -a
Linux phobos 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686
GNU/Linux
xxx@phobos:~/$ perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Subject: | test.pl |
#!/usr/bin/perl
use strict;
use warnings;
use C::Scan::Constants;
my @hdr_files = (
'./input.h'
);
my %constants = map { $_ => 1 } extract_constants_from( @hdr_files );
my @expected = map {"KEY_$_"} ('A'..'Z', '0'..'9');
foreach (@expected){
print "$_ not found\n" unless exists $constants{$_};
}
Subject: | input.h |
Message body is not shown because it is too large.