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


   NAME
        SetLocalItemPurge -- set purge vector for a local context item. (V36)

   SYNOPSIS
        SetLocalItemPurge(localItem, purgeHook);
                          A0         A1

        VOID SetLocalItemPurge(struct localcontextitem *, struct hook *);

   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
        localItem - pointer to a local context item.
        purgeHook - pointer to a hook structure.

   SEE ALSO
        alloclocalitem(), freelocalitem(), <utility/hooks.h>
        <libraries/iffparse.h>