summaryrefslogtreecommitdiff
path: root/hardware.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-12 04:01:51 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-12 04:01:51 +0000
commit13434a06d5f7d34be5a78f4d8ab2db1a8b1d50e5 (patch)
tree220c2917d7f01f375b52d90c0ab57f71ac4cdc22 /hardware.c
parente618b16d4cc89e46ec4bac40af34a93790a17f8e (diff)
Remove output_string function
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@10 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
Diffstat (limited to 'hardware.c')
-rw-r--r--hardware.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/hardware.c b/hardware.c
index 4838b2f..20341c2 100644
--- a/hardware.c
+++ b/hardware.c
@@ -5,23 +5,6 @@
#define BUF_SIZ 1024
/******************
-** output_string **
-*******************
-** Displays a string on the screen. Also, if the flag
-** write_to_file is set, outputs the string to the output file.
-** Note, this routine presumes that you've included a carriage
-** return at the end of the buffer.
-*/
-static void output_string(const char *buffer, const int write_to_file,
- FILE *global_ofile){
- printf("%s",buffer);
- if(write_to_file!=0)
- fprintf(global_ofile,"%s",buffer);
- return;
-}
-
-
-/******************
** removeNewLine **
*******************
** Removes a trailing newline character if present
@@ -179,12 +162,9 @@ void hardware(const int write_to_file, FILE *global_ofile) {
model[0] = '\0';
cache[0] = '\0';
}
- sprintf(buffer, "CPU : %s\n", model);
- output_string(buffer, write_to_file, global_ofile);
- sprintf(buffer, "L2 Cache : %s\n", cache);
- output_string(buffer, write_to_file, global_ofile);
- sprintf(buffer, "OS : %s\n", os);
- output_string(buffer, write_to_file, global_ofile);
+ printf("CPU : %s\n", model);
+ printf("L2 Cache : %s\n", cache);
+ printf("OS : %s\n", os);
}