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
328383d4
Commit
328383d4
authored
Jul 20, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Simplify the parsing of clr tables.
parent
5e512993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
31 deletions
+10
-31
assembly.c
dlls/fusion/assembly.c
+10
-31
No files found.
dlls/fusion/assembly.c
View file @
328383d4
...
@@ -482,8 +482,9 @@ static inline ULONG get_table_size(const ASSEMBLY *assembly, DWORD index)
...
@@ -482,8 +482,9 @@ static inline ULONG get_table_size(const ASSEMBLY *assembly, DWORD index)
static
HRESULT
parse_clr_tables
(
ASSEMBLY
*
assembly
,
ULONG
offset
)
static
HRESULT
parse_clr_tables
(
ASSEMBLY
*
assembly
,
ULONG
offset
)
{
{
DWORD
i
,
previ
,
offidx
;
DWORD
i
,
count
;
ULONG
currofs
;
ULONG
currofs
;
ULONGLONG
mask
;
currofs
=
offset
;
currofs
=
offset
;
assembly
->
tableshdr
=
assembly_data_offset
(
assembly
,
currofs
);
assembly
->
tableshdr
=
assembly_data_offset
(
assembly
,
currofs
);
...
@@ -502,44 +503,22 @@ static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset)
...
@@ -502,44 +503,22 @@ static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset)
if
(
!
assembly
->
numrows
)
if
(
!
assembly
->
numrows
)
return
E_FAIL
;
return
E_FAIL
;
assembly
->
numtables
=
0
;
for
(
i
=
0
;
i
<
MAX_CLR_TABLES
;
i
++
)
{
if
((
i
<
32
&&
(
assembly
->
tableshdr
->
MaskValid
.
u
.
LowPart
>>
i
)
&
1
)
||
(
i
>=
32
&&
(
assembly
->
tableshdr
->
MaskValid
.
u
.
HighPart
>>
i
)
&
1
))
{
assembly
->
numtables
++
;
}
}
currofs
+=
assembly
->
numtables
*
sizeof
(
DWORD
);
memset
(
assembly
->
tables
,
-
1
,
MAX_CLR_TABLES
*
sizeof
(
CLRTABLE
));
memset
(
assembly
->
tables
,
-
1
,
MAX_CLR_TABLES
*
sizeof
(
CLRTABLE
));
if
(
assembly
->
tableshdr
->
MaskValid
.
u
.
LowPart
&
1
)
for
(
i
=
count
=
0
,
mask
=
1
;
i
<
MAX_CLR_TABLES
;
i
++
,
mask
<<=
1
)
assembly
->
tables
[
0
].
offset
=
currofs
;
offidx
=
0
;
for
(
i
=
0
;
i
<
MAX_CLR_TABLES
;
i
++
)
{
{
if
((
i
<
32
&&
(
assembly
->
tableshdr
->
MaskValid
.
u
.
LowPart
>>
i
)
&
1
)
||
if
(
assembly
->
tableshdr
->
MaskValid
.
QuadPart
&
mask
)
(
i
>=
32
&&
(
assembly
->
tableshdr
->
MaskValid
.
u
.
HighPart
>>
i
)
&
1
))
assembly
->
tables
[
i
].
rows
=
assembly
->
numrows
[
count
++
];
{
assembly
->
tables
[
i
].
rows
=
assembly
->
numrows
[
offidx
];
offidx
++
;
}
}
}
assembly
->
numtables
=
count
;
currofs
+=
assembly
->
numtables
*
sizeof
(
DWORD
);
previ
=
0
;
for
(
i
=
0
,
mask
=
1
;
i
<
MAX_CLR_TABLES
;
i
++
,
mask
<<=
1
)
offidx
=
1
;
for
(
i
=
1
;
i
<
MAX_CLR_TABLES
;
i
++
)
{
{
if
((
i
<
32
&&
(
assembly
->
tableshdr
->
MaskValid
.
u
.
LowPart
>>
i
)
&
1
)
||
if
(
assembly
->
tableshdr
->
MaskValid
.
QuadPart
&
mask
)
(
i
>=
32
&&
(
assembly
->
tableshdr
->
MaskValid
.
u
.
HighPart
>>
i
)
&
1
))
{
{
currofs
+=
get_table_size
(
assembly
,
previ
)
*
assembly
->
numrows
[
offidx
-
1
];
assembly
->
tables
[
i
].
offset
=
currofs
;
assembly
->
tables
[
i
].
offset
=
currofs
;
offidx
++
;
currofs
+=
get_table_size
(
assembly
,
i
)
*
assembly
->
tables
[
i
].
rows
;
previ
=
i
;
}
}
}
}
...
...
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