diff options
| author | Tyge Løvset <[email protected]> | 2023-03-12 13:30:15 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-03-12 13:30:15 +0100 |
| commit | c9be5f66a481bd040b36a25314f6589dd939daa5 (patch) | |
| tree | d71cc01f17fabc526a72219c225b015b4130c8b3 /misc/examples/prime.c | |
| parent | 1ac8bb4ff664baa838b44ed6bf62225766f000c5 (diff) | |
| download | STC-modified-c9be5f66a481bd040b36a25314f6589dd939daa5.tar.gz STC-modified-c9be5f66a481bd040b36a25314f6589dd939daa5.zip | |
Safer state machine in coroutine.h (internal).
Removed c_forwhile() macro. Redundant, use c_forfilter().
Removed find and eq in cspan (use general c_find_if() instead for search).
Diffstat (limited to 'misc/examples/prime.c')
| -rw-r--r-- | misc/examples/prime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/prime.c b/misc/examples/prime.c index 59ee336c..16a59774 100644 --- a/misc/examples/prime.c +++ b/misc/examples/prime.c @@ -43,9 +43,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)) { + c_forfilter (i, crange, R, + cbits_test(&primes, *i.ref>>1) && + c_flt_take(i, 50)) { printf("%lld ", *i.ref); if (c_flt_last(i) % 10 == 0) puts(""); } |
