diff --git a/csim.c b/csim.c index 12308f3..92367a4 100644 --- a/csim.c +++ b/csim.c @@ -2,6 +2,8 @@ #include #include "cachelab.h" +int VERBOSE = 0; + void print_usage() { printf("Usage: ./csim [-hv] -s -E -b -t \n" @@ -29,7 +31,7 @@ int parse_int_arg(char* arg) int main(int argc, char* argv[]) { - int set_bits = 0, lines = 0, block_bits = 0, verbose = 0; + int set_bits = 0, lines = 0, block_bits = 0; char* filename; int ii; for (ii = 0; ii < argc; ii++) @@ -40,7 +42,7 @@ int main(int argc, char* argv[]) //print_usage(); break; case 'v': - verbose = 1; + VERBOSE = 1; break; case 's': set_bits = parse_int_arg(argv[ii+1]); @@ -57,7 +59,7 @@ int main(int argc, char* argv[]) } } - printf("Arguments: %d, %d, %d, %d, %s\n", set_bits, lines, block_bits, verbose, filename); + printf("Arguments: %d, %d, %d, %d, %s\n", set_bits, lines, block_bits, VERBOSE, filename); if(!set_bits|| !lines || !block_bits || !filename) print_usage();