mime.c (168515) | mime.c (173340) |
---|---|
1/* 2 * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1994, 1996-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1994 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#include <sendmail.h> 15#include <string.h> 16 | 1/* 2 * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1994, 1996-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1994 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#include <sendmail.h> 15#include <string.h> 16 |
17SM_RCSID("@(#)$Id: mime.c,v 8.146 2006/08/16 16:52:11 ca Exp $") | 17SM_RCSID("@(#)$Id: mime.c,v 8.147 2007/09/26 23:29:11 ca Exp $") |
18 19/* 20** MIME support. 21** 22** I am indebted to John Beck of Hewlett-Packard, who contributed 23** his code to me for inclusion. As it turns out, I did not use 24** his code since he used a "minimum change" approach that used 25** several temp files, and I wanted a "minimum impact" approach --- 494 unchanged lines hidden (view full) --- 520 sm_dprintf(" ...%s\n", buf); 521 } 522 if (!putline("", mci)) 523 goto writeerr; 524 mci->mci_flags &= ~MCIF_INHEADER; 525 while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf)) 526 != NULL) 527 { | 18 19/* 20** MIME support. 21** 22** I am indebted to John Beck of Hewlett-Packard, who contributed 23** his code to me for inclusion. As it turns out, I did not use 24** his code since he used a "minimum change" approach that used 25** several temp files, and I wanted a "minimum impact" approach --- 494 unchanged lines hidden (view full) --- 520 sm_dprintf(" ...%s\n", buf); 521 } 522 if (!putline("", mci)) 523 goto writeerr; 524 mci->mci_flags &= ~MCIF_INHEADER; 525 while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf)) 526 != NULL) 527 { |
528 bt = mimeboundary(buf, boundaries); 529 if (bt != MBT_NOTSEP) 530 break; 531 if (!putline(buf, mci)) | 528 if (!bitset(MCIF_INLONGLINE, mci->mci_flags)) 529 { 530 bt = mimeboundary(buf, boundaries); 531 if (bt != MBT_NOTSEP) 532 break; 533 } 534 if (!putxline(buf, strlen(buf), mci, 535 PXLF_MAPFROM|PXLF_NOADDEOL)) |
532 goto writeerr; 533 } 534 if (sm_io_eof(e->e_dfp)) 535 bt = MBT_FINAL; 536 } 537 else if (!MapNLtoCRLF || 538 (sectionsize / 8 < sectionhighbits && !use_qp)) 539 { --- 782 unchanged lines hidden --- | 536 goto writeerr; 537 } 538 if (sm_io_eof(e->e_dfp)) 539 bt = MBT_FINAL; 540 } 541 else if (!MapNLtoCRLF || 542 (sectionsize / 8 < sectionhighbits && !use_qp)) 543 { --- 782 unchanged lines hidden --- |