Sfoglia il codice sorgente

Rearranged PHYSFS_Archiver struct.

Ryan C. Gordon 13 anni fa
parent
commit
2dd99ccbb2

+ 2 - 2
src/archiver_dir.c

@@ -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 ... */

+ 2 - 2
src/archiver_grp.c

@@ -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 */

+ 2 - 2
src/archiver_hog.c

@@ -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 */

+ 2 - 2
src/archiver_iso9660.c

@@ -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 */

+ 2 - 2
src/archiver_lzma.c

@@ -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 */

+ 2 - 2
src/archiver_mvl.c

@@ -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 */

+ 2 - 2
src/archiver_qpak.c

@@ -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 */

+ 2 - 2
src/archiver_slb.c

@@ -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 */

+ 2 - 2
src/archiver_wad.c

@@ -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 */

+ 2 - 2
src/archiver_zip.c

@@ -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 */

+ 7 - 8
src/physfs.h

@@ -3477,7 +3477,13 @@ 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
@@ -3485,13 +3491,6 @@ typedef struct PHYSFS_Archiver
      *  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;
 
 /**