diff --git a/tools/winapi_check/modules.dat b/tools/winapi_check/modules.dat index 388828aa821..a0eafd28413 100644 --- a/tools/winapi_check/modules.dat +++ b/tools/winapi_check/modules.dat @@ -26,6 +26,8 @@ dlls/commdlg % dlls/crtdll/crtdll.spec +dlls/crtdll + % dlls/dciman32/dciman32.spec dlls/dciman32 @@ -464,6 +466,10 @@ dlls/wsock32 dlls/winspool +% dlls/wintrust/wintrust.spec + +dlls/wintrust + % dlls/wow32/wow32.spec % dlls/x11drv/x11drv.spec diff --git a/tools/winapi_check/win16/compobj.api b/tools/winapi_check/win16/compobj.api index 7c1eb3bd241..842ff1d3356 100644 --- a/tools/winapi_check/win16/compobj.api +++ b/tools/winapi_check/win16/compobj.api @@ -12,6 +12,7 @@ INT %ptr CLSID * +COSERVERINFO * FILETIME * GUID * HTASK16 * diff --git a/tools/winapi_check/win16/setupx.api b/tools/winapi_check/win16/setupx.api index 5e5e4829a46..d41655f6748 100644 --- a/tools/winapi_check/win16/setupx.api +++ b/tools/winapi_check/win16/setupx.api @@ -2,15 +2,18 @@ DWORD LPARAM +int %ptr HINF16 * LPBYTE LPDWORD +LPEXPANDVTBL LPHKEY LPLOGDISKDESC LPLPDEVICE_INFO16 +LPVOID VIFPROC %str @@ -31,4 +34,7 @@ HINSTANCE16 HKEY HWND16 RETERR16 +UINT16 +VHSTR WORD +WPARAM diff --git a/tools/winapi_check/win16/user.api b/tools/winapi_check/win16/user.api index 48c69953bb9..91f200cb419 100644 --- a/tools/winapi_check/win16/user.api +++ b/tools/winapi_check/win16/user.api @@ -13,7 +13,6 @@ POINT16 BOOL INT UINT -HINSTANCE %ptr diff --git a/tools/winapi_check/win32/crtdll.api b/tools/winapi_check/win32/crtdll.api index e69de29bb2d..0ad646f05dd 100644 --- a/tools/winapi_check/win32/crtdll.api +++ b/tools/winapi_check/win32/crtdll.api @@ -0,0 +1,13 @@ +%long + +int +size_t + +%ptr + +char *** +int * + +%void + +void diff --git a/tools/winapi_check/win32/kernel32.api b/tools/winapi_check/win32/kernel32.api index 97e8a3786a8..6dfa93e18e4 100644 --- a/tools/winapi_check/win32/kernel32.api +++ b/tools/winapi_check/win32/kernel32.api @@ -8,6 +8,7 @@ CALID CALTYPE COORD DWORD +EXECUTION_STATE LCTYPE HANDLE HFILE diff --git a/tools/winapi_check/win32/msvcrt.api b/tools/winapi_check/win32/msvcrt.api index ca27878c5a1..30660f69eb3 100644 --- a/tools/winapi_check/win32/msvcrt.api +++ b/tools/winapi_check/win32/msvcrt.api @@ -8,16 +8,16 @@ DWORD HANDLE INT LONG +MSVCRT_clock_t MSVCRT_complex +MSVCRT_size_t +MSVCRT_time_t ULONG WCHAR -clock_t int long unsigned int unsigned long -size_t -time_t %longlong @@ -26,24 +26,22 @@ ULONGLONG %ptr -DWORD * +__non_rtti_object * +_HEAPINFO * +_INITTERMFUN * +_onexit_t +_onexit_t ** LPDWORD * -LPTHREAD_START_ROUTINE -MSVCRT__INITTERMFUN * MSVCRT_EXCEPTION_FRAME * MSVCRT_FILE * -MSVCRT_HEAPINFO * -MSVCRT_atexit_func -MSVCRT_atexit_func ** -MSVCRT_comp_func -MSVCRT_diskfree_t * -MSVCRT_finddata_t * +MSVCRT_compar_fn_t +MSVCRT_exception * MSVCRT_fpos_t * MSVCRT_matherr_func MSVCRT_new_handler_func MSVCRT_sig_handler_func -MSVCRT_timeb * -MSVCRT_wfinddata_t * +MSVCRT_time_t * +MSVCRT_wint_t PCONTEXT PEXCEPTION_FRAME PEXCEPTION_FRAME * @@ -53,7 +51,6 @@ WCHAR * WCHAR ** WCHAR *** WORD ** -__non_rtti_object * bad_cast * bad_typeid * char * @@ -62,9 +59,12 @@ char *** exception * int * jmp_buf +struct _finddata_t * +struct _diskfree_t * struct _stat * +struct _timeb * struct _utimbuf * -time_t * +struct _wfinddata_t * type_info * unsigned char * unsigned int * @@ -78,8 +78,8 @@ LPCSTR %unknown -div_t -ldiv_t +MSVCRT_div_t +MSVCRT_ldiv_t %void diff --git a/tools/winapi_check/win32/ntdll.api b/tools/winapi_check/win32/ntdll.api index cd52f17b427..f6ef31d3b3d 100644 --- a/tools/winapi_check/win32/ntdll.api +++ b/tools/winapi_check/win32/ntdll.api @@ -114,7 +114,7 @@ WCHAR *** char * char *** enum __DEBUG_CLASS -enum request +union generic_request * va_list %str diff --git a/tools/winapi_check/win32/ole32.api b/tools/winapi_check/win32/ole32.api index 4f4acd4d4ea..27bb743e772 100644 --- a/tools/winapi_check/win32/ole32.api +++ b/tools/winapi_check/win32/ole32.api @@ -54,6 +54,7 @@ LPENUMFORMATETC * LPENUMOLEVERB * LPFILETIME LPFORMATETC +LPGUID LPLOCKBYTES * LPMALLOC * LPMESSAGEFILTER diff --git a/tools/winapi_check/win32/ttydrv.api b/tools/winapi_check/win32/ttydrv.api index 4107f737611..2932ae66814 100644 --- a/tools/winapi_check/win32/ttydrv.api +++ b/tools/winapi_check/win32/ttydrv.api @@ -5,6 +5,9 @@ CHAR DWORD INT HANDLE +HDC +HRGN +HWND LONG UINT WORD @@ -18,7 +21,7 @@ int %ptr BYTE * -KEYBOARD_CONFIG * +WINDOWPOS * LPBYTE LPDIDEVICEOBJECTDATA LPDWORD diff --git a/tools/winapi_check/win32/user32.api b/tools/winapi_check/win32/user32.api index ed675a4508c..a7b4f1a6112 100644 --- a/tools/winapi_check/win32/user32.api +++ b/tools/winapi_check/win32/user32.api @@ -143,6 +143,10 @@ DLGPROC16 HOOKPROC16 WNDPROC16 +%ptr # --forbidden + +int * + %str LPSTR diff --git a/tools/winapi_check/win32/version.api b/tools/winapi_check/win32/version.api index e839c7d6b82..201b2625ff5 100644 --- a/tools/winapi_check/win32/version.api +++ b/tools/winapi_check/win32/version.api @@ -1,5 +1,6 @@ %long +BOOL DWORD UINT diff --git a/tools/winapi_check/win32/wintrust.api b/tools/winapi_check/win32/wintrust.api new file mode 100644 index 00000000000..6c49e59e462 --- /dev/null +++ b/tools/winapi_check/win32/wintrust.api @@ -0,0 +1,9 @@ +%long + +HWND +LONG + +%ptr + +GUID * +LPVOID diff --git a/tools/winapi_check/win32/ws2_32.api b/tools/winapi_check/win32/ws2_32.api index 9a20ad9941f..1005731cbaf 100644 --- a/tools/winapi_check/win32/ws2_32.api +++ b/tools/winapi_check/win32/ws2_32.api @@ -24,6 +24,7 @@ FARPROC INT * LPDWORD LPVOID +LPWSABUF LPWSADATA LPWSAOVERLAPPED LPWSAOVERLAPPED_COMPLETION_ROUTINE diff --git a/tools/winapi_check/win32/x11drv.api b/tools/winapi_check/win32/x11drv.api index ee864a4667c..257c712c9f2 100644 --- a/tools/winapi_check/win32/x11drv.api +++ b/tools/winapi_check/win32/x11drv.api @@ -4,6 +4,10 @@ BOOL CHAR DWORD HANDLE +HDC +HICON +HRGN +HWND INT LONG UINT @@ -19,12 +23,12 @@ int BYTE * CURSORICONINFO * -KEYBOARD_CONFIG * LPBYTE LPDIDEVICEOBJECTDATA LPDWORD LPMOUSE_EVENT_PROC LPVOID +WINDOWPOS * WND * %str @@ -34,6 +38,7 @@ LPSTR %wstr +LPCWSTR LPWSTR %void diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check index 9e963f3f8ea..d85484a1b5c 100755 --- a/tools/winapi_check/winapi_check +++ b/tools/winapi_check/winapi_check @@ -100,6 +100,16 @@ sub file_type { } } +sub file_skip { + local $_ = shift; + + if(/agl.c$/) { + return 1; + } + + return 0; +} + my $modules = 'modules'->new($options, $output, $wine_dir, $current_dir, \&file_type, "$winapi_check_dir/modules.dat"); my $win16api = 'winapi'->new($options, $output, "win16", "$winapi_check_dir/win16"); @@ -267,7 +277,11 @@ foreach my $file ($options->c_files) { } my $file_type = file_type($file); - + + if(file_skip($file)) { + next; + } + my $found_function = sub { my $documentation = shift; my $linkage = shift; @@ -308,6 +322,11 @@ foreach my $file ($options->c_files) { $modules->found_module_in_dir($module32, $file_dir); } + my $previous_function; + if(defined($functions{$internal_name})) { + $previous_function = $functions{$internal_name}; + } + my $function = 'winapi_function'->new; $functions{$internal_name} = $function; @@ -440,6 +459,7 @@ foreach my $file ($options->c_files) { } if($options->local && $options->documentation && + !defined($previous_function) && (defined($module16) || defined($module32)) && $linkage ne "extern" && $statements) { diff --git a/tools/winapi_check/winapi_documentation.pm b/tools/winapi_check/winapi_documentation.pm index 2b73e63492e..f162d070f8c 100644 --- a/tools/winapi_check/winapi_documentation.pm +++ b/tools/winapi_check/winapi_documentation.pm @@ -129,7 +129,8 @@ sub check_documentation { } if($options->documentation_pedantic) { - if($documentation !~ /^ \*\s+(?:\@|\w+)(?:\s+\(\w+\.(?:\@|\d+)\))+/m) { + my $ordinal = $win16api->function_ordinal($internal_name); + if(defined($ordinal) && $documentation !~ /^ \*\s+(?:\@|\w+)(?:\s+[\(\[]\w+\.(?:\@|\d+)[\)\]])+/m) { $output->write("documentation: pedantic check failed \\\n$documentation\n"); } }