]> git.sur5r.net Git - cc65/commitdiff
Use static locals (again)
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 13 Oct 2001 15:46:03 +0000 (15:46 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 13 Oct 2001 15:46:03 +0000 (15:46 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1051 b7a2c559-68d2-44c3-8de9-860c34a00d81

samples/sieve.c

index d20ef8b9529e318ead58db404a21d06e66710781..6c6c4a923d88549bcaa6ac40075ea502971fb04e 100644 (file)
@@ -26,12 +26,16 @@ static unsigned char Sieve[COUNT];
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                          Code                                    */
 /*****************************************************************************/
 
 
 
-int main (void)
+#pragma staticlocals(1);
+
+
+
+int main (void)                                              
 {
     /* Clock variable */
     clock_t Ticks;
@@ -65,7 +69,7 @@ int main (void)
     /* Print the time used */
     printf ("Time used: %lu ticks\n", Ticks);
     printf ("Press Q to quit, any other key for list\n");
-    
+
     /* Wait for a key and print the list if not 'Q' */
     if (toupper (cgetc()) != 'Q') {
        /* Print the result */