Table of Contents

NextTagArg

Finds the next TagArg in a tag list.

Synopsis

TagArg *NextTagArg( const TagArg **tagList );

Description

This function iterates through a tag list, skipping and chaining as dictated by control tags. There are three control tags:

This function only returns TagArgs which are not system tags. Each call returns either the next TagArg you should examine, or NULL when the end of the list has been reached.

Arguments

Return Value

This function returns a pointer to a TagArg structure, or NULL if all the tags have been visited. None of the control tags are ever returned to you, they are handled transparently by this function.

Example

Example 1: Example for NextTagArg

void WalkTagList(const TagArg *tags)
{
TagArg *state;
TagArg *currentTag;
 
    state = tags;
        while ((tag = NextTagItem(&state)) != NULL)
    {
            switch (tag->ta_Tag)
            {
                case TAG1: // process this tag
                           break;
 
                case TAG2: // process this tag
                           break;
 
                default  : // unknown tag, return an error
                       break;
        }
        }
}

Implementation

Folio call implemented in kernel folio V24.

Associated Files

tags.h

See Also

FindTagArg()