1 | #include <containers/list.hfa> |
---|
2 | |
---|
3 | #define BFX_INTRUSION(S) inline dlink(S); |
---|
4 | #define BFX_EXTRUSION_DECL(S) |
---|
5 | #define BFX_EXTRUSION_FOLLOWUP(S) P9_EMBEDDED( S, dlink(S) ) |
---|
6 | #define BFX_LIST_HEAD_T(S) dlist(S) |
---|
7 | #define BFX_LISTED_ELEM_T(S) S* |
---|
8 | |
---|
9 | #define BFX_INSERT_FIRST(S, lst, item) (insert_first (lst, item), (S*)&(item)) |
---|
10 | #define BFX_INSERT_LAST(S, lst, item) (insert_last (lst, item), (S*)&(item)) |
---|
11 | #define BFX_INSERT_BEFORE(S, lst, item, refIter) (insert_before(*refIter, item), (S*)&(item)) |
---|
12 | #define BFX_INSERT_AFTER(S, lst, item, refIter) (insert_after (*refIter, item), (S*)&(item)) |
---|
13 | #define BFX_REMOVE_FIRST(S, lst) remove(lst`first) |
---|
14 | #define BFX_REMOVE_LAST(S, lst) remove(lst`last) |
---|
15 | #define BFX_REMOVE_HERE(S, lst, refIter) remove(*refIter) |
---|
16 | #define BFX_INIT(S, lst) |
---|
17 | |
---|
18 | #define BFX_GET_AFTER(S, lst, iter) (&(*iter)`next) |
---|
19 | #define BFX_GET_BEFORE(S, lst, iter) (&(*iter)`prev) |
---|
20 | #define BFX_IS_VALID_POS(S, lst, iter) ((iter)!=NULL) |
---|
21 | #define BFX_DEREF_POS(S, lst, iter) (iter) |
---|