Module: wine Branch: master Commit: 16cc2b87530947415dcff6e545bdd77a232edbb1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=16cc2b87530947415dcff6e545...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Dec 20 08:43:27 2012 +0400
shlwapi: Implement IsCharSpaceA().
---
dlls/shlwapi/ordinal.c | 19 ------------------- dlls/shlwapi/shlwapi.spec | 1 + dlls/shlwapi/string.c | 25 +++++++++++++++++++++++++ include/shlwapi.h | 4 ++++ 4 files changed, 30 insertions(+), 19 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 88f415b..19ab3d9 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -638,25 +638,6 @@ INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax) }
/************************************************************************* - * @ [SHLWAPI.29] - * - * Determine if a Unicode character is a space. - * - * PARAMS - * wc [I] Character to check. - * - * RETURNS - * TRUE, if wc is a space, - * FALSE otherwise. - */ -BOOL WINAPI IsCharSpaceW(WCHAR wc) -{ - WORD CharType; - - return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE); -} - -/************************************************************************* * @ [SHLWAPI.30] * * Determine if a Unicode character is a blank. diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 025d48a..bf33e62 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -566,6 +566,7 @@ @ stdcall HashData (ptr long ptr long) @ stdcall IntlStrEqWorkerA(long str str long) StrIsIntlEqualA @ stdcall IntlStrEqWorkerW(long wstr wstr long) StrIsIntlEqualW +@ stdcall IsCharSpaceA(long) @ stdcall PathAddBackslashA (str) @ stdcall PathAddBackslashW (wstr) @ stdcall PathAddExtensionA (str str) diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index 18606ce..1a4ad14 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -2824,3 +2824,28 @@ end: HeapFree(GetProcessHeap(), 0, dllname); return hr; } + +BOOL WINAPI IsCharSpaceA(CHAR c) +{ + WORD CharType; + return GetStringTypeA(GetSystemDefaultLCID(), CT_CTYPE1, &c, 1, &CharType) && (CharType & C1_SPACE); +} + +/************************************************************************* + * @ [SHLWAPI.29] + * + * Determine if a Unicode character is a space. + * + * PARAMS + * wc [I] Character to check. + * + * RETURNS + * TRUE, if wc is a space, + * FALSE otherwise. + */ +BOOL WINAPI IsCharSpaceW(WCHAR wc) +{ + WORD CharType; + + return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE); +} diff --git a/include/shlwapi.h b/include/shlwapi.h index 067ef7b..a1436fa 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -935,6 +935,10 @@ HRESULT WINAPI StrRetToBufW(STRRET*,LPCITEMIDLIST,LPWSTR,UINT);
HRESULT WINAPI StrRetToBSTR(STRRET*,LPCITEMIDLIST,BSTR*);
+BOOL WINAPI IsCharSpaceA(CHAR); +BOOL WINAPI IsCharSpaceW(WCHAR); +#define IsCharSpace WINELIB_NAME_AW(IsCharSpace) + #endif /* NO_SHLWAPI_STRFCNS */