]>
git.saurik.com Git - apt.git/blob - test/scratch.cc
2 /*void basic_string<char,string_char_traits<char>,alloc>::Rep::release()
4 cout << "Release " << (void *)this << ' ' << ref << endl;
5 if (--ref == 0) delete this;
8 basic_string<char,string_char_traits<char>,alloc>::~basic_string()
10 cout << "Destroy " << (void *)this << ',' << rep()->ref << endl;
16 #include <apt-pkg/tagfile.h>
17 #include <apt-pkg/strutl.h>
19 #include <apt-pkg/cachefile.h>
20 #include <apt-pkg/pkgrecords.h>
21 #include <apt-pkg/error.h>
22 #include <apt-pkg/init.h>
34 int main(int argc
,char *argv
[])
38 pkgInitialize(*_config
);
39 if (Cache
.Open(Prog
,false) == false)
45 pkgRecords
rec(*Cache
);
48 pkgCache::VerIterator V
= (*Cache
)[Cache
->PkgBegin()].CandidateVerIter(*Cache
);
49 pkgRecords::Parser
&Parse
= rec
.Lookup(V
.FileList());
50 string Foo
= Parse
.ShortDesc();
52 cout
<< (reinterpret_cast<Rep
*>(Foo
.begin()) - 1)[0].ref
<< endl
;
54 // cout << Foo << endl;
56 // cout << rec.Lookup(V.FileList()).ShortDesc() << endl;
62 cout
<< U
.Access
<< endl
;
63 cout
<< U
.User
<< endl
;
64 cout
<< U
.Password
<< endl
;
65 cout
<< U
.Host
<< endl
;
66 cout
<< U
.Path
<< endl
;
67 cout
<< U
.Port
<< endl
;
70 FileFd F(argv[1],FileFd::ReadOnly);
74 while (Reader.Step(Sect) == true)
76 Sect.FindS("Package");
77 Sect.FindS("Section");
78 Sect.FindS("Version");