diff options
| author | Tyge Løvset <[email protected]> | 2021-02-24 19:08:21 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-02-24 19:08:21 +0100 |
| commit | 1745da92874e1799c7d60f6e6810b398e9ab9f15 (patch) | |
| tree | e2fcb84239a7e6a0711304fdf28618344cf7507e /examples | |
| parent | 46552181642b8ee52bc1a6e426c31b5c65aea499 (diff) | |
| download | STC-modified-1745da92874e1799c7d60f6e6810b398e9ab9f15.tar.gz STC-modified-1745da92874e1799c7d60f6e6810b398e9ab9f15.zip | |
More docs and some file renames.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/crandom_ex.c | 2 | ||||
| -rw-r--r-- | examples/demos.c | 2 | ||||
| -rw-r--r-- | examples/ex_gauss1.c | 2 | ||||
| -rw-r--r-- | examples/ex_gauss2.c | 2 | ||||
| -rw-r--r-- | examples/random.c | 2 | ||||
| -rw-r--r-- | examples/replace.c | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/examples/crandom_ex.c b/examples/crandom_ex.c index c923debd..4fa1d487 100644 --- a/examples/crandom_ex.c +++ b/examples/crandom_ex.c @@ -22,7 +22,7 @@ int main() sum += n;
if (n >= 0 && n < R) ++hist[n];
}
- cstr_t bar = cstr_inits;
+ cstr bar = cstr_init();
c_forrange (i, int, R) {
cstr_resize(&bar, hist[i] * 25ull * R / N2, '*');
printf("%3d %s\n", i, bar.str);
diff --git a/examples/demos.c b/examples/demos.c index f60355e2..4eac761c 100644 --- a/examples/demos.c +++ b/examples/demos.c @@ -8,7 +8,7 @@ void stringdemo1()
{
printf("\nSTRINGDEMO1\n");
- cstr_t cs = cstr_from("one-nine-three-seven-five");
+ cstr cs = cstr_from("one-nine-three-seven-five");
printf("%s.\n", cs.str);
cstr_insert(&cs, 3, "-two");
diff --git a/examples/ex_gauss1.c b/examples/ex_gauss1.c index 8ef08694..6536527d 100644 --- a/examples/ex_gauss1.c +++ b/examples/ex_gauss1.c @@ -41,7 +41,7 @@ int main() cvec_e_sort(&vhist);
// Print the gaussian bar chart
- cstr_t bar = cstr_init();
+ cstr bar = cstr_init();
c_foreach (i, cvec_e, vhist) {
size_t n = (size_t) (i.ref->second * StdDev * Scale * 2.5 / N);
if (n > 0) {
diff --git a/examples/ex_gauss2.c b/examples/ex_gauss2.c index e20c1768..616d7071 100644 --- a/examples/ex_gauss2.c +++ b/examples/ex_gauss2.c @@ -28,7 +28,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/examples/random.c b/examples/random.c index c923debd..4fa1d487 100644 --- a/examples/random.c +++ b/examples/random.c @@ -22,7 +22,7 @@ int main() sum += n;
if (n >= 0 && n < R) ++hist[n];
}
- cstr_t bar = cstr_inits;
+ cstr bar = cstr_init();
c_forrange (i, int, R) {
cstr_resize(&bar, hist[i] * 25ull * R / N2, '*');
printf("%3d %s\n", i, bar.str);
diff --git a/examples/replace.c b/examples/replace.c index 53e916fc..fdf5a7df 100644 --- a/examples/replace.c +++ b/examples/replace.c @@ -11,9 +11,9 @@ int main () // replace signatures used in the same order as described above:
// Ustring positions: 0123456789*123456789*12345
- cstr_t s = cstr_from(base); // "this is a test string."
+ cstr s = cstr_from(base); // "this is a test string."
- cstr_t m = cstr_clone(s);
+ cstr m = cstr_clone(s);
cstr_append(&m, m.str);
cstr_append(&m, m.str);
printf("%s\n", m.str);
|
