~ubuntu-branches/ubuntu/quantal/recoll/quantal

« back to all changes in this revision

Viewing changes to internfile/mh_mbox.cpp

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry
  • Date: 2012-03-27 12:15:51 UTC
  • mfrom: (1.3.8)
  • Revision ID: package-import@ubuntu.com-20120327121551-nmntidzpehudushy
Tags: 1.17.1-1
* New upstream release.
* Enable Python module resulting into new binary: python-recoll.
* debian/control:
  + Updated Build-Deps: libqtwebkit-dev, python-all-dev.
  + Added python-recoll binary.
  + Updated Standards-Version to 3.9.3
* debian/rules:
  + Build Python module by default.
* debian/recoll.menu, debian/python-recoll.install, debian/recoll.install:
  + Changes for new binary package.
* debian/copyright:
  + Updated to copyright-format 1.0
  + Updated upstream and Debian copyright.
  + Fixed unicode.org/copyright.html URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <cstring>
30
30
#include <map>
31
31
 
 
32
#include "cstr.h"
32
33
#include "mimehandler.h"
33
34
#include "debuglog.h"
34
35
#include "readfile.h"
144
145
        string blk1;
145
146
        blk1.append("udi=");
146
147
        blk1.append(udi);
147
 
        blk1.append("\n");
 
148
        blk1.append(cstr_newline);
148
149
        blk1.resize(o_b1size, 0);
149
150
        if (fwrite(blk1.c_str(), 1, o_b1size, fp) != o_b1size) {
150
151
            LOGDEB(("MboxCache::put_offsets: fwrite errno %d\n", errno));
384
385
    }
385
386
    FILE *fp = (FILE *)m_vfp;
386
387
    int mtarg = 0;
387
 
    if (m_ipath != "") {
 
388
    if (!m_ipath.empty()) {
388
389
        sscanf(m_ipath.c_str(), "%d", &mtarg);
389
390
    } else if (m_forPreview) {
390
391
        // Can't preview an mbox. 
434
435
    off_t message_end = 0;
435
436
    bool iseof = false;
436
437
    bool hademptyline = true;
437
 
    string& msgtxt = m_metaData["content"];
 
438
    string& msgtxt = m_metaData[cstr_dj_keycontent];
438
439
    msgtxt.erase();
439
440
    line_type line;
440
441
    for (;;) {
498
499
    // m_msgnum was incremented when hitting the next From_ or eof, so the data
499
500
    // is for m_msgnum - 1
500
501
    sprintf(buf, "%d", m_msgnum - 1); 
501
 
    m_metaData["ipath"] = buf;
502
 
    m_metaData["mimetype"] = "message/rfc822";
 
502
    m_metaData[cstr_dj_keyipath] = buf;
 
503
    m_metaData[cstr_dj_keymt] = "message/rfc822";
503
504
    if (iseof) {
504
505
        LOGDEB2(("MimeHandlerMbox::next: eof hit\n"));
505
506
        m_havedoc = false;
524
525
 
525
526
#include "rclconfig.h"
526
527
#include "rclinit.h"
 
528
#include "cstr.h"
527
529
#include "mh_mbox.h"
528
530
 
529
531
static char *thisprog;
590
592
            exit(1);
591
593
        }
592
594
        map<string, string>::const_iterator it = 
593
 
            mh.get_meta_data().find("content");
 
595
            mh.get_meta_data().find(cstr_dj_keycontent);
594
596
        int size;
595
597
        if (it == mh.get_meta_data().end()) {
596
598
            size = -1;
610
612
        }
611
613
        docnt++;
612
614
        map<string, string>::const_iterator it = 
613
 
            mh.get_meta_data().find("content");
 
615
            mh.get_meta_data().find(cstr_dj_keycontent);
614
616
        int size;
615
617
        if (it == mh.get_meta_data().end()) {
616
618
            size = -1;