SETCOLOR (MT_COLOR_NORMAL);
}
+void curses_initialize(void)
+{
+ ci_start_color();
+ keypad(stdscr, TRUE);
+ cbreak();
+ noecho();
+ typeahead (-1); /* simulate smooth scrolling */
+ meta(stdscr, TRUE);
+}
+
+void curses_install(void)
+{
+ SETCOLOR(MT_COLOR_NORMAL);
+ wclear(stdscr);
+ mutt_error = mutt_curses_error;
+ mutt_message = mutt_curses_message;
+}
+
void mutt_endwin (const char *msg)
{
if (!option (OPTNOCURSES)) {
mutt_error ("%s: %s (errno = %d) from %s:%i", s, p ? p : _("unknown error"), errno, filename, line);
}
+/*
+ * prompts the user to enter a keystroke, and displays the octal value back
+ * to the user.
+ */
+void mutt_what_key (void)
+{
+ int ch;
+
+ mvwprintw (stdscr, LINES - 1, 0, _("Enter keys (^G to abort): "));
+ do {
+ ch = wgetch (stdscr);
+ if (ch != ERR && ch != ctrl ('G')) {
+ mutt_message (_("Char = %s, Octal = %o, Decimal = %d"),
+ km_keyname (ch), ch, ch);
+ }
+ }
+ while (ch != ERR && ch != ctrl ('G'));
+
+ mutt_flushinp ();
+}
+
int mutt_any_key_to_continue (const char *s)
{
struct termios t;