File: mydebug.h

package info (click to toggle)
kdbg 1.2.4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,504 kB
  • ctags: 1,945
  • sloc: cpp: 15,961; sh: 8,183; makefile: 481; perl: 71; ansic: 16
file content (34 lines) | stat: -rw-r--r-- 800 bytes parent folder | download
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
31
32
33
34
// $Id: mydebug.h,v 1.10 2000/11/11 12:15:43 jsixt Exp $

#include <kdebug.h>
#include <assert.h>

#ifdef ASSERT
#undef ASSERT
#endif

#ifdef KASSERT3
#define ASSERT(x) KASSERT3((x), KDEBUG_INFO, 0, "assertion failed: %s in %s:%d", #x, __FILE__,__LINE__)
#else
# ifdef NDEBUG
#  define ASSERT(x) ((void)0)
# else
#  define ASSERT(x) ((x) ? void(0) : void(kdDebug() << \
					(QString("assertion failed: ") + #x).ascii() << "\n"))
# endif
#endif
#ifdef WANT_TRACE_OUTPUT
#ifndef KDEBUG 
# define TRACE(x) (kdDebug() << (const char*)(x) << "\n")
#else
# define TRACE(x) KDEBUG(KDEBUG_INFO,0,(x))
#endif
#else
#define TRACE(x) ((void)0)
#endif

// KDE 2 compatibility; placed here because this file is included everywhere
#if QT_VERSION >= 200
#define getCaption caption
#define getConfig config
#endif