[llvm-commits] CVS: llvm/test/Programs/SingleSource/Shootout/ary3.c

Michael Brukman brukman at cs.uiuc.edu
Tue Jul 1 12:26:01 PDT 2003


Changes in directory llvm/test/Programs/SingleSource/Shootout:

ary3.c updated: 1.1 -> 1.2

---
Log message:

Made the source look more pleasing to the eye.


---
Diffs of the changes:

Index: llvm/test/Programs/SingleSource/Shootout/ary3.c
diff -u llvm/test/Programs/SingleSource/Shootout/ary3.c:1.1 llvm/test/Programs/SingleSource/Shootout/ary3.c:1.2
--- llvm/test/Programs/SingleSource/Shootout/ary3.c:1.1	Fri Dec 14 10:57:12 2001
+++ llvm/test/Programs/SingleSource/Shootout/ary3.c	Tue Jul  1 12:24:53 2003
@@ -1,5 +1,5 @@
 /* -*- mode: c -*-
- * $Id: ary3.c,v 1.1 2001/12/14 16:57:12 lattner Exp $
+ * $Id: ary3.c,v 1.2 2003/07/01 17:24:53 brukman Exp $
  * http://www.bagley.org/~doug/shootout/
  *
  * this program is modified from:
@@ -14,28 +14,27 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-int
-main(int argc, char *argv[]) {
-    int n = ((argc == 2) ? atoi(argv[1]) : 1);
-    int i, k, *x, *y;
-	
-    x = (int *) calloc(n, sizeof(int));
-    y = (int *) calloc(n, sizeof(int));
-
-    for (i = 0; i < n; i++) {
-	x[i] = i + 1;
-    }
-    for (k=0; k<1000; k++) {
-	for (i = n-1; i >= 0; i--) {
-	    y[i] += x[i];
-	}
+int main(int argc, char *argv[]) {
+  int n = ((argc == 2) ? atoi(argv[1]) : 1);
+  int i, k, *x, *y;
+
+  x = (int *) calloc(n, sizeof(int));
+  y = (int *) calloc(n, sizeof(int));
+
+  for (i = 0; i < n; i++) {
+    x[i] = i + 1;
+  }
+
+  for (k=0; k<1000; k++) {
+    for (i = n-1; i >= 0; i--) {
+      y[i] += x[i];
     }
+  }
 
-    printf("%d %d\n", y[0], y[n-1]);
+  printf("%d %d\n", y[0], y[n-1]);
 
-    free(x);
-    free(y);
-
-    return(0);
+  free(x);
+  free(y);
+  
+  return(0);
 }
-





More information about the llvm-commits mailing list