- API file update.

- Missing API file entries now only reported once.
This commit is contained in:
Patrik Stridvall 2002-03-23 21:39:31 +00:00 committed by Alexandre Julliard
parent f89d4a8673
commit 65dbf4f647
11 changed files with 118 additions and 10 deletions

View File

@ -202,6 +202,10 @@ dlls/msacm
dlls/msacm dlls/msacm
% dlls/msacm/msg711/msg711.drv.spec
dlls/msacm/msg711
% dlls/msnet32/msnet32.spec % dlls/msnet32/msnet32.spec
% dlls/msvideo/msvfw32.spec % dlls/msvideo/msvfw32.spec
@ -361,6 +365,10 @@ dlls/sti
dlls/ttydrv dlls/ttydrv
% dlls/twain/twain_32.spec
dlls/twain
% dlls/urlmon/urlmon.spec % dlls/urlmon/urlmon.spec
dlls/urlmon dlls/urlmon
@ -483,6 +491,10 @@ dlls/winmm/midimap
dlls/winmm/wavemap dlls/winmm/wavemap
% dlls/winmm/winearts/winearts.drv.spec
dlls/winmm/winearts
% dlls/winmm/wineoss/wineoss.drv.spec % dlls/winmm/wineoss/wineoss.drv.spec
dlls/winmm/wineoss dlls/winmm/wineoss

View File

@ -1 +1,17 @@
%long
BOOL
DWORD
HWND
UINT
int
%str
LPCSTR
LPSTR
%wstr
LPCWSTR
LPWSTR

View File

@ -0,0 +1,6 @@
%long
DWORD
LONG
HDRVR
UINT

View File

@ -2,9 +2,16 @@
BOOL BOOL
HDC HDC
UINT
ULONG ULONG
int
%ptr %ptr
BLENDFUNCTION
TRIVERTEX *
void * void *
%void
void

View File

@ -5,10 +5,10 @@ HRESULT
%ptr %ptr
CLSID *
DLLVERSIONINFO * DLLVERSIONINFO *
LPVOID * IID *
REFCLSID void **
REFIID
%wstr %wstr

View File

@ -68,6 +68,7 @@ LPVOID *
LPWORD LPWORD
PACL PACL
PHUSKEY PHUSKEY
PLONG
PSECURITY_DESCRIPTOR PSECURITY_DESCRIPTOR
PVOID PVOID
REFIID REFIID

View File

@ -0,0 +1,10 @@
%long
TW_UINT16
TW_UINT32
%ptr
TW_MEMREF
pTW_IDENTITY

View File

@ -7,6 +7,7 @@ long
%ptr %ptr
DWORD *
IBindCtx * IBindCtx *
IBindCtx ** IBindCtx **
IBindStatusCallback * IBindStatusCallback *
@ -14,10 +15,15 @@ IBindStatusCallback **
IEnumFORMATETC * IEnumFORMATETC *
IMoniker * IMoniker *
IMoniker ** IMoniker **
LPVOID
LPVOID * LPVOID *
REFCLSID REFCLSID
REFIID REFIID
%str
LPCSTR
%wstr %wstr
LPCWSTR LPCWSTR

View File

@ -0,0 +1,7 @@
%long
WORD
DWORD
LONG
HDRVR
UINT

View File

