Remove unused function XkbcNameMatchesPattern Because the function is recursive, the compiler didn't say anything, eh. Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
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);
/***====================================================================***/