Finish stack docs and update docs gen script.
This commit is contained in:
parent
85ae64179b
commit
15dd829205
|
@ -5,7 +5,7 @@
|
|||
# Prompt user at the start for what type they want.
|
||||
|
||||
# Specify the file paths, in the order where they should be built.
|
||||
filepaths=('nodes/single_node.h.ms' 'nodes/double_node.h.ms' 'nodes/tree_node.h.ms' 'strings/strzcpy.ms')
|
||||
filepaths=('nodes/single_node.h.ms' 'nodes/double_node.h.ms' 'nodes/tree_node.h.ms' 'strings/strzcpy.ms' 'stack/stack.h.ms' 'linked_lists/double_linked_list.h.ms' 'linked_lists/single_linked_list.h.ms')
|
||||
|
||||
# Prompt the user for the option they want (pdf/html/utf8).
|
||||
echo "Please choose an output option: pdf, html or utf8."
|
||||
|
|
|
@ -46,3 +46,14 @@ stack_t* initialize_stack() - This function initializes a new empty stack, retur
|
|||
.br
|
||||
node_t* pop(stack_t *stack) - Pops the head of the stack, returns NULL on empty or NULL stack.
|
||||
.br
|
||||
const void* peek(stack_t *stack) - Peeks at the top of the stack, returns the stored value there without popping.
|
||||
.br
|
||||
int push(stack_t *stack, node_t *node) - Pushes a node into the top of the stack, fails on NULL input.
|
||||
.br
|
||||
int push_data(stack_t *stack, void *data) - Pushes a node into the top of the stack, fails on NULL stack or allocation error.
|
||||
.br
|
||||
int stack_size(stack_t *stack) - This function returns the stack's size, returns INVALID_SIZE on error or NULL stack.
|
||||
.br
|
||||
void free_stack(stack_t **stack) - This function frees a stack and sets the pointer (*stack) to NULL, doesn't touch the data.
|
||||
.br
|
||||
void free_stack_data(stack_t **stack, void (*free_function)(const void*)) - This function frees a stack and sets the pointer (*stack) to NULL, frees the data too, if free_function is NULL will use standard free() instead.
|
||||
|
|
Loading…
Reference in New Issue
Block a user