fix various typos in the docs default tip

Tue, 11 Nov 2025 18:47:48 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 11 Nov 2025 18:47:48 +0100
changeset 1489
185dc2a4b45c
parent 1488
946895d19dde

fix various typos in the docs

docs/Writerside/topics/list.h.md file | annotate | diff | comparison | revisions
docs/Writerside/topics/map.h.md file | annotate | diff | comparison | revisions
--- a/docs/Writerside/topics/list.h.md	Tue Nov 11 18:43:08 2025 +0100
+++ b/docs/Writerside/topics/list.h.md	Tue Nov 11 18:47:48 2025 +0100
@@ -401,7 +401,7 @@
 
 With `cxListClone()` you can create deep copies of the elements in a list and insert them into another list.
 The destination list does not need to be empty, in which case the elements will be appended.
-Depending on the concrete list implementation, `cxListClone()` tries to allocate enough memory up-front, before trying
+Depending on the concrete list implementation, `cxListClone()` tries to allocate enough memory up-front before trying
 to insert anything.
 
 The function `cxListDifference()` clones elements from the `minuend` that are _not_ contained in the `subtrahend`,
@@ -414,7 +414,7 @@
 so that the result of the union is still sorted.
 
 However, when the `dst` list already contains elements, all functions will only append the result of the operation to that list.
-That means, the `dst` list is only guaranteed to be sorted, when it was empty and the input lists are all sorted.
+That means the `dst` list is only guaranteed to be sorted when it was empty and the input lists are all sorted.
 
 Refer to the documentation of the [clone-function callback](allocator.h.md#clone-function) to learn how to implement it.
 
@@ -444,7 +444,7 @@
 
 If a list implementation allows overallocation, the function `cxListReserve()` can be used to reserve memory for a total of `count` elements.
 On the other hand, you can use `cxListShrink()` to dispose of any overallocated memory and reduce the capacity to the actual number of currently stored elements.
-Calling `cxListReserve()` with a `count` argument that is less than the current size of the list has no effect and the function returns zero.
+Calling `cxListReserve()` with a `count` argument that is less than the current size of the list has no effect, and the function returns zero.
 
 If allocating memory fails, `cxListReserve()` returns a non-zero value.
 Since shrinking should never fail, `cxListShrink()` will usually always return zero,
--- a/docs/Writerside/topics/map.h.md	Tue Nov 11 18:43:08 2025 +0100
+++ b/docs/Writerside/topics/map.h.md	Tue Nov 11 18:47:48 2025 +0100
@@ -197,7 +197,7 @@
 void *cxMapEmplace(CxMap *map, KeyType key);
 ```
 
-The function `cxMapPut()` stores the specified `key` / `value` pair,
+The function `cxMapPut()` stores the specified `key` / `value` pair 
 and returns zero if the element was successfully put into the map and non-zero otherwise.
 
 The key is always copied.
@@ -250,8 +250,8 @@
 The function `cxMapRemove()` retrieves and removes a value stored under the specified `key`.
 If [destructor functions](collection.h.md#destructor-functions) are registered, they are called before removal.
 
-On the other hand, `cxMapRemoveAndGet()` does not invoke the destructor functions,
-and instead copies the value into the `targetbuf` which must be sufficiently large to hold the value.
+On the other hand, `cxMapRemoveAndGet()` does not invoke the destructor functions 
+and instead copies the value into the `targetbuf`, which must be large enough to hold the value.
 
 In either case, the functions return zero when an element was found under the specified key, and non-zero otherwise.
 
@@ -272,13 +272,13 @@
 The above functions create iterators over the
 pairs, keys, or values of the specified `map`, respectively.
 
-Iterators over pairs yield elements of type `CxMapEntry*` which is a struct containing a pointer to the `key` and the value, respectively.
+Iterators over pairs yield elements of the type `CxMapEntry*` which is a struct containing a pointer to the `key` and the value, respectively.
 
-Iterators over keys yield elements of type `const CxHashKey*` (cf. [CxHashKey documentation](hash_key.h.md)).
+Iterators over keys yield elements of the type `const CxHashKey*` (cf. [CxHashKey documentation](hash_key.h.md)).
 
 The behavior of iterators over values depends on the concrete implementation.
 Implementations are encouraged to support `CX_STORE_POINTERS`.
-If used, the `void*` elements the iterator yields, shall be directly the stored pointers.
+If used, the `void*` elements the iterator yields shall be directly the stored pointers.
 Otherwise, the iterator shall yield pointers to the map's memory where the value is stored.
 
 It is always safe to call the above functions on a `NULL`-pointer.
@@ -356,7 +356,7 @@
 except that they only clone an element from the source map, when the key is _not_ contained in the
 other map (or list, respectively).
 This is equivalent to computing the set difference for the set of keys.
-Likewise, `cxMapIntersection()` and `cxMapListIntersection()` only clone an element from the source map,
+Likewise, `cxMapIntersection()` and `cxMapListIntersection()` only clone an element from the source map 
 when the key is contained in _both_ collections.
 The function `cxMapUnion()` only clones elements from `src` to `dst` when their key is not present in `dst`.
 
@@ -388,7 +388,7 @@
 void cxMapFree(CxMap *map);
 ```
 
-The function `cxMapFree()` invokes the [destructor functions](collection.h.md#destructor-functions) for all elements,
+The function `cxMapFree()` invokes the [destructor functions](collection.h.md#destructor-functions) for all elements 
 and then deallocates the entire memory for the map.  
 
 ## Implement own Map Structures 
@@ -404,7 +404,7 @@
 } CxMapEntry;
 ```
 
-When you are declaring your map structure, a `CxMap` member must be embedded as first member of this structure.
+When you are declaring your map structure, a `CxMap` member must be embedded as the first member of this structure.
 Secondly, you need to implement the `cx_map_class` and assign it when allocating your map.
 
 ```C

mercurial