summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2006-07-08 11:33:44 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2006-07-08 11:33:44 +0200
commit63f13e01ee6e7df1753f2113f4cff9538596be0a (patch)
treec4e828e89f3ce4acf450c5327ea1a156419ee95c /xkb
parent5416f90e9c939027005fc01fa3ce3df56919ae0d (diff)
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().
Diffstat (limited to 'xkb')
-rw-r--r--xkb/maprules.c16
-rw-r--r--xkb/xkbfmisc.c16
2 files changed, 5 insertions, 27 deletions
diff --git a/xkb/maprules.c b/xkb/maprules.c
index d4e982920..eff02ad34 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -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) {
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 3389ba88e..3ed68c267 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -247,19 +247,3 @@ XkbNameMatchesPattern(char *name,char *ptrn)
/* if we get here, the pattern is exhausted (-:just like me:-) */
return (name[0]=='\0');
}
-
-#ifdef NEED_STRCASECMP
-_X_HIDDEN int
-_XkbStrCaseCmp(char *str1,char *str2)
-{
- const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
-
- while (tolower(*us1) == tolower(*us2)) {
- if (*us1++ == '\0')
- return (0);
- us2++;
- }
-
- return (tolower(*us1) - tolower(*us2));
-}
-#endif