summaryrefslogtreecommitdiff
path: root/src/mime-parseonlyheader.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mime-parseonlyheader.cc')
-rw-r--r--src/mime-parseonlyheader.cc34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/mime-parseonlyheader.cc b/src/mime-parseonlyheader.cc
index d36efbf..5245aa5 100644
--- a/src/mime-parseonlyheader.cc
+++ b/src/mime-parseonlyheader.cc
@@ -4,28 +4,28 @@
* @author Andreas Aardal Hanssen
* @date 2002-2005
* ----------------------------------------------------------------- **/
-#include "mime.h"
-#include "mime-utils.h"
-#include "mime-inputsource.h"
#include "convert.h"
-#include <string>
-#include <vector>
-#include <map>
+#include "mime-inputsource.h"
+#include "mime-utils.h"
+#include "mime.h"
+
#include <exception>
#include <iostream>
+#include <map>
+#include <string>
+#include <vector>
-#include <string.h>
#include <ctype.h>
-#include <stdio.h>
#include <errno.h>
+#include <stdio.h>
+#include <string.h>
using namespace ::std;
//------------------------------------------------------------------------
void Binc::MimeDocument::parseOnlyHeader(int fd) const
{
- if (allIsParsed || headerIsParsed)
- return;
+ if (allIsParsed || headerIsParsed) return;
headerIsParsed = true;
@@ -75,7 +75,7 @@ int Binc::MimePart::parseOnlyHeader(const string &toboundary) const
if (c == ':') break;
if (c == '\n') {
for (int i = name.length() - 1; i >= 0; --i)
- mimeSource->ungetChar();
+ mimeSource->ungetChar();
quit = true;
name = "";
@@ -116,11 +116,10 @@ int Binc::MimePart::parseOnlyHeader(const string &toboundary) const
}
if (cqueue[2] == '\n') {
- // guess the mime rfc says what can not appear on the beginning
- // of a line.
- if (!isspace(cqueue[3])) {
- if (content.length() > 2)
- content.resize(content.length() - 2);
+ // guess the mime rfc says what can not appear on the beginning
+ // of a line.
+ if (!isspace(cqueue[3])) {
+ if (content.length() > 2) content.resize(content.length() - 2);
trim(content);
h.add(name, content);
@@ -135,8 +134,7 @@ int Binc::MimePart::parseOnlyHeader(const string &toboundary) const
}
if (name != "") {
- if (content.length() > 2)
- content.resize(content.length() - 2);
+ if (content.length() > 2) content.resize(content.length() - 2);
h.add(name, content);
}