- API files update

- Minor bug fixes
This commit is contained in:
Patrik Stridvall 2002-01-07 21:08:18 +00:00 committed by Alexandre Julliard
parent 718b1b711b
commit aa4efd49b1
16 changed files with 55 additions and 42 deletions

View File

@ -12,6 +12,8 @@ UINT
int int
%ptr %ptr
ABORTPROC16
BITMAP16 * BITMAP16 *
BITMAPINFO * BITMAPINFO *
BITMAPINFOHEADER * BITMAPINFOHEADER *

View File

@ -54,6 +54,7 @@ UINT16 *
WINDOWPLACEMENT16 * WINDOWPLACEMENT16 *
WNDCLASS16 * WNDCLASS16 *
WNDCLASSEX16 * WNDCLASSEX16 *
WNDPROC
WORD * WORD *
void * void *

View File

@ -37,6 +37,7 @@ BITMAP *
BITMAPINFO * BITMAPINFO *
BITMAPINFOHEADER * BITMAPINFOHEADER *
COLORADJUSTMENT * COLORADJUSTMENT *
DCHOOKPROC
DEVMODEA * DEVMODEA *
DEVMODEW * DEVMODEW *
DOCINFOA * DOCINFOA *

View File

@ -49,6 +49,7 @@ UINT16
BOOL * BOOL *
BY_HANDLE_FILE_INFORMATION * BY_HANDLE_FILE_INFORMATION *
CHAR_INFO *
DWORD * DWORD *
CALINFO_ENUMPROCA CALINFO_ENUMPROCA
CONTEXT * CONTEXT *

View File

@ -27,14 +27,16 @@ ULONGLONG
__non_rtti_object * __non_rtti_object *
_HEAPINFO * _HEAPINFO *
_INITTERMFUN * _INITTERMFUN *
_JUMP_BUFFER *
_onexit_t _onexit_t
_onexit_t ** _onexit_t **
LPDWORD *
MSVCRT_EXCEPTION_FRAME * MSVCRT_EXCEPTION_FRAME *
MSVCRT_FILE * MSVCRT_FILE *
MSVCRT_compar_fn_t MSVCRT_compar_fn_t
MSVCRT_exception * MSVCRT_exception *
MSVCRT_fpos_t * MSVCRT_fpos_t *
MSVCRT_free_func
MSVCRT_malloc_func
MSVCRT_matherr_func MSVCRT_matherr_func
MSVCRT_new_handler_func MSVCRT_new_handler_func
MSVCRT_sig_handler_func MSVCRT_sig_handler_func
@ -56,7 +58,8 @@ char **
char *** char ***
exception * exception *
int * int *
jmp_buf struct __EXCEPTION_FRAME *
struct __EXCEPTION_FRAME **
struct _finddata_t * struct _finddata_t *
struct _diskfree_t * struct _diskfree_t *
struct _stat * struct _stat *

View File

@ -36,7 +36,6 @@ WCHAR
int int
long long
size_t
unsigned int unsigned int
unsigned long unsigned long
@ -69,6 +68,7 @@ PACE_HEADER *
PACL PACL
PACL * PACL *
PBOOLEAN PBOOLEAN
PCVOID
PDWORD PDWORD
PEXCEPTION_FRAME PEXCEPTION_FRAME
PEXCEPTION_RECORD PEXCEPTION_RECORD
@ -103,18 +103,17 @@ ULONGLONG *
UNICODE_STRING * UNICODE_STRING *
VOID * VOID *
struct _TEB * struct _TEB *
union cptable *
void * void *
%ptr --extension %ptr --extension
EXCEPTION_FRAME **
GUID * GUID *
WCHAR * WCHAR *
WCHAR *** WCHAR ***
char * char *
char *** char ***
enum __DEBUG_CLASS enum __DEBUG_CLASS
union generic_request *
va_list va_list
%str %str

View File

@ -8,6 +8,7 @@ HBITMAP
HDROP HDROP
HGLOBAL HGLOBAL
HMENU HMENU
HMODULE
HICON HICON
HINSTANCE HINSTANCE
HIMAGELIST HIMAGELIST
@ -22,7 +23,6 @@ ULONG
WORD WORD
WPARAM WPARAM
%long # --forbidden %long # --forbidden
int int
@ -32,6 +32,7 @@ int
CLSID * CLSID *
DLLVERSIONINFO * DLLVERSIONINFO *
DWORD * DWORD *
FARPROC
HICON * HICON *
HIMAGELIST * HIMAGELIST *
HWND * HWND *

