]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gui: Make curses_active a bool.
authorAndre Noll <maan@systemlinux.org>
Fri, 3 Jan 2014 22:24:25 +0000 (22:24 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 4 May 2014 12:04:04 +0000 (14:04 +0200)
This variable is only used as a boolean.

gui.c

diff --git a/gui.c b/gui.c
index e41977efa9b90a3afc95b72434de935125c95685..34b594f98343aefa8a10f4545da56a872ab52120 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -53,7 +53,7 @@ static struct ringbuffer *bot_win_rb;
 
 static unsigned scroll_position;
 
-static int curses_active;
+static bool curses_active;
 static pid_t cmd_pid;
 
 static int command_fds[2] = {-1, -1};
@@ -564,7 +564,7 @@ static void shutdown_curses(void)
        if (!curses_active)
                return;
        def_prog_mode();
-       curses_active = 0;
+       curses_active = false;
        endwin();
 }
 
@@ -823,7 +823,7 @@ static void init_colors_or_die(void)
 /* (Re-)initialize the curses library. */
 static void init_curses(void)
 {
-       curses_active = 1;
+       curses_active = true;
        if (top.win && refresh() == ERR) /* refresh is really needed */
                msg_n_exit(EXIT_FAILURE, "refresh() failed\n");
        if (LINES < theme.lines_min || COLS < theme.cols_min)