File: mkexc

package info (click to toggle)
perl-tk 1%3A804.033-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 34,724 kB
  • ctags: 37,174
  • sloc: ansic: 349,541; perl: 52,192; sh: 17,904; makefile: 5,732; asm: 3,565; ada: 1,681; pascal: 1,089; cpp: 1,006; yacc: 883; cs: 879
file content (61 lines) | stat: -rwxr-xr-x 1,114 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/local/bin/perl -w
use strict;
use vars qw(%ref %def);
require "process_object";

my @libs;
foreach (`ldd $^X`)
 {
  push @libs,$1 if (/=>\s+(.*?)\s+/ && -r $1);
 }  
warn("@libs");

my $file;
foreach $file (grep(!/_f\./,glob('*.n')),glob('../*.o'),
               glob('../Event/*.o'),
               '/usr/X11R6/lib/libX11.so.6',$^X,@libs)
 {
  print STDERR "Scanning $file\n";
  do_nm($file);
 }

foreach my $sym (sort keys %ref)
 {
  unless (exists $def{$sym})
   {
    print "$sym not defined\n";
   }
 }

@ARGV = glob('*.t') unless (@ARGV);

my $tab;
foreach $tab (@ARGV)
 {
  my $count = 0;
  my $x = $tab;
  $x =~ s/\.t$/.qexc/;
  my %func;
  open(T,"<$tab") || die "Cannot open $tab:$!";
  chmod(0644,$x);
  open(X,">$x")   || die "Cannot open $x:$!";
  print STDERR "Checking $tab\n";
  while (<T>)
   {
    if (/^VFUNC\([^,]*,([A-Za-z][A-Za-z0-9_]*)/)
     {
      my $sym = $1;
      unless (exists($ref{$1}) || (exists ($def{$1}) && $x !~ /^tcl/)
             )
       {
        print X "$sym\n";
        $count++;
       }
     }
   }
  close(X);
  unlink($x) unless ($count);
  close(T);
 }