diff options
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 6 | ||||
-rw-r--r-- | apt-pkg/contrib/configuration.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index bc48ddefd..18d6cd9ab 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.cc,v 1.23 2002/09/14 05:29:22 jgg Exp $ +// $Id: configuration.cc,v 1.24 2002/11/09 17:11:25 doogie Exp $ /* ###################################################################### Configuration Class @@ -397,14 +397,14 @@ bool Configuration::ExistsAny(const char *Name) const // Configuration::Dump - Dump the config /*{{{*/ // --------------------------------------------------------------------- /* Dump the entire configuration space */ -void Configuration::Dump() +void Configuration::Dump(ostream& str) { /* Write out all of the configuration directives by walking the configuration tree */ const Configuration::Item *Top = Tree(0); for (; Top != 0;) { - clog << Top->FullTag() << " \"" << Top->Value << "\";" << endl; + str << Top->FullTag() << " \"" << Top->Value << "\";" << endl; if (Top->Child != 0) { diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index bc2b0fd15..418e210bc 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.h,v 1.14 2001/05/07 05:06:52 jgg Exp $ +// $Id: configuration.h,v 1.15 2002/11/09 17:11:25 doogie Exp $ /* ###################################################################### Configuration Class @@ -33,6 +33,7 @@ #endif #include <string> +#include <iostream> using std::string; @@ -90,7 +91,8 @@ class Configuration inline const Item *Tree(const char *Name) const {return Lookup(Name);}; - void Dump(); + inline void Dump() { Dump(clog); }; + void Dump(ostream& str); Configuration(const Item *Root); Configuration(); |