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
b3da4abc
Commit
b3da4abc
authored
Nov 12, 2002
by
Patrik Stridvall
Committed by
Alexandre Julliard
Nov 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for a few new DLLs.
parent
ced69a9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
312 additions
and
14 deletions
+312
-14
c_parser.pm
tools/winapi/c_parser.pm
+4
-3
c_type.pm
tools/winapi/c_type.pm
+12
-7
tests.dat
tools/winapi/tests.dat
+289
-0
winapi_test
tools/winapi/winapi_test
+7
-4
No files found.
tools/winapi/c_parser.pm
View file @
b3da4abc
...
@@ -2003,8 +2003,12 @@ sub parse_c_variable {
...
@@ -2003,8 +2003,12 @@ sub parse_c_variable {
$name
=
$2
;
$name
=
$2
;
$finished
=
1
;
$finished
=
1
;
}
elsif
(
$self
->
_parse_c
(
'DEFINE_GUID'
,
\
$_
,
\
$line
,
\
$column
,
\
$match
))
{
# Windows specific
$type
=
$match
;
$finished
=
1
;
}
else
{
}
else
{
$self
->
_parse_c_warning
(
$_
,
$line
,
$column
,
"variable"
,
"'$_'"
);
$self
->
_parse_c_warning
(
$_
,
$line
,
$column
,
"variable"
,
"'$_'"
);
$finished
=
1
;
}
}
if
(
$finished
)
{
if
(
$finished
)
{
...
@@ -2012,9 +2016,6 @@ sub parse_c_variable {
...
@@ -2012,9 +2016,6 @@ sub parse_c_variable {
}
elsif
(
$self
->
_parse_c
(
'SEQ_DEFINEBUF'
,
\
$_
,
\
$line
,
\
$column
,
\
$match
))
{
# Linux specific
}
elsif
(
$self
->
_parse_c
(
'SEQ_DEFINEBUF'
,
\
$_
,
\
$line
,
\
$column
,
\
$match
))
{
# Linux specific
$type
=
$match
;
$type
=
$match
;
$finished
=
1
;
$finished
=
1
;
}
elsif
(
$self
->
_parse_c
(
'DEFINE_GUID'
,
\
$_
,
\
$line
,
\
$column
,
\
$match
))
{
# Windows specific
$type
=
$match
;
$finished
=
1
;
}
elsif
(
$self
->
_parse_c
(
'DEFINE_REGS_ENTRYPOINT_\w+|DPQ_DECL_\w+|HANDLER_DEF|IX86_ONLY'
,
# Wine specific
}
elsif
(
$self
->
_parse_c
(
'DEFINE_REGS_ENTRYPOINT_\w+|DPQ_DECL_\w+|HANDLER_DEF|IX86_ONLY'
,
# Wine specific
\
$_
,
\
$line
,
\
$column
,
\
$match
))
\
$_
,
\
$line
,
\
$column
,
\
$match
))
{
{
...
...
tools/winapi/c_type.pm
View file @
b3da4abc
...
@@ -256,7 +256,7 @@ sub _refresh {
...
@@ -256,7 +256,7 @@ sub _refresh {
my
$n
=
0
;
my
$n
=
0
;
foreach
my
$field
(
$self
->
fields
)
{
foreach
my
$field
(
$self
->
fields
)
{
my
$type_name
=
$field
->
type_name
;
my
$type_name
=
$field
->
type_name
;
my
$size
=
&
$$find_size
(
$type_name
);
my
$
type_
size
=
&
$$find_size
(
$type_name
);
my
$base_type_name
=
$type_name
;
my
$base_type_name
=
$type_name
;
if
(
$base_type_name
=~
s/^(.*?)\s*(?:\[\s*(.*?)\s*\]|:(\d+))?$/$1/
)
{
if
(
$base_type_name
=~
s/^(.*?)\s*(?:\[\s*(.*?)\s*\]|:(\d+))?$/$1/
)
{
...
@@ -279,11 +279,11 @@ sub _refresh {
...
@@ -279,11 +279,11 @@ sub _refresh {
$$kind
=
&
$$find_kind
(
$type_name
)
||
""
;
$$kind
=
&
$$find_kind
(
$type_name
)
||
""
;
}
}
if
(
!
defined
(
$size
))
{
if
(
!
defined
(
$
type_
size
))
{
$$align
=
undef
;
$$align
=
undef
;
$$size
=
undef
;
$$size
=
undef
;
return
;
return
;
}
elsif
(
$size
>=
0
)
{
}
elsif
(
$
type_
size
>=
0
)
{
if
(
$offset_bits
)
{
if
(
$offset_bits
)
{
$offset
+=
$pack
*
int
((
$offset_bits
+
8
*
$pack
-
1
)
/
(
8
*
$pack
));
$offset
+=
$pack
*
int
((
$offset_bits
+
8
*
$pack
-
1
)
/
(
8
*
$pack
));
$offset_bits
=
0
;
$offset_bits
=
0
;
...
@@ -292,16 +292,16 @@ sub _refresh {
...
@@ -292,16 +292,16 @@ sub _refresh {
$$
$field_aligns
[
$n
]
=
$align
;
$$
$field_aligns
[
$n
]
=
$align
;
$$
$field_base_sizes
[
$n
]
=
$base_size
;
$$
$field_base_sizes
[
$n
]
=
$base_size
;
$$
$field_offsets
[
$n
]
=
$offset
;
$$
$field_offsets
[
$n
]
=
$offset
;
$$
$field_sizes
[
$n
]
=
$size
;
$$
$field_sizes
[
$n
]
=
$
type_
size
;
$offset
+=
$size
;
$offset
+=
$
type_
size
;
}
else
{
}
else
{
$$
$field_aligns
[
$n
]
=
$align
;
$$
$field_aligns
[
$n
]
=
$align
;
$$
$field_base_sizes
[
$n
]
=
$base_size
;
$$
$field_base_sizes
[
$n
]
=
$base_size
;
$$
$field_offsets
[
$n
]
=
$offset
;
$$
$field_offsets
[
$n
]
=
$offset
;
$$
$field_sizes
[
$n
]
=
$size
;
$$
$field_sizes
[
$n
]
=
$
type_
size
;
$offset_bits
+=
-
$size
;
$offset_bits
+=
-
$
type_
size
;
}
}
$n
++
;
$n
++
;
...
@@ -310,6 +310,11 @@ sub _refresh {
...
@@ -310,6 +310,11 @@ sub _refresh {
$$align
=
$pack
;
$$align
=
$pack
;
$$align
=
$max_field_align
if
$max_field_align
<
$pack
;
$$align
=
$max_field_align
if
$max_field_align
<
$pack
;
if
(
$offset_bits
)
{
$offset
+=
$pack
*
int
((
$offset_bits
+
8
*
$pack
-
1
)
/
(
8
*
$pack
));
$offset_bits
=
0
;
}
$$size
=
$offset
;
$$size
=
$offset
;
if
(
$$kind
=~
/^(?:struct|union)$/
)
{
if
(
$$kind
=~
/^(?:struct|union)$/
)
{
if
(
$$size
%
$$align
!=
0
)
{
if
(
$$size
%
$$align
!=
0
)
{
...
...
tools/winapi/tests.dat
View file @
b3da4abc
...
@@ -849,6 +849,141 @@ __int32
...
@@ -849,6 +849,141 @@ __int32
!__int64
!__int64
__int8
__int8
%%%dlls/shell32/tests
%%pack
%description
Unit tests for data structure packing
%header
basetsd.h
winnt.h
windef.h
wtypes.h
shellapi.h
shlobj.h
%include
stdarg.h
windef.h
wtypes.h
shellapi.h
shlobj.h
%type
APPBARDATA
BFFCALLBACK
BROWSEINFOA
BROWSEINFOW
CIDA
DRAGINFOA
DRAGINFOW
DROPFILES
FILEOP_FLAGS
IShellIcon
ITEMIDLIST
LPBROWSEINFOA
LPBROWSEINFOW
LPCITEMIDLIST
LPDRAGINFOA
LPDRAGINFOW
LPIDA
LPITEMIDLIST
LPSHDESCRIPTIONID
LPSHELLEXECUTEINFOA
LPSHELLEXECUTEINFOW
!LPSHELLFLAGSTATE
# LPSHELLVIEWDATA
LPSHFILEOPSTRUCTA
LPSHFILEOPSTRUCTW
LPSHITEMID
NOTIFYICONDATAA
NOTIFYICONDATAW
PAPPBARDATA
PBROWSEINFOA
PBROWSEINFOW
PNOTIFYICONDATAA
PNOTIFYICONDATAW
PRINTEROP_FLAGS
SHDESCRIPTIONID
SHELLEXECUTEINFOA
SHELLEXECUTEINFOW
!SHELLFLAGSTATE
# SHELLVIEWDATA
SHELLVIEWID
# SHELLVIEWPROC
SHFILEINFOA
SHFILEINFOW
SHFILEOPSTRUCTA
SHFILEOPSTRUCTW
SHITEMID
%%%dlls/shlwapi/tests
%%pack
%description
Unit tests for data structure packing
%header
basetsd.h
winnt.h
windef.h
wtypes.h
shlwapi.h
%include
windef.h
wtypes.h
shlwapi.h
%type
!ASSOCF
DLLGETVERSIONPROC
DLLVERSIONINFO
!DLLVERSIONINFO2
HUSKEY
IQueryAssociations
PHUSKEY
%%%dlls/urlmon/tests
%%pack
%description
Unit tests for data structure packing
%header
basetsd.h
winnt.h
windef.h
urlmon.h
%include
windef.h
urlmon.h
%type
BINDINFO
IBindHost
IBindStatusCallback
IBinding
IWinInetHttpInfo
IWinInetInfo
%%%dlls/user/tests
%%%dlls/user/tests
%%pack
%%pack
...
@@ -1115,3 +1250,157 @@ WNDCLASSEXW
...
@@ -1115,3 +1250,157 @@ WNDCLASSEXW
WNDCLASSW
WNDCLASSW
WNDENUMPROC
WNDENUMPROC
WNDPROC
WNDPROC
%%%dlls/wininet/tests
%%pack
%description
Unit tests for data structure packing
%header
basetsd.h
winnt.h
windef.h
winbase.h
wininet.h
%include
stdarg.h
windef.h
winbase.h
wininet.h
%type
!GOPHER_ABSTRACT_ATTRIBUTE_TYPEA
!GOPHER_ABSTRACT_ATTRIBUTE_TYPEW
GOPHER_ABSTRACT_ATTRIBUTE_TYPE
!GOPHER_ADMIN_ATTRIBUTE_TYPEA
!GOPHER_ADMIN_ATTRIBUTE_TYPEW
GOPHER_ADMIN_ATTRIBUTE_TYPE
!GOPHER_ASK_ATTRIBUTE_TYPEA
!GOPHER_ASK_ATTRIBUTE_TYPEW
GOPHER_ASK_ATTRIBUTE_TYPE
!GOPHER_ATTRIBUTE_ENUMERATORA
!GOPHER_ATTRIBUTE_ENUMERATORW
GOPHER_ATTRIBUTE_ENUMERATOR
!GOPHER_ATTRIBUTE_TYPEA
!GOPHER_ATTRIBUTE_TYPEW
GOPHER_ATTRIBUTE_TYPE
GOPHER_FIND_DATAA
GOPHER_FIND_DATAW
GOPHER_FIND_DATA
GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE
!GOPHER_LOCATION_ATTRIBUTE_TYPEA
!GOPHER_LOCATION_ATTRIBUTE_TYPEW
GOPHER_LOCATION_ATTRIBUTE_TYPE
GOPHER_MOD_DATE_ATTRIBUTE_TYPE
!GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA
!GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW
GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
!GOPHER_PROVIDER_ATTRIBUTE_TYPEA
!GOPHER_PROVIDER_ATTRIBUTE_TYPEW
GOPHER_PROVIDER_ATTRIBUTE_TYPE
GOPHER_SCORE_ATTRIBUTE_TYPE
GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE
!GOPHER_SITE_ATTRIBUTE_TYPEA
!GOPHER_SITE_ATTRIBUTE_TYPEW
GOPHER_SITE_ATTRIBUTE_TYPE
GOPHER_TIMEZONE_ATTRIBUTE_TYPE
GOPHER_TTL_ATTRIBUTE_TYPE
!GOPHER_UNKNOWN_ATTRIBUTE_TYPEA
!GOPHER_UNKNOWN_ATTRIBUTE_TYPEW
GOPHER_UNKNOWN_ATTRIBUTE_TYPE
GOPHER_VERONICA_ATTRIBUTE_TYPE
!GOPHER_VERSION_ATTRIBUTE_TYPEA
!GOPHER_VERSION_ATTRIBUTE_TYPEW
GOPHER_VERSION_ATTRIBUTE_TYPE
!GOPHER_VIEW_ATTRIBUTE_TYPEA
!GOPHER_VIEW_ATTRIBUTE_TYPEW
GOPHER_VIEW_ATTRIBUTE_TYPE
!GROUPID
HINTERNET
HTTP_VERSION_INFO
INTERNET_ASYNC_RESULT
INTERNET_AUTH_NOTIFY_DATA
INTERNET_BUFFERSA
INTERNET_BUFFERSW
INTERNET_CACHE_ENTRY_INFOA
INTERNET_CACHE_ENTRY_INFOW
!INTERNET_CERTIFICATE_INFOA
!INTERNET_CERTIFICATE_INFOW
INTERNET_CERTIFICATE_INFO
INTERNET_CONNECTED_INFO
INTERNET_PORT
!INTERNET_PROXY_INFOA
!INTERNET_PROXY_INFOW
INTERNET_PROXY_INFO
INTERNET_STATUS_CALLBACK
INTERNET_VERSION_INFO
!LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA
!L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TE_TYPE
!LPGOPHER_VERSION_ATTRIBUTE_TYPEA
!LPGOPHER_VERSION_ATTRIBUTE_TYPEW
LPGOPHER_VERSION_ATTRIBUTE_TYPE
!LPGOPHER_VIEW_ATTRIBUTE_TYPEA
!LPGOPHER_VIEW_ATTRIBUTE_TYPEW
LPGOPHER_VIEW_ATTRIBUTE_TYPE
LPHINTERNET
LPHTTP_VERSION_INFO
LPINTERNET_ASYNC_RESULT
LPINTERNET_BUFFERSA
LPINTERNET_BUFFERSW
LPINTERNET_CACHE_ENTRY_INFOA
LPINTERNET_CACHE_ENTRY_INFOW
!LPINTERNET_CERTIFICATE_INFOA
!LPINTERNET_CERTIFICATE_INFOW
LPINTERNET_CONNECTED_INFO
LPINTERNET_PORT
!LPINTERNET_PROXY_INFOA
!LPINTERNET_PROXY_INFOW
LPINTERNET_STATUS_CALLBACK
LPINTERNET_VERSION_INFO
LPURL_COMPONENTSA
LPURL_COMPONENTSW
PFN_AUTH_NOTIFY
PFN_DIAL_HANDLER
URL_COMPONENTSA
URL_COMPONENTSW
tools/winapi/winapi_test
View file @
b3da4abc
...
@@ -157,6 +157,8 @@ my %defines = (
...
@@ -157,6 +157,8 @@ my %defines = (
"LF_FACESIZE"
=>
32
,
"LF_FACESIZE"
=>
32
,
"LF_FULLFACESIZE"
=>
64
,
"LF_FULLFACESIZE"
=>
64
,
"MAXIMUM_SUPPORTED_EXTENSION"
=>
512
,
"MAXIMUM_SUPPORTED_EXTENSION"
=>
512
,
"MAX_GOPHER_DISPLAY_TEXT + 1"
=>
129
,
"MAX_GOPHER_LOCATOR_LENGTH + 1"
=>
654
,
"MAX_PATH"
=>
260
,
"MAX_PATH"
=>
260
,
"MAX_PROFILE_LEN"
=>
80
,
"MAX_PROFILE_LEN"
=>
80
,
"OFS_MAXPATHNAME"
=>
128
,
"OFS_MAXPATHNAME"
=>
128
,
...
@@ -233,7 +235,7 @@ sub _find_align_kind_size {
...
@@ -233,7 +235,7 @@ sub _find_align_kind_size {
$align
=
4
;
$align
=
4
;
$kind
=
"struct"
;
$kind
=
"struct"
;
$size
=
8
;
$size
=
8
;
}
elsif
(
/^(?:LARGE_INTEGER
|LONGLONG
)$/
)
{
}
elsif
(
/^(?:LARGE_INTEGER)$/
)
{
$align
=
4
;
$align
=
4
;
$kind
=
"signed"
;
$kind
=
"signed"
;
$size
=
8
;
$size
=
8
;
...
@@ -282,10 +284,10 @@ sub _find_align_kind_size {
...
@@ -282,10 +284,10 @@ sub _find_align_kind_size {
}
elsif
(
defined
(
$count
))
{
}
elsif
(
defined
(
$count
))
{
if
(
$count
=~
/^\d+$/
)
{
if
(
$count
=~
/^\d+$/
)
{
$size
*=
int
(
$count
);
$size
*=
int
(
$count
);
}
elsif
(
defined
(
$count
=
$defines
{
$count
}))
{
}
elsif
(
defined
(
my
$count2
=
$defines
{
$count
}))
{
$size
*=
int
(
$count
);
$size
*=
int
(
$count
2
);
}
else
{
}
else
{
$output
->
write
(
"$type_name: can't parse type\n"
);
$output
->
write
(
"$type_name: can't parse type
('$_') ('$count')
\n"
);
$size
=
undef
;
$size
=
undef
;
}
}
}
elsif
(
defined
(
$bits
))
{
}
elsif
(
defined
(
$bits
))
{
...
@@ -453,6 +455,7 @@ sub output_header {
...
@@ -453,6 +455,7 @@ sub output_header {
print
OUT
"\n"
;
print
OUT
"\n"
;
print
OUT
"#define WINVER 0x0501\n"
;
print
OUT
"#define WINVER 0x0501\n"
;
print
OUT
"#define _WIN32_IE 0x0501\n"
;
print
OUT
"#define _WIN32_WINNT 0x0501\n"
;
print
OUT
"#define _WIN32_WINNT 0x0501\n"
;
print
OUT
"\n"
;
print
OUT
"\n"
;
print
OUT
"#define WINE_NOWINSOCK\n"
;
print
OUT
"#define WINE_NOWINSOCK\n"
;
...
...
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