]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots_curses.c
ncurses 6.0 - patch 20171007
[ncurses.git] / test / dots_curses.c
index c344280a9c51fa8cccdf1a8db491975bba8307ae..d27f2e2303d77492f8607bb101fd413fd3f4b574 100644 (file)
@@ -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.3 2014/08/09 22:28:42 tom Exp $
+ * $Id: dots_curses.c,v 1.5 2017/09/30 15:41:17 tom Exp $
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
@@ -95,11 +95,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++) {
@@ -142,7 +140,7 @@ main(int argc GCC_UNUSED,
                napms(1);
            }
        }
-       addch((chtype) p);
+       AddCh(p);
        refresh();
        ++total_chars;
     }