MakeNSIS console warn/err colors on Win32

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6167 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2011-11-09 10:30:11 +00:00
parent ee59b7f723
commit e918dd8a27
10 changed files with 112 additions and 46 deletions

View file

@ -23,6 +23,7 @@
#include <cstdio> // for f*
#include <algorithm> // for std::min
#include "tchar.h"
#include "util.h"
#include "Platform.h"
@ -64,8 +65,7 @@ void GrowBuf::resize(int newlen)
extern int g_display_errors;
if (g_display_errors)
{
_ftprintf(g_output,_T("\nack! realloc(%d) failed, trying malloc(%d)!\n"),m_alloc,newlen);
fflush(g_output);
PrintColorFmtMsg_ERR(_T("\nack! realloc(%d) failed, trying malloc(%d)!\n"),m_alloc,newlen);
}
m_alloc=newlen; // try to malloc the minimum needed
n=malloc(m_alloc);
@ -74,8 +74,7 @@ void GrowBuf::resize(int newlen)
extern void quit();
if (g_display_errors)
{
_ftprintf(g_output,_T("\nInternal compiler error #12345: GrowBuf realloc/malloc(%d) failed.\n"),m_alloc);
fflush(g_output);
PrintColorFmtMsg_ERR(_T("\nInternal compiler error #12345: GrowBuf realloc/malloc(%d) failed.\n"),m_alloc);
}
quit();
}