This is the mail archive of the
mailing list for the Cygwin project.
Re: Re: new branch tagged for setup
----- Original Message -----
From: "Pavel Tsekov" <email@example.com>
To: "Robert Collins" <firstname.lastname@example.org>
> It seems to be gone :)
Yes, ermm, cough, cough. I had a bug in my new code, which I was still
tracking down here. It's fixed now, in CVS, and a new snapshot is on the
> Since the code has changed quite a bit since the previous snapshot I
> had to add some code to get the contents of the dependencies - please
> just take a look to see if this is the proper code to extract the
> vector <vector <PackageSpecification *> *> *ppp;
> if ((ppp = pkg.desired.depends ()) != 0)
pkg.desired() is never NULL. It's guaranteed to point at a valid vector.
> int sz = ppp->size ();
> for (int i = 0; i < sz; i++)
> for (unsigned int j = 0; j < (*ppp)[i]->size (); j++)
> String sss;
> sss = (*((*ppp)[i]))[j]->packageName();
You might find the following code a little easier (extracted from
Note the use of iterators, and that this code dumps version information in
the specification as well.
log (LOG_BABBLE) << "Depends:"
for (vector<vector <PackageSpecification *> *>::const_iterator iAnd =
pkg.desired()->begin(); iAnd != pkg.desired()->end(); ++iAnd)
for (vector<PackageSpecification *>::const_iterator i=
i != (*iAnd)->end(); ++i)
log(LOG_BABBLE) << **i << " |" << endLog;
log (LOG_BABBLE) << "end of OR list," << endLog;
I plan on making this much more readable and then making an operator String
for vector<vector <PackageSpecification *> *> to allow easy dumping.