Alexandre Julliard : include: Remove some no longer used Unicode functions.

Alexandre Julliard julliard at winehq.org
Wed Dec 1 15:23:50 CST 2021


Module: wine
Branch: master
Commit: 143bd63b27f876a3767d13a57c8810a6a87acb9d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=143bd63b27f876a3767d13a57c8810a6a87acb9d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Dec  1 15:56:48 2021 +0100

include: Remove some no longer used Unicode functions.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/secur32/schannel_gnutls.c         |   4 +-
 dlls/wineandroid.drv/mmdevdrv.c        |   1 -
 dlls/wineandroid.drv/window.c          |   1 -
 dlls/winecoreaudio.drv/coreaudio.c     |   2 +-
 dlls/winecoreaudio.drv/coremidi.c      |   2 +-
 dlls/wined3d/wined3d_private.h         |   1 -
 dlls/winejoystick.drv/joystick_linux.c |   2 -
 dlls/wineoss.drv/midi.c                |   1 -
 dlls/wineoss.drv/mmdevdrv.c            |   1 -
 dlls/winex11.drv/xdnd.c                |   1 -
 dlls/winex11.drv/xinerama.c            |   1 -
 dlls/winex11.drv/xvidmode.c            |   1 -
 include/wine/unicode.h                 | 101 ---------------------------------
 13 files changed, 3 insertions(+), 116 deletions(-)

diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c
index 5f7ea3842a0..e02b1643e30 100644
--- a/dlls/secur32/schannel_gnutls.c
+++ b/dlls/secur32/schannel_gnutls.c
@@ -41,13 +41,11 @@
 #define WIN32_NO_STATUS
 #include "windef.h"
 #include "winbase.h"
+#include "winternl.h"
 #include "sspi.h"
-#include "schannel.h"
-#include "winreg.h"
 #include "secur32_priv.h"
 
 #include "wine/debug.h"
-#include "wine/unicode.h"
 
 #if defined(SONAME_LIBGNUTLS)
 
diff --git a/dlls/wineandroid.drv/mmdevdrv.c b/dlls/wineandroid.drv/mmdevdrv.c
index d9b7cde2c80..269f93115b7 100644
--- a/dlls/wineandroid.drv/mmdevdrv.c
+++ b/dlls/wineandroid.drv/mmdevdrv.c
@@ -44,7 +44,6 @@
 #include "winnls.h"
 #include "winreg.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "wine/list.h"
 
 #include "ole2.h"
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index 997bce15964..480871f3370 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -42,7 +42,6 @@
 #include "winbase.h"
 #include "wingdi.h"
 #include "winuser.h"
-#include "wine/unicode.h"
 
 #include "android.h"
 #include "wine/server.h"
diff --git a/dlls/winecoreaudio.drv/coreaudio.c b/dlls/winecoreaudio.drv/coreaudio.c
index e6ce5c33e36..00bd79927ca 100644
--- a/dlls/winecoreaudio.drv/coreaudio.c
+++ b/dlls/winecoreaudio.drv/coreaudio.c
@@ -61,11 +61,11 @@
 #include "winbase.h"
 #include "winnls.h"
 #include "winreg.h"
+#include "winternl.h"
 #include "mmdeviceapi.h"
 #include "initguid.h"
 #include "audioclient.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "wine/unixlib.h"
 
 #include "unixlib.h"
diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c
index 8c09d4a2c1b..ba3b7096b7f 100644
--- a/dlls/winecoreaudio.drv/coremidi.c
+++ b/dlls/winecoreaudio.drv/coremidi.c
@@ -80,12 +80,12 @@
 #include "winbase.h"
 #include "winnls.h"
 #include "winreg.h"
+#include "winternl.h"
 #include "mmsystem.h"
 #include "mmddk.h"
 #include "mmdeviceapi.h"
 #include "audioclient.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "wine/unixlib.h"
 
 #include "coreaudio.h"
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2fce585c6b1..e1df3d07f99 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -50,7 +50,6 @@
 #include "ddk/d3dkmthk.h"
 #include "wine/debug.h"
 #include "wine/heap.h"
-#include "wine/unicode.h"
 #ifdef HAVE_FLOAT_H
 # include <float.h>
 #endif
diff --git a/dlls/winejoystick.drv/joystick_linux.c b/dlls/winejoystick.drv/joystick_linux.c
index 8d1a7b1a25a..4e7e18e9e64 100644
--- a/dlls/winejoystick.drv/joystick_linux.c
+++ b/dlls/winejoystick.drv/joystick_linux.c
@@ -67,8 +67,6 @@
 #include "winnls.h"
 #include "wine/debug.h"
 
-#include "wine/unicode.h"
-
 WINE_DEFAULT_DEBUG_CHANNEL(joystick);
 
 #define MAXJOYSTICK (JOYSTICKID2 + 30)
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c
index 1e72dfcf898..553b2ff6ea9 100644
--- a/dlls/wineoss.drv/midi.c
+++ b/dlls/wineoss.drv/midi.c
@@ -63,7 +63,6 @@
 #include "winuser.h"
 #include "winnls.h"
 #include "mmddk.h"
-#include "wine/unicode.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(midi);
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index db2c6b23914..19a59cd9ba1 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -38,7 +38,6 @@
 #include "winnls.h"
 #include "winreg.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "wine/list.h"
 
 #include "ole2.h"
diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index 9472d9966bb..9eee4bee1ac 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -43,7 +43,6 @@
 #include "oleidl.h"
 #include "objidl.h"
 
