home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / ft-beta.zip / freetype / lib / tterror.h < prev    next >
C/C++ Source or Header  |  1997-10-06  |  2KB  |  72 lines

  1. /*******************************************************************
  2.  *
  3.  *  tterror.h
  4.  *
  5.  *    Error number declaration and handling (specification).
  6.  *
  7.  *  Copyright 1996, 1997 by
  8.  *  David Turner, Robert Wilhelm, and Werner Lemberg.
  9.  *
  10.  *  This file is part of the FreeType project, and may only be used
  11.  *  modified and distributed under the terms of the FreeType project
  12.  *  license, LICENSE.TXT. By continuing to use, modify or distribute
  13.  *  this file you indicate that you have read the license and
  14.  *  understand and accept it fully.
  15.  *
  16.  ******************************************************************/
  17.  
  18. #ifndef TTERROR_H
  19. #define TTERROR_H
  20.  
  21. #include "ttcommon.h"
  22.  
  23. /***************************************************************************/
  24. /*                                                                         */
  25. /*  various tracing macros                                                 */
  26. /*                                                                         */
  27. /***************************************************************************/
  28.  
  29. #ifdef CHECK_ASSERTIONS
  30.  
  31.   #define Assert( condition, action )  if (!(condition)) (action)
  32.  
  33. #else
  34.  
  35.   #define Assert( condition, action )  /* void, no check */
  36.  
  37. #endif
  38.  
  39. /* you must say                                                            */
  40. /*                                                                         */
  41. /*  DebugTrace(( fmt, arg1, arg2, ... ))                                   */
  42. /*                                                                         */
  43. /* in the code (note the double parentheses).                              */
  44.  
  45. #ifdef DEBUG
  46.  
  47.   #define DebugTrace( x )  Message##x
  48.  
  49. #else
  50.  
  51.   #define DebugTrace( x )  do{}while(0)
  52.  
  53. #endif /* DEBUG */
  54.  
  55.   #ifdef __cplusplus
  56.   extern "C" {
  57.   #endif
  58.  
  59.   void  Message( const char*  fmt, ... );
  60.   void  Panic( const char*  fmt, ... );   /* print a message and exit */
  61.  
  62.   #ifdef __cplusplus
  63.   }
  64.   #endif
  65.  
  66. #endif /* TTERROR_H */
  67.  
  68.  
  69. /* End */
  70.  
  71.  
  72.