diff options
author | Keith Packard <keithp@neko.keithp.com> | 2006-08-31 14:38:18 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2006-08-31 14:38:18 -0700 |
commit | f57783d2e9c7362b1e5d5e3a967ba90fa49ade6e (patch) | |
tree | aa406ae0ee717d5f9e2ed437387c3a87ab768461 | |
parent | 0a87ce715e1862c56702f5be43af9f246aa34e68 (diff) |
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.
-rw-r--r-- | fc-cache/fc-cache.c | 4 | ||||
-rw-r--r-- | fc-list/fc-list.c | 2 | ||||
-rw-r--r-- | fontconfig/fontconfig.h | 23 | ||||
-rw-r--r-- | src/fccache.c | 16 | ||||
-rw-r--r-- | src/fcint.h | 6 |
5 files changed, 28 insertions, 23 deletions
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index cf4ea6c..5fc4092 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -227,7 +227,7 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool FcDirCacheUnlink (dir, config); if (!force) - was_valid = FcDirCacheValid (dir, config); + was_valid = FcDirCacheValid (dir); 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", set->nfont, nsubdirs (subdirs)); - if (!FcDirCacheValid (dir, config)) + if (!FcDirCacheValid (dir)) { fprintf (stderr, "%s: failed to write cache\n", dir); (void) FcDirCacheUnlink (dir, config); diff --git a/fc-list/fc-list.c b/fc-list/fc-list.c index d8a3364..b85dfd7 100644 --- a/fc-list/fc-list.c +++ b/fc-list/fc-list.c @@ -150,7 +150,7 @@ main (int argc, char **argv) FcChar8 *font; FcChar8 *file; - font = FcNameUnparseEscaped (fs->fonts[j], FcFalse); + font = FcNameUnparse (fs->fonts[j]); if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch) printf ("%s: ", file); printf ("%s\n", font); diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index 410da1e..feb781e 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -211,15 +211,15 @@ typedef struct _FcLangSet FcLangSet; typedef struct _FcValue { FcType type; union { - const FcChar8 *s; + const FcChar8 *s; int i; FcBool b; double d; - const FcMatrix *m; - const FcCharSet *c; + const FcMatrix *m; + const FcCharSet *c; void *f; const FcPattern *p; - const FcLangSet *l; + const FcLangSet *l; } u; } FcValue; @@ -273,13 +273,7 @@ typedef struct _FcStrSet FcStrSet; _FCFUNCPROTOBEGIN FcBool -FcDirCacheValid (const FcChar8 *cache_file, FcConfig *config); - -FcBool -FcDirCacheHasCurrentArch (const FcChar8 *dir, FcConfig *config); - -FcBool -FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config); +FcDirCacheValid (const FcChar8 *cache_file); /* fcblanks.c */ FcBlanks * @@ -325,10 +319,6 @@ FcConfigBuildFonts (FcConfig *config); FcStrList * FcConfigGetFontDirs (FcConfig *config); -const FcChar8 * -FcConfigNormalizeFontDir (FcConfig *config, - const FcChar8 *d); - FcStrList * FcConfigGetConfigDirs (FcConfig *config); @@ -665,9 +655,6 @@ FcNameParse (const FcChar8 *name); FcChar8 * FcNameUnparse (FcPattern *pat); -FcChar8 * -FcNameUnparseEscaped (FcPattern *pat, FcBool escape); - /* fcpat.c */ FcPattern * FcPatternCreate (void); diff --git a/src/fccache.c b/src/fccache.c index 378e39e..dd0896b 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -379,12 +379,24 @@ FcDirCacheValidate (int fd, off_t size, void *closure) return ret; } -FcBool -FcDirCacheValid (const FcChar8 *dir, FcConfig *config) +static FcBool +FcDirCacheValidConfig (const FcChar8 *dir, FcConfig *config) { 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 FcDirCacheUnmap (FcCache *cache) { diff --git a/src/fcint.h b/src/fcint.h index 73d9331..0bc5df2 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -512,6 +512,9 @@ FcDirCacheMap (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); FcBool FcDirCacheLoad (int fd, off_t size, void *closure); +FcBool +FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config); + /* fccfg.c */ FcBool @@ -803,6 +806,9 @@ FcNameParseLangSet (const FcChar8 *string); FcBool FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); +FcChar8 * +FcNameUnparseEscaped (FcPattern *pat, FcBool escape); + /* fclist.c */ FcBool |