Mikołaj Zalewski : include: Add a strcmpW-equivalent function usable in tests.

Alexandre Julliard julliard at winehq.org
Mon Feb 22 08:46:48 CST 2010


Module: wine
Branch: master
Commit: bc07b48b38ced3d1cae5fa4b9e4d03c575d7f1af
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bc07b48b38ced3d1cae5fa4b9e4d03c575d7f1af

Author: Mikołaj Zalewski <mikolajz at tygrys.dom>
Date:   Sat Feb 20 22:41:31 2010 +0100

include: Add a strcmpW-equivalent function usable in tests.

---

 include/wine/test.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/wine/test.h b/include/wine/test.h
index 42a56c0..5d371c5 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -65,6 +65,14 @@ extern void winetest_wait_child_process( HANDLE process );
 extern const char *wine_dbgstr_wn( const WCHAR *str, int n );
 static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
 
+/* strcmpW is avaiable for tests compiled under Wine, but not in standalone
+ * builds under Windows, so we reimplement it under a different name. */
+static inline int winetest_strcmpW( const WCHAR *str1, const WCHAR *str2 )
+{
+    while (*str1 && (*str1 == *str2)) { str1++; str2++; }
+    return *str1 - *str2;
+}
+
 #ifdef STANDALONE
 #define START_TEST(name) \
   static void func_##name(void); \




More information about the wine-cvs mailing list