mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
move some vars to smaller scope
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7899 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6cebb34085
commit
22c7835022
@ -87,12 +87,12 @@ void DepTable::update()
|
||||
if (stat(itr->first.c_str(), &f_info) == 0) {
|
||||
if (di.mtime_cur == f_info.st_mtime) {
|
||||
di.crc_prev = di.crc_cur;
|
||||
lyxerr[Debug::DEPEND] << itr->first << " same mtime";
|
||||
lyxerr[Debug::DEPEND] << itr->first << " same mtime" << endl;
|
||||
} else {
|
||||
di.crc_prev = di.crc_cur;
|
||||
lyxerr[Debug::DEPEND] << itr->first << " CRC... ";
|
||||
lyxerr[Debug::DEPEND] << itr->first << " CRC... " << flush;
|
||||
di.crc_cur = sum(itr->first);
|
||||
lyxerr[Debug::DEPEND] << "done";
|
||||
lyxerr[Debug::DEPEND] << "done" << endl;
|
||||
}
|
||||
} else {
|
||||
// file doesn't exist
|
||||
|
19
src/LaTeX.C
19
src/LaTeX.C
@ -676,11 +676,8 @@ namespace {
|
||||
|
||||
void handleFoundFile(string const & ff, DepTable & head)
|
||||
{
|
||||
static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
|
||||
|
||||
// convert from native os path to unix path
|
||||
string const foundfile = os::internal_path(trim(ff));
|
||||
string const onlyfile = OnlyFilename(foundfile);
|
||||
|
||||
lyxerr[Debug::DEPEND] << "Found file: " << foundfile << endl;
|
||||
|
||||
@ -701,18 +698,23 @@ void handleFoundFile(string const & ff, DepTable & head)
|
||||
// the latex run.
|
||||
if (FileInfo(foundfile).exist())
|
||||
head.insert(foundfile, true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
string const onlyfile = OnlyFilename(foundfile);
|
||||
|
||||
// (2) foundfile is in the tmpdir
|
||||
// insert it into head
|
||||
else if (FileInfo(onlyfile).exist()) {
|
||||
if (regex_match(foundfile, unwanted)) {
|
||||
if (FileInfo(onlyfile).exist()) {
|
||||
static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
|
||||
if (regex_match(onlyfile, unwanted)) {
|
||||
lyxerr[Debug::DEPEND]
|
||||
<< "We don't want "
|
||||
<< onlyfile
|
||||
<< " in the dep file"
|
||||
<< endl;
|
||||
} else if (suffixIs(foundfile, ".tex")) {
|
||||
} else if (suffixIs(onlyfile, ".tex")) {
|
||||
// This is a tex file generated by LyX
|
||||
// and latex is not likely to change this
|
||||
// during its runs.
|
||||
@ -720,7 +722,7 @@ void handleFoundFile(string const & ff, DepTable & head)
|
||||
<< "Tmpdir TeX file: "
|
||||
<< onlyfile
|
||||
<< endl;
|
||||
head.insert(foundfile, true);
|
||||
head.insert(onlyfile, true);
|
||||
} else {
|
||||
lyxerr[Debug::DEPEND]
|
||||
<< "In tmpdir file:"
|
||||
@ -767,7 +769,8 @@ void LaTeX::deplog(DepTable & head)
|
||||
string token;
|
||||
getline(ifs, token);
|
||||
token = rtrim(token, "\r");
|
||||
if (token.empty()) continue;
|
||||
if (token.empty())
|
||||
continue;
|
||||
|
||||
smatch sub;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user