X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fenter.c;h=39e0100f29fb1e46f9c153f4c0f6a93b07e1d76a;hb=230399f9632c37b66c1c117a17e8327eae6b3235;hp=2e048b1717f3f2e0a3a1ee36934cfbe83bfaa128;hpb=711f787502b6a1a1c150b948a5ed9156c8ef9ba1;p=apps%2Fmadmutt.git diff --git a/lib-ui/enter.c b/lib-ui/enter.c index 2e048b1..39e0100 100644 --- a/lib-ui/enter.c +++ b/lib-ui/enter.c @@ -13,8 +13,9 @@ #endif #include +#include -#include +#include #include "curses.h" #include "enter.h" @@ -36,7 +37,7 @@ static int my_wcwidth (wchar_t wc) { int n = wcwidth (wc); - if (IsWPrint (wc) && n > 0) + if (iswprint(wc) && n > 0) return n; if (!(wc & ~0x7f)) return 2; @@ -46,7 +47,7 @@ static int my_wcwidth (wchar_t wc) } /* combining mark / non-spacing character */ -#define COMB_CHAR(wc) (IsWPrint (wc) && !wcwidth (wc)) +#define COMB_CHAR(wc) (iswprint(wc) && !wcwidth(wc)) static int my_wcswidth (const wchar_t * s, size_t n) { @@ -61,7 +62,7 @@ static int my_addwch (wchar_t wc) { int n = wcwidth (wc); - if (IsWPrint (wc) && n > 0) + if (iswprint(wc) && n > 0) return mutt_addwch (wc); if (!(wc & ~0x7f)) return printw ("^%c", ((int) wc + 0x40) & 0x7f); @@ -624,7 +625,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, if (first && (flags & M_CLEAR)) { first = 0; - if (IsWPrint (wc)) /* why? */ + if (iswprint(wc)) /* why? */ state->curpos = state->lastchar = 0; } @@ -646,7 +647,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, rv = 0; goto bye; } - else if (wc && (wc < ' ' || IsWPrint (wc))) { /* why? */ + else if (wc && (wc < ' ' || iswprint(wc))) { /* why? */ if (state->lastchar >= state->wbuflen) { state->wbuflen = state->lastchar + 20; p_realloc(&state->wbuf, state->wbuflen);