diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api index 83d8697038..6ca830bbb0 100644 --- a/tools/winapi/win32.api +++ b/tools/winapi/win32.api @@ -1346,15 +1346,19 @@ NET_API_STATUS %ptr +LPBYTE * LPDWORD LPVOID LPVOID * -LPWSTR * +LPWSTR * +PBROWSER_EMULATED_DOMAIN * PBYTE * PNCB +PVOID * %wstr +LPCWSTR LPWSTR %%ntdll.dll diff --git a/tools/winapi/winapi.pm b/tools/winapi/winapi.pm index 77731ea44d..fe82e08a27 100644 --- a/tools/winapi/winapi.pm +++ b/tools/winapi/winapi.pm @@ -216,6 +216,7 @@ sub parse_spec_file { my $function_forward = \%{$self->{FUNCTION_FORWARD}}; my $function_internal_module = \%{$self->{FUNCTION_INTERNAL_MODULE}}; my $function_external_module = \%{$self->{FUNCTION_EXTERNAL_MODULE}}; + my $function_wine_extension = \%{$self->{FUNCTION_WINE_EXTENSION}}; my $modules = \%{$self->{MODULES}}; my $module_files = \%{$self->{MODULE_FILES}}; my $module_external_calling_convention = \%{$self->{MODULE_EXTERNAL_CALLING_CONVENTION}}; @@ -225,13 +226,13 @@ sub parse_spec_file { my %ordinals; my $module; + my $wine_extension = 0; $output->lazy_progress("$file"); $module = $file; $module =~ s/^.*?([^\/]*)\.spec$/$1/; - open(IN, "< $file") || die "$file: $!\n"; $/ = "\n"; my $header = 1; @@ -239,7 +240,12 @@ sub parse_spec_file { while($lookahead || defined($_ = )) { $lookahead = 0; s/^\s*(.*?)\s*$/$1/; - s/^(.*?)\s*#.*$/$1/; + if(s/^(.*?)\s*\#\s*(.*)\s*$/$1/) { + my $comment = $2; + if ($comment =~ /^Wine/) { # FIXME: Kludge + $wine_extension = 1; + } + } /^$/ && next; if($header) { @@ -310,6 +316,7 @@ sub parse_spec_file { } else { $$function_external_module{$external_name} .= " & $module"; } + $$function_wine_extension{$module}{$external_name} = $wine_extension; if(0 && $options->spec_mismatch) { if($external_name eq "@") { @@ -879,6 +886,16 @@ sub function_external_module { return $$function_external_module{$name}; } +sub function_wine_extension { + my $self = shift; + my $function_wine_extension = \%{$self->{FUNCTION_WINE_EXTENSION}}; + + my $module = shift; + my $name = shift; + + return $$function_wine_extension{$module}{$name}; +} + sub is_function_stub { my $self = shift; my $module_external_calling_convention = \%{$self->{MODULE_EXTERNAL_CALLING_CONVENTION}}; diff --git a/tools/winapi_check/winapi_documentation.pm b/tools/winapi_check/winapi_documentation.pm index a944f3eb5b..32e50695f8 100644 --- a/tools/winapi_check/winapi_documentation.pm +++ b/tools/winapi_check/winapi_documentation.pm @@ -86,7 +86,9 @@ sub check_documentation { my $module2 = $6; my $ordinal2 = $7; - + if ($winapi->function_wine_extension(lc($module2), $external_name2)) { + $output->write("documentation: $external_name2 (\U$module2\E.$ordinal2) is a Wine extension \\\n$documentation\n"); + } if(length($1) != 1 || length($2) < 1 || length($4) < 1 || $5 ne "(" || $8 ne ")") @@ -104,8 +106,9 @@ sub check_documentation { } } } - if(($options->documentation_name && !$found_name) || - ($options->documentation_ordinal && !$found_ordinal)) + if((($options->documentation_name && !$found_name) || + ($options->documentation_ordinal && !$found_ordinal)) && + !$winapi->function_wine_extension($module, $external_name)) { $documentation_error = 1; $output->write("documentation: expected $external_name (\U$module\E.$ordinal): \\\n$documentation\n"); @@ -143,12 +146,14 @@ sub check_documentation { $ordinal eq $ordinal2 && ($external_name2 eq "@" || ($win16api->is_module($module2) && !$win16api->is_function_stub_in_module($module2, $external_name2)) || - ($win32api->is_module($module2) && !$win32api->is_function_stub_in_module($module2, $external_name2))) && + ($win32api->is_module($module2) && !$win32api->is_function_stub_in_module($module2, $external_name2))) || $modules->is_allowed_module_in_file($module2, "$current_dir/$file")) { $found = 1; last; } + + } if(!$found) { $output->write("documentation: $external_name (\U$module\E.$ordinal) wrong\n");