archivers/wad.c
changeset 754 e7cd7411eadf
parent 694 80bc8858b4ab
child 759 e4f83afe8969
equal deleted inserted replaced
753:ad9d219dcb59 754:e7cd7411eadf
   320     return(NULL);
   320     return(NULL);
   321 } /* WAD_openArchive */
   321 } /* WAD_openArchive */
   322 
   322 
   323 
   323 
   324 static void WAD_enumerateFiles(dvoid *opaque, const char *dname,
   324 static void WAD_enumerateFiles(dvoid *opaque, const char *dname,
   325                                int omitSymLinks, PHYSFS_StringCallback cb,
   325                                int omitSymLinks, PHYSFS_EnumFilesCallback cb,
   326                                void *callbackdata)
   326                                const char *origdir, void *callbackdata)
   327 {
   327 {
   328     WADinfo *info = ((WADinfo *) opaque);
   328     WADinfo *info = ((WADinfo *) opaque);
   329     WADentry *entry = info->entries;
   329     WADentry *entry = info->entries;
   330     PHYSFS_uint32 max = info->entryCount;
   330     PHYSFS_uint32 max = info->entryCount;
   331     PHYSFS_uint32 i;
   331     PHYSFS_uint32 i;
   336     {
   336     {
   337         for (i = 0; i < max; i++, entry++)
   337         for (i = 0; i < max; i++, entry++)
   338         {
   338         {
   339             name = entry->name;
   339             name = entry->name;
   340             if (strchr(name, '/') == NULL)
   340             if (strchr(name, '/') == NULL)
   341                 cb(callbackdata, name);
   341                 cb(callbackdata, origdir, name);
   342         } /* for */
   342         } /* for */
   343     } /* if */
   343     } /* if */
   344     else
   344     else
   345     {
   345     {
   346         for (i = 0; i < max; i++, entry++)
   346         for (i = 0; i < max; i++, entry++)