2 Copyright © 1995-2001, 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 AROS_LIBBASE_EXT_DECL(struct Library
*,UtilityBase
)
55 struct TagItem
* tag
, * map
;
57 while ((tag
= NextTagItem ((const struct TagItem
**)&tagList
)))
59 if (mapList
&& (map
= FindTagItem (tag
->ti_Tag
, mapList
)))
61 if (map
->ti_Data
== TAG_DONE
)
62 tag
->ti_Tag
= TAG_IGNORE
;
64 tag
->ti_Tag
= (ULONG
)map
->ti_Data
;
66 else if (mapType
== MAP_REMOVE_NOT_FOUND
)
67 tag
->ti_Tag
= TAG_IGNORE
;