@ -437,6 +437,16 @@ sub is_allowed_kind {
} else { } else {
return 0; return 0;
} }
}
sub allow_kind {
my $self = shift;
my $allowed_kind = \%{$self->{ALLOWED_KIND}};
my $kind = shift;
$$allowed_kind{$kind}++;
} }
sub is_limited_type { sub is_limited_type {
@ -448,7 +458,7 @@ sub is_limited_type {
return $$allowed_modules_limited{$type}; return $$allowed_modules_limited{$type};
} }
sub allowed_type_in_module { sub is_allowed_type_in_module {
my $self = shift; my $self = shift;
my $allowed_modules = \%{$self->{ALLOWED_MODULES}}; my $allowed_modules = \%{$self->{ALLOWED_MODULES}};
my $allowed_modules_limited = \%{$self->{ALLOWED_MODULES_LIMITED}}; my $allowed_modules_limited = \%{$self->{ALLOWED_MODULES_LIMITED}};
@ -465,6 +475,18 @@ sub allowed_type_in_module {
return 0; return 0;
} }
sub allow_type_in_module {
my $self = shift;
my $allowed_modules = \%{$self->{ALLOWED_MODULES}};
my $type = shift;
my @modules = split(/ \& /, shift);
foreach my $module (@modules) {
$$allowed_modules{$type}{$module}++;
}
}
sub type_used_in_module { sub type_used_in_module {
my $self = shift; my $self = shift;
my $used_modules = \%{$self->{USED_MODULES}}; my $used_modules = \%{$self->{USED_MODULES}};
@ -523,9 +545,19 @@ sub translate_argument {
my $self = shift; my $self = shift;
my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}}; my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}};
my $argument = shift; my $type = shift;
return $$translate_argument{$argument}; return $$translate_argument{$type};
}
sub declare_argument {
my $self = shift;
my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}};
my $type = shift;
my $kind = shift;
$$translate_argument{$type} = $kind;
} }
sub all_declared_types { sub all_declared_types {

View File

@ -92,11 +92,16 @@ sub _check_function {
my $implemented_return_kind; my $implemented_return_kind;
$winapi->type_used_in_module($return_type,$module); $winapi->type_used_in_module($return_type,$module);
if(!defined($implemented_return_kind = $winapi->translate_argument($return_type))) { if(!defined($implemented_return_kind = $winapi->translate_argument($return_type))) {
$winapi->declare_argument($return_type, "unknown");
if($return_type ne "") { if($return_type ne "") {
$output->write("no translation defined: " . $return_type . "\n"); $output->write("no translation defined: " . $return_type . "\n");
} }
} elsif(!$winapi->is_allowed_kind($implemented_return_kind) || !$winapi->allowed_type_in_module($return_type,$module)) { } elsif(!$winapi->is_allowed_kind($implemented_return_kind) ||
!$winapi->is_allowed_type_in_module($return_type, $module))
{
$forbidden_return_type = 1; $forbidden_return_type = 1;
$winapi->allow_kind($implemented_return_kind);
$winapi->allow_type_in_module($return_type, $module);
if($options->report_argument_forbidden($return_type)) { if($options->report_argument_forbidden($return_type)) {
$output->write("return type is forbidden: $return_type ($implemented_return_kind)\n"); $output->write("return type is forbidden: $return_type ($implemented_return_kind)\n");
} }
@ -190,11 +195,15 @@ sub _check_function {
if($type eq "CONTEXT86 *") { if($type eq "CONTEXT86 *") {
$kind = "context86"; $kind = "context86";
} elsif(!defined($kind = $winapi->translate_argument($type))) { } elsif(!defined($kind = $winapi->translate_argument($type))) {
$winapi->declare_argument($type, "unknown");
$output->write("no translation defined: " . $type . "\n"); $output->write("no translation defined: " . $type . "\n");
} elsif(!$winapi->is_allowed_kind($kind) || } elsif(!$winapi->is_allowed_kind($kind) ||
!$winapi->allowed_type_in_module($type, $module)) { !$winapi->is_allowed_type_in_module($type, $module))
{
$winapi->allow_kind($kind);
$winapi->allow_type_in_module($type, $module);
if($options->report_argument_forbidden($type)) { if($options->report_argument_forbidden($type)) {
$output->write("forbidden argument " . ($n + 1) . " type " . $type . " (" . $kind . ")\n"); $output->write("argument " . ($n + 1) . " type is forbidden: " . $type . " (" . $kind . ")\n");
} }
} }
@ -225,8 +234,10 @@ sub _check_function {
if($argument_kinds[$n] eq "context86") { if($argument_kinds[$n] eq "context86") {
# Nothing # Nothing
} elsif(!$winapi->is_allowed_kind($argument_kinds[$n]) || } elsif(!$winapi->is_allowed_kind($argument_kinds[$n]) ||
!$winapi->allowed_type_in_module($argument_types[$n], $module)) !$winapi->is_allowed_type_in_module($argument_types[$n], $module))
{ {
$winapi->allow_kind($argument_kinds[$n]);
$winapi->allow_type_in_module($argument_types[$n],, $module);
if($options->report_argument_forbidden($argument_types[$n])) { if($options->report_argument_forbidden($argument_types[$n])) {
$output->write("argument " . ($n + 1) . " type is forbidden: " . $output->write("argument " . ($n + 1) . " type is forbidden: " .
"$argument_types[$n] ($argument_kinds[$n])\n"); "$argument_types[$n] ($argument_kinds[$n])\n");