]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots_curses.c
ncurses 6.0 - patch 20171014
[ncurses.git] / test / dots_curses.c
index b3713888a3cf97c5136ff9e56551402cb5a33c6f..477c4a14ef116b60854324901ce83b86c725d7be 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_curses.c,v 1.4 2017/04/15 14:13:30 tom Exp $
+ * $Id: dots_curses.c,v 1.7 2017/10/11 08:16:33 tom Exp $
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
@@ -41,8 +41,6 @@
 
 #include <time.h>
 
-#define valid(s) ((s != 0) && s != (char *)-1)
-
 static bool interrupted = FALSE;
 static long total_chars = 0;
 static time_t started;
@@ -52,7 +50,7 @@ cleanup(void)
 {
     endwin();
 
-    printf("\n\n%ld total chars, rate %.2f/sec\n",
+    printf("\n\n%ld total cells, rate %.2f/sec\n",
           total_chars,
           ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
 }
@@ -95,11 +93,9 @@ main(int argc GCC_UNUSED,
     double r;
     double c;
 
-    CATCHALL(onsig);
-
     srand((unsigned) time(0));
 
-    initscr();
+    InitAndCatch(initscr(), onsig);
     if (has_colors()) {
        start_color();
        for (fg = 0; fg < COLORS; fg++) {