77 #define STACK(name) LIST(name) 137 return *stack == NULL ? true :
false;
void list_push(list_t list, void *item)
Add an item to the start of the list.
void ** list_t
The linked list type.
static void * stack_peek(stack_t stack)
Returns the top element of the stack, without popping it.
static void stack_init(stack_t stack)
Initialise a stack.
Linked list manipulation routines.
static void * stack_pop(stack_t stack)
Removes the top element from the stack.
void * list_head(list_t list)
Get a pointer to the first element of a list.
list_t stack_t
The stack data type.
void list_init(list_t list)
Initialize a list.
static bool stack_is_empty(stack_t stack)
Check if a stack is empty.
void * list_pop(list_t list)
Remove the first object on a list.
static void stack_push(stack_t stack, void *element)
Adds an element to the top of the stack.