Merge branch '3665_netbsd_curses'

* 3665_netbsd_curses:
  Ticket #3665: fix compatibility with netbsd curses.
This commit is contained in:
Andrew Borodin 2016-07-29 09:22:48 +03:00
commit 3265531907
1 changed files with 5 additions and 3 deletions

View File

@ -179,6 +179,7 @@ mc_tty_normalize_lines_char (const char *ch)
void
tty_init (gboolean mouse_enable, gboolean is_xterm)
{
struct termios mode;
initscr ();
#ifdef HAVE_ESCDELAY
@ -194,11 +195,12 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
ESCDELAY = 200;
#endif /* HAVE_ESCDELAY */
tcgetattr (STDIN_FILENO, &mode);
/* use Ctrl-g to generate SIGINT */
cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
mode.c_cc[VINTR] = CTRL ('g'); /* ^g */
/* disable SIGQUIT to allow use Ctrl-\ key */
cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE;
tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
mode.c_cc[VQUIT] = NULL_VALUE;
tcsetattr (STDIN_FILENO, TCSANOW, &mode);
tty_start_interrupt_key ();