using std::endl;
using std::string;
using std::vector;
-using std::mem_fun_ref;
#ifndef CXX_GLOBAL_CSTD
using std::exit;
last_loaded = b;
} else {
Buffer * buf = bufferlist.newBuffer(s, false);
- if (loadLyXFile(buf, s))
+ if (loadLyXFile(buf, s)) {
last_loaded = buf;
+ ErrorList const & el = buf->errorList("Parse");
+ if (!el.empty())
+ for_each(el.begin(), el.end(),
+ boost::bind(&LyX::printError, this, _1));
+ }
else
bufferlist.release(buf);
-
- ErrorList const & el = buf->getErrorList();
- if (!el.empty()) {
- // There should be a way to use the following but I (abdel) don't know
- // how to make it compile on MSVC2005.
- //for_each(el.begin(), el.end(), mem_fun_ref(&LyX::printError));
- for (ErrorList::const_iterator it = el.begin();
- it != el.end(); ++it) {
- printError(*it);
- }
- }
}
}
int parse_version(string const &, string const &)
{
lyxerr << "LyX " << lyx_version
- << " of " << lyx_release_date << endl;
+ << " (" << lyx_release_date << ")" << endl;
lyxerr << "Built on " << __DATE__ << ", " << __TIME__ << endl;
lyxerr << lyx_version_info << endl;