diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-07-25 15:09:31 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2005-07-25 15:09:31 +0000 |
commit | fd8be987f8334e9530be6ca571c54695892aa871 (patch) | |
tree | 60327bf0cf90e57934fbcaf6ff8cee1b5e882083 /readline/rltty.c | |
parent | 7ef34f2cde1d446fb7ce7d2151446a7ac38aeabd (diff) | |
download | gdb-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/rltty.c')
-rw-r--r-- | readline/rltty.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/readline/rltty.c b/readline/rltty.c index ad17904..2ccb9d1 100644 --- a/readline/rltty.c +++ b/readline/rltty.c @@ -152,7 +152,9 @@ set_winsize (tty) #endif /* TIOCGWINSZ */ } -#if defined (NEW_TTY_DRIVER) +#if defined (NO_TTY_DRIVER) +/* Nothing */ +#elif defined (NEW_TTY_DRIVER) /* Values for the `flags' field of a struct bsdtty. This tells which elements of the struct bsdtty have been fetched from the system and @@ -632,6 +634,22 @@ prepare_terminal_settings (meta_flag, oldtio, tiop) } #endif /* NEW_TTY_DRIVER */ +/* Put the terminal in CBREAK mode so that we can detect key + presses. */ +#if defined (NO_TTY_DRIVER) +void +rl_prep_terminal (meta_flag) + int meta_flag; +{ + readline_echoing_p = 1; +} + +void +rl_deprep_terminal () +{ +} + +#else /* ! NO_TTY_DRIVER */ /* Put the terminal in CBREAK mode so that we can detect key presses. */ void rl_prep_terminal (meta_flag) @@ -706,6 +724,7 @@ rl_deprep_terminal () release_sigint (); } +#endif /* !NO_TTY_DRIVER */ /* **************************************************************** */ /* */ @@ -717,6 +736,10 @@ int rl_restart_output (count, key) int count, key; { +#if defined (__MINGW32__) + return 0; +#else /* !__MING32__ */ + int fildes = fileno (rl_outstream); #if defined (TIOCSTART) #if defined (apollo) @@ -744,12 +767,17 @@ rl_restart_output (count, key) #endif /* !TIOCSTART */ return 0; +#endif /* !__MINGW32__ */ } int rl_stop_output (count, key) int count, key; { +#if defined (__MINGW32__) + return 0; +#else + int fildes = fileno (rl_instream); #if defined (TIOCSTOP) @@ -772,6 +800,7 @@ rl_stop_output (count, key) #endif /* !TIOCSTOP */ return 0; +#endif /* !__MINGW32__ */ } /* **************************************************************** */ @@ -786,6 +815,7 @@ void rltty_set_default_bindings (kmap) Keymap kmap; { +#if !defined (NO_TTY_DRIVER) TIOTYPE ttybuff; int tty = fileno (rl_instream); @@ -844,6 +874,7 @@ rltty_set_default_bindings (kmap) # endif /* VWERASE && TERMIOS_TTY_DRIVER */ } #endif /* !NEW_TTY_DRIVER */ +#endif } /* New public way to set the system default editing chars to their readline @@ -857,7 +888,7 @@ rl_tty_set_default_bindings (kmap) #if defined (HANDLE_SIGNALS) -#if defined (NEW_TTY_DRIVER) +#if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER) int _rl_disable_tty_signals () { |