Changed PHYSFS_file to PHYSFS_File to match rest of API's naming

convention. This won't break binary compat (function signatures are
extern "C" so name mangling doesn't apply), and I've placed a typedef
for the old name to support legacy source code.
This commit is contained in:
Ryan C. Gordon 2004-09-26 13:17:54 +00:00
parent 221a2303be
commit 8641e4e7ef
12 changed files with 157 additions and 156 deletions

View File

@ -92,7 +92,7 @@ from the Author.
#ifdef USE_PHYSFS
#include <physfs.h>
#define MY_FILETYPE PHYSFS_file
#define MY_FILETYPE PHYSFS_File
#define MY_SETBUFFER(fp,size) PHYSFS_setBuffer(fp,size)
#define MY_READ(p,s,n,fp) PHYSFS_read(fp,p,s,n)
#if PHYSFS_DEFAULT_READ_BUFFER

View File

@ -116,7 +116,7 @@ int main(int argc, char **argv)
{
int rc;
char buf[128];
PHYSFS_file *f;
PHYSFS_File *f;
if (!PHYSFS_init(argv[0]))
{

View File

@ -24,7 +24,7 @@
static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
int pos = 0;
if (whence == SEEK_SET)
@ -98,7 +98,7 @@ static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
if (rc != maxnum)
{
@ -112,7 +112,7 @@ static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_write(handle, ptr, size, num);
if (rc != num)
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
@ -123,7 +123,7 @@ static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
static int physfsrwops_close(SDL_RWops *rw)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
if (!PHYSFS_close(handle))
{
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
@ -135,7 +135,7 @@ static int physfsrwops_close(SDL_RWops *rw)
} /* physfsrwops_close */
static SDL_RWops *create_rwops(PHYSFS_file *handle)
static SDL_RWops *create_rwops(PHYSFS_File *handle)
{
SDL_RWops *retval = NULL;
@ -158,7 +158,7 @@ static SDL_RWops *create_rwops(PHYSFS_file *handle)
} /* create_rwops */
SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle)
SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_File *handle)
{
SDL_RWops *retval = NULL;
if (handle == NULL)

View File

@ -369,7 +369,7 @@ VALUE physfs_last_mod_time (VALUE self, VALUE name)
*/
VALUE physfs_open_read (VALUE self, VALUE name)
{
PHYSFS_file *file = PHYSFS_openRead (STR2CSTR(name));
PHYSFS_File *file = PHYSFS_openRead (STR2CSTR(name));
return physfs_file_new (file);
}
@ -380,7 +380,7 @@ VALUE physfs_open_read (VALUE self, VALUE name)
*/
VALUE physfs_open_write (VALUE self, VALUE name)
{
PHYSFS_file *file = PHYSFS_openWrite (STR2CSTR(name));
PHYSFS_File *file = PHYSFS_openWrite (STR2CSTR(name));
return physfs_file_new (file);
}
@ -391,7 +391,7 @@ VALUE physfs_open_write (VALUE self, VALUE name)
*/
VALUE physfs_open_append (VALUE self, VALUE name)
{
PHYSFS_file *file = PHYSFS_openAppend (STR2CSTR(name));
PHYSFS_File *file = PHYSFS_openAppend (STR2CSTR(name));
return physfs_file_new (file);
}

View File

@ -17,7 +17,7 @@ VALUE classPhysfsFile;
/*
* construct new PhysicsFS::File object
*/
VALUE physfs_file_new (PHYSFS_file *file)
VALUE physfs_file_new (PHYSFS_File *file)
{
if (file == 0)
return Qnil;
@ -33,8 +33,8 @@ VALUE physfs_file_new (PHYSFS_file *file)
VALUE physfs_file_close (VALUE self)
{
int result;
PHYSFS_file *file;
Data_Get_Struct (self, PHYSFS_file, file);
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qfalse;
@ -59,9 +59,9 @@ VALUE physfs_file_read (VALUE self, VALUE objSize, VALUE objCount)
int objRead;
void *buffer;
VALUE result;
PHYSFS_file *file;
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil; //wasted file - no read possible
@ -89,9 +89,9 @@ VALUE physfs_file_read (VALUE self, VALUE objSize, VALUE objCount)
VALUE physfs_file_write (VALUE self, VALUE buf, VALUE objSize, VALUE objCount)
{
int result;
PHYSFS_file *file;
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil;
@ -109,9 +109,9 @@ VALUE physfs_file_write (VALUE self, VALUE buf, VALUE objSize, VALUE objCount)
VALUE physfs_file_eof (VALUE self)
{
int result;
PHYSFS_file *file;
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil;
@ -131,9 +131,9 @@ VALUE physfs_file_eof (VALUE self)
VALUE physfs_file_tell (VALUE self)
{
int result;
PHYSFS_file *file;
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil;
@ -153,9 +153,9 @@ VALUE physfs_file_tell (VALUE self)
VALUE physfs_file_seek (VALUE self, VALUE pos)
{
int result;
PHYSFS_file *file;
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil;
@ -173,9 +173,9 @@ VALUE physfs_file_seek (VALUE self, VALUE pos)
VALUE physfs_file_length (VALUE self)
{
int result;
PHYSFS_file *file;
PHYSFS_File *file;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil;
@ -196,10 +196,10 @@ VALUE physfs_file_length (VALUE self)
*/
VALUE physfs_file_to_rwops (VALUE self)
{
PHYSFS_file *file;
PHYSFS_File *file;
SDL_RWops *rwops;
Data_Get_Struct (self, PHYSFS_file, file);
Data_Get_Struct (self, PHYSFS_File, file);
if (file == 0)
return Qnil;

View File

@ -75,7 +75,7 @@ static char *txt404 =
static void feed_file_http(const char *ipstr, int sock, const char *fname)
{
PHYSFS_file *in = PHYSFS_openRead(fname);
PHYSFS_File *in = PHYSFS_openRead(fname);
char buffer[1024];
printf("%s: requested [%s].\n", ipstr, fname);
if (in == NULL)

View File

@ -25,7 +25,7 @@
static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
int pos = 0;
if (whence == SEEK_SET)
@ -99,7 +99,7 @@ static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
if (rc != maxnum)
{
@ -113,7 +113,7 @@ static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
PHYSFS_sint64 rc = PHYSFS_write(handle, ptr, size, num);
if (rc != num)
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
@ -124,7 +124,7 @@ static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
static int physfsrwops_close(SDL_RWops *rw)
{
PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
PHYSFS_File *handle = (PHYSFS_File *) rw->hidden.unknown.data1;
if (!PHYSFS_close(handle))
{
SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
@ -136,7 +136,7 @@ static int physfsrwops_close(SDL_RWops *rw)
} /* physfsrwops_close */
static SDL_RWops *create_rwops(PHYSFS_file *handle)
static SDL_RWops *create_rwops(PHYSFS_File *handle)
{
SDL_RWops *retval = NULL;
@ -159,7 +159,7 @@ static SDL_RWops *create_rwops(PHYSFS_file *handle)
} /* create_rwops */
SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle)
SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_File *handle)
{
SDL_RWops *retval = NULL;
if (handle == NULL)

View File

@ -76,7 +76,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
* @return A valid SDL_RWops structure on success, NULL on error. Specifics
* of the error can be gleaned from PHYSFS_getLastError().
*/
__EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
__EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_File *handle);
#ifdef __cplusplus
}

View File

@ -1644,7 +1644,7 @@ int PHYSFS_isSymbolicLink(const char *fname)
} /* PHYSFS_isSymbolicLink */
static PHYSFS_file *doOpenWrite(const char *fname, int appending)
static PHYSFS_File *doOpenWrite(const char *fname, int appending)
{
void *opaque = NULL;
FileHandle *fh = NULL;
@ -1687,23 +1687,23 @@ static PHYSFS_file *doOpenWrite(const char *fname, int appending)
} /* else */
__PHYSFS_platformReleaseMutex(stateLock);
return((PHYSFS_file *) fh);
return((PHYSFS_File *) fh);
} /* doOpenWrite */
PHYSFS_file *PHYSFS_openWrite(const char *filename)
PHYSFS_File *PHYSFS_openWrite(const char *filename)
{
return(doOpenWrite(filename, 0));
} /* PHYSFS_openWrite */
PHYSFS_file *PHYSFS_openAppend(const char *filename)
PHYSFS_File *PHYSFS_openAppend(const char *filename)
{
return(doOpenWrite(filename, 1));
} /* PHYSFS_openAppend */
PHYSFS_file *PHYSFS_openRead(const char *fname)
PHYSFS_File *PHYSFS_openRead(const char *fname)
{
FileHandle *fh = NULL;
int fileExists = 0;
@ -1748,7 +1748,7 @@ PHYSFS_file *PHYSFS_openRead(const char *fname)
openReadList = fh;
__PHYSFS_platformReleaseMutex(stateLock);
return((PHYSFS_file *) fh);
return((PHYSFS_File *) fh);
} /* PHYSFS_openRead */
@ -1763,7 +1763,7 @@ static int closeHandleInOpenList(FileHandle **list, FileHandle *handle)
if (i == handle) /* handle is in this list? */
{
PHYSFS_uint8 *tmp = handle->buffer;
rc = PHYSFS_flush((PHYSFS_file *) handle);
rc = PHYSFS_flush((PHYSFS_File *) handle);
if (rc)
rc = handle->funcs->fileClose(handle->opaque);
if (!rc)
@ -1787,7 +1787,7 @@ static int closeHandleInOpenList(FileHandle **list, FileHandle *handle)
} /* closeHandleInOpenList */
int PHYSFS_close(PHYSFS_file *_handle)
int PHYSFS_close(PHYSFS_File *_handle)
{
FileHandle *handle = (FileHandle *) _handle;
int rc;
@ -1853,7 +1853,7 @@ static PHYSFS_sint64 doBufferedRead(FileHandle *fh, void *buffer,
} /* doBufferedRead */
PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle, void *buffer,
PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
FileHandle *fh = (FileHandle *) handle;
@ -1866,7 +1866,7 @@ PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle, void *buffer,
} /* PHYSFS_read */
static PHYSFS_sint64 doBufferedWrite(PHYSFS_file *handle, const void *buffer,
static PHYSFS_sint64 doBufferedWrite(PHYSFS_File *handle, const void *buffer,
PHYSFS_uint32 objSize,
PHYSFS_uint32 objCount)
{
@ -1886,7 +1886,7 @@ static PHYSFS_sint64 doBufferedWrite(PHYSFS_file *handle, const void *buffer,
} /* doBufferedWrite */
PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle, const void *buffer,
PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
FileHandle *fh = (FileHandle *) handle;
@ -1899,7 +1899,7 @@ PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle, const void *buffer,
} /* PHYSFS_write */
int PHYSFS_eof(PHYSFS_file *handle)
int PHYSFS_eof(PHYSFS_File *handle)
{
FileHandle *fh = (FileHandle *) handle;
@ -1911,7 +1911,7 @@ int PHYSFS_eof(PHYSFS_file *handle)
} /* PHYSFS_eof */
PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle)
PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle)
{
FileHandle *fh = (FileHandle *) handle;
PHYSFS_sint64 pos = fh->funcs->tell(fh->opaque);
@ -1922,7 +1922,7 @@ PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle)
} /* PHYSFS_tell */
int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos)
int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
{
FileHandle *fh = (FileHandle *) handle;
BAIL_IF_MACRO(!PHYSFS_flush(handle), NULL, 0);
@ -1946,14 +1946,14 @@ int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos)
} /* PHYSFS_seek */
PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_file *handle)
PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle)
{
FileHandle *fh = (FileHandle *) handle;
return(fh->funcs->fileLength(fh->opaque));
} /* PHYSFS_filelength */
int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 _bufsize)
int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 _bufsize)
{
FileHandle *fh = (FileHandle *) handle;
PHYSFS_uint32 bufsize;
@ -1999,7 +1999,7 @@ int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 _bufsize)
} /* PHYSFS_setBuffer */
int PHYSFS_flush(PHYSFS_file *handle)
int PHYSFS_flush(PHYSFS_File *handle)
{
FileHandle *fh = (FileHandle *) handle;
PHYSFS_sint64 rc;

149
physfs.h
View File

@ -244,7 +244,7 @@ PHYSFS_COMPILE_TIME_ASSERT(sint64, sizeof(PHYSFS_sint64) == 8);
/**
* \struct PHYSFS_file
* \struct PHYSFS_File
* \brief A PhysicsFS file handle.
*
* You get a pointer to one of these when you open a file for reading,
@ -269,8 +269,9 @@ PHYSFS_COMPILE_TIME_ASSERT(sint64, sizeof(PHYSFS_sint64) == 8);
typedef struct
{
void *opaque; /**< That's all you get. Don't touch. */
} PHYSFS_file;
} PHYSFS_File;
typedef PHYSFS_File PHYSFS_file; /* for backwards compatibility with 1.0 */
/**
@ -987,7 +988,7 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename);
/* i/o stuff... */
/**
* \fn PHYSFS_file *PHYSFS_openWrite(const char *filename)
* \fn PHYSFS_File *PHYSFS_openWrite(const char *filename)
* \brief Open a file for writing.
*
* Open a file for writing, in platform-independent notation and in relation
@ -1008,11 +1009,11 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename);
* \sa PHYSFS_write
* \sa PHYSFS_close
*/
__EXPORT__ PHYSFS_file *PHYSFS_openWrite(const char *filename);
__EXPORT__ PHYSFS_File *PHYSFS_openWrite(const char *filename);
/**
* \fn PHYSFS_file *PHYSFS_openAppend(const char *filename)
* \fn PHYSFS_File *PHYSFS_openAppend(const char *filename)
* \brief Open a file for appending.
*
* Open a file for writing, in platform-independent notation and in relation
@ -1034,11 +1035,11 @@ __EXPORT__ PHYSFS_file *PHYSFS_openWrite(const char *filename);
* \sa PHYSFS_write
* \sa PHYSFS_close
*/
__EXPORT__ PHYSFS_file *PHYSFS_openAppend(const char *filename);
__EXPORT__ PHYSFS_File *PHYSFS_openAppend(const char *filename);
/**
* \fn PHYSFS_file *PHYSFS_openRead(const char *filename)
* \fn PHYSFS_File *PHYSFS_openRead(const char *filename)
* \brief Open a file for reading.
*
* Open a file for reading, in platform-independent notation. The search path
@ -1059,11 +1060,11 @@ __EXPORT__ PHYSFS_file *PHYSFS_openAppend(const char *filename);
* \sa PHYSFS_read
* \sa PHYSFS_close
*/
__EXPORT__ PHYSFS_file *PHYSFS_openRead(const char *filename);
__EXPORT__ PHYSFS_File *PHYSFS_openRead(const char *filename);
/**
* \fn int PHYSFS_close(PHYSFS_file *handle)
* \fn int PHYSFS_close(PHYSFS_File *handle)
* \brief Close a PhysicsFS filehandle.
*
* This call is capable of failing if the operating system was buffering
@ -1080,11 +1081,11 @@ __EXPORT__ PHYSFS_file *PHYSFS_openRead(const char *filename);
* \sa PHYSFS_openWrite
* \sa PHYSFS_openAppend
*/
__EXPORT__ int PHYSFS_close(PHYSFS_file *handle);
__EXPORT__ int PHYSFS_close(PHYSFS_File *handle);
/**
* \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
* \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
* \brief Read data from a PhysicsFS filehandle
*
* The file must be opened for reading.
@ -1099,13 +1100,13 @@ __EXPORT__ int PHYSFS_close(PHYSFS_file *handle);
*
* \sa PHYSFS_eof
*/
__EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle,
__EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle,
void *buffer,
PHYSFS_uint32 objSize,
PHYSFS_uint32 objCount);
/**
* \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
* \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
* \brief Write data to a PhysicsFS filehandle
*
* The file must be opened for writing.
@ -1117,7 +1118,7 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_file *handle,
* \return number of objects written. PHYSFS_getLastError() can shed light on
* the reason this might be < (objCount). -1 if complete failure.
*/
__EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle,
__EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle,
const void *buffer,
PHYSFS_uint32 objSize,
PHYSFS_uint32 objCount);
@ -1126,7 +1127,7 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle,
/* File position stuff... */
/**
* \fn int PHYSFS_eof(PHYSFS_file *handle)
* \fn int PHYSFS_eof(PHYSFS_File *handle)
* \brief Check for end-of-file state on a PhysicsFS filehandle.
*
* Determine if the end of file has been reached in a PhysicsFS filehandle.
@ -1137,11 +1138,11 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_file *handle,
* \sa PHYSFS_read
* \sa PHYSFS_tell
*/
__EXPORT__ int PHYSFS_eof(PHYSFS_file *handle);
__EXPORT__ int PHYSFS_eof(PHYSFS_File *handle);
/**
* \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle)
* \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle)
* \brief Determine current position within a PhysicsFS filehandle.
*
* \param handle handle returned from PHYSFS_open*().
@ -1150,11 +1151,11 @@ __EXPORT__ int PHYSFS_eof(PHYSFS_file *handle);
*
* \sa PHYSFS_seek
*/
__EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle);
__EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle);
/**
* \fn int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos)
* \fn int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
* \brief Seek to a new position within a PhysicsFS filehandle.
*
* The next read or write will occur at that place. Seeking past the
@ -1167,11 +1168,11 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_file *handle);
*
* \sa PHYSFS_tell
*/
__EXPORT__ int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos);
__EXPORT__ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos);
/**
* \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_file *handle)
* \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle)
* \brief Get total length of a file in bytes.
*
* Note that if the file size can't be determined (since the archive is
@ -1186,13 +1187,13 @@ __EXPORT__ int PHYSFS_seek(PHYSFS_file *handle, PHYSFS_uint64 pos);
* \sa PHYSFS_tell
* \sa PHYSFS_seek
*/
__EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_file *handle);
__EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle);
/* Buffering stuff... */
/**
* \fn int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 bufsize)
* \fn int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize)
* \brief Set up buffering for a PhysicsFS file handle.
*
* Define an i/o buffer for a file handle. A memory block of (bufsize) bytes
@ -1231,11 +1232,11 @@ __EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_file *handle);
* \sa PHYSFS_write
* \sa PHYSFS_close
*/
__EXPORT__ int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 bufsize);
__EXPORT__ int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize);
/**
* \fn int PHYSFS_flush(PHYSFS_file *handle)
* \fn int PHYSFS_flush(PHYSFS_File *handle)
* \brief Flush a buffered PhysicsFS file handle.
*
* For buffered files opened for writing, this will put the current contents
@ -1250,7 +1251,7 @@ __EXPORT__ int PHYSFS_setBuffer(PHYSFS_file *handle, PHYSFS_uint64 bufsize);
* \sa PHYSFS_setBuffer
* \sa PHYSFS_close
*/
__EXPORT__ int PHYSFS_flush(PHYSFS_file *handle);
__EXPORT__ int PHYSFS_flush(PHYSFS_File *handle);
/* Byteorder stuff... */
@ -1421,7 +1422,7 @@ __EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
/**
* \fn int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val)
* \fn int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val)
* \brief Read and convert a signed 16-bit littleendian value.
*
* Convenience function. Read a signed 16-bit littleendian value from a
@ -1433,11 +1434,11 @@ __EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
* store the result. On failure, you can find out what went wrong
* from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val);
__EXPORT__ int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val);
/**
* \fn int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val)
* \fn int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val)
* \brief Read and convert an unsigned 16-bit littleendian value.
*
* Convenience function. Read an unsigned 16-bit littleendian value from a
@ -1450,11 +1451,11 @@ __EXPORT__ int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val);
* from PHYSFS_GetLastError().
*
*/
__EXPORT__ int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val);
__EXPORT__ int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val);
/**
* \fn int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val)
* \fn int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val)
* \brief Read and convert a signed 16-bit bigendian value.
*
* Convenience function. Read a signed 16-bit bigendian value from a
@ -1466,11 +1467,11 @@ __EXPORT__ int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val);
* store the result. On failure, you can find out what went wrong
* from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val);
__EXPORT__ int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val);
/**
* \fn int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val)
* \fn int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val)
* \brief Read and convert an unsigned 16-bit bigendian value.
*
* Convenience function. Read an unsigned 16-bit bigendian value from a
@ -1483,11 +1484,11 @@ __EXPORT__ int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val);
* from PHYSFS_GetLastError().
*
*/
__EXPORT__ int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val);
__EXPORT__ int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val);
/**
* \fn int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val)
* \fn int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val)
* \brief Read and convert a signed 32-bit littleendian value.
*
* Convenience function. Read a signed 32-bit littleendian value from a
@ -1499,11 +1500,11 @@ __EXPORT__ int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val);
* store the result. On failure, you can find out what went wrong
* from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val);
__EXPORT__ int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val);
/**
* \fn int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val)
* \fn int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val)
* \brief Read and convert an unsigned 32-bit littleendian value.
*
* Convenience function. Read an unsigned 32-bit littleendian value from a
@ -1516,11 +1517,11 @@ __EXPORT__ int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val);
* from PHYSFS_GetLastError().
*
*/
__EXPORT__ int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val);
__EXPORT__ int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val);
/**
* \fn int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val)
* \fn int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val)
* \brief Read and convert a signed 32-bit bigendian value.
*
* Convenience function. Read a signed 32-bit bigendian value from a
@ -1532,11 +1533,11 @@ __EXPORT__ int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val);
* store the result. On failure, you can find out what went wrong
* from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val);
__EXPORT__ int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val);
/**
* \fn int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val)
* \fn int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val)
* \brief Read and convert an unsigned 32-bit bigendian value.
*
* Convenience function. Read an unsigned 32-bit bigendian value from a
@ -1549,11 +1550,11 @@ __EXPORT__ int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val);
* from PHYSFS_GetLastError().
*
*/
__EXPORT__ int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val);
__EXPORT__ int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val);
/**
* \fn int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val)
* \fn int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val)
* \brief Read and convert a signed 64-bit littleendian value.
*
* Convenience function. Read a signed 64-bit littleendian value from a
@ -1568,11 +1569,11 @@ __EXPORT__ int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val);
* \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val);
__EXPORT__ int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val);
/**
* \fn int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val)
* \fn int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val)
* \brief Read and convert an unsigned 64-bit littleendian value.
*
* Convenience function. Read an unsigned 64-bit littleendian value from a
@ -1587,11 +1588,11 @@ __EXPORT__ int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val);
* \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val);
__EXPORT__ int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val);
/**
* \fn int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val)
* \fn int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val)
* \brief Read and convert a signed 64-bit bigendian value.
*
* Convenience function. Read a signed 64-bit bigendian value from a
@ -1606,11 +1607,11 @@ __EXPORT__ int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val);
* \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val);
__EXPORT__ int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val);
/**
* \fn int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val)
* \fn int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val)
* \brief Read and convert an unsigned 64-bit bigendian value.
*
* Convenience function. Read an unsigned 64-bit bigendian value from a
@ -1625,11 +1626,11 @@ __EXPORT__ int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val);
* \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val);
__EXPORT__ int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val);
/**
* \fn int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val)
* \fn int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val)
* \brief Convert and write a signed 16-bit littleendian value.
*
* Convenience function. Convert a signed 16-bit value from the platform's
@ -1640,11 +1641,11 @@ __EXPORT__ int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val);
__EXPORT__ int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val);
/**
* \fn int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val)
* \fn int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val)
* \brief Convert and write an unsigned 16-bit littleendian value.
*
* Convenience function. Convert an unsigned 16-bit value from the platform's
@ -1655,11 +1656,11 @@ __EXPORT__ int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val);
__EXPORT__ int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val);
/**
* \fn int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val)
* \fn int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val)
* \brief Convert and write a signed 16-bit bigendian value.
*
* Convenience function. Convert a signed 16-bit value from the platform's
@ -1670,11 +1671,11 @@ __EXPORT__ int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val);
__EXPORT__ int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val);
/**
* \fn int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val)
* \fn int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val)
* \brief Convert and write an unsigned 16-bit bigendian value.
*
* Convenience function. Convert an unsigned 16-bit value from the platform's
@ -1685,11 +1686,11 @@ __EXPORT__ int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val);
__EXPORT__ int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val);
/**
* \fn int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val)
* \fn int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val)
* \brief Convert and write a signed 32-bit littleendian value.
*
* Convenience function. Convert a signed 32-bit value from the platform's
@ -1700,11 +1701,11 @@ __EXPORT__ int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val);
__EXPORT__ int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val);
/**
* \fn int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val)
* \fn int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val)
* \brief Convert and write an unsigned 32-bit littleendian value.
*
* Convenience function. Convert an unsigned 32-bit value from the platform's
@ -1715,11 +1716,11 @@ __EXPORT__ int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val);
__EXPORT__ int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val);
/**
* \fn int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val)
* \fn int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val)
* \brief Convert and write a signed 32-bit bigendian value.
*
* Convenience function. Convert a signed 32-bit value from the platform's
@ -1730,11 +1731,11 @@ __EXPORT__ int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val);
__EXPORT__ int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val);
/**
* \fn int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val)
* \fn int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val)
* \brief Convert and write an unsigned 32-bit bigendian value.
*
* Convenience function. Convert an unsigned 32-bit value from the platform's
@ -1745,11 +1746,11 @@ __EXPORT__ int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val);
* \return zero on failure, non-zero on success. On failure, you can
* find out what went wrong from PHYSFS_GetLastError().
*/
__EXPORT__ int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val);
__EXPORT__ int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val);
/**
* \fn int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val)
* \fn int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val)
* \brief Convert and write a signed 64-bit littleendian value.
*
* Convenience function. Convert a signed 64-bit value from the platform's
@ -1763,11 +1764,11 @@ __EXPORT__ int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val);
* \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val);
__EXPORT__ int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val);
/**
* \fn int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val)
* \fn int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val)
* \brief Convert and write an unsigned 64-bit littleendian value.
*
* Convenience function. Convert an unsigned 64-bit value from the platform's
@ -1781,11 +1782,11 @@ __EXPORT__ int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val);
* \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val);
__EXPORT__ int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val);
/**
* \fn int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val)
* \fn int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val)
* \brief Convert and write a signed 64-bit bigending value.
*
* Convenience function. Convert a signed 64-bit value from the platform's
@ -1799,11 +1800,11 @@ __EXPORT__ int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val);
* \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val);
__EXPORT__ int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val);
/**
* \fn int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val)
* \fn int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val)
* \brief Convert and write an unsigned 64-bit bigendian value.
*
* Convenience function. Convert an unsigned 64-bit value from the platform's
@ -1817,7 +1818,7 @@ __EXPORT__ int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val);
* \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without
* any sort of 64-bit support.
*/
__EXPORT__ int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val);
__EXPORT__ int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val);
/* Everything above this line is part of the PhysicsFS 1.0 API. */

