-/* $NetBSD: pattern.c,v 1.5 1999/09/08 21:17:55 jsm Exp $ */
+/* $NetBSD: pattern.c,v 1.8 2021/05/02 12:50:46 rillig Exp $ */
/*
* Copyright (c) 1989, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
+#include <sys/types.h>
+
#ifndef lint
#if 0
static char sccsid[] = "@(#)pattern.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pattern.c,v 1.5 1999/09/08 21:17:55 jsm Exp $");
+__RCSID("$NetBSD: pattern.c,v 1.8 2021/05/02 12:50:46 rillig Exp $");
#endif
#endif /* not lint */
/*
* pattern - the Eratosthenes sieve on odd numbers for 3,5,7,11 and 13
*
- * By: Landon Curt Noll chongo@toad.com
- *
- * chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\
+ * By Landon Curt Noll, http://www.isthe.com/chongo/index.html /\oo/\
*
- * To avoid excessive sieves for small factors, we use the table below to
- * setup our sieve blocks. Each element represents a odd number starting
+ * To avoid excessive sieves for small factors, we use the table below to
+ * setup our sieve blocks. Each element represents a odd number starting
* with 1. All non-zero elements are factors of 3, 5, 7, 11 and 13.
*/
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
};
-const int pattern_size = (sizeof(pattern)/sizeof(pattern[0]));
+const size_t pattern_size = (sizeof(pattern)/sizeof(pattern[0]));