src/cx/list.h

changeset 1424
563033aa998c
parent 1423
9a72258446cd
--- a/src/cx/list.h	Sat Oct 11 15:42:48 2025 +0200
+++ b/src/cx/list.h	Sun Oct 12 20:21:56 2025 +0200
@@ -82,7 +82,7 @@
 
     /**
      * Member function for inserting a single element.
-     * The data pointer may be @c NULL in which case the function shall only allocate memory.
+     * The data pointer may be @c NULL, in which case the function shall only allocate memory.
      * Returns a pointer to the allocated memory or @c NULL if allocation fails.
      */
     void *(*insert_element)(
@@ -194,7 +194,7 @@
     /**
      * Optional member function for comparing this list
      * to another list of the same type.
-     * If set to @c NULL, comparison won't be optimized.
+     * If set to @c NULL, the comparison won't be optimized.
      */
     int (*compare)(
             const struct cx_list_s *list,
@@ -226,7 +226,7 @@
  *
  * Writing to that list is not allowed.
  *
- * You can use this is a placeholder for initializing CxList pointers
+ * You can use this as a placeholder for initializing CxList pointers
  * for which you do not want to reserve memory right from the beginning.
  */
 cx_attr_export
@@ -340,12 +340,12 @@
  *
  * Only use this function if you are creating your own list implementation.
  * The purpose of this function is to be called in the initialization code
- * of your list, to set certain members correctly.
+ * of your list to set certain members correctly.
  *
  * This is particularly important when you want your list to support
  * #CX_STORE_POINTERS as @p elem_size. This function will wrap the list
  * class accordingly and make sure that you can implement your list as if
- * it was only storing objects and the wrapper will automatically enable
+ * it was only storing objects, and the wrapper will automatically enable
  * the feature of storing pointers.
  *
  * @par Example
@@ -427,7 +427,7 @@
  * If there is not enough memory to add all elements, the returned value is
  * less than @p n.
  *
- * If this list is storing pointers instead of objects @p array is expected to
+ * If this list is storing pointers instead of objects, @p array is expected to
  * be an array of pointers.
  *
  * @param list the list
@@ -448,7 +448,7 @@
 /**
  * Inserts an item at the specified index.
  *
- * If @p index equals the list @c size, this is effectively cxListAdd().
+ * If the @p index equals the list @c size, this is effectively cxListAdd().
  *
  * @param list the list
  * @param index the index the element shall have
@@ -547,7 +547,7 @@
 
 /**
  * Inserts multiple items to the list at the specified index.
- * If @p index equals the list size, this is effectively cxListAddArray().
+ * If the @p index equals the list size, this is effectively cxListAddArray().
  *
  * This method is usually more efficient than invoking cxListInsert()
  * multiple times.
@@ -555,7 +555,7 @@
  * If there is not enough memory to add all elements, the returned value is
  * less than @p n.
  *
- * If this list is storing pointers instead of objects @p array is expected to
+ * If this list is storing pointers instead of objects, @p array is expected to
  * be an array of pointers.
  *
  * @param list the list
@@ -584,7 +584,7 @@
  * If there is not enough memory to add all elements, the returned value is
  * less than @p n.
  *
- * If this list is storing pointers instead of objects @p array is expected to
+ * If this list is storing pointers instead of objects, @p array is expected to
  * be an array of pointers.
  *
  * If the list is not sorted already, the behavior is undefined.
@@ -748,7 +748,7 @@
  * @param list the list
  * @param targetbuf a buffer where to copy the element
  * @retval zero success
- * @retval non-zero list is empty
+ * @retval non-zero the list is empty
  * @see cxListPopFront()
  * @see cxListRemoveAndGetLast()
  */
@@ -773,7 +773,7 @@
  * @param list (@c CxList*) the list
  * @param targetbuf (@c void*) a buffer where to copy the element
  * @retval zero success
- * @retval non-zero list is empty
+ * @retval non-zero the list is empty
  * @see cxListRemoveAndGetFirst()
  * @see cxListPop()
  */
@@ -790,7 +790,7 @@
  * @param list the list
  * @param targetbuf a buffer where to copy the element
  * @retval zero success
- * @retval non-zero list is empty
+ * @retval non-zero the list is empty
  */
 cx_attr_nonnull
 cx_attr_access_w(2)
@@ -814,7 +814,7 @@
  * @param list (@c CxList*) the list
  * @param targetbuf (@c void*) a buffer where to copy the element
  * @retval zero success
- * @retval non-zero list is empty
+ * @retval non-zero the list is empty
  * @see cxListRemoveAndGetLast()
  * @see cxListPopFront()
  */
@@ -1128,7 +1128,7 @@
 }
 
 /**
- * Checks, if the list contains the specified element.
+ * Checks if the list contains the specified element.
  *
  * The elements are compared with the list's comparator function.
  *
@@ -1233,7 +1233,7 @@
  *
  * Also calls the content destructor functions for each element, if specified.
  *
- * @param list the list which shall be freed
+ * @param list the list that shall be freed
  */
 cx_attr_export
 void cxListFree(CxList *list);

mercurial