6 * eratosthenes - Sieve of Eratosthenes
8 * This code implements Eratosthenes' Sieve for efficiently finding
9 * small prime numbers (in this context anything less than several
10 * billion is "small").
13 * #include <ccan/eratosthenes/eratosthenes.h>
15 * int main(int argc, char *argv[])
17 * struct eratosthenes s;
20 * eratosthenes_init(&s);
21 * eratosthenes_sieve(&s, atol(argv[1]));
23 * while ((p = eratosthenes_nextprime(&s, p)) != 0) {
30 * License: LGPL (v2.1 or any later version)
31 * Author: David Gibson <david@gibsond.dropbear.id.au>
33 int main(int argc, char *argv[])
35 /* Expect exactly one argument */
39 if (strcmp(argv[1], "depends") == 0) {
40 printf("ccan/bitmap\n");