[cairo-commit] src/cairo-ps-surface.c
Behdad Esfahbod
behdad at behdad.org
Tue Aug 21 18:23:31 PDT 2007
On Tue, 2007-08-21 at 18:44 -0400, Adrian Johnson wrote:
>
> The debug code is now conditionally compiled.
>
> diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
> index 676014c..211ecd1 100644
> --- a/src/cairo-ps-surface.c
> +++ b/src/cairo-ps-surface.c
> @@ -49,6 +49,8 @@
> #include <time.h>
> #include <zlib.h>
>
> +#define DEBUG_PS 0
> +
How about:
commit fa04a95270fa5f590b7463382f59920a18876494
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Apr 19 15:54:59 2007 -0400
[cairoint.h] Add CAIRO_IS_DEVEL_BUILD and support
CAIRO_NO_DEVEL_BUILD to
force it off. CAIRO_IS_DEVEL_BUILD is set to if at least one of
minor
and micro version components is odd. It can be used to do more
sanity
checks than in production builds.
diff --git a/src/cairoint.h b/src/cairoint.h
index 76397e2..add2ad4 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -66,6 +66,18 @@
#include "cairo.h"
#include <pixman.h>
+#if (CAIRO_VERSION_MINOR / 2) * 2 != CAIRO_VERSION_MINOR
+#define CAIRO_VERSION_MINOR_IS_ODD 1
+#endif
+#if (CAIRO_VERSION_MICRO / 2) * 2 != CAIRO_VERSION_MICRO
+#define CAIRO_VERSION_MICRO_IS_ODD 1
+#endif
+#if !CAIRO_NO_DEVEL_BUILD
+# if CAIRO_VERSION_MINOR_IS_ODD || CAIRO_VERSION_MICRO_IS_ODD
+# define CAIRO_IS_DEVEL_BUILD 1
+# endif
+#endif
+
#ifdef _MSC_VER
#define snprintf _snprintf
#undef inline
Lets get together sometime on IRC and decide how we want to do debug
features in cairo. Something like CAIRO_DEBUG=ps,xlib etc maybe... In
the same meeting we can talk about how to enable/disable individual font
subsetters...
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo-commit
mailing list