zip.c
changeset 9 1155788ccbe3
child 11 677e01f5109e
equal deleted inserted replaced
8:41e4c6031535 9:1155788ccbe3
       
     1 /*
       
     2  * ZIP support routines for PhysicsFS.
       
     3  *
       
     4  * Please see the file LICENSE in the source's root directory.
       
     5  *
       
     6  *  This file written by Ryan C. Gordon.
       
     7  */
       
     8 
       
     9 #include <stdio.h>
       
    10 #include <stdlib.h>
       
    11 
       
    12 #define __PHYSICSFS_INTERNAL__
       
    13 #include "physfs_internal.h"
       
    14 
       
    15 /* template for filehandles. */
       
    16 const FileHandle __PHYSFS_FileHandle_ZIP =
       
    17 {
       
    18     NULL,       /* opaque         */
       
    19     NULL,       /* dirReader      */
       
    20     ZIP_read,   /* read() method  */
       
    21     NULL,       /* write() method */
       
    22     ZIP_eof,    /* eof() method   */
       
    23     ZIP_tell,   /* tell() method  */
       
    24     ZIP_seek,   /* seek() method  */
       
    25     ZIP_close,  /* close() method */
       
    26 };
       
    27 
       
    28 /* template for directories. */
       
    29 const DirReader __PHYSFS_DirReader_ZIP =
       
    30 {
       
    31     NULL,              /* opaque                  */
       
    32     ZIP_enumerate,     /* enumerateFiles() method */
       
    33     ZIP_isDirectory,   /* isDirectory() method    */
       
    34     ZIP_isSymLink,     /* isSymLink() method      */
       
    35     ZIP_isOpenable,    /* isOpenable() method     */
       
    36     ZIP_openRead,      /* openRead() method       */
       
    37     ZIP_dirClose,      /* close() method          */
       
    38 };
       
    39 
       
    40 const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
       
    41 {
       
    42     "ZIP",
       
    43     "PkZip/WinZip/Info-Zip compatible"
       
    44 };
       
    45 
       
    46 /* end of zip.c ... */
       
    47