2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include "icon_intern.h"
9 #include <proto/utility.h>
11 /*****************************************************************************
14 #include <proto/icon.h>
16 AROS_LH2(BOOL
, MatchToolValue
,
19 AROS_LHA(UBYTE
*, typeString
, A0
),
20 AROS_LHA(UBYTE
*, value
, A1
),
23 struct Library
*, IconBase
, 17, Icon
)
26 Checks if the given tooltype has the supplied value.
27 Search is case-insensitive.
30 typeString - string containing the tooltype.
31 value - the value to match for.
34 TRUE if match, else FALSE.
48 *****************************************************************************/
55 /* Check if value has a bar in it */
67 /* Are they alike ? */
68 value_len
= strlen (value
);
70 if (!Strnicmp (typeString
, value
, value_len
))
72 /* Check that we have matched the *whole* word in typeString with value */
73 c
= *(typeString
+ value_len
);
75 if (c
== '|' || c
== 0)
80 /* Goto next entry in typeString */
81 while (c
= *typeString
, !((c
== '|') || (c
== 0)))
84 /* If we have a "|", skip it */
85 if (*typeString
== '|')
91 } /* MatchToolValue */