home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / debug.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.1 KB  |  45 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 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. #ifndef _SYS_DEBUG_H
  11. #define _SYS_DEBUG_H
  12.  
  13. #ident    "@(#)/usr/include/sys/debug.h.sl 1.1 4.0 12/08/90 32985 AT&T-USL"
  14.  
  15. #define    YES 1
  16. #define    NO  0
  17.  
  18. #if DEBUG == YES
  19.  
  20. #if defined(__STDC__)
  21. extern int assfail(char *, char *, int);
  22. #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
  23. #else
  24. extern int assfail();
  25. #define ASSERT(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__)))
  26. #endif    /* end __STDC__ */
  27.  
  28. #define DB_ISKV(A) ((unsigned)(A) >= KVBASE && (unsigned)(A) < UVUBLK)
  29.  
  30. #else    /* else DEBUG */
  31.  
  32. #define ASSERT(x)
  33. #define DB_ISKV(A) 1
  34. #endif    /* end DEBUG */
  35.  
  36. #ifdef MONITOR
  37. #define MONITOR(id, w1, w2, w3, w4) monitor(id, w1, w2, w3, w4)
  38. #else
  39. #define MONITOR(id, w1, w2, w3, w4)
  40. #endif
  41.  
  42. #define STATIC
  43.  
  44. #endif    /* _SYS_DEBUG_H */
  45.