- 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.
This commit is contained in:
parent
11ca9b9eb7
commit
c1d5dc40c5
|
@ -10,8 +10,6 @@ dlls/avifil32
|
|||
|
||||
% dlls/avifil32/avifile.spec
|
||||
|
||||
dlls/avifil32
|
||||
|
||||
% dlls/comctl32/comctl32.spec
|
||||
|
||||
dlls/comctl32
|
||||
|
@ -31,8 +29,6 @@ misc
|
|||
|
||||
% dlls/dciman32/dciman32.spec
|
||||
|
||||
dlls/dciman32
|
||||
|
||||
% dlls/ddraw/ddraw.spec
|
||||
|
||||
dlls/ddraw
|
||||
|
@ -44,8 +40,6 @@ dlls/dinput
|
|||
|
||||
% dlls/dplay/dplay.spec
|
||||
|
||||
dlls/dplay
|
||||
|
||||
% dlls/dplayx/dplayx.spec
|
||||
|
||||
dlls/dplayx
|
||||
|
@ -65,7 +59,6 @@ graphics/metafiledrv
|
|||
graphics/win16drv
|
||||
graphics
|
||||
memory
|
||||
misc
|
||||
objects
|
||||
|
||||
% dlls/gdi/gdi32.spec
|
||||
|
@ -74,7 +67,6 @@ dlls/gdi
|
|||
graphics/enhmetafiledrv
|
||||
graphics/metafiledrv
|
||||
graphics
|
||||
misc
|
||||
objects
|
||||
|
||||
% dlls/gdi/wing.spec
|
||||
|
@ -105,7 +97,6 @@ loader
|
|||
memory
|
||||
misc
|
||||
msdos
|
||||
relay32
|
||||
scheduler
|
||||
win32
|
||||
|
||||
|
@ -117,9 +108,7 @@ loader/ne
|
|||
loader
|
||||
memory
|
||||
misc
|
||||
objects
|
||||
ole
|
||||
relay32
|
||||
scheduler
|
||||
win32
|
||||
|
||||
|
@ -133,20 +122,17 @@ misc
|
|||
|
||||
% 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/msacm
|
|||
|
||||
% dlls/msnet32/msnet32.spec
|
||||
|
||||
dlls/msnet32
|
||||
|
||||
% dlls/msvideo/msvfw32.spec
|
||||
|
||||
dlls/msvideo
|
||||
|
@ -191,8 +175,6 @@ dlls/msvideo
|
|||
% dlls/ntdll/ntdll.spec
|
||||
|
||||
dlls/ntdll
|
||||
loader
|
||||
misc
|
||||
scheduler
|
||||
|
||||
% dlls/odbc32/odbc32.spec
|
||||
|
@ -273,8 +255,6 @@ dlls/psapi
|
|||
|
||||
% dlls/rasapi32/rasapi16.spec
|
||||
|
||||
dlls/rasapi32
|
||||
|
||||
% dlls/rasapi32/rasapi32.spec
|
||||
|
||||
dlls/rasapi32
|
||||
|
@ -302,20 +282,15 @@ dlls/setupapi
|
|||
% 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/tapi32
|
|||
|
||||
% dlls/ttydrv/ttydrv.spec
|
||||
|
||||
dlls/ttydrv
|
||||
|
||||
% dlls/urlmon/urlmon.spec
|
||||
|
||||
dlls/urlmon
|
||||
|
@ -333,7 +306,6 @@ dlls/urlmon
|
|||
% dlls/user/ddeml.spec
|
||||
|
||||
dlls/user
|
||||
misc
|
||||
|
||||
% dlls/user/display.spec
|
||||
|
||||
|
@ -342,7 +314,6 @@ objects
|
|||
|
||||
% dlls/user/keyboard.spec
|
||||
|
||||
dlls/user
|
||||
memory
|
||||
windows
|
||||
|
||||
|
@ -355,8 +326,6 @@ dlls/user
|
|||
controls
|
||||
dlls/user
|
||||
if1632
|
||||
loader
|
||||
objects
|
||||
memory
|
||||
misc
|
||||
windows
|
||||
|
@ -366,11 +335,8 @@ windows
|
|||
controls
|
||||
dlls/user
|
||||
loader
|
||||
objects
|
||||
memory
|
||||
misc
|
||||
scheduler
|
||||
win32
|
||||
windows
|
||||
|
||||
% dlls/version/ver.spec
|
||||
|
@ -406,8 +372,6 @@ dlls/winaspi
|
|||
|
||||
% dlls/wineps/wineps.spec
|
||||
|
||||
dlls/wineps
|
||||
|
||||
% dlls/wineps/wineps16.spec
|
||||
|
||||
dlls/wineps
|
||||
|
@ -486,9 +450,5 @@ win32
|
|||
|
||||
% dlls/wow32/wow32.spec
|
||||
|
||||
dlls/kernel
|
||||
relay32
|
||||
|
||||
% dlls/x11drv/x11drv.spec
|
||||
|
||||
dlls/x11drv
|
||||
|
|
|
@ -11,13 +11,13 @@ sub new {
|
|||
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 @@ sub new {
|
|||
}
|
||||
|
||||
if($$options->progress) {
|
||||
$$output->progress("$module_file");
|
||||
$$output->progress("modules.dat");
|
||||
}
|
||||
|
||||
my $allowed_dir;
|
||||
|
@ -54,7 +54,7 @@ sub new {
|
|||
$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 @@ sub new {
|
|||
$$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 new {
|
|||
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 @@ sub is_allowed_module_in_file {
|
|||
$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 @@ sub allowed_modules_in_file {
|
|||
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 @@ sub allowed_modules_in_file {
|
|||
|
||||
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 @@ sub allowed_spec_files {
|
|||
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;
|
||||
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ unlink
|
|||
usleep
|
||||
utime
|
||||
vfprintf
|
||||
vsnprintf
|
||||
vsprintf
|
||||
wait4
|
||||
write
|
||||
|
|
|
@ -85,7 +85,7 @@ sub new {
|
|||
open(IN, "< $config_h_in_file");
|
||||
local $/ = "\n";
|
||||
while(<IN>) {
|
||||
if(/^\#undef\s+(\S+)$/) {
|
||||
if(/^\#undef\s+(\S+)\s*$/) {
|
||||
$$conditionals{$1}++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ LPUINT
|
|||
LPVOID
|
||||
LPWSTR *
|
||||
POINT *
|
||||
SMOOTHSCROLLSTRUCT *
|
||||
|
||||
%ptr
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ DATE *
|
|||
FLOAT *
|
||||
ITypeLib *
|
||||
ITypeLib **
|
||||
IUnknown **
|
||||
LONG *
|
||||
LPBSTR
|
||||
LPCLSID
|
||||
|
@ -81,8 +82,8 @@ void **
|
|||
%str # ???
|
||||
|
||||
LPCOLESTR
|
||||
LPCSTR
|
||||
LPOLESTR
|
||||
LPSTR
|
||||
|
||||
%void
|
||||
|
||||
|
|
|
@ -30,10 +30,10 @@ LPWSAOVERLAPPED_COMPLETION_ROUTINE
|
|||
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 *
|
||||
|
|
|
@ -24,10 +24,10 @@ LPDWORD
|
|||
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 *
|
||||
|
|
|
@ -294,6 +294,13 @@ foreach my $file ($options->c_files) {
|
|||
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 @@ if($options->global) {
|
|||
|
||||
winapi_global::check $options, $output, $win16api, $nativeapi if $options->win16;
|
||||
winapi_global::check $options, $output, $win32api, $nativeapi if $options->win32;
|
||||
|
||||
$modules->global_report;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue