usbloadergx/source/utils/ShowError.cpp
dimok321 973d8b2005 *Fixed compile error
*Converted every 4 spaces to a tab to make the source consistent on those
2011-07-25 22:28:22 +00:00

22 lines
365 B
C++

#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include "language/gettext.h"
#include "prompts/PromptWindows.h"
extern "C" void ShowError(const char * format, ...)
{
char *tmp=0;
va_list va;
va_start(va, format);
if((vasprintf(&tmp, format, va)>=0) && tmp)
{
WindowPrompt(tr("Error:"), tmp, tr("OK"));
}
va_end(va);
if(tmp)
free(tmp);
}