2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Find a NamedObject in a NameSpace.
8 --------------------------------------------------------------------
10 This function will start searching through a sublist of NamedObjects
11 looking for the node which has the correct name (case insensitive).
12 Case sensitive searches are done with FindName().
17 #include <proto/exec.h>
18 #include <proto/utility.h>
20 struct IntNamedObject
*
21 IntFindNamedObj(struct NameSpace
*ns
,
24 struct UtilityBase
*UtilityBase
)
26 struct IntNamedObject
*no
= NULL
;
28 if((ns
->ns_Flags
& NSF_CASE
))
30 no
= (struct IntNamedObject
*)
31 FindName((struct List
*)start
->ln_Pred
, name
);
35 /* We are at the end of the list when ln_Succ == NULL */
36 while(start
->ln_Succ
!= NULL
)
38 if(!Stricmp(name
, start
->ln_Name
))
41 We have found the node we are after.
42 Note, we actually get the correct address
45 no
= (struct IntNamedObject
*)start
;
47 start
= start
->ln_Succ
;
52 This is safe, since the Node occurs just after the public
53 part of the NamedObject, which is what we return.
56 return (struct IntNamedObject
*)((struct NamedObject
*)no
- 1);