qbsp: trivial constification of a few strings/args

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-02-11 20:05:30 +10:30
parent a6280d8bd8
commit cb59bfdc63
7 changed files with 17 additions and 17 deletions

View File

@ -36,7 +36,7 @@
char *
copystring(char *s)
copystring(const char *s)
{
char *b;
@ -73,7 +73,7 @@ I_FloatTime(void)
void
DefaultExtension(char *path, char *extension)
DefaultExtension(char *path, const char *extension)
{
char *src;

View File

@ -31,7 +31,7 @@ LoadFile
==============
*/
size_t
LoadFile(char *filename, void **buf, bool nofail)
LoadFile(const char *filename, void **buf, bool nofail)
{
size_t len;
FILE *f;

View File

@ -24,6 +24,6 @@
#include <stdbool.h>
size_t LoadFile(char *filename, void **buf, bool nofail);
size_t LoadFile(const char *filename, void **buf, bool nofail);
#endif

View File

@ -55,7 +55,7 @@ vec3_t vec3_origin = { 0, 0, 0 };
// util.c
FILE *logfile;
char *rgszWarnings[cWarnings] = {
const char *rgszWarnings[cWarnings] = {
"No wad or _wad key exists in the worldmodel",
"No valid WAD filenames in worldmodel",
"Multiple info_player_start entities",
@ -85,7 +85,7 @@ char *rgszWarnings[cWarnings] = {
"line %d: Face with degenerate QuArK-style texture axes",
};
char *rgszErrors[cErrors] = {
const char *rgszErrors[cErrors] = {
"No leak node in WriteLeakNode",
"Unknown option '%s'",
"line %d: Entity key or value too long",

View File

@ -627,7 +627,7 @@ PrintEntity(int iEntity)
const char *
ValueForKey(int iEntity, char *key)
ValueForKey(int iEntity, const char *key)
{
epair_t *ep;
@ -640,7 +640,7 @@ ValueForKey(int iEntity, char *key)
void
SetKeyValue(int iEntity, char *key, char *value)
SetKeyValue(int iEntity, const char *key, const char *value)
{
epair_t *ep;
@ -659,7 +659,7 @@ SetKeyValue(int iEntity, char *key, char *value)
void
GetVectorForKey(int iEntity, char *szKey, vec3_t vec)
GetVectorForKey(int iEntity, const char *szKey, vec3_t vec)
{
const char *value;
double v1, v2, v3;

View File

@ -174,12 +174,12 @@ typedef unsigned char byte;
double I_FloatTime(void);
void DefaultExtension(char *path, char *extension);
void DefaultExtension(char *path, const char *extension);
void StripExtension(char *path);
void StripFilename(char *path);
int IsAbsolutePath(const char *path);
char *copystring(char *s);
char *copystring(const char *s);
//===== mathlib.h
@ -634,9 +634,9 @@ void LoadMapFile(void);
int FindMiptex(char *name);
void PrintEntity(int iEntity);
const char *ValueForKey(int iEntity, char *key);
void SetKeyValue(int iEntity, char *key, char *value);
void GetVectorForKey(int iEntity, char *szKey, vec3_t vec);
const char *ValueForKey(int iEntity, const char *key);
void SetKeyValue(int iEntity, const char *key, const char *value);
void GetVectorForKey(int iEntity, const char *szKey, vec3_t vec);
void WriteEntitiesToString(void);
@ -659,8 +659,8 @@ void ExportDrawNodes(mapentity_t *ent, node_t *headnode);
#define msgScreen 6
#define msgPercent 7
extern char *rgszWarnings[cWarnings];
extern char *rgszErrors[cErrors];
extern const char *rgszWarnings[cWarnings];
extern const char *rgszErrors[cErrors];
extern const int rgcMemSize[];
extern void *AllocMem(int Type, int cSize, bool fZero);

View File

@ -137,7 +137,7 @@ PrintMem
void
PrintMem(void)
{
char *rgszMemTypes[] = {
const char *rgszMemTypes[] = {
"BSPEntity", "BSPPlane", "BSPTex", "BSPVertex", "BSPVis", "BSPNode",
"BSPTexinfo", "BSPFace", "BSPLight", "BSPClipnode", "BSPLeaf",
"BSPMarksurface", "BSPEdge", "BSPSurfedge", "BSPModel", "Mapface",