Switch to unified view

a/src/bincimapmime/mime-parsefull.cc b/src/bincimapmime/mime-parsefull.cc
...
...
337
    // if there is no delimiter, we just read until the end of the
337
    // if there is no delimiter, we just read until the end of the
338
    // file.
338
    // file.
339
    if (!delimiterqueue)
339
    if (!delimiterqueue)
340
      continue;
340
      continue;
341
341
342
    delimiterqueue[delimiterpos++ % endpos] = c;
342
    delimiterqueue[delimiterpos++] = c;
343
343
    if (delimiterpos ==  endpos)
344
      delimiterpos = 0;
345
      
344
    if (compareStringToQueue(delimiterStr, delimiterqueue,
346
    if (compareStringToQueue(delimiterStr, delimiterqueue,
345
                 delimiterpos, endpos)) {
347
                 delimiterpos, endpos)) {
346
      foundBoundary = true;
348
      foundBoundary = true;
347
      break;
349
      break;
348
    }
350
    }
...
...
533
  int endpos = _toboundary.length();
535
  int endpos = _toboundary.length();
534
  if (toboundary != "") {
536
  if (toboundary != "") {
535
    boundaryqueue = new char[endpos];
537
    boundaryqueue = new char[endpos];
536
    memset(boundaryqueue, 0, endpos);
538
    memset(boundaryqueue, 0, endpos);
537
  }
539
  }
538
  int boundarypos = 0;
539
540
540
  *boundarysize = 0;
541
  *boundarysize = 0;
541
542
542
  const char *_toboundaryStr = _toboundary.c_str();
543
  const char *_toboundaryStr = _toboundary.c_str();
543
  string line;
544
  string line;
544
  bool toboundaryIsEmpty = (toboundary == "");
545
  bool toboundaryIsEmpty = (toboundary == "");
545
  char c;
546
  char c;
547
  int boundarypos = 0;
546
  while (mimeSource->getChar(&c)) {
548
  while (mimeSource->getChar(&c)) {
547
    if (c == '\n') { ++*nbodylines; ++*nlines; }
549
    if (c == '\n') { ++*nbodylines; ++*nlines; }
548
550
549
    if (toboundaryIsEmpty)
551
    if (toboundaryIsEmpty)
550
      continue;
552
      continue;
551
553
552
    // find boundary
554
    // find boundary
553
    boundaryqueue[boundarypos++ % endpos] = c;
555
    boundaryqueue[boundarypos++] = c;
556
    if (boundarypos == endpos)
557
      boundarypos = 0;
554
      
558
      
555
    if (compareStringToQueue(_toboundaryStr, boundaryqueue,
559
    if (compareStringToQueue(_toboundaryStr, boundaryqueue,
556
                 boundarypos, endpos)) {
560
                 boundarypos, endpos)) {
557
      *boundarysize = _toboundary.length();
561
      *boundarysize = _toboundary.length();
558
      break;
562
      break;