revert between 56095 -> 55830 in arch
[AROS.git] / compiler / arossupport / libnexttagitem.c
blobe8db5bf3434e2ac3c72a681f6f02ce5705122665
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/arossupport.h>
8 struct TagItem *LibNextTagItem(struct TagItem **tagListPtr)
10 if (!(*tagListPtr))
11 return NULL;
13 while(1)
15 switch(((*tagListPtr)->ti_Tag))
17 case TAG_MORE:
18 if (!((*tagListPtr) = (struct TagItem *)(*tagListPtr)->ti_Data))
19 return NULL;
20 continue;
22 case TAG_IGNORE:
23 break;
25 case TAG_END:
26 (*tagListPtr) = 0;
27 return NULL;
29 case TAG_SKIP:
30 (*tagListPtr) += (*tagListPtr)->ti_Data + 1;
31 continue;
33 default:
34 return (*tagListPtr)++;
38 (*tagListPtr)++;