Cleaner formatting in docs.
This commit is contained in:
parent
9de0cd367d
commit
1294081819
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
single_linked_list.h
|
||||
|
||||
|
@ -10,14 +8,14 @@ Wael Karram
|
|||
Documentation for single_linked_list.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a linked list, with one link per node. Using the prepoccessor variable SINGLE_LINKED_LIST_H used as an include guard.
|
||||
.br
|
||||
Relies on single_node.h to implement the nodes.
|
||||
|
||||
.PP
|
||||
.LP
|
||||
These are the compile-time constants declared by this header:
|
||||
.br
|
||||
SUCCESS_CODE_SINGLE_LINKED_LIST_C, this is the code returned by a function on succcess, evaluates to 1.
|
||||
|
@ -33,7 +31,7 @@ CODE_FREE_SUCCESS_MALFORMED_SINGLE_LINKED_LIST_C, this code is returned when fre
|
|||
INDEX_HEAD_LINKED_LIST, this is the index of the head of the linked list, evaluates to 0.
|
||||
|
||||
|
||||
.PP
|
||||
.LP
|
||||
These are the function defitions and input arguments for this data structre.
|
||||
.br
|
||||
Defines a single struct
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
single_linked_list.h
|
||||
|
||||
|
@ -10,14 +8,14 @@ Wael Karram
|
|||
Documentation for single_linked_list.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a linked list, with one link per node. Using the prepoccessor variable SINGLE_LINKED_LIST_H used as an include guard.
|
||||
.br
|
||||
Relies on single_node.h to implement the nodes.
|
||||
|
||||
.PP
|
||||
.LP
|
||||
These are the compile-time constants declared by this header:
|
||||
.br
|
||||
SUCCESS_CODE_SINGLE_LINKED_LIST_C, this is the code returned by a function on succcess, evaluates to 1.
|
||||
|
@ -33,20 +31,20 @@ CODE_FREE_SUCCESS_MALFORMED_SINGLE_LINKED_LIST_C, this code is returned when fre
|
|||
INDEX_HEAD_LINKED_LIST, this is the index of the head of the linked list, evaluates to 0.
|
||||
|
||||
|
||||
.PP
|
||||
.LP
|
||||
These are the function defitions and input arguments for this data structre:
|
||||
.br
|
||||
linked_list* initialize_single_linked_list(): initializes an empty linked list, returns NULL on failure.
|
||||
.br
|
||||
int append_node_single_linked_list(linked_list_t *list, node_t *node): appends the node to the given list, returns success if worked, otherwise failure code is returned.
|
||||
int aLPend_node_single_linked_list(linked_list_t *list, node_t *node): aLPends the node to the given list, returns success if worked, otherwise failure code is returned.
|
||||
.br
|
||||
int prepend_node_single_linked_list(linked_list_t *list, node_t *node): prepends the node to the given list, returns success if worked, otherwise failure code is returned.
|
||||
.br
|
||||
int append_node_data_single_linked_list(linked_list_t *list, void *data): much like the node appending function, but creates the node itself - note that the data can be NULL, will also return failure code when allocation of the node fails.
|
||||
int aLPend_node_data_single_linked_list(linked_list_t *list, void *data): much like the node aLPending function, but creates the node itself - note that the data can be NULL, will also return failure code when allocation of the node fails.
|
||||
.br
|
||||
int prepend_node_data_single_linked_list(linked_list_t *list, void *data): much like the node prepending function, but creates the node itself - note that the data can be NULL, will also return failure code when allocation of the node fails.
|
||||
.br
|
||||
int add_node_i_single_linked_list(linked_list_t *list, node_t *node, int i): much like append node, but might also fail when the index is invalid (returning the aforementioned error code).
|
||||
int add_node_i_single_linked_list(linked_list_t *list, node_t *node, int i): much like aLPend node, but might also fail when the index is invalid (returning the aforementioned error code).
|
||||
.br
|
||||
int add_node_data_i_single_linked_list(linked_list_t *list, void *data, int i): much like the node insertion function, but also attempts to allocate a node and put the data in it beforehand, will fail with the failure error code if allocation fails.
|
||||
.br
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
double_node.h
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for double_node.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a single node double headed, with the prepoccessor variable DOUBLE_NODE_H used as an include guard.
|
||||
.br
|
||||
Defines a single struct
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
single_node.h
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for single_node.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a single node, with the prepoccessor variable SINGLE_NODE_H used as an include guard.
|
||||
.br
|
||||
Defines a single struct
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
tree_node.h
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for tree_node.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a tree node, with the prepoccessor variable TREE_NODE_H used as an include guard.
|
||||
.br
|
||||
Defines a single struct
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
stack.h
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for stack.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a stack (FIFO), with the prepoccessor variable STACK_H used as an include guard.
|
||||
.br
|
||||
Defines a single struct
|
||||
|
@ -22,13 +20,13 @@ has the fields
|
|||
.I "node_t *head" ,
|
||||
the former of which refers to the stack's size, and the latter of which refers to the stack's head.
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header also includes the following headers:
|
||||
.br
|
||||
.I "stdlib.h" ,
|
||||
.I "../nodes/single_node.h" .
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines the following constants:
|
||||
.br
|
||||
.I "INITIAL_STACK_SIZE" sets the initial stack size to 0.
|
||||
|
@ -39,14 +37,14 @@ This header defines the following constants:
|
|||
.br
|
||||
.I "INVALID_SIZE" returned on invalid size given, evaluates to -1.
|
||||
|
||||
.PP
|
||||
.LP
|
||||
Function definitions, input and expected behavior:
|
||||
.br
|
||||
stack_t* initialize_stack() - This function initializes a new empty stack, returns NULL on failure.
|
||||
.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.
|
||||
const void* peek(stack_t *stack) - Peeks at the top of the stack, returns the stored value there without poLPing.
|
||||
.br
|
||||
int push(stack_t *stack, node_t *node) - Pushes a node into the top of the stack, fails on NULL input.
|
||||
.br
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
strzcpy
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for strzcpy
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
The header and implementation file both define a safe string copying function.
|
||||
.br
|
||||
This function takes three arguments:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
binary_tree.h
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for binary_tree.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a binary tree, with the prepoccessor variable BINARY_TREE_H used as an include guard.
|
||||
.br
|
||||
Includes the struct
|
||||
|
@ -23,19 +21,19 @@ has the fields
|
|||
.I "data" ,
|
||||
the former of which are other node pointers, and the latter is a void pointer.
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a special "max" macro, which takes two variables (a and b), checks that they have maching types, and returns the maximal value between them.
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines the following functions:
|
||||
.br
|
||||
tree_node_t* initialize_tree_node(): This function initializes an empty tree node, returning the pointer thereof on success and NULL on failure.
|
||||
.br
|
||||
tree_node_t* initialize_tree_node_store(void *data): This function initializes an empty tree node, returning the pointer thereof on success and NULL on failure - stores the given data into the node too.
|
||||
.br
|
||||
int link_tree_node_right(tree_node_t *parent, tree_node_t *child): This function links the child node to the right of its parent, will happily overwrite linked nodes!
|
||||
int link_tree_node_right(tree_node_t *parent, tree_node_t *child): This function links the child node to the right of its parent, will haLPily overwrite linked nodes!
|
||||
.br
|
||||
int link_tree_node_left(tree_node_t *parent, tree_node_t *child): This function links the child node to the left of its parent, will happily overwrite linked nodes!
|
||||
int link_tree_node_left(tree_node_t *parent, tree_node_t *child): This function links the child node to the left of its parent, will haLPily overwrite linked nodes!
|
||||
.br
|
||||
void free_tree(tree_node_t *root): This function frees a tree from the given node onwards (including all children thereof but not parentally), will not free stored data.
|
||||
.br
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
.DA
|
||||
|
||||
.TL
|
||||
time_function.h
|
||||
|
||||
|
@ -10,9 +8,9 @@ Wael Karram
|
|||
Documentation for time_function.h
|
||||
.AE
|
||||
|
||||
.ND
|
||||
.DA
|
||||
|
||||
.PP
|
||||
.LP
|
||||
This header defines a function_run_time struct, with the prepoccessor variable TIME_FUNCTION_H used as an include guard.
|
||||
.br
|
||||
Defines a single struct
|
||||
|
|
Loading…
Reference in New Issue
Block a user