Add function prototypes.
Modify function calls so the prototypes are checked.

diff --git a/tools/winapi_check/modules.pm b/tools/winapi_check/modules.pm
index a463f24..6f2b990 100644
--- a/tools/winapi_check/modules.pm
+++ b/tools/winapi_check/modules.pm
@@ -30,18 +30,18 @@
 use vars qw($modules);
 
 use config qw(
-    &file_type &files_skip
-    &file_directory
-    &get_c_files &get_spec_files
+    file_type files_skip
+    file_directory
+    get_c_files get_spec_files
     $current_dir $wine_dir
     $winapi_check_dir
 );
 use options qw($options);
 use output qw($output);
 
-sub import {
+sub import(@) {
     $Exporter::ExportLevel++;
-    &Exporter::import(@_);
+    Exporter::import(@_);
     $Exporter::ExportLevel--;
 
     if (defined($modules)) {
@@ -51,7 +51,7 @@
     $modules = 'modules'->new;
 }
 
-sub get_spec_file_type {
+sub get_spec_file_type($) {
     my $file = shift;
 
     my $module;
@@ -89,19 +89,7 @@
     return ($type, $module);
 }
 
-sub new {
-    my $proto = shift;
-    my $class = ref($proto) || $proto;
-    my $self  = {};
-    bless ($self, $class);
-
-    my $spec_file_found = $self->find_spec_files();
-    $self->read_spec_files($spec_file_found);
-
-    return $self;
-}
-
-sub find_spec_files {
+sub find_spec_files($) {
     my $self = shift;
 
     my $dir2spec_file = \%{$self->{DIR2SPEC_FILE}};
@@ -128,9 +116,9 @@
     return $spec_file_found;
 }
 
-sub read_spec_files {
+sub read_spec_files($$) {
     my $self = shift;
-    
+
     my $spec_file_found = shift;
 
     my $dir2spec_file = \%{$self->{DIR2SPEC_FILE}};
@@ -178,7 +166,19 @@
     }
 }
 
-sub all_modules {
+sub new($) {
+    my $proto = shift;
+    my $class = ref($proto) || $proto;
+    my $self  = {};
+    bless ($self, $class);
+
+    my $spec_file_found = $self->find_spec_files();
+    $self->read_spec_files($spec_file_found);
+
+    return $self;
+}
+
+sub all_modules($) {
     my $self = shift;
 
     my $module2spec_file = \%{$self->{MODULE2SPEC_FILE}};
@@ -186,7 +186,7 @@
     return sort(keys(%$module2spec_file));
 }
 
-sub complete_modules {
+sub complete_modules($$) {
     my $self = shift;
 
     my $c_files = shift;
@@ -224,7 +224,7 @@
     return @complete_modules;
 }
 
-sub is_allowed_module {
+sub is_allowed_module($$) {
     my $self = shift;
 
     my $module2spec_file = \%{$self->{MODULE2SPEC_FILE}};
@@ -234,7 +234,7 @@
     return defined($$module2spec_file{$module});
 }
 
-sub is_allowed_module_in_file {
+sub is_allowed_module_in_file($$$) {
     my $self = shift;
 
     my $dir2spec_file = \%{$self->{DIR2SPEC_FILE}};
@@ -260,7 +260,7 @@
     return 0;
 }
 
-sub allowed_modules_in_file {
+sub allowed_modules_in_file($$) {
     my $self = shift;
 
     my $dir2spec_file = \%{$self->{DIR2SPEC_FILE}};
@@ -283,7 +283,7 @@
     return $module;
 }
 
-sub allowed_dirs_for_module {
+sub allowed_dirs_for_module($$) {
    my $self = shift;
 
    my $module2spec_file = \%{$self->{MODULE2SPEC_FILE}};
@@ -296,7 +296,7 @@
    return sort(keys(%{$$spec_file2dir{$spec_file}}));
 }
 
-sub allowed_spec_files16 {
+sub allowed_spec_files16($) {
     my $self = shift;
 
     my $spec_files16 = \@{$self->{SPEC_FILES16}};
@@ -304,7 +304,7 @@
     return @$spec_files16;
 }
 
-sub allowed_spec_files32 {
+sub allowed_spec_files32($) {
     my $self = shift;
 
     my $spec_files32 = \@{$self->{SPEC_FILES32}};
@@ -312,7 +312,7 @@
     return @$spec_files32;
 }
 
-sub found_module_in_dir {
+sub found_module_in_dir($$$) {
     my $self = shift;
 
     my $module = shift;
@@ -326,7 +326,7 @@
     $$used_module_dirs{$module}{$dir}++;
 }
 
-sub global_report {
+sub global_report($) {
     my $self = shift;
 
     my $dir2spec_file = \%{$self->{DIR2SPEC_FILE}};
diff --git a/tools/winapi_check/nativeapi.pm b/tools/winapi_check/nativeapi.pm
index 5ed262c..198a767 100644
--- a/tools/winapi_check/nativeapi.pm
+++ b/tools/winapi_check/nativeapi.pm
@@ -29,13 +29,13 @@
 
 use vars qw($nativeapi);
 
-use config qw(&file_type $current_dir $wine_dir $winapi_check_dir);
+use config qw(file_type $current_dir $wine_dir $winapi_check_dir);
 use options qw($options);
 use output qw($output);
 
 $nativeapi = 'nativeapi'->new;
 
-sub new {
+sub new($) {
     my $proto = shift;
     my $class = ref($proto) || $proto;
     my $self  = {};
@@ -153,7 +153,7 @@
     return $self;
 }
 
-sub is_function {
+sub is_function($$) {
     my $self = shift;
     my $functions = \%{$self->{FUNCTIONS}};
 
@@ -162,7 +162,7 @@
     return ($$functions{$name} || 0);
 }
 
-sub is_conditional {
+sub is_conditional($$) {
     my $self = shift;
     my $conditionals = \%{$self->{CONDITIONALS}};
 
@@ -171,7 +171,7 @@
     return ($$conditionals{$name} || 0);
 }
 
-sub found_conditional {
+sub found_conditional($$) {
     my $self = shift;
     my $conditional_found = \%{$self->{CONDITIONAL_FOUND}};
 
@@ -180,7 +180,7 @@
     $$conditional_found{$name}++;
 }
 
-sub is_conditional_header {
+sub is_conditional_header($$) {
     my $self = shift;
     my $conditional_headers = \%{$self->{CONDITIONAL_HEADERS}};
 
@@ -189,7 +189,7 @@
     return ($$conditional_headers{$name} || 0);
 }
 
-sub is_conditional_function {
+sub is_conditional_function($$) {
     my $self = shift;
     my $conditional_functions = \%{$self->{CONDITIONAL_FUNCTIONS}};
 
@@ -198,7 +198,7 @@
     return ($$conditional_functions{$name} || 0);
 }
 
-sub global_report {
+sub global_report($) {
     my $self = shift;
 
     my $output = \${$self->{OUTPUT}};
diff --git a/tools/winapi_check/preprocessor.pm b/tools/winapi_check/preprocessor.pm
index d6d1582..72bc34e 100644
--- a/tools/winapi_check/preprocessor.pm
+++ b/tools/winapi_check/preprocessor.pm
@@ -20,7 +20,7 @@
 
 use strict;
 
-sub new {
+sub new($) {
     my $proto = shift;
     my $class = ref($proto) || $proto;
     my $self  = {};
@@ -37,7 +37,7 @@
     return $self;
 }
 
-sub include {
+sub include($$) {
     my $self = shift;
     my $include_found = \${$self->{INCLUDE_FOUND}};
 
@@ -46,7 +46,7 @@
     &$$include_found($argument);
 }
 
-sub define {
+sub define($$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
     my $conditional_found = \${$self->{CONDITIONAL_FOUND}};
@@ -58,7 +58,7 @@
     &$$conditional_found($name);
 }
 
-sub undefine {
+sub undefine($$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
     my $conditional_found = \${$self->{CONDITIONAL_FOUND}};
@@ -70,7 +70,7 @@
     &$$conditional_found($name);
 }
 
-sub begin_if {
+sub begin_if($$$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
     my $stack = \@{$self->{STACK}};
@@ -122,7 +122,7 @@
     }
 }
 
-sub else_if {
+sub else_if($$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
     my $stack = \@{$self->{STACK}};
@@ -136,7 +136,7 @@
     }
 }
 
-sub end_if {
+sub end_if($) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
     my $stack = \@{$self->{STACK}};
@@ -145,7 +145,7 @@
     delete $$state{$macro} if defined($macro);
 }
 
-sub directive {
+sub directive($$$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
     my $stack = \@{$self->{STACK}};
@@ -172,7 +172,7 @@
     }
 }
 
-sub is_def {
+sub is_def($$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
 
@@ -183,7 +183,7 @@
     return defined($status) && $status eq "def";
 }
 
-sub is_undef {
+sub is_undef($$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
 
@@ -194,7 +194,7 @@
     return defined($status) && $status eq "undef";
 }
 
-sub is_unknown {
+sub is_unknown($$) {
     my $self = shift;
     my $state = \%{$self->{STATE}};
 
diff --git a/tools/winapi_check/winapi_c_parser.pm b/tools/winapi_check/winapi_c_parser.pm
index 7548292..197ef3f 100644
--- a/tools/winapi_check/winapi_c_parser.pm
+++ b/tools/winapi_check/winapi_c_parser.pm
@@ -39,7 +39,7 @@
 ########################################################################
 # new
 #
-sub new {
+sub new($$) {
     my $proto = shift;
     my $class = ref($proto) || $proto;
     my $self  = {};
@@ -78,7 +78,7 @@
 ########################################################################
 # set_found_comment_callback
 #
-sub set_found_comment_callback {
+sub set_found_comment_callback($$) {
     my $self = shift;
 
     my $found_comment = \${$self->{FOUND_COMMENT}};
@@ -89,7 +89,7 @@
 ########################################################################
 # set_found_declaration_callback
 #
-sub set_found_declaration_callback {
+sub set_found_declaration_callback($$) {
     my $self = shift;
 
     my $found_declaration = \${$self->{FOUND_DECLARATION}};
@@ -100,7 +100,7 @@
 ########################################################################
 # set_found_function_callback
 #
-sub set_found_function_callback {
+sub set_found_function_callback($$) {
     my $self = shift;
 
     my $found_function = \${$self->{FOUND_FUNCTION}};
@@ -111,7 +111,7 @@
 ########################################################################
 # set_found_function_call_callback
 #
-sub set_found_function_call_callback {
+sub set_found_function_call_callback($$) {
     my $self = shift;
 
     my $found_function_call = \${$self->{FOUND_FUNCTION_CALL}};
@@ -122,7 +122,7 @@
 ########################################################################
 # set_found_line_callback
 #
-sub set_found_line_callback {
+sub set_found_line_callback($$) {
     my $self = shift;
 
     my $found_line = \${$self->{FOUND_LINE}};
@@ -133,7 +133,7 @@
 ########################################################################
 # set_found_preprocessor_callback
 #
-sub set_found_preprocessor_callback {
+sub set_found_preprocessor_callback($$) {
     my $self = shift;
 
     my $found_preprocessor = \${$self->{FOUND_PREPROCESSOR}};
@@ -144,7 +144,7 @@
 ########################################################################
 # set_found_statement_callback
 #
-sub set_found_statement_callback {
+sub set_found_statement_callback($$) {
     my $self = shift;
 
     my $found_statement = \${$self->{FOUND_STATEMENT}};
@@ -155,7 +155,7 @@
 ########################################################################
 # set_found_type_callback
 #
-sub set_found_type_callback {
+sub set_found_type_callback($$) {
     my $self = shift;
 
     my $found_type = \${$self->{FOUND_TYPE}};
@@ -166,7 +166,7 @@
 ########################################################################
 # set_found_variable_callback
 #
-sub set_found_variable_callback {
+sub set_found_variable_callback($$) {
     my $self = shift;
 
     my $found_variable = \${$self->{FOUND_VARIABLE}};
@@ -177,7 +177,7 @@
 ########################################################################
 # parse_c_file
 
-sub parse_c_file {
+sub parse_c_file($$$$) {
     my $self = shift;
 
     my $file = \${$self->{FILE}};
@@ -250,7 +250,7 @@
 	my $type = shift;
     };
 
-    &winapi_parser::parse_c_file($$file, {
+    winapi_parser::parse_c_file($$file, {
 	# c_comment_found => $found_c_comment,
 	# cplusplus_comment_found => $found_cplusplus_comment,
 	function_create => $_create_function,
diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check
index 4be3150..1d4ad96 100755
--- a/tools/winapi_check/winapi_check
+++ b/tools/winapi_check/winapi_check
@@ -35,8 +35,8 @@
 }
 
 use config qw(
-    &files_filter &files_skip
-    &get_h_files
+    files_filter files_skip
+    get_h_files
     $current_dir $wine_dir
 );
 use output qw($output);
@@ -56,7 +56,7 @@
 
 use preprocessor;
 use type;
-use util qw(&is_subset);
+use util qw(is_subset);
 use winapi_documentation;
 use winapi_function;
 use winapi_local;
@@ -242,7 +242,7 @@
 	    my $argument = shift;
 	};
 
-	&winapi_parser::parse_c_file($file, {
+	winapi_parser::parse_c_file($file, {
 	    c_comment_found => $found_c_comment,
 	    cplusplus_comment_found => $found_cplusplus_comment,
 	    function_create => $create_function,
@@ -377,18 +377,18 @@
 	}
 
 	if($options->local && $options->argument && defined($statements)) {
-	    &winapi_local::check_function($function);
+	    winapi_local::check_function($function);
 	}
 
 	if($options->local && $options->statements && defined($statements)) {
-	    &winapi_local::check_statements(\%functions, $function);
+	    winapi_local::check_statements(\%functions, $function);
 	}
 
 	if($options->local && $options->documentation &&
 	   (defined($module16) || defined($module32)) &&
 	   $linkage eq "" && defined($statements))
 	{
-	    &winapi_documentation::check_documentation($function);
+	    winapi_documentation::check_documentation($function);
 	}
 
 	if(1) {
@@ -657,7 +657,7 @@
 	}
     };
 
-    &winapi_parser::parse_c_file($file, {
+    winapi_parser::parse_c_file($file, {
 	c_comment_found => $found_c_comment,
 	cplusplus_comment_found => $found_cplusplus_comment,
 	function_create => $create_function,
@@ -673,13 +673,13 @@
 	}
     }
 
-    &winapi_local::check_file($file, \%functions);
+    winapi_local::check_file($file, \%functions);
 }
 
 if($options->global) {
-    &winapi_global::check_modules(\%complete_module, \%module2functions);
+    winapi_global::check_modules(\%complete_module, \%module2functions);
 
     if($all_modules) {
-	&winapi_global::check_all_modules(\%include2info);
+	winapi_global::check_all_modules(\%include2info);
     }
 }
diff --git a/tools/winapi_check/winapi_documentation.pm b/tools/winapi_check/winapi_documentation.pm
index 0e30135..80e9e7f 100644
--- a/tools/winapi_check/winapi_documentation.pm
+++ b/tools/winapi_check/winapi_documentation.pm
@@ -31,7 +31,7 @@
 my %comment_indent;
 my %comment_spacing;
 
-sub check_documentation {
+sub check_documentation($) {
     local $_;
 
     my $function = shift;
@@ -137,7 +137,7 @@
 		} elsif ($ordinal eq "init") {
 		    $ordinal = 0;
 		} else {
-		    $output->write("documentation: $external_name (\U$module\E.$ordinal) wrong\n");
+		    $output->write("documentation: $external_name (\U$module\E.$ordinal) wrong1\n");
 		    next;
 		}
 
@@ -165,7 +165,7 @@
 		}
 
 		if (!$found && $external_name ne "DllMain" && $ordinal !~ /^0$/) {
-		    $output->write("documentation: $external_name (\U$module\E.$ordinal) wrong\n");
+		    $output->write("documentation: $external_name (\U$module\E.$ordinal) wrong2\n");
 		}
 	    }
 	}
@@ -220,7 +220,7 @@
     }
 }
 
-sub report_documentation {
+sub report_documentation() {
     if($options->documentation_comment_indent) {
 	foreach my $indent (sort(keys(%comment_indent))) {
 	    my $count = $comment_indent{$indent};
diff --git a/tools/winapi_check/winapi_function.pm b/tools/winapi_check/winapi_function.pm
index fe0c45d..6b4065e 100644
--- a/tools/winapi_check/winapi_function.pm
+++ b/tools/winapi_check/winapi_function.pm
@@ -22,7 +22,7 @@
 use strict;
 
 use config qw($current_dir $wine_dir);
-use util qw(&normalize_set);
+use util qw(normalize_set);
 
 my $import = 0;
 use vars qw($modules $win16api $win32api @winapis);
@@ -31,7 +31,7 @@
 # constructor
 #
 
-sub new {
+sub new($) {
     my $proto = shift;
     my $class = ref($proto) || $proto;
     my $self  = {};
@@ -53,14 +53,14 @@
 # is_win
 #
 
-sub is_win16 { my $self = shift; return defined($self->_module($win16api, @_)); }
-sub is_win32 { my $self = shift; return defined($self->_module($win32api, @_)); }
+sub is_win16($) { my $self = shift; return defined($self->_module($win16api, @_)); }
+sub is_win32($) { my $self = shift; return defined($self->_module($win32api, @_)); }
 
 ########################################################################
 # external_name
 #
 
-sub _external_name {
+sub _external_name($$) {
     my $self = shift;
     my $winapi = shift;
 
@@ -89,7 +89,7 @@
     return join(" & ", @external_names2);
 }
 
-sub _external_names {
+sub _external_names($$) {
     my $self = shift;
     my $winapi = shift;
 
@@ -102,7 +102,7 @@
     }
 }
 
-sub external_name {
+sub external_name($) {
     my $self = shift;
 
     foreach my $winapi (@winapis) {
@@ -116,19 +116,19 @@
     return undef;
 }
 
-sub external_name16 { my $self = shift; return $self->_external_name($win16api, @_); }
-sub external_name32 { my $self = shift; return $self->_external_name($win32api, @_); }
+sub external_name16($) { my $self = shift; return $self->_external_name($win16api, @_); }
+sub external_name32($) { my $self = shift; return $self->_external_name($win32api, @_); }
 
-sub external_names16 { my $self = shift; return $self->_external_names($win16api, @_); }
-sub external_names32 { my $self = shift; return $self->_external_names($win32api, @_); }
+sub external_names16($) { my $self = shift; return $self->_external_names($win16api, @_); }
+sub external_names32($) { my $self = shift; return $self->_external_names($win32api, @_); }
 
-sub external_names { my $self = shift; return ($self->external_names16, $self->external_names32); }
+sub external_names($) { my $self = shift; return ($self->external_names16, $self->external_names32); }
 
 ########################################################################
 # module
 #
 
-sub _module {
+sub _module($$) {
     my $self = shift;
     my $winapi = shift;
 
@@ -154,7 +154,7 @@
     return join(" & ", @modules);
 }
 
-sub _modules {
+sub _modules($$) {
     my $self = shift;
     my $winapi = shift;
 
@@ -167,21 +167,21 @@
     }
 }
 
-sub module16 { my $self = shift; return $self->_module($win16api, @_); }
-sub module32 { my $self = shift; return $self->_module($win32api, @_); }
+sub module16($) { my $self = shift; return $self->_module($win16api, @_); }
+sub module32($) { my $self = shift; return $self->_module($win32api, @_); }
 
-sub module { my $self = shift; return join (" & ", $self->modules); }
+sub module($) { my $self = shift; return join (" & ", $self->modules); }
 
-sub modules16 { my $self = shift; return $self->_modules($win16api, @_); }
-sub modules32 { my $self = shift; return $self->_modules($win32api, @_); }
+sub modules16($) { my $self = shift; return $self->_modules($win16api, @_); }
+sub modules32($) { my $self = shift; return $self->_modules($win32api, @_); }
 
-sub modules { my $self = shift; return ($self->modules16, $self->modules32); }
+sub modules($) { my $self = shift; return ($self->modules16, $self->modules32); }
 
 ########################################################################
 # ordinal
 #
 
-sub _ordinal {
+sub _ordinal($$) {
     my $self = shift;
     my $winapi = shift;
 
@@ -210,7 +210,7 @@
     return join(" & ", @ordinals2);
 }
 
-sub _ordinals {
+sub _ordinals($$) {
     my $self = shift;
     my $winapi = shift;
 
@@ -223,21 +223,21 @@
     }
 }
 
-sub ordinal16 { my $self = shift; return $self->_ordinal($win16api, @_); }
-sub ordinal32 { my $self = shift; return $self->_ordinal($win32api, @_); }
+sub ordinal16($) { my $self = shift; return $self->_ordinal($win16api, @_); }
+sub ordinal32($) { my $self = shift; return $self->_ordinal($win32api, @_); }
 
-sub ordinal { my $self = shift; return join (" & ", $self->ordinals); }
+sub ordinal($) { my $self = shift; return join (" & ", $self->ordinals); }
 
-sub ordinals16 { my $self = shift; return $self->_ordinals($win16api, @_); }
-sub ordinals32 { my $self = shift; return $self->_ordinals($win32api, @_); }
+sub ordinals16($) { my $self = shift; return $self->_ordinals($win16api, @_); }
+sub ordinals32($) { my $self = shift; return $self->_ordinals($win32api, @_); }
 
-sub ordinals { my $self = shift; return ($self->ordinals16, $self->ordinals32); }
+sub ordinals($) { my $self = shift; return ($self->ordinals16, $self->ordinals32); }
 
 ########################################################################
 # prefix
 #
 
-sub prefix {
+sub prefix($) {
     my $self = shift;
     my $module16 = $self->module16;
     my $module32 = $self->module32;
@@ -288,7 +288,7 @@
 # calling_convention
 #
 
-sub calling_convention16 {
+sub calling_convention16($) {
     my $self = shift;
     my $return_kind16 = $self->return_kind16;
 
@@ -319,7 +319,7 @@
     }
 }
 
-sub calling_convention32 {
+sub calling_convention32($) {
     my $self = shift;
 
     local $_ = $self->calling_convention;
@@ -336,28 +336,28 @@
     }
 }
 
-sub get_all_module_ordinal16 {
+sub get_all_module_ordinal16($) {
     my $self = shift;
     my $internal_name = $self->internal_name;
 
     return winapi::get_all_module_internal_ordinal16($internal_name);
 }
 
-sub get_all_module_ordinal32 {
+sub get_all_module_ordinal32($) {
     my $self = shift;
     my $internal_name = $self->internal_name;
 
     return winapi::get_all_module_internal_ordinal32($internal_name);
 }
 
-sub get_all_module_ordinal {
+sub get_all_module_ordinal($) {
     my $self = shift;
     my $internal_name = $self->internal_name;
 
     return winapi::get_all_module_internal_ordinal($internal_name);
 }
 
-sub _return_kind {
+sub _return_kind($$) {
     my $self = shift;
     my $winapi = shift;
     my $return_type = $self->return_type;
@@ -365,15 +365,15 @@
     return $winapi->translate_argument($return_type);
 }
 
-sub return_kind16 {
+sub return_kind16($) {
     my $self = shift; return $self->_return_kind($win16api, @_);
 }
 
-sub return_kind32 {
+sub return_kind32($) {
     my $self = shift; return $self->_return_kind($win32api, @_);
 }
 
-sub _argument_kinds {
+sub _argument_kinds($$) {
     my $self = shift;
     my $winapi = shift;
     my $refargument_types = $self->argument_types;
@@ -396,11 +396,11 @@
     return [@argument_kinds];
 }
 
-sub argument_kinds16 {
+sub argument_kinds16($) {
     my $self = shift; return $self->_argument_kinds($win16api, @_);
 }
 
-sub argument_kinds32 {
+sub argument_kinds32($) {
     my $self = shift; return $self->_argument_kinds($win32api, @_);
 }
 
@@ -408,7 +408,7 @@
 # Accounting
 #
 
-sub function_called {
+sub function_called($$) {
     my $self = shift;
     my $called_function_names = \%{$self->{CALLED_FUNCTION_NAMES}};
 
@@ -417,7 +417,7 @@
     $$called_function_names{$name}++;
 }
 
-sub function_called_by {
+sub function_called_by($$) {
    my $self = shift;
    my $called_by_function_names = \%{$self->{CALLED_BY_FUNCTION_NAMES}};
 
@@ -426,14 +426,14 @@
    $$called_by_function_names{$name}++;
 }
 
-sub called_function_names {
+sub called_function_names($) {
     my $self = shift;
     my $called_function_names = \%{$self->{CALLED_FUNCTION_NAMES}};
 
     return sort(keys(%$called_function_names));
 }
 
-sub called_by_function_names {
+sub called_by_function_names($) {
     my $self = shift;
     my $called_by_function_names = \%{$self->{CALLED_BY_FUNCTION_NAMES}};
 
diff --git a/tools/winapi_check/winapi_global.pm b/tools/winapi_check/winapi_global.pm
index bb6314c..1986063 100644
--- a/tools/winapi_check/winapi_global.pm
+++ b/tools/winapi_check/winapi_global.pm
@@ -26,7 +26,7 @@
 use output qw($output);
 use winapi qw(@winapis);
 
-sub check_modules {
+sub check_modules($$) {
     my $complete_module = shift;
     my $module2functions = shift;
 
@@ -67,11 +67,11 @@
     }
 }
 
-sub check_all_modules {
+sub check_all_modules($) {
     my $include2info = shift;
 
-    &winapi_documentation::report_documentation;
-    
+    winapi_documentation::report_documentation();
+
     if($options->headers_unused && $options->include) {
 	foreach my $name (sort(keys(%$include2info))) {
 	    if(!$$include2info{$name}{used}) {
diff --git a/tools/winapi_check/winapi_local.pm b/tools/winapi_check/winapi_local.pm
index 476da5c..7329992 100644
--- a/tools/winapi_check/winapi_local.pm
+++ b/tools/winapi_check/winapi_local.pm
@@ -25,7 +25,7 @@
 use output qw($output);
 use winapi qw($win16api $win32api @winapis);
 
-sub check_function {
+sub check_function($) {
     my $function = shift;
 
     my $return_type = $function->return_type;
@@ -58,7 +58,7 @@
     }
 }
 
-sub _check_function {
+sub _check_function($$$$$$) {
     my $return_type = shift;
     my $calling_convention = shift;
     my $external_name = shift;
@@ -289,7 +289,7 @@
     }
 }
 
-sub check_statements {
+sub check_statements($$) {
     my $functions = shift;
     my $function = shift;
 
@@ -305,7 +305,7 @@
     }
 }
 
-sub _check_statements {
+sub _check_statements($$$) {
     my $winapi = shift;
     my $functions = shift;
     my $function = shift;
@@ -384,7 +384,7 @@
     }
 }
 
-sub check_file {
+sub check_file($$) {
     my $file = shift;
     my $functions = shift;
 
diff --git a/tools/winapi_check/winapi_parser.pm b/tools/winapi_check/winapi_parser.pm
index 412328d..3800076 100644
--- a/tools/winapi_check/winapi_parser.pm
+++ b/tools/winapi_check/winapi_parser.pm
@@ -23,7 +23,7 @@
 use output qw($output);
 use options qw($options);
 
-sub parse_c_file {
+sub parse_c_file($$) {
     my $file = shift;
     my $callbacks = shift;