projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no warnings in lib-sys anymore
[apps/madmutt.git]
/
pager.c
diff --git
a/pager.c
b/pager.c
index
e18bd14
..
cbdc8fa
100644
(file)
--- a/
pager.c
+++ b/
pager.c
@@
-11,26
+11,21
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
-#include <lib-
lib/mem
.h>
-#include <lib-
lib/st
r.h>
-#include <lib-
lib/macros
.h>
-#include <lib-
lib/mapping
.h>
+#include <lib-
ui/curses
.h>
+#include <lib-
ui/ente
r.h>
+#include <lib-
ui/menu
.h>
+#include <lib-
ui/sidebar
.h>
#include "mutt.h"
#include "mutt.h"
-#include "enter.h"
-#include "mutt_curses.h"
+#include "alias.h"
#include "keymap.h"
#include "keymap.h"
-#include "mutt_menu.h"
#include "sort.h"
#include "pager.h"
#include "attach.h"
#include "recvattach.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 "buffy.h"
#include "mx.h"
@@
-39,17
+34,6
@@
#include <lib-crypt/crypt.h>
#include <lib-crypt/crypt.h>
-#include "lib/rx.h"
-#include "lib/debug.h"
-
-#include <wchar.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
#define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT)
#define IsAttach(x) (x && (x)->bdy)
#define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT)
#define IsAttach(x) (x && (x)->bdy)
@@
-941,7
+925,6
@@
fill_buffer (FILE * f, off_t *last_pos, off_t offset, unsigned char *buf,
}
else if (*p == '\033' && *(p + 1) == ']'
&& check_attachment_marker ((char *) p) == 0) {
}
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 */
;
}
while (*p++ != '\a') /* skip pseudo-ANSI sequence */
;
}
@@
-1000,7
+983,6
@@
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
k = mbrtowc (&wc, (char *) buf + ch, cnt - ch, &mbstate);
if (k == -2 || k == -1) {
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;
if (col + 4 > wrap_cols)
break;
col += 4;
@@
-1014,7
+996,7
@@
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
/* Handle backspace */
special = 0;
/* Handle backspace */
special = 0;
- if (
IsWPrint
(wc)) {
+ if (
iswprint
(wc)) {
wchar_t wc1;
mbstate_t mbstate1;
int k1, k2;
wchar_t wc1;
mbstate_t mbstate1;
int k1, k2;
@@
-1025,7
+1007,7
@@
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
&mbstate1), k1 - k > 0 && wc1 == '\b')
&& (wc1 = 0, k2 =
mbrtowc (&wc1, (char *) buf + ch + k1, cnt - ch - k1,
&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;
if (wc == wc1) {
special |= (wc == '_' && special & A_UNDERLINE)
? A_UNDERLINE : A_BOLD;
@@
-1051,7
+1033,7
@@
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
last_special = special;
}
last_special = special;
}
- if (
IsWPrint
(wc)) {
+ if (
iswprint
(wc)) {
if (wc == ' ')
space = ch;
t = wcwidth (wc);
if (wc == ' ')
space = ch;
t = wcwidth (wc);
@@
-1093,7
+1075,7
@@
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
break;
++col;
if (pa)
break;
++col;
if (pa)
- addch (
replacement_char ()
);
+ addch (
CharsetReplacement
);
}
}
*pspace = space;
}
}
*pspace = space;