Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tome
Tales of MajEyal
Commits
18459c67
Commit
18459c67
authored
12 years ago
by
dg
Browse files
Options
Downloads
Patches
Plain Diff
fix
git-svn-id:
http://svn.net-core.org/repos/t-engine4@5819
51575b47-30f0-44d4-a5cc-537603b46e54
parent
34b5209b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/physfs/physfsrwops.c
+10
-10
10 additions, 10 deletions
src/physfs/physfsrwops.c
with
10 additions
and
10 deletions
src/physfs/physfsrwops.c
+
10
−
10
View file @
18459c67
...
...
@@ -23,10 +23,10 @@
#include
<stdio.h>
/* used for SEEK_SET, SEEK_CUR, SEEK_END ... */
#include
"physfsrwops.h"
static
int
physfsrwops_seek
(
SDL_RWops
*
rw
,
int
offset
,
int
whence
)
static
S
int
64
physfsrwops_seek
(
SDL_RWops
*
rw
,
S
int
64
offset
,
int
whence
)
{
PHYSFS_File
*
handle
=
(
PHYSFS_File
*
)
rw
->
hidden
.
unknown
.
data1
;
int
pos
=
0
;
S
int
64
pos
=
0
;
if
(
whence
==
SEEK_SET
)
{
...
...
@@ -43,7 +43,7 @@ static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
return
(
-
1
);
}
/* if */
pos
=
(
int
)
current
;
pos
=
current
;
if
(
((
PHYSFS_sint64
)
pos
)
!=
current
)
{
SDL_SetError
(
"Can't fit current file position in an int!"
);
...
...
@@ -65,7 +65,7 @@ static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
return
(
-
1
);
}
/* if */
pos
=
(
int
)
len
;
pos
=
(
S
int
64
)
len
;
if
(
((
PHYSFS_sint64
)
pos
)
!=
len
)
{
SDL_SetError
(
"Can't fit end-of-file position in an int!"
);
...
...
@@ -97,7 +97,7 @@ static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
}
/* physfsrwops_seek */
static
in
t
physfsrwops_read
(
SDL_RWops
*
rw
,
void
*
ptr
,
in
t
size
,
in
t
maxnum
)
static
size_
t
physfsrwops_read
(
SDL_RWops
*
rw
,
void
*
ptr
,
size_
t
size
,
size_
t
maxnum
)
{
PHYSFS_File
*
handle
=
(
PHYSFS_File
*
)
rw
->
hidden
.
unknown
.
data1
;
PHYSFS_sint64
rc
=
PHYSFS_read
(
handle
,
ptr
,
size
,
maxnum
);
...
...
@@ -107,18 +107,18 @@ static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
SDL_SetError
(
"PhysicsFS error: %s"
,
PHYSFS_getLastError
());
}
/* if */
return
((
in
t
)
rc
);
return
((
size_
t
)
rc
);
}
/* physfsrwops_read */
static
in
t
physfsrwops_write
(
SDL_RWops
*
rw
,
const
void
*
ptr
,
in
t
size
,
in
t
num
)
static
size_
t
physfsrwops_write
(
SDL_RWops
*
rw
,
const
void
*
ptr
,
size_
t
size
,
size_
t
num
)
{
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
());
return
((
in
t
)
rc
);
return
((
size_
t
)
rc
);
}
/* physfsrwops_write */
static
int
physfsrwops_close
(
SDL_RWops
*
rw
)
...
...
@@ -134,10 +134,10 @@ static int physfsrwops_close(SDL_RWops *rw)
return
(
0
);
}
/* physfsrwops_close */
static
int
physfsrwops_size
(
SDL_RWops
*
rw
)
static
S
int
64
physfsrwops_size
(
SDL_RWops
*
rw
)
{
PHYSFS_File
*
handle
=
(
PHYSFS_File
*
)
rw
->
hidden
.
unknown
.
data1
;
return
PHYSFS_fileLength
(
handle
);
return
((
Sint64
)
PHYSFS_fileLength
(
handle
)
)
;
}
/* physfsrwops_size */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment