diff options
Diffstat (limited to 'examples/demos.c')
| -rw-r--r-- | examples/demos.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/demos.c b/examples/demos.c index d7097961..3f0125fd 100644 --- a/examples/demos.c +++ b/examples/demos.c @@ -41,14 +41,14 @@ void vectordemo1() for (size_t i = 10; i <= 100; i += 10) cvec_ix_push_back(&bignums, i * i); - printf("erase - %d: %" PRIuMAX "\n", 3, bignums.data[3]); + printf("erase - %d: %" c_zu "\n", 3, bignums.data[3]); cvec_ix_erase_n(&bignums, 3, 1); // erase index 3 cvec_ix_pop_back(&bignums); // erase the last cvec_ix_erase_n(&bignums, 0, 1); // erase the first for (size_t i = 0; i < cvec_ix_size(&bignums); ++i) { - printf("%" PRIuMAX ": %" PRIuMAX "\n", i, bignums.data[i]); + printf("%" c_zu ": %" c_zu "\n", i, bignums.data[i]); } } } @@ -175,11 +175,11 @@ void mapdemo3() cmap_str_iter it = cmap_str_find(&table, "Make"); c_foreach (i, cmap_str, table) printf("entry: %s: %s\n", cstr_str(&i.ref->first), cstr_str(&i.ref->second)); - printf("size %" PRIuMAX ": remove: Make: %s\n", cmap_str_size(&table), cstr_str(&it.ref->second)); + printf("size %" c_zu ": remove: Make: %s\n", cmap_str_size(&table), cstr_str(&it.ref->second)); //cmap_str_erase(&table, "Make"); cmap_str_erase_at(&table, it); - printf("size %" PRIuMAX "\n", cmap_str_size(&table)); + printf("size %" c_zu "\n", cmap_str_size(&table)); c_foreach (i, cmap_str, table) printf("entry: %s: %s\n", cstr_str(&i.ref->first), cstr_str(&i.ref->second)); cmap_str_drop(&table); // frees key and value cstrs, and hash table. @@ -199,7 +199,7 @@ void arraydemo1() float **arr2 = arr3.data[5]; float *arr1 = arr3.data[5][4]; - printf("arr3: %" PRIuMAX ": (%" PRIuMAX ", %" PRIuMAX ", %" PRIuMAX ") = %" PRIuMAX "\n", sizeof(arr3), + printf("arr3: %" c_zu ": (%" c_zu ", %" c_zu ", %" c_zu ") = %" c_zu "\n", sizeof(arr3), arr3.xdim, arr3.ydim, arr3.zdim, carr3_f_size(&arr3)); printf("%g\n", arr1[3]); // = 10.2 |
