Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
887c2b3b
Commit
887c2b3b
authored
23 years ago
by
Guy Albertelli
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- Indicate that StrRetToStrN{A|W} and StrRetToBuf{A|W} are identical
code but duplicated deliberately. - Implement StrRChrI{A|W}.
parent
8b0841ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/shell32/shellstring.c
+22
-1
22 additions, 1 deletion
dlls/shell32/shellstring.c
dlls/shlwapi/shlwapi.spec
+2
-2
2 additions, 2 deletions
dlls/shlwapi/shlwapi.spec
dlls/shlwapi/string.c
+62
-0
62 additions, 0 deletions
dlls/shlwapi/string.c
with
86 additions
and
3 deletions
dlls/shell32/shellstring.c
+
22
−
1
View file @
887c2b3b
...
...
@@ -25,6 +25,13 @@ DEFAULT_DEBUG_CHANNEL(shell);
*
* NOTES
* the pidl is for STRRET OFFSET
*
* ***** NOTE *****
* This routine is identical to StrRetToBufA in dlls/shlwapi/string.c.
* It was duplicated here because not every version of Shlwapi.dll exports
* StrRetToBufA. If you change one routine, change them both. YOU HAVE BEEN
* WARNED.
* ***** NOTE *****
*/
HRESULT
WINAPI
StrRetToStrNA
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
{
...
...
@@ -56,7 +63,21 @@ HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMID
return
S_OK
;
}
/*************************************************************************/
/*************************************************************************
* StrRetToStrNW [SHELL32.]
*
* converts a STRRET to a normal string
*
* NOTES
* the pidl is for STRRET OFFSET
*
* ***** NOTE *****
* This routine is identical to StrRetToBufW in dlls/shlwapi/string.c.
* It was duplicated here because not every version of Shlwapi.dll exports
* StrRetToBufW. If you change one routine, change them both. YOU HAVE BEEN
* WARNED.
* ***** NOTE *****
*/
HRESULT
WINAPI
StrRetToStrNW
(
LPVOID
dest1
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
{
...
...
This diff is collapsed.
Click to expand it.
dlls/shlwapi/shlwapi.spec
+
2
−
2
View file @
887c2b3b
...
...
@@ -644,8 +644,8 @@ debug_channels (shell)
@ stub StrPBrkA
@ stub StrPBrkW
@ stdcall StrRChrA (str str long) StrRChrA
@ st
ub
StrRChrIA
@ st
ub
StrRChrIW
@ st
dcall StrRChrIA (str str long)
StrRChrIA
@ st
dcall StrRChrIW (str str long)
StrRChrIW
@ stdcall StrRChrW (wstr wstr long) StrRChrW
@ stub StrRStrIA
@ stub StrRStrIW
...
...
This diff is collapsed.
Click to expand it.
dlls/shlwapi/string.c
+
62
−
0
View file @
887c2b3b
...
...
@@ -2,6 +2,7 @@
#include
<stdlib.h>
#include
<stdio.h>
#include
<string.h>
#include
<wctype.h>
#include
"winerror.h"
#include
"windef.h"
...
...
@@ -334,6 +335,53 @@ LPWSTR WINAPI StrRChrW( LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch)
}
/**************************************************************************
* StrRChrIA [SHLWAPI.@]
*
*/
LPSTR
WINAPI
StrRChrIA
(
LPCSTR
lpStart
,
LPCSTR
lpEnd
,
WORD
wMatch
)
{
LPCSTR
lpGotIt
=
NULL
;
BOOL
dbcs
=
IsDBCSLeadByte
(
LOBYTE
(
wMatch
)
);
TRACE
(
"(%p, %p, %x)
\n
"
,
lpStart
,
lpEnd
,
wMatch
);
if
(
!
lpEnd
)
lpEnd
=
lpStart
+
strlen
(
lpStart
);
for
(;
lpStart
<
lpEnd
;
lpStart
=
CharNextA
(
lpStart
))
{
if
(
dbcs
)
{
/*
if (_mbctoupper(*lpStart) == _mbctoupper(wMatch))
lpGotIt = lpStart;
*/
if
(
toupper
(
*
lpStart
)
==
toupper
(
wMatch
))
lpGotIt
=
lpStart
;
}
else
{
if
(
toupper
(
*
lpStart
)
==
toupper
(
wMatch
))
lpGotIt
=
lpStart
;
}
}
return
(
LPSTR
)
lpGotIt
;
}
/**************************************************************************
* StrRChrIW [SHLWAPI.@]
*
*/
LPWSTR
WINAPI
StrRChrIW
(
LPCWSTR
lpStart
,
LPCWSTR
lpEnd
,
WORD
wMatch
)
{
LPCWSTR
lpGotIt
=
NULL
;
TRACE
(
"(%p, %p, %x)
\n
"
,
lpStart
,
lpEnd
,
wMatch
);
if
(
!
lpEnd
)
lpEnd
=
lpStart
+
strlenW
(
lpStart
);
for
(;
lpStart
<
lpEnd
;
lpStart
=
CharNextW
(
lpStart
))
if
(
towupper
(
*
lpStart
)
==
towupper
(
wMatch
))
lpGotIt
=
lpStart
;
return
(
LPWSTR
)
lpGotIt
;
}
/*************************************************************************
* StrCatBuffA [SHLWAPI.@]
*
...
...
@@ -377,6 +425,13 @@ LPWSTR WINAPI StrCatBuffW(LPWSTR front, LPCWSTR back, INT size)
*
* NOTES
* the pidl is for STRRET OFFSET
*
* ***** NOTE *****
* This routine is identical to StrRetToStrNA in dlls/shell32/shellstring.c.
* It was duplicated there because not every version of Shlwapi.dll exports
* StrRetToBufA. If you change one routine, change them both. YOU HAVE BEEN
* WARNED.
* ***** NOTE *****
*/
HRESULT
WINAPI
StrRetToBufA
(
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
,
LPSTR
dest
,
DWORD
len
)
{
...
...
@@ -415,6 +470,13 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, D
*
* NOTES
* the pidl is for STRRET OFFSET
*
* ***** NOTE *****
* This routine is identical to StrRetToStrNW in dlls/shell32/shellstring.c.
* It was duplicated there because not every version of Shlwapi.dll exports
* StrRetToBufW. If you change one routine, change them both. YOU HAVE BEEN
* WARNED.
* ***** NOTE *****
*/
HRESULT
WINAPI
StrRetToBufW
(
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
,
LPWSTR
dest
,
DWORD
len
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment