]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - gui.c
gui: Open-code check_geometry().
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index 42e7dd072ddbbad1ffdd04e8aeedab3884c51e53..c21ee0289f6b9abdc0694bd3ba0eed7f7eb600c9 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -655,14 +655,6 @@ static void init_wins(int top_lines)
        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
  */
@@ -788,24 +780,20 @@ static void init_colors(void)
        init_pair(COLOR_BOT, theme.default_fg, theme.default_bg);
 }
 
-/*
- * (re-)initialize the curses library  FIXME: Error checking
- */
+/* (Re-)initialize the curses library. FIXME: Error checking. */
 static void init_curses(void)
 {
        curses_active = 1;
-       if (top.win && refresh() == ERR) /* refesh is really needed */
+       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 */
-//     if (noraw() == ERR);
-//             msg_n_exit(EXIT_FAILURE, "can not place terminal out of "
-//                     "raw mode\n");
        nonl(); /* tell curses not to do NL->CR/NL on output */
        noecho(); /* don't echo input */
        cbreak(); /* take input chars one at a time, no wait for \n */
-       //reset_prog_mode();
        init_colors();
        clear();
        init_wins(theme.top_lines_default);
@@ -813,7 +801,6 @@ static void init_curses(void)
        noecho(); /* don't echo input */
 }
 
-
 static void check_sigchld(void)
 {
        int ret;