]> granicus.if.org Git - mutt/commitdiff
Fix encoding for text/* attachments with long lines.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 14 Feb 2000 15:52:23 +0000 (15:52 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 14 Feb 2000 15:52:23 +0000 (15:52 +0000)
sendlib.c

index b0ffdfff9b300a7269e7f46da5d35620d8fccf9f..2f1574c04482bf57cada5110982081b6d274655a 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -860,7 +860,7 @@ static void mutt_set_encoding (BODY *b, CONTENT *info)
 {
   if (b->type == TYPETEXT)
   {
-    if (info->lobin || (info->from && option (OPTENCODEFROM)))
+    if (info->lobin || info->linemax > 990 || (info->from && option (OPTENCODEFROM)))
       b->encoding = ENCQUOTEDPRINTABLE;
     else if (info->hibin)
       b->encoding = option (OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;
@@ -883,7 +883,8 @@ static void mutt_set_encoding (BODY *b, CONTENT *info)
           || info->cr || (option (OPTENCODEFROM) && info->from))
   {
     /* Determine which encoding is smaller  */
-    if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < 3.0 * (float) (info->lobin + info->hibin) + (float)info->ascii)
+    if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < 
+        3.0 * (float)(info->lobin + info->hibin) + (float)info->ascii)
       b->encoding = ENCBASE64;
     else
       b->encoding = ENCQUOTEDPRINTABLE;