13 #ifndef OSURS_DS_STACK_H_
14 #define OSURS_DS_STACK_H_
void stack_push(Stack *stack, void *data)
Push an element onto a Stack.
Definition: stack.c:30
void stack_clear(Stack *stack)
Clear all elements from a Stack.
Definition: stack.c:57
void * stack_peek(Stack *stack)
Return the top element of a Stack.
Definition: stack.c:52
Stack * stack_create()
Create a new Stack structure.
Definition: stack.c:18
bool stack_is_empty(Stack *stack)
Check if a Stack is empty.
Definition: stack.c:28
void * stack_pop(Stack *stack)
Pop the top element from a Stack.
Definition: stack.c:42
void stack_init(Stack *stack)
Initialize a Stack structure.
Definition: stack.c:13
void stack_free(Stack *stack)
Free a Stack structure.
Definition: stack.c:66
struct StackNode StackNode
Stack node.
Stack node.
Definition: stack.h:25
void * data
Definition: stack.h:26
struct StackNode * next
Definition: stack.h:27
Stack.
Definition: stack.h:37
size_t size
Definition: stack.h:39
StackNode * top
Definition: stack.h:38