- Indicate that StrRetToStrN{A|W} and StrRetToBuf{A|W} are identical
code but duplicated deliberately. - Implement StrRChrI{A|W}.
This commit is contained in:
parent
8b0841ad38
commit
887c2b3b56
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -644,8 +644,8 @@ debug_channels (shell)
|
|||
@ stub StrPBrkA
|
||||
@ stub StrPBrkW
|
||||
@ stdcall StrRChrA (str str long) StrRChrA
|
||||
@ stub StrRChrIA
|
||||
@ stub StrRChrIW
|
||||
@ stdcall StrRChrIA (str str long) StrRChrIA
|
||||
@ stdcall StrRChrIW (str str long) StrRChrIW
|
||||
@ stdcall StrRChrW (wstr wstr long) StrRChrW
|
||||
@ stub StrRStrIA
|
||||
@ stub StrRStrIW
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue