src/archiver_lzma.c
changeset 1322 5476917b8ddf
parent 1283 8bcc48d243df
child 1324 d12c1c033a7d
--- a/src/archiver_lzma.c	Wed Nov 28 01:30:29 2012 -0500
+++ b/src/archiver_lzma.c	Wed Nov 28 01:36:13 2012 -0500
@@ -205,7 +205,7 @@
 {
     LZMAfile *file = bsearch(name, archive->files, archive->db.Database.NumFiles, sizeof(*archive->files), lzma_file_cmp_stdlib); /* FIXME: Should become __PHYSFS_search!!! */
 
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NO_SUCH_PATH, NULL);
+    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NOT_FOUND, NULL);
 
     return file;
 } /* lzma_find_file */
@@ -531,7 +531,7 @@
 } /* doEnumCallback */
 
 
-static void LZMA_enumerateFiles(PHYSFS_Dir *opaque, const char *dname,
+static void LZMA_enumerateFiles(void *opaque, const char *dname,
                                 int omitSymLinks, PHYSFS_EnumFilesCallback cb,
                                 const char *origdir, void *callbackdata)
 {
@@ -551,7 +551,7 @@
             file = archive->files;
         }
 
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NO_SUCH_PATH, );
+    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NOT_FOUND, );
 
     while (file < lastFile)
     {
@@ -575,7 +575,7 @@
 } /* LZMA_enumerateFiles */
 
 
-static PHYSFS_Io *LZMA_openRead(PHYSFS_Dir *opaque, const char *name,
+static PHYSFS_Io *LZMA_openRead(void *opaque, const char *name,
                                 int *fileExists)
 {
     LZMAarchive *archive = (LZMAarchive *) opaque;
@@ -583,7 +583,7 @@
     PHYSFS_Io *io = NULL;
 
     *fileExists = (file != NULL);
-    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NO_SUCH_PATH, NULL);
+    BAIL_IF_MACRO(file == NULL, PHYSFS_ERR_NOT_FOUND, NULL);
     BAIL_IF_MACRO(file->folder == NULL, PHYSFS_ERR_NOT_A_FILE, NULL);
 
     file->position = 0;
@@ -598,19 +598,19 @@
 } /* LZMA_openRead */
 
 
-static PHYSFS_Io *LZMA_openWrite(PHYSFS_Dir *opaque, const char *filename)
+static PHYSFS_Io *LZMA_openWrite(void *opaque, const char *filename)
 {
     BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
 } /* LZMA_openWrite */
 
 
-static PHYSFS_Io *LZMA_openAppend(PHYSFS_Dir *opaque, const char *filename)
+static PHYSFS_Io *LZMA_openAppend(void *opaque, const char *filename)
 {
     BAIL_MACRO(PHYSFS_ERR_READ_ONLY, NULL);
 } /* LZMA_openAppend */
 
 
-static void LZMA_closeArchive(PHYSFS_Dir *opaque)
+static void LZMA_closeArchive(void *opaque)
 {
     LZMAarchive *archive = (LZMAarchive *) opaque;
 
@@ -628,18 +628,18 @@
 } /* LZMA_closeArchive */
 
 
-static int LZMA_remove(PHYSFS_Dir *opaque, const char *name)
+static int LZMA_remove(void *opaque, const char *name)
 {
     BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
 } /* LZMA_remove */
 
 
-static int LZMA_mkdir(PHYSFS_Dir *opaque, const char *name)
+static int LZMA_mkdir(void *opaque, const char *name)
 {
     BAIL_MACRO(PHYSFS_ERR_READ_ONLY, 0);
 } /* LZMA_mkdir */
 
-static int LZMA_stat(PHYSFS_Dir *opaque, const char *filename,
+static int LZMA_stat(void *opaque, const char *filename,
                      int *exists, PHYSFS_Stat *stat)
 {
     const LZMAarchive *archive = (const LZMAarchive *) opaque;
@@ -678,6 +678,7 @@
 
 const PHYSFS_Archiver __PHYSFS_Archiver_LZMA =
 {
+    CURRENT_PHYSFS_ARCHIVER_API_VERSION,
     {
         "7Z",
         "LZMA (7zip) format",