aboutsummaryrefslogtreecommitdiff
path: root/src/linked_list.h
diff options
context:
space:
mode:
authorMikkel Thestrup <mithe24@student.sdu.dk>2025-12-04 21:16:10 +0100
committerMikkel Thestrup <mithe24@student.sdu.dk>2025-12-04 21:16:10 +0100
commit5ca163f446420c97af8a4fa37f6d0281a84bfbcf (patch)
tree492c98311142104f9df3b7a69b56d4c05a72efa8 /src/linked_list.h
parent16527faeedfd8d3a27d3ac505d882f84bd34ed67 (diff)
downloadcycle-detector-5ca163f446420c97af8a4fa37f6d0281a84bfbcf.tar.gz
cycle-detector-5ca163f446420c97af8a4fa37f6d0281a84bfbcf.zip
Less cringe docs
Diffstat (limited to '')
-rw-r--r--src/linked_list.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/linked_list.h b/src/linked_list.h
index 0da0c25..2a0939f 100644
--- a/src/linked_list.h
+++ b/src/linked_list.h
@@ -2,8 +2,7 @@
* @file linked_list.h
* @brief Doubly-linked list implementation.
* @details This module provides a generic doubly-linked list data structure
- * that can store pointers to any data type. The list maintains both
- * head and tail pointers for efficient operations at both ends.
+ * that can store pointers to any datatype.
*/
#ifndef LINKED_LIST_H
@@ -69,8 +68,7 @@ struct LinkedListNode {
/**
* @brief Generic pointer to the node's data.
* @details The caller is responsible for managing the memory
- * pointed to by this pointer. This pointer can store any
- * data type (int*, char*, struct*, etc.).
+ * pointed to by this pointer.
*/
void *data;
};
@@ -89,8 +87,7 @@ LinkedList *linked_list_new();
/**
* @brief Deallocates the given linked list and all its nodes.
*
- * @param ll Pointer to the linked list to delete. If NULL, this function
- * does nothing.
+ * @param ll Pointer to the linked list to delete. If NULL.
*
* @note This function deallocates only the list structure and nodes, not
* the data they point to. The caller retains ownership of the data.
@@ -117,9 +114,7 @@ LinkedListNode *linked_list_append(LinkedList *ll, void *elem);
*
* @param ll Pointer to the linked list.
*
- * @return The data pointer of the removed first element.
- *
- * @pre The list must not be empty (ll->size != 0).
+ * @return The data pointer of the removed first element, or NULL if empty.
*/
void *linked_list_popfront(LinkedList *ll);