KDbg 2.5.6.
[kdbg.git] / kdbg / mydebug.h
blob67df44e30e9a160cc3d3295b8abe064a2b00f9c2
1 /*
2 * Copyright Johannes Sixt
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
5 */
7 #include <kdebug.h>
8 #include <assert.h>
9 #include "config.h"
11 #ifdef ASSERT
12 #undef ASSERT
13 #endif
15 #ifdef NDEBUG
16 # define ASSERT(x) do {} while (0)
17 #else
18 # define ASSERT(x) kDebug(!(x)) << "assertion failed: " #x "\n"
19 #endif
21 #ifdef WANT_TRACE_OUTPUT
22 # define TRACE(x) kDebug() << (x)
23 #else
24 # define TRACE(x) do {} while (0)
25 #endif