+bool DepTable::ext_exist(string const & ext) const
+{
+ DepList::const_iterator cit = deplist.begin();
+ DepList::const_iterator end = deplist.end();
+ for (; cit != end; ++cit) {
+ if (suffixIs(cit->first, ext)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool DepTable::exist(string 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, 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(string const & filename)
+{
+ DepList::iterator cit = deplist.begin();
+ DepList::iterator end = deplist.end();
+ while (cit != end) {
+ if (onlyFilename(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(string const & f) const