include: Remove some no longer used Unicode functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ce0e6ccb32
commit
143bd63b27
|
@ -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)
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "android.h"
|
||||
#include "wine/server.h"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -67,8 +67,6 @@
|
|||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(joystick);
|
||||
|
||||
#define MAXJOYSTICK (JOYSTICKID2 + 30)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "oleidl.h"
|
||||
#include "objidl.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "x11drv.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "wingdi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(xvidmode);
|
||||
|
||||
|
|
|
@ -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, ...)
|
||||
|
|
Loading…
Reference in New Issue