From aceeaa94f2a53608155ad13aa16a1fe82f19a4c0 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Sun, 7 May 2000 18:28:18 +0000 Subject: [PATCH] - Check for missing modules in modules.dat. - Minor bug fixes --- tools/winapi_check/modules.dat | 4 ++++ tools/winapi_check/modules.pm | 27 +++++++++++++++++++++++++++ tools/winapi_check/winapi_check | 10 +++++----- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/tools/winapi_check/modules.dat b/tools/winapi_check/modules.dat index 5114982bab5..5a484481fe4 100644 --- a/tools/winapi_check/modules.dat +++ b/tools/winapi_check/modules.dat @@ -201,6 +201,10 @@ dlls/rasapi32 dlls/rasapi32 +% dlls/richedit/riched32.spec + +dlls/richedit + % dlls/setupx/setupx.spec dlls/setupx diff --git a/tools/winapi_check/modules.pm b/tools/winapi_check/modules.pm index f2a4f3305fc..20185332a40 100644 --- a/tools/winapi_check/modules.pm +++ b/tools/winapi_check/modules.pm @@ -17,10 +17,25 @@ sub new { $$output = shift; my $wine_dir = shift; my $current_dir = shift; + my $file_type = shift; my $module_file = shift; $module_file =~ s/^\.\///; + my @all_spec_files = map { + s/^.\/(.*)$/$1/; + if(&$file_type($_) eq "library") { + $_; + } else { + (); + } + } split(/\n/, `find $wine_dir -name \\*.spec`); + + my %all_spec_files; + foreach my $file (@all_spec_files) { + $all_spec_files{$file}++ ; + } + if($$options->progress) { $$output->progress("$module_file"); } @@ -37,6 +52,12 @@ sub new { if(/^%\s+(.*?)$/) { $spec_file = $1; + if($wine_dir eq ".") { + $all_spec_files{$spec_file}--; + } else { + $all_spec_files{"$wine_dir/$spec_file"}--; + } + $$spec_files{""}{$spec_file}++; # FIXME: Kludge next; } else { $allowed_dir = $1; @@ -49,6 +70,12 @@ sub new { } 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"); + } + } + return $self; } diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check index 5a37036141f..389b78ad9c5 100755 --- a/tools/winapi_check/winapi_check +++ b/tools/winapi_check/winapi_check @@ -66,11 +66,6 @@ if(!defined($options)) { exit; } -my $modules = 'modules'->new($options, $output, $wine_dir, $current_dir, "$winapi_check_dir/modules.dat"); - -my $win16api = 'winapi'->new($options, $output, "win16", "$winapi_check_dir/win16"); -my $win32api = 'winapi'->new($options, $output, "win32", "$winapi_check_dir/win32"); - sub file_type { my $file = shift; @@ -93,6 +88,11 @@ sub file_type { } } +my $modules = 'modules'->new($options, $output, $wine_dir, $current_dir, \&file_type, "$winapi_check_dir/modules.dat"); + +my $win16api = 'winapi'->new($options, $output, "win16", "$winapi_check_dir/win16"); +my $win32api = 'winapi'->new($options, $output, "win32", "$winapi_check_dir/win32"); + if($options->global) { 'winapi'->read_all_spec_files($modules, $wine_dir, $current_dir, \&file_type, $win16api, $win32api); } else {