- API files update.

- Minor bug fixes.
This commit is contained in:
Patrik Stridvall 2004-02-20 19:57:42 +00:00 committed by Alexandre Julliard
parent 5a864b2f70
commit 9c39156efd
6 changed files with 657 additions and 90 deletions

View File

@ -244,6 +244,30 @@ VOID
BOOL16 BOOL16
WORD WORD
%%display.drv
%long
DWORD
%ptr
LPCURSORINFO16
struct tagCURSORICONINFO *
%str
LPSTR
%void
VOID
%word
BOOL16
WORD
%%gdi.exe %%gdi.exe
%long %long
@ -453,6 +477,40 @@ INT16
UINT16 UINT16
WORD WORD
%%keyboard.drv
%long
DWORD
LONG
%ptr
LPBYTE
LPKBINFO
LPVOID
%segptr
FARPROC16
%str
LPCSTR
LPSTR
%void
VOID
void
%word
CHAR
INT16
UINT16
WORD
%%lzexpand.dll %%lzexpand.dll
%long %long
@ -478,6 +536,24 @@ HFILE16
INT16 INT16
UINT16 UINT16
%%mouse.drv
%ptr
LPMOUSEINFO
%segptr
FARPROC16
%void
VOID
%word
WORD
%%mmsystem.dll %%mmsystem.dll
%long %long
@ -995,7 +1071,7 @@ BOOL16
INT16 INT16
UINT16 UINT16
%%system.dll %%system.drv
%long %long
@ -1133,6 +1209,7 @@ RECT16 *
SCROLLINFO * SCROLLINFO *
SEGPTR * SEGPTR *
UINT16 * UINT16 *
VA_LIST16
WINDOWPLACEMENT16 * WINDOWPLACEMENT16 *
WNDCLASS16 * WNDCLASS16 *
WNDCLASSEX16 * WNDCLASSEX16 *
@ -1427,6 +1504,7 @@ INT16 *
LPWSADATA16 LPWSADATA16
ULONG * ULONG *
char * char *
struct WS_in_addr
struct WS_sockaddr * struct WS_sockaddr *
struct WS_timeval * struct WS_timeval *
ws_fd_set16 * ws_fd_set16 *
@ -1440,10 +1518,6 @@ SEGPTR
LPCSTR LPCSTR
%unknown
struct in_addr
%void %void
void void

File diff suppressed because it is too large Load Diff

View File

