-
Notifications
You must be signed in to change notification settings - Fork 4
/
unimplemented.pl
executable file
·42 lines (33 loc) · 1009 Bytes
/
unimplemented.pl
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
#!/usr/bin/perl -w
use warnings;
use strict;
use File::Basename;
my %implemented = ();
chdir(dirname(__FILE__)) or die("failed to chdir to script location: $!\n");
my $dirname = 'native';
opendir(DIRH, $dirname) or die("Failed to opendir '$dirname': $!\n");
while (readdir(DIRH)) {
next if not /\-lx\.h\Z/;
my $module = $_;
my $header = "$dirname/$module";
open(IN, '<', $header) or die("Failed to open '$header' for reading: $!\n");
$module =~ s/\-lx\.h\Z//;
$module =~ tr/a-z/A-Z/;
while (<IN>) {
chomp;
if (/\A\s*LX_NATIVE_EXPORT\d*\(.*?, (\d+)\)/) {
$implemented{"$module\@$1"} = 1;
}
}
close(IN);
}
while (<STDIN>) {
chomp;
if (/\A.*? \((.*?\@\d+)\)/) {
#my $isdef = defined $implemented{$1} ? "yes" : "no"; print("is '$1' defined? $isdef\n");
next if defined $implemented{$1};
}
s/\A(...)32/$1/; # Change "Dos32" or whatnot to just "Dos"
print("$_\n");
}
# end of unimplemented.pl ...