/** * mutt_protected_headers_handler - Process a protected header - Implements ::handler_t */ int mutt_protected_headers_handler(struct Body *a, struct State *s) { if (C_CryptProtectedHeadersRead && a->mime_headers) { if (a->mime_headers->subject) { if ((s->flags & MUTT_DISPLAY) && C_Weed && mutt_matches_ignore("subject")) return 0; state_mark_protected_header(s); mutt_write_one_header(s->fp_out, "Subject", a->mime_headers->subject, s->prefix, mutt_window_wrap_cols(MuttIndexWindow, C_Wrap), (s->flags & MUTT_DISPLAY) ? CH_DISPLAY : CH_NO_FLAGS); state_puts("\n", s); } } return 0; }
/* Calculate the paragraph width based upon the current quote level. The start * of a quoted line will be ">>> ", so we need to subtract the space required * for the prefix from the terminal width. */ static int quote_width (STATE *s, int ql) { int width = mutt_window_wrap_cols (MuttIndexWindow, ReflowWrap); if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING)) { /* When replying, force a wrap at FLOWED_MAX to comply with RFC3676 * guidelines */ if (width > FLOWED_MAX) width = FLOWED_MAX; ++ql; /* When replying, we will add an additional quote level */ } /* adjust the paragraph width subtracting the number of prefix chars */ width -= space_quotes (s) ? ql*2 : ql; /* When displaying (not replying), there may be a space between the prefix * string and the paragraph */ if (add_quote_suffix (s, ql)) --width; /* failsafe for really long quotes */ if (width <= 0) width = FLOWED_MAX; /* arbitrary, since the line will wrap */ return width; }