mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 20:35:17 +03:00
Compilation fix for Visual Studio
This commit is contained in:
parent
5b4d9cd7d7
commit
c907c20705
1 changed files with 6 additions and 5 deletions
|
@ -42,19 +42,20 @@ traceCallbackFunc traceCallback = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SIMU)
|
#if defined(SIMU)
|
||||||
|
#define PRINTF_BUFFER_SIZE 1024
|
||||||
void debugPrintf(const char * format, ...)
|
void debugPrintf(const char * format, ...)
|
||||||
{
|
{
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
char * str;
|
char tmp[PRINTF_BUFFER_SIZE];
|
||||||
|
|
||||||
va_start(arglist, format);
|
va_start(arglist, format);
|
||||||
vasprintf(&str, format, arglist);
|
vsnprintf(tmp, PRINTF_BUFFER_SIZE, format, arglist);
|
||||||
va_end(arglist);
|
va_end(arglist);
|
||||||
fputs(str, stdout);
|
fputs(tmp, stdout);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
if (traceCallback) {
|
if (traceCallback) {
|
||||||
traceCallback(str);
|
traceCallback(tmp);
|
||||||
}
|
}
|
||||||
free(str);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue