]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/picsmap.c
ncurses 6.2 - patch 20200301
[ncurses.git] / test / picsmap.c
index baa5de8465f04cab54befa838eabe4568ca303aa..432fbf7a5790d4894b98438fa372995d6073478a 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 2017-2018,2019 Free Software Foundation, Inc.              *
+ * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2017,2018 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            *
@@ -26,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: picsmap.c,v 1.130 2019/08/24 23:07:34 tom Exp $
+ * $Id: picsmap.c,v 1.132 2020/02/02 23:34:34 tom Exp $
  *
  * Author: Thomas E. Dickey
  *
@@ -103,7 +104,7 @@ typedef struct {
 #define P2I(n) (((int)(my_intptr_t)(n)) - 1)
 #define I2P(n) (void *)(my_intptr_t)((n) + 1)
 
-#define stop_curses() if (in_curses) endwin()
+#define pause_curses() if (in_curses) stop_curses()
 
 #define debugmsg if (debugging) logmsg
 #define debugmsg2 if (debugging) logmsg2
@@ -187,7 +188,7 @@ close_log(void)
 static void
 cleanup(int code)
 {
-    stop_curses();
+    pause_curses();
     close_log();
     ExitProgram(code);
     /* NOTREACHED */
@@ -423,7 +424,7 @@ read_file(const char *filename)
     struct stat sb;
 
     if (!quiet) {
-       stop_curses();
+       pause_curses();
        printf("** %s\n", filename);
     }
 
@@ -511,7 +512,7 @@ usage(void)
     };
     size_t n;
 
-    stop_curses();
+    pause_curses();
 
     fflush(stdout);
     for (n = 0; n < SIZEOF(msg); n++)
@@ -524,7 +525,7 @@ giveup(const char *fmt, ...)
 {
     va_list ap;
 
-    stop_curses();
+    pause_curses();
     fflush(stdout);
 
     va_start(ap, fmt);
@@ -1469,7 +1470,7 @@ init_display(const char *palette_path, int opt_d)
            init_palette(palette_path);
        }
        scrollok(stdscr, FALSE);
-       exit_curses();
+       stop_curses();
     }
 }