blob: 7adbcac00498026aad0ecb1a1a788ab8267115fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
* Copyright Johannes Sixt
* This file is licensed under the GNU General Public License Version 2.
* See the file COPYING in the toplevel directory of the source directory.
*/
#ifndef MYTRACE_H
#define MYTRACE_H
#include <kdebug.h>
#include <assert.h>
#ifdef ASSERT
#undef ASSERT
#endif
#ifdef NDEBUG
# define ASSERT(x) ((void)0)
#else
# define ASSERT(x) ((x) ? void(0) : void(kdDebug() << \
(TQString("assertion failed: ") + #x).ascii() << "\n"))
#endif
#ifdef WANT_TRACE_OUTPUT
# define TRACE(x) (kdDebug() << (x) << endl)
#else
# define TRACE(x) ((void)0)
#endif
#endif
|