Update the admin/ directory.
[kdbg.git] / kdbg / mydebug.h
blob99f4b588cacc0baa3003eade805b47a5c7095e56
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>
10 #ifdef ASSERT
11 #undef ASSERT
12 #endif
14 #ifdef NDEBUG
15 # define ASSERT(x) ((void)0)
16 #else
17 # define ASSERT(x) ((x) ? void(0) : void(kdDebug() << \
18 (QString("assertion failed: ") + #x).ascii() << "\n"))
19 #endif
21 #ifdef WANT_TRACE_OUTPUT
22 # define TRACE(x) (kdDebug() << (const char*)(x) << "\n")
23 #else
24 # define TRACE(x) ((void)0)
25 #endif