summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-04-20 00:34:51 -0400
committerBehdad Esfahbod <behdad@behdad.org>2007-04-20 00:52:03 -0400
commit2e709321d858a048731eeaaca4a13a96de739e3f (patch)
treee9303b0264f33620fe63e32e3926a655c9013c3a /boilerplate/cairo-boilerplate.h
parent5331445c12756293a915420a26ab5553fc7db3fc (diff)
downloadcairo-2e709321d858a048731eeaaca4a13a96de739e3f.tar.gz
[boilerplate] Move xasprintf to xmalloc.c
Diffstat (limited to 'boilerplate/cairo-boilerplate.h')
-rw-r--r--boilerplate/cairo-boilerplate.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h
index 5b4c2176f..aa23e1ce9 100644
--- a/boilerplate/cairo-boilerplate.h
+++ b/boilerplate/cairo-boilerplate.h
@@ -67,18 +67,16 @@
#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
#endif
-#include "xmalloc.h"
-
#ifndef CAIRO_BOILERPLATE_LOG
#define CAIRO_BOILERPLATE_LOG(...) fprintf(stderr, __VA_ARGS__)
#endif
-/* A fake format we use for the flattened ARGB output of the PS and
- * PDF surfaces. */
-#define CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED ((unsigned int) -1)
-
-const char *
-cairo_boilerplate_content_name (cairo_content_t content);
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define CAIRO_BOILERPLATE_PRINTF_FORMAT(fmt_index, va_index) \
+ __attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define CAIRO_BOILERPLATE_PRINTF_FORMAT(fmt_index, va_index)
+#endif
#ifndef FALSE
#define FALSE 0
@@ -88,6 +86,14 @@ cairo_boilerplate_content_name (cairo_content_t content);
#define TRUE 1
#endif
+
+/* A fake format we use for the flattened ARGB output of the PS and
+ * PDF surfaces. */
+#define CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED ((unsigned int) -1)
+
+const char *
+cairo_boilerplate_content_name (cairo_content_t content);
+
typedef enum {
CAIRO_BOILERPLATE_MODE_TEST,
CAIRO_BOILERPLATE_MODE_PERF
@@ -130,20 +136,12 @@ cairo_boilerplate_get_targets (int *num_targets, cairo_bool_t *limited_targets);
void
cairo_boilerplate_free_targets (cairo_boilerplate_target_t **targets);
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \
- __attribute__((__format__(__printf__, fmt_index, va_index)))
-#else
-#define CAIRO_PRINTF_FORMAT(fmt_index, va_index)
-#endif
-
void
cairo_boilerplate_surface_set_user_data (cairo_surface_t *surface,
const cairo_user_data_key_t *key,
void *user_data,
cairo_destroy_func_t destroy);
-void
-xasprintf (char **strp, const char *fmt, ...) CAIRO_PRINTF_FORMAT(2, 3);
+#include "xmalloc.h"
#endif