]> granicus.if.org Git - mutt/commitdiff
Remove unused MUTT_FORMAT_MAKEPRINT flag.
authorKevin McCarthy <kevin@8t8.us>
Mon, 31 Dec 2018 23:39:04 +0000 (15:39 -0800)
committerKevin McCarthy <kevin@8t8.us>
Mon, 31 Dec 2018 23:40:25 +0000 (15:40 -0800)
The code in mutt_FormatString() that was using it was commented out 19
years ago.

commands.c
curs_main.c
mutt.h
muttlib.c
pager.c
recvattach.c

index 5ec15888b5eb0db6d211da0af34f42ee1a716c09..f0fb0857a7a960c7441a4ff215d08376aa62e63f 100644 (file)
@@ -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);
   }
index 9556c920ed3e1dfb9494cad62dd3716f1bd5199d..c7077f1e964da92c77f26cbfb241afbd21500227 100644 (file)
@@ -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 fcd691df7413d643bc1672d3b1efcef828839e5d..be43d38d5b755b1d4d0f6a61f9942eb4ea4238d8 100644 (file)
--- 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() */
index 61c54d57e90d202da46bc7d288dce5218371d8b2..c9683f4e202b7aa02a633b0436f1bb8f3407ea92 100644 (file)
--- 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 c237ecc66f5d2a741ab7dbbe4f30b5d682a3b1f4..b4c78f534dbb05fe5c98356d1f89882a51aaa3cd 100644 (file)
--- 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
index 1b9aeb59bb446295c29f1ede3594426f219ecee9..30f8664afabdedcaf028adccc21210c1a1df6997 100644 (file)
@@ -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);