Files
lmms/plugins/midi_import/portsmf/trace.cpp
Paul Giblock 18873f7305 Add Portsmf MIDI importing to trunk
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1622 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-17 08:11:38 +00:00

26 lines
615 B
C++

// trace.cpp -- debugging print function
//
// (I think this was created to provide a generic print function
// for use in non-command-line Windows applications where printf
// does not work. Currently, it is not used, but kept around for
// possible debugging needs. -RBD)
#include "stdarg.h"
#include "stdio.h"
#include "crtdbg.h"
void trace(char *format, ...)
{
char msg[256];
va_list args;
va_start(args, format);
_vsnprintf(msg, 256, format, args);
va_end(args);
#ifdef _DEBUG
_CrtDbgReport(_CRT_WARN, NULL, NULL, NULL, msg);
#else
printf(msg);
#endif
}