Commit 97293e07 authored by Patrick Lam's avatar Patrick Lam
Browse files

Move FcConfigNormalizeFontDir call so that it doesn't result in infinite

    recursion (reported by Ronny V. Vindenes).
parent 3cf9f5ce
2006-01-27 Patrick Lam <plam@mit.edu>
* fc-cache/fc-cache.c (scanDirs):
* fontconfig/fontconfig.h:
* src/fcint.h:
* src/fccache.c (FcDirCacheValid, FcDirCacheHasCurrentArch):
Move FcConfigNormalizeFontDir call so that it doesn't result in
infinite recursion (reported by Ronny V. Vindenes).
2006-01-26 Patrick Lam <plam@mit.edu>
* src/fccache.c (FcDirCacheValid, FcDirCacheHasCurrentArch):
* src/fccfg.c (FcConfigNormalizeFontDir):
......
......@@ -112,7 +112,7 @@ static int
scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool verbose)
{
int ret = 0;
FcChar8 *dir;
const FcChar8 *dir;
FcFontSet *set;
FcStrSet *subdirs;
FcStrList *sublist;
......@@ -124,6 +124,10 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
*/
while ((dir = FcStrListNext (list)))
{
dir = FcConfigNormalizeFontDir (config, dir);
if (!dir)
return FcFalse;
if (verbose)
{
printf ("%s: \"%s\": ", program, dir);
......
......@@ -328,6 +328,10 @@ FcConfigBuildFonts (FcConfig *config);
FcStrList *
FcConfigGetFontDirs (FcConfig *config);
const FcChar8 *
FcConfigNormalizeFontDir (FcConfig *config,
const FcChar8 *d);
FcStrList *
FcConfigGetConfigDirs (FcConfig *config);
......
......@@ -609,10 +609,6 @@ FcDirCacheValid (const FcChar8 *dir)
struct stat file_stat, dir_stat;
int fd;
dir = FcConfigNormalizeFontDir (FcConfigGetCurrent(), dir);
if (!dir)
return FcFalse;
if (stat ((char *) dir, &dir_stat) < 0)
return FcFalse;
......@@ -648,10 +644,6 @@ FcDirCacheHasCurrentArch (const FcChar8 *dir)
off_t current_arch_start;
char *current_arch_machine_name;
dir = FcConfigNormalizeFontDir (FcConfigGetCurrent(), dir);
if (!dir)
return FcFalse;
fd = FcDirCacheOpen (dir);
if (fd < 0)
goto bail;
......
......@@ -496,10 +496,6 @@ FcBool
FcConfigAddConfigFile (FcConfig *config,
const FcChar8 *f);
const FcChar8 *
FcConfigNormalizeFontDir (FcConfig *config,
const FcChar8 *d);
FcBool
FcConfigSetCache (FcConfig *config,
const FcChar8 *c);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment