#include <lib-sys/mutt_signal.h>
#include "menu.h"
-#include "enter.h"
+#include "browser.h"
#include "mutt.h"
#include "pager.h"
event_t err = { -1, OP_NULL }, ret;
if (!option (OPTUNBUFFEREDINPUT) && UngetCount)
- return (KeyEvent[--UngetCount]);
+ return KeyEvent[--UngetCount];
SigInt = 0;
ret.ch = ch;
ret.op = 0;
- return (ch == ctrl ('G') ? err : ret);
-}
-
-#ifndef waddnwstr
-int waddwch(WINDOW *win, wchar_t wc)
-{
- char buf[MB_LEN_MAX * 2];
- mbstate_t mbstate;
- ssize_t n1, n2;
-
- p_clear(&mbstate, 1);
- if ((n1 = wcrtomb(buf, wc, &mbstate)) == -1
- || (n2 = wcrtomb(buf + n1, 0, &mbstate)) == -1)
- return -1; /* ERR */
- return waddstr(win, buf);
-}
-#endif
-
-
-int _mutt_get_field ( const char *field, char *buf, ssize_t buflen,
- int complete, int multiple, char ***files, int *numfiles)
-{
- int ret;
- int x, y;
-
- ENTER_STATE *es = mutt_new_enter_state ();
-
- do {
- CLEARLINE(stdscr, LINES - 1);
- waddstr (stdscr, field);
- mutt_refresh ();
- getyx (stdscr, y, x);
- ret = _mutt_enter_string(buf, buflen, y, x, complete, multiple, files,
- numfiles, es);
- } while (ret == 1);
- CLEARLINE(stdscr, LINES - 1);
- mutt_free_enter_state (&es);
-
- return (ret);
+ return ch == ctrl ('G') ? err : ret;
}
int mutt_get_field_unbuffered (char *msg, char *buf, ssize_t buflen, int flags)
rc = mutt_get_field (msg, buf, buflen, flags);
unset_option (OPTUNBUFFEREDINPUT);
- return (rc);
+ return rc;
}
void mutt_clear_error (void)
return;
}
+ SETCOLOR(main_w, MT_COLOR_SIDEBAR);
+ mvwhline(main_w, 0, 0, ACS_HLINE, mw);
+
nodelay(stdscr, true);
gettimeofday(&next, NULL);
while (!SigChild) {
mutt_refresh ();
}
CLEARLINE(stdscr, LINES - 1);
- return (def);
+ return def;
}
/* this function is called when the user presses the abort key */
close (f);
fputs ("\r\n", stdout);
mutt_clear_error ();
- return (ch);
+ return ch;
}
int _mutt_enter_fname (const char *prompt, char *buf, ssize_t blen,
ch = mutt_getch ();
if (ch.ch == -1) {
CLEARLINE(stdscr, LINES - 1);
- return (-1);
+ return -1;
}
else if (ch.ch == '?') {
mutt_refresh ();