]> git.wh0rd.org - fontconfig.git/blobdiff - fc-cat/fc-cat.c
Update fc-cat to handle subdir lists in global cache file.
[fontconfig.git] / fc-cat / fc-cat.c
index 3b24302dee0805d61dd079c21030fdfaf71f2bdb..a203d7496f2097bbb91f75841c7a135a459e0f68 100644 (file)
@@ -174,6 +174,7 @@ FcCacheGlobalFileReadAndPrint (FcFontSet * set, FcStrSet *dirs, char *cache_file
     int fd;
     char * current_arch_machine_name;
     char candidate_arch_machine_name[9+MACHINE_SIGNATURE_SIZE];
+    char               subdirName[FC_MAX_FILE_LEN + 1 + 12 + 1];
     off_t current_arch_start = 0;
 
     if (!cache_file)
@@ -202,6 +203,15 @@ FcCacheGlobalFileReadAndPrint (FcFontSet * set, FcStrSet *dirs, char *cache_file
        printf ("fc-cat: printing global cache contents for dir %s\n", 
                name_buf);
 
+       do
+       {
+           if (!FcCacheReadString (fd, subdirName, 
+                                   sizeof (subdirName)) ||
+               !strlen (subdirName))
+               break;
+           /* then don't do anything with subdirName. */
+       } while (1);
+
        if (!FcDirCacheConsume (fd, name_buf, set, 0))
            goto bail1;