Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
20ca0011
Commit
20ca0011
authored
Jun 19, 2001
by
Patrik Stridvall
Committed by
Alexandre Julliard
Jun 19, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Slightly better handling of external/internal names.
- Minor bug fixes. - Minor API files update.
parent
163652b3
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
161 additions
and
144 deletions
+161
-144
modules.dat
tools/winapi_check/modules.dat
+0
-2
nativeapi.dat
tools/winapi_check/nativeapi.dat
+3
-0
preprocessor.pm
tools/winapi_check/preprocessor.pm
+1
-1
avifil32.api
tools/winapi_check/win32/avifil32.api
+6
-0
crtdll.api
tools/winapi_check/win32/crtdll.api
+0
-1
msvcrt.api
tools/winapi_check/win32/msvcrt.api
+4
-10
ole32.api
tools/winapi_check/win32/ole32.api
+0
-3
shell32.api
tools/winapi_check/win32/shell32.api
+0
-1
w32skrnl.api
tools/winapi_check/win32/w32skrnl.api
+0
-4
wow32.api
tools/winapi_check/win32/wow32.api
+0
-14
wsock32.api
tools/winapi_check/win32/wsock32.api
+0
-23
winapi.pm
tools/winapi_check/winapi.pm
+102
-47
winapi_check
tools/winapi_check/winapi_check
+19
-19
winapi_documentation.pm
tools/winapi_check/winapi_documentation.pm
+7
-9
winapi_global.pm
tools/winapi_check/winapi_global.pm
+5
-5
winapi_local.pm
tools/winapi_check/winapi_local.pm
+8
-4
winapi_options.pm
tools/winapi_check/winapi_options.pm
+5
-0
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+1
-1
No files found.
tools/winapi_check/modules.dat
View file @
20ca0011
...
...
@@ -344,7 +344,6 @@ controls
dlls/kernel
dlls/user
memory
misc
windows
% dlls/user/user32.spec
...
...
@@ -352,7 +351,6 @@ windows
controls
dlls/user
loader
misc
windows
% dlls/version/ver.spec
...
...
tools/winapi_check/nativeapi.dat
View file @
20ca0011
...
...
@@ -13,6 +13,8 @@ _lwp_exit
_lwp_makecontext
_lxstat
_sysconf
_tolower
_toupper
_xmknod
_xstat
abs
...
...
@@ -242,6 +244,7 @@ tolower
toupper
towlower
towupper
tzset
unlink
usleep
utime
...
...
tools/winapi_check/preprocessor.pm
View file @
20ca0011
...
...
@@ -78,7 +78,7 @@ sub begin_if {
}
}
elsif
(
/^(\w+)\s*(<|<=|==|!=|>=|>)\s*(\w+)\s*((\&\&|\|\|)\s*)?/
)
{
$_
=
$'
;
}
elsif
(
/^(\w+)\s*$/
)
{
}
elsif
(
/^(
!)?(
\w+)\s*$/
)
{
$_
=
$'
;
}
elsif
(
/^\(|\)/
)
{
$_
=
$'
;
...
...
tools/winapi_check/win32/avifil32.api
View file @
20ca0011
...
...
@@ -17,6 +17,7 @@ CLSID *
LONG *
LPBITMAPINFOHEADER
LPCLSID
LPLONG
LPVOID
PAVIFILE
PAVIFILE *
...
...
@@ -31,3 +32,7 @@ LPCSTR
%void
void
%wstr
LPCWSTR
\ No newline at end of file
tools/winapi_check/win32/crtdll.api
View file @
20ca0011
%long
int
size_t
%ptr
...
...
tools/winapi_check/win32/msvcrt.api
View file @
20ca0011
...
...
@@ -5,17 +5,16 @@ double
%long
DWORD
HANDLE
INT
LONG
MSVCRT_clock_t
MSVCRT_complex
MSVCRT_size_t
MSVCRT_time_t
ULONG
WCHAR
int
long
size_t
unsigned int
unsigned long
...
...
@@ -73,10 +72,10 @@ unsigned int *
va_list
void *
%
str
%
ptr --extension
LPSTR
LPCSTR
_beginthread_start_routine_t
_beginthreadex_start_routine_t
%unknown
...
...
@@ -87,8 +86,3 @@ MSVCRT_ldiv_t
void
VOID
%wstr
LPCWSTR
LPWSTR
tools/winapi_check/win32/ole32.api
View file @
20ca0011
...
...
@@ -14,7 +14,6 @@ HWND
INT
UINT
ULONG
WORD
%long # --forbidden
...
...
@@ -52,7 +51,6 @@ LPDROPTARGET
LPDWORD
LPENUMFORMATETC *
LPENUMOLEVERB *
LPFILETIME
LPFORMATETC
LPGUID
LPLOCKBYTES *
...
...
@@ -77,7 +75,6 @@ LPUNKNOWN
LPUNKNOWN *
LPVOID
LPVOID *
LPWORD
LPSTORAGE
LPSTREAM *
MULTI_QI *
...
...
tools/winapi_check/win32/shell32.api
View file @
20ca0011
...
...
@@ -19,7 +19,6 @@ LONG
LRESULT
UINT
ULONG
WCHAR
WORD
WPARAM
...
...
tools/winapi_check/win32/w32skrnl.api
View file @
20ca0011
%long
DWORD
%long # --forbidden
HTASK16
...
...
tools/winapi_check/win32/wow32.api
View file @
20ca0011
%long
BOOL
DWORD
HANDLE
WORD
WOW_HANDLE_TYPE
%ptr
LPDWORD
LPVOID
PDWORD
WORD *
tools/winapi_check/win32/wsock32.api
View file @
20ca0011
%long
BOOL
DWORD
HANDLE
HWND
INT
LONG
UINT
SOCKET
u_long
u_short
%long # --forbidden
SOCKET16
long
%ptr
FARPROC
INT *
LPDWORD
LPINT
LPVOID
LPWSADATA
ULONG *
WIN_hostent *
WIN_protoent *
WIN_servent *
char *
struct netent *
struct sockaddr *
struct timeval *
ws_fd_set32 *
%str
LPCSTR
LPSTR
%void
void
%unknown
struct in_addr
\ No newline at end of file
tools/winapi_check/winapi.pm
View file @
20ca0011
...
...
@@ -228,14 +228,18 @@ sub parse_spec_file {
my
$options
=
\
$
{
$self
->
{
OPTIONS
}};
my
$output
=
\
$
{
$self
->
{
OUTPUT
}};
my
$function_arguments
=
\%
{
$self
->
{
FUNCTION_ARGUMENTS
}};
my
$function_ordinal
=
\%
{
$self
->
{
FUNCTION_ORDINAL
}};
my
$function_calling_convention
=
\%
{
$self
->
{
FUNCTION_CALLING_CONVENTION
}};
my
$function_internal_arguments
=
\%
{
$self
->
{
FUNCTION_INTERNAL_ARGUMENTS
}};
my
$function_external_arguments
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_ARGUMENTS
}};
my
$function_internal_ordinal
=
\%
{
$self
->
{
FUNCTION_INTERNAL_ORDINAL
}};
my
$function_external_ordinal
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_ORDINAL
}};
my
$function_internal_calling_convention
=
\%
{
$self
->
{
FUNCTION_INTERNAL_CALLING_CONVENTION
}};
my
$function_external_calling_convention
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_CALLING_CONVENTION
}};
my
$function_internal_name
=
\%
{
$self
->
{
FUNCTION_INTERNAL_NAME
}};
my
$function_external_name
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_NAME
}};
my
$function_stub
=
\%
{
$self
->
{
FUNCTION_STUB
}};
my
$function_forward
=
\%
{
$self
->
{
FUNCTION_FORWARD
}};
my
$function_module
=
\%
{
$self
->
{
FUNCTION_MODULE
}};
my
$function_internal_module
=
\%
{
$self
->
{
FUNCTION_INTERNAL_MODULE
}};
my
$function_external_module
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_MODULE
}};
my
$modules
=
\%
{
$self
->
{
MODULES
}};
my
$module_files
=
\%
{
$self
->
{
MODULE_FILES
}};
...
...
@@ -283,18 +287,29 @@ sub parse_spec_file {
# FIXME: Internal name existing more than once not handled properly
$$function_internal_name
{
$external_name
}
=
$internal_name
;
$$function_external_name
{
$internal_name
}
=
$external_name
;
$$function_arguments
{
$internal_name
}
=
$arguments
;
$$function_ordinal
{
$internal_name
}
=
$ordinal
;
$$function_calling_convention
{
$internal_name
}
=
$calling_convention
;
if
(
!
$$function_module
{
$internal_name
})
{
$$function_module
{
$internal_name
}
=
"$module"
;
}
elsif
(
$$function_module
{
$internal_name
}
!~
/$module/
)
{
$$function_internal_arguments
{
$internal_name
}
=
$arguments
;
$$function_external_arguments
{
$external_name
}
=
$arguments
;
$$function_internal_ordinal
{
$internal_name
}
=
$ordinal
;
$$function_external_ordinal
{
$external_name
}
=
$ordinal
;
$$function_internal_calling_convention
{
$internal_name
}
=
$calling_convention
;
$$function_external_calling_convention
{
$external_name
}
=
$calling_convention
;
if
(
!
$$function_internal_module
{
$internal_name
})
{
$$function_internal_module
{
$internal_name
}
=
"$module"
;
}
elsif
(
$$function_internal_module
{
$internal_name
}
!~
/$module/
)
{
if
(
0
)
{
$$output
->
write
(
"$file: $external_name: the internal function ($internal_name) "
.
"already belongs to a module ($$function_module{$internal_name})\n"
);
"already belongs to a module ($$function_
internal_
module{$internal_name})\n"
);
}
$$function_module
{
$internal_name
}
.=
" & $module"
;
$$function_internal_module
{
$internal_name
}
.=
" & $module"
;
}
if
(
!
$$function_external_module
{
$external_name
})
{
$$function_external_module
{
$external_name
}
=
"$module"
;
}
elsif
(
$$function_external_module
{
$external_name
}
!~
/$module/
)
{
if
(
0
)
{
$$output
->
write
(
"$file: $internal_name: the external function ($external_name) "
.
"already belongs to a module ($$function_external_module{$external_name})\n"
);
}
$$function_external_module
{
$external_name
}
.=
" & $module"
;
}
if
(
0
&&
$$options
->
spec_mismatch
)
{
...
...
@@ -346,10 +361,17 @@ sub parse_spec_file {
# FIXME: Internal name existing more than once not handled properly
$$function_stub
{
$internal_name
}
=
1
;
if
(
!
$$function_module
{
$internal_name
})
{
$$function_module
{
$internal_name
}
=
"$module"
;
}
elsif
(
$$function_module
{
$internal_name
}
!~
/$module/
)
{
$$function_module
{
$internal_name
}
.=
" & $module"
;
$$function_internal_ordinal
{
$internal_name
}
=
$ordinal
;
$$function_external_ordinal
{
$external_name
}
=
$ordinal
;
if
(
!
$$function_internal_module
{
$internal_name
})
{
$$function_internal_module
{
$internal_name
}
=
"$module"
;
}
elsif
(
$$function_internal_module
{
$internal_name
}
!~
/$module/
)
{
$$function_internal_module
{
$internal_name
}
.=
" & $module"
;
}
if
(
!
$$function_external_module
{
$external_name
})
{
$$function_external_module
{
$external_name
}
=
"$module"
;
}
elsif
(
$$function_external_module
{
$external_name
}
!~
/$module/
)
{
$$function_external_module
{
$external_name
}
.=
" & $module"
;
}
}
elsif
(
/^(\d+|@)\s+forward(?:\s+(?:-noimport|-norelay|-i386|-ret64))?\s+(\S+)\s+(\S+)\.(\S+)$/
)
{
$ordinal
=
$1
;
...
...
@@ -381,11 +403,8 @@ sub parse_spec_file {
close
(
IN
);
$$modules
{
$module
}
++
;
if
(
defined
(
$module_file
))
{
$$module_files
{
$module
}
=
$module_file
;
}
else
{
$$module_files
{
$module
}
=
"$module.drv"
;
}
$$module_files
{
$module
}
=
$file
;
}
sub
name
{
...
...
@@ -584,23 +603,23 @@ sub module_file {
return
$$module_files
{
$module
};
}
sub
all_functions
{
sub
all_
internal_
functions
{
my
$self
=
shift
;
my
$function_
calling_convention
=
\%
{
$self
->
{
FUNCTION
_CALLING_CONVENTION
}};
my
$function_
internal_calling_convention
=
\%
{
$self
->
{
FUNCTION_INTERNAL
_CALLING_CONVENTION
}};
return
sort
(
keys
(
%
$function_calling_convention
));
return
sort
(
keys
(
%
$function_
internal_
calling_convention
));
}
sub
all_functions_in_module
{
sub
all_
internal_
functions_in_module
{
my
$self
=
shift
;
my
$function_
calling_convention
=
\%
{
$self
->
{
FUNCTION
_CALLING_CONVENTION
}};
my
$function_
module
=
\%
{
$self
->
{
FUNCTION
_MODULE
}};
my
$function_
internal_calling_convention
=
\%
{
$self
->
{
FUNCTION_INTERNAL
_CALLING_CONVENTION
}};
my
$function_
internal_module
=
\%
{
$self
->
{
FUNCTION_INTERNAL
_MODULE
}};
my
$module
=
shift
;
my
@names
;
foreach
my
$name
(
keys
(
%
$function_calling_convention
))
{
if
(
$$function_module
{
$name
}
eq
$module
)
{
foreach
my
$name
(
keys
(
%
$function_
internal_
calling_convention
))
{
if
(
$$function_
internal_
module
{
$name
}
eq
$module
)
{
push
@names
,
$name
;
}
}
...
...
@@ -615,29 +634,47 @@ sub all_functions_stub {
return
sort
(
keys
(
%
$function_stub
));
}
sub
all_functions_found
{
sub
all_
internal_
functions_found
{
my
$self
=
shift
;
my
$function_found
=
\%
{
$self
->
{
FUNCTION_FOUND
}};
return
sort
(
keys
(
%
$function_found
));
}
sub
function_ordinal
{
sub
function_internal_ordinal
{
my
$self
=
shift
;
my
$function_internal_ordinal
=
\%
{
$self
->
{
FUNCTION_INTERNAL_ORDINAL
}};
my
$name
=
shift
;
return
$$function_internal_ordinal
{
$name
};
}
sub
function_external_ordinal
{
my
$self
=
shift
;
my
$function_external_ordinal
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_ORDINAL
}};
my
$name
=
shift
;
return
$$function_external_ordinal
{
$name
};
}
sub
function_internal_calling_convention
{
my
$self
=
shift
;
my
$function_
ordinal
=
\%
{
$self
->
{
FUNCTION_ORDINAL
}};
my
$function_
internal_calling_convention
=
\%
{
$self
->
{
FUNCTION_INTERNAL_CALLING_CONVENTION
}};
my
$name
=
shift
;
return
$$function_
ordinal
{
$name
};
return
$$function_
internal_calling_convention
{
$name
};
}
sub
function_calling_convention
{
sub
function_
external_
calling_convention
{
my
$self
=
shift
;
my
$function_
calling_convention
=
\%
{
$self
->
{
FUNCTION
_CALLING_CONVENTION
}};
my
$function_
external_calling_convention
=
\%
{
$self
->
{
FUNCTION_EXTERNAL
_CALLING_CONVENTION
}};
my
$name
=
shift
;
return
$$function_calling_convention
{
$name
};
return
$$function_
external_
calling_convention
{
$name
};
}
sub
function_external_name
{
...
...
@@ -651,11 +688,11 @@ sub function_external_name {
sub
is_function
{
my
$self
=
shift
;
my
$function_
calling_convention
=
\%
{
$self
->
{
FUNCTION
_CALLING_CONVENTION
}};
my
$function_
internal_calling_convention
=
\%
{
$self
->
{
FUNCTION_INTERNAL
_CALLING_CONVENTION
}};
my
$name
=
shift
;
return
$$function_calling_convention
{
$name
};
return
$$function_
internal_
calling_convention
{
$name
};
}
sub
is_shared_function
{
...
...
@@ -676,22 +713,40 @@ sub found_shared_function {
$$function_shared
{
$name
}
=
1
;
}
sub
function_arguments
{
sub
function_internal_arguments
{
my
$self
=
shift
;
my
$function_internal_arguments
=
\%
{
$self
->
{
FUNCTION_INTERNAL_ARGUMENTS
}};
my
$name
=
shift
;
return
$$function_internal_arguments
{
$name
};
}
sub
function_external_arguments
{
my
$self
=
shift
;
my
$function_external_arguments
=
\%
{
$self
->
{
FUNCTION_EXTERNAL_ARGUMENTS
}};
my
$name
=
shift
;
return
$$function_external_arguments
{
$name
};
}
sub
function_internal_module
{
my
$self
=
shift
;
my
$function_
arguments
=
\%
{
$self
->
{
FUNCTION_ARGUMENTS
}};
my
$function_
internal_module
=
\%
{
$self
->
{
FUNCTION_INTERNAL_MODULE
}};
my
$name
=
shift
;
return
$$function_
arguments
{
$name
};
return
$$function_
internal_module
{
$name
};
}
sub
function_module
{
sub
function_
external_
module
{
my
$self
=
shift
;
my
$function_
module
=
\%
{
$self
->
{
FUNCTION
_MODULE
}};
my
$function_
external_module
=
\%
{
$self
->
{
FUNCTION_EXTERNAL
_MODULE
}};
my
$name
=
shift
;
return
$$function_module
{
$name
};
return
$$function_
external_
module
{
$name
};
}
sub
function_stub
{
...
...
@@ -703,7 +758,7 @@ sub function_stub {
return
$$function_stub
{
$name
};
}
sub
found_function
{
sub
found_
internal_
function
{
my
$self
=
shift
;
my
$function_found
=
\%
{
$self
->
{
FUNCTION_FOUND
}};
...
...
@@ -712,7 +767,7 @@ sub found_function {
$$function_found
{
$name
}
++
;
}
sub
function_found
{
sub
internal_
function_found
{
my
$self
=
shift
;
my
$function_found
=
\%
{
$self
->
{
FUNCTION_FOUND
}};
...
...
tools/winapi_check/winapi_check
View file @
20ca0011
...
...
@@ -154,16 +154,16 @@ if($options->global) {
my
$nativeapi
=
'nativeapi'
->
new
(
$options
,
$output
,
"$winapi_check_dir/nativeapi.dat"
,
"$wine_dir/configure.in"
,
"$wine_dir/include/config.h.in"
);
for
my
$
name
(
$win32api
->
al
l_functions
)
{
my
$module16
=
$win16api
->
function_
module
(
$
name
);
my
$module32
=
$win32api
->
function_
module
(
$
name
);
for
my
$
internal_name
(
$win32api
->
all_interna
l_functions
)
{
my
$module16
=
$win16api
->
function_
internal_module
(
$internal_
name
);
my
$module32
=
$win32api
->
function_
internal_module
(
$internal_
name
);
if
(
defined
(
$module16
))
{
$win16api
->
found_shared_function
(
$name
);
$win32api
->
found_shared_function
(
$name
);
$win16api
->
found_shared_function
(
$
internal_
name
);
$win32api
->
found_shared_function
(
$
internal_
name
);
if
(
$options
->
shared
)
{
$output
->
write
(
"*.spec: $name: is shared between $module16 (Win16) and $module32 (Win32)\n"
);
$output
->
write
(
"*.spec: $
internal_
name: is shared between $module16 (Win16) and $module32 (Win32)\n"
);
}
}
}
...
...
@@ -246,7 +246,7 @@ if($options->headers) {
my
$statements
=
shift
;
foreach
my
$winapi
(
@winapis
)
{
my
$module
=
$winapi
->
function_module
(
$internal_name
);
my
$module
=
$winapi
->
function_
internal_
module
(
$internal_name
);
if
(
!
defined
(
$module
))
{
next
}
my
$external_name
=
$winapi
->
function_external_name
(
$internal_name
);
...
...
@@ -340,14 +340,14 @@ foreach my $file (@c_files) {
$win16api
->
found_type
(
$argument
)
if
$options
->
win16
;
$win32api
->
found_type
(
$argument
)
if
$options
->
win32
;
}
$win16api
->
found_function
(
$internal_name
)
if
$options
->
win16
;
$win32api
->
found_function
(
$internal_name
)
if
$options
->
win32
;
$win16api
->
found_
internal_
function
(
$internal_name
)
if
$options
->
win16
;
$win32api
->
found_
internal_
function
(
$internal_name
)
if
$options
->
win32
;
}
if
(
$file_type
ne
"application"
)
{
my
$module16
=
$win16api
->
function_module
(
$internal_name
);
my
$module32
=
$win32api
->
function_module
(
$internal_name
);
my
$module16
=
$win16api
->
function_
internal_
module
(
$internal_name
);
my
$module32
=
$win32api
->
function_
internal_
module
(
$internal_name
);
if
(
defined
(
$module16
))
{
$modules
->
found_module_in_dir
(
$module16
,
$file_dir
);
...
...
@@ -636,9 +636,9 @@ if($options->global) {
my
%
module_stub_count16
;
my
%
module_total_count16
;
foreach
my
$
name
(
$win16api
->
al
l_functions
,
$win16api
->
all_functions_stub
)
{
foreach
my
$module
(
split
(
/ \& /
,
$win16api
->
function_
module
(
$
name
)))
{
if
(
$win16api
->
function_stub
(
$name
))
{
foreach
my
$
internal_name
(
$win16api
->
all_interna
l_functions
,
$win16api
->
all_functions_stub
)
{
foreach
my
$module
(
split
(
/ \& /
,
$win16api
->
function_
internal_module
(
$internal_
name
)))
{
if
(
$win16api
->
function_stub
(
$
internal_
name
))
{
$module_stub_count16
{
$module
}
++
;
}
$module_total_count16
{
$module
}
++
;
...
...
@@ -668,9 +668,9 @@ if($options->global) {
my
%
module_stub_count32
;
my
%
module_total_count32
;
foreach
my
$
name
(
$win32api
->
al
l_functions
,
$win32api
->
all_functions_stub
)
{
foreach
my
$module
(
split
(
/ \& /
,
$win32api
->
function_
module
(
$
name
)))
{
if
(
$win32api
->
function_stub
(
$name
))
{
foreach
my
$
internal_name
(
$win32api
->
all_interna
l_functions
,
$win32api
->
all_functions_stub
)
{
foreach
my
$module
(
split
(
/ \& /
,
$win32api
->
function_
internal_module
(
$internal_
name
)))
{
if
(
$win32api
->
function_stub
(
$
internal_
name
))
{
$module_stub_count32
{
$module
}
++
;
}
$module_total_count32
{
$module
}
++
;
...
...
tools/winapi_check/winapi_documentation.pm
View file @
20ca0011
...
...
@@ -75,7 +75,7 @@ sub check_documentation {
$external_name
=
$internal_name
;
}
if
(
$options
->
documentation_
pedantic
)
{
if
(
$options
->
documentation_
name
)
{
my
$n
=
0
;
if
((
++
$n
&&
defined
(
$module16
)
&&
defined
(
$external_name16
)
&&
$external_name16
ne
"@"
&&
$documentation
!~
/\b\Q$external_name16\E\b/
)
||
...
...
@@ -87,17 +87,15 @@ sub check_documentation {
$external_name32
eq
"@"
&&
$documentation
!~
/\@/
))
{
my
$external_name
=
(
$external_name16
,
$external_name32
)[(
$n
-
1
)
/
2
];
$output
->
write
(
"documentation: wrong or missing name ($external_name) \\\n$documentation\n"
);
}
}
else
{
if
(
$documentation
!~
/\b(?:\Q$external_name\E|$internal_name|$name1|$name2)\b/
)
{
$output
->
write
(
"documentation: wrong or missing name \\\n$documentation\n"
);
if
(
$options
->
documentation_pedantic
||
$documentation
!~
/\b(?:$internal_name|$name1|$name2)\b/
)
{
$output
->
write
(
"documentation: wrong or missing name ($external_name) \\\n$documentation\n"
);
}
}
}
if
(
$options
->
documentation_ordinal
)
{
if
(
defined
(
$module16
))
{
my
$ordinal16
=
$win16api
->
function_ordinal
(
$internal_name
);
my
$ordinal16
=
$win16api
->
function_
internal_
ordinal
(
$internal_name
);
if
(
!
defined
(
$ordinal16
))
{
$output
->
write
(
"function have no ordinal\n"
);
...
...
@@ -112,7 +110,7 @@ sub check_documentation {
}
}
if
(
defined
(
$module32
))
{
my
$ordinal32
=
$win32api
->
function_ordinal
(
$internal_name
);
my
$ordinal32
=
$win32api
->
function_
internal_
ordinal
(
$internal_name
);
if
(
!
defined
(
$ordinal32
))
{
$output
->
write
(
"function have no ordinal\n"
);
...
...
@@ -129,7 +127,7 @@ sub check_documentation {
}
if
(
$options
->
documentation_pedantic
)
{
my
$ordinal
=
$win16api
->
function_ordinal
(
$internal_name
);
my
$ordinal
=
$win16api
->
function_
internal_
ordinal
(
$internal_name
);
if
(
defined
(
$ordinal
)
&&
$documentation
!~
/^ \*\s+(?:\@|\w+)(?:\s+[\(\[]\w+\.(?:\@|\d+)[\)\]])+/m
)
{
$output
->
write
(
"documentation: pedantic check failed \\\n$documentation\n"
);
}
...
...
tools/winapi_check/winapi_global.pm
View file @
20ca0011
...
...
@@ -20,11 +20,11 @@ sub check {
}
if
(
$options
->
declared
)
{
foreach
my
$
name
(
$winapi
->
al
l_functions
)
{
if
(
!
$winapi
->
function_found
(
$name
)
&&
!
$nativeapi
->
is_function
(
$
name
))
{
my
$module
=
$winapi
->
function_
module
(
$
name
);
$output
->
write
(
"*.c: $module: $name: "
);
$output
->
write
(
"function declared but not implemented: "
.
$winapi
->
function_
arguments
(
$
name
)
.
"\n"
);
foreach
my
$
internal_name
(
$winapi
->
all_interna
l_functions
)
{
if
(
!
$winapi
->
internal_function_found
(
$internal_name
)
&&
!
$nativeapi
->
is_function
(
$internal_
name
))
{
my
$module
=
$winapi
->
function_
internal_module
(
$internal_
name
);
$output
->
write
(
"*.c: $module: $
internal_
name: "
);
$output
->
write
(
"function declared but not implemented: "
.
$winapi
->
function_
internal_arguments
(
$internal_
name
)
.
"\n"
);
}
}
}
...
...
tools/winapi_check/winapi_local.pm
View file @
20ca0011
...
...
@@ -14,7 +14,7 @@ sub check_function {
my
$nativeapi
=
shift
;
my
$winapi
=
shift
;
my
$module
=
$winapi
->
function_module
(
$internal_name
);
my
$module
=
$winapi
->
function_
internal_
module
(
$internal_name
);
if
(
$winapi
->
name
eq
"win16"
)
{
if
(
$winapi
->
function_stub
(
$internal_name
))
{
...
...
@@ -89,8 +89,8 @@ sub check_function {
}
}
my
$declared_calling_convention
=
$winapi
->
function_calling_convention
(
$internal_name
);
my
@declared_argument_kinds
=
split
(
/\s+/
,
$winapi
->
function_arguments
(
$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
));
if
(
$declared_calling_convention
=~
/^register|interrupt$/
)
{
push
@declared_argument_kinds
,
"ptr"
;
...
...
@@ -122,7 +122,11 @@ sub check_function {
$output
->
write
(
"function not implemented as vararg\n"
);
}
}
elsif
(
$#argument_types
!=
-
1
&&
$argument_types
[
$#argument_types
]
eq
"..."
)
{
$output
->
write
(
"function not declared as vararg\n"
);
if
(
$#argument_types
==
0
)
{
pop
@argument_types
;
}
else
{
$output
->
write
(
"function not declared as vararg\n"
);
}
}
if
(
$#argument_types
!=
-
1
&&
$argument_types
[
$#argument_types
]
eq
"CONTEXT *"
&&
...
...
tools/winapi_check/winapi_options.pm
View file @
20ca0011
...
...
@@ -96,6 +96,11 @@ my %options = (
default
=>
0
,
parent
=>
"documentation"
,
description
=>
"check for documentation comment width inconsistances"
},
"documentation-name"
=>
{
default
=>
1
,
parent
=>
"documentation"
,
description
=>
"check for documentation name inconsistances\n"
},
"documentation-ordinal"
=>
{
default
=>
0
,
parent
=>
"documentation"
,
...
...
tools/winapi_check/winapi_parser.pm
View file @
20ca0011
...
...
@@ -257,7 +257,7 @@ sub parse_c_file {
$arguments
=~
y
/\t\n/
/
;
$arguments
=~
s/^\s*(.*?)\s*$/$1/
;
if
(
$arguments
eq
""
)
{
$arguments
=
"
void
"
}
if
(
$arguments
eq
""
)
{
$arguments
=
"
...
"
}
my
@argument_types
;
my
@argument_names
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment