grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / gadgets / aroslist / aroslist_intern.h
blobfa9265743c42bddf6f022a299e4ad034b9f4c042
1 /*
2 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef AROSLIST_INTERN_H
7 #define AROSLIST_INTERN_H
11 #ifndef EXEC_TYPES_H
12 # include <exec/types.h>
13 #endif
14 #ifndef EXEC_LIBRARIES_H
15 # include <exec/libraries.h>
16 #endif
17 #ifndef EXEC_LISTS_H
18 # include <exec/lists.h>
19 #endif
20 #ifndef DOS_BPTR_H
21 # include <dos/bptr.h>
22 #endif
23 #ifndef UTILTY_HOOKS_H
24 # include <utility/hooks.h>
25 #endif
27 struct ListEntry
29 struct ListEntry *le_Next;
30 UBYTE le_Flags;
32 APTR le_Item; /* The inserted item */
35 /* Flag bits for le_Flags */
36 #define LEFLG_SELECTED (1 << 0)
39 struct ListData
41 LONG ld_NumEntries;
42 /* How any entries are pssible to put into currently allocated buffer */
43 LONG ld_NumAllocated;
44 struct ListEntry *ld_EntryTables;
45 struct ListEntry *ld_UnusedEntries;
46 struct ListEntry **ld_PointerArray;
47 struct Hook *ld_ConstructHook;
48 struct Hook *ld_DestructHook;
49 APTR ld_Pool;
50 LONG ld_Active;
54 #define LD(x) ((struct ListData *)x)
56 #undef UB
57 #define UB(x) ((UBYTE *)x)
59 #define NUMENTRIES_TO_ADD 100
62 /* Macro to add a filentry at the head of a filentry list */
63 #define AddLEHead(l, le) \
64 le->le_Next = l; \
65 l = le;
67 #define NewLEList(l) \
68 l = NULL;
70 #define IsLEListEmpty(l) \
71 (l != NULL)
73 #define RemLEHead(l) \
74 l = l->le_Next;
77 /**************/
78 /* Prototypes */
79 /**************/
81 struct ListEntry **AllocEntries(ULONG, struct ListData *);
82 ULONG InsertItems(APTR *, struct ListEntry **, LONG, struct ListData *);
83 ULONG CountItems(APTR *);
85 #endif /* AROSLIST_INTERN_H */