1 #ifndef EXEC_LISTS_AROS_H
2 #define EXEC_LISTS_AROS_H
5 Copyright � 1995-2005, The AROS Development Team. All rights reserved.
7 Structures and macros for exec lists.
10 #include <exec/nodes.h>
14 /**************************************
16 **************************************/
19 #define NEW_LIST(_l) \
22 struct List *__aros_list_tmp = (struct List *)(_l), \
23 *l = __aros_list_tmp; \
25 l->lh_TailPred = (struct Node *)l; \
27 l->lh_Head = (struct Node *)&l->lh_Tail; \
32 #define Foreach_Node(list, node) \
35 node = (void *)(((struct List *)(list))->lh_Head); \
36 ((struct Node *)(node))->ln_Succ; \
37 node = (void *)(((struct Node *)(node))->ln_Succ) \
40 #define Foreach_NodeSafe(l,n,n2) \
41 for (n=(void *)(((struct List *)(l))->lh_Head); \
42 (n2=(void *)((struct Node *)(n))->ln_Succ); \
45 #endif /* EXEC_LISTS_AROS_H */