summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-01 09:07:58 +0100
committerTyge Løvset <[email protected]>2020-12-01 09:07:58 +0100
commit1a48e4b33f6d658bc167723a87cf0a399375e89c (patch)
treede35dac591e30074dd247ba65704945bfe75605c /docs
parent200a539df68c321eb8678cc1d35a75832c2b738b (diff)
downloadSTC-modified-1a48e4b33f6d658bc167723a87cf0a399375e89c.tar.gz
STC-modified-1a48e4b33f6d658bc167723a87cf0a399375e89c.zip
Fixed docs, some minor changes in cstr.h and cmap.h as well.
Diffstat (limited to 'docs')
-rw-r--r--docs/cbitset_api.md4
-rw-r--r--docs/clist_api.md4
-rw-r--r--docs/cmap_api.md36
-rw-r--r--docs/crandom_api.md4
-rw-r--r--docs/cset_api.md29
-rw-r--r--docs/cstr_api.md3
-rw-r--r--docs/cvec_api.md12
7 files changed, 40 insertions, 52 deletions
diff --git a/docs/cbitset_api.md b/docs/cbitset_api.md
index d485f35a..59459b62 100644
--- a/docs/cbitset_api.md
+++ b/docs/cbitset_api.md
@@ -1,6 +1,4 @@
-# Introduction
-
-UNDER CONSTRUCTION!
+# Container type cbitset
This describes the API of string type **cbitset**.
diff --git a/docs/clist_api.md b/docs/clist_api.md
index 74ae44f5..2f8b03fc 100644
--- a/docs/clist_api.md
+++ b/docs/clist_api.md
@@ -1,6 +1,4 @@
-# Introduction
-
-UNDER CONSTRUCTION!
+# Container type clist
This describes the API of circular singly linked list type **clist**.
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 3062bc07..109791f3 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -1,6 +1,4 @@
-# Introduction
-
-UNDER CONSTRUCTION!
+# Container type cmap
This describes the API of the unordered map type **cmap**.
@@ -44,19 +42,20 @@ be replaced by `my` in all of the following documentation.
| | ` uint8_t* _hashx;` | |
| | ` ...;` | |
| | `}` | |
-| `cmap_X_key_t` | `Key` | The cmap key type |
-| `cmap_X_mapped_t` | `Mapped` | cmap mapped type |
-| `cmap_X_value_t` | `struct {` | The cmap value type |
+| `cmap_X_rawkey_t` | `RawKey` | The raw key type |
+| `cmap_X_rawval_t` | `RawMapped` | The raw mapped type |
+| `cmap_X_key_t` | `Key` | The key type |
+| `cmap_X_mapped_t` | `Mapped` | The mapped type |
+| `cmap_X_value_t` | `struct {` | The value type |
| | ` cmap_X_key_t first;` | |
| | ` cmap_X_mapped_t second;` | |
| | `}` | |
-| `cmap_X_input_t` | `cmap_X_value_t` | cmap input type |
-| `cmap_X_rawvalue_t` | `RawMapped` | cmap raw value type |
+| `cmap_X_input_t` | `struct { ... }` | RawKey + RawVal type |
| `cmap_X_result_t` | `struct {` | Result of insert/put/emplace |
| | ` cmap_X_value_t* first;` | |
| | ` bool second; /* inserted */` | |
| | `}` | |
-| `cmap_X_iter_t` | `struct {` | cmap iterator |
+| `cmap_X_iter_t` | `struct {` | Iterator type |
| | ` cmap_X_value_t* val;` | |
| | ` ...;` | |
| | `}` | |
@@ -69,8 +68,7 @@ be replaced by `my` in all of the following documentation.
| `cmap_empty(map)` | Test for empty map |
| `cmap_size(map)` | Get map size |
| `cmap_capacity(map)` | Get map capacity |
-| `c_try_emplace(self, ctype, key, val) | Emplace if key exist |
-| `c_insert_items(self, ctype, array)` | Insert literals list |
+| `c_try_emplace(self, ctype, key, val)` | Emplace if key exist |
## Header file
@@ -102,19 +100,19 @@ size_t cmap_X_capacity(cmap_X m);
void cmap_X_push_n(cmap_X* self, const cmap_X_input_t in[], size_t size);
-cmap_X_result_t cmap_X_emplace(cmap_X* self, RawKey rawKey, RawMapped rawVal);
+cmap_X_result_t cmap_X_emplace(cmap_X* self, RawKey rkey, RawMapped rmapped);
cmap_X_result_t cmap_X_insert(cmap_X* self, cmap_X_input_t in);
-cmap_X_result_t cmap_X_insert_or_assign(cmap_X* self, RawKey rawKey, RawMapped rawVal);
-cmap_X_result_t cmap_X_put(cmap_X* self, RawKey rawKey, RawMapped rawVal);
-cmap_X_result_t cmap_X_putv(cmap_X* self, RawKey rawKey, Mapped mapped);
-cmap_X_mapped_t* cmap_X_at(const cmap_X* self, RawKey rawKey);
+cmap_X_result_t cmap_X_insert_or_assign(cmap_X* self, RawKey rkey, RawMapped rmapped);
+cmap_X_result_t cmap_X_put(cmap_X* self, RawKey rkey, RawMapped rmapped);
+cmap_X_result_t cmap_X_putv(cmap_X* self, RawKey rkey, Mapped mapped);
+cmap_X_mapped_t* cmap_X_at(const cmap_X* self, RawKey rkey);
-size_t cmap_X_erase(cmap_X* self, RawKey rawKey);
+size_t cmap_X_erase(cmap_X* self, RawKey rkey);
void cmap_X_erase_entry(cmap_X* self, cmap_X_value_t* val);
cmap_X_iter_t cmap_X_erase_at(cmap_X* self, cmap_X_iter_t pos);
-cmap_X_value_t* cmap_X_find(const cmap_X* self, RawKey rawKey);
-bool cmap_X_contains(const cmap_X* self, RawKey rawKey);
+cmap_X_value_t* cmap_X_find(const cmap_X* self, RawKey rkey);
+bool cmap_X_contains(const cmap_X* self, RawKey rkey);
cmap_X_iter_t cmap_X_begin(cmap_X* self);
cmap_X_iter_t cmap_X_end(cmap_X* self);
diff --git a/docs/crandom_api.md b/docs/crandom_api.md
index 59389d5e..84865a26 100644
--- a/docs/crandom_api.md
+++ b/docs/crandom_api.md
@@ -1,6 +1,4 @@
-# Introduction
-
-UNDER CONSTRUCTION!
+# Random number generators
This describes the API of module **crandom**.
diff --git a/docs/cset_api.md b/docs/cset_api.md
index 5e24a56e..92d6afe4 100644
--- a/docs/cset_api.md
+++ b/docs/cset_api.md
@@ -1,6 +1,4 @@
-# Introduction
-
-UNDER CONSTRUCTION!
+# Container type cset
This describes the API of the unordered set type **cset**.
@@ -32,15 +30,15 @@ be replaced by `my` in all of the following documentation.
| | ` uint8_t* _hashx;` | |
| | ` ...;` | |
| | `}` | |
-| `cset_X_key_t` | `Key` | The cset key type |
-| `cset_X_mapped_t` | `Mapped` | cset mapped type |
-| `cset_X_value_t` | `Key` | The cset value 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_value_t* first;` | |
| | ` bool second; /* inserted */` | |
| | `}` | |
-| `cset_X_input_t` | `cset_X_value_t` | cset input type |
-| `cset_X_iter_t` | `struct {` | cset iterator |
+| `cset_X_input_t` | `cset_X_rawkey_t` | The input type (rawkey) |
+| `cset_X_iter_t` | `struct {` | Iterator type |
| | ` cset_X_value_t* val;` | |
| | ` ...;` | |
| | `}` | |
@@ -54,14 +52,13 @@ be replaced by `my` in all of the following documentation.
| `cset_size(set)` | Get set size |
| `cset_capacity(set)` | Get set capacity |
| `c_try_emplace(self, ctype, key, val)` | Emplace if key exist |
-| `c_insert_items(self, ctype, array)` | Insert literals list |
## Header file
All cset definitions and prototypes may be included in your C source file by including a single header file.
```c
-#include "stc/cset.h" or "stc/cmap.h"
+#include "stc/cset.h"
```
## Methods
@@ -86,22 +83,22 @@ size_t cset_X_capacity(cset_X m);
void cset_X_push_n(cset_X* self, const cset_X_input_t in[], size_t size);
-cset_X_result_t cset_X_emplace(cset_X* self, cset_X_rawkey_t rawKey);
-cset_X_result_t cset_X_insert(cset_X* self, cset_X_rawkey_t rawKey);
+cset_X_result_t cset_X_emplace(cset_X* self, RawKey rkey);
+cset_X_result_t cset_X_insert(cset_X* self, RawKey rkey);
-size_t cset_X_erase(cset_X* self, cset_X_rawkey_t rawKey);
+size_t cset_X_erase(cset_X* self, RawKey rkey);
void cset_X_erase_entry(cset_X* self, cset_X_key_t* key);
cset_X_iter_t cset_X_erase_at(cset_X* self, cset_X_iter_t pos);
-cset_X_value_t* cset_X_find(const cset_X* self, cset_X_rawkey_t rawKey);
-bool cset_X_contains(const cset_X* self, cset_X_rawkey_t rawKey);
+cset_X_value_t* cset_X_find(const cset_X* self, RawKey rkey);
+bool cset_X_contains(const cset_X* self, RawKey rkey);
cset_X_iter_t cset_X_begin(cset_X* self);
cset_X_iter_t cset_X_end(cset_X* self);
void cset_X_next(cset_X_iter_t* it);
cset_X_mapped_t* cset_X_itval(cset_X_iter_t it);
-cset_bucket_t cset_X_bucket(const cset_X* self, const cset_X_rawkey_t* rawKeyPtr);
+cset_bucket_t cset_X_bucket(const cset_X* self, const cset_X_rawkey_t* rkeyPtr);
uint32_t c_default_hash16(const void *data, size_t len);
uint32_t c_default_hash32(const void* data, size_t len);
diff --git a/docs/cstr_api.md b/docs/cstr_api.md
index c3f6765d..d1941dd1 100644
--- a/docs/cstr_api.md
+++ b/docs/cstr_api.md
@@ -1,4 +1,4 @@
-# Introduction
+# String type cstr_t
This describes the API of string type **cstr_t**.
@@ -14,6 +14,7 @@ This describes the API of string type **cstr_t**.
| Name | Value |
|:---------------------------|:-----------------|
+| `cstr_inits` | `{...}` |
| `cstr_npos` | `-1ull` |
## Header file
diff --git a/docs/cvec_api.md b/docs/cvec_api.md
index 1d521b55..7c8039ed 100644
--- a/docs/cvec_api.md
+++ b/docs/cvec_api.md
@@ -1,6 +1,4 @@
-# Introduction
-
-UNDER CONSTRUCTION!
+# Container type cvec
This describes the API of vector type **cvec**.
@@ -27,10 +25,10 @@ be replaced by `my` in all of the following documentation.
| Type name | Type definition | Used to represent... |
|:---------------------|:---------------------------------------|:------------------------------------|
| `cvec_X` | `struct { cvec_X_value_t* data; }` | The cvec type |
-| `cvec_X_value_t` | `Value` | The cvec element type |
-| `cvec_X_input_t` | `cvec_X_value_t` | cvec input type |
-| `cvec_X_rawvalue_t` | `RawValue` | cvec raw value type |
-| `cvec_X_iter_t` | `struct { cvec_X_value_t* val; }` | cvec iterator |
+| `cvec_X_value_t` | `Value` | The cvec value type |
+| `cvec_X_input_t` | `cvec_X_value_t` | The input type |
+| `cvec_X_rawvalue_t` | `RawValue` | The raw value type |
+| `cvec_X_iter_t` | `struct { cvec_X_value_t* val; }` | The iterator |
## Constants and macros