Go to the documentation of this file.
16 static void *list_unlink_inner(
t_list *alst,
size_t index)
21 if (index < alst->size / 2)
30 while (++index < alst->size)
43 if (index >= alst->
size)
50 else if (index + 1 == alst->
size)
53 return (list_unlink_inner(alst, index));
void * content
The content.
void * list_unlink_last(t_list *alst)
Removes the last item in the list and returns it.
t_link * head
The first link.
void * list_unlink(t_list *alst, size_t index)
Removes the item at the specified position in the list and returns it.
Doubly-linked list of generic items.
t_link * tail
The last link.
size_t size
The number of items in the list.
struct s_link * prev
The previous link.
void * list_unlink_first(t_list *alst)
Removes the first item in the list and returns it.
struct s_link * next
The next link.
void ds_exit_set(int err)
Set errno to the specified value, print the error message, and exit the process.
A link in a doubly-linked list.