fix various typos in the web documentation

Fri, 10 Oct 2025 19:35:25 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 10 Oct 2025 19:35:25 +0200
changeset 1420
c6f55a2b3495
parent 1419
e46406fd1b3c
child 1421
809eb30cd621

fix various typos in the web documentation

docs/Writerside/topics/allocator.h.md file | annotate | diff | comparison | revisions
docs/Writerside/topics/list.h.md file | annotate | diff | comparison | revisions
docs/Writerside/topics/properties.h.md file | annotate | diff | comparison | revisions
docs/Writerside/topics/test.h.md file | annotate | diff | comparison | revisions
--- a/docs/Writerside/topics/allocator.h.md	Fri Oct 10 17:24:19 2025 +0200
+++ b/docs/Writerside/topics/allocator.h.md	Fri Oct 10 19:35:25 2025 +0200
@@ -52,7 +52,7 @@
 // default allocator that can be changed
 CxAllocator *cxDefaultAllocator = cxStdlibAllocator;
 
-// Convenience macros that invokes above functions with the cxDefaultAllocator.
+// convenience macros that invoke the above with cxDefaultAllocator
 #define cxMallocDefault(...)
 #define cxZallocDefault(...)
 #define cxCallocDefault(...)
--- a/docs/Writerside/topics/list.h.md	Fri Oct 10 17:24:19 2025 +0200
+++ b/docs/Writerside/topics/list.h.md	Fri Oct 10 19:35:25 2025 +0200
@@ -100,7 +100,7 @@
 }
 ```
 
-Also, just registering `regfree()` as destructor is not enough anymore, because the `regex_t` structure also needs to be freed.
+Also, just registering `regfree()` as a destructor is not enough anymore because the `regex_t` structure also needs to be freed.
 Therefore, we would need to wrap the calls to `regfree()` and `free()` into an own destructor, which we then register with the list.
 However, it should be clear by now that using `CX_STORE_POINTERS` is a bad choice for this use case to begin with.
 
@@ -212,14 +212,14 @@
 If the list is storing pointers, the pointer value itself will be stored.
 The function returns `0` on success and `1` if the index is out of bounds.
 
-On the other hand, `cxListFind()` searches for the element pointed to by `elem` by comparing each element in the list with the list's compare function,
+On the other hand, `cxListFind()` searches for the element pointed to by `elem` by comparing each element in the list with the list's compare function
 and returns the first index when the element was found.
 Otherwise, the function returns the list size.
 
 The function `cxListFindRemove()` behaves like `cxListFind()`, except that it also removes the first occurrence of the element from the list.
 This will _also_ call destructor functions, if specified, so take special care when you continue to use `elem`, or when the list is storing pointers and the element appears more than once in the list.
 
-The function `cxListContains()` returns `true`, if and only if `cxListFind()` would return a valid index.
+The function `cxListContains()` returns `true` if and only if `cxListFind()` returns a valid index.
 
 With `cxListIndexValid()` you can check the index returned by `cxListFind()` or `cxListFindRemove()`,
 which is more convenient than comparing the return value if the return value of `cxListSize()`.  
@@ -262,13 +262,13 @@
 On the other hand, `cxListRemoveAndGet()` family of functions do not invoke the destructor functions
 and instead copy the elements into the `targetbuf`, which must be large enough to hold the removed elements.
 
-> Note, that when the list was initialized with `CX_STORE_POINTERS`,
+> Note that when the list was initialized with `CX_STORE_POINTERS`,
 > the elements that will be copied to the `targetbuf` are the _pointers_.
 > In contrast to other list functions, like `cxListAt()`, an automatic dereferencing does not happen here. 
 >{style="note"}
 
 The function `cxListClear()` simply removes all elements from the list, invoking the destructor functions.
-It behaves equivalently, but is usually more efficient than calling `cxListRemove()` for every index.
+It behaves equivalently but is usually more efficient than calling `cxListRemove()` for every index.
 
 ## Iterators
 
@@ -298,10 +298,10 @@
 The functions `cxListIteratorAt()` and `cxListBackwardsIteratorAt()` start with the element at the specified index
 and iterate until the end, or the beginning of the list, respectively.
 
-The functions with `Mut` in are equivalently, except that they create a [mutating iterator](iterator.h.md#mutating-iterators).
+The functions with `Mut` in are equivalent, except that they create a [mutating iterator](iterator.h.md#mutating-iterators).
 Removing elements via a mutating iterator will cause an invocation of the [destructor functions](collection.h.md#destructor-functions) for the removed element. 
 
-If is safe to specify an out-of-bounds index, or a `NULL` pointer, in which cases the returned iterator will behave like an iterator over an empty list.
+It is safe to specify an out-of-bounds index, or a `NULL` pointer, in which cases the returned iterator will behave like an iterator over an empty list.
 
 ## Reorder
 
@@ -318,7 +318,7 @@
 The function `cxListSwap()` swaps two elements specified by the indices `i` and `j`.
 The return value is non-zero if one of the indices is out-of-bounds.
 
-The function `cxListReverse()` reorders all elements, so that they appear in exactly the opposite order after invoking this function. 
+The function `cxListReverse()` reorders all elements so that they appear in exactly the opposite order after invoking this function. 
 
 The function `cxListSort()` sorts all elements with respect to the list's compare function,
 unless the list is already sorted (cf. `cxCollectionSorted()`), in which case the function immediately returns.
@@ -328,7 +328,7 @@
 > An invocation of `cxListSort` sets the `sorted` flag of the [collection](collection.h.md).
 > Implementations usually make use of this flag to optimize search operations, if possible.
 > For example, the [array list](array_list.h.md) implementation will use binary search
-> for `cxListFind()` and similar operations, when the list is sorted.
+> for `cxListFind()` and similar operations when the list is sorted.
 
 ## Compare
 
@@ -346,7 +346,7 @@
 However, the optimized list-internal compare implementation is only used when both the compare functions and the list classes are identical.
 Otherwise, `cxListCompare()` will behave as if you were iterating through both lists and manually comparing the elements.
 
-The return value of `cxListCompare()` is zero, if the lists are element-wise equivalent.
+The return value of `cxListCompare()` is zero if the lists are element-wise equivalent.
 If they are not, the non-zero return value equals the return value of the used compare function for the first pair of elements that are not equal. 
 
 ## Dispose
@@ -438,7 +438,7 @@
 | `reverse`        | Reorders all elements in the list so that they appear in exactly the opposite order.                                                                                                                                                                                                                                       |
 | `iterator`       | Creates an iterator starting at the specified index. The Boolean argument indicates whether iteration is supposed to traverse backwards.                                                                                                                                                                                   |
 
-> If you initialize your list with `cx_list_init()` you do not have to worry about making a
+> If you initialize your list with `cx_list_init()`, you do not have to worry about making a
 > difference between storing pointers and storing elements, because your implementation will
 > be automatically wrapped.
 > This means you only have to handle the one single case described above.
--- a/docs/Writerside/topics/properties.h.md	Fri Oct 10 17:24:19 2025 +0200
+++ b/docs/Writerside/topics/properties.h.md	Fri Oct 10 19:35:25 2025 +0200
@@ -4,7 +4,7 @@
 
 ## Supported Syntax
 
-Key/value pairs must be line based and separated by a single character delimter.
+Key/value pairs must be line-based and separated by a single character delimiter.
 The parser supports up to three different characters which introduce comments.
 All characters starting with a comment character up to the end of the line are ignored.
 Blank lines are also ignored.
--- a/docs/Writerside/topics/test.h.md	Fri Oct 10 17:24:19 2025 +0200
+++ b/docs/Writerside/topics/test.h.md	Fri Oct 10 19:35:25 2025 +0200
@@ -93,7 +93,7 @@
 Instead, you define a callable test subroutine with `CX_TEST_SUBROUTINE` and call it with `CX_TEST_CALL_SUBROUTINE`.
 The following example illustrates this with an adaption of the above test case.
 
-<code-block lang="C"><![CDATA[
+```c
 CX_TEST_SUBROUTINE(test_foo_params, struct mystruct *x, int d) {
     x->d = d;
     CX_TEST_ASSERT(foo(x) == d);
@@ -108,7 +108,7 @@
     }
     free(x);
 }
-]]></code-block>
+```
 
 > Any test function, test case or test subroutine, is a normal C function.
 > As such you can decide to make them `static` when you do not want external linkage.

mercurial