common,server: use ASSERT from spice_common.h

spice_common.h provides an ASSERT macro, no need to duplicate it
in many places. For now client/debug.h keeps its own copy since
debug.h and spice_common.h have clashes on other macros which are
trickier to unify.
This commit is contained in:
Christophe Fergeau 2011-04-22 16:17:14 +02:00
parent f88dc6eecb
commit 48db4c2181
9 changed files with 7 additions and 36 deletions

View File

@ -50,13 +50,6 @@
}
#endif
#ifndef ASSERT
#define ASSERT(x) if (!(x)) { \
printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \
abort(); \
}
#endif
#ifndef WARN
#define WARN(x) printf("warning: %s\n", x)
#endif

View File

@ -33,14 +33,6 @@
extern int gdi_handlers;
#endif
#ifndef ASSERT
#define ASSERT(x) if (!(x)) { \
printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \
abort(); \
}
#endif
#ifndef CANVAS_ERROR
#define CANVAS_ERROR(format, ...) { \
printf("%s: " format "\n", __FUNCTION__, ## __VA_ARGS__); \

View File

@ -40,8 +40,6 @@
#include "glc.h"
#include "gl_utils.h"
#define ASSERT(x) if (!(x)) {printf("%s: assert failed %s\n", __FUNCTION__, #x); abort();}
#define WARN_ONCE(x) { \
static int warn = TRUE; \
if (warn) { \

View File

@ -20,6 +20,7 @@
#endif
#include "pixman_utils.h"
#include "spice_common.h"
#include <spice/macros.h>
#include <stdlib.h>
@ -27,13 +28,6 @@
#include <stdio.h>
#include "mem.h"
#ifndef ASSERT
#define ASSERT(x) if (!(x)) { \
printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \
abort(); \
}
#endif
#ifndef PANIC
#define PANIC(str) { \
printf("%s: panic: %s", __FUNCTION__, str); \

View File

@ -28,11 +28,6 @@
#include "rect.h"
#include "mem.h"
#define ASSERT(x) if (!(x)) { \
printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \
abort(); \
}
/* true iff two Boxes overlap */
#define EXTENTCHECK(r1, r2) \
(!( ((r1)->x2 <= (r2)->x1) || \

View File

@ -22,13 +22,7 @@
#include <stdio.h>
#include "rop3.h"
#ifndef ASSERT
#define ASSERT(x) if (!(x)) { \
printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \
abort(); \
}
#endif
#include "spice_common.h"
#ifndef WARN
#define WARN(x) printf("warning: %s\n", x)

View File

@ -19,6 +19,7 @@
#define H_SPICE_COMMON
#include <stdio.h>
#include <stdint.h>
#include <time.h>
#include <stdlib.h>

View File

@ -18,6 +18,8 @@
#include <config.h>
#endif
#include "spice_common.h"
#include "reds_gl_canvas.h"
#define SPICE_CANVAS_INTERNAL
#define SW_CANVAS_IMAGE_CACHE

View File

@ -18,6 +18,8 @@
#include <config.h>
#endif
#include "spice_common.h"
#include "reds_sw_canvas.h"
#define SPICE_CANVAS_INTERNAL
#define SW_CANVAS_IMAGE_CACHE