// Name: utils.cpp
// Purpose:
// Author: Robert Roebling
-// Created: 01/02/97
-// Id:
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// the Real User, then determine the Real home dir.
static char *GetIniFile(char *dest, const char *filename)
{
- char *home = NULL;
+ char *home = (char *) NULL;
if (filename && wxIsAbsolutePath(filename))
{
strcpy(dest, filename);
if (XResourceManagerString(GDK_DISPLAY()) != NULL) {
serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY()));
} else {
- (void)GetIniFile(filename, NULL);
+ (void)GetIniFile(filename, (char *) NULL);
serverDB = XrmGetFileDatabase(filename);
}
if (serverDB)
if ((environment = getenv("XENVIRONMENT")) == NULL) {
size_t len;
- environment = GetIniFile(filename, NULL);
+ environment = GetIniFile(filename, (const char *) NULL);
len = strlen(environment);
#if !defined(SVR4) || defined(__sgi)
(void)gethostname(environment + len, 1024 - len);
wxNode *node = wxTheResourceCache->First();
while (node) {
- char *file = node->key.string;
+ wxString str = node->GetKeyString();
+ char *file = WXSTRINGCAST str;
// If file doesn't exist, create it first.
(void)GetResourcePath(nameBuffer, file, TRUE);
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file )
{
- char *s = NULL;
+ char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
- *value = (float)strtod(s, NULL);
+ *value = (float)strtod(s, (char **) NULL);
delete[]s;
return TRUE;
} else
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file )
{
- char *s = NULL;
+ char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
- *value = strtol(s, NULL, 10);
+ *value = strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file )
{
- char *s = NULL;
+ char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
// Handle True, False here
*value = FALSE;
// Handle as Integer
else
- *value = (int)strtol(s, NULL, 10);
+ *value = (int)strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else