- string const file_with_path = params.filename.absFilename();
- formats.edit(buffer, file_with_path,
- formats.getFormatFromFile(file_with_path));
+ formats.edit(buffer, params.filename,
+ formats.getFormatFromFile(params.filename));
- support::latex_path(path, ext, dots) :
- support::os::external_path(path);
+ support::latex_path(path, ext, dots) : path;
string const filename = external_in_tmpdir ?
params.filename.mangledFilename() :
params.filename.outputFilename(parentpath);
string const filename = external_in_tmpdir ?
params.filename.mangledFilename() :
params.filename.outputFilename(parentpath);
- string const basename = support::ChangeExtension(
- support::OnlyFilename(filename), string());
- string const absname = support::MakeAbsPath(filename, parentpath);
+ string const basename = support::changeExtension(
+ support::onlyFilename(filename), string());
+ string const absname = support::makeAbsPath(filename, parentpath).absFilename();
- string const filepath = support::OnlyPath(filename);
- string const abspath = support::OnlyPath(absname);
+ string const filepath = support::onlyPath(filename);
+ string const abspath = support::onlyPath(absname);
- string relToMasterPath = support::OnlyPath(
- support::MakeRelPath(absname, masterpath));
+ string relToMasterPath = support::onlyPath(
+ support::makeRelPath(absname, masterpath));
- string relToParentPath = support::OnlyPath(
- support::MakeRelPath(absname, parentpath));
+ string relToParentPath = support::onlyPath(
+ support::makeRelPath(absname, parentpath));
relToParentPath, use_latex_path,
support::PROTECT_EXTENSION,
support::ESCAPE_DOTS);
relToParentPath, use_latex_path,
support::PROTECT_EXTENSION,
support::ESCAPE_DOTS);
result = subst_path(result, "$$AbsOrRelPathMaster",
abspath, use_latex_path,
support::PROTECT_EXTENSION,
result = subst_path(result, "$$AbsOrRelPathMaster",
abspath, use_latex_path,
support::PROTECT_EXTENSION,
result = subst_path(result, "$$Basename", basename, use_latex_path,
support::PROTECT_EXTENSION, support::ESCAPE_DOTS);
result = subst_path(result, "$$Extension",
result = subst_path(result, "$$Basename", basename, use_latex_path,
support::PROTECT_EXTENSION, support::ESCAPE_DOTS);
result = subst_path(result, "$$Extension",
- '.' + support::GetExtension(filename), use_latex_path);
- result = subst_path(result, "$$Tempname", params.tempname(), use_latex_path);
+ '.' + support::getExtension(filename), use_latex_path);
+ result = subst_path(result, "$$Tempname", params.tempname().absFilename(), use_latex_path);
result = subst_path(result, "$$Sysdir",
support::package().system_support(), use_latex_path);
result = subst_path(result, "$$Sysdir",
support::package().system_support(), use_latex_path);
- string const filepath = support::isFileReadable(file) ?
- buffer.filePath() : m_buffer->temppath();
- support::Path p(filepath);
-
- if (support::isFileReadable(file))
- contents = support::GetFileContents(file);
+ FileName const absfile(
+ support::makeAbsPath(file, m_buffer->temppath()));
+ if (support::isFileReadable(absfile))
+ contents = support::getFileContents(absfile);
result = support::subst(result,
("$$Contents(\"" + file + "\")").c_str(),
result = support::subst(result,
("$$Contents(\"" + file + "\")").c_str(),
- string const temp_file =
- support::MakeAbsPath(params.filename.mangledFilename(),
- m_buffer->temppath());
- if (!abs_from_file.empty()) {
- unsigned long const from_checksum = support::sum(abs_from_file);
+ FileName const temp_file(
+ support::makeAbsPath(params.filename.mangledFilename(),
+ m_buffer->temppath()));
+ if (!params.filename.empty()) {
+ unsigned long const from_checksum = support::sum(params.filename);
- Mover const & mover = movers(from_format);
- if (!mover.copy(abs_from_file, temp_file)) {
+ Mover const & mover = getMover(from_format);
+ if (!mover.copy(params.filename, temp_file)) {
string const to_file = doSubstitution(params, buffer,
outputFormat.updateResult,
false, true);
string const to_file = doSubstitution(params, buffer,
outputFormat.updateResult,
false, true);
- string const abs_to_file =
- support::MakeAbsPath(to_file, m_buffer->temppath());
+ FileName const abs_to_file(
+ support::makeAbsPath(to_file, m_buffer->temppath()));
vector<string>::const_iterator fit = rit->second.begin();
vector<string>::const_iterator fend = rit->second.end();
for (; fit != fend; ++fit) {
vector<string>::const_iterator fit = rit->second.begin();
vector<string>::const_iterator fend = rit->second.end();
for (; fit != fend; ++fit) {
doSubstitution(params, buffer, *fit,
false, true),
doSubstitution(params, buffer, *fit,
false, true),
// The path of the referenced file is never the
// temp path, but the filename may be the mangled
// or the real name. Therefore we substitute the
// The path of the referenced file is never the
// temp path, but the filename may be the mangled
// or the real name. Therefore we substitute the
// Yes if to_file does not exist or if from_file is newer than to_file
if (support::compare_timestamps(temp_file, abs_to_file) < 0)
return; // SUCCESS
// Yes if to_file does not exist or if from_file is newer than to_file
if (support::compare_timestamps(temp_file, abs_to_file) < 0)
return; // SUCCESS
- converters.convert(&buffer, temp_file, to_file_base,
- from_format, to_format, true);
+ theConverters().convert(&buffer, temp_file, abs_to_file,
+ params.filename, from_format, to_format, el,
+ Converters::try_default | Converters::try_cache);
use_latex_path, external_in_tmpdir);
str = substituteCommands(params, str, format);
str = substituteOptions(params, str, format);
use_latex_path, external_in_tmpdir);
str = substituteCommands(params, str, format);
str = substituteOptions(params, str, format);