Exemple #1
0
static void LZMA_closeArchive(void *opaque)
{
    LZMAarchive *archive = (LZMAarchive *) opaque;

#if 0  /* !!! FIXME: you shouldn't have to do this. */
    PHYSFS_uint32 fileIndex = 0, numFiles = archive->db.Database.NumFiles;
    for (fileIndex = 0; fileIndex < numFiles; fileIndex++)
    {
        LZMA_fileClose(&archive->files[fileIndex]);
    } /* for */
#endif

    SzArDbExFree(&archive->db, SzFreePhysicsFS);
    archive->stream.io->destroy(archive->stream.io);
    lzma_archive_exit(archive);
} /* LZMA_closeArchive */
Exemple #2
0
static void LZMA_dirClose(dvoid *opaque)
{
    LZMAarchive *archive = (LZMAarchive *) opaque;
    LZMAentry *entry = archive->firstEntry;
    LZMAentry *tmpEntry = entry;

    while (entry != NULL)
    {
        tmpEntry = entry->next;
        LZMA_fileClose(entry);
        entry = tmpEntry;
    } /* while */

    SzArDbExFree(&archive->db, SzFreePhysicsFS);
    __PHYSFS_platformClose(archive->stream.File);

    /* Free the cache which might have been allocated by LZMA_read() */
    allocator.Free(archive->folder);
    allocator.Free(archive);
} /* LZMA_dirClose */