]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcmatrix.c
Include $(top_srcdir), $(top_srcdir)/src before anything else.
[fontconfig.git] / src / fcmatrix.c
index d2a9f1ed7f45e59f982bd1642d61f6083bd9f124..3c4d9fb84a1e332170dc895fcb1813cd9be79cc9 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86: $
+ * $RCSId: $
  *
- * Copyright © 2000 Tuomas J. Lukka
+ * Copyright Â© 2000 Tuomas J. Lukka
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "fcint.h"
 #include <math.h>
 #include <stdlib.h>
 #include <ctype.h>
-#include "fcint.h"
+
+const FcMatrix    FcIdentityMatrix = { 1, 0, 0, 1 };
 
 FcMatrix *
 FcMatrixCopy (const FcMatrix *mat) 
@@ -44,8 +46,11 @@ FcMatrixCopy (const FcMatrix *mat)
 void
 FcMatrixFree (FcMatrix *mat)
 {
-    FcMemFree (FC_MEM_MATRIX, sizeof (FcMatrix));
-    free (mat);
+    if (mat != &FcIdentityMatrix)
+    {
+       FcMemFree (FC_MEM_MATRIX, sizeof (FcMatrix));
+       free (mat);
+    }
 }
 
 FcBool