+ DepList::const_iterator cit = deplist.begin();
+ DepList::const_iterator end = deplist.end();
+ for (; cit != end; ++cit) {
+ if (suffixIs(cit->first.absFilename(), ext)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool DepTable::exist(FileName const & fil) const
+{
+ return deplist.find(fil) != deplist.end();
+}
+
+
+void DepTable::remove_files_with_extension(string const & suf)
+{
+ DepList::iterator cit = deplist.begin();
+ DepList::iterator end = deplist.end();
+ while (cit != end) {
+ if (suffixIs(cit->first.absFilename(), suf)) {
+ // Can't erase the current iterator, but we
+ // can increment and then erase.
+ // Deplist is a map so only the erased
+ // iterator is invalidated.
+ DepList::iterator doomed = cit++;
+ deplist.erase(doomed);
+ continue;
+ }
+ ++cit;
+ }
+}
+
+
+void DepTable::remove_file(FileName const & filename)
+{
+ DepList::iterator cit = deplist.begin();
+ DepList::iterator end = deplist.end();
+ while (cit != end) {
+ if (cit->first == filename) {
+ // Can't erase the current iterator, but we
+ // can increment and then erase.
+ // deplist is a map so only the erased
+ // iterator is invalidated.
+ DepList::iterator doomed = cit++;
+ deplist.erase(doomed);
+ continue;
+ }
+ ++cit;
+ }
+}
+
+
+void DepTable::write(FileName const & f) const
+{
+ ofstream ofs(f.toFilesystemEncoding().c_str());
+ DepList::const_iterator cit = deplist.begin();
+ DepList::const_iterator end = deplist.end();
+ for (; cit != end; ++cit) {
+ if (lyxerr.debugging(Debug::DEPEND)) {
+ // Store the second (most recently calculated)
+ // CRC value.
+ // The older one is effectively set to 0 upon re-load.