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
0443f2c7
Commit
0443f2c7
authored
Sep 24, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Implement StrChrNW.
parent
1775ab4a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
0 deletions
+44
-0
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+1
-0
string.c
dlls/shlwapi/string.c
+19
-0
string.c
dlls/shlwapi/tests/string.c
+24
-0
No files found.
dlls/shlwapi/shlwapi.spec
View file @
0443f2c7
...
...
@@ -757,6 +757,7 @@
@ stdcall StrChrA (str long)
@ stdcall StrChrIA (str long)
@ stdcall StrChrIW (wstr long)
@ stdcall StrChrNW(wstr long long)
@ stdcall StrChrW (wstr long)
@ stdcall StrCmpIW (wstr wstr)
@ stdcall StrCmpLogicalW(wstr wstr)
...
...
dlls/shlwapi/string.c
View file @
0443f2c7
...
...
@@ -319,6 +319,25 @@ LPWSTR WINAPI StrChrIW(LPCWSTR lpszStr, WCHAR ch)
}
/*************************************************************************
* StrChrNW [SHLWAPI.@]
*/
LPWSTR
WINAPI
StrChrNW
(
LPCWSTR
lpszStr
,
WCHAR
ch
,
UINT
cchMax
)
{
TRACE
(
"(%s(%i),%i)
\n
"
,
debugstr_wn
(
lpszStr
,
cchMax
),
cchMax
,
ch
);
if
(
lpszStr
)
{
while
(
*
lpszStr
&&
cchMax
--
>
0
)
{
if
(
*
lpszStr
==
ch
)
return
(
LPWSTR
)
lpszStr
;
lpszStr
++
;
}
}
return
NULL
;
}
/*************************************************************************
* StrCmpIW [SHLWAPI.@]
*
* Compare two strings, ignoring case.
...
...
dlls/shlwapi/tests/string.c
View file @
0443f2c7
...
...
@@ -58,6 +58,7 @@ static HRESULT (WINAPI *pStrRetToBufA)(STRRET*,LPCITEMIDLIST,LPSTR,UINT);
static
HRESULT
(
WINAPI
*
pStrRetToBufW
)(
STRRET
*
,
LPCITEMIDLIST
,
LPWSTR
,
UINT
);
static
INT
(
WINAPIV
*
pwnsprintfA
)(
LPSTR
,
INT
,
LPCSTR
,
...);
static
INT
(
WINAPIV
*
pwnsprintfW
)(
LPWSTR
,
INT
,
LPCWSTR
,
...);
static
LPWSTR
(
WINAPI
*
pStrChrNW
)(
LPWSTR
,
WCHAR
,
UINT
);
static
int
strcmpW
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
...
...
@@ -373,6 +374,27 @@ static void test_StrCpyW(void)
}
}
static
void
test_StrChrNW
(
void
)
{
static
WCHAR
string
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
'i'
,
'n'
,
'g'
,
' '
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
LPWSTR
p
;
if
(
!
pStrChrNW
)
{
win_skip
(
"StrChrNW not available
\n
"
);
return
;
}
p
=
pStrChrNW
(
string
,
't'
,
10
);
ok
(
*
p
==
't'
,
"Found wrong 't'
\n
"
);
ok
(
*
(
p
+
1
)
==
'i'
,
"next should be 'i'
\n
"
);
p
=
pStrChrNW
(
string
,
'S'
,
10
);
ok
(
*
p
==
'S'
,
"Found wrong 'S'
\n
"
);
p
=
pStrChrNW
(
string
,
'r'
,
10
);
ok
(
p
==
NULL
,
"Should not have found 'r'
\n
"
);
}
static
void
test_StrToIntA
(
void
)
{
...
...
@@ -911,6 +933,7 @@ START_TEST(string)
pStrCatBuffW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"StrCatBuffW"
);
pStrCpyNXA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
(
LPSTR
)
399
);
pStrCpyNXW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
(
LPSTR
)
400
);
pStrChrNW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"StrChrNW"
);
pStrFormatByteSize64A
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"StrFormatByteSize64A"
);
pStrFormatKBSizeA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"StrFormatKBSizeA"
);
pStrFormatKBSizeW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"StrFormatKBSizeW"
);
...
...
@@ -929,6 +952,7 @@ START_TEST(string)
test_StrRChrA
();
test_StrRChrW
();
test_StrCpyW
();
test_StrChrNW
();
test_StrToIntA
();
test_StrToIntW
();
test_StrToIntExA
();
...
...
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