[DHCP/DHCPCSVC]
[reactos.git] / reactos / dll / win32 / dhcpcsvc / include / debug.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: include/debug.h
5 * PURPOSE: Debugging support macros
6 * DEFINES: DBG - Enable debug output
7 * NASSERT - Disable assertions
8 */
9
10 #pragma once
11
12 #define NORMAL_MASK 0x000000FF
13 #define SPECIAL_MASK 0xFFFFFF00
14 #define MIN_TRACE 0x00000001
15 #define MID_TRACE 0x00000002
16 #define MAX_TRACE 0x00000003
17
18 #define DEBUG_ADAPTER 0x00000100
19 #define DEBUG_ULTRA 0xFFFFFFFF
20
21 #if DBG
22
23 extern unsigned long debug_trace_level;
24
25 #ifdef _MSC_VER
26
27 #define DH_DbgPrint(_t_, _x_) \
28 if (((debug_trace_level & NORMAL_MASK) >= _t_) || \
29 ((debug_trace_level & _t_) > NORMAL_MASK)) { \
30 DbgPrint("(%s:%d) ", __FILE__, __LINE__); \
31 DbgPrint _x_ ; \
32 }
33
34 #else /* _MSC_VER */
35
36 #define DH_DbgPrint(_t_, _x_) \
37 if (((debug_trace_level & NORMAL_MASK) >= _t_) || \
38 ((debug_trace_level & _t_) > NORMAL_MASK)) { \
39 DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
40 DbgPrint _x_ ; \
41 }
42
43 #endif /* _MSC_VER */
44
45 #else /* DBG */
46
47 #define DH_DbgPrint(_t_, _x_)
48
49 #endif /* DBG */
50
51 /* EOF */