Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a perl script that will filter os2imports.pl.
It filters out APIs that are implemented in 2ine, so you can see just what's missing.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/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 ... | ||
|