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();
Any ideas would be VERY greatly appreciated.Quote:}
Chris