X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pager.c;h=42abff6faa8d69151dac8f35a98f8b6cae3e0496;hp=5880834668f8d2c61facedef0d0b0cb8c51ce471;hb=84bc6d1930165b21919541b3b24294a9d99c3541;hpb=ad303d5eab5c92f9546cc9d3703a24534d6bb5e0 diff --git a/pager.c b/pager.c index 5880834..42abff6 100644 --- a/pager.c +++ b/pager.c @@ -108,7 +108,7 @@ typedef struct _ansi_attr { static short InHelp = 0; -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) +#if defined (HAVE_RESIZETERM) static struct resize { int line; int SearchCompiled; @@ -892,7 +892,7 @@ fill_buffer (FILE * f, off_t *last_pos, off_t offset, unsigned char *buf, } #ifdef USE_NNTP -#include +#include "nntp.h" #endif static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, @@ -1231,14 +1231,6 @@ display_line (FILE * f, off_t *last_pos, struct line_t **lineInfo, int n, /* display the line */ format_line (lineInfo, n, buf, flags, &a, cnt, &ch, &vch, &col, &special); - /* avoid a bug in ncurses... */ -#ifndef USE_SLANG_CURSES - if (col == 0) { - SETCOLOR (MT_COLOR_NORMAL); - addch (' '); - } -#endif - /* end the last color pattern (needed by S-Lang) */ if (special || (col != COLS && (flags & (M_SHOWCOLOR | M_SEARCH)))) resolve_color (*lineInfo, n, vch, flags, 0, &a); @@ -1260,15 +1252,7 @@ display_line (FILE * f, off_t *last_pos, struct line_t **lineInfo, int n, bkgdset (def_color | ' '); #endif } - - /* ncurses always wraps lines when you get to the right side of the - * screen, but S-Lang seems to only wrap if the next character is *not* - * a newline (grr!). - */ -#ifndef USE_SLANG_CURSES - if (col < COLS) -#endif - addch ('\n'); + addch ('\n'); /* * reset the color back to normal. This *must* come after the @@ -1456,7 +1440,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) SETCOLOR (MT_COLOR_NORMAL); } -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) +#if defined (HAVE_RESIZETERM) if (Resize != NULL) { if ((SearchCompiled = Resize->SearchCompiled)) { REGCOMP @@ -1639,7 +1623,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) mutt_query_exit (); continue; } -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) +#if defined (HAVE_RESIZETERM) else if (SigWinch) { mutt_resize_screen (); @@ -2221,7 +2205,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) CHECK_MODE (IsHeader (extra) && !IsAttach (extra)); CHECK_ATTACH; if (extra->ctx && extra->ctx->magic == M_NNTP && - !((NNTP_DATA *) extra->ctx->data)->allowed && + !((nntp_data_t *) extra->ctx->data)->allowed && query_quadoption (OPT_TOMODERATED, _ ("Posting to this group not allowed, may be moderated. Continue?")) @@ -2235,7 +2219,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) CHECK_MODE (IsHeader (extra) || IsMsgAttach (extra)); CHECK_ATTACH; if (extra->ctx && extra->ctx->magic == M_NNTP && - !((NNTP_DATA *) extra->ctx->data)->allowed && + !((nntp_data_t *) extra->ctx->data)->allowed && query_quadoption (OPT_TOMODERATED, _ ("Posting to this group not allowed, may be moderated. Continue?")) @@ -2263,7 +2247,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) query_quadoption (OPT_FOLLOWUPTOPOSTER, _("Reply by mail as poster prefers?")) != M_YES) { if (extra->ctx && extra->ctx->magic == M_NNTP - && !((NNTP_DATA *) extra->ctx->data)->allowed + && !((nntp_data_t *) extra->ctx->data)->allowed && query_quadoption (OPT_TOMODERATED, _ ("Posting to this group not allowed, may be moderated. Continue?"))