- API files update.
- Add new options --all and --none that enable/disables all check
  respectively.
- Fixed and improved stub statistics.
- Fixed bug that prevented checking of the first function in the .spec files.
- Partial implementation of a more advanced misplaced function checking.
- Minor fixes.

diff --git a/tools/winapi_check/modules.pm b/tools/winapi_check/modules.pm
new file mode 100644
index 0000000..0ac93bb
--- /dev/null
+++ b/tools/winapi_check/modules.pm
@@ -0,0 +1,49 @@
+package modules;
+
+use strict;
+
+sub new {
+    my $proto = shift;
+    my $class = ref($proto) || $proto;
+    my $self  = {};
+    bless ($self, $class);
+
+    my $options = \${$self->{OPTIONS}};
+    my $output = \${$self->{OUTPUT}};
+    my $modules = \%{$self->{MODULES}};
+
+    $$options = shift;
+    $$output = shift;
+    my $module_file = shift;
+
+    $module_file =~ s/^\.\///;
+
+    if($$options->progress) {
+	$$output->progress("$module_file");
+    }
+
+    my $allowed_dir;
+    my $spec_file;
+
+    open(IN, "< $module_file");
+    local $/ = "\n";
+    while(<IN>) {
+	s/^\s*?(.*?)\s*$/$1/; # remove whitespace at begining and end of line
+	s/^(.*?)\s*#.*$/$1/;  # remove comments
+	/^$/ && next;         # skip empty lines
+
+	if(/^%\s+(.*?)$/) {
+	    $spec_file = $1;
+	    next;
+	} else {
+	    $allowed_dir = $1;
+	}
+
+	$$modules{$allowed_dir}{$spec_file}++;
+    }
+    close(IN);
+
+    return $self;
+}
+
+1;