* applied patch by StefanV (from mailinglist) that fixes an error in config.py (broke compilation) and some string conversion warnings

* fixes some more string conversions warnings in bobtoolz
* fixed unresolved symbols in bobtoolz and gtkgensurf (due to the above mentioned patch where the prototypes were not updated)


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@320 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
mattn 2008-09-06 08:35:17 +00:00
parent cc4e44e31a
commit 204566e81e
17 changed files with 167 additions and 168 deletions

View file

@ -93,9 +93,9 @@ void DoBkgrndToggleYZ();
#define NUM_TOOLBAR_BUTTONS 4
struct toolbar_button_info_s
{
char *image;
char *text;
char *tip;
const char *image;
const char *text;
const char *tip;
void (*func)();
IToolbarButton::EType type;
};

View file

@ -42,7 +42,7 @@ DEPair::~DEPair()
// Implementation
//////////////////////////////////////////////////////////////////////
void DEPair::Build(char *pKey, char *pValue)
void DEPair::Build(const char *pKey, const char *pValue)
{
key = pKey;
value = pValue;

View file

@ -34,7 +34,7 @@ public:
DEPair();
virtual ~DEPair();
void Build(char* pKey, char* pValue);
void Build(const char* pKey, const char* pValue);
Str key;
Str value;

View file

@ -520,7 +520,7 @@ void DEntity::ClearEPairs()
epairList.clear();
}
void DEntity::AddEPair(char *key, char *value) {
void DEntity::AddEPair(const char *key, const char *value) {
DEPair* newEPair;
newEPair = FindEPairByKey( key );
if(!newEPair) {

View file

@ -47,7 +47,7 @@ public:
// epair functions........
void LoadEPairList(epair_t* epl);
void AddEPair(char* key, char* value);
void AddEPair(const char* key, const char* value);
void ClearEPairs();
DEPair* FindEPairByKey(const char* keyname);
// ---------------------------------------------

View file

@ -40,7 +40,7 @@ DMap::~DMap()
ClearEntities();
}
DEntity* DMap::AddEntity(char *classname, int ID)
DEntity* DMap::AddEntity(const char *classname, int ID)
{
DEntity* newEntity;
if(ID == -1)

View file

@ -43,7 +43,7 @@ public:
void ClearEntities();
DEntity* DMap::GetEntityForID(int ID);
DEntity* AddEntity(char* classname = "worldspawn", int ID = -1);
DEntity* AddEntity(const char* classname = "worldspawn", int ID = -1);
list<DEntity*> entityList;

View file

@ -36,10 +36,10 @@ _QERUITable g_MessageTable; // for path plotting (listening for update)
_QEREntityTable g_EntityTable;
// plugin name
char* PLUGIN_NAME = "bobToolz";
const char* PLUGIN_NAME = "bobToolz";
// commands in the menu
static char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Turn edge";
static const char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Turn edge";
// globals
GtkWidget *g_pRadiantWnd = NULL;

View file

@ -161,7 +161,7 @@ bool ValidateTextFloatRange(const char* pData, float min, float max, char* error
return FALSE;
}
bool ValidateTextIntRange(const char* pData, int min, int max, char* error_title, int* value)
bool ValidateTextIntRange(const char* pData, int min, int max, const char* error_title, int* value)
{
char error_buffer[256];
sprintf(error_buffer, "Please Enter An Integer Between %i and %i", min, max);

View file

@ -117,7 +117,7 @@ void SetInitialStairPos(int dir, vec3_t min, vec3_t max, float width)
}
}
char* TranslateString (char *buf)
char* TranslateString (const char *buf)
{
static char buf2[32768];
int i, l;
@ -140,7 +140,7 @@ char* TranslateString (char *buf)
return buf2;
}
void Sys_ERROR (char* text, ...)
void Sys_ERROR (const char* text, ...)
{
va_list argptr;
char buf[32768];
@ -191,7 +191,7 @@ const char* ExtractFilename(const char* path)
return ++p;
}
extern char* PLUGIN_NAME;
extern const char* PLUGIN_NAME;
/*char* GetGameFilename(char* buffer, const char* filename)
{
strcpy(buffer, g_FuncTable.m_pfnGetGamePath());

View file

@ -26,7 +26,7 @@ const char* GetCurrentTexture();
void FillDefaultTexture(_QERFaceData* faceData, vec3_t va, vec3_t vb, vec3_t vc, const char* texture);
void Sys_ERROR (char* text, ...);
void Sys_ERROR (const char* text, ...);
void BuildMiniPrt(list<Str>* exclusionList);

View file

@ -47,7 +47,7 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri)
int Bisect(NODE *, int, int, int);
void CalcAngles(NODE *, int *, float *);
void EdgeOnSide(int *, int *, int *);
int tricall(int, NODE *, int *, TRI **, TRI **, char *);
int tricall(int, NODE *, int *, TRI **, TRI **, const char *);
int CheckBorders(int *,int,NODE *,int *,TRI **);
float biggesterror;
@ -323,9 +323,8 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri)
/* tricall Takes an array of nodes, spits out an array of triangles */
/* */
/*****************************************************************************/
int tricall(int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, LPSTR Options)
int tricall(int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, const char *Options)
{
struct triangulateio in, out;
int i, N;
int NumUsedNodes;

View file

@ -176,7 +176,7 @@ void texfont_init ()
int i, j, x, y;
float inv = 1.0f/128;
char *charlines[16] = {
const char *charlines[16] = {
"abcdefghijklmn", "opqrstuvwxyz0", "123456789ABC", "DEFGHIJKLMN",
"OPQRSTUVWX", "YZ,.!;:<>/?{}@$%", "&*()-+=_[] #" };
unsigned char lefts[7][17] = {

View file

@ -1393,10 +1393,10 @@ GtkWidget* create_main_dialog ()
GtkObject *adj;
GSList *group;
int i;
char *games[] = { "Quake 2", "Half-Life", "SiN", "Heretic 2", "Kingpin", "Genesis3D", "Quake 3 Arena" };
char *waveforms[] = { "Alternating hill/valley", "Cylindrical left-to-right", "Cylindrical top-to-bottom",
const char *games[] = { "Quake 2", "Half-Life", "SiN", "Heretic 2", "Kingpin", "Genesis3D", "Quake 3 Arena" };
const char *waveforms[] = { "Alternating hill/valley", "Cylindrical left-to-right", "Cylindrical top-to-bottom",
"From bitmap", "Fractal" };
char *orientations[] = { "Ground surface", "Ceiling", "Wall facing 0", "Wall facing 90",
const char *orientations[] = { "Ground surface", "Ceiling", "Wall facing 0", "Wall facing 90",
"Wall facing 180","Wall facing 270" };
g_pWnd = dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);

View file

@ -321,7 +321,7 @@ varargs versions of all text functions.
FIXME: make this buffer size safe someday
============
*/
char *va (char *format, ...)
char *va (const char *format, ...)
{
va_list argptr;
static char string[1024];

View file

@ -1484,7 +1484,7 @@ void* WINAPI QERApp_GetEntityHandle(int nIndex)
return static_cast<void*>(pe);
}
epair_t* WINAPI QERApp_AllocateEpair( char *key, char *val )
epair_t* WINAPI QERApp_AllocateEpair( const char *key, const char *val )
{
epair_t *e = (epair_t*)qmalloc (sizeof(*e));
e->key = (char*)qmalloc(strlen(key)+1);