jpegdebug.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Abstract : Utility macros for debugging and tracing
  17. --
  18. --------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: jpegdebug.h,v $
  23. -- $Date: 2007/03/30 05:45:21 $
  24. -- $Revision: 1.1 $
  25. --
  26. ------------------------------------------------------------------------------*/
  27. #ifndef __JPEGDEBUG_H__
  28. #define __JPEGDEBUG_H__
  29. #ifdef _ASSERT_USED
  30. #ifndef ASSERT
  31. #include <assert.h>
  32. #define ASSERT(expr) assert(expr)
  33. #endif
  34. #else
  35. #define ASSERT(expr)
  36. #endif
  37. #ifdef _JPEGDECAPITRACE
  38. #include <stdio.h>
  39. #elif _JPEGDEC_TRACE
  40. #include <stdio.h>
  41. #elif _JPEGDEC_API_TRC
  42. #include <stdio.h>
  43. #elif _JPEGDEC_PP_TRACE
  44. #include <stdio.h>
  45. #elif _DEBUG
  46. #include <stdio.h>
  47. #elif _DEBUG
  48. #include <stdio.h>
  49. #endif
  50. /* macro for debug printing. Note that double parenthesis has to be used, i.e.
  51. * DEBUG(("Debug printing %d\n",%d)) */
  52. #ifdef _JPEGAPITRACE
  53. #define JPEG_API_TRC(args) printf args
  54. #else
  55. #define JPEG_API_TRC(args)
  56. #endif
  57. #ifdef _DEBUG
  58. #define DEBUG(args) printf args
  59. #else
  60. #define DEBUG(args)
  61. #endif
  62. #endif