home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / GNU / GPTX01AS.ZIP / ASSERT.H next >
Encoding:
C/C++ Source or Header  |  1990-07-28  |  429 b   |  19 lines

  1. /* Simple replacement for broken <assert.h>.
  2.    Copyright (C) 1990 Free Software Foundation, Inc.
  3.    Francois Pinard <pinard@iro.umontreal.ca>, 1990.
  4.  
  5.    $Id$
  6. */
  7.  
  8. #undef assert
  9.  
  10. #ifdef NDEBUG
  11. #define assert(ignore)  ((void)0)
  12. #else
  13. #define assert(expression)                        \
  14.   ((expression) ? 0                            \
  15.    : (fprintf ("Failed assertion at line %d of `%s'.\n",        \
  16.             __FILE__, __LINE__)),                    \
  17.    abort ())
  18. #endif
  19.