revert between 56095 -> 55830 in arch
[AROS.git] / rom / utility / applytagchanges.c
blob43b5c3797f15f08ec54a07abda17feec75a2e6e2
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <exec/types.h>
9 #include <utility/tagitem.h>
10 #include <utility/utility.h>
11 #include <aros/libcall.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/utility.h>
18 AROS_LH2(void, ApplyTagChanges,
20 /* SYNOPSIS */
21 AROS_LHA(struct TagItem *, list, A0),
22 AROS_LHA(struct TagItem *, changelist, A1),
24 /* LOCATION */
25 struct UtilityBase *, UtilityBase, 31, Utility)
27 /* FUNCTION
29 INPUTS
31 RESULT
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 HISTORY
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 /* Loop over the whole list */
50 for(;;)
52 switch(list->ti_Tag)
54 /* End of list */
55 case TAG_END:
56 return;
57 /* Ignore this tag */
58 case TAG_IGNORE:
59 break;
60 /* Jump to new tag list */
61 case TAG_MORE:
62 list=(struct TagItem *)list->ti_Data;
63 continue;
64 /* Ignore this and skip the next ti_Data tags */
65 case TAG_SKIP:
66 list+=list->ti_Data;
67 break;
68 /* Normal tag */
69 default:
71 struct TagItem *tagitem;
72 /* Try to find it in the changelist */
73 tagitem=FindTagItem(list->ti_Tag,changelist);
75 if(tagitem!=NULL)
76 /* Found it. Replace it. */
77 list->ti_Data=tagitem->ti_Data;
78 break;
81 /* Got to next tag */
82 list++;
84 AROS_LIBFUNC_EXIT
85 } /* ApplyTagChanges */