diff options
author | fanf <fanf@FreeBSD.org> | 2002-10-09 19:38:55 +0000 |
---|---|---|
committer | fanf <fanf@FreeBSD.org> | 2002-10-09 19:38:55 +0000 |
commit | b5ea937ee8abc00f218c186759abaf13273b43a8 (patch) | |
tree | 3550a410f691d5a377d315fc6ddf06ffb9cd04cd /games/primes/pr_tbl.c | |
parent | 7cc0ed53c23287ab506f8f86ebbadb958fab6ec7 (diff) | |
download | FreeBSD-src-b5ea937ee8abc00f218c186759abaf13273b43a8.zip FreeBSD-src-b5ea937ee8abc00f218c186759abaf13273b43a8.tar.gz |
Style fixes to: #include ordering; use const and static; ANSI functions;
various usage synopses; bogus and/or unnecessary casting; exit values;
use LINE_MAX instead of magic numbers; declare extern variables in a
header; add $FreeBSD$ where missing.
Reviewed by: markm, obrien
Obtained from: NetBSD | fanf
Diffstat (limited to 'games/primes/pr_tbl.c')
-rw-r--r-- | games/primes/pr_tbl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/games/primes/pr_tbl.c b/games/primes/pr_tbl.c index dd02b85..6447916 100644 --- a/games/primes/pr_tbl.c +++ b/games/primes/pr_tbl.c @@ -53,9 +53,11 @@ static const char rcsid[] = * and 65537^2 > 2^32-1. */ +#include <stddef.h> + #include "primes.h" -ubig prime[] = { +const ubig prime[] = { 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103, 107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199, 211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313, @@ -547,4 +549,4 @@ ubig prime[] = { }; /* pr_limit - largest prime in the prime table */ -ubig *pr_limit = &prime[(sizeof(prime)/sizeof(prime[0]))-1]; +const ubig *const pr_limit = &prime[(sizeof(prime)/sizeof(prime[0]))-1]; |