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.
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
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 */
);