summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-11-30 16:33:42 +0100
committerTyge Løvset <[email protected]>2020-11-30 16:33:42 +0100
commitf27f9876f000bc4ca0683aa32e737d9daa1ceb8e (patch)
tree4c8236560bd31f05f9ccd80339697e07f2d3efeb /docs
parent370f14c08fc80a202c69f6c83fde5313bfa8c69d (diff)
downloadSTC-modified-f27f9876f000bc4ca0683aa32e737d9daa1ceb8e.tar.gz
STC-modified-f27f9876f000bc4ca0683aa32e737d9daa1ceb8e.zip
Replaced z with $ as 'template' parameter.
Diffstat (limited to 'docs')
-rw-r--r--docs/clist_api.md90
-rw-r--r--docs/cvec_api.md122
2 files changed, 106 insertions, 106 deletions
diff --git a/docs/clist_api.md b/docs/clist_api.md
index 58327b37..34314d32 100644
--- a/docs/clist_api.md
+++ b/docs/clist_api.md
@@ -9,7 +9,7 @@ This describes the API of circular singly linked list type **clist**.
```c
#define using_clist_str()
-#define using_clist(z, Value, valueDestroy=c_default_del,
+#define using_clist($, Value, valueDestroy=c_default_del,
valueCompareRaw=c_default_compare,
RawValue=Value,
valueToRaw=c_default_to_raw,
@@ -17,25 +17,25 @@ This describes the API of circular singly linked list type **clist**.
```
The macro `using_clist()` can be instantiated with 2, 3, 4, or 7 arguments in the global scope.
Defaults are given above for args not specified. Note that `z` can be any name, it's a tag and
-will affect the names of all clist types and methods, e.g. for `using_clist(my, int);` `_z` should
-be replaced by `_my` in all of the following documentation. `using_clist_str()` is a predefined
+will affect the names of all clist types and methods, e.g. for `using_clist(my, int);` `$` should
+be replaced by `my` in all of the following documentation. `using_clist_str()` is a predefined
macro for `using_clist(str, cstr_t, ...)`.
## Types
| Type name | Type definition | Used to represent... |
|:----------------------|:---------------------------------------|:------------------------------------|
-| `clist_z` | `struct { clist_z_node_t* last; }` | The clist type |
-| `clist_z_node_t` | `struct {` | clist node |
-| | ` struct clist_z_node* next;` | |
-| | ` clist_z_value_t value;` | |
+| `clist_$` | `struct { clist_$_node_t* last; }` | The clist type |
+| `clist_$_node_t` | `struct {` | clist node |
+| | ` struct clist_$_node* next;` | |
+| | ` clist_$_value_t value;` | |
| | `}` | |
-| `clist_z_value_t` | `Value` | The clist element type |
-| `clist_z_input_t` | `clist_z_value_t` | clist input type |
-| `clist_z_rawvalue_t` | `RawValue` | clist raw value type |
-| `clist_z_iter_t` | `struct {` | clist iterator |
+| `clist_$_value_t` | `Value` | The clist element type |
+| `clist_$_input_t` | `clist_$_value_t` | clist input type |
+| `clist_$_rawvalue_t` | `RawValue` | clist raw value type |
+| `clist_$_iter_t` | `struct {` | clist iterator |
| | ` ...;` | |
-| | ` clist_z_value_t* val;` | |
+| | ` clist_$_value_t* val;` | |
| | `}` | |
@@ -57,50 +57,50 @@ All clist definitions and prototypes may be included in your C source file by in
### Construction
-The interfaces to create a clist_z object:
+The interfaces to create a clist_$ object:
```c
-clist_z clist_z_init(void);
+clist_$ clist_$_init(void);
-void clist_z_clear(clist_z* self);
-void clist_z_del(clist_z* self);
+void clist_$_clear(clist_$* self);
+void clist_$_del(clist_$* self);
-bool clist_z_empty(clist_z list);
-size_t clist_z_size(clist_z list);
-Value clist_z_value_from_raw(RawValue val);
+bool clist_$_empty(clist_$ list);
+size_t clist_$_size(clist_$ list);
+Value clist_$_value_from_raw(RawValue val);
-clist_z_value_t* clist_z_front(clist_z* self);
-clist_z_value_t* clist_z_back(clist_z* self);
+clist_$_value_t* clist_$_front(clist_$* self);
+clist_$_value_t* clist_$_back(clist_$* self);
-void clist_z_push_n(clist_z *self, const clist_z_input_t in[], size_t size);
-void clist_z_push_back(clist_z* self, Value value);
-void clist_z_emplace_back(clist_z* self, RawValue val);
+void clist_$_push_n(clist_$ *self, const clist_$_input_t in[], size_t size);
+void clist_$_push_back(clist_$* self, Value value);
+void clist_$_emplace_back(clist_$* self, RawValue val);
-void clist_z_push_front(clist_z* self, Value value);
-void clist_z_emplace_front(clist_z* self, RawValue val);
-void clist_z_pop_front(clist_z* self);
+void clist_$_push_front(clist_$* self, Value value);
+void clist_$_emplace_front(clist_$* self, RawValue val);
+void clist_$_pop_front(clist_$* self);
-clist_z_iter_t clist_z_insert_after(clist_z* self, clist_z_iter_t pos, Value val);
-clist_z_iter_t clist_z_emplace_after(clist_z* self, clist_z_iter_t pos, RawValue val);
+clist_$_iter_t clist_$_insert_after(clist_$* self, clist_$_iter_t pos, Value val);
+clist_$_iter_t clist_$_emplace_after(clist_$* self, clist_$_iter_t pos, RawValue val);
-clist_z_iter_t clist_z_erase_after(clist_z* self, clist_z_iter_t pos);
-clist_z_iter_t clist_z_erase_range_after(clist_z* self, clist_z_iter_t pos, clist_z_iter_t finish);
+clist_$_iter_t clist_$_erase_after(clist_$* self, clist_$_iter_t pos);
+clist_$_iter_t clist_$_erase_range_after(clist_$* self, clist_$_iter_t pos, clist_$_iter_t finish);
-void clist_z_splice_front(clist_z* self, clist_z* other);
-void clist_z_splice_back(clist_z* self, clist_z* other);
-void clist_z_splice_after(clist_z* self, clist_z_iter_t pos, clist_z* other);
+void clist_$_splice_front(clist_$* self, clist_$* other);
+void clist_$_splice_back(clist_$* self, clist_$* other);
+void clist_$_splice_after(clist_$* self, clist_$_iter_t pos, clist_$* other);
-clist_z_iter_t clist_z_find(const clist_z* self, RawValue val);
-clist_z_iter_t clist_z_find_before(const clist_z* self,
- clist_z_iter_t first, clist_z_iter_t finish, RawValue val);
+clist_$_iter_t clist_$_find(const clist_$* self, RawValue val);
+clist_$_iter_t clist_$_find_before(const clist_$* self,
+ clist_$_iter_t first, clist_$_iter_t finish, RawValue val);
-size_t clist_z_remove(clist_z* self, RawValue val);
+size_t clist_$_remove(clist_$* self, RawValue val);
-void clist_z_sort(clist_z* self);
+void clist_$_sort(clist_$* self);
-clist_z_iter_t clist_z_before_begin(const clist_z* self);
-clist_z_iter_t clist_z_begin(const clist_z* self);
-clist_z_iter_t clist_z_last(const clist_z* self);
-clist_z_iter_t clist_z_end(const clist_z* self);
-void clist_z_next(clist_z_iter_t* it);
-clist_z_value_t* clist_z_itval(clist_z_iter_t it);
+clist_$_iter_t clist_$_before_begin(const clist_$* self);
+clist_$_iter_t clist_$_begin(const clist_$* self);
+clist_$_iter_t clist_$_last(const clist_$* self);
+clist_$_iter_t clist_$_end(const clist_$* self);
+void clist_$_next(clist_$_iter_t* it);
+clist_$_value_t* clist_$_itval(clist_$_iter_t it);
```
diff --git a/docs/cvec_api.md b/docs/cvec_api.md
index 568c5129..79c143ee 100644
--- a/docs/cvec_api.md
+++ b/docs/cvec_api.md
@@ -9,7 +9,7 @@ This describes the API of vector type **cvec**.
```c
#define using_cvec_str()
-#define using_cvec(z, Value, valueDestroy=c_default_del,
+#define using_cvec($, Value, valueDestroy=c_default_del,
valueCompareRaw=c_default_compare,
RawValue=Value,
valueToRaw=c_default_to_raw,
@@ -17,19 +17,19 @@ This describes the API of vector type **cvec**.
```
The macro `using_cvec()` can be instantiated with 2, 3, 4, or 7 arguments in the global scope.
Defaults are given above for args not specified. Note that `z` can be any name, it's a tag and
-will affect the names of all cvec types and methods, e.g. for `using_cvec(my, int);` `_z` should
-be replaced by `_my` in all of the following documentation. `using_cvec_str()` is a predefined
+will affect the names of all cvec types and methods, e.g. for `using_cvec(my, int);` `$` should
+be replaced by `my` in all of the following documentation. `using_cvec_str()` is a predefined
macro for `using_cvec(str, cstr_t, ...)`.
## Types
| Type name | Type definition | Used to represent... |
|:---------------------|:---------------------------------------|:------------------------------------|
-| `cvec_z` | `struct { cvec_z_value_t* data; }` | The cvec type |
-| `cvec_z_value_t` | `Value` | The cvec element type |
-| `cvec_z_input_t` | `cvec_z_value_t` | cvec input type |
-| `cvec_z_rawvalue_t` | `RawValue` | cvec raw value type |
-| `cvec_z_iter_t` | `struct { cvec_z_value_t* val; }` | cvec iterator |
+| `cvec_$` | `struct { cvec_$_value_t* data; }` | The cvec type |
+| `cvec_$_value_t` | `Value` | The cvec element type |
+| `cvec_$_input_t` | `cvec_$_value_t` | cvec input type |
+| `cvec_$_rawvalue_t` | `RawValue` | cvec raw value type |
+| `cvec_$_iter_t` | `struct { cvec_$_value_t* val; }` | cvec iterator |
## Constants and macros
@@ -53,57 +53,57 @@ All cvec definitions and prototypes may be included in your C source file by inc
The interface for cvec:
```c
-cvec_z cvec_z_init(void);
-cvec_z cvec_z_with_size(size_t size, Value fill_val);
-cvec_z cvec_z_with_capacity(size_t size);
-
-void cvec_z_clear(cvec_z* self);
-void cvec_z_reserve(cvec_z* self, size_t cap);
-void cvec_z_resize(cvec_z* self, size_t size, Value fill_val);
-void cvec_z_swap(cvec_z* a, cvec_z* b);
-
-void cvec_z_del(cvec_z* self);
-
-bool cvec_z_empty(cvec_z vec);
-size_t cvec_z_size(cvec_z vec);
-size_t cvec_z_capacity(cvec_z vec);
-Value cvec_z_value_from_raw(RawValue val);
-
-cvec_z_value_t* cvec_z_at(cvec_z* self, size_t i);
-cvec_z_value_t* cvec_z_front(cvec_z* self);
-cvec_z_value_t* cvec_z_back(cvec_z* self);
-
-void cvec_z_push_n(cvec_z *self, const cvec_z_input_t in[], size_t size);
-void cvec_z_push_back(cvec_z* self, Value value);
-void cvec_z_emplace_back(cvec_z* self, RawValue val);
-void cvec_z_pop_back(cvec_z* self);
-
-cvec_z_iter_t cvec_z_insert_at(cvec_z* self, cvec_z_iter_t pos, Value value);
-cvec_z_iter_t cvec_z_insert_at_idx(cvec_z* self, size_t idx, Value value);
-cvec_z_iter_t cvec_z_emplace_at(cvec_z* self, cvec_z_iter_t pos, RawValue val);
-cvec_z_iter_t cvec_z_emplace_at_idx(cvec_z* self, size_t idx, RawValue val);
-cvec_z_iter_t cvec_z_insert_range(cvec_z* self, cvec_z_iter_t pos,
- cvec_z_iter_t first, cvec_z_iter_t finish);
-cvec_z_iter_t cvec_z_insert_range_p(cvec_z* self, cvec_z_value_t* pos,
- const cvec_z_value_t* pfirst, const cvec_z_value_t* pfinish);
-
-cvec_z_iter_t cvec_z_erase_at(cvec_z* self, cvec_z_iter_t pos);
-cvec_z_iter_t cvec_z_erase_at_idx(cvec_z* self, size_t idx);
-cvec_z_iter_t cvec_z_erase_range(cvec_z* self, cvec_z_iter_t first, cvec_z_iter_t finish);
-cvec_z_iter_t cvec_z_erase_range_p(cvec_z* self, cvec_z_value_t* first, cvec_z_value_t* finish);
-cvec_z_iter_t cvec_z_erase_range_idx(cvec_z* self, size_t ifirst, size_t ifinish);
-
-cvec_z_iter_t cvec_z_find(const cvec_z* self, RawValue val);
-cvec_z_iter_t cvec_z_find_in_range(const cvec_z* self,
- cvec_z_iter_t first, cvec_z_iter_t finish, RawValue val);
-
-void cvec_z_sort(cvec_z* self);
-void cvec_z_sort_with(cvec_z* self, size_t ifirst, size_t ifinish,
- int(*cmp)(const cvec_z_value_t*, const cvec_z_value_t*));
-
-cvec_z_iter_t cvec_z_begin(const cvec_z* self);
-cvec_z_iter_t cvec_z_last(const cvec_z* self);
-cvec_z_iter_t cvec_z_end(const cvec_z* self);
-void cvec_z_next(cvec_z_iter_t* it);
-cvec_z_value_t* cvec_z_itval(cvec_z_iter_t it);
+cvec_$ cvec_$_init(void);
+cvec_$ cvec_$_with_size(size_t size, Value fill_val);
+cvec_$ cvec_$_with_capacity(size_t size);
+
+void cvec_$_clear(cvec_$* self);
+void cvec_$_reserve(cvec_$* self, size_t cap);
+void cvec_$_resize(cvec_$* self, size_t size, Value fill_val);
+void cvec_$_swap(cvec_$* a, cvec_$* b);
+
+void cvec_$_del(cvec_$* self);
+
+bool cvec_$_empty(cvec_$ vec);
+size_t cvec_$_size(cvec_$ vec);
+size_t cvec_$_capacity(cvec_$ vec);
+Value cvec_$_value_from_raw(RawValue val);
+
+cvec_$_value_t* cvec_$_at(cvec_$* self, size_t i);
+cvec_$_value_t* cvec_$_front(cvec_$* self);
+cvec_$_value_t* cvec_$_back(cvec_$* self);
+
+void cvec_$_push_n(cvec_$ *self, const cvec_$_input_t in[], size_t size);
+void cvec_$_push_back(cvec_$* self, Value value);
+void cvec_$_emplace_back(cvec_$* self, RawValue val);
+void cvec_$_pop_back(cvec_$* self);
+
+cvec_$_iter_t cvec_$_insert_at(cvec_$* self, cvec_$_iter_t pos, Value value);
+cvec_$_iter_t cvec_$_insert_at_idx(cvec_$* self, size_t idx, Value value);
+cvec_$_iter_t cvec_$_emplace_at(cvec_$* self, cvec_$_iter_t pos, RawValue val);
+cvec_$_iter_t cvec_$_emplace_at_idx(cvec_$* self, size_t idx, RawValue val);
+cvec_$_iter_t cvec_$_insert_range(cvec_$* self, cvec_$_iter_t pos,
+ cvec_$_iter_t first, cvec_$_iter_t finish);
+cvec_$_iter_t cvec_$_insert_range_p(cvec_$* self, cvec_$_value_t* pos,
+ const cvec_$_value_t* pfirst, const cvec_$_value_t* pfinish);
+
+cvec_$_iter_t cvec_$_erase_at(cvec_$* self, cvec_$_iter_t pos);
+cvec_$_iter_t cvec_$_erase_at_idx(cvec_$* self, size_t idx);
+cvec_$_iter_t cvec_$_erase_range(cvec_$* self, cvec_$_iter_t first, cvec_$_iter_t finish);
+cvec_$_iter_t cvec_$_erase_range_p(cvec_$* self, cvec_$_value_t* first, cvec_$_value_t* finish);
+cvec_$_iter_t cvec_$_erase_range_idx(cvec_$* self, size_t ifirst, size_t ifinish);
+
+cvec_$_iter_t cvec_$_find(const cvec_$* self, RawValue val);
+cvec_$_iter_t cvec_$_find_in_range(const cvec_$* self,
+ cvec_$_iter_t first, cvec_$_iter_t finish, RawValue val);
+
+void cvec_$_sort(cvec_$* self);
+void cvec_$_sort_with(cvec_$* self, size_t ifirst, size_t ifinish,
+ int(*cmp)(const cvec_$_value_t*, const cvec_$_value_t*));
+
+cvec_$_iter_t cvec_$_begin(const cvec_$* self);
+cvec_$_iter_t cvec_$_last(const cvec_$* self);
+cvec_$_iter_t cvec_$_end(const cvec_$* self);
+void cvec_$_next(cvec_$_iter_t* it);
+cvec_$_value_t* cvec_$_itval(cvec_$_iter_t it);
```