* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <lib-lib/mem.h>
+#include <lib-lib/lib-lib.h>
#include "curses.h"
#include "enter.h"
#include "menu.h"
#include "mutt.h"
+#include "alias.h"
#include "keymap.h"
#include "history.h"
#include "buffy.h"
-
-#include <string.h>
-
/* redraw flags for mutt_enter_string() */
enum {
M_REDRAW_INIT = 1, /* go to end of line and redraw */
{
int n = wcwidth (wc);
- if (IsWPrint (wc) && n > 0)
+ if (iswprint(wc) && n > 0)
return n;
if (!(wc & ~0x7f))
return 2;
}
/* 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)
{
{
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);
}
}
-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;
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;
}
if (first && (flags & M_CLEAR)) {
first = 0;
- if (IsWPrint (wc)) /* why? */
+ if (iswprint(wc)) /* why? */
state->curpos = state->lastchar = 0;
}
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);