]> git.wh0rd.org - fontconfig.git/commitdiff
Make fc-cache avoid reading the whole world full of fonts
authorKeith Packard <keithp@keithp.com>
Mon, 1 Jul 2002 05:11:20 +0000 (05:11 +0000)
committerKeith Packard <keithp@keithp.com>
Mon, 1 Jul 2002 05:11:20 +0000 (05:11 +0000)
fc-cache/fc-cache.c

index ed920fd53f6460f5521e5e2d24caef4d7cca13e4..92f53fc483de9a9e9957591fb92e81df5c84e0b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/fc-cache/fc-cache.c,v 1.4 2002/05/21 17:06:21 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/fc-cache/fc-cache.c,v 1.5 2002/06/19 20:55:19 keithp Exp $
  *
  * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -93,7 +93,7 @@ nsubdirs (FcStrSet *set)
 }
 
 static int
-scanDirs (FcStrList *list, char *program, FcBool force, FcBool verbose)
+scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool verbose)
 {
     int                ret = 0;
     FcChar8    *dir;
@@ -147,7 +147,7 @@ scanDirs (FcStrList *list, char *program, FcBool force, FcBool verbose)
            fprintf (stderr, "\"%s\": not a directory, skipping\n", dir);
            continue;
        }
-       if (!FcDirScan (set, subdirs, 0, FcConfigGetBlanks (0), dir, force))
+       if (!FcDirScan (set, subdirs, 0, FcConfigGetBlanks (config), dir, force))
        {
            fprintf (stderr, "\"%s\": error scanning\n", dir);
            ret++;
@@ -178,7 +178,7 @@ scanDirs (FcStrList *list, char *program, FcBool force, FcBool verbose)
            ret++;
            continue;
        }
-       ret += scanDirs (sublist, program, force, verbose);
+       ret += scanDirs (sublist, config, program, force, verbose);
        FcStrSetDestroy (subdirs);
     }
     FcStrListDone (list);
@@ -253,7 +253,7 @@ main (int argc, char **argv)
     }
     else
        list = FcConfigGetConfigDirs (config);
-    ret = scanDirs (list, argv[0], force, verbose);
+    ret = scanDirs (list, config, argv[0], force, verbose);
     if (verbose)
        printf ("%s: %s\n", argv[0], ret ? "failed" : "succeeded");
     return ret;