Added command line handling from wine regedit, removed stdafx rubbish.
[reactos.git] / rosapps / regedit / trace.h
index bbd863a..7f3318e 100644 (file)
@@ -1,39 +1,30 @@
 /////////////////////////////////////////////////////////////////////////////
+// Diagnostic Trace
 //
 #ifndef __TRACE_H__
 #define __TRACE_H__
 
 #ifdef _DEBUG
 
-//=============================================================================
-//  BreakPoint() macro.
-//=============================================================================
-
 #ifdef _X86_
 #define BreakPoint()        _asm { int 3h }
 #else
 #define BreakPoint()        _DebugBreak()
 #endif
 
-//=============================================================================
-//  MACRO: ASSERT()
-//=============================================================================
-
 #ifndef ASSERT
 #define ASSERT(exp)                                 \
 {                                                   \
-    if ( !(exp) )                                   \
-    {                                               \
-        Assert(#exp, __FILE__, __LINE__, NULL);   \
+    if (!(exp)) {                                   \
+        Assert(#exp, __FILE__, __LINE__, NULL);     \
         BreakPoint();                               \
     }                                               \
 }                                                   \
 
 #define ASSERTMSG(exp, msg)                         \
 {                                                   \
-    if ( !(exp) )                                   \
-    {                                               \
-        Assert(#exp, __FILE__, __LINE__, msg);    \
+    if (!(exp)) {                                   \
+        Assert(#exp, __FILE__, __LINE__, msg);      \
         BreakPoint();                               \
     }                                               \
 }
 //  MACRO: TRACE()
 //=============================================================================
 
-void Assert(void* assert, TCHAR* file, int line, void* msg);
-void Trace(TCHAR* lpszFormat, ...);
-void Trace1(int code, TCHAR* lpszFormat, ...);
-
 #define TRACE  Trace
-#define TRACE0 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 TRACE0 TRACE
-//#define TRACE1 TRACE
+#define TRACE 0 ? (void)0 : Trace
 
-void Assert(void* assert, TCHAR* file, int line, void* msg);
-void Trace(TCHAR* lpszFormat, ...);
+#endif // !_DEBUG
 
-#define TRACE 0 ? (void)0 : Trace
 
+void Assert(void* assert, TCHAR* file, int line, void* msg);
+void Trace(TCHAR* lpszFormat, ...);
 
-#endif // !_DEBUG
 
 #endif // __TRACE_H__
 /////////////////////////////////////////////////////////////////////////////