diff options
Diffstat (limited to 'list.c')
-rw-r--r-- | list.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -40,6 +40,24 @@ enet_list_remove (ENetListIterator position) return position; } +ENetListIterator +enet_list_move (ENetListIterator position, void * dataFirst, void * dataLast) +{ + ENetListIterator first = (ENetListIterator) dataFirst, + last = (ENetListIterator) dataLast; + + first -> previous -> next = last -> next; + last -> next -> previous = first -> previous; + + first -> previous = position -> previous; + last -> next = position; + + first -> previous -> next = first; + position -> previous = last; + + return first; +} + size_t enet_list_size (ENetList * list) { |