Removed some more trailing whitespace.

diff --git a/tools/winapi_check/modules.pm b/tools/winapi_check/modules.pm
index 9a2790e..42c02cf 100644
--- a/tools/winapi_check/modules.pm
+++ b/tools/winapi_check/modules.pm
@@ -32,7 +32,7 @@
 use config qw(
     &file_type &files_skip
     &file_directory
-    &get_c_files &get_spec_files 
+    &get_c_files &get_spec_files
     $current_dir $wine_dir
     $winapi_check_dir
 );
@@ -106,7 +106,7 @@
 
 	    if(!-f "$wine_dir/$spec_file") {
 		$output->write("modules.dat: $spec_file: file ($spec_file) doesn't exist or is no file\n");
-	    } 
+	    }
 
 	    $spec_file_found{$spec_file}++;
 	    $$spec_file2dir{$spec_file} = {};
@@ -119,7 +119,7 @@
 
 	if(!-d "$wine_dir/$allowed_dir") {
 	    $output->write("modules.dat: $spec_file: directory ($allowed_dir) doesn't exist or is no directory\n");
-	} 
+	}
     }
     close(IN);
 
@@ -202,7 +202,7 @@
 	my $index = -1;
 	my @dirs = $self->allowed_dirs_for_module($module);
 	foreach my $dir (@dirs) {
-	    if(exists($dirs{$dir}) && $dirs{$dir} == 0) { 
+	    if(exists($dirs{$dir}) && $dirs{$dir} == 0) {
 		$index++;
 	    }
 	}
@@ -277,7 +277,7 @@
    my $self = shift;
 
    my $module2spec_file = \%{$self->{MODULE2SPEC_FILE}};
-   my $spec_file2dir = \%{$self->{SPEC_FILE2DIR}};   
+   my $spec_file2dir = \%{$self->{SPEC_FILE2DIR}};
 
    my $module = shift;
 
diff --git a/tools/winapi_check/nativeapi.pm b/tools/winapi_check/nativeapi.pm
index 482f0fc..621604d 100644
--- a/tools/winapi_check/nativeapi.pm
+++ b/tools/winapi_check/nativeapi.pm
@@ -61,7 +61,7 @@
     while(<IN>) {
 	s/^\s*(.*?)\s*$/$1/; # remove whitespace at begin and end of line
 	s/^(.*?)\s*#.*$/$1/; # remove comments
-	/^$/ && next;        # skip empty lines   
+	/^$/ && next;        # skip empty lines
 
 	$$functions{$_}++;
     }
@@ -70,7 +70,7 @@
     $output->progress("$configure_ac_file");
 
     my $again = 0;
-    open(IN, "< $configure_ac_file");   
+    open(IN, "< $configure_ac_file");
     local $/ = "\n";
     while($again || (defined($_ = <IN>))) {
 	$again = 0;
diff --git a/tools/winapi_check/preprocessor.pm b/tools/winapi_check/preprocessor.pm
index a3086a9..6689214 100644
--- a/tools/winapi_check/preprocessor.pm
+++ b/tools/winapi_check/preprocessor.pm
@@ -30,7 +30,7 @@
     my $stack = \@{$self->{STACK}};
     my $include_found = \${$self->{INCLUDE_FOUND}};
     my $conditional_found = \${$self->{CONDITIONAL_FOUND}};
-  
+
     $$include_found = shift;
     $$conditional_found = shift;
 
@@ -162,7 +162,7 @@
     my $state = \%{$self->{STATE}};
 
     my $name = shift;
-    
+
     my $status = $$state{$name};
 
     return defined($status) && $status eq "def";
@@ -173,7 +173,7 @@
     my $state = \%{$self->{STATE}};
 
     my $name = shift;
-    
+
     my $status = $$state{$name};
 
     return defined($status) && $status eq "undef";
@@ -184,7 +184,7 @@
     my $state = \%{$self->{STATE}};
 
     my $name = shift;
-    
+
     my $status = $$state{$name};
 
     return !defined($status);
diff --git a/tools/winapi_check/winapi.pm b/tools/winapi_check/winapi.pm
index 207b5b7..3209344 100644
--- a/tools/winapi_check/winapi.pm
+++ b/tools/winapi_check/winapi.pm
@@ -83,8 +83,8 @@
 	if($modules->is_allowed_module($module)) {
 	    $self->parse_api_file($file,$module);
 	}
-    }   
-	
+    }
+
     foreach my $forward_name (sort(keys(%$function_forward))) {
 	$$function_forward{$forward_name} =~ /^(\S*):(\S*)\.(\S*)$/;
 	(my $from_module, my $to_module, my $external_name) = ($1, $2, $3);
@@ -197,7 +197,7 @@
 	    } else {
 		$$translate_argument{$type} = $kind;
 	    }
