X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdots_curses.c;h=c344280a9c51fa8cccdf1a8db491975bba8307ae;hp=ef300ee4d3abd333cc46eb4b054eaa33c26ca8a9;hb=76a479337308b4b5e749fa8c38b7b7f482998c5b;hpb=987faea6703ceb2c59ac9787f99eda67e3fe7676 diff --git a/test/dots_curses.c b/test/dots_curses.c index ef300ee4..c344280a 100644 --- a/test/dots_curses.c +++ b/test/dots_curses.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: dots_curses.c,v 1.1 2014/06/21 16:07:50 tom Exp $ + * $Id: dots_curses.c,v 1.3 2014/08/09 22:28:42 tom Exp $ * * A simple demo of the curses interface used for comparison with termcap. */ @@ -82,7 +82,7 @@ set_colors(int fg, int bg) { int pair = mypair(fg, bg); if (pair > 0) { - attron((attr_t) COLOR_PAIR(mypair(fg, bg))); + attron(COLOR_PAIR(mypair(fg, bg))); } } @@ -106,7 +106,7 @@ main(int argc GCC_UNUSED, for (bg = 0; bg < COLORS; bg++) { int pair = mypair(fg, bg); if (pair > 0) - init_pair(pair, fg, bg); + init_pair((short) pair, (short) fg, (short) bg); } } } @@ -127,7 +127,7 @@ main(int argc GCC_UNUSED, z = (int) (ranf() * COLORS); if (ranf() > 0.01) { set_colors(fg = z, bg); - attron((attr_t) COLOR_PAIR(mypair(fg, bg))); + attron(COLOR_PAIR(mypair(fg, bg))); } else { set_colors(fg, bg = z); napms(1); @@ -142,7 +142,7 @@ main(int argc GCC_UNUSED, napms(1); } } - addch(p); + addch((chtype) p); refresh(); ++total_chars; }