archivers/zip.c
changeset 20 efdde0d21521
parent 17 7337737f5120
child 21 b1ea58d70a56
equal deleted inserted replaced
19:a0279b57398c 20:efdde0d21521
    14 
    14 
    15 #if (!defined PHYSFS_SUPPORTS_ZIP)
    15 #if (!defined PHYSFS_SUPPORTS_ZIP)
    16 #error PHYSFS_SUPPORTS_ZIP must be defined.
    16 #error PHYSFS_SUPPORTS_ZIP must be defined.
    17 #endif
    17 #endif
    18 
    18 
       
    19 extern const DirFunctions __PHYSFS_DirFunctions_ZIP;
       
    20 extern const FileFunctions __PHYSFS_FileHandle_ZIP;
       
    21 
       
    22 
       
    23 static int ZIP_read(FileHandle *handle, void *buffer,
       
    24                     unsigned int objSize, unsigned int objCount)
       
    25 {
       
    26 } /* ZIP_read */
       
    27 
       
    28 
       
    29 static int ZIP_eof(FileHandle *handle)
       
    30 {
       
    31 } /* ZIP_eof */
       
    32 
       
    33 
       
    34 static int ZIP_tell(FileHandle *handle)
       
    35 {
       
    36 } /* ZIP_tell */
       
    37 
       
    38 
       
    39 static int ZIP_seek(FileHandle *handle, int offset)
       
    40 {
       
    41 } /* ZIP_seek */
       
    42 
       
    43 
       
    44 static int ZIP_fileClose(FileHandle *handle)
       
    45 {
       
    46 } /* ZIP_fileClose */
       
    47 
       
    48 
       
    49 static int ZIP_isArchive(const char *filename, int forWriting)
       
    50 {
       
    51 } /* ZIP_isArchive */
       
    52 
       
    53 
       
    54 static DirHandle *ZIP_openArchive(const char *name, int forWriting)
       
    55 {
       
    56 } /* ZIP_openArchive */
       
    57 
       
    58 
       
    59 static LinkedStringList *ZIP_enumerateFiles(DirHandle *r, const char *dirname)
       
    60 {
       
    61 } /* ZIP_enumerateFiles */
       
    62 
       
    63 
       
    64 static int ZIP_exists(DirHandle *r, const char *name)
       
    65 {
       
    66 } /* ZIP_exists */
       
    67 
       
    68 
       
    69 static int ZIP_isDirectory(DirHandle *r, const char *name)
       
    70 {
       
    71 } /* ZIP_isDirectory */
       
    72 
       
    73 
       
    74 static int ZIP_isSymLink(DirHandle *r, const char *name)
       
    75 {
       
    76 } /* ZIP_isSymLink */
       
    77 
       
    78 
       
    79 static FileHandle *ZIP_openRead(DirHandle *r, const char *filename)
       
    80 {
       
    81 } /* ZIP_openRead */
       
    82 
       
    83 
       
    84 static void ZIP_dirClose(DirHandle *r)
       
    85 {
       
    86 } /* ZIP_dirClose */
       
    87 
    19 
    88 
    20 static const FileFunctions __PHYSFS_FileHandle_ZIP =
    89 static const FileFunctions __PHYSFS_FileHandle_ZIP =
    21 {
    90 {
    22     ZIP_read,   /* read() method  */
    91     ZIP_read,       /* read() method  */
    23     NULL,       /* write() method */
    92     NULL,           /* write() method */
    24     ZIP_eof,    /* eof() method   */
    93     ZIP_eof,        /* eof() method   */
    25     ZIP_tell,   /* tell() method  */
    94     ZIP_tell,       /* tell() method  */
    26     ZIP_seek,   /* seek() method  */
    95     ZIP_seek,       /* seek() method  */
    27     ZIP_close,  /* close() method */
    96     ZIP_fileClose,  /* fileClose() method */
    28 };
    97 };
    29 
    98 
    30 
    99 
    31 const DirFunctions __PHYSFS_DirFunctions_ZIP =
   100 const DirFunctions __PHYSFS_DirFunctions_ZIP =
    32 {
   101 {
    33     ZIP_isArchive,     /* isArchive() method      */
   102     ZIP_isArchive,          /* isArchive() method      */
    34     ZIP_openArchive,   /* openArchive() method    */
   103     ZIP_openArchive,        /* openArchive() method    */
    35     ZIP_enumerate,     /* enumerateFiles() method */
   104     ZIP_enumerateFiles,     /* enumerateFiles() method */
    36     ZIP_exists,        /* exists() method         */
   105     ZIP_exists,             /* exists() method         */
    37     ZIP_isDirectory,   /* isDirectory() method    */
   106     ZIP_isDirectory,        /* isDirectory() method    */
    38     ZIP_isSymLink,     /* isSymLink() method      */
   107     ZIP_isSymLink,          /* isSymLink() method      */
    39     ZIP_openRead,      /* openRead() method       */
   108     ZIP_openRead,           /* openRead() method       */
    40     NULL,              /* openWrite() method      */
   109     NULL,                   /* openWrite() method      */
    41     NULL,              /* openAppend() method     */
   110     NULL,                   /* openAppend() method     */
    42     NULL,              /* remove() method         */
   111     NULL,                   /* remove() method         */
    43     NULL,              /* mkdir() method          */
   112     NULL,                   /* mkdir() method          */
    44     ZIP_close,         /* close() method          */
   113     ZIP_dirClose,           /* dirClose() method       */
    45 };
   114 };
    46 
   115 
    47 const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
   116 const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
    48 {
   117 {
    49     "ZIP",
   118     "ZIP",