Renamed PHYSFS_Archiver::dirClose() to PHYSFS_Archiver::closeArchive().
authorRyan C. Gordon <icculus@icculus.org>
Sat, 24 Mar 2012 10:36:11 -0400
changeset 1270 f8d3f58561b1
parent 1269 8a7e381fbc29
child 1271 28530ae4d9d1
Renamed PHYSFS_Archiver::dirClose() to PHYSFS_Archiver::closeArchive().
docs/TODO.txt
src/archiver_dir.c
src/archiver_grp.c
src/archiver_hog.c
src/archiver_iso9660.c
src/archiver_lzma.c
src/archiver_mvl.c
src/archiver_qpak.c
src/archiver_unpacked.c
src/archiver_wad.c
src/archiver_zip.c
src/physfs.c
src/physfs_internal.h
--- a/docs/TODO.txt	Sat Mar 24 00:49:34 2012 -0400
+++ b/docs/TODO.txt	Sat Mar 24 10:36:11 2012 -0400
@@ -45,7 +45,6 @@
 - Look for FIXMEs (many marked with "!!!" in comments).
 - Find some way to relax or remove the security model for external tools.
 - fscanf and fprintf support in extras dir.
-- Why do we call it openArchive and dirClose?
 - Sanity check byte order at runtime.
 - Memory locking?
 - Find a better name than dvoid and fvoid.
--- a/src/archiver_dir.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_dir.c	Sat Mar 24 10:36:11 2012 -0400
@@ -158,10 +158,10 @@
 } /* DIR_mkdir */
 
 
-static void DIR_dirClose(dvoid *opaque)
+static void DIR_closeArchive(dvoid *opaque)
 {
     allocator.Free(opaque);
-} /* DIR_dirClose */
+} /* DIR_closeArchive */
 
 
 static int DIR_stat(dvoid *opaque, const char *name, int *exists,
@@ -197,7 +197,7 @@
     DIR_openAppend,         /* openAppend() method     */
     DIR_remove,             /* remove() method         */
     DIR_mkdir,              /* mkdir() method          */
-    DIR_dirClose,           /* dirClose() method       */
+    DIR_closeArchive,       /* closeArchive() method   */
     DIR_stat                /* stat() method           */
 };
 
--- a/src/archiver_grp.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_grp.c	Sat Mar 24 10:36:11 2012 -0400
@@ -104,7 +104,7 @@
     UNPK_openAppend,        /* openAppend() method     */
     UNPK_remove,            /* remove() method         */
     UNPK_mkdir,             /* mkdir() method          */
-    UNPK_dirClose,          /* dirClose() method       */
+    UNPK_closeArchive,      /* closeArchive() method   */
     UNPK_stat               /* stat() method           */
 };
 
--- a/src/archiver_hog.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_hog.c	Sat Mar 24 10:36:11 2012 -0400
@@ -103,14 +103,14 @@
 const PHYSFS_Archiver __PHYSFS_Archiver_HOG =
 {
     &__PHYSFS_ArchiveInfo_HOG,
-    HOG_openArchive,        /* openArchive() method    */
+    HOG_openArchive,         /* openArchive() method    */
     UNPK_enumerateFiles,     /* enumerateFiles() method */
     UNPK_openRead,           /* openRead() method       */
     UNPK_openWrite,          /* openWrite() method      */
     UNPK_openAppend,         /* openAppend() method     */
     UNPK_remove,             /* remove() method         */
     UNPK_mkdir,              /* mkdir() method          */
-    UNPK_dirClose,           /* dirClose() method       */
+    UNPK_closeArchive,       /* closeArchive() method   */
     UNPK_stat                /* stat() method           */
 };
 
--- a/src/archiver_iso9660.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_iso9660.c	Sat Mar 24 10:36:11 2012 -0400
@@ -638,14 +638,14 @@
 } /* ISO9660_openArchive */
 
 
-static void ISO9660_dirClose(dvoid *opaque)
+static void ISO9660_closeArchive(dvoid *opaque)
 {
     ISO9660Handle *handle = (ISO9660Handle*) opaque;
     handle->io->destroy(handle->io);
     __PHYSFS_platformDestroyMutex(handle->mutex);
     allocator.Free(handle->path);
     allocator.Free(handle);
-} /* ISO9660_dirClose */
+} /* ISO9660_closeArchive */
 
 
 /*******************************************************************************
@@ -962,7 +962,7 @@
     ISO9660_openAppend,         /* openAppend() method     */
     ISO9660_remove,             /* remove() method         */
     ISO9660_mkdir,              /* mkdir() method          */
-    ISO9660_dirClose,           /* dirClose() method       */
+    ISO9660_closeArchive,       /* closeArchive() method   */
     ISO9660_stat                /* stat() method           */
 };
 
--- a/src/archiver_lzma.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_lzma.c	Sat Mar 24 10:36:11 2012 -0400
@@ -609,7 +609,7 @@
 } /* LZMA_openAppend */
 
 
-static void LZMA_dirClose(dvoid *opaque)
+static void LZMA_closeArchive(dvoid *opaque)
 {
     LZMAarchive *archive = (LZMAarchive *) opaque;
 
@@ -624,7 +624,7 @@
     SzArDbExFree(&archive->db, SzFreePhysicsFS);
     archive->stream.io->destroy(archive->stream.io);
     lzma_archive_exit(archive);
-} /* LZMA_dirClose */
+} /* LZMA_closeArchive */
 
 
 static int LZMA_remove(dvoid *opaque, const char *name)
@@ -694,7 +694,7 @@
     LZMA_openAppend,         /* openAppend() method     */
     LZMA_remove,             /* remove() method         */
     LZMA_mkdir,              /* mkdir() method          */
