Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
09108edd
Commit
09108edd
authored
Sep 06, 2005
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 06, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'volatile' is valid everywhere where 'const' is valid. This fixes
parsing of the new InterlockedExchange() prototype.
parent
abe2c581
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
winapi_module_user.pm
tools/winapi/winapi_module_user.pm
+4
-4
winapi_parser.pm
tools/winapi/winapi_parser.pm
+8
-8
No files found.
tools/winapi/winapi_module_user.pm
View file @
09108edd
...
...
@@ -738,7 +738,7 @@ sub _parse_windowsx_h($$$) {
$output
->
write
(
"message $name: result type mismatch '$result' != '$result2'\n"
);
}
foreach
(
split
(
/\s*,\s*/
))
{
if
(
/^((?:const\s+)?\w+(?:\s*\*\s*|\s+)?)(\w+)$/
)
{
if
(
/^((?:const\s+
|volatile\s+
)?\w+(?:\s*\*\s*|\s+)?)(\w+)$/
)
{
my
$type
=
$1
;
my
$name
=
$2
;
...
...
@@ -756,7 +756,7 @@ sub _parse_windowsx_h($$$) {
my
$find_inner_cast
=
sub
{
local
$_
=
shift
;
if
(
/^(?:\(\s*((?:const\s+)?\w+(?:\s*\*)?)\s*\))*\(.*?\)$/
)
{
if
(
/^(?:\(\s*((?:const\s+
|volatile\s+
)?\w+(?:\s*\*)?)\s*\))*\(.*?\)$/
)
{
if
(
defined
(
$1
))
{
return
$1
;
}
else
{
...
...
@@ -774,7 +774,7 @@ sub _parse_windowsx_h($$$) {
(
my
$refparam
,
my
$upper
,
my
$lower
)
=
@$entry
;
local
$_
=
$$refparam
;
if
(
s/^\(\s*$upper(?:)PARAM\s*\)\s*(?:\(\s*((?:const\s+)?\w+(?:\s*\*)?)\s*\))*\(\s*(.*?)\s*\)$/$2/
)
{
if
(
s/^\(\s*$upper(?:)PARAM\s*\)\s*(?:\(\s*((?:const\s+
|volatile\s+
)?\w+(?:\s*\*)?)\s*\))*\(\s*(.*?)\s*\)$/$2/
)
{
if
(
defined
(
$1
))
{
$$refparam
=
$1
;
}
else
{
...
...
@@ -792,7 +792,7 @@ sub _parse_windowsx_h($$$) {
last
;
}
}
}
elsif
(
/^\(\((?:const\s+)?\w+\s*(?:\*\s*)?\)\s*(?:\(\s*\w+\s*\)|\w+)\s*\)\s*\->\s*\w+$/
)
{
}
elsif
(
/^\(\((?:const\s+
|volatile\s+
)?\w+\s*(?:\*\s*)?\)\s*(?:\(\s*\w+\s*\)|\w+)\s*\)\s*\->\s*\w+$/
)
{
$$refparam
=
"UINT"
;
}
else
{
die
"$name: '$_'"
;
...
...
tools/winapi/winapi_parser.pm
View file @
09108edd
...
...
@@ -426,14 +426,14 @@ sub parse_c_file($$) {
$argument
=~
s/^\s*(.*?)\s*$/$1/
;
# print " " . ($n + 1) . ": '$argument'\n";
$argument
=~
s/^(IN OUT(?=\s)|IN(?=\s)|OUT(?=\s)|\s*)\s*//
;
$argument
=~
s/^(const(?=\s)|CONST(?=\s)|\s*)\s*//
;
$argument
=~
s/^(const(?=\s)|CONST(?=\s)|
volatile(?=\s)|
\s*)\s*//
;
if
(
$argument
=~
/^\.\.\.$/
)
{
$argument_type
=
"..."
;
$argument_name
=
"..."
;
}
elsif
(
$argument
=~
/^
((?:
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
register
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)
(?:
short
\
s
+
(?
=
int
)
|
long
\
s
+
(?
=
int
))?)?(?:
\
w
+|
ElfW
\
(
\
w
+\
)
|
WS
\
(
\
w
+\
)))
\
s
*
((?:
__RPC_FAR
|
const
|
CONST
)?
\
s
*
(?:
\*\
s
*
(?:
__RPC_FAR
|
const
|
CONST
)?
\
s
*
?)
*
)
\
s
*
((?:
__RPC_FAR
|
const
|
CONST
|
volatile
)?
\
s
*
(?:
\*\
s
*
(?:
__RPC_FAR
|
const
|
CONST
|
volatile
)?
\
s
*
?)
*
)
\
s
*
(
\
w
*
)
\
s
*
(
\
[
\
])?(?:
\
s
+
OPTIONAL
)?
$
/
x
)
{
$argument_type
=
$1
;
...
...
@@ -447,7 +447,7 @@ sub parse_c_file($$) {
}
elsif
(
$argument
=~
/^
((?:
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
register
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)
(?:
short
\
s
+
(?
=
int
)
|
long
\
s
+
(?
=
int
))?)?
\
w
+
)
\
s
*
((?:
const
)?
\
s
*
(?:
\*\
s
*
(?:
const
)?
\
s
*
?)
*
)
\
s
*
((?:
const
|
volatile
)?
\
s
*
(?:
\*\
s
*
(?:
const
|
volatile
)?
\
s
*
?)
*
)
\
s
*
(?:
__cdecl
\
s
+|
__stdcall
\
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
|
CALLBACK
|
CDECL
|
NET_API_FUNCTION
|
RPC_ENTRY
|
STDMETHODCALLTYPE
|
VFWAPIV
|
VFWAPI
|
WINAPIV
|
WINAPI
)?
\
s
*\*\
s
*
((?:
\
w
+
)?)
\
s
*\
)
\
s
*
\
(
\
s
*
(
.*
?)
\
s
*\
)
$
/
x
)
...
...
@@ -466,7 +466,7 @@ sub parse_c_file($$) {
}
elsif
(
$argument
=~
/^
((?:
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
register
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)
(?:
short
\
s
+
(?
=
int
)
|
long
\
s
+
(?
=
int
))?)?
\
w
+
)
\
s
*
((?:
const
)?
\
s
*
(?:
\*\
s
*
(?:
const
)?
\
s
*
?)
*
)
\
s
*
((?:
const
|
volatile
)?
\
s
*
(?:
\*\
s
*
(?:
const
|
volatile
)?
\
s
*
?)
*
)
\
s
*
(
\
w
+
)
\
s
*\
[
\
s
*
(
.*
?)
\
s
*\
](?:
\
[
\
s
*
(
.*
?)
\
s
*\
])?
$
/
x
)
{
my
$return_type
=
$1
;
...
...
@@ -486,7 +486,7 @@ sub parse_c_file($$) {
die
"$file: $.: syntax error: '$argument'\n"
;
}
$argument_type
=~
s/\s*
const\s*/ /g
;
# Remove const
$argument_type
=~
s/\s*
(?:const|volatile)\s*/ /g
;
# Remove const/volatile
$argument_type
=~
s/([^\*\(\s])\*/$1 \*/g
;
# Assure whitespace between non-* and *
$argument_type
=~
s/,([^\s])/, $1/g
;
# Assure whitespace after ,
$argument_type
=~
s/\*\s+\*/\*\*/g
;
# Remove whitespace between * and *
...
...
@@ -556,9 +556,9 @@ sub parse_c_file($$) {
}
&
$type_begin
(
$type
);
}
elsif
(
/
typedef
\
s
+
((?:
const
\
s
+|
CONST
\
s
+|
enum
\
s
+|
long
\
s
+|
signed
\
s
+|
short
\
s
+|
struct
\
s
+|
union
\
s
+|
unsigned
\
s
+
)
*
?)
((?:
const
\
s
+|
CONST
\
s
+|
enum
\
s
+|
long
\
s
+|
signed
\
s
+|
short
\
s
+|
struct
\
s
+|
union
\
s
+|
unsigned
\
s
+
|
volatile
\
s
+
)
*
?)
(
\
w
+
)
(?:
\
s
+
const
)?
(?:
\
s
+
const
|\
s
+
volatile
)?
((?:
\
s
*
(?:(?:
FAR
|
__RPC_FAR
|
TW_HUGE
)?
\
s
*
)?
\*+\
s
*|\
s
+
)(?:
volatile
\
s
+|
DECLSPEC_ALIGN
\
(
\
d
+\
)
\
s
+
)?
\
w
+\
s
*
(?:
\
[[
^\
]]
*\
])
*
(?:
\
s
*
,
\
s
*
(?:
\
s
*
(?:(?:
FAR
|
__RPC_FAR
|
TW_HUGE
)?
\
s
*
)?
\*+\
s
*|\
s
+
)
\
w
+\
s
*
(?:
\
[[
^\
]]
*\
])?)
*
)
\
s
*
;
/
sx
)
...
...
@@ -584,7 +584,7 @@ sub parse_c_file($$) {
&
$type_begin
(
$type
);
&
$type_end
([
@names
]);
}
elsif
(
/
typedef
\
s
+
(?:(?:
const
\
s
+|
enum
\
s
+|
long
\
s
+|
signed
\
s
+|
short
\
s
+|
struct
\
s
+|
union
\
s
+|
unsigned
\
s
+
)
*
?)
(?:(?:
const
\
s
+|
enum
\
s
+|
long
\
s
+|
signed
\
s
+|
short
\
s
+|
struct
\
s
+|
union
\
s
+|
unsigned
\
s
+
|
volatile
\
s
+
)
*
?)
(
\
w
+
(?:
\
s
*\*+\
s
*
)?)
\
s
*
(?:(
\
w
+
)
\
s
*
)?
\
((?:(
\
w
+
)
\
s
*
)?
\
s
*
(?:
\*\
s
*
(
\
w
+
)
|
_ATL_CATMAPFUNC
)
\
s
*\
)
\
s
*
...
...
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