summaryrefslogtreecommitdiffstats
path: root/primes/primes.c
diff options
context:
space:
mode:
Diffstat (limited to 'primes/primes.c')
-rw-r--r--primes/primes.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/primes/primes.c b/primes/primes.c
index ea6f0117..67fa6a4f 100644
--- a/primes/primes.c
+++ b/primes/primes.c
@@ -1,4 +1,4 @@
-/* $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
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#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 */
@@ -96,16 +96,16 @@ char table[TABSIZE]; /* Eratosthenes sieve of odd numbers */
* 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));
@@ -227,7 +227,7 @@ primes(start, stop)
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 */
/*