xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 9 07:01:21 UTC 2024


 include/xkbfile.h |    4 ----
 xkb/xkbfmisc.c    |   34 ----------------------------------
 2 files changed, 38 deletions(-)

New commits:
commit beb073813e56b527cf9a5cfb591664ea5100c39a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Apr 5 15:30:44 2024 +0200

    xkb: drop ununsed XkbNameMatchesPattern()
    
    Not used anywhere, also not in drivers, so we can drop it.
    Probably never been used, just added accidentially back in 2008.
    
    Fixes: 68bd7ac1930b5cffb6657b8d5f5bf8ae58eae8d9
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1477>

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';
-}


More information about the xorg-commit mailing list