Fixed details of PHYSFS_Archiver's stat method.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 22 Aug 2010 00:37:25 -0400
changeset 1108 b63e39d5be04
parent 1107 b3d42c9117ec
child 1109 c69df75dbcc3
Fixed details of PHYSFS_Archiver's stat method.
src/archiver_dir.c
src/archiver_grp.c
src/archiver_hog.c
src/archiver_lzma.c
src/archiver_mvl.c
src/archiver_qpak.c
src/archiver_wad.c
src/archiver_zip.c
src/physfs_internal.h
--- a/src/archiver_dir.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_dir.c	Sun Aug 22 00:37:25 2010 -0400
@@ -237,7 +237,7 @@
 } /* 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);
--- a/src/archiver_grp.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_grp.c	Sun Aug 22 00:37:25 2010 -0400
@@ -433,7 +433,7 @@
 } /* 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;
--- a/src/archiver_hog.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_hog.c	Sun Aug 22 00:37:25 2010 -0400
@@ -468,7 +468,7 @@
 } /* 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;
--- a/src/archiver_lzma.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_lzma.c	Sun Aug 22 00:37:25 2010 -0400
@@ -688,7 +688,7 @@
     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;
--- a/src/archiver_mvl.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_mvl.c	Sun Aug 22 00:37:25 2010 -0400
@@ -428,7 +428,7 @@
 } /* 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;
--- a/src/archiver_qpak.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_qpak.c	Sun Aug 22 00:37:25 2010 -0400
@@ -581,7 +581,7 @@
 } /* 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;
--- a/src/archiver_wad.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_wad.c	Sun Aug 22 00:37:25 2010 -0400
@@ -487,7 +487,7 @@
 } /* 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;
--- a/src/archiver_zip.c	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/archiver_zip.c	Sun Aug 22 00:37:25 2010 -0400
@@ -1399,7 +1399,7 @@
 } /* 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;
--- a/src/physfs_internal.h	Sat Aug 21 20:05:22 2010 -0400
+++ b/src/physfs_internal.h	Sun Aug 22 00:37:25 2010 -0400
@@ -890,6 +890,12 @@
          */
     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 @@
          *  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;