OSSP CVS Repository

ossp - Check-in [1025]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1025
Date: 2001-Sep-21 19:30:58 (local)
2001-Sep-21 17:30:58 (UTC)
User:ms
Branch:
Comment: Added more homebrewed TRACE elements.
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2_p.h      1.18 -> 1.19     11 inserted, 0 deleted

ossp-pkg/l2/l2_p.h 1.18 -> 1.19

--- l2_p.h       2001/09/14 10:12:48     1.18
+++ l2_p.h       2001/09/21 17:30:58     1.19
@@ -54,6 +54,17 @@
     if (expr) \
         cu(value)
 
+#ifndef NDEBUG
+#define TRACE(str)\
+        do {\
+            fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, str);\
+            exit(1);\
+        }\
+        while (0)
+#else
+#define TRACE(expr) ((void)0)
+#endif
+
 #define L2_MAX_MSGSIZE    4096
 #define L2_MAX_CHANNELS    128
 #define L2_MAX_FORMATTERS  128

CVSTrac 2.0.1