X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fcurs_lib.c;h=fb65b648c860c2c3e6d95d918764d142449ec53a;hb=f779db722043d8c6767149a9afef8c10159516f5;hp=0bbe168de2dbc87d0b58b039166626aae8169034;hpb=23e6291cb5d5b4cd2008403d8b628007fd75ff23;p=apps%2Fmadmutt.git diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index 0bbe168..fb65b64 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -11,30 +11,13 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include - #ifdef HAVE_LANGINFO_YESEXPR #include #endif -#include -#include -#include -#include - #include #include @@ -594,12 +577,12 @@ void mutt_format_string (char *dest, ssize_t destlen, for (; n && (k = mbrtowc (&wc, s, n, &mbstate1)); s += k, n -= k) { if (k == -1 || k == -2) { k = (k == -1) ? 1 : n; - wc = replacement_char (); + wc = CharsetReplacement; } if (arboreal && wc < M_TREE_MAX) w = 1; /* hack */ else { - if (!IsWPrint (wc)) + if (!iswprint(wc)) wc = '?'; w = wcwidth (wc); } @@ -689,9 +672,9 @@ void mutt_paddstr (int n, const char *s) for (; len && (k = mbrtowc (&wc, s, len, &mbstate)); s += k, len -= k) { if (k == -1 || k == -2) { k = (k == -1) ? 1 : len; - wc = replacement_char (); + wc = CharsetReplacement; } - if (!IsWPrint (wc)) + if (!iswprint(wc)) wc = '?'; w = wcwidth (wc); if (w >= 0) { @@ -726,9 +709,9 @@ int mutt_strwidth (const char *s) for (w = 0; n && (k = mbrtowc (&wc, s, n, &mbstate)); s += k, n -= k) { if (k == -1 || k == -2) { k = (k == -1) ? 1 : n; - wc = replacement_char (); + wc = CharsetReplacement; } - if (!IsWPrint (wc)) + if (!iswprint(wc)) wc = '?'; w += wcwidth (wc); }