2 # Copyright 1999, 2000, 2001 Patrik Stridvall
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 package winapi_global;
23 use nativeapi qw($nativeapi);
24 use options qw($options);
25 use output qw($output);
26 use winapi qw($win16api $win32api @winapis);
29 my $type_found = shift;
32 _check($win16api, $type_found);
36 _check($win32api, $type_found);
42 my $type_found = shift;
44 my $winver = $winapi->name;
46 if($options->argument) {
47 foreach my $type ($winapi->all_declared_types) {
48 if(!$$type_found{$type} && !$winapi->is_limited_type($type) && $type ne "CONTEXT86 *") {
49 $output->write("*.c: $winver: ");
50 $output->write("type ($type) not used\n");
55 if($options->argument && $options->argument_forbidden) {
56 my $types_used = $winapi->types_unlimited_used_in_modules;
58 foreach my $type (sort(keys(%$types_used))) {
59 $output->write("*.c: type ($type) only used in module[s] (");
61 foreach my $module (sort(keys(%{$$types_used{$type}}))) {
62 if($count++) { $output->write(", "); }
63 $output->write("$module");
65 $output->write(")\n");