Switched from hg to git, converting ignore file accordingly
[qemu-gui.git] / debug.h
blob062e995bd6c1defd6db3eb847d643ef960162e48
1 #ifndef QEMU_GUI_DEBUG_H
2 #define QEMU_GUI_DEBUG_H
4 #include <stdio.h>
6 #ifdef DEBUG_ALL_FLAG
7 #define DEBUG_MOUSE_FLAG
8 #define DEBUG_KEYBBOARD_FLAG
9 #define DEBUG_VNC_FLAG
10 #define DEBUG_PAINT_FLAG
11 #endif
13 #define DEBUG(format,args...) \
14 fprintf(stderr,format"\n",## args)
16 #define DEBUG_SECTION(title,format,args...) \
17 fprintf(stderr,title": "format"\n",## args)
19 #ifdef DEBUG_MOUSE_FLAG
20 #define DEBUG_MOUSE(format,args...) \
21 DEBUG_SECTION("mouse",format,## args)
22 #else
23 #define DEBUG_MOUSE(format,args...) \
24 do {} while(0)
25 #endif
27 #ifdef DEBUG_KEYBOARD_FLAG
28 #define DEBUG_KEYBOARD(format,args...) \
29 DEBUG_SECTION("keyboard",format,## args)
30 #else
31 #define DEBUG_KEYBOARD(format,args...) \
32 do {} while(0)
33 #endif
35 #ifdef DEBUG_VNC_FLAG
36 #define DEBUG_VNC(format,args...) \
37 DEBUG_SECTION("vnc",format,## args)
38 #else
39 #define DEBUG_VNC(format,args...) \
40 do {} while(0)
41 #endif
43 #ifdef DEBUG_PAINT_FLAG
44 #define DEBUG_PAINT(format,args...) \
45 DEBUG_SECTION("paint",format,## args)
46 #else
47 #define DEBUG_PAINT(format,args...) \
48 do {} while(0)
49 #endif
51 #endif