diff options
| author | Tyge Løvset <[email protected]> | 2023-02-17 10:21:30 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-17 14:50:58 +0100 |
| commit | c4ae61de5be08e719e3183f4e2d1115c11856796 (patch) | |
| tree | 2fe6f4c44fc6189db4dcf3b0d65ca44fbff4fac2 /docs/clist_api.md | |
| parent | 8864c11b2b85f832ce746a902b43ecf170e2eebc (diff) | |
| download | STC-modified-c4ae61de5be08e719e3183f4e2d1115c11856796.tar.gz STC-modified-c4ae61de5be08e719e3183f4e2d1115c11856796.zip | |
Improved clist: 1) added clist_X_sort_with(self, cmp) - custom compare func. 2) shortened mergesort function.
Diffstat (limited to 'docs/clist_api.md')
| -rw-r--r-- | docs/clist_api.md | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/clist_api.md b/docs/clist_api.md index 45721f8d..929931af 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -79,8 +79,9 @@ clist_X_iter clist_X_find_in(clist_X_iter it1, clist_X_iter it2, i_valraw const i_val* clist_X_get(const clist_X* self, i_valraw raw); i_val* clist_X_get_mut(clist_X* self, i_valraw raw); -void clist_X_sort(clist_X* self); // needs i_extern once void clist_X_reverse(clist_X* self); +void clist_X_sort(clist_X* self); // needs i_extern defined +void clist_X_sort_with(clist_X* self, int(*cmp)(const clist_X_node*, const clist_X_node*)); // Node API clist_X_node* clist_X_get_node(clist_X_value* val); // get the enclosing node @@ -100,12 +101,13 @@ clist_X_value clist_X_value_clone(clist_X_value val); ## Types -| Type name | Type definition | Used to represent... | -|:--------------------|:------------------------------------|:--------------------------| -| `clist_X` | `struct { clist_X_node* last; }` | The clist type | -| `clist_X_value` | `i_val` | The clist element type | -| `clist_X_raw` | `i_valraw` | clist raw value type | -| `clist_X_iter` | `struct { clist_value *ref; ... }` | clist iterator | +| Type name | Type definition | Used to represent... | +|:--------------------|:------------------------------------|:-----------------------------------------| +| `clist_X` | `struct { clist_X_node* last; }` | The clist type | +| `clist_X_node` | `struct { clist_X_node* next; clist_X_value value; }` | The clist node type | +| `clist_X_value` | `i_val` | The clist element type | +| `clist_X_raw` | `i_valraw` | clist raw value type | +| `clist_X_iter` | `struct { clist_value *ref; ... }` | clist iterator | ## Example |
