remove globals for hash size

This commit is contained in:
yrutschle committed 2022-04-10 08:45:01 +02:00
1 parent cd7afaa00d
commit 21d00bd29d
5 files changed
+16 -13

No files matched your search

BIN
View File
Binary file not shown.
+3 -1
View File
@@ -19,6 +19,8 @@
#include <string.h>
/* tests have been written for a hash that holds 32 items */
#define HASH_SIZE 32
#define STR_LENGTH 16
struct hash_item {
@@ -55,7 +57,7 @@ static void htest_next_key(FILE* f, char* action, int* key, char str[STR_LENGTH]
int main(int argc, char* argv[])
{
hash* h = hash_init(&hash_make_key, &cmp_item);
hash* h = hash_init(HASH_SIZE, &hash_make_key, &cmp_item);
char action;
hash_item item;
int line = 0;