]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
* applied patch by StefanV (from mailinglist) that fixes an error in config.py (broke...
authormattn <mattn@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Sat, 6 Sep 2008 08:35:17 +0000 (08:35 +0000)
committermattn <mattn@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Sat, 6 Sep 2008 08:35:17 +0000 (08:35 +0000)
* 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: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@320 8a3a26a2-13c4-0310-b231-cf6edde360e5

17 files changed:
config.py
contrib/bkgrnd2d/plugin.cpp
contrib/bobtoolz/DEPair.cpp
contrib/bobtoolz/DEPair.h
contrib/bobtoolz/DEntity.cpp
contrib/bobtoolz/DEntity.h
contrib/bobtoolz/DMap.cpp
contrib/bobtoolz/DMap.h
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
contrib/bobtoolz/misc.cpp
contrib/bobtoolz/misc.h
contrib/gtkgensurf/dec.cpp
contrib/gtkgensurf/font.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/gtkgensurf/gensurf.cpp
radiant/pluginmanager.cpp

index d3ff368fcfb735414a01013cea90524a7dc845dd..b8c4856bc59837b709e5e0565617e063b49dd96c 100644 (file)
--- a/config.py
+++ b/config.py
@@ -267,9 +267,9 @@ class Config:
                                self.CheckoutOrUpdate( svnurl, os.path.join( path, 'installs', pak ) )
 
        def Setup( self ):
-                       if ( platform == 'local' ):
-                               # special case, fetch external paks under the local install directory
-                               self.FetchGamePaks( self.install_directory )
+               if ( platform == 'local' ):
+                       # special case, fetch external paks under the local install directory
+                       self.FetchGamePaks( self.install_directory )
                # NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them
                if ( self.platform == 'Windows' ):
                        depsfile = 'GtkR-deps-1.6-3.zip'
@@ -292,7 +292,7 @@ class Config:
                                if ( ret != 0 ):
                                        raise Exception( 'unzip dependencies file failed' )
                                os.chdir( backup_cwd )
-                               
+
                                # copy all the dependent runtime data to the install directory
                                srcdir = os.path.dirname( backup_cwd )
                                for f in [
index 3e43a745c9b62779ffa11c9a17c6b8e8383a6a87..3b5cc9757979fd7a48533413e9cf27591522fb72 100644 (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;
 };
index 9d5da9d166b4c7fe288e14431658589798bf8f40..9ef8dc3d8e01a71e07de356a2480e1424b9a1019 100644 (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;
index 11f7904551a418fd0ea13c6f60f53a3d0acb45fe..41f86e48591e24d836754850ca3be23d861a5250 100644 (file)
@@ -28,13 +28,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #pragma once
 #endif // _MSC_VER > 1000
 
-class DEPair  
+class DEPair
 {
 public:
        DEPair();
        virtual ~DEPair();
 
-       void Build(char* pKey, char* pValue);
+       void Build(const char* pKey, const char* pValue);
 
        Str     key;
        Str     value;
index 3719d20e7d07f8c1613890519be115458eb83aee..a0c44a894b31b2f5994560ac0ea7bbacb0d16e5c 100644 (file)
@@ -135,7 +135,7 @@ bool DEntity::LoadFromPrt(char *filename)
 
        ClearBrushes();
        ClearEPairs();
-       
+
   bool build = false;
        for(unsigned int i = 0; i < portals.node_count; i++)
        {
@@ -144,7 +144,7 @@ bool DEntity::LoadFromPrt(char *filename)
 
                for(unsigned int j = 0; j < portals.node[i].portal_count; j++)
                {
-      for(unsigned int k = 0; k < portals.node[i].portal[j].point_count-2; k++) 
+      for(unsigned int k = 0; k < portals.node[i].portal[j].point_count-2; k++)
       {
              vec3_t v1, v2, normal, n;
              VectorSubtract(portals.node[i].portal[j].point[k+2].p, portals.node[i].portal[j].point[k+1].p, v1);
@@ -152,7 +152,7 @@ bool DEntity::LoadFromPrt(char *filename)
              CrossProduct(v1, v2, n);
         VectorNormalize(n, v2);
 
-        if(k == 0) 
+        if(k == 0)
         {
           VectorCopy(v2, normal);
         }
@@ -520,8 +520,8 @@ void DEntity::ClearEPairs()
        epairList.clear();
 }
 
-void DEntity::AddEPair(char *key, char *value) {       
-       DEPair* newEPair; 
+void DEntity::AddEPair(const char *key, const char *value) {
+       DEPair* newEPair;
        newEPair = FindEPairByKey( key );
        if(!newEPair) {
                newEPair = new DEPair;
@@ -539,14 +539,14 @@ void DEntity::LoadEPairList(epair_t *epl)
        {
                if(!strcmp(ep->key, "classname"))
                        SetClassname(ep->value);
-               else    
+               else
                        AddEPair(ep->key, ep->value);
 
                ep = ep->next;
        }
 }
 
-bool DEntity::ResetTextures(const char* textureName, float fScale[2],     float fShift[2],    int rotation, const char* newTextureName, 
+bool DEntity::ResetTextures(const char* textureName, float fScale[2],     float fShift[2],    int rotation, const char* newTextureName,
                             int bResetTextureName,    int bResetScale[2], int bResetShift[2], int bResetRotation, bool rebuild)
 {
        g_FuncTable.m_pfnDeselectAllBrushes();
@@ -557,7 +557,7 @@ bool DEntity::ResetTextures(const char* textureName, float fScale[2],     float
 
        for(list<DBrush *>::const_iterator resetBrush=brushList.begin(); resetBrush!=brushList.end(); resetBrush++)
        {
-               bool tmp = (*resetBrush)->ResetTextures(textureName,        fScale,       fShift,       rotation, newTextureName, 
+               bool tmp = (*resetBrush)->ResetTextures(textureName,        fScale,       fShift,       rotation, newTextureName,
                                             bResetTextureName,  bResetScale,  bResetShift,  bResetRotation);
 
                if(tmp)
@@ -566,7 +566,7 @@ bool DEntity::ResetTextures(const char* textureName, float fScale[2],     float
 
                        if(rebuild)
                        {
-        entity_t *pE = (*resetBrush)->QER_brush->owner;       
+        entity_t *pE = (*resetBrush)->QER_brush->owner;
                                g_FuncTable.m_pfnDeleteBrushHandle((*resetBrush)->QER_brush);
         (*resetBrush)->BuildInRadiant(FALSE, NULL, pE->entityId == 0 ? NULL : pE);
 
@@ -589,7 +589,7 @@ bool DEntity::ResetTextures(const char* textureName, float fScale[2],     float
 
                          if(rebuild)
                          {
-          entity_t *pE = (*resetPatch)->QER_brush->owner;       
+          entity_t *pE = (*resetPatch)->QER_brush->owner;
                                  g_FuncTable.m_pfnDeleteBrushHandle((*resetPatch)->QER_brush);
           (*resetPatch)->BuildInRadiant(pE->entityId == 0 ? NULL : pE);
                          }
index 63837c84c99ee812646f2ec70f331d30209a5156..732703f0f61dbc2ef20f5a71ba9ea9579ee1910f 100644 (file)
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #pragma once
 #endif // _MSC_VER > 1000
 
-class DEntity  
+class DEntity
 {
 public:
        void RemoveFromRadiant();
@@ -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);
 //     ---------------------------------------------
@@ -73,7 +73,7 @@ public:
        bool* BuildDuplicateList();
        bool* BuildIntersectList();
 //     ---------------------------------------------
-       
+
 
 //     brush operations
        void ClearBrushes();    // clears brush list and frees memory for brushes
index bc0b0661023ddae470f9b61afdcd16dbf05a241b..0bbaafb8dc7911146dd387814c06dc8163d8e8d3 100644 (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)
@@ -49,7 +49,7 @@ DEntity* DMap::AddEntity(char *classname, int ID)
                newEntity = new DEntity(classname, ID);
 
        entityList.push_back(newEntity);
-       
+
        return newEntity;
 }
 
@@ -131,7 +131,7 @@ int DMap::FixBrushes(bool rebuild)
                else
                {
                        cnt = (*fixEntity)->FixBrushes(FALSE);
-                       
+
                        if(cnt && rebuild)
                                RebuildEntity(*fixEntity);
                }
@@ -142,21 +142,21 @@ int DMap::FixBrushes(bool rebuild)
        return count;
 }
 
-void DMap::ResetTextures( const char* textureName, float fScale[2],      float fShift[2],      int rotation, const char* newTextureName, 
+void DMap::ResetTextures( const char* textureName, float fScale[2],      float fShift[2],      int rotation, const char* newTextureName,
                           int bResetTextureName,  int bResetScale[2],  int bResetShift[2],  int bResetRotation)
 {
        for(list<DEntity *>::const_iterator texEntity=entityList.begin(); texEntity!=entityList.end(); texEntity++)
        {
                if(!stricmp("worldspawn", (*texEntity)->m_Classname))
-                       (*texEntity)->ResetTextures(textureName,        fScale,       fShift,       rotation, newTextureName, 
+                       (*texEntity)->ResetTextures(textureName,        fScale,       fShift,       rotation, newTextureName,
                                   bResetTextureName,  bResetScale,  bResetShift,  bResetRotation, TRUE);
                else
                {
-                       if((*texEntity)->ResetTextures( textureName,        fScale,       fShift,       rotation, newTextureName, 
+                       if((*texEntity)->ResetTextures( textureName,        fScale,       fShift,       rotation, newTextureName,
                                       bResetTextureName,  bResetScale,  bResetShift,  bResetRotation, FALSE))
                                RebuildEntity(*texEntity);
                }
-       }       
+       }
 }
 
 void DMap::RebuildEntity(DEntity *ent)
index 2d5721141c52e91896d2ffce9a4e4d401d838bc2..b63cafd6c9053f42cd405895dd605c13c5fa0423 100644 (file)
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #pragma once
 #endif // _MSC_VER > 1000
 
-class DMap  
+class DMap
 {
 public:
        static void RebuildEntity(DEntity* ent);
@@ -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;
 
index e0db8f36139b363e9e32183c37c55b7013d8ea97..d824df5402b7d040dcb33a64d15ac7d681001309 100644 (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;
@@ -108,14 +108,14 @@ GtkWidget* new_pixmap (char* filename) {
        GdkBitmap *mask;
        GtkWidget *pixmap;
 
-       g_FuncTable.m_pfnLoadBitmap(filename, (void **)&gdkpixmap, (void **)&mask);     
+       g_FuncTable.m_pfnLoadBitmap(filename, (void **)&gdkpixmap, (void **)&mask);
        pixmap = gtk_pixmap_new (gdkpixmap, mask);
 
        gdk_pixmap_unref (gdkpixmap);
        gdk_pixmap_unref (mask);
 
        return pixmap;
-} 
+}
 
 class CBobtoolzToolbarButton : public IToolbarButton
 {
@@ -140,7 +140,7 @@ public:
     switch( mIndex ) {
       case 3: return eToggleButton;
       default: return eButton;
-    }    
+    }
   }
   virtual const char* getText() const
   {
@@ -210,7 +210,7 @@ public:
   // CSynapseClient API
   bool RequestAPI(APIDescriptor_t *pAPI);
   const char* GetInfo();
-  
+
   CSynapseClientBobtoolz() { }
   virtual ~CSynapseClientBobtoolz() { }
 };
@@ -234,7 +234,7 @@ extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const
   g_pSynapseServer = pServer;
   g_pSynapseServer->IncRef();
   Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf());
-    
+
   g_SynapseClient.AddAPI(TOOLBAR_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPlugToolbarTable));
   g_SynapseClient.AddAPI(PLUGIN_MAJOR, BOBTOOLZ_MINOR, sizeof(_QERPluginTable));
 
index 385200037d827cc2ccbfcd6fa42d250f94feb5cb..83b656f2b03eac5b84d2d08f0351934374394eac 100644 (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);
index 9786661a7a8d6725978a39e95aa995a578865607..a0490b46ff65addb886496fa4a42841b2274be1c 100644 (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());
index 7ccb4599c33ffc6a30f9795144a80b818752ead4..fb1fe8b9590c2ecb896607eeaa8e2b531a20987d 100644 (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);
 
index f2daa816536652b82e6fa0c753aff87bef572a62..e651d7418ec461d8ac7227b9d13c0e44327e7a11 100644 (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;
@@ -195,7 +195,7 @@ void MakeDecimatedMap(int *NumNodes, int *NumTris, NODE **pNode, TRI **pTri)
                        Tri = *pTri;
                        // Sliver-check along borders. Since borders are often linear, the errors
                        // along borders will often be zero, so no new points will be added. This
-                       // tends to produce long, thin brushes. For all border triangles, check 
+                       // tends to produce long, thin brushes. For all border triangles, check
                        // that minimum angle isn't less than SLIVER_ANGLE. If it is, add another
                        // vertex.
                        while(CheckBorders(&NumNodesUsed,NumNodes[0],Node,NumTris,pTri) > 0)
@@ -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;
@@ -426,18 +425,18 @@ int tricall(int NumNodes, NODE *Node, int *NumTris, TRI **inTri, TRI **Tri, LPST
 
        /* Make necessary initializations */
        out.pointlist          = (REAL *) NULL;  /* Not needed if -N switch used. */
-       out.pointattributelist = (REAL *) NULL;  /* Not needed if -N switch used or 
+       out.pointattributelist = (REAL *) NULL;  /* Not needed if -N switch used or
                                                    number of point attributes is zero: */
        out.pointmarkerlist    = (int *) NULL;   /* Not needed if -N or -B switch used. */
        out.trianglelist       = (int *) NULL;   /* Not needed if -E switch used. */
-       out.triangleattributelist = (REAL *) NULL;   /* Not needed if -E switch used or 
-                                                       number of triangle attributes is 
+       out.triangleattributelist = (REAL *) NULL;   /* Not needed if -E switch used or
+                                                       number of triangle attributes is
                                                     zero: */
        out.trianglearealist   = (REAL *) NULL;
        out.neighborlist       = (int *) NULL;   /* Needed only if -n switch used. */
-       out.segmentlist        = (int *) NULL;   /* Needed only if segments are output 
+       out.segmentlist        = (int *) NULL;   /* Needed only if segments are output
                                                    (-p or -c) and -P not used: */
-       out.segmentmarkerlist  = (int *) NULL;   /* Needed only if segments are output 
+       out.segmentmarkerlist  = (int *) NULL;   /* Needed only if segments are output
                                                    (-p or -c) and -P and -B not used: */
        out.edgelist           = (int *) NULL;   /* Needed only if -e switch used. */
        out.edgemarkerlist     = (int *) NULL;   /* Needed if -e used and -B not used. */
@@ -715,7 +714,7 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
                if(UseDetail) contents += CONTENTS_DETAIL;
                if(UseLadder) contents += CONTENTS_LADDER;
        }
-       
+
        OpenFuncGroup();
        for(i=0; i<NumTris; i++)
        {
@@ -725,11 +724,11 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
                brush.face[0].v[0][0] = Node[Tri[i].v[0]].p[0];
                brush.face[0].v[0][1] = Node[Tri[i].v[0]].p[1];
                brush.face[0].v[0][2] = Node[Tri[i].v[0]].p[2];
-               
+
                brush.face[0].v[1][0] = Node[Tri[i].v[2]].p[0];
                brush.face[0].v[1][1] = Node[Tri[i].v[2]].p[1];
                brush.face[0].v[1][2] = Node[Tri[i].v[2]].p[2];
-               
+
                brush.face[0].v[2][0] = Node[Tri[i].v[1]].p[0];
                brush.face[0].v[2][1] = Node[Tri[i].v[1]].p[1];
                brush.face[0].v[2][2] = Node[Tri[i].v[1]].p[2];
@@ -778,50 +777,50 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
                        brush.face[1].v[0][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[1].v[0][1] = (float)backface;
                        brush.face[1].v[0][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[1].v[1][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[1].v[1][1] = (float)backface;
                        brush.face[1].v[1][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[1].v[2][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[1].v[2][1] = (float)backface;
                        brush.face[1].v[2][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        // 0-1 side
                        brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[2].v[2][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[2].v[2][1] = (float)backface;
                        brush.face[2].v[2][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        // 1-2 side
                        brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        brush.face[3].v[2][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[3].v[2][1] = (float)backface;
                        brush.face[3].v[2][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        // 2-0 side
                        brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[4].v[2][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[4].v[2][1] = (float)backface;
                        brush.face[4].v[2][2] = Node[Tri[i].v[0]].p[2];
@@ -832,50 +831,50 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
                        brush.face[1].v[0][0] = (float)backface;
                        brush.face[1].v[0][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[1].v[0][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[1].v[1][0] = (float)backface;
                        brush.face[1].v[1][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[1].v[1][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[1].v[2][0] = (float)backface;
                        brush.face[1].v[2][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[1].v[2][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        // 0-1 side
                        brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[2].v[2][0] = (float)backface;
                        brush.face[2].v[2][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[2].v[2][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        // 1-2 side
                        brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        brush.face[3].v[2][0] = (float)backface;
                        brush.face[3].v[2][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[3].v[2][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        // 2-0 side
                        brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[4].v[2][0] = (float)backface;
                        brush.face[4].v[2][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[4].v[2][2] = Node[Tri[i].v[0]].p[2];
@@ -885,55 +884,55 @@ void MakeBrushes(int NumTris, NODE *Node, TRI *Tri,bool surf,
                        brush.face[1].v[0][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[1].v[0][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[1].v[0][2] = (float)backface;
-                       
+
                        brush.face[1].v[1][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[1].v[1][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[1].v[1][2] = (float)backface;
-                       
+
                        brush.face[1].v[2][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[1].v[2][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[1].v[2][2] = (float)backface;
-                       
+
                        // 0-1 side
                        brush.face[2].v[0][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[2].v[0][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[2].v[0][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[2].v[1][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[2].v[1][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[2].v[1][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[2].v[2][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[2].v[2][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[2].v[2][2] = (float)backface;
-                       
+
                        // 1-2 side
                        brush.face[3].v[0][0] = Node[Tri[i].v[1]].p[0];
                        brush.face[3].v[0][1] = Node[Tri[i].v[1]].p[1];
                        brush.face[3].v[0][2] = Node[Tri[i].v[1]].p[2];
-                       
+
                        brush.face[3].v[1][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[3].v[1][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[3].v[1][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        brush.face[3].v[2][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[3].v[2][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[3].v[2][2] = (float)backface;
-                       
+
                        // 2-0 side
                        brush.face[4].v[0][0] = Node[Tri[i].v[2]].p[0];
                        brush.face[4].v[0][1] = Node[Tri[i].v[2]].p[1];
                        brush.face[4].v[0][2] = Node[Tri[i].v[2]].p[2];
-                       
+
                        brush.face[4].v[1][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[4].v[1][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[4].v[1][2] = Node[Tri[i].v[0]].p[2];
-                       
+
                        brush.face[4].v[2][0] = Node[Tri[i].v[0]].p[0];
                        brush.face[4].v[2][1] = Node[Tri[i].v[0]].p[1];
                        brush.face[4].v[2][2] = (float)backface;
                }
-               
+
                for(j=0; j<5; j++)
                {
                        strcpy(brush.face[j].texture,
@@ -1052,10 +1051,10 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
                default:
                        front  = MoreThan(zmax,32.);
                }
-               
+
                for(i=0; i<NumTris; i++)
                        Tri[i].flag = 0;
-               
+
                switch(Plane)
                {
                case PLANE_XZ0:
@@ -1075,7 +1074,7 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
                        j1 = 0;
                        j2 = 1;
                }
-               
+
                brush.Number = 0;
                brush.NumFaces = 6;
                MaxHints = NH*NV-1;
@@ -1131,41 +1130,41 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
                                                        brush.face[0].v[0][0] = Node[q[2]].p[0];
                                                        brush.face[0].v[0][1] = (float)front;
                                                        brush.face[0].v[0][2] = Node[q[2]].p[2];
-                                                       
+
                                                        brush.face[0].v[1][0] = Node[q[1]].p[0];
                                                        brush.face[0].v[1][1] = (float)front;
                                                        brush.face[0].v[1][2] = Node[q[1]].p[2];
-                                                       
+
                                                        brush.face[0].v[2][0] = Node[q[0]].p[0];
                                                        brush.face[0].v[2][1] = (float)front;
                                                        brush.face[0].v[2][2] = Node[q[0]].p[2];
-                                                       
+
                                                        // back
                                                        brush.face[1].v[0][0] = Node[q[0]].p[0];
                                                        brush.face[1].v[0][1] = (float)backface;
                                                        brush.face[1].v[0][2] = Node[q[0]].p[2];
-                                                       
+
                                                        brush.face[1].v[1][0] = Node[q[1]].p[0];
                                                        brush.face[1].v[1][1] = (float)backface;
                                                        brush.face[1].v[1][2] = Node[q[1]].p[2];
-                                                       
+
                                                        brush.face[1].v[2][0] = Node[q[2]].p[0];
                                                        brush.face[1].v[2][1] = (float)backface;
                                                        brush.face[1].v[2][2] = Node[q[2]].p[2];
-                                                       
+
                                                        for(k0=0; k0<brush.NumFaces-2; k0++)
                                                        {
                                                                k =k0+2;
                                                                k1=(k0+1) % (brush.NumFaces-2);
-                                                               
+
                                                                brush.face[k].v[0][0] = Node[q[k0]].p[0];
                                                                brush.face[k].v[0][1] = (float)front;
                                                                brush.face[k].v[0][2] = Node[q[k0]].p[2];
-                                                               
+
                                                                brush.face[k].v[1][0] = Node[q[k1]].p[0];
                                                                brush.face[k].v[1][1] = (float)front;
                                                                brush.face[k].v[1][2] = Node[q[k1]].p[2];
-                                                               
+
                                                                brush.face[k].v[2][0] = Node[q[k1]].p[0];
                                                                brush.face[k].v[2][1] = (float)backface;
                                                                brush.face[k].v[2][2] = Node[q[k1]].p[2];
@@ -1177,41 +1176,41 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
                                                        brush.face[0].v[0][0] = (float)front;
                                                        brush.face[0].v[0][1] = Node[q[2]].p[1];
                                                        brush.face[0].v[0][2] = Node[q[2]].p[2];
-                                                       
+
                                                        brush.face[0].v[1][0] = (float)front;
                                                        brush.face[0].v[1][1] = Node[q[1]].p[1];
                                                        brush.face[0].v[1][2] = Node[q[1]].p[2];
-                                                       
+
                                                        brush.face[0].v[2][0] = (float)front;
                                                        brush.face[0].v[2][1] = Node[q[0]].p[1];
                                                        brush.face[0].v[2][2] = Node[q[0]].p[2];
-                                                       
+
                                                        // back
                                                        brush.face[1].v[0][0] = (float)backface;
                                                        brush.face[1].v[0][1] = Node[q[0]].p[1];
                                                        brush.face[1].v[0][2] = Node[q[0]].p[2];
-                                                       
+
                                                        brush.face[1].v[1][0] = (float)backface;
                                                        brush.face[1].v[1][1] = Node[q[1]].p[1];
                                                        brush.face[1].v[1][2] = Node[q[1]].p[2];
-                                                       
+
                                                        brush.face[1].v[2][0] = (float)backface;
                                                        brush.face[1].v[2][1] = Node[q[2]].p[1];
                                                        brush.face[1].v[2][2] = Node[q[2]].p[2];
-                                                       
+
                                                        for(k0=0; k0<brush.NumFaces-2; k0++)
                                                        {
                                                                k =k0+2;
                                                                k1=(k0+1) % (brush.NumFaces-2);
-                                                               
+
                                                                brush.face[k].v[0][0] = (float)front;
                                                                brush.face[k].v[0][1] = Node[q[k0]].p[1];
                                                                brush.face[k].v[0][2] = Node[q[k0]].p[2];
-                                                               
+
                                                                brush.face[k].v[1][0] = (float)front;
                                                                brush.face[k].v[1][1] = Node[q[k1]].p[1];
                                                                brush.face[k].v[1][2] = Node[q[k1]].p[2];
-                                                               
+
                                                                brush.face[k].v[2][0] = (float)backface;
                                                                brush.face[k].v[2][1] = Node[q[k1]].p[1];
                                                                brush.face[k].v[2][2] = Node[q[k1]].p[2];
@@ -1222,41 +1221,41 @@ void MapOut(int NumNodes,int NumTris, NODE *Node, TRI *Tri)
                                                        brush.face[0].v[0][0] = Node[q[2]].p[0];
                                                        brush.face[0].v[0][1] = Node[q[2]].p[1];
                                                        brush.face[0].v[0][2] = (float)front;
-                                                       
+
                                                        brush.face[0].v[1][0] = Node[q[1]].p[0];
                                                        brush.face[0].v[1][1] = Node[q[1]].p[1];
                                                        brush.face[0].v[1][2] = (float)front;
-                                                       
+
                                                        brush.face[0].v[2][0] = Node[q[0]].p[0];
                                                        brush.face[0].v[2][1] = Node[q[0]].p[1];
                                                        brush.face[0].v[2][2] = (float)front;
-                                                       
+
                                                        // back
                                                        brush.face[1].v[0][0] = Node[q[0]].p[0];
                                                        brush.face[1].v[0][1] = Node[q[0]].p[1];
                                                        brush.face[1].v[0][2] = (float)backface;
-                                                       
+
                                                        brush.face[1].v[1][0] = Node[q[1]].p[0];
                                                        brush.face[1].v[1][1] = Node[q[1]].p[1];
                                                        brush.face[1].v[1][2] = (float)backface;
-                                                       
+
                                                        brush.face[1].v[2][0] = Node[q[2]].p[0];
                                                        brush.face[1].v[2][1] = Node[q[2]].p[1];
                                                        brush.face[1].v[2][2] = (float)backface;
-                                                       
+
                                                        for(k0=0; k0<brush.NumFaces-2; k0++)
                                                        {
                                                                k =k0+2;
                                                                k1=(k0+1) % (brush.NumFaces-2);
-                                                               
+
                                                                brush.face[k].v[0][0] = Node[q[k0]].p[0];
                                                                brush.face[k].v[0][1] = Node[q[k0]].p[1];
                                                                brush.face[k].v[0][2] = (float)front;
-                                                               
+
                                                                brush.face[k].v[1][0] = Node[q[k1]].p[0];
                                                                brush.face[k].v[1][1] = Node[q[k1]].p[1];
                                                                brush.face[k].v[1][2] = (float)front;
-                                                               
+
                                                                brush.face[k].v[2][0] = Node[q[k1]].p[0];
                                                                brush.face[k].v[2][1] = Node[q[k1]].p[1];
                                                                brush.face[k].v[2][2] = (float)backface;
index 081a83d466473dc7b2ff5b8d204ac35a22797cf3..17a557ecc2699bb545fffdfa07eb3c280a969b0e 100644 (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] = { 
index 207f6b0702dedf764ee3a664c6d959c6836bf55d..8756f037af5fa14adb2454161891bd3320d4ff6b 100644 (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);
index 65f900884da9df98b4f9fb93a1dd8014c8293acb..5803b33f7f7a2c7e5f3c1ce430bf15de2ba1c037 100644 (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];
index 021531ac1c7319068a90ef64d5b7902b40270e62..01ef70fae62c9aaf99cf2baaf042e45c37aad600 100644 (file)
@@ -48,7 +48,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "version.h"
 
 CRadiantImageManager g_ImageManager;
-CRadiantPluginManager g_PluginsManager;    
+CRadiantPluginManager g_PluginsManager;
 
 _QERPlugSurfaceTable g_SurfaceTable;
 _QERFileSystemTable g_FileSystemTable;
@@ -127,7 +127,7 @@ void InitFileTypes()
 
   GetFileTypeRegistry()->addType(MAP_MAJOR, g_pattern_mapq3);
   GetFileTypeRegistry()->addType(MAP_MAJOR, g_pattern_mapxml);
-  
+
   GetFileTypeRegistry()->addType("region", g_pattern_regq3);
 /*
   GetFileTypeRegistry()->addType(MODEL_MAJOR, g_pattern_modelmd3);
@@ -282,7 +282,7 @@ public:
         return &elem->m_model;
       }
     }
-    
+
     elem = new CModelWrapper(id, version);
     g_ptr_array_add(m_ptrs, elem);
 
@@ -327,7 +327,7 @@ public:
     }
     mAPIs.clear();
   }
-  
+
   // CSynapseAPIManager interface -------------------
   APIDescriptor_t* BuildRequireAPI(APIDescriptor_t* pAPI)
   {
@@ -346,7 +346,7 @@ public:
     for(i=mAPIs.begin(); i!=mAPIs.end(); i++)
       AddItem((_QERPlugToolbarTable*)(*i)->mpTable);
   }
-  
+
 private:
 
   void AddItem(_QERPlugToolbarTable* pTable)
@@ -423,7 +423,7 @@ void CRadiantImageManager::LoadImage(const char *name, byte **pic, int *width, i
     }
     return;
   }
-  
+
   // start walking the interfaces
   list<CImageTableSlot *>::iterator iSlot;
   for(iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++)
@@ -456,7 +456,7 @@ const char* CRadiantImageManager::GetNextExtension()
 
 /* plugin manager --------------------------------------- */
 APIDescriptor_t* CRadiantPluginManager::BuildRequireAPI(APIDescriptor_t *pAPI)
-{  
+{
   CPluginSlot *pSlot = new CPluginSlot(pAPI);
   mSlots.push_front(pSlot);
   return pSlot->GetDescriptor();
@@ -479,7 +479,7 @@ void CSynapseClientRadiant::ImportMap(IDataStream *in, CPtrArray *ents, const ch
   }
   else if (strcmp(type,"xmap")==0)
   {
-    g_MapTable2.m_pfnMap_Read(in, ents);    
+    g_MapTable2.m_pfnMap_Read(in, ents);
   }
   else
     Sys_FPrintf(SYS_WRN, "WARNING: no module found for map interface type '%s'\n", type);
@@ -512,7 +512,7 @@ CPluginSlot::CPluginSlot(APIDescriptor_t *pAPI)
 }
 
 CPluginSlot::~CPluginSlot()
-{  
+{
   delete mpAPI;
   delete mpTable;
   while (m_CommandStrings)
@@ -551,14 +551,14 @@ int CPluginSlot::getCommandCount()
 {
   if (!m_bReady)
     Init();
-  return g_slist_length (m_CommandStrings);  
+  return g_slist_length (m_CommandStrings);
 }
-  
+
 const char* CPluginSlot::getCommand(int n)
 {
   if (!m_bReady)
     Init();
-  return (char*)g_slist_nth_data (m_CommandStrings, n);  
+  return (char*)g_slist_nth_data (m_CommandStrings, n);
 }
 
 void CPluginSlot::addMenuID(int n)
@@ -647,11 +647,11 @@ void CPlugInManager::InitForDir(const Str &dir)
     path += g_strModulesDir;
     // SYNAPSE
     g_pParentWnd->GetSynapseServer().AddSearchPath(path);
-  } 
+  }
 }
 
-static const XMLConfigEntry_t manager_entries[] = 
-  { 
+static const XMLConfigEntry_t manager_entries[] =
+  {
     { VFS_MAJOR,            SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable },
     { SHADERS_MAJOR,        SYN_REQUIRE, sizeof(g_ShadersTable),    &g_ShadersTable },
     { MAP_MAJOR,            SYN_REQUIRE, sizeof(g_MapTable),        &g_MapTable },
@@ -662,9 +662,9 @@ static const XMLConfigEntry_t manager_entries[] =
 void CPlugInManager::Init()
 {
   Str synapse_config;
-  
+
   Cleanup();
-  
+
   // set some globals
   g_qeglobals.bBSPFrontendPlugin = false;
 
@@ -675,10 +675,10 @@ void CPlugInManager::Init()
   synapse_config += "synapse.config";
   if (!g_pParentWnd->GetSynapseServer().Initialize(synapse_config.GetBuffer(), &Sys_Printf_VA))
     Error("Synpase server initialization failed (see console)\n");
-  
+
   // builtin modules
   g_pParentWnd->GetSynapseServer().EnumerateBuiltinModule(&eclass_def);
-  
+
   // APIs we provide
   g_pParentWnd->GetSynapseClient().AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1));
   g_pParentWnd->GetSynapseClient().AddAPI(SCRIPLIB_MAJOR, NULL, sizeof(_QERScripLibTable));
@@ -691,15 +691,15 @@ void CPlugInManager::Init()
   g_pParentWnd->GetSynapseClient().AddAPI(SELECTEDFACE_MAJOR, NULL, sizeof(_QERSelectedFaceTable));
   g_pParentWnd->GetSynapseClient().AddAPI(APPSURFACEDIALOG_MAJOR, NULL, sizeof(_QERAppSurfaceTable));
   g_pParentWnd->GetSynapseClient().AddAPI(UNDO_MAJOR, NULL, sizeof(_QERUndoTable));
-  g_pParentWnd->GetSynapseClient().AddAPI(UI_MAJOR, NULL, sizeof(_QERUITable));  
-  g_pParentWnd->GetSynapseClient().AddAPI(UIGTK_MAJOR, NULL, sizeof(_QERUIGtkTable));  
-  g_pParentWnd->GetSynapseClient().AddAPI(CAMERA_MAJOR, NULL, sizeof(_QERCameraTable));  
-  
+  g_pParentWnd->GetSynapseClient().AddAPI(UI_MAJOR, NULL, sizeof(_QERUITable));
+  g_pParentWnd->GetSynapseClient().AddAPI(UIGTK_MAJOR, NULL, sizeof(_QERUIGtkTable));
+  g_pParentWnd->GetSynapseClient().AddAPI(CAMERA_MAJOR, NULL, sizeof(_QERCameraTable));
+
   // modules configured by XML
   if ( !g_pParentWnd->GetSynapseClient().ConfigXML( &g_pParentWnd->GetSynapseServer(), "core", manager_entries ) ) {
     Error("Synapse server initialization failed (see console)\n");
   }
-  
+
   // adding a manager is a special case that ConfigXML doesn't take care of
   g_pParentWnd->GetSynapseServer().SelectClientConfig( "core" );
   char *minor;
@@ -709,11 +709,11 @@ void CPlugInManager::Init()
   }
   g_ImageManager.SetMatchAPI( IMAGE_MAJOR, minor );
   g_pParentWnd->GetSynapseClient().AddManager( &g_ImageManager );
-  
+
   // SYN_REQUIRE entries which are still hardcoded
   g_pParentWnd->GetSynapseClient().AddAPI(MAP_MAJOR, "mapxml", sizeof(g_MapTable2), SYN_REQUIRE, &g_MapTable2);
   g_pParentWnd->GetSynapseClient().AddAPI(ENTITY_MAJOR, NULL, sizeof(g_EntityTable), SYN_REQUIRE, &g_EntityTable);
-  
+
   // plugins: load anything that claims to be a plugin
   // minor becomes some kind of matching pattern
   // g_PluginsManager is an API any class, it receives several function tables as needed
@@ -850,7 +850,7 @@ void CPlugInManager::DeleteBrushHandle(void * vp)
 
 void CPlugInManager::CommitBrushHandleToMap(void * vp)
 {
-  g_bScreenUpdates = false; 
+  g_bScreenUpdates = false;
   for (int i = 0; i < m_BrushHandles.GetSize(); i++)
   {
     brush_t *pb = reinterpret_cast<brush_t*>(m_BrushHandles.GetAt(i));
@@ -863,7 +863,7 @@ void CPlugInManager::CommitBrushHandleToMap(void * vp)
       Select_Brush(pb);
     }
   }
-  g_bScreenUpdates = true; 
+  g_bScreenUpdates = true;
   Sys_UpdateWindows(W_ALL);
 }
 
@@ -971,7 +971,7 @@ void QERApp_SetCamera( vec3_t origin, vec3_t angles )
   VectorCopy( origin, g_pParentWnd->GetCamWnd()->Camera()->origin );
   VectorCopy( angles, g_pParentWnd->GetCamWnd()->Camera()->angles );
 
-  Sys_UpdateWindows( W_ALL ); // specify 
+  Sys_UpdateWindows( W_ALL ); // specify
   g_pParentWnd->OnTimer();
 }
 
@@ -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);
@@ -1503,7 +1503,7 @@ IEpair* WINAPI QERApp_IEpairForEntityHandle(void *vp)
   return pEp;
 }
 
-IEpair* WINAPI QERApp_IEpairForProjectKeys()   
+IEpair* WINAPI QERApp_IEpairForProjectKeys()
 {
   CEpairsWrapper *pEp = new CEpairsWrapper(g_qeglobals.d_project_entity);
   pEp->IncRef();
@@ -1784,7 +1784,7 @@ void CPlugInManager::CommitEntityHandleToMap(void* vpEntity)
 
 void WINAPI QERApp_SetScreenUpdate(int bScreenUpdates)
 {
-  g_bScreenUpdates = bScreenUpdates; 
+  g_bScreenUpdates = bScreenUpdates;
 }
 
 texturewin_t* QERApp_QeglobalsTexturewin()
@@ -2123,7 +2123,7 @@ unsigned long QERApp_GetTickCount()
   gettimeofday(&tp, &tzp);
   if (!basetime)
     basetime = tp.tv_sec;
-  return (tp.tv_sec-basetime) + tp.tv_usec/1000;       
+  return (tp.tv_sec-basetime) + tp.tv_usec/1000;
 #endif
 }
 
@@ -2274,7 +2274,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     pShadersTable->m_pfnTexture_ShowInuse = Texture_ShowInuse;
     pShadersTable->m_pfnBuildShaderList = &BuildShaderList;
     pShadersTable->m_pfnPreloadShaders = &PreloadShaders;
-    
+
     return true;
   }
   if (!strcmp(pAPI->major_name, QGL_MAJOR))
@@ -2304,7 +2304,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     pQglTable->m_pfn_qglDeleteTextures = qglDeleteTextures;
     pQglTable->m_pfn_qglDrawElements = qglDrawElements;
     pQglTable->m_pfn_qglEnable = qglEnable;
-    pQglTable->m_pfn_qglEnableClientState = qglEnableClientState;      
+    pQglTable->m_pfn_qglEnableClientState = qglEnableClientState;
     pQglTable->m_pfn_qglEnd = qglEnd;
     pQglTable->m_pfn_qglEndList = qglEndList;
     pQglTable->m_pfn_qglFogf = qglFogf;
@@ -2380,7 +2380,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     pDataTable->m_pfnSelectedBrushes = QERApp_SelectedBrushes;
     pDataTable->m_pfnFilteredBrushes = QERApp_FilteredBrushes;
     pDataTable->m_pfnLstSkinCache = QERApp_LstSkinCache;
-    
+
     return true;
   }
   if (!strcmp(pAPI->major_name, PATCH_MAJOR))
@@ -2389,24 +2389,24 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     pPatchTable->m_pfnPatch_Alloc = &Patch_Alloc;
     pPatchTable->m_pfnAddBrushForPatch = &AddBrushForPatch;
     pPatchTable->m_pfnMakeNewPatch = &MakeNewPatch;
-  
+
     return true;
   }
   if (!strcmp(pAPI->major_name, ECLASSMANAGER_MAJOR))
   {
     _EClassManagerTable *pEClassManTable = static_cast<_EClassManagerTable *>(pAPI->mpTable);
-    
+
     pEClassManTable->m_pfnEclass_InsertAlphabetized = &Eclass_InsertAlphabetized;
     pEClassManTable->m_pfnGet_Eclass_E = &Get_EClass_E;
     pEClassManTable->m_pfnSet_Eclass_Found = &Set_Eclass_Found;
     pEClassManTable->m_pfnGet_Parsing_Single = &Get_Parsing_Single;
     pEClassManTable->m_pfnEClass_Create = &EClass_Create;
     pEClassManTable->m_pfnEclass_ForName = &Eclass_ForName;
-  
+
     return true;
   }
   if (!strcmp(pAPI->major_name, SELECTEDFACE_MAJOR))
-  { 
+  {
     _QERSelectedFaceTable *pSelectedFaceTable = static_cast<_QERSelectedFaceTable *>(pAPI->mpTable);
 
     pSelectedFaceTable->m_pfnGetSelectedFaceCount = &QERApp_GetSelectedFaceCount;
@@ -2452,7 +2452,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     return true;
   }
   if (!strcmp(pAPI->major_name, UNDO_MAJOR))
-  { 
+  {
     _QERUndoTable *pUndoTable = static_cast<_QERUndoTable *>(pAPI->mpTable);
 
     pUndoTable->m_pfnUndo_Start = &Undo_Start;
@@ -2482,7 +2482,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     return true;
   }
   if (!strcmp(pAPI->major_name, UI_MAJOR))
-  { 
+  {
     _QERUITable *pUITable = static_cast<_QERUITable *>(pAPI->mpTable);
 
     pUITable->m_pfnCreateGLWindow = QERApp_CreateGLWindow;
@@ -2495,7 +2495,7 @@ bool CSynapseClientRadiant::RequestAPI(APIDescriptor_t *pAPI)
     return true;
   }
   if (!strcmp(pAPI->major_name, UIGTK_MAJOR))
-  { 
+  {
     _QERUIGtkTable *pUIGtkTable = static_cast<_QERUIGtkTable *>(pAPI->mpTable);
 
     pUIGtkTable->m_pfn_GetQeglobalsGLWidget = &QERApp_GetQeGlobalsGLWidget;