From a48e6c87367958847c5d193408ed8cd4842a30e6 Mon Sep 17 00:00:00 2001 From: Bill Fumerola Date: Thu, 21 Feb 2002 18:13:31 +0000 Subject: 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) --- games/primes/pattern.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'games/primes/pattern.c') 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 + 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])); -- cgit v1.2.3