40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
$NetBSD: patch-ca,v 1.1 2007/10/10 10:20:32 rillig Exp $
|
|
|
|
--- plugins/console/src/window.cpp.orig Mon Dec 10 15:05:49 2001
|
|
+++ plugins/console/src/window.cpp
|
|
@@ -147,7 +147,10 @@ void CWindow::wprintf(char *formatIn, ..
|
|
va_list argp;
|
|
char formatOut[1024], out[1024];
|
|
unsigned short i = 0, j = 0;
|
|
- attr_t save = win->_attrs;
|
|
+ attr_t save;
|
|
+ short dummy;
|
|
+
|
|
+ wattr_get(win, &save, &dummy, NULL);
|
|
|
|
va_start(argp, formatIn);
|
|
|
|
@@ -163,12 +166,7 @@ void CWindow::wprintf(char *formatIn, ..
|
|
{
|
|
case 'C': // set color
|
|
i++;
|
|
-//#if NCURSES_VERSION_PATCH < 990213
|
|
- win->_attrs &= ~A_COLOR;
|
|
- win->_attrs |= COLOR_PAIR(va_arg(argp, int));
|
|
-//#else
|
|
-// wcolor_set(win, va_arg(argp, short), NULL);
|
|
-//#endif
|
|
+ wattr_set(win, save & ~A_COLOR, va_arg(argp, int), NULL);
|
|
while((formatIn[i]) && (formatIn[i] != '%') && j < 1022) formatOut[j++] = formatIn[i++];
|
|
formatOut[j] = '\0';
|
|
*this << formatOut;
|
|
@@ -213,7 +211,7 @@ void CWindow::wprintf(char *formatIn, ..
|
|
}
|
|
va_end(argp);
|
|
|
|
- win->_attrs = save;
|
|
+ wattr_set(win, save, dummy, NULL);
|
|
}
|
|
|
|
|