home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / assert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  1.8 KB  |  74 lines

  1. #if (defined(__IBMC__) || defined(__IBMCPP__))
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifdef __cplusplus
  10.    extern "C" {
  11. #endif
  12.  
  13.    #ifndef  _LNK_CONV
  14.       #ifdef _M_I386
  15.          #define _LNK_CONV   _Optlink
  16.       #else
  17.          #define _LNK_CONV
  18.       #endif
  19.    #endif
  20.  
  21.    #ifndef _IMPORT
  22.       #ifdef __IMPORTLIB__
  23.          #define _IMPORT _Import
  24.       #else
  25.          #define _IMPORT
  26.       #endif
  27.    #endif
  28.  
  29. /********************************************************************/
  30. /*  <assert.h> header file                                          */
  31. /*                                                                  */
  32. /*  VisualAge for C++ for Windows, Version 3.5                      */
  33. /*    Licensed Material - Property of IBM                           */
  34. /*                                                                  */
  35. /*  5801-ARR and Other Materials                                    */
  36. /*                                                                  */
  37. /*  (c) Copyright IBM Corp 1991, 1996. All rights reserved.         */
  38. /*                                                                  */
  39. /********************************************************************/
  40.  
  41. #ifndef NDEBUG
  42.  
  43.    #ifdef assert
  44.       #undef assert
  45.    #endif
  46.  
  47.    extern void _IMPORT _LNK_CONV _assert( const char *, const char *, unsigned int );
  48.  
  49.    #define assert( expr ) \
  50.       ( ( expr ) ? ( void )0 : _assert( #expr, __FILE__, __LINE__ ) )
  51.  
  52. #else
  53.  
  54.    #ifdef assert
  55.       #undef assert
  56.    #endif
  57.  
  58.    #define assert( ignore ) ( ( void )0 )
  59.  
  60. #endif
  61.  
  62. #ifdef __cplusplus
  63.    }
  64. #endif
  65.  
  66. #if (defined(__IBMC__) || defined(__IBMCPP__))
  67. #pragma info( none )
  68. #ifndef __CHKHDR__
  69.    #pragma info( restore )
  70. #endif
  71. #pragma info( restore )
  72. #endif
  73.  
  74.