]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gui: Open-code check_geometry().
authorAndre Noll <maan@systemlinux.org>
Sun, 30 Jan 2011 12:25:13 +0000 (13:25 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 11 Feb 2011 10:25:09 +0000 (11:25 +0100)
It is simple enough and has only one caller.

gui.c

diff --git a/gui.c b/gui.c
index 1498426a8922e11726280f9c7cbecb6f49058174..c21ee0289f6b9abdc0694bd3ba0eed7f7eb600c9 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -655,14 +655,6 @@ static void init_wins(int top_lines)
        doupdate();
 }
 
        doupdate();
 }
 
-static void check_geometry(void)
-{
-       if (LINES < theme.lines_min || COLS < theme.cols_min)
-               msg_n_exit(EXIT_FAILURE, "Error: Terminal (%dx%d) too small"
-                       " (need at least %dx%d)\n", COLS, LINES,
-                       theme.cols_min, theme.lines_min);
-}
-
 /*
  * Print stat item #i to curses window
  */
 /*
  * Print stat item #i to curses window
  */
@@ -794,7 +786,10 @@ static void init_curses(void)
        curses_active = 1;
        if (top.win && refresh() == ERR) /* refesh is really needed */
                msg_n_exit(EXIT_FAILURE, "refresh() failed\n");
        curses_active = 1;
        if (top.win && refresh() == ERR) /* refesh is really needed */
                msg_n_exit(EXIT_FAILURE, "refresh() failed\n");
-       check_geometry();
+       if (LINES < theme.lines_min || COLS < theme.cols_min)
+               msg_n_exit(EXIT_FAILURE, "Error: Terminal (%dx%d) too small"
+                       " (need at least %dx%d)\n", COLS, LINES,
+                       theme.cols_min, theme.lines_min);
        curs_set(0); /* make cursor invisible, ignore errors */
        nonl(); /* tell curses not to do NL->CR/NL on output */
        noecho(); /* don't echo input */
        curs_set(0); /* make cursor invisible, ignore errors */
        nonl(); /* tell curses not to do NL->CR/NL on output */
        noecho(); /* don't echo input */