CHashTable 1
Loading...
Searching...
No Matches
hash_table_io.c File Reference

Persistence and print methods for HashTable. More...

#include <stdio.h>
#include <string.h>
#include "hash_table.h"
#include "hash_table_internal.h"
#include "../interactive_mode/interactive_mode.h"
Include dependency graph for hash_table_io.c:

Functions

static void print_entry_to_file (int key, int value, void *file)
 
bool hash_table_save (const HashTable *table, const char *filename)
 
HashTable_LoadError hash_table_load (const char *filename, HashTable **out_table)
 Loads a hash table from a specified file.
 
const char * hash_table_error_string (HashTable_LoadError error_code)
 Converts a hash table load error code into a static, human-readable string.
 
void hash_table_print (const HashTable *table, bool print_empty_buckets)
 

Variables

static constexpr char VERSION [16] = "1.0"
 
static constexpr size_t MAX_LINE = 256
 
static constexpr char HEADER_PREFIX [] = "CHashTable v"
 

Detailed Description

Persistence and print methods for HashTable.