2 Copyright © 1995-2001, 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 *****************************************************************************/
48 AROS_LIBBASE_EXT_DECL(struct ExecBase
*,SysBase
)
52 list
= SysBase
->ResModules
;
59 If bit 31 is set, this doesn't point to a Resident module, but
60 to another list of modules.
62 if(*list
& 0x80000000) list
= (ULONG
*)(*list
& 0x7fffffff);
64 if(!(strcmp( ((struct Resident
*)*list
)->rt_Name
, name
)) )
66 return (struct Resident
*)*list
;