archivers/hog.c
changeset 754 e7cd7411eadf
parent 691 71d9affe0d8a
child 808 7656f86a9a2c
equal deleted inserted replaced
753:ad9d219dcb59 754:e7cd7411eadf
   332     return(NULL);
   332     return(NULL);
   333 } /* HOG_openArchive */
   333 } /* HOG_openArchive */
   334 
   334 
   335 
   335 
   336 static void HOG_enumerateFiles(dvoid *opaque, const char *dname,
   336 static void HOG_enumerateFiles(dvoid *opaque, const char *dname,
   337                                int omitSymLinks, PHYSFS_StringCallback cb,
   337                                int omitSymLinks, PHYSFS_EnumFilesCallback cb,
   338                                void *callbackdata)
   338                                const char *origdir, void *callbackdata)
   339 {
   339 {
   340     /* no directories in HOG files. */
   340     /* no directories in HOG files. */
   341     if (*dname != '\0')
   341     if (*dname != '\0')
   342     {
   342     {
   343         HOGinfo *info = (HOGinfo *) opaque;
   343         HOGinfo *info = (HOGinfo *) opaque;
   344         HOGentry *entry = info->entries;
   344         HOGentry *entry = info->entries;
   345         PHYSFS_uint32 max = info->entryCount;
   345         PHYSFS_uint32 max = info->entryCount;
   346         PHYSFS_uint32 i;
   346         PHYSFS_uint32 i;
   347 
   347 
   348         for (i = 0; i < max; i++, entry++)
   348         for (i = 0; i < max; i++, entry++)
   349             cb(callbackdata, entry->name);
   349             cb(callbackdata, origdir, entry->name);
   350     } /* if */
   350     } /* if */
   351 } /* HOG_enumerateFiles */
   351 } /* HOG_enumerateFiles */
   352 
   352 
   353 
   353 
   354 static HOGentry *hog_find_entry(HOGinfo *info, const char *name)
   354 static HOGentry *hog_find_entry(HOGinfo *info, const char *name)