* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <wchar.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/mapping.h>
-#include <lib-lib/debug.h>
+#include <lib-lib/lib-lib.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
+#include <lib-ui/sidebar.h>
+#include <lib-mx/mx.h>
#include "mutt.h"
+#include "alias.h"
#include "keymap.h"
#include "sort.h"
#include "pager.h"
#include "attach.h"
#include "recvattach.h"
-#include "mbyte.h"
-#include "sidebar.h"
+#include "charset.h"
#include "buffy.h"
-#include "mx.h"
#include <imap/imap_private.h>
#include <lib-crypt/crypt.h>
-#include "lib/rx.h"
-
#define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT)
#define IsAttach(x) (x && (x)->bdy)
}
else if (*p == '\033' && *(p + 1) == ']'
&& check_attachment_marker ((char *) p) == 0) {
- debug_print (2, ("seen attachment marker.\n"));
while (*p++ != '\a') /* skip pseudo-ANSI sequence */
;
}
}
#ifdef USE_NNTP
-#include "mx.h"
-#include "nntp.h"
+#include <nntp/nntp.h>
#endif
-
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
int flags, ansi_attr * pa, int cnt,
int *pspace, int *pvch, int *pcol, int *pspecial)
k = mbrtowc (&wc, (char *) buf + ch, cnt - ch, &mbstate);
if (k == -2 || k == -1) {
- debug_print (1, ("mbrtowc returned %d; errno = %d.\n", k, errno));
if (col + 4 > wrap_cols)
break;
col += 4;
/* Handle backspace */
special = 0;
- if (IsWPrint (wc)) {
+ if (iswprint(wc)) {
wchar_t wc1;
mbstate_t mbstate1;
int k1, k2;
&mbstate1), k1 - k > 0 && wc1 == '\b')
&& (wc1 = 0, k2 =
mbrtowc (&wc1, (char *) buf + ch + k1, cnt - ch - k1,
- &mbstate1), k2 > 0 && IsWPrint (wc1))) {
+ &mbstate1), k2 > 0 && iswprint(wc1))) {
if (wc == wc1) {
special |= (wc == '_' && special & A_UNDERLINE)
? A_UNDERLINE : A_BOLD;
last_special = special;
}
- if (IsWPrint (wc)) {
+ if (iswprint(wc)) {
if (wc == ' ')
space = ch;
t = wcwidth (wc);
break;
++col;
if (pa)
- addch (replacement_char ());
+ addch (CharsetReplacement);
}
}
*pspace = space;
}
if (redraw & REDRAW_SIDEBAR)
- sidebar_draw (MENU_PAGER);
+ sidebar_draw ();
if ((redraw & REDRAW_INDEX) && pager_index) {
/* redraw the pager_index indicator, because the
* flags for this message might have changed. */
menu_redraw_current (pager_index);
- sidebar_draw (MENU_PAGER);
+ sidebar_draw ();
/* print out the pager_index status bar */
menu_status_line (buffer, sizeof (buffer), pager_index, NONULL (Status));
move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SW);
}
/* if we're not using the index, update every time */
if (index == 0)
- sidebar_draw (MENU_PAGER);
+ sidebar_draw ();
redraw = 0;
case OP_SIDEBAR_NEXT_NEW:
case OP_SIDEBAR_PREV:
case OP_SIDEBAR_PREV_NEW:
- sidebar_scroll (ch, MENU_PAGER);
+ sidebar_scroll (ch);
break;
default:
ch = -1;