From b8f0a28e8cae5e268e44ae556de1fd583759ed7d Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 3 Apr 2019 18:23:18 +0200 Subject: [PATCH] winex11.drv: Don't use strcasecmp. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/keyboard.c | 2 +- dlls/winex11.drv/xim.c | 7 ++++--- dlls/winex11.drv/xrender.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index b9b8293e4d8..3b8d9167871 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -2334,7 +2334,7 @@ INT CDECL X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize) if (name && (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU)) { char* idx = strrchr(name, '_'); - if (idx && (strcasecmp(idx, "_r") == 0 || strcasecmp(idx, "_l") == 0)) + if (idx && (_strnicmp(idx, "_r", -1) == 0 || _strnicmp(idx, "_l", -1) == 0)) { LeaveCriticalSection( &kbd_section ); TRACE("found scan=%04x keyc=%u keysym=%lx modified_string=%s\n", diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index f6af29341e2..44fe62e9006 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -28,6 +28,7 @@ #include "winuser.h" #include "wingdi.h" #include "winnls.h" +#include "winternl.h" #include "x11drv.h" #include "imm.h" #include "wine/debug.h" @@ -293,11 +294,11 @@ void X11DRV_SetPreeditState(HWND hwnd, BOOL fOpen) */ BOOL X11DRV_InitXIM( const char *input_style ) { - if (!strcasecmp(input_style, "offthespot")) + if (!_strnicmp(input_style, "offthespot", -1)) ximStyleRequest = STYLE_OFFTHESPOT; - else if (!strcasecmp(input_style, "overthespot")) + else if (!_strnicmp(input_style, "overthespot", -1)) ximStyleRequest = STYLE_OVERTHESPOT; - else if (!strcasecmp(input_style, "root")) + else if (!_strnicmp(input_style, "root", -1)) ximStyleRequest = STYLE_ROOT; if (!XSupportsLocale()) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 4d047414354..8350bad548d 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -800,7 +800,7 @@ static UINT get_xft_aa_flags( const LOGFONTW *lf ) if (!(value = XGetDefault( gdi_display, "Xft", "antialias" ))) break; TRACE( "got antialias '%s'\n", value ); if (tolower(value[0]) == 'f' || tolower(value[0]) == 'n' || - value[0] == '0' || !strcasecmp( value, "off" )) + value[0] == '0' || !_strnicmp( value, "off", -1 )) { ret = GGO_BITMAP; break;