Changeset 1794:fdea681f92ee for compose.c
Legend:
- Unmodified
- Added
- Removed
-
compose.c
r1792 r1794 418 418 * cum_attachs_size: Cumulative Attachments Size 419 419 * 420 * Returns the total number of bytes used by the attachments in the 421 * attachment list _after_ content-transfer-encodings have been 422 * applied. 420 423 * 421 * Returns the total number of bytes used by the attachments in the422 * attachment list.423 424 */ 424 425 … … 429 430 ATTACHPTR **idx = menu->data; 430 431 CONTENT *info; 432 BODY *b; 431 433 432 434 for (i = 0, s = 0; i < menu->max; i++) 433 435 { 434 if ((info = idx[i]->content->content)) 436 b = idx[i]->content; 437 438 if (!b->content) 439 b->content = mutt_get_content_info (b->filename, b); 440 441 if ((info = b->content)) 435 442 { 436 switch ( idx[i]->content->encoding)443 switch (b->encoding) 437 444 { 438 445 case ENCQUOTEDPRINTABLE: 439 s += 3 * (info->lobin + info->hibin) + info->ascii ;446 s += 3 * (info->lobin + info->hibin) + info->ascii + info->crlf; 440 447 break; 441 448 case ENCBASE64: 442 s += (4 * (info->lobin + info->hibin + info->ascii )) / 3;449 s += (4 * (info->lobin + info->hibin + info->ascii + info->crlf)) / 3; 443 450 break; 444 451 default: 445 s += info->lobin + info->hibin + info->ascii ;452 s += info->lobin + info->hibin + info->ascii + info->crlf; 446 453 break; 447 454 }
