1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-03 16:33:19 +00:00

Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@1050 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2001-10-13 15:45:04 +00:00
parent 2435aa63b5
commit 2ec9ff05a6

View File

@ -62,21 +62,21 @@ int main (void)
/* Calculate the time used */ /* Calculate the time used */
Ticks = clock() - Ticks; Ticks = clock() - Ticks;
/* Print the time used and wait for a key */ /* Print the time used */
printf ("Time used: %lu ticks\n", Ticks); printf ("Time used: %lu ticks\n", Ticks);
printf ("Press Q to quit, any other key for list\n"); printf ("Press Q to quit, any other key for list\n");
if (toupper (cgetc()) == 'Q') {
exit (EXIT_SUCCESS); /* Wait for a key and print the list if not 'Q' */
} if (toupper (cgetc()) != 'Q') {
/* Print the result */
/* Print the result */ for (I = 2; I < COUNT; ++I) {
for (I = 2; I < COUNT; ++I) { if (Sieve[I] == 0) {
if (Sieve[I] == 0) { printf ("%4d\n", I);
printf ("%4d\n", I); }
} if (kbhit() && toupper (cgetc()) == 'Q') {
if (kbhit() && toupper (cgetc()) == 'q') { break;
break; }
} }
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;