Revert ABI changes from version 2.3

Accidental ABI changes and additions were discovered by looking at the
differences in fontconfig.h. All of those have been reverted.
This commit is contained in:
Keith Packard 2006-08-31 14:38:18 -07:00
parent 0a87ce715e
commit f57783d2e9
5 changed files with 28 additions and 23 deletions

View File

@ -227,7 +227,7 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
FcDirCacheUnlink (dir, config); FcDirCacheUnlink (dir, config);
if (!force) if (!force)
was_valid = FcDirCacheValid (dir, config); was_valid = FcDirCacheValid (dir);
if (!FcDirScanConfig (set, subdirs, FcConfigGetBlanks (config), dir, force, config)) if (!FcDirScanConfig (set, subdirs, FcConfigGetBlanks (config), dir, force, config))
{ {
@ -249,7 +249,7 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
printf ("caching, %d fonts, %d dirs\n", printf ("caching, %d fonts, %d dirs\n",
set->nfont, nsubdirs (subdirs)); set->nfont, nsubdirs (subdirs));
if (!FcDirCacheValid (dir, config)) if (!FcDirCacheValid (dir))
{ {
fprintf (stderr, "%s: failed to write cache\n", dir); fprintf (stderr, "%s: failed to write cache\n", dir);
(void) FcDirCacheUnlink (dir, config); (void) FcDirCacheUnlink (dir, config);

View File

@ -150,7 +150,7 @@ main (int argc, char **argv)
FcChar8 *font; FcChar8 *font;
FcChar8 *file; FcChar8 *file;
font = FcNameUnparseEscaped (fs->fonts[j], FcFalse); font = FcNameUnparse (fs->fonts[j]);
if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch) if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch)
printf ("%s: ", file); printf ("%s: ", file);
printf ("%s\n", font); printf ("%s\n", font);

View File

@ -273,13 +273,7 @@ typedef struct _FcStrSet FcStrSet;
_FCFUNCPROTOBEGIN _FCFUNCPROTOBEGIN
FcBool FcBool
FcDirCacheValid (const FcChar8 *cache_file, FcConfig *config); FcDirCacheValid (const FcChar8 *cache_file);
FcBool
FcDirCacheHasCurrentArch (const FcChar8 *dir, FcConfig *config);
FcBool
FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config);
/* fcblanks.c */ /* fcblanks.c */
FcBlanks * FcBlanks *
@ -325,10 +319,6 @@ FcConfigBuildFonts (FcConfig *config);
FcStrList * FcStrList *
FcConfigGetFontDirs (FcConfig *config); FcConfigGetFontDirs (FcConfig *config);
const FcChar8 *
FcConfigNormalizeFontDir (FcConfig *config,
const FcChar8 *d);
FcStrList * FcStrList *
FcConfigGetConfigDirs (FcConfig *config); FcConfigGetConfigDirs (FcConfig *config);
@ -665,9 +655,6 @@ FcNameParse (const FcChar8 *name);
FcChar8 * FcChar8 *
FcNameUnparse (FcPattern *pat); FcNameUnparse (FcPattern *pat);
FcChar8 *
FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
/* fcpat.c */ /* fcpat.c */
FcPattern * FcPattern *
FcPatternCreate (void); FcPatternCreate (void);

View File

@ -379,12 +379,24 @@ FcDirCacheValidate (int fd, off_t size, void *closure)
return ret; return ret;
} }
FcBool static FcBool
FcDirCacheValid (const FcChar8 *dir, FcConfig *config) FcDirCacheValidConfig (const FcChar8 *dir, FcConfig *config)
{ {
return FcDirCacheProcess (config, dir, FcDirCacheValidate, NULL, NULL); return FcDirCacheProcess (config, dir, FcDirCacheValidate, NULL, NULL);
} }
FcBool
FcDirCacheValid (const FcChar8 *dir)
{
FcConfig *config;
config = FcConfigGetCurrent ();
if (!config)
return FcFalse;
return FcDirCacheValidConfig (dir, config);
}
void void
FcDirCacheUnmap (FcCache *cache) FcDirCacheUnmap (FcCache *cache)
{ {

View File

@ -512,6 +512,9 @@ FcDirCacheMap (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file);
FcBool FcBool
FcDirCacheLoad (int fd, off_t size, void *closure); FcDirCacheLoad (int fd, off_t size, void *closure);
FcBool
FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config);
/* fccfg.c */ /* fccfg.c */
FcBool FcBool
@ -803,6 +806,9 @@ FcNameParseLangSet (const FcChar8 *string);
FcBool FcBool
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
FcChar8 *
FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
/* fclist.c */ /* fclist.c */
FcBool FcBool