Ticket #54662: patch_ncurses6x.diff
File patch_ncurses6x.diff, 1.3 KB (added by philippetev (Philip Petev), 7 years ago) |
---|
-
lib/tty/tty-ncurses.c
old new 179 179 void 180 180 tty_init (gboolean mouse_enable, gboolean is_xterm) 181 181 { 182 struct termios mode; 183 182 184 initscr (); 183 185 184 186 #ifdef HAVE_ESCDELAY … … 194 196 ESCDELAY = 200; 195 197 #endif /* HAVE_ESCDELAY */ 196 198 197 #ifdef NCURSES_VERSION 199 tcgetattr (STDIN_FILENO, &mode); 198 200 /* use Ctrl-g to generate SIGINT */ 199 cur_term->Nttyb.c_cc[VINTR] = CTRL ('g');/* ^g */201 mode.c_cc[VINTR] = CTRL ('g'); /* ^g */ 200 202 /* disable SIGQUIT to allow use Ctrl-\ key */ 201 cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE; 202 tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb); 203 #else 204 /* other curses implementation (bsd curses, ...) */ 205 { 206 struct termios mode; 203 mode.c_cc[VQUIT] = NULL_VALUE; 204 tcsetattr (STDIN_FILENO, TCSANOW, &mode); 207 205 208 tcgetattr (STDIN_FILENO, &mode); 209 /* use Ctrl-g to generate SIGINT */ 210 mode.c_cc[VINTR] = CTRL ('g'); /* ^g */ 211 /* disable SIGQUIT to allow use Ctrl-\ key */ 212 mode.c_cc[VQUIT] = NULL_VALUE; 213 tcsetattr (STDIN_FILENO, TCSANOW, &mode); 214 } 215 #endif /* NCURSES_VERSION */ 206 /* curses remembers the "in-program" modes after this call */ 207 def_prog_mode (); 216 208 217 209 tty_start_interrupt_key (); 218 210