76bb80302f
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2861 a95241bf-73f2-0310-859d-f6bbb57e9c96
38 lines
673 B
C
38 lines
673 B
C
/*
|
|
* Debug macros for the Midi Kit
|
|
*
|
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
|
*/
|
|
|
|
#ifndef MIDI_DEBUG_H
|
|
#define MIDI_DEBUG_H
|
|
|
|
#include <OS.h>
|
|
#include <stdio.h>
|
|
|
|
#define WARN(args) { fprintf(stderr, "[midi] WARNING: %s\n", args); }
|
|
#define UNIMPLEMENTED { fprintf(stderr, "[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 ASSERT(expr)
|
|
|
|
#endif
|
|
|
|
#endif // MIDI_DEBUG_H
|