Stub UrlCombineA and initial implementation of UrlCombineW.
[wine] / tools / winapi_check / winapi_global.pm
1 package winapi_global;
2
3 use strict;
4
5 use nativeapi qw($nativeapi);
6 use options qw($options);
7 use output qw($output);
8 use winapi qw($win16api $win32api @winapis);
9
10 sub check {
11     my $type_found = shift;
12
13     if($options->win16) {
14         _check($win16api, $type_found);
15     }
16
17     if($options->win32) {
18         _check($win32api, $type_found);
19     }
20 }
21
22 sub _check {
23     my $winapi = shift;
24     my $type_found = shift;
25
26     my $winver = $winapi->name;
27
28     if($options->argument) {
29         foreach my $type ($winapi->all_declared_types) {
30             if(!$$type_found{$type} && !$winapi->is_limited_type($type) && $type ne "CONTEXT86 *") {
31                 $output->write("*.c: $winver: ");
32                 $output->write("type ($type) not used\n");
33             }
34         }
35     }
36
37     if($options->argument && $options->argument_forbidden) {
38         my $types_used = $winapi->types_unlimited_used_in_modules;
39
40         foreach my $type (sort(keys(%$types_used))) {
41             $output->write("*.c: type ($type) only used in module[s] (");
42             my $count = 0;
43             foreach my $module (sort(keys(%{$$types_used{$type}}))) {
44                 if($count++) { $output->write(", "); }
45                 $output->write("$module");
46             }
47             $output->write(")\n");
48         }
49     }
50 }
51
52 1;
53