pfdCleanTree question

New Message Reply Date view Thread view Subject view Author view

AnitaKishore (kishore++at++electrogig.com)
Thu, 29 Feb 1996 12:33:22 -0800


I am trying to use my own function to decide if a node should ibe cleaned
up or not. This is in the pfiv loader - pfiv.C

So I do the following in pfiv.C:

if (DoClean)
        result = pfdCleanTree(result, cleanNode);

"cleanNode" is my function which will decide about node deletion and is
as follows:

int cleanNode(pfuTraverser *trav)
{
        pfGroup *currGrp = (pfGroup *) trav->node;

        if (currGrp == doNotDeleteNode)
            return FALSE;
        else return TRUE;
}

The above function fails because "trav->node" is NULL. Why doesn't "trav"
have a proper node address?

Am I not using it properly? Do I need to declare a separate traverser
and call pfuInitTraverser on it in pfiv.C?

Please help....

-anita

----------------------------------------------------------------------
Anita Kishore
kishore++at++electrogig.com
----------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:29 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.