]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcinit.c
Fix more gcc4 warnings:
[fontconfig.git] / src / fcinit.c
index e28dc2ae30a36e74e63cf3c32a94a19dbd74e1f1..151c429f9115138152a15bbcbb03f7702b9d2cba 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.7 2002/08/22 07:36:44 keithp Exp $
+ * $RCSId: 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.
+ * Copyright © 2001 Keith Packard
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -107,6 +107,19 @@ FcInit (void)
     return FcTrue;
 }
 
+/*
+ * Free all library-allocated data structures.
+ */
+void
+FcFini (void)
+{
+    if (_fcConfig)
+       FcConfigDestroy (_fcConfig);
+
+    FcPatternFini ();
+    FcCharSetThawAll ();
+}
+
 /*
  * Reread the configuration and available font lists
  */
@@ -148,7 +161,7 @@ FcInitBringUptoDate (void)
 }
 
 static struct {
-    char    *name;
+    char    name[16];
     int            alloc_count;
     int            alloc_mem;
     int            free_count;
@@ -183,6 +196,7 @@ static struct {
     { "vstack" },
     { "attr" },
     { "pstack" },
+    { "staticstr" },
 };
 
 static int  FcAllocCount, FcAllocMem;
@@ -203,13 +217,13 @@ FcMemReport (void)
     printf ("\t   Which       Alloc           Free           Active\n");
     printf ("\t           count   bytes   count   bytes   count   bytes\n");
     for (i = 0; i < FC_MEM_NUM; i++)
-       printf ("\t%8.8s%8d%8d%8d%8d%8d%8d\n",
+       printf ("%16.16s%8d%8d%8d%8d%8d%8d\n",
                FcInUse[i].name,
                FcInUse[i].alloc_count, FcInUse[i].alloc_mem,
                FcInUse[i].free_count, FcInUse[i].free_mem,
                FcInUse[i].alloc_count - FcInUse[i].free_count,
                FcInUse[i].alloc_mem - FcInUse[i].free_mem);
-    printf ("\t%8.8s%8d%8d%8d%8d%8d%8d\n",
+    printf ("%16.16s%8d%8d%8d%8d%8d%8d\n",
            "Total",
            FcAllocCount, FcAllocMem,
            FcFreeCount, FcFreeMem,