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
ae9cf771
Commit
ae9cf771
authored
May 17, 2004
by
Patrik Stridvall
Committed by
Alexandre Julliard
May 17, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- API files update.
- Minor bug fixes.
parent
d134aa59
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
345 additions
and
72 deletions
+345
-72
win16.api
tools/winapi/win16.api
+1
-0
win32.api
tools/winapi/win32.api
+280
-59
winapi_local.pm
tools/winapi_check/winapi_local.pm
+1
-1
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+63
-12
No files found.
tools/winapi/win16.api
View file @
ae9cf771
...
...
@@ -945,6 +945,7 @@ void
%word
DI_FUNCTION16
HINF16
HINSTANCE16
HKEY16
...
...
tools/winapi/win32.api
View file @
ae9cf771
This diff is collapsed.
Click to expand it.
tools/winapi_check/winapi_local.pm
View file @
ae9cf771
...
...
@@ -223,7 +223,7 @@ sub _check_function {
if
(
defined
(
$kind
)
&&
$kind
eq
"struct16"
)
{
$n
+=
4
;
(
"long"
,
"long"
,
"long"
,
"long"
);
}
elsif
(
defined
(
$kind
)
&&
$kind
eq
"longlong"
)
{
}
elsif
(
defined
(
$kind
)
&&
$kind
=~
/^(?:longlong)$/
)
{
$n
+=
2
;
(
"long"
,
"long"
);
}
else
{
...
...
tools/winapi_check/winapi_parser.pm
View file @
ae9cf771
...
...
@@ -359,7 +359,7 @@ sub parse_c_file {
next
;
}
elsif
(
/
(
extern
\
s
+|
static
\
s
+
)?((
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
signed
\
s
+|
unsigned
\
s
+
)?
\
w
+
((
\
s
*\*
)
+\
s
*|\
s
+
))
((
__cdecl
|
__stdcall
|
CDECL
|
VFWAPIV
|
VFWAPI
|
WINAPIV
|
WINAPI
|
CALLBACK
)
\
s
+
)?
(
\
w
+
(
\
(
\
w
+\
))?)
\
s
*\
((
[
^\
)]
*
)
\
)
\
s
*
(
\
{
|\
;)
/
sx
)
(
\
w
+
(
\
(
\
w
+\
))?)
\
s
*\
((
.*
?
)
\
)
\
s
*
(
\
{
|\
;)
/
sx
)
{
my
@lines
=
split
(
/\n/
,
$&
);
my
$function_line
=
$.
-
scalar
(
@lines
)
+
1
;
...
...
@@ -400,11 +400,15 @@ sub parse_c_file {
my
@argument_types
;
my
@argument_names
;
my
@arguments
=
split
(
/,/
,
$arguments
);
foreach
my
$n
(
0
..
$#arguments
)
{
my
@arguments
;
my
$n
=
0
;
while
(
$arguments
=~
s/^((?:[^,\(\)]*|(?:\([^\)]*\))?)+)(?:,|$)//
&&
$1
)
{
my
$argument
=
$1
;
push
@arguments
,
$argument
;
my
$argument_type
=
""
;
my
$argument_name
=
""
;
my
$argument
=
$arguments
[
$n
];
$argument
=~
s/^\s*(.*?)\s*$/$1/
;
# print " " . ($n + 1) . ": '$argument'\n";
$argument
=~
s/^(IN OUT(?=\s)|IN(?=\s)|OUT(?=\s)|\s*)\s*//
;
...
...
@@ -413,27 +417,74 @@ sub parse_c_file {
$argument_type
=
"..."
;
$argument_name
=
"..."
;
}
elsif
(
$argument
=~
/^
((?:
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)
((?:
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
register
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)
(?:
short
\
s
+
(?
=
int
)
|
long
\
s
+
(?
=
int
))?)?
\
w
+
)
\
s
*
((?:
const
)?
\
s
*
(?:
\*
\
s
*
?)
*
)
\
s
*
(?:
WINE_UNUSED
\
s
+
)?(
\
w
*
)
\
s
*
(?:
\
[
\
]
|\
s
+
OPTIONAL
)?
/
x
)
((?:
__RPC_FAR
|
const
|
CONST
)?
\
s
*
(?:
\*\
s
*
(?:
__RPC_FAR
|
const
|
CONST
)?
\
s
*
?)
*
)
\
s
*
(?:
WINE_UNUSED
\
s
+
)?(
\
w
*
)
\
s
*
(?:
\
[
\
]
|\
s
+
OPTIONAL
|\
s
+
WINE_UNUSED
)?
$
/
x
)
{
$argument_type
=
"$1"
;
if
(
$2
ne
""
)
{
$argument_type
=
$1
;
if
(
$2
)
{
$argument_type
.=
" $2"
;
}
$argument_name
=
$3
;
}
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
*
(?:
__cdecl
\
s
+|
__stdcall
\
s
+|
CALLBACK
\
s
+|
WINAPI
\
s
+
)?
\
(
\
s
*
(?:
__cdecl
|
__stdcall
|
CALLBACK
|
WINAPI
)?
\
s
*\*\
s
*
((?:
\
w
+
)?)
\
s
*\
)
\
s
*
\
(
\
s
*
(
.*
?)
\
s
*\
)
$
/
x
)
{
my
$return_type
=
$1
;
if
(
$2
)
{
$return_type
.=
" $2"
;
}
$argument_name
=
$3
;
my
$arguments
=
$4
;
$return_type
=~
s/\s+/ /g
;
$arguments
=~
s/\s*,\s*/,/g
;
$argument_type
=
"$return_type (*)($arguments)"
;
}
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
*
(
\
w
+
)
\
s
*\
[
\
s
*
(
.*
?)
\
s
*\
](?:
\
[
\
s
*
(
.*
?)
\
s
*\
])?
$
/
x
)
{
my
$return_type
=
$1
;
if
(
$2
)
{
$return_type
.=
" $2"
;
}
$argument_name
=
$3
;
$argument_type
=~
s/\s*const\s*/ /
;
$argument_type
=~
s/^\s*(.*?)\s*$/$1/
;
$argument_type
=
"$return_type\[$4\]"
;
if
(
defined
(
$5
))
{
$argument_type
.=
"\[$5\]"
;
}
$argument_name
=~
s/^\s*(.*?)\s*$/$1/
;
# die "$file: $.: syntax error: '$argument_type':'$argument_name'\n"
;
}
else
{
die
"$file: $.: syntax error: '$argument'\n"
;
}
$argument_type
=~
s/\s*const\s*/ /g
;
# Remove const
$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 *
$argument_type
=~
s/([\(\[])\s+/$1/g
;
# Remove whitespace after ( and [
$argument_type
=~
s/\s+([\)\]])/$1/g
;
# Remove whitespace before ] and )
$argument_type
=~
s/\s+/ /
;
# Remove multiple whitespace
$argument_type
=~
s/^\s*(.*?)\s*$/$1/
;
# Remove leading and trailing whitespace
$argument_name
=~
s/^\s*(.*?)\s*$/$1/
;
# Remove leading and trailing whitespace
$argument_types
[
$n
]
=
$argument_type
;
$argument_names
[
$n
]
=
$argument_name
;
# print " " . ($n + 1) . ": '" . $argument_types[$n] . "', '" . $argument_names[$n] . "'\n";
$n
++
;
}
if
(
$#argument_types
==
0
&&
$argument_types
[
0
]
=~
/^void$/i
)
{
$#argument_types
=
-
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