]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcint.h
Patrick Lam <plam@mit.edu>
[fontconfig.git] / src / fcint.h
index e0bce4b484e0c8ac12609c754a5e2dcf1b142c49..84df88de225986bb96803ffc527b63e6dd0b13a3 100644 (file)
 
 #include <stdlib.h>
 #include <stdio.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
 #include <stdint.h>
+#endif
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
@@ -251,7 +255,7 @@ typedef struct _FcStrBuf {
 } FcStrBuf;
 
 typedef struct _FcCache {
-    int            magic;              /* 0xFC02FC02 */
+    int            magic;              /* FC_CACHE_MAGIC */
     int            count;              /* number of bytes of data in block */
     int     bank;               /* bank ID */
     int     pattern_count;      /* number of FcPatterns */
@@ -324,10 +328,13 @@ typedef struct _FcCaseFold {
  * cache which is then rewritten to the users home directory
  */
 
-#define FC_CACHE_MAGIC 0xFC02FC02
+#define FC_CACHE_MAGIC 0xFC02FC03
 
 typedef struct _FcGlobalCacheDir FcGlobalCacheDir;
 
+enum FcGCDirState {
+       FcGCDirDisabled, FcGCDirFileRead, FcGCDirConsumed, FcGCDirUpdated
+};
 struct _FcGlobalCacheDir {
     struct _FcGlobalCacheDir   *next;
     char                       *name;
@@ -335,6 +342,7 @@ struct _FcGlobalCacheDir {
     off_t                      offset;
     FcStrSet                   *subdirs;
     void                       *ent;
+    enum FcGCDirState          state;
 };
 
 typedef struct _FcGlobalCache {
@@ -904,9 +912,6 @@ FcPatternEltU (FcPatternEltPtr pei)
     return &_fcPatternElts[FcCacheBankToIndex(pei.bank)][pei.u.stat];
 }
 
-FcPatternElt *
-FcPatternEltU (FcPatternEltPtr pei);
-
 FcValueListPtr
 FcValueListPtrCreateDynamic(FcValueList * p);