3 @brief ENet linked list functions
5 #define ENET_BUILDING_LIB 1
9 @defgroup list ENet linked list utility functions
14 enet_list_clear (ENetList
* list
)
16 list
-> sentinel
.next
= & list
-> sentinel
;
17 list
-> sentinel
.previous
= & list
-> sentinel
;
21 enet_list_insert (ENetListIterator position
, void * data
)
23 ENetListIterator result
= (ENetListIterator
) data
;
25 result
-> previous
= position
-> previous
;
26 result
-> next
= position
;
28 result
-> previous
-> next
= result
;
29 position
-> previous
= result
;
35 enet_list_remove (ENetListIterator position
)
37 position
-> previous
-> next
= position
-> next
;
38 position
-> next
-> previous
= position
-> previous
;
44 enet_list_size (ENetList
* list
)
47 ENetListIterator position
;
49 for (position
= enet_list_begin (list
);
50 position
!= enet_list_end (list
);
51 position
= enet_list_next (position
))