2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Search a resident module by name
8 #include "exec_intern.h"
10 #include <exec/resident.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
17 AROS_LH1(struct Resident
*, FindResident
,
20 AROS_LHA(const UBYTE
*, name
, A1
),
23 struct ExecBase
*, SysBase
, 16, Exec
)
26 Search for a Resident module in the system resident list.
29 name - pointer to the name of a Resident module to find
32 pointer to the Resident module (struct Resident *), or null if
45 *****************************************************************************/
51 list
= SysBase
->ResModules
;
58 If bit 31 is set, this doesn't point to a Resident module, but
59 to another list of modules.
61 if(*list
& 1) list
= (IPTR
*)(*list
& 0xfffffffffffffffe);
63 if(!(strcmp( ((struct Resident
*)*list
)->rt_Name
, name
)) )
65 return (struct Resident
*)*list
;