summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-03 14:22:01 +0100
committerTyge Løvset <[email protected]>2020-12-03 14:22:01 +0100
commit870a601a62c804f9d15efe5856cc6018b076dfe6 (patch)
treecdd38bfd44bd12b17f682b09163bf06039c9db5e
parent79be0ee109904542ed0ece119c0432f4b629cd44 (diff)
downloadSTC-modified-870a601a62c804f9d15efe5856cc6018b076dfe6.tar.gz
STC-modified-870a601a62c804f9d15efe5856cc6018b076dfe6.zip
Some more fixes.
-rw-r--r--docs/cpqueue_api.md21
-rw-r--r--docs/cqueue_api.md18
-rw-r--r--docs/cset_api.md18
-rw-r--r--docs/cstack_api.md18
4 files changed, 38 insertions, 37 deletions
diff --git a/docs/cpqueue_api.md b/docs/cpqueue_api.md
index 677973b7..24e88fc9 100644
--- a/docs/cpqueue_api.md
+++ b/docs/cpqueue_api.md
@@ -5,22 +5,23 @@ This describes the API of the queue type **cpqueue**. Implemented as a heap.
## Declaration
```c
-#define using_cpqueue(X, CType, MaxOrMinHeap)
+#define using_cpqueue(X, ctype, heap_variant)
```
The macro `using_cpqueue()` must be instantiated in the global scope.
-**cpqueue** uses normally a **cvec** type as underlying implementation, specified as CType.
-The MaxOrMinHeap argument should be specified as a < or >, representing a max-heap or a min-heap.
-`X` is a type tag name and will affect the names of all cpqueue types and methods.
+**cpqueue** uses normally a **cvec** type as underlying implementation, specified as `ctype`.
+The `heap_variant` argument should be given as `<` or `>`, specifying a *max-heap* or a *min-heap*.
+Note that the function `{ctype}_value_compare(x, y)` defined by the underlying vector type is used to
+compare values (priorities). `X` is a type tag name and will affect the names of all cpqueue types and methods.
Declaring `using_cpqueue(my, cvec_my, >);`, `X` should be replaced by `my` in the following documentation.
## Types
-| Type name | Type definition | Used to represent... |
-|:-----------------------|:---------------------------------------|:------------------------------------|
-| `cpqueue_X` | Depends on underlying container type | The cpqueue type |
-| `cpqueue_X_value_t` | | The cpqueue element type |
-| `cpqueue_X_input_t` | | cpqueue input type |
-| `cpqueue_X_rawvalue_t` | | cpqueue raw value type |
+| Type name | Type definition | Used to represent... |
+|:-----------------------|:----------------------------------------|:--------------------------|
+| `cpqueue_X` | `struct {cpqueue_X_value_t* data; ...}` | The cpqueue type |
+| `cpqueue_X_value_t` | Depends on underlying container type | The cpqueue element type |
+| `cpqueue_X_input_t` | " | cpqueue input type |
+| `cpqueue_X_rawvalue_t` | " | cpqueue raw value type |
## Header file
diff --git a/docs/cqueue_api.md b/docs/cqueue_api.md
index deab08f6..71f1db6f 100644
--- a/docs/cqueue_api.md
+++ b/docs/cqueue_api.md
@@ -5,23 +5,23 @@ This describes the API of the queue type **cqueue**.
## Declaration
```c
-#define using_cqueue(X, CType)
+#define using_cqueue(X, ctype)
```
The macro `using_cqueue()` must be instantiated in the global scope.
-**cqueue** uses normally a **clist** type as underlying implementation, given as CType.
+**cqueue** uses normally a **clist** type as underlying implementation, given as `ctype`.
Default values are given above for args not specified. `X` is a type tag name and
will affect the names of all cqueue types and methods. E.g. declaring `using_cqueue(my, clist_my);`,
`X` should be replaced by `my` in all of the following documentation.
## Types
-| Type name | Type definition | Used to represent... |
-|:----------------------|:---------------------------------------|:------------------------------------|
-| `cqueue_X` | Depends on underlying container type | The cqueue type |
-| `cqueue_X_value_t` | | The cqueue element type |
-| `cqueue_X_input_t` | | cqueue input type |
-| `cqueue_X_rawvalue_t` | | cqueue raw value type |
-| `cqueue_X_iter_t` | | cqueue iterator |
+| Type name | Type definition | Used to represent... |
+|:----------------------|:---------------------------------------|:-------------------------|
+| `cqueue_X` | Depends on underlying container type | The cqueue type |
+| `cqueue_X_value_t` | " | The cqueue element type |
+| `cqueue_X_input_t` | " | cqueue input type |
+| `cqueue_X_rawvalue_t` | " | cqueue raw value type |
+| `cqueue_X_iter_t` | " | cqueue iterator |
## Header file
diff --git a/docs/cset_api.md b/docs/cset_api.md
index 94dff33a..ca3e91e3 100644
--- a/docs/cset_api.md
+++ b/docs/cset_api.md
@@ -24,15 +24,15 @@ be replaced by `my` in all of the following documentation.
## Types
-| Type name | Type definition | Used to represent... |
-|:---------------------|:--------------------------------------|:-----------------------------------|
-| `cset_X` | `struct { ... }` | The cset type |
-| `cset_X_rawkey_t` | `RawKey` | The raw key type |
-| `cset_X_key_t` | `Key` | The key type |
-| `cset_X_value_t` | `Key` | The value type |
-| `cset_X_result_t` | `struct { ... }` | Result of insert/emplace |
-| `cset_X_input_t` | `cset_X_rawkey_t` | The input type (rawkey) |
-| `cset_X_iter_t` | `struct { ... }` | Iterator type |
+| Type name | Type definition | Used to represent... |
+|:---------------------|:-------------------------|:-------------------------|
+| `cset_X` | `struct { ... }` | The cset type |
+| `cset_X_rawkey_t` | `RawKey` | The raw key type |
+| `cset_X_key_t` | `Key` | The key type |
+| `cset_X_value_t` | `Key` | The value type |
+| `cset_X_result_t` | `struct { ... }` | Result of insert/emplace |
+| `cset_X_input_t` | `cset_X_rawkey_t` | The input type (rawkey) |
+| `cset_X_iter_t` | `struct { ... }` | Iterator type |
## Constants and macros
diff --git a/docs/cstack_api.md b/docs/cstack_api.md
index a442b30d..898b5d8f 100644
--- a/docs/cstack_api.md
+++ b/docs/cstack_api.md
@@ -5,23 +5,23 @@ This describes the API of the queue type **cstack**.
## Declaration
```c
-#define using_cstack(X, CType)
+#define using_cstack(X, ctype)
```
The macro `using_cstack()` must be instantiated in the global scope.
-**cstack** uses normally a **cvec** type as underlying implementation, given as CType.
+**cstack** uses normally a **cvec** type as underlying implementation, given as `ctype`.
Default values are given above for args not specified. `X` is a type tag name and
will affect the names of all cstack types and methods. E.g. declaring `using_cstack(my, cvec_my);`,
`X` should be replaced by `my` in all of the following documentation.
## Types
-| Type name | Type definition | Used to represent... |
-|:----------------------|:---------------------------------------|:------------------------------------|
-| `cstack_X` | Depends on underlying container type | The cstack type |
-| `cstack_X_value_t` | | The cstack element type |
-| `cstack_X_input_t` | | cstack input type |
-| `cstack_X_rawvalue_t` | | cstack raw value type |
-| `cstack_X_iter_t` | | cstack iterator |
+| Type name | Type definition | Used to represent... |
+|:----------------------|:---------------------------------------|:----------------------------|
+| `cstack_X` | Depends on underlying container type | The cstack type |
+| `cstack_X_value_t` | " | The cstack element type |
+| `cstack_X_input_t` | " | cstack input type |
+| `cstack_X_rawvalue_t` | " | cstack raw value type |
+| `cstack_X_iter_t` | " | cstack iterator |
## Header file