assert.h

Go to the documentation of this file.
00001 /*
00002 assert.h
00003 
00004 Copyright 1995 Philip Homburg
00005 */
00006 #ifndef INET_ASSERT_H
00007 #define INET_ASSERT_H
00008 
00009 #if !NDEBUG
00010 
00011 void bad_assertion(char *file, int line, char *what) _NORETURN;
00012 void bad_compare(char *file, int line, int lhs, char *what, int rhs) _NORETURN;
00013 
00014 #define assert(x)       ((void)(!(x) ? bad_assertion(this_file, __LINE__, \
00015                         #x),0 : 0))
00016 #define compare(a,t,b)  (!((a) t (b)) ? bad_compare(this_file, __LINE__, \
00017                                 (a), #a " " #t " " #b, (b)) : (void) 0)
00018 
00019 #else /* NDEBUG */
00020 
00021 #define assert(x)               0
00022 #define compare(a,t,b)          0
00023 
00024 #endif /* NDEBUG */
00025 
00026 #endif /* INET_ASSERT_H */
00027 
00028 
00029 /*
00030  * $PchId: assert.h,v 1.8 2002/03/18 21:50:32 philip Exp $
00031  */

Generated on Fri Apr 14 22:57:13 2006 for minix by  doxygen 1.4.6