const correctness fixes.

This commit is contained in:
Ryan C. Gordon 2002-03-16 03:53:46 +00:00
parent bd8818abd2
commit 57a176068c
4 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

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

View File

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