mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-22 21:24:09 +00:00
winex11: Don't use unicode.h.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a3d4eefa0d
commit
a3132f2906
|
@ -93,7 +93,6 @@
|
|||
#include "shlwapi.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
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 )
|
|||
|
||||
if (path)
|
||||
{
|
||||
int pathSize = strlenW(path) + 1;
|
||||
int pathSize = wcslen( path ) + 1;
|
||||
if (pathSize > capacity - total)
|
||||
{
|
||||
WCHAR *new_out;
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
#include "x11drv.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(graphics);
|
||||
|
||||
|
@ -1733,7 +1732,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
|
|||
else lstrcpyW( p, srgb );
|
||||
|
||||
NtClose( hkey );
|
||||
required = strlenW( fullname ) + 1 - 4 /* skip NT prefix */;
|
||||
required = wcslen( fullname ) + 1 - 4 /* skip NT prefix */;
|
||||
if (*size < required)
|
||||
{
|
||||
*size = required;
|
||||
|
@ -1743,7 +1742,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
|
|||
if (filename)
|
||||
{
|
||||
FILE_BASIC_INFORMATION info;
|
||||
strcpyW( filename, fullname + 4 );
|
||||
wcscpy( filename, fullname + 4 );
|
||||
RtlInitUnicodeString( &name, fullname );
|
||||
InitializeObjectAttributes( &attr, &name, OBJ_CASE_INSENSITIVE, NULL, NULL );
|
||||
if (NtQueryAttributesFile( &attr, &info ))
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "ime.h"
|
||||
#include "x11drv.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
/* log format (add 0-padding as appropriate):
|
||||
|
@ -2104,7 +2103,7 @@ UINT X11DRV_MapVirtualKeyEx( UINT wCode, UINT wMapType, HKL hkl )
|
|||
if (len)
|
||||
{
|
||||
WCHAR wch;
|
||||
if (ntdll_umbstowcs( s, len, &wch, 1 )) ret = toupperW(wch);
|
||||
if (ntdll_umbstowcs( s, len, &wch, 1 )) ret = RtlUpcaseUnicodeChar( wch );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2171,7 +2170,7 @@ INT X11DRV_GetKeyNameText( LONG lParam, LPWSTR lpBuffer, INT nSize )
|
|||
{
|
||||
if (nSize >= 2)
|
||||
{
|
||||
*lpBuffer = toupperW((WCHAR)ansi);
|
||||
*lpBuffer = RtlUpcaseUnicodeChar( ansi );
|
||||
*(lpBuffer+1) = 0;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ MAKE_FUNCPTR(XcursorLibraryLoadCursor);
|
|||
|
||||
#include "x11drv.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cursor);
|
||||
|
@ -1066,11 +1065,11 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info )
|
|||
|
||||
if (!info->szModName[0]) return 0;
|
||||
|
||||
p = strrchrW( info->szModName, '\\' );
|
||||
strcpyW( name, p ? p + 1 : info->szModName );
|
||||
p = name + strlenW( name );
|
||||
p = wcsrchr( info->szModName, '\\' );
|
||||
wcscpy( name, p ? p + 1 : info->szModName );
|
||||
p = name + lstrlenW( name );
|
||||
*p++ = ',';
|
||||
if (info->szResName[0]) strcpyW( p, info->szResName );
|
||||
if (info->szResName[0]) wcscpy( p, info->szResName );
|
||||
else
|
||||
{
|
||||
char buf[16];
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "winreg.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(x11settings);
|
||||
|
||||
|
@ -241,11 +240,11 @@ static HKEY get_display_device_reg_key( const WCHAR *device_name )
|
|||
HKEY hkey;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* 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)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "x11drv.h"
|
||||
#include "wine/debug.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "x11drv.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wintab.h"
|
||||
|
||||
|
@ -516,8 +515,8 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
|
|||
hwndTabletDefault = hwnd;
|
||||
|
||||
/* Do base initialization */
|
||||
strcpyW(gSysContext.lcName, SZ_CONTEXT_NAME);
|
||||
strcpyW(gSysDevice.NAME, SZ_DEVICE_NAME);
|
||||
wcscpy(gSysContext.lcName, SZ_CONTEXT_NAME);
|
||||
wcscpy(gSysDevice.NAME, SZ_DEVICE_NAME);
|
||||
|
||||
gSysContext.lcOptions = CXO_SYSTEM;
|
||||
gSysContext.lcLocks = CXL_INSIZE | CXL_INASPECT | CXL_MARGIN |
|
||||
|
@ -553,7 +552,7 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
|
|||
gSysDevice.PKTDATA =
|
||||
PK_CONTEXT | PK_STATUS | PK_SERIAL_NUMBER| PK_TIME | PK_CURSOR |
|
||||
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);
|
||||
if (!devices)
|
||||
|
@ -744,14 +743,14 @@ NTSTATUS x11drv_tablet_load_info( void *hwnd )
|
|||
for (i = 0; i < cursor.BUTTONS; i++)
|
||||
{
|
||||
/* 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 */
|
||||
{
|
||||
cchBuf *= 2;
|
||||
cursor.BTNNAMES = realloc( cursor.BTNNAMES, sizeof(WCHAR) * cchBuf );
|
||||
}
|
||||
|
||||
strcpyW(cursor.BTNNAMES + cchPos, cursor.NAME);
|
||||
wcscpy(cursor.BTNNAMES + cchPos, cursor.NAME);
|
||||
cchPos += cch;
|
||||
}
|
||||
cursor.BTNNAMES[cchPos++] = 0;
|
||||
|
@ -1034,7 +1033,7 @@ NTSTATUS x11drv_tablet_attach_queue( void *owner )
|
|||
if (!gSysCursor[cur_loop].ACTIVE) continue;
|
||||
|
||||
/* 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);
|
||||
for (loop=0; loop < num_devices; loop ++)
|
||||
if (strcmp(devices[loop].name, cursorNameA) == 0)
|
||||
|
@ -1160,7 +1159,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
|
|||
case IFC_WINTABID:
|
||||
{
|
||||
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;
|
||||
}
|
||||
case IFC_SPECVERSION:
|
||||
|
@ -1199,7 +1198,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
|
|||
break;
|
||||
case CTX_NAME:
|
||||
rc = CopyTabletData(lpOutput, gSysContext.lcName,
|
||||
(strlenW(gSysContext.lcName)+1) * sizeof(WCHAR));
|
||||
(wcslen(gSysContext.lcName)+1) * sizeof(WCHAR));
|
||||
break;
|
||||
case CTX_OPTIONS:
|
||||
rc = CopyTabletData(lpOutput, &gSysContext.lcOptions,
|
||||
|
@ -1363,7 +1362,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
|
|||
{
|
||||
case CSR_NAME:
|
||||
rc = CopyTabletData(lpOutput, tgtcursor->NAME,
|
||||
(strlenW(tgtcursor->NAME)+1) * sizeof(WCHAR));
|
||||
(wcslen(tgtcursor->NAME)+1) * sizeof(WCHAR));
|
||||
break;
|
||||
case CSR_ACTIVE:
|
||||
rc = CopyTabletData(lpOutput,&tgtcursor->ACTIVE,
|
||||
|
@ -1455,7 +1454,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
|
|||
{
|
||||
case DVC_NAME:
|
||||
rc = CopyTabletData(lpOutput,gSysDevice.NAME,
|
||||
(strlenW(gSysDevice.NAME)+1) * sizeof(WCHAR));
|
||||
(wcslen(gSysDevice.NAME)+1) * sizeof(WCHAR));
|
||||
break;
|
||||
case DVC_HARDWARE:
|
||||
rc = CopyTabletData(lpOutput,&gSysDevice.HARDWARE,
|
||||
|
@ -1539,7 +1538,7 @@ NTSTATUS x11drv_tablet_info( void *arg )
|
|||
break;
|
||||
case DVC_PNPID:
|
||||
rc = CopyTabletData(lpOutput,gSysDevice.PNPID,
|
||||
(strlenW(gSysDevice.PNPID)+1)*sizeof(WCHAR));
|
||||
(wcslen(gSysDevice.PNPID)+1)*sizeof(WCHAR));
|
||||
break;
|
||||
default:
|
||||
FIXME("WTI_DEVICES unhandled index %i\n",nIndex);
|
||||
|
|
|
@ -63,7 +63,6 @@ typedef int Status;
|
|||
#include "wine/gdi_driver.h"
|
||||
#include "unixlib.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#define MAX_DASHLEN 16
|
||||
|
||||
|
@ -970,6 +969,6 @@ static inline LONG x11drv_wcstol( LPCWSTR s, LPWSTR *end, INT base )
|
|||
return ret;
|
||||
}
|
||||
|
||||
#define strtolW x11drv_wcstol
|
||||
#define wcstol x11drv_wcstol
|
||||
|
||||
#endif /* __WINE_X11DRV_H */
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
#include "x11drv.h"
|
||||
#include "xcomposite.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
|
@ -449,8 +448,8 @@ static void setup_options(void)
|
|||
/* open the app-specific key */
|
||||
|
||||
appname = NtCurrentTeb()->Peb->ProcessParameters->ImagePathName.Buffer;
|
||||
if ((p = strrchrW( appname, '/' ))) appname = p + 1;
|
||||
if ((p = strrchrW( appname, '\\' ))) appname = p + 1;
|
||||
if ((p = wcsrchr( appname, '/' ))) appname = p + 1;
|
||||
if ((p = wcsrchr( appname, '\\' ))) appname = p + 1;
|
||||
len = lstrlenW( appname );
|
||||
|
||||
if (len && len < MAX_PATH)
|
||||
|
@ -502,7 +501,7 @@ static void setup_options(void)
|
|||
grab_fullscreen = IS_OPTION_TRUE( buffer[0] );
|
||||
|
||||
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) ))
|
||||
client_side_graphics = IS_OPTION_TRUE( buffer[0] );
|
||||
|
@ -520,13 +519,13 @@ static void setup_options(void)
|
|||
private_color_map = IS_OPTION_TRUE( buffer[0] );
|
||||
|
||||
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) ))
|
||||
copy_default_colors = strtolW( buffer, NULL, 0 );
|
||||
copy_default_colors = wcstol( buffer, NULL, 0 );
|
||||
|
||||
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) );
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "x11drv.h"
|
||||
#include "imm.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(xim);
|
||||
|
||||
|
@ -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 rootW[] = {'r','o','o','t',0};
|
||||
|
||||
if (!strcmpiW(input_style, offthespotW))
|
||||
if (!wcsicmp( input_style, offthespotW ))
|
||||
ximStyleRequest = STYLE_OFFTHESPOT;
|
||||
else if (!strcmpiW(input_style, overthespotW))
|
||||
else if (!wcsicmp( input_style, overthespotW ))
|
||||
ximStyleRequest = STYLE_OVERTHESPOT;
|
||||
else if (!strcmpiW(input_style, rootW))
|
||||
else if (!wcsicmp( input_style, rootW ))
|
||||
ximStyleRequest = STYLE_ROOT;
|
||||
|
||||
if (!XSupportsLocale())
|
||||
|
|
|
@ -47,7 +47,6 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
|||
#define VK_NO_PROTOTYPES
|
||||
#define WINE_VK_HOST
|
||||
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/vulkan.h"
|
||||
#include "wine/vulkan_driver.h"
|
||||
|
||||
|
@ -1223,7 +1222,7 @@ static BOOL xrandr14_get_id( const WCHAR *device_name, ULONG_PTR *id )
|
|||
WCHAR *end;
|
||||
|
||||
/* Parse \\.\DISPLAY%d */
|
||||
display_idx = strtolW( device_name + 11, &end, 10 ) - 1;
|
||||
display_idx = wcstol( device_name + 11, &end, 10 ) - 1;
|
||||
if (*end)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "winbase.h"
|
||||
#include "x11drv.h"
|
||||
#include "winternl.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(xrender);
|
||||
|
@ -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->xform, &p2->xform, sizeof(p1->xform))) 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)
|
||||
|
@ -744,9 +743,9 @@ static void lfsz_calc_hash(LFANDSIZE *plfsz)
|
|||
two_chars = *ptr;
|
||||
pwc = (WCHAR *)&two_chars;
|
||||
if(!*pwc) break;
|
||||
*pwc = toupperW(*pwc);
|
||||
*pwc = RtlUpcaseUnicodeChar( *pwc );
|
||||
pwc++;
|
||||
*pwc = toupperW(*pwc);
|
||||
*pwc = RtlUpcaseUnicodeChar( *pwc );
|
||||
hash ^= two_chars;
|
||||
if(!*pwc) break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue