| Rev | Line |  | 
|---|
| [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)) \ | 
|---|
| [481] | 11 | { \ | 
|---|
|  | 12 | fprintf(stderr,            \ | 
|---|
| [1] | 13 | SDG_AERRO, \ | 
|---|
| [481] | 14 | FIL__, __LINE__, expr1 ); \ | 
|---|
|  | 15 | abort(); \ | 
|---|
|  | 16 | } | 
|---|
| [1] | 17 |  | 
|---|
|  | 18 |  | 
|---|
|  | 19 | #define ASSERT_RET(expr, expr1, rr) \ | 
|---|
|  | 20 | if (!(expr)) \ | 
|---|
|  | 21 | { \ | 
|---|
|  | 22 | fprintf(stderr, \ | 
|---|
|  | 23 | SDG_AERRO, \ | 
|---|
|  | 24 | FIL__, __LINE__, expr1 ); \ | 
|---|
|  | 25 | TPT(( (-1), FIL__, __LINE__, SDG_0RETU))      \ | 
|---|
|  | 26 | return (rr); \ | 
|---|
|  | 27 | } | 
|---|
|  | 28 | #else | 
|---|
|  | 29 | #define ASSERT(expr, expr1) | 
|---|
|  | 30 |  | 
|---|
|  | 31 | #define ASSERT_RET(expr, expr1, rr) \ | 
|---|
|  | 32 | if (!(expr)) return (rr); | 
|---|
|  | 33 | #endif | 
|---|
|  | 34 |  | 
|---|
|  | 35 |  | 
|---|
|  | 36 | #ifdef SL_DEBUG | 
|---|
|  | 37 | #define TX1(expr1) \ | 
|---|
|  | 38 | fprintf(stderr, \ | 
|---|
|  | 39 | SDG_TERRO, \ | 
|---|
|  | 40 | FIL__, __LINE__, expr1 ); | 
|---|
|  | 41 | #else | 
|---|
|  | 42 | #define TX1(expr1) | 
|---|
|  | 43 | #endif | 
|---|
|  | 44 |  | 
|---|
|  | 45 | /* #ifndef SH_TRACE_H */ | 
|---|
|  | 46 | #endif | 
|---|
|  | 47 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.