home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkFunction.h.z / VkFunction.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  2.5 KB  |  61 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #ifndef VKFUNCTION_H
  18. #define VKFUNCTION_H
  19.  
  20. #include <X11/Xlib.h>
  21.  
  22.  
  23. // This is a more flexible version of the traditional Unix "assert" macro.
  24. // It is intended for those cases where hard assertions cause trouble.  If
  25. // the assertion fails, then:
  26. //
  27. //    * If the environment variable VK_FORCE_ABORT is set, then it
  28. //      just calls __assert, resulting in the normal message and core dump.
  29. //
  30. //    * Otherwise, it Gives a warning on stderr if the assertion fails.
  31.  
  32. #ifdef NDEBUG
  33. #  undef VkAssert
  34. #  define VkAssert(EX) ((void)0)
  35.  
  36. #else
  37.    extern void _VkAssert (const char*, const char*, int, int=0);
  38. #  ifdef __ANSI_CPP__
  39. #     define VkAssert(EX) \
  40.     ((EX)?((void)0):_VkAssert( # EX , __FILE__, __LINE__))
  41. #  else
  42. #     define VkAssert(EX) \
  43.     ((EX)?((void)0):_VkAssert("EX", __FILE__, __LINE__))
  44. #  endif
  45.  
  46. #endif /* NDEBUG */
  47.  
  48.  
  49. // Prints a description of the event to stderr.  Right now, not a lot is
  50. // printed, but that can be expanded if the need arises.  The second
  51. // argument is a provision for future enum control over just what is printed.
  52. //
  53. // Note that this is intended to help debug.  Just what it prints may
  54. // change in the future.
  55. //
  56.    extern void VkPrintEvent (XEvent *, int=0);
  57.  
  58.  
  59.  
  60. #endif /* VKFUNCTION_H */
  61.