]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcmatrix.c
[xml] Remove unused code
[fontconfig.git] / src / fcmatrix.c
index d2a9f1ed7f45e59f982bd1642d61f6083bd9f124..1d6e2f6b07f1ca91f888ec77b75edf10e243fd19 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86: $
+ * fontconfig/src/fcmatrix.c
  *
- * 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
@@ -110,3 +115,6 @@ FcMatrixShear (FcMatrix *m, double sh, double sv)
     r.yy = 1;
     FcMatrixMultiply (m, &r, m);
 }
+#define __fcmatrix__
+#include "fcaliastail.h"
+#undef __fcmatrix__