Debian Codegraph @

pTk/prune_vtab

raw
1 #!/tools/local/perl -w
2 use strict;
3
4 my $file = (@ARGV) ? shift : 'tclDecls.m';
5
6 use vars qw(%ref);
7 my %mac;
8
9 require 'process_object';
10
11 my @n = grep(!/_f\.n/,glob('*.n'));
12
13 warn "Scanning object\n";
14 foreach my $obj (grep(!/_f\.n/,glob('*.n')))
15 {
16 do_nm($obj);
17 }
18
19
20 open(TCL,"$file") || die "Cannot open $file:$!";
21 warn "Reading $file\n";
22 while (<TCL>)
23 {
24 if (/^\s*#\s*define\s+(\w+)\b/o)
25 {
26 $mac{$1} = $file;
27 }
28 }
29
30 foreach my $name (keys %mac)
31 {
32 print "$name\n" unless exists $ref{$name};
33 }