summaryrefslogtreecommitdiff
path: root/hardware.c
diff options
context:
space:
mode:
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);
}