#include // gcc -I/usr/include/ncursesw/ attr_test.c -lncursesw #undef NCURSES_OPAQUE //#define NCURSES_OPAQUE int main() { int ret; initscr(); start_color(); printw("getattrs(stdscr) %d\n", ret=getattrs(stdscr)); refresh(); napms(3000); endwin(); printf("getattrs(stdscr) %d\n", ret); initscr(); start_color(); printw("attrset(0) %d\n", ret=attrset(0)); refresh(); napms(3000); ret=getattrs(stdscr); endwin(); printf("getattrs(stdscr) %d\n", ret); initscr(); start_color(); printw("attrset(~0) %d\n", ret=attrset(~0)); refresh(); napms(5000); ret=getattrs(stdscr); endwin(); printf("getattrs(stdscr) %d\n", ret); initscr(); start_color(); printw("attrset(0x55555555) %d\n", ret=attrset(0x55555555)); refresh(); napms(3000); ret=getattrs((WINDOW *)NULL); //ret=getcury((WINDOW *)NULL); endwin(); printf("getattrs((WINDOW *)NULL) %d\n", ret); //printf("getcury((WINDOW *)NULL) %d\n", ret); }