From 1947b4aedbae747533a03c11cf6f426bcbb42280 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 18 May 2008 01:28:19 +0000 Subject: Adding a way to shutdown the mpqlib_fs --- mpq-fs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mpq-fs.c') diff --git a/mpq-fs.c b/mpq-fs.c index 84e48a0..811de8d 100644 --- a/mpq-fs.c +++ b/mpq-fs.c @@ -127,3 +127,17 @@ struct mpq_file_t * mpqlib_fs_open(const char * _fname) { return NULL; } + +#define FALSE 0 +#define TRUE !FALSE + +void mpqlib_shutdown() { + if (!hash_table) + return; + if (hfirst(hash_table)) do { + free(hkey(hash_table)); + } while (hnext(hash_table)); + + hdestroy(hash_table); + hash_table = 0; +} -- cgit v1.2.3