#include "Lexer.h"
#include "LyXRC.h"
#include "Mover.h"
-#include "debug.h"
#include "support/convert.h"
+#include "support/debug.h"
#include "support/filetools.h"
#include "support/lyxlib.h"
#include "support/lyxtime.h"
#include <boost/assert.hpp>
#include <boost/crc.hpp>
-#include <boost/current_function.hpp>
#include <algorithm>
#include <fstream>
cache_name = FileName(addName(cache_dir.absFilename(), os.str()));
LYXERR(Debug::FILES, "Add file cache item " << orig_from
<< ' ' << to_format << ' ' << cache_name
- << ' ' << timestamp << ' ' << checksum << '.');
+ << ' ' << long(timestamp) << ' ' << checksum << '.');
}
~CacheItem() {}
FileName cache_name;
if (!lyxrc.use_converter_cache || orig_from.empty() ||
converted_file.empty())
return;
- LYXERR(Debug::FILES, BOOST_CURRENT_FUNCTION << ' ' << orig_from
+ LYXERR(Debug::FILES, ' ' << orig_from
<< ' ' << to_format << ' ' << converted_file);
// FIXME: Should not hardcode this (see bug 3819 for details)
}
// Maybe the contents is still the same?
item->timestamp = timestamp;
- unsigned long const checksum = support::sum(orig_from);
+ unsigned long const checksum = orig_from.checksum();
if (checksum == item->checksum) {
LYXERR(Debug::FILES, "Same checksum.");
return;
}
} else {
CacheItem new_item(orig_from, to_format, timestamp,
- support::sum(orig_from));
+ orig_from.checksum());
if (mover.copy(converted_file, new_item.cache_name,
support::onlyFilename(new_item.cache_name.absFilename()), 0600)) {
FormatCache & format_cache = pimpl_->cache[orig_from];
{
if (!lyxrc.use_converter_cache || orig_from.empty())
return;
- LYXERR(Debug::FILES, BOOST_CURRENT_FUNCTION << ' ' << orig_from
- << ' ' << to_format);
+ LYXERR(Debug::FILES, orig_from << ' ' << to_format);
CacheType::iterator const it1 = pimpl_->cache.find(orig_from);
if (it1 == pimpl_->cache.end())
{
if (!lyxrc.use_converter_cache || orig_from.empty())
return false;
- LYXERR(Debug::FILES, BOOST_CURRENT_FUNCTION << ' ' << orig_from
- << ' ' << to_format);
+ LYXERR(Debug::FILES, orig_from << ' ' << to_format);
CacheItem * const item = pimpl_->find(orig_from, to_format);
if (!item) {
LYXERR(Debug::FILES, "identical timestamp.");
return true;
}
- if (item->checksum == support::sum(orig_from)) {
+ if (item->checksum == orig_from.checksum()) {
item->timestamp = timestamp;
LYXERR(Debug::FILES, "identical checksum.");
return true;
FileName const & ConverterCache::cacheName(FileName const & orig_from,
string const & to_format) const
{
- LYXERR(Debug::FILES, BOOST_CURRENT_FUNCTION << ' ' << orig_from
- << ' ' << to_format);
+ LYXERR(Debug::FILES, orig_from << ' ' << to_format);
CacheItem * const item = pimpl_->find(orig_from, to_format);
BOOST_ASSERT(item);
{
if (!lyxrc.use_converter_cache || orig_from.empty() || dest.empty())
return false;
- LYXERR(Debug::FILES, BOOST_CURRENT_FUNCTION << ' ' << orig_from
- << ' ' << to_format << ' ' << dest);
+ LYXERR(Debug::FILES, orig_from << ' ' << to_format << ' ' << dest);
// FIXME: Should not hardcode this (see bug 3819 for details)
if (to_format == "pstex") {