Ncurses, boxes, menu and border forms white borders

Ncurses, boxes, menu and border forms white borders

Post by Chris Bur » Thu, 20 Feb 2003 20:36:08



Hi,

This is probably a totally stupid question, but I'm tearing my hair
out.

I recently installed SuSE 8.1 on my home computer, having used SuSE
6.1 and 7.2 at home and work, and I'm writing / maintaining a program
written with curses.

My problem is this - the 8.1 box compiles and runs the programs fine,
just as the 6.1 and 7.2 boxes did, but all the menus, forms and boxes
have white borders, no matter what attributes I apply to the windows.

SuSE 6.1 used ncurses libncurses.so.1.9.7a and other forms/menus libs
etc

SuSE 8.1 uses ncurses 5.2-401

Heres some (messy) code as you can see I've tried a few things

main()
{

initscr();

   if(has_colors)
        {start_color();
        init_pair(1,COLOR_BLACK,COLOR_BLACK);
        init_pair(2,COLOR_GREEN,COLOR_BLACK);
        init_pair(3,COLOR_WHITE,COLOR_BLUE);
        init_pair(4,COLOR_WHITE,COLOR_YELLOW);

        }

        winmain=newwin(0,0,0,0);
        /*wattrset(winmain,COLOR_PAIR(4));*/
        /*wrefresh(winmain);*/
        /*werase(winmain);*/
        wbkgd(winmain,COLOR_PAIR(4));
        wrefresh(winmain);
        /*wgetch(winmain);*/

        win1=newwin(10,10,10,10);
        /*wattrset(win1,COLOR_PAIR(2));*/
        /*werase(win1);*/
        /*wbkgdset(win1,'&');*/
        wbkgd(win1,COLOR_PAIR(2)|A_REVERSE);
        //wattrset(win1,COLOR_PAIR(2));
        watrrset(win1,COLOR_PAIR(2)|A_REVERSE);
        //overflow in implicit constant conversion
        // wcolor_set .. must supply a null pointer ?????
        box(win1,0,0);
        wrefresh(win1);
        /*doupdate();*/
        /*refresh();*/
        /*wgetch(win1);*/

        win2=newwin(5,70,0,0);
        wattrset(win2,COLOR_PAIR(3));
        box(win2,0,0);
        wrefresh(win2);
        /*wgetch(win2);*/
        wrefresh(win1);
        wgetch(win1);

        mvwaddstr(win2,2,2,"Hello - this should appear");
        wrefresh(win2);
        wgetch(win1);

        werase(win1);
        wrefresh(win1);
        werase(win2);
        wbkgd(win2,COLOR_PAIR(3));
        wrefresh(win2);
        doupdate();
        /*wgetch(win1);*/

        mvwin(win1,11,20);
        wnoutrefresh(winmain);
        wnoutrefresh(win1);
        doupdate();
/*      wrefresh(win1);
        wrefresh(winmain);
        wrefresh(win1);
*/                              /* Note - these above two things do the
                                   same thing */                                

        newmenu();

        endwin();

Quote:}

Any ideas would be VERY greatly appreciated.

Chris

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Thomas Dicke » Fri, 21 Feb 2003 02:04:55



> Hi,
> This is probably a totally stupid question, but I'm tearing my hair
> out.
> I recently installed SuSE 8.1 on my home computer, having used SuSE
> 6.1 and 7.2 at home and work, and I'm writing / maintaining a program
> written with curses.
> My problem is this - the 8.1 box compiles and runs the programs fine,
> just as the 6.1 and 7.2 boxes did, but all the menus, forms and boxes
> have white borders, no matter what attributes I apply to the windows.
> SuSE 6.1 used ncurses libncurses.so.1.9.7a and other forms/menus libs
> etc
> SuSE 8.1 uses ncurses 5.2-401

that sounds like a bug that I introduced about a year ago, and fixed last
fall - before 5.3.  The patch-date in curses.h would answer that question.

