+2005-06-08 Mark Mitchell <mark@codesourcery.com>
+
+ * readline/input.c (rL_getc): Use getch, not getche.
+ * readline/readline.c (bind_arrow_keys_internal): Translate
+ Windows keysequences into POSIX key sequences.
+ * readline/rlnotty.c (tputs): Fix thinko.
+ (rl_prep_terminal): Set readline_echoing_p.
+
2005-06-08 Alan Modra <amodra@bigpond.net.au>
- * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
+ * bfd/opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
2005-06-07 Mark Mitchell <mark@codesourcery.com>
- * opncls.c (bfd_fdopenr): Add missing break statements.
+ * bfd/opncls.c (bfd_fdopenr): Add missing break statements.
2005-06-07 Mark Mitchell <mark@codesourcery.com>
from the console. (Otherwise, no characters are available
until the user hits the return key.) */
if (isatty (fileno (stream)))
- return getche ();
+ return getch ();
#endif
result = read (fileno (stream), &c, sizeof (unsigned char));
_rl_bind_if_unbound ("\033[0D", rl_get_next_history);
#endif
+#ifdef __MINGW32__
+ /* Under Windows, when an extend key (like an arrow key) is
+ pressed, getch() will return 0xE0 followed by a code for the
+ extended key. We use macros to transform those into the normal
+ UNIX sequences for these keys. */
+
+ /* Up arrow. */
+ rl_macro_bind ("\340H", "\033[A", map);
+ /* Left arrow. */
+ rl_macro_bind ("\340K", "\033[D", map);
+ /* Right arrow. */
+ rl_macro_bind ("\340M", "\033[C", map);
+ /* Down arrow. */
+ rl_macro_bind ("\340P", "\033[B", map);
+#endif
+
_rl_bind_if_unbound ("\033[A", rl_get_previous_history);
_rl_bind_if_unbound ("\033[B", rl_get_next_history);
_rl_bind_if_unbound ("\033[C", rl_forward_char);
int (*outfun) ();
{
while (*string)
- outfun (*string);
+ outfun (*string++);
}
int
rl_prep_terminal (meta_flag)
int meta_flag;
{
+ readline_echoing_p = 1;
return;
}