bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

box() doesn't use color


From: William McBrine
Subject: box() doesn't use color
Date: Sat, 9 Aug 2003 22:17:44 -0400 (EDT)

Here's something weird. The following bit of code has up until now
produced the expected results on all platforms (including an Alpha -- so I
don't think it's really a 64-bit issue), and all versions of curses that
I've tried (ncurses 1.x-5.3, PDCurses, etc.). The other day, I tried it on
the new AMD64 system in the SourceForge compile farm -- running SuSE, with
ncurses 5.2 -- and saw that the box() function was not applying the
specified attribute colors to what it drew.

Expected results (from the compile farm's Alpha):

 http://home.covad.net/~wmcbrine/mm-normal.png

And from the AMD64:

 http://home.covad.net/~wmcbrine/mm-weird.png

Same version of the program. Here's the function that calls box():

void Win::boxtitle(coltype backg, const char *title, chtype titleAttrib)
{
        attrib(backg);
        box(win, 0, 0);

        if (title) {
                put(0, 2, ACS_RTEE);
                put(0, 3 + strlen(title), ACS_LTEE);
                attrib(titleAttrib);
                put(0, 3, title);
                attrib(backg);
        }
}

As you can see, the attribute is not changed between the drawing of the
box and the drawing of the "brackets" around the title; yet the latter are
colored correctly.

-- 
William McBrine <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]