X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fsavescreen.c;h=4be1bef5eaab462f941b3ec9e3e3e7ffbcd2ecec;hp=e48800dbabd13b93471a0bbcc5d16f51f5d729a5;hb=b0bdfbb1c78346047c54d8e516a104fcff586e52;hpb=5d8dbcdd9423bf9821db414fd9ec792ccf1f1027 diff --git a/test/savescreen.c b/test/savescreen.c index e48800db..4be1bef5 100644 --- a/test/savescreen.c +++ b/test/savescreen.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: savescreen.c,v 1.34 2017/09/04 15:01:45 tom Exp $ + * $Id: savescreen.c,v 1.36 2017/10/20 21:20:34 tom Exp $ * * Demonstrate save/restore functions from the curses library. * Thomas Dickey - 2007/7/14 @@ -65,7 +65,7 @@ static bool keep_dumps = FALSE; static wchar_t BaseChar(cchar_t data) { - wchar_t my_wchar[sizeof(cchar_t)]; + wchar_t my_wchar[CCHARW_MAX]; attr_t my_attr; short my_pair; getcchar(&data, my_wchar, &my_attr, &my_pair, NULL); @@ -475,7 +475,7 @@ main(int argc, char *argv[]) continue; } if (!done) { - attr_t attr = (A_REVERSE | (attr_t) COLOR_PAIR(color * COLORS)); + chtype attr = (A_REVERSE | (chtype) COLOR_PAIR(color * COLORS)); chtype ch2 = (altchars ? MyMarker : '#'); move(y, x); AddCh(ch2 | attr);