From: Christoph Berg Date: Sun, 30 May 2010 22:44:49 +0000 (+0200) Subject: Add upstream/542344-dont_fold_From_: Do not wrap From_ header (Closes: #542344) X-Git-Tag: debian/1.5.20-8~3 X-Git-Url: https://git.llucax.com/software/mutt-debian.git/commitdiff_plain/bc03f37c91e5464c1632fb37ab3c98edaac11d91?ds=inline Add upstream/542344-dont_fold_From_: Do not wrap From_ header (Closes: #542344) --- diff --git a/debian/changelog b/debian/changelog index 4bd3d39..926b73f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ mutt (1.5.20-8~unrel) unreleased; urgency=low attachments, not existing files. (Closes: #572203) + Add upstream/573823-imap_internal_date: Set internaldate of messages appended to IMAP mailboxes (Closes: #573823) + + Add upstream/542344-dont_fold_From_: Do not wrap From_ header + (Closes: #542344) -- Christoph Berg Sun, 30 May 2010 23:20:21 +0200 diff --git a/debian/patches/series b/debian/patches/series index 05cea5a..3cd4da4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -60,6 +60,7 @@ upstream/383769-score-match.patch upstream/547739-manual-typos.patch upstream/311296-rand-mktemp.patch upstream/573823-imap_internal_date +upstream/542344-dont_fold_From_ misc/hyphen-as-minus.patch #misc/manpage-typos.patch diff --git a/debian/patches/upstream/542344-dont_fold_From_ b/debian/patches/upstream/542344-dont_fold_From_ new file mode 100644 index 0000000..441371c --- /dev/null +++ b/debian/patches/upstream/542344-dont_fold_From_ @@ -0,0 +1,54 @@ +changeset: 5945:5f590adfdf1a +branch: HEAD +user: Rocco Rutte +date: Thu Jun 25 17:31:27 2009 +0200 +summary: header folding: treat From_ specially, never wrap on sending side + +--- a/sendlib.c ++++ b/sendlib.c +@@ -1630,9 +1630,9 @@ static int fold_one_header (FILE *fp, co + dprint(4,(debugfile,"mwoh: pfx=[%s], tag=[%s], flags=%d value=[%s]\n", + pfx, tag, flags, value)); + +- if (fprintf (fp, "%s%s: ", NONULL (pfx), tag) < 0) ++ if (tag && *tag && fprintf (fp, "%s%s: ", NONULL (pfx), tag) < 0) + return -1; +- col = mutt_strlen (tag) + 2 + mutt_strlen (pfx); ++ col = mutt_strlen (tag) + (tag && *tag ? 2 : 0) + mutt_strlen (pfx); + + while (p && *p) + { +@@ -1717,9 +1717,12 @@ static int write_one_header (FILE *fp, i + int flags) + { + char *tagbuf, *valbuf, *t; ++ int is_from = ((end - start) > 5 && ++ ascii_strncasecmp (start, "from ", 5) == 0); + +- /* only pass through folding machinery if necessary for sending */ +- if (!(flags & CH_DISPLAY) && pfxw + max <= wraplen) ++ /* only pass through folding machinery if necessary for sending, ++ never wrap From_ headers on sending */ ++ if (!(flags & CH_DISPLAY) && (pfxw + max <= wraplen || is_from)) + { + valbuf = mutt_substrdup (start, end); + dprint(4,(debugfile,"mwoh: buf[%s%s] short enough, " +@@ -1738,8 +1741,16 @@ static int write_one_header (FILE *fp, i + else + { + t = strchr (start, ':'); +- tagbuf = mutt_substrdup (start, t); +- valbuf = mutt_substrdup (t + 2, end); ++ if (is_from) ++ { ++ tagbuf = NULL; ++ valbuf = mutt_substrdup (start, end); ++ } ++ else ++ { ++ tagbuf = mutt_substrdup (start, t); ++ valbuf = mutt_substrdup (t + 2, end); ++ } + dprint(4,(debugfile,"mwoh: buf[%s%s] too long, " + "max width = %d > %dn", + NONULL(pfx), valbuf, max, wraplen));