Skip to content

Commit

Permalink
Fixed details of PHYSFS_Archiver's stat method.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 22, 2010
1 parent 024784e commit f99f0ef
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/archiver_dir.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_grp.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_hog.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_lzma.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_mvl.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_qpak.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_wad.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/archiver_zip.c
Expand Up @@ -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;
Expand Down
13 changes: 6 additions & 7 deletions src/physfs_internal.h
Expand Up @@ -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);


/*
Expand Down Expand Up @@ -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;


Expand Down

0 comments on commit f99f0ef

Please sign in to comment.