move WARN and WARN_ONCE to spice_common.h

This commit is contained in:
Christophe Fergeau 2011-04-22 16:39:29 +02:00 committed by Marc-André Lureau
parent 56f2e9648e
commit 09453dcd43
4 changed files with 7 additions and 15 deletions

View File

@ -39,14 +39,7 @@
#include "mem.h"
#include "glc.h"
#include "gl_utils.h"
#define WARN_ONCE(x) { \
static int warn = TRUE; \
if (warn) { \
printf x; \
warn = FALSE; \
} \
}
#include "spice_common.h"
#define TESS_VERTEX_ALLOC_BUNCH 20
@ -1015,7 +1008,7 @@ void _glc_fill_mask(GLCCtx glc, int x_dest, int y_dest, int width, int height, i
ASSERT(ctx && bitmap);
start_draw(ctx);
if (ctx->pat) {
WARN_ONCE(("%s: unimplemented fill mask with pattern\n", __FUNCTION__));
WARN_ONCE("%s: unimplemented fill mask with pattern\n", __FUNCTION__);
}
fill_mask(ctx, x_dest, y_dest, width, height, stride, bitmap);
}

View File

@ -25,6 +25,7 @@
#include <GL/glx.h>
#include "ogl_ctx.h"
#include "spice_common.h"
enum {
OGLCTX_TYPE_PBUF,

View File

@ -24,10 +24,6 @@
#include "rop3.h"
#include "spice_common.h"
#ifndef WARN
#define WARN(x) printf("warning: %s\n", x)
#endif
typedef void (*rop3_with_pattern_handler_t)(pixman_image_t *d, pixman_image_t *s,
SpicePoint *src_pos, pixman_image_t *p,
SpicePoint *pat_pos);
@ -51,13 +47,13 @@ static void default_rop3_with_pattern_handler(pixman_image_t *d, pixman_image_t
SpicePoint *src_pos, pixman_image_t *p,
SpicePoint *pat_pos)
{
WARN("not implemented 0x%x");
WARN("not implemented");
}
static void default_rop3_withe_color_handler(pixman_image_t *d, pixman_image_t *s, SpicePoint *src_pos,
uint32_t rgb)
{
WARN("not implemented 0x%x");
WARN("not implemented");
}
static void default_rop3_test_handler()

View File

@ -53,6 +53,8 @@
printf("%s: " format "\n", __FUNCTION__, ## __VA_ARGS__ ); \
} \
}
#define WARN(format, ...) red_printf("warning: "format"\n", ##__VA_ARGS__ );
#define WARN_ONCE red_printf_once
#define red_printf_some(every, format, ...) { \
static int count = 0; \