From: Jean-Marc Lasgouttes Date: Wed, 8 Jan 2003 09:54:18 +0000 (+0000) Subject: fix order of fields in deptable X-Git-Tag: 1.6.10~17717 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=750795620f6c3cb246d1e186da4e429cb68d242c;p=features.git fix order of fields in deptable git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5918 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 63cebf4818..c67685cf85 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-12-20 Jean-Marc Lasgouttes + + * DepTable.C (write): write the file name as last element of the + .dep file (because it may contain spaces) + (read): read info in the right order + 2003-01-07 Jean-Marc Lasgouttes * paragraph_pimpl.C (simpleTeXBlanks): diff --git a/src/DepTable.C b/src/DepTable.C index 6ee37d4093..c148a7e865 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -41,6 +41,7 @@ using std::ofstream; using std::ifstream; using std::flush; using std::endl; +using std::getline; inline @@ -225,13 +226,13 @@ void DepTable::write(string const & f) const // CRC value. // The older one is effectively set to 0 upon re-load. lyxerr << "Write dep: " - << cit->first << ' ' << cit->second.crc_cur << ' ' - << cit->second.mtime_cur << endl; + << cit->second.mtime_cur << ' ' + << cit->first << endl; } - ofs << cit->first << ' ' - << cit->second.crc_cur << ' ' - << cit->second.mtime_cur << endl; + ofs << cit->second.crc_cur << ' ' + << cit->second.mtime_cur << ' ' + << cit->first << endl; } } @@ -244,12 +245,13 @@ void DepTable::read(string const & f) // This doesn't change through the loop. di.crc_prev = 0; - while (ifs >> nome >> di.crc_cur >> di.mtime_cur) { + while (ifs >> di.crc_cur >> di.mtime_cur && getline(ifs, nome)) { + nome = ltrim(nome); if (lyxerr.debugging(Debug::DEPEND)) { lyxerr << "Read dep: " - << nome << ' ' << di.crc_cur << ' ' - << di.mtime_cur << endl; + << di.mtime_cur << ' ' + << nome << endl; } deplist[nome] = di; }