const correctness fixes.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 16 Mar 2002 03:53:46 +0000
changeset 126 f5135b499c0c
parent 125 ecb9733d79af
child 127 0d54a1a087d2
const correctness fixes.
archivers/dir.c
physfs.c
physfs.h
physfs_internal.h
--- a/archivers/dir.c	Sat Mar 16 03:53:29 2002 +0000
+++ b/archivers/dir.c	Sat Mar 16 03:53:46 2002 +0000
@@ -18,7 +18,7 @@
 
 static int DIR_read(FileHandle *handle, void *buffer,
                     unsigned int objSize, unsigned int objCount);
-static int DIR_write(FileHandle *handle, void *buffer,
+static int DIR_write(FileHandle *handle, const void *buffer,
                      unsigned int objSize, unsigned int objCount);
 static int DIR_eof(FileHandle *handle);
 static int DIR_tell(FileHandle *handle);
@@ -109,7 +109,7 @@
 } /* DIR_read */
 
 
-static int DIR_write(FileHandle *handle, void *buffer,
+static int DIR_write(FileHandle *handle, const void *buffer,
                      unsigned int objSize, unsigned int objCount)
 {
     FILE *h = (FILE *) (handle->opaque);
--- a/physfs.c	Sat Mar 16 03:53:29 2002 +0000
+++ b/physfs.c	Sat Mar 16 03:53:46 2002 +0000
@@ -1230,7 +1230,7 @@
 
 
 int PHYSFS_read(PHYSFS_file *handle, void *buffer,
-                            unsigned int objSize, unsigned int objCount)
+                unsigned int objSize, unsigned int objCount)
 {
     FileHandle *h = (FileHandle *) handle->opaque;
     assert(h != NULL);
@@ -1240,8 +1240,8 @@
 } /* PHYSFS_read */
 
 
-int PHYSFS_write(PHYSFS_file *handle, void *buffer,
-                            unsigned int objSize, unsigned int objCount)
+int PHYSFS_write(PHYSFS_file *handle, const void *buffer,
+                 unsigned int objSize, unsigned int objCount)
 {
     FileHandle *h = (FileHandle *) handle->opaque;
     assert(h != NULL);
--- a/physfs.h	Sat Mar 16 03:53:29 2002 +0000
+++ b/physfs.h	Sat Mar 16 03:53:46 2002 +0000
@@ -772,7 +772,7 @@
  *  @return number of objects written. PHYSFS_getLastError() can shed light on
  *           the reason this might be < (objCount). -1 if complete failure.
  */
-__EXPORT__ int PHYSFS_write(PHYSFS_file *handle, void *buffer,
+__EXPORT__ int PHYSFS_write(PHYSFS_file *handle, const void *buffer,
                             unsigned int objSize, unsigned int objCount);
 
 
@@ -811,7 +811,7 @@
 /**
  * Get total length of a file in bytes. Note that if the file size can't
  *  be determined (since the archive is "streamed" or whatnot) than this
- *  with report (-1). Also note that if another process/thread is writing
+ *  will report (-1). Also note that if another process/thread is writing
  *  to this file at the same time, then the information this function
  *  supplies could be incorrect before you get it. Use with caution, or
  *  better yet, don't use at all.
--- a/physfs_internal.h	Sat Mar 16 03:53:29 2002 +0000
+++ b/physfs_internal.h	Sat Mar 16 03:53:46 2002 +0000
@@ -62,7 +62,7 @@
          *  if complete failure.
          * On failure, call __PHYSFS_setError().
          */
-    int (*write)(FileHandle *handle, void *buffer,
+    int (*write)(FileHandle *handle, const void *buffer,
                  unsigned int objSize, unsigned int objCount);
 
         /*