mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 17:13:51 +00:00
Created framework for new network utility applications.
svn path=/trunk/; revision=3376
This commit is contained in:
parent
ed21a6af20
commit
3a41864fff
16 changed files with 934 additions and 0 deletions
61
rosapps/net/netstat/trace.h
Normal file
61
rosapps/net/netstat/trace.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Diagnostic Trace
|
||||
//
|
||||
#ifndef __TRACE_H__
|
||||
#define __TRACE_H__
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
#ifdef _X86_
|
||||
#define BreakPoint() _asm { int 3h }
|
||||
#else
|
||||
#define BreakPoint() _DebugBreak()
|
||||
#endif
|
||||
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(exp) \
|
||||
{ \
|
||||
if (!(exp)) { \
|
||||
Assert(#exp, __FILE__, __LINE__, NULL); \
|
||||
BreakPoint(); \
|
||||
} \
|
||||
} \
|
||||
|
||||
#define ASSERTMSG(exp, msg) \
|
||||
{ \
|
||||
if (!(exp)) { \
|
||||
Assert(#exp, __FILE__, __LINE__, msg); \
|
||||
BreakPoint(); \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
// MACRO: TRACE()
|
||||
//=============================================================================
|
||||
|
||||
#define TRACE Trace
|
||||
|
||||
|
||||
#else // _DEBUG
|
||||
|
||||
//=============================================================================
|
||||
// Define away MACRO's ASSERT() and TRACE() in non debug builds
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(exp)
|
||||
#define ASSERTMSG(exp, msg)
|
||||
#endif
|
||||
|
||||
#define TRACE 0 ? (void)0 : Trace
|
||||
|
||||
#endif // !_DEBUG
|
||||
|
||||
|
||||
void Assert(void* assert, TCHAR* file, int line, void* msg);
|
||||
void Trace(TCHAR* lpszFormat, ...);
|
||||
|
||||
|
||||
#endif // __TRACE_H__
|
||||
/////////////////////////////////////////////////////////////////////////////
|
Loading…
Add table
Add a link
Reference in a new issue