diff options
author | cgd <cgd@NetBSD.org> | 1995-04-24 12:21:37 +0000 |
---|---|---|
committer | cgd <cgd@NetBSD.org> | 1995-04-24 12:21:37 +0000 |
commit | a65a873e56c35780711e9f73872c4fe0254589b0 (patch) | |
tree | 5e3a2578839def2becc14922977dc641dfd01c20 /primes | |
parent | d7c608df67f7b99aee31ddf6c13d8870695f6827 (diff) | |
download | bsdgames-darwin-a65a873e56c35780711e9f73872c4fe0254589b0.tar.gz bsdgames-darwin-a65a873e56c35780711e9f73872c4fe0254589b0.tar.zst bsdgames-darwin-a65a873e56c35780711e9f73872c4fe0254589b0.zip |
Various changes to make games compile w/o warnings on the alpha:
Include appropriate includes, delete bogus function declarations,
change sizes of variables and casts.
Diffstat (limited to 'primes')
-rw-r--r-- | primes/primes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/primes/primes.c b/primes/primes.c index 57e00731..868d994f 100644 --- a/primes/primes.c +++ b/primes/primes.c @@ -1,4 +1,4 @@ -/* $NetBSD: primes.c,v 1.4 1995/03/23 08:35:55 cgd Exp $ */ +/* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */ /* * Copyright (c) 1989, 1993 @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)primes.c 8.4 (Berkeley) 3/21/94"; #else -static char rcsid[] = "$NetBSD: primes.c,v 1.4 1995/03/23 08:35:55 cgd Exp $"; +static char rcsid[] = "$NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $"; #endif #endif /* not lint */ @@ -308,10 +308,10 @@ primes(start, stop) do { /* determine the factor's initial sieve point */ q = (char *)(start%factor); /* temp storage for mod */ - if ((int)q & 0x1) { - q = &table[(factor-(int)q)/2]; + if ((long)q & 0x1) { + q = &table[(factor-(long)q)/2]; } else { - q = &table[q ? factor-((int)q/2) : 0]; + q = &table[q ? factor-((long)q/2) : 0]; } /* sive for our current factor */ for ( ; q < tab_lim; q += factor) { |