X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pager.c;h=4bbf96c3ae091ebbfed7c8130f07438b4cd75072;hp=b486021d18182aac7a69e0e98afe4fc278e62b66;hb=928ca0d87eb15bfa4c150abdadadaf3b177f95bd;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/pager.c b/pager.c index b486021..4bbf96c 100644 --- a/pager.c +++ b/pager.c @@ -11,25 +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 #include #include +#include #include "mutt.h" #include "alias.h" @@ -41,7 +29,6 @@ #include "charset.h" #include "buffy.h" -#include "mx.h" #include @@ -675,13 +662,8 @@ resolve_types (char *buf, char *rawbuf, struct line_t *lineInfo, int n, int last } else if (m_strncmp("\033[0m", rawbuf, 4) == 0) /* a little hack... */ lineInfo[n].type = MT_COLOR_NORMAL; -#if 0 - else if (m_strncmp("[-- ", buf, 4) == 0) - lineInfo[n].type = MT_COLOR_ATTACHMENT; -#else else if (check_attachment_marker ((char *) rawbuf) == 0) lineInfo[n].type = MT_COLOR_ATTACHMENT; -#endif else if (m_strcmp("-- \n", buf) == 0 || m_strcmp("-- \r\n", buf) == 0) { i = n + 1; @@ -950,11 +932,9 @@ fill_buffer (FILE * f, off_t *last_pos, off_t offset, unsigned char *buf, } #ifdef USE_NNTP -#include "mx.h" -#include "nntp.h" +#include #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) @@ -1441,7 +1421,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) if (stat (fname, &sb) != 0) { mutt_perror (fname); - fclose (fp); + m_fclose(&fp); return (-1); } unlink (fname); @@ -1654,13 +1634,13 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) } 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); @@ -1672,7 +1652,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) } /* if we're not using the index, update every time */ if (index == 0) - sidebar_draw (MENU_PAGER); + sidebar_draw (); redraw = 0; @@ -2566,7 +2546,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) 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; @@ -2574,7 +2554,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) } } - fclose (fp); + m_fclose(&fp); if (IsHeader (extra)) { Context->msgnotreadyet = -1; if (rc == -1)