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
88a3a584
Commit
88a3a584
authored
Dec 09, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Use wcsnicmp() instead of a local helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
077fd389
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
listview.c
dlls/comctl32/listview.c
+2
-8
No files found.
dlls/comctl32/listview.c
View file @
88a3a584
...
...
@@ -540,12 +540,6 @@ static inline int textcmpWT(LPCWSTR aw, LPCWSTR bt, BOOL isW)
return
1
;
}
static
inline
int
lstrncmpiW
(
LPCWSTR
s1
,
LPCWSTR
s2
,
int
n
)
{
n
=
min
(
min
(
n
,
lstrlenW
(
s1
)),
lstrlenW
(
s2
));
return
CompareStringW
(
LOCALE_USER_DEFAULT
,
NORM_IGNORECASE
,
s1
,
n
,
s2
,
n
)
-
CSTR_EQUAL
;
}
/******** Debugging functions *****************************************/
static
inline
LPCSTR
debugtext_t
(
LPCWSTR
text
,
BOOL
isW
)
...
...
@@ -1953,7 +1947,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
item
.
cchTextMax
=
MAX_PATH
;
if
(
!
LISTVIEW_GetItemW
(
infoPtr
,
&
item
))
return
0
;
if
(
!
lstrncmpiW
(
item
.
pszText
,
infoPtr
->
szSearchParam
,
infoPtr
->
nSearchParamLength
))
if
(
!
wcsnicmp
(
item
.
pszText
,
infoPtr
->
szSearchParam
,
infoPtr
->
nSearchParamLength
))
{
nItem
=
i
;
break
;
...
...
@@ -1961,7 +1955,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
/* this is used to find first char match when search string is not available yet,
otherwise every WM_CHAR will search to next item by first char, ignoring that we're
already waiting for user to complete a string */
else
if
(
nItem
==
-
1
&&
infoPtr
->
nSearchParamLength
==
1
&&
!
lstrncmpiW
(
item
.
pszText
,
infoPtr
->
szSearchParam
,
1
))
else
if
(
nItem
==
-
1
&&
infoPtr
->
nSearchParamLength
==
1
&&
!
wcsnicmp
(
item
.
pszText
,
infoPtr
->
szSearchParam
,
1
))
{
/* this would work but we must keep looking for a longer match */
nItem
=
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