Adding upstream version 6.02~pre8+dfsg.
[syslinux-debian/hramrach.git] / com32 / include / dprintf.h
blobef23282b3441d698ba8281fbf4a40d4d10e1b682
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 # else
22 void dprintf(const char *, ...);
23 void vdprintf(const char *, va_list);
24 # endif
26 #else
28 #define dprintf(...) \
29 if (syslinux_debug_enabled) \
30 printf(__VA_ARGS__)
31 #define vdprintf(fmt, ap) \
32 if (syslinux_debug_enabled) \
33 vprintf(fmt, ap)
35 #endif /* CORE_DEBUG */
37 # if CORE_DEBUG >= 2
38 /* Really verbose debugging... */
39 # define dprintf2 dprintf
40 # define vdprintf2 vdprintf
41 # else
42 # define dprintf2(fmt, ...) ((void)(0))
43 # define vdprintf2(fmt, ap) ((void)(0))
44 # endif
46 #endif /* _DPRINTF_H */