diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:57 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:57 +0000 |
commit | 2b154e536a0df3afb318ddcf9b7daf9337de3c23 (patch) | |
tree | 40d2dcee41e246a3d281d289cc5c2615f897a388 /test | |
parent | a9e5851b62cde2945fe3af44438b202c04c6703f (diff) |
Http download fixes
Author: jgg
Date: 1999-02-27 22:29:11 GMT
Http download fixes
Diffstat (limited to 'test')
-rw-r--r-- | test/scratch.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/test/scratch.cc b/test/scratch.cc index de306e802..dc02e059a 100644 --- a/test/scratch.cc +++ b/test/scratch.cc @@ -1,22 +1,21 @@ -#include <apt-pkg/acquire-item.h> -#include <apt-pkg/acquire-worker.h> -#include <apt-pkg/init.h> -#include <apt-pkg/error.h> -#include <strutl.h> +#include <apt-pkg/tagfile.h> #include <signal.h> #include <stdio.h> int main(int argc,char *argv[]) { - - URI Foo(argv[1]); - cout << Foo.Access << '\'' << endl; - cout << Foo.Host << '\'' << endl; - cout << Foo.Path << '\'' << endl; - cout << Foo.User << '\'' << endl; - cout << Foo.Password << '\'' << endl; - cout << Foo.Port << endl; + FileFd F(argv[1],FileFd::ReadOnly); + pkgTagFile Reader(F); + + pkgTagSection Sect; + while (Reader.Step(Sect) == true) + { + Sect.FindS("Package"); + Sect.FindS("Section"); + Sect.FindS("Version"); + Sect.FindI("Size"); + }; return 0; } |