diff options
author | Bill Fumerola <billf@FreeBSD.org> | 2002-02-21 18:13:31 +0000 |
---|---|---|
committer | Bill Fumerola <billf@FreeBSD.org> | 2002-02-21 18:13:31 +0000 |
commit | a48e6c87367958847c5d193408ed8cd4842a30e6 (patch) | |
tree | 1c8815e32c27fd0d4d167cf409c6a0f168afdc09 /games/primes/pattern.c | |
parent | a30946043b97738b114d521f48c7ebaf8b02c6aa (diff) |
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)
Notes
Notes:
svn path=/head/; revision=91027
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 7bfe0ddd2193..1d72fb273f80 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])); |