X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Ftclock.c;h=23ceb6bf102fd809c9308dc53d833b2de80b7aca;hb=1c305869cc1b9454efa9325fb5a44b18c79ce91b;hp=2b2046c8e98e89f1bf4dd599534b4694e22d748d;hpb=02f1dee48fe8af6ce054388fba739aa4f975004e;p=ncurses.git diff --git a/test/tclock.c b/test/tclock.c index 2b2046c8..23ceb6bf 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -1,9 +1,9 @@ -/* $Id: tclock.c,v 1.40 2019/12/14 23:25:29 tom Exp $ */ +/* $Id: tclock.c,v 1.43 2022/07/27 19:23:01 tom Exp $ */ #define NEED_TIME_H #include -#if HAVE_MATH_H +#if HAVE_MATH_H && HAVE_MATH_FUNCS #include @@ -48,7 +48,7 @@ plot(int x, int y, int col) MvAddCh(y, x, (chtype) col); } -/* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */ +/* Draw a diagonal(arbitrary) line using Bresenham's algorithm. */ static void dline(int pair, int from_x, int from_y, int x2, int y2, int ch) { @@ -140,7 +140,7 @@ main(int argc, char *argv[]) bool odd = FALSE; time_t tim; struct tm *t; - char szChar[10]; + char szChar[20]; char *text; short my_bg = COLOR_BLACK; #if HAVE_GETTIMEOFDAY @@ -289,7 +289,7 @@ main(int argc, char *argv[]) int main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) { - printf("This program requires the development header math.h\n"); + printf("This program requires the header math.h and trignometric functions\n"); ExitProgram(EXIT_FAILURE); } #endif