summaryrefslogtreecommitdiff
path: root/src/xkbmisc.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-03-27 21:11:01 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-03-27 21:11:01 +0000
commit47dfc83937ed98e964716345cb4c8d817ae13e61 (patch)
tree445b3102c4fb84002d29dbd1dda1a55eaf5606b0 /src/xkbmisc.c
parente61dfbf6c72369f83a833d3a5a04c306a6b289f8 (diff)
Bug #3819: Fix serious botching of _XkbStrCaseCmp commit.XORG-7_0_99_901
Diffstat (limited to 'src/xkbmisc.c')
-rw-r--r--src/xkbmisc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xkbmisc.c b/src/xkbmisc.c
index 01f6174..0116b5f 100644
--- a/src/xkbmisc.c
+++ b/src/xkbmisc.c
@@ -659,3 +659,19 @@ 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