Fixed some DOS newlines.
This commit is contained in:
parent
3324ec88a9
commit
2dbd784cc1
|
@ -256,8 +256,8 @@ static int iso_atoi4(char *text)
|
||||||
} /* iso_atoi4 */
|
} /* iso_atoi4 */
|
||||||
|
|
||||||
static PHYSFS_sint64 iso_volume_mktime(ISO9660VolumeTimestamp *timestamp)
|
static PHYSFS_sint64 iso_volume_mktime(ISO9660VolumeTimestamp *timestamp)
|
||||||
{
|
{
|
||||||
PHYSFS_sint64 value;
|
PHYSFS_sint64 value;
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
tm.tm_year = iso_atoi4(timestamp->year);
|
tm.tm_year = iso_atoi4(timestamp->year);
|
||||||
tm.tm_mon = iso_atoi2(timestamp->month) - 1;
|
tm.tm_mon = iso_atoi2(timestamp->month) - 1;
|
||||||
|
@ -344,8 +344,8 @@ static int iso_extractfilename(ISO9660Handle *handle,
|
||||||
|
|
||||||
static int iso_readimage(ISO9660Handle *handle, PHYSFS_uint64 where,
|
static int iso_readimage(ISO9660Handle *handle, PHYSFS_uint64 where,
|
||||||
void *buffer, PHYSFS_uint64 len)
|
void *buffer, PHYSFS_uint64 len)
|
||||||
{
|
{
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
BAIL_IF_ERRPASS(!__PHYSFS_platformGrabMutex(handle->mutex), -1);
|
BAIL_IF_ERRPASS(!__PHYSFS_platformGrabMutex(handle->mutex), -1);
|
||||||
if (where != handle->currpos)
|
if (where != handle->currpos)
|
||||||
GOTO_IF_ERRPASS(!handle->io->seek(handle->io,where), unlockme);
|
GOTO_IF_ERRPASS(!handle->io->seek(handle->io,where), unlockme);
|
||||||
|
@ -688,8 +688,8 @@ static void iso_file_close_mem(ISO9660FileHandle *fhandle)
|
||||||
static PHYSFS_uint32 iso_file_read_foreign(ISO9660FileHandle *filehandle,
|
static PHYSFS_uint32 iso_file_read_foreign(ISO9660FileHandle *filehandle,
|
||||||
void *buffer, PHYSFS_uint64 len)
|
void *buffer, PHYSFS_uint64 len)
|
||||||
{
|
{
|
||||||
PHYSFS_sint64 rc;
|
PHYSFS_sint64 rc;
|
||||||
|
|
||||||
/* check remaining bytes & max obj which can be fetched */
|
/* check remaining bytes & max obj which can be fetched */
|
||||||
const PHYSFS_sint64 bytesleft = filehandle->filesize - filehandle->currpos;
|
const PHYSFS_sint64 bytesleft = filehandle->filesize - filehandle->currpos;
|
||||||
if (bytesleft < len)
|
if (bytesleft < len)
|
||||||
|
@ -706,9 +706,9 @@ static PHYSFS_uint32 iso_file_read_foreign(ISO9660FileHandle *filehandle,
|
||||||
|
|
||||||
static int iso_file_seek_foreign(ISO9660FileHandle *fhandle,
|
static int iso_file_seek_foreign(ISO9660FileHandle *fhandle,
|
||||||
PHYSFS_sint64 offset)
|
PHYSFS_sint64 offset)
|
||||||
{
|
{
|
||||||
PHYSFS_sint64 pos;
|
PHYSFS_sint64 pos;
|
||||||
|
|
||||||
BAIL_IF(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
|
BAIL_IF(offset < 0, PHYSFS_ERR_INVALID_ARGUMENT, 0);
|
||||||
BAIL_IF(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
|
BAIL_IF(offset >= fhandle->filesize, PHYSFS_ERR_PAST_EOF, 0);
|
||||||
|
|
||||||
|
@ -728,8 +728,8 @@ static void iso_file_close_foreign(ISO9660FileHandle *fhandle)
|
||||||
|
|
||||||
|
|
||||||
static int iso_file_open_mem(ISO9660Handle *handle, ISO9660FileHandle *fhandle)
|
static int iso_file_open_mem(ISO9660Handle *handle, ISO9660FileHandle *fhandle)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
fhandle->cacheddata = allocator.Malloc(fhandle->filesize);
|
fhandle->cacheddata = allocator.Malloc(fhandle->filesize);
|
||||||
BAIL_IF(!fhandle->cacheddata, PHYSFS_ERR_OUT_OF_MEMORY, -1);
|
BAIL_IF(!fhandle->cacheddata, PHYSFS_ERR_OUT_OF_MEMORY, -1);
|
||||||
rc = iso_readimage(handle, fhandle->startblock * 2048,
|
rc = iso_readimage(handle, fhandle->startblock * 2048,
|
||||||
|
|
Loading…
Reference in New Issue