

Please wait until the page is fully downloaded and then press the "Expand" button or the blue line numbers.
0022001 /*
0022002 assert.h
0022003
0022004 Copyright 1995 Philip Homburg
0022005 */
0022006 #ifndef INET_ASSERT_H
0022007 #define INET_ASSERT_H
0022008
0022009 #if !NDEBUG
0022010
0022011 void bad_assertion(char *file, int line, char *what);
0022012 void bad_compare(char *file, int line, int lhs, char *what, int rhs);
0022013
0022014 #define assert(x) (!(x) ? bad_assertion(this_file, __LINE__, #x) \
0022015 : (void) 0)
0022016 #define compare(a,t,b) (!((a) t (b)) ? bad_compare(this_file, __LINE__, \
0022017 (a), #a " " #t " " #b, (b)) : (void) 0)
0022018
0022019 #else /* NDEBUG */
0022020
0022021 #define assert(x) 0
0022022 #define compare(a,t,b) 0
0022023
0022024 #endif /* NDEBUG */
0022025
0022026 #endif /* INET_ASSERT_H */
0022027
0022028
0022029 /*
0022030 * $PchId: assert.h,v 1.4 1995/11/21 06:45:27 philip Exp $
0022031 */