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)
printf ("fc-cat: printing global cache contents for dir %s\n",
name_buf);
- if (!FcDirCacheConsume (fd, name_buf, set))
+ 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;
+
+ dir = malloc (strlen (name_buf) + 2);
+ if (!dir)
goto bail1;
- dir = strdup(name_buf);
+ strcpy (dir, name_buf);
strcat (dir, "/");
FcCachePrintSet (set, dirs, dir);
if (ls)
*ls = 0;
- if (!FcDirCacheConsume (fd, dir, set))
+ if (!FcDirCacheConsume (fd, dir, set, 0))
goto bail2;
free (dir);