summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-14 04:49:34 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-14 04:49:34 +0000
commitf067d71ef7e5bc4e670641b0499f82384f95b764 (patch)
tree02132b93280b59c3bda14c121e218d4e0f65305d
parent5ae2c19365594cfe6872e2a4718247d91828275b (diff)
Create randnum.h, include in relevant places
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@31 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
-rw-r--r--assignment.c1
-rw-r--r--bitfield.c1
-rw-r--r--emfloat.c1
-rw-r--r--fourier.c1
-rw-r--r--fpemulation.c1
-rw-r--r--huffman.c3
-rw-r--r--idea.c2
-rw-r--r--linear.c1
-rw-r--r--nbench0.c2
-rw-r--r--nbench0.h4
-rw-r--r--neural.c1
-rw-r--r--numsort.c1
-rw-r--r--randnum.h5
-rw-r--r--stringsort.c1
14 files changed, 19 insertions, 6 deletions
diff --git a/assignment.c b/assignment.c
index 7ce65e0..a083c32 100644
--- a/assignment.c
+++ b/assignment.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/*************************
diff --git a/bitfield.c b/bitfield.c
index 4b86c11..d04cb72 100644
--- a/bitfield.c
+++ b/bitfield.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/************************
diff --git a/emfloat.c b/emfloat.c
index b1c822e..484ecbd 100644
--- a/emfloat.c
+++ b/emfloat.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
#include "emfloat.h"
/*
diff --git a/fourier.c b/fourier.c
index 0653b35..6b0c50c 100644
--- a/fourier.c
+++ b/fourier.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/*************************
diff --git a/fpemulation.c b/fpemulation.c
index e3c7032..b655c0c 100644
--- a/fpemulation.c
+++ b/fpemulation.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
#include "emfloat.h"
diff --git a/huffman.c b/huffman.c
index d339b58..e48483e 100644
--- a/huffman.c
+++ b/huffman.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/************************
@@ -172,7 +173,7 @@ char *wordptr; /* Pointer to word from catalog */
*/
#define WORDCATSIZE 50
-const char * wordcatarray[WORDCATSIZE] = {
+char * wordcatarray[WORDCATSIZE] = {
"Hello", "He", "Him", "the", "this", "that", "though", "rough", "cough", "obviously", "But",
"but", "bye", "begin", "beginning", "beginnings", "of", "our", "ourselves", "yourselves",
"to", "together", "togetherness", "from", "either", "I", "A", "return", "However", "that",
diff --git a/idea.c b/idea.c
index aac5190..9b1661b 100644
--- a/idea.c
+++ b/idea.c
@@ -1,11 +1,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
+#include <string.h>
#include <math.h>
#include <limits.h>
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/********************
diff --git a/linear.c b/linear.c
index 6cef1a9..030fe3b 100644
--- a/linear.c
+++ b/linear.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/***********************
diff --git a/nbench0.c b/nbench0.c
index 6596dbd..dc50b29 100644
--- a/nbench0.c
+++ b/nbench0.c
@@ -149,7 +149,7 @@ if(global_allstats)
time(&time_and_date);
loctime=localtime(&time_and_date);
printf("**Date and time of benchmark run: %s", asctime(loctime));
- printf("**Sizeof: char:%u short:%u int:%u long:%u uint8_t:%u uint16_t:%u uint32_t:%u int32:%u\n",
+ printf("**Sizeof: char:%d short:%u int:%u long:%u uint8_t:%u uint16_t:%u uint32_t:%u int32:%u\n",
sizeof(char),
sizeof(short),
sizeof(int),
diff --git a/nbench0.h b/nbench0.h
index e33e585..8858756 100644
--- a/nbench0.h
+++ b/nbench0.h
@@ -299,7 +299,3 @@ void (*funcpointer[])(void) =
DoHuffman,
DoNNET,
DoLU };
-
-int32_t randwc(int32_t num);
-uint32_t abs_randwc(uint32_t num);
-int32_t randnum(int32_t lngval);
diff --git a/neural.c b/neural.c
index ba875d3..c482944 100644
--- a/neural.c
+++ b/neural.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/********************************
diff --git a/numsort.c b/numsort.c
index 57f98d1..f210388 100644
--- a/numsort.c
+++ b/numsort.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/*********************
diff --git a/randnum.h b/randnum.h
new file mode 100644
index 0000000..cf6b42b
--- /dev/null
+++ b/randnum.h
@@ -0,0 +1,5 @@
+#include <stdint.h>
+
+int32_t randwc(int32_t num);
+uint32_t abs_randwc(uint32_t num);
+int32_t randnum(int32_t lngval);
diff --git a/stringsort.c b/stringsort.c
index 72f24a3..6b675de 100644
--- a/stringsort.c
+++ b/stringsort.c
@@ -7,6 +7,7 @@
#include <time.h>
#include "nmglobal.h"
+#include "randnum.h"
/********************