[llvm-commits] CVS: llvm-test/SingleSource/Benchmarks/McGill/chomp.c misr.c queens.c
Reid Spencer
reid at x10sys.com
Fri Nov 24 13:19:55 PST 2006
Changes in directory llvm-test/SingleSource/Benchmarks/McGill:
chomp.c updated: 1.1 -> 1.2
misr.c updated: 1.2 -> 1.3
queens.c updated: 1.1 -> 1.2
---
Log message:
Make these programs return proper values from main so their return value
can be diff'd
---
Diffs of the changes: (+11 -8)
chomp.c | 3 ++-
misr.c | 14 ++++++++------
queens.c | 2 +-
3 files changed, 11 insertions(+), 8 deletions(-)
Index: llvm-test/SingleSource/Benchmarks/McGill/chomp.c
diff -u llvm-test/SingleSource/Benchmarks/McGill/chomp.c:1.1 llvm-test/SingleSource/Benchmarks/McGill/chomp.c:1.2
--- llvm-test/SingleSource/Benchmarks/McGill/chomp.c:1.1 Tue Oct 5 15:58:37 2004
+++ llvm-test/SingleSource/Benchmarks/McGill/chomp.c Fri Nov 24 15:19:41 2006
@@ -333,7 +333,7 @@
*row = data1[*col]; /* row is given by the content of the structure */
}
-void main(void)
+int main(void)
{
int row,col,maxrow,player;
int *win,*current,*temp;
@@ -419,6 +419,7 @@
dump_play(tree); /* dump for memory management */
break;
}
+ return 0;
}
/*****************************************************************************/
Index: llvm-test/SingleSource/Benchmarks/McGill/misr.c
diff -u llvm-test/SingleSource/Benchmarks/McGill/misr.c:1.2 llvm-test/SingleSource/Benchmarks/McGill/misr.c:1.3
--- llvm-test/SingleSource/Benchmarks/McGill/misr.c:1.2 Sun Nov 28 15:13:24 2004
+++ llvm-test/SingleSource/Benchmarks/McGill/misr.c Fri Nov 24 15:19:41 2006
@@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#define INF 10000
#define MAX_REG_LN 100
@@ -56,7 +57,7 @@
/* Main Program */
-void main(int argc,char *argv[])
+int main(int argc,char *argv[])
{
misr_type cell_array;
int num_vect, num_times, num_true, i;
@@ -68,7 +69,7 @@
if (0 && argc < 6)
{
printf("Usage: MISR fileout reg_len #_vectors prob #_times [structure] [seed] [seed] [seed]\n");
- return;
+ return 1;
}
/* input and translate arguments */
@@ -87,7 +88,7 @@
for (i=1; i<reg_len; i++)
structure[i] = '0';
structure[0] = '1';
- structure[reg_len] = NULL;
+ structure[reg_len] = 0;
}
if (argc > 7) sscanf(argv[7], "%hu", &seed[0]); else seed[0] = 1;
if (argc > 8) sscanf(argv[8], "%hu", &seed[1]); else seed[1] = 0;
@@ -98,17 +99,17 @@
if (reg_len > MAX_REG_LN)
{
printf("Register too long; Max. = %d\n", MAX_REG_LN);
- return;
+ return 2;
}
if ((prob > 1) || (prob < 0))
{
printf("Prob. out of range 0=<Prob>=1\n");
- return;
+ return 3;
}
if (strlen(structure) != reg_len)
{
printf("Structure does not match Register length:\n");
- return;
+ return 4;
}
@@ -145,6 +146,7 @@
printf("%d %d %.3e %d %s %d %d %d %.8e\n", reg_len, num_vect, prob, num_times, structure, seed[0], seed[1], seed[2],(double)(num_times - num_true)/(double)num_times);
//kill_list(&cell_array);
+ return 0;
}
/*************************************************************
Index: llvm-test/SingleSource/Benchmarks/McGill/queens.c
diff -u llvm-test/SingleSource/Benchmarks/McGill/queens.c:1.1 llvm-test/SingleSource/Benchmarks/McGill/queens.c:1.2
--- llvm-test/SingleSource/Benchmarks/McGill/queens.c:1.1 Tue Oct 5 15:58:37 2004
+++ llvm-test/SingleSource/Benchmarks/McGill/queens.c Fri Nov 24 15:19:41 2006
@@ -202,7 +202,7 @@
** with decoding the command line arguments, initializing the
** various arrays, and starting the recursive search routine.
*/
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
register int i; /* Loop variable */
register char *p; /* Ptr to argument */
More information about the llvm-commits
mailing list