File: filter.pl

package info (click to toggle)
cameleon 1.9.19-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,396 kB
  • ctags: 6,582
  • sloc: ml: 50,138; makefile: 1,754; xml: 1,543; sql: 60; perl: 20; sh: 17; ansic: 13
file content (26 lines) | stat: -rwxr-xr-x 575 bytes parent folder | download | duplicates (4)
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
#! /usr/bin/perl -w

use strict;

my ($f1, $f2) = (undef, undef);
my @bad_files;

while (<>) {
    chomp; print STDERR "$_\n";
    if (/^(?:The f|F)iles (\S+) and (\S+)(.*)$/) {
        $f1 = $1; $f2 = $2;
    } elsif (defined $f1 && defined $f2) {
        if (/^(.*)over (?:implementation|interface) (\S+)$/) {
            push (@bad_files, { f1 => $f1, f2 => $f2, interface => $1 });
        }
        $f1 = $f2 = undef;
    } else {
        $f1 = $f2 = undef;
    }
}

foreach my $v (@bad_files) {
    printf "%s %s [%s]\n", $v->{f1}, $v->{f2}, $v->{interface}
}

exit 0;