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 ((_t_ > NORMAL_MASK) \ 29 ? (debug_trace_level & _t_) > NORMAL_MASK \ 30 : (debug_trace_level & NORMAL_MASK) >= _t_) { \ 31 DbgPrint("(%s:%d) ", __FILE__, __LINE__); \ 32 DbgPrint _x_ ; \ 33 } 34 35 #else /* _MSC_VER */ 36 37 #define DH_DbgPrint(_t_, _x_) \ 38 if ((_t_ > NORMAL_MASK) \ 39 ? (debug_trace_level & _t_) > NORMAL_MASK \ 40 : (debug_trace_level & NORMAL_MASK) >= _t_) { \ 41 DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \ 42 DbgPrint _x_ ; \ 43 } 44 45 #endif /* _MSC_VER */ 46 47 #else /* DBG */ 48 49 #define DH_DbgPrint(_t_, _x_) 50 51 #endif /* DBG */ 52 53 /* EOF */ 54