]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcblanks.c
Change files from ISO-Latin-1 to UTF-8
[fontconfig.git] / src / fcblanks.c
index 8b3a9a926b16fefaf6d2438b0050631bb5ab7f0f..a78e85fe600199d70d9413ef4d33f208cbb71e3b 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86$
+ * $RCSId:$
  *
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2002 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
@@ -32,6 +32,7 @@ FcBlanksCreate (void)
     b = malloc (sizeof (FcBlanks));
     if (!b)
        return 0;
+    FcMemAlloc (FC_MEM_BLANKS, sizeof (FcBlanks));
     b->nblank = 0;
     b->sblank = 0;
     b->blanks = 0;
@@ -42,7 +43,11 @@ void
 FcBlanksDestroy (FcBlanks *b)
 {
     if (b->blanks)
+    {
+       FcMemFree (FC_MEM_BLANKS, b->sblank * sizeof (FcChar32));
        free (b->blanks);
+    }
+    FcMemFree (FC_MEM_BLANKS, sizeof (FcBlanks));
     free (b);
 }
 
@@ -65,6 +70,9 @@ FcBlanksAdd (FcBlanks *b, FcChar32 ucs4)
            c = (FcChar32 *) malloc (sblank * sizeof (FcChar32));
        if (!c)
            return FcFalse;
+       if (b->sblank)
+           FcMemFree (FC_MEM_BLANKS, b->sblank * sizeof (FcChar32));
+       FcMemAlloc (FC_MEM_BLANKS, sblank * sizeof (FcChar32));
        b->sblank = sblank;
        b->blanks = c;
     }