Support rastport clipping rectangle for layerless rastports
[tangerine.git] / rom / utility / maptags.c
blob6eb49f5043b4b5bca7306344931cd717830fb1a5
1 /*
2 Copyright © 1995-2001, 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 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;
63 else
64 tag->ti_Tag = (ULONG)map->ti_Data;
66 else if (mapType == MAP_REMOVE_NOT_FOUND)
67 tag->ti_Tag = TAG_IGNORE;
71 AROS_LIBFUNC_EXIT
72 } /* MapTags */