From 03137f9bed5b6fb6192127d8d83a612489b15b6f Mon Sep 17 00:00:00 2001 From: Hammy Date: Sun, 26 Dec 2021 18:20:00 +0000 Subject: [PATCH] Update documentation --- src/list.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/list.h b/src/list.h index a3ab6ce..817966b 100644 --- a/src/list.h +++ b/src/list.h @@ -49,7 +49,7 @@ int List_append(List *list, int element); * ---------------------------- * Insert the given element into a valid index of the list * - * *list: the list to append onto + * *list: the list to insert into * index: the index to insert the given value * element: the element to insert into the list * @@ -60,10 +60,10 @@ int List_insert(List *list, int index, int element); /* * Function: List_remove(List *list, int element) * ---------------------------- - * Append an element onto the end of the list + * Remove the first occurrence of the given element from the given list * - * *list: the list to append onto - * element: the element to insert into the list + * *list: the list to remove given element from + * element: the element to remove from the given list * * returns: int (0 for success, Non-0 for error) */ @@ -72,9 +72,13 @@ int List_remove(List *list, int element); /* * Function: List_sort(List *list) * ---------------------------- - * Sorts the given list into ascending order in-place + * Sort the given list into ascending order + * + * ============================== + * WARNING: This is an in-place operation + * ============================== * - * *list: the list to sort in-place + * *list: the list to sort * * returns: int (0 for success, Non-0 for error) */