2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
7 #include <utility/tagitem.h>
9 #include "kernel_intern.h"
11 struct TagItem
*krnNextTagItem(struct TagItem
**tagListPtr
)
13 if (!(*tagListPtr
)) return 0;
17 switch((*tagListPtr
)->ti_Tag
)
20 if (!((*tagListPtr
) = (struct TagItem
*)(*tagListPtr
)->ti_Data
))
31 (*tagListPtr
) += (*tagListPtr
)->ti_Data
+ 1;
35 return (struct TagItem
*)(*tagListPtr
)++;
42 struct TagItem
*krnFindTagItem(Tag tagValue
, struct TagItem
*tagList
)
45 struct TagItem
*tagptr
= tagList
;
47 while((tag
= krnNextTagItem(&tagptr
)))
49 if (tag
->ti_Tag
== tagValue
)
56 intptr_t krnGetTagData(Tag tagValue
, intptr_t defaultVal
, struct TagItem
*tagList
)
58 struct TagItem
*ti
= 0;
60 if (tagList
&& (ti
= krnFindTagItem(tagValue
, tagList
)))