ref: a934b69f22bac8b05846eff94bd61b6d25b767b9
parent: 663f9f92a5eb6736569a915c29231773659766ae
author: Turo Lamminen <turotl@gmail.com>
date: Sat Jul 21 12:39:09 EDT 2018
wad: Make OpenFile parameter const
--- a/src/w_file.h
+++ b/src/w_file.h
@@ -28,7 +28,7 @@
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);
--- a/src/w_file_posix.c
+++ b/src/w_file_posix.c
@@ -74,7 +74,7 @@
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;
--- a/src/w_file_stdc.c
+++ b/src/w_file_stdc.c
@@ -30,7 +30,7 @@
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;
--- a/src/w_file_win32.c
+++ b/src/w_file_win32.c
@@ -86,7 +86,7 @@
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];