diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/inifile.cc | 41 | ||||
-rw-r--r-- | base/inifile.hh | 18 | ||||
-rw-r--r-- | base/trace.cc | 2 |
3 files changed, 2 insertions, 59 deletions
diff --git a/base/inifile.cc b/base/inifile.cc index 94b17966a..862e4082f 100644 --- a/base/inifile.cc +++ b/base/inifile.cc @@ -334,47 +334,6 @@ IniFile::find(const string §ionName, const string &entryName, } bool -IniFile::findDefault(const string &_section, const string &entry, - string &value) const -{ - string section = _section; - while (!findAppend(section, entry, value)) { - if (!find(section, "default", section)) { - return false; - } - } - - return true; -} - -bool -IniFile::findAppend(const string &_section, const string &entry, - string &value) const -{ - string section = _section; - bool ret = false; - bool first = true; - - do { - string val; - if (find(section, entry, val)) { - ret = true; - if (first) { - value = val; - first = false; - } else { - value += " "; - value += val; - } - - } - } while (find(section, "append", section)); - - return ret; -} - - -bool IniFile::sectionExists(const string §ionName) const { return findSection(sectionName) != NULL; diff --git a/base/inifile.hh b/base/inifile.hh index 58a657db4..d5d6bab5e 100644 --- a/base/inifile.hh +++ b/base/inifile.hh @@ -190,24 +190,6 @@ class IniFile bool find(const std::string §ion, const std::string &entry, std::string &value) const; - /// Find value corresponding to given section and entry names, - /// following "default" links to other sections where possible. - /// Value is returned by reference in 'value' param. - /// @return True if found, false if not. - bool findDefault(const std::string §ion, const std::string &entry, - std::string &value) const; - - /** - * Find a value corresponding to the given section and entry names - * following "append" links to other sections where possible. - * @param section The section to start with. - * @param entry The entry to find. - * @param value The value found. - * @return True if the entry was found. - */ - bool findAppend(const std::string §ion, const std::string &entry, - std::string &value) const; - /// Determine whether the named section exists in the .ini file. /// Note that the 'Section' class is (intentionally) not public, /// so all clients can do is get a bool that says whether there diff --git a/base/trace.cc b/base/trace.cc index aa4e7b2af..c9d4a0f78 100644 --- a/base/trace.cc +++ b/base/trace.cc @@ -98,6 +98,8 @@ Log::append(Record *rec) // dump record to output stream if there's one open if (dprintf_stream != NULL) { rec->dump(*dprintf_stream); + } else { + rec->dump(cout); } // no buffering: justget rid of it now |