#define FC_INVALID_FONT_FILE "."
FcBool
-FcFileScan (FcFontSet *set,
- FcFileCache *cache,
- FcBlanks *blanks,
- const char *file,
- FcBool force)
+FcFileScan (FcFontSet *set,
+ FcFileCache *cache,
+ FcBlanks *blanks,
+ const FcChar8 *file,
+ FcBool force)
{
int id;
- char *name;
+ FcChar8 *name;
FcPattern *font;
FcBool ret = FcTrue;
int count;
else
{
/* negative cache files not containing fonts */
- FcFileCacheUpdate (cache, file, id, FC_INVALID_FONT_FILE);
+ FcFileCacheUpdate (cache, file, id, (FcChar8 *) FC_INVALID_FONT_FILE);
}
}
}
}
FcBool
-FcDirScan (FcFontSet *set,
- FcFileCache *cache,
- FcBlanks *blanks,
- const char *dir,
- FcBool force)
+FcDirScan (FcFontSet *set,
+ FcFileCache *cache,
+ FcBlanks *blanks,
+ const FcChar8 *dir,
+ FcBool force)
{
DIR *d;
struct dirent *e;
- char *file;
- char *base;
+ FcChar8 *file;
+ FcChar8 *base;
FcBool ret = FcTrue;
- file = (char *) malloc (strlen (dir) + 1 + 256 + 1);
+ file = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + 256 + 1);
if (!file)
return FcFalse;
- strcpy (file, dir);
- strcat (file, "/");
- base = file + strlen (file);
+ strcpy ((char *) file, (char *) dir);
+ strcat ((char *) file, "/");
+ base = file + strlen ((char *) file);
if (!force)
{
- strcpy (base, FC_DIR_CACHE_FILE);
+ strcpy ((char *) base, FC_DIR_CACHE_FILE);
if (FcFileCacheReadDir (set, file))
{
}
}
- d = opendir (dir);
+ d = opendir ((char *) dir);
if (!d)
{
free (file);
{
if (e->d_name[0] != '.')
{
- strcpy (base, e->d_name);
+ strcpy ((char *) base, (char *) e->d_name);
FcFileScan (set, cache, blanks, file, force);
}
}
}
FcBool
-FcDirSave (FcFontSet *set, const char *dir)
+FcDirSave (FcFontSet *set, const FcChar8 *dir)
{
- char *file;
- char *base;
+ FcChar8 *file;
+ FcChar8 *base;
FcBool ret;
- file = (char *) malloc (strlen (dir) + 1 + 256 + 1);
+ file = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + 256 + 1);
if (!file)
return FcFalse;
- strcpy (file, dir);
- strcat (file, "/");
- base = file + strlen (file);
- strcpy (base, FC_DIR_CACHE_FILE);
+ strcpy ((char *) file, (char *) dir);
+ strcat ((char *) file, "/");
+ base = file + strlen ((char *) file);
+ strcpy ((char *) base, FC_DIR_CACHE_FILE);
ret = FcFileCacheWriteDir (set, file);
free (file);
return ret;