2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: FilterTagChanges() - filter unchanged tags from a list.
10 /*****************************************************************************
13 #include <proto/utility.h>
15 AROS_LH3(void, FilterTagChanges
,
18 AROS_LHA(struct TagItem
* , changeList
, A0
),
19 AROS_LHA(const struct TagItem
*, originalList
, A1
),
20 AROS_LHA(BOOL
, apply
, D0
),
23 struct Library
*, UtilityBase
, 9, Utility
)
26 This function will scan through changeList, and if an item in
27 changeList exists in originalList, but both items data values
28 are equal, then the item in changeList will be removed from the
31 If the value of apply is TRUE, then if the datas are different
32 then the values in originalList will be updated to match those
36 changeList - List of new tags (may be NULL).
37 originalList - List of existing tags (may be NULL).
38 apply - Boolean flag as to whether the values in
39 originalList should be updated to match
43 The changeList will be modified to show altered items, and if
44 requested, the originalList will be updated.
58 29-10-95 digulla automatically created from
59 utility_lib.fd and clib/utility_protos.h
61 *****************************************************************************/
65 if (originalList
&& changeList
)
67 struct TagItem
*change
, *orig
;
69 while ((change
= NextTagItem((const struct TagItem
**)&changeList
)))
71 if ((orig
= FindTagItem(change
->ti_Tag
, originalList
)))
73 if (change
->ti_Data
== orig
->ti_Data
)
75 change
->ti_Tag
= TAG_IGNORE
;
80 orig
->ti_Data
= change
->ti_Data
;
82 } /* if (FindTagItem()) */
83 } /* while (changeList++) */
84 } /* if (lists are both valid) */
87 } /* FilterTagChanges */