X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdots_curses.c;h=b3713888a3cf97c5136ff9e56551402cb5a33c6f;hp=dc767116d33055666d859559f55c406ee815c09d;hb=71244b7927a8918c0b09a8eb13b017ef0ebb6de8;hpb=1bab6fd2bd6c65560d26b46b0a245bd7d46f2add diff --git a/test/dots_curses.c b/test/dots_curses.c index dc767116..b3713888 100644 --- a/test/dots_curses.c +++ b/test/dots_curses.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2014 Free Software Foundation, Inc. * + * Copyright (c) 2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: dots_curses.c,v 1.2 2014/06/28 20:33:24 tom Exp $ + * $Id: dots_curses.c,v 1.4 2017/04/15 14:13:30 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))); } } @@ -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((chtype) p); + AddCh(p); refresh(); ++total_chars; }