Commits

Evan Gates  committed 874bd0d

fix indentation

  • Participants
  • Parent commits b818a39

Comments (0)

Files changed (1)

File stand_alone/rand.c

 #include <sys/time.h>
 
 char *names[] = { "UFU", "URU", "UBU", "ULU", "DFD", "DRD", "DBD", "DLD", "FRF", "FLF", "BRB", "BLB",
-                  "UFRUF", "URBUR", "UBLUB", "ULFUL", "DRFDR", "DFLDF", "DLBDL", "DBRDB" };
+    "UFRUF", "URBUR", "UBLUB", "ULFUL", "DRFDR", "DFLDF", "DLBDL", "DBRDB" };
 
 int main()
 {
     srandom(tv.tv_usec);
 
     for (i = 0; i < 12; i++) {
-	r = random() % 12;
-	if (r == i) {
-	    i--;
-	    continue;
-	}
-	tmp = names[i];
-	names[i] = names[r];
-	names[r] = tmp;
+	   r = random() % 12;
+	   if (r == i) {
+		  i--;
+		  continue;
+	   }
+	   tmp = names[i];
+	   names[i] = names[r];
+	   names[r] = tmp;
     }
 
     for (i = 0; i < 8; i++) {
-	r = random() % 8;
-	if (r == i) {
-	    i--;
-	    continue;
-	}
-	tmp = names[i + 12];
-	names[i + 12] = names[r + 12];
-	names[r + 12] = tmp;
+	   r = random() % 8;
+	   if (r == i) {
+		  i--;
+		  continue;
+	   }
+	   tmp = names[i + 12];
+	   names[i + 12] = names[r + 12];
+	   names[r + 12] = tmp;
     }
 
     o = 0;
     for (i = 0; i < 11; i++) {
-	r = random() % 2;
-	o = (o + r) % 2;
-	printf("%0.2s ", names[i] + r);
+	   r = random() % 2;
+	   o = (o + r) % 2;
+	   printf("%0.2s ", names[i] + r);
     }
     printf("%0.2s ", names[11] + o);
 
     o = 0;
     for (i = 0; i < 7; i++) {
-	r = random() % 3;
-	o = (o + 3 - r) % 3;
-	printf("%0.3s ", names[i + 12] + r);
+	   r = random() % 3;
+	   o = (o + 3 - r) % 3;
+	   printf("%0.3s ", names[i + 12] + r);
     }
     printf("%0.3s\n", names[19] + o);