Remove unused function XkbcNameMatchesPattern
authorRan Benita <ran234@gmail.com>
Tue, 10 Apr 2012 23:10:35 +0000 (02:10 +0300)
committerDaniel Stone <daniel@fooishbar.org>
Mon, 30 Apr 2012 16:06:25 +0000 (17:06 +0100)
Because the function is recursive, the compiler didn't say anything, eh.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/misc.c
src/xkbmisc.h

index 0cbe21f..f15631e 100644 (file)
@@ -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');
-}
index 5a55fb1..b9b9a39 100644 (file)
@@ -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);
 
 /***====================================================================***/