diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-11-10 16:32:52 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-11-10 16:32:52 +0100 |
commit | 71ecaad29d8066a494f516efc5efd80860653fe2 (patch) | |
tree | b0769df88e2b6496f23e3d899aeb1c240a3488d9 /test/conf.cc | |
parent | a865ed25fa54514224cf4d6f83dd9cf48b7ed02b (diff) | |
parent | 37adedc9d0b66eeae7efb88aebd08dfbc6e06f77 (diff) |
merged from http://bzr.debian.org/bzr/apt/apt/debian-experimental2
Diffstat (limited to 'test/conf.cc')
-rw-r--r-- | test/conf.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/test/conf.cc b/test/conf.cc deleted file mode 100644 index 340647b5f..000000000 --- a/test/conf.cc +++ /dev/null @@ -1,37 +0,0 @@ -#include <apt-pkg/configuration.h> -#include <apt-pkg/error.h> - -using namespace std; - -int main(int argc,const char *argv[]) -{ - Configuration Cnf; - - ReadConfigFile(Cnf,argv[1],true); - - // Process 'simple-key' type sections - const Configuration::Item *Top = Cnf.Tree("simple-key"); - for (Top = (Top == 0?0:Top->Child); Top != 0; Top = Top->Next) - { - Configuration Block(Top); - - string VendorID = Top->Tag; - string FingerPrint = Block.Find("Fingerprint"); - string Name = Block.Find("Name"); // Description? - - if (FingerPrint.empty() == true || Name.empty() == true) - _error->Error("Block %s is invalid",VendorID.c_str()); - - cout << VendorID << ' ' << FingerPrint << ' ' << Name << endl; - } - - // Print any errors or warnings found during parsing - if (_error->empty() == false) - { - bool Errors = _error->PendingError(); - _error->DumpErrors(); - return Errors == true?100:0; - } - - return 0; -} |