wbkgd(a,COLOR_PAIR(1)); mvwaddstr(a,0,0,"This is window A\n"); wrefresh(a);
wbkgd(b,COLOR_PAIR(2)); mvwaddstr(b,0,0,"This is window B\n"); wrefresh(b); wbkgd(c,COLOR_PAIR(3)); mvwaddstr(c,0,0,"This is window C\n"); wrefresh(c); wbkgd(d,COLOR_PAIR(4));
mvwaddstr(d,0,0,"This is window D\n"); wrefresh(d);
/* IF I REMOVE THIS COMMENT THE GNOME TERMINAL PRINTS THE SCREEN WITH COLORS AND DIVISIONS do { ch = wgetch(a);
waddch(b,ch); waddch(c,ch); waddch(d,ch); wrefresh(b); wrefresh(c); wrefresh(d); } while(ch != '~'); */
endwin(); return 0;
} void bomb(void) { addstr("Unable to allocate memory for new window.\n"); refresh(); endwin(); exit(1); }
I'm using Debian with ncurses Versión: 5.7+20100313-2.
Why this behavior?