X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fenter.c;h=7fb61cc20320bc1a05d6c9c56837f0cbc414528d;hp=d42c8554e555293c0079e2bc34e49fb8d9511593;hb=17759b32873166573ee7bfaf298ae90434779ed7;hpb=98cf5779d8184a74541be1bc61d15c5f35efd310 diff --git a/lib-ui/enter.c b/lib-ui/enter.c index d42c855..7fb61cc 100644 --- a/lib-ui/enter.c +++ b/lib-ui/enter.c @@ -8,9 +8,8 @@ * please see the file GPL in the top level source directory. */ -#include +#include -#include "curses.h" #include "enter.h" #include "menu.h" @@ -56,12 +55,12 @@ static int my_addwch (wchar_t wc) int n = wcwidth (wc); if (iswprint(wc) && n > 0) - return mutt_addwch (wc); + return waddwch(stdscr, wc); if (!(wc & ~0x7f)) - return printw ("^%c", ((int) wc + 0x40) & 0x7f); + return wprintw (stdscr, "^%c", ((int) wc + 0x40) & 0x7f); if (!(wc & ~0xffff)) - return printw ("\\u%04x", (int) wc); - return printw ("\\u%08x", (int) wc); + return wprintw (stdscr, "\\u%04x", (int) wc); + return wprintw (stdscr, "\\u%08x", (int) wc); } static size_t width_ceiling (const wchar_t * s, size_t n, int w1) @@ -177,7 +176,7 @@ int mutt_enter_string (char *buf, size_t buflen, int y, int x, int flags) int rv; ENTER_STATE *es = mutt_new_enter_state (); - rv = _mutt_enter_string (buf, buflen, y, x, flags, 0, NULL, NULL, es); + rv = _mutt_enter_string(buf, buflen, y, x, flags, 0, NULL, NULL, es); mutt_free_enter_state (&es); return rv; } @@ -243,7 +242,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, width_ceiling (state->wbuf, state->lastchar, my_wcswidth (state->wbuf, state->curpos) - width / 2); - move (y, x); + wmove (stdscr, y, x); w = 0; for (i = state->begin; i < state->lastchar; i++) { w += my_wcwidth (state->wbuf[i]); @@ -251,10 +250,10 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, break; my_addwch (state->wbuf[i]); } - clrtoeol (); - move (y, - x + my_wcswidth (state->wbuf + state->begin, - state->curpos - state->begin)); + wclrtoeol (stdscr); + wmove (stdscr, y, + x + my_wcswidth (state->wbuf + state->begin, + state->curpos - state->begin)); } mutt_refresh (); @@ -455,8 +454,8 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, if (tempbuf && templen == state->lastchar - i && !memcmp (tempbuf, state->wbuf + i, (state->lastchar - i) * sizeof (wchar_t))) { - mutt_select_file (buf, buflen, - (flags & M_EFILE) ? M_SEL_FOLDER : 0); + mutt_select_file(buf, buflen, flags & M_EFILE ? M_SEL_FOLDER : 0, + NULL, NULL); set_option (OPTNEEDREDRAW); if (*buf) replace_part (state, i, buf); @@ -514,9 +513,9 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, || (tempbuf && templen == state->lastchar && !memcmp (tempbuf, state->wbuf, state->lastchar * sizeof (wchar_t)))) { - _mutt_select_file (buf, buflen, - ((flags & M_EFILE) ? M_SEL_FOLDER : 0) | - (multiple ? M_SEL_MULTI : 0), files, numfiles); + mutt_select_file(buf, buflen, + ((flags & M_EFILE) ? M_SEL_FOLDER : 0) | + (multiple ? M_SEL_MULTI : 0), files, numfiles); set_option (OPTNEEDREDRAW); if (*buf) { mutt_pretty_mailbox (buf);