38 lines
831 B
C
38 lines
831 B
C
// --------------------------------------------------------------
|
|
// --------------------------------------------------------------
|
|
|
|
#ifdef WIN32
|
|
#include <windows.h>
|
|
#endif
|
|
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
|
|
// --------------------------------------------------------------
|
|
// internal funcs
|
|
|
|
// --------------------------------------------------------------
|
|
// Exported functions
|
|
// --------------------------------------------------------------
|
|
|
|
void SynthDebug(const char *fmtstr, ...)
|
|
{
|
|
#ifndef SYNTH_DEBUG
|
|
(void)fmtstr;
|
|
|
|
/* Empty body, so a good compiler will optimise calls
|
|
to pmesg away */
|
|
#else
|
|
|
|
char buf[1024];
|
|
va_list args;
|
|
|
|
va_start(args, fmtstr);
|
|
vsprintf(buf, fmtstr, args);
|
|
va_end(args);
|
|
OutputDebugString(buf);
|
|
|
|
#endif /* SYNTH_DEBUG */
|
|
}
|