#include <conio.h>
+/* Workaround missing clock stuff */
+#if defined(__APPLE2__) || defined(__APPLE2ENH__)
+# define clock() 0
+# define CLOCKS_PER_SEC 1
+#endif
+
+
/*****************************************************************************/
/* Data */
-#define COUNT 8192 /* Up to what number? */
-#define SQRT_COUNT 91 /* Sqrt of COUNT */
+#define COUNT 16384 /* Up to what number? */
+#define SQRT_COUNT 128 /* Sqrt of COUNT */
static unsigned char Sieve[COUNT];
-#pragma staticlocals(1);
+#pragma static-locals(1);
while (I < SQRT_COUNT) {
if (Sieve[I] == 0) {
/* Prime number - mark multiples */
- S = &Sieve[J = I*2];
+ J = I*2;
+ S = &Sieve[J];
while (J < COUNT) {
*S = 1;
S += I;