X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDepTable.C;h=90849bb0d770ca7e2e5687a8abadcda0eab15609;hb=09e01879979643949f1f2c7216023f1f35d5ada2;hp=8e0997f8cef643a55594c7430c86eb86bbfdae82;hpb=ae87b945156585b080ed155919f64b80e48d7a04;p=lyx.git diff --git a/src/DepTable.C b/src/DepTable.C index 8e0997f8ce..90849bb0d7 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -14,10 +14,6 @@ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #include "DepTable.h" #include "debug.h" @@ -37,6 +33,8 @@ using std::time; #endif +using namespace lyx::support; + using std::make_pair; using std::ofstream; using std::ifstream; @@ -61,7 +59,7 @@ void DepTable::insert(string const & fi, bool upd) di.crc_prev = 0; if (upd) { lyxerr[Debug::DEPEND] << " CRC..." << flush; - di.crc_cur = lyx::sum(f); + di.crc_cur = sum(f); lyxerr[Debug::DEPEND] << "done." << endl; struct stat f_info; stat(fi.c_str(), &f_info); @@ -94,7 +92,7 @@ void DepTable::update() } else { di.crc_prev = di.crc_cur; lyxerr[Debug::DEPEND] << itr->first << " CRC... "; - di.crc_cur = lyx::sum(itr->first); + di.crc_cur = sum(itr->first); lyxerr[Debug::DEPEND] << "done"; } } else { @@ -238,7 +236,7 @@ void DepTable::write(string const & f) const } -void DepTable::read(string const & f) +bool DepTable::read(string const & f) { ifstream ifs(f.c_str()); string nome; @@ -256,4 +254,5 @@ void DepTable::read(string const & f) } deplist[nome] = di; } + return deplist.size(); }