home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 38.ddi / root.3 / usr / include / assert.h / assert.h
Encoding:
C/C++ Source or Header  |  1990-10-02  |  789 b   |  29 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1988 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ident    "@(#)/usr/include/assert.h.sl 1.2 5.0 08/27/90 24313 AT&T-USO 1.3"
  11.  
  12. #ifdef NDEBUG
  13. #undef assert
  14. #define assert(EX) ((void)0)
  15.  
  16. #else
  17.  
  18. #if defined(__STDC__)
  19. extern void __assert(const char *, const char *, int);
  20. #define assert(EX) (void)((EX) || (__assert(#EX, __FILE__, __LINE__), 0))
  21.  
  22. #else
  23. extern void _assert();
  24. #define assert(EX) (void)((EX) || (_assert("EX", __FILE__, __LINE__), 0))
  25.  
  26. #endif    /* __STDC__ */
  27.  
  28. #endif    /* NDEBUG */
  29.