summaryrefslogtreecommitdiff
path: root/src/win95
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2020-04-22 02:36:36 +0200
committerTimotej Lazar <timotej.lazar@araneo.si>2020-05-30 02:32:30 +0200
commitc4409487fdb2822309b9d8cf79bcd7d3895b8390 (patch)
treea1ee3d42957601787121e8784dc7f8088b70a9ce /src/win95
parent8ddbab1cc2ea2f1728db5e584a7dd16a9b9df6b1 (diff)
Const correct (most) strings
At least those cases that are reported by gcc and/or clang.
Diffstat (limited to 'src/win95')
-rw-r--r--src/win95/chunk.cpp2
-rw-r--r--src/win95/enumchnk.cpp2
-rw-r--r--src/win95/enumchnk.hpp2
-rw-r--r--src/win95/envchunk.cpp2
-rw-r--r--src/win95/envchunk.hpp2
-rw-r--r--src/win95/gsprchnk.cpp2
-rw-r--r--src/win95/gsprchnk.hpp2
-rw-r--r--src/win95/mishchnk.cpp2
-rw-r--r--src/win95/mishchnk.hpp4
-rw-r--r--src/win95/obchunk.cpp2
-rw-r--r--src/win95/obchunk.hpp2
-rw-r--r--src/win95/shpchunk.cpp2
-rw-r--r--src/win95/shpchunk.hpp2
-rw-r--r--src/win95/videomodes.cpp6
14 files changed, 17 insertions, 17 deletions
diff --git a/src/win95/chunk.cpp b/src/win95/chunk.cpp
index b2914c4..122c4aa 100644
--- a/src/win95/chunk.cpp
+++ b/src/win95/chunk.cpp
@@ -8,7 +8,7 @@
#define twprintf printf
-char * users_name = "Player";
+const char * users_name = "Player";
#include "hash_tem.hpp"
Chunk * Parent_File;
diff --git a/src/win95/enumchnk.cpp b/src/win95/enumchnk.cpp
index c030e4a..a3400a4 100644
--- a/src/win95/enumchnk.cpp
+++ b/src/win95/enumchnk.cpp
@@ -48,7 +48,7 @@ const char * Enum_Chunk::get_head_id()
}
-void Enum_Chunk::set_lock_user (char * user)
+void Enum_Chunk::set_lock_user (const char * user)
{
Enum_Header_Chunk * hdptr = get_header();
diff --git a/src/win95/enumchnk.hpp b/src/win95/enumchnk.hpp
index 8b65a05..fc05268 100644
--- a/src/win95/enumchnk.hpp
+++ b/src/win95/enumchnk.hpp
@@ -22,7 +22,7 @@ public:
BOOL file_equals (HANDLE &);
const char * get_head_id();
- void set_lock_user(char *);
+ void set_lock_user(const char *);
void post_input_processing();
diff --git a/src/win95/envchunk.cpp b/src/win95/envchunk.cpp
index 04cc292..b3cf89d 100644
--- a/src/win95/envchunk.cpp
+++ b/src/win95/envchunk.cpp
@@ -69,7 +69,7 @@ const char * Environment_Data_Chunk::get_head_id()
}
-void Environment_Data_Chunk::set_lock_user (char * user)
+void Environment_Data_Chunk::set_lock_user (const char * user)
{
Environment_Data_Header_Chunk * hdptr = get_header();
diff --git a/src/win95/envchunk.hpp b/src/win95/envchunk.hpp
index 445a700..6a5a134 100644
--- a/src/win95/envchunk.hpp
+++ b/src/win95/envchunk.hpp
@@ -23,7 +23,7 @@ public:
BOOL file_equals (HANDLE &);
const char * get_head_id();
- void set_lock_user(char *);
+ void set_lock_user(const char *);
void post_input_processing();
diff --git a/src/win95/gsprchnk.cpp b/src/win95/gsprchnk.cpp
index f89987d..f83a379 100644
--- a/src/win95/gsprchnk.cpp
+++ b/src/win95/gsprchnk.cpp
@@ -47,7 +47,7 @@ const char * AllSprites_Chunk::get_head_id()
}
-void AllSprites_Chunk::set_lock_user (char * user)
+void AllSprites_Chunk::set_lock_user (const char * user)
{
AllSprites_Header_Chunk * hdptr = get_header();
diff --git a/src/win95/gsprchnk.hpp b/src/win95/gsprchnk.hpp
index a1ca067..f467e05 100644
--- a/src/win95/gsprchnk.hpp
+++ b/src/win95/gsprchnk.hpp
@@ -21,7 +21,7 @@ public:
BOOL file_equals (HANDLE &);
const char * get_head_id();
- void set_lock_user(char *);
+ void set_lock_user(const char *);
void post_input_processing();
diff --git a/src/win95/mishchnk.cpp b/src/win95/mishchnk.cpp
index c170364..b4521c3 100644
--- a/src/win95/mishchnk.cpp
+++ b/src/win95/mishchnk.cpp
@@ -12,7 +12,7 @@
// Class Lockable_Chunk_With_Children functions
-extern char * users_name;
+extern const char * users_name;
//macro for helping to force inclusion of chunks when using libraries
FORCE_CHUNK_INCLUDE_IMPLEMENT(mishchnk)
diff --git a/src/win95/mishchnk.hpp b/src/win95/mishchnk.hpp
index 438f99b..78d153a 100644
--- a/src/win95/mishchnk.hpp
+++ b/src/win95/mishchnk.hpp
@@ -12,7 +12,7 @@
#define twprintf printf
-extern char * users_name;
+extern const char * users_name;
class File_Chunk;
@@ -38,7 +38,7 @@ public:
// to see if the current chunk is the same one
virtual const char * get_head_id() = 0;
- virtual void set_lock_user(char *) = 0;
+ virtual void set_lock_user(const char *) = 0;
// this function will lock the chunk if it can -
// will return true on success or if the chunk has
diff --git a/src/win95/obchunk.cpp b/src/win95/obchunk.cpp
index 2222370..c16f45f 100644
--- a/src/win95/obchunk.cpp
+++ b/src/win95/obchunk.cpp
@@ -175,7 +175,7 @@ const char * Object_Chunk::get_head_id()
return(hdptr->identifier);
}
-void Object_Chunk::set_lock_user (char * user)
+void Object_Chunk::set_lock_user (const char * user)
{
Object_Header_Chunk * hdptr = get_header();
diff --git a/src/win95/obchunk.hpp b/src/win95/obchunk.hpp
index 29233f8..84ddf6c 100644
--- a/src/win95/obchunk.hpp
+++ b/src/win95/obchunk.hpp
@@ -81,7 +81,7 @@ public:
BOOL file_equals (HANDLE &);
const char * get_head_id();
- void set_lock_user(char *);
+ void set_lock_user(const char *);
virtual void post_input_processing();
diff --git a/src/win95/shpchunk.cpp b/src/win95/shpchunk.cpp
index 341e5e7..26058af 100644
--- a/src/win95/shpchunk.cpp
+++ b/src/win95/shpchunk.cpp
@@ -353,7 +353,7 @@ const char * Shape_Chunk::get_head_id()
return(hdptr->identifier);
}
-void Shape_Chunk::set_lock_user (char * user)
+void Shape_Chunk::set_lock_user (const char * user)
{
Shape_Header_Chunk * hdptr = get_header();
diff --git a/src/win95/shpchunk.hpp b/src/win95/shpchunk.hpp
index 1aabd20..82ff779 100644
--- a/src/win95/shpchunk.hpp
+++ b/src/win95/shpchunk.hpp
@@ -101,7 +101,7 @@ public:
BOOL file_equals (HANDLE &);
const char * get_head_id();
- void set_lock_user(char *);
+ void set_lock_user(const char *);
virtual void post_input_processing();
diff --git a/src/win95/videomodes.cpp b/src/win95/videomodes.cpp
index a91af42..6c8c6e4 100644
--- a/src/win95/videomodes.cpp
+++ b/src/win95/videomodes.cpp
@@ -213,14 +213,14 @@ int EnumerateCardsAndVideoModes(void)
}
char buffer[32];
-extern char *GetVideoModeDescription2(void)
+extern const char *GetVideoModeDescription2(void)
{
strncpy(buffer, DeviceDescriptions[CurrentlySelectedDevice].DeviceInfo.szDescription,24);
buffer[24] = 0;
return buffer;
}
-extern char *GetVideoModeDescription3(void)
+extern const char *GetVideoModeDescription3(void)
{
DEVICEANDVIDEOMODESDESC *dPtr = &DeviceDescriptions[CurrentlySelectedDevice];
VIDEOMODEDESC *vmPtr = &(dPtr->VideoModes[CurrentlySelectedVideoMode]);
@@ -384,4 +384,4 @@ extern void LoadDeviceAndVideoModePreferences(void)
GetDeviceAndVideoModePrefences();
}
-}; \ No newline at end of file
+};