1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifndef SH_TRACE_H
#define SH_TRACE_H
/* This file should be included via samhain.h only.
*/
#ifdef SL_DEBUG
#define ASSERT(expr, expr1) \
if (!(expr)) \
{ \
fprintf(stderr, \
SDG_AERRO, \
FIL__, __LINE__, expr1 ); \
abort(); \
}
#define ASSERT_RET(expr, expr1, rr) \
if (!(expr)) \
{ \
fprintf(stderr, \
SDG_AERRO, \
FIL__, __LINE__, expr1 ); \
TPT(( (-1), FIL__, __LINE__, SDG_0RETU)) \
return (rr); \
}
#else
#define ASSERT(expr, expr1)
#define ASSERT_RET(expr, expr1, rr) \
if (!(expr)) return (rr);
#endif
#ifdef SL_DEBUG
#define TX1(expr1) \
fprintf(stderr, \
SDG_TERRO, \
FIL__, __LINE__, expr1 );
#else
#define TX1(expr1)
#endif
/* #ifndef SH_TRACE_H */
#endif
|