2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
10 /*****************************************************************************
13 #include <utility/tagitem.h>
14 #include <proto/utility.h>
16 AROS_LH3(void, MapTags
,
19 AROS_LHA(struct TagItem
*, tagList
, A0
),
20 AROS_LHA(struct TagItem
*, mapList
, A1
),
21 AROS_LHA(ULONG
, mapType
, D0
),
24 struct Library
*, UtilityBase
, 10, Utility
)
27 Replace the ti_Tags in tagList which match the ti_Tags in mapList
28 by the ti_Data values of mapList.
31 tagList - This list is modified
32 mapList - This defines which ti_Tag is replaced with what new value.
48 29-10-95 digulla automatically created from
49 utility_lib.fd and clib/utility_protos.h
51 *****************************************************************************/
54 struct TagItem
* tag
, * map
;
56 while ((tag
= NextTagItem (&tagList
)))
58 if (mapList
&& (map
= FindTagItem (tag
->ti_Tag
, mapList
)))
60 if (map
->ti_Data
== TAG_DONE
)
61 tag
->ti_Tag
= TAG_IGNORE
;
63 tag
->ti_Tag
= (ULONG
)map
->ti_Data
;
65 else if (mapType
== MAP_REMOVE_NOT_FOUND
)
66 tag
->ti_Tag
= TAG_IGNORE
;