From 13434a06d5f7d34be5a78f4d8ab2db1a8b1d50e5 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 12 Nov 2008 04:01:51 +0000 Subject: Remove output_string function git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@10 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- hardware.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'hardware.c') diff --git a/hardware.c b/hardware.c index 4838b2f..20341c2 100644 --- a/hardware.c +++ b/hardware.c @@ -4,23 +4,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 ** ******************* @@ -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); } -- cgit v1.2.3