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
14fa6594
Commit
14fa6594
authored
Nov 11, 2002
by
Patrik Stridvall
Committed by
Alexandre Julliard
Nov 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- API files update.
- Fixed options --cross-call-{unicode-ascii,win32-win16}. - Minor reorganization of the global checks.
parent
1ab0ee30
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
94 deletions
+76
-94
win16.api
tools/winapi/win16.api
+1
-1
win32.api
tools/winapi/win32.api
+8
-1
winapi_check
tools/winapi_check/winapi_check
+2
-54
winapi_function.pm
tools/winapi_check/winapi_function.pm
+4
-0
winapi_global.pm
tools/winapi_check/winapi_global.pm
+44
-30
winapi_local.pm
tools/winapi_check/winapi_local.pm
+17
-8
No files found.
tools/winapi/win16.api
View file @
14fa6594
...
...
@@ -1173,8 +1173,8 @@ HANDLE
LPCVOID
LPDWORD
LPMEMORY_BASIC_INFORMATION
LPVOID
PMEMORY_BASIC_INFORMATION
%segptr
...
...
tools/winapi/win32.api
View file @
14fa6594
...
...
@@ -857,7 +857,6 @@ LPFILETIME
LPINPUT_RECORD
LPLDT_ENTRY
LPMEMORYSTATUS
LPMEMORY_BASIC_INFORMATION
LPMODULEENTRY32
LPOSVERSIONINFOEXA
LPOSVERSIONINFOEXW
...
...
@@ -897,6 +896,7 @@ PHANDLE
PHANDLER_ROUTINE
PLARGE_INTEGER
PLONG
PMEMORY_BASIC_INFORMATION
PSIZE_T
PVOID
PTIMERAPCROUTINE
...
...
@@ -1688,6 +1688,7 @@ double
BOOL
BYTE
CALLCONV
CHAR
DISPID
DWORD
...
...
@@ -1765,6 +1766,7 @@ ULONG *
USHORT *
VARIANT *
VARIANTARG *
VARIANTARG **
VARIANT_BOOL *
VARTYPE *
VOID *
...
...
@@ -1987,21 +1989,26 @@ HRASCONN
%ptr
LPBOOL
LPBYTE
LPCSTR *
LPCWSTR *
LPDWORD
LPRASAUTODIALENTRYA
LPRASAUTODIALENTRYW
LPRASCONNA
LPRASCONNW
LPRASDEVINFOA
LPRASDEVINFOW
LPRASDIALPARAMSA
LPRASENTRYA
LPRASENTRYW
LPRASENTRYNAMEA
LPVOID
%str
LPCSTR
LPSTR
%wstr
...
...
tools/winapi_check/winapi_check
View file @
14fa6594
...
...
@@ -252,7 +252,6 @@ if($options->headers) {
}
my
%
module2functions
=
();
my
%
type_found
=
();
foreach
my
$file
(
@c_files
)
{
my
%
functions
=
();
...
...
@@ -350,10 +349,6 @@ foreach my $file (@c_files) {
if
(
defined
(
$refargument_types
))
{
push
@types
,
@$refargument_types
;
}
for
my
$type
(
@types
)
{
$type_found
{
$module
}{
$type
}
++
;
}
}
foreach
my
$module
(
$function
->
modules
)
{
...
...
@@ -663,56 +658,9 @@ foreach my $file (@c_files) {
}
if
(
$options
->
global
)
{
my
@complete_modules
=
sort
(
keys
(
%
complete_module
));
if
(
$options
->
declared
)
{
foreach
my
$module
(
@complete_modules
)
{
foreach
my
$winapi
(
@winapis
)
{
if
(
!
$winapi
->
is_module
(
$module
))
{
next
;
}
my
$functions
=
$module2functions
{
$module
};
foreach
my
$internal_name
(
$winapi
->
all_internal_functions_in_module
(
$module
))
{
my
$function
=
$functions
->
{
$internal_name
};
if
(
!
defined
(
$function
)
&&
!
$nativeapi
->
is_function
(
$internal_name
)
&&
!
(
$module
eq
"user"
&&
$internal_name
=~
/^
(?:
GlobalAddAtomA
|
GlobalDeleteAtom
|
GlobalFindAtomA
|
GlobalGetAtomNameA
|
lstrcmpiA
)
$
/
x
))
{
$output
->
write
(
"*.c: $module: $internal_name: "
.
"function declared but not implemented or declared external\n"
);
}
}
}
}
}
if
(
$options
->
argument
&&
$options
->
argument_forbidden
)
{
foreach
my
$winapi
(
@winapis
)
{
my
$types_not_used
=
$winapi
->
types_not_used
;
foreach
my
$module
(
sort
(
keys
(
%
$types_not_used
)))
{
if
(
!
$complete_module
{
$module
})
{
next
;
}
foreach
my
$type
(
sort
(
keys
(
%
{
$$types_not_used
{
$module
}})))
{
$output
->
write
(
"*.c: $module: type ($type) not used\n"
);
}
}
}
}
&
winapi_global::
check_modules
(
\%
complete_module
,
\%
module2functions
);
if
(
$all_modules
)
{
&
winapi_documentation::
report_documentation
;
if
(
$options
->
headers_unused
)
{
foreach
my
$name
(
sort
(
keys
(
%
include2info
)))
{
if
(
!
$include2info
{
$name
}{
used
})
{
if
(
$options
->
include
)
{
$output
->
write
(
"*.c: $name: include file is never used\n"
);
}
}
}
}
&
winapi_global::
check
(
\%
type_found
);
$modules
->
global_report
;
$nativeapi
->
global_report
;
&
winapi_global::
check_all_modules
(
\%
include2info
);
}
}
tools/winapi_check/winapi_function.pm
View file @
14fa6594
...
...
@@ -140,6 +140,10 @@ sub _module {
return
undef
;
}
if
(
!
defined
(
$file
))
{
return
undef
;
}
my
@modules
;
foreach
my
$module
(
split
(
/\s*&\s*/
,
$module
))
{
if
(
$modules
->
is_allowed_module_in_file
(
$module
,
"$current_dir/$file"
))
{
...
...
tools/winapi_check/winapi_global.pm
View file @
14fa6594
...
...
@@ -20,52 +20,66 @@ package winapi_global;
use
strict
;
use
modules
qw($modules)
;
use
nativeapi
qw($nativeapi)
;
use
options
qw($options)
;
use
output
qw($output)
;
use
winapi
qw(
$win16api $win32api
@winapis)
;
use
winapi
qw(@winapis)
;
sub
check
{
my
$type_found
=
shift
;
sub
check_modules
{
my
$complete_module
=
shift
;
my
$module2functions
=
shift
;
if
(
$options
->
win16
)
{
_check
(
$win16api
,
$type_found
);
}
my
@complete_modules
=
sort
(
keys
(
%
$complete_module
));
if
(
$options
->
win32
)
{
_check
(
$win32api
,
$type_found
);
if
(
$options
->
declared
)
{
foreach
my
$module
(
@complete_modules
)
{
foreach
my
$winapi
(
@winapis
)
{
if
(
!
$winapi
->
is_module
(
$module
))
{
next
;
}
my
$functions
=
$$module2functions
{
$module
};
foreach
my
$internal_name
(
$winapi
->
all_internal_functions_in_module
(
$module
))
{
my
$function
=
$functions
->
{
$internal_name
};
if
(
!
defined
(
$function
)
&&
!
$nativeapi
->
is_function
(
$internal_name
)
&&
!
(
$module
eq
"user"
&&
$internal_name
=~
/^
(?:
GlobalAddAtomA
|
GlobalDeleteAtom
|
GlobalFindAtomA
|
GlobalGetAtomNameA
|
lstrcmpiA
)
$
/
x
))
{
$output
->
write
(
"*.c: $module: $internal_name: "
.
"function declared but not implemented or declared external\n"
);
}
}
}
sub
_check
{
my
$winapi
=
shift
;
my
$type_found
=
shift
;
my
$winver
=
$winapi
->
name
;
if
(
$options
->
argument
)
{
foreach
my
$type
(
$winapi
->
all_declared_types
)
{
if
(
!
$$type_found
{
$type
}
&&
!
$winapi
->
is_limited_type
(
$type
)
&&
$type
ne
"CONTEXT86 *"
)
{
$output
->
write
(
"*.c: $winver: "
);
$output
->
write
(
"type ($type) not used\n"
);
}
}
}
if
(
$options
->
argument
&&
$options
->
argument_forbidden
)
{
my
$types_used
=
$winapi
->
types_unlimited_used_in_modules
;
foreach
my
$winapi
(
@winapis
)
{
my
$types_not_used
=
$winapi
->
types_not_used
;
foreach
my
$module
(
sort
(
keys
(
%
$types_not_used
)))
{
if
(
!
$$complete_module
{
$module
})
{
next
;
}
foreach
my
$type
(
sort
(
keys
(
%
{
$$types_not_used
{
$module
}})))
{
$output
->
write
(
"*.c: $module: type ($type) not used\n"
);
}
}
}
}
}
sub
check_all_modules
{
my
$include2info
=
shift
;
foreach
my
$type
(
sort
(
keys
(
%
$types_used
)))
{
$output
->
write
(
"*.c: type ($type) only used in module[s] ("
);
my
$count
=
0
;
foreach
my
$module
(
sort
(
keys
(
%
{
$$types_used
{
$type
}}
)))
{
if
(
$count
++
)
{
$output
->
write
(
", "
);
}
$output
->
write
(
"
$module
"
);
&
winapi_documentation::
report_documentation
;
if
(
$options
->
headers_unused
&&
$options
->
include
)
{
foreach
my
$name
(
sort
(
keys
(
%
$include2info
)))
{
if
(
!
$$include2info
{
$name
}{
used
})
{
$output
->
write
(
"
*.c: $name: include file is never used\n
"
);
}
$output
->
write
(
")\n"
);
}
}
$modules
->
global_report
;
$nativeapi
->
global_report
;
}
1
;
tools/winapi_check/winapi_local.pm
View file @
14fa6594
...
...
@@ -351,9 +351,14 @@ sub _check_statements {
}
}
}
elsif
(
$options
->
cross_call
)
{
# $output->write("$internal_name: called $called_name\n");
$$functions
{
$internal_name
}
->
function_called
(
$called_name
);
if
(
!
defined
(
$$functions
{
$called_name
}))
{
$$functions
{
$called_name
}
=
'winapi_function'
->
new
;
my
$called_function
=
'winapi_function'
->
new
;
$called_function
->
internal_name
(
$called_name
);
$$functions
{
$called_name
}
=
$called_function
;
}
$$functions
{
$called_name
}
->
function_called_by
(
$internal_name
);
}
...
...
@@ -370,18 +375,22 @@ sub check_file {
if
(
$options
->
cross_call
)
{
my
@names
=
sort
(
keys
(
%
$functions
));
for
my
$name
(
@names
)
{
my
@called_names
=
$$functions
{
$name
}
->
called_function_names
;
my
@called_by_names
=
$$functions
{
$name
}
->
called_by_function_names
;
my
$module
=
$$functions
{
$name
}
->
module
;
my
$function
=
$$functions
{
$name
};
my
@called_names
=
$function
->
called_function_names
;
my
@called_by_names
=
$function
->
called_by_function_names
;
my
$module
=
$function
->
module
;
if
(
$options
->
cross_call_win32_win16
)
{
my
$module16
=
$
$functions
{
$name
}
->
module16
;
my
$module32
=
$
$functions
{
$name
}
->
module32
;
my
$module16
=
$
function
->
module16
;
my
$module32
=
$
function
->
module32
;
if
(
$#called_names
>=
0
&&
(
defined
(
$module16
)
||
defined
(
$module32
))
)
{
for
my
$called_name
(
@called_names
)
{
my
$called_module16
=
$$functions
{
$called_name
}
->
module16
;
my
$called_module32
=
$$functions
{
$called_name
}
->
module32
;
my
$called_function
=
$$functions
{
$called_name
};
my
$called_module16
=
$called_function
->
module16
;
my
$called_module32
=
$called_function
->
module32
;
if
(
defined
(
$module32
)
&&
defined
(
$called_module16
)
&&
!
defined
(
$called_module32
)
&&
$name
ne
$called_name
)
...
...
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