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
887c2b3b
Commit
887c2b3b
authored
Nov 05, 2001
by
Guy Albertelli
Committed by
Alexandre Julliard
Nov 05, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Indicate that StrRetToStrN{A|W} and StrRetToBuf{A|W} are identical
code but duplicated deliberately. - Implement StrRChrI{A|W}.
parent
8b0841ad
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
3 deletions
+86
-3
shellstring.c
dlls/shell32/shellstring.c
+22
-1
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+2
-2
string.c
dlls/shlwapi/string.c
+62
-0
No files found.
dlls/shell32/shellstring.c
View file @
887c2b3b
...
@@ -25,6 +25,13 @@ DEFAULT_DEBUG_CHANNEL(shell);
...
@@ -25,6 +25,13 @@ DEFAULT_DEBUG_CHANNEL(shell);
*
*
* NOTES
* NOTES
* the pidl is for STRRET OFFSET
* 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
)
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
...
@@ -56,7 +63,21 @@ HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMID
return
S_OK
;
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
)
HRESULT
WINAPI
StrRetToStrNW
(
LPVOID
dest1
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
{
{
...
...
dlls/shlwapi/shlwapi.spec
View file @
887c2b3b
...
@@ -644,8 +644,8 @@ debug_channels (shell)
...
@@ -644,8 +644,8 @@ debug_channels (shell)
@ stub StrPBrkA
@ stub StrPBrkA
@ stub StrPBrkW
@ stub StrPBrkW
@ stdcall StrRChrA (str str long) StrRChrA
@ stdcall StrRChrA (str str long) StrRChrA
@ st
ub
StrRChrIA
@ st
dcall StrRChrIA (str str long)
StrRChrIA
@ st
ub
StrRChrIW
@ st
dcall StrRChrIW (str str long)
StrRChrIW
@ stdcall StrRChrW (wstr wstr long) StrRChrW
@ stdcall StrRChrW (wstr wstr long) StrRChrW
@ stub StrRStrIA
@ stub StrRStrIA
@ stub StrRStrIW
@ stub StrRStrIW
...
...
dlls/shlwapi/string.c
View file @
887c2b3b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <wctype.h>
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
...
@@ -334,6 +335,53 @@ LPWSTR WINAPI StrRChrW( LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch)
...
@@ -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.@]
* StrCatBuffA [SHLWAPI.@]
*
*
...
@@ -377,6 +425,13 @@ LPWSTR WINAPI StrCatBuffW(LPWSTR front, LPCWSTR back, INT size)
...
@@ -377,6 +425,13 @@ LPWSTR WINAPI StrCatBuffW(LPWSTR front, LPCWSTR back, INT size)
*
*
* NOTES
* NOTES
* the pidl is for STRRET OFFSET
* 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
)
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
...
@@ -415,6 +470,13 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, D
*
*
* NOTES
* NOTES
* the pidl is for STRRET OFFSET
* 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
)
HRESULT
WINAPI
StrRetToBufW
(
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
,
LPWSTR
dest
,
DWORD
len
)
{
{
...
...
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