Commit 027c7a1f authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Minor reorganisation and a few bug fixes.

parent 822429ad
......@@ -10,7 +10,7 @@ BEGIN {
}
use config qw(
&file_type &file_skip &files_skip &get_spec_files
&file_type &files_skip &files_filter &get_spec_files
$current_dir $wine_dir $winapi_dir $winapi_check_dir
);
use modules;
......
......@@ -38,7 +38,6 @@ HWND *
IShellFolder **
IStream *
ITEMIDLIST *
IUnknown *
LPBROWSEINFOA
LPBYTE
LPCITEMIDLIST
......@@ -79,7 +78,6 @@ LPVOID *
LPWORD
LPWSTR *
PAPPBARDATA
PLONG
PNOTIFYICONDATAA
PNOTIFYICONDATAW
POINT *
......
......@@ -38,6 +38,7 @@ LPARAM
LRESULT
SHORT
UINT
ULONG_PTR
WCHAR
WORD
WPARAM
......@@ -70,7 +71,6 @@ COLORREF *
DWORD *
DLGPROC
DRAWSTATEPROC
FARPROC
GRAYSTRINGPROC
HANDLE *
HICON *
......@@ -127,6 +127,7 @@ PVOID
RECT *
SCROLLINFO *
SECURITY_QUALITY_OF_SERVICE *
SENDASYNCPROC
TIMERPROC
UINT *
WINDOWPLACEMENT *
......
......@@ -180,8 +180,7 @@ my %type_found = ();
foreach my $file (@c_files) {
my %functions = ();
my @includes = ();
my %needed_includes = ();
my %includes = ();
my $file_module16 = $modules->allowed_modules_in_file("$current_dir/$file");
my $file_module32 = $modules->allowed_modules_in_file("$current_dir/$file");
......@@ -241,8 +240,14 @@ foreach my $file (@c_files) {
}
}
if(defined($declared_function)) {
$needed_includes{$declared_function->file}++;
if($options->headers_needed && defined($declared_function)) {
my $needed_include = $declared_function->file;
if(!defined($includes{$needed_include})) {
my $header = $needed_include;
$header =~ s%^(include|$file_dir)/%%;
$output->write("prototype not included: #include \"$header\" is needed\n");
}
}
if(1) {
......@@ -399,21 +404,29 @@ foreach my $file (@c_files) {
}
if(defined($header)) {
my $include;
if(-e "$wine_dir/include/$header") {
push @includes, "include/$header";
$include = "include/$header";
} elsif(-e "$file_dir/$header") {
push @includes, "$file_dir/$header";
$include = "$file_dir/$header";
} elsif(-e "$file_dir/../$header") {
if($file_dir =~ m%^(.*?)/[^/]+$%) {
push @includes, "$1/$header";
$include = "$1/$header";
} else {
push @includes, "$header";
$include = "$header";
}
} elsif($header eq "controls.h") { # FIXME: Kludge
push @includes, "dlls/user/controls.h";
$include = "dlls/user/controls.h";
} elsif($check_local) {
$output->write("$file: #include \"$header\": file not found\n");
}
if(defined($include)) {
$includes{$include}++;
foreach my $include (keys(%{$include2info{$include}{includes}})) {
$includes{$include}++;
}
}
}
if($check_protection && $header) {
......@@ -495,28 +508,6 @@ foreach my $file (@c_files) {
}
}
if($options->headers_needed) {
my %includes2;
foreach my $include (@includes) {
$includes2{$include}++;
foreach my $include (keys(%{$include2info{$include}{includes}})) {
$includes2{$include}++;
}
}
foreach my $needed_include (sort(keys(%needed_includes))) {
my $found = 0;
foreach my $include (sort(keys(%includes2))) {
if($needed_include eq $include) {
$found = 1;
}
}
if(!$found) {
$output->write("$file: file '$needed_include' needed but not included\n");
}
}
}
winapi_local::check_file $options, $output, $file, \%functions;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment