Minor fixes to comments.
[AROS.git] / rom / exec / openresource.c
blob918815ad661db79961ea17e525c25a0a2c460ce2
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Open a resource.
6 Lang: english
7 */
8 #include <exec/execbase.h>
9 #include <exec/lists.h>
10 #include <aros/libcall.h>
11 #include <exec/libraries.h>
12 #include <proto/exec.h>
14 /*****************************************************************************
16 NAME */
18 AROS_LH1(APTR, OpenResource,
20 /* SYNOPSIS */
21 AROS_LHA(CONST_STRPTR, resName, A1),
23 /* LOCATION */
24 struct ExecBase *, SysBase, 83, Exec)
26 /* FUNCTION
27 Return a pointer to a previously installed resource addressed by
28 name. If this name can't be found NULL is returned.
30 INPUTS
31 resName - Pointer to the resource's name.
33 RESULT
34 Pointer to resource or NULL.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 AddResource(), RemResource()
45 INTERNALS
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 APTR resource;
53 /* Arbitrate for the resource list */
54 Forbid();
56 /* Look for the resource in our list */
57 resource = (APTR) FindName (&SysBase->ResourceList, resName);
59 /* All done. */
60 Permit();
61 return resource;
62 AROS_LIBFUNC_EXIT
63 } /* OpenResource */