[SHELL32] Move SheRemoveQuotesA/W to iconcache.cpp (#5529)

Follow-up to #5517 (358e45d). stubs.cpp is for stub functions only. CORE-9277
This commit is contained in:
Katayama Hirofumi MZ 2023-08-05 21:17:06 +09:00 committed by GitHub
parent 358e45d33a
commit 7100fa8854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 40 deletions

View file

@ -987,6 +987,54 @@ HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD l
return hIcon;
}
/*************************************************************************
* SheRemoveQuotesA (SHELL32.@)
*/
EXTERN_C LPSTR
WINAPI
SheRemoveQuotesA(LPSTR psz)
{
PCHAR pch;
if (*psz == '"')
{
for (pch = psz + 1; *pch && *pch != '"'; ++pch)
{
*(pch - 1) = *pch;
}
if (*pch == '"')
*(pch - 1) = ANSI_NULL;
}
return psz;
}
/*************************************************************************
* SheRemoveQuotesW (SHELL32.@)
*
* ExtractAssociatedIconExW uses this function.
*/
EXTERN_C LPWSTR
WINAPI
SheRemoveQuotesW(LPWSTR psz)
{
PWCHAR pch;
if (*psz == L'"')
{
for (pch = psz + 1; *pch && *pch != L'"'; ++pch)
{
*(pch - 1) = *pch;
}
if (*pch == L'"')
*(pch - 1) = UNICODE_NULL;
}
return psz;
}
/*************************************************************************
* ExtractAssociatedIconExW (SHELL32.@)
*

View file

@ -440,46 +440,6 @@ SheSetCurDrive(INT iIndex)
return 1;
}
EXTERN_C LPWSTR
WINAPI
SheRemoveQuotesW(LPWSTR psz)
{
PWCHAR pch;
if (*psz == L'"')
{
for (pch = psz + 1; *pch && *pch != L'"'; ++pch)
{
*(pch - 1) = *pch;
}
if (*pch == L'"')
*(pch - 1) = UNICODE_NULL;
}
return psz;
}
EXTERN_C LPSTR
WINAPI
SheRemoveQuotesA(LPSTR psz)
{
PCHAR pch;
if (*psz == '"')
{
for (pch = psz + 1; *pch && *pch != '"'; ++pch)
{
*(pch - 1) = *pch;
}
if (*pch == '"')
*(pch - 1) = ANSI_NULL;
}
return psz;
}
/*
* Unimplemented
*/