From: Kevin McCarthy Date: Mon, 31 Dec 2018 23:39:04 +0000 (-0800) Subject: Remove unused MUTT_FORMAT_MAKEPRINT flag. X-Git-Tag: mutt-1-12-rel~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c59c27129b45b9f2cfd630428f57c643276b906;p=mutt Remove unused MUTT_FORMAT_MAKEPRINT flag. The code in mutt_FormatString() that was using it was commented out 19 years ago. --- diff --git a/commands.c b/commands.c index 5ec15888..f0fb0857 100644 --- a/commands.c +++ b/commands.c @@ -217,7 +217,7 @@ int mutt_display_message (HEADER *cur) hfi.ctx = Context; hfi.pager_progress = ExtPagerProgress; hfi.hdr = cur; - mutt_make_string_info (buf, sizeof (buf), MuttIndexWindow->cols, NONULL(PagerFmt), &hfi, MUTT_FORMAT_MAKEPRINT); + mutt_make_string_info (buf, sizeof (buf), MuttIndexWindow->cols, NONULL(PagerFmt), &hfi, 0); fputs (buf, fpout); fputs ("\n\n", fpout); } diff --git a/curs_main.c b/curs_main.c index 9556c920..c7077f1e 100644 --- a/curs_main.c +++ b/curs_main.c @@ -197,7 +197,7 @@ void mutt_ts_icon(char *str) void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num) { - format_flag flag = MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR | MUTT_FORMAT_INDEX; + format_flag flag = MUTT_FORMAT_ARROWCURSOR | MUTT_FORMAT_INDEX; int edgemsgno, reverse = Sort & SORT_REVERSE; HEADER *h = Context->hdrs[Context->v2r[num]]; THREAD *tmp; diff --git a/mutt.h b/mutt.h index fcd691df..be43d38d 100644 --- a/mutt.h +++ b/mutt.h @@ -148,12 +148,11 @@ typedef enum { MUTT_FORMAT_FORCESUBJ = (1<<0), /* print the subject even if unchanged */ MUTT_FORMAT_TREE = (1<<1), /* draw the thread tree */ - MUTT_FORMAT_MAKEPRINT = (1<<2), /* make sure that all chars are printable */ - MUTT_FORMAT_OPTIONAL = (1<<3), - MUTT_FORMAT_STAT_FILE = (1<<4), /* used by mutt_attach_fmt */ - MUTT_FORMAT_ARROWCURSOR = (1<<5), /* reserve space for arrow_cursor */ - MUTT_FORMAT_INDEX = (1<<6), /* this is a main index entry */ - MUTT_FORMAT_NOFILTER = (1<<7) /* do not allow filtering on this pass */ + MUTT_FORMAT_OPTIONAL = (1<<2), + MUTT_FORMAT_STAT_FILE = (1<<3), /* used by mutt_attach_fmt */ + MUTT_FORMAT_ARROWCURSOR = (1<<4), /* reserve space for arrow_cursor */ + MUTT_FORMAT_INDEX = (1<<5), /* this is a main index entry */ + MUTT_FORMAT_NOFILTER = (1<<6) /* do not allow filtering on this pass */ } format_flag; /* mode for mutt_write_rfc822_header() */ diff --git a/muttlib.c b/muttlib.c index 61c54d57..c9683f4e 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1635,18 +1635,6 @@ void mutt_FormatString (char *dest, /* output buffer */ } } *wptr = 0; - -#if 0 - if (flags & MUTT_FORMAT_MAKEPRINT) - { - /* Make sure that the string is printable by changing all non-printable - chars to dots, or spaces for non-printable whitespace */ - for (cp = dest ; *cp ; cp++) - if (!IsPrint (*cp) && - !((flags & MUTT_FORMAT_TREE) && (*cp <= MUTT_TREE_MAX))) - *cp = isspace ((unsigned char) *cp) ? ' ' : '.'; - } -#endif } /* This function allows the user to specify a command to read stdout from in diff --git a/pager.c b/pager.c index c237ecc6..b4c78f53 100644 --- a/pager.c +++ b/pager.c @@ -1856,7 +1856,7 @@ static void pager_menu_redraw (MUTTMENU *pager_menu) size_t l1 = rd->pager_status_window->cols * MB_LEN_MAX; size_t l2 = sizeof (buffer); hfi.hdr = (IsHeader (rd->extra)) ? rd->extra->hdr : rd->extra->bdy->hdr; - mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, rd->pager_status_window->cols, NONULL (PagerFmt), &hfi, MUTT_FORMAT_MAKEPRINT); + mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, rd->pager_status_window->cols, NONULL (PagerFmt), &hfi, 0); mutt_paddstr (rd->pager_status_window->cols, buffer); } else diff --git a/recvattach.c b/recvattach.c index 1b9aeb59..30f8664a 100644 --- a/recvattach.c +++ b/recvattach.c @@ -203,7 +203,7 @@ const char *mutt_attach_fmt (char *dest, { char s[SHORT_STRING]; _mutt_make_string (s, sizeof (s), MsgFmt, NULL, aptr->content->hdr, - MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR); + MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_ARROWCURSOR); if (*s) { mutt_format_s (dest, destlen, prefix, s);