summaryrefslogtreecommitdiff
path: root/mpq-bios.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpq-bios.c')
-rw-r--r--mpq-bios.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mpq-bios.c b/mpq-bios.c
index bbca00c..bfc21df 100644
--- a/mpq-bios.c
+++ b/mpq-bios.c
@@ -135,6 +135,19 @@ static int read_data(mpq_archive_t * mpq_a, void * buf, size_t l) {
return 1;
}
+void mpqlib_init() {
+ __mpqlib_init_cryptography();
+}
+
+void mpqlib_close_archive(mpq_archive_t * mpq_a) {
+ if (mpq_a) {
+ if (mpq_a->mpq_i->closeit) {
+ close(mpq_a->mpq_i->fd);
+ }
+ free_archive(mpq_a);
+ }
+}
+
mpq_archive_t * mpqlib_reopen_archive(int fd) {
struct mpq_internals_t * mpq_i;
mpq_archive_t * mpq_a;