X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fenter.c;h=0d61f2d110d5064127205d6b67a68a2c45e109cf;hb=9d1d3eb0666af7f3f3551579601920f1bced8407;hp=0d5b12efea529afafcbb2a985aa956612706a5e4;hpb=10e80e482eff3762b0b8d41b0c7795b76704479c;p=apps%2Fmadmutt.git diff --git a/lib-ui/enter.c b/lib-ui/enter.c index 0d5b12e..0d61f2d 100644 --- a/lib-ui/enter.c +++ b/lib-ui/enter.c @@ -8,19 +8,14 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include - -#include +#include #include "curses.h" #include "enter.h" #include "menu.h" #include "mutt.h" +#include "alias.h" #include "keymap.h" #include "history.h" #include "buffy.h" @@ -35,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; @@ -45,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) { @@ -60,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); @@ -120,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; @@ -182,7 +177,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; } @@ -623,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; } @@ -645,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);