]> git.lyx.org Git - lyx.git/blobdiff - src/DepTable.C
Alfredo's second patch
[lyx.git] / src / DepTable.C
index c148a7e8652d8b0bd924f68b921aea3926d74975..a23c091660f58f9ffc9b4d8e0301743e6c2d4e51 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "DepTable.h"
 #include "debug.h"
 
 #include "support/lyxlib.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
+#include "support/lyxtime.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -79,7 +76,7 @@ void DepTable::insert(string const & fi, bool upd)
 void DepTable::update()
 {
        lyxerr[Debug::DEPEND] << "Updating DepTable..." << endl;
-       time_t start_time = time(0);
+       lyx::time_type const start_time = lyx::current_time();
 
        DepList::iterator itr = deplist.begin();
        while (itr != deplist.end()) {
@@ -114,7 +111,7 @@ void DepTable::update()
                }
                ++itr;
        }
-       time_t time_sec = time(0) - start_time;
+       lyx::time_type const time_sec = lyx::current_time() - start_time;
        lyxerr[Debug::DEPEND] << "Finished updating DepTable ("
                << time_sec << " sec)." << endl;
 }
@@ -237,7 +234,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;
@@ -255,4 +252,5 @@ void DepTable::read(string const & f)
                }
                deplist[nome] = di;
        }
+       return deplist.size();
 }