On Sun, 20 Jun 1999, Aaron Turner wrote:

> I was hoping someone could give me some pointers that I could either
> forward to my friend so that he could do it, or so that when I pick up one
> of the 5 or so C++ books I have laying around I can figure it out myself.
> (I've done a lot of Pascal/Perl programming in the past, so I know how to
> program, just not C++ or much OOP.)

OK, so here's the start of the loop:

    results->Start_Get();
    while ((cpid = results->Get_Next()))
    {
        int id = atoi(cpid);

        DocumentRef *thisRef = docDB[id];

        //
        // If it wasn't there, then ignore it
        //
        if (thisRef == 0)
        {
            continue;
        }

All this does is go through the result list, tries to retrieve it from the
docDB, etc.

What you'd want to do is build up some way of establishing whether this
current document (thisRef) is a duplicate. If so, you'd have something
like

if (duplcateList.exists(thisRef))
{
  continue;
}

That's it. Since I don't know how you'd want to build your list of
duplicates, I can't help you. However, it seems pretty straightforward to
me... There are definitely parts of the code that need some cleaning up.
But I have to say, to Andrew (and the other contributors' credit), the
code is much easier for me to read than a lot of other code out there.

-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to