- Warn about directories specified in modules.dat that are not used.
- Eliminated the warnings caused by the change above.
- Minor API files update.
- Minor bug fixes.
diff --git a/tools/winapi_check/modules.dat b/tools/winapi_check/modules.dat
index b8795e0..41f2d89 100644
--- a/tools/winapi_check/modules.dat
+++ b/tools/winapi_check/modules.dat
@@ -10,8 +10,6 @@
% dlls/avifil32/avifile.spec
-dlls/avifil32
-
% dlls/comctl32/comctl32.spec
dlls/comctl32
@@ -31,8 +29,6 @@
% dlls/dciman32/dciman32.spec
-dlls/dciman32
-
% dlls/ddraw/ddraw.spec
dlls/ddraw
@@ -44,8 +40,6 @@
% dlls/dplay/dplay.spec
-dlls/dplay
-
% dlls/dplayx/dplayx.spec
dlls/dplayx
@@ -65,7 +59,6 @@
graphics/win16drv
graphics
memory
-misc
objects
% dlls/gdi/gdi32.spec
@@ -74,7 +67,6 @@
graphics/enhmetafiledrv
graphics/metafiledrv
graphics
-misc
objects
% dlls/gdi/wing.spec
@@ -105,7 +97,6 @@
memory
misc
msdos
-relay32
scheduler
win32
@@ -117,9 +108,7 @@
loader
memory
misc
-objects
ole
-relay32
scheduler
win32
@@ -133,20 +122,17 @@
% dlls/kernel/toolhelp.spec
+dlls/kernel
loader/ne
loader
memory
-misc
windows
% dlls/kernel/wprocs.spec
dlls/kernel
-if1632
loader/ne
msdos
-relay32
-windows
% dlls/kernel/win87em.spec
@@ -178,8 +164,6 @@
% dlls/msnet32/msnet32.spec
-dlls/msnet32
-
% dlls/msvideo/msvfw32.spec
dlls/msvideo
@@ -191,8 +175,6 @@
% dlls/ntdll/ntdll.spec
dlls/ntdll
-loader
-misc
scheduler
% dlls/odbc32/odbc32.spec
@@ -273,8 +255,6 @@
% dlls/rasapi32/rasapi16.spec
-dlls/rasapi32
-
% dlls/rasapi32/rasapi32.spec
dlls/rasapi32
@@ -302,20 +282,15 @@
% dlls/shell32/shell.spec
dlls/shell32
-misc
% dlls/shell32/shell32.spec
dlls/shell32
-memory
% dlls/shfolder/shfolder.spec
-dlls/shfolder
-
% dlls/shlwapi/shlwapi.spec
-dlls/shell32
dlls/shlwapi
% dlls/tapi32/tapi32.spec
@@ -324,8 +299,6 @@
% dlls/ttydrv/ttydrv.spec
-dlls/ttydrv
-
% dlls/urlmon/urlmon.spec
dlls/urlmon
@@ -333,7 +306,6 @@
% dlls/user/ddeml.spec
dlls/user
-misc
% dlls/user/display.spec
@@ -342,7 +314,6 @@
% dlls/user/keyboard.spec
-dlls/user
memory
windows
@@ -355,8 +326,6 @@
controls
dlls/user
if1632
-loader
-objects
memory
misc
windows
@@ -366,11 +335,8 @@
controls
dlls/user
loader
-objects
memory
misc
-scheduler
-win32
windows
% dlls/version/ver.spec
@@ -406,8 +372,6 @@
% dlls/wineps/wineps.spec
-dlls/wineps
-
% dlls/wineps/wineps16.spec
dlls/wineps
@@ -486,9 +450,5 @@
% dlls/wow32/wow32.spec
-dlls/kernel
-relay32
-
% dlls/x11drv/x11drv.spec
-dlls/x11drv
diff --git a/tools/winapi_check/modules.pm b/tools/winapi_check/modules.pm
index e1d2cb4..b2130e4 100644
--- a/tools/winapi_check/modules.pm
+++ b/tools/winapi_check/modules.pm
@@ -11,13 +11,13 @@
my $options = \${$self->{OPTIONS}};
my $output = \${$self->{OUTPUT}};
my $spec_files = \%{$self->{SPEC_FILES}};
- my $modules = \%{$self->{MODULES}};
+ my $spec_file2module = \%{$self->{SPEC_FILE2MODULE}};
$$options = shift;
$$output = shift;
my $wine_dir = shift;
my $current_dir = shift;
- my $file_type = shift;
+ my $file_type = shift;
my $module_file = shift;
$module_file =~ s/^\.\///;
@@ -37,7 +37,7 @@
}
if($$options->progress) {
- $$output->progress("$module_file");
+ $$output->progress("modules.dat");
}
my $allowed_dir;
@@ -54,7 +54,7 @@
$spec_file = $1;
if(!-f "$wine_dir/$spec_file") {
- $$output->write("$module_file: $spec_file: file ($spec_file) doesn't exist or is no file\n");
+ $$output->write("modules.dat: $spec_file: file ($spec_file) doesn't exist or is no file\n");
}
if($wine_dir eq ".") {
@@ -70,14 +70,14 @@
$$spec_files{$allowed_dir}{$spec_file}++;
if(!-d "$wine_dir/$allowed_dir") {
- $$output->write("$module_file: $spec_file: directory ($allowed_dir) doesn't exist or is no directory\n");
+ $$output->write("modules.dat: $spec_file: directory ($allowed_dir) doesn't exist or is no directory\n");
}
}
close(IN);
foreach my $spec_file (sort(keys(%all_spec_files))) {
if($all_spec_files{$spec_file} > 0) {
- $$output->write("$module_file: $spec_file: exists but is not specified\n");
+ $$output->write("modules.dat: $spec_file: exists but is not specified\n");
}
}
@@ -87,21 +87,23 @@
sub spec_file_module {
my $self = shift;
- my $modules = \%{$self->{MODULES}};
+ my $spec_file2module = \%{$self->{SPEC_FILE2MODULE}};
+ my $module2spec_file = \%{$self->{MODULE2SPEC_FILE}};
my $spec_file = shift;
$spec_file =~ s/^\.\///;
my $module = shift;
- $$modules{$spec_file}{$module}++;
+ $$spec_file2module{$spec_file}{$module}++;
+ $$module2spec_file{$module}{$spec_file}++;
}
sub is_allowed_module_in_file {
my $self = shift;
my $spec_files = \%{$self->{SPEC_FILES}};
- my $modules = \%{$self->{MODULES}};
+ my $spec_file2module = \%{$self->{SPEC_FILE2MODULE}};
my $module = shift;
my $file = shift;
@@ -111,7 +113,7 @@
$dir =~ s/\/[^\/]*$//;
foreach my $spec_file (sort(keys(%{$$spec_files{$dir}}))) {
- if($$modules{$spec_file}{$module}) {
+ if($$spec_file2module{$spec_file}{$module}) {
return 1;
}
}
@@ -123,7 +125,7 @@
my $self = shift;
my $spec_files = \%{$self->{SPEC_FILES}};
- my $modules = \%{$self->{MODULES}};
+ my $spec_file2module = \%{$self->{SPEC_FILE2MODULE}};
my $file = shift;
$file =~ s/^\.\///;
@@ -133,7 +135,7 @@
my %allowed_modules = ();
foreach my $spec_file (sort(keys(%{$$spec_files{$dir}}))) {
- foreach my $module (sort(keys(%{$$modules{$spec_file}}))) {
+ foreach my $module (sort(keys(%{$$spec_file2module{$spec_file}}))) {
$allowed_modules{$module}++;
}
}
@@ -174,6 +176,40 @@
return sort(keys(%allowed_spec_files));
}
+sub found_module_in_dir {
+ my $self = shift;
+
+ my $module = shift;
+ my $dir = shift;
+
+ my $used_module_dirs = \%{$self->{USED_MODULE_DIRS}};
+
+ $$used_module_dirs{$module}{$dir}++;
+}
+
+sub global_report {
+ my $self = shift;
+
+ my $output = \${$self->{OUTPUT}};
+ my $spec_files = \%{$self->{SPEC_FILES}};
+ my $spec_file2module = \%{$self->{SPEC_FILE2MODULE}};
+ my $used_module_dirs = \%{$self->{USED_MODULE_DIRS}};
+
+ my @messages;
+ foreach my $dir (sort(keys(%$spec_files))) {
+ if($dir eq "") { next; }
+ foreach my $spec_file (sort(keys(%{$$spec_files{$dir}}))) {
+ foreach my $module (sort(keys(%{$$spec_file2module{$spec_file}}))) {
+ if(!$$used_module_dirs{$module}{$dir}) {
+ push @messages, "modules.dat: $spec_file: directory ($dir) is not used\n";
+ }
+ }
+ }
+ }
+
+ foreach my $message (sort(@messages)) {
+ $$output->write($message);
+ }
+}
+
1;
-
-
diff --git a/tools/winapi_check/nativeapi.dat b/tools/winapi_check/nativeapi.dat
index 6e0c0af..512ed1a 100644
--- a/tools/winapi_check/nativeapi.dat
+++ b/tools/winapi_check/nativeapi.dat
@@ -241,6 +241,7 @@
usleep
utime
vfprintf
+vsnprintf
vsprintf
wait4
write
diff --git a/tools/winapi_check/nativeapi.pm b/tools/winapi_check/nativeapi.pm
index fae1391..1c6e23a 100644
--- a/tools/winapi_check/nativeapi.pm
+++ b/tools/winapi_check/nativeapi.pm
@@ -85,7 +85,7 @@
open(IN, "< $config_h_in_file");
local $/ = "\n";
while(<IN>) {
- if(/^\#undef\s+(\S+)$/) {
+ if(/^\#undef\s+(\S+)\s*$/) {
$$conditionals{$1}++;
}
}
diff --git a/tools/winapi_check/win32/comctl32.api b/tools/winapi_check/win32/comctl32.api
index 16f3888..7b2c5b6 100644
--- a/tools/winapi_check/win32/comctl32.api
+++ b/tools/winapi_check/win32/comctl32.api
@@ -45,6 +45,7 @@
LPVOID
LPWSTR *
POINT *
+SMOOTHSCROLLSTRUCT *
%ptr
diff --git a/tools/winapi_check/win32/oleaut32.api b/tools/winapi_check/win32/oleaut32.api
index b2bad2f..6a2ca65 100644
--- a/tools/winapi_check/win32/oleaut32.api
+++ b/tools/winapi_check/win32/oleaut32.api
@@ -47,6 +47,7 @@
FLOAT *
ITypeLib *
ITypeLib **
+IUnknown **
LONG *
LPBSTR
LPCLSID
@@ -81,8 +82,8 @@
%str # ???
LPCOLESTR
+LPCSTR
LPOLESTR
-LPSTR
%void
diff --git a/tools/winapi_check/win32/ws2_32.api b/tools/winapi_check/win32/ws2_32.api
index 24c28ea..9a20ad9 100644
--- a/tools/winapi_check/win32/ws2_32.api
+++ b/tools/winapi_check/win32/ws2_32.api
@@ -30,10 +30,10 @@
LPWSANETWORKEVENTS
LPWSAPROTOCOL_INFOA
ULONG *
+WIN_hostent *
+WIN_protoent *
+WIN_servent *
char *
-struct WIN_hostent *
-struct WIN_protoent *
-struct WIN_servent *
struct sockaddr *
struct timeval *
ws_fd_set32 *
diff --git a/tools/winapi_check/win32/wsock32.api b/tools/winapi_check/win32/wsock32.api
index 25c9338..3e64a66 100644
--- a/tools/winapi_check/win32/wsock32.api
+++ b/tools/winapi_check/win32/wsock32.api
@@ -24,10 +24,10 @@
LPVOID
LPWSADATA
ULONG *
+WIN_hostent *
+WIN_protoent *
+WIN_servent *
char *
-struct WIN_hostent *
-struct WIN_protoent *
-struct WIN_servent *
struct netent *
struct sockaddr *
struct timeval *
diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check
index 407400f..27f3d0a 100755
--- a/tools/winapi_check/winapi_check
+++ b/tools/winapi_check/winapi_check
@@ -294,6 +294,13 @@
my $module16 = $win16api->function_module($internal_name);
my $module32 = $win32api->function_module($internal_name);
+ if(defined($module16)) {
+ $modules->found_module_in_dir($module16, $file_dir);
+ }
+ if(defined($module32)) {
+ $modules->found_module_in_dir($module32, $file_dir);
+ }
+
my $function = 'winapi_function'->new;
$functions{$internal_name} = $function;
@@ -693,4 +700,6 @@
winapi_global::check $options, $output, $win16api, $nativeapi if $options->win16;
winapi_global::check $options, $output, $win32api, $nativeapi if $options->win32;
+
+ $modules->global_report;
}