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
9139fd14
Commit
9139fd14
authored
May 12, 2006
by
Francois Gouget
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winapi: Add support for APIENTRY.
Factorize a couple of call convention matching regular expressions.
parent
3b102b39
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
c_parser.pm
tools/winapi/c_parser.pm
+1
-1
winapi_local.pm
tools/winapi/winapi_local.pm
+1
-1
winapi_parser.pm
tools/winapi/winapi_parser.pm
+10
-3
No files found.
tools/winapi/c_parser.pm
View file @
9139fd14
...
...
@@ -37,7 +37,7 @@ use c_type;
my
$CALL_CONVENTION
=
"__cdecl|__stdcall|"
.
"__RPC_API|__RPC_STUB|__RPC_USER|"
.
"CALLBACK|CDECL|NTAPI|PASCAL|RPC_ENTRY|RPC_VAR_ENTRY|"
.
"VFWAPI|VFWAPIV|WINAPI|WINAPIV|"
;
"VFWAPI|VFWAPIV|WINAPI|WINAPIV|
APIENTRY|
"
;
sub
parse_c_function
($$$$$);
...
...
tools/winapi/winapi_local.pm
View file @
9139fd14
...
...
@@ -101,7 +101,7 @@ sub _check_function($$$$$$) {
$implemented_calling_convention
=
"cdecl"
;
}
elsif
(
$calling_convention
=~
/^(?:VFWAPIV|WINAPIV)$/
)
{
$implemented_calling_convention
=
"varargs"
;
}
elsif
(
$calling_convention
=~
/^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/
)
{
}
elsif
(
$calling_convention
=~
/^(?:__stdcall|__RPC_STUB|__RPC_USER|
APIENTRY|
NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/
)
{
if
(
defined
(
$implemented_return_kind
)
&&
$implemented_return_kind
eq
"longlong"
)
{
$implemented_calling_convention
=
"stdcall"
;
# FIXME: Check entry flags
}
else
{
...
...
tools/winapi/winapi_parser.pm
View file @
9139fd14
...
...
@@ -23,6 +23,13 @@ use strict;
use
output
qw($output)
;
use
options
qw($options)
;
# Defined a couple common regexp tidbits
my
$CALL_CONVENTION
=
"__cdecl|__stdcall|"
.
"__RPC_API|__RPC_STUB|__RPC_USER|RPC_ENTRY|"
.
"RPC_VAR_ENTRY|STDMETHODCALLTYPE|NET_API_FUNCTION|"
.
"CALLBACK|CDECL|NTAPI|PASCAL|APIENTRY|"
.
"VFWAPI|VFWAPIV|WINAPI|WINAPIV|"
;
sub
parse_c_file
($$)
{
my
$file
=
shift
;
my
$callbacks
=
shift
;
...
...
@@ -373,7 +380,7 @@ sub parse_c_file($$) {
}
next
;
}
elsif
(
/
(
extern
\
s
+|
static
\
s
+
)?((
interface
\
s
+|
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
signed
\
s
+|
unsigned
\
s
+
)?
\
w
+
((
\
s
*\*
)
+\
s
*|\
s
+
))
((
__cdecl
|
__stdcall
|
__RPC_STUB
|
__RPC_USER
|
CDECL
|
NET_API_FUNCTION
|
RPC_ENTRY
|
VFWAPIV
|
VFWAPI
|
WINAPIV
|
WINAPI
|
CALLBACK
)
\
s
+
)?
((
$CALL_CONVENTION
)
\
s
+
)?
(
\
w
+
(
\
(
\
w
+\
))?)
\
s
*\
((
.*
?)
\
)
\
s
*
(
\
{
|\
;)
/
sx
)
{
my
@lines
=
split
(
/\n/
,
$&
);
...
...
@@ -449,8 +456,8 @@ sub parse_c_file($$) {
((?:
interface
\
s
+|
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
register
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)?
(?:
short
\
s
+
(?
=
int
)
|
long
\
s
+
(?
=
int
))?)?
\
w
+
)
\
s
*
((?:
const
|
volatile
)?
\
s
*
(?:
\*\
s
*
(?:
const
|
volatile
)?
\
s
*
?)
*
)
\
s
*
(?:
__cdecl
\
s
+|
__stdcall
\
s
+|
__RPC_STUB
\
s
+|
__RPC_USER
\
s
+|
CALLBACK
\
s
+|
CDECL
\
s
+|
NET_API_FUNCTION
\
s
+|
RPC_ENTRY
\
s
+|
STDMETHODCALLTYPE
\
s
+|
VFWAPIV
\
s
+|
VFWAPI
\
s
+|
WINAPIV
\
s
+|
WINAPI
\
s
+
)?
\
(
\
s
*
(?:
__cdecl
|
__stdcall
|
__RPC_STUB
|
__RPC_USER
|
CALLBACK
|
CDECL
|
NET_API_FUNCTION
|
RPC_ENTRY
|
STDMETHODCALLTYPE
|
VFWAPIV
|
VFWAPI
|
WINAPIV
|
WINAPI
)?
\
s
*\*\
s
*
((?:
\
w
+
)?)
\
s
*\
)
\
s
*
(?:
(?:
$CALL_CONVENTION
)
\
s
+
)?
\
(
\
s
*
(?:
$CALL_CONVENTION
)?
\
s
*\*\
s
*
((?:
\
w
+
)?)
\
s
*\
)
\
s
*
\
(
\
s
*
(
.*
?)
\
s
*\
)
$
/
x
)
{
my
$return_type
=
$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