From: Pierre Habouzit Date: Wed, 15 Aug 2007 10:26:59 +0000 (+0200) Subject: Simplification X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=671b6a2f5c5190e6399cc000906491668eef90f1;p=apps%2Fmadmutt.git Simplification Signed-off-by: Pierre Habouzit --- diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index 2203672..18216ab 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -316,12 +316,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. diff --git a/lib-ui/curses.h b/lib-ui/curses.h index 5029316..eebf4a1 100644 --- a/lib-ui/curses.h +++ b/lib-ui/curses.h @@ -109,8 +109,8 @@ void mutt_format_s (char *, ssize_t, const char *, const char *); void mutt_format_s_tree (char *, ssize_t, const char *, const char *); void mutt_free_color (int fg, int bg); void mutt_paddstr(WINDOW *, int, const char *); -#define mutt_perror(a) _mutt_perror (a, __FILE__, __LINE__) -void _mutt_perror (const char*, const char*,int); +#define mutt_perror(s) \ + mutt_error("%s: %m (errno = %d) from %s:%i", s, errno, __FILE__, __LINE__) void mutt_query_exit (void); void mutt_query_menu (char *, ssize_t); void mutt_show_error (void);