summaryrefslogtreecommitdiff
path: root/zip
diff options
context:
space:
mode:
Diffstat (limited to 'zip')
-rw-r--r--zip/zip.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/zip/zip.cpp b/zip/zip.cpp
index dc52c05..8b61068 100644
--- a/zip/zip.cpp
+++ b/zip/zip.cpp
@@ -228,13 +228,14 @@ void build_global_filelist(struct TVFSGlobs *globs)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Basic initialization functions
-int VFSAllocNeeded()
+struct TVFSGlobs *
+VFSNew (TVFSLogFunc log_func)
{
- return sizeof(struct TVFSGlobs);
-}
+ struct TVFSGlobs * globs;
+
+ globs = (struct TVFSGlobs *) malloc (sizeof (struct TVFSGlobs));
+ memset (globs, 0, sizeof (struct TVFSGlobs));
-void VFSInit(struct TVFSGlobs *globs, TVFSLogFunc log_func)
-{
globs->archive_opened = false;
globs->block_size = DEFAULT_BLOCK_SIZE;
globs->archive_modified = false;
@@ -242,11 +243,15 @@ void VFSInit(struct TVFSGlobs *globs, TVFSLogFunc log_func)
globs->log_func = log_func;
if (globs->log_func != NULL) globs->log_func((char*)"zip plugin: VFSInit");
+
+ return globs;
}
-void VFSDestroy(struct TVFSGlobs *globs)
+void
+VFSFree (struct TVFSGlobs *globs)
{
if (globs->log_func != NULL) globs->log_func((char*)"zip plugin: VFSDestroy");
+ free (globs);
}
int VFSVersion()