diff options
| author | Petr Mrázek | 2011-07-14 11:15:23 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-07-14 11:15:23 +0200 |
| commit | d21b196766dd263b7776a26628bad82d94447da0 (patch) | |
| tree | 4a19bbfb6e83c4bb9a5f53528ee55614ebf30b70 /library/Console-linux.cpp | |
| parent | f2b46274ec15b81fc49c393302bad26bf80d63b1 (diff) | |
| download | dfhack-d21b196766dd263b7776a26628bad82d94447da0.tar.gz dfhack-d21b196766dd263b7776a26628bad82d94447da0.tar.bz2 dfhack-d21b196766dd263b7776a26628bad82d94447da0.tar.xz | |
Error printing call for Console, the NYAN CAT!
Diffstat (limited to 'library/Console-linux.cpp')
| -rw-r--r-- | library/Console-linux.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp index 3e37b6cd..c17860ef 100644 --- a/library/Console-linux.cpp +++ b/library/Console-linux.cpp @@ -153,6 +153,18 @@ int Console::print( const char* format, ... ) return ret; } + +int Console::printerr( const char* format, ... ) +{ + color(12); + va_list args; + va_start( args, format ); + int ret = vfprintf( d->dfout_C, format, args ); + va_end( args ); + reset_color(); + return ret; +} + int Console::get_columns(void) { winsize ws; @@ -236,6 +248,7 @@ void Console::color(int index) void Console::reset_color( void ) { print(RESETCOLOR); + fflush(d->dfout_C); } void Console::cursor(bool enable) |
