Commit a3132f29 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Don't use unicode.h.

parent a3d4eefa
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
#include "shlwapi.h" #include "shlwapi.h"
#include "wine/list.h" #include "wine/list.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(clipboard); WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
...@@ -1135,7 +1134,7 @@ void *uri_list_to_drop_files( const void *data, size_t size, size_t *ret_size ) ...@@ -1135,7 +1134,7 @@ void *uri_list_to_drop_files( const void *data, size_t size, size_t *ret_size )
if (path) if (path)
{ {
int pathSize = strlenW(path) + 1; int pathSize = wcslen( path ) + 1;
if (pathSize > capacity - total) if (pathSize > capacity - total)
{ {
WCHAR *new_out; WCHAR *new_out;
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#include "x11drv.h" #include "x11drv.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(graphics); WINE_DEFAULT_DEBUG_CHANNEL(graphics);
...@@ -1733,7 +1732,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size, ...@@ -1733,7 +1732,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
else lstrcpyW( p, srgb ); else lstrcpyW( p, srgb );
NtClose( hkey ); NtClose( hkey );
required = strlenW( fullname ) + 1 - 4 /* skip NT prefix */; required = wcslen( fullname ) + 1 - 4 /* skip NT prefix */;
if (*size < required) if (*size < required)
{ {
*size = required; *size = required;
...@@ -1743,7 +1742,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size, ...@@ -1743,7 +1742,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
if (filename) if (filename)
{ {
FILE_BASIC_INFORMATION info; FILE_BASIC_INFORMATION info;
strcpyW( filename, fullname + 4 ); wcscpy( filename, fullname + 4 );
RtlInitUnicodeString( &name, fullname ); RtlInitUnicodeString( &name, fullname );
InitializeObjectAttributes( &attr, &name, OBJ_CASE_INSENSITIVE, NULL, NULL ); InitializeObjectAttributes( &attr, &name, OBJ_CASE_INSENSITIVE, NULL, NULL );
if (NtQueryAttributesFile( &attr, &info )) if (NtQueryAttributesFile( &attr, &info ))
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include "ime.h" #include "ime.h"
#include "x11drv.h" #include "x11drv.h"
#include "wine/server.h" #include "wine/server.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
/* log format (add 0-padding as appropriate): /* log format (add 0-padding as appropriate):
...@@ -2104,7 +2103,7 @@ UINT X11DRV_MapVirtualKeyEx( UINT wCode, UINT wMapType, HKL hkl ) ...@@ -2104,7 +2103,7 @@ UINT X11DRV_MapVirtualKeyEx( UINT wCode, UINT wMapType, HKL hkl )
if (len) if (len)
{ {
WCHAR wch; WCHAR wch;
if (ntdll_umbstowcs( s, len, &wch, 1 )) ret = toupperW(wch); if (ntdll_umbstowcs( s, len, &wch, 1 )) ret = RtlUpcaseUnicodeChar( wch );
} }
break; break;
} }
...@@ -2171,7 +2170,7 @@ INT X11DRV_GetKeyNameText( LONG lParam, LPWSTR lpBuffer, INT nSize ) ...@@ -2171,7 +2170,7 @@ INT X11DRV_GetKeyNameText( LONG lParam, LPWSTR lpBuffer, INT nSize )
{ {
if (nSize >= 2) if (nSize >= 2)
{ {
*lpBuffer = toupperW((WCHAR)ansi); *lpBuffer = RtlUpcaseUnicodeChar( ansi );
*(lpBuffer+1) = 0; *(lpBuffer+1) = 0;
return 1; return 1;
} }
......
...@@ -56,7 +56,6 @@ MAKE_FUNCPTR(XcursorLibraryLoadCursor); ...@@ -56,7 +56,6 @@ MAKE_FUNCPTR(XcursorLibraryLoadCursor);
#include "x11drv.h" #include "x11drv.h"
#include "wine/server.h" #include "wine/server.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(cursor); WINE_DEFAULT_DEBUG_CHANNEL(cursor);
...@@ -1066,11 +1065,11 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info ) ...@@ -1066,11 +1065,11 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info )
if (!info->szModName[0]) return 0; if (!info->szModName[0]) return 0;
p = strrchrW( info->szModName, '\\' ); p = wcsrchr( info->szModName, '\\' );
strcpyW( name, p ? p + 1 : info->szModName ); wcscpy( name, p ? p + 1 : info->szModName );
p = name + strlenW( name ); p = name + lstrlenW( name );
*p++ = ','; *p++ = ',';
if (info->szResName[0]) strcpyW( p, info->szResName ); if (info->szResName[0]) wcscpy( p, info->szResName );
else else
{ {
char buf[16]; char buf[16];
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "winreg.h" #include "winreg.h"
#include "wingdi.h" #include "wingdi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(x11settings); WINE_DEFAULT_DEBUG_CHANNEL(x11settings);
...@@ -241,11 +240,11 @@ static HKEY get_display_device_reg_key( const WCHAR *device_name ) ...@@ -241,11 +240,11 @@ static HKEY get_display_device_reg_key( const WCHAR *device_name )
HKEY hkey; HKEY hkey;
/* Device name has to be \\.\DISPLAY%d */ /* Device name has to be \\.\DISPLAY%d */
if (strncmpiW(device_name, display, ARRAY_SIZE(display))) if (wcsnicmp( device_name, display, ARRAY_SIZE(display) ))
return FALSE; return FALSE;
/* Parse \\.\DISPLAY* */ /* Parse \\.\DISPLAY* */
adapter_index = strtolW(device_name + ARRAY_SIZE(display), &end_ptr, 10) - 1; adapter_index = wcstol( device_name + ARRAY_SIZE(display), &end_ptr, 10 ) - 1;
if (*end_ptr) if (*end_ptr)
return FALSE; return FALSE;
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "wine/unicode.h"
#include "x11drv.h" #include "x11drv.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "x11drv.h" #include "x11drv.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wintab.h" #include "wintab.h"
...@@ -516,8 +515,8 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd ) ...@@ -516,8 +515,8 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
hwndTabletDefault = hwnd; hwndTabletDefault = hwnd;
/* Do base initialization */ /* Do base initialization */
strcpyW(gSysContext.lcName, SZ_CONTEXT_NAME); wcscpy(gSysContext.lcName, SZ_CONTEXT_NAME);
strcpyW(gSysDevice.NAME, SZ_DEVICE_NAME); wcscpy(gSysDevice.NAME, SZ_DEVICE_NAME);
gSysContext.lcOptions = CXO_SYSTEM; gSysContext.lcOptions = CXO_SYSTEM;
gSysContext.lcLocks = CXL_INSIZE | CXL_INASPECT | CXL_MARGIN | gSysContext.lcLocks = CXL_INSIZE | CXL_INASPECT | CXL_MARGIN |
...@@ -553,7 +552,7 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd ) ...@@ -553,7 +552,7 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
gSysDevice.PKTDATA = gSysDevice.PKTDATA =
PK_CONTEXT | PK_STATUS | PK_SERIAL_NUMBER| PK_TIME | PK_CURSOR | PK_CONTEXT | PK_STATUS | PK_SERIAL_NUMBER| PK_TIME | PK_CURSOR |
PK_BUTTONS | PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_ORIENTATION; PK_BUTTONS | PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_ORIENTATION;
strcpyW(gSysDevice.PNPID, SZ_NON_PLUG_N_PLAY); wcscpy(gSysDevice.PNPID, SZ_NON_PLUG_N_PLAY);
devices = pXListInputDevices(data->display, &num_devices); devices = pXListInputDevices(data->display, &num_devices);
if (!devices) if (!devices)
...@@ -744,14 +743,14 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd ) ...@@ -744,14 +743,14 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
for (i = 0; i < cursor.BUTTONS; i++) for (i = 0; i < cursor.BUTTONS; i++)
{ {
/* FIXME - these names are probably incorrect */ /* FIXME - these names are probably incorrect */
int cch = strlenW(cursor.NAME) + 1; int cch = wcslen(cursor.NAME) + 1;
while (cch > cchBuf - cchPos - 1) /* we want one extra byte for the last NUL */ while (cch > cchBuf - cchPos - 1) /* we want one extra byte for the last NUL */
{ {
cchBuf *= 2; cchBuf *= 2;
cursor.BTNNAMES = realloc( cursor.BTNNAMES, sizeof(WCHAR) * cchBuf ); cursor.BTNNAMES = realloc( cursor.BTNNAMES, sizeof(WCHAR) * cchBuf );
} }
strcpyW(cursor.BTNNAMES + cchPos, cursor.NAME); wcscpy(cursor.BTNNAMES + cchPos, cursor.NAME);
cchPos += cch; cchPos += cch;
} }
cursor.BTNNAMES[cchPos++] = 0; cursor.BTNNAMES[cchPos++] = 0;
...@@ -1034,7 +1033,7 @@ NTSTATUS x11drv_tablet_attach_queue( void *owner ) ...@@ -1034,7 +1033,7 @@ NTSTATUS x11drv_tablet_attach_queue( void *owner )
if (!gSysCursor[cur_loop].ACTIVE) continue; if (!gSysCursor[cur_loop].ACTIVE) continue;
/* the cursor name fits in the buffer because too long names are skipped */ /* the cursor name fits in the buffer because too long names are skipped */
ntdll_wcstoumbs(gSysCursor[cur_loop].NAME, lstrlenW(gSysCursor[cur_loop].NAME) + 1, ntdll_wcstoumbs(gSysCursor[cur_loop].NAME, wcslen(gSysCursor[cur_loop].NAME) + 1,
cursorNameA, WT_MAX_NAME_LEN, FALSE); cursorNameA, WT_MAX_NAME_LEN, FALSE);
for (loop=0; loop < num_devices; loop ++) for (loop=0; loop < num_devices; loop ++)
if (strcmp(devices[loop].name, cursorNameA) == 0) if (strcmp(devices[loop].name, cursorNameA) == 0)
...@@ -1160,7 +1159,7 @@ NTSTATUS x11drv_tablet_info( void *arg ) ...@@ -1160,7 +1159,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
case IFC_WINTABID: case IFC_WINTABID:
{ {
static const WCHAR driver[] = {'W','i','n','e',' ','W','i','n','t','a','b',' ','1','.','1',0}; static const WCHAR driver[] = {'W','i','n','e',' ','W','i','n','t','a','b',' ','1','.','1',0};
rc = CopyTabletData(lpOutput, driver, (strlenW(driver) + 1) * sizeof(WCHAR)); rc = CopyTabletData(lpOutput, driver, (wcslen(driver) + 1) * sizeof(WCHAR));
break; break;
} }
case IFC_SPECVERSION: case IFC_SPECVERSION:
...@@ -1199,7 +1198,7 @@ NTSTATUS x11drv_tablet_info( void *arg ) ...@@ -1199,7 +1198,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
break; break;
case CTX_NAME: case CTX_NAME:
rc = CopyTabletData(lpOutput, gSysContext.lcName, rc = CopyTabletData(lpOutput, gSysContext.lcName,
(strlenW(gSysContext.lcName)+1) * sizeof(WCHAR)); (wcslen(gSysContext.lcName)+1) * sizeof(WCHAR));
break; break;
case CTX_OPTIONS: case CTX_OPTIONS:
rc = CopyTabletData(lpOutput, &gSysContext.lcOptions, rc = CopyTabletData(lpOutput, &gSysContext.lcOptions,
...@@ -1363,7 +1362,7 @@ NTSTATUS x11drv_tablet_info( void *arg ) ...@@ -1363,7 +1362,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
{ {
case CSR_NAME: case CSR_NAME:
rc = CopyTabletData(lpOutput, tgtcursor->NAME, rc = CopyTabletData(lpOutput, tgtcursor->NAME,
(strlenW(tgtcursor->NAME)+1) * sizeof(WCHAR)); (wcslen(tgtcursor->NAME)+1) * sizeof(WCHAR));
break; break;
case CSR_ACTIVE: case CSR_ACTIVE:
rc = CopyTabletData(lpOutput,&tgtcursor->ACTIVE, rc = CopyTabletData(lpOutput,&tgtcursor->ACTIVE,
...@@ -1455,7 +1454,7 @@ NTSTATUS x11drv_tablet_info( void *arg ) ...@@ -1455,7 +1454,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
{ {
case DVC_NAME: case DVC_NAME:
rc = CopyTabletData(lpOutput,gSysDevice.NAME, rc = CopyTabletData(lpOutput,gSysDevice.NAME,
(strlenW(gSysDevice.NAME)+1) * sizeof(WCHAR)); (wcslen(gSysDevice.NAME)+1) * sizeof(WCHAR));
break; break;
case DVC_HARDWARE: case DVC_HARDWARE:
rc = CopyTabletData(lpOutput,&gSysDevice.HARDWARE, rc = CopyTabletData(lpOutput,&gSysDevice.HARDWARE,
...@@ -1539,7 +1538,7 @@ NTSTATUS x11drv_tablet_info( void *arg ) ...@@ -1539,7 +1538,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
break; break;
case DVC_PNPID: case DVC_PNPID:
rc = CopyTabletData(lpOutput,gSysDevice.PNPID, rc = CopyTabletData(lpOutput,gSysDevice.PNPID,
(strlenW(gSysDevice.PNPID)+1)*sizeof(WCHAR)); (wcslen(gSysDevice.PNPID)+1)*sizeof(WCHAR));
break; break;
default: default:
FIXME("WTI_DEVICES unhandled index %i\n",nIndex); FIXME("WTI_DEVICES unhandled index %i\n",nIndex);
......
...@@ -63,7 +63,6 @@ typedef int Status; ...@@ -63,7 +63,6 @@ typedef int Status;
#include "wine/gdi_driver.h" #include "wine/gdi_driver.h"
#include "unixlib.h" #include "unixlib.h"
#include "wine/list.h" #include "wine/list.h"
#include "wine/unicode.h"
#define MAX_DASHLEN 16 #define MAX_DASHLEN 16
...@@ -970,6 +969,6 @@ static inline LONG x11drv_wcstol( LPCWSTR s, LPWSTR *end, INT base ) ...@@ -970,6 +969,6 @@ static inline LONG x11drv_wcstol( LPCWSTR s, LPWSTR *end, INT base )
return ret; return ret;
} }
#define strtolW x11drv_wcstol #define wcstol x11drv_wcstol
#endif /* __WINE_X11DRV_H */ #endif /* __WINE_X11DRV_H */
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include "x11drv.h" #include "x11drv.h"
#include "xcomposite.h" #include "xcomposite.h"
#include "wine/server.h" #include "wine/server.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/list.h" #include "wine/list.h"
...@@ -449,8 +448,8 @@ static void setup_options(void) ...@@ -449,8 +448,8 @@ static void setup_options(void)
/* open the app-specific key */ /* open the app-specific key */
appname = NtCurrentTeb()->Peb->ProcessParameters->ImagePathName.Buffer; appname = NtCurrentTeb()->Peb->ProcessParameters->ImagePathName.Buffer;
if ((p = strrchrW( appname, '/' ))) appname = p + 1; if ((p = wcsrchr( appname, '/' ))) appname = p + 1;
if ((p = strrchrW( appname, '\\' ))) appname = p + 1; if ((p = wcsrchr( appname, '\\' ))) appname = p + 1;
len = lstrlenW( appname ); len = lstrlenW( appname );
if (len && len < MAX_PATH) if (len && len < MAX_PATH)
...@@ -502,7 +501,7 @@ static void setup_options(void) ...@@ -502,7 +501,7 @@ static void setup_options(void)
grab_fullscreen = IS_OPTION_TRUE( buffer[0] ); grab_fullscreen = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) )) if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) ))
default_visual.depth = strtolW( buffer, NULL, 0 ); default_visual.depth = wcstol( buffer, NULL, 0 );
if (!get_config_key( hkey, appkey, "ClientSideGraphics", buffer, sizeof(buffer) )) if (!get_config_key( hkey, appkey, "ClientSideGraphics", buffer, sizeof(buffer) ))
client_side_graphics = IS_OPTION_TRUE( buffer[0] ); client_side_graphics = IS_OPTION_TRUE( buffer[0] );
...@@ -520,13 +519,13 @@ static void setup_options(void) ...@@ -520,13 +519,13 @@ static void setup_options(void)
private_color_map = IS_OPTION_TRUE( buffer[0] ); private_color_map = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "PrimaryMonitor", buffer, sizeof(buffer) )) if (!get_config_key( hkey, appkey, "PrimaryMonitor", buffer, sizeof(buffer) ))
primary_monitor = strtolW( buffer, NULL, 0 ); primary_monitor = wcstol( buffer, NULL, 0 );
if (!get_config_key( hkey, appkey, "CopyDefaultColors", buffer, sizeof(buffer) )) if (!get_config_key( hkey, appkey, "CopyDefaultColors", buffer, sizeof(buffer) ))
copy_default_colors = strtolW( buffer, NULL, 0 ); copy_default_colors = wcstol( buffer, NULL, 0 );
if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) )) if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) ))
alloc_system_colors = strtolW( buffer, NULL, 0 ); alloc_system_colors = wcstol( buffer, NULL, 0 );
get_config_key( hkey, appkey, "InputStyle", input_style, sizeof(input_style) ); get_config_key( hkey, appkey, "InputStyle", input_style, sizeof(input_style) );
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "x11drv.h" #include "x11drv.h"
#include "imm.h" #include "imm.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(xim); WINE_DEFAULT_DEBUG_CHANNEL(xim);
...@@ -286,11 +285,11 @@ BOOL X11DRV_InitXIM( const WCHAR *input_style ) ...@@ -286,11 +285,11 @@ BOOL X11DRV_InitXIM( const WCHAR *input_style )
static const WCHAR overthespotW[] = {'o','v','e','r','t','h','e','s','p','o','t',0}; static const WCHAR overthespotW[] = {'o','v','e','r','t','h','e','s','p','o','t',0};
static const WCHAR rootW[] = {'r','o','o','t',0}; static const WCHAR rootW[] = {'r','o','o','t',0};
if (!strcmpiW(input_style, offthespotW)) if (!wcsicmp( input_style, offthespotW ))
ximStyleRequest = STYLE_OFFTHESPOT; ximStyleRequest = STYLE_OFFTHESPOT;
else if (!strcmpiW(input_style, overthespotW)) else if (!wcsicmp( input_style, overthespotW ))
ximStyleRequest = STYLE_OVERTHESPOT; ximStyleRequest = STYLE_OVERTHESPOT;
else if (!strcmpiW(input_style, rootW)) else if (!wcsicmp( input_style, rootW ))
ximStyleRequest = STYLE_ROOT; ximStyleRequest = STYLE_ROOT;
if (!XSupportsLocale()) if (!XSupportsLocale())
......
...@@ -47,7 +47,6 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag); ...@@ -47,7 +47,6 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES
#define WINE_VK_HOST #define WINE_VK_HOST
#include "wine/unicode.h"
#include "wine/vulkan.h" #include "wine/vulkan.h"
#include "wine/vulkan_driver.h" #include "wine/vulkan_driver.h"
...@@ -1223,7 +1222,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, ULONG_PTR *id ) ...@@ -1223,7 +1222,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, ULONG_PTR *id )
WCHAR *end; WCHAR *end;
/* Parse \\.\DISPLAY%d */ /* Parse \\.\DISPLAY%d */
display_idx = strtolW( device_name + 11, &end, 10 ) - 1; display_idx = wcstol( device_name + 11, &end, 10 ) - 1;
if (*end) if (*end)
return FALSE; return FALSE;
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "winbase.h" #include "winbase.h"
#include "x11drv.h" #include "x11drv.h"
#include "winternl.h" #include "winternl.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xrender); WINE_DEFAULT_DEBUG_CHANNEL(xrender);
...@@ -587,7 +586,7 @@ static BOOL fontcmp(LFANDSIZE *p1, LFANDSIZE *p2) ...@@ -587,7 +586,7 @@ static BOOL fontcmp(LFANDSIZE *p1, LFANDSIZE *p2)
if(memcmp(&p1->devsize, &p2->devsize, sizeof(p1->devsize))) return TRUE; if(memcmp(&p1->devsize, &p2->devsize, sizeof(p1->devsize))) return TRUE;
if(memcmp(&p1->xform, &p2->xform, sizeof(p1->xform))) return TRUE; if(memcmp(&p1->xform, &p2->xform, sizeof(p1->xform))) return TRUE;
if(memcmp(&p1->lf, &p2->lf, offsetof(LOGFONTW, lfFaceName))) return TRUE; if(memcmp(&p1->lf, &p2->lf, offsetof(LOGFONTW, lfFaceName))) return TRUE;
return strcmpiW(p1->lf.lfFaceName, p2->lf.lfFaceName); return wcsicmp( p1->lf.lfFaceName, p2->lf.lfFaceName );
} }
static int LookupEntry(LFANDSIZE *plfsz) static int LookupEntry(LFANDSIZE *plfsz)
...@@ -744,9 +743,9 @@ static void lfsz_calc_hash(LFANDSIZE *plfsz) ...@@ -744,9 +743,9 @@ static void lfsz_calc_hash(LFANDSIZE *plfsz)
two_chars = *ptr; two_chars = *ptr;
pwc = (WCHAR *)&two_chars; pwc = (WCHAR *)&two_chars;
if(!*pwc) break; if(!*pwc) break;
*pwc = toupperW(*pwc); *pwc = RtlUpcaseUnicodeChar( *pwc );
pwc++; pwc++;
*pwc = toupperW(*pwc); *pwc = RtlUpcaseUnicodeChar( *pwc );
hash ^= two_chars; hash ^= two_chars;
if(!*pwc) break; if(!*pwc) break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment