Skip to content
Permalink
Browse files
const correctness fixes.
  • Loading branch information
icculus committed Mar 16, 2002
1 parent bd8818a commit 57a176068cc48e942fc8a97d4b3220da68067e86
Showing with 8 additions and 8 deletions.
  1. +2 −2 archivers/dir.c
  2. +3 −3 physfs.c
  3. +2 −2 physfs.h
  4. +1 −1 physfs_internal.h
@@ -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 @@ static int DIR_read(FileHandle *handle, void *buffer,
} /* 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);
@@ -1230,7 +1230,7 @@ int PHYSFS_close(PHYSFS_file *handle)


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 @@ int PHYSFS_read(PHYSFS_file *handle, void *buffer,
} /* 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);
@@ -772,7 +772,7 @@ __EXPORT__ int PHYSFS_read(PHYSFS_file *handle, void *buffer,
* @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 @@ __EXPORT__ int PHYSFS_seek(PHYSFS_file *handle, int pos);
/**
* 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.
@@ -62,7 +62,7 @@ typedef struct __PHYSFS_FILEFUNCTIONS__
* 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);

/*

0 comments on commit 57a1760

Please sign in to comment.