dmime: Translate some DMUS_CURVE_PMSG messages to MIDI.
[wine.git] / tools / winapi / winapi_global.pm
blobbb1403c8ca4ab7cb387fa320b6fc0a652e3a92c9
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 package winapi_global;
21 use strict;
22 use warnings 'all';
24 use modules qw($modules);
25 use nativeapi qw($nativeapi);
26 use options qw($options);
27 use output qw($output);
28 use winapi qw(@winapis);
30 sub check_modules($$) {
31 my $complete_module = shift;
32 my $module2functions = shift;
34 my @complete_modules = sort(keys(%$complete_module));
36 if($options->declared) {
37 foreach my $module (@complete_modules) {
38 foreach my $winapi (@winapis) {
39 if(!$winapi->is_module($module)) { next; }
40 my $functions = $$module2functions{$module};
41 foreach my $internal_name ($winapi->all_internal_functions_in_module($module)) {
42 next if $internal_name =~ /\./;
43 my $function = $functions->{$internal_name};
44 if(!defined($function) && !$nativeapi->is_function($internal_name))
46 $output->write("*.c: $module: $internal_name: " .
47 "function declared but not implemented or declared external\n");
54 if($options->argument && $options->argument_forbidden) {
55 foreach my $winapi (@winapis) {
56 my $types_not_used = $winapi->types_not_used;
57 foreach my $module (sort(keys(%$types_not_used))) {
58 if(!$$complete_module{$module}) { next; }
59 foreach my $type (sort(keys(%{$$types_not_used{$module}}))) {
60 $output->write("*.c: $module: type ($type) not used\n");
67 sub check_all_modules($) {
68 my $include2info = shift;
70 winapi_documentation::report_documentation();
72 if($options->headers_unused && $options->include) {
73 foreach my $name (sort(keys(%$include2info))) {
74 if(!$$include2info{$name}{used}) {
75 $output->write("*.c: $name: include file is never used\n");
80 $modules->global_report;
81 $nativeapi->global_report;