Switch to unified view

a/src/bincimapmime/mime-printbody.cc b/src/bincimapmime/mime-printbody.cc
...
...
49
#ifndef NO_NAMESPACES
49
#ifndef NO_NAMESPACES
50
using namespace ::std;
50
using namespace ::std;
51
#endif /* NO_NAMESPACES */
51
#endif /* NO_NAMESPACES */
52
52
53
//------------------------------------------------------------------------
53
//------------------------------------------------------------------------
54
void Binc::MimePart::printBody(int fd, IODevice &output,
54
void Binc::MimePart::printBody(IODevice &output,
55
                   unsigned int startoffset,
55
                   unsigned int startoffset,
56
                   unsigned int length) const
56
                   unsigned int length) const
57
{
57
{
58
  if (!mimeSource || mimeSource->getFileDescriptor() != fd) {
59
    delete mimeSource;
60
    mimeSource = new MimeInputSource(fd);
61
  }
62
63
  mimeSource->reset();
58
  mimeSource->reset();
64
  mimeSource->seek(bodystartoffsetcrlf + startoffset);
59
  mimeSource->seek(bodystartoffsetcrlf + startoffset);
65
60
66
  if (startoffset + length > bodylength)
61
  if (startoffset + length > bodylength)
67
    length = bodylength - startoffset;
62
    length = bodylength - startoffset;
...
...
71
    if (!mimeSource->getChar(&c))
66
    if (!mimeSource->getChar(&c))
72
      break;
67
      break;
73
68
74
    output << (char)c;
69
    output << (char)c;
75
  }
70
  }
76
}
77
78
void Binc::MimePart::getBody(int fd, string &s,
79
               unsigned int startoffset,
80
               unsigned int length) const
81
{
82
83
  if (!mimeSource || mimeSource->getFileDescriptor() != fd) {
84
    delete mimeSource;
85
    mimeSource = new MimeInputSource(fd);
86
  }
87
  getBody(s, startoffset, length);
88
}
71
}
89
72
90
void Binc::MimePart::getBody(string &s,
73
void Binc::MimePart::getBody(string &s,
91
                 unsigned int startoffset,
74
                 unsigned int startoffset,
92
                 unsigned int length) const
75
                 unsigned int length) const