X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fenter.c;h=d42c8554e555293c0079e2bc34e49fb8d9511593;hp=d6707a6125054bd3a5389b3e13d74fa9af6ec6da;hb=c621d41d614275fb6265ab8184a825a72b5a52b4;hpb=c438da3f93727117c7af936b48a85f7747d3b087 diff --git a/lib-ui/enter.c b/lib-ui/enter.c index d6707a6..d42c855 100644 --- a/lib-ui/enter.c +++ b/lib-ui/enter.c @@ -8,14 +8,7 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include +#include #include "curses.h" #include "enter.h" @@ -37,7 +30,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; @@ -47,7 +40,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) { @@ -62,7 +55,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); @@ -122,7 +115,7 @@ static void my_wcstombs (char *dest, ssize_t dlen, const wchar_t * src, } } -size_t my_mbstowcs (wchar_t ** pwbuf, size_t * pwbuflen, size_t i, const char *buf) +static size_t my_mbstowcs (wchar_t ** pwbuf, size_t * pwbuflen, size_t i, const char *buf) { wchar_t wc; mbstate_t st; @@ -625,7 +618,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; } @@ -647,7 +640,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);