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


NAME
    SetLocalItemPurge -- Set purge vector for a local context item.

SYNOPSIS
    SetLocalItemPurge (item, purgehook)
                        a0      a1

    struct localcontextitem   *item;
    struct hook            *purgehook;

FUNCTION
    Sets a local context item to use a client-supplied cleanup (purge)
    vector for disposal when its context is popped.  The purge vector
    will be called when the contextnode containing this local item is
    popped off the context stack and is about to be deleted itself.  If
    the purge vector has not been set, the parser will use freelocalitem
    to delete the item, but if this function is used to set the purge
    vector, the supplied vector will be called with the following
    arguments:

            A0:     pointer to purgehook.
            A2:     pointer to localcontextitem to be freed.
            A1:     pointer to a LONG containing the value
                    IFFCMD_PURGELCI.

    The user purge vector is then responsible for calling freelocalitem()
    as part of its own cleanup.  Although the purge vector can return a
    value, it will be ignored -- purge vectors must always work (best to
    return 0, though).

INPUTS
    item      - pointer to local context item.
    purgehook - pointer to a hook structure.

RESULT

EXAMPLE

NOTES

BUGS

SEE ALSO
    alloclocalitem(), freelocalitem(), utility/hooks.h