View File

@ -15,8 +15,10 @@ HMENU
HMODULE HMODULE
HPALETTE HPALETTE
HRESULT HRESULT
HSHARED
HUSKEY HUSKEY
HWND HWND
LANGID
LPARAM LPARAM
LRESULT LRESULT
UCHAR UCHAR
@ -37,15 +39,19 @@ int
BOOL * BOOL *
DLLVERSIONINFO * DLLVERSIONINFO *
HICON * HICON *
IFACE_INDEX_TBL *
IStream * IStream *
ITEMIDLIST * ITEMIDLIST *
IUnknown * IUnknown *
IUnknown **
LPBROWSEINFOW LPBROWSEINFOW
LPBYTE
LPCITEMIDLIST LPCITEMIDLIST
LPCLSID LPCLSID
LPCSTR *
LPCVOID LPCVOID
LPCWSTR *
LPDWORD LPDWORD
LPHWND
LPINT LPINT
LPITEMIDLIST LPITEMIDLIST
LPOPENFILENAMEW LPOPENFILENAMEW
@ -57,7 +63,9 @@ LPSTRRET
LPUNKNOWN * LPUNKNOWN *
LPVOID LPVOID
LPVOID * LPVOID *
LPWORD
PHUSKEY PHUSKEY
PVOID
REFIID REFIID
REFGUID REFGUID
SHFILEINFOW * SHFILEINFOW *

View File

@ -5,7 +5,6 @@ CHAR
COLORREF COLORREF
DWORD DWORD
INT INT
HANDLE
HDC HDC
HBITMAP HBITMAP
HGDIOBJ HGDIOBJ

View File

@ -8,8 +8,10 @@ long
%ptr %ptr
IBindCtx * IBindCtx *
IBindCtx **
IBindStatusCallback * IBindStatusCallback *
IBindStatusCallback ** IBindStatusCallback **
IEnumFORMATETC *
IMoniker * IMoniker *
IMoniker ** IMoniker **
LPVOID * LPVOID *

View File

@ -53,6 +53,7 @@ BOOL16
INT16 INT16
HANDLE16 HANDLE16
HDRVR16 HDRVR16
HGLOBAL16
HMODULE16 HMODULE16
HINSTANCE16 HINSTANCE16
HTASK16 HTASK16
@ -73,6 +74,7 @@ DLGPROC
DRAWSTATEPROC DRAWSTATEPROC
GRAYSTRINGPROC GRAYSTRINGPROC
HANDLE * HANDLE *
HBRUSH *
HICON * HICON *
HKL * HKL *
HWND * HWND *
@ -145,10 +147,6 @@ DLGPROC16
HOOKPROC16 HOOKPROC16
WNDPROC16 WNDPROC16
%ptr # --forbidden
int *
%str %str
LPSTR LPSTR

View File

@ -1,22 +1,14 @@
%long %long
BOOL BOOL
BYTE DWORD
HANDLE HANDLE
INT
UINT UINT
ULONG_PTR int
WORD
%ptr %ptr
CONTEXT86 * DWORD *
BYTE *
DOSRELAY
PAPCFUNC
LPDOSTASK
LPVOID
%str %str

View File

@ -2,16 +2,19 @@
BOOL BOOL
DWORD DWORD
FILETIME
HINTERNET HINTERNET
HRESULT HRESULT
INTERNET_PORT INTERNET_PORT
%ptr %ptr
LPBYTE
LPCSTR * LPCSTR *
LPCVOID LPCVOID
LPDWORD LPDWORD
LPINTERNET_BUFFERSA LPINTERNET_BUFFERSA
LPINTERNET_CACHE_ENTRY_INFOA
LPURL_COMPONENTSA LPURL_COMPONENTSA
LPVOID LPVOID
LPWIN32_FIND_DATAA LPWIN32_FIND_DATAA

View File

