Fri, 24 Jul 2015 04:24:38 +0300
Apply Leonard's patch for fixing the colors:
The colors were broken again.
* isprint for some reason returned true when the given byte is higher than 255.
The char cast of the byte was then printed which resulted in odd characters
popping up. Black appeared as ^@ which is NULL in caret notation.
* After that, the colors were all messed up because the RLINE enum didn't take
in account the color swapping.
So instead of messing up the enum order/number I went for a new "range-like"
method.
* After fixing all of that, I noticed the Interface::render_colorline had a
broken loop since the VS2010 commits.
This made the lines not print entierely and messed up the colors etc.
/* Public Domain Curses */ #include "pdcwin.h" RCSID("$Id: pdcgetsc.c,v 1.36 2008/07/14 04:24:52 wmcbrine Exp $") /* get the cursor size/shape */ int PDC_get_cursor_mode(void) { CONSOLE_CURSOR_INFO ci; PDC_LOG(("PDC_get_cursor_mode() - called\n")); GetConsoleCursorInfo(pdc_con_out, &ci); return ci.dwSize; } /* return number of screen rows */ int PDC_get_rows(void) { CONSOLE_SCREEN_BUFFER_INFO scr; PDC_LOG(("PDC_get_rows() - called\n")); GetConsoleScreenBufferInfo(pdc_con_out, &scr); return scr.srWindow.Bottom - scr.srWindow.Top + 1; } /* return number of buffer rows */ int PDC_get_buffer_rows(void) { CONSOLE_SCREEN_BUFFER_INFO scr; PDC_LOG(("PDC_get_buffer_rows() - called\n")); GetConsoleScreenBufferInfo(pdc_con_out, &scr); return scr.dwSize.Y; } /* return width of screen/viewport */ int PDC_get_columns(void) { CONSOLE_SCREEN_BUFFER_INFO scr; PDC_LOG(("PDC_get_columns() - called\n")); GetConsoleScreenBufferInfo(pdc_con_out, &scr); return scr.srWindow.Right - scr.srWindow.Left + 1; }