From 09897bed7f6905427dd35196b3c17aa7d3d066ab Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 20 Aug 2014 21:19:20 +0200 Subject: terminal-unix: eliminate unnecessary variable --- osdep/terminal-unix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'osdep') diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index 21ed42cb68..499ad73394 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -47,8 +47,6 @@ #include "input/keycodes.h" #include "terminal.h" -static int use_terminal; - #if HAVE_TERMIOS static volatile struct termios tio_orig; static volatile int tio_orig_set; @@ -474,7 +472,7 @@ static volatile int getch2_enabled = 0; static void do_activate_getch2(void) { - if (getch2_active || !use_terminal) + if (getch2_active || !isatty(1)) return; #if HAVE_TERMINFO || HAVE_TERMCAP @@ -627,8 +625,7 @@ void terminal_set_foreground_color(FILE *stream, int c) int terminal_init(void) { - use_terminal = isatty(1); - if (use_terminal) + if (isatty(1)) load_termcap(NULL); return 0; } -- cgit v1.2.3