diff options
| author | Tyge Løvset <[email protected]> | 2021-03-03 11:28:58 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-03 11:37:19 +0100 |
| commit | 57f479e4099236a0fe2b7bbd95f0771f309aff2b (patch) | |
| tree | 39d42fcdb75c55eaac9972c2640a78d2d916ef1d /docs | |
| parent | 30cf6e3e080725539f7c09890a151d13eece7911 (diff) | |
| download | STC-modified-57f479e4099236a0fe2b7bbd95f0771f309aff2b.tar.gz STC-modified-57f479e4099236a0fe2b7bbd95f0771f309aff2b.zip | |
Removed cstr_t from docs (use cstr).
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/cdeq_api.md | 2 | ||||
| -rw-r--r-- | docs/clist_api.md | 2 | ||||
| -rw-r--r-- | docs/cptr_api.md | 6 | ||||
| -rw-r--r-- | docs/crandom_api.md | 2 | ||||
| -rw-r--r-- | docs/cvec_api.md | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/docs/cdeq_api.md b/docs/cdeq_api.md index 065419fb..1f0ef0ce 100644 --- a/docs/cdeq_api.md +++ b/docs/cdeq_api.md @@ -21,7 +21,7 @@ be replaced by `i` in all of the following documentation. `using_cdeq_str()` is a shorthand for: ``` -using_cdeq(str, cstr_t, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*) +using_cdeq(str, cstr, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*) ``` ## Header file diff --git a/docs/clist_api.md b/docs/clist_api.md index cbd0bdbf..a63bfbd9 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -28,7 +28,7 @@ The macro `using_clist()` must be instantiated in the global scope. `X` is a typ will affect the names of all clist types and methods. E.g. declaring `using_clist(i, int);`, `X` should be replaced by `i` in all of the following documentation. `using_clist_str()` is a shorthand for ```c -using_clist(str, cstr_t, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*) +using_clist(str, cstr, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*) ``` ## Header file diff --git a/docs/cptr_api.md b/docs/cptr_api.md index 4f4da240..37f9abe3 100644 --- a/docs/cptr_api.md +++ b/docs/cptr_api.md @@ -73,7 +73,7 @@ Managed raw pointers (cptr) in a cvec. #include <stc/cstr.h> #include <stc/cvec.h> -typedef struct { cstr_t name, last; } Person; +typedef struct { cstr name, last; } Person; Person* Person_make(Person* p, const char* name, const char* last) { p->name = cstr_from(name), p->last = cstr_from(last); @@ -111,7 +111,7 @@ Simple shared pointer (csptr) usage. #include <stc/cptr.h> #include <stc/cstr.h> -typedef struct { cstr_t name, last; } Person; +typedef struct { cstr name, last; } Person; Person* Person_make(Person* p, const char* name, const char* last) { p->name = cstr_from(name), p->last = cstr_from(last); @@ -150,7 +150,7 @@ Advanced: Three different ways to store Person in vectors: 1) `cvec<Person>`, 2) #include <stc/cstr.h> #include <stc/cvec.h> -typedef struct { cstr_t name, last; } Person; +typedef struct { cstr name, last; } Person; Person* Person_make(Person* p, const char* name, const char* last) { p->name = cstr_from(name), p->last = cstr_from(last); diff --git a/docs/crandom_api.md b/docs/crandom_api.md index 60545188..d67a1fb3 100644 --- a/docs/crandom_api.md +++ b/docs/crandom_api.md @@ -94,7 +94,7 @@ int main() } // Print the gaussian bar chart - cstr_t bar = cstr_init(); + cstr bar = cstr_init(); c_foreach (i, csmap_i, mhist) { size_t n = (size_t) (i.ref->second * StdDev * Scale * 2.5 / N); if (n > 0) { diff --git a/docs/cvec_api.md b/docs/cvec_api.md index bf287f02..5b6cd61a 100644 --- a/docs/cvec_api.md +++ b/docs/cvec_api.md @@ -25,7 +25,7 @@ be replaced by `i` in all of the following documentation. `using_cvec_str()` is a shorthand for: ``` -using_cvec(str, cstr_t, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*) +using_cvec(str, cstr, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*) ``` ## Header file @@ -155,9 +155,9 @@ int main() { cvec_str_emplace_back(&names, "Joe"); cstr_assign(&names.data[1], "Jake"); // replace "Joe". - cstr_t tmp = cstr_from_fmt("%d elements so far", cvec_str_size(names)); + cstr tmp = cstr_from_fmt("%d elements so far", cvec_str_size(names)); - // emplace_back() will not compile if adding a new cstr_t type. Use push_back(): + // emplace_back() will not compile if adding a new cstr type. Use push_back(): cvec_str_push_back(&names, tmp); // tmp is moved to names, do not del() it. printf("%s\n", names.data[1].str); // Access the second element |