-#include "wine/unicode.h"
 #include "wine/debug.h"
 #include "wine/list.h"
 
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c
index 84d197900c3..5794bcb4f74 100644
--- a/dlls/winex11.drv/xinerama.c
+++ b/dlls/winex11.drv/xinerama.c
@@ -30,7 +30,6 @@
 #include "x11drv.h"
 #include "wine/debug.h"
 #include "wine/heap.h"
-#include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
 
diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c
index c449157f6b3..79cf2e32dc5 100644
--- a/dlls/winex11.drv/xvidmode.c
+++ b/dlls/winex11.drv/xvidmode.c
@@ -43,7 +43,6 @@
 #include "wingdi.h"
 #include "wine/debug.h"
 #include "wine/heap.h"
-#include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(xvidmode);
 
diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index d29a371fe53..cb97d62ce40 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -67,31 +67,12 @@ WINE_UNICODE_INLINE WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
     return dst;
 }
 
-WINE_UNICODE_INLINE int strcmpW( const WCHAR *str1, const WCHAR *str2 )
-{
-    while (*str1 && (*str1 == *str2)) { str1++; str2++; }
-    return *str1 - *str2;
-}
-
-WINE_UNICODE_INLINE int strncmpW( const WCHAR *str1, const WCHAR *str2, int n )
-{
-    if (n <= 0) return 0;
-    while ((--n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
-    return *str1 - *str2;
-}
-
 WINE_UNICODE_INLINE WCHAR *strcatW( WCHAR *dst, const WCHAR *src )
 {
     strcpyW( dst + strlenW(dst), src );
     return dst;
 }
 
-WINE_UNICODE_INLINE WCHAR *strchrW( const WCHAR *str, WCHAR ch )
-{
-    do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++);
-    return NULL;
-}
-
 WINE_UNICODE_INLINE WCHAR *strrchrW( const WCHAR *str, WCHAR ch )
 {
     WCHAR *ret = NULL;
@@ -99,26 +80,6 @@ WINE_UNICODE_INLINE WCHAR *strrchrW( const WCHAR *str, WCHAR ch )
     return ret;
 }
 
-WINE_UNICODE_INLINE WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept )
-{
-    for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)(ULONG_PTR)str;
-    return NULL;
-}
-
-WINE_UNICODE_INLINE WCHAR *strlwrW( WCHAR *str )
-{
-    WCHAR *ret;
-    for (ret = str; *str; str++) *str = tolowerW(*str);
-    return ret;
-}
-
-WINE_UNICODE_INLINE WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
-{
-    const WCHAR *end;
-    for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return (WCHAR *)(ULONG_PTR)ptr;
-    return NULL;
-}
-
 WINE_UNICODE_INLINE int strcmpiW( const WCHAR *str1, const WCHAR *str2 )
 {
     for (;;)
@@ -138,18 +99,6 @@ WINE_UNICODE_INLINE int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n )
     return ret;
 }
 
-WINE_UNICODE_INLINE WCHAR *strstrW( const WCHAR *str, const WCHAR *sub )
-{
-    while (*str)
-    {
-        const WCHAR *p1 = str, *p2 = sub;
-        while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
-        if (!*p2) return (WCHAR *)str;
-        str++;
-    }
-    return NULL;
-}
-
 WINE_UNICODE_INLINE LONG strtolW( LPCWSTR s, LPWSTR *end, INT base )
 {
     BOOL negative = FALSE, empty = TRUE;
@@ -198,56 +147,6 @@ WINE_UNICODE_INLINE LONG strtolW( LPCWSTR s, LPWSTR *end, INT base )
     return ret;
 }
 
-WINE_UNICODE_INLINE ULONG strtoulW( LPCWSTR s, LPWSTR *end, INT base )
-{
-    BOOL negative = FALSE, empty = TRUE;
-    ULONG ret = 0;
-
-    if (base < 0 || base == 1 || base > 36) return 0;
-    if (end) *end = (WCHAR *)s;
-    while (isspaceW(*s)) s++;
-
-    if (*s == '-')
-    {
-        negative = TRUE;
-        s++;
-    }
-    else if (*s == '+') s++;
-
-    if ((base == 0 || base == 16) && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
-    {
-        base = 16;
-        s += 2;
-    }
-    if (base == 0) base = s[0] != '0' ? 10 : 8;
-
-    while (*s)
-    {
-        int v;
-
-        if ('0' <= *s && *s <= '9') v = *s - '0';
-        else if ('A' <= *s && *s <= 'Z') v = *s - 'A' + 10;
-        else if ('a' <= *s && *s <= 'z') v = *s - 'a' + 10;
-        else break;
-        if (v >= base) break;
-        s++;
-        empty = FALSE;
-
-        if (ret > MAXDWORD / base || ret * base > MAXDWORD - v)
-            ret = MAXDWORD;
-        else
-            ret = ret * base + v;
-    }
-
-    if (end && !empty) *end = (WCHAR *)s;
-    return negative ? -ret : ret;
-}
-
-WINE_UNICODE_INLINE int atoiW( const WCHAR *str )
-{
-    return (int)strtolW( str, (WCHAR **)0, 10 );
-}
-
 NTSYSAPI int __cdecl _vsnwprintf(WCHAR*,size_t,const WCHAR*,__ms_va_list);
 
 static inline int WINAPIV snprintfW( WCHAR *str, size_t len, const WCHAR *format, ...)




More information about the wine-cvs mailing list