+ while ((arg = FcStrListNext (arglist)))
+ {
+ int j;
+ FcChar8 *cache_file = NULL;
+ struct stat file_stat;
+
+ if (FcFileIsDir (arg))
+ cache = FcDirCacheLoad (arg, config, &cache_file);
+ else
+ cache = FcDirCacheLoadFile (arg, &file_stat);
+ if (!cache)
+ {
+ perror ((char *) arg);
+ ret++;
+ continue;
+ }
+
+ dirs = FcStrSetCreate ();
+ fs = FcCacheCopySet (cache);
+ for (j = 0; j < FcCacheNumSubdir (cache); j++)
+ {
+ FcStrSetAdd (dirs, FcCacheSubdir (cache, j));
+ if (recurse)
+ FcStrSetAdd (args, FcCacheSubdir (cache, j));
+ }
+
+ if (verbose)
+ {
+ if (!first)
+ printf ("\n");
+ printf ("Directory: %s\nCache: %s\n--------\n",
+ FcCacheDir(cache), cache_file ? cache_file : arg);
+ first = FcFalse;
+ }
+ cache_print_set (fs, dirs, FcCacheDir (cache), verbose);
+
+ FcStrSetDestroy (dirs);
+
+ FcFontSetDestroy (fs);
+ FcDirCacheUnload (cache);
+ if (cache_file)
+ FcStrFree (cache_file);
+ }