Nonsense removed: upper case and lower case the same time.
[AROS.git] / rom / utility / maptags.c
blob861d7722b52c754959f6edae5c5408157bec6b82
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <utility/tagitem.h>
14 #include <proto/utility.h>
16 AROS_LH3(void, MapTags,
18 /* SYNOPSIS */
19 AROS_LHA(struct TagItem *, tagList, A0),
20 AROS_LHA(struct TagItem *, mapList, A1),
21 AROS_LHA(ULONG , mapType, D0),
23 /* LOCATION */
24 struct Library *, UtilityBase, 10, Utility)
26 /* FUNCTION
27 Replace the ti_Tags in tagList which match the ti_Tags in mapList
28 by the ti_Data values of mapList.
30 INPUTS
31 tagList - This list is modified
32 mapList - This defines which ti_Tag is replaced with what new value.
34 RESULT
35 None.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 HISTORY
48 29-10-95 digulla automatically created from
49 utility_lib.fd and clib/utility_protos.h
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
54 struct TagItem * tag, * map;
56 while ((tag = NextTagItem ((const struct TagItem **)&tagList)))
58 if (mapList && (map = FindTagItem (tag->ti_Tag, mapList)))
60 if (map->ti_Data == TAG_DONE)
61 tag->ti_Tag = TAG_IGNORE;
62 else
63 tag->ti_Tag = (ULONG)map->ti_Data;
65 else if (mapType == MAP_REMOVE_NOT_FOUND)
66 tag->ti_Tag = TAG_IGNORE;
70 AROS_LIBFUNC_EXIT
71 } /* MapTags */