pixman: Branch 'master'

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Thu Jun 14 22:48:12 PDT 2007


 TODO                    |    2 ++
 pixman/pixman-private.h |   47 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 32 insertions(+), 17 deletions(-)

New commits:
diff-tree cd9c484f0d8cef0cc243a73de5a8d742b8678230 (from e1dd17451cbe2c7d36205fe2fc4cea0092ee4141)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Fri Jun 15 01:45:04 2007 -0400

    Turn off debug spew for incorrect arguments

diff --git a/TODO b/TODO
index 2e767ab..9423dd9 100644
--- a/TODO
+++ b/TODO
@@ -27,6 +27,8 @@
   prepare and finish
 
 - Make source clipping optional.
+       - done: source clipping happens through an indirection.
+         still needs to make the indirection settable.
 
 done:
 
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index bf0579f..c0e98c4 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -26,7 +26,7 @@
 #  define BITMAP_BIT_ORDER LSBFirst
 #endif
 
-#define DEBUG 1
+#define DEBUG 0
 
 #if defined (__GNUC__)
 #  define FUNC     ((const char*) (__PRETTY_FUNCTION__))
@@ -47,31 +47,44 @@
 #if DEBUG
 
 #define return_if_fail(expr)						\
-	do								\
+    do									\
+    {									\
+	if (!(expr))							\
 	{								\
-	    if (!(expr))						\
-	    {								\
-		fprintf(stderr, "In %s: %s failed\n", FUNC, #expr);	\
-		return;							\
-	    }								\
+	    fprintf(stderr, "In %s: %s failed\n", FUNC, #expr);		\
+	    return;							\
 	}								\
-	while (0)
+    }									\
+    while (0)
 
 #define return_val_if_fail(expr, retval) 				\
-	do								\
+    do									\
+    {									\
+	if (!(expr))							\
 	{								\
-	    if (!(expr))						\
-	    {								\
-		fprintf(stderr, "In %s: %s failed\n", FUNC, #expr);	\
-		return (retval);					\
-	    }								\
+	    fprintf(stderr, "In %s: %s failed\n", FUNC, #expr);		\
+	    return (retval);						\
 	}								\
-	while (0)
+    }									\
+    while (0)
 
 #else
 
-#define return_if_fail(expr)
-#define return_val_if_fail(expr, retval)
+#define return_if_fail(expr)						\
+    do									\
+    {									\
+	if (!(expr))							\
+	    return;							\
+    }									\
+    while (0)
+
+#define return_val_if_fail(expr, retval)				\
+    do									\
+    {									\
+	if (!(expr))							\
+	    return (retval);						\
+    }									\
+    while (0)
 
 #endif
 


More information about the xorg-commit mailing list