Skip to content

Commit

Permalink
Rearranged PHYSFS_Archiver struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Nov 30, 2012
1 parent f5c7469 commit 2dd99cc
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/archiver_dir.c
Expand Up @@ -183,8 +183,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_DIR =
DIR_openAppend,
DIR_remove,
DIR_mkdir,
DIR_closeArchive,
DIR_stat
DIR_stat,
DIR_closeArchive
};

/* end of archiver_dir.c ... */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_grp.c
Expand Up @@ -102,8 +102,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_GRP =
UNPK_openAppend,
UNPK_remove,
UNPK_mkdir,
UNPK_closeArchive,
UNPK_stat
UNPK_stat,
UNPK_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_GRP */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_hog.c
Expand Up @@ -108,8 +108,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_HOG =
UNPK_openAppend,
UNPK_remove,
UNPK_mkdir,
UNPK_closeArchive,
UNPK_stat
UNPK_stat,
UNPK_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_HOG */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_iso9660.c
Expand Up @@ -951,8 +951,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_ISO9660 =
ISO9660_openAppend,
ISO9660_remove,
ISO9660_mkdir,
ISO9660_closeArchive,
ISO9660_stat
ISO9660_stat,
ISO9660_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_ISO9660 */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_lzma.c
Expand Up @@ -689,8 +689,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_LZMA =
LZMA_openAppend,
LZMA_remove,
LZMA_mkdir,
LZMA_closeArchive,
LZMA_stat
LZMA_stat,
LZMA_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_7Z */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_mvl.c
Expand Up @@ -95,8 +95,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_MVL =
UNPK_openAppend,
UNPK_remove,
UNPK_mkdir,
UNPK_closeArchive,
UNPK_stat
UNPK_stat,
UNPK_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_MVL */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_qpak.c
Expand Up @@ -111,8 +111,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_QPAK =
UNPK_openAppend,
UNPK_remove,
UNPK_mkdir,
UNPK_closeArchive,
UNPK_stat
UNPK_stat,
UNPK_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_QPAK */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_slb.c
Expand Up @@ -116,8 +116,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_SLB =
UNPK_openAppend,
UNPK_remove,
UNPK_mkdir,
UNPK_closeArchive,
UNPK_stat
UNPK_stat,
UNPK_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_SLB */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_wad.c
Expand Up @@ -119,8 +119,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_WAD =
UNPK_openAppend,
UNPK_remove,
UNPK_mkdir,
UNPK_closeArchive,
UNPK_stat
UNPK_stat,
UNPK_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_WAD */
Expand Down
4 changes: 2 additions & 2 deletions src/archiver_zip.c
Expand Up @@ -1702,8 +1702,8 @@ const PHYSFS_Archiver __PHYSFS_Archiver_ZIP =
ZIP_openAppend,
ZIP_remove,
ZIP_mkdir,
ZIP_closeArchive,
ZIP_stat
ZIP_stat,
ZIP_closeArchive
};

#endif /* defined PHYSFS_SUPPORTS_ZIP */
Expand Down
15 changes: 7 additions & 8 deletions src/physfs.h
Expand Up @@ -3477,21 +3477,20 @@ typedef struct PHYSFS_Archiver
*/
int (*mkdir)(void *opaque, const char *filename);

// !!! FIXME: reorder these methods.
/**
* Obtain basic file metadata.
* Returns non-zero on success, zero on failure.
* On failure, call PHYSFS_setErrorCode().
*/
int (*stat)(void *opaque, const char *fn, PHYSFS_Stat *stat);

/**
* Close directories/archives, and free any associated memory,
* including the original PHYSFS_Io and (opaque) itself, if
* applicable. Implementation can assume that it won't be called if
* there are still files open from this archive.
*/
void (*closeArchive)(void *opaque);

/**
* Obtain basic file metadata.
* Returns non-zero on success, zero on failure.
* On failure, call PHYSFS_setErrorCode().
*/
int (*stat)(void *opaque, const char *fn, PHYSFS_Stat *stat);
} PHYSFS_Archiver;

/**
Expand Down

0 comments on commit 2dd99cc

Please sign in to comment.