alsa.audio: limit the supported frequencies to common set
[AROS.git] / workbench / libs / datatypes / findtriggermethod.c
blob30014175b4b631e35fe5f3318e9c87504434af38
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>
11 /*****************************************************************************
13 NAME */
15 AROS_LH3(struct DTMethod *, FindTriggerMethod,
17 /* SYNOPSIS */
18 AROS_LHA(struct DTMethod *, methods, A0),
19 AROS_LHA(STRPTR , command, A1),
20 AROS_LHA(ULONG , method , D0),
22 /* LOCATION */
23 struct Library *, DataTypesBase, 44, DataTypes)
25 /* FUNCTION
27 Search for a specific trigger method in a array of trigger methods (check
28 if either 'command' or 'method' matches).
30 INPUTS
32 methods -- array of trigger methods; may be NULL
33 command -- name of trigger method (may be NULL; if so, 'command'
34 is not matched against)
35 method -- id of trigger method to search for (may be ~0; if so, don't
36 match against 'method'.
38 RESULT
40 Pointer to trigger method table entry (struct DTMethod *) or NULL if the
41 method wasn't found.
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 GetDTTriggerMethods(), CopyDTTriggerMethods()
53 INTERNALS
55 HISTORY
57 2.8.99 SDuvan implemented
59 *****************************************************************************/
61 AROS_LIBFUNC_INIT
63 struct DTMethod *retval = NULL;
65 if (methods)
67 while(methods->dtm_Method != STM_DONE)
69 if(command != NULL)
71 if(Stricmp(methods->dtm_Command, command) == 0)
73 retval = methods;
74 break;
78 if(method != ~0)
80 if(methods->dtm_Method == method)
82 retval = methods;
83 break;
87 methods++;
91 return retval;
93 AROS_LIBFUNC_EXIT
95 } /* FindTriggerMethod */