Skip to content
Permalink
Browse files
Fixed details of PHYSFS_Archiver's stat method.
  • Loading branch information
icculus committed Aug 22, 2010
1 parent 024784e commit f99f0ef9e7c830e1948f28512f61978cf4ae9c1e
Showing with 14 additions and 15 deletions.
  1. +1 −1 src/archiver_dir.c
  2. +1 −1 src/archiver_grp.c
  3. +1 −1 src/archiver_hog.c
  4. +1 −1 src/archiver_lzma.c
  5. +1 −1 src/archiver_mvl.c
  6. +1 −1 src/archiver_qpak.c
  7. +1 −1 src/archiver_wad.c
  8. +1 −1 src/archiver_zip.c
  9. +6 −7 src/physfs_internal.h
@@ -237,7 +237,7 @@ static void DIR_dirClose(dvoid *opaque)
} /* DIR_dirClose */


static int DIR_stat(fvoid *opaque, const char *name, int *exists,
static int DIR_stat(dvoid *opaque, const char *name, int *exists,
PHYSFS_Stat *stat)
{
char *d = __PHYSFS_platformCvtToDependent((char *) opaque, name, NULL);
@@ -433,7 +433,7 @@ static int GRP_mkdir(dvoid *opaque, const char *name)
} /* GRP_mkdir */


static int GRP_stat(fvoid *opaque, const char *filename, int *exists,
static int GRP_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
const GRPinfo *info = (const GRPinfo *) opaque;
@@ -468,7 +468,7 @@ static int HOG_mkdir(dvoid *opaque, const char *name)
} /* HOG_mkdir */


static int HOG_stat(fvoid *opaque, const char *filename, int *exists,
static int HOG_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
const HOGinfo *info = (const HOGinfo *) opaque;
@@ -688,7 +688,7 @@ static int LZMA_mkdir(dvoid *opaque, const char *name)
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* LZMA_mkdir */

static int LZMA_stat(fvoid *opaque, const char *filename, int *exists,
static int LZMA_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
const LZMAarchive *archive = (const LZMAarchive *) opaque;
@@ -428,7 +428,7 @@ static int MVL_mkdir(dvoid *opaque, const char *name)
} /* MVL_mkdir */


static int MVL_stat(fvoid *opaque, const char *filename, int *exists,
static int MVL_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
const MVLinfo *info = (const MVLinfo *) opaque;
@@ -581,7 +581,7 @@ static int QPAK_mkdir(dvoid *opaque, const char *name)
} /* QPAK_mkdir */


static int QPAK_stat(fvoid *opaque, const char *filename, int *exists,
static int QPAK_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
int isDir = 0;
@@ -487,7 +487,7 @@ static int WAD_mkdir(dvoid *opaque, const char *name)
} /* WAD_mkdir */


static int WAD_stat(fvoid *opaque, const char *filename, int *exists,
static int WAD_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
const WADinfo *info = (const WADinfo *) opaque;
@@ -1399,7 +1399,7 @@ static int ZIP_mkdir(dvoid *opaque, const char *name)
} /* ZIP_mkdir */


static int ZIP_stat(fvoid *opaque, const char *filename, int *exists,
static int ZIP_stat(dvoid *opaque, const char *filename, int *exists,
PHYSFS_Stat *stat)
{
int isDir = 0;
@@ -890,6 +890,12 @@ typedef struct
*/
void (*dirClose)(dvoid *opaque);

/*
* Obtain basic file metadata.
* Returns non-zero on success, zero on failure.
* On failure, call __PHYSFS_setError().
*/
int (*stat)(dvoid *opaque, const char *fn, int *exists, PHYSFS_Stat *stat);


/*
@@ -944,13 +950,6 @@ typedef struct
* file. On failure, call __PHYSFS_setError().
*/
int (*fileClose)(fvoid *opaque);

/* !!! FIXME: return info (may be|is) wrong.
* Obtain basic file metadata.
* Returns non-zero on success, zero if can't close
* file. On failure, call __PHYSFS_setError().
*/
int (*stat)(fvoid *opaque, const char *fn, int *exists, PHYSFS_Stat *stat);
} PHYSFS_Archiver;


0 comments on commit f99f0ef

Please sign in to comment.