Switch to unified view

a/src/internfile/mh_html.cpp b/src/internfile/mh_html.cpp
...
...
36
36
37
#include <iostream>
37
#include <iostream>
38
using namespace std;
38
using namespace std;
39
39
40
40
41
MimeHandler::Status 
41
bool MimeHandlerHtml::worker(RclConfig *conf, const string &fn, 
42
MimeHandlerHtml::worker(RclConfig *conf, const string &fn, 
42
                 const string &mtype, Rcl::Doc &docout)
43
            const string &mtype, Rcl::Doc &docout, string&)
43
{
44
{
44
    LOGDEB(("textHtmlToDoc: %s\n", fn.c_str()));
45
    LOGDEB(("textHtmlToDoc: %s\n", fn.c_str()));
45
    string otext;
46
    string otext;
46
    if (!file_to_string(fn, otext)) {
47
    if (!file_to_string(fn, otext)) {
47
    LOGINFO(("textHtmlToDoc: cant read: %s\n", fn.c_str()));
48
    LOGINFO(("textHtmlToDoc: cant read: %s\n", fn.c_str()));
48
  return false;
49
  return MimeHandler::MHError;
49
    }
50
    }
50
    return worker1(conf, fn, otext, mtype, docout);
51
    return worker1(conf, fn, otext, mtype, docout);
51
}
52
}
52
53
54
MimeHandler::Status 
53
bool MimeHandlerHtml::worker1(RclConfig *conf, const string &, 
55
MimeHandlerHtml::worker1(RclConfig *conf, const string &, 
54
                 const string& htext,
56
             const string& htext,
55
                 const string &mtype, Rcl::Doc &docout)
57
             const string &mtype, Rcl::Doc &docout)
56
{
58
{
57
    // Character set handling:
59
    // Character set handling:
58
60
59
    // - We first try to convert from the default configured charset
61
    // - We first try to convert from the default configured charset
60
    //   (which may depend of the current directory) to utf-8. If this
62
    //   (which may depend of the current directory) to utf-8. If this
...
...
109
    //    LOGDEB(("textHtmlToDoc: dump : %s\n", pres.dump.c_str()));
111
    //    LOGDEB(("textHtmlToDoc: dump : %s\n", pres.dump.c_str()));
110
    out.title = pres.title;
112
    out.title = pres.title;
111
    out.keywords = pres.keywords;
113
    out.keywords = pres.keywords;
112
    out.abstract = pres.sample;
114
    out.abstract = pres.sample;
113
    docout = out;
115
    docout = out;
114
    return true;
116
    return MimeHandler::MHDone;
115
}
117
}