shlwapi: Implement IsCharSpaceA() (resend)

Nikolay Sivov nsivov at codeweavers.com
Thu Dec 20 03:54:34 CST 2012


First mail is probably lost
-------------- next part --------------
>From ce3bd3876da71249506f094d7ed27dbf52eadaed Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu, 20 Dec 2012 08:43:27 +0400
Subject: [PATCH 1/2] 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 */
 
 
-- 
1.7.10.4



More information about the wine-patches mailing list