--

http://dickey.his.com
ftp://dickey.his.com

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Chris Bur » Fri, 21 Feb 2003 22:09:04


Heres the info on curses.h

curses.h        69092   Sep 9 16:04

/* $Id: curses.h.in,v 1.130 2002/07/06 20:00:22 tom Exp $ */

#define NCURSES_VERSION_PATCH 20020713

/* $Id: curses.wide,v 1.23 2002/05/11 22:25:33 tom Exp $ */

Just downloaded ncurses 5.3, so will compile / test / install it and
see what happens

Thanks

Chris



> > Hi,

> > This is probably a totally stupid question, but I'm tearing my hair
> > out.

> > I recently installed SuSE 8.1 on my home computer, having used SuSE
> > 6.1 and 7.2 at home and work, and I'm writing / maintaining a program
> > written with curses.

> > My problem is this - the 8.1 box compiles and runs the programs fine,
> > just as the 6.1 and 7.2 boxes did, but all the menus, forms and boxes
> > have white borders, no matter what attributes I apply to the windows.

> > SuSE 6.1 used ncurses libncurses.so.1.9.7a and other forms/menus libs
> > etc

> > SuSE 8.1 uses ncurses 5.2-401

> that sounds like a bug that I introduced about a year ago, and fixed last
> fall - before 5.3.  The patch-date in curses.h would answer that question.

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Thomas Dicke » Sat, 22 Feb 2003 01:46:51



> Heres the info on curses.h
> curses.h        69092   Sep 9 16:04
> /* $Id: curses.h.in,v 1.130 2002/07/06 20:00:22 tom Exp $ */
> #define NCURSES_VERSION_PATCH 20020713
> /* $Id: curses.wide,v 1.23 2002/05/11 22:25:33 tom Exp $ */
> Just downloaded ncurses 5.3, so will compile / test / install it and
> see what happens
> Thanks

no problem (report bugs).

--

http://dickey.his.com
ftp://dickey.his.com

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Chris Bur » Sat, 22 Feb 2003 07:26:00


Hi,

Well that really trounced things up - now my xterm won't produce any
coulours at all.

Could have overwritten the terminfo file - back to reading man pages,
and uninstalling ncurses 5.3 and 5.2, and then re-installing.

This is getting worse than Windows! :-/

Chris

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Chris Bur » Sat, 22 Feb 2003 10:05:45


Hi

Darn it,

Tried deleting stuff, trashed system (couldn't even log in) - fixed
it.

Re installed ncurses 5.3 (over 5.2) (without backing up terminfo -
should have taken note of caveat emptor!!!) - re ran test program - no
colours on xterm at all!

re installed terminfo from cd - colours back again, but still white
borders on boxes.

configure --with-shared - had errors numbers noted at end (I think -
I'm writing this on xp boot) 127

make - errors at end with g++ (which I don't use - maybe prob here)

install - went fine (I think - sorry I'm doing very cursory checking
atm)

checking /usr/lib - everything seems in place, all links pointing to
ncurses5.3 - ho hum - back to drawing board.

Haven't checked curses.h size / date yet - but shouldn't that have
been overwritten?

Any other ideas (apart from switching to Red Hat, or xp that is)?

Regards

Chris

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Chris Bur » Sat, 22 Feb 2003 10:07:06


Re cursory checking - no pun intended!

Chris

 
 
 

Ncurses, boxes, menu and border forms white borders

Post by Thomas Dicke » Sat, 22 Feb 2003 11:17:08



> Hi
> Darn it,
> Tried deleting stuff, trashed system (couldn't even log in) - fixed
> it.
> Re installed ncurses 5.3 (over 5.2) (without backing up terminfo -
> should have taken note of caveat emptor!!!) - re ran test program - no
> colours on xterm at all!

http://invisible-island.net/ncurses/ncurses.faq.html#no_xterm_color

--

http://dickey.his.com
ftp://dickey.his.com