diff --git a/include/xkbfile.h b/include/xkbfile.h index 8a2fec40c..2bd43683a 100644 --- a/include/xkbfile.h +++ b/include/xkbfile.h @@ -207,10 +207,6 @@ extern _X_EXPORT unsigned XkbConvertGetByNameComponents(Bool /* toXkm */ , unsigned /* orig */ ); -extern _X_EXPORT Bool XkbNameMatchesPattern(char * /* name */ , - char * /* pattern */ - ); - /***====================================================================***/ extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ , diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c index 2f3ec5e4b..47da228ca 100644 --- a/xkb/xkbfmisc.c +++ b/xkb/xkbfmisc.c @@ -431,37 +431,3 @@ XkbConvertGetByNameComponents(Bool toXkm, unsigned orig) } return rtrn; } - -/***====================================================================***/ - -#define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/')) - -Bool -XkbNameMatchesPattern(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])) && - XkbNameMatchesPattern(name + 1, ptrn)) - return TRUE; - return XkbNameMatchesPattern(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'; -}