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
6be32ec8
Commit
6be32ec8
authored
Nov 05, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Nov 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof/tests: Pass level by value in process_data rather than a pointer.
parent
f3e88387
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+12
-11
No files found.
dlls/d3dxof/tests/d3dxof.c
View file @
6be32ec8
...
...
@@ -613,7 +613,7 @@ static void test_syntax(void)
* only one string in a sub-object (very common). Use with care, this may lead to a crash. */
#define EXPAND_STRING 0
static
void
process_data
(
LPDIRECTXFILEDATA
lpDirectXFileData
,
int
*
p
level
)
static
void
process_data
(
LPDIRECTXFILEDATA
lpDirectXFileData
,
int
level
)
{
HRESULT
hr
;
char
name
[
100
];
...
...
@@ -636,7 +636,7 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int* plevel)
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileData_GetType: %x
\n
"
,
hr
);
hr
=
IDirectXFileData_GetData
(
lpDirectXFileData
,
NULL
,
&
size
,
(
void
**
)
&
pData
);
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileData_GetData: %x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
*
p
level
;
i
++
)
for
(
i
=
0
;
i
<
level
;
i
++
)
printf
(
" "
);
debugstr_guid
(
str_clsid
,
&
clsid
);
debugstr_guid
(
str_clsid_type
,
clsid_type
);
...
...
@@ -657,7 +657,9 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int* plevel)
}
printf
(
"
\n
"
);
}
(
*
plevel
)
++
;
level
++
;
while
(
SUCCEEDED
(
hr
=
IDirectXFileData_GetNextObject
(
lpDirectXFileData
,
&
pChildObj
)))
{
LPDIRECTXFILEDATA
p1
;
...
...
@@ -668,17 +670,17 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int* plevel)
hr
=
IDirectXFileObject_QueryInterface
(
pChildObj
,
&
IID_IDirectXFileData
,
(
void
**
)
&
p1
);
if
(
SUCCEEDED
(
hr
))
{
for
(
i
=
0
;
i
<
*
p
level
;
i
++
)
for
(
i
=
0
;
i
<
level
;
i
++
)
printf
(
" "
);
printf
(
"Found Data (%d)
\n
"
,
j
);
process_data
(
p1
,
p
level
);
process_data
(
p1
,
level
);
IDirectXFileData_Release
(
p1
);
}
hr
=
IDirectXFileObject_QueryInterface
(
pChildObj
,
&
IID_IDirectXFileDataReference
,
(
void
**
)
&
p2
);
if
(
SUCCEEDED
(
hr
))
{
LPDIRECTXFILEDATA
pfdo
;
for
(
i
=
0
;
i
<
*
p
level
;
i
++
)
for
(
i
=
0
;
i
<
level
;
i
++
)
printf
(
" "
);
printf
(
"Found Data Reference (%d)
\n
"
,
j
);
#if 0
...
...
@@ -688,21 +690,21 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int* plevel)
ok(hr == DXFILE_OK, "IDirectXFileData_GetName: %x\n", hr);
#endif
IDirectXFileDataReference_Resolve
(
p2
,
&
pfdo
);
process_data
(
pfdo
,
p
level
);
process_data
(
pfdo
,
level
);
IDirectXFileData_Release
(
pfdo
);
IDirectXFileDataReference_Release
(
p2
);
}
hr
=
IDirectXFileObject_QueryInterface
(
pChildObj
,
&
IID_IDirectXFileBinary
,
(
void
**
)
&
p3
);
if
(
SUCCEEDED
(
hr
))
{
for
(
i
=
0
;
i
<
*
p
level
;
i
++
)
for
(
i
=
0
;
i
<
level
;
i
++
)
printf
(
" "
);
printf
(
"Found Binary (%d)
\n
"
,
j
);
IDirectXFileBinary_Release
(
p3
);
}
IDirectXFileObject_Release
(
pChildObj
);
}
(
*
plevel
)
--
;
ok
(
hr
==
DXFILE_OK
||
hr
==
DXFILEERR_NOMOREOBJECTS
,
"IDirectXFileData_GetNextObject: %x
\n
"
,
hr
);
}
...
...
@@ -761,9 +763,8 @@ static void test_dump(void)
while
(
SUCCEEDED
(
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
lpDirectXFileEnumObject
,
&
lpDirectXFileData
)))
{
int
level
=
0
;
printf
(
"
\n
"
);
process_data
(
lpDirectXFileData
,
&
level
);
process_data
(
lpDirectXFileData
,
0
);
IDirectXFileData_Release
(
lpDirectXFileData
);
}
ok
(
hr
==
DXFILE_OK
||
hr
==
DXFILEERR_NOMOREOBJECTS
,
"IDirectXFileEnumObject_GetNextDataObject: %x
\n
"
,
hr
);
...
...
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