Commit 559305a5cb3e9735203d8fd8fc10d8ec487b101f

Dan Nicholson 2009-04-16T21:47:28

xkbcomp: Kill unused listing code and make functions static Much of this was only called from xkbcomp and not used to generate listings for the server.

diff --git a/src/xkbcomp/listing.c b/src/xkbcomp/listing.c
index 5b4f552..48d5459 100644
--- a/src/xkbcomp/listing.c
+++ b/src/xkbcomp/listing.c
@@ -138,10 +138,6 @@ typedef struct _Listing
     char *map;
 } Listing;
 
-static int szMapOnly;
-static int nMapOnly;
-static char **mapOnly;
-
 static Listing *list = NULL;
 
 static unsigned verboseLevel;
@@ -149,27 +145,7 @@ static unsigned dirsToStrip;
 
 /***====================================================================***/
 
-int
-AddMapOnly(char *map)
-{
-    if (nMapOnly >= szMapOnly)
-    {
-        if (szMapOnly < 1)
-            szMapOnly = 5;
-        else
-            szMapOnly *= 2;
-        mapOnly = uTypedRealloc(list, szMapOnly, char *);
-        if (!mapOnly)
-        {
-            WSGO("Couldn't allocate list of maps\n");
-            return 0;
-        }
-    }
-    mapOnly[nMapOnly++] = map;
-    return 1;
-}
-
-int
+static int
 AddListing(char *file, char *map)
 {
     if (nListed >= szListing)
@@ -345,8 +321,8 @@ AddDirectory(char *head, char *ptrn, char *rest, char *map)
 
 /***====================================================================***/
 
-Bool
-AddMatchingFiles(char *head_in)
+static Bool
+AddMatchingFiles(char *head_in, unsigned type)
 {
     char *str, *head, *ptrn, *rest = NULL;
 
@@ -402,17 +378,8 @@ AddMatchingFiles(char *head_in)
 static Bool
 MapMatches(char *mapToConsider, char *ptrn)
 {
-    int i;
-
     if (ptrn != NULL)
         return XkbcNameMatchesPattern(mapToConsider, ptrn);
-    if (nMapOnly < 1)
-        return True;
-    for (i = 0; i < nMapOnly; i++)
-    {
-        if (XkbcNameMatchesPattern(mapToConsider, mapOnly[i]))
-            return True;
-    }
     return False;
 }
 
diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h
index c45918d..993bb61 100644
--- a/src/xkbcomp/xkbcomp.h
+++ b/src/xkbcomp/xkbcomp.h
@@ -366,16 +366,6 @@ CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
 #define	WantFullNames	(1<<3)
 #define	ListRecursive	(1<<4)
 
-extern Bool AddListing(char * /* file */ ,
-                       char *   /* map */
-    );
-
-extern Bool AddMatchingFiles(char *     /* head_in */
-    );
-
-extern int AddMapOnly(char *    /* map */
-    );
-
 extern int GenerateListing(char *       /* filename */
     );