diff options
| author | Tyge Løvset <[email protected]> | 2021-05-24 12:43:39 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-05-24 12:43:39 +0200 |
| commit | 64f50b93b08a8015783b2887e1ab5afd5fedb40c (patch) | |
| tree | ca70f0b4c87b0d59a9689b12d26bfa2bab160916 /examples/bits.c | |
| parent | 771a8dff31b0c0a905c57ec6f590cd03975f8817 (diff) | |
| download | STC-modified-64f50b93b08a8015783b2887e1ab5afd5fedb40c.tar.gz STC-modified-64f50b93b08a8015783b2887e1ab5afd5fedb40c.zip | |
Renamed c_with => c_fordefer, and removed c_withvar. Macros were too deceiving and hid the fact that it was for-loops. Now it is more explicit.
Diffstat (limited to 'examples/bits.c')
| -rw-r--r-- | examples/bits.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/bits.c b/examples/bits.c index 65be30ac..e478321c 100644 --- a/examples/bits.c +++ b/examples/bits.c @@ -3,7 +3,7 @@ int main()
{
- c_with (cbits set = cbits_with_size(23, true), cbits_del(&set)) {
+ c_fordefer (cbits set = cbits_with_size(23, true), cbits_del(&set)) {
printf("count %zu, %zu\n", cbits_count(set), set.size);
cbits s1 = cbits_from_str("1110100110111");
char buf[256];
@@ -12,7 +12,7 @@ int main() cbits_reset(&set, 9);
cbits_resize(&set, 43, false);
- c_withbuf (str, char, set.size + 1)
+ c_forbuffer (str, char, set.size + 1)
printf(" str: %s\n", cbits_to_str(set, str, 0, -1));
printf("%4zu: ", set.size);
@@ -35,7 +35,7 @@ int main() printf("%d", cbits_test(set, i));
puts("");
- c_with (cbits s2 = cbits_clone(set), cbits_del(&s2)) {
+ c_fordefer (cbits s2 = cbits_clone(set), cbits_del(&s2)) {
cbits_flip_all(&s2);
cbits_set(&s2, 16);
cbits_set(&s2, 17);
|
