From 1294081819f8e15bfa7f432374d6bf02d27d2050 Mon Sep 17 00:00:00 2001 From: wael Date: Wed, 10 Nov 2021 12:10:34 +0200 Subject: [PATCH] Cleaner formatting in docs. --- docs/linked_lists/double_linked_list.h.ms | 10 ++++------ docs/linked_lists/single_linked_list.h.ms | 16 +++++++--------- docs/nodes/double_node.h.ms | 6 ++---- docs/nodes/single_node.h.ms | 6 ++---- docs/nodes/tree_node.h.ms | 6 ++---- docs/stack/stack.h.ms | 14 ++++++-------- docs/strings/strzcpy.ms | 6 ++---- docs/trees/binary_tree/binary_tree.h.ms | 14 ++++++-------- docs/utils/time_function.h.ms | 6 ++---- 9 files changed, 33 insertions(+), 51 deletions(-) diff --git a/docs/linked_lists/double_linked_list.h.ms b/docs/linked_lists/double_linked_list.h.ms index 7ee9a01..3ffe996 100644 --- a/docs/linked_lists/double_linked_list.h.ms +++ b/docs/linked_lists/double_linked_list.h.ms @@ -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 diff --git a/docs/linked_lists/single_linked_list.h.ms b/docs/linked_lists/single_linked_list.h.ms index 5f313f8..646129d 100644 --- a/docs/linked_lists/single_linked_list.h.ms +++ b/docs/linked_lists/single_linked_list.h.ms @@ -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 diff --git a/docs/nodes/double_node.h.ms b/docs/nodes/double_node.h.ms index 5014ca7..cc48455 100644 --- a/docs/nodes/double_node.h.ms +++ b/docs/nodes/double_node.h.ms @@ -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 diff --git a/docs/nodes/single_node.h.ms b/docs/nodes/single_node.h.ms index f4f1ede..45e1ee6 100644 --- a/docs/nodes/single_node.h.ms +++ b/docs/nodes/single_node.h.ms @@ -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 diff --git a/docs/nodes/tree_node.h.ms b/docs/nodes/tree_node.h.ms index 870f8fe..b4dc809 100644 --- a/docs/nodes/tree_node.h.ms +++ b/docs/nodes/tree_node.h.ms @@ -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 diff --git a/docs/stack/stack.h.ms b/docs/stack/stack.h.ms index e53b81c..d3ff8e5 100644 --- a/docs/stack/stack.h.ms +++ b/docs/stack/stack.h.ms @@ -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 diff --git a/docs/strings/strzcpy.ms b/docs/strings/strzcpy.ms index 147d172..866f2d6 100644 --- a/docs/strings/strzcpy.ms +++ b/docs/strings/strzcpy.ms @@ -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: diff --git a/docs/trees/binary_tree/binary_tree.h.ms b/docs/trees/binary_tree/binary_tree.h.ms index d006389..13c7ba0 100644 --- a/docs/trees/binary_tree/binary_tree.h.ms +++ b/docs/trees/binary_tree/binary_tree.h.ms @@ -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 diff --git a/docs/utils/time_function.h.ms b/docs/utils/time_function.h.ms index 948d12c..be2e325 100644 --- a/docs/utils/time_function.h.ms +++ b/docs/utils/time_function.h.ms @@ -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