mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-19 17:10:42 +02:00
xkb: Fix case checks for Latin 8.
Spotted by -Wlogical-op: | CC xkbfmisc.lo | xkbfmisc.c: In function '_XkbKSCheckCase': | xkbfmisc.c:104:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] | xkbfmisc.c:118:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] A quick look at the keysymdef.h file (from xproto) suggests the implementor chose to use interval checks to determine the case, but since lines weren't sorted by codepoints, checks were quite wrong. Implement _XkbKSUpper/_XkbKSLower checks based on a grep for CAPITAL/SMALL (respectively) on the Latin 8 part of the said file. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
This commit is contained in:
parent
d9bda34d0d
commit
408ed1576d
1 changed files with 26 additions and 15 deletions
|
|
@ -99,23 +99,34 @@ unsigned set,rtrn;
|
|||
}
|
||||
break;
|
||||
case 18: /* latin 8 */
|
||||
if ((ks==XK_Babovedot)||
|
||||
((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))||
|
||||
((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))||
|
||||
(ks==XK_Mabovedot)||
|
||||
(ks==XK_Pabovedot)||
|
||||
(ks==XK_Sabovedot)||
|
||||
(ks==XK_Wdiaeresis)||
|
||||
((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) {
|
||||
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_Wgrave)||
|
||||
(ks==XK_Wacute)||
|
||||
(ks==XK_Wdiaeresis)||
|
||||
(ks==XK_Ygrave)) {
|
||||
rtrn|= _XkbKSUpper;
|
||||
}
|
||||
if ((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))) {
|
||||
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_wgrave)||
|
||||
(ks==XK_wacute)||
|
||||
(ks==XK_wdiaeresis)||
|
||||
(ks==XK_ygrave)) {
|
||||
rtrn|= _XkbKSLower;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue