File: DebugPrint.h

package info (click to toggle)
kinput2 3.1-10.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,012 kB
  • ctags: 5,584
  • sloc: ansic: 49,959; makefile: 106; sh: 68
file content (32 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (10)
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
/* $Id: DebugPrint.h,v 1.5 1994/05/16 08:34:19 ishisone Rel $ */

#ifdef DEBUG
extern int	debug_all;

#ifdef DEBUG_VAR
int DEBUG_VAR = 0;
#else /* DEBUG_VAR */
#ifdef EXT_DEBUG_VAR
extern int EXT_DEBUG_VAR;
#define DEBUG_VAR	EXT_DEBUG_VAR
#else /* EXT_DEBUG_VAR */
#define DEBUG_VAR	0
#endif /* EXT_DEBUG_VAR */
#endif /* DEBUG_VAR */

#define DEBUG_CONDITION	(debug_all || DEBUG_VAR)
#define DDEBUG_CONDITION(l) (debug_all >= (l) || DEBUG_VAR >= (l))
#define DPRINT(args)	{ if (DEBUG_CONDITION) printf args; }
#define DDPRINT(level, args) \
	{ if (DDEBUG_CONDITION(level)) printf args; }
#define TRACE(args)	DDPRINT(10, args)

#else /* !DEBUG */

#define DEBUG_CONDITION	0
#define DDEBUG_CONDITION(l) 0
#define DPRINT(args)
#define DDPRINT(level, args)
#define TRACE(args)

#endif