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
64d68b10
Commit
64d68b10
authored
Feb 20, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Implement string functions in comctl32.
- Use CompareString in shlwapi wherever possible instead of ugly helpers.
parent
c162263d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
71 deletions
+27
-71
comctl32.spec
dlls/comctl32/comctl32.spec
+10
-10
string.c
dlls/comctl32/string.c
+0
-0
string.c
dlls/shlwapi/string.c
+17
-61
No files found.
dlls/comctl32/comctl32.spec
View file @
64d68b10
...
...
@@ -77,16 +77,16 @@
363 stdcall -noname StrStrIW(wstr wstr)
364 stdcall -noname StrSpnW(wstr wstr)
365 stdcall -noname StrToIntW(wstr)
366 st
ub -noname StrChrIA
367 st
ub -noname StrChrIW
368 st
ub -noname StrRChrIA
369 st
ub -noname StrRChrIW
372 st
ub -noname StrRStrIA
373 st
ub -noname StrRStrIW
374 st
ub -noname StrCSpnIA
375 st
ub -noname StrCSpnIW
376 st
ub -noname IntlStrEqWorkerA
377 st
ub -noname IntlStrEqWorkerW
366 st
dcall -noname StrChrIA(str long)
367 st
dcall -noname StrChrIW(wstr long)
368 st
dcall -noname StrRChrIA(str str long)
369 st
dcall -noname StrRChrIW(wstr wstr long)
372 st
dcall -noname StrRStrIA(str str str)
373 st
dcall -noname StrRStrIW(wstr wstr wstr)
374 st
dcall -noname StrCSpnIA(str str)
375 st
dcall -noname StrCSpnIW(wstr wstr)
376 st
dcall -noname IntlStrEqWorkerA(long str str long)
377 st
dcall -noname IntlStrEqWorkerW(long wstr wstr long)
382 stdcall -noname SmoothScrollWindow(ptr)
383 stub -noname DoReaderMode
384 stub -noname SetPathWordBreakProc
...
...
dlls/comctl32/string.c
View file @
64d68b10
This diff is collapsed.
Click to expand it.
dlls/shlwapi/string.c
View file @
64d68b10
...
...
@@ -280,51 +280,12 @@ LPWSTR WINAPI StrChrIW(LPCWSTR lpszStr, WCHAR ch)
*/
int
WINAPI
StrCmpIW
(
LPCWSTR
lpszStr
,
LPCWSTR
lpszComp
)
{
INT
iRet
;
int
iRet
;
TRACE
(
"(%s,%s)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszComp
));
iRet
=
strcmpiW
(
lpszStr
,
lpszComp
);
return
iRet
<
0
?
-
1
:
iRet
?
1
:
0
;
}
/*************************************************************************
* SHLWAPI_StrCmpNHelperA
*
* Internal helper for StrCmpNA/StrCmpNIA.
*/
static
INT
WINAPI
SHLWAPI_StrCmpNHelperA
(
LPCSTR
lpszStr
,
LPCSTR
lpszComp
,
INT
iLen
,
BOOL
(
WINAPI
*
pChrCmpFn
)(
WORD
,
WORD
))
{
if
(
!
lpszStr
)
{
if
(
!
lpszComp
)
return
0
;
return
1
;
}
else
if
(
!
lpszComp
)
return
-
1
;
while
(
iLen
--
>
0
)
{
int
iDiff
;
WORD
ch1
,
ch2
;
ch1
=
IsDBCSLeadByte
(
*
lpszStr
)
?
*
lpszStr
<<
8
|
lpszStr
[
1
]
:
*
lpszStr
;
ch2
=
IsDBCSLeadByte
(
*
lpszComp
)
?
*
lpszComp
<<
8
|
lpszComp
[
1
]
:
*
lpszComp
;
if
((
iDiff
=
pChrCmpFn
(
ch1
,
ch2
))
<
0
)
return
-
1
;
else
if
(
iDiff
>
0
)
return
1
;
else
if
(
!*
lpszStr
&&
!*
lpszComp
)
return
0
;
lpszStr
=
CharNextA
(
lpszStr
);
lpszComp
=
CharNextA
(
lpszComp
);
}
return
0
;
iRet
=
CompareStringW
(
GetThreadLocale
(),
NORM_IGNORECASE
,
lpszStr
,
-
1
,
lpszComp
,
-
1
);
return
iRet
==
CSTR_LESS_THAN
?
-
1
:
iRet
==
CSTR_GREATER_THAN
?
1
:
0
;
}
/*************************************************************************
...
...
@@ -343,9 +304,12 @@ static INT WINAPI SHLWAPI_StrCmpNHelperA(LPCSTR lpszStr, LPCSTR lpszComp,
*/
INT
WINAPI
StrCmpNA
(
LPCSTR
lpszStr
,
LPCSTR
lpszComp
,
INT
iLen
)
{
INT
iRet
;
TRACE
(
"(%s,%s,%i)
\n
"
,
debugstr_a
(
lpszStr
),
debugstr_a
(
lpszComp
),
iLen
);
return
SHLWAPI_StrCmpNHelperA
(
lpszStr
,
lpszComp
,
iLen
,
SHLWAPI_ChrCmpA
);
iRet
=
CompareStringA
(
GetThreadLocale
(),
0
,
lpszStr
,
iLen
,
lpszComp
,
iLen
);
return
iRet
==
CSTR_LESS_THAN
?
-
1
:
iRet
==
CSTR_GREATER_THAN
?
1
:
0
;
}
/*************************************************************************
...
...
@@ -359,8 +323,8 @@ INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
TRACE
(
"(%s,%s,%i)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszComp
),
iLen
);
iRet
=
strncmpW
(
lpszStr
,
lpszComp
,
iLen
);
return
iRet
<
0
?
-
1
:
iRet
?
1
:
0
;
iRet
=
CompareStringW
(
GetThreadLocale
(),
0
,
lpszStr
,
iLen
,
lpszComp
,
iLen
);
return
iRet
==
CSTR_LESS_THAN
?
-
1
:
iRet
==
CSTR_GREATER_THAN
?
1
:
0
;
}
/*************************************************************************
...
...
@@ -376,23 +340,15 @@ INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
* RETURNS
* An integer less than, equal to or greater than 0, indicating that
* lpszStr is less than, the same, or greater than lpszComp.
*
* NOTES
* The Win32 version of this function is _completely_ broken for cases
* where iLen is greater than the length of lpszComp. Examples:
*
*| StrCmpNIA("foo.gif", "foo", 5) is -1 under Win32; Should return 1.
*| StrCmpNIA("\", "\\", 3) is 0 under Win32; Should return -1.
*| StrCmpNIA("\", "\..\foo\", 3) is 1 under Win32; Should return -1.
*
* This implementation behaves correctly, since it is unlikely any
* applications actually rely on this function being broken.
*/
int
WINAPI
StrCmpNIA
(
LPCSTR
lpszStr
,
LPCSTR
lpszComp
,
int
iLen
)
{
INT
iRet
;
TRACE
(
"(%s,%s,%i)
\n
"
,
debugstr_a
(
lpszStr
),
debugstr_a
(
lpszComp
),
iLen
);
return
SHLWAPI_StrCmpNHelperA
(
lpszStr
,
lpszComp
,
iLen
,
ChrCmpIA
);
iRet
=
CompareStringA
(
GetThreadLocale
(),
NORM_IGNORECASE
,
lpszStr
,
iLen
,
lpszComp
,
iLen
);
return
iRet
==
CSTR_LESS_THAN
?
-
1
:
iRet
==
CSTR_GREATER_THAN
?
1
:
0
;
}
/*************************************************************************
...
...
@@ -406,8 +362,8 @@ INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, int iLen)
TRACE
(
"(%s,%s,%i)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszComp
),
iLen
);
iRet
=
strncmpiW
(
lpszStr
,
lpszComp
,
iLen
);
return
iRet
<
0
?
-
1
:
iRet
?
1
:
0
;
iRet
=
CompareStringW
(
GetThreadLocale
(),
NORM_IGNORECASE
,
lpszStr
,
iLen
,
lpszComp
,
iLen
);
return
iRet
==
CSTR_LESS_THAN
?
-
1
:
iRet
==
CSTR_GREATER_THAN
?
1
:
0
;
}
/*************************************************************************
...
...
@@ -429,8 +385,8 @@ int WINAPI StrCmpW(LPCWSTR lpszStr, LPCWSTR lpszComp)
TRACE
(
"(%s,%s)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszComp
));
iRet
=
strcmpW
(
lpszStr
,
lpszComp
);
return
iRet
<
0
?
-
1
:
iRet
?
1
:
0
;
iRet
=
CompareStringW
(
GetThreadLocale
(),
0
,
lpszStr
,
-
1
,
lpszComp
,
-
1
);
return
iRet
==
CSTR_LESS_THAN
?
-
1
:
iRet
==
CSTR_GREATER_THAN
?
1
:
0
;
}
/*************************************************************************
...
...
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