Commit afa34f3d2f94d93292a70c18ff8eba44f19fbfb6

Ran Benita 2012-04-11T02:10:35

Remove unused function XkbcNameMatchesPattern Because the function is recursive, the compiler didn't say anything, eh. Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/misc.c b/src/misc.c
index 0cbe21f..f15631e 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -261,38 +261,3 @@ _XkbcKSCheckCase(xkb_keysym_t ks)
 
     return rtrn;
 }
-
-#define UNMATCHABLE(c) ((c) == '(' || (c) == ')' || (c) == '/')
-
-bool
-XkbcNameMatchesPattern(char *name, char *ptrn)
-{
-    while (ptrn[0] != '\0') {
-        if (name[0] == '\0') {
-            if (ptrn[0] == '*') {
-                ptrn++;
-                continue;
-            }
-            return false;
-        }
-
-        if (ptrn[0] == '?') {
-            if (UNMATCHABLE(name[0]))
-                return false;
-        }
-        else if (ptrn[0] == '*') {
-            if (!UNMATCHABLE(name[0]) &&
-                XkbcNameMatchesPattern(name + 1, ptrn))
-                return true;
-            return XkbcNameMatchesPattern(name, ptrn + 1);
-        }
-        else if (ptrn[0] != name[0])
-            return false;
-
-        name++;
-        ptrn++;
-    }
-
-    /* if we get here, the pattern is exhausted (-:just like me:-) */
-    return (name[0] == '\0');
-}
diff --git a/src/xkbmisc.h b/src/xkbmisc.h
index 5a55fb1..b9b9a39 100644
--- a/src/xkbmisc.h
+++ b/src/xkbmisc.h
@@ -65,11 +65,6 @@ _XkbcKSCheckCase(xkb_keysym_t sym);
 #define XkbcKSIsUpper(k) (_XkbcKSCheckCase(k) & _XkbKSUpper)
 
 #define XkbKSIsKeypad(k) (((k) >= XK_KP_Space) && ((k) <= XK_KP_Equal))
-#define XkbKSIsDeadKey(k) \
-    (((k) >= XK_dead_grave) && ((k) <= XK_dead_semivoiced_sound))
-
-extern bool
-XkbcNameMatchesPattern(char *name, char *ptrn);
 
 /***====================================================================***/