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
280e51e1
Commit
280e51e1
authored
Jan 26, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenum/tests: Get rid of strchrW() and strncmpW().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5a5f53b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
devenum.c
dlls/devenum/tests/devenum.c
+4
-17
No files found.
dlls/devenum/tests/devenum.c
View file @
280e51e1
...
...
@@ -46,19 +46,6 @@ static const WCHAR swW[] = {'s','w',':',0};
static
const
WCHAR
cmW
[]
=
{
'c'
,
'm'
,
':'
,
0
};
static
const
WCHAR
backslashW
[]
=
{
'\\'
,
0
};
static
inline
WCHAR
*
strchrW
(
const
WCHAR
*
str
,
WCHAR
ch
)
{
do
{
if
(
*
str
==
ch
)
return
(
WCHAR
*
)
str
;
}
while
(
*
str
++
);
return
NULL
;
}
static
inline
int
strncmpW
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
,
int
n
)
{
if
(
n
<=
0
)
return
0
;
while
((
--
n
>
0
)
&&
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
return
*
str1
-
*
str2
;
}
static
void
test_devenum
(
IBindCtx
*
bind_ctx
)
{
IEnumMoniker
*
enum_cat
,
*
enum_moniker
;
...
...
@@ -762,7 +749,7 @@ static void test_waveout(void)
StringFromGUID2
(
&
CLSID_AudioRendererCategory
,
buffer
+
lstrlenW
(
buffer
),
CHARS_IN_GUID
);
lstrcatW
(
buffer
,
backslashW
);
lstrcatW
(
buffer
,
waveW
);
lstrcatW
(
buffer
,
strchrW
(
endpoint
,
'}'
)
+
2
);
lstrcatW
(
buffer
,
wcschr
(
endpoint
,
'}'
)
+
2
);
mon
=
check_display_name
(
parser
,
buffer
);
...
...
@@ -773,7 +760,7 @@ static void test_waveout(void)
}
ok
(
hr
==
S_OK
,
"Read failed: %#x
\n
"
,
hr
);
ok
(
!
strncmpW
(
name
,
V_BSTR
(
&
var
),
lstrlenW
(
name
)),
"expected %s, got %s
\n
"
,
ok
(
!
wcsncmp
(
name
,
V_BSTR
(
&
var
),
lstrlenW
(
name
)),
"expected %s, got %s
\n
"
,
wine_dbgstr_w
(
name
),
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
VariantClear
(
&
var
);
...
...
@@ -848,7 +835,7 @@ static void test_wavein(void)
StringFromGUID2
(
&
CLSID_AudioInputDeviceCategory
,
buffer
+
lstrlenW
(
buffer
),
CHARS_IN_GUID
);
lstrcatW
(
buffer
,
backslashW
);
lstrcatW
(
buffer
,
waveW
);
lstrcatW
(
buffer
,
strchrW
(
endpoint
,
'}'
)
+
2
);
lstrcatW
(
buffer
,
wcschr
(
endpoint
,
'}'
)
+
2
);
mon
=
check_display_name
(
parser
,
buffer
);
...
...
@@ -859,7 +846,7 @@ static void test_wavein(void)
}
ok
(
hr
==
S_OK
,
"Read failed: %#x
\n
"
,
hr
);
ok
(
!
strncmpW
(
caps
.
szPname
,
V_BSTR
(
&
var
),
lstrlenW
(
caps
.
szPname
)),
"expected %s, got %s
\n
"
,
ok
(
!
wcsncmp
(
caps
.
szPname
,
V_BSTR
(
&
var
),
lstrlenW
(
caps
.
szPname
)),
"expected %s, got %s
\n
"
,
wine_dbgstr_w
(
caps
.
szPname
),
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
VariantClear
(
&
var
);
...
...
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