From 66428e7f5a40e36d0129200dcc53e9459e1d0a9b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 16 Nov 2008 01:39:11 +0000 Subject: -- Remove getScore functions -- Replace by making Do* functions return the results directly git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@61 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- huffman.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'huffman.c') diff --git a/huffman.c b/huffman.c index e9b1e0d..cccb07b 100644 --- a/huffman.c +++ b/huffman.c @@ -52,8 +52,6 @@ static clock_t DoHuffIteration(char *plaintext, char *comparray, char *decomparr static void SetCompBit(uint8_t *comparray, uint32_t bitoffset, char bitchar); static int GetCompBit(uint8_t *comparray, uint32_t bitoffset); -static double results; - /************** ** DoHuffman ** *************** @@ -63,7 +61,7 @@ static double results; ** Also, the compression cycle includes building the ** Huffman tree. */ -void +double DoHuffman(void) { const char* context = "CPU:Huffman"; @@ -157,7 +155,7 @@ DoHuffman(void) free(decomparray); free(hufftree); - results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time; + return (double)(iterations * CLOCKS_PER_SEC) / (double)total_time; } /********************* @@ -501,9 +499,3 @@ bitnumb=bitoffset % 8; */ return((1<