-/* $NetBSD: primes.c,v 1.8 1998/09/13 15:27:29 hubertf Exp $ */
+/* $NetBSD: primes.c,v 1.9 1999/09/08 21:17:55 jsm Exp $ */
/*
* Copyright (c) 1989, 1993
#if 0
static char sccsid[] = "@(#)primes.c 8.5 (Berkeley) 5/10/95";
#else
-__RCSID("$NetBSD: primes.c,v 1.8 1998/09/13 15:27:29 hubertf Exp $");
+__RCSID("$NetBSD: primes.c,v 1.9 1999/09/08 21:17:55 jsm Exp $");
#endif
#endif /* not lint */
* We are able to sieve 2^32-1 because this byte table yields all primes
* up to 65537 and 65537^2 > 2^32-1.
*/
-extern ubig prime[];
-extern ubig *pr_limit; /* largest prime in the prime array */
+extern const ubig prime[];
+extern const ubig *pr_limit; /* largest prime in the prime array */
/*
* To avoid excessive sieves for small factors, we use the table below to
* setup our sieve blocks. Each element represents a odd number starting
* with 1. All non-zero elements are factors of 3, 5, 7, 11 and 13.
*/
-extern char pattern[];
-extern int pattern_size; /* length of pattern array */
+extern const char pattern[];
+extern const int pattern_size; /* length of pattern array */
int main __P((int, char *[]));
void primes __P((ubig, ubig));
char *q; /* sieve spot */
ubig factor; /* index and factor */
char *tab_lim; /* the limit to sieve on the table */
- ubig *p; /* prime table pointer */
+ const ubig *p; /* prime table pointer */
ubig fact_lim; /* highest prime for current block */
/*