]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcblanks.c
Bug 43321 - Required corrections in urdu.orth file
[fontconfig.git] / src / fcblanks.c
index 8b3a9a926b16fefaf6d2438b0050631bb5ab7f0f..a80a1344fab6e0a99912bfe9e3394e819d471d07 100644 (file)
@@ -1,21 +1,21 @@
 /*
- * $XFree86$
+ * fontconfig/src/fcblanks.c
  *
- * 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
  * the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
+ * documentation, and that the name of the author(s) not be used in
  * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
+ * specific, written prior permission.  The authors make no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
@@ -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;
     }
@@ -82,3 +90,6 @@ FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4)
            return FcTrue;
     return FcFalse;
 }
+#define __fcblanks__
+#include "fcaliastail.h"
+#undef __fcblanks__