-		
+
 	    $$type_format{$module}{$type} = $format;
 	} else {
 	    $output->write("$file: file must begin with %<type> statement\n");
@@ -251,7 +251,7 @@
 	    if(/^type\s*(\w+)/) { $type = $1; }
 	    if(/^\d+|@/) { $header = 0; $lookahead = 1; }
 	    next;
-	} 
+	}
 
 	my $ordinal;
 	if(/^(\d+|@)\s+
@@ -405,7 +405,7 @@
 		$lookahead = 1;
 	    }
 	}
-	
+
 	if(defined($ordinal)) {
 	    if($ordinal ne "@" && $ordinals{$ordinal}) {
 		$output->write("$file: ordinal redefined: $_\n");
@@ -580,11 +580,11 @@
     if(defined($module) && defined($type)) {
 	local $_;
 	foreach (split(/ & /, $module)) {
-	    if(defined($formats)) { 
-		$formats .= "|"; 
+	    if(defined($formats)) {
+		$formats .= "|";
 	    } else {
 		$formats = "";
-	    }	    
+	    }
 	    if(defined($$type_format{$_}{$type})) {
 		$formats .= $$type_format{$_}{$type};
 	    }
@@ -885,7 +885,7 @@
     my $ordinal;
     while(defined($name = shift @name) &&
 	  defined($module = shift @module) &&
-	  defined($ordinal = shift @ordinal)) 
+	  defined($ordinal = shift @ordinal))
     {
 	push @entries, [$name, $module, $ordinal];
     }
@@ -936,17 +936,17 @@
 	    @ordinal = split(/ & /, $ordinal);
 	}
     }
-    
+
     my $name;
     my $module;
     my $ordinal;
     while(defined($name = shift @name) &&
 	  defined($module = shift @module) &&
-	  defined($ordinal = shift @ordinal)) 
+	  defined($ordinal = shift @ordinal))
     {
 	push @entries, [$name, $module, $ordinal];
     }
- 
+
     return @entries;
 }
 
diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check
index 154e2d4..3ec273d 100755
--- a/tools/winapi_check/winapi_check
+++ b/tools/winapi_check/winapi_check
@@ -20,7 +20,7 @@
 # Note that winapi_check are using heuristics quite heavily.
 # So always remember that:
 #
-# "Heuristics are bug ridden by definition. 
+# "Heuristics are bug ridden by definition.
 #  If they didn't have bugs, then they'd be algorithms."
 #
 # In other words, reported bugs are only potential bugs not
@@ -64,11 +64,11 @@
 my %declared_functions;
 
 my %include2info;
-{   
+{
     my @files = get_h_files("winelib");
 
     my $progress_current = 0;
-    my $progress_max = scalar(@files);   
+    my $progress_max = scalar(@files);
 
     foreach my $file (@files) {
 	$progress_current++;
@@ -107,7 +107,7 @@
                   "storage.h", "ver.h");
     foreach my $file2 (@files2) {
 	$include2info{"include/$file2"}{used}++;
-    }    
+    }
 }
 
 my @c_files = $options->c_files;
@@ -122,7 +122,7 @@
 my %complete_module;
 if($options->global) {
     my @complete_modules = $modules->complete_modules(\@c_files);
-    
+
     foreach my $module (@complete_modules) {
 	$complete_module{$module}++;
     }
@@ -146,7 +146,7 @@
 
     foreach my $file (@h_files) {
 	my %functions;
-	
+
 	$progress_current++;
 	$output->progress("$file: file $progress_current of $progress_max");
 
@@ -163,11 +163,11 @@
 		}
 	    }
 	};
