]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/newdemo.c
ncurses 6.0 - patch 20170909
[ncurses.git] / test / newdemo.c
index e056ecb7fd1f7143bd6dffd813cacf82149ba934..462e340bc8a42493e813ddc550e620f2fcfbe503 100644 (file)
@@ -2,7 +2,7 @@
  *  newdemo.c  -       A demo program using PDCurses. The program illustrate
  *                     the use of colours for text output.
  *
- * $Id: newdemo.c,v 1.43 2016/09/10 21:25:53 tom Exp $
+ * $Id: newdemo.c,v 1.44 2017/09/04 11:49:55 tom Exp $
  */
 
 #include <test.priv.h>
@@ -50,7 +50,7 @@ static const char *messages[] =
 static void
 trap(int sig GCC_UNUSED)
 {
-    endwin();
+    exit_curses();
     ExitProgram(EXIT_FAILURE);
 }
 
@@ -241,7 +241,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     height = 14;               /* Create a drawing window */
     win = newwin(height, width, (LINES - height) / 2, (COLS - width) / 2);
     if (win == NULL) {
-       endwin();
+       exit_curses();
        ExitProgram(EXIT_FAILURE);
     }
 
@@ -360,6 +360,6 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
        if (WaitForUser(win) == 1)
            break;
     }
-    endwin();
+    exit_curses();
     ExitProgram(EXIT_SUCCESS);
 }