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
5dadbf32
Commit
5dadbf32
authored
Apr 29, 2000
by
Patrik Stridvall
Committed by
Alexandre Julliard
Apr 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- API files update
- Minor bug fixes. - Added new option --cross-call-unicode-ascii for checking illegal Unicode to ASCII calls.
parent
fbc15b17
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
37 deletions
+79
-37
shell32.api
tools/winapi_check/win32/shell32.api
+12
-5
shlwapi.api
tools/winapi_check/win32/shlwapi.api
+1
-1
winapi_check
tools/winapi_check/winapi_check
+9
-8
winapi_local.pm
tools/winapi_check/winapi_local.pm
+25
-12
winapi_options.pm
tools/winapi_check/winapi_options.pm
+31
-10
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+1
-1
No files found.
tools/winapi_check/win32/shell32.api
View file @
5dadbf32
%long
BOOL
BYTE
COLORREF
DWORD
HANDLE
...
...
@@ -11,13 +10,12 @@ HGLOBAL
HMENU
HICON
HINSTANCE
HIMAGELIST
HKEY
HMODULE
HRESULT
HWND
INT
LONG
LPARAM
LRESULT
UINT
ULONG
...
...
@@ -25,6 +23,7 @@ WCHAR
WORD
WPARAM
%long # --forbidden
int
...
...
@@ -36,7 +35,7 @@ DLLVERSIONINFO *
DWORD *
HICON *
HIMAGELIST *
IDropTarget
*
HWND
*
IShellFolder **
IStream *
IUnknown *
...
...
@@ -45,8 +44,14 @@ LPBYTE
LPCITEMIDLIST
LPCITEMIDLIST *
LPCNOTIFYREGISTER
LPCRECT
LPCSHELLFOLDERVIEWINFO
LPCVOID
LPCVOID *
LPDATAOBJECT
LPDRAWITEMSTRUCT
LPDROPSOURCE
LPDROPTARGET
LPDWORD
LPFNCREATEINSTANCE
LPFNFMCALLBACK
...
...
@@ -56,12 +61,13 @@ LPITEMIDLIST *
LPMALLOC *
LPMEASUREITEMSTRUCT
LPNOTIFYREGISTER
LPPOINT
LPSECURITY_ATTRIBUTES
LPSHELLEXECUTEINFOA
LPSHELLEXECUTEINFOW
LPSHELLFLAGSTATE
LPSHELLFOLDER
LPSHELLVIEW
DATA
LPSHELLVIEW
*
LPSHFILEOPSTRUCTA
LPSHFILEOPSTRUCTW
LPSTRRET
...
...
@@ -73,6 +79,7 @@ LPVOID *
LPWORD
LPWSTR *
PAPPBARDATA
PLONG
PNOTIFYICONDATAA
PNOTIFYICONDATAW
POINT *
...
...
tools/winapi_check/win32/shlwapi.api
View file @
5dadbf32
%long
BOOL
BYTE
DWORD
INT
LONG
...
...
@@ -31,6 +30,7 @@ LPSTR
%void
VOID
void
%wstr
...
...
tools/winapi_check/winapi_check
View file @
5dadbf32
...
...
@@ -54,14 +54,18 @@ if(length($wine_dir) != 1) {
$current_dir
=~
s/\/.$//
;
}
my
$options
=
winapi_options
->
new
(
\
@ARGV
,
$wine_dir
);
if
(
$options
->
help
)
{
my
$output
=
'output'
->
new
;
my
$options
=
winapi_options
->
new
(
$output
,
\
@ARGV
,
$wine_dir
);
if
(
!
defined
(
$options
))
{
$output
->
write
(
"usage: winapi_check [--help] [<files>]\n"
);
exit
1
;
}
elsif
(
$options
->
help
)
{
$options
->
show_help
;
exit
;
}
my
$output
=
'output'
->
new
;
my
$modules
=
'modules'
->
new
(
$options
,
$output
,
$wine_dir
,
$current_dir
,
"$winapi_check_dir/modules.dat"
);
my
$win16api
=
'winapi'
->
new
(
$options
,
$output
,
"win16"
,
"$winapi_check_dir/win16"
);
...
...
@@ -514,10 +518,7 @@ foreach my $file ($options->c_files) {
if
(
$nativeapi
->
is_conditional_header
(
$header
))
{
if
(
!
$preprocessor
->
is_def
(
$macro
))
{
if
(
$macro
=~
/^HAVE_X11/
)
{
if
(
!
$preprocessor
->
is_undef
(
"X_DISPLAY_MISSING"
))
{
$output
->
write
(
"$file: #$directive $argument: is a conditional include, "
.
"but is not protected\n"
);
}
# Do nothing X Windows is handled differently
}
elsif
(
$macro
=~
/^HAVE_(.*?)_H$/
)
{
if
(
$header
ne
"alloca.h"
&&
!
$preprocessor
->
is_def
(
"STATFS_DEFINED_BY_$1"
))
{
$output
->
write
(
"$file: #$directive $argument: is a conditional include, "
.
...
...
tools/winapi_check/winapi_local.pm
View file @
5dadbf32
...
...
@@ -185,18 +185,31 @@ sub check_file {
my
@called_names
=
$$functions
{
$name
}
->
called_function_names
;
my
@called_by_names
=
$$functions
{
$name
}
->
called_by_function_names
;
my
$module
=
$$functions
{
$name
}
->
module
;
my
$module16
=
$$functions
{
$name
}
->
module16
;
my
$module32
=
$$functions
{
$name
}
->
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
;
if
(
defined
(
$module32
)
&&
defined
(
$called_module16
)
&&
!
defined
(
$called_module32
)
&&
$name
ne
$called_name
)
{
$output
->
write
(
"$file: $module: $name: illegal call to $called_name (Win16)\n"
);
if
(
$options
->
cross_call_win32_win16
)
{
my
$module16
=
$$functions
{
$name
}
->
module16
;
my
$module32
=
$$functions
{
$name
}
->
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
;
if
(
defined
(
$module32
)
&&
defined
(
$called_module16
)
&&
!
defined
(
$called_module32
)
&&
$name
ne
$called_name
)
{
$output
->
write
(
"$file: $module: $name: illegal call to $called_name (Win32 -> Win16)\n"
);
}
}
}
}
if
(
$options
->
cross_call_unicode_ascii
)
{
if
(
$name
=~
/W$/
)
{
for
my
$called_name
(
@called_names
)
{
if
(
$called_name
=~
/A$/
)
{
$output
->
write
(
"$file: $module: $name: illegal call to $called_name (Unicode -> ASCII)\n"
);
}
}
}
}
...
...
tools/winapi_check/winapi_options.pm
View file @
5dadbf32
...
...
@@ -61,6 +61,12 @@ my %options = (
"calling-convention"
=>
{
default
=>
0
,
parent
=>
"local"
,
description
=>
"calling convention checking"
},
"misplaced"
=>
{
default
=>
1
,
parent
=>
"local"
,
description
=>
"check for misplaced functions"
},
"cross-call"
=>
{
default
=>
0
,
parent
=>
"local"
,
description
=>
"check for cross calling functions"
},
"cross-call-win32-win16"
=>
{
default
=>
0
,
parent
=>
"cross-call"
,
description
=>
"check for cross calls between win32 and win16"
},
"cross-call-unicode-ascii"
=>
{
default
=>
0
,
parent
=>
"cross-call"
,
description
=>
"check for cross calls between Unicode and ASCII"
},
"documentation"
=>
{
default
=>
1
,
parent
=>
"local"
,
description
=>
"check for documentation inconsistances\n"
},
"documentation-width"
=>
{
default
=>
0
,
parent
=>
"documentation"
,
description
=>
"check for documentation width inconsistances\n"
},
...
...
@@ -85,8 +91,10 @@ sub new {
my
$self
=
{};
bless
(
$self
,
$class
);
my
$output
=
\
$
{
$self
->
{
OUTPUT
}};
$$output
=
shift
;
my
$refarguments
=
shift
;
my
@ARGV
=
@$refarguments
;
my
$wine_dir
=
shift
;
$self
->
options_set
(
"default"
);
...
...
@@ -96,7 +104,13 @@ sub new {
my
$module
=
\
$
{
$self
->
{
MODULE
}};
my
$global
=
\
$
{
$self
->
{
GLOBAL
}};
while
(
defined
(
$_
=
shift
@ARGV
))
{
if
(
$wine_dir
eq
"."
)
{
$$global
=
1
;
}
else
{
$$global
=
0
;
}
while
(
defined
(
$_
=
shift
@$refarguments
))
{
if
(
/^--(all|none)$/
)
{
$self
->
options_set
(
"$1"
);
next
;
...
...
@@ -121,8 +135,9 @@ sub new {
$name
=
$1
;
$prefix
=
"no"
;
if
(
defined
(
$value
))
{
print
STDERR
"<internal>: options with prefix 'no' can't take parameters\n"
;
exit
1
;
$$output
->
write
(
"options with prefix 'no' can't take parameters\n"
);
return
undef
;
}
}
...
...
@@ -174,10 +189,16 @@ sub new {
$$module
=
{
active
=>
1
,
filter
=>
1
,
hash
=>
\%
names
};
}
elsif
(
/^-(.*)$/
)
{
print
STDERR
"<internal>: unknown option: $&\n"
;
print
STDERR
"<internal>: usage: winapi-check [--help] [<files>]\n"
;
exit
1
;
$$output
->
write
(
"unknown option: $_\n"
)
;
return
undef
;
}
else
{
if
(
!-
e
$_
)
{
$$output
->
write
(
"$_: no such file or directory\n"
);
return
undef
;
}
push
@$c_files
,
$_
;
}
}
...
...
@@ -194,10 +215,10 @@ sub new {
@$c_files
=
sort
(
map
{
s/^.\/(.*)$/$1/
;
if
(
!
/spec\.c$/
)
{
$_
;
}
else
{
if
(
/glue\.c|spec\.c$/
)
{
();
}
else
{
$_
;
}
}
split
(
/\n/
,
`find $c_paths -name \\*.c`
));
...
...
tools/winapi_check/winapi_parser.pm
View file @
5dadbf32
...
...
@@ -221,7 +221,7 @@ sub parse_c_file {
#print " " . ($n + 1) . ": '$argument'\n";
$argument
=~
s/^(IN OUT(?=\s)|IN(?=\s)|OUT(?=\s)|\s*)\s*//
;
$argument
=~
s/^(const(?=\s)|CONST(?=\s)|\s*)\s*//
;
if
(
$argument
=~
/^
..
.$/
)
{
if
(
$argument
=~
/^
\.\.\
.$/
)
{
$argument
=
"..."
;
}
elsif
(
$argument
=~
/^((struct\s+|union\s+|enum\s+)?\w+)\s*((\*\s*?)*)\s*/
)
{
$argument
=
"$1"
;
...
...
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