-	
+
 	my $found_cplusplus_comment = sub {
 	    my $line = shift;
 	    my $comment = shift;
-	    
+
 	    if($options->comments_cplusplus) {
 		$output->write("$file:$line: C++ comments not allowed: $comment\n");
 	    }
@@ -199,7 +199,7 @@
 	    }
 
 	    if(defined($external_name) && !defined($statements) &&
-	       ($linkage eq "" || $linkage eq "extern")) 
+	       ($linkage eq "" || $linkage eq "extern"))
 	    {
 		my $previous_function = $declared_functions{$internal_name};
 		if(!defined($previous_function)) {
@@ -231,10 +231,10 @@
 	&winapi_parser::parse_c_file($file, {
 	    c_comment_found => $found_c_comment,
 	    cplusplus_comment_found => $found_cplusplus_comment,
-	    function_create => $create_function, 
-	    function_found => $found_function, 
-	    type_create => $create_type, 
-	    type_found => $found_type, 
+	    function_create => $create_function,
+	    function_found => $found_function,
+	    type_create => $create_type,
+	    type_found => $found_type,
 	    preprocessor_found => $found_preprocessor
 	});
     }
@@ -273,12 +273,12 @@
 	    }
 	}
     };
-    
+
     my $found_cplusplus_comment = sub {
 	my $line = shift;
 	my $comment = shift;
 
-	if($options->comments_cplusplus) {	
+	if($options->comments_cplusplus) {
 	    $output->write("$file:$line: C++ comments not allowed: $comment\n");
 	}
     };
@@ -286,7 +286,7 @@
     my $create_function = sub {
 	return 'winapi_function'->new;
     };
-   
+
     my $found_function = sub {
 	my $function = shift;
 
@@ -312,8 +312,8 @@
 	my $external_name16 = $function->external_name16;
 	my $external_name32 = $function->external_name32;
 
-	if(defined($external_name) && !defined($statements) && 
-	   ($linkage eq "" || $linkage eq "extern")) 
+	if(defined($external_name) && !defined($statements) &&
+	   ($linkage eq "" || $linkage eq "extern"))
 	{
 	    my $previous_function = $declared_functions{$internal_name};
 	    if(!defined($previous_function)) {
@@ -350,15 +350,15 @@
 	}
 
 	if($options->shared) {
-	    if($win16api->is_shared_internal_function($internal_name) || 
-	       $win32api->is_shared_internal_function($internal_name)) 
+	    if($win16api->is_shared_internal_function($internal_name) ||
+	       $win32api->is_shared_internal_function($internal_name))
 	    {
 		$output->write("is shared between Win16 and Win32\n");
 	    }
 	}
 
-	if($options->headers && $options->headers_needed && 
-	   defined($declared_function) && defined($external_name) && 
+	if($options->headers && $options->headers_needed &&
+	   defined($declared_function) && defined($external_name) &&
 	   defined($statements))
 	{
 	    my $needed_include = $declared_function->file;
@@ -375,11 +375,11 @@
 	if($options->local && $options->argument && defined($statements)) {
 	    &winapi_local::check_function($function);
 	}
-	
+
 	if($options->local && $options->statements && defined($statements)) {
 	    &winapi_local::check_statements(\%functions, $function);
 	}
-	
+
 	if($options->local && $options->documentation &&
 	   (defined($module16) || defined($module32)) &&
 	   $linkage eq "" && defined($statements))
@@ -392,14 +392,14 @@
 	    if(defined($external_name16)) {
 		$external_name16 = (split(/\s*&\s*/, $external_name16))[0];
 	    }
-	    
+
 	    # FIXME: Not correct
 	    if(defined($external_name32)) {
 		$external_name32 = (split(/\s*&\s*/, $external_name32))[0];
 	    }
 
 	    if($options->local && $options->misplaced &&
-	       $linkage ne "extern" && defined($statements)) 
+	       $linkage ne "extern" && defined($statements))
 	    {
 		if($options->win16 && $options->report_module($module16))
 		{
@@ -432,7 +432,7 @@
 
 	    if($options->local && $options->headers && $options->prototype) {
 		if($options->win16 && $options->report_module($module16)) {
-		    if(!$nativeapi->is_function($internal_name) && 
+		    if(!$nativeapi->is_function($internal_name) &&
 		       !defined($declared_functions{$internal_name}))
 		    {
 			$output->write("no prototype\n");
@@ -444,7 +444,7 @@
 		    {
 			if(!defined($external_name32) || ($external_name32 !~ /^Dll(?:
 			   Install|CanUnloadNow|GetClassObject|GetVersion|
-			   RegisterServer|RegisterServerEx|UnregisterServer)|DriverProc$/x && 
+			   RegisterServer|RegisterServerEx|UnregisterServer)|DriverProc$/x &&
 			   $internal_name !~ /^COMCTL32_Str/ &&
 			   $internal_name !~ /^(?:\Q$module32\E|wine)_(?:\Q$external_name32\E|\d+)$/))
 			{
@@ -489,7 +489,7 @@
     my $create_type = sub {
 	return 'type'->new;
     };
-    
+
     my $found_type = sub {
 	my $type = shift;
     };
@@ -558,17 +558,17 @@
 		    my $macro = uc($header);
 		    $macro =~ y/\.\//__/;
 		    $macro = "HAVE_" . $macro;
-		    
-		    if($nativeapi->is_conditional_header($header)) { 
+
+		    if($nativeapi->is_conditional_header($header)) {
 			if(!$preprocessor->is_def($macro)) {
 			    if($macro =~ /^HAVE_X11/) {
 				# Do nothing X Windows is handled differently
 			    } elsif($macro =~ /^HAVE_(.*?)_H$/) {
 				my $name = $1;
-				if($header !~ /^alloca\.h|sys\/time\.h|unistd\.h$/ && 
-				   !$preprocessor->is_def("STATFS_DEFINED_BY_$name")) 
+				if($header !~ /^alloca\.h|sys\/time\.h|unistd\.h$/ &&
+				   !$preprocessor->is_def("STATFS_DEFINED_BY_$name"))
 				{
-				    $output->write("$file: #$directive $argument: is a conditional include, " . 
+				    $output->write("$file: #$directive $argument: is a conditional include, " .
 						   "but is not protected\n");
 				}
 			    }
@@ -625,10 +625,10 @@
     &winapi_parser::parse_c_file($file, {
 	c_comment_found => $found_c_comment,
 	cplusplus_comment_found => $found_cplusplus_comment,
-	function_create => $create_function, 
-	function_found => $found_function, 
-	type_create => $create_type, 
-	type_found => $found_type, 
+	function_create => $create_function,
+	function_found => $found_function,
+	type_create => $create_type,
+	type_found => $found_type,
 	preprocessor_found => $found_preprocessor
     });
 
@@ -678,7 +678,7 @@
 
     if($all_modules) {
 	&winapi_documentation::report_documentation;
-	
+
 	if($options->headers_unused) {
 	    foreach my $name (sort(keys(%include2info))) {
 		if(!$include2info{$name}{used}) {
@@ -688,11 +688,10 @@
 		}
 	    }
 	}
-	
+
 	&winapi_global::check(\%type_found);
 
 	$modules->global_report;
 	$nativeapi->global_report;
     }
 }
-
diff --git a/tools/winapi_check/winapi_documentation.pm b/tools/winapi_check/winapi_documentation.pm
index 13b94b2..837ff9f 100644
--- a/tools/winapi_check/winapi_documentation.pm
+++ b/tools/winapi_check/winapi_documentation.pm
@@ -49,9 +49,9 @@
 
     my $documentation_error = 0;
     my $documentation_warning = 0;
-    if($options->documentation_name || 
+    if($options->documentation_name ||
        $options->documentation_ordinal ||
-       $options->documentation_pedantic) 
+       $options->documentation_pedantic)
     {
 	my @winapis = ($win16api, $win32api);
 	my @modules = ($module16, $module32);
@@ -70,9 +70,9 @@
 	    my @ordinals = split(/\s*\&\s*/, $ordinal);
 
 	    my $pedantic_failed = 0;
-	    while(defined(my $external_name = shift @external_name) && 
-		  defined(my $module = shift @modules) && 
-		  defined(my $ordinal = shift @ordinals)) 
+	    while(defined(my $external_name = shift @external_name) &&
+		  defined(my $module = shift @modules) &&
+		  defined(my $ordinal = shift @ordinals))
 	    {
 		my $found_name = 0;
 		my $found_ordinal = 0;
@@ -82,7 +82,7 @@
 			my $module2 = $6;
 			my $ordinal2 = $7;
 
-			if(length($1) != 1 || length($2) < 1 || 
+			if(length($1) != 1 || length($2) < 1 ||
 			   length($4) < 1 || $5 ne "(" || $8 ne ")")
 			{
 			    $pedantic_failed = 1;
@@ -98,13 +98,13 @@
 			}
 		    }
 		}
-		if(($options->documentation_name && !$found_name) || 
+		if(($options->documentation_name && !$found_name) ||
 		   ($options->documentation_ordinal && !$found_ordinal))
 		{
 		    $documentation_error = 1;
 		    $output->write("documentation: expected $external_name (\U$module\E.$ordinal): \\\n$documentation\n");
 		}
-		
+
 	    }
 	    if($options->documentation_pedantic && $pedantic_failed) {
 		$documentation_warning = 1;
@@ -147,13 +147,13 @@
 	    if(/^\s*\*(\s*)\S+(\s*)[\(\[]\s*\w+\s*\.\s*[^\s\)\]]*\s*[\)\]].*?$/) {
 		my $indent = $1;
 		my $spacing = $2;
-		
+
 		$indent =~ s/\t/        /g;
 		$indent = length($indent);
-		
+
 		$spacing =~ s/\t/        /g;
 		$spacing = length($spacing);
-		
+
 		$comment_indent{$indent}++;
 		if($indent >= 20) {
 		    $output->write("documentation: comment indent is $indent\n");
diff --git a/tools/winapi_check/winapi_function.pm b/tools/winapi_check/winapi_function.pm
index f020806..96da183 100644
--- a/tools/winapi_check/winapi_function.pm
+++ b/tools/winapi_check/winapi_function.pm
@@ -66,7 +66,7 @@
 
     my @external_names = split(/\s*&\s*/, $external_name);
     my @modules = split(/\s*&\s*/, $module);
-    
+
     my @external_names2;
     while(defined(my $external_name = shift @external_names) &&
 	  defined(my $module = shift @modules))
@@ -84,7 +84,7 @@
     my $winapi = shift;
 
     my $external_name = $self->_external_name($winapi);
-    
+
     if(defined($external_name)) {
 	return split(/\s*&\s*/, $external_name);
     } else {
@@ -92,7 +92,7 @@
     }
 }
 
-sub external_name { 
+sub external_name {
     my $self = shift;
 
     foreach my $winapi (@winapis) {
@@ -145,7 +145,7 @@
     my $winapi = shift;
 
     my $module = $self->_module($winapi);
-    
+
     if(defined($module)) {
 	return split(/\s*&\s*/, $module);
     } else {
@@ -183,7 +183,7 @@
 
     my @ordinals = split(/\s*&\s*/, $ordinal);
     my @modules = split(/\s*&\s*/, $module);
-    
+
     my @ordinals2;
     while(defined(my $ordinal = shift @ordinals) &&
 	  defined(my $module = shift @modules))
@@ -201,7 +201,7 @@
     my $winapi = shift;
 
     my $ordinal = $self->_ordinal($winapi);
-    
+
     if(defined($ordinal)) {
 	return split(/\s*&\s*/, $ordinal);
     } else {
@@ -359,7 +359,7 @@
     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;
@@ -394,7 +394,7 @@
 # Accounting
 #
 
-sub function_called {    
+sub function_called {
     my $self = shift;
     my $called_function_names = \%{$self->{CALLED_FUNCTION_NAMES}};
 
@@ -403,7 +403,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}};
 
@@ -412,14 +412,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_local.pm b/tools/winapi_check/winapi_local.pm
index 3429fc8..b5cd44c 100644
--- a/tools/winapi_check/winapi_local.pm
+++ b/tools/winapi_check/winapi_local.pm
@@ -44,15 +44,15 @@
     }
 
     if($options->win16 && $options->report_module($module16)) {
-	_check_function($return_type, 
-			$calling_convention, $external_name16, 
+	_check_function($return_type,
+			$calling_convention, $external_name16,
 			$internal_name, $refargument_types,
 			$win16api);
     }
 
     if($options->win32 && $options->report_module($module32)) {
-	_check_function($return_type, 
-			$calling_convention, $external_name32, 
+	_check_function($return_type,
+			$calling_convention, $external_name32,
 			$internal_name, $refargument_types,
 			$win32api);
     }
@@ -68,7 +68,7 @@
     my $winapi = shift;
 
     my $module = $winapi->function_internal_module($internal_name);
-       
+
     if($winapi->name eq "win16") {
 	if($winapi->is_function_stub_in_module($module, $internal_name)) {
 	    if($options->implemented) {
@@ -97,7 +97,7 @@
 	    $output->write("no translation defined: " . $return_type . "\n");
 	}
     } elsif(!$winapi->is_allowed_kind($implemented_return_kind) ||
-	    !$winapi->is_allowed_type_in_module($return_type, $module)) 
+	    !$winapi->is_allowed_type_in_module($return_type, $module))
     {
 	$forbidden_return_type = 1;
 	$winapi->allow_kind($implemented_return_kind);
@@ -106,7 +106,7 @@
 	    $output->write("return type is forbidden: $return_type ($implemented_return_kind)\n");
 	}
     }
-    
+
     my $segmented = 0;
     if(defined($implemented_return_kind) && $implemented_return_kind =~ /^segptr|segstr$/) {
 	$segmented = 1;
@@ -183,7 +183,7 @@
     {
 	$#argument_types--;
     }
-    
+
     if($internal_name =~ /^NTDLL__ftol|NTDLL__CIpow$/) { # FIXME: Kludge
 	# ignore
     } else {
@@ -198,7 +198,7 @@
 		$winapi->declare_argument($type, "unknown");
 		$output->write("no translation defined: " . $type . "\n");
 	    } elsif(!$winapi->is_allowed_kind($kind) ||
-		    !$winapi->is_allowed_type_in_module($type, $module)) 
+		    !$winapi->is_allowed_type_in_module($type, $module))
 	    {
 		$winapi->allow_kind($kind);
 		$winapi->allow_type_in_module($type, $module);
@@ -234,7 +234,7 @@
 	    if($argument_kinds[$n] eq "context86") {
 		# Nothing
 	    } elsif(!$winapi->is_allowed_kind($argument_kinds[$n]) ||
-	       !$winapi->is_allowed_type_in_module($argument_types[$n], $module)) 
+	       !$winapi->is_allowed_type_in_module($argument_types[$n], $module))
 	    {
 		$winapi->allow_kind($argument_kinds[$n]);
 		$winapi->allow_type_in_module($argument_types[$n],, $module);
@@ -247,7 +247,7 @@
 		   $options->report_argument_kind($declared_argument_kinds[$n]))
 		{
 		    $output->write("argument " . ($n + 1) . " type mismatch: " .
-			     $argument_types[$n] . " ($argument_kinds[$n]) != " . 
+			     $argument_types[$n] . " ($argument_kinds[$n]) != " .
 			     $declared_argument_kinds[$n] . "\n");
 		}
 	    }
@@ -257,8 +257,8 @@
 	   $implemented_calling_convention ne "asm")
 	{
 	    if($options->argument_count) {
-		$output->write("argument count differs: " . 
-		    ($#argument_types + 1) . " != " . 
+		$output->write("argument count differs: " .
+		    ($#argument_types + 1) . " != " .
 		    ($#declared_argument_kinds + 1) . "\n");
 	    }
 	}
@@ -310,7 +310,7 @@
 			my $formating = $1;
 			my $extra = $2;
 			my $arguments = $3;
-			
+
 			my $format;
 			my $argument;
 			my $n = 0;
@@ -323,7 +323,7 @@
 			    $n++;
 
 			    if(!defined($type)) { last; }
-			    
+
 			    $format =~ s/^\w+\s*[:=]?\s*//;
 			    $format =~ s/\s*\{[^\{\}]*\}$//;
 			    $format =~ s/\s*\[[^\[\]]*\]$//;
@@ -340,7 +340,7 @@
 			}
 
 			if($options->debug_messages) {
-			    my $count = $#{$function->argument_types} + 1; 
+			    my $count = $#{$function->argument_types} + 1;
 			    if($n != $count) {
 				$output->write("$called_name: argument count mismatch ($n != $count)\n");
 			    }
@@ -375,13 +375,13 @@
 		my $module16 = $$functions{$name}->module16;
 		my $module32 = $$functions{$name}->module32;
 
-		if($#called_names >= 0 && (defined($module16) || defined($module32)) ) {	
+		if($#called_names >= 0 && (defined($module16) || defined($module32)) ) {
 		    for my $called_name (@called_names) {
 			my $called_module16 = $$functions{$called_name}->module16;
 			my $called_module32 = $$functions{$called_name}->module32;
 			if(defined($module32) &&
 			   defined($called_module16) && !defined($called_module32) &&
-			   $name ne $called_name) 
+			   $name ne $called_name)
 			{
 			    $output->write("$file: $module: $name: illegal call to $called_name (Win32 -> Win16)\n");
 			}
@@ -403,4 +403,3 @@
 }
 
 1;
-
diff --git a/tools/winapi_check/winapi_parser.pm b/tools/winapi_check/winapi_parser.pm
index 617e3a8..ec74660 100644
--- a/tools/winapi_check/winapi_parser.pm
+++ b/tools/winapi_check/winapi_parser.pm
@@ -56,7 +56,7 @@
 	my $argument_documentations;
 	my $statements_line;
 	my $statements;
-	
+
 	$function_begin = sub {
 	    $documentation_line = shift;
 	    $documentation = shift;
@@ -68,7 +68,7 @@
 	    $argument_types = shift;
 	    $argument_names = shift;
 	    $argument_documentations = shift;
-	    
+
 	    if(defined($argument_names) && defined($argument_types) &&
 	       $#$argument_names == -1)
 	    {
@@ -76,7 +76,7 @@
 		    push @$argument_names, "";
 		}
 	    }
-	    
+
 	    if(defined($argument_documentations) &&
 	       $#$argument_documentations == -1)
 	    {
@@ -84,7 +84,7 @@
 		    push @$argument_documentations, "";
 		}
 	    }
-	    
+
 	    $in_function = 1;
 	};
 
@@ -93,18 +93,18 @@
 	    $statements = shift;
 
 	    my $function = &$function_create_callback();
-	    
+
 	    if(!defined($documentation_line)) {
 		$documentation_line = 0;
 	    }
-	    
+
 	    $function->file($file);
 	    $function->debug_channels([@$debug_channels]);
 	    $function->documentation_line($documentation_line);
 	    $function->documentation($documentation);
 	    $function->function_line($function_line);
 	    $function->linkage($linkage);
-	    $function->return_type($return_type); 
+	    $function->return_type($return_type);
 	    $function->calling_convention($calling_convention);
 	    $function->internal_name($internal_name);
 	    if(defined($argument_types)) {
@@ -118,7 +118,7 @@
 	    }
 	    $function->statements_line($statements_line);
 	    $function->statements($statements);
-	    
+
 	    &$function_found_callback($function);
 
 	    $in_function = 0;
@@ -189,13 +189,13 @@
 	    $output->write("$file: merge conflicts in file\n");
 	    last;
 	}
-      
+
 	# remove C comments
 	if(s/^([^\"\/]*?(?:\"[^\"]*?\"[^\"]*?)*?)(?=\/\*)//s) {
 	    my $prefix = $1;
 	    if(s/^(\/\*.*?\*\/)//s) {
 		my @lines = split(/\n/, $1);
-		push @comment_lines, $.; 
+		push @comment_lines, $.;
 		push @comments, $1;
 		&$c_comment_found_callback($. - $#lines, $., $1);
 		if($#lines <= 0) {
@@ -203,7 +203,7 @@
 		} else {
 		    $_ = $prefix . ("\n" x $#lines) . $_;
 		}
-		$again = 1; 
+		$again = 1;
 	    } else {
 		$_ = "$prefix$_";
 		$lookahead = 1;
@@ -214,7 +214,7 @@
 	# remove C++ comments
 	while(s/^([^\"\/]*?(?:\"[^\"]*?\"[^\"]*?)*?)(\/\/.*?)$/$1/s) {
 	    &$cplusplus_comment_found_callback($., $2);
-	    $again = 1; 
+	    $again = 1;
 	}
 	if($again) { next; }
 
@@ -239,10 +239,10 @@
 	}
 
 	# Remove extern "C"
-	if(s/^\s*extern\s+"C"\s+\{//m) { 
+	if(s/^\s*extern\s+"C"\s+\{//m) {
 	    $extern_c = 1;
 	    $again = 1;
-	    next; 
+	    next;
 	}
 
 	my $documentation_line;
@@ -251,7 +251,7 @@
 	{
 	    my $n = $#comments;
 	    while($n >= 0 && ($comments[$n] !~ /^\/\*\*/ ||
-			      $comments[$n] =~ /^\/\*\*+\/$/)) 
+			      $comments[$n] =~ /^\/\*\*+\/$/))
 	    {
 		$n--;
 	    }
@@ -328,7 +328,7 @@
 	    } elsif(s/^\}//) {
 		$_ = $'; $again = 1;
 		$line .= "}" if $level > 1;
-		print "-1: \}$_\n" if $options->debug >= 2; 
+		print "-1: \}$_\n" if $options->debug >= 2;
 		$level--;
 		if($level == -1 && $extern_c) {
 		    $extern_c = 0;
@@ -390,7 +390,7 @@
 
 	    if($regs_entrypoints{$name}) {
 		$name = $regs_entrypoints{$name};
-	    } 
+	    }
 
 	    $arguments =~ y/\t\n/  /;
 	    $arguments =~ s/^\s*(.*?)\s*$/$1/;
@@ -435,7 +435,7 @@
 	    }
 	    if($#argument_types == 0 && $argument_types[0] =~ /^void$/i) {
 		$#argument_types = -1;
-		$#argument_names = -1;  
+		$#argument_names = -1;
 	    }
 
 	    if($options->debug) {
@@ -484,7 +484,7 @@
 			     $function_line, "", "UINT16", "WINAPI", "waveOut" . $1 . "16", \@arguments16);
 	    &$function_end($., "");
 	    &$function_begin($documentation_line, $documentation,
-			     $function_line, "", "UINT", "WINAPI", "waveOut" . $1, \@arguments32);	    
+			     $function_line, "", "UINT", "WINAPI", "waveOut" . $1, \@arguments32);
 	    &$function_end($., "");
 	} elsif(/WAVEOUT_SHORTCUT_(1|2)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
 	    my @lines = split(/\n/, $&);
@@ -507,7 +507,7 @@
 		&$function_begin($documentation_line, $documentation,
 				 $function_line, "", "UINT16", "WINAPI", "waveOut". $2 . "16", \@arguments16);
 		&$function_end($., "");
-		&$function_begin($documentation_line, $documentation, 
+		&$function_begin($documentation_line, $documentation,
 				 $function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32);
 		&$function_end($., "");
 	    }
@@ -534,7 +534,7 @@
 		(?:\s+const)?
 		((?:\s*\*+\s*|\s+)\w+\s*(?:\[[^\]]*\])?
 		(?:\s*,\s*(?:\s*\*+\s*|\s+)\w+\s*(?:\[[^\]]*\])?)*)
-		\s*;/sx) 
+		\s*;/sx)
 	{
 	    $_ = $'; $again = 1;
 
@@ -561,9 +561,9 @@
 		(\w+(?:\s*\*+\s*)?)\s+
 		(?:(\w+)\s*)?
 		\((?:(\w+)\s+)?\s*\*\s*(\w+)\s*\)\s*
-		(?:\(([^\)]*)\)|\[([^\]]*)\])\s*;/sx) 
+		(?:\(([^\)]*)\)|\[([^\]]*)\])\s*;/sx)
 	{
-	    $_ = $'; $again = 1;	   
+	    $_ = $'; $again = 1;
 	    my $type;
 	    if(defined($2) || defined($3)) {
 		my $cc = $2 || $3;