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:
mahlzeit
2002-12-31 14:25:02 +00:00
parent 11e8a16025
commit 1df1f3949f
6 changed files with 265 additions and 266 deletions
+17 -6
View File
@@ -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