2 # Script that reads in configure and outputs the names of all the defines
3 # it defines that are used nowhere in the code
5 # Arguments: C and H files
7 my %defined,%used,%files;
9 # First, make a list of defines in configure
18 if(/^#define ([A-Za-z0-9_]+)/) {
24 while(/([A-Za-z0-9_]+)/sgm) {
25 if($cur cmp $1) { $used{$1} = $tmp; }
31 foreach(keys %defined) {
32 if(!$used{$_}) { print "$_\n"; }