mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 08:25:39 +00:00
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:
parent
f88dc6eecb
commit
48db4c2181
@ -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
|
||||
|
||||
@ -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__); \
|
||||
|
||||
@ -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) { \
|
||||
|
||||
@ -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); \
|
||||
|
||||
@ -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) || \
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#define H_SPICE_COMMON
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user