View File

@ -104,7 +104,7 @@ PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 x) { return(x); }
#endif
int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val)
int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val)
{
PHYSFS_sint16 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -114,7 +114,7 @@ int PHYSFS_readSLE16(PHYSFS_file *file, PHYSFS_sint16 *val)
} /* PHYSFS_readSLE16 */
int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val)
int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val)
{
PHYSFS_uint16 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -124,7 +124,7 @@ int PHYSFS_readULE16(PHYSFS_file *file, PHYSFS_uint16 *val)
} /* PHYSFS_readULE16 */
int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val)
int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val)
{
PHYSFS_sint16 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -134,7 +134,7 @@ int PHYSFS_readSBE16(PHYSFS_file *file, PHYSFS_sint16 *val)
} /* PHYSFS_readSBE16 */
int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val)
int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val)
{
PHYSFS_uint16 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -144,7 +144,7 @@ int PHYSFS_readUBE16(PHYSFS_file *file, PHYSFS_uint16 *val)
} /* PHYSFS_readUBE16 */
int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val)
int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val)
{
PHYSFS_sint32 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -154,7 +154,7 @@ int PHYSFS_readSLE32(PHYSFS_file *file, PHYSFS_sint32 *val)
} /* PHYSFS_readSLE32 */
int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val)
int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val)
{
PHYSFS_uint32 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -164,7 +164,7 @@ int PHYSFS_readULE32(PHYSFS_file *file, PHYSFS_uint32 *val)
} /* PHYSFS_readULE32 */
int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val)
int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val)
{
PHYSFS_sint32 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -174,7 +174,7 @@ int PHYSFS_readSBE32(PHYSFS_file *file, PHYSFS_sint32 *val)
} /* PHYSFS_readSBE32 */
int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val)
int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val)
{
PHYSFS_uint32 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -184,7 +184,7 @@ int PHYSFS_readUBE32(PHYSFS_file *file, PHYSFS_uint32 *val)
} /* PHYSFS_readUBE32 */
int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val)
int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val)
{
PHYSFS_sint64 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -194,7 +194,7 @@ int PHYSFS_readSLE64(PHYSFS_file *file, PHYSFS_sint64 *val)
} /* PHYSFS_readSLE64 */
int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val)
int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val)
{
PHYSFS_uint64 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -204,7 +204,7 @@ int PHYSFS_readULE64(PHYSFS_file *file, PHYSFS_uint64 *val)
} /* PHYSFS_readULE64 */
int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val)
int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val)
{
PHYSFS_sint64 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -214,7 +214,7 @@ int PHYSFS_readSBE64(PHYSFS_file *file, PHYSFS_sint64 *val)
} /* PHYSFS_readSBE64 */
int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val)
int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val)
{
PHYSFS_uint64 in;
BAIL_IF_MACRO(val == NULL, ERR_INVALID_ARGUMENT, 0);
@ -225,7 +225,7 @@ int PHYSFS_readUBE64(PHYSFS_file *file, PHYSFS_uint64 *val)
int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val)
int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val)
{
PHYSFS_sint16 out = PHYSFS_swapSLE16(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -233,7 +233,7 @@ int PHYSFS_writeSLE16(PHYSFS_file *file, PHYSFS_sint16 val)
} /* PHYSFS_writeSLE16 */
int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val)
int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val)
{
PHYSFS_uint16 out = PHYSFS_swapULE16(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -241,7 +241,7 @@ int PHYSFS_writeULE16(PHYSFS_file *file, PHYSFS_uint16 val)
} /* PHYSFS_writeULE16 */
int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val)
int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val)
{
PHYSFS_sint16 out = PHYSFS_swapSBE16(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -249,7 +249,7 @@ int PHYSFS_writeSBE16(PHYSFS_file *file, PHYSFS_sint16 val)
} /* PHYSFS_writeSBE16 */
int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val)
int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val)
{
PHYSFS_uint16 out = PHYSFS_swapUBE16(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -257,7 +257,7 @@ int PHYSFS_writeUBE16(PHYSFS_file *file, PHYSFS_uint16 val)
} /* PHYSFS_writeUBE16 */
int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val)
int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val)
{
PHYSFS_sint32 out = PHYSFS_swapSLE32(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -265,7 +265,7 @@ int PHYSFS_writeSLE32(PHYSFS_file *file, PHYSFS_sint32 val)
} /* PHYSFS_writeSLE32 */
int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val)
int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val)
{
PHYSFS_uint32 out = PHYSFS_swapULE32(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -273,7 +273,7 @@ int PHYSFS_writeULE32(PHYSFS_file *file, PHYSFS_uint32 val)
} /* PHYSFS_writeULE32 */
int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val)
int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val)
{
PHYSFS_sint32 out = PHYSFS_swapSBE32(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -281,7 +281,7 @@ int PHYSFS_writeSBE32(PHYSFS_file *file, PHYSFS_sint32 val)
} /* PHYSFS_writeSBE32 */
int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val)
int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val)
{
PHYSFS_uint32 out = PHYSFS_swapUBE32(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -289,7 +289,7 @@ int PHYSFS_writeUBE32(PHYSFS_file *file, PHYSFS_uint32 val)
} /* PHYSFS_writeUBE32 */
int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val)
int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val)
{
PHYSFS_sint64 out = PHYSFS_swapSLE64(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -297,7 +297,7 @@ int PHYSFS_writeSLE64(PHYSFS_file *file, PHYSFS_sint64 val)
} /* PHYSFS_writeSLE64 */
int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val)
int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val)
{
PHYSFS_uint64 out = PHYSFS_swapULE64(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -305,7 +305,7 @@ int PHYSFS_writeULE64(PHYSFS_file *file, PHYSFS_uint64 val)
} /* PHYSFS_writeULE64 */
int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val)
int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val)
{
PHYSFS_sint64 out = PHYSFS_swapSBE64(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);
@ -313,7 +313,7 @@ int PHYSFS_writeSBE64(PHYSFS_file *file, PHYSFS_sint64 val)
} /* PHYSFS_writeSBE64 */
int PHYSFS_writeUBE64(PHYSFS_file *file, PHYSFS_uint64 val)
int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val)
{
PHYSFS_uint64 out = PHYSFS_swapUBE64(val);
BAIL_IF_MACRO(PHYSFS_write(file, &out, sizeof (out), 1) != 1, NULL, 0);

View File

@ -328,7 +328,7 @@ static int cmd_stressbuffer(char *args)
printf("buffer must be greater than or equal to zero.\n");
else
{
PHYSFS_file *f;
PHYSFS_File *f;
int rndnum;
printf("Stress testing with (%d) byte buffer...\n", num);
@ -645,7 +645,7 @@ static int cmd_issymlink(char *args)
static int cmd_cat(char *args)
{
PHYSFS_file *f;
PHYSFS_File *f;
if (*args == '\"')
{
@ -699,7 +699,7 @@ static int cmd_cat(char *args)
static int cmd_filelength(char *args)
{
PHYSFS_file *f;
PHYSFS_File *f;
if (*args == '\"')
{
@ -729,7 +729,7 @@ static int cmd_filelength(char *args)
static int cmd_append(char *args)
{
PHYSFS_file *f;
PHYSFS_File *f;
if (*args == '\"')
{
@ -777,7 +777,7 @@ static int cmd_append(char *args)
static int cmd_write(char *args)
{
PHYSFS_file *f;
PHYSFS_File *f;
if (*args == '\"')
{