Commit Graph

20 Commits

Author SHA1 Message Date
92ae2a0a2b Add function to print cache 2016-04-27 22:16:16 -04:00
c26d27db9d Fix number of sets/lines created 2016-04-27 22:16:01 -04:00
Jacob
b556be1622 Implemented linked_lines and modified cache creation/deletion.
Replaced struct line_s and typedef line with linked_line_s and linked_line.
Added make_set() and free_set().
Modified make_cache() and free_cache() to call make_set() and free_set().
2016-04-27 21:24:53 -04:00
Jacob
7f254fd50b Fixed types.
size_t -> long
uint8_t -> uint8_t or int
2016-04-27 18:18:30 -04:00
acb6900502 Properly close file 2016-04-27 16:15:02 -04:00
2fc771d08e Add cache allocation and free functions 2016-04-27 16:13:27 -04:00
Jacob
fb6c9e3a27 Various minor changes.
Renamed lines to num_lines.
Removed trailing whitespaces.
Fixed some indentation and comments.
Fixed usage string.
2016-04-27 15:55:27 -04:00
Jacob
50ee8769fa See previous commit.
I did that slightly wrong, not quite sure how. But this one is the most-changed, and all the notes are in the last commit.
2016-04-27 13:41:51 -04:00
Jacob
3b97949150 Implemented size calculation. Various minor changes.
Replaced repeated "printf(...);exit(1)" with bad_usage_error().
Added bits_to_size().
Reorganized code above main().
Added file doc comment.
Expanded argument-printing statement for better testing.
2016-04-27 13:40:58 -04:00
4f09ea0249 Add basic file parsing 2016-04-27 12:12:11 -04:00
Jacob
8d8568fce1 Fixed compilation issues.
- Removed unused variable argflags.
- Fixed variable name (index_bits -> set_index_bits).
2016-04-27 12:07:51 -04:00
Jacob
0fc77a6828 Moved print_usage and parse_int_arg below main. 2016-04-27 12:03:51 -04:00
Jacob
490d8cafde Restored old method of checking for presence of arguments. 2016-04-27 12:00:34 -04:00
Jacob
dc67c24899 New and improved argument parsing with getopt.
Added checking that all arguments were provided.
Switched many variables to use size_t, and int8_t where appropriate.
Moved opening braces on to previous lines, except function braces.
Renamed set_bits to more-accurate index_bits.
2016-04-27 12:00:34 -04:00
0a660b8939 Convert spaces to tabs 2016-04-26 10:44:50 -04:00
03d08c71af Move verbose to global VERBOSE 2016-04-26 10:31:37 -04:00
0b947b701f Improve int argument parsing 2016-04-26 10:22:34 -04:00
Jacob
0a3f87840d Added usage string. 2016-04-26 10:03:04 -04:00
2a8124df09 Added basic argument parsing 2016-04-25 17:07:24 -04:00
b4e31f122a Initial Commit 2016-04-24 20:07:46 -04:00