Fix latin8 upper/lower case check

GCC complained:
misc.c:235:13: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]
misc.c:248:13: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]

Looking at keysymdef.h shows that the check is indeed wrong. This commit
updates the check to match the latin8 section of keysymdef exactly.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-03-24 02:56:38 +02:00 committed by Daniel Stone
parent 3b22373f1f
commit 6f7478d775
1 changed files with 15 additions and 8 deletions

View File

@ -230,22 +230,29 @@ _XkbcKSCheckCase(xkb_keysym_t ks)
rtrn |= _XkbKSLower;
break;
case 18: /* latin 8 */
if ((ks == XK_Babovedot) ||
(ks >= XK_Dabovedot && ks <= XK_Wacute) ||
(ks >= XK_Ygrave && ks <= XK_Fabovedot) ||
if ((ks == XK_Wcircumflex) ||
(ks == XK_Ycircumflex) ||
(ks == XK_Babovedot) ||
(ks == XK_Dabovedot) ||
(ks == XK_Fabovedot) ||
(ks == XK_Mabovedot) ||
(ks == XK_Pabovedot) ||
(ks == XK_Sabovedot) ||
(ks == XK_Tabovedot) ||
(ks == XK_Wdiaeresis) ||
(ks >= XK_Wcircumflex && ks <= XK_Ycircumflex))
(ks == XK_Ygrave))
rtrn |= _XkbKSUpper;
if ((ks == XK_babovedot) ||
if ((ks == XK_wcircumflex) ||
(ks == XK_ycircumflex) ||
(ks == XK_babovedot) ||
(ks == XK_dabovedot) ||
(ks == XK_fabovedot) ||
(ks == XK_mabovedot) ||
(ks >= XK_wgrave && ks <= XK_wacute) ||
(ks == XK_ygrave) ||
(ks >= XK_wdiaeresis && ks <= XK_ycircumflex))
(ks == XK_pabovedot) ||
(ks == XK_sabovedot) ||
(ks == XK_tabovedot) ||
(ks == XK_wdiaeresis) ||
(ks == XK_ygrave))
rtrn |= _XkbKSLower;
break;
case 19: /* latin 9 */