X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fcurs_lib.c;h=c51f1a4dec99f207ac6fda487125f3fb781716a5;hb=4b2f5f58e6b8e65e8524596d16752f7f1e5d58ca;hp=8e741535d084ee49680f1553354a1e2770808589;hpb=8ab1ab66eb1c4b95f9b2a5ed9c2b2cf1dfa74544;p=apps%2Fmadmutt.git diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index 8e74153..c51f1a4 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -211,7 +211,7 @@ void mutt_query_exit (void) wtimeout (stdscr, -1); /* restore blocking operation */ if (mutt_yesorno (_("Exit Madmutt?"), M_YES) == M_YES) { mutt_endwin (NULL); - exit (1); + mutt_exit(1); } mutt_clear_error (); mutt_curs_set (-1); @@ -308,6 +308,10 @@ void mutt_show_error (void) void curses_initialize(void) { + if (initscr () == NULL) { + puts _("Error initializing terminal."); + exit (1); + } ci_start_color(); keypad(stdscr, true); cbreak(); @@ -316,12 +320,6 @@ void curses_initialize(void) meta(stdscr, true); } -void _mutt_perror (const char *s, const char* filename, int line) -{ - char *p = strerror (errno); - 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.