Checkin of the source code for midi2 kit milestone 1.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2335 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,25 +4,36 @@
|
||||
* Debug macros for the Midi Kit
|
||||
*
|
||||
* @author Matthijs Hollemans
|
||||
* @author Marcus Overhagen
|
||||
*/
|
||||
|
||||
#ifndef MIDI_DEBUG_H
|
||||
#define MIDI_DEBUG_H
|
||||
|
||||
#include <OS.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define WARN(args) { fprintf(stderr, "[midi] WARNING: %s\n", args); }
|
||||
#define UNIMPLEMENTED { fprintf(stderr, "[midi] UNIMPLEMENTED %s\n",__PRETTY_FUNCTION__); }
|
||||
|
||||
#define TRACE(args) { printf args; }
|
||||
#define UNIMPLEMENTED TRACE(("[midi] UNIMPLEMENTED %s\n",__PRETTY_FUNCTION__))
|
||||
#ifdef DEBUG
|
||||
|
||||
#define TRACE(args) { printf("[midi] "); printf args; printf("\n"); }
|
||||
|
||||
#define ASSERT(expr) \
|
||||
if (!(expr))\
|
||||
{\
|
||||
char buf[1024];\
|
||||
sprintf(\
|
||||
buf, "%s(%d) : Assertion \"%s\" failed!",\
|
||||
__FILE__, __LINE__, #expr);\
|
||||
debugger(buf);\
|
||||
}\
|
||||
|
||||
#else
|
||||
|
||||
#define TRACE(args)
|
||||
#define UNIMPLEMENTED
|
||||
#define ASSERT(expr)
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MIDI_DEBUG_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user