X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/04f4d7044367099914cf1906ae27ac20c24e44cf..71a4bdd386813a0bd96c205cf36b3faf3b1ea0e1:/primes/pattern.c diff --git a/primes/pattern.c b/primes/pattern.c index d960a39e..52784a5a 100644 --- a/primes/pattern.c +++ b/primes/pattern.c @@ -1,4 +1,4 @@ -/* $NetBSD: pattern.c,v 1.5 1999/09/08 21:17:55 jsm Exp $ */ +/* $NetBSD: pattern.c,v 1.7 2014/10/02 21:36:37 ast Exp $ */ /* * Copyright (c) 1989, 1993 @@ -15,11 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -36,21 +32,20 @@ * SUCH DAMAGE. */ -#include +#include + #ifndef lint #if 0 static char sccsid[] = "@(#)pattern.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pattern.c,v 1.5 1999/09/08 21:17:55 jsm Exp $"); +__RCSID("$NetBSD: pattern.c,v 1.7 2014/10/02 21:36:37 ast Exp $"); #endif #endif /* not lint */ /* * pattern - the Eratosthenes sieve on odd numbers for 3,5,7,11 and 13 * - * By: Landon Curt Noll chongo@toad.com - * - * chongo /\oo/\ + * By Landon Curt Noll, http://www.isthe.com/chongo/index.html /\oo/\ * * To avoid excessive sieves for small factors, we use the table below to * setup our sieve blocks. Each element represents a odd number starting @@ -444,4 +439,4 @@ const char pattern[] = { 0,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1, 0,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,0,0,0,0,0,1 }; -const int pattern_size = (sizeof(pattern)/sizeof(pattern[0])); +const size_t pattern_size = (sizeof(pattern)/sizeof(pattern[0]));