source: trunk/include/sh_trace.h@ 271

Last change on this file since 271 was 1, checked in by katerina, 19 years ago

Initial import

File size: 757 bytes
RevLine 
[1]1#ifndef SH_TRACE_H
2#define SH_TRACE_H
3
4
5/* This file should be included via samhain.h only.
6 */
7
8#ifdef SL_DEBUG
9#define ASSERT(expr, expr1) \
10 if (!(expr)) \
11 fprintf(stderr, \
12 SDG_AERRO, \
13 FIL__, __LINE__, expr1 );
14
15
16#define ASSERT_RET(expr, expr1, rr) \
17 if (!(expr)) \
18 { \
19 fprintf(stderr, \
20 SDG_AERRO, \
21 FIL__, __LINE__, expr1 ); \
22 TPT(( (-1), FIL__, __LINE__, SDG_0RETU)) \
23 return (rr); \
24 }
25#else
26#define ASSERT(expr, expr1)
27
28#define ASSERT_RET(expr, expr1, rr) \
29 if (!(expr)) return (rr);
30#endif
31
32
33#ifdef SL_DEBUG
34#define TX1(expr1) \
35 fprintf(stderr, \
36 SDG_TERRO, \
37 FIL__, __LINE__, expr1 );
38#else
39#define TX1(expr1)
40#endif
41
42/* #ifndef SH_TRACE_H */
43#endif
44
Note: See TracBrowser for help on using the repository browser.