diff options
| author | Tyge Løvset <[email protected]> | 2022-07-31 13:03:32 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-07-31 13:03:32 +0200 |
| commit | bc3f6613ba44adcecacbdd106c840e8b6c054e22 (patch) | |
| tree | 9d1d72d8c207592cb25f4892222feaddd22c8b79 /examples | |
| parent | 8a5478f7c14d4c7476d36b137fd7d2c8d95f2c13 (diff) | |
| download | STC-modified-bc3f6613ba44adcecacbdd106c840e8b6c054e22.tar.gz STC-modified-bc3f6613ba44adcecacbdd106c840e8b6c054e22.zip | |
VERSION 3.9: API change in c_forrange() with >= 3 args. csview updates.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/list.c | 2 | ||||
| -rw-r--r-- | examples/stack.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/list.c b/examples/list.c index 17ed048d..d76490f8 100644 --- a/examples/list.c +++ b/examples/list.c @@ -18,7 +18,7 @@ int main() { stc64_t rng = stc64_new(1234); stc64_uniformf_t dist = stc64_uniformf_new(100.0f, n); int m = 0; - c_forrange (i, int, n) + c_forrange (int, i, n) clist_fx_push_back(&list, stc64_uniformf(&rng, &dist)), ++m; double sum = 0.0; printf("sumarize %d:\n", m); diff --git a/examples/stack.c b/examples/stack.c index 1991e269..5507c764 100644 --- a/examples/stack.c +++ b/examples/stack.c @@ -14,12 +14,12 @@ int main() { c_auto (cstack_i, stack) c_auto (cstack_c, chars) { - c_forrange (i, int, 101) + c_forrange (int, i, 101) cstack_i_push(&stack, i*i); printf("%d\n", *cstack_i_top(&stack)); - c_forrange (i, int, 90) + c_forrange (int, i, 90) cstack_i_pop(&stack); c_foreach (i, cstack_i, stack) |
