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
70a6ac07
Commit
70a6ac07
authored
Jul 18, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ver: Use nameless unions/structs.
parent
80ee53bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
version.c
dlls/ver.dll16/version.c
+6
-8
No files found.
dlls/ver.dll16/version.c
View file @
70a6ac07
...
...
@@ -25,8 +25,6 @@
#include <string.h>
#include <sys/types.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "wine/winbase16.h"
#include "winternl.h"
...
...
@@ -55,9 +53,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
while
(
min
<=
max
)
{
pos
=
(
min
+
max
)
/
2
;
if
(
entry
[
pos
].
u
.
Id
==
id
)
return
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
entry
[
pos
].
u2
.
s2
.
OffsetToDirectory
);
if
(
entry
[
pos
].
u
.
Id
>
id
)
max
=
pos
-
1
;
if
(
entry
[
pos
].
Id
==
id
)
return
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
entry
[
pos
].
OffsetToDirectory
);
if
(
entry
[
pos
].
Id
>
id
)
max
=
pos
-
1
;
else
min
=
pos
+
1
;
}
return
NULL
;
...
...
@@ -76,7 +74,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_
const
IMAGE_RESOURCE_DIRECTORY_ENTRY
*
entry
;
entry
=
(
const
IMAGE_RESOURCE_DIRECTORY_ENTRY
*
)(
dir
+
1
);
return
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
entry
->
u2
.
s2
.
OffsetToDirectory
);
return
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
entry
->
OffsetToDirectory
);
}
...
...
@@ -114,11 +112,11 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_
while
(
min
<=
max
)
{
pos
=
(
min
+
max
)
/
2
;
str
=
(
const
IMAGE_RESOURCE_DIR_STRING_U
*
)((
const
char
*
)
root
+
entry
[
pos
].
u
.
s
.
NameOffset
);
str
=
(
const
IMAGE_RESOURCE_DIR_STRING_U
*
)((
const
char
*
)
root
+
entry
[
pos
].
NameOffset
);
res
=
wcsnicmp
(
nameW
,
str
->
NameString
,
str
->
Length
);
if
(
!
res
&&
namelen
==
str
->
Length
)
{
ret
=
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
entry
[
pos
].
u2
.
s2
.
OffsetToDirectory
);
ret
=
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
entry
[
pos
].
OffsetToDirectory
);
break
;
}
if
(
res
<
0
)
max
=
pos
-
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