grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / datatypes / findmethod.c
blob28260f7f05eecb3b8f158fbed822fcb8a12c8cf2
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include "datatypes_intern.h"
9 #include <proto/utility.h>
10 #include <utility/tagitem.h>
11 #include <dos/dostags.h>
13 /*****************************************************************************
15 NAME */
17 AROS_LH2(ULONG *, FindMethod,
19 /* SYNOPSIS */
20 AROS_LHA(ULONG *, methods , A0),
21 AROS_LHA(ULONG , searchmethodid, A1),
23 /* LOCATION */
24 struct Library *, DataTypesBase, 43, DataTypes)
26 /* FUNCTION
28 Search for a specific method in a array of methods.
30 INPUTS
32 methods -- array of methods; may be NULL
33 searchmethodid -- method to search for
35 RESULT
37 Pointer to method table entry or NULL if the method wasn't found.
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 GetDTMethods(), CopyDTMethods()
49 INTERNALS
51 HISTORY
53 2.8.99 SDuvan implemented
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 if(methods == NULL)
60 return NULL;
62 while(((LONG)(*methods)) != -1)
64 if(*methods == searchmethodid)
65 return methods;
67 methods++;
70 return NULL;
72 AROS_LIBFUNC_EXIT
73 } /* FindMethod */