]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcint.h
Compare device numbers as well as inodes. Always normalize directory names
[fontconfig.git] / src / fcint.h
index 5c2425b816edb157a4b580b6f6608bbd665c30d5..48f209e58a25835d891de2037e5f6ba826b1d2c1 100644 (file)
@@ -48,6 +48,7 @@
 
 #define FC_FONT_FILE_INVALID   ((FcChar8 *) ".")
 #define FC_FONT_FILE_DIR       ((FcChar8 *) ".dir")
+#define FC_GLOBAL_MAGIC_COOKIE "GLOBAL"
 
 #ifdef _WIN32
 #define FC_SEARCH_PATH_SEPARATOR ';'
@@ -447,11 +448,13 @@ FcGlobalCacheLoad (FcGlobalCache    *cache,
 FcBool
 FcGlobalCacheUpdate (FcGlobalCache  *cache,
                     const char     *file,
-                    FcFontSet      *set);
+                    FcFontSet      *set,
+                    FcConfig       *config);
 
 FcBool
 FcGlobalCacheSave (FcGlobalCache    *cache,
-                  const FcChar8    *cache_file);
+                  const FcChar8    *cache_file,
+                  FcConfig         *config);
 
 FcFontSet *
 FcCacheRead (FcConfig *config, FcGlobalCache * cache);
@@ -460,7 +463,7 @@ FcBool
 FcDirCacheWrite (FcFontSet *set, FcStrSet * dirs, const FcChar8 *dir);
 
 FcBool
-FcDirCacheRead (FcFontSet * set, FcStrSet * dirs, const FcChar8 *dir);
+FcDirCacheRead (FcFontSet * set, FcStrSet * dirs, const FcChar8 *dir, FcConfig *config);
 
 extern int *_fcBankId, *_fcBankIdx;
 int
@@ -469,7 +472,7 @@ FcCacheBankToIndexMTF (int bank);
 static __inline__ int
 FcCacheBankToIndex (int bank)
 {
-    return (_fcBankId && _fcBankId[*_fcBankIdx] == bank) ? *_fcBankIdx : FcCacheBankToIndexMTF(bank);
+    return (_fcBankId[*_fcBankIdx] == bank) ? *_fcBankIdx : FcCacheBankToIndexMTF(bank);
 }
 
 const char *
@@ -493,6 +496,10 @@ FcBool
 FcConfigAddConfigFile (FcConfig                *config,
                       const FcChar8    *f);
 
+const FcChar8 *
+FcConfigNormalizeFontDir (FcConfig     *config, 
+                         const FcChar8 *d);
+
 FcBool
 FcConfigSetCache (FcConfig     *config,
                  const FcChar8 *c);