Bug #7097: do case-insensitive comparison for some hotkeys.
xkb's strcasecmp implementation has been moved to the dix so it's now safe to just use strcasecmp().
This commit is contained in:
@@ -62,12 +62,6 @@
|
||||
#define PR_DEBUG2(s,a,b)
|
||||
#endif
|
||||
|
||||
#ifdef NEED_STRCASECMP
|
||||
extern int _XkbStrCaseCmp(char *s1, char *s2);
|
||||
#else
|
||||
#define _XkbStrCaseCmp strcasecmp
|
||||
#endif
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
#define DFLT_LINE_SIZE 128
|
||||
@@ -1092,20 +1086,20 @@ int len,headingtype,extra_ndx = 0;
|
||||
for ( ; GetInputLine(file,&line,False); line.num_line= 0) {
|
||||
if (line.line[0]=='!') {
|
||||
tok = strtok(&(line.line[1]), " \t");
|
||||
if (_XkbStrCaseCmp(tok,"model") == 0)
|
||||
if (strcasecmp(tok,"model") == 0)
|
||||
headingtype = HEAD_MODEL;
|
||||
else if (_XkbStrCaseCmp(tok,"layout") == 0)
|
||||
else if (strcasecmp(tok,"layout") == 0)
|
||||
headingtype = HEAD_LAYOUT;
|
||||
else if (_XkbStrCaseCmp(tok,"variant") == 0)
|
||||
else if (strcasecmp(tok,"variant") == 0)
|
||||
headingtype = HEAD_VARIANT;
|
||||
else if (_XkbStrCaseCmp(tok,"option") == 0)
|
||||
else if (strcasecmp(tok,"option") == 0)
|
||||
headingtype = HEAD_OPTION;
|
||||
else {
|
||||
int i;
|
||||
headingtype = HEAD_EXTRA;
|
||||
extra_ndx= -1;
|
||||
for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) {
|
||||
if (!_XkbStrCaseCmp(tok,rules->extra_names[i]))
|
||||
if (!strcasecmp(tok,rules->extra_names[i]))
|
||||
extra_ndx= i;
|
||||
}
|
||||
if (extra_ndx<0) {
|
||||
|
||||
Reference in New Issue
Block a user