a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 utility.library
  AddNamedObject
  AllocNamedObjectA
  AllocateTagItems
  Amiga2Date
  ApplyTagChanges
  AttemptRemNamedObject
  CallHookPkt
  CheckDate
  CloneTagItems
  Date2Amiga
  FilterTagChanges
  FilterTagItems
  FindNamedObject
  FindTagItem
  FreeNamedObject
  FreeTagItems
  GetTagData
  GetUniqueID
  MapTags
  NamedObjectName
  NextTagItem
  PackBoolTags
  PackStructureTags
  RefreshTagItemClones
  ReleaseNamedObject
  RemNamedObject
  SDivMod32
  SMult32
  SMult64
  Stricmp
  Strnicmp
  TagInArray
  ToLower
  ToUpper
  UDivMod32
  UMult32
  UMult64
  UnpackStructureTags
Include
GuruMeditation
Docs » Autodocs » utility.library » NextTagItem

NAME

	NextTagItem -- iterate through a tag list. (V36)

SYNOPSIS

	tag = NextTagItem(tagItemPtr);
D0 A0
struct TagItem *NextTagItem(struct TagItem **);

FUNCTION

	Iterates through a tag list, skipping and chaining as dictated by
system tags. TAG_SKIP will cause it to skip the entry and a number
of following tags as specified in ti_Data. TAG_IGNORE ignores that
single entry, and TAG_MORE has a pointer to another array of tags (and
terminates the current array!). TAG_DONE also terminates the current
array. Each call returns either the next tagitem you should examine,
or NULL when the end of the list has been reached.

INPUTS

	tagItemPtr - doubly-indirect reference to a TagItem structure.
The pointer will be changed to keep track of the
iteration.

RESULT

	nextTag	- each TagItem in the array or chain of arrays that should be
processed according to system tag values defined in
<utility/tagitem.h>) is returned in turn with successive
calls.

EXAMPLE

	Iterate(struct TagItem *tags);
{
struct TagItem *tstate;
struct TagItem *tag;
tstate = tags;
while (tag = NextTagItem(&tstate))
{
switch (tag->ti_Tag)
{
case TAG1: ...
break;
case TAG2: ...
break;
...
}
}
}

WARNING

	Do NOT use the value of *tagItemPtr, but rather use the pointer
returned by NextTagItem().

SEE ALSO

<utility/tagitem.h>, GetTagData(), PackBoolTags(), FindTagItem()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Crystal

DC
SNT
CSL
SCX

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se