Double linked list implemented in pure C.
Design choises for this implementation:
- The list and the structural element in the list and the list is the same data type.
- The list (or the head of the list) is part in the list to make implementation of insert and delete smart.
- The list is not responsible for deleting the elements in the list. So on deletion a function that destroys the actual element is needed.
- The data type stored in the list is a pointer to a void.
- The namespace for the list interface is
_dllist
appended to each function.
The data type looks like this:
And the Empty List:
A List with three elements look like this: