haiku/headers/private/midi/debug.h
mahlzeit 76bb80302f changed comment style
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-02 11:38:34 +00:00

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