- Minor API files fixes
- Use output prefix instead of high order functions that, for some
  reason, leaks memory. The memory usage of winapi_check is now greatly
  reduced. :-)
- Turned on argument kind checking of doubles by default

diff --git a/tools/winapi_check/winapi.pm b/tools/winapi_check/winapi.pm
index cc96b70..ccf9bac 100644
--- a/tools/winapi_check/winapi.pm
+++ b/tools/winapi_check/winapi.pm
@@ -219,12 +219,14 @@
     my $function_stub = \%{$self->{FUNCTION_STUB}};
     my $function_module = \%{$self->{FUNCTION_MODULE}};
     my $modules = \%{$self->{MODULES}};
+    my $module_files = \%{$self->{MODULE_FILES}};
 
     my $file = shift;
 
     my %ordinals;
     my $type;
     my $module;
+    my $module_file;
 
     if($$options->progress) {
 	$$output->progress("$file");
@@ -242,6 +244,7 @@
 
 	if($header)  {
 	    if(/^name\s*(\S*)/) { $module = $1; }
+	    if(/^file\s*(\S*)/) { $module_file = $1; }
 	    if(/^type\s*(\w+)/) { $type = $1; }
 	    if(/^\d+|@/) { $header = 0; $lookahead = 1; }
 	    next;
@@ -338,6 +341,11 @@
     close(IN);
 
     $$modules{$module}++;
+    if(defined($module_file)) {
+	$$module_files{$module} = $module_file;
+    } else {
+	$$module_files{$module} = "$module.drv";
+    }
 }
 
 sub name {
@@ -526,6 +534,16 @@
     return $$modules{$name};
 }
 
+sub module_file {
+    my $self = shift;
+
+    my $module = shift;
+
+    my $module_files = \%{$self->{MODULE_FILES}};
+
+    return $$module_files{$module};
+}
+
 sub all_functions {
     my $self = shift;
     my $function_calling_convention = \%{$self->{FUNCTION_CALLING_CONVENTION}};