home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / include / assert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  930 b   |  37 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ifndef _ASSERT_H
  12. #define _ASSERT_H
  13. #ident    "@(#)sgs-head:common/head/assert.h    1.6.3.7"
  14. #endif
  15.  
  16. #undef assert
  17.  
  18. #ifdef NDEBUG
  19.  
  20. #define assert(e) ((void)0)
  21.  
  22. #else /*!NDEBUG*/
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. extern void __assert(const char *, const char *, int);
  29.  
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33.  
  34. #define assert(e) ((void)((e) || (__assert(#e, __FILE__, __LINE__), 0)))
  35.  
  36. #endif /*NDEBUG*/
  37.