-    LZMA_dirClose,           /* dirClose() method       */
+    LZMA_closeArchive,       /* closeArchive() method   */
     LZMA_stat                /* stat() method           */
 };
 
--- a/src/archiver_mvl.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_mvl.c	Sat Mar 24 10:36:11 2012 -0400
@@ -97,7 +97,7 @@
     UNPK_openAppend,         /* openAppend() method     */
     UNPK_remove,             /* remove() method         */
     UNPK_mkdir,              /* mkdir() method          */
-    UNPK_dirClose,           /* dirClose() method       */
+    UNPK_closeArchive,       /* closeArchive() method   */
     UNPK_stat                /* stat() method           */
 };
 
--- a/src/archiver_qpak.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_qpak.c	Sat Mar 24 10:36:11 2012 -0400
@@ -112,7 +112,7 @@
     UNPK_openAppend,        /* openAppend() method     */
     UNPK_remove,            /* remove() method         */
     UNPK_mkdir,             /* mkdir() method          */
-    UNPK_dirClose,          /* dirClose() method       */
+    UNPK_closeArchive,       /* closeArchive() method   */
     UNPK_stat               /* stat() method           */
 };
 
--- a/src/archiver_unpacked.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_unpacked.c	Sat Mar 24 10:36:11 2012 -0400
@@ -34,13 +34,13 @@
 } UNPKfileinfo;
 
 
-void UNPK_dirClose(dvoid *opaque)
+void UNPK_closeArchive(dvoid *opaque)
 {
     UNPKinfo *info = ((UNPKinfo *) opaque);
     info->io->destroy(info->io);
     allocator.Free(info->entries);
     allocator.Free(info);
-} /* UNPK_dirClose */
+} /* UNPK_closeArchive */
 
 
 static PHYSFS_sint64 UNPK_read(PHYSFS_Io *io, void *buffer, PHYSFS_uint64 len)
--- a/src/archiver_wad.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_wad.c	Sat Mar 24 10:36:11 2012 -0400
@@ -121,7 +121,7 @@
     UNPK_openAppend,         /* openAppend() method     */
     UNPK_remove,             /* remove() method         */
     UNPK_mkdir,              /* mkdir() method          */
-    UNPK_dirClose,           /* dirClose() method       */
+    UNPK_closeArchive,       /* closeArchive() method   */
     UNPK_stat                /* stat() method           */
 };
 
--- a/src/archiver_zip.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/archiver_zip.c	Sat Mar 24 10:36:11 2012 -0400
@@ -1335,13 +1335,13 @@
 } /* ZIP_openAppend */
 
 
-static void ZIP_dirClose(dvoid *opaque)
+static void ZIP_closeArchive(dvoid *opaque)
 {
     ZIPinfo *zi = (ZIPinfo *) (opaque);
     zi->io->destroy(zi->io);
     zip_free_entries(zi->entries, zi->entryCount);
     allocator.Free(zi);
-} /* ZIP_dirClose */
+} /* ZIP_closeArchive */
 
 
 static int ZIP_remove(dvoid *opaque, const char *name)
@@ -1415,7 +1415,7 @@
     ZIP_openAppend,         /* openAppend() method     */
     ZIP_remove,             /* remove() method         */
     ZIP_mkdir,              /* mkdir() method          */
-    ZIP_dirClose,           /* dirClose() method       */
+    ZIP_closeArchive,       /* closeArchive() method   */
     ZIP_stat                /* stat() method           */
 };
 
--- a/src/physfs.c	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/physfs.c	Sat Mar 24 10:36:11 2012 -0400
@@ -882,7 +882,7 @@
     {
         retval = (DirHandle *) allocator.Malloc(sizeof (DirHandle));
         if (retval == NULL)
-            funcs->dirClose(opaque);
+            funcs->closeArchive(opaque);
         else
         {
             memset(retval, '\0', sizeof (DirHandle));
@@ -1072,7 +1072,7 @@
 badDirHandle:
     if (dirHandle != NULL)
     {
-        dirHandle->funcs->dirClose(dirHandle->opaque);
+        dirHandle->funcs->closeArchive(dirHandle->opaque);
         allocator.Free(dirHandle->dirName);
         allocator.Free(dirHandle->mountPoint);
         allocator.Free(dirHandle);
@@ -1094,7 +1094,7 @@
     for (i = openList; i != NULL; i = i->next)
         BAIL_IF_MACRO(i->dirHandle == dh, PHYSFS_ERR_FILES_STILL_OPEN, 0);
 
-    dh->funcs->dirClose(dh->opaque);
+    dh->funcs->closeArchive(dh->opaque);
     allocator.Free(dh->dirName);
     allocator.Free(dh->mountPoint);
     allocator.Free(dh);
--- a/src/physfs_internal.h	Sat Mar 24 00:49:34 2012 -0400
+++ b/src/physfs_internal.h	Sat Mar 24 10:36:11 2012 -0400
@@ -242,7 +242,7 @@
          *  applicable. Implementation can assume that it won't be called if
          *  there are still files open from this archive.
          */
-    void (*dirClose)(dvoid *opaque);
+    void (*closeArchive)(dvoid *opaque);
 
         /*
          * Obtain basic file metadata.
@@ -424,7 +424,7 @@
     PHYSFS_uint32 size;
 } UNPKentry;
 
-void UNPK_dirClose(dvoid *opaque);
+void UNPK_closeArchive(dvoid *opaque);
 dvoid *UNPK_openArchive(PHYSFS_Io *io, UNPKentry *e, const PHYSFS_uint32 num);
 void UNPK_enumerateFiles(dvoid *opaque, const char *dname,
                          int omitSymLinks, PHYSFS_EnumFilesCallback cb,