aboutsummaryrefslogtreecommitdiff
path: root/readline/input.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-07-25 15:09:31 +0000
committerMark Mitchell <mark@codesourcery.com>2005-07-25 15:09:31 +0000
commitfd8be987f8334e9530be6ca571c54695892aa871 (patch)
tree60327bf0cf90e57934fbcaf6ff8cee1b5e882083 /readline/input.c
parent7ef34f2cde1d446fb7ce7d2151446a7ac38aeabd (diff)
downloadgdb-fd8be987f8334e9530be6ca571c54695892aa871.zip
gdb-fd8be987f8334e9530be6ca571c54695892aa871.tar.gz
gdb-fd8be987f8334e9530be6ca571c54695892aa871.tar.bz2
* input.c (rl_getc): Use getch to read console input on
Windows. * readline.c (bind_arrow_keys_internal): Translate Windows keysequences into POSIX key sequences. * rldefs.h (NO_TTY_DRIVER): Define on MinGW. * rltty.c: Conditionalize on NO_TTY_DRIVER throughout.
Diffstat (limited to 'readline/input.c')
-rw-r--r--readline/input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/readline/input.c b/readline/input.c
index 841f05d..9120dfa 100644
--- a/readline/input.c
+++ b/readline/input.c
@@ -424,6 +424,13 @@ rl_getc (stream)
while (1)
{
+#ifdef __MINGW32__
+ /* On Windows, use a special routine to read a single character
+ from the console. (Otherwise, no characters are available
+ until the user hits the return key.) */
+ if (isatty (fileno (stream)))
+ return getch ();
+#endif
result = read (fileno (stream), &c, sizeof (unsigned char));
if (result == sizeof (unsigned char))