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 Speed up GDB's TUI output 2015-02-04 12:27:28 +01:00
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 Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-file.c Speed up GDB's TUI output 2015-02-04 12:27:28 +01:00
tui-file.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-hooks.c Consolidate the custom TUI query hook with the default query hook 2015-01-09 13:27:56 -05:00
tui-hooks.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-interp.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-io.c Fix undefined behavior in TUI's TAB expansion 2015-03-21 10:48:34 +02:00
tui-io.h Make sure TABs are expanded in TUI windows on MS-Windows. 2015-01-31 10:47:14 +02:00
tui-layout.c Remove --xdb 2015-04-11 19:49:03 +02:00
tui-layout.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-out.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
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 Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-source.c TUI: avoid calling strcpy() on identical string objects 2015-04-27 21:19:58 -04:00
tui-source.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
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 Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-win.c Avoid race condition when handling a SIGWINCH signal 2015-05-13 11:53:28 -04:00
tui-win.h Really add a prototype for tui_rehighlight_all. 2015-01-16 19:58:04 +02:00
tui-windata.c C++ keyword cleanliness, mostly auto-generated 2015-02-27 16:33:07 +00:00
tui-windata.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui-wingeneral.c Do not increment of decrement enums 2015-02-27 17:29:11 +00:00
tui-wingeneral.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
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 Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tui.c Avoid race condition when handling a SIGWINCH signal 2015-05-13 11:53:28 -04:00
tui.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00