@ -538,9 +538,10 @@ foreach my $file (@c_files) {
} else { } else {
$include = "$header"; $include = "$header";
} }
} elsif($header =~ /^(?:\.\.\/kernel\/(kernel_private\.h))$/) { # FIXME: Kludge } elsif($header =~ /^(?:kernel_private\.h)$/) { # FIXME: Kludge
my $header2 = $1; $include = "dlls/kernel/$header";
$include = "dlls/kernel/$header2"; } elsif($header =~ /^(?:gdi_private\.h)$/) { # FIXME: Kludge
$include = "dlls/gdi/$header";
} elsif($header =~ /^(?:ntdll_misc\.h)$/) { # FIXME: Kludge } elsif($header =~ /^(?:ntdll_misc\.h)$/) { # FIXME: Kludge
$include = "dlls/ntdll/$header"; $include = "dlls/ntdll/$header";
} elsif($header =~ /^(?:controls\.h|message\.h)$/) { # FIXME: Kludge } elsif($header =~ /^(?:controls\.h|message\.h)$/) { # FIXME: Kludge
@ -618,10 +619,14 @@ foreach my $file (@c_files) {
$include2info{$name}{used}++; $include2info{$name}{used}++;
} }
} }
} elsif($header =~ /^(?:\.\.\/kernel\/(kernel_private\.h))$/) { # FIXME: Kludge } elsif($header =~ /^(?:kernel_private\.h)$/) { # FIXME: Kludge
my $header2 = $1; $include2info{"dlls/kernel/$header"}{used}++;
$include2info{"dlls/kernel/$header2"}{used}++; foreach my $name (keys(%{$include2info{"dlls/kernel/$header"}{includes}})) {
foreach my $name (keys(%{$include2info{"dlls/kernel/$header2"}{includes}})) { $include2info{$name}{used}++;
}
} elsif($header =~ /^(?:gdi_private\.h)$/) { # FIXME: Kludge
$include2info{"dlls/gdi/$header"}{used}++;
foreach my $name (keys(%{$include2info{"dlls/gdi/$header"}{includes}})) {
$include2info{$name}{used}++; $include2info{$name}{used}++;
} }
} elsif($header =~ /^(?:ntdll_misc\.h)$/) { # FIXME: Kludge } elsif($header =~ /^(?:ntdll_misc\.h)$/) { # FIXME: Kludge
@ -629,7 +634,6 @@ foreach my $file (@c_files) {
foreach my $name (keys(%{$include2info{"dlls/ntdll/$header"}{includes}})) { foreach my $name (keys(%{$include2info{"dlls/ntdll/$header"}{includes}})) {
$include2info{$name}{used}++; $include2info{$name}{used}++;
} }
} elsif($header =~ /^(?:controls\.h|message\.h)$/) { # FIXME: Kludge } elsif($header =~ /^(?:controls\.h|message\.h)$/) { # FIXME: Kludge
$include2info{"dlls/user/$header"}{used}++; $include2info{"dlls/user/$header"}{used}++;
foreach my $name (keys(%{$include2info{"dlls/user/$header"}{includes}})) { foreach my $name (keys(%{$include2info{"dlls/user/$header"}{includes}})) {

View File

@ -125,13 +125,20 @@ sub check_documentation {
if(!$documentation_error && $options->documentation_wrong) { if(!$documentation_error && $options->documentation_wrong) {
foreach (split(/\n/, $documentation)) { foreach (split(/\n/, $documentation)) {
if(/^\s*\*\s*(\S+)\s*[\(\[]\s*(\w+)\s*\.\s*([^\s\)\]]*)\s*[\)\]].*?$/) { if (/^\s*\*\s*(\S+)\s*[\(\[]\s*(\w+(?:\.(?:DRV|VXD))?)\s*\.\s*([^\s\)\]]*)\s*[\)\]].*?$/) {
my $external_name = $1; my $external_name = $1;
my $module = $2; my $module = $2;
my $ordinal = $3; my $ordinal = $3;
if(!$options->documentation_pedantic && $ordinal ne "@") { if ($ordinal eq "@") {
# Nothing
} elsif ($ordinal =~ /^\d+$/) {
$ordinal = int($ordinal); $ordinal = int($ordinal);
} elsif ($ordinal eq "init") {
$ordinal = 0;
} else {
$output->write("documentation: $external_name (\U$module\E.$ordinal) wrong\n");
next;
} }
my $found = 0; my $found = 0;
@ -156,7 +163,8 @@ sub check_documentation {
} }
if(!$found) {
if (!$found && $external_name ne "DllMain" && $ordinal !~ /^0$/) {
$output->write("documentation: $external_name (\U$module\E.$ordinal) wrong\n"); $output->write("documentation: $external_name (\U$module\E.$ordinal) wrong\n");
} }
} }

View File

@ -147,7 +147,7 @@ sub _check_function {
} }
} }
my $declared_calling_convention = $winapi->function_internal_calling_convention($internal_name); my $declared_calling_convention = $winapi->function_internal_calling_convention($internal_name) || "";
my @declared_argument_kinds = split(/\s+/, $winapi->function_internal_arguments($internal_name)); my @declared_argument_kinds = split(/\s+/, $winapi->function_internal_arguments($internal_name));
my $declared_register = 0; my $declared_register = 0;
@ -171,16 +171,22 @@ sub _check_function {
} }
if($declared_calling_convention eq "varargs") { if($declared_calling_convention eq "varargs") {
if($#argument_types != -1 && $argument_types[$#argument_types] eq "...") { if ($#argument_types != -1 &&
(($winapi->name eq "win32" && $argument_types[$#argument_types] eq "...") ||
($winapi->name eq "win16" && $argument_types[$#argument_types] eq "VA_LIST16")))
{
pop @argument_types; pop @argument_types;
} else { } else {
$output->write("function not implemented as vararg\n"); $output->write("function not implemented as varargs\n");
} }
} elsif($#argument_types != -1 && $argument_types[$#argument_types] eq "...") { } elsif ($#argument_types != -1 &&
if($#argument_types == 0 || $winapi->name eq "win16") { (($winapi->name eq "win32" && $argument_types[$#argument_types] eq "...") ||
($winapi->name eq "win16" && $argument_types[$#argument_types] eq "VA_LIST16")))
{
if($#argument_types == 0) {
pop @argument_types; pop @argument_types;
} else { } else {
$output->write("function not declared as vararg\n"); $output->write("function not declared as varargs\n");
} }
} }

View File

@ -499,20 +499,29 @@ sub parse_c_file {
my @arguments32 = ("HWAVEOUT", $4); my @arguments32 = ("HWAVEOUT", $4);
&$function_begin($documentation_line, $documentation, &$function_begin($documentation_line, $documentation,
$function_line, "", "UINT16", "WINAPI", "waveOut" . $2 . "16", \@arguments16); $function_line, "", "UINT16", "WINAPI", "waveOut" . $2 . "16", \@arguments16);
&$function_end($., ""); &$function_end($function_line, "");
&$function_begin($documentation_line, $documentation, &$function_begin($documentation_line, $documentation,
$function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32); $function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32);
&$function_end($., ""); &$function_end($function_line, "");
} elsif($1 eq 2) { } elsif($1 eq 2) {
my @arguments16 = ("UINT16", $4); my @arguments16 = ("UINT16", $4);
my @arguments32 = ("UINT", $4); my @arguments32 = ("UINT", $4);
&$function_begin($documentation_line, $documentation, &$function_begin($documentation_line, $documentation,
$function_line, "", "UINT16", "WINAPI", "waveOut". $2 . "16", \@arguments16); $function_line, "", "UINT16", "WINAPI", "waveOut". $2 . "16", \@arguments16);
&$function_end($., ""); &$function_end($function_line, "");
&$function_begin($documentation_line, $documentation, &$function_begin($documentation_line, $documentation,
$function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32); $function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32);
&$function_end($., ""); &$function_end($function_line, "");
} }
} elsif(/DEFINE_THISCALL_WRAPPER\((\S*)\)/s) {
my @lines = split(/\n/, $&);
my $function_line = $. - scalar(@lines) + 1;
$_ = $'; $again = 1;
&$function_begin($documentation_line, $documentation,
$function_line, "", "void", "", "__thiscall_" . $1, \());
&$function_end($function_line, "");
} elsif(/DEFINE_REGS_ENTRYPOINT_\d+\(\s*(\S*)\s*,\s*([^\s,\)]*).*?\)/s) { } elsif(/DEFINE_REGS_ENTRYPOINT_\d+\(\s*(\S*)\s*,\s*([^\s,\)]*).*?\)/s) {
$_ = $'; $again = 1; $_ = $'; $again = 1;
$regs_entrypoints{$2} = $1; $regs_entrypoints{$2} = $1;