X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftclock.c;h=d42a52b91b928b9de67413362a222125f779eca5;hp=c3cce6d34f927d3331cef1c1850b9048b11e775e;hb=43f75d22e281b6230678008b72621a76696f45ba;hpb=a8987e73ec254703634802b4f7ee30d3a485524d diff --git a/test/tclock.c b/test/tclock.c index c3cce6d3..d42a52b9 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -1,4 +1,4 @@ -/* $Id: tclock.c,v 1.24 2002/12/29 01:40:30 tom Exp $ */ +/* $Id: tclock.c,v 1.27 2010/05/01 18:47:19 tom Exp $ */ #include @@ -53,7 +53,7 @@ static void plot(int x, int y, char col) { - mvaddch(y, x, (chtype) col); + MvAddCh(y, x, (chtype) col); } /* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */ @@ -67,7 +67,7 @@ dline(int pair, int from_x, int from_y, int x2, int y2, char ch) int d; if (has_colors()) - attrset(COLOR_PAIR(pair)); + (void) attrset(COLOR_PAIR(pair)); dx = x2 - from_x; dy = y2 - from_y; @@ -175,10 +175,10 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) sdy = A2Y(sangle, sradius); sprintf(szChar, "%d", i + 1); - mvaddstr(cy - sdy, cx + sdx, szChar); + MvAddStr(cy - sdy, cx + sdx, szChar); } - mvaddstr(0, 0, "ASCII Clock by Howard Jones (ha.jones@ic.ac.uk),1994"); + MvAddStr(0, 0, "ASCII Clock by Howard Jones (ha.jones@ic.ac.uk),1994"); sradius = (4 * sradius) / 5; for (;;) { @@ -209,27 +209,27 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) dline(3, cx, cy, cx + mdx, cy - mdy, '#'); - attrset(A_REVERSE); + (void) attrset(A_REVERSE); dline(2, cx, cy, cx + hdx, cy - hdy, '.'); attroff(A_REVERSE); if (has_colors()) - attrset(COLOR_PAIR(1)); + (void) attrset(COLOR_PAIR(1)); dline(1, cx, cy, cx + sdx, cy - sdy, 'O'); if (has_colors()) - attrset(COLOR_PAIR(0)); + (void) attrset(COLOR_PAIR(0)); text = ctime(&tim); - mvprintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); + MvPrintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); refresh(); if ((t->tm_sec % 5) == 0 && t->tm_sec != lastbeep) { lastbeep = t->tm_sec; if (has_colors()) { odd = !odd; - bkgd(odd ? COLOR_PAIR(4) : COLOR_PAIR(0)); + bkgd((chtype) (odd ? COLOR_PAIR(4) : COLOR_PAIR(0))); } beep(); }