[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

After you've stored your lci in a contextnode, you will no doubt want to
be able to find it again later.  You do this with the function
findlocalitem(), which is called as follows:

    lci = FindLocalItem (iff, type, id, ident);

findlocalitem() attempts to locate an lci having the specified type, id,
and identification values.  The search proceeds as follows (refer to
figure 33-3 to understand this better).

findlocalitem() starts at the top (current) contextnode and searches all
lcis in that context.  if no matching lcis are found, it proceeds down the
context stack to the next ContextNode and searches all its LCIs.  The
process repeats until it finds the desired LCI (whereupon it returns a
pointer to it), or reaches the end without finding anything (where it
returns NULL).

    Context Stack Position.
    -----------------------
    lcis higher in the stack will "override" lower lcis with the
    same type, ID, and identification field.  This is how property
    scoping is handled.  As contextnodes are popped off the context
    stack, all its LCIs are deleted as well.  See the section on
    "freeing lcis" below for additional information on deleting lcis.