]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccache.c
Hide private functions in shared library. Export functionality for utilities.
[fontconfig.git] / src / fccache.c
index 05dc7eee6ad2f40d48e26eacb1f7ea4441cf002a..aa039900a39632d46b8ed122be79ba4d9d1d8dc4 100644 (file)
@@ -575,6 +575,54 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
     return FcFalse;
 }
 
+/*
+ * Hokey little macro trick to permit the definitions of C functions
+ * with the same name as CPP macros
+ */
+#define args(x...)         (x)
+
+const FcChar8 *
+FcCacheDir args(const FcCache *c)
+{
+    return FcCacheDir (c);
+}
+
+FcFontSet *
+FcCacheCopySet args(const FcCache *c)
+{
+    FcFontSet  *old = FcCacheSet (c);
+    FcFontSet  *new = FcFontSetCreate ();
+    int                i;
+    
+    if (!new)
+       return NULL;
+    for (i = 0; i < old->nfont; i++)
+       if (!FcFontSetAdd (new, FcFontSetFont (old, i)))
+       {
+           FcFontSetDestroy (new);
+           return NULL;
+       }
+    return new;
+}
+
+const FcChar8 *
+FcCacheSubdir args(const FcCache *c, int i)
+{
+    return FcCacheSubdir (c, i);
+}
+
+int
+FcCacheNumSubdir args(const FcCache *c)
+{
+    return c->dirs_count;
+}
+
+int
+FcCacheNumFont args(const FcCache *c)
+{
+    return FcCacheSet(c)->nfont;
+}
+
 /*
  * This code implements the MD5 message-digest algorithm.
  * The algorithm is due to Ron Rivest. This code was