From 93bf083d699c60f1ac40297bfa6783fb0cb800d8 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:15 +0000 Subject: Sync Author: jgg Date: 1998-10-30 07:53:30 GMT Sync --- apt-pkg/contrib/configuration.cc | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'apt-pkg/contrib/configuration.cc') diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index fa07ed35a..27299ec6a 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.8 1998/10/22 04:56:45 jgg Exp $ +// $Id: configuration.cc,v 1.9 1998/10/30 07:53:42 jgg Exp $ /* ###################################################################### Configuration Class @@ -212,6 +212,31 @@ bool Configuration::Exists(const char *Name) return true; } /*}}}*/ +// Configuration::Dump - Dump the config /*{{{*/ +// --------------------------------------------------------------------- +/* Dump the entire configuration space */ +void Configuration::Dump() +{ + /* Write out all of the configuration directives by walking the + configuration tree */ + const Configuration::Item *Top = _config->Tree(0); + for (; Top != 0;) + { + clog << Top->FullTag() << " \"" << Top->Value << "\";" << endl; + + if (Top->Child != 0) + { + Top = Top->Child; + continue; + } + + while (Top != 0 && Top->Next == 0) + Top = Top->Parent; + if (Top != 0) + Top = Top->Next; + } +} + /*}}}*/ // Configuration::Item::FullTag - Return the fully scoped tag /*{{{*/ // --------------------------------------------------------------------- -- cgit v1.2.3