1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
$NetBSD: patch-aa,v 1.1 2003/07/12 12:05:01 wiz Exp $
--- src/window.cpp.orig Mon Dec 10 15:05:49 2001
+++ 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, short), 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);
}
|