(C) 1998 AROS - The Amiga Research OS


NAME
#include <utility/tagitem.h>
#include <proto/utility.h>

IPTR GetTagData (tagValue , defaultVal , tagList)

LOCATION
In UtilityBase at offset 6

SYNOPSIS
Tag tagValue
IPTR defaultVal
struct TagItem * tagList

FUNCTION
Searches the TagList for the Tag specified, if it exists, then returns the ti_Data field of that Tag, otherwise returns the supplied default value.

INPUTS
tagValue
Tag to search for.
defaultVal
Default value for the Tag.
tagList
Pointer to first TagItem in the list.

RESULT
The data value if the Tag exists, or the default value if it doesn't.

EXAMPLE
struct Window *window;	    \* The Window we are creating *\
struct TagItem *wintags;    \* Tags for this window *\

\* Find out the value for the WA_Left tag *\
window->Left = GetTagData( WA_Left, 320, wintags )
SEE ALSO
utility/tagitem.h

NOTES
If the input TagList doesn't exist (eg for some reason equals NULL), then the return value will be NULL. This way you can check for broken code, whereas returing the default would allow code that is possibly buggy to still seem to work. (Until you tried to do anything special at least).

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
20.08.1997 digulla
Polish.

Renamed utility_intern.h to intern.h.

27.03.1997 ldp
Added copyright line
26.03.1997 digulla
Polish.

return value and argument is IPTR

27.01.1997 ldp
Polish
10.12.1996 aros
Moved #include into first column to allow makedepend to see it.
24.10.1996 aros
Use proper Amiga datatypes (eg: ULONG not unsigned long)
24.10.1996 aros
Use the official AROS macros over the __AROS versions.
23.10.1996 aros
Formatted

Added parens to all assignments which are used truth expressions

22.10.1996 aros
Some more utility.library functions.