diff options
author | pixel <pixel> | 2007-07-06 14:23:50 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-07-06 14:23:50 +0000 |
commit | 97610277154e09a37793190d8e6d3d2a9d111fc1 (patch) | |
tree | 7dc64e2b3224a9f6ff0e68f1dc8d7d5701b861ea /mpq-bios.c | |
parent | 5537df7e088d8b67c82ae058bbf496f906778291 (diff) |
Adding close() and init() functions.
Diffstat (limited to 'mpq-bios.c')
-rw-r--r-- | mpq-bios.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; |