home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/clib/h/RCS/assert,v $
- * $Date: 1996/10/30 21:58:58 $
- * $Revision: 1.2 $
- * $State: Rel $
- * $Author: unixlib $
- *
- * $Log: assert,v $
- * Revision 1.2 1996/10/30 21:58:58 unixlib
- * Massive changes made by Nick Burret and Peter Burwood.
- *
- * Revision 1.1 1996/04/19 21:02:57 simon
- * Initial revision
- *
- ***************************************************************************/
-
- /* ANSI Standard: 4.2 Diagnostics <assert.h>. */
-
- #ifndef __ASSERT_H
- #define __ASSERT_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #ifdef NDEBUG
- #define assert(x) ((void) 0)
- #else
- extern int __fail(char *,char *,int);
- #ifdef __STDC__
- #define assert(x) (void)((x) ? 0 : __fail(#x,__FILE__,__LINE__))
- #else
- #define assert(x) (void)((x) ? 0 : __fail("x",__FILE__,__LINE__))
- #endif
- #endif
-
- extern void (assert)(int);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-