archivers/zip.c
changeset 399 02dd53688315
parent 379 d0c4ae4a302f
child 402 f539eb75380a
equal deleted inserted replaced
398:aa1e763b09ae 399:02dd53688315
   139 static int ZIP_isDirectory(DirHandle *h, const char *name);
   139 static int ZIP_isDirectory(DirHandle *h, const char *name);
   140 static int ZIP_isSymLink(DirHandle *h, const char *name);
   140 static int ZIP_isSymLink(DirHandle *h, const char *name);
   141 static PHYSFS_sint64 ZIP_getLastModTime(DirHandle *h, const char *name);
   141 static PHYSFS_sint64 ZIP_getLastModTime(DirHandle *h, const char *name);
   142 static FileHandle *ZIP_openRead(DirHandle *h, const char *filename);
   142 static FileHandle *ZIP_openRead(DirHandle *h, const char *filename);
   143 static void ZIP_dirClose(DirHandle *h);
   143 static void ZIP_dirClose(DirHandle *h);
   144 
       
   145 static int zip_resolve(void *in, ZIPinfo *info, ZIPentry *entry);
   144 static int zip_resolve(void *in, ZIPinfo *info, ZIPentry *entry);
   146 
   145 
       
   146 
       
   147 const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
       
   148 {
       
   149     "ZIP",
       
   150     "PkZip/WinZip/Info-Zip compatible",
       
   151     "Ryan C. Gordon <icculus@clutteredmind.org>",
       
   152     "http://icculus.org/physfs/",
       
   153 };
   147 
   154 
   148 static const FileFunctions __PHYSFS_FileFunctions_ZIP =
   155 static const FileFunctions __PHYSFS_FileFunctions_ZIP =
   149 {
   156 {
   150     ZIP_read,       /* read() method       */
   157     ZIP_read,       /* read() method       */
   151     NULL,           /* write() method      */
   158     NULL,           /* write() method      */
   157 };
   164 };
   158 
   165 
   159 
   166 
   160 const DirFunctions __PHYSFS_DirFunctions_ZIP =
   167 const DirFunctions __PHYSFS_DirFunctions_ZIP =
   161 {
   168 {
       
   169     &__PHYSFS_ArchiveInfo_ZIP,
   162     ZIP_isArchive,          /* isArchive() method      */
   170     ZIP_isArchive,          /* isArchive() method      */
   163     ZIP_openArchive,        /* openArchive() method    */
   171     ZIP_openArchive,        /* openArchive() method    */
   164     ZIP_enumerateFiles,     /* enumerateFiles() method */
   172     ZIP_enumerateFiles,     /* enumerateFiles() method */
   165     ZIP_exists,             /* exists() method         */
   173     ZIP_exists,             /* exists() method         */
   166     ZIP_isDirectory,        /* isDirectory() method    */
   174     ZIP_isDirectory,        /* isDirectory() method    */
   171     NULL,                   /* openAppend() method     */
   179     NULL,                   /* openAppend() method     */
   172     NULL,                   /* remove() method         */
   180     NULL,                   /* remove() method         */
   173     NULL,                   /* mkdir() method          */
   181     NULL,                   /* mkdir() method          */
   174     ZIP_dirClose            /* dirClose() method       */
   182     ZIP_dirClose            /* dirClose() method       */
   175 };
   183 };
   176 
       
   177 const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
       
   178 {
       
   179     "ZIP",
       
   180     "PkZip/WinZip/Info-Zip compatible",
       
   181     "Ryan C. Gordon <icculus@clutteredmind.org>",
       
   182     "http://www.icculus.org/physfs/",
       
   183 };
       
   184 
       
   185 
   184 
   186 
   185 
   187 /*
   186 /*
   188  * Wrap all zlib calls in this, so the physfs error state is set appropriately.
   187  * Wrap all zlib calls in this, so the physfs error state is set appropriately.
   189  */
   188  */