@ -237,16 +237,24 @@ sub parse_spec_file {
my $ordinal; my $ordinal;
if(/^(\d+|@)\s+ if(/^(\d+|@)\s+
(pascal|pascal16|stdcall|cdecl|register|interrupt|varargs) (pascal|pascal16|stdcall|cdecl|varargs)\s+
(?:\s+(?:-noimport|-norelay|-i386|-ret64))*\s+(\S+)\s*\(\s*(.*?)\s*\)\s*(\S+)$/x) ((?:(?:-noimport|-norelay|-i386|-ret64|-register|-interrupt)\s+)*)(\S+)\s*\(\s*(.*?)\s*\)\s*(\S+)$/x)
{ {
my $calling_convention = $2; my $calling_convention = $2;
my $external_name = $3; my $flags = $3;
my $arguments = $4; my $external_name = $4;
my $internal_name = $5; my $arguments = $5;
my $internal_name = $6;
$ordinal = $1; $ordinal = $1;
$flags =~ s/\s+/ /g;
if($flags =~ /(?:-register|-interrupt)/) {
if($arguments) { $arguments .= " "; }
$arguments .= "ptr";
}
if(!$$function_internal_name{$external_name}) { if(!$$function_internal_name{$external_name}) {
$$function_internal_name{$external_name} = $internal_name; $$function_internal_name{$external_name} = $internal_name;
} else { } else {

View File

@ -127,16 +127,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));
if($declared_calling_convention =~ /^register|interrupt$/) { if($implemented_calling_convention ne $declared_calling_convention &&
push @declared_argument_kinds, "ptr";
}
if($declared_calling_convention =~ /^register|interupt$/ &&
(($winapi->name eq "win32" && $implemented_calling_convention eq "stdcall") ||
(($winapi->name eq "win16" && $implemented_calling_convention =~ /^pascal/))))
{
# correct
} elsif($implemented_calling_convention ne $declared_calling_convention &&
$implemented_calling_convention ne "asm" && $implemented_calling_convention ne "asm" &&
!($declared_calling_convention =~ /^pascal/ && $forbidden_return_type) && !($declared_calling_convention =~ /^pascal/ && $forbidden_return_type) &&
!($implemented_calling_convention =~ /^cdecl|varargs$/ && $declared_calling_convention =~ /^cdecl|varargs$/)) !($implemented_calling_convention =~ /^cdecl|varargs$/ && $declared_calling_convention =~ /^cdecl|varargs$/))
@ -178,7 +169,9 @@ sub _check_function {
my $type = $_; my $type = $_;
my $kind = "unknown"; my $kind = "unknown";
$winapi->type_used_in_module($type,$module); $winapi->type_used_in_module($type,$module);
if(!defined($kind = $winapi->translate_argument($type))) { if($type eq "CONTEXT86 *") {
$kind = "context86";
} elsif(!defined($kind = $winapi->translate_argument($type))) {
$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->allowed_type_in_module($type, $module)) {
@ -211,7 +204,9 @@ sub _check_function {
$argument_types[$n] = ""; $argument_types[$n] = "";
} }
if(!$winapi->is_allowed_kind($argument_kinds[$n]) || if($argument_kinds[$n] eq "context86") {
# Nothing
} elsif(!$winapi->is_allowed_kind($argument_kinds[$n]) ||
!$winapi->allowed_type_in_module($argument_types[$n], $module)) !$winapi->allowed_type_in_module($argument_types[$n], $module))
{ {
if($options->report_argument_forbidden($argument_types[$n])) { if($options->report_argument_forbidden($argument_types[$n])) {

View File

@ -528,7 +528,7 @@ sub parse_c_file {
&$type_end([@names]); &$type_end([@names]);
} elsif(/typedef\s+ } elsif(/typedef\s+
(?:(?:const\s+|enum\s+|long\s+|signed\s+|short\s+|struct\s+|union\s+|unsigned\s+)*?) (?:(?:const\s+|enum\s+|long\s+|signed\s+|short\s+|struct\s+|union\s+|unsigned\s+)*?)
(\w+)\s+ (\w+(?:\s*\*+\s*)?)\s+
(?:(\w+)\s*)? (?:(\w+)\s*)?
\((?:(\w+)\s+)?\s*\*\s*(\w+)\s*\)\s* \((?:(\w+)\s+)?\s*\*\s*(\w+)\s*\)\s*
(?:\(([^\)]*)\)|\[([^\]]*)\])\s*;/sx) (?:\(([^\)]*)\)|\[([^\]]*)\])\s*;/sx)