diff options
author | billf <billf@FreeBSD.org> | 2002-02-21 18:13:31 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 2002-02-21 18:13:31 +0000 |
commit | 5c90e6187fe6e32f02426460574227d62a8e546f (patch) | |
tree | 1c8815e32c27fd0d4d167cf409c6a0f168afdc09 /games/primes/pattern.c | |
parent | e0e0b5d3825b4df326d126f10a129e3e55ee6343 (diff) | |
download | FreeBSD-src-5c90e6187fe6e32f02426460574227d62a8e546f.zip FreeBSD-src-5c90e6187fe6e32f02426460574227d62a8e546f.tar.gz |
staticize functions and variables
change function declarations to ANSI
change a variable that stores sizeof() values to size_t
use return to escape the end of main(), not exit(3)
Diffstat (limited to 'games/primes/pattern.c')
-rw-r--r-- | games/primes/pattern.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/games/primes/pattern.c b/games/primes/pattern.c index 7bfe0dd..1d72fb2 100644 --- a/games/primes/pattern.c +++ b/games/primes/pattern.c @@ -54,6 +54,8 @@ static const char rcsid[] = * with 1. All non-zero elements are factors of 3, 5, 7, 11 and 13. */ +#include <stddef.h> + char pattern[] = { 1,0,0,0,0,0,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,0,1,1,0,0,1,0,1,1,0,0, 1,0,1,0,0,1,0,0,0,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,1,1,0,0,0,0,1,1,0,0, @@ -441,4 +443,4 @@ char pattern[] = { 0,0,1,1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1, 0,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,0,0,0,0,0,1 }; -int pattern_size = (sizeof(pattern)/sizeof(pattern[0])); +size_t pattern_size = (sizeof(pattern)/sizeof(pattern[0])); |