2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Internal information for utility.library.
8 #ifndef UTILITY_INTERN_H
9 #define UTILITY_INTERN_H
12 #include <exec/types.h>
15 #include <exec/nodes.h>
18 #include <exec/lists.h>
20 #ifndef EXEC_LIBRARIES_H
21 #include <exec/libraries.h>
24 #include <exec/memory.h>
29 #ifndef EXEC_SEMAPHORES_H
30 #include <exec/semaphores.h>
32 #ifndef UTILITY_TAGITEM_H
33 #include <utility/tagitem.h>
35 #ifndef UTILITY_NAME_H
36 #include <utility/name.h>
38 #ifndef UTILITY_DATE_H
39 #include <utility/date.h>
41 #ifndef UTILITY_PACK_H
42 #include <utility/pack.h>
44 #ifndef AROS_LIBCALL_H
45 #include <aros/libcall.h>
48 #include <aros/debug.h>
50 #ifndef UTILITY_UTILITY_H
51 #include <utility/utility.h>
54 #include <proto/alib.h>
57 #include <proto/exec.h>
59 #ifndef PROTO_UTILITY_H
60 #include <proto/utility.h>
63 /* Definition of a utility namespace, needed here for the library base. */
67 struct MinList ns_List
;
68 struct SignalSemaphore ns_Lock
;
73 This is the internal version of the UtilityBase structure
78 struct UtilityBase UBase
;
80 /* This is where the private data starts. */
82 struct NameSpace ub_NameSpace
;
85 #define GetIntUtilityBase(ub) ((struct IntUtilityBase *)(ub))
86 #define GetUtilityBase(ub) (&GetIntUtilityBase(ub)->UBase)
89 Internal versions of the NamedObject structures.
90 Access using GetIntNamedObject()
92 I have a problem here of sorts. The autodocs do not give enough
93 information really. They say it is possible to nest NamedObjects
94 with namespaces, however the implementation didn't allow NamedObjects
95 with their own namespaces to be members of a namespace.
97 However, the autodocs are right, so you can nest like that.
100 struct IntNamedObject
102 struct NamedObject no
;
105 struct NameSpace
*no_ParentSpace
; /* The NameSpace I am in */
106 struct NameSpace
*no_NameSpace
; /* My NameSpace */
107 struct Message
*no_FreeMessage
;
112 #define GetIntNamedObject(no) ((struct IntNamedObject *)(no))
113 #define GetNamedObject(no) (&GetIntNamedObject(no)->no)
115 /* Internal function prototypes */
116 struct NameSpace
*GetNameSpace(struct NamedObject
*, struct UtilityBase
*);
117 struct IntNamedObject
*IntFindNamedObj(struct NameSpace
*, struct Node
*, CONST_STRPTR
, struct UtilityBase
*);
120 Access union to get a some memory in Pack|UnpackStructureTags(). I use
123 b) it avoids any bizarre aliasing problems in the compiler.
124 c) did I say it makes stuff easier to read? :-)