home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia: Special Games / INFESPGAMES.mdf / os2 / ribble / support / cassert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-09  |  857 b   |  29 lines

  1. // -------------------------------
  2. //  $Source: C:\logical\store\classes/RCS/CASSERT.H,v $
  3. //  $Revision: 1.6 $
  4. //  $Date: 1993/11/27 21:36:00 $
  5. //  $Author: jason $
  6. //  Language:       C/C++
  7. //  Licence:        Public Domain
  8. //  Purpose:        assert() replacement which knows about PM apps.
  9. // -------------------------------
  10.  
  11. #include <CSupport.h>
  12.  
  13. #ifndef _CAssert_h
  14. #define _CAssert_h
  15.  
  16.   #ifdef __OS2__
  17.      void CSExport CAssertHandler(const char* cond, const char* file, const int line);
  18.  
  19.     #define CAssert(condition)                                              \
  20.              ((condition) ? (void)0                                         \
  21.                           : CAssertHandler(#condition, __FILE__, __LINE__))
  22.  
  23.   #else
  24.     #include <assert.h>
  25.     #define CAssert(condition) assert(condition)
  26.   #endif
  27.  
  28. #endif
  29.