binutils-gdb/gdb/tui
Patrick Palka e3555239e0 Remove buggy xterm workaround in tui_dispatch_ctrl_char()
The function tui_dispatch_ctrl_char() has an old workaround (from 1999)
for buggy terminals and/or ncurses library that don't return page
up/down keys as single characters.  Because the workaround is so old, I
think the bug it is targetting is no longer relevant anymore.

But more importantly, the workaround is itself buggy: it 1) performs a
blocking call to wgetch() and 2) if the key returned by wgetch() does
not make up a relevant key sequence it throws away the input instead of
pushing it back via ungetch().  And indeed the workaround breaks Alt-key
sequences under TERM=xterm because of bug #2.

So this patch removes the buggy workaround and tidies up the function
accordingly.

I personally tested this change on a recent xterm (with TERM=xterm) in
Fedora 20 and had no problems with having ncurses properly interpret
page up/down keys.  And Alt-key sequences now work when TERM=xterm too.

gdb/ChangeLog:

	* tui/tui-command.c: Remove include of <ctype.h>.
	(tui_dispatch_ctrl_char): Remove workaround for xterm terminals.
2015-05-14 08:18:06 -04:00
..
ChangeLog-1998-2003
tui-command.c Remove buggy xterm workaround in tui_dispatch_ctrl_char() 2015-05-14 08:18:06 -04:00
tui-command.h
tui-data.c Fix PR gdb/18155 2015-04-27 21:19:58 -04:00
tui-data.h Make type-safe the 'content' field of struct tui_gen_win_info 2015-04-27 21:19:53 -04:00
tui-disasm.c Make type-safe the 'content' field of struct tui_gen_win_info 2015-04-27 21:19:53 -04:00
tui-disasm.h
tui-file.c
tui-file.h
tui-hooks.c
tui-hooks.h
tui-interp.c
tui-io.c Fix undefined behavior in TUI's TAB expansion 2015-03-21 10:48:34 +02:00
tui-io.h
tui-layout.c Remove --xdb 2015-04-11 19:49:03 +02:00
tui-layout.h
tui-out.c
tui-regs.c Make type-safe the 'content' field of struct tui_gen_win_info 2015-04-27 21:19:53 -04:00
tui-regs.h
tui-source.c TUI: avoid calling strcpy() on identical string objects 2015-04-27 21:19:58 -04:00
tui-source.h
tui-stack.c Make type-safe the 'content' field of struct tui_gen_win_info 2015-04-27 21:19:53 -04:00
tui-stack.h
tui-win.c Avoid race condition when handling a SIGWINCH signal 2015-05-13 11:53:28 -04:00
tui-win.h
tui-windata.c
tui-windata.h
tui-wingeneral.c Do not increment of decrement enums 2015-02-27 17:29:11 +00:00
tui-wingeneral.h
tui-winsource.c Make type-safe the 'content' field of struct tui_gen_win_info 2015-04-27 21:19:53 -04:00
tui-winsource.h
tui.c Avoid race condition when handling a SIGWINCH signal 2015-05-13 11:53:28 -04:00
tui.h