X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDepTable.C;h=e3a5acc2621217fcbad6bb0f92b206b590333a15;hb=a858be7332e331e0244e4dba7b0931b6072ffd3d;hp=15aba4ae879bfb96a7b99f891da7168f1839c1a1;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=lyx.git diff --git a/src/DepTable.C b/src/DepTable.C index 15aba4ae87..e3a5acc262 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -14,18 +14,18 @@ #include #include "DepTable.h" -#include "lyxlib.h" -#include "filetools.h" +#include "support/lyxlib.h" +#include "support/filetools.h" DepTable::DepTable() { new_sum = 0; old_sum = 0; - next = NULL; + next = 0; } -DepTable::DepTable(LString const & f, +DepTable::DepTable(string const & f, bool upd, unsigned long one, unsigned long two) @@ -46,21 +46,21 @@ DepTable::DepTable(LString const & f, char tmp2[256]; sprintf(tmp1, "%lu", new_sum); sprintf(tmp2, "%lu", old_sum); - lyxerr.debug("New file inserted in deplog: " + - file + " " + - tmp1 + " " + tmp2); + lyxerr.debug() << "New file inserted in deplog: " + << file << " " + << tmp1 << " " << tmp2 << endl; } - next = NULL; + next = 0; } -void DepTable::insert(LString const & fi, +void DepTable::insert(string const & fi, bool upd, unsigned long one, unsigned long two) { // not quite sure if this is the correct place for MakeAbsPath - LString f = MakeAbsPath(fi); + string f = MakeAbsPath(fi); if (f == file) return; // exist already in the log if (next) next->insert(f, upd, one, two); @@ -79,8 +79,8 @@ void DepTable::update() char tmp2[256]; sprintf(tmp1, "%lu", new_sum); sprintf(tmp2, "%lu", old_sum); - lyxerr.debug("update: " + file + " " + - tmp1 + " " + tmp2); + lyxerr.debug() << "update: " << file << " " + << tmp1 << " " << tmp2 << endl; } } if (next) next->update(); @@ -100,10 +100,10 @@ bool DepTable::sumchange() } -bool DepTable::haschanged(LString const & f) +bool DepTable::haschanged(string const & f) { // not quite sure if this is the correct place for MakeAbsPath - LString fil = MakeAbsPath(f); + string fil = MakeAbsPath(f); bool ret = false; if (!fil.empty() && !file.empty() && fil == file) { @@ -115,14 +115,14 @@ bool DepTable::haschanged(LString const & f) } -void DepTable::write(LString const&f) +void DepTable::write(string const&f) { FilePtr fp(f, FilePtr::write); if (fp() && next) next->write(fp()); } -void DepTable::read(LString const &f) +void DepTable::read(string const &f) { FilePtr fp(f, FilePtr::read); if (fp()) { // file opened @@ -141,11 +141,11 @@ void DepTable::read(LString const &f) char tmp2[255]; sprintf(tmp1, "%lu", one); sprintf(tmp2, "%lu", two); - lyxerr.debug(LString("read dep: ") + - nome + " " + tmp1 + - " " + tmp2); + lyxerr.debug() << "read dep: " + << nome << " " << tmp1 + << " " << tmp2 << endl; } - insert(LString(nome), false, one, two); + insert(string(nome), false, one, two); } } } @@ -158,8 +158,8 @@ void DepTable::write(FILE * f) char tmp2[255]; sprintf(tmp1, "%lu", new_sum); sprintf(tmp2, "%lu", old_sum); - lyxerr.print("Write dep: " + file + " " + - tmp1 + " " + tmp2); + lyxerr << "Write dep: " << file << " " + << tmp1 << " " << tmp2 << endl; } fprintf(f, "%s %lu %lu\n", file.c_str(), new_sum, old_sum);