void deque_initialize(deque_t *d)
Initialize the specified deque to an empty deque.
void deque_push_front(deque_t *d, void *value)
Push a value to the front of the queue.
void * deque_peek_back(deque_t *d)
Peek at the value on the front of the queue, leaving it on the queue.
void * deque_pop_front(deque_t *d)
Pop a value from the front of the queue, removing it from the queue.
void * deque_peek_front(deque_t *d)
Peek at the value on the back of the queue, leaving it on the queue.
void * deque_pop_back(deque_t *d)
Pop a value from the back of the queue, removing it from the queue.
void deque_push_back(deque_t *d, void *value)
Push a value to the back of the queue.
bool deque_is_empty(deque_t *d)
Return true if the queue is empty.
size_t deque_size(deque_t *d)
Return the size of the queue.
A double-ended queue data structure.
Definition deque.h:52
struct deque_node_t * back
Definition deque.h:54
size_t size
Definition deque.h:55
struct deque_node_t * front
Definition deque.h:53