X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=curs_lib.c;h=e938adfbef4ebf0e7b32612f917b5b9fa096b430;hp=be5583f3aafde33e43553f1a58c29c0f37600325;hb=38c7d971a4e206284e06e958511bb55694cb4deb;hpb=9274cbe8e6410ddb95ddc667faa678a29da85420 diff --git a/curs_lib.c b/curs_lib.c index be5583f..e938adf 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "mutt.h" #include "enter.h" @@ -209,7 +210,7 @@ int mutt_yesorno (const char *msg, int def) printw ("%.*s%s", COLS - answer_string_len, msg, answer_string); p_delete(&answer_string); - FOREVER { + for (;;) { mutt_refresh (); ch = mutt_getch (); if (CI_is_return (ch.ch)) @@ -298,7 +299,6 @@ void mutt_curses_error (const char *fmt, ...) set_option (OPTMSGERR); } -#ifdef USE_SOCKET void mutt_progress_bar (progress_t* progress, long pos) { char posstr[SHORT_STRING]; @@ -326,7 +326,6 @@ void mutt_progress_bar (progress_t* progress, long pos) { mutt_message ("%s %s", progress->msg, posstr); } } -#endif void mutt_curses_message (const char *fmt, ...) { @@ -420,7 +419,7 @@ int mutt_do_pager (const char *banner, { int rc; - if (!Pager || str_cmp (Pager, "builtin") == 0) + if (!Pager || m_strcmp(Pager, "builtin") == 0) rc = mutt_pager (banner, tempfile, do_color, info); else { char cmd[STRING]; @@ -530,7 +529,7 @@ int mutt_multi_choice (char *prompt, char *letters) mvaddstr (LINES - 1, 0, prompt); clrtoeol (); - FOREVER { + for (;;) { mutt_refresh (); ch = mutt_getch (); if (ch.ch == -1 || CI_is_return (ch.ch)) { @@ -582,10 +581,10 @@ int mutt_addwch (wchar_t wc) * when printed. */ -void mutt_format_string (char *dest, size_t destlen, +void mutt_format_string (char *dest, ssize_t destlen, int min_width, int max_width, int right_justify, char m_pad_char, - const char *s, size_t n, int arboreal) + const char *s, ssize_t n, int arboreal) { char *p; wchar_t wc; @@ -620,7 +619,7 @@ void mutt_format_string (char *dest, size_t destlen, destlen -= k2; } } - w = (int) destlen < min_width ? destlen : min_width; + w = destlen < min_width ? destlen : min_width; if (w <= 0) *p = '\0'; else if (right_justify) {