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;
17 if(/^#define ([A-Za-z0-9_]+)/) {
23 while(/([A-Za-z0-9_]+)/sgm) {
24 if($cur cmp $1) { $used{$1} = $tmp; }
30 foreach(keys %defined) {
31 if(!$used{$_}) { print "$_\n"; }