diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-07-22 13:56:28 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-07-24 19:26:33 +0200 |
commit | 732b7608299b1bbe40d65088498d9b37ab7d9265 (patch) | |
tree | ee2e85916ffadc40bc0564348ac5041196cbf28a /src/core/FileMgr.cpp | |
parent | update librw (diff) | |
download | re3-732b7608299b1bbe40d65088498d9b37ab7d9265.tar re3-732b7608299b1bbe40d65088498d9b37ab7d9265.tar.gz re3-732b7608299b1bbe40d65088498d9b37ab7d9265.tar.bz2 re3-732b7608299b1bbe40d65088498d9b37ab7d9265.tar.lz re3-732b7608299b1bbe40d65088498d9b37ab7d9265.tar.xz re3-732b7608299b1bbe40d65088498d9b37ab7d9265.tar.zst re3-732b7608299b1bbe40d65088498d9b37ab7d9265.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/FileMgr.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/FileMgr.cpp b/src/core/FileMgr.cpp index 1939c861..cdcb80f0 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,14 +298,14 @@ CFileMgr::OpenFileForWriting(const char *file) return OpenFile(file, "wb"); } -int -CFileMgr::Read(int fd, const char *buf, int len) +size_t +CFileMgr::Read(int fd, const char *buf, size_t len) { return myfread((void*)buf, 1, len, fd); } -int -CFileMgr::Write(int fd, const char *buf, int len) +size_t +CFileMgr::Write(int fd, const char *buf, size_t len) { return myfwrite((void*)buf, 1, len, fd); } |