2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
9 #include <proto/datatypes.h>
10 #include "datatypes_intern.h"
12 /*****************************************************************************
16 AROS_LH3(ULONG
*, CopyDTMethods
,
19 AROS_LHA(ULONG
*, methods
, A0
),
20 AROS_LHA(ULONG
*, include
, A1
),
21 AROS_LHA(ULONG
*, exclude
, A2
),
24 struct Library
*, DataTypesBase
, 45, DataTypes
)
28 Copy and modify an array of methods. This is used by subclass implementors
29 who want to add supported methods to an existing class.
33 methods -- array of methods; may be NULL
34 include -- array of methods to include terminated with ~0UL; may be NULL
35 method -- array of methods to exclude terminated with ~0UL; may be NULL.
39 The new array of methods or NULL if something went wrong (like out of
50 FindMethod(), CopyDTTriggerMethods(), FreeDTMethods()
54 When a method is specified both in the 'include' and the 'exclude',
59 2.8.99 SDuvan implemented
61 *****************************************************************************/
85 if(FindMethod(methods
, *exc
) != NULL
)
95 newM
= AllocVec((nMethods
+ 1)*sizeof(ULONG
), MEMF_PUBLIC
);
97 /* No memory available? */
104 /* Copy new methods */
107 while(*include
!= ~0)
108 *newmets
++ = *include
++;
111 /* Copy old methods except the excluded ones */
114 if(FindMethod(exclude
, *met
) == NULL
)
125 } /* CopyDTMethods */