src/archiver_wad.c
changeset 1113 2136d64bd1ad
parent 1111 20d7c2d95a98
child 1115 bc7257f4f8da
equal deleted inserted replaced
1112:12e187aa051c 1113:2136d64bd1ad
   199 
   199 
   200     *count = -1;
   200     *count = -1;
   201     *fh = NULL;
   201     *fh = NULL;
   202     return 0;
   202     return 0;
   203 } /* wad_open */
   203 } /* wad_open */
   204 
       
   205 
       
   206 static int WAD_isArchive(const char *filename, int forWriting)
       
   207 {
       
   208     void *fh;
       
   209     PHYSFS_uint32 fileCount,offset;
       
   210     int retval = wad_open(filename, forWriting, &fh, &fileCount,&offset);
       
   211 
       
   212     if (fh != NULL)
       
   213         __PHYSFS_platformClose(fh);
       
   214 
       
   215     return retval;
       
   216 } /* WAD_isArchive */
       
   217 
   204 
   218 
   205 
   219 static int wad_entry_cmp(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
   206 static int wad_entry_cmp(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
   220 {
   207 {
   221     if (one != two)
   208     if (one != two)
   503 
   490 
   504 
   491 
   505 const PHYSFS_Archiver __PHYSFS_Archiver_WAD =
   492 const PHYSFS_Archiver __PHYSFS_Archiver_WAD =
   506 {
   493 {
   507     &__PHYSFS_ArchiveInfo_WAD,
   494     &__PHYSFS_ArchiveInfo_WAD,
   508     WAD_isArchive,          /* isArchive() method      */
       
   509     WAD_openArchive,        /* openArchive() method    */
   495     WAD_openArchive,        /* openArchive() method    */
   510     WAD_enumerateFiles,     /* enumerateFiles() method */
   496     WAD_enumerateFiles,     /* enumerateFiles() method */
   511     WAD_exists,             /* exists() method         */
   497     WAD_exists,             /* exists() method         */
   512     WAD_isDirectory,        /* isDirectory() method    */
   498     WAD_isDirectory,        /* isDirectory() method    */
   513     WAD_isSymLink,          /* isSymLink() method      */
   499     WAD_isSymLink,          /* isSymLink() method      */