File: from

package info (click to toggle)
libtk-tablematrix-perl 1.22-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,624 kB
  • ctags: 1,274
  • sloc: ansic: 15,026; perl: 3,376; makefile: 156; sh: 16
file content (39 lines) | stat: -rwxr-xr-x 498 bytes parent folder | download | duplicates (21)
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
#!/usr/local/bin/perl -w
use strict;

use File::Find;

my %mTk;

sub scan
{
 if (/\.[ch]$/)
  {
   my $name = $File::Find::name;
   if (exists $mTk{$_})
    {
     warn "$_ = $mTk{$_} and $name\n";
    }
   $mTk{$_} = $name;
  }
}

find(\&scan,"mTk");

opendir(DIR,".") || die;
foreach (sort readdir(DIR))
 {
  if (/\.[ch]$/)
   {
    if (exists $mTk{$_})
     {
      my $path = $mTk{$_};
      print "$path => $_\n";
     }
    else
     {
      warn "$_ is orphan\n";
     }
   }
 }
close(DIR);