From: Andre Noll Date: Sun, 30 Jan 2011 12:25:13 +0000 (+0100) Subject: gui: Open-code check_geometry(). X-Git-Tag: v0.4.6~39^2~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=f8bd1b3836fe465329918ede20638ee03f9788c9;p=paraslash.git gui: Open-code check_geometry(). It is simple enough and has only one caller. --- diff --git a/gui.c b/gui.c index 1498426a..c21ee028 100644 --- 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 */ @@ -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"); - 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 */