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
da0acca7
Commit
da0acca7
authored
Nov 10, 2000
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 10, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use DUMMYxxxNAME for anonymous struct/unions.
parent
6c97e455
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
32 deletions
+32
-32
exticon.c
dlls/user/exticon.c
+3
-3
resource.c
dlls/version/resource.c
+4
-4
sqlext.h
include/sqlext.h
+2
-2
winbase.h
include/winbase.h
+1
-1
winnt.h
include/winnt.h
+4
-4
loader.c
library/loader.c
+2
-2
pe_resource.c
loader/pe_resource.c
+12
-12
heap.c
memory/heap.c
+4
-4
No files found.
dlls/user/exticon.c
View file @
da0acca7
...
...
@@ -79,7 +79,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
{
pos
=
(
min
+
max
)
/
2
;
if
(
entry
[
pos
].
u1
.
Id
==
id
)
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
2
.
OffsetToDirectory
);
if
(
entry
[
pos
].
u1
.
Id
>
id
)
max
=
pos
-
1
;
else
min
=
pos
+
1
;
}
...
...
@@ -97,7 +97,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
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
->
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
->
u2
.
s
2
.
OffsetToDirectory
);
}
/*************************************************************************
...
...
@@ -448,7 +448,7 @@ static HRESULT ICO_ExtractIconExW(
const
IMAGE_RESOURCE_DIRECTORY
*
resdir
;
/* go down this resource entry, name */
resdir
=
(
PIMAGE_RESOURCE_DIRECTORY
)((
DWORD
)
rootresdir
+
(
xresent
->
u2
.
s
.
OffsetToDirectory
));
resdir
=
(
PIMAGE_RESOURCE_DIRECTORY
)((
DWORD
)
rootresdir
+
(
xresent
->
u2
.
s
2
.
OffsetToDirectory
));
/* default language (0) */
resdir
=
find_entry_default
(
resdir
,
rootresdir
);
...
...
dlls/version/resource.c
View file @
da0acca7
...
...
@@ -42,7 +42,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
{
pos
=
(
min
+
max
)
/
2
;
if
(
entry
[
pos
].
u1
.
Id
==
id
)
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
2
.
OffsetToDirectory
);
if
(
entry
[
pos
].
u1
.
Id
>
id
)
max
=
pos
-
1
;
else
min
=
pos
+
1
;
}
...
...
@@ -62,7 +62,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
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
->
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
->
u2
.
s
2
.
OffsetToDirectory
);
}
...
...
@@ -96,11 +96,11 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_
while
(
min
<=
max
)
{
pos
=
(
min
+
max
)
/
2
;
str
=
(
IMAGE_RESOURCE_DIR_STRING_U
*
)((
char
*
)
root
+
entry
[
pos
].
u1
.
s
.
NameOffset
);
str
=
(
IMAGE_RESOURCE_DIR_STRING_U
*
)((
char
*
)
root
+
entry
[
pos
].
u1
.
s
1
.
NameOffset
);
res
=
strncmpiW
(
nameW
,
str
->
NameString
,
str
->
Length
);
if
(
!
res
&&
namelen
==
str
->
Length
)
{
ret
=
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
.
OffsetToDirectory
);
ret
=
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
2
.
OffsetToDirectory
);
break
;
}
if
(
res
<
0
)
max
=
pos
-
1
;
...
...
include/sqlext.h
View file @
da0acca7
...
...
@@ -1638,11 +1638,11 @@ typedef struct tagODBC_VS_ARGS {
union
{
WCHAR
*
wszArg
;
CHAR
*
szArg
;
}
u
1
;
}
DUMMYUNIONNAME
1
;
union
{
WCHAR
*
wszCorrelation
;
CHAR
*
szCorrelation
;
}
u2
;
}
DUMMYUNIONNAME2
;
RETCODE
RetCode
;
}
ODBC_VS_ARGS
,
*
PODBC_VS_ARGS
;
...
...
include/winbase.h
View file @
da0acca7
...
...
@@ -255,7 +255,7 @@ typedef struct
LPVOID
lpFirstBlock
;
LPVOID
lpLastBlock
;
}
Region
;
}
Foo
;
}
DUMMYUNIONNAME
;
}
PROCESS_HEAP_ENTRY
,
*
LPPROCESS_HEAP_ENTRY
;
#define PROCESS_HEAP_REGION 0x0001
...
...
include/winnt.h
View file @
da0acca7
...
...
@@ -2196,17 +2196,17 @@ typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
struct
{
unsigned
NameOffset
:
31
;
unsigned
NameIsString
:
1
;
}
s
;
}
DUMMYSTRUCTNAME1
;
DWORD
Name
;
WORD
Id
;
}
u
1
;
}
DUMMYUNIONNAME
1
;
union
{
DWORD
OffsetToData
;
struct
{
unsigned
OffsetToDirectory
:
31
;
unsigned
DataIsDirectory
:
1
;
}
s
;
}
u
2
;
}
DUMMYSTRUCTNAME2
;
}
DUMMYUNIONNAME
2
;
}
IMAGE_RESOURCE_DIRECTORY_ENTRY
,
*
PIMAGE_RESOURCE_DIRECTORY_ENTRY
;
...
...
library/loader.c
View file @
da0acca7
...
...
@@ -141,8 +141,8 @@ static void fixup_resources( IMAGE_RESOURCE_DIRECTORY *dir, char *root, void *ba
entry
=
(
IMAGE_RESOURCE_DIRECTORY_ENTRY
*
)(
dir
+
1
);
for
(
i
=
0
;
i
<
dir
->
NumberOfNamedEntries
+
dir
->
NumberOfIdEntries
;
i
++
,
entry
++
)
{
void
*
ptr
=
root
+
entry
->
u2
.
s
.
OffsetToDirectory
;
if
(
entry
->
u2
.
s
.
DataIsDirectory
)
fixup_resources
(
ptr
,
root
,
base
);
void
*
ptr
=
root
+
entry
->
u2
.
s
2
.
OffsetToDirectory
;
if
(
entry
->
u2
.
s
2
.
DataIsDirectory
)
fixup_resources
(
ptr
,
root
,
base
);
else
{
IMAGE_RESOURCE_DATA_ENTRY
*
data
=
ptr
;
...
...
loader/pe_resource.c
View file @
da0acca7
...
...
@@ -70,7 +70,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI
{
pos
=
(
min
+
max
)
/
2
;
if
(
entry
[
pos
].
u1
.
Id
==
id
)
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
2
.
OffsetToDirectory
);
if
(
entry
[
pos
].
u1
.
Id
>
id
)
max
=
pos
-
1
;
else
min
=
pos
+
1
;
}
...
...
@@ -106,10 +106,10 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_nameW( const IMAGE_RESOURCE
while
(
min
<=
max
)
{
pos
=
(
min
+
max
)
/
2
;
str
=
(
IMAGE_RESOURCE_DIR_STRING_U
*
)((
char
*
)
root
+
entry
[
pos
].
u1
.
s
.
NameOffset
);
str
=
(
IMAGE_RESOURCE_DIR_STRING_U
*
)((
char
*
)
root
+
entry
[
pos
].
u1
.
s
1
.
NameOffset
);
res
=
strncmpiW
(
name
,
str
->
NameString
,
str
->
Length
);
if
(
!
res
&&
namelen
==
str
->
Length
)
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
[
pos
].
u2
.
s
2
.
OffsetToDirectory
);
if
(
res
<
0
)
max
=
pos
-
1
;
else
min
=
pos
+
1
;
}
...
...
@@ -154,7 +154,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
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
->
u2
.
s
.
OffsetToDirectory
);
return
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
entry
->
u2
.
s
2
.
OffsetToDirectory
);
}
...
...
@@ -288,9 +288,9 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG lpara
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPSTR
type
;
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
if
(
et
[
i
].
u1
.
s
1
.
NameIsString
)
{
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
resdir
+
et
[
i
].
u1
.
s
.
NameOffset
);
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
resdir
+
et
[
i
].
u1
.
s
1
.
NameOffset
);
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
pResString
->
NameString
,
pResString
->
Length
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
type
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
)))
...
...
@@ -330,9 +330,9 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG lpara
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPWSTR
type
;
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
if
(
et
[
i
].
u1
.
s
1
.
NameIsString
)
{
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
resdir
+
et
[
i
].
u1
.
s
.
NameOffset
);
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
resdir
+
et
[
i
].
u1
.
s
1
.
NameOffset
);
if
(
!
(
type
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
pResString
->
Length
+
1
)
*
sizeof
(
WCHAR
))))
return
FALSE
;
memcpy
(
type
,
pResString
->
NameString
,
pResString
->
Length
*
sizeof
(
WCHAR
));
...
...
@@ -372,9 +372,9 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPSTR
name
;
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
if
(
et
[
i
].
u1
.
s
1
.
NameIsString
)
{
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
basedir
+
et
[
i
].
u1
.
s
.
NameOffset
);
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
basedir
+
et
[
i
].
u1
.
s
1
.
NameOffset
);
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
pResString
->
NameString
,
pResString
->
Length
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
)))
...
...
@@ -417,9 +417,9 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPWSTR
name
;
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
if
(
et
[
i
].
u1
.
s
1
.
NameIsString
)
{
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
basedir
+
et
[
i
].
u1
.
s
.
NameOffset
);
PIMAGE_RESOURCE_DIR_STRING_U
pResString
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
LPBYTE
)
basedir
+
et
[
i
].
u1
.
s
1
.
NameOffset
);
if
(
!
(
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
pResString
->
Length
+
1
)
*
sizeof
(
WCHAR
))))
return
FALSE
;
memcpy
(
name
,
pResString
->
NameString
,
pResString
->
Length
*
sizeof
(
WCHAR
));
...
...
memory/heap.c
View file @
da0acca7
...
...
@@ -1543,12 +1543,12 @@ BOOL WINAPI HeapWalk(
if
(
ptr
==
(
char
*
)(
currentheap
+
currentheap
->
headerSize
))
{
entry
->
wFlags
|=
PROCESS_HEAP_REGION
;
entry
->
Foo
.
Region
.
dwCommittedSize
=
currentheap
->
commitSize
;
entry
->
Foo
.
Region
.
dwUnCommittedSize
=
entry
->
u
.
Region
.
dwCommittedSize
=
currentheap
->
commitSize
;
entry
->
u
.
Region
.
dwUnCommittedSize
=
currentheap
->
size
-
currentheap
->
commitSize
;
entry
->
Foo
.
Region
.
lpFirstBlock
=
/* first valid block */
entry
->
u
.
Region
.
lpFirstBlock
=
/* first valid block */
currentheap
+
currentheap
->
headerSize
;
entry
->
Foo
.
Region
.
lpLastBlock
=
/* first invalid block */
entry
->
u
.
Region
.
lpLastBlock
=
/* first invalid block */
currentheap
+
currentheap
->
size
;
}
ret
=
TRUE
;
...
...
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