Releasing debian version 3:6.03+dfsg-10.
[syslinux-debian.git] / com32 / include / dprintf.h
blobb3f1b46b3a18253575134d40f134e15684c68af6
1 /*
2 * dprintf.h
3 */
5 #ifndef _DPRINTF_H
6 #define _DPRINTF_H
8 #include <syslinux/debug.h>
10 #if !defined(DEBUG_PORT) && !defined(DEBUG_STDIO)
11 # undef CORE_DEBUG
12 #endif
14 #ifdef CORE_DEBUG
16 # include <stdio.h>
18 # ifdef DEBUG_STDIO
19 # define dprintf printf
20 # define vdprintf vprintf
21 # define ddprintf dprintf
22 # else
23 void dprintf(const char *, ...);
24 void vdprintf(const char *, va_list);
25 # define ddprintf(...) { printf(__VA_ARGS__); dprintf(__VA_ARGS__); }
26 # endif
28 #else
30 #define dprintf(...) \
31 if (syslinux_debug_enabled) \
32 printf(__VA_ARGS__)
33 #define vdprintf(fmt, ap) \
34 if (syslinux_debug_enabled) \
35 vprintf(fmt, ap)
36 #define ddprintf printf
38 #endif /* CORE_DEBUG */
40 # if CORE_DEBUG >= 2
41 /* Really verbose debugging... */
42 # define dprintf2 dprintf
43 # define vdprintf2 vdprintf
44 # else
45 # define dprintf2(fmt, ...) ((void)(0))
46 # define vdprintf2(fmt, ap) ((void)(0))
47 # endif
49 #endif /* _DPRINTF_H */