X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDepTable.C;h=d2fc3f1b9032f5bfc92aafb28637b57245417982;hb=9e5bd1d609877e602cb697bc695d410e2ab48e0d;hp=856a07ef429db6ff9dfac61916fb250367c198c6;hpb=252db967fb3f7d23b3a84e42ca35037de5f1c5be;p=lyx.git diff --git a/src/DepTable.C b/src/DepTable.C index 856a07ef42..d2fc3f1b90 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -2,10 +2,10 @@ * ====================================================== * * LyX, The Document Processor - * Copyright (C) 1995 Matthias Ettrich - * Copyright (C) 1995-1998 The LyX Team. + * Copyright 1995 Matthias Ettrich + * Copyright 1995-2000 The LyX Team. * - * This file is Copyright (C) 1996-1998 + * This file is Copyright 1996-2000 * Lars Gullik Bjønnes * * ====================================================== @@ -21,9 +21,11 @@ #include "support/lyxlib.h" #include "support/filetools.h" #include + using std::make_pair; using std::ofstream; using std::ifstream; +using std::endl; void DepTable::insert(string const & fi, bool upd, @@ -35,7 +37,7 @@ void DepTable::insert(string const & fi, if (deplist.find(f) == deplist.end()) { if (upd) { one = two; - two = lyxsum(f.c_str()); + two = lyx::sum(f.c_str()); } deplist[f] = make_pair(one, two); } @@ -48,11 +50,14 @@ void DepTable::update() itr != deplist.end(); ++itr) { unsigned long one = (*itr).second.second; - unsigned long two = lyxsum((*itr).first.c_str()); + unsigned long two = lyx::sum((*itr).first.c_str()); (*itr).second = make_pair(one, two); - if (lyxerr.debugging()) { - lyxerr << "update: " << (*itr).first << " " - << one << " " << two << endl; + if (lyxerr.debugging(Debug::DEPEND)) { + lyxerr << "Update dep: " << (*itr).first << " " + << one << " " << two; + if (one != two) + lyxerr << " +"; + lyxerr << endl; } } } @@ -93,7 +98,6 @@ bool DepTable::extchanged(string const & ext) const return true; } } - return false; } @@ -125,7 +129,7 @@ void DepTable::write(string const & f) const for (DepList::const_iterator cit = deplist.begin(); cit != deplist.end(); ++cit) { - if (lyxerr.debugging()) { + if (lyxerr.debugging(Debug::DEPEND)) { lyxerr << "Write dep: " << (*cit).first << " " << (*cit).second.first << " " @@ -145,8 +149,8 @@ void DepTable::read(string const & f) unsigned long one = 0; unsigned long two = 0; while(ifs >> nome >> one >> two) { - if (lyxerr.debugging()) { - lyxerr << "read dep: " + if (lyxerr.debugging(Debug::DEPEND)) { + lyxerr << "Read dep: " << nome << " " << one << " " << two << endl;