commit a934b69f22bac8b05846eff94bd61b6d25b767b9
Author: Turo Lamminen <turotl@gmail.com>
AuthorDate: Sat Jul 21 16:39:09 2018 +0300
Commit: Turo Lamminen <turotl@gmail.com>
CommitDate: Sat Jul 21 16:56:35 2018 +0300
wad: Make OpenFile parameter const
---
src/w_file.h | 2 +-
src/w_file_posix.c | 2 +-
src/w_file_stdc.c | 2 +-
src/w_file_win32.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/w_file.h b/src/w_file.h
index a47d2a7a..786b79bb 100644
--- a/src/w_file.h
+++ b/src/w_file.h
@@ -28,7 +28,7 @@ typedef struct _wad_file_s wad_file_t;
typedef struct
{
// Open a file for reading.
- wad_file_t *(*OpenFile)(char *path);
+ wad_file_t *(*OpenFile)(const char *path);
// Close the specified file.
void (*CloseFile)(wad_file_t *file);
diff --git a/src/w_file_posix.c b/src/w_file_posix.c
index d4894957..9f74b5df 100644
--- a/src/w_file_posix.c
+++ b/src/w_file_posix.c
@@ -74,7 +74,7 @@ unsigned int GetFileLength(int handle)
return lseek(handle, 0, SEEK_END);
}
-static wad_file_t *W_POSIX_OpenFile(char *path)
+static wad_file_t *W_POSIX_OpenFile(const char *path)
{
posix_wad_file_t *result;
int handle;
diff --git a/src/w_file_stdc.c b/src/w_file_stdc.c
index c41692fd..59a394da 100644
--- a/src/w_file_stdc.c
+++ b/src/w_file_stdc.c
@@ -30,7 +30,7 @@ typedef struct
extern wad_file_class_t stdc_wad_file;
-static wad_file_t *W_StdC_OpenFile(char *path)
+static wad_file_t *W_StdC_OpenFile(const char *path)
{
stdc_wad_file_t *result;
FILE *fstream;
diff --git a/src/w_file_win32.c b/src/w_file_win32.c
index a370fb01..cc5d8cb4 100644
--- a/src/w_file_win32.c
+++ b/src/w_file_win32.c
@@ -86,7 +86,7 @@ unsigned int GetFileLength(HANDLE handle)
return result;
}
-static wad_file_t *W_Win32_OpenFile(char *path)
+static wad_file_t *W_Win32_OpenFile(const char *path)
{
win32_wad_file_t *result;
wchar_t wpath[MAX_PATH + 1];