- Removed some obsolete headers.
[reactos.git] / reactos / drivers / net / wshtcpip / debug.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WinSock Helper DLL for TCP/IP
4 * FILE: include/debug.h
5 * PURPOSE: Debugging support macros
6 * DEFINES: DBG - Enable debug output
7 * NASSERT - Disable assertions
8 */
9 #ifndef __DEBUG_H
10 #define __DEBUG_H
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_ULTRA 0xFFFFFFFF
19
20 #ifdef DBG
21
22 extern DWORD DebugTraceLevel;
23
24 #define WSH_DbgPrint(_t_, _x_) \
25 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
26 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
27 DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \
28 DbgPrint _x_; \
29 }
30
31 /* this belongs in ndis.h */
32 #if 0
33 #ifdef ASSERT
34 #undef ASSERT
35 #endif
36
37 #ifdef NASSERT
38 #define ASSERT(x)
39 #else /* NASSERT */
40 #define ASSERT(x) if (!(x)) { WSH_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); ExitProcess(0); }
41 #endif /* NASSERT */
42 #endif
43
44 #else /* DBG */
45
46 #define WSH_DbgPrint(_t_, _x_)
47
48 /*#define ASSERT(x)*/
49
50 #endif /* DBG */
51
52
53 #undef assert
54 #define assert(x) ASSERT(x)
55 #define assert_irql(x) ASSERT_IRQL(x)
56
57
58 #define UNIMPLEMENTED \
59 WSH_DbgPrint(MIN_TRACE, ("(%s:%d)(%s) is unimplemented, \
60 please try again later.\n", __FILE__, __LINE__, __FUNCTION__));
61
62 #define CHECKPOINT \
63 WSH_DbgPrint(MIN_TRACE, ("\n"));
64
65 #define CP CHECKPOINT
66
67 #endif /* __DEBUG_H */
68
69 /* EOF */