home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / INCLUDE / ASSERT.H next >
Text File  |  1993-09-17  |  2KB  |  56 lines

  1. #pragma info( none )
  2. #ifndef __CHKHDR__
  3.    #pragma info( none )
  4. #endif
  5. #pragma info( restore )
  6.  
  7. #ifdef __cplusplus
  8.    extern "C" {
  9. #endif
  10.  
  11. /********************************************************************/
  12. /*  <assert.h> header file                                          */
  13. /*                                                                  */
  14. /*  Licensed Materials - Property of IBM                            */
  15. /*                                                                  */
  16. /*  IBM C/C++ Tools Version 2.01                                    */
  17. /*  Copyright (C) International Business Machines Corp., 1991,1993  */
  18. /*  All rights reserved                                             */
  19. /*                                                                  */
  20. /*  US Government Users Restricted Rights -                         */
  21. /*  Use, duplication, or disclosure restricted                      */
  22. /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  23. /*                                                                  */
  24. /********************************************************************/
  25.  
  26. #ifndef NDEBUG
  27.  
  28.    #ifdef assert
  29.       #undef assert
  30.    #endif
  31.  
  32.    void _Optlink _assert( const char *, const char *, unsigned int );
  33.  
  34.    #define assert( expr ) \
  35.       ( ( expr ) ? ( void )0 : _assert( #expr, __FILE__, __LINE__ ) )
  36.  
  37. #else
  38.  
  39.    #ifdef assert
  40.       #undef assert
  41.    #endif
  42.  
  43.    #define assert( ignore ) ( ( void )0 )
  44.  
  45. #endif
  46.  
  47. #ifdef __cplusplus
  48.    }
  49. #endif
  50.  
  51. #pragma info( none )
  52. #ifndef __CHKHDR__
  53.    #pragma info( restore )
  54. #endif
  55. #pragma info( restore )
  56.