X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/77e3814f0c0e3dea4d0032e25666f77e6f83bfff..d6817e1fbd2e010cc8d517dac834003de3e45e22:/primes/primes.h?ds=sidebyside diff --git a/primes/primes.h b/primes/primes.h index 3cc34a20..a032c9b4 100644 --- a/primes/primes.h +++ b/primes/primes.h @@ -1,6 +1,8 @@ +/* $NetBSD: primes.h,v 1.5 2003/08/07 09:37:34 agc Exp $ */ + /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Landon Curt Noll. @@ -13,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. * @@ -33,24 +31,20 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)primes.h 5.2 (Berkeley) 6/1/90 + * @(#)primes.h 8.2 (Berkeley) 3/1/94 */ /* * primes - generate a table of primes between two values * - * By: Landon Curt Noll chongo@toad.com, ...!{sun,tolsoft}!hoptoad!chongo + * By: Landon Curt Noll chongo@toad.com, ...!{sun,tolsoft}!hoptoad!chongo * - * chongo /\oo/\ + * chongo /\oo/\ */ /* ubig is the type that holds a large unsigned value */ -typedef unsigned long ubig; /* must be >=32 bit unsigned value */ +typedef unsigned long ubig; /* must be >=32 bit unsigned value */ +#define BIG ULONG_MAX /* largest value will sieve */ -/* - * sieve parameters - */ -#define BIG ((ubig)0xffffffff) /* highest value we will sieve */ -#define SEMIBIG ((ubig)0x7fffffff) /* highest signed value */ -#define NEG_SEMIBIG ((ubig)0x80000000) /* lowest signed value */ -#define TABSIZE 256*1024 /* bytes in sieve table (must be > 3*5*7*11) */ +/* bytes in sieve table (must be > 3*5*7*11) */ +#define TABSIZE 256*1024