2002-12-03 03:59:42 +03:00
|
|
|
#ifndef _MEDIA_DEBUG_H_
|
|
|
|
#define _MEDIA_DEBUG_H_
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-12-03 03:59:42 +03:00
|
|
|
#include <Debug.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2002-12-03 03:59:42 +03:00
|
|
|
#undef TRACE
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-12-03 03:59:42 +03:00
|
|
|
#ifndef DEBUG
|
|
|
|
#define DEBUG 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
#if DEBUG >= 1
|
2002-12-03 03:59:42 +03:00
|
|
|
#define UNIMPLEMENTED() printf("UNIMPLEMENTED %s\n",__PRETTY_FUNCTION__)
|
|
|
|
#define FATAL printf
|
2002-07-09 16:24:59 +04:00
|
|
|
#else
|
|
|
|
#define UNIMPLEMENTED() ((void)0)
|
2002-12-03 03:59:42 +03:00
|
|
|
#define FATAL if (1) {} else printf
|
2002-07-09 16:24:59 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if DEBUG >= 2
|
2002-12-03 03:59:42 +03:00
|
|
|
#define BROKEN() printf("BROKEN %s\n",__PRETTY_FUNCTION__)
|
|
|
|
#define TRACE printf
|
2002-07-09 16:24:59 +04:00
|
|
|
#else
|
|
|
|
#define BROKEN() ((void)0)
|
2002-12-03 03:59:42 +03:00
|
|
|
#define TRACE if (1) {} else printf
|
2002-07-09 16:24:59 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if DEBUG >= 3
|
2002-12-03 03:59:42 +03:00
|
|
|
#define CALLED() printf("CALLED %s\n",__PRETTY_FUNCTION__)
|
|
|
|
#define INFO printf
|
2002-07-09 16:24:59 +04:00
|
|
|
#else
|
|
|
|
#define CALLED() ((void)0)
|
2002-12-03 03:59:42 +03:00
|
|
|
#define INFO if (1) {} else printf
|
2002-07-09 16:24:59 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define UNIMPLEMENTED() ((void)0)
|
|
|
|
#define BROKEN() ((void)0)
|
|
|
|
#define CALLED() ((void)0)
|
2002-12-03 03:59:42 +03:00
|
|
|
#define FATAL if (1) {} else printf
|
|
|
|
#define TRACE if (1) {} else printf
|
|
|
|
#define INFO if (1) {} else printf
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
#endif
|
2002-12-03 03:59:42 +03:00
|
|
|
|
|
|
|
#endif /* _MEDIA_DEBUG_H_ */
|