--- a/src/internfile/mh_mbox.cpp
+++ b/src/internfile/mh_mbox.cpp
@@ -29,6 +29,7 @@
#include <cstring>
#include <map>
+#include "cstr.h"
#include "mimehandler.h"
#include "debuglog.h"
#include "readfile.h"
@@ -144,7 +145,7 @@
string blk1;
blk1.append("udi=");
blk1.append(udi);
- blk1.append("\n");
+ blk1.append(cstr_newline);
blk1.resize(o_b1size, 0);
if (fwrite(blk1.c_str(), 1, o_b1size, fp) != o_b1size) {
LOGDEB(("MboxCache::put_offsets: fwrite errno %d\n", errno));
@@ -384,7 +385,7 @@
}
FILE *fp = (FILE *)m_vfp;
int mtarg = 0;
- if (m_ipath != "") {
+ if (!m_ipath.empty()) {
sscanf(m_ipath.c_str(), "%d", &mtarg);
} else if (m_forPreview) {
// Can't preview an mbox.
@@ -434,7 +435,7 @@
off_t message_end = 0;
bool iseof = false;
bool hademptyline = true;
- string& msgtxt = m_metaData["content"];
+ string& msgtxt = m_metaData[cstr_content];
msgtxt.erase();
line_type line;
for (;;) {
@@ -498,8 +499,8 @@
// m_msgnum was incremented when hitting the next From_ or eof, so the data
// is for m_msgnum - 1
sprintf(buf, "%d", m_msgnum - 1);
- m_metaData["ipath"] = buf;
- m_metaData["mimetype"] = "message/rfc822";
+ m_metaData[cstr_ipath] = buf;
+ m_metaData[cstr_mimetype] = "message/rfc822";
if (iseof) {
LOGDEB2(("MimeHandlerMbox::next: eof hit\n"));
m_havedoc = false;
@@ -590,7 +591,7 @@
exit(1);
}
map<string, string>::const_iterator it =
- mh.get_meta_data().find("content");
+ mh.get_meta_data().find(cstr_content);
int size;
if (it == mh.get_meta_data().end()) {
size = -1;
@@ -610,7 +611,7 @@
}
docnt++;
map<string, string>::const_iterator it =
- mh.get_meta_data().find("content");
+ mh.get_meta_data().find(cstr_content);
int size;
if (it == mh.get_meta_data().end()) {
size = -1;