life.c
changeset 8 96d16dfe787a
parent 0 af501b0c1716
child 9 c3fecc82ade6
--- a/life.c
+++ b/life.c
@@ -25,7 +25,7 @@
     while (inp == NULL) {
         printf ("Please enter the file name>> ");
         if (scanf ("%s", file) < 1)
-			return -1;
+            return -1;
 
         inp = fopen (file, "r");
     }
@@ -38,8 +38,8 @@
                 return fclose (inp);
             }
 
-            if ( (fscanf (inp, "%c ", &org)) < 1 )
-				return -1;
+            if ((fscanf (inp, "%c ", &org)) < 1)
+                return -1;
 
             arena[i][j] = org;
             printf ("%c ", arena[i][j]);
@@ -57,8 +57,8 @@
     for (i = 0; i < MAX; i++) {
         if ((arena[i] = malloc (MAX + 1)) == NULL)
             return -1;
-		for (j=0;j<MAX;j++)
-			arena[i][j] = '.';
+        for (j = 0; j < MAX; j++)
+            arena[i][j] = '.';
     }
 
     for (i = 0; i < MAX; i++) {
@@ -107,12 +107,12 @@
 {
     char *arena[MAX];
 
-	if (argc > 2)
-		printf("Usage: %s\n", argv[0]);
+    if (argc > 2)
+        printf ("Usage: %s\n", argv[0]);
 
     if (init_life (arena) == 0)
-    	show_life (arena);
+        show_life (arena);
     free_life (arena);
 
-    return 0;
+    return EXIT_SUCCESS;
 }