muimaster.library: update minor version
[AROS.git] / arch / m68k-amiga / setpatch / findpatch.c
blob7058db0cdcd45e9da240e658156a55868c5dc33e
1 /*
2 Copyright © <year>, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <string.h>
8 #include <proto/exec.h>
10 #include LC_LIBDEFS_FILE
12 /*****************************************************************************
14 NAME */
15 #include <proto/setpatch.h>
17 AROS_LH1(struct PatchEntry *, FindPatch,
19 /* SYNOPSIS */
20 AROS_LHA(CONST_STRPTR, name, A0),
22 /* LOCATION */
23 struct SetPatchBase *, SetPatchBase, 7, Setpatch)
25 /* FUNCTION
27 INPUTS
29 name - Name of the patch to search for
31 RESULT
33 Pointer to the patch entry if found, or NULL
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 HISTORY
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 struct PatchEntry *pe, *peret = NULL;
53 ObtainSemaphore(&SetPatchBase->sp_Patch3.sp_Semaphore);
54 ForeachNode(&SetPatchBase->sp_Patch3.sp_PatchList, pe) {
55 if (strcmp(pe->pe_Name,name) == 0) {
56 peret = pe;
57 break;
60 ReleaseSemaphore(&SetPatchBase->sp_Patch3.sp_Semaphore);
62 return peret;
64 AROS_LIBFUNC_EXIT