X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=curs_lib.c;h=9f77340eca6f3f1cd59963019fa16b04810393c2;hp=4eab988fc1319139e3259ad0229cef01ccafa6be;hb=1abd265879dc5db7e9968a3b4ea7e2031e6b953e;hpb=841934011451205d8295ac955486f06c317fdf15 diff --git a/curs_lib.c b/curs_lib.c index 4eab988..9f77340 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -21,6 +21,11 @@ #include "pager.h" #include "mbyte.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" +#include "lib/debug.h" + #include #include #include @@ -233,7 +238,7 @@ int mutt_yesorno (const char *msg, int def) #else if ( #endif - (tolower (ch.ch) == 'y')) { + (tolower (ch.ch) == *yes)) { def = M_YES; break; } @@ -241,7 +246,7 @@ int mutt_yesorno (const char *msg, int def) #ifdef HAVE_LANGINFO_YESEXPR reno_ok ? (regexec (&reno, answer, 0, 0, 0) == 0) : #endif - (tolower (ch.ch) == 'n')) { + (tolower (ch.ch) == *no)) { def = M_NO; break; } @@ -289,7 +294,7 @@ void mutt_curses_error (const char *fmt, ...) vsnprintf (Errorbuf, sizeof (Errorbuf), fmt, ap); va_end (ap); - dprint (1, (debugfile, "%s\n", Errorbuf)); + debug_print (1, ("%s\n", Errorbuf)); mutt_format_string (TmpErrorbuf, sizeof (TmpErrorbuf), 0, COLS - 2, 0, 0, Errorbuf, sizeof (Errorbuf), 0); snprintf (Errorbuf, sizeof (Errorbuf), "%s", TmpErrorbuf); /* overkill */ @@ -357,13 +362,12 @@ void mutt_endwin (const char *msg) } } -void mutt_perror (const char *s) +void _mutt_perror (const char *s, const char* filename, int line) { char *p = strerror (errno); - dprint (1, (debugfile, "%s: %s (errno = %d)\n", s, - p ? p : "unknown error", errno)); - mutt_error ("%s: %s (errno = %d)", s, p ? p : _("unknown error"), errno); + debug_print (1, ("%s: %s (errno = %d)\n", s, p ? p : "unknown error", errno)); + mutt_error ("%s: %s (errno = %d) from %s:%i", s, p ? p : _("unknown error"), errno, filename, line); } int mutt_any_key_to_continue (const char *s)