summaryrefslogtreecommitdiffstats
path: root/src/core/FileMgr.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-22 13:56:28 +0200
committereray orçunus <erayorcunus@gmail.com>2020-07-22 17:51:28 +0200
commit1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e (patch)
tree5578c27b5739341d34def86586a68f1f1129e1bb /src/core/FileMgr.cpp
parentREADME 64-bit preparation (diff)
downloadre3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.gz
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.bz2
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.lz
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.xz
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.tar.zst
re3-1dc6fbda1fbd9a731eb20b3ef71c3dda989e511e.zip
Diffstat (limited to 'src/core/FileMgr.cpp')
-rw-r--r--src/core/FileMgr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/FileMgr.cpp b/src/core/FileMgr.cpp
index 1939c861..8dbc6894 100644
--- a/src/core/FileMgr.cpp
+++ b/src/core/FileMgr.cpp
@@ -163,7 +163,7 @@ myfgets(char *buf, int len, int fd)
return buf;
}
-static int
+static size_t
myfread(void *buf, size_t elt, size_t n, int fd)
{
if(myfiles[fd].isText){
@@ -184,7 +184,7 @@ myfread(void *buf, size_t elt, size_t n, int fd)
return fread(buf, elt, n, myfiles[fd].file);
}
-static int
+static size_t
myfwrite(void *buf, size_t elt, size_t n, int fd)
{
if(myfiles[fd].isText){
@@ -265,11 +265,11 @@ CFileMgr::SetDirMyDocuments(void)
mychdir(_psGetUserFilesFolder());
}
-int
+size_t
CFileMgr::LoadFile(const char *file, uint8 *buf, int unused, const char *mode)
{
int fd;
- int n, len;
+ size_t n, len;
fd = myfopen(file, mode);
if(fd == 0)
@@ -298,13 +298,13 @@ CFileMgr::OpenFileForWriting(const char *file)
return OpenFile(file, "wb");
}
-int
+size_t
CFileMgr::Read(int fd, const char *buf, int len)
{
return myfread((void*)buf, 1, len, fd);
}
-int
+size_t
CFileMgr::Write(int fd, const char *buf, int len)
{
return myfwrite((void*)buf, 1, len, fd);