]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcinit.c
More complete memory tracking. Install always overwrites header files
[fontconfig.git] / src / fcinit.c
index 8154b659b0815929cef532caa5e102f559a1b284..e28dc2ae30a36e74e63cf3c32a94a19dbd74e1f1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.3 2002/02/19 08:33:23 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.7 2002/08/22 07:36:44 keithp Exp $
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -33,7 +33,7 @@ FcInitFallbackConfig (void)
     config = FcConfigCreate ();
     if (!config)
        goto bail0;
-    if (!FcConfigAddDir (config, (FcChar8 *) FC_FALLBACK_FONTS))
+    if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
        goto bail1;
     return config;
 
@@ -43,6 +43,12 @@ bail0:
     return 0;
 }
 
+int
+FcGetVersion (void)
+{
+    return FC_VERSION;
+}
+
 /*
  * Load the configuration files
  */
@@ -96,6 +102,8 @@ FcInit (void)
     if (!config)
        return FcTrue;
     FcConfigSetCurrent (config);
+    if (FcDebug() & FC_DBG_MEMORY)
+       FcMemReport ();
     return FcTrue;
 }
 
@@ -146,19 +154,35 @@ static struct {
     int            free_count;
     int            free_mem;
 } FcInUse[FC_MEM_NUM] = {
-    { "charset", 0, 0 },
-    { "charnode", 0 ,0 },
-    { "fontset", 0, 0 },
-    { "fontptr", 0, 0 },
-    { "objectset", 0, 0 },
-    { "objectptr", 0, 0 },
-    { "matrix", 0, 0 },
-    { "pattern", 0, 0 },
-    { "patelt", 0, 0 },
-    { "vallist", 0, 0 },
-    { "substate", 0, 0 },
-    { "string", 0, 0 },
-    { "listbuck", 0, 0 },
+    { "charset" },
+    { "charleaf" },
+    { "fontset" },
+    { "fontptr" },
+    { "objectset" },
+    { "objectptr" },
+    { "matrix" },
+    { "pattern" },
+    { "patelt" },
+    { "vallist" },
+    { "substate" },
+    { "string" },
+    { "listbuck" },
+    { "strset" },
+    { "strlist" },
+    { "config" },
+    { "langset" },
+    { "atomic" },
+    { "blanks" },
+    { "cache" },
+    { "strbuf" },
+    { "subst" },
+    { "objecttype" },
+    { "constant" },
+    { "test" },
+    { "expr" },
+    { "vstack" },
+    { "attr" },
+    { "pstack" },
 };
 
 static int  FcAllocCount, FcAllocMem;
@@ -168,6 +192,9 @@ static int  FcMemNotice = 1*1024*1024;
 
 static int  FcAllocNotify, FcFreeNotify;
 
+void
+FcValueListReport (void);
+
 void
 FcMemReport (void)
 {
@@ -190,6 +217,7 @@ FcMemReport (void)
            FcAllocMem - FcFreeMem);
     FcAllocNotify = 0;
     FcFreeNotify = 0;
+    FcValueListReport ();
 }
 
 void