Minor bug fixes.

diff --git a/tools/winapi_check/modules.dat b/tools/winapi_check/modules.dat
index aedb6b7..e40f151 100644
--- a/tools/winapi_check/modules.dat
+++ b/tools/winapi_check/modules.dat
@@ -193,6 +193,10 @@
 
 dlls/olesvr
 
+% dlls/opengl32/opengl32.spec
+
+dlls/opengl32
+
 % dlls/psapi/psapi.spec
 
 dlls/psapi
diff --git a/tools/winapi_check/win32/opengl32.api b/tools/winapi_check/win32/opengl32.api
new file mode 100644
index 0000000..7e874ee
--- /dev/null
+++ b/tools/winapi_check/win32/opengl32.api
@@ -0,0 +1,50 @@
+%long
+
+BOOL
+DWORD
+FLOAT
+GLbitfield
+GLboolean
+GLbyte
+GLclampd
+GLclampf
+GLdouble
+GLenum
+GLfloat
+GLint
+GLshort
+GLsizei
+GLubyte
+GLuint
+GLushort
+HDC
+HGLRC
+UINT
+int
+
+%ptr
+
+COLORREF *
+GLbyte *
+GLboolean *
+GLclampf *
+GLdouble *
+GLfloat *
+GLint *
+GLshort *
+GLuint *
+GLubyte *
+GLushort *
+GLvoid *
+LPGLYPHMETRICSFLOAT
+LPLAYERPLANEDESCRIPTOR
+void *
+void **
+
+%str
+
+LPCSTR
+
+%void
+
+void
diff --git a/tools/winapi_check/winapi.pm b/tools/winapi_check/winapi.pm
index 79575c7..c91cdab 100644
--- a/tools/winapi_check/winapi.pm
+++ b/tools/winapi_check/winapi.pm
@@ -197,7 +197,7 @@
     my $win32api = shift;
 
     my @files = map {
-	s/^.\/(.*)$/$1/;
+	s/^$wine_dir\/(.*)$/$1/;
 	if(&$file_type($_) eq "library") {
 	    $_;
 	} else {
@@ -264,7 +264,7 @@
 		$$function_module{$internal_name} .= " & $module";
 	    }
 
-	    if($$options->spec_mismatch) {
+	    if(0 && $$options->spec_mismatch) {
 		if($external_name eq "@") {
 		    if($internal_name !~ /^\U$module\E_$ordinal$/) {
 			$$output->write("$file: $external_name: the internal name ($internal_name) mismatch\n");
@@ -531,6 +531,23 @@
     return sort(keys(%$function_calling_convention));
 }
 
+sub all_functions_in_module {
+    my $self = shift;
+    my $function_calling_convention = \%{$self->{FUNCTION_CALLING_CONVENTION}};
+    my $function_module = \%{$self->{FUNCTION_MODULE}};
+
+    my $module = shift;
+
+    my @names;
+    foreach my $name (keys(%$function_calling_convention)) {
+	if($$function_module{$name} eq $module) {
+	    push @names, $name;
+	}
+    }
+
+    return sort(@names);
+}
+
 sub all_functions_stub {
     my $self = shift;
     my $function_stub = \%{$self->{FUNCTION_STUB}};
diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check
index 21c7f92..75e6aa2 100755
--- a/tools/winapi_check/winapi_check
+++ b/tools/winapi_check/winapi_check
@@ -76,7 +76,7 @@
     
     $file_dir =~ s/^$wine_dir\///;
 
-    if($file_dir =~ /^(libtest|program|rc|tools)/ || 
+    if($file_dir =~ /^(libtest|program|rc|tests|tools)/ || 
        $file =~ /dbgmain\.c$/ ||
        $file =~ /wineclipsrv\.c$/) # FIXME: Kludge
     {
@@ -405,6 +405,7 @@
 		    $name2 = s/^(.*?)16_fn(.*?)$/$116_$2/;
 		} elsif(!defined($module16) && defined($module32)) {
 		    my @uc_modules32 = split(/\s*\&\s*/, uc($module32));
+		    push @uc_modules32, "wine";
 
 		    $name1 = $internal_name;
 		    foreach my $uc_module32 (@uc_modules32) {
diff --git a/tools/winapi_check/winapi_options.pm b/tools/winapi_check/winapi_options.pm
index 90f7e2d..533a793 100644
--- a/tools/winapi_check/winapi_options.pm
+++ b/tools/winapi_check/winapi_options.pm
@@ -205,6 +205,10 @@
 	}
     }
 
+    if($self->help) {
+	return $self;
+    }
+
     my $c_paths;
     if($#$c_files == -1 || ($#$c_files == 0 && $$c_files[0] eq $wine_dir)) {
 	$c_paths = ".";
diff --git a/tools/winapi_check/winapi_parser.pm b/tools/winapi_check/winapi_parser.pm
index 558d069..37f75bc 100644
--- a/tools/winapi_check/winapi_parser.pm
+++ b/tools/winapi_check/winapi_parser.pm
@@ -77,13 +77,17 @@
 	    last;
 	}
       
-	# remove comments
-	if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) { push @comments, $2; $again = 1; next };
+	# remove C comments
+	if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) { push @comments, $2; $again = 1; next }
 	if(/^(.*?)\/\*/s) {
 	    $lookahead = 1;
 	    next;
 	}
 
+	# remove C++ comments
+	while(s/^(.*?)\/\/.*?$/$1\n/s) { $again = 1 }
+	if($again) { next; }
+
 	# remove empty rows
 	if(/^\s*$/) { next; }