1999-09-23 17:14:20 +02:00
|
|
|
package winapi_global;
|
|
|
|
|
|
|
|
use strict;
|
2001-07-24 01:20:56 +02:00
|
|
|
|
|
|
|
use nativeapi qw($nativeapi);
|
|
|
|
use options qw($options);
|
|
|
|
use output qw($output);
|
|
|
|
use winapi qw($win16api $win32api @winapis);
|
|
|
|
|
1999-09-23 17:14:20 +02:00
|
|
|
sub check {
|
2001-07-24 01:20:56 +02:00
|
|
|
my $type_found = shift;
|
|
|
|
|
|
|
|
if($options->win16) {
|
|
|
|
_check($win16api, $type_found);
|
|
|
|
}
|
|
|
|
|
|
|
|
if($options->win32) {
|
|
|
|
_check($win32api, $type_found);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub _check {
|
1999-09-23 17:14:20 +02:00
|
|
|
my $winapi = shift;
|
2001-07-18 22:09:12 +02:00
|
|
|
my $type_found = shift;
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
my $winver = $winapi->name;
|
|
|
|
|
|
|
|
if($options->argument) {
|
|
|
|
foreach my $type ($winapi->all_declared_types) {
|
2001-07-18 22:09:12 +02:00
|
|
|
if(!$$type_found{$type} && !$winapi->is_limited_type($type) && $type ne "CONTEXT86 *") {
|
1999-10-31 03:08:38 +01:00
|
|
|
$output->write("*.c: $winver: ");
|
|
|
|
$output->write("type ($type) not used\n");
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-04-15 22:39:55 +02:00
|
|
|
if($options->argument && $options->argument_forbidden) {
|
2000-01-29 22:01:47 +01:00
|
|
|
my $types_used = $winapi->types_unlimited_used_in_modules;
|
|
|
|
|
|
|
|
foreach my $type (sort(keys(%$types_used))) {
|
|
|
|
$output->write("*.c: type ($type) only used in module[s] (");
|
|
|
|
my $count = 0;
|
|
|
|
foreach my $module (sort(keys(%{$$types_used{$type}}))) {
|
|
|
|
if($count++) { $output->write(", "); }
|
|
|
|
$output->write("$module");
|
|
|
|
}
|
|
|
|
$output->write(")\n");
|
|
|
|
}
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|