Turn off debug spew for incorrect arguments
authorSøren Sandmann <sandmann@redhat.com>
Fri, 15 Jun 2007 05:45:04 +0000 (01:45 -0400)
committerSøren Sandmann <sandmann@redhat.com>
Fri, 15 Jun 2007 05:45:04 +0000 (01:45 -0400)
TODO
pixman/pixman-private.h

diff --git a/TODO b/TODO
index 2e767ab..9423dd9 100644 (file)
--- 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:
 
index bf0579f..c0e98c4 100644 (file)
@@ -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__))
 #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