summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/prime.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-03-27 19:57:09 +0200
committerTyge Løvset <[email protected]>2023-03-27 19:57:09 +0200
commite35036deef4fc8f17cc9221e2e666dfdb832ba78 (patch)
treeb41e45015be7454ef3f82092b558da6b365d6a57 /misc/examples/prime.c
parentede39bc98a758674485796174ea860515ec281e6 (diff)
downloadSTC-modified-e35036deef4fc8f17cc9221e2e666dfdb832ba78.tar.gz
STC-modified-e35036deef4fc8f17cc9221e2e666dfdb832ba78.zip
More RAII cleanup in examples. Also removed gauss1.c and new_deq.c
Diffstat (limited to 'misc/examples/prime.c')
-rw-r--r--misc/examples/prime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/examples/prime.c b/misc/examples/prime.c
index 18bf3490..9ffb2f53 100644
--- a/misc/examples/prime.c
+++ b/misc/examples/prime.c
@@ -44,8 +44,9 @@ int main(void)
puts("Show the last 50 primes using a temporary crange generator:");
crange R = crange_make(n - 1, 0, -2);
c_forfilter (i, crange, R,
- cbits_test(&primes, *i.ref>>1) &&
- c_flt_take(i, 50)) {
+ cbits_test(&primes, *i.ref>>1) &&
+ c_flt_take(i, 50)
+ ){
printf("%lld ", *i.ref);
if (c_flt_last(i) % 10 == 0) puts("");
}